@coralai/sps-cli 0.55.13 → 0.56.1
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/dist/commands/cardMarkComplete.d.ts.map +1 -1
- package/dist/commands/cardMarkComplete.js +6 -3
- package/dist/commands/cardMarkComplete.js.map +1 -1
- package/dist/commands/projectInit.d.ts +18 -16
- package/dist/commands/projectInit.d.ts.map +1 -1
- package/dist/commands/projectInit.js +59 -186
- package/dist/commands/projectInit.js.map +1 -1
- package/dist/commands/skillCommand.js +7 -4
- package/dist/commands/skillCommand.js.map +1 -1
- package/dist/commands/tick.d.ts +2 -20
- package/dist/commands/tick.d.ts.map +1 -1
- package/dist/commands/tick.js +58 -1
- package/dist/commands/tick.js.map +1 -1
- package/dist/console/index.d.ts.map +1 -1
- package/dist/console/index.js +4 -0
- package/dist/console/index.js.map +1 -1
- package/dist/console/routes/chat.d.ts.map +1 -1
- package/dist/console/routes/chat.js +211 -6
- package/dist/console/routes/chat.js.map +1 -1
- package/dist/console/routes/projects.d.ts +0 -6
- package/dist/console/routes/projects.d.ts.map +1 -1
- package/dist/console/routes/projects.js +11 -2
- package/dist/console/routes/projects.js.map +1 -1
- package/dist/console/routes/providers.d.ts +10 -0
- package/dist/console/routes/providers.d.ts.map +1 -0
- package/dist/console/routes/providers.js +63 -0
- package/dist/console/routes/providers.js.map +1 -0
- package/dist/console/routes/smartarrange.d.ts +4 -0
- package/dist/console/routes/smartarrange.d.ts.map +1 -0
- package/dist/console/routes/smartarrange.js +107 -0
- package/dist/console/routes/smartarrange.js.map +1 -0
- package/dist/console/routes/system.d.ts.map +1 -1
- package/dist/console/routes/system.js +28 -0
- package/dist/console/routes/system.js.map +1 -1
- package/dist/console/routes/workers.d.ts.map +1 -1
- package/dist/console/routes/workers.js +36 -4
- package/dist/console/routes/workers.js.map +1 -1
- package/dist/console-assets/assets/index-CWkYVI5d.js +600 -0
- package/dist/console-assets/assets/index-CnUBHNsN.css +10 -0
- package/dist/console-assets/index.html +2 -2
- package/dist/core/agents/AcpBackend.d.ts +24 -0
- package/dist/core/agents/AcpBackend.d.ts.map +1 -0
- package/dist/core/agents/AcpBackend.js +86 -0
- package/dist/core/agents/AcpBackend.js.map +1 -0
- package/dist/core/agents/AgentBackend.d.ts +53 -0
- package/dist/core/agents/AgentBackend.d.ts.map +1 -0
- package/dist/core/agents/AgentBackend.js +18 -0
- package/dist/core/agents/AgentBackend.js.map +1 -0
- package/dist/core/agents/ClaudeAcpBackend.d.ts +13 -0
- package/dist/core/agents/ClaudeAcpBackend.d.ts.map +1 -0
- package/dist/core/agents/ClaudeAcpBackend.js +14 -0
- package/dist/core/agents/ClaudeAcpBackend.js.map +1 -0
- package/dist/core/agents/ClaudeSdkBackend.d.ts +26 -0
- package/dist/core/agents/ClaudeSdkBackend.d.ts.map +1 -0
- package/dist/core/agents/ClaudeSdkBackend.js +102 -0
- package/dist/core/agents/ClaudeSdkBackend.js.map +1 -0
- package/dist/core/agents/CodexAppServerBackend.d.ts +33 -0
- package/dist/core/agents/CodexAppServerBackend.d.ts.map +1 -0
- package/dist/core/agents/CodexAppServerBackend.js +168 -0
- package/dist/core/agents/CodexAppServerBackend.js.map +1 -0
- package/dist/core/agents/OpenAiAgentBackend.d.ts +39 -0
- package/dist/core/agents/OpenAiAgentBackend.d.ts.map +1 -0
- package/dist/core/agents/OpenAiAgentBackend.js +132 -0
- package/dist/core/agents/OpenAiAgentBackend.js.map +1 -0
- package/dist/core/agents/agentsMd.d.ts +2 -0
- package/dist/core/agents/agentsMd.d.ts.map +1 -0
- package/dist/core/agents/agentsMd.js +22 -0
- package/dist/core/agents/agentsMd.js.map +1 -0
- package/dist/core/agents/localTracing.d.ts +3 -0
- package/dist/core/agents/localTracing.d.ts.map +1 -0
- package/dist/core/agents/localTracing.js +42 -0
- package/dist/core/agents/localTracing.js.map +1 -0
- package/dist/core/agents/resolveBackend.d.ts +26 -0
- package/dist/core/agents/resolveBackend.d.ts.map +1 -0
- package/dist/core/agents/resolveBackend.js +27 -0
- package/dist/core/agents/resolveBackend.js.map +1 -0
- package/dist/core/agents/workerOutputSink.d.ts +4 -0
- package/dist/core/agents/workerOutputSink.d.ts.map +1 -0
- package/dist/core/agents/workerOutputSink.js +39 -0
- package/dist/core/agents/workerOutputSink.js.map +1 -0
- package/dist/core/config.d.ts +6 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +4 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/intel/RuntimeSession.d.ts +16 -0
- package/dist/core/intel/RuntimeSession.d.ts.map +1 -0
- package/dist/core/intel/RuntimeSession.js +89 -0
- package/dist/core/intel/RuntimeSession.js.map +1 -0
- package/dist/core/intel/agentsConfig.d.ts +20 -0
- package/dist/core/intel/agentsConfig.d.ts.map +1 -0
- package/dist/core/intel/agentsConfig.js +68 -0
- package/dist/core/intel/agentsConfig.js.map +1 -0
- package/dist/core/intel/planStore.d.ts +23 -0
- package/dist/core/intel/planStore.d.ts.map +1 -0
- package/dist/core/intel/planStore.js +67 -0
- package/dist/core/intel/planStore.js.map +1 -0
- package/dist/core/intel/types.d.ts +86 -0
- package/dist/core/intel/types.d.ts.map +1 -0
- package/dist/core/intel/types.js +8 -0
- package/dist/core/intel/types.js.map +1 -0
- package/dist/core/memoryIngest.d.ts +18 -0
- package/dist/core/memoryIngest.d.ts.map +1 -0
- package/dist/core/memoryIngest.js +56 -0
- package/dist/core/memoryIngest.js.map +1 -0
- package/dist/core/memoryProvider.d.ts +63 -0
- package/dist/core/memoryProvider.d.ts.map +1 -0
- package/dist/core/memoryProvider.js +205 -0
- package/dist/core/memoryProvider.js.map +1 -0
- package/dist/core/skillStore.d.ts.map +1 -1
- package/dist/core/skillStore.js +2 -1
- package/dist/core/skillStore.js.map +1 -1
- package/dist/core/skills/SkillsManager.d.ts +38 -0
- package/dist/core/skills/SkillsManager.d.ts.map +1 -0
- package/dist/core/skills/SkillsManager.js +231 -0
- package/dist/core/skills/SkillsManager.js.map +1 -0
- package/dist/core/skills/distribution.d.ts +64 -0
- package/dist/core/skills/distribution.d.ts.map +1 -0
- package/dist/core/skills/distribution.js +269 -0
- package/dist/core/skills/distribution.js.map +1 -0
- package/dist/core/skills/index.d.ts +13 -0
- package/dist/core/skills/index.d.ts.map +1 -0
- package/dist/core/skills/index.js +13 -0
- package/dist/core/skills/index.js.map +1 -0
- package/dist/core/skills/types.d.ts +44 -0
- package/dist/core/skills/types.d.ts.map +1 -0
- package/dist/core/skills/types.js +9 -0
- package/dist/core/skills/types.js.map +1 -0
- package/dist/core/taskPrompts.d.ts +0 -12
- package/dist/core/taskPrompts.d.ts.map +1 -1
- package/dist/core/taskPrompts.js +0 -14
- package/dist/core/taskPrompts.js.map +1 -1
- package/dist/core/transcriptIngest.d.ts +37 -0
- package/dist/core/transcriptIngest.d.ts.map +1 -0
- package/dist/core/transcriptIngest.js +137 -0
- package/dist/core/transcriptIngest.js.map +1 -0
- package/dist/core/wiki/types.d.ts +282 -745
- package/dist/core/wiki/types.d.ts.map +1 -1
- package/dist/core/wiki/types.js +1 -1
- package/dist/core/wiki/types.js.map +1 -1
- package/dist/daemon/daemonClient.d.ts +6 -0
- package/dist/daemon/daemonClient.d.ts.map +1 -1
- package/dist/daemon/daemonClient.js.map +1 -1
- package/dist/daemon/sessionDaemon.d.ts.map +1 -1
- package/dist/daemon/sessionDaemon.js.map +1 -1
- package/dist/engines/SmartArrangeEngine.d.ts +75 -0
- package/dist/engines/SmartArrangeEngine.d.ts.map +1 -0
- package/dist/engines/SmartArrangeEngine.js +112 -0
- package/dist/engines/SmartArrangeEngine.js.map +1 -0
- package/dist/engines/StageEngine.d.ts +3 -17
- package/dist/engines/StageEngine.d.ts.map +1 -1
- package/dist/engines/StageEngine.js +13 -91
- package/dist/engines/StageEngine.js.map +1 -1
- package/dist/engines/smartarrange/AcpWorkerExec.d.ts +35 -0
- package/dist/engines/smartarrange/AcpWorkerExec.d.ts.map +1 -0
- package/dist/engines/smartarrange/AcpWorkerExec.js +71 -0
- package/dist/engines/smartarrange/AcpWorkerExec.js.map +1 -0
- package/dist/engines/smartarrange/cardSink.d.ts +29 -0
- package/dist/engines/smartarrange/cardSink.d.ts.map +1 -0
- package/dist/engines/smartarrange/cardSink.js +43 -0
- package/dist/engines/smartarrange/cardSink.js.map +1 -0
- package/dist/engines/smartarrange/runner.d.ts +24 -0
- package/dist/engines/smartarrange/runner.d.ts.map +1 -0
- package/dist/engines/smartarrange/runner.js +116 -0
- package/dist/engines/smartarrange/runner.js.map +1 -0
- package/dist/engines/smartarrange/screenshot.d.ts +5 -0
- package/dist/engines/smartarrange/screenshot.d.ts.map +1 -0
- package/dist/engines/smartarrange/screenshot.js +117 -0
- package/dist/engines/smartarrange/screenshot.js.map +1 -0
- package/dist/main.js +127 -92
- package/dist/main.js.map +1 -1
- package/dist/manager/worker-manager-impl.d.ts.map +1 -1
- package/dist/manager/worker-manager-impl.js +7 -0
- package/dist/manager/worker-manager-impl.js.map +1 -1
- package/dist/providers/ACPWorkerRuntime.d.ts +2 -0
- package/dist/providers/ACPWorkerRuntime.d.ts.map +1 -1
- package/dist/providers/ACPWorkerRuntime.js +1 -0
- package/dist/providers/ACPWorkerRuntime.js.map +1 -1
- package/dist/providers/LLMClient.d.ts +32 -0
- package/dist/providers/LLMClient.d.ts.map +1 -0
- package/dist/providers/LLMClient.js +108 -0
- package/dist/providers/LLMClient.js.map +1 -0
- package/dist/providers/MarkdownTaskBackend.d.ts.map +1 -1
- package/dist/providers/MarkdownTaskBackend.js +3 -2
- package/dist/providers/MarkdownTaskBackend.js.map +1 -1
- package/dist/providers/llm/chatTools.d.ts +11 -0
- package/dist/providers/llm/chatTools.d.ts.map +1 -0
- package/dist/providers/llm/chatTools.js +57 -0
- package/dist/providers/llm/chatTools.js.map +1 -0
- package/dist/providers/llm/codexAuth.d.ts +8 -0
- package/dist/providers/llm/codexAuth.d.ts.map +1 -0
- package/dist/providers/llm/codexAuth.js +57 -0
- package/dist/providers/llm/codexAuth.js.map +1 -0
- package/dist/providers/llm/codexModel.d.ts +14 -0
- package/dist/providers/llm/codexModel.d.ts.map +1 -0
- package/dist/providers/llm/codexModel.js +96 -0
- package/dist/providers/llm/codexModel.js.map +1 -0
- package/dist/providers/llm/localSubscription.d.ts +15 -0
- package/dist/providers/llm/localSubscription.d.ts.map +1 -0
- package/dist/providers/llm/localSubscription.js +66 -0
- package/dist/providers/llm/localSubscription.js.map +1 -0
- package/dist/providers/llm/modelFactory.d.ts +14 -0
- package/dist/providers/llm/modelFactory.d.ts.map +1 -0
- package/dist/providers/llm/modelFactory.js +22 -0
- package/dist/providers/llm/modelFactory.js.map +1 -0
- package/dist/providers/llm/monitorSkills.d.ts +6 -0
- package/dist/providers/llm/monitorSkills.d.ts.map +1 -0
- package/dist/providers/llm/monitorSkills.js +37 -0
- package/dist/providers/llm/monitorSkills.js.map +1 -0
- package/dist/providers/llm/probeTools.d.ts +7 -0
- package/dist/providers/llm/probeTools.d.ts.map +1 -0
- package/dist/providers/llm/probeTools.js +84 -0
- package/dist/providers/llm/probeTools.js.map +1 -0
- package/dist/providers/llm/providers.d.ts +26 -0
- package/dist/providers/llm/providers.d.ts.map +1 -0
- package/dist/providers/llm/providers.js +68 -0
- package/dist/providers/llm/providers.js.map +1 -0
- package/dist/providers/llm/skillTools.d.ts +4 -0
- package/dist/providers/llm/skillTools.d.ts.map +1 -0
- package/dist/providers/llm/skillTools.js +42 -0
- package/dist/providers/llm/skillTools.js.map +1 -0
- package/dist/providers/llm/workerTools.d.ts +9 -0
- package/dist/providers/llm/workerTools.d.ts.map +1 -0
- package/dist/providers/llm/workerTools.js +111 -0
- package/dist/providers/llm/workerTools.js.map +1 -0
- package/dist/providers/mcp/spsMcpServer.d.ts +15 -0
- package/dist/providers/mcp/spsMcpServer.d.ts.map +1 -0
- package/dist/providers/mcp/spsMcpServer.js +67 -0
- package/dist/providers/mcp/spsMcpServer.js.map +1 -0
- package/dist/providers/mcp/spsMcpStdio.d.ts +2 -0
- package/dist/providers/mcp/spsMcpStdio.d.ts.map +1 -0
- package/dist/providers/mcp/spsMcpStdio.js +32 -0
- package/dist/providers/mcp/spsMcpStdio.js.map +1 -0
- package/dist/providers/mcp/spsMcpStdioConfig.d.ts +11 -0
- package/dist/providers/mcp/spsMcpStdioConfig.d.ts.map +1 -0
- package/dist/providers/mcp/spsMcpStdioConfig.js +19 -0
- package/dist/providers/mcp/spsMcpStdioConfig.js.map +1 -0
- package/dist/server.d.ts +23 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +23 -0
- package/dist/server.js.map +1 -1
- package/dist/services/ChatService.d.ts +10 -0
- package/dist/services/ChatService.d.ts.map +1 -1
- package/dist/services/ChatService.js +2 -0
- package/dist/services/ChatService.js.map +1 -1
- package/dist/services/LogService.d.ts +1 -1
- package/dist/services/LogService.d.ts.map +1 -1
- package/dist/services/LogService.js +3 -2
- package/dist/services/LogService.js.map +1 -1
- package/dist/services/ProjectService.d.ts +12 -2
- package/dist/services/ProjectService.d.ts.map +1 -1
- package/dist/services/ProjectService.js +1 -0
- package/dist/services/ProjectService.js.map +1 -1
- package/dist/services/SkillService.js +11 -13
- package/dist/services/SkillService.js.map +1 -1
- package/dist/services/SmartArrangeService.d.ts +12 -0
- package/dist/services/SmartArrangeService.d.ts.map +1 -0
- package/dist/services/SmartArrangeService.js +37 -0
- package/dist/services/SmartArrangeService.js.map +1 -0
- package/dist/services/SystemService.d.ts +20 -0
- package/dist/services/SystemService.d.ts.map +1 -1
- package/dist/services/SystemService.js +93 -0
- package/dist/services/SystemService.js.map +1 -1
- package/dist/services/WorkerService.d.ts +8 -0
- package/dist/services/WorkerService.d.ts.map +1 -1
- package/dist/services/WorkerService.js +73 -3
- package/dist/services/WorkerService.js.map +1 -1
- package/dist/services/container.d.ts +2 -0
- package/dist/services/container.d.ts.map +1 -1
- package/dist/services/container.js +2 -0
- package/dist/services/container.js.map +1 -1
- package/dist/shared/localTime.d.ts +8 -0
- package/dist/shared/localTime.d.ts.map +1 -0
- package/dist/shared/localTime.js +11 -0
- package/dist/shared/localTime.js.map +1 -0
- package/dist/shared/runtimePaths.d.ts +1 -1
- package/dist/shared/runtimePaths.d.ts.map +1 -1
- package/dist/shared/runtimePaths.js +2 -2
- package/dist/shared/runtimePaths.js.map +1 -1
- package/dist/shared/runtimeSchemas.d.ts +74 -245
- package/dist/shared/runtimeSchemas.d.ts.map +1 -1
- package/dist/shared/runtimeSchemas.js +2 -2
- package/dist/shared/runtimeSchemas.js.map +1 -1
- package/monitor-skills/probe-playbook/SKILL.md +32 -0
- package/monitor-skills/visual-rubric/SKILL.md +34 -0
- package/package.json +8 -8
- package/project-template/.claude/hooks/stop.sh +3 -1
- package/dist/console-assets/assets/index-BvWWj69G.js +0 -557
- package/dist/console-assets/assets/index-Eo4PuNPl.css +0 -10
- package/dist/interfaces/ACPClient.d.ts +0 -107
- package/dist/interfaces/ACPClient.d.ts.map +0 -1
- package/dist/interfaces/ACPClient.js +0 -17
- package/dist/interfaces/ACPClient.js.map +0 -1
- package/dist/interfaces/AgentRuntime.d.ts +0 -40
- package/dist/interfaces/AgentRuntime.d.ts.map +0 -1
- package/dist/interfaces/AgentRuntime.js +0 -17
- package/dist/interfaces/AgentRuntime.js.map +0 -1
- package/dist/manager/agentmemory.d.ts +0 -6
- package/dist/manager/agentmemory.d.ts.map +0 -1
- package/dist/manager/agentmemory.js +0 -73
- package/dist/manager/agentmemory.js.map +0 -1
- package/dist/models/acp.d.ts +0 -64
- package/dist/models/acp.d.ts.map +0 -1
- package/dist/models/acp.js +0 -17
- package/dist/models/acp.js.map +0 -1
- package/dist/providers/LocalACPClient.d.ts +0 -27
- package/dist/providers/LocalACPClient.d.ts.map +0 -1
- package/dist/providers/LocalACPClient.js +0 -26
- package/dist/providers/LocalACPClient.js.map +0 -1
- package/dist/providers/adapters/AcpSdkAdapter.d.ts +0 -24
- package/dist/providers/adapters/AcpSdkAdapter.d.ts.map +0 -1
- package/dist/providers/adapters/AcpSdkAdapter.js +0 -439
- package/dist/providers/adapters/AcpSdkAdapter.js.map +0 -1
- package/dist/providers/adapters/acp-fs-handlers.d.ts +0 -26
- package/dist/providers/adapters/acp-fs-handlers.d.ts.map +0 -1
- package/dist/providers/adapters/acp-fs-handlers.js +0 -61
- package/dist/providers/adapters/acp-fs-handlers.js.map +0 -1
- package/dist/providers/adapters/acp-permissions.d.ts +0 -42
- package/dist/providers/adapters/acp-permissions.d.ts.map +0 -1
- package/dist/providers/adapters/acp-permissions.js +0 -76
- package/dist/providers/adapters/acp-permissions.js.map +0 -1
- package/dist/providers/adapters/acp-session-accumulator.d.ts +0 -55
- package/dist/providers/adapters/acp-session-accumulator.d.ts.map +0 -1
- package/dist/providers/adapters/acp-session-accumulator.js +0 -133
- package/dist/providers/adapters/acp-session-accumulator.js.map +0 -1
- package/dist/providers/adapters/acp-terminal-manager.d.ts +0 -56
- package/dist/providers/adapters/acp-terminal-manager.d.ts.map +0 -1
- package/dist/providers/adapters/acp-terminal-manager.js +0 -127
- package/dist/providers/adapters/acp-terminal-manager.js.map +0 -1
- package/project-template/logs/.gitkeep +0 -0
- package/skills/architecture-decision-records/SKILL.md +0 -207
- package/skills/backend/SKILL.md +0 -62
- package/skills/backend/references/api-design.md +0 -168
- package/skills/backend/references/caching.md +0 -181
- package/skills/backend/references/data-access.md +0 -173
- package/skills/backend/references/layering.md +0 -181
- package/skills/backend/references/observability.md +0 -190
- package/skills/backend/references/resilience.md +0 -201
- package/skills/backend/references/security.md +0 -186
- package/skills/backend-architect/SKILL.md +0 -119
- package/skills/code-reviewer/SKILL.md +0 -143
- package/skills/coding-standards/SKILL.md +0 -60
- package/skills/coding-standards/references/clean-code.md +0 -258
- package/skills/coding-standards/references/code-review.md +0 -192
- package/skills/coding-standards/references/commits-and-prs.md +0 -226
- package/skills/coding-standards/references/error-strategy.md +0 -193
- package/skills/coding-standards/references/naming.md +0 -185
- package/skills/coding-standards/references/tdd.md +0 -171
- package/skills/database/SKILL.md +0 -53
- package/skills/database/references/indexing.md +0 -190
- package/skills/database/references/migrations.md +0 -199
- package/skills/database/references/nosql.md +0 -185
- package/skills/database/references/queries.md +0 -295
- package/skills/database/references/scaling.md +0 -203
- package/skills/database/references/schema.md +0 -191
- package/skills/database-optimizer/SKILL.md +0 -168
- package/skills/debugging-workflow/SKILL.md +0 -244
- package/skills/dev-worker/SKILL.md +0 -40
- package/skills/dev-worker/references/architect.md +0 -139
- package/skills/dev-worker/references/backend.md +0 -163
- package/skills/dev-worker/references/frontend.md +0 -122
- package/skills/dev-worker/references/fullstack.md +0 -179
- package/skills/dev-worker/references/optimizer.md +0 -151
- package/skills/dev-worker/references/phaser.md +0 -109
- package/skills/dev-worker/references/prototyper.md +0 -171
- package/skills/dev-worker/references/reviewer.md +0 -122
- package/skills/dev-worker/references/security.md +0 -154
- package/skills/dev-worker/references/senior.md +0 -155
- package/skills/dev-worker/references/typescript.md +0 -65
- package/skills/dev-worker/references/writer.md +0 -201
- package/skills/devops/SKILL.md +0 -55
- package/skills/devops/references/ci-cd.md +0 -204
- package/skills/devops/references/containers.md +0 -272
- package/skills/devops/references/deploy.md +0 -201
- package/skills/devops/references/iac.md +0 -252
- package/skills/devops/references/observability.md +0 -228
- package/skills/devops/references/secrets.md +0 -178
- package/skills/devops-automator/SKILL.md +0 -164
- package/skills/frontend/SKILL.md +0 -52
- package/skills/frontend/references/accessibility.md +0 -222
- package/skills/frontend/references/components.md +0 -206
- package/skills/frontend/references/performance.md +0 -219
- package/skills/frontend/references/routing.md +0 -209
- package/skills/frontend/references/state.md +0 -190
- package/skills/frontend/references/testing.md +0 -216
- package/skills/frontend-developer/SKILL.md +0 -115
- package/skills/git-workflow/SKILL.md +0 -355
- package/skills/golang/SKILL.md +0 -49
- package/skills/golang/references/concurrency.md +0 -284
- package/skills/golang/references/errors.md +0 -241
- package/skills/golang/references/idioms.md +0 -285
- package/skills/golang/references/testing.md +0 -238
- package/skills/java/SKILL.md +0 -50
- package/skills/java/references/concurrency.md +0 -194
- package/skills/java/references/idioms.md +0 -283
- package/skills/java/references/testing.md +0 -228
- package/skills/kotlin/SKILL.md +0 -47
- package/skills/kotlin/references/coroutines.md +0 -240
- package/skills/kotlin/references/idioms.md +0 -268
- package/skills/kotlin/references/testing.md +0 -219
- package/skills/mobile/SKILL.md +0 -50
- package/skills/mobile/references/architecture.md +0 -204
- package/skills/mobile/references/navigation.md +0 -158
- package/skills/mobile/references/performance.md +0 -152
- package/skills/mobile/references/platform.md +0 -166
- package/skills/mobile/references/state-and-data.md +0 -174
- package/skills/python/SKILL.md +0 -51
- package/skills/python/THIRD_PARTY.md +0 -14
- package/skills/python/references/async.md +0 -218
- package/skills/python/references/error-handling.md +0 -254
- package/skills/python/references/idioms.md +0 -279
- package/skills/python/references/packaging.md +0 -233
- package/skills/python/references/testing.md +0 -269
- package/skills/python/references/typing.md +0 -292
- package/skills/qa-tester/SKILL.md +0 -186
- package/skills/rust/SKILL.md +0 -50
- package/skills/rust/references/async.md +0 -224
- package/skills/rust/references/errors.md +0 -240
- package/skills/rust/references/ownership.md +0 -263
- package/skills/rust/references/testing.md +0 -274
- package/skills/rust/references/traits.md +0 -250
- package/skills/security-engineer/SKILL.md +0 -157
- package/skills/sps-memory/SKILL.md +0 -213
- package/skills/sps-pipeline/SKILL.md +0 -476
- package/skills/swift/SKILL.md +0 -48
- package/skills/swift/references/concurrency.md +0 -280
- package/skills/swift/references/idioms.md +0 -334
- package/skills/swift/references/testing.md +0 -229
- package/skills/tax-worker/SKILL.md +0 -150
- package/skills/tax-worker/references/account-codes.md +0 -165
- package/skills/typescript/SKILL.md +0 -51
- package/skills/typescript/references/async.md +0 -241
- package/skills/typescript/references/errors.md +0 -208
- package/skills/typescript/references/idioms.md +0 -246
- package/skills/typescript/references/testing.md +0 -225
- package/skills/typescript/references/tooling.md +0 -208
- package/skills/typescript/references/types.md +0 -259
- package/skills/wiki-update/SKILL.md +0 -300
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
var aM=Object.defineProperty;var h1=e=>{throw TypeError(e)};var sM=(e,t,n)=>t in e?aM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var p1=(e,t,n)=>sM(e,typeof t!="symbol"?t+"":t,n),cg=(e,t,n)=>t.has(e)||h1("Cannot "+n);var Z=(e,t,n)=>(cg(e,t,"read from private field"),n?n.call(e):t.get(e)),Ie=(e,t,n)=>t.has(e)?h1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_e=(e,t,n,r)=>(cg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ze=(e,t,n)=>(cg(e,t,"access private method"),n);var hf=(e,t,n,r)=>({set _(a){_e(e,t,a,n)},get _(){return Z(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function Lu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ug={exports:{}},Hc={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var m1;function oM(){if(m1)return Hc;m1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return Hc.Fragment=t,Hc.jsx=n,Hc.jsxs=n,Hc}var g1;function lM(){return g1||(g1=1,ug.exports=oM()),ug.exports}var f=lM(),dg={exports:{}},Ke={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and 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 y1;function cM(){if(y1)return Ke;y1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),y=Symbol.iterator;function b(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function k(L,V,R){this.props=L,this.context=V,this.refs=S,this.updater=R||E}k.prototype.isReactComponent={},k.prototype.setState=function(L,V){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,V,"setState")},k.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function j(){}j.prototype=k.prototype;function _(L,V,R){this.props=L,this.context=V,this.refs=S,this.updater=R||E}var N=_.prototype=new j;N.constructor=_,w(N,k.prototype),N.isPureReactComponent=!0;var O=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function F(L,V,R){var oe=R.ref;return{$$typeof:e,type:L,key:V,ref:oe!==void 0?oe:null,props:R}}function $(L,V){return F(L.type,V,L.props)}function U(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function q(L){var V={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(R){return V[R]})}var Q=/\/+/g;function B(L,V){return typeof L=="object"&&L!==null&&L.key!=null?q(""+L.key):V.toString(36)}function H(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(A,A):(L.status="pending",L.then(function(V){L.status==="pending"&&(L.status="fulfilled",L.value=V)},function(V){L.status==="pending"&&(L.status="rejected",L.reason=V)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function z(L,V,R,oe,ge){var te=typeof L;(te==="undefined"||te==="boolean")&&(L=null);var ue=!1;if(L===null)ue=!0;else switch(te){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(L.$$typeof){case e:case t:ue=!0;break;case g:return ue=L._init,z(ue(L._payload),V,R,oe,ge)}}if(ue)return ge=ge(L),ue=oe===""?"."+B(L,0):oe,O(ge)?(R="",ue!=null&&(R=ue.replace(Q,"$&/")+"/"),z(ge,V,R,"",function(de){return de})):ge!=null&&(U(ge)&&(ge=$(ge,R+(ge.key==null||L&&L.key===ge.key?"":(""+ge.key).replace(Q,"$&/")+"/")+ue)),V.push(ge)),1;ue=0;var G=oe===""?".":oe+":";if(O(L))for(var ne=0;ne<L.length;ne++)oe=L[ne],te=G+B(oe,ne),ue+=z(oe,V,R,te,ge);else if(ne=b(L),typeof ne=="function")for(L=ne.call(L),ne=0;!(oe=L.next()).done;)oe=oe.value,te=G+B(oe,ne++),ue+=z(oe,V,R,te,ge);else if(te==="object"){if(typeof L.then=="function")return z(H(L),V,R,oe,ge);throw V=String(L),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ue}function Y(L,V,R){if(L==null)return L;var oe=[],ge=0;return z(L,oe,"","",function(te){return V.call(R,te,ge++)}),oe}function W(L){if(L._status===-1){var V=L._result;V=V(),V.then(function(R){(L._status===0||L._status===-1)&&(L._status=1,L._result=R)},function(R){(L._status===0||L._status===-1)&&(L._status=2,L._result=R)}),L._status===-1&&(L._status=0,L._result=V)}if(L._status===1)return L._result.default;throw L._result}var K=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},D={map:Y,forEach:function(L,V,R){Y(L,function(){V.apply(this,arguments)},R)},count:function(L){var V=0;return Y(L,function(){V++}),V},toArray:function(L){return Y(L,function(V){return V})||[]},only:function(L){if(!U(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Ke.Activity=m,Ke.Children=D,Ke.Component=k,Ke.Fragment=n,Ke.Profiler=a,Ke.PureComponent=_,Ke.StrictMode=r,Ke.Suspense=d,Ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ke.__COMPILER_RUNTIME={__proto__:null,c:function(L){return M.H.useMemoCache(L)}},Ke.cache=function(L){return function(){return L.apply(null,arguments)}},Ke.cacheSignal=function(){return null},Ke.cloneElement=function(L,V,R){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var oe=w({},L.props),ge=L.key;if(V!=null)for(te in V.key!==void 0&&(ge=""+V.key),V)!I.call(V,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&V.ref===void 0||(oe[te]=V[te]);var te=arguments.length-2;if(te===1)oe.children=R;else if(1<te){for(var ue=Array(te),G=0;G<te;G++)ue[G]=arguments[G+2];oe.children=ue}return F(L.type,ge,oe)},Ke.createContext=function(L){return L={$$typeof:l,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},Ke.createElement=function(L,V,R){var oe,ge={},te=null;if(V!=null)for(oe in V.key!==void 0&&(te=""+V.key),V)I.call(V,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(ge[oe]=V[oe]);var ue=arguments.length-2;if(ue===1)ge.children=R;else if(1<ue){for(var G=Array(ue),ne=0;ne<ue;ne++)G[ne]=arguments[ne+2];ge.children=G}if(L&&L.defaultProps)for(oe in ue=L.defaultProps,ue)ge[oe]===void 0&&(ge[oe]=ue[oe]);return F(L,te,ge)},Ke.createRef=function(){return{current:null}},Ke.forwardRef=function(L){return{$$typeof:u,render:L}},Ke.isValidElement=U,Ke.lazy=function(L){return{$$typeof:g,_payload:{_status:-1,_result:L},_init:W}},Ke.memo=function(L,V){return{$$typeof:h,type:L,compare:V===void 0?null:V}},Ke.startTransition=function(L){var V=M.T,R={};M.T=R;try{var oe=L(),ge=M.S;ge!==null&&ge(R,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(A,K)}catch(te){K(te)}finally{V!==null&&R.types!==null&&(V.types=R.types),M.T=V}},Ke.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ke.use=function(L){return M.H.use(L)},Ke.useActionState=function(L,V,R){return M.H.useActionState(L,V,R)},Ke.useCallback=function(L,V){return M.H.useCallback(L,V)},Ke.useContext=function(L){return M.H.useContext(L)},Ke.useDebugValue=function(){},Ke.useDeferredValue=function(L,V){return M.H.useDeferredValue(L,V)},Ke.useEffect=function(L,V){return M.H.useEffect(L,V)},Ke.useEffectEvent=function(L){return M.H.useEffectEvent(L)},Ke.useId=function(){return M.H.useId()},Ke.useImperativeHandle=function(L,V,R){return M.H.useImperativeHandle(L,V,R)},Ke.useInsertionEffect=function(L,V){return M.H.useInsertionEffect(L,V)},Ke.useLayoutEffect=function(L,V){return M.H.useLayoutEffect(L,V)},Ke.useMemo=function(L,V){return M.H.useMemo(L,V)},Ke.useOptimistic=function(L,V){return M.H.useOptimistic(L,V)},Ke.useReducer=function(L,V,R){return M.H.useReducer(L,V,R)},Ke.useRef=function(L){return M.H.useRef(L)},Ke.useState=function(L){return M.H.useState(L)},Ke.useSyncExternalStore=function(L,V,R){return M.H.useSyncExternalStore(L,V,R)},Ke.useTransition=function(){return M.H.useTransition()},Ke.version="19.2.5",Ke}var b1;function Iu(){return b1||(b1=1,dg.exports=cM()),dg.exports}var T=Iu();const uM=Lu(T);var fg={exports:{}},qc={},hg={exports:{}},pg={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and 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 x1;function dM(){return x1||(x1=1,(function(e){function t(z,Y){var W=z.length;z.push(Y);e:for(;0<W;){var K=W-1>>>1,D=z[K];if(0<a(D,Y))z[K]=Y,z[W]=D,W=K;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var Y=z[0],W=z.pop();if(W!==Y){z[0]=W;e:for(var K=0,D=z.length,L=D>>>1;K<L;){var V=2*(K+1)-1,R=z[V],oe=V+1,ge=z[oe];if(0>a(R,W))oe<D&&0>a(ge,R)?(z[K]=ge,z[oe]=W,K=oe):(z[K]=R,z[V]=W,K=V);else if(oe<D&&0>a(ge,W))z[K]=ge,z[oe]=W,K=oe;else break e}}return Y}function a(z,Y){var W=z.sortIndex-Y.sortIndex;return W!==0?W:z.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],h=[],g=1,m=null,y=3,b=!1,E=!1,w=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function N(z){for(var Y=n(h);Y!==null;){if(Y.callback===null)r(h);else if(Y.startTime<=z)r(h),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(h)}}function O(z){if(w=!1,N(z),!E)if(n(d)!==null)E=!0,A||(A=!0,q());else{var Y=n(h);Y!==null&&H(O,Y.startTime-z)}}var A=!1,M=-1,I=5,F=-1;function $(){return S?!0:!(e.unstable_now()-F<I)}function U(){if(S=!1,A){var z=e.unstable_now();F=z;var Y=!0;try{e:{E=!1,w&&(w=!1,j(M),M=-1),b=!0;var W=y;try{t:{for(N(z),m=n(d);m!==null&&!(m.expirationTime>z&&$());){var K=m.callback;if(typeof K=="function"){m.callback=null,y=m.priorityLevel;var D=K(m.expirationTime<=z);if(z=e.unstable_now(),typeof D=="function"){m.callback=D,N(z),Y=!0;break t}m===n(d)&&r(d),N(z)}else r(d);m=n(d)}if(m!==null)Y=!0;else{var L=n(h);L!==null&&H(O,L.startTime-z),Y=!1}}break e}finally{m=null,y=W,b=!1}Y=void 0}}finally{Y?q():A=!1}}}var q;if(typeof _=="function")q=function(){_(U)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,B=Q.port2;Q.port1.onmessage=U,q=function(){B.postMessage(null)}}else q=function(){k(U,0)};function H(z,Y){M=k(function(){z(e.unstable_now())},Y)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(z){switch(y){case 1:case 2:case 3:var Y=3;break;default:Y=y}var W=y;y=Y;try{return z()}finally{y=W}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(z,Y){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var W=y;y=z;try{return Y()}finally{y=W}},e.unstable_scheduleCallback=function(z,Y,W){var K=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?K+W:K):W=K,z){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=W+D,z={id:g++,callback:Y,priorityLevel:z,startTime:W,expirationTime:D,sortIndex:-1},W>K?(z.sortIndex=W,t(h,z),n(d)===null&&z===n(h)&&(w?(j(M),M=-1):w=!0,H(O,W-K))):(z.sortIndex=D,t(d,z),E||b||(E=!0,A||(A=!0,q()))),z},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(z){var Y=y;return function(){var W=y;y=Y;try{return z.apply(this,arguments)}finally{y=W}}}})(pg)),pg}var v1;function fM(){return v1||(v1=1,hg.exports=dM()),hg.exports}var mg={exports:{}},Bn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var w1;function hM(){if(w1)return Bn;w1=1;var e=Iu();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(d,h,g){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:m==null?null:""+m,children:d,containerInfo:h,implementation:g}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Bn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Bn.createPortal=function(d,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(d,h,null,g)},Bn.flushSync=function(d){var h=l.T,g=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=h,r.p=g,r.d.f()}},Bn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},Bn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Bn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var g=h.as,m=u(g,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:y,fetchPriority:b}):g==="script"&&r.d.X(d,{crossOrigin:m,integrity:y,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Bn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=u(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},Bn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,m=u(g,h.crossOrigin);r.d.L(d,g,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Bn.preloadModule=function(d,h){if(typeof d=="string")if(h){var g=u(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},Bn.requestFormReset=function(d){r.d.r(d)},Bn.unstable_batchedUpdates=function(d,h){return d(h)},Bn.useFormState=function(d,h,g){return l.H.useFormState(d,h,g)},Bn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Bn.version="19.2.5",Bn}var E1;function OS(){if(E1)return mg.exports;E1=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(),mg.exports=hM(),mg.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var k1;function pM(){if(k1)return qc;k1=1;var e=fM(),t=Iu(),n=OS();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function l(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function u(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function d(i){if(o(i)!==i)throw Error(r(188))}function h(i){var s=i.alternate;if(!s){if(s=o(i),s===null)throw Error(r(188));return s!==i?null:i}for(var c=i,p=s;;){var x=c.return;if(x===null)break;var v=x.alternate;if(v===null){if(p=x.return,p!==null){c=p;continue}break}if(x.child===v.child){for(v=x.child;v;){if(v===c)return d(x),i;if(v===p)return d(x),s;v=v.sibling}throw Error(r(188))}if(c.return!==p.return)c=x,p=v;else{for(var C=!1,P=x.child;P;){if(P===c){C=!0,c=x,p=v;break}if(P===p){C=!0,p=x,c=v;break}P=P.sibling}if(!C){for(P=v.child;P;){if(P===c){C=!0,c=v,p=x;break}if(P===p){C=!0,p=v,c=x;break}P=P.sibling}if(!C)throw Error(r(189))}}if(c.alternate!==p)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:s}function g(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=g(i),s!==null)return s;i=i.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),_=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function q(i){return i===null||typeof i!="object"?null:(i=U&&i[U]||i["@@iterator"],typeof i=="function"?i:null)}var Q=Symbol.for("react.client.reference");function B(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===Q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case k:return"Profiler";case S:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case F:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case E:return"Portal";case _:return i.displayName||"Context";case j:return(i._context.displayName||"Context")+".Consumer";case N:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case M:return s=i.displayName||null,s!==null?s:B(i.type)||"Memo";case I:s=i._payload,i=i._init;try{return B(i(s))}catch{}}return null}var H=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},K=[],D=-1;function L(i){return{current:i}}function V(i){0>D||(i.current=K[D],K[D]=null,D--)}function R(i,s){D++,K[D]=i.current,i.current=s}var oe=L(null),ge=L(null),te=L(null),ue=L(null);function G(i,s){switch(R(te,s),R(ge,i),R(oe,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?Iw(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=Iw(s),i=zw(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(oe),R(oe,i)}function ne(){V(oe),V(ge),V(te)}function de(i){i.memoizedState!==null&&R(ue,i);var s=oe.current,c=zw(s,i.type);s!==c&&(R(ge,i),R(oe,c))}function xe(i){ge.current===i&&(V(oe),V(ge)),ue.current===i&&(V(ue),Bc._currentValue=W)}var ke,we;function ze(i){if(ke===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ke=s&&s[1]||"",we=-1<c.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ke+i+we}var Qe=!1;function Ce(i,s){if(!i||Qe)return"";Qe=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(s){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(le){var se=le}Reflect.construct(i,[],me)}else{try{me.call()}catch(le){se=le}i.call(me.prototype)}}else{try{throw Error()}catch(le){se=le}(me=i())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(le){if(le&&se&&typeof le.stack=="string")return[le.stack,se.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=p.DetermineComponentFrameRoot(),C=v[0],P=v[1];if(C&&P){var X=C.split(`
|
|
44
|
+
`),ae=P.split(`
|
|
45
|
+
`);for(x=p=0;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;for(;x<ae.length&&!ae[x].includes("DetermineComponentFrameRoot");)x++;if(p===X.length||x===ae.length)for(p=X.length-1,x=ae.length-1;1<=p&&0<=x&&X[p]!==ae[x];)x--;for(;1<=p&&0<=x;p--,x--)if(X[p]!==ae[x]){if(p!==1||x!==1)do if(p--,x--,0>x||X[p]!==ae[x]){var fe=`
|
|
46
|
+
`+X[p].replace(" at new "," at ");return i.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",i.displayName)),fe}while(1<=p&&0<=x);break}}}finally{Qe=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?ze(c):""}function ht(i,s){switch(i.tag){case 26:case 27:case 5:return ze(i.type);case 16:return ze("Lazy");case 13:return i.child!==s&&s!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return Ce(i.type,!1);case 11:return Ce(i.type.render,!1);case 1:return Ce(i.type,!0);case 31:return ze("Activity");default:return""}}function Pt(i){try{var s="",c=null;do s+=ht(i,c),c=i,i=i.return;while(i);return s}catch(p){return`
|
|
47
|
+
Error generating stack: `+p.message+`
|
|
48
|
+
`+p.stack}}var an=Object.prototype.hasOwnProperty,ln=e.unstable_scheduleCallback,jn=e.unstable_cancelCallback,Yr=e.unstable_shouldYield,Jn=e.unstable_requestPaint,bt=e.unstable_now,En=e.unstable_getCurrentPriorityLevel,ce=e.unstable_ImmediatePriority,ye=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,We=e.unstable_LowPriority,at=e.unstable_IdlePriority,An=e.log,fr=e.unstable_setDisableYieldValue,gn=null,$t=null;function kn(i){if(typeof An=="function"&&fr(i),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(gn,i)}catch{}}var xt=Math.clz32?Math.clz32:bo,jr=Math.log,Tn=Math.LN2;function bo(i){return i>>>=0,i===0?32:31-(jr(i)/Tn|0)|0}var Ri=256,ya=262144,Li=4194304;function In(i){var s=i&42;if(s!==0)return s;switch(i&-i){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function J(i,s,c){var p=i.pendingLanes;if(p===0)return 0;var x=0,v=i.suspendedLanes,C=i.pingedLanes;i=i.warmLanes;var P=p&134217727;return P!==0?(p=P&~v,p!==0?x=In(p):(C&=P,C!==0?x=In(C):c||(c=P&~i,c!==0&&(x=In(c))))):(P=p&~v,P!==0?x=In(P):C!==0?x=In(C):c||(c=p&~i,c!==0&&(x=In(c)))),x===0?0:s!==0&&s!==x&&(s&v)===0&&(v=x&-x,c=s&-s,v>=c||v===32&&(c&4194048)!==0)?s:x}function he(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function Se(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qe(){var i=Li;return Li<<=1,(Li&62914560)===0&&(Li=4194304),i}function Ot(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function Et(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Ae(i,s,c,p,x,v){var C=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var P=i.entanglements,X=i.expirationTimes,ae=i.hiddenUpdates;for(c=C&~c;0<c;){var fe=31-xt(c),me=1<<fe;P[fe]=0,X[fe]=-1;var se=ae[fe];if(se!==null)for(ae[fe]=null,fe=0;fe<se.length;fe++){var le=se[fe];le!==null&&(le.lane&=-536870913)}c&=~me}p!==0&&Ne(i,p,0),v!==0&&x===0&&i.tag!==0&&(i.suspendedLanes|=v&~(C&~s))}function Ne(i,s,c){i.pendingLanes|=s,i.suspendedLanes&=~s;var p=31-xt(s);i.entangledLanes|=s,i.entanglements[p]=i.entanglements[p]|1073741824|c&261930}function $e(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var p=31-xt(c),x=1<<p;x&s|i[p]&s&&(i[p]|=s),c&=~x}}function Vt(i,s){var c=s&-s;return c=(c&42)!==0?1:It(c),(c&(i.suspendedLanes|s))!==0?0:c}function It(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Qr(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function ba(){var i=Y.p;return i!==0?i:(i=window.event,i===void 0?32:s1(i.type))}function xa(i,s){var c=Y.p;try{return Y.p=i,s()}finally{Y.p=c}}var Ar=Math.random().toString(36).slice(2),Yt="__reactFiber$"+Ar,Sn="__reactProps$"+Ar,Wr="__reactContainer$"+Ar,va="__reactEvents$"+Ar,xs="__reactListeners$"+Ar,wa="__reactHandles$"+Ar,xo="__reactResources$"+Ar,Ii="__reactMarker$"+Ar;function vs(i){delete i[Yt],delete i[Sn],delete i[va],delete i[xs],delete i[wa]}function Mn(i){var s=i[Yt];if(s)return s;for(var c=i.parentNode;c;){if(s=c[Wr]||c[Yt]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=qw(i);i!==null;){if(c=i[Yt])return c;i=qw(i)}return s}i=c,c=i.parentNode}return null}function Xr(i){if(i=i[Yt]||i[Wr]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function Zr(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function gi(i){var s=i[xo];return s||(s=i[xo]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Jt(i){i[Ii]=!0}var vo=new Set,zi={};function Jr(i,s){be(i,s),be(i+"Capture",s)}function be(i,s){for(zi[i]=s,i=0;i<s.length;i++)vo.add(s[i])}var Le=RegExp("^[: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]*$"),et={},mt={};function Qt(i){return an.call(mt,i)?!0:an.call(et,i)?!1:Le.test(i)?mt[i]=!0:(et[i]=!0,!1)}function _n(i,s,c){if(Qt(s))if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+c)}}function qn(i,s,c){if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+c)}}function zn(i,s,c,p){if(p===null)i.removeAttribute(c);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(s,c,""+p)}}function Nt(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Kn(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function wo(i,s,c){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var x=p.get,v=p.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return x.call(this)},set:function(C){c=""+C,v.call(this,C)}}),Object.defineProperty(i,s,{enumerable:p.enumerable}),{getValue:function(){return c},setValue:function(C){c=""+C},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Ea(i){if(!i._valueTracker){var s=Kn(i)?"checked":"value";i._valueTracker=wo(i,s,""+i[s])}}function yi(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),p="";return i&&(p=Kn(i)?i.checked?"true":"false":i.value),i=p,i!==c?(s.setValue(i),!0):!1}function ka(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Eo=/[\n"\\]/g;function Pn(i){return i.replace(Eo,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function ws(i,s,c,p,x,v,C,P){i.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?i.type=C:i.removeAttribute("type"),s!=null?C==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+Nt(s)):i.value!==""+Nt(s)&&(i.value=""+Nt(s)):C!=="submit"&&C!=="reset"||i.removeAttribute("value"),s!=null?Sa(i,C,Nt(s)):c!=null?Sa(i,C,Nt(c)):p!=null&&i.removeAttribute("value"),x==null&&v!=null&&(i.defaultChecked=!!v),x!=null&&(i.checked=x&&typeof x!="function"&&typeof x!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?i.name=""+Nt(P):i.removeAttribute("name")}function ei(i,s,c,p,x,v,C,P){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(i.type=v),s!=null||c!=null){if(!(v!=="submit"&&v!=="reset"||s!=null)){Ea(i);return}c=c!=null?""+Nt(c):"",s=s!=null?""+Nt(s):c,P||s===i.value||(i.value=s),i.defaultValue=s}p=p??x,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=P?i.checked:!!p,i.defaultChecked=!!p,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(i.name=C),Ea(i)}function Sa(i,s,c){s==="number"&&ka(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function yn(i,s,c,p){if(i=i.options,s){s={};for(var x=0;x<c.length;x++)s["$"+c[x]]=!0;for(c=0;c<i.length;c++)x=s.hasOwnProperty("$"+i[c].value),i[c].selected!==x&&(i[c].selected=x),x&&p&&(i[c].defaultSelected=!0)}else{for(c=""+Nt(c),s=null,x=0;x<i.length;x++){if(i[x].value===c){i[x].selected=!0,p&&(i[x].defaultSelected=!0);return}s!==null||i[x].disabled||(s=i[x])}s!==null&&(s.selected=!0)}}function Es(i,s,c){if(s!=null&&(s=""+Nt(s),s!==i.value&&(i.value=s),c==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=c!=null?""+Nt(c):""}function ko(i,s,c,p){if(s==null){if(p!=null){if(c!=null)throw Error(r(92));if(H(p)){if(1<p.length)throw Error(r(93));p=p[0]}c=p}c==null&&(c=""),s=c}c=Nt(s),i.defaultValue=c,p=i.textContent,p===c&&p!==""&&p!==null&&(i.value=p),Ea(i)}function He(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var nd=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function cn(i,s,c){var p=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?p?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":p?i.setProperty(s,c):typeof c!="number"||c===0||nd.has(s)?s==="float"?i.cssFloat=c:i[s]=(""+c).trim():i[s]=c+"px"}function kt(i,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,c!=null){for(var p in c)!c.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var x in s)p=s[x],s.hasOwnProperty(x)&&c[x]!==p&&cn(i,x,p)}else for(var v in s)s.hasOwnProperty(v)&&cn(i,v,s[v])}function _a(i){if(i.indexOf("-")===-1)return!1;switch(i){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 Pi=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ec=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Na(i){return ec.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ee(){}var Te=null;function Ve(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var st=null,Wt=null;function Tr(i){var s=Xr(i);if(s&&(i=s.stateNode)){var c=i[Sn]||null;e:switch(i=s.stateNode,s.type){case"input":if(ws(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Pn(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var p=c[s];if(p!==i&&p.form===i.form){var x=p[Sn]||null;if(!x)throw Error(r(90));ws(p,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(s=0;s<c.length;s++)p=c[s],p.form===i.form&&yi(p)}break e;case"textarea":Es(i,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&yn(i,!!c.multiple,s,!1)}}}var tc=!1;function rd(i,s,c){if(tc)return i(s,c);tc=!0;try{var p=i(s);return p}finally{if(tc=!1,(st!==null||Wt!==null)&&(qd(),st&&(s=st,i=Wt,Wt=st=null,Tr(s),i)))for(s=0;s<i.length;s++)Tr(i[s])}}function nc(i,s){var c=i.stateNode;if(c===null)return null;var p=c[Sn]||null;if(p===null)return null;c=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var Bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cp=!1;if(Bi)try{var rc={};Object.defineProperty(rc,"passive",{get:function(){cp=!0}}),window.addEventListener("test",rc,rc),window.removeEventListener("test",rc,rc)}catch{cp=!1}var Ca=null,up=null,id=null;function zx(){if(id)return id;var i,s=up,c=s.length,p,x="value"in Ca?Ca.value:Ca.textContent,v=x.length;for(i=0;i<c&&s[i]===x[i];i++);var C=c-i;for(p=1;p<=C&&s[c-p]===x[v-p];p++);return id=x.slice(i,1<p?1-p:void 0)}function ad(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function sd(){return!0}function Px(){return!1}function er(i){function s(c,p,x,v,C){this._reactName=c,this._targetInst=x,this.type=p,this.nativeEvent=v,this.target=C,this.currentTarget=null;for(var P in i)i.hasOwnProperty(P)&&(c=i[P],this[P]=c?c(v):v[P]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?sd:Px,this.isPropagationStopped=Px,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=sd)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=sd)},persist:function(){},isPersistent:sd}),s}var ks={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},od=er(ks),ic=m({},ks,{view:0,detail:0}),rA=er(ic),dp,fp,ac,ld=m({},ic,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==ac&&(ac&&i.type==="mousemove"?(dp=i.screenX-ac.screenX,fp=i.screenY-ac.screenY):fp=dp=0,ac=i),dp)},movementY:function(i){return"movementY"in i?i.movementY:fp}}),Bx=er(ld),iA=m({},ld,{dataTransfer:0}),aA=er(iA),sA=m({},ic,{relatedTarget:0}),hp=er(sA),oA=m({},ks,{animationName:0,elapsedTime:0,pseudoElement:0}),lA=er(oA),cA=m({},ks,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),uA=er(cA),dA=m({},ks,{data:0}),Ux=er(dA),fA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hA={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"},pA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mA(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=pA[i])?!!s[i]:!1}function pp(){return mA}var gA=m({},ic,{key:function(i){if(i.key){var s=fA[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=ad(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?hA[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pp,charCode:function(i){return i.type==="keypress"?ad(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?ad(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),yA=er(gA),bA=m({},ld,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$x=er(bA),xA=m({},ic,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pp}),vA=er(xA),wA=m({},ks,{propertyName:0,elapsedTime:0,pseudoElement:0}),EA=er(wA),kA=m({},ld,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),SA=er(kA),_A=m({},ks,{newState:0,oldState:0}),NA=er(_A),CA=[9,13,27,32],mp=Bi&&"CompositionEvent"in window,sc=null;Bi&&"documentMode"in document&&(sc=document.documentMode);var jA=Bi&&"TextEvent"in window&&!sc,Fx=Bi&&(!mp||sc&&8<sc&&11>=sc),Hx=" ",qx=!1;function Kx(i,s){switch(i){case"keyup":return CA.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var So=!1;function AA(i,s){switch(i){case"compositionend":return Gx(s);case"keypress":return s.which!==32?null:(qx=!0,Hx);case"textInput":return i=s.data,i===Hx&&qx?null:i;default:return null}}function TA(i,s){if(So)return i==="compositionend"||!mp&&Kx(i,s)?(i=zx(),id=up=Ca=null,So=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Fx&&s.locale!=="ko"?null:s.data;default:return null}}var MA={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 Vx(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!MA[i.type]:s==="textarea"}function Yx(i,s,c,p){st?Wt?Wt.push(p):Wt=[p]:st=p,s=Xd(s,"onChange"),0<s.length&&(c=new od("onChange","change",null,c,p),i.push({event:c,listeners:s}))}var oc=null,lc=null;function OA(i){Tw(i,0)}function cd(i){var s=Zr(i);if(yi(s))return i}function Qx(i,s){if(i==="change")return s}var Wx=!1;if(Bi){var gp;if(Bi){var yp="oninput"in document;if(!yp){var Xx=document.createElement("div");Xx.setAttribute("oninput","return;"),yp=typeof Xx.oninput=="function"}gp=yp}else gp=!1;Wx=gp&&(!document.documentMode||9<document.documentMode)}function Zx(){oc&&(oc.detachEvent("onpropertychange",Jx),lc=oc=null)}function Jx(i){if(i.propertyName==="value"&&cd(lc)){var s=[];Yx(s,lc,i,Ve(i)),rd(OA,s)}}function DA(i,s,c){i==="focusin"?(Zx(),oc=s,lc=c,oc.attachEvent("onpropertychange",Jx)):i==="focusout"&&Zx()}function RA(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return cd(lc)}function LA(i,s){if(i==="click")return cd(s)}function IA(i,s){if(i==="input"||i==="change")return cd(s)}function zA(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var hr=typeof Object.is=="function"?Object.is:zA;function cc(i,s){if(hr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),p=Object.keys(s);if(c.length!==p.length)return!1;for(p=0;p<c.length;p++){var x=c[p];if(!an.call(s,x)||!hr(i[x],s[x]))return!1}return!0}function ev(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function tv(i,s){var c=ev(i);i=0;for(var p;c;){if(c.nodeType===3){if(p=i+c.textContent.length,i<=s&&p>=s)return{node:c,offset:s-i};i=p}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=ev(c)}}function nv(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?nv(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function rv(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=ka(i.document);s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=ka(i.document)}return s}function bp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var PA=Bi&&"documentMode"in document&&11>=document.documentMode,_o=null,xp=null,uc=null,vp=!1;function iv(i,s,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;vp||_o==null||_o!==ka(p)||(p=_o,"selectionStart"in p&&bp(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),uc&&cc(uc,p)||(uc=p,p=Xd(xp,"onSelect"),0<p.length&&(s=new od("onSelect","select",null,s,c),i.push({event:s,listeners:p}),s.target=_o)))}function Ss(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var No={animationend:Ss("Animation","AnimationEnd"),animationiteration:Ss("Animation","AnimationIteration"),animationstart:Ss("Animation","AnimationStart"),transitionrun:Ss("Transition","TransitionRun"),transitionstart:Ss("Transition","TransitionStart"),transitioncancel:Ss("Transition","TransitionCancel"),transitionend:Ss("Transition","TransitionEnd")},wp={},av={};Bi&&(av=document.createElement("div").style,"AnimationEvent"in window||(delete No.animationend.animation,delete No.animationiteration.animation,delete No.animationstart.animation),"TransitionEvent"in window||delete No.transitionend.transition);function _s(i){if(wp[i])return wp[i];if(!No[i])return i;var s=No[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in av)return wp[i]=s[c];return i}var sv=_s("animationend"),ov=_s("animationiteration"),lv=_s("animationstart"),BA=_s("transitionrun"),UA=_s("transitionstart"),$A=_s("transitioncancel"),cv=_s("transitionend"),uv=new Map,Ep="abort auxClick beforeToggle 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(" ");Ep.push("scrollEnd");function ti(i,s){uv.set(i,s),Jr(s,[i])}var ud=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Mr=[],Co=0,kp=0;function dd(){for(var i=Co,s=kp=Co=0;s<i;){var c=Mr[s];Mr[s++]=null;var p=Mr[s];Mr[s++]=null;var x=Mr[s];Mr[s++]=null;var v=Mr[s];if(Mr[s++]=null,p!==null&&x!==null){var C=p.pending;C===null?x.next=x:(x.next=C.next,C.next=x),p.pending=x}v!==0&&dv(c,x,v)}}function fd(i,s,c,p){Mr[Co++]=i,Mr[Co++]=s,Mr[Co++]=c,Mr[Co++]=p,kp|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function Sp(i,s,c,p){return fd(i,s,c,p),hd(i)}function Ns(i,s){return fd(i,null,null,s),hd(i)}function dv(i,s,c){i.lanes|=c;var p=i.alternate;p!==null&&(p.lanes|=c);for(var x=!1,v=i.return;v!==null;)v.childLanes|=c,p=v.alternate,p!==null&&(p.childLanes|=c),v.tag===22&&(i=v.stateNode,i===null||i._visibility&1||(x=!0)),i=v,v=v.return;return i.tag===3?(v=i.stateNode,x&&s!==null&&(x=31-xt(c),i=v.hiddenUpdates,p=i[x],p===null?i[x]=[s]:p.push(s),s.lane=c|536870912),v):null}function hd(i){if(50<Oc)throw Oc=0,Dm=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var jo={};function FA(i,s,c,p){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pr(i,s,c,p){return new FA(i,s,c,p)}function _p(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Ui(i,s){var c=i.alternate;return c===null?(c=pr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function fv(i,s){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,s=c.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function pd(i,s,c,p,x,v){var C=0;if(p=i,typeof i=="function")_p(i)&&(C=1);else if(typeof i=="string")C=VT(i,c,oe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case F:return i=pr(31,c,s,x),i.elementType=F,i.lanes=v,i;case w:return Cs(c.children,x,v,s);case S:C=8,x|=24;break;case k:return i=pr(12,c,s,x|2),i.elementType=k,i.lanes=v,i;case O:return i=pr(13,c,s,x),i.elementType=O,i.lanes=v,i;case A:return i=pr(19,c,s,x),i.elementType=A,i.lanes=v,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case _:C=10;break e;case j:C=9;break e;case N:C=11;break e;case M:C=14;break e;case I:C=16,p=null;break e}C=29,c=Error(r(130,i===null?"null":typeof i,"")),p=null}return s=pr(C,c,s,x),s.elementType=i,s.type=p,s.lanes=v,s}function Cs(i,s,c,p){return i=pr(7,i,p,s),i.lanes=c,i}function Np(i,s,c){return i=pr(6,i,null,s),i.lanes=c,i}function hv(i){var s=pr(18,null,null,0);return s.stateNode=i,s}function Cp(i,s,c){return s=pr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var pv=new WeakMap;function Or(i,s){if(typeof i=="object"&&i!==null){var c=pv.get(i);return c!==void 0?c:(s={value:i,source:s,stack:Pt(s)},pv.set(i,s),s)}return{value:i,source:s,stack:Pt(s)}}var Ao=[],To=0,md=null,dc=0,Dr=[],Rr=0,ja=null,bi=1,xi="";function $i(i,s){Ao[To++]=dc,Ao[To++]=md,md=i,dc=s}function mv(i,s,c){Dr[Rr++]=bi,Dr[Rr++]=xi,Dr[Rr++]=ja,ja=i;var p=bi;i=xi;var x=32-xt(p)-1;p&=~(1<<x),c+=1;var v=32-xt(s)+x;if(30<v){var C=x-x%5;v=(p&(1<<C)-1).toString(32),p>>=C,x-=C,bi=1<<32-xt(s)+x|c<<x|p,xi=v+i}else bi=1<<v|c<<x|p,xi=i}function jp(i){i.return!==null&&($i(i,1),mv(i,1,0))}function Ap(i){for(;i===md;)md=Ao[--To],Ao[To]=null,dc=Ao[--To],Ao[To]=null;for(;i===ja;)ja=Dr[--Rr],Dr[Rr]=null,xi=Dr[--Rr],Dr[Rr]=null,bi=Dr[--Rr],Dr[Rr]=null}function gv(i,s){Dr[Rr++]=bi,Dr[Rr++]=xi,Dr[Rr++]=ja,bi=s.id,xi=s.overflow,ja=i}var On=null,Bt=null,ct=!1,Aa=null,Lr=!1,Tp=Error(r(519));function Ta(i){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fc(Or(s,i)),Tp}function yv(i){var s=i.stateNode,c=i.type,p=i.memoizedProps;switch(s[Yt]=i,s[Sn]=p,c){case"dialog":rt("cancel",s),rt("close",s);break;case"iframe":case"object":case"embed":rt("load",s);break;case"video":case"audio":for(c=0;c<Rc.length;c++)rt(Rc[c],s);break;case"source":rt("error",s);break;case"img":case"image":case"link":rt("error",s),rt("load",s);break;case"details":rt("toggle",s);break;case"input":rt("invalid",s),ei(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":rt("invalid",s);break;case"textarea":rt("invalid",s),ko(s,p.value,p.defaultValue,p.children)}c=p.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||p.suppressHydrationWarning===!0||Rw(s.textContent,c)?(p.popover!=null&&(rt("beforetoggle",s),rt("toggle",s)),p.onScroll!=null&&rt("scroll",s),p.onScrollEnd!=null&&rt("scrollend",s),p.onClick!=null&&(s.onclick=Ee),s=!0):s=!1,s||Ta(i,!0)}function bv(i){for(On=i.return;On;)switch(On.tag){case 5:case 31:case 13:Lr=!1;return;case 27:case 3:Lr=!0;return;default:On=On.return}}function Mo(i){if(i!==On)return!1;if(!ct)return bv(i),ct=!0,!1;var s=i.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Ym(i.type,i.memoizedProps)),c=!c),c&&Bt&&Ta(i),bv(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Bt=Hw(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Bt=Hw(i)}else s===27?(s=Bt,qa(i.type)?(i=Jm,Jm=null,Bt=i):Bt=s):Bt=On?zr(i.stateNode.nextSibling):null;return!0}function js(){Bt=On=null,ct=!1}function Mp(){var i=Aa;return i!==null&&(ir===null?ir=i:ir.push.apply(ir,i),Aa=null),i}function fc(i){Aa===null?Aa=[i]:Aa.push(i)}var Op=L(null),As=null,Fi=null;function Ma(i,s,c){R(Op,s._currentValue),s._currentValue=c}function Hi(i){i._currentValue=Op.current,V(Op)}function Dp(i,s,c){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===c)break;i=i.return}}function Rp(i,s,c,p){var x=i.child;for(x!==null&&(x.return=i);x!==null;){var v=x.dependencies;if(v!==null){var C=x.child;v=v.firstContext;e:for(;v!==null;){var P=v;v=x;for(var X=0;X<s.length;X++)if(P.context===s[X]){v.lanes|=c,P=v.alternate,P!==null&&(P.lanes|=c),Dp(v.return,c,i),p||(C=null);break e}v=P.next}}else if(x.tag===18){if(C=x.return,C===null)throw Error(r(341));C.lanes|=c,v=C.alternate,v!==null&&(v.lanes|=c),Dp(C,c,i),C=null}else C=x.child;if(C!==null)C.return=x;else for(C=x;C!==null;){if(C===i){C=null;break}if(x=C.sibling,x!==null){x.return=C.return,C=x;break}C=C.return}x=C}}function Oo(i,s,c,p){i=null;for(var x=s,v=!1;x!==null;){if(!v){if((x.flags&524288)!==0)v=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var C=x.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var P=x.type;hr(x.pendingProps.value,C.value)||(i!==null?i.push(P):i=[P])}}else if(x===ue.current){if(C=x.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(i!==null?i.push(Bc):i=[Bc])}x=x.return}i!==null&&Rp(s,i,c,p),s.flags|=262144}function gd(i){for(i=i.firstContext;i!==null;){if(!hr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ts(i){As=i,Fi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Dn(i){return xv(As,i)}function yd(i,s){return As===null&&Ts(i),xv(i,s)}function xv(i,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},Fi===null){if(i===null)throw Error(r(308));Fi=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else Fi=Fi.next=s;return c}var HA=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(c,p){i.push(p)}};this.abort=function(){s.aborted=!0,i.forEach(function(c){return c()})}},qA=e.unstable_scheduleCallback,KA=e.unstable_NormalPriority,un={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lp(){return{controller:new HA,data:new Map,refCount:0}}function hc(i){i.refCount--,i.refCount===0&&qA(KA,function(){i.controller.abort()})}var pc=null,Ip=0,Do=0,Ro=null;function GA(i,s){if(pc===null){var c=pc=[];Ip=0,Do=Bm(),Ro={status:"pending",value:void 0,then:function(p){c.push(p)}}}return Ip++,s.then(vv,vv),s}function vv(){if(--Ip===0&&pc!==null){Ro!==null&&(Ro.status="fulfilled");var i=pc;pc=null,Do=0,Ro=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function VA(i,s){var c=[],p={status:"pending",value:null,reason:null,then:function(x){c.push(x)}};return i.then(function(){p.status="fulfilled",p.value=s;for(var x=0;x<c.length;x++)(0,c[x])(s)},function(x){for(p.status="rejected",p.reason=x,x=0;x<c.length;x++)(0,c[x])(void 0)}),p}var wv=z.S;z.S=function(i,s){iw=bt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&GA(i,s),wv!==null&&wv(i,s)};var Ms=L(null);function zp(){var i=Ms.current;return i!==null?i:Dt.pooledCache}function bd(i,s){s===null?R(Ms,Ms.current):R(Ms,s.pool)}function Ev(){var i=zp();return i===null?null:{parent:un._currentValue,pool:i}}var Lo=Error(r(460)),Pp=Error(r(474)),xd=Error(r(542)),vd={then:function(){}};function kv(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Sv(i,s,c){switch(c=i[c],c===void 0?i.push(s):c!==s&&(s.then(Ee,Ee),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,Nv(i),i;default:if(typeof s.status=="string")s.then(Ee,Ee);else{if(i=Dt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(p){if(s.status==="pending"){var x=s;x.status="fulfilled",x.value=p}},function(p){if(s.status==="pending"){var x=s;x.status="rejected",x.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,Nv(i),i}throw Ds=s,Lo}}function Os(i){try{var s=i._init;return s(i._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Ds=c,Lo):c}}var Ds=null;function _v(){if(Ds===null)throw Error(r(459));var i=Ds;return Ds=null,i}function Nv(i){if(i===Lo||i===xd)throw Error(r(483))}var Io=null,mc=0;function wd(i){var s=mc;return mc+=1,Io===null&&(Io=[]),Sv(Io,i,s)}function gc(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function Ed(i,s){throw s.$$typeof===y?Error(r(525)):(i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function Cv(i){function s(re,ee){if(i){var ie=re.deletions;ie===null?(re.deletions=[ee],re.flags|=16):ie.push(ee)}}function c(re,ee){if(!i)return null;for(;ee!==null;)s(re,ee),ee=ee.sibling;return null}function p(re){for(var ee=new Map;re!==null;)re.key!==null?ee.set(re.key,re):ee.set(re.index,re),re=re.sibling;return ee}function x(re,ee){return re=Ui(re,ee),re.index=0,re.sibling=null,re}function v(re,ee,ie){return re.index=ie,i?(ie=re.alternate,ie!==null?(ie=ie.index,ie<ee?(re.flags|=67108866,ee):ie):(re.flags|=67108866,ee)):(re.flags|=1048576,ee)}function C(re){return i&&re.alternate===null&&(re.flags|=67108866),re}function P(re,ee,ie,pe){return ee===null||ee.tag!==6?(ee=Np(ie,re.mode,pe),ee.return=re,ee):(ee=x(ee,ie),ee.return=re,ee)}function X(re,ee,ie,pe){var Pe=ie.type;return Pe===w?fe(re,ee,ie.props.children,pe,ie.key):ee!==null&&(ee.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===I&&Os(Pe)===ee.type)?(ee=x(ee,ie.props),gc(ee,ie),ee.return=re,ee):(ee=pd(ie.type,ie.key,ie.props,null,re.mode,pe),gc(ee,ie),ee.return=re,ee)}function ae(re,ee,ie,pe){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==ie.containerInfo||ee.stateNode.implementation!==ie.implementation?(ee=Cp(ie,re.mode,pe),ee.return=re,ee):(ee=x(ee,ie.children||[]),ee.return=re,ee)}function fe(re,ee,ie,pe,Pe){return ee===null||ee.tag!==7?(ee=Cs(ie,re.mode,pe,Pe),ee.return=re,ee):(ee=x(ee,ie),ee.return=re,ee)}function me(re,ee,ie){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Np(""+ee,re.mode,ie),ee.return=re,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return ie=pd(ee.type,ee.key,ee.props,null,re.mode,ie),gc(ie,ee),ie.return=re,ie;case E:return ee=Cp(ee,re.mode,ie),ee.return=re,ee;case I:return ee=Os(ee),me(re,ee,ie)}if(H(ee)||q(ee))return ee=Cs(ee,re.mode,ie,null),ee.return=re,ee;if(typeof ee.then=="function")return me(re,wd(ee),ie);if(ee.$$typeof===_)return me(re,yd(re,ee),ie);Ed(re,ee)}return null}function se(re,ee,ie,pe){var Pe=ee!==null?ee.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Pe!==null?null:P(re,ee,""+ie,pe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:return ie.key===Pe?X(re,ee,ie,pe):null;case E:return ie.key===Pe?ae(re,ee,ie,pe):null;case I:return ie=Os(ie),se(re,ee,ie,pe)}if(H(ie)||q(ie))return Pe!==null?null:fe(re,ee,ie,pe,null);if(typeof ie.then=="function")return se(re,ee,wd(ie),pe);if(ie.$$typeof===_)return se(re,ee,yd(re,ie),pe);Ed(re,ie)}return null}function le(re,ee,ie,pe,Pe){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return re=re.get(ie)||null,P(ee,re,""+pe,Pe);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case b:return re=re.get(pe.key===null?ie:pe.key)||null,X(ee,re,pe,Pe);case E:return re=re.get(pe.key===null?ie:pe.key)||null,ae(ee,re,pe,Pe);case I:return pe=Os(pe),le(re,ee,ie,pe,Pe)}if(H(pe)||q(pe))return re=re.get(ie)||null,fe(ee,re,pe,Pe,null);if(typeof pe.then=="function")return le(re,ee,ie,wd(pe),Pe);if(pe.$$typeof===_)return le(re,ee,ie,yd(ee,pe),Pe);Ed(ee,pe)}return null}function je(re,ee,ie,pe){for(var Pe=null,gt=null,Me=ee,Xe=ee=0,lt=null;Me!==null&&Xe<ie.length;Xe++){Me.index>Xe?(lt=Me,Me=null):lt=Me.sibling;var yt=se(re,Me,ie[Xe],pe);if(yt===null){Me===null&&(Me=lt);break}i&&Me&&yt.alternate===null&&s(re,Me),ee=v(yt,ee,Xe),gt===null?Pe=yt:gt.sibling=yt,gt=yt,Me=lt}if(Xe===ie.length)return c(re,Me),ct&&$i(re,Xe),Pe;if(Me===null){for(;Xe<ie.length;Xe++)Me=me(re,ie[Xe],pe),Me!==null&&(ee=v(Me,ee,Xe),gt===null?Pe=Me:gt.sibling=Me,gt=Me);return ct&&$i(re,Xe),Pe}for(Me=p(Me);Xe<ie.length;Xe++)lt=le(Me,re,Xe,ie[Xe],pe),lt!==null&&(i&<.alternate!==null&&Me.delete(lt.key===null?Xe:lt.key),ee=v(lt,ee,Xe),gt===null?Pe=lt:gt.sibling=lt,gt=lt);return i&&Me.forEach(function(Qa){return s(re,Qa)}),ct&&$i(re,Xe),Pe}function Fe(re,ee,ie,pe){if(ie==null)throw Error(r(151));for(var Pe=null,gt=null,Me=ee,Xe=ee=0,lt=null,yt=ie.next();Me!==null&&!yt.done;Xe++,yt=ie.next()){Me.index>Xe?(lt=Me,Me=null):lt=Me.sibling;var Qa=se(re,Me,yt.value,pe);if(Qa===null){Me===null&&(Me=lt);break}i&&Me&&Qa.alternate===null&&s(re,Me),ee=v(Qa,ee,Xe),gt===null?Pe=Qa:gt.sibling=Qa,gt=Qa,Me=lt}if(yt.done)return c(re,Me),ct&&$i(re,Xe),Pe;if(Me===null){for(;!yt.done;Xe++,yt=ie.next())yt=me(re,yt.value,pe),yt!==null&&(ee=v(yt,ee,Xe),gt===null?Pe=yt:gt.sibling=yt,gt=yt);return ct&&$i(re,Xe),Pe}for(Me=p(Me);!yt.done;Xe++,yt=ie.next())yt=le(Me,re,Xe,yt.value,pe),yt!==null&&(i&&yt.alternate!==null&&Me.delete(yt.key===null?Xe:yt.key),ee=v(yt,ee,Xe),gt===null?Pe=yt:gt.sibling=yt,gt=yt);return i&&Me.forEach(function(iM){return s(re,iM)}),ct&&$i(re,Xe),Pe}function At(re,ee,ie,pe){if(typeof ie=="object"&&ie!==null&&ie.type===w&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:e:{for(var Pe=ie.key;ee!==null;){if(ee.key===Pe){if(Pe=ie.type,Pe===w){if(ee.tag===7){c(re,ee.sibling),pe=x(ee,ie.props.children),pe.return=re,re=pe;break e}}else if(ee.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===I&&Os(Pe)===ee.type){c(re,ee.sibling),pe=x(ee,ie.props),gc(pe,ie),pe.return=re,re=pe;break e}c(re,ee);break}else s(re,ee);ee=ee.sibling}ie.type===w?(pe=Cs(ie.props.children,re.mode,pe,ie.key),pe.return=re,re=pe):(pe=pd(ie.type,ie.key,ie.props,null,re.mode,pe),gc(pe,ie),pe.return=re,re=pe)}return C(re);case E:e:{for(Pe=ie.key;ee!==null;){if(ee.key===Pe)if(ee.tag===4&&ee.stateNode.containerInfo===ie.containerInfo&&ee.stateNode.implementation===ie.implementation){c(re,ee.sibling),pe=x(ee,ie.children||[]),pe.return=re,re=pe;break e}else{c(re,ee);break}else s(re,ee);ee=ee.sibling}pe=Cp(ie,re.mode,pe),pe.return=re,re=pe}return C(re);case I:return ie=Os(ie),At(re,ee,ie,pe)}if(H(ie))return je(re,ee,ie,pe);if(q(ie)){if(Pe=q(ie),typeof Pe!="function")throw Error(r(150));return ie=Pe.call(ie),Fe(re,ee,ie,pe)}if(typeof ie.then=="function")return At(re,ee,wd(ie),pe);if(ie.$$typeof===_)return At(re,ee,yd(re,ie),pe);Ed(re,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,ee!==null&&ee.tag===6?(c(re,ee.sibling),pe=x(ee,ie),pe.return=re,re=pe):(c(re,ee),pe=Np(ie,re.mode,pe),pe.return=re,re=pe),C(re)):c(re,ee)}return function(re,ee,ie,pe){try{mc=0;var Pe=At(re,ee,ie,pe);return Io=null,Pe}catch(Me){if(Me===Lo||Me===xd)throw Me;var gt=pr(29,Me,null,re.mode);return gt.lanes=pe,gt.return=re,gt}finally{}}}var Rs=Cv(!0),jv=Cv(!1),Oa=!1;function Bp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Up(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Da(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ra(i,s,c){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(vt&2)!==0){var x=p.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),p.pending=s,s=hd(i),dv(i,null,c),s}return fd(i,p,s,c),hd(i)}function yc(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var p=s.lanes;p&=i.pendingLanes,c|=p,s.lanes=c,$e(i,c)}}function $p(i,s){var c=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,c===p)){var x=null,v=null;if(c=c.firstBaseUpdate,c!==null){do{var C={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};v===null?x=v=C:v=v.next=C,c=c.next}while(c!==null);v===null?x=v=s:v=v.next=s}else x=v=s;c={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:v,shared:p.shared,callbacks:p.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}var Fp=!1;function bc(){if(Fp){var i=Ro;if(i!==null)throw i}}function xc(i,s,c,p){Fp=!1;var x=i.updateQueue;Oa=!1;var v=x.firstBaseUpdate,C=x.lastBaseUpdate,P=x.shared.pending;if(P!==null){x.shared.pending=null;var X=P,ae=X.next;X.next=null,C===null?v=ae:C.next=ae,C=X;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,P=fe.lastBaseUpdate,P!==C&&(P===null?fe.firstBaseUpdate=ae:P.next=ae,fe.lastBaseUpdate=X))}if(v!==null){var me=x.baseState;C=0,fe=ae=X=null,P=v;do{var se=P.lane&-536870913,le=se!==P.lane;if(le?(ot&se)===se:(p&se)===se){se!==0&&se===Do&&(Fp=!0),fe!==null&&(fe=fe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var je=i,Fe=P;se=s;var At=c;switch(Fe.tag){case 1:if(je=Fe.payload,typeof je=="function"){me=je.call(At,me,se);break e}me=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Fe.payload,se=typeof je=="function"?je.call(At,me,se):je,se==null)break e;me=m({},me,se);break e;case 2:Oa=!0}}se=P.callback,se!==null&&(i.flags|=64,le&&(i.flags|=8192),le=x.callbacks,le===null?x.callbacks=[se]:le.push(se))}else le={lane:se,tag:P.tag,payload:P.payload,callback:P.callback,next:null},fe===null?(ae=fe=le,X=me):fe=fe.next=le,C|=se;if(P=P.next,P===null){if(P=x.shared.pending,P===null)break;le=P,P=le.next,le.next=null,x.lastBaseUpdate=le,x.shared.pending=null}}while(!0);fe===null&&(X=me),x.baseState=X,x.firstBaseUpdate=ae,x.lastBaseUpdate=fe,v===null&&(x.shared.lanes=0),Ba|=C,i.lanes=C,i.memoizedState=me}}function Av(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function Tv(i,s){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)Av(c[i],s)}var zo=L(null),kd=L(0);function Mv(i,s){i=Zi,R(kd,i),R(zo,s),Zi=i|s.baseLanes}function Hp(){R(kd,Zi),R(zo,zo.current)}function qp(){Zi=kd.current,V(zo),V(kd)}var mr=L(null),Ir=null;function La(i){var s=i.alternate;R(sn,sn.current&1),R(mr,i),Ir===null&&(s===null||zo.current!==null||s.memoizedState!==null)&&(Ir=i)}function Kp(i){R(sn,sn.current),R(mr,i),Ir===null&&(Ir=i)}function Ov(i){i.tag===22?(R(sn,sn.current),R(mr,i),Ir===null&&(Ir=i)):Ia()}function Ia(){R(sn,sn.current),R(mr,mr.current)}function gr(i){V(mr),Ir===i&&(Ir=null),V(sn)}var sn=L(0);function Sd(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||Xm(c)||Zm(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var qi=0,Ye=null,Ct=null,dn=null,_d=!1,Po=!1,Ls=!1,Nd=0,vc=0,Bo=null,YA=0;function en(){throw Error(r(321))}function Gp(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!hr(i[c],s[c]))return!1;return!0}function Vp(i,s,c,p,x,v){return qi=v,Ye=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,z.H=i===null||i.memoizedState===null?m0:lm,Ls=!1,v=c(p,x),Ls=!1,Po&&(v=Rv(s,c,p,x)),Dv(i),v}function Dv(i){z.H=kc;var s=Ct!==null&&Ct.next!==null;if(qi=0,dn=Ct=Ye=null,_d=!1,vc=0,Bo=null,s)throw Error(r(300));i===null||fn||(i=i.dependencies,i!==null&&gd(i)&&(fn=!0))}function Rv(i,s,c,p){Ye=i;var x=0;do{if(Po&&(Bo=null),vc=0,Po=!1,25<=x)throw Error(r(301));if(x+=1,dn=Ct=null,i.updateQueue!=null){var v=i.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}z.H=g0,v=s(c,p)}while(Po);return v}function QA(){var i=z.H,s=i.useState()[0];return s=typeof s.then=="function"?wc(s):s,i=i.useState()[0],(Ct!==null?Ct.memoizedState:null)!==i&&(Ye.flags|=1024),s}function Yp(){var i=Nd!==0;return Nd=0,i}function Qp(i,s,c){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~c}function Wp(i){if(_d){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}_d=!1}qi=0,dn=Ct=Ye=null,Po=!1,vc=Nd=0,Bo=null}function Gn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dn===null?Ye.memoizedState=dn=i:dn=dn.next=i,dn}function on(){if(Ct===null){var i=Ye.alternate;i=i!==null?i.memoizedState:null}else i=Ct.next;var s=dn===null?Ye.memoizedState:dn.next;if(s!==null)dn=s,Ct=i;else{if(i===null)throw Ye.alternate===null?Error(r(467)):Error(r(310));Ct=i,i={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},dn===null?Ye.memoizedState=dn=i:dn=dn.next=i}return dn}function Cd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wc(i){var s=vc;return vc+=1,Bo===null&&(Bo=[]),i=Sv(Bo,i,s),s=Ye,(dn===null?s.memoizedState:dn.next)===null&&(s=s.alternate,z.H=s===null||s.memoizedState===null?m0:lm),i}function jd(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return wc(i);if(i.$$typeof===_)return Dn(i)}throw Error(r(438,String(i)))}function Xp(i){var s=null,c=Ye.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var p=Ye.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(x){return x.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=Cd(),Ye.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(i),p=0;p<i;p++)c[p]=$;return s.index++,c}function Ki(i,s){return typeof s=="function"?s(i):s}function Ad(i){var s=on();return Zp(s,Ct,i)}function Zp(i,s,c){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=c;var x=i.baseQueue,v=p.pending;if(v!==null){if(x!==null){var C=x.next;x.next=v.next,v.next=C}s.baseQueue=x=v,p.pending=null}if(v=i.baseState,x===null)i.memoizedState=v;else{s=x.next;var P=C=null,X=null,ae=s,fe=!1;do{var me=ae.lane&-536870913;if(me!==ae.lane?(ot&me)===me:(qi&me)===me){var se=ae.revertLane;if(se===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),me===Do&&(fe=!0);else if((qi&se)===se){ae=ae.next,se===Do&&(fe=!0);continue}else me={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},X===null?(P=X=me,C=v):X=X.next=me,Ye.lanes|=se,Ba|=se;me=ae.action,Ls&&c(v,me),v=ae.hasEagerState?ae.eagerState:c(v,me)}else se={lane:me,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},X===null?(P=X=se,C=v):X=X.next=se,Ye.lanes|=me,Ba|=me;ae=ae.next}while(ae!==null&&ae!==s);if(X===null?C=v:X.next=P,!hr(v,i.memoizedState)&&(fn=!0,fe&&(c=Ro,c!==null)))throw c;i.memoizedState=v,i.baseState=C,i.baseQueue=X,p.lastRenderedState=v}return x===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function Jp(i){var s=on(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var p=c.dispatch,x=c.pending,v=s.memoizedState;if(x!==null){c.pending=null;var C=x=x.next;do v=i(v,C.action),C=C.next;while(C!==x);hr(v,s.memoizedState)||(fn=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),c.lastRenderedState=v}return[v,p]}function Lv(i,s,c){var p=Ye,x=on(),v=ct;if(v){if(c===void 0)throw Error(r(407));c=c()}else c=s();var C=!hr((Ct||x).memoizedState,c);if(C&&(x.memoizedState=c,fn=!0),x=x.queue,nm(Pv.bind(null,p,x,i),[i]),x.getSnapshot!==s||C||dn!==null&&dn.memoizedState.tag&1){if(p.flags|=2048,Uo(9,{destroy:void 0},zv.bind(null,p,x,c,s),null),Dt===null)throw Error(r(349));v||(qi&127)!==0||Iv(p,s,c)}return c}function Iv(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Ye.updateQueue,s===null?(s=Cd(),Ye.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function zv(i,s,c,p){s.value=c,s.getSnapshot=p,Bv(s)&&Uv(i)}function Pv(i,s,c){return c(function(){Bv(s)&&Uv(i)})}function Bv(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!hr(i,c)}catch{return!0}}function Uv(i){var s=Ns(i,2);s!==null&&ar(s,i,2)}function em(i){var s=Gn();if(typeof i=="function"){var c=i;if(i=c(),Ls){kn(!0);try{c()}finally{kn(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ki,lastRenderedState:i},s}function $v(i,s,c,p){return i.baseState=c,Zp(i,Ct,typeof p=="function"?p:Ki)}function WA(i,s,c,p,x){if(Od(i))throw Error(r(485));if(i=s.action,i!==null){var v={payload:x,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){v.listeners.push(C)}};z.T!==null?c(!0):v.isTransition=!1,p(v),c=s.pending,c===null?(v.next=s.pending=v,Fv(s,v)):(v.next=c.next,s.pending=c.next=v)}}function Fv(i,s){var c=s.action,p=s.payload,x=i.state;if(s.isTransition){var v=z.T,C={};z.T=C;try{var P=c(x,p),X=z.S;X!==null&&X(C,P),Hv(i,s,P)}catch(ae){tm(i,s,ae)}finally{v!==null&&C.types!==null&&(v.types=C.types),z.T=v}}else try{v=c(x,p),Hv(i,s,v)}catch(ae){tm(i,s,ae)}}function Hv(i,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(p){qv(i,s,p)},function(p){return tm(i,s,p)}):qv(i,s,c)}function qv(i,s,c){s.status="fulfilled",s.value=c,Kv(s),i.state=c,s=i.pending,s!==null&&(c=s.next,c===s?i.pending=null:(c=c.next,s.next=c,Fv(i,c)))}function tm(i,s,c){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=c,Kv(s),s=s.next;while(s!==p)}i.action=null}function Kv(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function Gv(i,s){return s}function Vv(i,s){if(ct){var c=Dt.formState;if(c!==null){e:{var p=Ye;if(ct){if(Bt){t:{for(var x=Bt,v=Lr;x.nodeType!==8;){if(!v){x=null;break t}if(x=zr(x.nextSibling),x===null){x=null;break t}}v=x.data,x=v==="F!"||v==="F"?x:null}if(x){Bt=zr(x.nextSibling),p=x.data==="F!";break e}}Ta(p)}p=!1}p&&(s=c[0])}}return c=Gn(),c.memoizedState=c.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gv,lastRenderedState:s},c.queue=p,c=f0.bind(null,Ye,p),p.dispatch=c,p=em(!1),v=om.bind(null,Ye,!1,p.queue),p=Gn(),x={state:s,dispatch:null,action:i,pending:null},p.queue=x,c=WA.bind(null,Ye,x,v,c),x.dispatch=c,p.memoizedState=i,[s,c,!1]}function Yv(i){var s=on();return Qv(s,Ct,i)}function Qv(i,s,c){if(s=Zp(i,s,Gv)[0],i=Ad(Ki)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=wc(s)}catch(C){throw C===Lo?xd:C}else p=s;s=on();var x=s.queue,v=x.dispatch;return c!==s.memoizedState&&(Ye.flags|=2048,Uo(9,{destroy:void 0},XA.bind(null,x,c),null)),[p,v,i]}function XA(i,s){i.action=s}function Wv(i){var s=on(),c=Ct;if(c!==null)return Qv(s,c,i);on(),s=s.memoizedState,c=on();var p=c.queue.dispatch;return c.memoizedState=i,[s,p,!1]}function Uo(i,s,c,p){return i={tag:i,create:c,deps:p,inst:s,next:null},s=Ye.updateQueue,s===null&&(s=Cd(),Ye.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=i.next=i:(p=c.next,c.next=i,i.next=p,s.lastEffect=i),i}function Xv(){return on().memoizedState}function Td(i,s,c,p){var x=Gn();Ye.flags|=i,x.memoizedState=Uo(1|s,{destroy:void 0},c,p===void 0?null:p)}function Md(i,s,c,p){var x=on();p=p===void 0?null:p;var v=x.memoizedState.inst;Ct!==null&&p!==null&&Gp(p,Ct.memoizedState.deps)?x.memoizedState=Uo(s,v,c,p):(Ye.flags|=i,x.memoizedState=Uo(1|s,v,c,p))}function Zv(i,s){Td(8390656,8,i,s)}function nm(i,s){Md(2048,8,i,s)}function ZA(i){Ye.flags|=4;var s=Ye.updateQueue;if(s===null)s=Cd(),Ye.updateQueue=s,s.events=[i];else{var c=s.events;c===null?s.events=[i]:c.push(i)}}function Jv(i){var s=on().memoizedState;return ZA({ref:s,nextImpl:i}),function(){if((vt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function e0(i,s){return Md(4,2,i,s)}function t0(i,s){return Md(4,4,i,s)}function n0(i,s){if(typeof s=="function"){i=i();var c=s(i);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function r0(i,s,c){c=c!=null?c.concat([i]):null,Md(4,4,n0.bind(null,s,i),c)}function rm(){}function i0(i,s){var c=on();s=s===void 0?null:s;var p=c.memoizedState;return s!==null&&Gp(s,p[1])?p[0]:(c.memoizedState=[i,s],i)}function a0(i,s){var c=on();s=s===void 0?null:s;var p=c.memoizedState;if(s!==null&&Gp(s,p[1]))return p[0];if(p=i(),Ls){kn(!0);try{i()}finally{kn(!1)}}return c.memoizedState=[p,s],p}function im(i,s,c){return c===void 0||(qi&1073741824)!==0&&(ot&261930)===0?i.memoizedState=s:(i.memoizedState=c,i=sw(),Ye.lanes|=i,Ba|=i,c)}function s0(i,s,c,p){return hr(c,s)?c:zo.current!==null?(i=im(i,c,p),hr(i,s)||(fn=!0),i):(qi&42)===0||(qi&1073741824)!==0&&(ot&261930)===0?(fn=!0,i.memoizedState=c):(i=sw(),Ye.lanes|=i,Ba|=i,s)}function o0(i,s,c,p,x){var v=Y.p;Y.p=v!==0&&8>v?v:8;var C=z.T,P={};z.T=P,om(i,!1,s,c);try{var X=x(),ae=z.S;if(ae!==null&&ae(P,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var fe=VA(X,p);Ec(i,s,fe,xr(i))}else Ec(i,s,p,xr(i))}catch(me){Ec(i,s,{then:function(){},status:"rejected",reason:me},xr())}finally{Y.p=v,C!==null&&P.types!==null&&(C.types=P.types),z.T=C}}function JA(){}function am(i,s,c,p){if(i.tag!==5)throw Error(r(476));var x=l0(i).queue;o0(i,x,s,W,c===null?JA:function(){return c0(i),c(p)})}function l0(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ki,lastRenderedState:W},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ki,lastRenderedState:c},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function c0(i){var s=l0(i);s.next===null&&(s=i.alternate.memoizedState),Ec(i,s.next.queue,{},xr())}function sm(){return Dn(Bc)}function u0(){return on().memoizedState}function d0(){return on().memoizedState}function eT(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var c=xr();i=Da(c);var p=Ra(s,i,c);p!==null&&(ar(p,s,c),yc(p,s,c)),s={cache:Lp()},i.payload=s;return}s=s.return}}function tT(i,s,c){var p=xr();c={lane:p,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Od(i)?h0(s,c):(c=Sp(i,s,c,p),c!==null&&(ar(c,i,p),p0(c,s,p)))}function f0(i,s,c){var p=xr();Ec(i,s,c,p)}function Ec(i,s,c,p){var x={lane:p,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Od(i))h0(s,x);else{var v=i.alternate;if(i.lanes===0&&(v===null||v.lanes===0)&&(v=s.lastRenderedReducer,v!==null))try{var C=s.lastRenderedState,P=v(C,c);if(x.hasEagerState=!0,x.eagerState=P,hr(P,C))return fd(i,s,x,0),Dt===null&&dd(),!1}catch{}finally{}if(c=Sp(i,s,x,p),c!==null)return ar(c,i,p),p0(c,s,p),!0}return!1}function om(i,s,c,p){if(p={lane:2,revertLane:Bm(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Od(i)){if(s)throw Error(r(479))}else s=Sp(i,c,p,2),s!==null&&ar(s,i,2)}function Od(i){var s=i.alternate;return i===Ye||s!==null&&s===Ye}function h0(i,s){Po=_d=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function p0(i,s,c){if((c&4194048)!==0){var p=s.lanes;p&=i.pendingLanes,c|=p,s.lanes=c,$e(i,c)}}var kc={readContext:Dn,use:jd,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useLayoutEffect:en,useInsertionEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useSyncExternalStore:en,useId:en,useHostTransitionStatus:en,useFormState:en,useActionState:en,useOptimistic:en,useMemoCache:en,useCacheRefresh:en};kc.useEffectEvent=en;var m0={readContext:Dn,use:jd,useCallback:function(i,s){return Gn().memoizedState=[i,s===void 0?null:s],i},useContext:Dn,useEffect:Zv,useImperativeHandle:function(i,s,c){c=c!=null?c.concat([i]):null,Td(4194308,4,n0.bind(null,s,i),c)},useLayoutEffect:function(i,s){return Td(4194308,4,i,s)},useInsertionEffect:function(i,s){Td(4,2,i,s)},useMemo:function(i,s){var c=Gn();s=s===void 0?null:s;var p=i();if(Ls){kn(!0);try{i()}finally{kn(!1)}}return c.memoizedState=[p,s],p},useReducer:function(i,s,c){var p=Gn();if(c!==void 0){var x=c(s);if(Ls){kn(!0);try{c(s)}finally{kn(!1)}}}else x=s;return p.memoizedState=p.baseState=x,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:x},p.queue=i,i=i.dispatch=tT.bind(null,Ye,i),[p.memoizedState,i]},useRef:function(i){var s=Gn();return i={current:i},s.memoizedState=i},useState:function(i){i=em(i);var s=i.queue,c=f0.bind(null,Ye,s);return s.dispatch=c,[i.memoizedState,c]},useDebugValue:rm,useDeferredValue:function(i,s){var c=Gn();return im(c,i,s)},useTransition:function(){var i=em(!1);return i=o0.bind(null,Ye,i.queue,!0,!1),Gn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,c){var p=Ye,x=Gn();if(ct){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),Dt===null)throw Error(r(349));(ot&127)!==0||Iv(p,s,c)}x.memoizedState=c;var v={value:c,getSnapshot:s};return x.queue=v,Zv(Pv.bind(null,p,v,i),[i]),p.flags|=2048,Uo(9,{destroy:void 0},zv.bind(null,p,v,c,s),null),c},useId:function(){var i=Gn(),s=Dt.identifierPrefix;if(ct){var c=xi,p=bi;c=(p&~(1<<32-xt(p)-1)).toString(32)+c,s="_"+s+"R_"+c,c=Nd++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=YA++,s="_"+s+"r_"+c.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:sm,useFormState:Vv,useActionState:Vv,useOptimistic:function(i){var s=Gn();s.memoizedState=s.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=om.bind(null,Ye,!0,c),c.dispatch=s,[i,s]},useMemoCache:Xp,useCacheRefresh:function(){return Gn().memoizedState=eT.bind(null,Ye)},useEffectEvent:function(i){var s=Gn(),c={impl:i};return s.memoizedState=c,function(){if((vt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},lm={readContext:Dn,use:jd,useCallback:i0,useContext:Dn,useEffect:nm,useImperativeHandle:r0,useInsertionEffect:e0,useLayoutEffect:t0,useMemo:a0,useReducer:Ad,useRef:Xv,useState:function(){return Ad(Ki)},useDebugValue:rm,useDeferredValue:function(i,s){var c=on();return s0(c,Ct.memoizedState,i,s)},useTransition:function(){var i=Ad(Ki)[0],s=on().memoizedState;return[typeof i=="boolean"?i:wc(i),s]},useSyncExternalStore:Lv,useId:u0,useHostTransitionStatus:sm,useFormState:Yv,useActionState:Yv,useOptimistic:function(i,s){var c=on();return $v(c,Ct,i,s)},useMemoCache:Xp,useCacheRefresh:d0};lm.useEffectEvent=Jv;var g0={readContext:Dn,use:jd,useCallback:i0,useContext:Dn,useEffect:nm,useImperativeHandle:r0,useInsertionEffect:e0,useLayoutEffect:t0,useMemo:a0,useReducer:Jp,useRef:Xv,useState:function(){return Jp(Ki)},useDebugValue:rm,useDeferredValue:function(i,s){var c=on();return Ct===null?im(c,i,s):s0(c,Ct.memoizedState,i,s)},useTransition:function(){var i=Jp(Ki)[0],s=on().memoizedState;return[typeof i=="boolean"?i:wc(i),s]},useSyncExternalStore:Lv,useId:u0,useHostTransitionStatus:sm,useFormState:Wv,useActionState:Wv,useOptimistic:function(i,s){var c=on();return Ct!==null?$v(c,Ct,i,s):(c.baseState=i,[i,c.queue.dispatch])},useMemoCache:Xp,useCacheRefresh:d0};g0.useEffectEvent=Jv;function cm(i,s,c,p){s=i.memoizedState,c=c(p,s),c=c==null?s:m({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var um={enqueueSetState:function(i,s,c){i=i._reactInternals;var p=xr(),x=Da(p);x.payload=s,c!=null&&(x.callback=c),s=Ra(i,x,p),s!==null&&(ar(s,i,p),yc(s,i,p))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var p=xr(),x=Da(p);x.tag=1,x.payload=s,c!=null&&(x.callback=c),s=Ra(i,x,p),s!==null&&(ar(s,i,p),yc(s,i,p))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=xr(),p=Da(c);p.tag=2,s!=null&&(p.callback=s),s=Ra(i,p,c),s!==null&&(ar(s,i,c),yc(s,i,c))}};function y0(i,s,c,p,x,v,C){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,v,C):s.prototype&&s.prototype.isPureReactComponent?!cc(c,p)||!cc(x,v):!0}function b0(i,s,c,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,p),s.state!==i&&um.enqueueReplaceState(s,s.state,null)}function Is(i,s){var c=s;if("ref"in s){c={};for(var p in s)p!=="ref"&&(c[p]=s[p])}if(i=i.defaultProps){c===s&&(c=m({},c));for(var x in i)c[x]===void 0&&(c[x]=i[x])}return c}function x0(i){ud(i)}function v0(i){console.error(i)}function w0(i){ud(i)}function Dd(i,s){try{var c=i.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function E0(i,s,c){try{var p=i.onCaughtError;p(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function dm(i,s,c){return c=Da(c),c.tag=3,c.payload={element:null},c.callback=function(){Dd(i,s)},c}function k0(i){return i=Da(i),i.tag=3,i}function S0(i,s,c,p){var x=c.type.getDerivedStateFromError;if(typeof x=="function"){var v=p.value;i.payload=function(){return x(v)},i.callback=function(){E0(s,c,p)}}var C=c.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(i.callback=function(){E0(s,c,p),typeof x!="function"&&(Ua===null?Ua=new Set([this]):Ua.add(this));var P=p.stack;this.componentDidCatch(p.value,{componentStack:P!==null?P:""})})}function nT(i,s,c,p,x){if(c.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=c.alternate,s!==null&&Oo(s,c,x,!0),c=mr.current,c!==null){switch(c.tag){case 31:case 13:return Ir===null?Kd():c.alternate===null&&tn===0&&(tn=3),c.flags&=-257,c.flags|=65536,c.lanes=x,p===vd?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([p]):s.add(p),Im(i,p,x)),!1;case 22:return c.flags|=65536,p===vd?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([p]):c.add(p)),Im(i,p,x)),!1}throw Error(r(435,c.tag))}return Im(i,p,x),Kd(),!1}if(ct)return s=mr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=x,p!==Tp&&(i=Error(r(422),{cause:p}),fc(Or(i,c)))):(p!==Tp&&(s=Error(r(423),{cause:p}),fc(Or(s,c))),i=i.current.alternate,i.flags|=65536,x&=-x,i.lanes|=x,p=Or(p,c),x=dm(i.stateNode,p,x),$p(i,x),tn!==4&&(tn=2)),!1;var v=Error(r(520),{cause:p});if(v=Or(v,c),Mc===null?Mc=[v]:Mc.push(v),tn!==4&&(tn=2),s===null)return!0;p=Or(p,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,i=x&-x,c.lanes|=i,i=dm(c.stateNode,p,i),$p(c,i),!1;case 1:if(s=c.type,v=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Ua===null||!Ua.has(v))))return c.flags|=65536,x&=-x,c.lanes|=x,x=k0(x),S0(x,i,c,p),$p(c,x),!1}c=c.return}while(c!==null);return!1}var fm=Error(r(461)),fn=!1;function Rn(i,s,c,p){s.child=i===null?jv(s,null,c,p):Rs(s,i.child,c,p)}function _0(i,s,c,p,x){c=c.render;var v=s.ref;if("ref"in p){var C={};for(var P in p)P!=="ref"&&(C[P]=p[P])}else C=p;return Ts(s),p=Vp(i,s,c,C,v,x),P=Yp(),i!==null&&!fn?(Qp(i,s,x),Gi(i,s,x)):(ct&&P&&jp(s),s.flags|=1,Rn(i,s,p,x),s.child)}function N0(i,s,c,p,x){if(i===null){var v=c.type;return typeof v=="function"&&!_p(v)&&v.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=v,C0(i,s,v,p,x)):(i=pd(c.type,null,p,s,s.mode,x),i.ref=s.ref,i.return=s,s.child=i)}if(v=i.child,!vm(i,x)){var C=v.memoizedProps;if(c=c.compare,c=c!==null?c:cc,c(C,p)&&i.ref===s.ref)return Gi(i,s,x)}return s.flags|=1,i=Ui(v,p),i.ref=s.ref,i.return=s,s.child=i}function C0(i,s,c,p,x){if(i!==null){var v=i.memoizedProps;if(cc(v,p)&&i.ref===s.ref)if(fn=!1,s.pendingProps=p=v,vm(i,x))(i.flags&131072)!==0&&(fn=!0);else return s.lanes=i.lanes,Gi(i,s,x)}return hm(i,s,c,p,x)}function j0(i,s,c,p){var x=p.children,v=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(v=v!==null?v.baseLanes|c:c,i!==null){for(p=s.child=i.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;p=x&~v}else p=0,s.child=null;return A0(i,s,v,c,p)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&bd(s,v!==null?v.cachePool:null),v!==null?Mv(s,v):Hp(),Ov(s);else return p=s.lanes=536870912,A0(i,s,v!==null?v.baseLanes|c:c,c,p)}else v!==null?(bd(s,v.cachePool),Mv(s,v),Ia(),s.memoizedState=null):(i!==null&&bd(s,null),Hp(),Ia());return Rn(i,s,x,c),s.child}function Sc(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function A0(i,s,c,p,x){var v=zp();return v=v===null?null:{parent:un._currentValue,pool:v},s.memoizedState={baseLanes:c,cachePool:v},i!==null&&bd(s,null),Hp(),Ov(s),i!==null&&Oo(i,s,p,!0),s.childLanes=x,null}function Rd(i,s){return s=Id({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function T0(i,s,c){return Rs(s,i.child,null,c),i=Rd(s,s.pendingProps),i.flags|=2,gr(s),s.memoizedState=null,i}function rT(i,s,c){var p=s.pendingProps,x=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(ct){if(p.mode==="hidden")return i=Rd(s,p),s.lanes=536870912,Sc(null,i);if(Kp(s),(i=Bt)?(i=Fw(i,Lr),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:ja!==null?{id:bi,overflow:xi}:null,retryLane:536870912,hydrationErrors:null},c=hv(i),c.return=s,s.child=c,On=s,Bt=null)):i=null,i===null)throw Ta(s);return s.lanes=536870912,null}return Rd(s,p)}var v=i.memoizedState;if(v!==null){var C=v.dehydrated;if(Kp(s),x)if(s.flags&256)s.flags&=-257,s=T0(i,s,c);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(r(558));else if(fn||Oo(i,s,c,!1),x=(c&i.childLanes)!==0,fn||x){if(p=Dt,p!==null&&(C=Vt(p,c),C!==0&&C!==v.retryLane))throw v.retryLane=C,Ns(i,C),ar(p,i,C),fm;Kd(),s=T0(i,s,c)}else i=v.treeContext,Bt=zr(C.nextSibling),On=s,ct=!0,Aa=null,Lr=!1,i!==null&&gv(s,i),s=Rd(s,p),s.flags|=4096;return s}return i=Ui(i.child,{mode:p.mode,children:p.children}),i.ref=s.ref,s.child=i,i.return=s,i}function Ld(i,s){var c=s.ref;if(c===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(s.flags|=4194816)}}function hm(i,s,c,p,x){return Ts(s),c=Vp(i,s,c,p,void 0,x),p=Yp(),i!==null&&!fn?(Qp(i,s,x),Gi(i,s,x)):(ct&&p&&jp(s),s.flags|=1,Rn(i,s,c,x),s.child)}function M0(i,s,c,p,x,v){return Ts(s),s.updateQueue=null,c=Rv(s,p,c,x),Dv(i),p=Yp(),i!==null&&!fn?(Qp(i,s,v),Gi(i,s,v)):(ct&&p&&jp(s),s.flags|=1,Rn(i,s,c,v),s.child)}function O0(i,s,c,p,x){if(Ts(s),s.stateNode===null){var v=jo,C=c.contextType;typeof C=="object"&&C!==null&&(v=Dn(C)),v=new c(p,v),s.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=um,s.stateNode=v,v._reactInternals=s,v=s.stateNode,v.props=p,v.state=s.memoizedState,v.refs={},Bp(s),C=c.contextType,v.context=typeof C=="object"&&C!==null?Dn(C):jo,v.state=s.memoizedState,C=c.getDerivedStateFromProps,typeof C=="function"&&(cm(s,c,C,p),v.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(C=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),C!==v.state&&um.enqueueReplaceState(v,v.state,null),xc(s,p,v,x),bc(),v.state=s.memoizedState),typeof v.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(i===null){v=s.stateNode;var P=s.memoizedProps,X=Is(c,P);v.props=X;var ae=v.context,fe=c.contextType;C=jo,typeof fe=="object"&&fe!==null&&(C=Dn(fe));var me=c.getDerivedStateFromProps;fe=typeof me=="function"||typeof v.getSnapshotBeforeUpdate=="function",P=s.pendingProps!==P,fe||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(P||ae!==C)&&b0(s,v,p,C),Oa=!1;var se=s.memoizedState;v.state=se,xc(s,p,v,x),bc(),ae=s.memoizedState,P||se!==ae||Oa?(typeof me=="function"&&(cm(s,c,me,p),ae=s.memoizedState),(X=Oa||y0(s,c,X,p,se,ae,C))?(fe||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(s.flags|=4194308)):(typeof v.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=ae),v.props=p,v.state=ae,v.context=C,p=X):(typeof v.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{v=s.stateNode,Up(i,s),C=s.memoizedProps,fe=Is(c,C),v.props=fe,me=s.pendingProps,se=v.context,ae=c.contextType,X=jo,typeof ae=="object"&&ae!==null&&(X=Dn(ae)),P=c.getDerivedStateFromProps,(ae=typeof P=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(C!==me||se!==X)&&b0(s,v,p,X),Oa=!1,se=s.memoizedState,v.state=se,xc(s,p,v,x),bc();var le=s.memoizedState;C!==me||se!==le||Oa||i!==null&&i.dependencies!==null&&gd(i.dependencies)?(typeof P=="function"&&(cm(s,c,P,p),le=s.memoizedState),(fe=Oa||y0(s,c,fe,p,se,le,X)||i!==null&&i.dependencies!==null&&gd(i.dependencies))?(ae||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(p,le,X),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(p,le,X)),typeof v.componentDidUpdate=="function"&&(s.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof v.componentDidUpdate!="function"||C===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=le),v.props=p,v.state=le,v.context=X,p=fe):(typeof v.componentDidUpdate!="function"||C===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),p=!1)}return v=p,Ld(i,s),p=(s.flags&128)!==0,v||p?(v=s.stateNode,c=p&&typeof c.getDerivedStateFromError!="function"?null:v.render(),s.flags|=1,i!==null&&p?(s.child=Rs(s,i.child,null,x),s.child=Rs(s,null,c,x)):Rn(i,s,c,x),s.memoizedState=v.state,i=s.child):i=Gi(i,s,x),i}function D0(i,s,c,p){return js(),s.flags|=256,Rn(i,s,c,p),s.child}var pm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mm(i){return{baseLanes:i,cachePool:Ev()}}function gm(i,s,c){return i=i!==null?i.childLanes&~c:0,s&&(i|=br),i}function R0(i,s,c){var p=s.pendingProps,x=!1,v=(s.flags&128)!==0,C;if((C=v)||(C=i!==null&&i.memoizedState===null?!1:(sn.current&2)!==0),C&&(x=!0,s.flags&=-129),C=(s.flags&32)!==0,s.flags&=-33,i===null){if(ct){if(x?La(s):Ia(),(i=Bt)?(i=Fw(i,Lr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:ja!==null?{id:bi,overflow:xi}:null,retryLane:536870912,hydrationErrors:null},c=hv(i),c.return=s,s.child=c,On=s,Bt=null)):i=null,i===null)throw Ta(s);return Zm(i)?s.lanes=32:s.lanes=536870912,null}var P=p.children;return p=p.fallback,x?(Ia(),x=s.mode,P=Id({mode:"hidden",children:P},x),p=Cs(p,x,c,null),P.return=s,p.return=s,P.sibling=p,s.child=P,p=s.child,p.memoizedState=mm(c),p.childLanes=gm(i,C,c),s.memoizedState=pm,Sc(null,p)):(La(s),ym(s,P))}var X=i.memoizedState;if(X!==null&&(P=X.dehydrated,P!==null)){if(v)s.flags&256?(La(s),s.flags&=-257,s=bm(i,s,c)):s.memoizedState!==null?(Ia(),s.child=i.child,s.flags|=128,s=null):(Ia(),P=p.fallback,x=s.mode,p=Id({mode:"visible",children:p.children},x),P=Cs(P,x,c,null),P.flags|=2,p.return=s,P.return=s,p.sibling=P,s.child=p,Rs(s,i.child,null,c),p=s.child,p.memoizedState=mm(c),p.childLanes=gm(i,C,c),s.memoizedState=pm,s=Sc(null,p));else if(La(s),Zm(P)){if(C=P.nextSibling&&P.nextSibling.dataset,C)var ae=C.dgst;C=ae,p=Error(r(419)),p.stack="",p.digest=C,fc({value:p,source:null,stack:null}),s=bm(i,s,c)}else if(fn||Oo(i,s,c,!1),C=(c&i.childLanes)!==0,fn||C){if(C=Dt,C!==null&&(p=Vt(C,c),p!==0&&p!==X.retryLane))throw X.retryLane=p,Ns(i,p),ar(C,i,p),fm;Xm(P)||Kd(),s=bm(i,s,c)}else Xm(P)?(s.flags|=192,s.child=i.child,s=null):(i=X.treeContext,Bt=zr(P.nextSibling),On=s,ct=!0,Aa=null,Lr=!1,i!==null&&gv(s,i),s=ym(s,p.children),s.flags|=4096);return s}return x?(Ia(),P=p.fallback,x=s.mode,X=i.child,ae=X.sibling,p=Ui(X,{mode:"hidden",children:p.children}),p.subtreeFlags=X.subtreeFlags&65011712,ae!==null?P=Ui(ae,P):(P=Cs(P,x,c,null),P.flags|=2),P.return=s,p.return=s,p.sibling=P,s.child=p,Sc(null,p),p=s.child,P=i.child.memoizedState,P===null?P=mm(c):(x=P.cachePool,x!==null?(X=un._currentValue,x=x.parent!==X?{parent:X,pool:X}:x):x=Ev(),P={baseLanes:P.baseLanes|c,cachePool:x}),p.memoizedState=P,p.childLanes=gm(i,C,c),s.memoizedState=pm,Sc(i.child,p)):(La(s),c=i.child,i=c.sibling,c=Ui(c,{mode:"visible",children:p.children}),c.return=s,c.sibling=null,i!==null&&(C=s.deletions,C===null?(s.deletions=[i],s.flags|=16):C.push(i)),s.child=c,s.memoizedState=null,c)}function ym(i,s){return s=Id({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function Id(i,s){return i=pr(22,i,null,s),i.lanes=0,i}function bm(i,s,c){return Rs(s,i.child,null,c),i=ym(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function L0(i,s,c){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),Dp(i.return,s,c)}function xm(i,s,c,p,x,v){var C=i.memoizedState;C===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:c,tailMode:x,treeForkCount:v}:(C.isBackwards=s,C.rendering=null,C.renderingStartTime=0,C.last=p,C.tail=c,C.tailMode=x,C.treeForkCount=v)}function I0(i,s,c){var p=s.pendingProps,x=p.revealOrder,v=p.tail;p=p.children;var C=sn.current,P=(C&2)!==0;if(P?(C=C&1|2,s.flags|=128):C&=1,R(sn,C),Rn(i,s,p,c),p=ct?dc:0,!P&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&L0(i,c,s);else if(i.tag===19)L0(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(x){case"forwards":for(c=s.child,x=null;c!==null;)i=c.alternate,i!==null&&Sd(i)===null&&(x=c),c=c.sibling;c=x,c===null?(x=s.child,s.child=null):(x=c.sibling,c.sibling=null),xm(s,!1,x,c,v,p);break;case"backwards":case"unstable_legacy-backwards":for(c=null,x=s.child,s.child=null;x!==null;){if(i=x.alternate,i!==null&&Sd(i)===null){s.child=x;break}i=x.sibling,x.sibling=c,c=x,x=i}xm(s,!0,c,null,v,p);break;case"together":xm(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function Gi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Ba|=s.lanes,(c&s.childLanes)===0)if(i!==null){if(Oo(i,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,c=Ui(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Ui(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function vm(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&gd(i)))}function iT(i,s,c){switch(s.tag){case 3:G(s,s.stateNode.containerInfo),Ma(s,un,i.memoizedState.cache),js();break;case 27:case 5:de(s);break;case 4:G(s,s.stateNode.containerInfo);break;case 10:Ma(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Kp(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(La(s),s.flags|=128,null):(c&s.child.childLanes)!==0?R0(i,s,c):(La(s),i=Gi(i,s,c),i!==null?i.sibling:null);La(s);break;case 19:var x=(i.flags&128)!==0;if(p=(c&s.childLanes)!==0,p||(Oo(i,s,c,!1),p=(c&s.childLanes)!==0),x){if(p)return I0(i,s,c);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),R(sn,sn.current),p)break;return null;case 22:return s.lanes=0,j0(i,s,c,s.pendingProps);case 24:Ma(s,un,i.memoizedState.cache)}return Gi(i,s,c)}function z0(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps)fn=!0;else{if(!vm(i,c)&&(s.flags&128)===0)return fn=!1,iT(i,s,c);fn=(i.flags&131072)!==0}else fn=!1,ct&&(s.flags&1048576)!==0&&mv(s,dc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(i=Os(s.elementType),s.type=i,typeof i=="function")_p(i)?(p=Is(i,p),s.tag=1,s=O0(null,s,i,p,c)):(s.tag=0,s=hm(null,s,i,p,c));else{if(i!=null){var x=i.$$typeof;if(x===N){s.tag=11,s=_0(null,s,i,p,c);break e}else if(x===M){s.tag=14,s=N0(null,s,i,p,c);break e}}throw s=B(i)||i,Error(r(306,s,""))}}return s;case 0:return hm(i,s,s.type,s.pendingProps,c);case 1:return p=s.type,x=Is(p,s.pendingProps),O0(i,s,p,x,c);case 3:e:{if(G(s,s.stateNode.containerInfo),i===null)throw Error(r(387));p=s.pendingProps;var v=s.memoizedState;x=v.element,Up(i,s),xc(s,p,null,c);var C=s.memoizedState;if(p=C.cache,Ma(s,un,p),p!==v.cache&&Rp(s,[un],c,!0),bc(),p=C.element,v.isDehydrated)if(v={element:p,isDehydrated:!1,cache:C.cache},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){s=D0(i,s,p,c);break e}else if(p!==x){x=Or(Error(r(424)),s),fc(x),s=D0(i,s,p,c);break e}else{switch(i=s.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Bt=zr(i.firstChild),On=s,ct=!0,Aa=null,Lr=!0,c=jv(s,null,p,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(js(),p===x){s=Gi(i,s,c);break e}Rn(i,s,p,c)}s=s.child}return s;case 26:return Ld(i,s),i===null?(c=Yw(s.type,null,s.pendingProps,null))?s.memoizedState=c:ct||(c=s.type,i=s.pendingProps,p=Zd(te.current).createElement(c),p[Yt]=s,p[Sn]=i,Ln(p,c,i),Jt(p),s.stateNode=p):s.memoizedState=Yw(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return de(s),i===null&&ct&&(p=s.stateNode=Kw(s.type,s.pendingProps,te.current),On=s,Lr=!0,x=Bt,qa(s.type)?(Jm=x,Bt=zr(p.firstChild)):Bt=x),Rn(i,s,s.pendingProps.children,c),Ld(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&ct&&((x=p=Bt)&&(p=RT(p,s.type,s.pendingProps,Lr),p!==null?(s.stateNode=p,On=s,Bt=zr(p.firstChild),Lr=!1,x=!0):x=!1),x||Ta(s)),de(s),x=s.type,v=s.pendingProps,C=i!==null?i.memoizedProps:null,p=v.children,Ym(x,v)?p=null:C!==null&&Ym(x,C)&&(s.flags|=32),s.memoizedState!==null&&(x=Vp(i,s,QA,null,null,c),Bc._currentValue=x),Ld(i,s),Rn(i,s,p,c),s.child;case 6:return i===null&&ct&&((i=c=Bt)&&(c=LT(c,s.pendingProps,Lr),c!==null?(s.stateNode=c,On=s,Bt=null,i=!0):i=!1),i||Ta(s)),null;case 13:return R0(i,s,c);case 4:return G(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=Rs(s,null,p,c):Rn(i,s,p,c),s.child;case 11:return _0(i,s,s.type,s.pendingProps,c);case 7:return Rn(i,s,s.pendingProps,c),s.child;case 8:return Rn(i,s,s.pendingProps.children,c),s.child;case 12:return Rn(i,s,s.pendingProps.children,c),s.child;case 10:return p=s.pendingProps,Ma(s,s.type,p.value),Rn(i,s,p.children,c),s.child;case 9:return x=s.type._context,p=s.pendingProps.children,Ts(s),x=Dn(x),p=p(x),s.flags|=1,Rn(i,s,p,c),s.child;case 14:return N0(i,s,s.type,s.pendingProps,c);case 15:return C0(i,s,s.type,s.pendingProps,c);case 19:return I0(i,s,c);case 31:return rT(i,s,c);case 22:return j0(i,s,c,s.pendingProps);case 24:return Ts(s),p=Dn(un),i===null?(x=zp(),x===null&&(x=Dt,v=Lp(),x.pooledCache=v,v.refCount++,v!==null&&(x.pooledCacheLanes|=c),x=v),s.memoizedState={parent:p,cache:x},Bp(s),Ma(s,un,x)):((i.lanes&c)!==0&&(Up(i,s),xc(s,null,null,c),bc()),x=i.memoizedState,v=s.memoizedState,x.parent!==p?(x={parent:p,cache:p},s.memoizedState=x,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=x),Ma(s,un,p)):(p=v.cache,Ma(s,un,p),p!==x.cache&&Rp(s,[un],c,!0))),Rn(i,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Vi(i){i.flags|=4}function wm(i,s,c,p,x){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(x&335544128)===x)if(i.stateNode.complete)i.flags|=8192;else if(uw())i.flags|=8192;else throw Ds=vd,Pp}else i.flags&=-16777217}function P0(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Jw(s))if(uw())i.flags|=8192;else throw Ds=vd,Pp}function zd(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?qe():536870912,i.lanes|=s,qo|=s)}function _c(i,s){if(!ct)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Ut(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,p=0;if(s)for(var x=i.child;x!==null;)c|=x.lanes|x.childLanes,p|=x.subtreeFlags&65011712,p|=x.flags&65011712,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)c|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=p,i.childLanes=c,s}function aT(i,s,c){var p=s.pendingProps;switch(Ap(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ut(s),null;case 1:return Ut(s),null;case 3:return c=s.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),Hi(un),ne(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(Mo(s)?Vi(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Mp())),Ut(s),null;case 26:var x=s.type,v=s.memoizedState;return i===null?(Vi(s),v!==null?(Ut(s),P0(s,v)):(Ut(s),wm(s,x,null,p,c))):v?v!==i.memoizedState?(Vi(s),Ut(s),P0(s,v)):(Ut(s),s.flags&=-16777217):(i=i.memoizedProps,i!==p&&Vi(s),Ut(s),wm(s,x,i,p,c)),null;case 27:if(xe(s),c=te.current,x=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&Vi(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return Ut(s),null}i=oe.current,Mo(s)?yv(s):(i=Kw(x,p,c),s.stateNode=i,Vi(s))}return Ut(s),null;case 5:if(xe(s),x=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&Vi(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return Ut(s),null}if(v=oe.current,Mo(s))yv(s);else{var C=Zd(te.current);switch(v){case 1:v=C.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:v=C.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":v=C.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":v=C.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":v=C.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof p.is=="string"?C.createElement("select",{is:p.is}):C.createElement("select"),p.multiple?v.multiple=!0:p.size&&(v.size=p.size);break;default:v=typeof p.is=="string"?C.createElement(x,{is:p.is}):C.createElement(x)}}v[Yt]=s,v[Sn]=p;e:for(C=s.child;C!==null;){if(C.tag===5||C.tag===6)v.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===s)break e;for(;C.sibling===null;){if(C.return===null||C.return===s)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}s.stateNode=v;e:switch(Ln(v,x,p),x){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&Vi(s)}}return Ut(s),wm(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,c),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==p&&Vi(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(i=te.current,Mo(s)){if(i=s.stateNode,c=s.memoizedProps,p=null,x=On,x!==null)switch(x.tag){case 27:case 5:p=x.memoizedProps}i[Yt]=s,i=!!(i.nodeValue===c||p!==null&&p.suppressHydrationWarning===!0||Rw(i.nodeValue,c)),i||Ta(s,!0)}else i=Zd(i).createTextNode(p),i[Yt]=s,s.stateNode=i}return Ut(s),null;case 31:if(c=s.memoizedState,i===null||i.memoizedState!==null){if(p=Mo(s),c!==null){if(i===null){if(!p)throw Error(r(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Yt]=s}else js(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ut(s),i=!1}else c=Mp(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=c),i=!0;if(!i)return s.flags&256?(gr(s),s):(gr(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Ut(s),null;case 13:if(p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(x=Mo(s),p!==null&&p.dehydrated!==null){if(i===null){if(!x)throw Error(r(318));if(x=s.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[Yt]=s}else js(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ut(s),x=!1}else x=Mp(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=x),x=!0;if(!x)return s.flags&256?(gr(s),s):(gr(s),null)}return gr(s),(s.flags&128)!==0?(s.lanes=c,s):(c=p!==null,i=i!==null&&i.memoizedState!==null,c&&(p=s.child,x=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(x=p.alternate.memoizedState.cachePool.pool),v=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(v=p.memoizedState.cachePool.pool),v!==x&&(p.flags|=2048)),c!==i&&c&&(s.child.flags|=8192),zd(s,s.updateQueue),Ut(s),null);case 4:return ne(),i===null&&Hm(s.stateNode.containerInfo),Ut(s),null;case 10:return Hi(s.type),Ut(s),null;case 19:if(V(sn),p=s.memoizedState,p===null)return Ut(s),null;if(x=(s.flags&128)!==0,v=p.rendering,v===null)if(x)_c(p,!1);else{if(tn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(v=Sd(i),v!==null){for(s.flags|=128,_c(p,!1),i=v.updateQueue,s.updateQueue=i,zd(s,i),s.subtreeFlags=0,i=c,c=s.child;c!==null;)fv(c,i),c=c.sibling;return R(sn,sn.current&1|2),ct&&$i(s,p.treeForkCount),s.child}i=i.sibling}p.tail!==null&&bt()>Fd&&(s.flags|=128,x=!0,_c(p,!1),s.lanes=4194304)}else{if(!x)if(i=Sd(v),i!==null){if(s.flags|=128,x=!0,i=i.updateQueue,s.updateQueue=i,zd(s,i),_c(p,!0),p.tail===null&&p.tailMode==="hidden"&&!v.alternate&&!ct)return Ut(s),null}else 2*bt()-p.renderingStartTime>Fd&&c!==536870912&&(s.flags|=128,x=!0,_c(p,!1),s.lanes=4194304);p.isBackwards?(v.sibling=s.child,s.child=v):(i=p.last,i!==null?i.sibling=v:s.child=v,p.last=v)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=bt(),i.sibling=null,c=sn.current,R(sn,x?c&1|2:c&1),ct&&$i(s,p.treeForkCount),i):(Ut(s),null);case 22:case 23:return gr(s),qp(),p=s.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(c&536870912)!==0&&(s.flags&128)===0&&(Ut(s),s.subtreeFlags&6&&(s.flags|=8192)):Ut(s),c=s.updateQueue,c!==null&&zd(s,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==c&&(s.flags|=2048),i!==null&&V(Ms),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),Hi(un),Ut(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function sT(i,s){switch(Ap(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Hi(un),ne(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return xe(s),null;case 31:if(s.memoizedState!==null){if(gr(s),s.alternate===null)throw Error(r(340));js()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(gr(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));js()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return V(sn),null;case 4:return ne(),null;case 10:return Hi(s.type),null;case 22:case 23:return gr(s),qp(),i!==null&&V(Ms),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return Hi(un),null;case 25:return null;default:return null}}function B0(i,s){switch(Ap(s),s.tag){case 3:Hi(un),ne();break;case 26:case 27:case 5:xe(s);break;case 4:ne();break;case 31:s.memoizedState!==null&&gr(s);break;case 13:gr(s);break;case 19:V(sn);break;case 10:Hi(s.type);break;case 22:case 23:gr(s),qp(),i!==null&&V(Ms);break;case 24:Hi(un)}}function Nc(i,s){try{var c=s.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var x=p.next;c=x;do{if((c.tag&i)===i){p=void 0;var v=c.create,C=c.inst;p=v(),C.destroy=p}c=c.next}while(c!==x)}}catch(P){_t(s,s.return,P)}}function za(i,s,c){try{var p=s.updateQueue,x=p!==null?p.lastEffect:null;if(x!==null){var v=x.next;p=v;do{if((p.tag&i)===i){var C=p.inst,P=C.destroy;if(P!==void 0){C.destroy=void 0,x=s;var X=c,ae=P;try{ae()}catch(fe){_t(x,X,fe)}}}p=p.next}while(p!==v)}}catch(fe){_t(s,s.return,fe)}}function U0(i){var s=i.updateQueue;if(s!==null){var c=i.stateNode;try{Tv(s,c)}catch(p){_t(i,i.return,p)}}}function $0(i,s,c){c.props=Is(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(p){_t(i,s,p)}}function Cc(i,s){try{var c=i.ref;if(c!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof c=="function"?i.refCleanup=c(p):c.current=p}}catch(x){_t(i,s,x)}}function vi(i,s){var c=i.ref,p=i.refCleanup;if(c!==null)if(typeof p=="function")try{p()}catch(x){_t(i,s,x)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(x){_t(i,s,x)}else c.current=null}function F0(i){var s=i.type,c=i.memoizedProps,p=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&p.focus();break e;case"img":c.src?p.src=c.src:c.srcSet&&(p.srcset=c.srcSet)}}catch(x){_t(i,i.return,x)}}function Em(i,s,c){try{var p=i.stateNode;jT(p,i.type,c,s),p[Sn]=s}catch(x){_t(i,i.return,x)}}function H0(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&qa(i.type)||i.tag===4}function km(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||H0(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&qa(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Sm(i,s,c){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(i),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Ee));else if(p!==4&&(p===27&&qa(i.type)&&(c=i.stateNode,s=null),i=i.child,i!==null))for(Sm(i,s,c),i=i.sibling;i!==null;)Sm(i,s,c),i=i.sibling}function Pd(i,s,c){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(p!==4&&(p===27&&qa(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(Pd(i,s,c),i=i.sibling;i!==null;)Pd(i,s,c),i=i.sibling}function q0(i){var s=i.stateNode,c=i.memoizedProps;try{for(var p=i.type,x=s.attributes;x.length;)s.removeAttributeNode(x[0]);Ln(s,p,c),s[Yt]=i,s[Sn]=c}catch(v){_t(i,i.return,v)}}var Yi=!1,hn=!1,_m=!1,K0=typeof WeakSet=="function"?WeakSet:Set,Nn=null;function oT(i,s){if(i=i.containerInfo,Gm=sf,i=rv(i),bp(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var x=p.anchorOffset,v=p.focusNode;p=p.focusOffset;try{c.nodeType,v.nodeType}catch{c=null;break e}var C=0,P=-1,X=-1,ae=0,fe=0,me=i,se=null;t:for(;;){for(var le;me!==c||x!==0&&me.nodeType!==3||(P=C+x),me!==v||p!==0&&me.nodeType!==3||(X=C+p),me.nodeType===3&&(C+=me.nodeValue.length),(le=me.firstChild)!==null;)se=me,me=le;for(;;){if(me===i)break t;if(se===c&&++ae===x&&(P=C),se===v&&++fe===p&&(X=C),(le=me.nextSibling)!==null)break;me=se,se=me.parentNode}me=le}c=P===-1||X===-1?null:{start:P,end:X}}else c=null}c=c||{start:0,end:0}}else c=null;for(Vm={focusedElem:i,selectionRange:c},sf=!1,Nn=s;Nn!==null;)if(s=Nn,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Nn=i;else for(;Nn!==null;){switch(s=Nn,v=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(c=0;c<i.length;c++)x=i[c],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&v!==null){i=void 0,c=s,x=v.memoizedProps,v=v.memoizedState,p=c.stateNode;try{var je=Is(c.type,x);i=p.getSnapshotBeforeUpdate(je,v),p.__reactInternalSnapshotBeforeUpdate=i}catch(Fe){_t(c,c.return,Fe)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,c=i.nodeType,c===9)Wm(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Wm(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=s.sibling,i!==null){i.return=s.return,Nn=i;break}Nn=s.return}}function G0(i,s,c){var p=c.flags;switch(c.tag){case 0:case 11:case 15:Wi(i,c),p&4&&Nc(5,c);break;case 1:if(Wi(i,c),p&4)if(i=c.stateNode,s===null)try{i.componentDidMount()}catch(C){_t(c,c.return,C)}else{var x=Is(c.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(x,s,i.__reactInternalSnapshotBeforeUpdate)}catch(C){_t(c,c.return,C)}}p&64&&U0(c),p&512&&Cc(c,c.return);break;case 3:if(Wi(i,c),p&64&&(i=c.updateQueue,i!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{Tv(i,s)}catch(C){_t(c,c.return,C)}}break;case 27:s===null&&p&4&&q0(c);case 26:case 5:Wi(i,c),s===null&&p&4&&F0(c),p&512&&Cc(c,c.return);break;case 12:Wi(i,c);break;case 31:Wi(i,c),p&4&&Q0(i,c);break;case 13:Wi(i,c),p&4&&W0(i,c),p&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(c=gT.bind(null,c),IT(i,c))));break;case 22:if(p=c.memoizedState!==null||Yi,!p){s=s!==null&&s.memoizedState!==null||hn,x=Yi;var v=hn;Yi=p,(hn=s)&&!v?Xi(i,c,(c.subtreeFlags&8772)!==0):Wi(i,c),Yi=x,hn=v}break;case 30:break;default:Wi(i,c)}}function V0(i){var s=i.alternate;s!==null&&(i.alternate=null,V0(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&vs(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Ft=null,tr=!1;function Qi(i,s,c){for(c=c.child;c!==null;)Y0(i,s,c),c=c.sibling}function Y0(i,s,c){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(gn,c)}catch{}switch(c.tag){case 26:hn||vi(c,s),Qi(i,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:hn||vi(c,s);var p=Ft,x=tr;qa(c.type)&&(Ft=c.stateNode,tr=!1),Qi(i,s,c),Ic(c.stateNode),Ft=p,tr=x;break;case 5:hn||vi(c,s);case 6:if(p=Ft,x=tr,Ft=null,Qi(i,s,c),Ft=p,tr=x,Ft!==null)if(tr)try{(Ft.nodeType===9?Ft.body:Ft.nodeName==="HTML"?Ft.ownerDocument.body:Ft).removeChild(c.stateNode)}catch(v){_t(c,s,v)}else try{Ft.removeChild(c.stateNode)}catch(v){_t(c,s,v)}break;case 18:Ft!==null&&(tr?(i=Ft,Uw(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),Zo(i)):Uw(Ft,c.stateNode));break;case 4:p=Ft,x=tr,Ft=c.stateNode.containerInfo,tr=!0,Qi(i,s,c),Ft=p,tr=x;break;case 0:case 11:case 14:case 15:za(2,c,s),hn||za(4,c,s),Qi(i,s,c);break;case 1:hn||(vi(c,s),p=c.stateNode,typeof p.componentWillUnmount=="function"&&$0(c,s,p)),Qi(i,s,c);break;case 21:Qi(i,s,c);break;case 22:hn=(p=hn)||c.memoizedState!==null,Qi(i,s,c),hn=p;break;default:Qi(i,s,c)}}function Q0(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Zo(i)}catch(c){_t(s,s.return,c)}}}function W0(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Zo(i)}catch(c){_t(s,s.return,c)}}function lT(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new K0),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new K0),s;default:throw Error(r(435,i.tag))}}function Bd(i,s){var c=lT(i);s.forEach(function(p){if(!c.has(p)){c.add(p);var x=yT.bind(null,i,p);p.then(x,x)}})}function nr(i,s){var c=s.deletions;if(c!==null)for(var p=0;p<c.length;p++){var x=c[p],v=i,C=s,P=C;e:for(;P!==null;){switch(P.tag){case 27:if(qa(P.type)){Ft=P.stateNode,tr=!1;break e}break;case 5:Ft=P.stateNode,tr=!1;break e;case 3:case 4:Ft=P.stateNode.containerInfo,tr=!0;break e}P=P.return}if(Ft===null)throw Error(r(160));Y0(v,C,x),Ft=null,tr=!1,v=x.alternate,v!==null&&(v.return=null),x.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)X0(s,i),s=s.sibling}var ni=null;function X0(i,s){var c=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:nr(s,i),rr(i),p&4&&(za(3,i,i.return),Nc(3,i),za(5,i,i.return));break;case 1:nr(s,i),rr(i),p&512&&(hn||c===null||vi(c,c.return)),p&64&&Yi&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?p:c.concat(p))));break;case 26:var x=ni;if(nr(s,i),rr(i),p&512&&(hn||c===null||vi(c,c.return)),p&4){var v=c!==null?c.memoizedState:null;if(p=i.memoizedState,c===null)if(p===null)if(i.stateNode===null){e:{p=i.type,c=i.memoizedProps,x=x.ownerDocument||x;t:switch(p){case"title":v=x.getElementsByTagName("title")[0],(!v||v[Ii]||v[Yt]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=x.createElement(p),x.head.insertBefore(v,x.querySelector("head > title"))),Ln(v,p,c),v[Yt]=i,Jt(v),p=v;break e;case"link":var C=Xw("link","href",x).get(p+(c.href||""));if(C){for(var P=0;P<C.length;P++)if(v=C[P],v.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&v.getAttribute("rel")===(c.rel==null?null:c.rel)&&v.getAttribute("title")===(c.title==null?null:c.title)&&v.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){C.splice(P,1);break t}}v=x.createElement(p),Ln(v,p,c),x.head.appendChild(v);break;case"meta":if(C=Xw("meta","content",x).get(p+(c.content||""))){for(P=0;P<C.length;P++)if(v=C[P],v.getAttribute("content")===(c.content==null?null:""+c.content)&&v.getAttribute("name")===(c.name==null?null:c.name)&&v.getAttribute("property")===(c.property==null?null:c.property)&&v.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&v.getAttribute("charset")===(c.charSet==null?null:c.charSet)){C.splice(P,1);break t}}v=x.createElement(p),Ln(v,p,c),x.head.appendChild(v);break;default:throw Error(r(468,p))}v[Yt]=i,Jt(v),p=v}i.stateNode=p}else Zw(x,i.type,i.stateNode);else i.stateNode=Ww(x,p,i.memoizedProps);else v!==p?(v===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):v.count--,p===null?Zw(x,i.type,i.stateNode):Ww(x,p,i.memoizedProps)):p===null&&i.stateNode!==null&&Em(i,i.memoizedProps,c.memoizedProps)}break;case 27:nr(s,i),rr(i),p&512&&(hn||c===null||vi(c,c.return)),c!==null&&p&4&&Em(i,i.memoizedProps,c.memoizedProps);break;case 5:if(nr(s,i),rr(i),p&512&&(hn||c===null||vi(c,c.return)),i.flags&32){x=i.stateNode;try{He(x,"")}catch(je){_t(i,i.return,je)}}p&4&&i.stateNode!=null&&(x=i.memoizedProps,Em(i,x,c!==null?c.memoizedProps:x)),p&1024&&(_m=!0);break;case 6:if(nr(s,i),rr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,c=i.stateNode;try{c.nodeValue=p}catch(je){_t(i,i.return,je)}}break;case 3:if(tf=null,x=ni,ni=Jd(s.containerInfo),nr(s,i),ni=x,rr(i),p&4&&c!==null&&c.memoizedState.isDehydrated)try{Zo(s.containerInfo)}catch(je){_t(i,i.return,je)}_m&&(_m=!1,Z0(i));break;case 4:p=ni,ni=Jd(i.stateNode.containerInfo),nr(s,i),rr(i),ni=p;break;case 12:nr(s,i),rr(i);break;case 31:nr(s,i),rr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Bd(i,p)));break;case 13:nr(s,i),rr(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&($d=bt()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Bd(i,p)));break;case 22:x=i.memoizedState!==null;var X=c!==null&&c.memoizedState!==null,ae=Yi,fe=hn;if(Yi=ae||x,hn=fe||X,nr(s,i),hn=fe,Yi=ae,rr(i),p&8192)e:for(s=i.stateNode,s._visibility=x?s._visibility&-2:s._visibility|1,x&&(c===null||X||Yi||hn||zs(i)),c=null,s=i;;){if(s.tag===5||s.tag===26){if(c===null){X=c=s;try{if(v=X.stateNode,x)C=v.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{P=X.stateNode;var me=X.memoizedProps.style,se=me!=null&&me.hasOwnProperty("display")?me.display:null;P.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(je){_t(X,X.return,je)}}}else if(s.tag===6){if(c===null){X=s;try{X.stateNode.nodeValue=x?"":X.memoizedProps}catch(je){_t(X,X.return,je)}}}else if(s.tag===18){if(c===null){X=s;try{var le=X.stateNode;x?$w(le,!0):$w(X.stateNode,!1)}catch(je){_t(X,X.return,je)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=i.updateQueue,p!==null&&(c=p.retryQueue,c!==null&&(p.retryQueue=null,Bd(i,c))));break;case 19:nr(s,i),rr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Bd(i,p)));break;case 30:break;case 21:break;default:nr(s,i),rr(i)}}function rr(i){var s=i.flags;if(s&2){try{for(var c,p=i.return;p!==null;){if(H0(p)){c=p;break}p=p.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var x=c.stateNode,v=km(i);Pd(i,v,x);break;case 5:var C=c.stateNode;c.flags&32&&(He(C,""),c.flags&=-33);var P=km(i);Pd(i,P,C);break;case 3:case 4:var X=c.stateNode.containerInfo,ae=km(i);Sm(i,ae,X);break;default:throw Error(r(161))}}catch(fe){_t(i,i.return,fe)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function Z0(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;Z0(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function Wi(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)G0(i,s.alternate,s),s=s.sibling}function zs(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:za(4,s,s.return),zs(s);break;case 1:vi(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&$0(s,s.return,c),zs(s);break;case 27:Ic(s.stateNode);case 26:case 5:vi(s,s.return),zs(s);break;case 22:s.memoizedState===null&&zs(s);break;case 30:zs(s);break;default:zs(s)}i=i.sibling}}function Xi(i,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,x=i,v=s,C=v.flags;switch(v.tag){case 0:case 11:case 15:Xi(x,v,c),Nc(4,v);break;case 1:if(Xi(x,v,c),p=v,x=p.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(ae){_t(p,p.return,ae)}if(p=v,x=p.updateQueue,x!==null){var P=p.stateNode;try{var X=x.shared.hiddenCallbacks;if(X!==null)for(x.shared.hiddenCallbacks=null,x=0;x<X.length;x++)Av(X[x],P)}catch(ae){_t(p,p.return,ae)}}c&&C&64&&U0(v),Cc(v,v.return);break;case 27:q0(v);case 26:case 5:Xi(x,v,c),c&&p===null&&C&4&&F0(v),Cc(v,v.return);break;case 12:Xi(x,v,c);break;case 31:Xi(x,v,c),c&&C&4&&Q0(x,v);break;case 13:Xi(x,v,c),c&&C&4&&W0(x,v);break;case 22:v.memoizedState===null&&Xi(x,v,c),Cc(v,v.return);break;case 30:break;default:Xi(x,v,c)}s=s.sibling}}function Nm(i,s){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&hc(c))}function Cm(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&hc(i))}function ri(i,s,c,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)J0(i,s,c,p),s=s.sibling}function J0(i,s,c,p){var x=s.flags;switch(s.tag){case 0:case 11:case 15:ri(i,s,c,p),x&2048&&Nc(9,s);break;case 1:ri(i,s,c,p);break;case 3:ri(i,s,c,p),x&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&hc(i)));break;case 12:if(x&2048){ri(i,s,c,p),i=s.stateNode;try{var v=s.memoizedProps,C=v.id,P=v.onPostCommit;typeof P=="function"&&P(C,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(X){_t(s,s.return,X)}}else ri(i,s,c,p);break;case 31:ri(i,s,c,p);break;case 13:ri(i,s,c,p);break;case 23:break;case 22:v=s.stateNode,C=s.alternate,s.memoizedState!==null?v._visibility&2?ri(i,s,c,p):jc(i,s):v._visibility&2?ri(i,s,c,p):(v._visibility|=2,$o(i,s,c,p,(s.subtreeFlags&10256)!==0||!1)),x&2048&&Nm(C,s);break;case 24:ri(i,s,c,p),x&2048&&Cm(s.alternate,s);break;default:ri(i,s,c,p)}}function $o(i,s,c,p,x){for(x=x&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var v=i,C=s,P=c,X=p,ae=C.flags;switch(C.tag){case 0:case 11:case 15:$o(v,C,P,X,x),Nc(8,C);break;case 23:break;case 22:var fe=C.stateNode;C.memoizedState!==null?fe._visibility&2?$o(v,C,P,X,x):jc(v,C):(fe._visibility|=2,$o(v,C,P,X,x)),x&&ae&2048&&Nm(C.alternate,C);break;case 24:$o(v,C,P,X,x),x&&ae&2048&&Cm(C.alternate,C);break;default:$o(v,C,P,X,x)}s=s.sibling}}function jc(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=i,p=s,x=p.flags;switch(p.tag){case 22:jc(c,p),x&2048&&Nm(p.alternate,p);break;case 24:jc(c,p),x&2048&&Cm(p.alternate,p);break;default:jc(c,p)}s=s.sibling}}var Ac=8192;function Fo(i,s,c){if(i.subtreeFlags&Ac)for(i=i.child;i!==null;)ew(i,s,c),i=i.sibling}function ew(i,s,c){switch(i.tag){case 26:Fo(i,s,c),i.flags&Ac&&i.memoizedState!==null&&YT(c,ni,i.memoizedState,i.memoizedProps);break;case 5:Fo(i,s,c);break;case 3:case 4:var p=ni;ni=Jd(i.stateNode.containerInfo),Fo(i,s,c),ni=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=Ac,Ac=16777216,Fo(i,s,c),Ac=p):Fo(i,s,c));break;default:Fo(i,s,c)}}function tw(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function Tc(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var p=s[c];Nn=p,rw(p,i)}tw(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)nw(i),i=i.sibling}function nw(i){switch(i.tag){case 0:case 11:case 15:Tc(i),i.flags&2048&&za(9,i,i.return);break;case 3:Tc(i);break;case 12:Tc(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,Ud(i)):Tc(i);break;default:Tc(i)}}function Ud(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var p=s[c];Nn=p,rw(p,i)}tw(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:za(8,s,s.return),Ud(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,Ud(s));break;default:Ud(s)}i=i.sibling}}function rw(i,s){for(;Nn!==null;){var c=Nn;switch(c.tag){case 0:case 11:case 15:za(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var p=c.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:hc(c.memoizedState.cache)}if(p=c.child,p!==null)p.return=c,Nn=p;else e:for(c=i;Nn!==null;){p=Nn;var x=p.sibling,v=p.return;if(V0(p),p===c){Nn=null;break e}if(x!==null){x.return=v,Nn=x;break e}Nn=v}}}var cT={getCacheForType:function(i){var s=Dn(un),c=s.data.get(i);return c===void 0&&(c=i(),s.data.set(i,c)),c},cacheSignal:function(){return Dn(un).controller.signal}},uT=typeof WeakMap=="function"?WeakMap:Map,vt=0,Dt=null,nt=null,ot=0,St=0,yr=null,Pa=!1,Ho=!1,jm=!1,Zi=0,tn=0,Ba=0,Ps=0,Am=0,br=0,qo=0,Mc=null,ir=null,Tm=!1,$d=0,iw=0,Fd=1/0,Hd=null,Ua=null,bn=0,$a=null,Ko=null,Ji=0,Mm=0,Om=null,aw=null,Oc=0,Dm=null;function xr(){return(vt&2)!==0&&ot!==0?ot&-ot:z.T!==null?Bm():ba()}function sw(){if(br===0)if((ot&536870912)===0||ct){var i=ya;ya<<=1,(ya&3932160)===0&&(ya=262144),br=i}else br=536870912;return i=mr.current,i!==null&&(i.flags|=32),br}function ar(i,s,c){(i===Dt&&(St===2||St===9)||i.cancelPendingCommit!==null)&&(Go(i,0),Fa(i,ot,br,!1)),Et(i,c),((vt&2)===0||i!==Dt)&&(i===Dt&&((vt&2)===0&&(Ps|=c),tn===4&&Fa(i,ot,br,!1)),wi(i))}function ow(i,s,c){if((vt&6)!==0)throw Error(r(327));var p=!c&&(s&127)===0&&(s&i.expiredLanes)===0||he(i,s),x=p?hT(i,s):Lm(i,s,!0),v=p;do{if(x===0){Ho&&!p&&Fa(i,s,0,!1);break}else{if(c=i.current.alternate,v&&!dT(c)){x=Lm(i,s,!1),v=!1;continue}if(x===2){if(v=s,i.errorRecoveryDisabledLanes&v)var C=0;else C=i.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){s=C;e:{var P=i;x=Mc;var X=P.current.memoizedState.isDehydrated;if(X&&(Go(P,C).flags|=256),C=Lm(P,C,!1),C!==2){if(jm&&!X){P.errorRecoveryDisabledLanes|=v,Ps|=v,x=4;break e}v=ir,ir=x,v!==null&&(ir===null?ir=v:ir.push.apply(ir,v))}x=C}if(v=!1,x!==2)continue}}if(x===1){Go(i,0),Fa(i,s,0,!0);break}e:{switch(p=i,v=x,v){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Fa(p,s,br,!Pa);break e;case 2:ir=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(x=$d+300-bt(),10<x)){if(Fa(p,s,br,!Pa),J(p,0,!0)!==0)break e;Ji=s,p.timeoutHandle=Pw(lw.bind(null,p,c,ir,Hd,Tm,s,br,Ps,qo,Pa,v,"Throttled",-0,0),x);break e}lw(p,c,ir,Hd,Tm,s,br,Ps,qo,Pa,v,null,-0,0)}}break}while(!0);wi(i)}function lw(i,s,c,p,x,v,C,P,X,ae,fe,me,se,le){if(i.timeoutHandle=-1,me=s.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ee},ew(s,v,me);var je=(v&62914560)===v?$d-bt():(v&4194048)===v?iw-bt():0;if(je=QT(me,je),je!==null){Ji=v,i.cancelPendingCommit=je(gw.bind(null,i,s,v,c,p,x,C,P,X,fe,me,null,se,le)),Fa(i,v,C,!ae);return}}gw(i,s,v,c,p,x,C,P,X)}function dT(i){for(var s=i;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var p=0;p<c.length;p++){var x=c[p],v=x.getSnapshot;x=x.value;try{if(!hr(v(),x))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Fa(i,s,c,p){s&=~Am,s&=~Ps,i.suspendedLanes|=s,i.pingedLanes&=~s,p&&(i.warmLanes|=s),p=i.expirationTimes;for(var x=s;0<x;){var v=31-xt(x),C=1<<v;p[v]=-1,x&=~C}c!==0&&Ne(i,c,s)}function qd(){return(vt&6)===0?(Dc(0),!1):!0}function Rm(){if(nt!==null){if(St===0)var i=nt.return;else i=nt,Fi=As=null,Wp(i),Io=null,mc=0,i=nt;for(;i!==null;)B0(i.alternate,i),i=i.return;nt=null}}function Go(i,s){var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,MT(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),Ji=0,Rm(),Dt=i,nt=c=Ui(i.current,null),ot=s,St=0,yr=null,Pa=!1,Ho=he(i,s),jm=!1,qo=br=Am=Ps=Ba=tn=0,ir=Mc=null,Tm=!1,(s&8)!==0&&(s|=s&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=s;0<p;){var x=31-xt(p),v=1<<x;s|=i[x],p&=~v}return Zi=s,dd(),c}function cw(i,s){Ye=null,z.H=kc,s===Lo||s===xd?(s=_v(),St=3):s===Pp?(s=_v(),St=4):St=s===fm?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,yr=s,nt===null&&(tn=1,Dd(i,Or(s,i.current)))}function uw(){var i=mr.current;return i===null?!0:(ot&4194048)===ot?Ir===null:(ot&62914560)===ot||(ot&536870912)!==0?i===Ir:!1}function dw(){var i=z.H;return z.H=kc,i===null?kc:i}function fw(){var i=z.A;return z.A=cT,i}function Kd(){tn=4,Pa||(ot&4194048)!==ot&&mr.current!==null||(Ho=!0),(Ba&134217727)===0&&(Ps&134217727)===0||Dt===null||Fa(Dt,ot,br,!1)}function Lm(i,s,c){var p=vt;vt|=2;var x=dw(),v=fw();(Dt!==i||ot!==s)&&(Hd=null,Go(i,s)),s=!1;var C=tn;e:do try{if(St!==0&&nt!==null){var P=nt,X=yr;switch(St){case 8:Rm(),C=6;break e;case 3:case 2:case 9:case 6:mr.current===null&&(s=!0);var ae=St;if(St=0,yr=null,Vo(i,P,X,ae),c&&Ho){C=0;break e}break;default:ae=St,St=0,yr=null,Vo(i,P,X,ae)}}fT(),C=tn;break}catch(fe){cw(i,fe)}while(!0);return s&&i.shellSuspendCounter++,Fi=As=null,vt=p,z.H=x,z.A=v,nt===null&&(Dt=null,ot=0,dd()),C}function fT(){for(;nt!==null;)hw(nt)}function hT(i,s){var c=vt;vt|=2;var p=dw(),x=fw();Dt!==i||ot!==s?(Hd=null,Fd=bt()+500,Go(i,s)):Ho=he(i,s);e:do try{if(St!==0&&nt!==null){s=nt;var v=yr;t:switch(St){case 1:St=0,yr=null,Vo(i,s,v,1);break;case 2:case 9:if(kv(v)){St=0,yr=null,pw(s);break}s=function(){St!==2&&St!==9||Dt!==i||(St=7),wi(i)},v.then(s,s);break e;case 3:St=7;break e;case 4:St=5;break e;case 7:kv(v)?(St=0,yr=null,pw(s)):(St=0,yr=null,Vo(i,s,v,7));break;case 5:var C=null;switch(nt.tag){case 26:C=nt.memoizedState;case 5:case 27:var P=nt;if(C?Jw(C):P.stateNode.complete){St=0,yr=null;var X=P.sibling;if(X!==null)nt=X;else{var ae=P.return;ae!==null?(nt=ae,Gd(ae)):nt=null}break t}}St=0,yr=null,Vo(i,s,v,5);break;case 6:St=0,yr=null,Vo(i,s,v,6);break;case 8:Rm(),tn=6;break e;default:throw Error(r(462))}}pT();break}catch(fe){cw(i,fe)}while(!0);return Fi=As=null,z.H=p,z.A=x,vt=c,nt!==null?0:(Dt=null,ot=0,dd(),tn)}function pT(){for(;nt!==null&&!Yr();)hw(nt)}function hw(i){var s=z0(i.alternate,i,Zi);i.memoizedProps=i.pendingProps,s===null?Gd(i):nt=s}function pw(i){var s=i,c=s.alternate;switch(s.tag){case 15:case 0:s=M0(c,s,s.pendingProps,s.type,void 0,ot);break;case 11:s=M0(c,s,s.pendingProps,s.type.render,s.ref,ot);break;case 5:Wp(s);default:B0(c,s),s=nt=fv(s,Zi),s=z0(c,s,Zi)}i.memoizedProps=i.pendingProps,s===null?Gd(i):nt=s}function Vo(i,s,c,p){Fi=As=null,Wp(s),Io=null,mc=0;var x=s.return;try{if(nT(i,x,s,c,ot)){tn=1,Dd(i,Or(c,i.current)),nt=null;return}}catch(v){if(x!==null)throw nt=x,v;tn=1,Dd(i,Or(c,i.current)),nt=null;return}s.flags&32768?(ct||p===1?i=!0:Ho||(ot&536870912)!==0?i=!1:(Pa=i=!0,(p===2||p===9||p===3||p===6)&&(p=mr.current,p!==null&&p.tag===13&&(p.flags|=16384))),mw(s,i)):Gd(s)}function Gd(i){var s=i;do{if((s.flags&32768)!==0){mw(s,Pa);return}i=s.return;var c=aT(s.alternate,s,Zi);if(c!==null){nt=c;return}if(s=s.sibling,s!==null){nt=s;return}nt=s=i}while(s!==null);tn===0&&(tn=5)}function mw(i,s){do{var c=sT(i.alternate,i);if(c!==null){c.flags&=32767,nt=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(i=i.sibling,i!==null)){nt=i;return}nt=i=c}while(i!==null);tn=6,nt=null}function gw(i,s,c,p,x,v,C,P,X){i.cancelPendingCommit=null;do Vd();while(bn!==0);if((vt&6)!==0)throw Error(r(327));if(s!==null){if(s===i.current)throw Error(r(177));if(v=s.lanes|s.childLanes,v|=kp,Ae(i,c,v,C,P,X),i===Dt&&(nt=Dt=null,ot=0),Ko=s,$a=i,Ji=c,Mm=v,Om=x,aw=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,bT(Re,function(){return ww(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=z.T,z.T=null,x=Y.p,Y.p=2,C=vt,vt|=4;try{oT(i,s,c)}finally{vt=C,Y.p=x,z.T=p}}bn=1,yw(),bw(),xw()}}function yw(){if(bn===1){bn=0;var i=$a,s=Ko,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=z.T,z.T=null;var p=Y.p;Y.p=2;var x=vt;vt|=4;try{X0(s,i);var v=Vm,C=rv(i.containerInfo),P=v.focusedElem,X=v.selectionRange;if(C!==P&&P&&P.ownerDocument&&nv(P.ownerDocument.documentElement,P)){if(X!==null&&bp(P)){var ae=X.start,fe=X.end;if(fe===void 0&&(fe=ae),"selectionStart"in P)P.selectionStart=ae,P.selectionEnd=Math.min(fe,P.value.length);else{var me=P.ownerDocument||document,se=me&&me.defaultView||window;if(se.getSelection){var le=se.getSelection(),je=P.textContent.length,Fe=Math.min(X.start,je),At=X.end===void 0?Fe:Math.min(X.end,je);!le.extend&&Fe>At&&(C=At,At=Fe,Fe=C);var re=tv(P,Fe),ee=tv(P,At);if(re&&ee&&(le.rangeCount!==1||le.anchorNode!==re.node||le.anchorOffset!==re.offset||le.focusNode!==ee.node||le.focusOffset!==ee.offset)){var ie=me.createRange();ie.setStart(re.node,re.offset),le.removeAllRanges(),Fe>At?(le.addRange(ie),le.extend(ee.node,ee.offset)):(ie.setEnd(ee.node,ee.offset),le.addRange(ie))}}}}for(me=[],le=P;le=le.parentNode;)le.nodeType===1&&me.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<me.length;P++){var pe=me[P];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}sf=!!Gm,Vm=Gm=null}finally{vt=x,Y.p=p,z.T=c}}i.current=s,bn=2}}function bw(){if(bn===2){bn=0;var i=$a,s=Ko,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=z.T,z.T=null;var p=Y.p;Y.p=2;var x=vt;vt|=4;try{G0(i,s.alternate,s)}finally{vt=x,Y.p=p,z.T=c}}bn=3}}function xw(){if(bn===4||bn===3){bn=0,Jn();var i=$a,s=Ko,c=Ji,p=aw;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?bn=5:(bn=0,Ko=$a=null,vw(i,i.pendingLanes));var x=i.pendingLanes;if(x===0&&(Ua=null),Qr(c),s=s.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(gn,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=z.T,x=Y.p,Y.p=2,z.T=null;try{for(var v=i.onRecoverableError,C=0;C<p.length;C++){var P=p[C];v(P.value,{componentStack:P.stack})}}finally{z.T=s,Y.p=x}}(Ji&3)!==0&&Vd(),wi(i),x=i.pendingLanes,(c&261930)!==0&&(x&42)!==0?i===Dm?Oc++:(Oc=0,Dm=i):Oc=0,Dc(0)}}function vw(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,hc(s)))}function Vd(){return yw(),bw(),xw(),ww()}function ww(){if(bn!==5)return!1;var i=$a,s=Mm;Mm=0;var c=Qr(Ji),p=z.T,x=Y.p;try{Y.p=32>c?32:c,z.T=null,c=Om,Om=null;var v=$a,C=Ji;if(bn=0,Ko=$a=null,Ji=0,(vt&6)!==0)throw Error(r(331));var P=vt;if(vt|=4,nw(v.current),J0(v,v.current,C,c),vt=P,Dc(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(gn,v)}catch{}return!0}finally{Y.p=x,z.T=p,vw(i,s)}}function Ew(i,s,c){s=Or(c,s),s=dm(i.stateNode,s,2),i=Ra(i,s,2),i!==null&&(Et(i,2),wi(i))}function _t(i,s,c){if(i.tag===3)Ew(i,i,c);else for(;s!==null;){if(s.tag===3){Ew(s,i,c);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Ua===null||!Ua.has(p))){i=Or(c,i),c=k0(2),p=Ra(s,c,2),p!==null&&(S0(c,p,s,i),Et(p,2),wi(p));break}}s=s.return}}function Im(i,s,c){var p=i.pingCache;if(p===null){p=i.pingCache=new uT;var x=new Set;p.set(s,x)}else x=p.get(s),x===void 0&&(x=new Set,p.set(s,x));x.has(c)||(jm=!0,x.add(c),i=mT.bind(null,i,s,c),s.then(i,i))}function mT(i,s,c){var p=i.pingCache;p!==null&&p.delete(s),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,Dt===i&&(ot&c)===c&&(tn===4||tn===3&&(ot&62914560)===ot&&300>bt()-$d?(vt&2)===0&&Go(i,0):Am|=c,qo===ot&&(qo=0)),wi(i)}function kw(i,s){s===0&&(s=qe()),i=Ns(i,s),i!==null&&(Et(i,s),wi(i))}function gT(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),kw(i,c)}function yT(i,s){var c=0;switch(i.tag){case 31:case 13:var p=i.stateNode,x=i.memoizedState;x!==null&&(c=x.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(s),kw(i,c)}function bT(i,s){return ln(i,s)}var Yd=null,Yo=null,zm=!1,Qd=!1,Pm=!1,Ha=0;function wi(i){i!==Yo&&i.next===null&&(Yo===null?Yd=Yo=i:Yo=Yo.next=i),Qd=!0,zm||(zm=!0,vT())}function Dc(i,s){if(!Pm&&Qd){Pm=!0;do for(var c=!1,p=Yd;p!==null;){if(i!==0){var x=p.pendingLanes;if(x===0)var v=0;else{var C=p.suspendedLanes,P=p.pingedLanes;v=(1<<31-xt(42|i)+1)-1,v&=x&~(C&~P),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(c=!0,Cw(p,v))}else v=ot,v=J(p,p===Dt?v:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(v&3)===0||he(p,v)||(c=!0,Cw(p,v));p=p.next}while(c);Pm=!1}}function xT(){Sw()}function Sw(){Qd=zm=!1;var i=0;Ha!==0&&TT()&&(i=Ha);for(var s=bt(),c=null,p=Yd;p!==null;){var x=p.next,v=_w(p,s);v===0?(p.next=null,c===null?Yd=x:c.next=x,x===null&&(Yo=c)):(c=p,(i!==0||(v&3)!==0)&&(Qd=!0)),p=x}bn!==0&&bn!==5||Dc(i),Ha!==0&&(Ha=0)}function _w(i,s){for(var c=i.suspendedLanes,p=i.pingedLanes,x=i.expirationTimes,v=i.pendingLanes&-62914561;0<v;){var C=31-xt(v),P=1<<C,X=x[C];X===-1?((P&c)===0||(P&p)!==0)&&(x[C]=Se(P,s)):X<=s&&(i.expiredLanes|=P),v&=~P}if(s=Dt,c=ot,c=J(i,i===s?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,c===0||i===s&&(St===2||St===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&jn(p),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||he(i,c)){if(s=c&-c,s===i.callbackPriority)return s;switch(p!==null&&jn(p),Qr(c)){case 2:case 8:c=ye;break;case 32:c=Re;break;case 268435456:c=at;break;default:c=Re}return p=Nw.bind(null,i),c=ln(c,p),i.callbackPriority=s,i.callbackNode=c,s}return p!==null&&p!==null&&jn(p),i.callbackPriority=2,i.callbackNode=null,2}function Nw(i,s){if(bn!==0&&bn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(Vd()&&i.callbackNode!==c)return null;var p=ot;return p=J(i,i===Dt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(ow(i,p,s),_w(i,bt()),i.callbackNode!=null&&i.callbackNode===c?Nw.bind(null,i):null)}function Cw(i,s){if(Vd())return null;ow(i,s,!0)}function vT(){OT(function(){(vt&6)!==0?ln(ce,xT):Sw()})}function Bm(){if(Ha===0){var i=Do;i===0&&(i=Ri,Ri<<=1,(Ri&261888)===0&&(Ri=256)),Ha=i}return Ha}function jw(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Na(""+i)}function Aw(i,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,i.id&&c.setAttribute("form",i.id),s.parentNode.insertBefore(c,s),i=new FormData(i),c.parentNode.removeChild(c),i}function wT(i,s,c,p,x){if(s==="submit"&&c&&c.stateNode===x){var v=jw((x[Sn]||null).action),C=p.submitter;C&&(s=(s=C[Sn]||null)?jw(s.formAction):C.getAttribute("formAction"),s!==null&&(v=s,C=null));var P=new od("action","action",null,p,x);i.push({event:P,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(Ha!==0){var X=C?Aw(x,C):new FormData(x);am(c,{pending:!0,data:X,method:x.method,action:v},null,X)}}else typeof v=="function"&&(P.preventDefault(),X=C?Aw(x,C):new FormData(x),am(c,{pending:!0,data:X,method:x.method,action:v},v,X))},currentTarget:x}]})}}for(var Um=0;Um<Ep.length;Um++){var $m=Ep[Um],ET=$m.toLowerCase(),kT=$m[0].toUpperCase()+$m.slice(1);ti(ET,"on"+kT)}ti(sv,"onAnimationEnd"),ti(ov,"onAnimationIteration"),ti(lv,"onAnimationStart"),ti("dblclick","onDoubleClick"),ti("focusin","onFocus"),ti("focusout","onBlur"),ti(BA,"onTransitionRun"),ti(UA,"onTransitionStart"),ti($A,"onTransitionCancel"),ti(cv,"onTransitionEnd"),be("onMouseEnter",["mouseout","mouseover"]),be("onMouseLeave",["mouseout","mouseover"]),be("onPointerEnter",["pointerout","pointerover"]),be("onPointerLeave",["pointerout","pointerover"]),Jr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rc="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(" "),ST=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rc));function Tw(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var p=i[c],x=p.event;p=p.listeners;e:{var v=void 0;if(s)for(var C=p.length-1;0<=C;C--){var P=p[C],X=P.instance,ae=P.currentTarget;if(P=P.listener,X!==v&&x.isPropagationStopped())break e;v=P,x.currentTarget=ae;try{v(x)}catch(fe){ud(fe)}x.currentTarget=null,v=X}else for(C=0;C<p.length;C++){if(P=p[C],X=P.instance,ae=P.currentTarget,P=P.listener,X!==v&&x.isPropagationStopped())break e;v=P,x.currentTarget=ae;try{v(x)}catch(fe){ud(fe)}x.currentTarget=null,v=X}}}}function rt(i,s){var c=s[va];c===void 0&&(c=s[va]=new Set);var p=i+"__bubble";c.has(p)||(Mw(s,i,2,!1),c.add(p))}function Fm(i,s,c){var p=0;s&&(p|=4),Mw(c,i,p,s)}var Wd="_reactListening"+Math.random().toString(36).slice(2);function Hm(i){if(!i[Wd]){i[Wd]=!0,vo.forEach(function(c){c!=="selectionchange"&&(ST.has(c)||Fm(c,!1,i),Fm(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Wd]||(s[Wd]=!0,Fm("selectionchange",!1,s))}}function Mw(i,s,c,p){switch(s1(s)){case 2:var x=ZT;break;case 8:x=JT;break;default:x=ig}c=x.bind(null,s,c,i),x=void 0,!cp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),p?x!==void 0?i.addEventListener(s,c,{capture:!0,passive:x}):i.addEventListener(s,c,!0):x!==void 0?i.addEventListener(s,c,{passive:x}):i.addEventListener(s,c,!1)}function qm(i,s,c,p,x){var v=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var C=p.tag;if(C===3||C===4){var P=p.stateNode.containerInfo;if(P===x)break;if(C===4)for(C=p.return;C!==null;){var X=C.tag;if((X===3||X===4)&&C.stateNode.containerInfo===x)return;C=C.return}for(;P!==null;){if(C=Mn(P),C===null)return;if(X=C.tag,X===5||X===6||X===26||X===27){p=v=C;continue e}P=P.parentNode}}p=p.return}rd(function(){var ae=v,fe=Ve(c),me=[];e:{var se=uv.get(i);if(se!==void 0){var le=od,je=i;switch(i){case"keypress":if(ad(c)===0)break e;case"keydown":case"keyup":le=yA;break;case"focusin":je="focus",le=hp;break;case"focusout":je="blur",le=hp;break;case"beforeblur":case"afterblur":le=hp;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=Bx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=aA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=vA;break;case sv:case ov:case lv:le=lA;break;case cv:le=EA;break;case"scroll":case"scrollend":le=rA;break;case"wheel":le=SA;break;case"copy":case"cut":case"paste":le=uA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=$x;break;case"toggle":case"beforetoggle":le=NA}var Fe=(s&4)!==0,At=!Fe&&(i==="scroll"||i==="scrollend"),re=Fe?se!==null?se+"Capture":null:se;Fe=[];for(var ee=ae,ie;ee!==null;){var pe=ee;if(ie=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ie===null||re===null||(pe=nc(ee,re),pe!=null&&Fe.push(Lc(ee,pe,ie))),At)break;ee=ee.return}0<Fe.length&&(se=new le(se,je,null,c,fe),me.push({event:se,listeners:Fe}))}}if((s&7)===0){e:{if(se=i==="mouseover"||i==="pointerover",le=i==="mouseout"||i==="pointerout",se&&c!==Te&&(je=c.relatedTarget||c.fromElement)&&(Mn(je)||je[Wr]))break e;if((le||se)&&(se=fe.window===fe?fe:(se=fe.ownerDocument)?se.defaultView||se.parentWindow:window,le?(je=c.relatedTarget||c.toElement,le=ae,je=je?Mn(je):null,je!==null&&(At=o(je),Fe=je.tag,je!==At||Fe!==5&&Fe!==27&&Fe!==6)&&(je=null)):(le=null,je=ae),le!==je)){if(Fe=Bx,pe="onMouseLeave",re="onMouseEnter",ee="mouse",(i==="pointerout"||i==="pointerover")&&(Fe=$x,pe="onPointerLeave",re="onPointerEnter",ee="pointer"),At=le==null?se:Zr(le),ie=je==null?se:Zr(je),se=new Fe(pe,ee+"leave",le,c,fe),se.target=At,se.relatedTarget=ie,pe=null,Mn(fe)===ae&&(Fe=new Fe(re,ee+"enter",je,c,fe),Fe.target=ie,Fe.relatedTarget=At,pe=Fe),At=pe,le&&je)t:{for(Fe=_T,re=le,ee=je,ie=0,pe=re;pe;pe=Fe(pe))ie++;pe=0;for(var Pe=ee;Pe;Pe=Fe(Pe))pe++;for(;0<ie-pe;)re=Fe(re),ie--;for(;0<pe-ie;)ee=Fe(ee),pe--;for(;ie--;){if(re===ee||ee!==null&&re===ee.alternate){Fe=re;break t}re=Fe(re),ee=Fe(ee)}Fe=null}else Fe=null;le!==null&&Ow(me,se,le,Fe,!1),je!==null&&At!==null&&Ow(me,At,je,Fe,!0)}}e:{if(se=ae?Zr(ae):window,le=se.nodeName&&se.nodeName.toLowerCase(),le==="select"||le==="input"&&se.type==="file")var gt=Qx;else if(Vx(se))if(Wx)gt=IA;else{gt=RA;var Me=DA}else le=se.nodeName,!le||le.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?ae&&_a(ae.elementType)&&(gt=Qx):gt=LA;if(gt&&(gt=gt(i,ae))){Yx(me,gt,c,fe);break e}Me&&Me(i,se,ae),i==="focusout"&&ae&&se.type==="number"&&ae.memoizedProps.value!=null&&Sa(se,"number",se.value)}switch(Me=ae?Zr(ae):window,i){case"focusin":(Vx(Me)||Me.contentEditable==="true")&&(_o=Me,xp=ae,uc=null);break;case"focusout":uc=xp=_o=null;break;case"mousedown":vp=!0;break;case"contextmenu":case"mouseup":case"dragend":vp=!1,iv(me,c,fe);break;case"selectionchange":if(PA)break;case"keydown":case"keyup":iv(me,c,fe)}var Xe;if(mp)e:{switch(i){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else So?Kx(i,c)&&(lt="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(lt="onCompositionStart");lt&&(Fx&&c.locale!=="ko"&&(So||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&So&&(Xe=zx()):(Ca=fe,up="value"in Ca?Ca.value:Ca.textContent,So=!0)),Me=Xd(ae,lt),0<Me.length&&(lt=new Ux(lt,i,null,c,fe),me.push({event:lt,listeners:Me}),Xe?lt.data=Xe:(Xe=Gx(c),Xe!==null&&(lt.data=Xe)))),(Xe=jA?AA(i,c):TA(i,c))&&(lt=Xd(ae,"onBeforeInput"),0<lt.length&&(Me=new Ux("onBeforeInput","beforeinput",null,c,fe),me.push({event:Me,listeners:lt}),Me.data=Xe)),wT(me,i,ae,c,fe)}Tw(me,s)})}function Lc(i,s,c){return{instance:i,listener:s,currentTarget:c}}function Xd(i,s){for(var c=s+"Capture",p=[];i!==null;){var x=i,v=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||v===null||(x=nc(i,c),x!=null&&p.unshift(Lc(i,x,v)),x=nc(i,s),x!=null&&p.push(Lc(i,x,v))),i.tag===3)return p;i=i.return}return[]}function _T(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Ow(i,s,c,p,x){for(var v=s._reactName,C=[];c!==null&&c!==p;){var P=c,X=P.alternate,ae=P.stateNode;if(P=P.tag,X!==null&&X===p)break;P!==5&&P!==26&&P!==27||ae===null||(X=ae,x?(ae=nc(c,v),ae!=null&&C.unshift(Lc(c,ae,X))):x||(ae=nc(c,v),ae!=null&&C.push(Lc(c,ae,X)))),c=c.return}C.length!==0&&i.push({event:s,listeners:C})}var NT=/\r\n?/g,CT=/\u0000|\uFFFD/g;function Dw(i){return(typeof i=="string"?i:""+i).replace(NT,`
|
|
49
|
+
`).replace(CT,"")}function Rw(i,s){return s=Dw(s),Dw(i)===s}function jt(i,s,c,p,x,v){switch(c){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||He(i,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&He(i,""+p);break;case"className":qn(i,"class",p);break;case"tabIndex":qn(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":qn(i,c,p);break;case"style":kt(i,p,v);break;case"data":if(s!=="object"){qn(i,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||c!=="href")){i.removeAttribute(c);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(c);break}p=Na(""+p),i.setAttribute(c,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(c==="formAction"?(s!=="input"&&jt(i,s,"name",x.name,x,null),jt(i,s,"formEncType",x.formEncType,x,null),jt(i,s,"formMethod",x.formMethod,x,null),jt(i,s,"formTarget",x.formTarget,x,null)):(jt(i,s,"encType",x.encType,x,null),jt(i,s,"method",x.method,x,null),jt(i,s,"target",x.target,x,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(c);break}p=Na(""+p),i.setAttribute(c,p);break;case"onClick":p!=null&&(i.onclick=Ee);break;case"onScroll":p!=null&&rt("scroll",i);break;case"onScrollEnd":p!=null&&rt("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(c=p.__html,c!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}c=Na(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(c,""+p):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":p===!0?i.setAttribute(c,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(c,p):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(c,p):i.removeAttribute(c);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(c):i.setAttribute(c,p);break;case"popover":rt("beforetoggle",i),rt("toggle",i),_n(i,"popover",p);break;case"xlinkActuate":zn(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":zn(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":zn(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":zn(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":zn(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":zn(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":zn(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":zn(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":zn(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":_n(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=Pi.get(c)||c,_n(i,c,p))}}function Km(i,s,c,p,x,v){switch(c){case"style":kt(i,p,v);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(c=p.__html,c!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof p=="string"?He(i,p):(typeof p=="number"||typeof p=="bigint")&&He(i,""+p);break;case"onScroll":p!=null&&rt("scroll",i);break;case"onScrollEnd":p!=null&&rt("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Ee);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zi.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(x=c.endsWith("Capture"),s=c.slice(2,x?c.length-7:void 0),v=i[Sn]||null,v=v!=null?v[c]:null,typeof v=="function"&&i.removeEventListener(s,v,x),typeof p=="function")){typeof v!="function"&&v!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(s,p,x);break e}c in i?i[c]=p:p===!0?i.setAttribute(c,""):_n(i,c,p)}}}function Ln(i,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",i),rt("load",i);var p=!1,x=!1,v;for(v in c)if(c.hasOwnProperty(v)){var C=c[v];if(C!=null)switch(v){case"src":p=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:jt(i,s,v,C,c,null)}}x&&jt(i,s,"srcSet",c.srcSet,c,null),p&&jt(i,s,"src",c.src,c,null);return;case"input":rt("invalid",i);var P=v=C=x=null,X=null,ae=null;for(p in c)if(c.hasOwnProperty(p)){var fe=c[p];if(fe!=null)switch(p){case"name":x=fe;break;case"type":C=fe;break;case"checked":X=fe;break;case"defaultChecked":ae=fe;break;case"value":v=fe;break;case"defaultValue":P=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,s));break;default:jt(i,s,p,fe,c,null)}}ei(i,v,P,X,ae,C,x,!1);return;case"select":rt("invalid",i),p=C=v=null;for(x in c)if(c.hasOwnProperty(x)&&(P=c[x],P!=null))switch(x){case"value":v=P;break;case"defaultValue":C=P;break;case"multiple":p=P;default:jt(i,s,x,P,c,null)}s=v,c=C,i.multiple=!!p,s!=null?yn(i,!!p,s,!1):c!=null&&yn(i,!!p,c,!0);return;case"textarea":rt("invalid",i),v=x=p=null;for(C in c)if(c.hasOwnProperty(C)&&(P=c[C],P!=null))switch(C){case"value":p=P;break;case"defaultValue":x=P;break;case"children":v=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:jt(i,s,C,P,c,null)}ko(i,p,x,v);return;case"option":for(X in c)if(c.hasOwnProperty(X)&&(p=c[X],p!=null))switch(X){case"selected":i.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:jt(i,s,X,p,c,null)}return;case"dialog":rt("beforetoggle",i),rt("toggle",i),rt("cancel",i),rt("close",i);break;case"iframe":case"object":rt("load",i);break;case"video":case"audio":for(p=0;p<Rc.length;p++)rt(Rc[p],i);break;case"image":rt("error",i),rt("load",i);break;case"details":rt("toggle",i);break;case"embed":case"source":case"link":rt("error",i),rt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in c)if(c.hasOwnProperty(ae)&&(p=c[ae],p!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:jt(i,s,ae,p,c,null)}return;default:if(_a(s)){for(fe in c)c.hasOwnProperty(fe)&&(p=c[fe],p!==void 0&&Km(i,s,fe,p,c,void 0));return}}for(P in c)c.hasOwnProperty(P)&&(p=c[P],p!=null&&jt(i,s,P,p,c,null))}function jT(i,s,c,p){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,v=null,C=null,P=null,X=null,ae=null,fe=null;for(le in c){var me=c[le];if(c.hasOwnProperty(le)&&me!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":X=me;default:p.hasOwnProperty(le)||jt(i,s,le,null,p,me)}}for(var se in p){var le=p[se];if(me=c[se],p.hasOwnProperty(se)&&(le!=null||me!=null))switch(se){case"type":v=le;break;case"name":x=le;break;case"checked":ae=le;break;case"defaultChecked":fe=le;break;case"value":C=le;break;case"defaultValue":P=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,s));break;default:le!==me&&jt(i,s,se,le,p,me)}}ws(i,C,P,X,ae,fe,v,x);return;case"select":le=C=P=se=null;for(v in c)if(X=c[v],c.hasOwnProperty(v)&&X!=null)switch(v){case"value":break;case"multiple":le=X;default:p.hasOwnProperty(v)||jt(i,s,v,null,p,X)}for(x in p)if(v=p[x],X=c[x],p.hasOwnProperty(x)&&(v!=null||X!=null))switch(x){case"value":se=v;break;case"defaultValue":P=v;break;case"multiple":C=v;default:v!==X&&jt(i,s,x,v,p,X)}s=P,c=C,p=le,se!=null?yn(i,!!c,se,!1):!!p!=!!c&&(s!=null?yn(i,!!c,s,!0):yn(i,!!c,c?[]:"",!1));return;case"textarea":le=se=null;for(P in c)if(x=c[P],c.hasOwnProperty(P)&&x!=null&&!p.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:jt(i,s,P,null,p,x)}for(C in p)if(x=p[C],v=c[C],p.hasOwnProperty(C)&&(x!=null||v!=null))switch(C){case"value":se=x;break;case"defaultValue":le=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==v&&jt(i,s,C,x,p,v)}Es(i,se,le);return;case"option":for(var je in c)if(se=c[je],c.hasOwnProperty(je)&&se!=null&&!p.hasOwnProperty(je))switch(je){case"selected":i.selected=!1;break;default:jt(i,s,je,null,p,se)}for(X in p)if(se=p[X],le=c[X],p.hasOwnProperty(X)&&se!==le&&(se!=null||le!=null))switch(X){case"selected":i.selected=se&&typeof se!="function"&&typeof se!="symbol";break;default:jt(i,s,X,se,p,le)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Fe in c)se=c[Fe],c.hasOwnProperty(Fe)&&se!=null&&!p.hasOwnProperty(Fe)&&jt(i,s,Fe,null,p,se);for(ae in p)if(se=p[ae],le=c[ae],p.hasOwnProperty(ae)&&se!==le&&(se!=null||le!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:jt(i,s,ae,se,p,le)}return;default:if(_a(s)){for(var At in c)se=c[At],c.hasOwnProperty(At)&&se!==void 0&&!p.hasOwnProperty(At)&&Km(i,s,At,void 0,p,se);for(fe in p)se=p[fe],le=c[fe],!p.hasOwnProperty(fe)||se===le||se===void 0&&le===void 0||Km(i,s,fe,se,p,le);return}}for(var re in c)se=c[re],c.hasOwnProperty(re)&&se!=null&&!p.hasOwnProperty(re)&&jt(i,s,re,null,p,se);for(me in p)se=p[me],le=c[me],!p.hasOwnProperty(me)||se===le||se==null&&le==null||jt(i,s,me,se,p,le)}function Lw(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AT(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,c=performance.getEntriesByType("resource"),p=0;p<c.length;p++){var x=c[p],v=x.transferSize,C=x.initiatorType,P=x.duration;if(v&&P&&Lw(C)){for(C=0,P=x.responseEnd,p+=1;p<c.length;p++){var X=c[p],ae=X.startTime;if(ae>P)break;var fe=X.transferSize,me=X.initiatorType;fe&&Lw(me)&&(X=X.responseEnd,C+=fe*(X<P?1:(P-ae)/(X-ae)))}if(--p,s+=8*(v+C)/(x.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Gm=null,Vm=null;function Zd(i){return i.nodeType===9?i:i.ownerDocument}function Iw(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zw(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function Ym(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Qm=null;function TT(){var i=window.event;return i&&i.type==="popstate"?i===Qm?!1:(Qm=i,!0):(Qm=null,!1)}var Pw=typeof setTimeout=="function"?setTimeout:void 0,MT=typeof clearTimeout=="function"?clearTimeout:void 0,Bw=typeof Promise=="function"?Promise:void 0,OT=typeof queueMicrotask=="function"?queueMicrotask:typeof Bw<"u"?function(i){return Bw.resolve(null).then(i).catch(DT)}:Pw;function DT(i){setTimeout(function(){throw i})}function qa(i){return i==="head"}function Uw(i,s){var c=s,p=0;do{var x=c.nextSibling;if(i.removeChild(c),x&&x.nodeType===8)if(c=x.data,c==="/$"||c==="/&"){if(p===0){i.removeChild(x),Zo(s);return}p--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")p++;else if(c==="html")Ic(i.ownerDocument.documentElement);else if(c==="head"){c=i.ownerDocument.head,Ic(c);for(var v=c.firstChild;v;){var C=v.nextSibling,P=v.nodeName;v[Ii]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&v.rel.toLowerCase()==="stylesheet"||c.removeChild(v),v=C}}else c==="body"&&Ic(i.ownerDocument.body);c=x}while(c);Zo(s)}function $w(i,s){var c=i;i=0;do{var p=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),p&&p.nodeType===8)if(c=p.data,c==="/$"){if(i===0)break;i--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||i++;c=p}while(c)}function Wm(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Wm(c),vs(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function RT(i,s,c,p){for(;i.nodeType===1;){var x=c;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Ii])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(v=i.getAttribute("rel"),v==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(v!==x.rel||i.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||i.getAttribute("title")!==(x.title==null?null:x.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(v=i.getAttribute("src"),(v!==(x.src==null?null:x.src)||i.getAttribute("type")!==(x.type==null?null:x.type)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&v&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var v=x.name==null?null:""+x.name;if(x.type==="hidden"&&i.getAttribute("name")===v)return i}else return i;if(i=zr(i.nextSibling),i===null)break}return null}function LT(i,s,c){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=zr(i.nextSibling),i===null))return null;return i}function Fw(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=zr(i.nextSibling),i===null))return null;return i}function Xm(i){return i.data==="$?"||i.data==="$~"}function Zm(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function IT(i,s){var c=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||c.readyState!=="loading")s();else{var p=function(){s(),c.removeEventListener("DOMContentLoaded",p)};c.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function zr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var Jm=null;function Hw(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"||c==="/&"){if(s===0)return zr(i.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}i=i.nextSibling}return null}function qw(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return i;s--}else c!=="/$"&&c!=="/&"||s++}i=i.previousSibling}return null}function Kw(i,s,c){switch(s=Zd(c),i){case"html":if(i=s.documentElement,!i)throw Error(r(452));return i;case"head":if(i=s.head,!i)throw Error(r(453));return i;case"body":if(i=s.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Ic(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);vs(i)}var Pr=new Map,Gw=new Set;function Jd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ea=Y.d;Y.d={f:zT,r:PT,D:BT,C:UT,L:$T,m:FT,X:qT,S:HT,M:KT};function zT(){var i=ea.f(),s=qd();return i||s}function PT(i){var s=Xr(i);s!==null&&s.tag===5&&s.type==="form"?c0(s):ea.r(i)}var Qo=typeof document>"u"?null:document;function Vw(i,s,c){var p=Qo;if(p&&typeof s=="string"&&s){var x=Pn(s);x='link[rel="'+i+'"][href="'+x+'"]',typeof c=="string"&&(x+='[crossorigin="'+c+'"]'),Gw.has(x)||(Gw.add(x),i={rel:i,crossOrigin:c,href:s},p.querySelector(x)===null&&(s=p.createElement("link"),Ln(s,"link",i),Jt(s),p.head.appendChild(s)))}}function BT(i){ea.D(i),Vw("dns-prefetch",i,null)}function UT(i,s){ea.C(i,s),Vw("preconnect",i,s)}function $T(i,s,c){ea.L(i,s,c);var p=Qo;if(p&&i&&s){var x='link[rel="preload"][as="'+Pn(s)+'"]';s==="image"&&c&&c.imageSrcSet?(x+='[imagesrcset="'+Pn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(x+='[imagesizes="'+Pn(c.imageSizes)+'"]')):x+='[href="'+Pn(i)+'"]';var v=x;switch(s){case"style":v=Wo(i);break;case"script":v=Xo(i)}Pr.has(v)||(i=m({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:i,as:s},c),Pr.set(v,i),p.querySelector(x)!==null||s==="style"&&p.querySelector(zc(v))||s==="script"&&p.querySelector(Pc(v))||(s=p.createElement("link"),Ln(s,"link",i),Jt(s),p.head.appendChild(s)))}}function FT(i,s){ea.m(i,s);var c=Qo;if(c&&i){var p=s&&typeof s.as=="string"?s.as:"script",x='link[rel="modulepreload"][as="'+Pn(p)+'"][href="'+Pn(i)+'"]',v=x;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Xo(i)}if(!Pr.has(v)&&(i=m({rel:"modulepreload",href:i},s),Pr.set(v,i),c.querySelector(x)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Pc(v)))return}p=c.createElement("link"),Ln(p,"link",i),Jt(p),c.head.appendChild(p)}}}function HT(i,s,c){ea.S(i,s,c);var p=Qo;if(p&&i){var x=gi(p).hoistableStyles,v=Wo(i);s=s||"default";var C=x.get(v);if(!C){var P={loading:0,preload:null};if(C=p.querySelector(zc(v)))P.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":s},c),(c=Pr.get(v))&&eg(i,c);var X=C=p.createElement("link");Jt(X),Ln(X,"link",i),X._p=new Promise(function(ae,fe){X.onload=ae,X.onerror=fe}),X.addEventListener("load",function(){P.loading|=1}),X.addEventListener("error",function(){P.loading|=2}),P.loading|=4,ef(C,s,p)}C={type:"stylesheet",instance:C,count:1,state:P},x.set(v,C)}}}function qT(i,s){ea.X(i,s);var c=Qo;if(c&&i){var p=gi(c).hoistableScripts,x=Xo(i),v=p.get(x);v||(v=c.querySelector(Pc(x)),v||(i=m({src:i,async:!0},s),(s=Pr.get(x))&&tg(i,s),v=c.createElement("script"),Jt(v),Ln(v,"link",i),c.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},p.set(x,v))}}function KT(i,s){ea.M(i,s);var c=Qo;if(c&&i){var p=gi(c).hoistableScripts,x=Xo(i),v=p.get(x);v||(v=c.querySelector(Pc(x)),v||(i=m({src:i,async:!0,type:"module"},s),(s=Pr.get(x))&&tg(i,s),v=c.createElement("script"),Jt(v),Ln(v,"link",i),c.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},p.set(x,v))}}function Yw(i,s,c,p){var x=(x=te.current)?Jd(x):null;if(!x)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=Wo(c.href),c=gi(x).hoistableStyles,p=c.get(s),p||(p={type:"style",instance:null,count:0,state:null},c.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=Wo(c.href);var v=gi(x).hoistableStyles,C=v.get(i);if(C||(x=x.ownerDocument||x,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(i,C),(v=x.querySelector(zc(i)))&&!v._p&&(C.instance=v,C.state.loading=5),Pr.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Pr.set(i,c),v||GT(x,i,c,C.state))),s&&p===null)throw Error(r(528,""));return C}if(s&&p!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Xo(c),c=gi(x).hoistableScripts,p=c.get(s),p||(p={type:"script",instance:null,count:0,state:null},c.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Wo(i){return'href="'+Pn(i)+'"'}function zc(i){return'link[rel="stylesheet"]['+i+"]"}function Qw(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function GT(i,s,c,p){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=i.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),Ln(s,"link",c),Jt(s),i.head.appendChild(s))}function Xo(i){return'[src="'+Pn(i)+'"]'}function Pc(i){return"script[async]"+i}function Ww(i,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var p=i.querySelector('style[data-href~="'+Pn(c.href)+'"]');if(p)return s.instance=p,Jt(p),p;var x=m({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),Jt(p),Ln(p,"style",x),ef(p,c.precedence,i),s.instance=p;case"stylesheet":x=Wo(c.href);var v=i.querySelector(zc(x));if(v)return s.state.loading|=4,s.instance=v,Jt(v),v;p=Qw(c),(x=Pr.get(x))&&eg(p,x),v=(i.ownerDocument||i).createElement("link"),Jt(v);var C=v;return C._p=new Promise(function(P,X){C.onload=P,C.onerror=X}),Ln(v,"link",p),s.state.loading|=4,ef(v,c.precedence,i),s.instance=v;case"script":return v=Xo(c.src),(x=i.querySelector(Pc(v)))?(s.instance=x,Jt(x),x):(p=c,(x=Pr.get(v))&&(p=m({},c),tg(p,x)),i=i.ownerDocument||i,x=i.createElement("script"),Jt(x),Ln(x,"link",p),i.head.appendChild(x),s.instance=x);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(p=s.instance,s.state.loading|=4,ef(p,c.precedence,i));return s.instance}function ef(i,s,c){for(var p=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=p.length?p[p.length-1]:null,v=x,C=0;C<p.length;C++){var P=p[C];if(P.dataset.precedence===s)v=P;else if(v!==x)break}v?v.parentNode.insertBefore(i,v.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(i,s.firstChild))}function eg(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function tg(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var tf=null;function Xw(i,s,c){if(tf===null){var p=new Map,x=tf=new Map;x.set(c,p)}else x=tf,p=x.get(c),p||(p=new Map,x.set(c,p));if(p.has(i))return p;for(p.set(i,null),c=c.getElementsByTagName(i),x=0;x<c.length;x++){var v=c[x];if(!(v[Ii]||v[Yt]||i==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var C=v.getAttribute(s)||"";C=i+C;var P=p.get(C);P?P.push(v):p.set(C,[v])}}return p}function Zw(i,s,c){i=i.ownerDocument||i,i.head.insertBefore(c,s==="title"?i.querySelector("head > title"):null)}function VT(i,s,c){if(c===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return i=s.disabled,typeof s.precedence=="string"&&i==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Jw(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function YT(i,s,c,p){if(c.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var x=Wo(p.href),v=s.querySelector(zc(x));if(v){s=v._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=nf.bind(i),s.then(i,i)),c.state.loading|=4,c.instance=v,Jt(v);return}v=s.ownerDocument||s,p=Qw(p),(x=Pr.get(x))&&eg(p,x),v=v.createElement("link"),Jt(v);var C=v;C._p=new Promise(function(P,X){C.onload=P,C.onerror=X}),Ln(v,"link",p),c.instance=v}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(i.count++,c=nf.bind(i),s.addEventListener("load",c),s.addEventListener("error",c))}}var ng=0;function QT(i,s){return i.stylesheets&&i.count===0&&af(i,i.stylesheets),0<i.count||0<i.imgCount?function(c){var p=setTimeout(function(){if(i.stylesheets&&af(i,i.stylesheets),i.unsuspend){var v=i.unsuspend;i.unsuspend=null,v()}},6e4+s);0<i.imgBytes&&ng===0&&(ng=62500*AT());var x=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&af(i,i.stylesheets),i.unsuspend)){var v=i.unsuspend;i.unsuspend=null,v()}},(i.imgBytes>ng?50:800)+s);return i.unsuspend=c,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(x)}}:null}function nf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)af(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var rf=null;function af(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,rf=new Map,s.forEach(WT,i),rf=null,nf.call(i))}function WT(i,s){if(!(s.state.loading&4)){var c=rf.get(i);if(c)var p=c.get(null);else{c=new Map,rf.set(i,c);for(var x=i.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<x.length;v++){var C=x[v];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(c.set(C.dataset.precedence,C),p=C)}p&&c.set(null,p)}x=s.instance,C=x.getAttribute("data-precedence"),v=c.get(C)||p,v===p&&c.set(null,x),c.set(C,x),this.count++,p=nf.bind(this),x.addEventListener("load",p),x.addEventListener("error",p),v?v.parentNode.insertBefore(x,v.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(x,i.firstChild)),s.state.loading|=4}}var Bc={$$typeof:_,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function XT(i,s,c,p,x,v,C,P,X){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ot(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ot(0),this.hiddenUpdates=Ot(null),this.identifierPrefix=p,this.onUncaughtError=x,this.onCaughtError=v,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function e1(i,s,c,p,x,v,C,P,X,ae,fe,me){return i=new XT(i,s,c,C,X,ae,fe,me,P),s=1,v===!0&&(s|=24),v=pr(3,null,null,s),i.current=v,v.stateNode=i,s=Lp(),s.refCount++,i.pooledCache=s,s.refCount++,v.memoizedState={element:p,isDehydrated:c,cache:s},Bp(v),i}function t1(i){return i?(i=jo,i):jo}function n1(i,s,c,p,x,v){x=t1(x),p.context===null?p.context=x:p.pendingContext=x,p=Da(s),p.payload={element:c},v=v===void 0?null:v,v!==null&&(p.callback=v),c=Ra(i,p,s),c!==null&&(ar(c,i,s),yc(c,i,s))}function r1(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function rg(i,s){r1(i,s),(i=i.alternate)&&r1(i,s)}function i1(i){if(i.tag===13||i.tag===31){var s=Ns(i,67108864);s!==null&&ar(s,i,67108864),rg(i,67108864)}}function a1(i){if(i.tag===13||i.tag===31){var s=xr();s=It(s);var c=Ns(i,s);c!==null&&ar(c,i,s),rg(i,s)}}var sf=!0;function ZT(i,s,c,p){var x=z.T;z.T=null;var v=Y.p;try{Y.p=2,ig(i,s,c,p)}finally{Y.p=v,z.T=x}}function JT(i,s,c,p){var x=z.T;z.T=null;var v=Y.p;try{Y.p=8,ig(i,s,c,p)}finally{Y.p=v,z.T=x}}function ig(i,s,c,p){if(sf){var x=ag(p);if(x===null)qm(i,s,p,of,c),o1(i,p);else if(tM(x,i,s,c,p))p.stopPropagation();else if(o1(i,p),s&4&&-1<eM.indexOf(i)){for(;x!==null;){var v=Xr(x);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var C=In(v.pendingLanes);if(C!==0){var P=v;for(P.pendingLanes|=2,P.entangledLanes|=2;C;){var X=1<<31-xt(C);P.entanglements[1]|=X,C&=~X}wi(v),(vt&6)===0&&(Fd=bt()+500,Dc(0))}}break;case 31:case 13:P=Ns(v,2),P!==null&&ar(P,v,2),qd(),rg(v,2)}if(v=ag(p),v===null&&qm(i,s,p,of,c),v===x)break;x=v}x!==null&&p.stopPropagation()}else qm(i,s,p,null,c)}}function ag(i){return i=Ve(i),sg(i)}var of=null;function sg(i){if(of=null,i=Mn(i),i!==null){var s=o(i);if(s===null)i=null;else{var c=s.tag;if(c===13){if(i=l(s),i!==null)return i;i=null}else if(c===31){if(i=u(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return of=i,null}function s1(i){switch(i){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(En()){case ce:return 2;case ye:return 8;case Re:case We:return 32;case at:return 268435456;default:return 32}default:return 32}}var og=!1,Ka=null,Ga=null,Va=null,Uc=new Map,$c=new Map,Ya=[],eM="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".split(" ");function o1(i,s){switch(i){case"focusin":case"focusout":Ka=null;break;case"dragenter":case"dragleave":Ga=null;break;case"mouseover":case"mouseout":Va=null;break;case"pointerover":case"pointerout":Uc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":$c.delete(s.pointerId)}}function Fc(i,s,c,p,x,v){return i===null||i.nativeEvent!==v?(i={blockedOn:s,domEventName:c,eventSystemFlags:p,nativeEvent:v,targetContainers:[x]},s!==null&&(s=Xr(s),s!==null&&i1(s)),i):(i.eventSystemFlags|=p,s=i.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),i)}function tM(i,s,c,p,x){switch(s){case"focusin":return Ka=Fc(Ka,i,s,c,p,x),!0;case"dragenter":return Ga=Fc(Ga,i,s,c,p,x),!0;case"mouseover":return Va=Fc(Va,i,s,c,p,x),!0;case"pointerover":var v=x.pointerId;return Uc.set(v,Fc(Uc.get(v)||null,i,s,c,p,x)),!0;case"gotpointercapture":return v=x.pointerId,$c.set(v,Fc($c.get(v)||null,i,s,c,p,x)),!0}return!1}function l1(i){var s=Mn(i.target);if(s!==null){var c=o(s);if(c!==null){if(s=c.tag,s===13){if(s=l(c),s!==null){i.blockedOn=s,xa(i.priority,function(){a1(c)});return}}else if(s===31){if(s=u(c),s!==null){i.blockedOn=s,xa(i.priority,function(){a1(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function lf(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=ag(i.nativeEvent);if(c===null){c=i.nativeEvent;var p=new c.constructor(c.type,c);Te=p,c.target.dispatchEvent(p),Te=null}else return s=Xr(c),s!==null&&i1(s),i.blockedOn=c,!1;s.shift()}return!0}function c1(i,s,c){lf(i)&&c.delete(s)}function nM(){og=!1,Ka!==null&&lf(Ka)&&(Ka=null),Ga!==null&&lf(Ga)&&(Ga=null),Va!==null&&lf(Va)&&(Va=null),Uc.forEach(c1),$c.forEach(c1)}function cf(i,s){i.blockedOn===s&&(i.blockedOn=null,og||(og=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,nM)))}var uf=null;function u1(i){uf!==i&&(uf=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){uf===i&&(uf=null);for(var s=0;s<i.length;s+=3){var c=i[s],p=i[s+1],x=i[s+2];if(typeof p!="function"){if(sg(p||c)===null)continue;break}var v=Xr(c);v!==null&&(i.splice(s,3),s-=3,am(v,{pending:!0,data:x,method:c.method,action:p},p,x))}}))}function Zo(i){function s(X){return cf(X,i)}Ka!==null&&cf(Ka,i),Ga!==null&&cf(Ga,i),Va!==null&&cf(Va,i),Uc.forEach(s),$c.forEach(s);for(var c=0;c<Ya.length;c++){var p=Ya[c];p.blockedOn===i&&(p.blockedOn=null)}for(;0<Ya.length&&(c=Ya[0],c.blockedOn===null);)l1(c),c.blockedOn===null&&Ya.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(p=0;p<c.length;p+=3){var x=c[p],v=c[p+1],C=x[Sn]||null;if(typeof v=="function")C||u1(c);else if(C){var P=null;if(v&&v.hasAttribute("formAction")){if(x=v,C=v[Sn]||null)P=C.formAction;else if(sg(x)!==null)continue}else P=C.action;typeof P=="function"?c[p+1]=P:(c.splice(p,3),p-=3),u1(c)}}}function d1(){function i(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(C){return x=C})},focusReset:"manual",scroll:"manual"})}function s(){x!==null&&(x(),x=null),p||setTimeout(c,20)}function c(){if(!p&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,x=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),x!==null&&(x(),x=null)}}}function lg(i){this._internalRoot=i}df.prototype.render=lg.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,p=xr();n1(c,p,i,s,null,null)},df.prototype.unmount=lg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;n1(i.current,2,null,i,null,null),qd(),s[Wr]=null}};function df(i){this._internalRoot=i}df.prototype.unstable_scheduleHydration=function(i){if(i){var s=ba();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Ya.length&&s!==0&&s<Ya[c].priority;c++);Ya.splice(c,0,i),c===0&&l1(i)}};var f1=t.version;if(f1!=="19.2.5")throw Error(r(527,f1,"19.2.5"));Y.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=h(s),i=i!==null?g(i):null,i=i===null?null:i.stateNode,i};var rM={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ff=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ff.isDisabled&&ff.supportsFiber)try{gn=ff.inject(rM),$t=ff}catch{}}return qc.createRoot=function(i,s){if(!a(i))throw Error(r(299));var c=!1,p="",x=x0,v=v0,C=w0;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(x=s.onUncaughtError),s.onCaughtError!==void 0&&(v=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError)),s=e1(i,1,!1,null,null,c,p,null,x,v,C,d1),i[Wr]=s.current,Hm(i),new lg(s)},qc.hydrateRoot=function(i,s,c){if(!a(i))throw Error(r(299));var p=!1,x="",v=x0,C=v0,P=w0,X=null;return c!=null&&(c.unstable_strictMode===!0&&(p=!0),c.identifierPrefix!==void 0&&(x=c.identifierPrefix),c.onUncaughtError!==void 0&&(v=c.onUncaughtError),c.onCaughtError!==void 0&&(C=c.onCaughtError),c.onRecoverableError!==void 0&&(P=c.onRecoverableError),c.formState!==void 0&&(X=c.formState)),s=e1(i,1,!0,s,c??null,p,x,X,v,C,P,d1),s.context=t1(null),c=s.current,p=xr(),p=It(p),x=Da(p),x.callback=null,Ra(c,x,p),c=p,s.current.lanes=c,Et(s,c),wi(s),i[Wr]=s.current,Hm(i),new df(s)},qc.version="19.2.5",qc}var S1;function mM(){if(S1)return fg.exports;S1=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(),fg.exports=pM(),fg.exports}var gM=mM(),Ul=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Gs,rs,xl,wS,yM=(wS=class extends Ul{constructor(){super();Ie(this,Gs);Ie(this,rs);Ie(this,xl);_e(this,xl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Z(this,rs)||this.setEventListener(Z(this,xl))}onUnsubscribe(){var t;this.hasListeners()||((t=Z(this,rs))==null||t.call(this),_e(this,rs,void 0))}setEventListener(t){var n;_e(this,xl,t),(n=Z(this,rs))==null||n.call(this),_e(this,rs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Z(this,Gs)!==t&&(_e(this,Gs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Z(this,Gs)=="boolean"?Z(this,Gs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Gs=new WeakMap,rs=new WeakMap,xl=new WeakMap,wS),fb=new yM,bM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},is,db,ES,xM=(ES=class{constructor(){Ie(this,is,bM);Ie(this,db,!1)}setTimeoutProvider(e){_e(this,is,e)}setTimeout(e,t){return Z(this,is).setTimeout(e,t)}clearTimeout(e){Z(this,is).clearTimeout(e)}setInterval(e,t){return Z(this,is).setInterval(e,t)}clearInterval(e){Z(this,is).clearInterval(e)}},is=new WeakMap,db=new WeakMap,ES),$s=new xM;function vM(e){setTimeout(e,0)}var wM=typeof window>"u"||"Deno"in globalThis;function Qn(){}function EM(e,t){return typeof e=="function"?e(t):e}function fy(e){return typeof e=="number"&&e>=0&&e!==1/0}function DS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fs(e,t){return typeof e=="function"?e(t):e}function $r(e,t){return typeof e=="function"?e(t):e}function _1(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:o,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==hb(l,t.options))return!1}else if(!uu(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||a&&a!==t.state.fetchStatus||o&&!o(t))}function N1(e,t){const{exact:n,status:r,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(ro(t.options.mutationKey)!==ro(o))return!1}else if(!uu(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function hb(e,t){return((t==null?void 0:t.queryKeyHashFn)||ro)(e)}function ro(e){return JSON.stringify(e,(t,n)=>hy(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function uu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>uu(e[n],t[n])):!1}var kM=Object.prototype.hasOwnProperty;function RS(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=C1(e)&&C1(t);if(!r&&!(hy(e)&&hy(t)))return t;const o=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,d=r?new Array(u):{};let h=0;for(let g=0;g<u;g++){const m=r?g:l[g],y=e[m],b=t[m];if(y===b){d[m]=y,(r?g<o:kM.call(e,m))&&h++;continue}if(y===null||b===null||typeof y!="object"||typeof b!="object"){d[m]=b;continue}const E=RS(y,b,n+1);d[m]=E,E===y&&h++}return o===u&&h===o?e:d}function eh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function C1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function hy(e){if(!j1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!j1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function j1(e){return Object.prototype.toString.call(e)==="[object Object]"}function SM(e){return new Promise(t=>{$s.setTimeout(t,e)})}function py(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?RS(e,t):t}function _M(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function NM(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var pb=Symbol();function LS(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===pb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mb(e,t){return typeof e=="function"?e(...t):!!e}function CM(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var du=(()=>{let e=()=>wM;return{isServer(){return e()},setIsServer(t){e=t}}})();function my(){let e,t;const n=new Promise((a,o)=>{e=a,t=o});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var jM=vM;function AM(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=jM;const o=u=>{t?e.push(u):a(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&a(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||l()}return d},batchCalls:u=>(...d)=>{o(()=>{u(...d)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var vn=AM(),vl,as,wl,kS,TM=(kS=class extends Ul{constructor(){super();Ie(this,vl,!0);Ie(this,as);Ie(this,wl);_e(this,wl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Z(this,as)||this.setEventListener(Z(this,wl))}onUnsubscribe(){var t;this.hasListeners()||((t=Z(this,as))==null||t.call(this),_e(this,as,void 0))}setEventListener(t){var n;_e(this,wl,t),(n=Z(this,as))==null||n.call(this),_e(this,as,t(this.setOnline.bind(this)))}setOnline(t){Z(this,vl)!==t&&(_e(this,vl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return Z(this,vl)}},vl=new WeakMap,as=new WeakMap,wl=new WeakMap,kS),th=new TM;function MM(e){return Math.min(1e3*2**e,3e4)}function IS(e){return(e??"online")==="online"?th.isOnline():!0}var gy=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function zS(e){let t=!1,n=0,r;const a=my(),o=()=>a.status!=="pending",l=w=>{var S;if(!o()){const k=new gy(w);y(k),(S=e.onCancel)==null||S.call(e,k)}},u=()=>{t=!0},d=()=>{t=!1},h=()=>fb.isFocused()&&(e.networkMode==="always"||th.isOnline())&&e.canRun(),g=()=>IS(e.networkMode)&&e.canRun(),m=w=>{o()||(r==null||r(),a.resolve(w))},y=w=>{o()||(r==null||r(),a.reject(w))},b=()=>new Promise(w=>{var S;r=k=>{(o()||h())&&w(k)},(S=e.onPause)==null||S.call(e)}).then(()=>{var w;r=void 0,o()||(w=e.onContinue)==null||w.call(e)}),E=()=>{if(o())return;let w;const S=n===0?e.initialPromise:void 0;try{w=S??e.fn()}catch(k){w=Promise.reject(k)}Promise.resolve(w).then(m).catch(k=>{var A;if(o())return;const j=e.retry??(du.isServer()?0:3),_=e.retryDelay??MM,N=typeof _=="function"?_(n,k):_,O=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,k);if(t||!O){y(k);return}n++,(A=e.onFail)==null||A.call(e,n,k),SM(N).then(()=>h()?void 0:b()).then(()=>{t?y(k):E()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r==null||r(),a),cancelRetry:u,continueRetry:d,canStart:g,start:()=>(g()?E():b().then(E),a)}}var Vs,SS,PS=(SS=class{constructor(){Ie(this,Vs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fy(this.gcTime)&&_e(this,Vs,$s.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(du.isServer()?1/0:300*1e3))}clearGcTimeout(){Z(this,Vs)!==void 0&&($s.clearTimeout(Z(this,Vs)),_e(this,Vs,void 0))}},Vs=new WeakMap,SS),Ys,El,Ur,Qs,Cn,Tu,Ws,wr,BS,na,_S,OM=(_S=class extends PS{constructor(t){super();Ie(this,wr);Ie(this,Ys);Ie(this,El);Ie(this,Ur);Ie(this,Qs);Ie(this,Cn);Ie(this,Tu);Ie(this,Ws);_e(this,Ws,!1),_e(this,Tu,t.defaultOptions),this.setOptions(t.options),this.observers=[],_e(this,Qs,t.client),_e(this,Ur,Z(this,Qs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,_e(this,Ys,T1(this.options)),this.state=t.state??Z(this,Ys),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Z(this,Cn))==null?void 0:t.promise}setOptions(t){if(this.options={...Z(this,Tu),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=T1(this.options);n.data!==void 0&&(this.setState(A1(n.data,n.dataUpdatedAt)),_e(this,Ys,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Z(this,Ur).remove(this)}setData(t,n){const r=py(this.state.data,t,this.options);return Ze(this,wr,na).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ze(this,wr,na).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=Z(this,Cn))==null?void 0:r.promise;return(a=Z(this,Cn))==null||a.cancel(t),n?n.then(Qn).catch(Qn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return Z(this,Ys)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>$r(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>fs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!DS(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Z(this,Cn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Z(this,Cn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Z(this,Ur).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Z(this,Cn)&&(Z(this,Ws)||Ze(this,wr,BS).call(this)?Z(this,Cn).cancel({revert:!0}):Z(this,Cn).cancelRetry()),this.scheduleGc()),Z(this,Ur).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ze(this,wr,na).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,g,m,y,b,E,w,S,k,j,_;if(this.state.fetchStatus!=="idle"&&((d=Z(this,Cn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Z(this,Cn))return Z(this,Cn).continueRetry(),Z(this,Cn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const N=this.observers.find(O=>O.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,a=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(_e(this,Ws,!0),r.signal)})},o=()=>{const N=LS(this.options,n),A=(()=>{const M={client:Z(this,Qs),queryKey:this.queryKey,meta:this.meta};return a(M),M})();return _e(this,Ws,!1),this.options.persister?this.options.persister(N,A,this):N(A)},u=(()=>{const N={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Z(this,Qs),state:this.state,fetchFn:o};return a(N),N})();(h=this.options.behavior)==null||h.onFetch(u,this),_e(this,El,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=u.fetchOptions)==null?void 0:g.meta))&&Ze(this,wr,na).call(this,{type:"fetch",meta:(m=u.fetchOptions)==null?void 0:m.meta}),_e(this,Cn,zS({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:N=>{N instanceof gy&&N.revert&&this.setState({...Z(this,El),fetchStatus:"idle"}),r.abort()},onFail:(N,O)=>{Ze(this,wr,na).call(this,{type:"failed",failureCount:N,error:O})},onPause:()=>{Ze(this,wr,na).call(this,{type:"pause"})},onContinue:()=>{Ze(this,wr,na).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const N=await Z(this,Cn).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(b=(y=Z(this,Ur).config).onSuccess)==null||b.call(y,N,this),(w=(E=Z(this,Ur).config).onSettled)==null||w.call(E,N,this.state.error,this),N}catch(N){if(N instanceof gy){if(N.silent)return Z(this,Cn).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Ze(this,wr,na).call(this,{type:"error",error:N}),(k=(S=Z(this,Ur).config).onError)==null||k.call(S,N,this),(_=(j=Z(this,Ur).config).onSettled)==null||_.call(j,this.state.data,N,this),N}finally{this.scheduleGc()}}},Ys=new WeakMap,El=new WeakMap,Ur=new WeakMap,Qs=new WeakMap,Cn=new WeakMap,Tu=new WeakMap,Ws=new WeakMap,wr=new WeakSet,BS=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},na=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...US(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...A1(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return _e(this,El,t.manual?a:void 0),a;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),vn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Z(this,Ur).notify({query:this,type:"updated",action:t})})},_S);function US(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:IS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function A1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function T1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var or,ut,Mu,Vn,Xs,kl,ra,ss,Ou,Sl,_l,Zs,Js,os,Nl,wt,eu,yy,by,xy,vy,wy,Ey,ky,$S,NS,DM=(NS=class extends Ul{constructor(t,n){super();Ie(this,wt);Ie(this,or);Ie(this,ut);Ie(this,Mu);Ie(this,Vn);Ie(this,Xs);Ie(this,kl);Ie(this,ra);Ie(this,ss);Ie(this,Ou);Ie(this,Sl);Ie(this,_l);Ie(this,Zs);Ie(this,Js);Ie(this,os);Ie(this,Nl,new Set);this.options=n,_e(this,or,t),_e(this,ss,null),_e(this,ra,my()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Z(this,ut).addObserver(this),M1(Z(this,ut),this.options)?Ze(this,wt,eu).call(this):this.updateResult(),Ze(this,wt,vy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sy(Z(this,ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sy(Z(this,ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ze(this,wt,wy).call(this),Ze(this,wt,Ey).call(this),Z(this,ut).removeObserver(this)}setOptions(t){const n=this.options,r=Z(this,ut);if(this.options=Z(this,or).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof $r(this.options.enabled,Z(this,ut))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ze(this,wt,ky).call(this),Z(this,ut).setOptions(this.options),n._defaulted&&!eh(this.options,n)&&Z(this,or).getQueryCache().notify({type:"observerOptionsUpdated",query:Z(this,ut),observer:this});const a=this.hasListeners();a&&O1(Z(this,ut),r,this.options,n)&&Ze(this,wt,eu).call(this),this.updateResult(),a&&(Z(this,ut)!==r||$r(this.options.enabled,Z(this,ut))!==$r(n.enabled,Z(this,ut))||fs(this.options.staleTime,Z(this,ut))!==fs(n.staleTime,Z(this,ut)))&&Ze(this,wt,yy).call(this);const o=Ze(this,wt,by).call(this);a&&(Z(this,ut)!==r||$r(this.options.enabled,Z(this,ut))!==$r(n.enabled,Z(this,ut))||o!==Z(this,os))&&Ze(this,wt,xy).call(this,o)}getOptimisticResult(t){const n=Z(this,or).getQueryCache().build(Z(this,or),t),r=this.createResult(n,t);return LM(this,r)&&(_e(this,Vn,r),_e(this,kl,this.options),_e(this,Xs,Z(this,ut).state)),r}getCurrentResult(){return Z(this,Vn)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Z(this,ra).status==="pending"&&Z(this,ra).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){Z(this,Nl).add(t)}getCurrentQuery(){return Z(this,ut)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Z(this,or).defaultQueryOptions(t),r=Z(this,or).getQueryCache().build(Z(this,or),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ze(this,wt,eu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Z(this,Vn)))}createResult(t,n){var F;const r=Z(this,ut),a=this.options,o=Z(this,Vn),l=Z(this,Xs),u=Z(this,kl),h=t!==r?t.state:Z(this,Mu),{state:g}=t;let m={...g},y=!1,b;if(n._optimisticResults){const $=this.hasListeners(),U=!$&&M1(t,n),q=$&&O1(t,r,n,a);(U||q)&&(m={...m,...US(g.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:E,errorUpdatedAt:w,status:S}=m;b=m.data;let k=!1;if(n.placeholderData!==void 0&&b===void 0&&S==="pending"){let $;o!=null&&o.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?($=o.data,k=!0):$=typeof n.placeholderData=="function"?n.placeholderData((F=Z(this,_l))==null?void 0:F.state.data,Z(this,_l)):n.placeholderData,$!==void 0&&(S="success",b=py(o==null?void 0:o.data,$,n),y=!0)}if(n.select&&b!==void 0&&!k)if(o&&b===(l==null?void 0:l.data)&&n.select===Z(this,Ou))b=Z(this,Sl);else try{_e(this,Ou,n.select),b=n.select(b),b=py(o==null?void 0:o.data,b,n),_e(this,Sl,b),_e(this,ss,null)}catch($){_e(this,ss,$)}Z(this,ss)&&(E=Z(this,ss),b=Z(this,Sl),w=Date.now(),S="error");const j=m.fetchStatus==="fetching",_=S==="pending",N=S==="error",O=_&&j,A=b!==void 0,I={status:S,fetchStatus:m.fetchStatus,isPending:_,isSuccess:S==="success",isError:N,isInitialLoading:O,isLoading:O,data:b,dataUpdatedAt:m.dataUpdatedAt,error:E,errorUpdatedAt:w,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:j,isRefetching:j&&!_,isLoadingError:N&&!A,isPaused:m.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:N&&A,isStale:gb(t,n),refetch:this.refetch,promise:Z(this,ra),isEnabled:$r(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=I.data!==void 0,U=I.status==="error"&&!$,q=H=>{U?H.reject(I.error):$&&H.resolve(I.data)},Q=()=>{const H=_e(this,ra,I.promise=my());q(H)},B=Z(this,ra);switch(B.status){case"pending":t.queryHash===r.queryHash&&q(B);break;case"fulfilled":(U||I.data!==B.value)&&Q();break;case"rejected":(!U||I.error!==B.reason)&&Q();break}}return I}updateResult(){const t=Z(this,Vn),n=this.createResult(Z(this,ut),this.options);if(_e(this,Xs,Z(this,ut).state),_e(this,kl,this.options),Z(this,Xs).data!==void 0&&_e(this,_l,Z(this,ut)),eh(n,t))return;_e(this,Vn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!Z(this,Nl).size)return!0;const l=new Set(o??Z(this,Nl));return this.options.throwOnError&&l.add("error"),Object.keys(Z(this,Vn)).some(u=>{const d=u;return Z(this,Vn)[d]!==t[d]&&l.has(d)})};Ze(this,wt,$S).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ze(this,wt,vy).call(this)}},or=new WeakMap,ut=new WeakMap,Mu=new WeakMap,Vn=new WeakMap,Xs=new WeakMap,kl=new WeakMap,ra=new WeakMap,ss=new WeakMap,Ou=new WeakMap,Sl=new WeakMap,_l=new WeakMap,Zs=new WeakMap,Js=new WeakMap,os=new WeakMap,Nl=new WeakMap,wt=new WeakSet,eu=function(t){Ze(this,wt,ky).call(this);let n=Z(this,ut).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Qn)),n},yy=function(){Ze(this,wt,wy).call(this);const t=fs(this.options.staleTime,Z(this,ut));if(du.isServer()||Z(this,Vn).isStale||!fy(t))return;const r=DS(Z(this,Vn).dataUpdatedAt,t)+1;_e(this,Zs,$s.setTimeout(()=>{Z(this,Vn).isStale||this.updateResult()},r))},by=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Z(this,ut)):this.options.refetchInterval)??!1},xy=function(t){Ze(this,wt,Ey).call(this),_e(this,os,t),!(du.isServer()||$r(this.options.enabled,Z(this,ut))===!1||!fy(Z(this,os))||Z(this,os)===0)&&_e(this,Js,$s.setInterval(()=>{(this.options.refetchIntervalInBackground||fb.isFocused())&&Ze(this,wt,eu).call(this)},Z(this,os)))},vy=function(){Ze(this,wt,yy).call(this),Ze(this,wt,xy).call(this,Ze(this,wt,by).call(this))},wy=function(){Z(this,Zs)!==void 0&&($s.clearTimeout(Z(this,Zs)),_e(this,Zs,void 0))},Ey=function(){Z(this,Js)!==void 0&&($s.clearInterval(Z(this,Js)),_e(this,Js,void 0))},ky=function(){const t=Z(this,or).getQueryCache().build(Z(this,or),this.options);if(t===Z(this,ut))return;const n=Z(this,ut);_e(this,ut,t),_e(this,Mu,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},$S=function(t){vn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Z(this,Vn))}),Z(this,or).getQueryCache().notify({query:Z(this,ut),type:"observerResultsUpdated"})})},NS);function RM(e,t){return $r(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function M1(e,t){return RM(e,t)||e.state.data!==void 0&&Sy(e,t,t.refetchOnMount)}function Sy(e,t,n){if($r(t.enabled,e)!==!1&&fs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&gb(e,t)}return!1}function O1(e,t,n,r){return(e!==t||$r(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&gb(e,n)}function gb(e,t){return $r(t.enabled,e)!==!1&&e.isStaleByTime(fs(t.staleTime,e))}function LM(e,t){return!eh(e.getCurrentResult(),t)}function D1(e){return{onFetch:(t,n)=>{var g,m,y,b,E;const r=t.options,a=(y=(m=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:m.fetchMore)==null?void 0:y.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],l=((E=t.state.data)==null?void 0:E.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const h=async()=>{let w=!1;const S=_=>{CM(_,()=>t.signal,()=>w=!0)},k=LS(t.options,t.fetchOptions),j=async(_,N,O)=>{if(w)return Promise.reject();if(N==null&&_.pages.length)return Promise.resolve(_);const M=(()=>{const U={client:t.client,queryKey:t.queryKey,pageParam:N,direction:O?"backward":"forward",meta:t.options.meta};return S(U),U})(),I=await k(M),{maxPages:F}=t.options,$=O?NM:_M;return{pages:$(_.pages,I,F),pageParams:$(_.pageParams,N,F)}};if(a&&o.length){const _=a==="backward",N=_?IM:R1,O={pages:o,pageParams:l},A=N(r,O);u=await j(O,A,_)}else{const _=e??o.length;do{const N=d===0?l[0]??r.initialPageParam:R1(r,u);if(d>0&&N==null)break;u=await j(u,N),d++}while(d<_)}return u};t.options.persister?t.fetchFn=()=>{var w,S;return(S=(w=t.options).persister)==null?void 0:S.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function R1(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function IM(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Du,Si,Un,eo,_i,es,CS,zM=(CS=class extends PS{constructor(t){super();Ie(this,_i);Ie(this,Du);Ie(this,Si);Ie(this,Un);Ie(this,eo);_e(this,Du,t.client),this.mutationId=t.mutationId,_e(this,Un,t.mutationCache),_e(this,Si,[]),this.state=t.state||FS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Z(this,Si).includes(t)||(Z(this,Si).push(t),this.clearGcTimeout(),Z(this,Un).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){_e(this,Si,Z(this,Si).filter(n=>n!==t)),this.scheduleGc(),Z(this,Un).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Z(this,Si).length||(this.state.status==="pending"?this.scheduleGc():Z(this,Un).remove(this))}continue(){var t;return((t=Z(this,eo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,u,d,h,g,m,y,b,E,w,S,k,j,_,N,O,A,M;const n=()=>{Ze(this,_i,es).call(this,{type:"continue"})},r={client:Z(this,Du),meta:this.options.meta,mutationKey:this.options.mutationKey};_e(this,eo,zS({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(I,F)=>{Ze(this,_i,es).call(this,{type:"failed",failureCount:I,error:F})},onPause:()=>{Ze(this,_i,es).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Z(this,Un).canRun(this)}));const a=this.state.status==="pending",o=!Z(this,eo).canStart();try{if(a)n();else{Ze(this,_i,es).call(this,{type:"pending",variables:t,isPaused:o}),Z(this,Un).config.onMutate&&await Z(this,Un).config.onMutate(t,this,r);const F=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,r));F!==this.state.context&&Ze(this,_i,es).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const I=await Z(this,eo).start();return await((h=(d=Z(this,Un).config).onSuccess)==null?void 0:h.call(d,I,t,this.state.context,this,r)),await((m=(g=this.options).onSuccess)==null?void 0:m.call(g,I,t,this.state.context,r)),await((b=(y=Z(this,Un).config).onSettled)==null?void 0:b.call(y,I,null,this.state.variables,this.state.context,this,r)),await((w=(E=this.options).onSettled)==null?void 0:w.call(E,I,null,t,this.state.context,r)),Ze(this,_i,es).call(this,{type:"success",data:I}),I}catch(I){try{await((k=(S=Z(this,Un).config).onError)==null?void 0:k.call(S,I,t,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((_=(j=this.options).onError)==null?void 0:_.call(j,I,t,this.state.context,r))}catch(F){Promise.reject(F)}try{await((O=(N=Z(this,Un).config).onSettled)==null?void 0:O.call(N,void 0,I,this.state.variables,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((M=(A=this.options).onSettled)==null?void 0:M.call(A,void 0,I,t,this.state.context,r))}catch(F){Promise.reject(F)}throw Ze(this,_i,es).call(this,{type:"error",error:I}),I}finally{Z(this,Un).runNext(this)}}},Du=new WeakMap,Si=new WeakMap,Un=new WeakMap,eo=new WeakMap,_i=new WeakSet,es=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),vn.batch(()=>{Z(this,Si).forEach(r=>{r.onMutationUpdate(t)}),Z(this,Un).notify({mutation:this,type:"updated",action:t})})},CS);function FS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ia,ai,Ru,jS,PM=(jS=class extends Ul{constructor(t={}){super();Ie(this,ia);Ie(this,ai);Ie(this,Ru);this.config=t,_e(this,ia,new Set),_e(this,ai,new Map),_e(this,Ru,0)}build(t,n,r){const a=new zM({client:t,mutationCache:this,mutationId:++hf(this,Ru)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){Z(this,ia).add(t);const n=pf(t);if(typeof n=="string"){const r=Z(this,ai).get(n);r?r.push(t):Z(this,ai).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Z(this,ia).delete(t)){const n=pf(t);if(typeof n=="string"){const r=Z(this,ai).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&Z(this,ai).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=pf(t);if(typeof n=="string"){const r=Z(this,ai).get(n),a=r==null?void 0:r.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=pf(t);if(typeof n=="string"){const a=(r=Z(this,ai).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){vn.batch(()=>{Z(this,ia).forEach(t=>{this.notify({type:"removed",mutation:t})}),Z(this,ia).clear(),Z(this,ai).clear()})}getAll(){return Array.from(Z(this,ia))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>N1(n,r))}findAll(t={}){return this.getAll().filter(n=>N1(t,n))}notify(t){vn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return vn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Qn))))}},ia=new WeakMap,ai=new WeakMap,Ru=new WeakMap,jS);function pf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var aa,ls,lr,sa,da,$f,_y,AS,BM=(AS=class extends Ul{constructor(n,r){super();Ie(this,da);Ie(this,aa);Ie(this,ls);Ie(this,lr);Ie(this,sa);_e(this,aa,n),this.setOptions(r),this.bindMethods(),Ze(this,da,$f).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const r=this.options;this.options=Z(this,aa).defaultMutationOptions(n),eh(this.options,r)||Z(this,aa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Z(this,lr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ro(r.mutationKey)!==ro(this.options.mutationKey)?this.reset():((a=Z(this,lr))==null?void 0:a.state.status)==="pending"&&Z(this,lr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=Z(this,lr))==null||n.removeObserver(this)}onMutationUpdate(n){Ze(this,da,$f).call(this),Ze(this,da,_y).call(this,n)}getCurrentResult(){return Z(this,ls)}reset(){var n;(n=Z(this,lr))==null||n.removeObserver(this),_e(this,lr,void 0),Ze(this,da,$f).call(this),Ze(this,da,_y).call(this)}mutate(n,r){var a;return _e(this,sa,r),(a=Z(this,lr))==null||a.removeObserver(this),_e(this,lr,Z(this,aa).getMutationCache().build(Z(this,aa),this.options)),Z(this,lr).addObserver(this),Z(this,lr).execute(n)}},aa=new WeakMap,ls=new WeakMap,lr=new WeakMap,sa=new WeakMap,da=new WeakSet,$f=function(){var r;const n=((r=Z(this,lr))==null?void 0:r.state)??FS();_e(this,ls,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},_y=function(n){vn.batch(()=>{var r,a,o,l,u,d,h,g;if(Z(this,sa)&&this.hasListeners()){const m=Z(this,ls).variables,y=Z(this,ls).context,b={client:Z(this,aa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(a=(r=Z(this,sa)).onSuccess)==null||a.call(r,n.data,m,y,b)}catch(E){Promise.reject(E)}try{(l=(o=Z(this,sa)).onSettled)==null||l.call(o,n.data,null,m,y,b)}catch(E){Promise.reject(E)}}else if((n==null?void 0:n.type)==="error"){try{(d=(u=Z(this,sa)).onError)==null||d.call(u,n.error,m,y,b)}catch(E){Promise.reject(E)}try{(g=(h=Z(this,sa)).onSettled)==null||g.call(h,void 0,n.error,m,y,b)}catch(E){Promise.reject(E)}}}this.listeners.forEach(m=>{m(Z(this,ls))})})},AS),Ni,TS,UM=(TS=class extends Ul{constructor(t={}){super();Ie(this,Ni);this.config=t,_e(this,Ni,new Map)}build(t,n,r){const a=n.queryKey,o=n.queryHash??hb(a,n);let l=this.get(o);return l||(l=new OM({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){Z(this,Ni).has(t.queryHash)||(Z(this,Ni).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Z(this,Ni).get(t.queryHash);n&&(t.destroy(),n===t&&Z(this,Ni).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){vn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Z(this,Ni).get(t)}getAll(){return[...Z(this,Ni).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>_1(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>_1(t,r)):n}notify(t){vn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){vn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){vn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ni=new WeakMap,TS),nn,cs,us,Cl,jl,ds,Al,Tl,MS,$M=(MS=class{constructor(e={}){Ie(this,nn);Ie(this,cs);Ie(this,us);Ie(this,Cl);Ie(this,jl);Ie(this,ds);Ie(this,Al);Ie(this,Tl);_e(this,nn,e.queryCache||new UM),_e(this,cs,e.mutationCache||new PM),_e(this,us,e.defaultOptions||{}),_e(this,Cl,new Map),_e(this,jl,new Map),_e(this,ds,0)}mount(){hf(this,ds)._++,Z(this,ds)===1&&(_e(this,Al,fb.subscribe(async e=>{e&&(await this.resumePausedMutations(),Z(this,nn).onFocus())})),_e(this,Tl,th.subscribe(async e=>{e&&(await this.resumePausedMutations(),Z(this,nn).onOnline())})))}unmount(){var e,t;hf(this,ds)._--,Z(this,ds)===0&&((e=Z(this,Al))==null||e.call(this),_e(this,Al,void 0),(t=Z(this,Tl))==null||t.call(this),_e(this,Tl,void 0))}isFetching(e){return Z(this,nn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Z(this,cs).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Z(this,nn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Z(this,nn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(fs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return Z(this,nn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=Z(this,nn).get(r.queryHash),o=a==null?void 0:a.state.data,l=EM(t,o);if(l!==void 0)return Z(this,nn).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return vn.batch(()=>Z(this,nn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Z(this,nn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Z(this,nn);vn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Z(this,nn);return vn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=vn.batch(()=>Z(this,nn).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Qn).catch(Qn)}invalidateQueries(e,t={}){return vn.batch(()=>(Z(this,nn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=vn.batch(()=>Z(this,nn).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,n);return n.throwOnError||(o=o.catch(Qn)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Qn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Z(this,nn).build(this,t);return n.isStaleByTime(fs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qn).catch(Qn)}fetchInfiniteQuery(e){return e.behavior=D1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qn).catch(Qn)}ensureInfiniteQueryData(e){return e.behavior=D1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return th.isOnline()?Z(this,cs).resumePausedMutations():Promise.resolve()}getQueryCache(){return Z(this,nn)}getMutationCache(){return Z(this,cs)}getDefaultOptions(){return Z(this,us)}setDefaultOptions(e){_e(this,us,e)}setQueryDefaults(e,t){Z(this,Cl).set(ro(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Z(this,Cl).values()],n={};return t.forEach(r=>{uu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){Z(this,jl).set(ro(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Z(this,jl).values()],n={};return t.forEach(r=>{uu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Z(this,us).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===pb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Z(this,us).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Z(this,nn).clear(),Z(this,cs).clear()}},nn=new WeakMap,cs=new WeakMap,us=new WeakMap,Cl=new WeakMap,jl=new WeakMap,ds=new WeakMap,Al=new WeakMap,Tl=new WeakMap,MS),HS=T.createContext(void 0),wn=e=>{const t=T.useContext(HS);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},FM=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(HS.Provider,{value:e,children:t})),qS=T.createContext(!1),HM=()=>T.useContext(qS);qS.Provider;function qM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var KM=T.createContext(qM()),GM=()=>T.useContext(KM),VM=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?mb(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},YM=e=>{T.useEffect(()=>{e.clearReset()},[e])},QM=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||mb(n,[e.error,r])),WM=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},XM=(e,t)=>e.isLoading&&e.isFetching&&!t,ZM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,L1=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function JM(e,t,n){var y,b,E,w;const r=HM(),a=GM(),o=wn(),l=o.defaultQueryOptions(e);(b=(y=o.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||b.call(y,l);const u=o.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",WM(l),VM(l,a,u),YM(a);const d=!o.getQueryCache().get(l.queryHash),[h]=T.useState(()=>new t(o,l)),g=h.getOptimisticResult(l),m=!r&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(S=>{const k=m?h.subscribe(vn.batchCalls(S)):Qn;return h.updateResult(),k},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),T.useEffect(()=>{h.setOptions(l)},[l,h]),ZM(l,g))throw L1(l,h,a);if(QM({result:g,errorResetBoundary:a,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw g.error;if((w=(E=o.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||w.call(E,l,g),l.experimental_prefetchInRender&&!du.isServer()&&XM(g,r)){const S=d?L1(l,h,a):u==null?void 0:u.promise;S==null||S.catch(Qn).finally(()=>{h.updateResult()})}return l.notifyOnChangeProps?g:h.trackResult(g)}function tt(e,t){return JM(e,DM)}function rn(e,t){const n=wn(),[r]=T.useState(()=>new BM(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const a=T.useSyncExternalStore(T.useCallback(l=>r.subscribe(vn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=T.useCallback((l,u)=>{r.mutate(l,u).catch(Qn)},[r]);if(a.error&&mb(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}/**
|
|
50
|
+
* react-router v7.14.2
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var I1="popstate";function z1(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function eO(e={}){function t(r,a){var h;let o=(h=a.state)==null?void 0:h.masked,{pathname:l,search:u,hash:d}=o||r.location;return Ny("",{pathname:l,search:u,hash:d},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:fu(a)}return nO(t,n,null,e)}function Ht(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function qr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tO(){return Math.random().toString(36).substring(2,10)}function P1(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ny(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?$l(t):t,state:n,key:t&&t.key||r||tO(),unstable_mask:a}}function fu({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function $l(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function nO(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,l=a.history,u="POP",d=null,h=g();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function g(){return(l.state||{idx:null}).idx}function m(){u="POP";let S=g(),k=S==null?null:S-h;h=S,d&&d({action:u,location:w.location,delta:k})}function y(S,k){u="PUSH";let j=z1(S)?S:Ny(w.location,S,k);h=g()+1;let _=P1(j,h),N=w.createHref(j.unstable_mask||j);try{l.pushState(_,"",N)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;a.location.assign(N)}o&&d&&d({action:u,location:w.location,delta:1})}function b(S,k){u="REPLACE";let j=z1(S)?S:Ny(w.location,S,k);h=g();let _=P1(j,h),N=w.createHref(j.unstable_mask||j);l.replaceState(_,"",N),o&&d&&d({action:u,location:w.location,delta:0})}function E(S){return rO(S)}let w={get action(){return u},get location(){return e(a,l)},listen(S){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(I1,m),d=S,()=>{a.removeEventListener(I1,m),d=null}},createHref(S){return t(a,S)},createURL:E,encodeLocation(S){let k=E(S);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:y,replace:b,go(S){return l.go(S)}};return w}function rO(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ht(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:fu(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function KS(e,t,n="/"){return iO(e,t,n,!1)}function iO(e,t,n,r){let a=typeof t=="string"?$l(t):t,o=fa(a.pathname||"/",n);if(o==null)return null;let l=GS(e);aO(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let h=gO(o);u=pO(l[d],h,r)}return u}function GS(e,t=[],n=[],r="",a=!1){let o=(l,u,d=a,h)=>{let g={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(r)&&d)return;Ht(g.relativePath.startsWith(r),`Absolute route path "${g.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(r.length)}let m=ui([r,g.relativePath]),y=n.concat(g);l.children&&l.children.length>0&&(Ht(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),GS(l.children,t,y,m,d)),!(l.path==null&&!l.index)&&t.push({path:m,score:fO(m,l.index),routesMeta:y})};return e.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))o(l,u);else for(let h of VS(l.path))o(l,u,!0,h)}),t}function VS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let l=VS(r.join("/")),u=[];return u.push(...l.map(d=>d===""?o:[o,d].join("/"))),a&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function aO(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hO(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var sO=/^:[\w-]+$/,oO=3,lO=2,cO=1,uO=10,dO=-2,B1=e=>e==="*";function fO(e,t){let n=e.split("/"),r=n.length;return n.some(B1)&&(r+=dO),t&&(r+=lO),n.filter(a=>!B1(a)).reduce((a,o)=>a+(sO.test(o)?oO:o===""?cO:uO),r)}function hO(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function pO(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],h=u===r.length-1,g=o==="/"?t:t.slice(o.length)||"/",m=nh({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},g),y=d.route;if(!m&&h&&n&&!r[r.length-1].route.index&&(m=nh({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},g)),!m)return null;Object.assign(a,m.params),l.push({params:a,pathname:ui([o,m.pathname]),pathnameBase:vO(ui([o,m.pathnameBase])),route:y}),m.pathnameBase!=="/"&&(o=ui([o,m.pathnameBase]))}return l}function nh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=mO(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:r.reduce((h,{paramName:g,isOptional:m},y)=>{if(g==="*"){let E=u[y]||"";l=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const b=u[y];return m&&!b?h[g]=void 0:h[g]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:l,pattern:e}}function mO(e,t=!1,n=!0){qr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,d,h,g)=>{if(r.push({paramName:u,isOptional:d!=null}),d){let m=g.charAt(h+l.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function gO(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return qr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function fa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var yO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function bO(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?$l(e):e,o;return n?(n=YS(n),n.startsWith("/")?o=U1(n.substring(1),"/"):o=U1(n,t)):o=t,{pathname:o,search:wO(r),hash:EO(a)}}function U1(e,t){let n=rh(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function gg(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function xO(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yb(e){let t=xO(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function jh(e,t,n,r=!1){let a;typeof e=="string"?a=$l(e):(a={...e},Ht(!a.pathname||!a.pathname.includes("?"),gg("?","pathname","search",a)),Ht(!a.pathname||!a.pathname.includes("#"),gg("#","pathname","hash",a)),Ht(!a.search||!a.search.includes("#"),gg("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,u;if(l==null)u=n;else{let m=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),m-=1;a.pathname=y.join("/")}u=m>=0?t[m]:"/"}let d=bO(a,u),h=l&&l!=="/"&&l.endsWith("/"),g=(o||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||g)&&(d.pathname+="/"),d}var YS=e=>e.replace(/\/\/+/g,"/"),ui=e=>YS(e.join("/")),rh=e=>e.replace(/\/+$/,""),vO=e=>rh(e).replace(/^\/*/,"/"),wO=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,EO=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,kO=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function SO(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function _O(e){let t=e.map(n=>n.route.path).filter(Boolean);return ui(t)||"/"}var QS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function WS(e,t){let n=e;if(typeof n!="string"||!yO.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(QS)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),u=fa(l.pathname,t);l.origin===o.origin&&u!=null?n=u+l.search+l.hash:a=!0}catch{qr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var XS=["POST","PUT","PATCH","DELETE"];new Set(XS);var NO=["GET",...XS];new Set(NO);var Fl=T.createContext(null);Fl.displayName="DataRouter";var Ah=T.createContext(null);Ah.displayName="DataRouterState";var ZS=T.createContext(!1);function CO(){return T.useContext(ZS)}var JS=T.createContext({isTransitioning:!1});JS.displayName="ViewTransition";var jO=T.createContext(new Map);jO.displayName="Fetchers";var AO=T.createContext(null);AO.displayName="Await";var Cr=T.createContext(null);Cr.displayName="Navigation";var zu=T.createContext(null);zu.displayName="Location";var Gr=T.createContext({outlet:null,matches:[],isDataRoute:!1});Gr.displayName="Route";var bb=T.createContext(null);bb.displayName="RouteError";var e_="REACT_ROUTER_ERROR",TO="REDIRECT",MO="ROUTE_ERROR_RESPONSE";function OO(e){if(e.startsWith(`${e_}:${TO}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function DO(e){if(e.startsWith(`${e_}:${MO}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new kO(t.status,t.statusText,t.data)}catch{}}function RO(e,{relative:t}={}){Ht(Hl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=T.useContext(Cr),{hash:a,pathname:o,search:l}=Pu(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:ui([n,o])),r.createHref({pathname:u,search:l,hash:a})}function Hl(){return T.useContext(zu)!=null}function hi(){return Ht(Hl(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(zu).location}var t_="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function n_(e){T.useContext(Cr).static||T.useLayoutEffect(e)}function gs(){let{isDataRoute:e}=T.useContext(Gr);return e?QO():LO()}function LO(){Ht(Hl(),"useNavigate() may be used only in the context of a <Router> component.");let e=T.useContext(Fl),{basename:t,navigator:n}=T.useContext(Cr),{matches:r}=T.useContext(Gr),{pathname:a}=hi(),o=JSON.stringify(yb(r)),l=T.useRef(!1);return n_(()=>{l.current=!0}),T.useCallback((d,h={})=>{if(qr(l.current,t_),!l.current)return;if(typeof d=="number"){n.go(d);return}let g=jh(d,JSON.parse(o),a,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:ui([t,g.pathname])),(h.replace?n.replace:n.push)(g,h.state,h)},[t,n,o,a,e])}var IO=T.createContext(null);function zO(e){let t=T.useContext(Gr).outlet;return T.useMemo(()=>t&&T.createElement(IO.Provider,{value:e},t),[t,e])}function r_(){let{matches:e}=T.useContext(Gr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Pu(e,{relative:t}={}){let{matches:n}=T.useContext(Gr),{pathname:r}=hi(),a=JSON.stringify(yb(n));return T.useMemo(()=>jh(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function PO(e,t){return i_(e,t)}function i_(e,t,n){var S;Ht(Hl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=T.useContext(Cr),{matches:a}=T.useContext(Gr),o=a[a.length-1],l=o?o.params:{},u=o?o.pathname:"/",d=o?o.pathnameBase:"/",h=o&&o.route;{let k=h&&h.path||"";s_(u,!h||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let g=hi(),m;if(t){let k=typeof t=="string"?$l(t):t;Ht(d==="/"||((S=k.pathname)==null?void 0:S.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${k.pathname}" was given in the \`location\` prop.`),m=k}else m=g;let y=m.pathname||"/",b=y;if(d!=="/"){let k=d.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(k.length).join("/")}let E=KS(e,{pathname:b});qr(h||E!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),qr(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=HO(E&&E.map(k=>Object.assign({},k,{params:Object.assign({},l,k.params),pathname:ui([d,r.encodeLocation?r.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?d:ui([d,r.encodeLocation?r.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),a,n);return t&&w?T.createElement(zu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},w):w}function BO(){let e=YO(),t=SO(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:o},"ErrorBoundary")," or"," ",T.createElement("code",{style:o},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),n?T.createElement("pre",{style:a},n):null,l)}var UO=T.createElement(BO,null),a_=class extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=DO(e.digest);n&&(e=n)}let t=e!==void 0?T.createElement(Gr.Provider,{value:this.props.routeContext},T.createElement(bb.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?T.createElement($O,{error:e},t):t}};a_.contextType=ZS;var yg=new WeakMap;function $O({children:e,error:t}){let{basename:n}=T.useContext(Cr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=OO(t.digest);if(r){let a=yg.get(t);if(a)throw a;let o=WS(r.location,n);if(QS&&!yg.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw yg.set(t,l),l}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function FO({routeContext:e,match:t,children:n}){let r=T.useContext(Fl);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),T.createElement(Gr.Provider,{value:e},n)}function HO(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,o=r==null?void 0:r.errors;if(o!=null){let g=a.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);Ht(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,g+1))}let l=!1,u=-1;if(n&&r){l=r.renderFallback;for(let g=0;g<a.length;g++){let m=a[g];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(u=g),m.route.id){let{loaderData:y,errors:b}=r,E=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||E){n.isStatic&&(l=!0),u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}}let d=n==null?void 0:n.onError,h=r&&d?(g,m)=>{var y,b;d(g,{location:r.location,params:((b=(y=r.matches)==null?void 0:y[0])==null?void 0:b.params)??{},unstable_pattern:_O(r.matches),errorInfo:m})}:void 0;return a.reduceRight((g,m,y)=>{let b,E=!1,w=null,S=null;r&&(b=o&&m.route.id?o[m.route.id]:void 0,w=m.route.errorElement||UO,l&&(u<0&&y===0?(s_("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,S=null):u===y&&(E=!0,S=m.route.hydrateFallbackElement||null)));let k=t.concat(a.slice(0,y+1)),j=()=>{let _;return b?_=w:E?_=S:m.route.Component?_=T.createElement(m.route.Component,null):m.route.element?_=m.route.element:_=g,T.createElement(FO,{match:m,routeContext:{outlet:g,matches:k,isDataRoute:r!=null},children:_})};return r&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?T.createElement(a_,{location:r.location,revalidation:r.revalidation,component:w,error:b,children:j(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:h}):j()},null)}function xb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qO(e){let t=T.useContext(Fl);return Ht(t,xb(e)),t}function KO(e){let t=T.useContext(Ah);return Ht(t,xb(e)),t}function GO(e){let t=T.useContext(Gr);return Ht(t,xb(e)),t}function vb(e){let t=GO(e),n=t.matches[t.matches.length-1];return Ht(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function VO(){return vb("useRouteId")}function YO(){var r;let e=T.useContext(bb),t=KO("useRouteError"),n=vb("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function QO(){let{router:e}=qO("useNavigate"),t=vb("useNavigate"),n=T.useRef(!1);return n_(()=>{n.current=!0}),T.useCallback(async(a,o={})=>{qr(n.current,t_),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var $1={};function s_(e,t,n){!t&&!$1[e]&&($1[e]=!0,qr(!1,n))}T.memo(WO);function WO({routes:e,future:t,state:n,isStatic:r,onError:a}){return i_(e,void 0,{state:n,isStatic:r,onError:a})}function XO({to:e,replace:t,state:n,relative:r}){Ht(Hl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=T.useContext(Cr);qr(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=T.useContext(Gr),{pathname:l}=hi(),u=gs(),d=jh(e,yb(o),l,r==="path"),h=JSON.stringify(d);return T.useEffect(()=>{u(JSON.parse(h),{replace:t,state:n,relative:r})},[u,h,r,t,n]),null}function ZO(e){return zO(e.context)}function xn(e){Ht(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function JO({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1,unstable_useTransitions:l}){Ht(!Hl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),d=T.useMemo(()=>({basename:u,navigator:a,static:o,unstable_useTransitions:l,future:{}}),[u,a,o,l]);typeof n=="string"&&(n=$l(n));let{pathname:h="/",search:g="",hash:m="",state:y=null,key:b="default",unstable_mask:E}=n,w=T.useMemo(()=>{let S=fa(h,u);return S==null?null:{location:{pathname:S,search:g,hash:m,state:y,key:b,unstable_mask:E},navigationType:r}},[u,h,g,m,y,b,r,E]);return qr(w!=null,`<Router basename="${u}"> is not able to match the URL "${h}${g}${m}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:T.createElement(Cr.Provider,{value:d},T.createElement(zu.Provider,{children:t,value:w}))}function eD({children:e,location:t}){return PO(Cy(e),t)}function Cy(e,t=[]){let n=[];return T.Children.forEach(e,(r,a)=>{if(!T.isValidElement(r))return;let o=[...t,a];if(r.type===T.Fragment){n.push.apply(n,Cy(r.props.children,o));return}Ht(r.type===xn,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ht(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Cy(r.props.children,o)),n.push(l)}),n}var Ff="get",Hf="application/x-www-form-urlencoded";function Th(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function tD(e){return Th(e)&&e.tagName.toLowerCase()==="button"}function nD(e){return Th(e)&&e.tagName.toLowerCase()==="form"}function rD(e){return Th(e)&&e.tagName.toLowerCase()==="input"}function iD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function aD(e,t){return e.button===0&&(!t||t==="_self")&&!iD(e)}function jy(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function sD(e,t){let n=jy(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(o=>{n.append(a,o)})}),n}var mf=null;function oD(){if(mf===null)try{new FormData(document.createElement("form"),0),mf=!1}catch{mf=!0}return mf}var lD=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bg(e){return e!=null&&!lD.has(e)?(qr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Hf}"`),null):e}function cD(e,t){let n,r,a,o,l;if(nD(e)){let u=e.getAttribute("action");r=u?fa(u,t):null,n=e.getAttribute("method")||Ff,a=bg(e.getAttribute("enctype"))||Hf,o=new FormData(e)}else if(tD(e)||rD(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?fa(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Ff,a=bg(e.getAttribute("formenctype"))||bg(u.getAttribute("enctype"))||Hf,o=new FormData(u,e),!oD()){let{name:h,type:g,value:m}=e;if(g==="image"){let y=h?`${h}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else h&&o.append(h,m)}}else{if(Th(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ff,r=null,a=Hf,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function wb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function o_(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&fa(a.pathname,t)==="/"?a.pathname=`${rh(t)}/_root.${r}`:a.pathname=`${rh(a.pathname)}.${r}`,a}async function uD(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dD(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function fD(e,t,n){let r=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await uD(o,n);return l.links?l.links():[]}return[]}));return gD(r.flat(1).filter(dD).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function F1(e,t,n,r,a,o){let l=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,u=(d,h)=>{var g;return n[h].pathname!==d.pathname||((g=n[h].route.path)==null?void 0:g.endsWith("*"))&&n[h].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,h)=>l(d,h)||u(d,h)):o==="data"?t.filter((d,h)=>{var m;let g=r.routes[d.route.id];if(!g||!g.hasLoader)return!1;if(l(d,h)||u(d,h))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function hD(e,t,{includeHydrateFallback:n}={}){return pD(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function pD(e){return[...new Set(e)]}function mD(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function gD(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let o=JSON.stringify(mD(a));return n.has(o)||(n.add(o),r.push({key:o,link:a})),r},[])}function Eb(){let e=T.useContext(Fl);return wb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function yD(){let e=T.useContext(Ah);return wb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var kb=T.createContext(void 0);kb.displayName="FrameworkContext";function Sb(){let e=T.useContext(kb);return wb(e,"You must render this element inside a <HydratedRouter> element"),e}function bD(e,t){let n=T.useContext(kb),[r,a]=T.useState(!1),[o,l]=T.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:h,onMouseLeave:g,onTouchStart:m}=t,y=T.useRef(null);T.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let w=k=>{k.forEach(j=>{l(j.isIntersecting)})},S=new IntersectionObserver(w,{threshold:.5});return y.current&&S.observe(y.current),()=>{S.disconnect()}}},[e]),T.useEffect(()=>{if(r){let w=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(w)}}},[r]);let b=()=>{a(!0)},E=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,y,{}]:[o,y,{onFocus:Kc(u,b),onBlur:Kc(d,E),onMouseEnter:Kc(h,b),onMouseLeave:Kc(g,E),onTouchStart:Kc(m,b)}]:[!1,y,{}]}function Kc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function xD({page:e,...t}){let n=CO(),{router:r}=Eb(),a=T.useMemo(()=>KS(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?T.createElement(wD,{page:e,matches:a,...t}):T.createElement(ED,{page:e,matches:a,...t}):null}function vD(e){let{manifest:t,routeModules:n}=Sb(),[r,a]=T.useState([]);return T.useEffect(()=>{let o=!1;return fD(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),r}function wD({page:e,matches:t,...n}){let r=hi(),{future:a}=Sb(),{basename:o}=Eb(),l=T.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let u=o_(e,o,a.unstable_trailingSlashAwareDataRequests,"rsc"),d=!1,h=[];for(let g of t)typeof g.route.shouldRevalidate=="function"?d=!0:h.push(g.route.id);return d&&h.length>0&&u.searchParams.set("_routes",h.join(",")),[u.pathname+u.search]},[o,a.unstable_trailingSlashAwareDataRequests,e,r,t]);return T.createElement(T.Fragment,null,l.map(u=>T.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...n})))}function ED({page:e,matches:t,...n}){let r=hi(),{future:a,manifest:o,routeModules:l}=Sb(),{basename:u}=Eb(),{loaderData:d,matches:h}=yD(),g=T.useMemo(()=>F1(e,t,h,o,r,"data"),[e,t,h,o,r]),m=T.useMemo(()=>F1(e,t,h,o,r,"assets"),[e,t,h,o,r]),y=T.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,S=!1;if(t.forEach(j=>{var N;let _=o.routes[j.route.id];!_||!_.hasLoader||(!g.some(O=>O.route.id===j.route.id)&&j.route.id in d&&((N=l[j.route.id])!=null&&N.shouldRevalidate)||_.hasClientLoader?S=!0:w.add(j.route.id))}),w.size===0)return[];let k=o_(e,u,a.unstable_trailingSlashAwareDataRequests,"data");return S&&w.size>0&&k.searchParams.set("_routes",t.filter(j=>w.has(j.route.id)).map(j=>j.route.id).join(",")),[k.pathname+k.search]},[u,a.unstable_trailingSlashAwareDataRequests,d,r,o,g,t,e,l]),b=T.useMemo(()=>hD(m,o),[m,o]),E=vD(m);return T.createElement(T.Fragment,null,y.map(w=>T.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),b.map(w=>T.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),E.map(({key:w,link:S})=>T.createElement("link",{key:w,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function kD(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var SD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{SD&&(window.__reactRouterVersion="7.14.2")}catch{}function _D({basename:e,children:t,unstable_useTransitions:n,window:r}){let a=T.useRef();a.current==null&&(a.current=eO({window:r,v5Compat:!0}));let o=a.current,[l,u]=T.useState({action:o.action,location:o.location}),d=T.useCallback(h=>{n===!1?u(h):T.startTransition(()=>u(h))},[n]);return T.useLayoutEffect(()=>o.listen(d),[o,d]),T.createElement(JO,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:n})}var l_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fo=T.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:o,replace:l,unstable_mask:u,state:d,target:h,to:g,preventScrollReset:m,viewTransition:y,unstable_defaultShouldRevalidate:b,...E},w){let{basename:S,navigator:k,unstable_useTransitions:j}=T.useContext(Cr),_=typeof g=="string"&&l_.test(g),N=WS(g,S);g=N.to;let O=RO(g,{relative:a}),A=hi(),M=null;if(u){let H=jh(u,[],A.unstable_mask?A.unstable_mask.pathname:"/",!0);S!=="/"&&(H.pathname=H.pathname==="/"?S:ui([S,H.pathname])),M=k.createHref(H)}let[I,F,$]=bD(r,E),U=jD(g,{replace:l,unstable_mask:u,state:d,target:h,preventScrollReset:m,relative:a,viewTransition:y,unstable_defaultShouldRevalidate:b,unstable_useTransitions:j});function q(H){t&&t(H),H.defaultPrevented||U(H)}let Q=!(N.isExternal||o),B=T.createElement("a",{...E,...$,href:(Q?M:void 0)||N.absoluteURL||O,onClick:Q?q:t,ref:kD(w,F),target:h,"data-discover":!_&&n==="render"?"true":void 0});return I&&!_?T.createElement(T.Fragment,null,B,T.createElement(xD,{page:O})):B});fo.displayName="Link";var c_=T.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:o,to:l,viewTransition:u,children:d,...h},g){let m=Pu(l,{relative:h.relative}),y=hi(),b=T.useContext(Ah),{navigator:E,basename:w}=T.useContext(Cr),S=b!=null&&DD(m)&&u===!0,k=E.encodeLocation?E.encodeLocation(m).pathname:m.pathname,j=y.pathname,_=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(j=j.toLowerCase(),_=_?_.toLowerCase():null,k=k.toLowerCase()),_&&w&&(_=fa(_,w)||_);const N=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let O=j===k||!a&&j.startsWith(k)&&j.charAt(N)==="/",A=_!=null&&(_===k||!a&&_.startsWith(k)&&_.charAt(k.length)==="/"),M={isActive:O,isPending:A,isTransitioning:S},I=O?t:void 0,F;typeof r=="function"?F=r(M):F=[r,O?"active":null,A?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let $=typeof o=="function"?o(M):o;return T.createElement(fo,{...h,"aria-current":I,className:F,ref:g,style:$,to:l,viewTransition:u},typeof d=="function"?d(M):d)});c_.displayName="NavLink";var ND=T.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:l=Ff,action:u,onSubmit:d,relative:h,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:y,...b},E)=>{let{unstable_useTransitions:w}=T.useContext(Cr),S=MD(),k=OD(u,{relative:h}),j=l.toLowerCase()==="get"?"get":"post",_=typeof u=="string"&&l_.test(u),N=O=>{if(d&&d(O),O.defaultPrevented)return;O.preventDefault();let A=O.nativeEvent.submitter,M=(A==null?void 0:A.getAttribute("formmethod"))||l,I=()=>S(A||O.currentTarget,{fetcherKey:t,method:M,navigate:n,replace:a,state:o,relative:h,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:y});w&&n!==!1?T.startTransition(()=>I()):I()};return T.createElement("form",{ref:E,method:j,action:k,onSubmit:r?d:N,...b,"data-discover":!_&&e==="render"?"true":void 0})});ND.displayName="Form";function CD(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function u_(e){let t=T.useContext(Fl);return Ht(t,CD(e)),t}function jD(e,{target:t,replace:n,unstable_mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:u,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h}={}){let g=gs(),m=hi(),y=Pu(e,{relative:l});return T.useCallback(b=>{if(aD(b,t)){b.preventDefault();let E=n!==void 0?n:fu(m)===fu(y),w=()=>g(e,{replace:E,unstable_mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:u,unstable_defaultShouldRevalidate:d});h?T.startTransition(()=>w()):w()}},[m,g,y,n,r,a,t,e,o,l,u,d,h])}function d_(e){qr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=T.useRef(jy(e)),n=T.useRef(!1),r=hi(),a=T.useMemo(()=>sD(r.search,n.current?null:t.current),[r.search]),o=gs(),l=T.useCallback((u,d)=>{const h=jy(typeof u=="function"?u(new URLSearchParams(a)):u);n.current=!0,o("?"+h,d)},[o,a]);return[a,l]}var AD=0,TD=()=>`__${String(++AD)}__`;function MD(){let{router:e}=u_("useSubmit"),{basename:t}=T.useContext(Cr),n=VO(),r=e.fetch,a=e.navigate;return T.useCallback(async(o,l={})=>{let{action:u,method:d,encType:h,formData:g,body:m}=cD(o,t);if(l.navigate===!1){let y=l.fetcherKey||TD();await r(y,n,l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:m,formMethod:l.method||d,formEncType:l.encType||h,flushSync:l.flushSync})}else await a(l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:m,formMethod:l.method||d,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,a,t,n])}function OD(e,{relative:t}={}){let{basename:n}=T.useContext(Cr),r=T.useContext(Gr);Ht(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...Pu(e||".",{relative:t})},l=hi();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),d=u.getAll("index");if(d.some(g=>g==="")){u.delete("index"),d.filter(m=>m).forEach(m=>u.append("index",m));let g=u.toString();o.search=g?`?${g}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ui([n,o.pathname])),fu(o)}function DD(e,{relative:t}={}){let n=T.useContext(JS);Ht(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=u_("useViewTransitionState"),a=Pu(e,{relative:t});if(!n.isTransitioning)return!1;let o=fa(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=fa(n.nextLocation.pathname,r)||n.nextLocation.pathname;return nh(a.pathname,l)!=null||nh(a.pathname,o)!=null}OS();/**
|
|
61
|
+
* @license lucide-react v0.544.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const RD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),LD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),H1=e=>{const t=LD(e);return t.charAt(0).toUpperCase()+t.slice(1)},f_=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),ID=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
66
|
+
* @license lucide-react v0.544.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/var zD={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
71
|
+
* @license lucide-react v0.544.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const PD=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...u},d)=>T.createElement("svg",{ref:d,...zD,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:f_("lucide",a),...!o&&!ID(u)&&{"aria-hidden":"true"},...u},[...l.map(([h,g])=>T.createElement(h,g)),...Array.isArray(o)?o:[o]]));/**
|
|
76
|
+
* @license lucide-react v0.544.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Oe=(e,t)=>{const n=T.forwardRef(({className:r,...a},o)=>T.createElement(PD,{ref:o,iconNode:t,className:f_(`lucide-${RD(H1(e))}`,`lucide-${e}`,r),...a}));return n.displayName=H1(e),n};/**
|
|
81
|
+
* @license lucide-react v0.544.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const BD=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Mh=Oe("activity",BD);/**
|
|
86
|
+
* @license lucide-react v0.544.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const UD=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],h_=Oe("arrow-left",UD);/**
|
|
91
|
+
* @license lucide-react v0.544.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const $D=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],FD=Oe("arrow-up",$D);/**
|
|
96
|
+
* @license lucide-react v0.544.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const HD=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],qD=Oe("brain",HD);/**
|
|
101
|
+
* @license lucide-react v0.544.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const KD=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],GD=Oe("check",KD);/**
|
|
106
|
+
* @license lucide-react v0.544.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const VD=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bu=Oe("chevron-down",VD);/**
|
|
111
|
+
* @license lucide-react v0.544.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const YD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Uu=Oe("chevron-right",YD);/**
|
|
116
|
+
* @license lucide-react v0.544.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const QD=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],WD=Oe("chevron-up",QD);/**
|
|
121
|
+
* @license lucide-react v0.544.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const XD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],hu=Oe("circle-alert",XD);/**
|
|
126
|
+
* @license lucide-react v0.544.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const ZD=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ih=Oe("circle-check-big",ZD);/**
|
|
131
|
+
* @license lucide-react v0.544.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const JD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],pu=Oe("circle-check",JD);/**
|
|
136
|
+
* @license lucide-react v0.544.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const eR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],p_=Oe("circle-x",eR);/**
|
|
141
|
+
* @license lucide-react v0.544.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const tR=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],m_=Oe("clock",tR);/**
|
|
146
|
+
* @license lucide-react v0.544.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const nR=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],rR=Oe("copy",nR);/**
|
|
151
|
+
* @license lucide-react v0.544.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const iR=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],g_=Oe("cpu",iR);/**
|
|
156
|
+
* @license lucide-react v0.544.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const aR=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],y_=Oe("download",aR);/**
|
|
161
|
+
* @license lucide-react v0.544.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const sR=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],oR=Oe("eye",sR);/**
|
|
166
|
+
* @license lucide-react v0.544.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const lR=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],q1=Oe("file-code",lR);/**
|
|
171
|
+
* @license lucide-react v0.544.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const cR=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],$u=Oe("file-text",cR);/**
|
|
176
|
+
* @license lucide-react v0.544.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const uR=[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],dR=Oe("folder-git-2",uR);/**
|
|
181
|
+
* @license lucide-react v0.544.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const fR=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],b_=Oe("folder-open",fR);/**
|
|
186
|
+
* @license lucide-react v0.544.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const hR=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],mu=Oe("folder",hR);/**
|
|
191
|
+
* @license lucide-react v0.544.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const pR=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],mR=Oe("funnel",pR);/**
|
|
196
|
+
* @license lucide-react v0.544.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const gR=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],yR=Oe("git-branch",gR);/**
|
|
201
|
+
* @license lucide-react v0.544.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const bR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],xR=Oe("globe",bR);/**
|
|
206
|
+
* @license lucide-react v0.544.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const vR=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],wR=Oe("history",vR);/**
|
|
211
|
+
* @license lucide-react v0.544.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const ER=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],kR=Oe("house",ER);/**
|
|
216
|
+
* @license lucide-react v0.544.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const SR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],_R=Oe("image",SR);/**
|
|
221
|
+
* @license lucide-react v0.544.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const NR=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],CR=Oe("kanban",NR);/**
|
|
226
|
+
* @license lucide-react v0.544.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const jR=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],x_=Oe("layout-grid",jR);/**
|
|
231
|
+
* @license lucide-react v0.544.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const AR=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],pt=Oe("loader-circle",AR);/**
|
|
236
|
+
* @license lucide-react v0.544.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const TR=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],K1=Oe("message-circle",TR);/**
|
|
241
|
+
* @license lucide-react v0.544.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const MR=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],OR=Oe("message-square",MR);/**
|
|
246
|
+
* @license lucide-react v0.544.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const DR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],RR=Oe("panel-right-close",DR);/**
|
|
251
|
+
* @license lucide-react v0.544.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const LR=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],IR=Oe("paperclip",LR);/**
|
|
256
|
+
* @license lucide-react v0.544.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const zR=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],PR=Oe("pause",zR);/**
|
|
261
|
+
* @license lucide-react v0.544.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const BR=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],_b=Oe("pen-line",BR);/**
|
|
266
|
+
* @license lucide-react v0.544.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const UR=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],$R=Oe("pencil",UR);/**
|
|
271
|
+
* @license lucide-react v0.544.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const FR=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Fu=Oe("play",FR);/**
|
|
276
|
+
* @license lucide-react v0.544.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const HR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Vr=Oe("plus",HR);/**
|
|
281
|
+
* @license lucide-react v0.544.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const qR=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],KR=Oe("puzzle",qR);/**
|
|
286
|
+
* @license lucide-react v0.544.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const GR=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],v_=Oe("radio",GR);/**
|
|
291
|
+
* @license lucide-react v0.544.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const VR=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ps=Oe("refresh-cw",VR);/**
|
|
296
|
+
* @license lucide-react v0.544.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const YR=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],w_=Oe("rotate-ccw",YR);/**
|
|
301
|
+
* @license lucide-react v0.544.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const QR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],WR=Oe("rows-3",QR);/**
|
|
306
|
+
* @license lucide-react v0.544.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const XR=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],ql=Oe("save",XR);/**
|
|
311
|
+
* @license lucide-react v0.544.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const ZR=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],E_=Oe("scroll-text",ZR);/**
|
|
316
|
+
* @license lucide-react v0.544.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const JR=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ah=Oe("search",JR);/**
|
|
321
|
+
* @license lucide-react v0.544.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const eL=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],tL=Oe("send",eL);/**
|
|
326
|
+
* @license lucide-react v0.544.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const nL=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],k_=Oe("settings",nL);/**
|
|
331
|
+
* @license lucide-react v0.544.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const rL=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],iL=Oe("skull",rL);/**
|
|
336
|
+
* @license lucide-react v0.544.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const aL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Nb=Oe("square",aL);/**
|
|
341
|
+
* @license lucide-react v0.544.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const sL=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],S_=Oe("terminal",sL);/**
|
|
346
|
+
* @license lucide-react v0.544.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const oL=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],lL=Oe("timer-reset",oL);/**
|
|
351
|
+
* @license lucide-react v0.544.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const cL=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ho=Oe("trash-2",cL);/**
|
|
356
|
+
* @license lucide-react v0.544.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const uL=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],dL=Oe("triangle-alert",uL);/**
|
|
361
|
+
* @license lucide-react v0.544.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const fL=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],__=Oe("users",fL);/**
|
|
366
|
+
* @license lucide-react v0.544.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const hL=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Cb=Oe("workflow",hL);/**
|
|
371
|
+
* @license lucide-react v0.544.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const pL=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],N_=Oe("wrench",pL);/**
|
|
376
|
+
* @license lucide-react v0.544.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const mL=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_r=Oe("x",mL);/**
|
|
381
|
+
* @license lucide-react v0.544.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const gL=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],yL=Oe("zap",gL),bL={"app.title":"SPS Console","nav.chat":"Chat","nav.projects":"Projects","nav.board":"Board","nav.workers":"Workers","nav.logs":"Logs","nav.skills":"Skills","nav.system":"System","nav.processes":"Processes","nav.audit":"Audit Log","nav.memory":"Memory","nav.plugins":"Plugins","plugins.h1":"Plugins 🧩","plugins.desc":"Global plugin toggles. Applies to newly dispatched cards.","plugins.tab.memory":"Memory","plugins.tab.channel":"Channel","plugins.tab.model":"Model","plugins.tab.tool":"Tool","plugins.comingSoon":"Coming soon","plugins.model.title":"Agent models","plugins.model.desc":"Configure both agents (global). worker=claude executes, review·designer=openai supervises+orchestrates.","plugins.model.worker":"Worker (executes / claude)","plugins.model.reviewer":"Review·Designer (supervisor / openai)","plugins.model.provider":"Provider","plugins.model.model":"Model","plugins.model.official":"Official claude (default)","plugins.model.save":"Save","plugins.model.saved":"Saved","plugins.model.error":"Save failed","nav.arrange":"Arrange","arrange.h1":"SmartArrange 🧭","arrange.project":"Project","arrange.none":'Not started — click "Start" above to launch (task list appears in seconds; approve to run). If the dropdown is empty, create a project in SmartArrange mode first.',"arrange.start":"Start","arrange.stop":"Stop","arrange.startErr":"Start/stop failed","arrange.view":"Toggle canvas view","arrange.viewFree":"Free","arrange.viewLane":"Lanes","arrange.starting":"Starting — breaking down the task list…","arrange.planning":"Breaking down the task list…","arrange.orchestrating":"Orchestrating…","arrange.status":"Status","arrange.goal":"Goal","arrange.plan":"Task list + card chain","arrange.approve":"Approve plan","arrange.approveErr":"Approve failed","arrange.tasks":"Task list","arrange.collapse":"Collapse","arrange.expand":"Expand task list","arrange.noCards":"No cards yet — waiting for the orchestrator to dispatch (starts after approval).","arrange.cardPrompt":"Card prompt","arrange.cardSkills":"Skills","arrange.cardTask":"Task","arrange.cardLog":"Log","arrange.close":"Close","arrange.cardsCount":"cards","nav.aria":"Main navigation","memory.sub":"Cross-project memory · agentmemory proxied behind console auth","memory.searchPlaceholder":"Search memory… (e.g. how to fix the art race)","memory.search":"Search","memory.results":"Results","memory.rawHint":"(raw observation · distilled lessons appear after live capture + compression)","memory.sessions":"Recent sessions","memory.empty":"No memory yet · accumulates after live capture (P1)","processes.title":"Processes","processes.subtitle":"Claude processes launched by SPS ACP (others, e.g. your own session, are not shown)","processes.refresh":"Refresh","processes.aliveCount":"{n} running","processes.col.kind":"Type","processes.col.slot":"Slot","processes.col.project":"Project","processes.col.state":"State","processes.col.memory":"Memory","processes.col.action":"Action","processes.empty":"No SPS processes","processes.filter.all":"All","processes.filter.alive":"Running","processes.filter.offline":"Offline","processes.kind.all":"All types","processes.kind.worker":"Worker","processes.kind.chat":"Chat","processes.kill":"Kill","processes.killConfirm":"Kill process {slot}?","audit.title":"Audit Log","audit.subtitle":"Project lifecycle: create / modify / delete","audit.refresh":"Refresh","audit.filter.all":"All","audit.action.create":"Create","audit.action.modify":"Modify","audit.action.delete":"Delete","audit.action.daemon":"Daemon","audit.col.time":"Time","audit.col.action":"Action","audit.col.project":"Project","audit.col.detail":"Detail","audit.empty":"No audit records","lang.toggle.aria":"Switch interface language","lang.en":"EN","lang.zh":"中","status.server":"server","status.offline":"offline","status.sse.open":"SSE","status.sse.connecting":"SSE·connect","status.sse.down":"SSE·down","status.pipelines.tooltip":"Active pipelines","status.workers.tooltip":"Active workers","status.pipeline.unit":"pipeline","status.worker.unit":"worker","common.save":"Save","common.cancel":"Cancel","common.delete":"Delete","common.confirm":"Confirm","common.create":"Create","common.edit":"Edit","common.close":"Close","common.loading":"Loading…","common.error":"Error","common.retry":"Retry","common.empty":"Nothing here yet","common.search":"Search","common.refresh":"Refresh","common.copy":"Copy","common.copied":"Copied","common.yes":"Yes","common.no":"No","common.required":"Required","common.optional":"Optional","common.ok":"OK","projects.title":"Projects 🎯","projects.count":"{count} local project(s)","projects.refresh.hint":"Click refresh to retry","projects.new":"New project","projects.sort.label":"Sort by","projects.sort.activity":"Activity","projects.sort.date":"Modified","projects.sort.name":"Name","projects.load.failed":"Failed to load","projects.empty.title":"No projects yet ✨","projects.empty.hint":"Run {cmd} to create your first project.","newProject.title":"New project","newProject.subtitle":"Set up a project; the worker will run automatically","newProject.field.mode":"Execution mode","newProject.field.mode.pipeline":"Auto pipeline","newProject.field.mode.pipelineDesc":"Fixed-stage pipeline, claude worker runs cards","newProject.field.mode.smart":"SmartArrange","newProject.field.mode.smartDesc":"OpenAI monitor dispatches cards + claude worker","newProject.field.mode.pipelineHint":"Classic mode: you create cards, worker runs them by stage.","newProject.field.mode.smartHint":"Give one goal; the OpenAI monitor probes output each round, dispatches task cards dynamically, drives claude to finish.","newProject.field.goal":"Goal (GOAL.md)","newProject.field.goal.hint":"Written to docs/GOAL.md; SmartArrange derives the task list from it. Missing → tick skips the project.","newProject.field.goal.placeholder":"e.g. Build a pure-frontend, single-file Snake browser game…","newProject.field.name":"Project name","newProject.field.name.help":"Lowercase letters, digits, _ and - only","newProject.field.dir":"Parent directory","newProject.field.dir.preview":"Project will be created at →","newProject.field.dir.help":"Absolute path; will be created if missing","newProject.field.branch":"Merge target branch","newProject.field.branch.help":"Default: main","newProject.field.maxWorkers":"Max concurrent workers","newProject.field.maxWorkers.help":"Per-project worker count (1 recommended)","newProject.field.ackTimeout":"ACK timeout (seconds)","newProject.field.ackTimeout.help":"How long to wait for the worker to ACK (default 300)","newProject.field.gitlabProject":"GitLab/GitHub remote","newProject.field.gitlabProject.help":"Format: user/repo (optional)","newProject.field.matrixRoom":"Matrix room ID","newProject.field.matrixRoom.help":"Optional, falls back to global default","newProject.field.git":"Enable git","newProject.field.git.help":"Off → non-code project, no commit/push/MR steps","newProject.submit":"Create project","newProject.creating":"Creating…","newProject.created":"Project created","newProject.error.dirRequired":"Project directory is required","newProject.dir.browse":"Browse","newProject.dir.browseAria":"Pick directory","newProject.back":"Back","newProject.back.aria":"Back to projects","newProject.field.name.placeholder":"e.g. acme-web","newProject.field.name.example":"Letters, digits, underscore, hyphen. e.g. acme-web","newProject.field.name.invalid":"Name only allows a-z A-Z 0-9 _ -","newProject.field.dir.long":"Absolute path of the PARENT directory. The project gets its own <name> subdir created under it (like git clone), avoiding accidental use of a shared directory.","newProject.field.dir.placeholder":"/home/you/projects","newProject.field.dir.createIfMissing":"Auto-create if missing (recommended — otherwise .claude/ install gets skipped)","newProject.field.dir.pickerTitle":"Pick project directory","newProject.field.maxWorkers.short":"Max workers","newProject.field.ackTimeout.minutes":"ACK timeout (min)","newProject.field.ackTimeout.minutes.help":"How long after dispatch before the worker is considered failed if no ACK","newProject.field.git.label":"Enable Git (worker auto commit + push)","newProject.field.git.detail":"When off, the worker only does the task, no version control — fits docs / data-processing non-code projects.","newProject.field.git.branch":"Merge branch","newProject.field.gitlabProject.label":"Git remote project path","newProject.field.gitlabProject.help2":"Like user/repo. Empty = skip remote API (commit/push local only)","newProject.field.gitlabProject.placeholder":"user/repo","newProject.field.gitlabProjectId":"GitLab project ID","newProject.field.gitlabProjectId.help":"Number; leave blank for GitHub","newProject.field.gitlabProjectId.placeholder":"42","newProject.section.notifications":"Notifications","newProject.field.matrixRoom.label":"Matrix room ID","newProject.field.matrixRoom.help2":"Empty = use global config; blank = no notifications","newProject.field.matrixRoom.placeholder":"!abc:matrix.example.com","newProject.error.create.title":"Create failed","projectDetail.tab.pipeline":"Pipeline","projectDetail.tab.conf":"Conf","projectDetail.tab.delete":"Delete project","projectDetail.delete.title":"Delete this project","projectDetail.delete.warn":"This will remove the project conf, runtime, and worktrees. The repository under {repoDir} is untouched.","projectDetail.delete.confirmLabel":"Type the project name to confirm","projectDetail.delete.button":"Delete project","projectDetail.delete.deleting":"Deleting…","projectDetail.lastActivity":"Last activity","projectDetail.notFound":"Project not found","projectDetail.notFoundHint":"It may have been deleted or renamed.","projectDetail.backToList":"Back to projects","pipeline.editor.title":"Pipeline YAML","pipeline.editor.savedAt":"Saved {time}","pipeline.editor.unsaved":"Unsaved changes","pipeline.editor.save":"Save","pipeline.editor.saving":"Saving…","pipeline.editor.reload":"Reload from disk","pipeline.editor.discard.title":"Discard unsaved changes?","pipeline.editor.discard.body":"Your edits will be lost.","pipeline.editor.errors":"YAML parse errors","pipeline.editor.list":"Pipelines","pipeline.editor.list.add":"New pipeline","pipeline.editor.list.delete":"Delete pipeline","pipeline.editor.list.use":"Use as active","pipeline.editor.list.activeBadge":"active","pipeline.editor.list.sample":"sample","pipeline.editor.delete.confirm.title":"Delete pipeline {name}?","pipeline.editor.delete.confirm.body":"This action cannot be undone.","pipeline.newDialog.title":"New pipeline","pipeline.newDialog.field.filename":"Filename","pipeline.newDialog.field.filename.help":"Letters, digits, _ and - only; .yaml will be appended","pipeline.newDialog.field.copyFrom":"Copy from","pipeline.newDialog.copyFrom.sample":"sample template","pipeline.newDialog.copyFrom.active":"current active","pipeline.newDialog.create":"Create","projectDetail.tab.overview":"Overview","projectDetail.tab.config":"Config","projectDetail.tab.pipelines":"Pipelines","projectDetail.tab.danger":"Danger zone","projectDetail.openBoard":"Board","projectDetail.overview.repoDir":"Repo path","projectDetail.overview.pmBackend":"PM backend","projectDetail.overview.agent":"Agent","projectDetail.overview.cards":"Cards","projectDetail.overview.cards.value":"{total} total · {inprogress} in progress · {done} done","projectDetail.overview.workers":"Workers","projectDetail.overview.workers.value":"{total} total ({active} active)","projectDetail.overview.pipeline":"Pipeline","projectDetail.overview.lastActivity":"Last activity","projectDetail.overview.notFound":"Project {name} not found or unreadable.","projectDetail.config.confDirty":"● Unsaved changes","projectDetail.config.reload":"Reload","projectDetail.config.save":"Save","projectDetail.config.saveAria":"Save config","projectDetail.config.editorAria":"conf file editor","projectDetail.config.error.conflict.title":"Config was modified elsewhere","projectDetail.config.error.conflict.body":"The conf file was changed while you were editing. Click Reload, then re-edit.","projectDetail.config.error.save.title":"Save failed","projectDetail.config.error.load":"Load failed: {detail}","projectDetail.pipelines.title":"Pipelines","projectDetail.pipelines.add":"New pipeline","projectDetail.pipelines.empty":'No pipeline files yet. Click "New pipeline" to start.',"projectDetail.pipelines.activeBadge":"active","projectDetail.pipelines.edit":"Edit","projectDetail.pipelines.editAria":"Edit {name}","projectDetail.pipelines.switch":"Switch","projectDetail.pipelines.switchAria":"Switch to {name}","projectDetail.pipelines.switch.confirm.title":"Switch to {name}","projectDetail.pipelines.switch.confirm.body":"The current project.yaml will be overwritten with the contents of {name}. Continue?","projectDetail.pipelines.switch.confirm.button":"Switch","projectDetail.pipelines.switch.error":"Switch failed","projectDetail.pipelines.delete.confirm.title":"Delete {name}","projectDetail.pipelines.delete.confirm.body":"This pipeline file will be permanently deleted.","projectDetail.pipelines.delete.error":"Delete failed","projectDetail.pipelines.deleteAria":"Delete {name}","projectDetail.pipelines.create.error":"Create failed","projectDetail.danger.title":"Delete project","projectDetail.danger.body":"This clears {path} (all cards, runtime, logs).","projectDetail.danger.includeClaude.label":"Also clear repo's .claude/","projectDetail.danger.includeClaude.note":"The repo itself is untouched; only this directory is cleaned.","projectDetail.danger.confirmPrompt":"Type the project name {name} to confirm:","projectDetail.danger.deleteAria":"Permanently delete project","projectDetail.danger.deleteButton":"Permanently delete","projectDetail.danger.deleted.title":"Deleted","projectDetail.danger.deleted.bodyWithList":`Project deleted. Also cleaned up:
|
|
386
|
+
{paths}`,"projectDetail.danger.deleted.body":"Project deleted.","projectDetail.danger.error":"Delete failed","pipelineEditor.close":"Close","pipelineEditor.error.conflict.title":"File was modified elsewhere","pipelineEditor.error.yaml.title":"YAML syntax error","pipelineEditor.error.save.title":"Save failed","pipelineEditor.error.serialize.title":"YAML serialize failed","pipelineEditor.error.load":"Load failed: {detail}","pipelineEditor.mode.structured":"Structured","pipelineEditor.mode.yaml":"Raw YAML","pipelineEditor.parseError.prefix":"YAML parse: {detail}","pipelineEditor.activeWarning":"⚠ This is the active pipeline — saving will take effect on the next tick","pipelineEditor.yamlAria":"pipeline YAML editor","pipelineEditor.status.unsaved":"● Unsaved","pipelineEditor.status.saved":"Saved","pipelineEditor.status.noChanges":"No changes","pipelineEditor.reload":"Reload","pipelineEditor.save":"Save","pipelineEditor.saveAria":"Save pipeline","pipelineEditor.activeBadge":"active","pipelineEditor.modeHint":"project = event-driven pipeline (default) · steps = sequential script","pipelineEditor.stages.heading":"Stages ({count})","pipelineEditor.stages.add":"Add stage","pipelineEditor.stages.empty":'No stages yet. Click "Add stage" to start.',"pipelineEditor.stage.name.hint":"Unique stage name","pipelineEditor.stage.profile.hint":"skill profile, may be empty","pipelineEditor.stage.cardState.hint":"Card state during this stage","pipelineEditor.stage.timeout.hint":"Optional, e.g. 30m 2h","pipelineEditor.stage.trigger.hint":"Trigger condition, blank uses default","pipelineEditor.stage.onComplete.hint":"Action on success","pipelineEditor.stage.onFail.action.hint":"Action on failure, e.g. label NEEDS-FIX","pipelineEditor.stage.onFail.comment.hint":"Comment written on the card","pipelineEditor.stage.halt.note":"(stops pipeline on failure; uncheck to continue with next card)","pipelineEditor.stage.moveUp":"Move up","pipelineEditor.stage.moveDown":"Move down","pipelineEditor.stage.remove":"Remove stage","newPipelineDialog.title":"New pipeline","newPipelineDialog.field.filename.label":"Filename","newPipelineDialog.field.filename.placeholder":"e.g. ci","newPipelineDialog.field.filename.help":"Will be saved as {filename}. Only a-z A-Z 0-9 _ - allowed; an existing file errors 409.","newPipelineDialog.section.template":"Initial content","newPipelineDialog.template.blank.label":"Blank template","newPipelineDialog.template.blank.desc":"Minimal 1-stage pipeline (develop → Done)","newPipelineDialog.template.sample.label":"Tutorial template","newPipelineDialog.template.sample.desc":"Copied from sample.yaml.example (annotated, every field explained)","newPipelineDialog.template.sample.unavailable":"sample.yaml.example does not exist","newPipelineDialog.template.active.label":"Copy current active","newPipelineDialog.template.active.desc":"Copied from project.yaml (build on the current config)","newPipelineDialog.template.active.unavailable":"project.yaml does not exist","newPipelineDialog.create.aria":"Create pipeline","newPipelineDialog.cancel":"Cancel","board.title":"Board ✨","board.title.bare":"Board","board.subtitle":"{name} · {cards} cards · {workers} workers active","board.pickPrompt.title":"Pick a project 🎯","board.pickPrompt.body":"The board is per-project. Pick one to start:","board.action.start":"Start","board.action.stop":"Stop","board.action.startAria":"Start pipeline","board.action.stopAria":"Stop pipeline","board.action.startError":"Failed to start pipeline","board.action.stopError":"Failed to stop pipeline","board.action.reset":"Reset","board.action.resetError":"Reset failed","board.action.reset.confirm.title":"Reset the entire pipeline","board.action.reset.confirm.body":"This clears all cards’ run state, worker markers, and branches. Cannot be undone.","board.action.reset.confirm.button":"Reset all","board.action.newCard":"New card","board.action.newCard.error":"Failed to create card","board.action.moveCard.error":"Failed to move card","board.search.placeholder":"Search title / skill / label…","board.search.aria":"Search cards","board.filter.clear":"Clear","board.filter.clearAria":"Clear filters","board.filter.aria":"Filter by {label}","board.filter.clearSelection":"Clear selection","board.error.loadCards":"Failed to load cards","board.col.planning":"Planning","board.col.backlog":"Backlog","board.col.todo":"Todo","board.col.inprogress":"Inprogress","board.col.qa":"QA / Review","board.col.done":"Done","kanban.checklist.label":"Checklist {done}/{total}","kanban.checklist.more":"… {count} more","kanban.column.empty":"— empty —","kanban.time.justNow":"just now","kanban.time.minutes":"{n}m ago","kanban.time.hours":"{n}h ago","kanban.time.days":"{n}d ago","newCard.title":"New card","newCard.field.title":"Title *","newCard.field.title.placeholder":"e.g. Add GitHub OAuth login","newCard.field.title.help":"Short, clear goal (<200 chars)","newCard.field.description":"Description","newCard.field.description.placeholder":"User story, requirements, acceptance criteria, references… Claude reads this when starting","newCard.field.description.help":"Markdown supported. If empty, Claude only sees the title.","newCard.field.skills":"Skills","newCard.field.skills.help":"Pick which skills get loaded (via frontmatter `skills:`). Optional — worker falls back to project-level skills.","newCard.field.skills.loading":"Loading skills…","newCard.field.skills.error":"Failed to load skills (creation still works): {detail}","newCard.field.skills.selected":"{count} selected: {names}","newCard.field.dispatch":"Dispatch","newCard.field.dispatch.label":"Dispatch immediately (go straight to Backlog)","newCard.field.dispatch.help":"Default off: card lands in Planning to wait; drag to Backlog when ready. On: skip Planning, the next tick assigns a worker.","newCard.create.aria":"Create card","cardDetail.loading":"Loading…","cardDetail.error.load":"Failed to load card","cardDetail.tabs.overview":"Overview","cardDetail.tabs.body":"Description","cardDetail.tabs.checklist":"Checklist","cardDetail.tabs.history":"History","cardDetail.tabs.actions":"Actions","cardDetail.field.state":"State","cardDetail.field.skills":"Skills","cardDetail.field.labels":"Labels","cardDetail.field.branch":"Branch","cardDetail.field.assignee":"Assignee","cardDetail.field.created":"Created","cardDetail.field.updated":"Updated","cardDetail.field.empty":"—","cardDetail.actions.delete":"Delete card","cardDetail.actions.delete.confirm.title":"Delete card #{seq}","cardDetail.actions.delete.confirm.body":"This card will be permanently deleted.","cardDetail.actions.delete.error":"Delete failed","cardDetail.actions.update.error":"Update failed","cardDetail.body.empty":"No description","cardDetail.checklist.empty":"No checklist","cardDetail.checklist.progress":"Progress {done}/{total}","cardDetail.history.empty":"No history","cardDetail.notFound":"Card #{seq} not found","cardDetail.copy.aria":"Copy seq","cardDetail.close.aria":"Close","cardDetail.save":"Save","cardDetail.saving":"Saving…","workers.title":"Workers 👷","workers.summary":"Across {projects} projects · {running} running · {starting} starting · {stuck} stuck · {crashed} crashed · {idle} idle","workers.summary.stuck":"{n} stuck","workers.summary.crashed":"{n} crashed","workers.refresh.aria":"Refresh","workers.refresh":"Refresh","workers.error.load":"Load failed: {detail}","workers.empty.hint":"Click a project / worker to see details","logs.title":"Logs 📜","logs.subtitle.allProjects":"All projects","logs.subtitle.project":"{name} live tail","logs.filter.errors":"Errors only","logs.filter.errors.aria":"Show errors only","logs.filter.search.placeholder":"Filter messages…","logs.empty":"No logs yet — waiting for events","logs.error.load":"Failed to load logs","logs.refresh":"Refresh","logs.refresh.aria":"Refresh logs","logs.scroll.bottom.aria":"Scroll to bottom","logs.scroll.pause":"Paused (autoscroll off)","logs.scroll.resume":"Resume autoscroll","logs.subtitle.allProjectsCount":"All projects ({count})","logs.poll.5s":"5s polling","logs.paused":"⏸ PAUSED","logs.mode.live":"Live","logs.mode.history":"History","logs.history.startAria":"Query start time","logs.history.queryAria":"Query","logs.history.query":"Query","logs.filter.project.aria":"Filter project","logs.filter.project.all":"All projects","logs.filter.keyword.placeholder":"Filter keyword…","logs.filter.keyword.aria":"Filter logs","logs.empty.match":"No matching logs","skills.title":"Skills 🧠","skills.subtitle":"Skills shared across projects (managed via `sps skill ...`)","skills.empty.title":"No skills yet","skills.empty.hint":"Run {cmd} to sync the bundled skills.","skills.linked.tooltip":"linked into this project","skills.frozen.tooltip":"frozen (per-project copy)","skills.category.all":"All","skills.category.language":"language","skills.category.end":"end","skills.category.persona":"persona","skills.category.workflow":"workflow","skills.category.other":"other","skills.subtitleCount":"{count} user-level skill(s)","skills.search.placeholder":"Search skill…","skills.search.aria":"Search skill","skillDetail.actionFailed":"{label} failed","skillDetail.unfreezeAction":"Unfreeze","skillDetail.freezeAction":"Freeze","skillDetail.removeAction":"Remove","skillDetail.removeConfirm.title":"Remove {name} from {project}","skillDetail.removeConfirm.body":"The skill link will be removed; the project will not see this skill on next run.","skillDetail.removeConfirm.button":"Remove","skillDetail.unfreezeConfirm.title":"Unfreeze {name} @ {project}","skillDetail.unfreezeConfirm.body":"Local changes to this skill will be overwritten with the latest shared version.","skillDetail.unfreezeConfirm.button":"Unfreeze","skillDetail.close.aria":"Close","skillDetail.loading":"Loading…","skillDetail.error.load":"Load failed: {detail}","skillDetail.section.projects":"Per-project link status","skillDetail.section.empty":"No projects yet. Create one first.","skillDetail.section.preview":"SKILL.md preview","skillDetail.toggleSection.aria":"{action} {file}","skillDetail.expand":"Expand","skillDetail.collapse":"Collapse","system.title":"System 🛠","system.subtitle":"Global config + diagnostics + upgrades","system.section.env":"Global env","system.section.env.help":"Stored in ~/.coral/env (mode 600). Used by all projects.","system.section.env.save":"Save env","system.section.env.error.conflict":"env was modified elsewhere","system.section.env.error.save":"Failed to save env","system.section.env.error.load":"Failed to load env","system.section.env.dirtyDot":"● Unsaved","system.section.env.aria":"env editor","system.section.env.reload":"Reload","system.section.upgrade":"Upgrade","system.section.upgrade.current":"Current: v{version}","system.section.upgrade.latest":"Latest on npm: v{version}","system.section.upgrade.uptodate":"Up to date","system.section.upgrade.update":"Upgrade now","system.section.upgrade.upgrading":"Upgrading…","system.section.upgrade.checking":"Checking npm…","system.section.upgrade.checkError":"Check failed: {detail}","system.section.upgrade.upgradeError":"Upgrade failed: {detail}","system.section.upgrade.upgradeError.title":"Upgrade failed","system.section.upgrade.command":"Or run in terminal: {cmd}","system.section.upgrade.runningPipelines":"Pipelines running — stop them first: {projects}","system.section.diagnostics":"Diagnostics","system.section.diagnostics.help":"Run sps doctor across all projects, see failures at a glance","system.section.diagnostics.run":"Run diagnostics","system.section.diagnostics.running":"Running…","system.section.diagnostics.empty":"No projects","system.section.diagnostics.checkAria":"Check {project}","system.section.diagnostics.statusOk":"OK","system.section.diagnostics.statusFail":"Issues","system.section.diagnostics.error":"Diagnostic failed: {detail}","system.h1":"System ⚙️","system.runtime":"Runtime","system.memory.title":"Memory backend","system.memory.desc":"Global setting: which backend workers read/write memory through. Applies to newly dispatched cards.","system.memory.provider":"Backend","system.memory.url":"Custom URL","system.memory.url.placeholder":"http://127.0.0.1:3111","system.memory.save":"Save","system.memory.save.aria":"Save memory backend setting","system.memory.saved":"Saved","system.memory.error":"Save failed","system.memory.opt.none":"Off (none)","system.memory.opt.builtin":"Local file memory (builtin)","system.memory.opt.agentmemory":"agentmemory (semantic)","system.memory.opt.custom":"Custom REST (custom)","system.env.title.code":"~/.coral/env","system.env.title.prefix":"Global config ","system.env.edit.aria":"Edit env file","system.env.edit.button":"Edit","system.env.editing.label":"⚠ Editing","system.env.empty.before":'env file does not exist. Click "Edit" or run ',"system.env.empty.after":" in the terminal.","system.env.warning":"⚠ This file contains plaintext credentials. Keep mode 0600 on save.","system.env.aria":"env editor","system.env.dirtyMark":" · ● Unsaved","system.env.cancel":"Cancel","system.env.save":"Save","system.env.save.aria":"Save env","system.env.error.conflict.title":"env was modified elsewhere","system.env.error.save.title":"Save failed","system.env.error.conflict.body":"Cancel and reopen the editor.","system.upgrade.title":"Version","system.upgrade.checkLatest.aria":"Check latest version","system.upgrade.checkUpdate":"Check update","system.upgrade.label.current":"sps-cli (current)","system.upgrade.label.latest":"npm (latest)","system.upgrade.latestPill":"latest","system.upgrade.button.upgradeAria":"Upgrade to latest","system.upgrade.button.upgrade":"Upgrade","system.upgrade.button.copyAria":"Copy upgrade command","system.upgrade.button.copyTitle":"Copy command (run manually if auto upgrade fails)","system.upgrade.button.copy":"Copy command","system.upgrade.label.installed":"Installed","system.upgrade.installed.ok":"Active (restart console to see)","system.upgrade.installed.fail":"Upgrade not effective","system.upgrade.label.check":"Check","system.upgrade.confirm.title":"Upgrade sps-cli","system.upgrade.confirm.body":"Current {current}, upgrade to {latest}. Requires all pipelines stopped. Restart sps console after upgrade.","system.upgrade.confirm.button":"Upgrade","system.upgrade.success.title":"Upgrade complete","system.upgrade.success.body":'Installed v{version}. Run `pkill -f "sps console"` and restart to see it.',"system.upgrade.notEffective.title":"Upgrade not effective","system.upgrade.notEffective.same":"npm finished but the version did not change (still {version}) — likely a permissions or registry issue. Copy the command below to run manually.","system.upgrade.notEffective.notInstalled":"npm did not install a new version. Copy the command to run manually, or check the log below.","system.upgrade.error.title":"Upgrade failed","system.upgrade.copy.success.title":"Command copied","system.upgrade.copy.success.body":`Paste it into a terminal:
|
|
387
|
+
{cmd}`,"system.upgrade.copy.fail.title":"Copy failed","system.upgrade.copy.fail.body":`Copy manually:
|
|
388
|
+
{cmd}`,"system.diagnostics.title":"Project health check","system.diagnostics.checkAll":"Check all","system.diagnostics.empty":"No projects yet.","system.diagnostics.expandAria":"Expand","system.diagnostics.collapseAria":"Collapse","system.diagnostics.never":'Click "Check" to run sps doctor',"system.diagnostics.checkAria":"Check","system.diagnostics.check":"Check","system.diagnostics.noFixesNeeded":"Nothing to fix","system.diagnostics.fix.tip":"Run sps doctor <proj> --fix: auto-create .claude/hooks/stop.sh, state.json, etc.","system.diagnostics.fixAria":"Auto fix","system.diagnostics.fix":"Fix","system.diagnostics.fixed":"Fixed","system.diagnostics.error.fix":"doctor fix failed","system.diagnostics.error.check":"doctor check failed","chat.title":"Chat 💬","chat.empty.title":"Chat 💬","chat.empty.hint":'Click "New chat" on the left to start a session, or just type below — a session will be auto-created.',"chat.empty.shortcuts":"Enter to send · Shift+Enter for newline · streamed reply","chat.list.heading":"History {count}","chat.list.new":"New chat","chat.list.empty":"No chats yet. Click above to start.","chat.list.delete.aria":"Delete chat","chat.list.deleteCli.aria":"Remove this CLI session from the Console (does not affect Claude jsonl history)","chat.list.openAria":"Open chat {title}{cwd}","chat.list.cwdSuffix":" (cwd: {cwd})","chat.list.msgs":"{count} msg · {time}","chat.delete.confirm.title":"Delete chat","chat.delete.confirm.body.cli":"Will be removed from the Console list (the daemon session is stopped). The Claude CLI history under ~/.claude/projects is preserved — to continue, run `sps agent --chat --name <name>` in a terminal.","chat.delete.confirm.body.console":"Chat history will be permanently deleted.","chat.delete.confirm.button":"Delete","chat.cli.banner.bold":"CLI session","chat.cli.banner":"This session was created by sps agent. The Console only shows history. To continue, run in a terminal:","chat.input.placeholder":"Say something… (Enter to send, Shift+Enter for newline, drag files / paste images)","chat.input.dragOver":"Drop to attach…","chat.input.aria":"Message input","chat.input.attach.aria":"Attach a local file","chat.input.attach.title":"Attach a local file (also drag / paste images)","chat.input.send":"Send","chat.input.send.aria":"Send","chat.input.interrupt":"Stop","chat.input.interrupt.aria":"Stop generation","chat.input.uploading":"Uploading…","chat.input.removeAttachment":"Remove {name}","chat.error.interrupt.title":"Interrupt failed","chat.cliBadge":"CLI","chat.cliBadge.tooltip":"Created by sps agent CLI; history is read live from Claude jsonl (read-only).","chat.session.title":"{title}","chat.session.id":"{id}","chat.session.empty":"Type a question below to start · Enter to send · Shift+Enter for newline","notFound.title":"404","notFound.body":"This page does not exist.","notFound.home":"Back to home","workers.active.empty":"No workers running.","workers.alerts.allHealthy":"All workers healthy","workers.alerts.pidDead":"PID dead.","workers.alerts.markerStale":"marker stale {ago}.","workers.capacity.col.project":"Project","workers.capacity.col.usage":"Usage","workers.capacity.col.other":"Other","workers.capacity.detailHint":"details →","workers.panel.boardLink":"Board →","workers.panel.loading":"Loading workers…","workers.panel.empty.slots":"This project has no worker slots.","workers.panel.empty.noWorker":"No workers","workers.panel.empty.pickOne":"Pick a worker","workers.panel.idle.short":"idle","workers.panel.section.currentCard":"Current card","workers.panel.idle.full":"Slot idle, no current card.","workers.panel.section.claudeOutput":"Claude output · last {n} lines","workers.panel.output.loading":"Loading…","workers.panel.output.empty":"No session output yet. The worker needs a few seconds to start.","workers.panel.section.heartbeat":"Supervisor heartbeat · last {n} lines","workers.panel.heartbeat.fullLog":"View full log →","workers.panel.action.restart":"Restart","workers.panel.action.restart.confirm.title":"Restart worker-{slot}","workers.panel.action.restart.confirm.body":"Kill the process, then re-launch onto #{seq}","workers.panel.action.restart.confirm.button":"Restart","workers.panel.action.restart.error":"Restart failed","workers.panel.action.kill":"Kill","workers.panel.action.kill.confirm.title":"Kill worker-{slot}","workers.panel.action.kill.confirm.body":"The current task will be force-aborted.","workers.panel.action.kill.confirm.button":"Kill","workers.panel.action.kill.error":"Kill failed","dialog.confirm.default":"OK","dialog.alert.default":"Got it","dialog.cancel.default":"Cancel","dirPicker.title.default":"Pick a directory","dirPicker.close.aria":"Close","dirPicker.up.aria":"Parent directory","dirPicker.up.title":"Parent directory","dirPicker.home.aria":"Back to home","dirPicker.home.title":"Back to home","dirPicker.loading":"Loading…","dirPicker.error.title":"Read failed","dirPicker.empty":"— empty —","dirPicker.enter.aria":"Enter {name}/","dirPicker.pickFile.aria":"Pick {name} (double-click to confirm)","dirPicker.fileLocked":"File not selectable","dirPicker.cancel":"Cancel","dirPicker.useFile":"Use this file","dirPicker.useFile.tooltip.empty":"Click a file first","dirPicker.useDir":"Use this directory","errorBoundary.title":"💥 UI crashed","errorBoundary.refresh":"Refresh page","chat.error.create.title":"Failed to create chat","chat.error.send.title":"Send failed","chat.error.fileTooBig.title":"File too large","chat.error.fileTooBig.body":"Per-file limit is 50 MB; this is {size} MB ({name})","chat.error.uploadAttachment.title":"Attachment upload failed","chat.placeholder.attachment":"(attachment)","chat.placeholder.viewAttachment":"(see attachment)","chat.placeholder.attachmentTitle":"Attachment","chat.attachment.previewTooltip":`{name}
|
|
389
|
+
{path}
|
|
390
|
+
Click to preview`,"chat.attachment.previewSimpleTooltip":`{name}
|
|
391
|
+
Click to zoom`,"chat.attachment.preview.aria":"Preview {name}","chat.attachment.close.aria":"Close","chat.attachment.readErr":"Read failed: {detail}","chat.attachment.loading":"Loading…","chat.attachment.unsupported":"This file type cannot be previewed inline.","chat.attachment.download":"Download","chat.message.role.you":"You","chat.message.role.error":"Error","chat.message.role.assistant":"assistant","chat.message.truncated":"⚠ Output exceeded 10MB and was truncated","chat.filePicker.title":"Pick attachment file","chat.newSession.title":"New chat","chat.newSession.title.aria":"New chat","chat.newSession.close.aria":"Close","chat.newSession.field.agent":"Agent","chat.newSession.field.title":"Title (optional)","chat.newSession.field.title.placeholder":"Empty = auto-generate from first message","chat.newSession.field.cwd":"Working directory (optional)","chat.newSession.field.cwd.browse":"Browse","chat.newSession.field.cwd.browseAria":"Pick directory","chat.newSession.field.cwd.title":"Pick directory","chat.newSession.field.cwd.help1":"The agent reads/writes files here. Absolute path; must exist.","chat.newSession.field.cwd.help2":"Empty = use the daemon’s startup cwd.","chat.newSession.cancel":"Cancel","chat.newSession.create":"Create","cardModal.editing":"⚠ Editing","cardModal.title.aria":"Card title","cardModal.editAria":"Edit card","cardModal.edit":"Edit","cardModal.close.aria":"Close","cardModal.error.save.title":"Save failed","cardModal.error.load":"Load failed: {detail}","cardModal.skills.loading":"Loading skill list…","cardModal.label.removeAria":"Remove {label}","cardModal.label.addPlaceholder":"+ Add label","cardModal.label.addAria":"Add label","cardModal.label.note":"Note: AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX are managed by the pipeline; manual changes may be overwritten","cardModal.section.description":"Description","cardModal.section.empty":"(empty)","cardModal.section.checklist":"Checklist","cardModal.checklist.empty":"No checklist items. Add `- [ ] item` syntax in the description.","cardModal.section.log":"Log","cardModal.body.aria":"Card description","cardModal.body.replaceNote":'Only replaces the "## Description" section; checklist and log sections are untouched.',"cardModal.action.launch":"Launch worker","cardModal.action.launch.disabledDone":"Card is done; drag back to Todo to launch","cardModal.action.launch.disabledRunning":"Pipeline is running — supervisor dispatches automatically, no manual launch needed","cardModal.action.launch.error":"Launch worker failed","cardModal.action.reset":"Reset card","cardModal.action.reset.confirm.title":"Reset card #{seq}","cardModal.action.reset.confirm.body":"Card state goes back to initial; checklist progress is cleared.","cardModal.action.reset.confirm.button":"Reset","cardModal.action.reset.error":"Reset failed","cardModal.action.delete":"Delete card","cardModal.action.delete.confirm1.title":"Delete card #{seq}","cardModal.action.delete.confirm1.body":'About to delete "{title}". This cannot be undone (the md file is physically removed). Continue?',"cardModal.action.delete.confirm1.button":"Continue","cardModal.action.delete.confirm2.title":"Final confirmation","cardModal.action.delete.confirm2.body":"Please re-confirm deleting card #{seq}."},xL={"app.title":"SPS 控制台","nav.chat":"对话","nav.projects":"项目","nav.board":"看板","nav.workers":"Workers","nav.logs":"日志","nav.skills":"技能","nav.system":"系统","nav.processes":"进程","nav.audit":"审计日志","nav.memory":"记忆","nav.plugins":"插件","plugins.h1":"插件 🧩","plugins.desc":"全局插件开关。改动对之后新派发的卡生效。","plugins.tab.memory":"记忆","plugins.tab.channel":"频道","plugins.tab.model":"模型","plugins.tab.tool":"工具","plugins.comingSoon":"即将上线","plugins.model.title":"智能体模型","plugins.model.desc":"配置两个智能体的模型(全局)。worker=claude 执行、review·designer=openai 监工+编排。","plugins.model.worker":"Worker(执行 / claude)","plugins.model.reviewer":"Review·Designer(监工 / openai)","plugins.model.provider":"Provider","plugins.model.model":"模型","plugins.model.official":"官方 claude(默认)","plugins.model.save":"保存","plugins.model.saved":"已保存","plugins.model.error":"保存失败","nav.arrange":"编排","arrange.h1":"智能编排 🧭","arrange.project":"项目","arrange.none":"尚未开始 — 点上方「启动」拉起编排(几秒后出任务清单,确认即跑)。若下拉无项目,先在「新建项目」选智能编排模式。","arrange.start":"启动","arrange.stop":"停止","arrange.startErr":"启动/停止失败","arrange.view":"切换画板视图","arrange.viewFree":"自由","arrange.viewLane":"泳道","arrange.starting":"启动中,正在拆解任务清单…","arrange.planning":"正在拆解任务清单…","arrange.orchestrating":"正在编排中…","arrange.status":"状态","arrange.goal":"目标","arrange.plan":"任务清单 + 卡链路","arrange.approve":"确认任务清单","arrange.approveErr":"确认失败","arrange.tasks":"任务清单","arrange.collapse":"收起","arrange.expand":"展开任务清单","arrange.noCards":"暂无卡片 — 等待 orchestrator 派卡(确认清单后开始)。","arrange.cardPrompt":"卡片提示词","arrange.cardSkills":"技能","arrange.cardTask":"所属任务","arrange.cardLog":"日志","arrange.close":"关闭","arrange.cardsCount":"张卡","nav.aria":"主导航","memory.sub":"跨项目记忆 · 经 console 鉴权代理 agentmemory","memory.searchPlaceholder":"搜索记忆…(如:三消美术竞态怎么修)","memory.search":"搜索","memory.results":"召回结果","memory.rawHint":"(原始观察 · 接入实时捕获+压缩后这里会显示提炼的教训)","memory.sessions":"最近会话","memory.empty":"暂无记忆 · 接入实时捕获(P1)后自动累积","processes.title":"进程监控","processes.subtitle":"SPS ACP 启动的 claude 进程(其它途径启动的,如你自己的会话,不显示)","processes.refresh":"刷新","processes.aliveCount":"运行中 {n}","processes.col.kind":"类型","processes.col.slot":"会话槽","processes.col.project":"项目","processes.col.state":"状态","processes.col.memory":"内存","processes.col.action":"操作","processes.empty":"没有 SPS 进程","processes.filter.all":"全部","processes.filter.alive":"运行中","processes.filter.offline":"离线","processes.kind.all":"全部类型","processes.kind.worker":"构建 Worker","processes.kind.chat":"对话","processes.kill":"关闭","processes.killConfirm":"确定关闭进程 {slot}?","audit.title":"审计日志","audit.subtitle":"项目生命周期:创建 / 修改 / 删除","audit.refresh":"刷新","audit.filter.all":"全部","audit.action.create":"创建","audit.action.modify":"修改","audit.action.delete":"删除","audit.action.daemon":"Daemon","audit.col.time":"时间","audit.col.action":"动作","audit.col.project":"项目","audit.col.detail":"详情","audit.empty":"暂无审计记录","lang.toggle.aria":"切换界面语言","lang.en":"EN","lang.zh":"中","status.server":"服务","status.offline":"离线","status.sse.open":"SSE","status.sse.connecting":"SSE·连接中","status.sse.down":"SSE·断开","status.pipelines.tooltip":"活跃流水线数","status.workers.tooltip":"活跃 Worker 数","status.pipeline.unit":"流水线","status.worker.unit":"Worker","common.save":"保存","common.cancel":"取消","common.delete":"删除","common.confirm":"确认","common.create":"创建","common.edit":"编辑","common.close":"关闭","common.loading":"加载中…","common.error":"出错","common.retry":"重试","common.empty":"暂无内容","common.search":"搜索","common.refresh":"刷新","common.copy":"复制","common.copied":"已复制","common.yes":"是","common.no":"否","common.required":"必填","common.optional":"可选","common.ok":"好","projects.title":"项目 🎯","projects.count":"本机有 {count} 个项目","projects.refresh.hint":"点击刷新重试","projects.new":"新建项目","projects.sort.label":"排序方式","projects.sort.activity":"活跃度","projects.sort.date":"修改日期","projects.sort.name":"名字","projects.load.failed":"加载失败","projects.empty.title":"还没有项目 ✨","projects.empty.hint":"运行 {cmd} 创建第一个项目。","newProject.title":"新建项目","newProject.subtitle":"配置一个项目,worker 自动开跑","newProject.field.mode":"执行模式","newProject.field.mode.pipeline":"自动工作流","newProject.field.mode.pipelineDesc":"固定阶段流水线,claude worker 按卡执行","newProject.field.mode.smart":"智能编排","newProject.field.mode.smartDesc":"OpenAI 监工动态派卡 + claude worker 执行","newProject.field.mode.pipelineHint":"传统模式:你建卡片,worker 按阶段跑。","newProject.field.mode.smartHint":"给一个总目标,OpenAI 监工每轮探查产物、动态生成任务卡、驱动 claude 完成。","newProject.field.goal":"总目标 (GOAL.md)","newProject.field.goal.hint":"写入 docs/GOAL.md;智能编排据此拆任务清单。缺失则 tick 跳过该项目。","newProject.field.goal.placeholder":"例:做一个纯前端、单文件可运行的贪吃蛇网页小游戏…","newProject.field.name":"项目名","newProject.field.name.help":"只允许小写字母、数字、_ 和 -","newProject.field.dir":"父目录","newProject.field.dir.preview":"项目将创建在 →","newProject.field.dir.help":"绝对路径;不存在会自动创建","newProject.field.branch":"合并目标分支","newProject.field.branch.help":"默认 main","newProject.field.maxWorkers":"最大并发 Worker 数","newProject.field.maxWorkers.help":"单项目并发数(推荐 1)","newProject.field.ackTimeout":"ACK 超时(秒)","newProject.field.ackTimeout.help":"Worker 响应等待秒数(默认 300)","newProject.field.gitlabProject":"GitLab/GitHub 远程","newProject.field.gitlabProject.help":"格式:用户名/仓库(可选)","newProject.field.matrixRoom":"Matrix 房间 ID","newProject.field.matrixRoom.help":"可选;不填则用全局默认","newProject.field.git":"启用 git","newProject.field.git.help":"关闭 → 非代码项目,跳过 commit/push/MR","newProject.submit":"创建项目","newProject.creating":"创建中…","newProject.created":"项目已创建","newProject.error.dirRequired":"项目目录必填","newProject.dir.browse":"浏览","newProject.dir.browseAria":"选择目录","newProject.back":"返回","newProject.back.aria":"返回项目列表","newProject.field.name.placeholder":"例如:acme-web","newProject.field.name.example":"只能用字母、数字、下划线、连字符。例如 acme-web","newProject.field.name.invalid":"名称只能包含 a-z A-Z 0-9 _ -","newProject.field.dir.long":"本机绝对路径的【父目录】。项目会在它下面自动建一个【项目名】子目录(类似 git clone),避免误用共享目录。","newProject.field.dir.placeholder":"/home/you/projects","newProject.field.dir.createIfMissing":"目录不存在时自动创建(推荐 —— 否则 .claude/ 安装会被跳过)","newProject.field.dir.pickerTitle":"选择项目目录","newProject.field.maxWorkers.short":"最大 Worker 数","newProject.field.ackTimeout.minutes":"ACK 超时(分钟)","newProject.field.ackTimeout.minutes.help":"Worker 启动后多久没 ACK 视为失败","newProject.field.git.label":"启用 Git(Worker 自动 commit + push)","newProject.field.git.detail":"关闭后 Worker 只做任务、不做版本控制;适合文档/数据处理等非代码项目。","newProject.field.git.branch":"合并分支","newProject.field.gitlabProject.label":"Git 远程项目路径","newProject.field.gitlabProject.help2":"如 user/repo,空则跳过远程 API(只本地 commit/push)","newProject.field.gitlabProject.placeholder":"user/repo","newProject.field.gitlabProjectId":"GitLab 项目 ID","newProject.field.gitlabProjectId.help":"数字;GitHub 用户留空","newProject.field.gitlabProjectId.placeholder":"42","newProject.section.notifications":"通知","newProject.field.matrixRoom.label":"Matrix 房间 ID","newProject.field.matrixRoom.help2":"空则使用全局配置;不填 = 不通知","newProject.field.matrixRoom.placeholder":"!abc:matrix.example.com","newProject.error.create.title":"创建失败","projectDetail.tab.pipeline":"流水线","projectDetail.tab.conf":"配置","projectDetail.tab.delete":"删除项目","projectDetail.delete.title":"删除该项目","projectDetail.delete.warn":"会删除项目配置、运行时和 worktree。{repoDir} 下的代码仓库不动。","projectDetail.delete.confirmLabel":"输入项目名以确认","projectDetail.delete.button":"删除项目","projectDetail.delete.deleting":"删除中…","projectDetail.lastActivity":"最后活跃","projectDetail.notFound":"项目不存在","projectDetail.notFoundHint":"可能已被删除或重命名。","projectDetail.backToList":"返回项目列表","pipeline.editor.title":"流水线 YAML","pipeline.editor.savedAt":"{time} 已保存","pipeline.editor.unsaved":"有未保存的修改","pipeline.editor.save":"保存","pipeline.editor.saving":"保存中…","pipeline.editor.reload":"从磁盘重新加载","pipeline.editor.discard.title":"放弃未保存的修改?","pipeline.editor.discard.body":"你的编辑会丢失。","pipeline.editor.errors":"YAML 解析错误","pipeline.editor.list":"流水线","pipeline.editor.list.add":"新建流水线","pipeline.editor.list.delete":"删除流水线","pipeline.editor.list.use":"设为当前","pipeline.editor.list.activeBadge":"当前","pipeline.editor.list.sample":"示例","pipeline.editor.delete.confirm.title":"删除流水线 {name}?","pipeline.editor.delete.confirm.body":"此操作不可撤销。","pipeline.newDialog.title":"新建流水线","pipeline.newDialog.field.filename":"文件名","pipeline.newDialog.field.filename.help":"只允许字母、数字、_ 和 -;自动追加 .yaml","pipeline.newDialog.field.copyFrom":"复制自","pipeline.newDialog.copyFrom.sample":"示例模板","pipeline.newDialog.copyFrom.active":"当前活动","pipeline.newDialog.create":"创建","projectDetail.tab.overview":"概览","projectDetail.tab.config":"配置","projectDetail.tab.pipelines":"流水线","projectDetail.tab.danger":"危险操作","projectDetail.openBoard":"看板","projectDetail.overview.repoDir":"仓库路径","projectDetail.overview.pmBackend":"PM 后端","projectDetail.overview.agent":"Agent","projectDetail.overview.cards":"卡片","projectDetail.overview.cards.value":"共 {total} 张 · {inprogress} 进行中 · {done} 完成","projectDetail.overview.workers":"Worker","projectDetail.overview.workers.value":"共 {total} 个({active} 活跃)","projectDetail.overview.pipeline":"Pipeline","projectDetail.overview.lastActivity":"最近活动","projectDetail.overview.notFound":"项目 {name} 不存在或无法读取。","projectDetail.config.confDirty":"● 未保存的修改","projectDetail.config.reload":"重新加载","projectDetail.config.save":"保存","projectDetail.config.saveAria":"保存配置","projectDetail.config.editorAria":"conf 文件编辑器","projectDetail.config.error.conflict.title":"配置已被其他地方修改","projectDetail.config.error.conflict.body":'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。',"projectDetail.config.error.save.title":"保存失败","projectDetail.config.error.load":"加载失败:{detail}","projectDetail.pipelines.title":"流水线","projectDetail.pipelines.add":"新建流水线","projectDetail.pipelines.empty":'还没有流水线文件。点"新建流水线"开始。',"projectDetail.pipelines.activeBadge":"当前","projectDetail.pipelines.edit":"编辑","projectDetail.pipelines.editAria":"编辑 {name}","projectDetail.pipelines.switch":"切换","projectDetail.pipelines.switchAria":"切换到 {name}","projectDetail.pipelines.switch.confirm.title":"切换到 {name}","projectDetail.pipelines.switch.confirm.body":"当前 project.yaml 会被 {name} 的内容覆盖。继续?","projectDetail.pipelines.switch.confirm.button":"切换","projectDetail.pipelines.switch.error":"切换失败","projectDetail.pipelines.delete.confirm.title":"删除 {name}","projectDetail.pipelines.delete.confirm.body":"这个流水线文件会被永久删除。","projectDetail.pipelines.delete.error":"删除失败","projectDetail.pipelines.deleteAria":"删除 {name}","projectDetail.pipelines.create.error":"创建失败","projectDetail.danger.title":"删除项目","projectDetail.danger.body":"这会清理 {path}(包括所有卡片、runtime、logs)。","projectDetail.danger.includeClaude.label":"同时清理 repo 的 .claude/","projectDetail.danger.includeClaude.note":"repo 本身不动,只清这个目录。","projectDetail.danger.confirmPrompt":"输入项目名 {name} 确认:","projectDetail.danger.deleteAria":"永久删除项目","projectDetail.danger.deleteButton":"永久删除","projectDetail.danger.deleted.title":"已删除","projectDetail.danger.deleted.bodyWithList":`项目已删除。同时清理了:
|
|
392
|
+
{paths}`,"projectDetail.danger.deleted.body":"项目已删除。","projectDetail.danger.error":"删除失败","pipelineEditor.close":"关闭","pipelineEditor.error.conflict.title":"文件已被其他地方修改","pipelineEditor.error.yaml.title":"YAML 语法错误","pipelineEditor.error.save.title":"保存失败","pipelineEditor.error.serialize.title":"YAML 序列化失败","pipelineEditor.error.load":"加载失败:{detail}","pipelineEditor.mode.structured":"结构化","pipelineEditor.mode.yaml":"原始 YAML","pipelineEditor.parseError.prefix":"YAML 解析:{detail}","pipelineEditor.activeWarning":"⚠ 这是当前激活的流水线,保存后下一轮 tick 生效","pipelineEditor.yamlAria":"pipeline YAML 编辑器","pipelineEditor.status.unsaved":"● 未保存","pipelineEditor.status.saved":"已保存","pipelineEditor.status.noChanges":"无变化","pipelineEditor.reload":"重新加载","pipelineEditor.save":"保存","pipelineEditor.saveAria":"保存 pipeline","pipelineEditor.activeBadge":"当前","pipelineEditor.modeHint":"project = 事件驱动流水线(默认) · steps = 顺序脚本","pipelineEditor.stages.heading":"Stages({count})","pipelineEditor.stages.add":"添加 stage","pipelineEditor.stages.empty":'还没 stage。点"添加 stage"开始。',"pipelineEditor.stage.name.hint":"stage 唯一名","pipelineEditor.stage.profile.hint":"skill 画像,可空","pipelineEditor.stage.cardState.hint":"本 stage 期间卡片状态","pipelineEditor.stage.timeout.hint":"可选,如 30m 2h","pipelineEditor.stage.trigger.hint":"触发条件,可空走默认","pipelineEditor.stage.onComplete.hint":"成功后动作","pipelineEditor.stage.onFail.action.hint":"失败时动作,如 label NEEDS-FIX","pipelineEditor.stage.onFail.comment.hint":"写进卡片的注释","pipelineEditor.stage.halt.note":"(失败后停流水线;去掉则继续下一张卡)","pipelineEditor.stage.moveUp":"上移","pipelineEditor.stage.moveDown":"下移","pipelineEditor.stage.remove":"删除 stage","newPipelineDialog.title":"新建流水线","newPipelineDialog.field.filename.label":"文件名","newPipelineDialog.field.filename.placeholder":"例如 ci","newPipelineDialog.field.filename.help":"实际会保存为 {filename}。只允许 a-z A-Z 0-9 _ -;已有同名文件会 409 报错。","newPipelineDialog.section.template":"初始内容","newPipelineDialog.template.blank.label":"空白模板","newPipelineDialog.template.blank.desc":"最简 1 stage(develop → Done)","newPipelineDialog.template.sample.label":"教学模板","newPipelineDialog.template.sample.desc":"从 sample.yaml.example 复制(带注释,讲解所有字段)","newPipelineDialog.template.sample.unavailable":"sample.yaml.example 不存在","newPipelineDialog.template.active.label":"复制当前活动的","newPipelineDialog.template.active.desc":"从 project.yaml 复制(基于目前的配置改)","newPipelineDialog.template.active.unavailable":"project.yaml 不存在","newPipelineDialog.create.aria":"创建 pipeline","newPipelineDialog.cancel":"取消","board.title":"看板 ✨","board.title.bare":"看板","board.subtitle":"{name} · {cards} 张卡片 · {workers} workers 活跃","board.pickPrompt.title":"选择一个项目 🎯","board.pickPrompt.body":"看板按项目分。挑一个开始:","board.action.start":"启动","board.action.stop":"停止","board.action.startAria":"启动 pipeline","board.action.stopAria":"停止 pipeline","board.action.startError":"启动 pipeline 失败","board.action.stopError":"停止 pipeline 失败","board.action.reset":"重置","board.action.resetError":"重置失败","board.action.reset.confirm.title":"重置整个流水线","board.action.reset.confirm.body":"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。","board.action.reset.confirm.button":"重置全部","board.action.newCard":"新卡片","board.action.newCard.error":"新建卡片失败","board.action.moveCard.error":"移动卡片失败","board.search.placeholder":"搜索标题 / skill / label…","board.search.aria":"搜索卡片","board.filter.clear":"清空","board.filter.clearAria":"清空筛选","board.filter.aria":"按 {label} 筛选","board.filter.clearSelection":"清空选择","board.error.loadCards":"加载卡片失败","board.col.planning":"Planning","board.col.backlog":"Backlog","board.col.todo":"Todo","board.col.inprogress":"Inprogress","board.col.qa":"QA / Review","board.col.done":"Done","kanban.checklist.label":"检查清单 {done}/{total}","kanban.checklist.more":"… 还有 {count} 条","kanban.column.empty":"— 空 —","kanban.time.justNow":"刚才","kanban.time.minutes":"{n} 分钟前","kanban.time.hours":"{n} 小时前","kanban.time.days":"{n} 天前","newCard.title":"新建卡片","newCard.field.title":"标题 *","newCard.field.title.placeholder":"例如:接入 GitHub OAuth 登录","newCard.field.title.help":"写简短明了的目标(<200 字符)","newCard.field.description":"描述","newCard.field.description.placeholder":"用户故事、需求、验收标准、参考资料… Claude 启动时会读这里的内容","newCard.field.description.help":"支持 markdown。空的话就只有 title,Claude 只能靠 title 推断要做啥。","newCard.field.skills":"技能","newCard.field.skills.help":"勾选哪些 skill 会被加载(走 frontmatter `skills:`)。不选也行,Worker 默认加载项目级 skills。","newCard.field.skills.loading":"加载 skill 列表…","newCard.field.skills.error":"skill 列表加载失败,不影响创建:{detail}","newCard.field.skills.selected":"已选 {count} 个:{names}","newCard.field.dispatch":"派发","newCard.field.dispatch.label":"立即派发执行(直接进 Backlog)","newCard.field.dispatch.help":"默认不勾:卡进 Planning 暂存,等你看板上拖到 Backlog 再开工。勾上:跳过暂存,下次 tick 直接派 worker 跑。","newCard.create.aria":"创建卡片","cardDetail.loading":"加载中…","cardDetail.error.load":"卡片加载失败","cardDetail.tabs.overview":"概览","cardDetail.tabs.body":"描述","cardDetail.tabs.checklist":"检查清单","cardDetail.tabs.history":"历史","cardDetail.tabs.actions":"操作","cardDetail.field.state":"状态","cardDetail.field.skills":"技能","cardDetail.field.labels":"标签","cardDetail.field.branch":"分支","cardDetail.field.assignee":"处理人","cardDetail.field.created":"创建时间","cardDetail.field.updated":"更新时间","cardDetail.field.empty":"—","cardDetail.actions.delete":"删除卡片","cardDetail.actions.delete.confirm.title":"删除卡片 #{seq}","cardDetail.actions.delete.confirm.body":"该卡片会被永久删除。","cardDetail.actions.delete.error":"删除失败","cardDetail.actions.update.error":"更新失败","cardDetail.body.empty":"没有描述","cardDetail.checklist.empty":"没有检查清单","cardDetail.checklist.progress":"进度 {done}/{total}","cardDetail.history.empty":"没有历史记录","cardDetail.notFound":"卡片 #{seq} 不存在","cardDetail.copy.aria":"复制 seq","cardDetail.close.aria":"关闭","cardDetail.save":"保存","cardDetail.saving":"保存中…","workers.title":"Workers 👷","workers.summary":"跨 {projects} 项目 · {running} 跑 · {starting} 启动 · {stuck} 卡 · {crashed} 崩 · {idle} 闲","workers.summary.stuck":"{n} 卡","workers.summary.crashed":"{n} 崩","workers.refresh.aria":"刷新","workers.refresh":"刷新","workers.error.load":"加载失败:{detail}","workers.empty.hint":"点击项目 / worker 查看详情","logs.title":"日志 📜","logs.subtitle.allProjects":"全部项目","logs.subtitle.project":"{name} 实时日志","logs.filter.errors":"只看错误","logs.filter.errors.aria":"只显示错误","logs.filter.search.placeholder":"过滤消息…","logs.empty":"还没有日志 —— 等待事件中","logs.error.load":"日志加载失败","logs.refresh":"刷新","logs.refresh.aria":"刷新日志","logs.scroll.bottom.aria":"滚动到底部","logs.scroll.pause":"已暂停(自动滚动关闭)","logs.scroll.resume":"恢复自动滚动","logs.subtitle.allProjectsCount":"全部项目({count})","logs.poll.5s":"5s 轮询","logs.paused":"⏸ 已暂停","logs.mode.live":"实时","logs.mode.history":"历史","logs.history.startAria":"查询起始时间","logs.history.queryAria":"查询","logs.history.query":"查询","logs.filter.project.aria":"筛选项目","logs.filter.project.all":"全部项目","logs.filter.keyword.placeholder":"过滤关键字…","logs.filter.keyword.aria":"过滤日志","logs.empty.match":"没有匹配的日志","skills.title":"技能 🧠","skills.subtitle":"跨项目共用的 skill(用 `sps skill ...` 管理)","skills.empty.title":"还没有 skill","skills.empty.hint":"运行 {cmd} 同步 bundled skills。","skills.linked.tooltip":"已链接到该项目","skills.frozen.tooltip":"已冻结(项目独立副本)","skills.category.all":"全部","skills.category.language":"语言","skills.category.end":"终端","skills.category.persona":"角色","skills.category.workflow":"流程","skills.category.other":"其它","skills.subtitleCount":"{count} 个 user-level skill","skills.search.placeholder":"搜索 skill…","skills.search.aria":"搜索 skill","skillDetail.actionFailed":"{label}失败","skillDetail.unfreezeAction":"解冻","skillDetail.freezeAction":"冻结","skillDetail.removeAction":"移除","skillDetail.removeConfirm.title":"从 {project} 移除 {name}","skillDetail.removeConfirm.body":"skill 链接会被解除,项目后续运行时将无法使用该 skill。","skillDetail.removeConfirm.button":"移除","skillDetail.unfreezeConfirm.title":"解冻 {name} @ {project}","skillDetail.unfreezeConfirm.body":"本地对这个 skill 的改动会被覆盖,回到最新共享版本。","skillDetail.unfreezeConfirm.button":"解冻","skillDetail.close.aria":"关闭","skillDetail.loading":"加载中…","skillDetail.error.load":"加载失败:{detail}","skillDetail.section.projects":"项目链接状态","skillDetail.section.empty":"还没有任何项目。先去创建一个项目。","skillDetail.section.preview":"SKILL.md 预览","skillDetail.toggleSection.aria":"{action} {file}","skillDetail.expand":"展开","skillDetail.collapse":"收起","system.title":"系统 🛠","system.subtitle":"全局配置 + 诊断 + 升级","system.section.env":"全局 env","system.section.env.help":"存储在 ~/.coral/env(mode 600)。所有项目共用。","system.section.env.save":"保存 env","system.section.env.error.conflict":"env 已被其它地方修改","system.section.env.error.save":"保存 env 失败","system.section.env.error.load":"加载 env 失败","system.section.env.dirtyDot":"● 未保存","system.section.env.aria":"env 编辑器","system.section.env.reload":"重新加载","system.section.upgrade":"升级","system.section.upgrade.current":"当前:v{version}","system.section.upgrade.latest":"npm 最新:v{version}","system.section.upgrade.uptodate":"已是最新","system.section.upgrade.update":"立即升级","system.section.upgrade.upgrading":"升级中…","system.section.upgrade.checking":"正在查询 npm…","system.section.upgrade.checkError":"查询失败:{detail}","system.section.upgrade.upgradeError":"升级失败:{detail}","system.section.upgrade.upgradeError.title":"升级失败","system.section.upgrade.command":"或在终端执行:{cmd}","system.section.upgrade.runningPipelines":"有 pipeline 在跑,先停止:{projects}","system.section.diagnostics":"诊断","system.section.diagnostics.help":"一次性跑所有项目的 sps doctor,看哪些项目出问题","system.section.diagnostics.run":"运行诊断","system.section.diagnostics.running":"运行中…","system.section.diagnostics.empty":"没有项目","system.section.diagnostics.checkAria":"检查 {project}","system.section.diagnostics.statusOk":"正常","system.section.diagnostics.statusFail":"有问题","system.section.diagnostics.error":"诊断失败:{detail}","system.h1":"系统 ⚙️","system.runtime":"运行时","system.memory.title":"记忆后端","system.memory.desc":"全局设置:worker 的记忆读写走哪个后端。改动对新派发的卡生效。","system.memory.provider":"后端","system.memory.url":"自定义 URL","system.memory.url.placeholder":"http://127.0.0.1:3111","system.memory.save":"保存","system.memory.save.aria":"保存记忆后端设置","system.memory.saved":"已保存","system.memory.error":"保存失败","system.memory.opt.none":"关闭(none)","system.memory.opt.builtin":"本地文件记忆(builtin)","system.memory.opt.agentmemory":"agentmemory(语义库)","system.memory.opt.custom":"自定义 REST(custom)","system.env.title.code":"~/.coral/env","system.env.title.prefix":"全局配置 ","system.env.edit.aria":"编辑 env 文件","system.env.edit.button":"编辑","system.env.editing.label":"⚠ 编辑模式","system.env.empty.before":'env 文件不存在。点"编辑"或者终端运行 ',"system.env.empty.after":"。","system.env.warning":"⚠ 文件包含凭证明文。保存时保持 0600 权限。","system.env.aria":"env 文件编辑器","system.env.dirtyMark":" · ● 未保存","system.env.cancel":"取消","system.env.save":"保存","system.env.save.aria":"保存 env","system.env.error.conflict.title":"env 被其他地方修改了","system.env.error.save.title":"保存失败","system.env.error.conflict.body":"请点取消后重开编辑。","system.upgrade.title":"版本","system.upgrade.checkLatest.aria":"检查最新版本","system.upgrade.checkUpdate":"检查更新","system.upgrade.label.current":"sps-cli(当前)","system.upgrade.label.latest":"npm(最新)","system.upgrade.latestPill":"最新","system.upgrade.button.upgradeAria":"升级到最新版本","system.upgrade.button.upgrade":"升级","system.upgrade.button.copyAria":"复制升级命令","system.upgrade.button.copyTitle":"自动升级失败时手动跑","system.upgrade.button.copy":"复制命令","system.upgrade.label.installed":"已安装","system.upgrade.installed.ok":"已生效(重启 console 后可见)","system.upgrade.installed.fail":"未升级成功","system.upgrade.label.check":"检查","system.upgrade.confirm.title":"升级 sps-cli","system.upgrade.confirm.body":"当前 {current},升级到 {latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。","system.upgrade.confirm.button":"升级","system.upgrade.success.title":"升级完成","system.upgrade.success.body":'装上了 v{version}。请 `pkill -f "sps console"` 再重启以生效。',"system.upgrade.notEffective.title":"升级未生效","system.upgrade.notEffective.same":"npm 执行完毕但版本没变(仍 {version})——多半是权限或 registry 问题。可复制下面的命令在终端手动跑。","system.upgrade.notEffective.notInstalled":"npm 没装上新版本。可复制命令手动跑,或看下面日志定位。","system.upgrade.error.title":"升级失败","system.upgrade.copy.success.title":"命令已复制","system.upgrade.copy.success.body":`粘贴到终端运行即可:
|
|
393
|
+
{cmd}`,"system.upgrade.copy.fail.title":"复制失败","system.upgrade.copy.fail.body":`请手动复制:
|
|
394
|
+
{cmd}`,"system.diagnostics.title":"项目健康检查","system.diagnostics.checkAll":"检查全部","system.diagnostics.empty":"还没有项目。","system.diagnostics.expandAria":"展开","system.diagnostics.collapseAria":"折叠","system.diagnostics.never":'点 "检查" 运行 sps doctor',"system.diagnostics.checkAria":"检查","system.diagnostics.check":"检查","system.diagnostics.noFixesNeeded":"已无可修问题","system.diagnostics.fix.tip":"调 sps doctor <proj> --fix:自动创建 .claude/hooks/stop.sh、state.json 等","system.diagnostics.fixAria":"自动修复","system.diagnostics.fix":"修复","system.diagnostics.fixed":"已修复","system.diagnostics.error.fix":"doctor 修复失败","system.diagnostics.error.check":"doctor 检查失败","chat.title":"对话 💬","chat.empty.title":"对话 💬","chat.empty.hint":'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。',"chat.empty.shortcuts":"Enter 发送 · Shift+Enter 换行 · 内容流式返回","chat.list.heading":"历史 {count}","chat.list.new":"新建对话","chat.list.empty":"还没对话。点上面新建。","chat.list.delete.aria":"删除对话","chat.list.deleteCli.aria":"从 Console 移除该 CLI 会话(不影响 Claude jsonl 存档)","chat.list.openAria":"打开对话 {title}{cwd}","chat.list.cwdSuffix":"(工作目录 {cwd})","chat.list.msgs":"{count} 条 · {time}","chat.delete.confirm.title":"删除对话","chat.delete.confirm.body.cli":"会从 Console 列表移除(停 daemon 会话)。Claude CLI 在 ~/.claude/projects 下的对话存档会保留 —— 想恢复到终端继续聊就重新跑 sps agent --chat --name <名>。","chat.delete.confirm.body.console":"对话记录会永久删除,不可恢复。","chat.delete.confirm.button":"删除","chat.cli.banner.bold":"CLI 会话","chat.cli.banner":"这是 CLI 会话(由 sps agent 创建),Console 仅展示历史。续聊请在终端运行:","chat.input.placeholder":"说点什么… (Enter 发送,Shift+Enter 换行,可拖入文件 / 粘贴图片)","chat.input.dragOver":"松开鼠标以附加文件…","chat.input.aria":"消息输入","chat.input.attach.aria":"附加本地文件","chat.input.attach.title":"附加本地文件(也可拖拽 / 粘贴图片)","chat.input.send":"发送","chat.input.send.aria":"发送","chat.input.interrupt":"中断","chat.input.interrupt.aria":"中断生成","chat.input.uploading":"上传中…","chat.input.removeAttachment":"移除 {name}","chat.error.interrupt.title":"中断失败","chat.cliBadge":"CLI","chat.cliBadge.tooltip":"该会话由 sps agent CLI 创建,从 Claude jsonl 实时读取(只读)","chat.session.title":"{title}","chat.session.id":"{id}","chat.session.empty":"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行","notFound.title":"404","notFound.body":"这个页面不存在。","notFound.home":"回到首页","workers.active.empty":"没有 worker 在运行。","workers.alerts.allHealthy":"全部 worker 健康","workers.alerts.pidDead":"PID 已死。","workers.alerts.markerStale":"marker 停 {ago}。","workers.capacity.col.project":"项目","workers.capacity.col.usage":"占用","workers.capacity.col.other":"其它","workers.capacity.detailHint":"详情 →","workers.panel.boardLink":"看板 →","workers.panel.loading":"加载 workers…","workers.panel.empty.slots":"该项目没有 worker slot。","workers.panel.empty.noWorker":"无 worker","workers.panel.empty.pickOne":"请选择一个 worker","workers.panel.idle.short":"空闲","workers.panel.section.currentCard":"当前卡片","workers.panel.idle.full":"slot 空闲,没有当前卡片。","workers.panel.section.claudeOutput":"Claude 输出 · 最近 {n} 行","workers.panel.output.loading":"加载中…","workers.panel.output.empty":"还没收到 session 输出。Worker 刚启动时需要几秒。","workers.panel.section.heartbeat":"Supervisor 心跳 · 最近 {n} 行","workers.panel.heartbeat.fullLog":"查看完整 log →","workers.panel.action.restart":"重启","workers.panel.action.restart.confirm.title":"重启 worker-{slot}","workers.panel.action.restart.confirm.body":"先杀进程,再重新 launch 到 #{seq}","workers.panel.action.restart.confirm.button":"重启","workers.panel.action.restart.error":"重启失败","workers.panel.action.kill":"终止","workers.panel.action.kill.confirm.title":"终止 worker-{slot}","workers.panel.action.kill.confirm.body":"当前任务强制中断。","workers.panel.action.kill.confirm.button":"终止","workers.panel.action.kill.error":"终止失败","dialog.confirm.default":"确定","dialog.alert.default":"知道了","dialog.cancel.default":"取消","dirPicker.title.default":"选择目录","dirPicker.close.aria":"关闭","dirPicker.up.aria":"上级目录","dirPicker.up.title":"上级目录","dirPicker.home.aria":"回到 Home","dirPicker.home.title":"回到 Home","dirPicker.loading":"加载中...","dirPicker.error.title":"读取失败","dirPicker.empty":"— 空目录 —","dirPicker.enter.aria":"进入 {name}/","dirPicker.pickFile.aria":"选择 {name}(双击直接确认)","dirPicker.fileLocked":"文件不可选","dirPicker.cancel":"取消","dirPicker.useFile":"使用此文件","dirPicker.useFile.tooltip.empty":"请先点选一个文件","dirPicker.useDir":"选此目录","errorBoundary.title":"💥 UI 崩了","errorBoundary.refresh":"刷新页面","chat.error.create.title":"新建对话失败","chat.error.send.title":"发送失败","chat.error.fileTooBig.title":"文件超过上限","chat.error.fileTooBig.body":"单文件上限 50 MB;当前 {size} MB({name})","chat.error.uploadAttachment.title":"附件上传失败","chat.placeholder.attachment":"(附件)","chat.placeholder.viewAttachment":"(请查看附件)","chat.placeholder.attachmentTitle":"附件","chat.attachment.previewTooltip":`{name}
|
|
395
|
+
{path}
|
|
396
|
+
点击预览`,"chat.attachment.previewSimpleTooltip":`{name}
|
|
397
|
+
点击放大`,"chat.attachment.preview.aria":"预览 {name}","chat.attachment.close.aria":"关闭","chat.attachment.readErr":"读取失败:{detail}","chat.attachment.loading":"加载中...","chat.attachment.unsupported":"此文件类型不支持内联预览。","chat.attachment.download":"下载","chat.message.role.you":"你","chat.message.role.error":"错误","chat.message.role.assistant":"assistant","chat.message.truncated":"⚠ 输出超过 10MB,已截断","chat.filePicker.title":"选择附件文件","chat.newSession.title":"新建对话","chat.newSession.title.aria":"新建对话","chat.newSession.close.aria":"关闭","chat.newSession.field.agent":"Agent","chat.newSession.field.title":"标题(可选)","chat.newSession.field.title.placeholder":"留空 = 自动用首条消息生成","chat.newSession.field.cwd":"工作目录(可选)","chat.newSession.field.cwd.browse":"浏览","chat.newSession.field.cwd.browseAria":"浏览选择目录","chat.newSession.field.cwd.title":"选择目录","chat.newSession.field.cwd.help1":"Agent 在该目录下读写文件。绝对路径,必须存在。","chat.newSession.field.cwd.help2":"留空则用 daemon 启动时的目录。","chat.newSession.cancel":"取消","chat.newSession.create":"创建","cardModal.editing":"⚠ 编辑中","cardModal.title.aria":"卡片标题","cardModal.editAria":"编辑卡片","cardModal.edit":"编辑","cardModal.close.aria":"关闭","cardModal.error.save.title":"保存失败","cardModal.error.load":"加载失败:{detail}","cardModal.skills.loading":"加载 skill 列表…","cardModal.label.removeAria":"删除 {label}","cardModal.label.addPlaceholder":"+ 添加 label","cardModal.label.addAria":"添加 label","cardModal.label.note":"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖","cardModal.section.description":"描述","cardModal.section.empty":"(空)","cardModal.section.checklist":"检查清单","cardModal.checklist.empty":"暂无清单项。在描述里用 `- [ ] 项` 语法添加。","cardModal.section.log":"日志","cardModal.body.aria":"卡片描述","cardModal.body.replaceNote":'只替换 "## 描述" 段的内容;检查清单和日志段不动。',"cardModal.action.launch":"启动 worker","cardModal.action.launch.disabledDone":"卡片已完成;先拖回 Todo 再启动","cardModal.action.launch.disabledRunning":"Pipeline 正在跑——supervisor 会自动 dispatch,无需手动启动","cardModal.action.launch.error":"启动 worker 失败","cardModal.action.reset":"重置卡片","cardModal.action.reset.confirm.title":"重置卡片 #{seq}","cardModal.action.reset.confirm.body":"卡片状态会回到初始,已做的 checklist 会清空。","cardModal.action.reset.confirm.button":"重置","cardModal.action.reset.error":"重置失败","cardModal.action.delete":"删除卡片","cardModal.action.delete.confirm1.title":"删除卡片 #{seq}","cardModal.action.delete.confirm1.body":'即将删除 "{title}"。此操作不可恢复(md 文件将被物理删除)。是否继续?',"cardModal.action.delete.confirm1.button":"继续","cardModal.action.delete.confirm2.title":"最终确认","cardModal.action.delete.confirm2.body":"请再次确认删除卡片 #{seq}。"},C_=T.createContext(null),j_="sps-console-lang";function vL(){if(typeof window>"u")return"en";try{const e=window.localStorage.getItem(j_);if(e==="en"||e==="zh")return e}catch{}return"en"}function wL(e){try{window.localStorage.setItem(j_,e)}catch{}}function EL({children:e}){const[t,n]=T.useState(()=>vL());T.useEffect(()=>{typeof document<"u"&&(document.documentElement.lang=t==="zh"?"zh-CN":"en")},[t]);const r=T.useCallback(l=>{n(l),wL(l)},[]),a=T.useMemo(()=>{const l=t==="zh"?xL:bL;return(u,d)=>{let h=l[u]??u;if(d)for(const[g,m]of Object.entries(d))m!==void 0&&(h=h.replace(`{${g}}`,String(m)));return h}},[t]),o=T.useMemo(()=>({lang:t,setLang:r,t:a}),[t,r,a]);return f.jsx(C_.Provider,{value:o,children:e})}function A_(){const e=T.useContext(C_);if(!e)throw new Error("useLang must be used inside I18nProvider");return e}function Be(){return A_().t}function kL(){const{lang:e,setLang:t,t:n}=A_();return f.jsxs("div",{role:"group","aria-label":n("lang.toggle.aria"),className:"flex border-2 border-[var(--color-text)] rounded-lg overflow-hidden shadow-[2px_2px_0_var(--color-text)]",children:[f.jsx(G1,{active:e==="en",onClick:()=>t("en"),label:n("lang.en"),ariaLabel:"English"}),f.jsx(G1,{active:e==="zh",onClick:()=>t("zh"),label:n("lang.zh"),ariaLabel:"中文"})]})}function G1({active:e,onClick:t,label:n,ariaLabel:r}){return f.jsx("button",{type:"button",onClick:t,"aria-label":r,"aria-pressed":e,className:["flex-1 py-1.5 text-xs font-bold font-[family-name:var(--font-mono)] cursor-pointer transition-colors",e?"bg-[var(--color-accent-mint)] text-[var(--color-text)]":"bg-[var(--color-bg)] text-[var(--color-text-muted)] hover:bg-[var(--color-bg-cream)]"].join(" "),children:n})}const SL=[{to:"/chat",labelKey:"nav.chat",icon:OR},{to:"/projects",labelKey:"nav.projects",icon:x_},{to:"/board",labelKey:"nav.board",icon:CR},{to:"/workers",labelKey:"nav.workers",icon:__},{to:"/logs",labelKey:"nav.logs",icon:$u},{to:"/skills",labelKey:"nav.skills",icon:xR},{to:"/arrange",labelKey:"nav.arrange",icon:Cb},{to:"/plugins",labelKey:"nav.plugins",icon:KR},{to:"/system",labelKey:"nav.system",icon:k_},{to:"/processes",labelKey:"nav.processes",icon:g_},{to:"/audit",labelKey:"nav.audit",icon:E_},{to:"/memory",labelKey:"nav.memory",icon:qD}];function _L(){const e=Be();return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"font-[family-name:var(--font-heading)] font-bold text-lg px-3 pt-2 pb-4 flex items-center gap-3 text-[var(--color-text)]",children:[f.jsx("span",{className:"w-5 h-5 rounded-md bg-[var(--color-accent-mint)] border-2 border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]"}),e("app.title")]}),f.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":e("nav.aria"),children:SL.map(t=>{const n=t.icon;return f.jsxs(c_,{to:t.to,className:({isActive:r})=>["flex items-center gap-3 px-3 py-2.5 rounded-xl font-semibold text-sm cursor-pointer transition-transform duration-150","border-2 border-transparent",r?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] font-bold":"text-[var(--color-text)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)] hover:shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px"].join(" "),children:[f.jsx(n,{size:18,strokeWidth:2.5}),e(t.labelKey)]},t.to)})}),f.jsx("div",{className:"mt-auto pt-3",children:f.jsx(kL,{})})]})}class T_ extends Error{constructor(t,n,r){super(n),this.status=t,this.detail=r,this.name="ApiError"}}async function Mt(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok){let n;try{n=await t.json()}catch{n=await t.text()}throw new T_(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}async function NL(e,t){const n=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:void 0});if(!n.ok){let r;try{r=await n.json()}catch{r=await n.text()}throw new T_(n.status,`${n.status} ${n.statusText}`,r)}return await n.json()}function M_(){return Mt("/api/system/info")}function CL(){return Mt("/api/system/env")}function jL(){return Mt("/api/system/env/raw")}async function AL(e,t){const n=await fetch("/api/system/env",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,etag:t})});if(!n.ok){const r=await n.text(),a=new Error(`${n.status}: ${r}`);throw a.status=n.status,a}return n.json()}function TL(){return Mt("/api/system/memory")}async function ML(e,t){const n=await fetch("/api/system/memory",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,url:t})});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json()}function O_(){return Mt("/api/system/agents")}async function OL(e){const t=await fetch("/api/system/agents",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return t.json()}function DL(){return Mt("/api/system/latest-version")}async function RL(){const e=await fetch("/api/system/upgrade",{method:"POST"});if(!e.ok&&e.status!==409)throw new Error(`${e.status}: ${await e.text()}`);return e.json()}async function LL(e,t=!1){const n=t?"?fix=1":"",r=await fetch(`/api/system/doctor/${encodeURIComponent(e)}${n}`,{method:"POST"});if(!r.ok)throw new Error(`${r.status}: ${await r.text()}`);return r.json()}function pa(){return Mt("/api/projects")}function IL(e){return Mt(`/api/projects/${encodeURIComponent(e)}`)}async function zL(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.text();throw new Error(`${t.status}: ${n}`)}return t.json()}function PL(e){return Mt(`/api/projects/${encodeURIComponent(e)}/conf`)}async function BL(e,t,n){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/conf`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,etag:n})});if(!r.ok){const a=await r.text(),o=new Error(`${r.status}: ${a}`);throw o.status=r.status,o}return r.json()}async function UL(e,t={}){const n=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.text();throw new Error(`${n.status}: ${r}`)}return n.json()}function $L(e){return Mt(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function FL(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipeline`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipeline:t})});if(!n.ok){const r=await n.text();throw new Error(`${n.status}: ${r}`)}return n.json()}function HL(e,t){return Mt(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function qL(e,t,n,r){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n,etag:r})});if(!a.ok){const o=await a.text(),l=new Error(`${a.status}: ${o}`);throw l.status=a.status,l}return a.json()}async function KL(e,t,n="blank"){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,template:n})});if(!r.ok){const a=await r.text();throw new Error(`${r.status}: ${a}`)}return r.json()}async function GL(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok){const r=await n.text();throw new Error(`${n.status}: ${r}`)}}function VL(){var d;const e=Be(),t=tt({queryKey:["system-info"],queryFn:M_,refetchInterval:3e4}),n=tt({queryKey:["projects"],queryFn:pa,refetchInterval:1e4}),r=QL(),a=!t.isError,o=((d=n.data)==null?void 0:d.data)??[],l=o.filter(h=>h.pipelineStatus==="running").length,u=o.reduce((h,g)=>h+g.workers.active,0);return f.jsxs("div",{className:"h-10 flex items-center gap-3 px-6 font-[family-name:var(--font-mono)] text-[11px] text-[var(--color-text-muted)]",children:[f.jsx("span",{className:"nb-status",style:{background:a?"var(--color-running-bg)":"var(--color-crashed-bg)",color:a?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:e(a?"status.server":"status.offline")}),f.jsx(YL,{state:r}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{className:"flex items-center gap-1",title:e("status.pipelines.tooltip"),children:[f.jsx(Mh,{size:10,strokeWidth:2.5}),f.jsx("span",{className:"font-bold text-[var(--color-text)]",children:l})," ",e("status.pipeline.unit")]}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{className:"flex items-center gap-1",title:e("status.workers.tooltip"),children:[f.jsx(v_,{size:10,strokeWidth:2.5}),f.jsx("span",{className:"font-bold text-[var(--color-text)]",children:u})," ",e("status.worker.unit")]}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{children:["localhost:",window.location.port]}),t.data&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{children:["v",t.data.version]}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{children:["node ",t.data.nodeVersion]})]})]})}function YL({state:e}){const t=Be();return e==="open"?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:t("status.sse.open")}):e==="connecting"?f.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:t("status.sse.connecting")}):f.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[f.jsx(hu,{size:9,strokeWidth:2.5}),t("status.sse.down")]})}function QL(){const[e,t]=T.useState("connecting");return T.useEffect(()=>{let n=null,r=null,a=!1;const o=()=>{a||(n=new EventSource("/stream/heartbeat"),n.addEventListener("server.heartbeat",()=>t("open")),n.addEventListener("open",()=>t("open")),n.addEventListener("error",()=>{(n==null?void 0:n.readyState)===EventSource.CLOSED?(t("closed"),r==null&&(r=setTimeout(()=>{r=null,n==null||n.close(),o()},1e4))):t("connecting")}))};return o(),()=>{a=!0,r!=null&&clearTimeout(r),n==null||n.close()}},[]),e}function WL(){return f.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] h-screen",children:[f.jsx("aside",{className:"row-span-1 row-start-1 border-r-[3px] border-[var(--color-text)] bg-[var(--color-bg)] p-4 flex flex-col",children:f.jsx(_L,{})}),f.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:f.jsx(ZO,{})}),f.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:f.jsx(VL,{})})]})}function Ay(e,t){try{const n=JSON.stringify({message:(e instanceof Error?e.message:String(e)).slice(0,1e3),stack:(e instanceof Error?e.stack??"":"").slice(0,4e3),url:typeof window<"u"?window.location.href:"",ua:typeof navigator<"u"?navigator.userAgent:"",ts:new Date().toISOString(),context:t==null?void 0:t.slice(0,200)});fetch("/api/system/client-errors",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0}).catch(()=>{})}catch{}}function XL(){typeof window>"u"||(window.addEventListener("error",e=>{Ay(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;Ay(t instanceof Error?t:String(t),"unhandledrejection")}))}class ZL extends T.Component{constructor(){super(...arguments);p1(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){var a;Ay(n,`ErrorBoundary: ${((a=r.componentStack)==null?void 0:a.slice(0,200))??""}`),console.error("[ErrorBoundary]",n,r)}render(){if(this.state.error){const n=(()=>{try{return window.localStorage.getItem("sps-console-lang")==="zh"?"zh":"en"}catch{return"en"}})(),r=n==="zh"?"💥 UI 崩了":"💥 UI crashed",a=n==="zh"?"刷新页面":"Refresh page";return f.jsx("div",{className:"p-6",children:f.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:r}),f.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),f.jsxs("details",{className:"text-xs mb-4",children:[f.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),f.jsx("pre",{className:"mt-2 font-[family-name:var(--font-mono)] overflow-auto max-h-60 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md p-3",children:this.state.error.stack??"(no stack)"})]}),f.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:a})]})})}return this.props.children}}const gf=e=>e.lastActivityAt?Date.parse(e.lastActivityAt):0;function jb(e,t){const n=[...e];return t==="name"?n.sort((r,a)=>r.name.localeCompare(a.name)):t==="date"?n.sort((r,a)=>gf(a)-gf(r)):n.sort((r,a)=>{const o=r.pipelineStatus==="running"?1:0,l=a.pipelineStatus==="running"?1:0;return o!==l?l-o:gf(a)-gf(r)})}const JL=["activity","date","name"];function e3(){const e=Be(),t=gs(),[n,r]=T.useState("activity"),{data:a,isLoading:o,isError:l,error:u,refetch:d}=tt({queryKey:["projects"],queryFn:pa});return f.jsxs("div",{className:"flex flex-col gap-6 w-full",children:[f.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("projects.title")}),f.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:a?e("projects.count",{count:a.data.length}):e(o?"common.loading":"projects.refresh.hint")})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"inline-flex border-[3px] border-[var(--color-text)] rounded-xl overflow-hidden shadow-[3px_3px_0_var(--color-text)]",role:"group","aria-label":e("projects.sort.label"),children:JL.map(h=>f.jsx("button",{type:"button","aria-pressed":n===h,onClick:()=>r(h),className:["px-3 py-2 text-xs font-bold font-[family-name:var(--font-mono)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-text)]",n===h?"bg-[var(--color-accent-mint)]":"bg-[var(--color-bg)] hover:bg-[var(--color-bg-cream)]"].join(" "),children:e(`projects.sort.${h}`)},h))}),f.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>d(),type:"button",children:[f.jsx(Mh,{size:16,strokeWidth:2.5}),e("common.refresh")]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>t("/projects/new"),"aria-label":e("projects.new"),children:[f.jsx(Vr,{size:16,strokeWidth:3}),e("projects.new")]})]})]}),o&&f.jsx(r3,{}),l&&f.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e("projects.load.failed")}),f.jsx("p",{className:"text-sm text-[var(--color-text)]",children:u instanceof Error?u.message:String(u)}),f.jsx("button",{className:"nb-btn mt-4",onClick:()=>d(),type:"button",children:e("common.retry")})]}),a&&a.data.length===0&&f.jsx(i3,{}),a&&a.data.length>0&&f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:jb(a.data,n).map(h=>f.jsx(t3,{project:h},h.name))})]})}function t3({project:e}){const t=e.pipelineStatus==="running";return f.jsxs(fo,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),f.jsx(n3,{status:e.pipelineStatus})]}),e.repoDir&&f.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),f.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm mt-4 pt-3 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[f.jsx(xg,{label:"cards",value:e.cards.total,accent:"purple"}),f.jsx(xg,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),f.jsx(xg,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function xg({label:e,value:t,accent:n}){const r={purple:"var(--color-accent-purple)",yellow:"var(--color-accent-yellow)",mint:"var(--color-accent-mint)",idle:"var(--color-bg-cream)"};return f.jsxs("div",{className:"flex flex-col items-center justify-center py-2 rounded-lg border-2 border-[var(--color-text)]",style:{background:r[n]},children:[f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function n3({status:e}){const t={running:{bg:"var(--color-running-bg)",label:"running"},idle:{bg:"var(--color-idle-bg)",label:"idle"},stopping:{bg:"var(--color-stuck-bg)",label:"stopping"},error:{bg:"var(--color-crashed-bg)",label:"error"}},{bg:n,label:r}=t[e],a=e==="running"?"var(--color-running)":e==="error"?"var(--color-crashed)":e==="stopping"?"var(--color-stuck)":"var(--color-idle)";return f.jsx("span",{className:"nb-status",style:{background:n,color:a},children:r})}function r3(){return f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>f.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[f.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),f.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),f.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function i3(){const e=Be(),t=e("projects.empty.hint",{cmd:"__CMD__"}),[n,r]=t.split("__CMD__");return f.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[f.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center",children:f.jsx(__,{size:32,strokeWidth:2.5})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("projects.empty.title")}),f.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:[n,f.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded-md font-[family-name:var(--font-mono)]",children:"sps project init <name>"}),r]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[f.jsx(Vr,{size:16,strokeWidth:3}),e("projects.new")]})]})]})}function a3(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return Mt(`/api/fs/browse${t}`)}const D_=50*1024*1024;async function s3(e,t){if(t.size>D_)throw new Error(`文件超过 50 MB 上限(当前 ${(t.size/1024/1024).toFixed(2)} MB)`);const n=new FormData;n.append("sessionId",e),n.append("file",t,t.name);const r=await fetch("/api/fs/upload",{method:"POST",body:n});if(!r.ok){const a=await r.text();throw new Error(`${r.status}: ${a}`)}return await r.json()}function Ty(e,t){return`/api/fs/file?${new URLSearchParams({path:t,sessionId:e}).toString()}`}function Ab({initialPath:e,onCancel:t,onSelect:n,title:r,mode:a="directory"}){var w,S,k;const o=Be(),l=r??o("dirPicker.title.default"),[u,d]=T.useState(e??null),[h,g]=T.useState(null),m=tt({queryKey:["fs-browse",u],queryFn:()=>a3(u??void 0),staleTime:0,gcTime:0}),y=((w=m.data)==null?void 0:w.path)??u??"",b=((S=m.data)==null?void 0:S.parent)??null,E=((k=m.data)==null?void 0:k.home)??null;return T.useEffect(()=>{const j=_=>{_.key==="Escape"&&(_.preventDefault(),t())};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[t]),f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.5)] p-4",role:"presentation",children:f.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-lg w-full p-5 flex flex-col",style:{maxHeight:"70vh"},role:"dialog","aria-modal":"true","aria-label":l,children:[f.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base",children:l}),f.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:t,"aria-label":o("dirPicker.close.aria"),children:f.jsx(_r,{size:14,strokeWidth:3})})]}),f.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[f.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>b&&d(b),disabled:!b||m.isLoading,"aria-label":o("dirPicker.up.aria"),title:o("dirPicker.up.title"),children:f.jsx(FD,{size:12,strokeWidth:3})}),f.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>E&&d(E),disabled:!E||m.isLoading,"aria-label":o("dirPicker.home.aria"),title:o("dirPicker.home.title"),children:f.jsx(kR,{size:12,strokeWidth:3})}),f.jsx("div",{className:"flex-1 min-w-0 nb-input font-[family-name:var(--font-mono)] text-xs px-2 py-1.5 truncate",title:y,dir:"rtl",children:y||"..."})]}),f.jsxs("div",{className:"flex-1 overflow-y-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[m.isLoading&&f.jsxs("div",{className:"flex items-center justify-center py-12 text-[var(--color-text-muted)]",children:[f.jsx(pt,{size:16,strokeWidth:3,className:"animate-spin mr-2"}),o("dirPicker.loading")]}),m.isError&&f.jsxs("div",{className:"p-4 text-sm text-[var(--color-crashed)]",children:[f.jsx("p",{className:"font-bold mb-1",children:o("dirPicker.error.title")}),f.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] break-all",children:m.error instanceof Error?m.error.message:String(m.error)})]}),m.data&&f.jsxs("ul",{className:"divide-y-2 divide-[var(--color-text)]/20",children:[m.data.entries.length===0&&f.jsx("li",{className:"p-4 text-xs text-[var(--color-text-subtle)] italic text-center",children:o("dirPicker.empty")}),m.data.entries.map(j=>{const _=(()=>{const A=y.endsWith("/")||y.endsWith("\\")?"":"/";return`${y}${A}${j.name}`})(),N=a==="file"&&h===_,O=j.isDirectory||a==="file";return f.jsx("li",{children:f.jsxs("button",{type:"button",className:["w-full flex items-center gap-2 px-3 py-2 text-left text-sm font-[family-name:var(--font-mono)]","disabled:opacity-50 disabled:cursor-not-allowed",N?"bg-[var(--color-accent-mint)] font-bold":"hover:bg-[var(--color-accent-mint)]"].join(" "),disabled:!O,onClick:()=>{j.isDirectory?(g(null),d(_)):a==="file"&&g(_)},onDoubleClick:()=>{a==="file"&&!j.isDirectory&&n(_)},title:j.isDirectory?o("dirPicker.enter.aria",{name:j.name}):a==="file"?o("dirPicker.pickFile.aria",{name:j.name}):o("dirPicker.fileLocked"),children:[j.isDirectory?f.jsx(mu,{size:14,strokeWidth:2.5,className:"flex-shrink-0 text-[var(--color-text)]"}):f.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0"}),f.jsx("span",{className:"truncate",children:j.name}),j.isDirectory&&f.jsx(Uu,{size:12,strokeWidth:2.5,className:"ml-auto flex-shrink-0 text-[var(--color-text-muted)]"})]})},j.name)})]})]}),f.jsxs("div",{className:"flex gap-2 justify-end pt-3 shrink-0",children:[f.jsx("button",{type:"button",className:"nb-btn",onClick:t,children:o("dirPicker.cancel")}),a==="file"?f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>h&&n(h),disabled:!h||m.isLoading||m.isError,title:h??o("dirPicker.useFile.tooltip.empty"),children:[f.jsx(pu,{size:14,strokeWidth:3}),o("dirPicker.useFile")]}):f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>n(y),disabled:!y||m.isLoading||m.isError,children:[f.jsx(pu,{size:14,strokeWidth:3}),o("dirPicker.useDir")]})]})]})})}function o3({title:e,body:t,confirm:n,cancel:r,onConfirm:a,onCancel:o,danger:l}){const u=Be();return T.useEffect(()=>{const d=h=>{h.key==="Escape"&&o()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[o]),f.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),f.jsxs("div",{className:"flex gap-3 justify-end",children:[f.jsx("button",{className:"nb-btn",onClick:o,type:"button",children:r??u("dialog.cancel.default")}),f.jsx("button",{className:l?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await a()},type:"button",children:n})]})]})})}const R_=T.createContext(null);function l3({children:e}){const t=Be(),[n,r]=T.useState(null),a=T.useCallback(u=>new Promise(d=>{r({kind:"confirm",opts:u,resolve:h=>{r(null),d(h)}})}),[]),o=T.useCallback(u=>new Promise(d=>{r({kind:"alert",opts:u,resolve:()=>{r(null),d()}})}),[]),l=T.useCallback(u=>new Promise(d=>{r({kind:"prompt",opts:u,resolve:h=>{r(null),d(h)}})}),[]);return f.jsxs(R_.Provider,{value:{confirm:a,alert:o,prompt:l},children:[e,(n==null?void 0:n.kind)==="confirm"&&f.jsx(o3,{title:n.opts.title,body:n.opts.body,confirm:n.opts.confirm??t("dialog.confirm.default"),cancel:n.opts.cancel,danger:n.opts.danger,onConfirm:()=>n.resolve(!0),onCancel:()=>n.resolve(!1)}),(n==null?void 0:n.kind)==="alert"&&f.jsx(c3,{title:n.opts.title,body:n.opts.body,confirm:n.opts.confirm??t("dialog.alert.default"),onClose:()=>n.resolve()}),(n==null?void 0:n.kind)==="prompt"&&f.jsx(u3,{title:n.opts.title,body:n.opts.body,placeholder:n.opts.placeholder,defaultValue:n.opts.defaultValue,confirm:n.opts.confirm??t("dialog.confirm.default"),cancel:n.opts.cancel??t("dialog.cancel.default"),onConfirm:u=>n.resolve(u),onCancel:()=>n.resolve(null)})]})}function Zn(){const e=T.useContext(R_);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function c3({title:e,body:t,confirm:n,onClose:r}){return T.useEffect(()=>{const a=o=>{(o.key==="Escape"||o.key==="Enter")&&r()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[r]),f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),f.jsx("div",{className:"flex gap-3 justify-end",children:f.jsx("button",{className:"nb-btn nb-btn-primary",onClick:r,type:"button",autoFocus:!0,children:n})})]})})}function u3({title:e,body:t,placeholder:n,defaultValue:r,confirm:a,cancel:o,onConfirm:l,onCancel:u}){const[d,h]=T.useState(r??""),g=T.useRef(null);T.useEffect(()=>{var b,E;(b=g.current)==null||b.focus(),(E=g.current)==null||E.select();const y=w=>{w.key==="Escape"&&u()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[u]);const m=()=>{const y=d.trim();y&&l(y)};return f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),f.jsx("input",{ref:g,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:d,onChange:y=>h(y.target.value),onKeyDown:y=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&(y.preventDefault(),m())}}),f.jsxs("div",{className:"flex gap-3 justify-end",children:[f.jsx("button",{className:"nb-btn",onClick:u,type:"button",children:o}),f.jsx("button",{className:"nb-btn nb-btn-primary",onClick:m,type:"button",disabled:!d.trim(),children:a})]})]})})}function d3(){var _,N,O,A;const e=Be(),t=gs(),n=wn(),{alert:r}=Zn(),[a,o]=T.useState({name:"",projectDir:"",enableGit:!0,createIfMissing:!0,mergeBranch:"main",maxWorkers:"1",ackTimeoutMin:"5",pipelineMode:"pipeline"}),l=a.pipelineMode==="smartArrange",u=tt({queryKey:["system-agents"],queryFn:O_}),d=((_=u.data)==null?void 0:_.agents.worker.model)??"",h=((N=u.data)==null?void 0:N.agents.reviewer.model)??"",g=[...new Set((((O=u.data)==null?void 0:O.providers.anthropic)??[]).flatMap(M=>M.models))],m=[...new Set((((A=u.data)==null?void 0:A.providers.openai)??[]).flatMap(M=>M.models))],[y,b]=T.useState(!1),E=rn({mutationFn:M=>zL(M),onSuccess:M=>{n.invalidateQueries({queryKey:["projects"]}),t(`/projects/${encodeURIComponent(M.name)}`)},onError:M=>{r({title:e("newProject.error.create.title"),body:M instanceof Error?M.message:String(M)})}}),w=/^[a-zA-Z0-9_-]+$/.test(a.name),S=w&&a.projectDir.trim()!==""&&!E.isPending,k=a.projectDir.trim().replace(/\/+$/,""),j=k&&a.name?k.split("/").pop()===a.name?k:`${k}/${a.name}`:"";return f.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[f.jsxs("header",{className:"flex items-center gap-3",children:[f.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.back.aria"),children:[f.jsx(h_,{size:14,strokeWidth:3}),e("newProject.back")]}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e("newProject.title")})]}),f.jsx("div",{className:"nb-card",children:f.jsxs("form",{onSubmit:M=>{M.preventDefault(),S&&E.mutate(a)},className:"flex flex-col gap-5",children:[f.jsx(Br,{label:e("newProject.field.mode"),hint:e(l?"newProject.field.mode.smartHint":"newProject.field.mode.pipelineHint"),children:f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:["pipeline","smartArrange"].map(M=>{const I=a.pipelineMode===M;return f.jsxs("button",{type:"button",onClick:()=>o({...a,pipelineMode:M}),"aria-pressed":I,className:["text-left rounded-xl border-2 p-3 transition-all",I?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:[f.jsx("div",{className:"text-sm font-bold",children:e(M==="pipeline"?"newProject.field.mode.pipeline":"newProject.field.mode.smart")}),f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:e(M==="pipeline"?"newProject.field.mode.pipelineDesc":"newProject.field.mode.smartDesc")})]},M)})})}),l&&f.jsx(Br,{label:e("newProject.field.goal"),hint:e("newProject.field.goal.hint"),children:f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-sm",style:{minHeight:110,resize:"vertical"},placeholder:e("newProject.field.goal.placeholder"),value:a.goal??"",onChange:M=>o({...a,goal:M.target.value})})}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[f.jsxs(Br,{label:"Worker 模型",hint:`默认:${d||"全局默认"}(留空用默认)`,children:[f.jsx("input",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:a.workerModel??"",onChange:M=>o({...a,workerModel:M.target.value}),placeholder:d,list:"np-worker-models",spellCheck:!1}),f.jsx("datalist",{id:"np-worker-models",children:g.map(M=>f.jsx("option",{value:M},M))})]}),l&&f.jsxs(Br,{label:"OpenAI Agent(监工)模型",hint:`默认:${h||"全局默认"}(留空用默认)`,children:[f.jsx("input",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:a.reviewerModel??"",onChange:M=>o({...a,reviewerModel:M.target.value}),placeholder:h,list:"np-reviewer-models",spellCheck:!1}),f.jsx("datalist",{id:"np-reviewer-models",children:m.map(M=>f.jsx("option",{value:M},M))})]})]}),f.jsxs(Br,{label:e("newProject.field.name"),hint:e("newProject.field.name.example"),children:[f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.name.placeholder"),value:a.name,onChange:M=>o({...a,name:M.target.value}),autoFocus:!0,required:!0}),a.name&&!w&&f.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:e("newProject.field.name.invalid")})]}),f.jsxs(Br,{label:e("newProject.field.dir"),hint:e("newProject.field.dir.long"),children:[f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.dir.placeholder"),value:a.projectDir,onChange:M=>o({...a,projectDir:M.target.value}),required:!0}),f.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>b(!0),"aria-label":e("newProject.dir.browseAria"),title:e("newProject.dir.browseAria"),children:[f.jsx(b_,{size:14,strokeWidth:2.5}),e("newProject.dir.browse")]})]}),j&&f.jsxs("p",{className:"text-xs mt-1.5 font-[family-name:var(--font-mono)]",children:[f.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[e("newProject.field.dir.preview")," "]}),f.jsx("span",{className:"font-bold",children:j})]}),f.jsxs("label",{className:"flex items-center gap-2 mt-2 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:a.createIfMissing!==!1,onChange:M=>o({...a,createIfMissing:M.target.checked}),className:"w-4 h-4 cursor-pointer"}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("newProject.field.dir.createIfMissing")})]})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[f.jsx(Br,{label:e("newProject.field.maxWorkers.short"),children:f.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.maxWorkers,onChange:M=>o({...a,maxWorkers:M.target.value})})}),f.jsx(Br,{label:e("newProject.field.ackTimeout.minutes"),hint:e("newProject.field.ackTimeout.minutes.help"),children:f.jsx("input",{type:"number",min:"1",max:"30",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.ackTimeoutMin??"5",onChange:M=>o({...a,ackTimeoutMin:M.target.value})})})]}),f.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[f.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:a.enableGit??!0,onChange:M=>o({...a,enableGit:M.target.checked}),className:"w-4 h-4 cursor-pointer"}),f.jsx("span",{className:"text-sm font-bold",children:e("newProject.field.git.label")})]}),f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:e("newProject.field.git.detail")}),a.enableGit!==!1&&f.jsxs("div",{className:"flex flex-col gap-4 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[f.jsx(Br,{label:e("newProject.field.git.branch"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.mergeBranch??"main",onChange:M=>o({...a,mergeBranch:M.target.value})})}),f.jsx(Br,{label:e("newProject.field.gitlabProject.label"),hint:e("newProject.field.gitlabProject.help2"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.gitlabProject.placeholder"),value:a.gitlabProject??"",onChange:M=>o({...a,gitlabProject:M.target.value})})}),a.gitlabProject&&f.jsx(Br,{label:e("newProject.field.gitlabProjectId"),hint:e("newProject.field.gitlabProjectId.help"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.gitlabProjectId.placeholder"),value:a.gitlabProjectId??"",onChange:M=>o({...a,gitlabProjectId:M.target.value})})})]})]}),f.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:e("newProject.section.notifications")}),f.jsx(Br,{label:e("newProject.field.matrixRoom.label"),hint:e("newProject.field.matrixRoom.help2"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.matrixRoom.placeholder"),value:a.matrixRoomId??"",onChange:M=>o({...a,matrixRoomId:M.target.value})})})]}),f.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[f.jsx("button",{type:"button",className:"nb-btn",onClick:()=>t("/projects"),disabled:E.isPending,children:e("common.cancel")}),f.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!S,"aria-label":e("newProject.submit"),children:E.isPending?f.jsxs(f.Fragment,{children:[f.jsx(pt,{size:14,strokeWidth:3,className:"animate-spin"}),e("newProject.creating")]}):f.jsxs(f.Fragment,{children:[f.jsx(Vr,{size:14,strokeWidth:3}),e("common.create")]})})]})]})}),y&&f.jsx(Ab,{title:e("newProject.field.dir.pickerTitle"),initialPath:a.projectDir.trim()||void 0,onCancel:()=>b(!1),onSelect:M=>{o({...a,projectDir:M}),b(!1)}})]})}function Br({label:e,hint:t,children:n}){return f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:e}),n,t&&f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const Tb=Symbol.for("yaml.alias"),My=Symbol.for("yaml.document"),hs=Symbol.for("yaml.map"),L_=Symbol.for("yaml.pair"),Mi=Symbol.for("yaml.scalar"),Kl=Symbol.for("yaml.seq"),Kr=Symbol.for("yaml.node.type"),ys=e=>!!e&&typeof e=="object"&&e[Kr]===Tb,po=e=>!!e&&typeof e=="object"&&e[Kr]===My,Gl=e=>!!e&&typeof e=="object"&&e[Kr]===hs,qt=e=>!!e&&typeof e=="object"&&e[Kr]===L_,Lt=e=>!!e&&typeof e=="object"&&e[Kr]===Mi,Vl=e=>!!e&&typeof e=="object"&&e[Kr]===Kl;function Xt(e){if(e&&typeof e=="object")switch(e[Kr]){case hs:case Kl:return!0}return!1}function Zt(e){if(e&&typeof e=="object")switch(e[Kr]){case Tb:case hs:case Mi:case Kl:return!0}return!1}const I_=e=>(Lt(e)||Xt(e))&&!!e.anchor,cr=Symbol("break visit"),z_=Symbol("skip children"),Ai=Symbol("remove node");function mo(e,t){const n=P_(t);po(e)?ll(null,e.contents,n,Object.freeze([e]))===Ai&&(e.contents=null):ll(null,e,n,Object.freeze([]))}mo.BREAK=cr;mo.SKIP=z_;mo.REMOVE=Ai;function ll(e,t,n,r){const a=B_(e,t,n,r);if(Zt(a)||qt(a))return U_(e,r,a),ll(e,a,n,r);if(typeof a!="symbol"){if(Xt(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){const l=ll(o,t.items[o],n,r);if(typeof l=="number")o=l-1;else{if(l===cr)return cr;l===Ai&&(t.items.splice(o,1),o-=1)}}}else if(qt(t)){r=Object.freeze(r.concat(t));const o=ll("key",t.key,n,r);if(o===cr)return cr;o===Ai&&(t.key=null);const l=ll("value",t.value,n,r);if(l===cr)return cr;l===Ai&&(t.value=null)}}return a}async function Oh(e,t){const n=P_(t);po(e)?await cl(null,e.contents,n,Object.freeze([e]))===Ai&&(e.contents=null):await cl(null,e,n,Object.freeze([]))}Oh.BREAK=cr;Oh.SKIP=z_;Oh.REMOVE=Ai;async function cl(e,t,n,r){const a=await B_(e,t,n,r);if(Zt(a)||qt(a))return U_(e,r,a),cl(e,a,n,r);if(typeof a!="symbol"){if(Xt(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){const l=await cl(o,t.items[o],n,r);if(typeof l=="number")o=l-1;else{if(l===cr)return cr;l===Ai&&(t.items.splice(o,1),o-=1)}}}else if(qt(t)){r=Object.freeze(r.concat(t));const o=await cl("key",t.key,n,r);if(o===cr)return cr;o===Ai&&(t.key=null);const l=await cl("value",t.value,n,r);if(l===cr)return cr;l===Ai&&(t.value=null)}}return a}function P_(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function B_(e,t,n,r){var a,o,l,u,d;if(typeof n=="function")return n(e,t,r);if(Gl(t))return(a=n.Map)==null?void 0:a.call(n,e,t,r);if(Vl(t))return(o=n.Seq)==null?void 0:o.call(n,e,t,r);if(qt(t))return(l=n.Pair)==null?void 0:l.call(n,e,t,r);if(Lt(t))return(u=n.Scalar)==null?void 0:u.call(n,e,t,r);if(ys(t))return(d=n.Alias)==null?void 0:d.call(n,e,t,r)}function U_(e,t,n){const r=t[t.length-1];if(Xt(r))r.items[e]=n;else if(qt(r))e==="key"?r.key=n:r.value=n;else if(po(r))r.contents=n;else{const a=ys(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const f3={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},h3=e=>e.replace(/[!,[\]{}]/g,t=>f3[t]);class Wn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Wn.defaultYaml,t),this.tags=Object.assign({},Wn.defaultTags,n)}clone(){const t=new Wn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Wn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Wn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Wn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Wn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Wn.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),a=r.shift();switch(a){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[o,l]=r;return this.tags[o]=l,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const l=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,l),!1}}default:return n(0,`Unknown directive ${a}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const l=t.slice(2,-1);return l==="!"||l==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),l)}const[,r,a]=t.match(/^(.*!)([^!]*)$/s);a||n(`The ${t} tag has no suffix`);const o=this.tags[r];if(o)try{return o+decodeURIComponent(a)}catch(l){return n(String(l)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+h3(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let a;if(t&&r.length>0&&Zt(t.contents)){const o={};mo(t.contents,(l,u)=>{Zt(u)&&u.tag&&(o[u.tag]=!0)}),a=Object.keys(o)}else a=[];for(const[o,l]of r)o==="!!"&&l==="tag:yaml.org,2002:"||(!t||a.some(u=>u.startsWith(l)))&&n.push(`%TAG ${o} ${l}`);return n.join(`
|
|
398
|
+
`)}}Wn.defaultYaml={explicit:!1,version:"1.2"};Wn.defaultTags={"!!":"tag:yaml.org,2002:"};function $_(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function F_(e){const t=new Set;return mo(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function H_(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function p3(e,t){const n=[],r=new Map;let a=null;return{onAnchor:o=>{n.push(o),a??(a=F_(e));const l=H_(t,a);return a.add(l),l},setAnchors:()=>{for(const o of n){const l=r.get(o);if(typeof l=="object"&&l.anchor&&(Lt(l.node)||Xt(l.node)))l.node.anchor=l.anchor;else{const u=new Error("Failed to resolve repeated object (this should not happen)");throw u.source=o,u}}},sourceObjects:r}}function ul(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let a=0,o=r.length;a<o;++a){const l=r[a],u=ul(e,r,String(a),l);u===void 0?delete r[a]:u!==l&&(r[a]=u)}else if(r instanceof Map)for(const a of Array.from(r.keys())){const o=r.get(a),l=ul(e,r,a,o);l===void 0?r.delete(a):l!==o&&r.set(a,l)}else if(r instanceof Set)for(const a of Array.from(r)){const o=ul(e,r,a,a);o===void 0?r.delete(a):o!==a&&(r.delete(a),r.add(o))}else for(const[a,o]of Object.entries(r)){const l=ul(e,r,a,o);l===void 0?delete r[a]:l!==o&&(r[a]=l)}return e.call(t,n,r)}function Hr(e,t,n){if(Array.isArray(e))return e.map((r,a)=>Hr(r,String(a),n));if(e&&typeof e.toJSON=="function"){if(!n||!I_(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=o=>{r.res=o,delete n.onCreate};const a=e.toJSON(t,n);return n.onCreate&&n.onCreate(a),a}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class Mb{constructor(t){Object.defineProperty(this,Kr,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:a,reviver:o}={}){if(!po(t))throw new TypeError("A document argument is required");const l={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},u=Hr(this,"",l);if(typeof a=="function")for(const{count:d,res:h}of l.anchors.values())a(h,d);return typeof o=="function"?ul(o,{"":u},"",u):u}}class Dh extends Mb{constructor(t){super(Tb),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let r;n!=null&&n.aliasResolveCache?r=n.aliasResolveCache:(r=[],mo(t,{Node:(o,l)=>{(ys(l)||I_(l))&&r.push(l)}}),n&&(n.aliasResolveCache=r));let a;for(const o of r){if(o===this)break;o.anchor===this.source&&(a=o)}return a}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:a,maxAliasCount:o}=n,l=this.resolve(a,n);if(!l){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let u=r.get(l);if(u||(Hr(l,null,n),u=r.get(l)),(u==null?void 0:u.res)===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(o>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=qf(a,l,r)),u.count*u.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return u.res}toString(t,n,r){const a=`*${this.source}`;if(t){if($_(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${a} `}return a}}function qf(e,t,n){if(ys(t)){const r=t.resolve(e),a=n&&r&&n.get(r);return a?a.count*a.aliasCount:0}else if(Xt(t)){let r=0;for(const a of t.items){const o=qf(e,a,n);o>r&&(r=o)}return r}else if(qt(t)){const r=qf(e,t.key,n),a=qf(e,t.value,n);return Math.max(r,a)}return 1}const q_=e=>!e||typeof e!="function"&&typeof e!="object";class Ge extends Mb{constructor(t){super(Mi),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:Hr(this.value,t,n)}toString(){return String(this.value)}}Ge.BLOCK_FOLDED="BLOCK_FOLDED";Ge.BLOCK_LITERAL="BLOCK_LITERAL";Ge.PLAIN="PLAIN";Ge.QUOTE_DOUBLE="QUOTE_DOUBLE";Ge.QUOTE_SINGLE="QUOTE_SINGLE";const m3="tag:yaml.org,2002:";function g3(e,t,n){if(t){const r=n.filter(o=>o.tag===t),a=r.find(o=>!o.format)??r[0];if(!a)throw new Error(`Tag ${t} not found`);return a}return n.find(r=>{var a;return((a=r.identify)==null?void 0:a.call(r,e))&&!r.format})}function gu(e,t,n){var m,y,b;if(po(e)&&(e=e.contents),Zt(e))return e;if(qt(e)){const E=(y=(m=n.schema[hs]).createNode)==null?void 0:y.call(m,n.schema,null,n);return E.items.push(e),E}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:a,onTagObj:o,schema:l,sourceObjects:u}=n;let d;if(r&&e&&typeof e=="object"){if(d=u.get(e),d)return d.anchor??(d.anchor=a(e)),new Dh(d.anchor);d={anchor:null,node:null},u.set(e,d)}t!=null&&t.startsWith("!!")&&(t=m3+t.slice(2));let h=g3(e,t,l.tags);if(!h){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const E=new Ge(e);return d&&(d.node=E),E}h=e instanceof Map?l[hs]:Symbol.iterator in Object(e)?l[Kl]:l[hs]}o&&(o(h),delete n.onTagObj);const g=h!=null&&h.createNode?h.createNode(n.schema,e,n):typeof((b=h==null?void 0:h.nodeClass)==null?void 0:b.from)=="function"?h.nodeClass.from(n.schema,e,n):new Ge(e);return t?g.tag=t:h.default||(g.tag=h.tag),d&&(d.node=g),g}function sh(e,t,n){let r=n;for(let a=t.length-1;a>=0;--a){const o=t[a];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const l=[];l[o]=r,r=l}else r=new Map([[o,r]])}return gu(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const tu=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class K_ extends Mb{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Zt(r)||qt(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(tu(t))this.add(n);else{const[r,...a]=t,o=this.get(r,!0);if(Xt(o))o.addIn(a,n);else if(o===void 0&&this.schema)this.set(r,sh(this.schema,a,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const a=this.get(n,!0);if(Xt(a))return a.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...a]=t,o=this.get(r,!0);return a.length===0?!n&&Lt(o)?o.value:o:Xt(o)?o.getIn(a,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!qt(n))return!1;const r=n.value;return r==null||t&&Lt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const a=this.get(n,!0);return Xt(a)?a.hasIn(r):!1}setIn(t,n){const[r,...a]=t;if(a.length===0)this.set(r,n);else{const o=this.get(r,!0);if(Xt(o))o.setIn(a,n);else if(o===void 0&&this.schema)this.set(r,sh(this.schema,a,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}}const y3=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function oa(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Fs=(e,t,n)=>e.endsWith(`
|
|
399
|
+
`)?oa(n,t):n.includes(`
|
|
400
|
+
`)?`
|
|
401
|
+
`+oa(n,t):(e.endsWith(" ")?"":" ")+n,G_="flow",Oy="block",Kf="quoted";function Rh(e,t,n="flow",{indentAtStart:r,lineWidth:a=80,minContentWidth:o=20,onFold:l,onOverflow:u}={}){if(!a||a<0)return e;a<o&&(o=0);const d=Math.max(1+o,1+a-t.length);if(e.length<=d)return e;const h=[],g={};let m=a-t.length;typeof r=="number"&&(r>a-Math.max(2,o)?h.push(0):m=a-r);let y,b,E=!1,w=-1,S=-1,k=-1;n===Oy&&(w=V1(e,w,t.length),w!==-1&&(m=w+d));for(let _;_=e[w+=1];){if(n===Kf&&_==="\\"){switch(S=w,e[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}k=w}if(_===`
|
|
402
|
+
`)n===Oy&&(w=V1(e,w,t.length)),m=w+t.length+d,y=void 0;else{if(_===" "&&b&&b!==" "&&b!==`
|
|
403
|
+
`&&b!==" "){const N=e[w+1];N&&N!==" "&&N!==`
|
|
404
|
+
`&&N!==" "&&(y=w)}if(w>=m)if(y)h.push(y),m=y+d,y=void 0;else if(n===Kf){for(;b===" "||b===" ";)b=_,_=e[w+=1],E=!0;const N=w>k+1?w-2:S-1;if(g[N])return e;h.push(N),g[N]=!0,m=N+d,y=void 0}else E=!0}b=_}if(E&&u&&u(),h.length===0)return e;l&&l();let j=e.slice(0,h[0]);for(let _=0;_<h.length;++_){const N=h[_],O=h[_+1]||e.length;N===0?j=`
|
|
405
|
+
${t}${e.slice(0,O)}`:(n===Kf&&g[N]&&(j+=`${e[N]}\\`),j+=`
|
|
406
|
+
${t}${e.slice(N+1,O)}`)}return j}function V1(e,t,n){let r=t,a=t+1,o=e[a];for(;o===" "||o===" ";)if(t<a+n)o=e[++t];else{do o=e[++t];while(o&&o!==`
|
|
407
|
+
`);r=t,a=t+1,o=e[a]}return r}const Lh=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ih=e=>/^(%|---|\.\.\.)/m.test(e);function b3(e,t,n){if(!t||t<0)return!1;const r=t-n,a=e.length;if(a<=r)return!1;for(let o=0,l=0;o<a;++o)if(e[o]===`
|
|
408
|
+
`){if(o-l>r)return!0;if(l=o+1,a-l<=r)return!1}return!0}function iu(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,a=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Ih(e)?" ":"");let l="",u=0;for(let d=0,h=n[d];h;h=n[++d])if(h===" "&&n[d+1]==="\\"&&n[d+2]==="n"&&(l+=n.slice(u,d)+"\\ ",d+=1,u=d,h="\\"),h==="\\")switch(n[d+1]){case"u":{l+=n.slice(u,d);const g=n.substr(d+2,4);switch(g){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:g.substr(0,2)==="00"?l+="\\x"+g.substr(2):l+=n.substr(d,6)}d+=5,u=d+1}break;case"n":if(r||n[d+2]==='"'||n.length<a)d+=1;else{for(l+=n.slice(u,d)+`
|
|
409
|
+
|
|
410
|
+
`;n[d+2]==="\\"&&n[d+3]==="n"&&n[d+4]!=='"';)l+=`
|
|
411
|
+
`,d+=2;l+=o,n[d+2]===" "&&(l+="\\"),d+=1,u=d+1}break;default:d+=1}return l=u?l+n.slice(u):n,r?l:Rh(l,o,Kf,Lh(t,!1))}function Dy(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
412
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return iu(e,t);const n=t.indent||(Ih(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
413
|
+
${n}`)+"'";return t.implicitKey?r:Rh(r,n,G_,Lh(t,!1))}function dl(e,t){const{singleQuote:n}=t.options;let r;if(n===!1)r=iu;else{const a=e.includes('"'),o=e.includes("'");a&&!o?r=Dy:o&&!a?r=iu:r=n?Dy:iu}return r(e,t)}let Ry;try{Ry=new RegExp(`(^|(?<!
|
|
414
|
+
))
|
|
415
|
+
+(?!
|
|
416
|
+
|$)`,"g")}catch{Ry=/\n+(?!\n|$)/g}function Gf({comment:e,type:t,value:n},r,a,o){const{blockQuote:l,commentString:u,lineWidth:d}=r.options;if(!l||/\n[\t ]+$/.test(n))return dl(n,r);const h=r.indent||(r.forceBlockIndent||Ih(n)?" ":""),g=l==="literal"?!0:l==="folded"||t===Ge.BLOCK_FOLDED?!1:t===Ge.BLOCK_LITERAL?!0:!b3(n,d,h.length);if(!n)return g?`|
|
|
417
|
+
`:`>
|
|
418
|
+
`;let m,y;for(y=n.length;y>0;--y){const O=n[y-1];if(O!==`
|
|
419
|
+
`&&O!==" "&&O!==" ")break}let b=n.substring(y);const E=b.indexOf(`
|
|
420
|
+
`);E===-1?m="-":n===b||E!==b.length-1?(m="+",o&&o()):m="",b&&(n=n.slice(0,-b.length),b[b.length-1]===`
|
|
421
|
+
`&&(b=b.slice(0,-1)),b=b.replace(Ry,`$&${h}`));let w=!1,S,k=-1;for(S=0;S<n.length;++S){const O=n[S];if(O===" ")w=!0;else if(O===`
|
|
422
|
+
`)k=S;else break}let j=n.substring(0,k<S?k+1:S);j&&(n=n.substring(j.length),j=j.replace(/\n+/g,`$&${h}`));let N=(w?h?"2":"1":"")+m;if(e&&(N+=" "+u(e.replace(/ ?[\r\n]+/g," ")),a&&a()),!g){const O=n.replace(/\n+/g,`
|
|
423
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let A=!1;const M=Lh(r,!0);l!=="folded"&&t!==Ge.BLOCK_FOLDED&&(M.onOverflow=()=>{A=!0});const I=Rh(`${j}${O}${b}`,h,Oy,M);if(!A)return`>${N}
|
|
424
|
+
${h}${I}`}return n=n.replace(/\n+/g,`$&${h}`),`|${N}
|
|
425
|
+
${h}${j}${n}${b}`}function x3(e,t,n,r){const{type:a,value:o}=e,{actualString:l,implicitKey:u,indent:d,indentStep:h,inFlow:g}=t;if(u&&o.includes(`
|
|
426
|
+
`)||g&&/[[\]{},]/.test(o))return dl(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return u||g||!o.includes(`
|
|
427
|
+
`)?dl(o,t):Gf(e,t,n,r);if(!u&&!g&&a!==Ge.PLAIN&&o.includes(`
|
|
428
|
+
`))return Gf(e,t,n,r);if(Ih(o)){if(d==="")return t.forceBlockIndent=!0,Gf(e,t,n,r);if(u&&d===h)return dl(o,t)}const m=o.replace(/\n+/g,`$&
|
|
429
|
+
${d}`);if(l){const y=w=>{var S;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((S=w.test)==null?void 0:S.test(m))},{compat:b,tags:E}=t.doc.schema;if(E.some(y)||b!=null&&b.some(y))return dl(o,t)}return u?m:Rh(m,d,G_,Lh(t,!1))}function Hu(e,t,n,r){const{implicitKey:a,inFlow:o}=t,l=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:u}=e;u!==Ge.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(l.value)&&(u=Ge.QUOTE_DOUBLE);const d=g=>{switch(g){case Ge.BLOCK_FOLDED:case Ge.BLOCK_LITERAL:return a||o?dl(l.value,t):Gf(l,t,n,r);case Ge.QUOTE_DOUBLE:return iu(l.value,t);case Ge.QUOTE_SINGLE:return Dy(l.value,t);case Ge.PLAIN:return x3(l,t,n,r);default:return null}};let h=d(u);if(h===null){const{defaultKeyType:g,defaultStringType:m}=t.options,y=a&&g||m;if(h=d(y),h===null)throw new Error(`Unsupported default string type ${y}`)}return h}function V_(e,t){const n=Object.assign({blockQuote:!0,commentString:y3,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function v3(e,t){var a;if(t.tag){const o=e.filter(l=>l.tag===t.tag);if(o.length>0)return o.find(l=>l.format===t.format)??o[0]}let n,r;if(Lt(t)){r=t.value;let o=e.filter(l=>{var u;return(u=l.identify)==null?void 0:u.call(l,r)});if(o.length>1){const l=o.filter(u=>u.test);l.length>0&&(o=l)}n=o.find(l=>l.format===t.format)??o.find(l=>!l.format)}else r=t,n=e.find(o=>o.nodeClass&&r instanceof o.nodeClass);if(!n){const o=((a=r==null?void 0:r.constructor)==null?void 0:a.name)??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${o} value`)}return n}function w3(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const a=[],o=(Lt(e)||Xt(e))&&e.anchor;o&&$_(o)&&(n.add(o),a.push(`&${o}`));const l=e.tag??(t.default?null:t.tag);return l&&a.push(r.directives.tagString(l)),a.join(" ")}function Ml(e,t,n,r){var d;if(qt(e))return e.toString(t,n,r);if(ys(e)){if(t.doc.directives)return e.toString(t);if((d=t.resolvedAliases)!=null&&d.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a;const o=Zt(e)?e:t.doc.createNode(e,{onTagObj:h=>a=h});a??(a=v3(t.doc.schema.tags,o));const l=w3(o,a,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);const u=typeof a.stringify=="function"?a.stringify(o,t,n,r):Lt(o)?Hu(o,t,n,r):o.toString(t,n,r);return l?Lt(o)||u[0]==="{"||u[0]==="["?`${l} ${u}`:`${l}
|
|
430
|
+
${t.indent}${u}`:u}function E3({key:e,value:t},n,r,a){const{allNullValues:o,doc:l,indent:u,indentStep:d,options:{commentString:h,indentSeq:g,simpleKeys:m}}=n;let y=Zt(e)&&e.comment||null;if(m){if(y)throw new Error("With simple keys, key nodes cannot have comments");if(Xt(e)||!Zt(e)&&typeof e=="object"){const M="With simple keys, collection cannot be used as a key value";throw new Error(M)}}let b=!m&&(!e||y&&t==null&&!n.inFlow||Xt(e)||(Lt(e)?e.type===Ge.BLOCK_FOLDED||e.type===Ge.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!b&&(m||!o),indent:u+d});let E=!1,w=!1,S=Ml(e,n,()=>E=!0,()=>w=!0);if(!b&&!n.inFlow&&S.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");b=!0}if(n.inFlow){if(o||t==null)return E&&r&&r(),S===""?"?":b?`? ${S}`:S}else if(o&&!m||t==null&&b)return S=`? ${S}`,y&&!E?S+=Fs(S,n.indent,h(y)):w&&a&&a(),S;E&&(y=null),b?(y&&(S+=Fs(S,n.indent,h(y))),S=`? ${S}
|
|
431
|
+
${u}:`):(S=`${S}:`,y&&(S+=Fs(S,n.indent,h(y))));let k,j,_;Zt(t)?(k=!!t.spaceBefore,j=t.commentBefore,_=t.comment):(k=!1,j=null,_=null,t&&typeof t=="object"&&(t=l.createNode(t))),n.implicitKey=!1,!b&&!y&&Lt(t)&&(n.indentAtStart=S.length+1),w=!1,!g&&d.length>=2&&!n.inFlow&&!b&&Vl(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let N=!1;const O=Ml(t,n,()=>N=!0,()=>w=!0);let A=" ";if(y||k||j){if(A=k?`
|
|
432
|
+
`:"",j){const M=h(j);A+=`
|
|
433
|
+
${oa(M,n.indent)}`}O===""&&!n.inFlow?A===`
|
|
434
|
+
`&&_&&(A=`
|
|
435
|
+
|
|
436
|
+
`):A+=`
|
|
437
|
+
${n.indent}`}else if(!b&&Xt(t)){const M=O[0],I=O.indexOf(`
|
|
438
|
+
`),F=I!==-1,$=n.inFlow??t.flow??t.items.length===0;if(F||!$){let U=!1;if(F&&(M==="&"||M==="!")){let q=O.indexOf(" ");M==="&"&&q!==-1&&q<I&&O[q+1]==="!"&&(q=O.indexOf(" ",q+1)),(q===-1||I<q)&&(U=!0)}U||(A=`
|
|
439
|
+
${n.indent}`)}}else(O===""||O[0]===`
|
|
440
|
+
`)&&(A="");return S+=A+O,n.inFlow?N&&r&&r():_&&!N?S+=Fs(S,n.indent,h(_)):w&&a&&a(),S}function Y_(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const yf="<<",ca={identify:e=>e===yf||typeof e=="symbol"&&e.description===yf,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ge(Symbol(yf)),{addToJSMap:Q_}),stringify:()=>yf},k3=(e,t)=>(ca.identify(t)||Lt(t)&&(!t.type||t.type===Ge.PLAIN)&&ca.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===ca.tag&&n.default));function Q_(e,t,n){if(n=e&&ys(n)?n.resolve(e.doc):n,Vl(n))for(const r of n.items)vg(e,t,r);else if(Array.isArray(n))for(const r of n)vg(e,t,r);else vg(e,t,n)}function vg(e,t,n){const r=e&&ys(n)?n.resolve(e.doc):n;if(!Gl(r))throw new Error("Merge sources must be maps or map aliases");const a=r.toJSON(null,e,Map);for(const[o,l]of a)t instanceof Map?t.has(o)||t.set(o,l):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:l,writable:!0,enumerable:!0,configurable:!0});return t}function W_(e,t,{key:n,value:r}){if(Zt(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(k3(e,n))Q_(e,t,r);else{const a=Hr(n,"",e);if(t instanceof Map)t.set(a,Hr(r,a,e));else if(t instanceof Set)t.add(a);else{const o=S3(n,a,e),l=Hr(r,o,e);o in t?Object.defineProperty(t,o,{value:l,writable:!0,enumerable:!0,configurable:!0}):t[o]=l}}return t}function S3(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Zt(e)&&(n!=null&&n.doc)){const r=V_(n.doc,{});r.anchors=new Set;for(const o of n.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;const a=e.toString(r);if(!n.mapKeyWarned){let o=JSON.stringify(a);o.length>40&&(o=o.substring(0,36)+'..."'),Y_(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return a}return JSON.stringify(t)}function Ob(e,t,n){const r=gu(e,void 0,n),a=gu(t,void 0,n);return new Fn(r,a)}class Fn{constructor(t,n=null){Object.defineProperty(this,Kr,{value:L_}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return Zt(n)&&(n=n.clone(t)),Zt(r)&&(r=r.clone(t)),new Fn(n,r)}toJSON(t,n){const r=n!=null&&n.mapAsMap?new Map:{};return W_(n,r,this)}toString(t,n,r){return t!=null&&t.doc?E3(this,t,n,r):JSON.stringify(this)}}function X_(e,t,n){return(t.inFlow??e.flow?N3:_3)(e,t,n)}function _3({comment:e,items:t},n,{blockItemPrefix:r,flowChars:a,itemIndent:o,onChompKeep:l,onComment:u}){const{indent:d,options:{commentString:h}}=n,g=Object.assign({},n,{indent:o,type:null});let m=!1;const y=[];for(let E=0;E<t.length;++E){const w=t[E];let S=null;if(Zt(w))!m&&w.spaceBefore&&y.push(""),oh(n,y,w.commentBefore,m),w.comment&&(S=w.comment);else if(qt(w)){const j=Zt(w.key)?w.key:null;j&&(!m&&j.spaceBefore&&y.push(""),oh(n,y,j.commentBefore,m))}m=!1;let k=Ml(w,g,()=>S=null,()=>m=!0);S&&(k+=Fs(k,o,h(S))),m&&S&&(m=!1),y.push(r+k)}let b;if(y.length===0)b=a.start+a.end;else{b=y[0];for(let E=1;E<y.length;++E){const w=y[E];b+=w?`
|
|
441
|
+
${d}${w}`:`
|
|
442
|
+
`}}return e?(b+=`
|
|
443
|
+
`+oa(h(e),d),u&&u()):m&&l&&l(),b}function N3({items:e},t,{flowChars:n,itemIndent:r}){const{indent:a,indentStep:o,flowCollectionPadding:l,options:{commentString:u}}=t;r+=o;const d=Object.assign({},t,{indent:r,inFlow:!0,type:null});let h=!1,g=0;const m=[];for(let E=0;E<e.length;++E){const w=e[E];let S=null;if(Zt(w))w.spaceBefore&&m.push(""),oh(t,m,w.commentBefore,!1),w.comment&&(S=w.comment);else if(qt(w)){const j=Zt(w.key)?w.key:null;j&&(j.spaceBefore&&m.push(""),oh(t,m,j.commentBefore,!1),j.comment&&(h=!0));const _=Zt(w.value)?w.value:null;_?(_.comment&&(S=_.comment),_.commentBefore&&(h=!0)):w.value==null&&(j!=null&&j.comment)&&(S=j.comment)}S&&(h=!0);let k=Ml(w,d,()=>S=null);h||(h=m.length>g||k.includes(`
|
|
444
|
+
`)),E<e.length-1?k+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(h||(h=m.reduce((j,_)=>j+_.length+2,2)+(k.length+2)>t.options.lineWidth)),h&&(k+=",")),S&&(k+=Fs(k,r,u(S))),m.push(k),g=m.length}const{start:y,end:b}=n;if(m.length===0)return y+b;if(!h){const E=m.reduce((w,S)=>w+S.length+2,2);h=t.options.lineWidth>0&&E>t.options.lineWidth}if(h){let E=y;for(const w of m)E+=w?`
|
|
445
|
+
${o}${a}${w}`:`
|
|
446
|
+
`;return`${E}
|
|
447
|
+
${a}${b}`}else return`${y}${l}${m.join(" ")}${l}${b}`}function oh({indent:e,options:{commentString:t}},n,r,a){if(r&&a&&(r=r.replace(/^\n+/,"")),r){const o=oa(t(r),e);n.push(o.trimStart())}}function Hs(e,t){const n=Lt(t)?t.value:t;for(const r of e)if(qt(r)&&(r.key===t||r.key===n||Lt(r.key)&&r.key.value===n))return r}class Er extends K_{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(hs,t),this.items=[]}static from(t,n,r){const{keepUndefined:a,replacer:o}=r,l=new this(t),u=(d,h)=>{if(typeof o=="function")h=o.call(n,d,h);else if(Array.isArray(o)&&!o.includes(d))return;(h!==void 0||a)&&l.items.push(Ob(d,h,r))};if(n instanceof Map)for(const[d,h]of n)u(d,h);else if(n&&typeof n=="object")for(const d of Object.keys(n))u(d,n[d]);return typeof t.sortMapEntries=="function"&&l.items.sort(t.sortMapEntries),l}add(t,n){var l;let r;qt(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new Fn(t,t==null?void 0:t.value):r=new Fn(t.key,t.value);const a=Hs(this.items,r.key),o=(l=this.schema)==null?void 0:l.sortMapEntries;if(a){if(!n)throw new Error(`Key ${r.key} already set`);Lt(a.value)&&q_(r.value)?a.value.value=r.value:a.value=r.value}else if(o){const u=this.items.findIndex(d=>o(r,d)<0);u===-1?this.items.push(r):this.items.splice(u,0,r)}else this.items.push(r)}delete(t){const n=Hs(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const r=Hs(this.items,t),a=r==null?void 0:r.value;return(!n&&Lt(a)?a.value:a)??void 0}has(t){return!!Hs(this.items,t)}set(t,n){this.add(new Fn(t,n),!0)}toJSON(t,n,r){const a=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(a);for(const o of this.items)W_(n,a,o);return a}toString(t,n,r){if(!t)return JSON.stringify(this);for(const a of this.items)if(!qt(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),X_(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}const Yl={collection:"map",default:!0,nodeClass:Er,tag:"tag:yaml.org,2002:map",resolve(e,t){return Gl(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Er.from(e,t,n)};class ms extends K_{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Kl,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=bf(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=bf(t);if(typeof r!="number")return;const a=this.items[r];return!n&&Lt(a)?a.value:a}has(t){const n=bf(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=bf(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const a=this.items[r];Lt(a)&&q_(n)?a.value=n:this.items[r]=n}toJSON(t,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let a=0;for(const o of this.items)r.push(Hr(o,String(a++),n));return r}toString(t,n,r){return t?X_(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:a}=r,o=new this(t);if(n&&Symbol.iterator in Object(n)){let l=0;for(let u of n){if(typeof a=="function"){const d=n instanceof Set?u:String(l++);u=a.call(n,d,u)}o.items.push(gu(u,void 0,r))}}return o}}function bf(e){let t=Lt(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const Ql={collection:"seq",default:!0,nodeClass:ms,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Vl(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>ms.from(e,t,n)},zh={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),Hu(e,t,n,r)}},Ph={identify:e=>e==null,createNode:()=>new Ge(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ge(null),stringify:({source:e},t)=>typeof e=="string"&&Ph.test.test(e)?e:t.options.nullStr},Db={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Ge(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&Db.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function pi({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);const a=typeof r=="number"?r:Number(r);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let l=o.indexOf(".");l<0&&(l=o.length,o+=".");let u=t-(o.length-l-1);for(;u-- >0;)o+="0"}return o}const Z_={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:pi},J_={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():pi(e)}},eN={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Ge(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:pi},Bh=e=>typeof e=="bigint"||Number.isInteger(e),Rb=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function tN(e,t,n){const{value:r}=e;return Bh(r)&&r>=0?n+r.toString(t):pi(e)}const nN={identify:e=>Bh(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>Rb(e,2,8,n),stringify:e=>tN(e,8,"0o")},rN={identify:Bh,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Rb(e,0,10,n),stringify:pi},iN={identify:e=>Bh(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Rb(e,2,16,n),stringify:e=>tN(e,16,"0x")},C3=[Yl,Ql,zh,Ph,Db,nN,rN,iN,Z_,J_,eN];function Y1(e){return typeof e=="bigint"||Number.isInteger(e)}const xf=({value:e})=>JSON.stringify(e),j3=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:xf},{identify:e=>e==null,createNode:()=>new Ge(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:xf},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:xf},{identify:Y1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Y1(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:xf}],A3={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},T3=[Yl,Ql].concat(j3,A3),Lb={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let a=0;a<n.length;++a)r[a]=n.charCodeAt(a);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},r,a,o){if(!n)return"";const l=n;let u;if(typeof btoa=="function"){let d="";for(let h=0;h<l.length;++h)d+=String.fromCharCode(l[h]);u=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Ge.BLOCK_LITERAL),t!==Ge.QUOTE_DOUBLE){const d=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),h=Math.ceil(u.length/d),g=new Array(h);for(let m=0,y=0;m<h;++m,y+=d)g[m]=u.substr(y,d);u=g.join(t===Ge.BLOCK_LITERAL?`
|
|
448
|
+
`:" ")}return Hu({comment:e,type:t,value:u},r,a,o)}};function aN(e,t){if(Vl(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!qt(r)){if(Gl(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");const a=r.items[0]||new Fn(new Ge(null));if(r.commentBefore&&(a.key.commentBefore=a.key.commentBefore?`${r.commentBefore}
|
|
449
|
+
${a.key.commentBefore}`:r.commentBefore),r.comment){const o=a.value??a.key;o.comment=o.comment?`${r.comment}
|
|
450
|
+
${o.comment}`:r.comment}r=a}e.items[n]=qt(r)?r:new Fn(r)}}else t("Expected a sequence for this tag");return e}function sN(e,t,n){const{replacer:r}=n,a=new ms(e);a.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let l of t){typeof r=="function"&&(l=r.call(t,String(o++),l));let u,d;if(Array.isArray(l))if(l.length===2)u=l[0],d=l[1];else throw new TypeError(`Expected [key, value] tuple: ${l}`);else if(l&&l instanceof Object){const h=Object.keys(l);if(h.length===1)u=h[0],d=l[u];else throw new TypeError(`Expected tuple with one key, not ${h.length} keys`)}else u=l;a.items.push(Ob(u,d,n))}return a}const Ib={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:aN,createNode:sN};class pl extends ms{constructor(){super(),this.add=Er.prototype.add.bind(this),this.delete=Er.prototype.delete.bind(this),this.get=Er.prototype.get.bind(this),this.has=Er.prototype.has.bind(this),this.set=Er.prototype.set.bind(this),this.tag=pl.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const a of this.items){let o,l;if(qt(a)?(o=Hr(a.key,"",n),l=Hr(a.value,o,n)):o=Hr(a,"",n),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,l)}return r}static from(t,n,r){const a=sN(t,n,r),o=new this;return o.items=a.items,o}}pl.tag="tag:yaml.org,2002:omap";const zb={collection:"seq",identify:e=>e instanceof Map,nodeClass:pl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=aN(e,t),r=[];for(const{key:a}of n.items)Lt(a)&&(r.includes(a.value)?t(`Ordered maps must not include duplicate keys: ${a.value}`):r.push(a.value));return Object.assign(new pl,n)},createNode:(e,t,n)=>pl.from(e,t,n)};function oN({value:e,source:t},n){return t&&(e?lN:cN).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const lN={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Ge(!0),stringify:oN},cN={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Ge(!1),stringify:oN},M3={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:pi},O3={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():pi(e)}},D3={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Ge(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:pi},qu=e=>typeof e=="bigint"||Number.isInteger(e);function Uh(e,t,n,{intAsBigInt:r}){const a=e[0];if((a==="-"||a==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const l=BigInt(e);return a==="-"?BigInt(-1)*l:l}const o=parseInt(e,n);return a==="-"?-1*o:o}function Pb(e,t,n){const{value:r}=e;if(qu(r)){const a=r.toString(t);return r<0?"-"+n+a.substr(1):n+a}return pi(e)}const R3={identify:qu,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Uh(e,2,2,n),stringify:e=>Pb(e,2,"0b")},L3={identify:qu,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Uh(e,1,8,n),stringify:e=>Pb(e,8,"0")},I3={identify:qu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Uh(e,0,10,n),stringify:pi},z3={identify:qu,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Uh(e,2,16,n),stringify:e=>Pb(e,16,"0x")};class ml extends Er{constructor(t){super(t),this.tag=ml.tag}add(t){let n;qt(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new Fn(t.key,null):n=new Fn(t,null),Hs(this.items,n.key)||this.items.push(n)}get(t,n){const r=Hs(this.items,t);return!n&&qt(r)?Lt(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Hs(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new Fn(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:a}=r,o=new this(t);if(n&&Symbol.iterator in Object(n))for(let l of n)typeof a=="function"&&(l=a.call(n,l,l)),o.items.push(Ob(l,null,r));return o}}ml.tag="tag:yaml.org,2002:set";const Bb={collection:"map",identify:e=>e instanceof Set,nodeClass:ml,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>ml.from(e,t,n),resolve(e,t){if(Gl(e)){if(e.hasAllNullValues(!0))return Object.assign(new ml,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function Ub(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,a=l=>t?BigInt(l):Number(l),o=r.replace(/_/g,"").split(":").reduce((l,u)=>l*a(60)+a(u),a(0));return n==="-"?a(-1)*o:o}function uN(e){let{value:t}=e,n=l=>l;if(typeof t=="bigint")n=l=>BigInt(l);else if(isNaN(t)||!isFinite(t))return pi(e);let r="";t<0&&(r="-",t*=n(-1));const a=n(60),o=[t%a];return t<60?o.unshift(0):(t=(t-o[0])/a,o.unshift(t%a),t>=60&&(t=(t-o[0])/a,o.unshift(t))),r+o.map(l=>String(l).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const dN={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>Ub(e,n),stringify:uN},fN={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Ub(e,!1),stringify:uN},$h={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match($h.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,a,o,l,u]=t.map(Number),d=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(n,r-1,a,o||0,l||0,u||0,d);const g=t[8];if(g&&g!=="Z"){let m=Ub(g,!1);Math.abs(m)<30&&(m*=60),h-=6e4*m}return new Date(h)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Q1=[Yl,Ql,zh,Ph,lN,cN,R3,L3,I3,z3,M3,O3,D3,Lb,ca,zb,Ib,Bb,dN,fN,$h],W1=new Map([["core",C3],["failsafe",[Yl,Ql,zh]],["json",T3],["yaml11",Q1],["yaml-1.1",Q1]]),X1={binary:Lb,bool:Db,float:eN,floatExp:J_,floatNaN:Z_,floatTime:fN,int:rN,intHex:iN,intOct:nN,intTime:dN,map:Yl,merge:ca,null:Ph,omap:zb,pairs:Ib,seq:Ql,set:Bb,timestamp:$h},P3={"tag:yaml.org,2002:binary":Lb,"tag:yaml.org,2002:merge":ca,"tag:yaml.org,2002:omap":zb,"tag:yaml.org,2002:pairs":Ib,"tag:yaml.org,2002:set":Bb,"tag:yaml.org,2002:timestamp":$h};function wg(e,t,n){const r=W1.get(t);if(r&&!e)return n&&!r.includes(ca)?r.concat(ca):r.slice();let a=r;if(!a)if(Array.isArray(e))a=[];else{const o=Array.from(W1.keys()).filter(l=>l!=="yaml11").map(l=>JSON.stringify(l)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)a=a.concat(o);else typeof e=="function"&&(a=e(a.slice()));return n&&(a=a.concat(ca)),a.reduce((o,l)=>{const u=typeof l=="string"?X1[l]:l;if(!u){const d=JSON.stringify(l),h=Object.keys(X1).map(g=>JSON.stringify(g)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${h}`)}return o.includes(u)||o.push(u),o},[])}const B3=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let hN=class pN{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:a,schema:o,sortMapEntries:l,toStringDefaults:u}){this.compat=Array.isArray(t)?wg(t,"compat"):t?wg(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=a?P3:{},this.tags=wg(n,this.name,r),this.toStringOptions=u??null,Object.defineProperty(this,hs,{value:Yl}),Object.defineProperty(this,Mi,{value:zh}),Object.defineProperty(this,Kl,{value:Ql}),this.sortMapEntries=typeof l=="function"?l:l===!0?B3:null}clone(){const t=Object.create(pN.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function U3(e,t){var d;const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const h=e.directives.toString(e);h?(n.push(h),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const a=V_(e,t),{commentString:o}=a.options;if(e.commentBefore){n.length!==1&&n.unshift("");const h=o(e.commentBefore);n.unshift(oa(h,""))}let l=!1,u=null;if(e.contents){if(Zt(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const m=o(e.contents.commentBefore);n.push(oa(m,""))}a.forceBlockIndent=!!e.comment,u=e.contents.comment}const h=u?void 0:()=>l=!0;let g=Ml(e.contents,a,()=>u=null,h);u&&(g+=Fs(g,"",o(u))),(g[0]==="|"||g[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${g}`:n.push(g)}else n.push(Ml(e.contents,a));if((d=e.directives)!=null&&d.docEnd)if(e.comment){const h=o(e.comment);h.includes(`
|
|
451
|
+
`)?(n.push("..."),n.push(oa(h,""))):n.push(`... ${h}`)}else n.push("...");else{let h=e.comment;h&&l&&(h=h.replace(/^\n+/,"")),h&&((!l||u)&&n[n.length-1]!==""&&n.push(""),n.push(oa(o(h),"")))}return n.join(`
|
|
452
|
+
`)+`
|
|
453
|
+
`}class Wl{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Kr,{value:My});let a=null;typeof n=="function"||Array.isArray(n)?a=n:r===void 0&&n&&(r=n,n=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:l}=o;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(l=this.directives.yaml.version)):this.directives=new Wn({version:l}),this.setSchema(l,r),this.contents=t===void 0?null:this.createNode(t,a,r)}clone(){const t=Object.create(Wl.prototype,{[Kr]:{value:My}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Zt(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Jo(this.contents)&&this.contents.add(t)}addIn(t,n){Jo(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const r=F_(this);t.anchor=!n||r.has(n)?H_(n||"a",r):n}return new Dh(t.anchor)}createNode(t,n,r){let a;if(typeof n=="function")t=n.call({"":t},"",t),a=n;else if(Array.isArray(n)){const S=j=>typeof j=="number"||j instanceof String||j instanceof Number,k=n.filter(S).map(String);k.length>0&&(n=n.concat(k)),a=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:o,anchorPrefix:l,flow:u,keepUndefined:d,onTagObj:h,tag:g}=r??{},{onAnchor:m,setAnchors:y,sourceObjects:b}=p3(this,l||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:m,onTagObj:h,replacer:a,schema:this.schema,sourceObjects:b},w=gu(t,g,E);return u&&Xt(w)&&(w.flow=!0),y(),w}createPair(t,n,r={}){const a=this.createNode(t,null,r),o=this.createNode(n,null,r);return new Fn(a,o)}delete(t){return Jo(this.contents)?this.contents.delete(t):!1}deleteIn(t){return tu(t)?this.contents==null?!1:(this.contents=null,!0):Jo(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Xt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return tu(t)?!n&&Lt(this.contents)?this.contents.value:this.contents:Xt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Xt(this.contents)?this.contents.has(t):!1}hasIn(t){return tu(t)?this.contents!==void 0:Xt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=sh(this.schema,[t],n):Jo(this.contents)&&this.contents.set(t,n)}setIn(t,n){tu(t)?this.contents=n:this.contents==null?this.contents=sh(this.schema,Array.from(t),n):Jo(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Wn({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Wn({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const a=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new hN(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:a,onAnchor:o,reviver:l}={}){const u={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},d=Hr(this.contents,n??"",u);if(typeof o=="function")for(const{count:h,res:g}of u.anchors.values())o(g,h);return typeof l=="function"?ul(l,{"":d},"",d):d}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return U3(this,t)}}function Jo(e){if(Xt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class $b extends Error{constructor(t,n,r,a){super(),this.name=t,this.code=r,this.message=a,this.pos=n}}class qs extends $b{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class mN extends $b{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const lh=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(u=>t.linePos(u));const{line:r,col:a}=n.linePos[0];n.message+=` at line ${r}, column ${a}`;let o=a-1,l=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&l.length>80){const u=Math.min(o-39,l.length-79);l="…"+l.substring(u),o-=u-1}if(l.length>80&&(l=l.substring(0,79)+"…"),r>1&&/^ *$/.test(l.substring(0,o))){let u=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);u.length>80&&(u=u.substring(0,79)+`…
|
|
454
|
+
`),l=u+l}if(/[^ ]/.test(l)){let u=1;const d=n.linePos[1];(d==null?void 0:d.line)===r&&d.col>a&&(u=Math.max(1,Math.min(d.col-a,80-o)));const h=" ".repeat(o)+"^".repeat(u);n.message+=`:
|
|
455
|
+
|
|
456
|
+
${l}
|
|
457
|
+
${h}
|
|
458
|
+
`}};function Ol(e,{flow:t,indicator:n,next:r,offset:a,onError:o,parentIndent:l,startOnNewline:u}){let d=!1,h=u,g=u,m="",y="",b=!1,E=!1,w=null,S=null,k=null,j=null,_=null,N=null,O=null;for(const I of e)switch(E&&(I.type!=="space"&&I.type!=="newline"&&I.type!=="comma"&&o(I.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),w&&(h&&I.type!=="comment"&&I.type!=="newline"&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),I.type){case"space":!t&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&I.source.includes(" ")&&(w=I),g=!0;break;case"comment":{g||o(I,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const F=I.source.substring(1)||" ";m?m+=y+F:m=F,y="",h=!1;break}case"newline":h?m?m+=I.source:(!N||n!=="seq-item-ind")&&(d=!0):y+=I.source,h=!0,b=!0,(S||k)&&(j=I),g=!0;break;case"anchor":S&&o(I,"MULTIPLE_ANCHORS","A node can have at most one anchor"),I.source.endsWith(":")&&o(I.offset+I.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),S=I,O??(O=I.offset),h=!1,g=!1,E=!0;break;case"tag":{k&&o(I,"MULTIPLE_TAGS","A node can have at most one tag"),k=I,O??(O=I.offset),h=!1,g=!1,E=!0;break}case n:(S||k)&&o(I,"BAD_PROP_ORDER",`Anchors and tags must be after the ${I.source} indicator`),N&&o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.source} in ${t??"collection"}`),N=I,h=n==="seq-item-ind"||n==="explicit-key-ind",g=!1;break;case"comma":if(t){_&&o(I,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),_=I,h=!1,g=!1;break}default:o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.type} token`),h=!1,g=!1}const A=e[e.length-1],M=A?A.offset+A.source.length:a;return E&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(h&&w.indent<=l||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:_,found:N,spaceBefore:d,comment:m,hasNewline:b,anchor:S,tag:k,newlineAfterProp:j,end:M,start:O??M}}function yu(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
459
|
+
`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(yu(t.key)||yu(t.value))return!0}return!1;default:return!0}}function Ly(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&yu(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function gN(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const a=typeof r=="function"?r:(o,l)=>o===l||Lt(o)&&Lt(l)&&o.value===l.value;return t.some(o=>a(o.key,n))}const Z1="All mapping items must start at the same column";function $3({composeNode:e,composeEmptyNode:t},n,r,a,o){var g;const l=(o==null?void 0:o.nodeClass)??Er,u=new l(n.schema);n.atRoot&&(n.atRoot=!1);let d=r.offset,h=null;for(const m of r.items){const{start:y,key:b,sep:E,value:w}=m,S=Ol(y,{indicator:"explicit-key-ind",next:b??(E==null?void 0:E[0]),offset:d,onError:a,parentIndent:r.indent,startOnNewline:!0}),k=!S.found;if(k){if(b&&(b.type==="block-seq"?a(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in b&&b.indent!==r.indent&&a(d,"BAD_INDENT",Z1)),!S.anchor&&!S.tag&&!E){h=S.end,S.comment&&(u.comment?u.comment+=`
|
|
460
|
+
`+S.comment:u.comment=S.comment);continue}(S.newlineAfterProp||yu(b))&&a(b??y[y.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((g=S.found)==null?void 0:g.indent)!==r.indent&&a(d,"BAD_INDENT",Z1);n.atKey=!0;const j=S.end,_=b?e(n,b,S,a):t(n,j,y,null,S,a);n.schema.compat&&Ly(r.indent,b,a),n.atKey=!1,gN(n,u.items,_)&&a(j,"DUPLICATE_KEY","Map keys must be unique");const N=Ol(E??[],{indicator:"map-value-ind",next:w,offset:_.range[2],onError:a,parentIndent:r.indent,startOnNewline:!b||b.type==="block-scalar"});if(d=N.end,N.found){k&&((w==null?void 0:w.type)==="block-map"&&!N.hasNewline&&a(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&S.start<N.found.offset-1024&&a(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const O=w?e(n,w,N,a):t(n,d,E,null,N,a);n.schema.compat&&Ly(r.indent,w,a),d=O.range[2];const A=new Fn(_,O);n.options.keepSourceTokens&&(A.srcToken=m),u.items.push(A)}else{k&&a(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),N.comment&&(_.comment?_.comment+=`
|
|
461
|
+
`+N.comment:_.comment=N.comment);const O=new Fn(_);n.options.keepSourceTokens&&(O.srcToken=m),u.items.push(O)}}return h&&h<d&&a(h,"IMPOSSIBLE","Map comment with trailing content"),u.range=[r.offset,d,h??d],u}function F3({composeNode:e,composeEmptyNode:t},n,r,a,o){const l=(o==null?void 0:o.nodeClass)??ms,u=new l(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=r.offset,h=null;for(const{start:g,value:m}of r.items){const y=Ol(g,{indicator:"seq-item-ind",next:m,offset:d,onError:a,parentIndent:r.indent,startOnNewline:!0});if(!y.found)if(y.anchor||y.tag||m)(m==null?void 0:m.type)==="block-seq"?a(y.end,"BAD_INDENT","All sequence items must start at the same column"):a(d,"MISSING_CHAR","Sequence item without - indicator");else{h=y.end,y.comment&&(u.comment=y.comment);continue}const b=m?e(n,m,y,a):t(n,y.end,g,null,y,a);n.schema.compat&&Ly(r.indent,m,a),d=b.range[2],u.items.push(b)}return u.range=[r.offset,d,h??d],u}function Ku(e,t,n,r){let a="";if(e){let o=!1,l="";for(const u of e){const{source:d,type:h}=u;switch(h){case"space":o=!0;break;case"comment":{n&&!o&&r(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const g=d.substring(1)||" ";a?a+=l+g:a=g,l="";break}case"newline":a&&(l+=d),o=!0;break;default:r(u,"UNEXPECTED_TOKEN",`Unexpected ${h} at node end`)}t+=d.length}}return{comment:a,offset:t}}const Eg="Block collections are not allowed within flow collections",kg=e=>e&&(e.type==="block-map"||e.type==="block-seq");function H3({composeNode:e,composeEmptyNode:t},n,r,a,o){var S;const l=r.start.source==="{",u=l?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(l?Er:ms),h=new d(n.schema);h.flow=!0;const g=n.atRoot;g&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let m=r.offset+r.start.source.length;for(let k=0;k<r.items.length;++k){const j=r.items[k],{start:_,key:N,sep:O,value:A}=j,M=Ol(_,{flow:u,indicator:"explicit-key-ind",next:N??(O==null?void 0:O[0]),offset:m,onError:a,parentIndent:r.indent,startOnNewline:!1});if(!M.found){if(!M.anchor&&!M.tag&&!O&&!A){k===0&&M.comma?a(M.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`):k<r.items.length-1&&a(M.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${u}`),M.comment&&(h.comment?h.comment+=`
|
|
462
|
+
`+M.comment:h.comment=M.comment),m=M.end;continue}!l&&n.options.strict&&yu(N)&&a(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)M.comma&&a(M.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`);else if(M.comma||a(M.start,"MISSING_CHAR",`Missing , between ${u} items`),M.comment){let I="";e:for(const F of _)switch(F.type){case"comma":case"space":break;case"comment":I=F.source.substring(1);break e;default:break e}if(I){let F=h.items[h.items.length-1];qt(F)&&(F=F.value??F.key),F.comment?F.comment+=`
|
|
463
|
+
`+I:F.comment=I,M.comment=M.comment.substring(I.length+1)}}if(!l&&!O&&!M.found){const I=A?e(n,A,M,a):t(n,M.end,O,null,M,a);h.items.push(I),m=I.range[2],kg(A)&&a(I.range,"BLOCK_IN_FLOW",Eg)}else{n.atKey=!0;const I=M.end,F=N?e(n,N,M,a):t(n,I,_,null,M,a);kg(N)&&a(F.range,"BLOCK_IN_FLOW",Eg),n.atKey=!1;const $=Ol(O??[],{flow:u,indicator:"map-value-ind",next:A,offset:F.range[2],onError:a,parentIndent:r.indent,startOnNewline:!1});if($.found){if(!l&&!M.found&&n.options.strict){if(O)for(const Q of O){if(Q===$.found)break;if(Q.type==="newline"){a(Q,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}M.start<$.found.offset-1024&&a($.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else A&&("source"in A&&((S=A.source)==null?void 0:S[0])===":"?a(A,"MISSING_CHAR",`Missing space after : in ${u}`):a($.start,"MISSING_CHAR",`Missing , or : between ${u} items`));const U=A?e(n,A,$,a):$.found?t(n,$.end,O,null,$,a):null;U?kg(A)&&a(U.range,"BLOCK_IN_FLOW",Eg):$.comment&&(F.comment?F.comment+=`
|
|
464
|
+
`+$.comment:F.comment=$.comment);const q=new Fn(F,U);if(n.options.keepSourceTokens&&(q.srcToken=j),l){const Q=h;gN(n,Q.items,F)&&a(I,"DUPLICATE_KEY","Map keys must be unique"),Q.items.push(q)}else{const Q=new Er(n.schema);Q.flow=!0,Q.items.push(q);const B=(U??F).range;Q.range=[F.range[0],B[1],B[2]],h.items.push(Q)}m=U?U.range[2]:$.end}}const y=l?"}":"]",[b,...E]=r.end;let w=m;if((b==null?void 0:b.source)===y)w=b.offset+b.source.length;else{const k=u[0].toUpperCase()+u.substring(1),j=g?`${k} must end with a ${y}`:`${k} in block collection must be sufficiently indented and end with a ${y}`;a(m,g?"MISSING_CHAR":"BAD_INDENT",j),b&&b.source.length!==1&&E.unshift(b)}if(E.length>0){const k=Ku(E,w,n.options.strict,a);k.comment&&(h.comment?h.comment+=`
|
|
465
|
+
`+k.comment:h.comment=k.comment),h.range=[r.offset,w,k.offset]}else h.range=[r.offset,w,w];return h}function Sg(e,t,n,r,a,o){const l=n.type==="block-map"?$3(e,t,n,r,o):n.type==="block-seq"?F3(e,t,n,r,o):H3(e,t,n,r,o),u=l.constructor;return a==="!"||a===u.tagName?(l.tag=u.tagName,l):(a&&(l.tag=a),l)}function q3(e,t,n,r,a){var y;const o=r.tag,l=o?t.directives.tagName(o.source,b=>a(o,"TAG_RESOLVE_FAILED",b)):null;if(n.type==="block-seq"){const{anchor:b,newlineAfterProp:E}=r,w=b&&o?b.offset>o.offset?b:o:b??o;w&&(!E||E.offset<w.offset)&&a(w,"MISSING_CHAR","Missing newline after block sequence props")}const u=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!l||l==="!"||l===Er.tagName&&u==="map"||l===ms.tagName&&u==="seq")return Sg(e,t,n,a,l);let d=t.schema.tags.find(b=>b.tag===l&&b.collection===u);if(!d){const b=t.schema.knownTags[l];if((b==null?void 0:b.collection)===u)t.schema.tags.push(Object.assign({},b,{default:!1})),d=b;else return b?a(o,"BAD_COLLECTION_TYPE",`${b.tag} used for ${u} collection, but expects ${b.collection??"scalar"}`,!0):a(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${l}`,!0),Sg(e,t,n,a,l)}const h=Sg(e,t,n,a,l,d),g=((y=d.resolve)==null?void 0:y.call(d,h,b=>a(o,"TAG_RESOLVE_FAILED",b),t.options))??h,m=Zt(g)?g:new Ge(g);return m.range=h.range,m.tag=l,d!=null&&d.format&&(m.format=d.format),m}function yN(e,t,n){const r=t.offset,a=K3(t,e.options.strict,n);if(!a)return{value:"",type:null,comment:"",range:[r,r,r]};const o=a.mode===">"?Ge.BLOCK_FOLDED:Ge.BLOCK_LITERAL,l=t.source?G3(t.source):[];let u=l.length;for(let w=l.length-1;w>=0;--w){const S=l[w][1];if(S===""||S==="\r")u=w;else break}if(u===0){const w=a.chomp==="+"&&l.length>0?`
|
|
466
|
+
`.repeat(Math.max(1,l.length-1)):"";let S=r+a.length;return t.source&&(S+=t.source.length),{value:w,type:o,comment:a.comment,range:[r,S,S]}}let d=t.indent+a.indent,h=t.offset+a.length,g=0;for(let w=0;w<u;++w){const[S,k]=l[w];if(k===""||k==="\r")a.indent===0&&S.length>d&&(d=S.length);else{S.length<d&&n(h+S.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),a.indent===0&&(d=S.length),g=w,d===0&&!e.atRoot&&n(h,"BAD_INDENT","Block scalar values in collections must be indented");break}h+=S.length+k.length+1}for(let w=l.length-1;w>=u;--w)l[w][0].length>d&&(u=w+1);let m="",y="",b=!1;for(let w=0;w<g;++w)m+=l[w][0].slice(d)+`
|
|
467
|
+
`;for(let w=g;w<u;++w){let[S,k]=l[w];h+=S.length+k.length+1;const j=k[k.length-1]==="\r";if(j&&(k=k.slice(0,-1)),k&&S.length<d){const N=`Block scalar lines must not be less indented than their ${a.indent?"explicit indentation indicator":"first line"}`;n(h-k.length-(j?2:1),"BAD_INDENT",N),S=""}o===Ge.BLOCK_LITERAL?(m+=y+S.slice(d)+k,y=`
|
|
468
|
+
`):S.length>d||k[0]===" "?(y===" "?y=`
|
|
469
|
+
`:!b&&y===`
|
|
470
|
+
`&&(y=`
|
|
471
|
+
|
|
472
|
+
`),m+=y+S.slice(d)+k,y=`
|
|
473
|
+
`,b=!0):k===""?y===`
|
|
474
|
+
`?m+=`
|
|
475
|
+
`:y=`
|
|
476
|
+
`:(m+=y+k,y=" ",b=!1)}switch(a.chomp){case"-":break;case"+":for(let w=u;w<l.length;++w)m+=`
|
|
477
|
+
`+l[w][0].slice(d);m[m.length-1]!==`
|
|
478
|
+
`&&(m+=`
|
|
479
|
+
`);break;default:m+=`
|
|
480
|
+
`}const E=r+a.length+t.source.length;return{value:m,type:o,comment:a.comment,range:[r,E,E]}}function K3({offset:e,props:t},n,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=t[0],o=a[0];let l=0,u="",d=-1;for(let y=1;y<a.length;++y){const b=a[y];if(!u&&(b==="-"||b==="+"))u=b;else{const E=Number(b);!l&&E?l=E:d===-1&&(d=e+y)}}d!==-1&&r(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let h=!1,g="",m=a.length;for(let y=1;y<t.length;++y){const b=t[y];switch(b.type){case"space":h=!0;case"newline":m+=b.source.length;break;case"comment":n&&!h&&r(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=b.source.length,g=b.source.substring(1);break;case"error":r(b,"UNEXPECTED_TOKEN",b.message),m+=b.source.length;break;default:{const E=`Unexpected token in block scalar header: ${b.type}`;r(b,"UNEXPECTED_TOKEN",E);const w=b.source;w&&typeof w=="string"&&(m+=w.length)}}}return{mode:o,indent:l,chomp:u,comment:g,length:m}}function G3(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),o=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let l=1;l<t.length;l+=2)o.push([t[l],t[l+1]]);return o}function bN(e,t,n){const{offset:r,type:a,source:o,end:l}=e;let u,d;const h=(y,b,E)=>n(r+y,b,E);switch(a){case"scalar":u=Ge.PLAIN,d=V3(o,h);break;case"single-quoted-scalar":u=Ge.QUOTE_SINGLE,d=Y3(o,h);break;case"double-quoted-scalar":u=Ge.QUOTE_DOUBLE,d=Q3(o,h);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[r,r+o.length,r+o.length]}}const g=r+o.length,m=Ku(l,g,t,n);return{value:d,type:u,comment:m.comment,range:[r,g,m.offset]}}function V3(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),xN(e)}function Y3(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),xN(e.slice(1,-1)).replace(/''/g,"'")}function xN(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
481
|
+
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
482
|
+
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let a=r[1],o=" ",l=t.lastIndex;for(n.lastIndex=l;r=n.exec(e);)r[1]===""?o===`
|
|
483
|
+
`?a+=o:o=`
|
|
484
|
+
`:(a+=o+r[1],o=" "),l=n.lastIndex;const u=/[ \t]*(.*)/sy;return u.lastIndex=l,r=u.exec(e),a+o+((r==null?void 0:r[1])??"")}function Q3(e,t){let n="";for(let r=1;r<e.length-1;++r){const a=e[r];if(!(a==="\r"&&e[r+1]===`
|
|
485
|
+
`))if(a===`
|
|
486
|
+
`){const{fold:o,offset:l}=W3(e,r);n+=o,r=l}else if(a==="\\"){let o=e[++r];const l=X3[o];if(l)n+=l;else if(o===`
|
|
487
|
+
`)for(o=e[r+1];o===" "||o===" ";)o=e[++r+1];else if(o==="\r"&&e[r+1]===`
|
|
488
|
+
`)for(o=e[++r+1];o===" "||o===" ";)o=e[++r+1];else if(o==="x"||o==="u"||o==="U"){const u={x:2,u:4,U:8}[o];n+=Z3(e,r+1,u,t),r+=u}else{const u=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),n+=u}}else if(a===" "||a===" "){const o=r;let l=e[r+1];for(;l===" "||l===" ";)l=e[++r+1];l!==`
|
|
489
|
+
`&&!(l==="\r"&&e[r+2]===`
|
|
490
|
+
`)&&(n+=r>o?e.slice(o,r+1):a)}else n+=a}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function W3(e,t){let n="",r=e[t+1];for(;(r===" "||r===" "||r===`
|
|
491
|
+
`||r==="\r")&&!(r==="\r"&&e[t+2]!==`
|
|
492
|
+
`);)r===`
|
|
493
|
+
`&&(n+=`
|
|
494
|
+
`),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}const X3={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
495
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Z3(e,t,n,r){const a=e.substr(t,n),l=a.length===n&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;if(isNaN(l)){const u=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}return String.fromCodePoint(l)}function vN(e,t,n,r){const{value:a,type:o,comment:l,range:u}=t.type==="block-scalar"?yN(e,t,r):bN(t,e.options.strict,r),d=n?e.directives.tagName(n.source,m=>r(n,"TAG_RESOLVE_FAILED",m)):null;let h;e.options.stringKeys&&e.atKey?h=e.schema[Mi]:d?h=J3(e.schema,a,d,n,r):t.type==="scalar"?h=eI(e,a,t,r):h=e.schema[Mi];let g;try{const m=h.resolve(a,y=>r(n??t,"TAG_RESOLVE_FAILED",y),e.options);g=Lt(m)?m:new Ge(m)}catch(m){const y=m instanceof Error?m.message:String(m);r(n??t,"TAG_RESOLVE_FAILED",y),g=new Ge(a)}return g.range=u,g.source=a,o&&(g.type=o),d&&(g.tag=d),h.format&&(g.format=h.format),l&&(g.comment=l),g}function J3(e,t,n,r,a){var u;if(n==="!")return e[Mi];const o=[];for(const d of e.tags)if(!d.collection&&d.tag===n)if(d.default&&d.test)o.push(d);else return d;for(const d of o)if((u=d.test)!=null&&u.test(t))return d;const l=e.knownTags[n];return l&&!l.collection?(e.tags.push(Object.assign({},l,{default:!1,test:void 0})),l):(a(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Mi])}function eI({atKey:e,directives:t,schema:n},r,a,o){const l=n.tags.find(u=>{var d;return(u.default===!0||e&&u.default==="key")&&((d=u.test)==null?void 0:d.test(r))})||n[Mi];if(n.compat){const u=n.compat.find(d=>{var h;return d.default&&((h=d.test)==null?void 0:h.test(r))})??n[Mi];if(l.tag!==u.tag){const d=t.tagString(l.tag),h=t.tagString(u.tag),g=`Value may be parsed as either ${d} or ${h}`;o(a,"TAG_RESOLVE_FAILED",g,!0)}}return l}function tI(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let a=t[r];switch(a.type){case"space":case"comment":case"newline":e-=a.source.length;continue}for(a=t[++r];(a==null?void 0:a.type)==="space";)e+=a.source.length,a=t[++r];break}}return e}const nI={composeNode:wN,composeEmptyNode:Fb};function wN(e,t,n,r){const a=e.atKey,{spaceBefore:o,comment:l,anchor:u,tag:d}=n;let h,g=!0;switch(t.type){case"alias":h=rI(e,t,r),(u||d)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":h=vN(e,t,d,r),u&&(h.anchor=u.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{h=q3(nI,e,t,n,r),u&&(h.anchor=u.source.substring(1))}catch(m){const y=m instanceof Error?m.message:String(m);r(t,"RESOURCE_EXHAUSTION",y)}break;default:{const m=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",m),g=!1}}return h??(h=Fb(e,t.offset,void 0,null,n,r)),u&&h.anchor===""&&r(u,"BAD_ALIAS","Anchor cannot be an empty string"),a&&e.options.stringKeys&&(!Lt(h)||typeof h.value!="string"||h.tag&&h.tag!=="tag:yaml.org,2002:str")&&r(d??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(h.spaceBefore=!0),l&&(t.type==="scalar"&&t.source===""?h.comment=l:h.commentBefore=l),e.options.keepSourceTokens&&g&&(h.srcToken=t),h}function Fb(e,t,n,r,{spaceBefore:a,comment:o,anchor:l,tag:u,end:d},h){const g={type:"scalar",offset:tI(t,n,r),indent:-1,source:""},m=vN(e,g,u,h);return l&&(m.anchor=l.source.substring(1),m.anchor===""&&h(l,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(m.spaceBefore=!0),o&&(m.comment=o,m.range[2]=d),m}function rI({options:e},{offset:t,source:n,end:r},a){const o=new Dh(n.substring(1));o.source===""&&a(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&a(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const l=t+n.length,u=Ku(r,l,e.strict,a);return o.range=[t,l,u.offset],u.comment&&(o.comment=u.comment),o}function iI(e,t,{offset:n,start:r,value:a,end:o},l){const u=Object.assign({_directives:t},e),d=new Wl(void 0,u),h={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},g=Ol(r,{indicator:"doc-start",next:a??(o==null?void 0:o[0]),offset:n,onError:l,parentIndent:0,startOnNewline:!0});g.found&&(d.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!g.hasNewline&&l(g.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=a?wN(h,a,g,l):Fb(h,g.end,r,null,g,l);const m=d.contents.range[2],y=Ku(o,m,!1,l);return y.comment&&(d.comment=y.comment),d.range=[n,m,y.offset],d}function Gc(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function J1(e){var a;let t="",n=!1,r=!1;for(let o=0;o<e.length;++o){const l=e[o];switch(l[0]){case"#":t+=(t===""?"":r?`
|
|
496
|
+
|
|
497
|
+
`:`
|
|
498
|
+
`)+(l.substring(1)||" "),n=!0,r=!1;break;case"%":((a=e[o+1])==null?void 0:a[0])!=="#"&&(o+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}class Hb{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,a,o)=>{const l=Gc(n);o?this.warnings.push(new mN(l,r,a)):this.errors.push(new qs(l,r,a))},this.directives=new Wn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:r,afterEmptyLine:a}=J1(this.prelude);if(r){const o=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
499
|
+
${r}`:r;else if(a||t.directives.docStart||!o)t.commentBefore=r;else if(Xt(o)&&!o.flow&&o.items.length>0){let l=o.items[0];qt(l)&&(l=l.key);const u=l.commentBefore;l.commentBefore=u?`${r}
|
|
500
|
+
${u}`:r}else{const l=o.commentBefore;o.commentBefore=l?`${r}
|
|
501
|
+
${l}`:r}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:J1(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,r=-1){for(const a of t)yield*this.next(a);yield*this.end(n,r)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,r,a)=>{const o=Gc(t);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",r,a)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=iI(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new qs(Gc(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new qs(Gc(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Ku(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
|
|
502
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new qs(Gc(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),a=new Wl(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,n,n],this.decorate(a,!1),yield a}}}function aI(e,t=!0,n){if(e){const r=(a,o,l)=>{const u=typeof a=="number"?a:Array.isArray(a)?a[0]:a.offset;if(n)n(u,o,l);else throw new qs([u,u+1],o,l)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return bN(e,t,r);case"block-scalar":return yN({options:{strict:t}},e,r)}}return null}function sI(e,t){const{implicitKey:n=!1,indent:r,inFlow:a=!1,offset:o=-1,type:l="PLAIN"}=t,u=Hu({type:l,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),d=t.end??[{type:"newline",offset:-1,indent:r,source:`
|
|
503
|
+
`}];switch(u[0]){case"|":case">":{const h=u.indexOf(`
|
|
504
|
+
`),g=u.substring(0,h),m=u.substring(h+1)+`
|
|
505
|
+
`,y=[{type:"block-scalar-header",offset:o,indent:r,source:g}];return EN(y,d)||y.push({type:"newline",offset:-1,indent:r,source:`
|
|
506
|
+
`}),{type:"block-scalar",offset:o,indent:r,props:y,source:m}}case'"':return{type:"double-quoted-scalar",offset:o,indent:r,source:u,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:r,source:u,end:d};default:return{type:"scalar",offset:o,indent:r,source:u,end:d}}}function oI(e,t,n={}){let{afterKey:r=!1,implicitKey:a=!1,inFlow:o=!1,type:l}=n,u="indent"in e?e.indent:null;if(r&&typeof u=="number"&&(u+=2),!l)switch(e.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{const h=e.props[0];if(h.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l=h.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}const d=Hu({type:l,value:t},{implicitKey:a||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":lI(e,d);break;case'"':_g(e,d,"double-quoted-scalar");break;case"'":_g(e,d,"single-quoted-scalar");break;default:_g(e,d,"scalar")}}function lI(e,t){const n=t.indexOf(`
|
|
507
|
+
`),r=t.substring(0,n),a=t.substring(n+1)+`
|
|
508
|
+
`;if(e.type==="block-scalar"){const o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=r,e.source=a}else{const{offset:o}=e,l="indent"in e?e.indent:-1,u=[{type:"block-scalar-header",offset:o,indent:l,source:r}];EN(u,"end"in e?e.end:void 0)||u.push({type:"newline",offset:-1,indent:l,source:`
|
|
509
|
+
`});for(const d of Object.keys(e))d!=="type"&&d!=="offset"&&delete e[d];Object.assign(e,{type:"block-scalar",indent:l,props:u,source:a})}}function EN(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function _g(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let a=t.length;e.props[0].type==="block-scalar-header"&&(a-=e.props[0].source.length);for(const o of r)o.offset+=a;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const a={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
|
|
510
|
+
`};delete e.items,Object.assign(e,{type:n,source:t,end:[a]});break}default:{const r="indent"in e?e.indent:-1,a="end"in e&&Array.isArray(e.end)?e.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(e))o!=="type"&&o!=="offset"&&delete e[o];Object.assign(e,{type:n,indent:r,source:t,end:a})}}}const cI=e=>"type"in e?ch(e):Vf(e);function ch(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=ch(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=Vf(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=Vf(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=Vf(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function Vf({start:e,key:t,sep:n,value:r}){let a="";for(const o of e)a+=o.source;if(t&&(a+=ch(t)),n)for(const o of n)a+=o.source;return r&&(a+=ch(r)),a}const Iy=Symbol("break visit"),uI=Symbol("skip children"),kN=Symbol("remove item");function io(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),SN(Object.freeze([]),e,t)}io.BREAK=Iy;io.SKIP=uI;io.REMOVE=kN;io.itemAtPath=(e,t)=>{let n=e;for(const[r,a]of t){const o=n==null?void 0:n[r];if(o&&"items"in o)n=o.items[a];else return}return n};io.parentCollection=(e,t)=>{const n=io.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],a=n==null?void 0:n[r];if(a&&"items"in a)return a;throw new Error("Parent collection not found")};function SN(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const a of["key","value"]){const o=t[a];if(o&&"items"in o){for(let l=0;l<o.items.length;++l){const u=SN(Object.freeze(e.concat([[a,l]])),o.items[l],n);if(typeof u=="number")l=u-1;else{if(u===Iy)return Iy;u===kN&&(o.items.splice(l,1),l-=1)}}typeof r=="function"&&a==="key"&&(r=r(t,e))}}return typeof r=="function"?r(t,e):r}const Fh="\uFEFF",Hh="",qh="",bu="",dI=e=>!!e&&"items"in e,fI=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function hI(e){switch(e){case Fh:return"<BOM>";case Hh:return"<DOC>";case qh:return"<FLOW_END>";case bu:return"<SCALAR>";default:return JSON.stringify(e)}}function _N(e){switch(e){case Fh:return"byte-order-mark";case Hh:return"doc-mode";case qh:return"flow-error-end";case bu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
511
|
+
`:case`\r
|
|
512
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const pI=Object.freeze(Object.defineProperty({__proto__:null,BOM:Fh,DOCUMENT:Hh,FLOW_END:qh,SCALAR:bu,createScalarToken:sI,isCollection:dI,isScalar:fI,prettyToken:hI,resolveAsScalar:aI,setScalarValue:oI,stringify:cI,tokenType:_N,visit:io},Symbol.toStringTag,{value:"Module"}));function ii(e){switch(e){case void 0:case" ":case`
|
|
513
|
+
`:case"\r":case" ":return!0;default:return!1}}const eE=new Set("0123456789ABCDEFabcdef"),mI=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),vf=new Set(",[]{}"),gI=new Set(` ,[]{}
|
|
514
|
+
\r `),Ng=e=>!e||gI.has(e);class NN{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
|
|
515
|
+
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
516
|
+
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){const a=this.buffer[r+t+1];if(a===`
|
|
517
|
+
`||!a&&!this.atEnd)return t+r+1}return n===`
|
|
518
|
+
`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&ii(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
519
|
+
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Fh&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,r=t.indexOf("#");for(;r!==-1;){const o=t[r-1];if(o===" "||o===" "){n=r-1;break}else r=t.indexOf("#",r+1)}for(;;){const o=t[n-1];if(o===" "||o===" ")n-=1;else break}const a=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-a),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Hh,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&ii(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ii(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&ii(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Ng),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const a=this.getLine();if(a===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&a[0]!=="#"||r===0&&(a.startsWith("---")||a.startsWith("..."))&&ii(a[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(a[0]==="]"||a[0]==="}")))return this.flowLevel=0,yield qh,yield*this.parseLineStart();let o=0;for(;a[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),a[o]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Ng),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const l=this.charAt(1);if(this.flowKey||ii(l)||l===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let o=0;for(;this.buffer[n-1-o]==="\\";)o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let a=r.indexOf(`
|
|
520
|
+
`,this.pos);if(a!==-1){for(;a!==-1;){const o=this.continueScalar(a+1);if(o===-1)break;a=r.indexOf(`
|
|
521
|
+
`,o)}a!==-1&&(n=a-(r[a-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>ii(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let o=this.pos;r=this.buffer[o];++o)switch(r){case" ":n+=1;break;case`
|
|
522
|
+
`:t=o,n=0;break;case"\r":{const l=this.buffer[o+1];if(!l&&!this.atEnd)return this.setNext("block-scalar");if(l===`
|
|
523
|
+
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(t+1);if(o===-1)break;t=this.buffer.indexOf(`
|
|
524
|
+
`,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let a=t+1;for(r=this.buffer[a];r===" ";)r=this.buffer[++a];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
525
|
+
`;)r=this.buffer[++a];t=a-1}else if(!this.blockScalarKeep)do{let o=t-1,l=this.buffer[o];l==="\r"&&(l=this.buffer[--o]);const u=o;for(;l===" ";)l=this.buffer[--o];if(l===`
|
|
526
|
+
`&&o>=this.pos&&o+1+n>u)t=o;else break}while(!0);return yield bu,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,a;for(;a=this.buffer[++r];)if(a===":"){const o=this.buffer[r+1];if(ii(o)||t&&vf.has(o))break;n=r}else if(ii(a)){let o=this.buffer[r+1];if(a==="\r"&&(o===`
|
|
527
|
+
`?(r+=1,a=`
|
|
528
|
+
`,o=this.buffer[r+1]):n=r),o==="#"||t&&vf.has(o))break;if(a===`
|
|
529
|
+
`){const l=this.continueScalar(r+1);if(l===-1)break;r=Math.max(r,l-2)}}else{if(t&&vf.has(a))break;n=r}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield bu,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Ng))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(ii(n)||t&&vf.has(n))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!ii(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(mI.has(n))n=this.buffer[++t];else if(n==="%"&&eE.has(this.buffer[t+1])&&eE.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
|
|
530
|
+
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
531
|
+
`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||t&&r===" ");const a=n-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=n),a}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class CN{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n<r;){const o=n+r>>1;this.lineStarts[o]<t?n=o+1:r=o}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const a=this.lineStarts[n-1];return{line:n,col:t-a+1}}}}function ts(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function tE(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function jN(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function wf(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function el(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function nE(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!ts(t.start,"explicit-key-ind")&&!ts(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,jN(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class qb{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new NN,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(t,n))yield*this.next(r);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=_N(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&nE(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const a=r.items[r.items.length-1];if(a.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(a.sep)a.value=n;else{Object.assign(a,{key:n,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{const a=r.items[r.items.length-1];a.value?r.items.push({start:[],value:n}):a.value=n;break}case"flow-collection":{const a=r.items[r.items.length-1];!a||a.value?r.items.push({start:[],key:n,sep:[]}):a.sep?a.value=n:Object.assign(a,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const a=n.items[n.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&tE(a.start)===-1&&(n.indent===0||a.start.every(o=>o.type!=="comment"||o.indent<n.indent))&&(r.type==="document"?r.end=a.start:r.items.push({start:a.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{tE(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const n=wf(this.peek(2)),r=el(n);let a;t.end?(a=t.end,a.push(this.sourceToken),delete t.end):a=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:r,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
532
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
533
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const a="end"in n.value?n.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const a=t.items[t.items.length-2],o=(r=a==null?void 0:a.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const a=!this.onKeyLine&&this.indent===t.indent,o=a&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let l=[];if(o&&n.sep&&!n.value){const u=[];for(let d=0;d<n.sep.length;++d){const h=n.sep[d];switch(h.type){case"newline":u.push(d);break;case"space":break;case"comment":h.indent>t.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(l=n.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(l.push(this.sourceToken),t.items.push({start:l}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):o||n.value?(l.push(this.sourceToken),t.items.push({start:l,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ts(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]});else if(jN(n.key)&&!ts(n.sep,"newline")){const u=el(n.start),d=n.key,h=n.sep;h.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:d,sep:h}]})}else l.length>0?n.sep=n.sep.concat(l,this.sourceToken):n.sep.push(this.sourceToken);else if(ts(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const u=el(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:l,key:null,sep:[this.sourceToken]}):ts(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);o||n.value?(t.items.push({start:l,key:u,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(u):(Object.assign(n,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{const u=this.startBlockValue(t);if(u){if(u.type==="block-seq"){if(!n.explicitKey&&n.sep&&!ts(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else a&&t.items.push({start:l});this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const a="end"in n.value?n.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const a=t.items[t.items.length-2],o=(r=a==null?void 0:a.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||ts(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const a=this.startBlockValue(t);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:a,sep:[]}):n.sep?this.stack.push(a):Object.assign(n,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const a=wf(r),o=el(a);nE(t);const l=t.end.splice(1,t.end.length);l.push(this.sourceToken);const u={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
534
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
535
|
+
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=wf(t),r=el(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=wf(t),r=el(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function AN(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new CN||null,prettyErrors:t}}function yI(e,t={}){const{lineCounter:n,prettyErrors:r}=AN(t),a=new qb(n==null?void 0:n.addNewLine),o=new Hb(t),l=Array.from(o.compose(a.parse(e)));if(r&&n)for(const u of l)u.errors.forEach(lh(e,n)),u.warnings.forEach(lh(e,n));return l.length>0?l:Object.assign([],{empty:!0},o.streamInfo())}function TN(e,t={}){const{lineCounter:n,prettyErrors:r}=AN(t),a=new qb(n==null?void 0:n.addNewLine),o=new Hb(t);let l=null;for(const u of o.compose(a.parse(e),!0,e.length))if(!l)l=u;else if(l.options.logLevel!=="silent"){l.errors.push(new qs(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(l.errors.forEach(lh(e,n)),l.warnings.forEach(lh(e,n))),l}function bI(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);const a=TN(e,n);if(!a)return null;if(a.warnings.forEach(o=>Y_(a.options.logLevel,o)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:r},n))}function xI(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const a=Math.round(n);n=a<1?void 0:a>8?{indent:8}:{indent:a}}if(e===void 0){const{keepUndefined:a}=n??t??{};if(!a)return}return po(e)&&!r?e.toString(n):new Wl(e,r,n).toString(n)}const rE=Object.freeze(Object.defineProperty({__proto__:null,Alias:Dh,CST:pI,Composer:Hb,Document:Wl,Lexer:NN,LineCounter:CN,Pair:Fn,Parser:qb,Scalar:Ge,Schema:hN,YAMLError:$b,YAMLMap:Er,YAMLParseError:qs,YAMLSeq:ms,YAMLWarning:mN,isAlias:ys,isCollection:Xt,isDocument:po,isMap:Gl,isNode:Zt,isPair:qt,isScalar:Lt,isSeq:Vl,parse:bI,parseAllDocuments:yI,parseDocument:TN,stringify:xI,visit:mo,visitAsync:Oh},Symbol.toStringTag,{value:"Module"}));function vI({projectName:e,file:t,onClose:n,onSaved:r}){const a=Be(),o=wn(),{alert:l}=Zn(),{data:u,isLoading:d,isError:h,error:g,refetch:m}=tt({queryKey:["pipeline-file",e,t],queryFn:()=>HL(e,t)}),[y,b]=T.useState("structured"),[E,w]=T.useState(null),[S,k]=T.useState(null);T.useEffect(()=>{u&&E===null&&(w(u.content),k(u.etag),u.parseError&&b("yaml"))},[u,E]),T.useEffect(()=>{const M=I=>{I.key==="Escape"&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n]);const j=rn({mutationFn:()=>{if(E===null||S===null)throw new Error("no draft");return qL(e,t,E,S)},onSuccess:M=>{k(M.etag),o.invalidateQueries({queryKey:["pipeline-file",e,t]}),o.invalidateQueries({queryKey:["project-pipelines",e]}),r()},onError:M=>{const I=M.status;l({title:a(I===409?"pipelineEditor.error.conflict.title":I===422?"pipelineEditor.error.yaml.title":"pipelineEditor.error.save.title"),body:M instanceof Error?M.message:String(M)})}}),_=E!==null&&u&&E!==u.content,{parsed:N,parseError:O}=T.useMemo(()=>{if(E===null)return{parsed:null,parseError:null};try{return{parsed:rE.parse(E)??{},parseError:null}}catch(M){return{parsed:null,parseError:M instanceof Error?M.message:String(M)}}},[E]),A=M=>{try{const I=rE.stringify(M,{lineWidth:0});w(I)}catch(I){l({title:a("pipelineEditor.error.serialize.title"),body:I instanceof Error?I.message:String(I)})}};return f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:f.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[f.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[f.jsxs("div",{children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[f.jsx(q1,{size:20,strokeWidth:2.5}),f.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(u==null?void 0:u.isActive)&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:a("pipelineEditor.activeBadge")})]}),f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,S&&` · etag ${S}`]})]}),f.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":a("pipelineEditor.close"),children:f.jsx(_r,{size:14,strokeWidth:3})})]}),d&&f.jsx("p",{className:"text-[var(--color-text-muted)]",children:a("common.loading")}),h&&f.jsx("p",{className:"text-[var(--color-crashed)]",children:a("pipelineEditor.error.load",{detail:g instanceof Error?g.message:String(g)})}),u&&E!==null&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[f.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[f.jsxs("button",{type:"button",onClick:()=>b("structured"),"aria-pressed":y==="structured",disabled:!!O,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",y==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",O?"opacity-50 cursor-not-allowed":""].join(" "),title:O??void 0,children:[f.jsx($u,{size:11,strokeWidth:2.5}),a("pipelineEditor.mode.structured")]}),f.jsxs("button",{type:"button",onClick:()=>b("yaml"),"aria-pressed":y==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",y==="yaml"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[f.jsx(q1,{size:11,strokeWidth:2.5}),a("pipelineEditor.mode.yaml")]})]}),O&&f.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[f.jsx(hu,{size:12,strokeWidth:2.5}),a("pipelineEditor.parseError.prefix",{detail:O})]}),(u==null?void 0:u.isActive)&&f.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:a("pipelineEditor.activeWarning")})]}),f.jsxs("div",{className:"flex-1 overflow-auto",children:[y==="structured"&&N&&f.jsx(wI,{parsed:N,onChange:A}),y==="yaml"&&f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:E,onChange:M=>w(M.target.value),spellCheck:!1,"aria-label":a("pipelineEditor.yamlAria")})]}),f.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:_?f.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:a("pipelineEditor.status.unsaved")}):j.isSuccess?f.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[f.jsx(pu,{size:12,strokeWidth:2.5})," ",a("pipelineEditor.status.saved")]}):a("pipelineEditor.status.noChanges")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{w(null),m()},disabled:j.isPending,type:"button",children:a("pipelineEditor.reload")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>j.mutate(),disabled:!_||j.isPending,type:"button","aria-label":a("pipelineEditor.saveAria"),children:[j.isPending?f.jsx(pt,{size:13,strokeWidth:3,className:"animate-spin"}):f.jsx(ql,{size:13,strokeWidth:3}),a("pipelineEditor.save")]})]})]})]})]})})}function wI({parsed:e,onChange:t}){const n=Be(),r=e.stages??[],a=h=>{t({...e,stages:h})},o=()=>{a([...r,{name:`stage-${r.length+1}`,on_complete:"move_card Done"}])},l=h=>{a(r.filter((g,m)=>m!==h))},u=(h,g)=>{const m=[...r],y=h+g;y<0||y>=m.length||([m[h],m[y]]=[m[y],m[h]],a(m))},d=(h,g)=>{a(r.map((m,y)=>y===h?{...m,...g}:m))};return f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[f.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[f.jsx("span",{className:"font-bold",children:"mode:"}),f.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:h=>t({...e,mode:h.target.value}),children:[f.jsx("option",{value:"project",children:"project"}),f.jsx("option",{value:"steps",children:"steps"})]})]}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:n("pipelineEditor.modeHint")})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:n("pipelineEditor.stages.heading",{count:r.length})}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:o,"aria-label":n("pipelineEditor.stages.add"),children:[f.jsx(Vr,{size:11,strokeWidth:3})," ",n("pipelineEditor.stages.add")]})]}),r.length===0?f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:n("pipelineEditor.stages.empty")}):f.jsx("div",{className:"flex flex-col gap-3",children:r.map((h,g)=>f.jsx(EI,{stage:h,index:g,total:r.length,onChange:m=>d(g,m),onRemove:()=>l(g),onMoveUp:()=>u(g,-1),onMoveDown:()=>u(g,1)},g))})]})]})}function EI({stage:e,index:t,total:n,onChange:r,onRemove:a,onMoveUp:o,onMoveDown:l}){const u=Be(),d=e.on_fail??{};return f.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&f.jsx("code",{className:"ml-2 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:e.name})]}),f.jsxs("div",{className:"flex gap-1",children:[f.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":u("pipelineEditor.stage.moveUp"),children:f.jsx(WD,{size:12,strokeWidth:3})}),f.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:l,disabled:t===n-1,"aria-label":u("pipelineEditor.stage.moveDown"),children:f.jsx(Bu,{size:12,strokeWidth:3})}),f.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:a,"aria-label":u("pipelineEditor.stage.remove"),children:f.jsx(ho,{size:12,strokeWidth:3})})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[f.jsx(Wa,{label:"name",hint:u("pipelineEditor.stage.name.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:h=>r({name:h.target.value}),placeholder:"develop"})}),f.jsx(Wa,{label:"profile",hint:u("pipelineEditor.stage.profile.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:h=>r({profile:h.target.value||void 0}),placeholder:"fullstack"})}),f.jsx(Wa,{label:"card_state",hint:u("pipelineEditor.stage.cardState.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:h=>r({card_state:h.target.value||void 0}),placeholder:"Inprogress"})}),f.jsx(Wa,{label:"timeout",hint:u("pipelineEditor.stage.timeout.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:h=>r({timeout:h.target.value||void 0}),placeholder:"2h"})}),f.jsx(Wa,{label:"trigger",hint:u("pipelineEditor.stage.trigger.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:h=>r({trigger:h.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),f.jsx(Wa,{label:"on_complete",hint:u("pipelineEditor.stage.onComplete.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:h=>r({on_complete:h.target.value}),placeholder:"move_card Done"})})]}),f.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[f.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),f.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[f.jsx(Wa,{label:"action",hint:u("pipelineEditor.stage.onFail.action.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:d.action??"",onChange:h=>r({on_fail:{...d,action:h.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),f.jsx(Wa,{label:"comment",hint:u("pipelineEditor.stage.onFail.comment.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:d.comment??"",onChange:h=>r({on_fail:{...d,comment:h.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),f.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:d.halt??!0,onChange:h=>r({on_fail:{...d,halt:h.target.checked}})}),f.jsx("span",{className:"font-bold",children:"halt"}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:u("pipelineEditor.stage.halt.note")})]})]})]})}function Wa({label:e,hint:t,children:n}){return f.jsxs("label",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),n,t&&f.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function kI({onCancel:e,onCreate:t,hasActive:n,hasSample:r,isPending:a}){const o=Be(),[l,u]=T.useState(""),[d,h]=T.useState("blank");T.useEffect(()=>{const S=k=>{k.key==="Escape"&&e()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[e]);const g=l.trim(),m=g.endsWith(".yaml")?g:g?`${g}.yaml`:"",y=m&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(m),b=()=>{!y||a||t(m,d)},w=o("newPipelineDialog.field.filename.help",{filename:"__FN__"}).split("__FN__");return f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsxs("header",{className:"flex items-start justify-between mb-4",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:o("newPipelineDialog.title")}),f.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":o("common.close"),children:f.jsx(_r,{size:14,strokeWidth:3})})]}),f.jsxs("form",{onSubmit:S=>{S.preventDefault(),b()},className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:o("newPipelineDialog.field.filename.label")}),f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:o("newPipelineDialog.field.filename.placeholder"),value:l,onChange:S=>u(S.target.value),autoFocus:!0}),f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[w[0],f.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:m||"xxx.yaml"}),w[1]]})]}),f.jsxs("fieldset",{className:"flex flex-col gap-2",children:[f.jsx("legend",{className:"text-sm font-bold mb-1",children:o("newPipelineDialog.section.template")}),f.jsx(Cg,{value:"blank",current:d,label:o("newPipelineDialog.template.blank.label"),desc:o("newPipelineDialog.template.blank.desc"),onSelect:h}),f.jsx(Cg,{value:"sample",current:d,label:o("newPipelineDialog.template.sample.label"),desc:o("newPipelineDialog.template.sample.desc"),onSelect:h,disabled:!r,disabledReason:o("newPipelineDialog.template.sample.unavailable")}),f.jsx(Cg,{value:"active",current:d,label:o("newPipelineDialog.template.active.label"),desc:o("newPipelineDialog.template.active.desc"),onSelect:h,disabled:!n,disabledReason:o("newPipelineDialog.template.active.unavailable")})]}),f.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[f.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:a,children:o("common.cancel")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!y||a,"aria-label":o("newPipelineDialog.create.aria"),children:[a?f.jsx(pt,{size:13,strokeWidth:3,className:"animate-spin"}):f.jsx(Vr,{size:13,strokeWidth:3}),o("common.create")]})]})]})]})})}function Cg({value:e,current:t,label:n,desc:r,onSelect:a,disabled:o,disabledReason:l}){const u=t===e;return f.jsxs("label",{className:["flex items-start gap-2 p-2 rounded-lg border-2 cursor-pointer",o?"border-[var(--color-border-light)] opacity-50 cursor-not-allowed":u?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"border-[var(--color-border-light)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[f.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:u,disabled:o,onChange:()=>a(e),className:"mt-1 flex-shrink-0"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"text-sm font-bold",children:n}),f.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:o?l:r})]})]})}function SI(){var l;const e=Be(),{name:t=""}=r_(),n=gs(),[r,a]=T.useState("overview"),o=tt({queryKey:["project",t],queryFn:()=>IL(t),enabled:!!t});return f.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[f.jsxs("header",{className:"flex items-center gap-3",children:[f.jsxs("button",{type:"button",onClick:()=>n("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.back.aria"),children:[f.jsx(h_,{size:14,strokeWidth:3}),e("newProject.back")]}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:t}),f.jsx(fo,{to:`/board?project=${encodeURIComponent(t)}`,className:"nb-btn nb-btn-mint",children:e("projectDetail.openBoard")})]}),f.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[f.jsx(Ef,{current:r,value:"overview",onSelect:a,icon:dR,children:e("projectDetail.tab.overview")}),f.jsx(Ef,{current:r,value:"config",onSelect:a,icon:k_,children:e("projectDetail.tab.config")}),f.jsx(Ef,{current:r,value:"pipelines",onSelect:a,icon:Cb,children:e("projectDetail.tab.pipelines")}),f.jsx(Ef,{current:r,value:"danger",onSelect:a,icon:ho,children:e("projectDetail.tab.danger")})]}),r==="overview"&&f.jsx(_I,{name:t,data:o.data,loading:o.isLoading}),r==="config"&&f.jsx(NI,{name:t}),r==="pipelines"&&f.jsx(CI,{name:t}),r==="danger"&&f.jsx(jI,{name:t,repoDir:((l=o.data)==null?void 0:l.repoDir)??null})]})}function Ef({current:e,value:t,onSelect:n,icon:r,children:a}){const o=e===t;return f.jsxs("button",{type:"button",onClick:()=>n(t),"aria-current":o?"page":void 0,className:["nb-btn",o?"nb-btn-primary":""].join(" "),style:{padding:"6px 14px",fontSize:13},children:[f.jsx(r,{size:13,strokeWidth:2.5}),a]})}function _I({name:e,data:t,loading:n}){const r=Be();return n?f.jsx("div",{className:"nb-card",children:f.jsx("p",{className:"text-[var(--color-text-muted)]",children:r("common.loading")})}):t?f.jsx("div",{className:"nb-card",children:f.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[f.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.repoDir")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),f.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.pmBackend")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),f.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.agent")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),f.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.cards")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:r("projectDetail.overview.cards.value",{total:t.cards.total,inprogress:t.cards.inprogress,done:t.cards.done})}),f.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.workers")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:r("projectDetail.overview.workers.value",{total:t.workers.total,active:t.workers.active})}),f.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.pipeline")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),f.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.lastActivity")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):f.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:f.jsx("p",{children:r("projectDetail.overview.notFound",{name:e})})})}function NI({name:e}){const t=Be(),n=wn(),{alert:r}=Zn(),{data:a,isLoading:o,isError:l,error:u,refetch:d}=tt({queryKey:["project-conf",e],queryFn:()=>PL(e)}),[h,g]=T.useState(null),[m,y]=T.useState(null);T.useEffect(()=>{a&&h===null&&(g(a.content),y(a.etag))},[a,h]);const b=h!==null&&a!==void 0&&h!==a.content,E=rn({mutationFn:()=>{if(h===null||m===null)throw new Error("no draft");return BL(e,h,m)},onSuccess:w=>{y(w.etag),n.invalidateQueries({queryKey:["project-conf",e]}),n.invalidateQueries({queryKey:["project",e]})},onError:w=>{const S=w.status;r({title:t(S===409?"projectDetail.config.error.conflict.title":"projectDetail.config.error.save.title"),body:S===409?t("projectDetail.config.error.conflict.body"):w instanceof Error?w.message:String(w)})}});return o?f.jsx("div",{className:"nb-card",children:f.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")})}):l?f.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:f.jsx("p",{children:t("projectDetail.config.error.load",{detail:u instanceof Error?u.message:String(u)})})}):f.jsxs("div",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:f.jsxs("code",{className:"font-[family-name:var(--font-mono)] text-sm bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:["~/.coral/projects/",e,"/conf"]})}),m&&f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",m]})]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{g(null),d()},disabled:E.isPending,"aria-label":t("projectDetail.config.reload"),children:[f.jsx(ps,{size:13,strokeWidth:2.5}),t("projectDetail.config.reload")]}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>E.mutate(),disabled:!b||E.isPending,"aria-label":t("projectDetail.config.saveAria"),children:[E.isPending?f.jsx(pt,{size:13,strokeWidth:3,className:"animate-spin"}):E.isSuccess&&!b?f.jsx(GD,{size:13,strokeWidth:3}):f.jsx(ql,{size:13,strokeWidth:3}),t("projectDetail.config.save")]})]})]}),f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:h??"",onChange:w=>g(w.target.value),spellCheck:!1,"aria-label":t("projectDetail.config.editorAria")}),b&&f.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:t("projectDetail.config.confDirty")})]})}function CI({name:e}){const t=Be(),n=wn(),{confirm:r,alert:a}=Zn(),{data:o,isLoading:l}=tt({queryKey:["project-pipelines",e],queryFn:()=>$L(e)}),[u,d]=T.useState(null),[h,g]=T.useState(!1),m=rn({mutationFn:w=>FL(e,w),onSuccess:()=>n.invalidateQueries({queryKey:["project-pipelines",e]}),onError:w=>{a({title:t("projectDetail.pipelines.switch.error"),body:w instanceof Error?w.message:String(w)})}}),y=rn({mutationFn:w=>GL(e,w),onSuccess:()=>n.invalidateQueries({queryKey:["project-pipelines",e]}),onError:w=>{a({title:t("projectDetail.pipelines.delete.error"),body:w instanceof Error?w.message:String(w)})}}),b=rn({mutationFn:w=>KL(e,w.name,w.template),onSuccess:w=>{n.invalidateQueries({queryKey:["project-pipelines",e]}),g(!1),d(w.name)},onError:w=>{a({title:t("projectDetail.pipelines.create.error"),body:w instanceof Error?w.message:String(w)})}});if(l)return f.jsx("div",{className:"nb-card",children:f.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")})});const E=[];o!=null&&o.active&&E.push({name:o.active,isActive:!0});for(const w of(o==null?void 0:o.available)??[])E.push({name:w.name,isActive:!1});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:t("projectDetail.pipelines.title")}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>g(!0),disabled:b.isPending,"aria-label":t("projectDetail.pipelines.add"),children:[f.jsx(Vr,{size:12,strokeWidth:3}),t("projectDetail.pipelines.add")]})]}),E.length===0?f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:t("projectDetail.pipelines.empty")}):f.jsx("ul",{className:"flex flex-col gap-2",children:E.map(w=>f.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[f.jsx(Cb,{size:16,strokeWidth:2.5}),f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:w.name}),w.isActive&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("projectDetail.pipelines.activeBadge")}),f.jsxs("div",{className:"flex gap-1",children:[f.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>d(w.name),"aria-label":t("projectDetail.pipelines.editAria",{name:w.name}),children:[f.jsx(_b,{size:11,strokeWidth:2.5}),t("projectDetail.pipelines.edit")]}),!w.isActive&&f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await r({title:t("projectDetail.pipelines.switch.confirm.title",{name:w.name}),body:t("projectDetail.pipelines.switch.confirm.body",{name:w.name}),confirm:t("projectDetail.pipelines.switch.confirm.button")})&&m.mutate(w.name)},disabled:m.isPending,"aria-label":t("projectDetail.pipelines.switchAria",{name:w.name}),children:t("projectDetail.pipelines.switch")}),f.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await r({title:t("projectDetail.pipelines.delete.confirm.title",{name:w.name}),body:t("projectDetail.pipelines.delete.confirm.body"),confirm:t("common.delete"),danger:!0})&&y.mutate(w.name)},disabled:y.isPending,"aria-label":t("projectDetail.pipelines.deleteAria",{name:w.name}),children:f.jsx(ho,{size:11,strokeWidth:2.5})})]})]})]},w.name))})]}),u&&f.jsx(vI,{projectName:e,file:u,onClose:()=>d(null),onSaved:()=>{n.invalidateQueries({queryKey:["project-pipelines",e]})}}),h&&f.jsx(kI,{hasActive:!!(o!=null&&o.active),hasSample:!0,isPending:b.isPending,onCancel:()=>g(!1),onCreate:(w,S)=>b.mutate({name:w,template:S})})]})}function jI({name:e,repoDir:t}){const n=Be(),r=gs(),a=wn(),{alert:o}=Zn(),[l,u]=T.useState(""),[d,h]=T.useState(!0),g=rn({mutationFn:()=>UL(e,{includeClaudeDir:d}),onSuccess:w=>{a.invalidateQueries({queryKey:["projects"]});const S=w.claudeRemoved.filter(k=>k.ok).map(k=>k.path);o({title:n("projectDetail.danger.deleted.title"),body:S.length>0?n("projectDetail.danger.deleted.bodyWithList",{paths:S.join(`
|
|
536
|
+
`)}):n("projectDetail.danger.deleted.body")}).then(()=>r("/projects"))},onError:w=>{o({title:n("projectDetail.danger.error"),body:w instanceof Error?w.message:String(w)})}}),y=n("projectDetail.danger.body",{path:"__PATH__"}).split("__PATH__"),E=n("projectDetail.danger.confirmPrompt",{name:"__NAME__"}).split("__NAME__");return f.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:n("projectDetail.danger.title")}),f.jsxs("p",{className:"text-sm mb-4",children:[y[0],f.jsxs("code",{className:"font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-1.5 py-0.5 rounded",children:["~/.coral/projects/",e,"/"]}),y[1]]}),t&&f.jsxs("label",{className:"flex items-start gap-2 mb-4 p-3 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:d,onChange:w=>h(w.target.checked),className:"mt-0.5"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"text-sm font-bold",children:n("projectDetail.danger.includeClaude.label")}),f.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:n("projectDetail.danger.includeClaude.note")})]})]}),f.jsx("div",{className:"mb-4",children:f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsxs("span",{className:"text-sm font-bold",children:[E[0],f.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e}),E[1]]}),f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:l,onChange:w=>u(w.target.value),placeholder:e})]})}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:l!==e||g.isPending,onClick:()=>g.mutate(),"aria-label":n("projectDetail.danger.deleteAria"),children:[g.isPending?f.jsx(pt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(ho,{size:14,strokeWidth:3}),n("projectDetail.danger.deleteButton")]})]})}function Kb(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return Mt(`/api/skills${t}`)}function AI(e){return Mt(`/api/skills/${encodeURIComponent(e)}`)}function TI(e,t){return Mt(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function MI(e,t){const n=await fetch(e,{method:"POST",headers:void 0,body:void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function OI(){return MI("/api/skills/sync")}function DI({project:e,isPending:t,onCancel:n,onCreate:r}){var _;const a=Be(),[o,l]=T.useState(""),[u,d]=T.useState(""),[h,g]=T.useState(new Set),[m,y]=T.useState(!1),b=tt({queryKey:["skills-all",e],queryFn:()=>Kb(e)});T.useEffect(()=>{const N=O=>{O.key==="Escape"&&n()};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[n]);const w=o.trim().length>0&&o.trim().length<=200&&!t,S=N=>{const O=new Set(h);O.has(N)?O.delete(N):O.add(N),g(O)},k=()=>{w&&r({title:o.trim(),description:u.trim(),skills:[...h],labels:["AI-PIPELINE"],initialState:m?"Backlog":"Planning"})},j=((_=b.data)==null?void 0:_.data)??[];return f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:f.jsxs("div",{className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[f.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:a("newCard.title")}),f.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":a("common.close"),children:f.jsx(_r,{size:14,strokeWidth:3})})]}),f.jsxs("form",{onSubmit:N=>{N.preventDefault(),k()},className:"flex flex-col gap-4 overflow-auto",children:[f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:a("newCard.field.title")}),f.jsx("input",{type:"text",className:"nb-input w-full",placeholder:a("newCard.field.title.placeholder"),value:o,onChange:N=>l(N.target.value),maxLength:200,autoFocus:!0,required:!0}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:a("newCard.field.title.help")})]}),f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:a("newCard.field.description")}),f.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:a("newCard.field.description.placeholder"),value:u,onChange:N=>d(N.target.value)}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:a("newCard.field.description.help")})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("span",{className:"text-sm font-bold",children:a("newCard.field.skills")}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:a("newCard.field.skills.help")}),b.isLoading&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("newCard.field.skills.loading")}),b.isError&&f.jsx("p",{className:"text-xs text-[var(--color-crashed)]",children:a("newCard.field.skills.error",{detail:b.error instanceof Error?b.error.message:String(b.error)})}),j.length>0&&f.jsx("div",{className:"flex flex-wrap gap-2",children:j.map(N=>{const O=h.has(N.name);return f.jsx("button",{type:"button",onClick:()=>S(N.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",O?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),"aria-pressed":O,children:N.name},N.name)})}),h.size>0&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:a("newCard.field.skills.selected",{count:h.size,names:[...h].join(", ")})})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("span",{className:"text-sm font-bold",children:a("newCard.field.dispatch")}),f.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none p-3 border-[2px] border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)]",children:[f.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:m,onChange:N=>y(N.target.checked)}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"text-sm font-bold",children:a("newCard.field.dispatch.label")}),f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:a("newCard.field.dispatch.help")})]})]})]})]}),f.jsxs("div",{className:"flex gap-2 justify-end mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[f.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:n,disabled:t,type:"button",children:a("common.cancel")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:k,disabled:!w,type:"button","aria-label":a("newCard.create.aria"),children:[t?f.jsx(pt,{size:13,strokeWidth:3,className:"animate-spin"}):f.jsx(Vr,{size:13,strokeWidth:3}),a("common.create")]})]})]})})}function RI(e){return Mt(`/api/projects/${encodeURIComponent(e)}/cards`)}function LI(e,t){return Mt(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function Xl(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const r=await n.text();throw new Error(`${n.status} ${n.statusText}: ${r}`)}return n.json().catch(()=>({}))}function II(e,t){return Xl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function zI(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"DELETE"});if(!n.ok){const r=await n.text();throw new Error(`${n.status}: ${r}`)}}function PI(e,t){return Xl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function BI(e,t){const n=typeof t=="string"?{title:t}:t;return Xl(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function UI(e,t,n){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:n})});if(!r.ok){const a=await r.text();throw new Error(`${r.status}: ${a}`)}}async function $I(e,t,n){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const a=await r.text();throw new Error(`${r.status}: ${a}`)}return r.json()}function MN(e){return Xl(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function ON(e){return Xl(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function FI(e,t){return Xl(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function HI(e){const t=wn();T.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,r=new EventSource(n),a=u=>{try{const d=JSON.parse(u.data);t.invalidateQueries({queryKey:["cards",d.project]}),t.invalidateQueries({queryKey:["card",d.project,d.seq]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=u=>{try{const d=JSON.parse(u.data);t.invalidateQueries({queryKey:["workers",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},l=u=>{try{const d=JSON.parse(u.data);t.invalidateQueries({queryKey:["pipeline-status",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return r.addEventListener("card.created",a),r.addEventListener("card.updated",a),r.addEventListener("card.moved",a),r.addEventListener("card.deleted",a),r.addEventListener("worker.updated",o),r.addEventListener("worker.added",o),r.addEventListener("worker.deleted",o),r.addEventListener("pipeline.status",l),r.addEventListener("pipeline.started",l),r.addEventListener("pipeline.stopped",l),()=>r.close()},[e,t])}const qI=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),KI=new Set(["frontend","backend","mobile","database","devops"]),GI=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),VI=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function YI(e){return qI.has(e)?"lang":KI.has(e)?"end":GI.has(e)?"persona":VI.has(e)?"workflow":"other"}const QI={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function Gb({name:e}){const t=QI[YI(e)];return f.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function DN({label:e,kind:t="default"}){const n=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return f.jsx("span",{className:"nb-badge",style:{background:n},children:e})}function WI({card:e,onClick:t,done:n,draggable:r}){const a=Be(),o=e.labels.some(l=>l.startsWith("STARTED-"))&&!n;return f.jsxs("article",{onClick:t,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),t())},draggable:r,onDragStart:l=>{l.dataTransfer.setData("application/x-sps-card-seq",String(e.seq)),l.dataTransfer.effectAllowed="move"},tabIndex:0,role:"button","aria-label":`Card #${e.seq}: ${e.title}`,className:["bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl p-3","shadow-[3px_3px_0_var(--color-text)] cursor-pointer","transition-[transform,box-shadow] duration-[180ms] ease-out","hover:-translate-x-0.5 hover:-translate-y-0.5 hover:shadow-[5px_5px_0_var(--color-text)]","focus:outline-none focus-visible:ring-[3px] focus-visible:ring-offset-2 focus-visible:ring-[var(--color-text)]",n?"opacity-60":"",r?"active:cursor-grabbing":""].join(" "),children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-[11px] px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full",children:["#",e.seq]}),o&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),f.jsx("p",{className:`font-bold text-sm leading-5 mb-2 line-clamp-2 ${n?"line-through decoration-2":""}`,children:e.title}),(e.skills.length>0||e.labels.length>0)&&f.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(l=>f.jsx(Gb,{name:l},l)),e.labels.filter(l=>l==="NEEDS-FIX").map(l=>f.jsx(DN,{label:l,kind:"warn"},l))]}),e.checklist&&e.checklist.total>0&&f.jsx(XI,{stats:e.checklist}),f.jsxs("div",{className:"pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)] flex items-center gap-2 text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-subtle)]",children:[f.jsx("span",{children:ZI(e.updatedAt??e.createdAt,a)}),e.branch&&f.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function XI({stats:e}){const t=Be();return f.jsxs("div",{className:"mb-2",children:[f.jsxs("div",{className:"flex items-center justify-between text-[11px] font-[family-name:var(--font-mono)] mb-1",children:[f.jsx("span",{className:"font-bold",children:t("kanban.checklist.label",{done:e.done,total:e.total})}),f.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[e.percent,"%"]})]}),f.jsx("div",{className:"w-full h-1.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full overflow-hidden mb-1.5",children:f.jsx("div",{className:"h-full bg-[var(--color-cta)] transition-[width] duration-200",style:{width:`${e.percent}%`}})}),f.jsxs("ul",{className:"text-[11px] space-y-0.5",children:[e.items.slice(0,3).map((n,r)=>f.jsxs("li",{className:`flex items-start gap-1 ${n.done?"opacity-60 line-through":""}`,children:[f.jsx("span",{className:"flex-shrink-0 mt-0.5",children:n.done?"✓":"○"}),f.jsx("span",{className:"line-clamp-1",children:n.text})]},r)),e.items.length>3&&f.jsx("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:t("kanban.checklist.more",{count:e.items.length-3})})]})]})}function ZI(e,t){if(!e)return"—";const n=new Date(e),r=Date.now()-n.getTime();return r<6e4?t("kanban.time.justNow"):r<36e5?t("kanban.time.minutes",{n:Math.floor(r/6e4)}):r<864e5?t("kanban.time.hours",{n:Math.floor(r/36e5)}):n.toLocaleDateString()}function JI({label:e,bg:t,cards:n,onCardClick:r,onDropCard:a}){const o=Be(),[l,u]=T.useState(!1);return f.jsxs("div",{className:["flex flex-col p-3 rounded-2xl border-[3px] min-h-[280px] h-full min-h-0 overflow-hidden","transition-all",l?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:d=>{!a||!d.dataTransfer.types.includes("application/x-sps-card-seq")||(d.preventDefault(),d.dataTransfer.dropEffect="move",l||u(!0))},onDragLeave:()=>u(!1),onDrop:d=>{if(u(!1),!a)return;const h=d.dataTransfer.getData("application/x-sps-card-seq"),g=Number.parseInt(h,10);Number.isFinite(g)&&(d.preventDefault(),a(g))},children:[f.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 mb-2 border-b-2 border-[var(--color-text)] shrink-0",children:[f.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),f.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto pr-1 -mr-1",style:{scrollbarWidth:"thin",scrollbarColor:"var(--color-text) transparent"},children:[n.length===0&&f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:o("kanban.column.empty")}),n.map(d=>f.jsx(WI,{card:d,onClick:()=>r(d),done:e==="Done",draggable:!!a},d.seq))]})]})}function zy(e,t){if(!e)return"";const n=e.split(`
|
|
537
|
+
`),r=new RegExp(`^##\\s+${t}\\s*$`),a=n.findIndex(l=>r.test(l));if(a===-1)return"";let o=n.length;for(let l=a+1;l<n.length;l++)if(/^##\s+/.test(n[l]??"")){o=l;break}return n.slice(a+1,o).join(`
|
|
538
|
+
`).trim()}function jg(e){return zy(e,"描述")}function ez({project:e,seq:t,onClose:n,onChanged:r}){var Y,W,K,D,L,V,R,oe,ge,te,ue;const a=Be(),o=wn(),{confirm:l,alert:u}=Zn(),{data:d,isLoading:h,isError:g,error:m,refetch:y}=tt({queryKey:["card",e,t],queryFn:()=>LI(e,t)}),[b,E]=T.useState(!1),[w,S]=T.useState(""),[k,j]=T.useState(""),[_,N]=T.useState(new Set),[O,A]=T.useState([]),[M,I]=T.useState(""),F=tt({queryKey:["skills-all",e],queryFn:()=>Kb(e),enabled:b}),U=((W=(Y=tt({queryKey:["projects"],queryFn:pa,refetchInterval:1e4}).data)==null?void 0:Y.data.find(G=>G.name===e))==null?void 0:W.pipelineStatus)==="running";T.useEffect(()=>{b&&d&&(S(d.title),j(jg(d.body)),N(new Set(d.skills)),A([...d.labels]))},[b,d]),T.useEffect(()=>{const G=ne=>{ne.key==="Escape"&&(b?E(!1):n())};return window.addEventListener("keydown",G),()=>window.removeEventListener("keydown",G)},[n,b]);const q=rn({mutationFn:()=>{if(!d)throw new Error("no data");const G={},ne=w.trim();ne&&ne!==d.title&&(G.title=ne);const de=jg(d.body);k!==de&&(G.description=k);const xe=[..._].sort(),ke=[...d.skills].sort();return JSON.stringify(xe)!==JSON.stringify(ke)&&(G.skills=xe),JSON.stringify(O)!==JSON.stringify(d.labels)&&(G.labels=O),Object.keys(G).length===0?Promise.resolve({ok:!0,noop:!0}):$I(e,t,G)},onSuccess:()=>{o.invalidateQueries({queryKey:["card",e,t]}),o.invalidateQueries({queryKey:["cards",e]}),E(!1),r()},onError:G=>{u({title:a("cardModal.error.save.title"),body:G instanceof Error?G.message:String(G)})}}),Q=T.useMemo(()=>{if(!b||!d)return!1;if(w.trim()!==d.title||k!==jg(d.body))return!0;const G=[..._].sort(),ne=[...d.skills].sort();return JSON.stringify(G)!==JSON.stringify(ne)||JSON.stringify(O)!==JSON.stringify(d.labels)},[b,d,w,k,_,O]),B=G=>{const ne=new Set(_);ne.has(G)?ne.delete(G):ne.add(G),N(ne)},H=()=>{const G=M.trim();if(G){if(O.includes(G)){I("");return}A([...O,G]),I("")}},z=G=>{A(O.filter(ne=>ne!==G))};return f.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"card-modal-title",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:f.jsxs("div",{className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[f.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full",children:["#",t]}),(d==null?void 0:d.state)&&f.jsx("span",{className:"font-[family-name:var(--font-mono)] text-xs px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full font-semibold",children:d.state}),b&&f.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:a("cardModal.editing")})]}),b?f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:w,onChange:G=>S(G.target.value),maxLength:200,"aria-label":a("cardModal.title.aria")}):f.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:(d==null?void 0:d.title)??a("common.loading")})]}),f.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!b&&d&&f.jsxs("button",{onClick:()=>E(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":a("cardModal.editAria"),children:[f.jsx(_b,{size:12,strokeWidth:2.5})," ",a("cardModal.edit")]}),f.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":a("cardModal.close.aria"),type:"button",children:f.jsx(_r,{size:14,strokeWidth:3})})]})]}),h&&f.jsx("p",{className:"text-[var(--color-text-muted)]",children:a("common.loading")}),g&&f.jsx("p",{className:"text-[var(--color-crashed)]",children:a("cardModal.error.load",{detail:m instanceof Error?m.message:String(m)})}),d&&f.jsxs("div",{className:"flex flex-col gap-4",children:[d.branch&&!b&&f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(yR,{size:14}),f.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:d.branch})]}),b?f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),F.isLoading&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("cardModal.skills.loading")}),F.data&&F.data.data.length>0&&f.jsx("div",{className:"flex flex-wrap gap-1.5",children:F.data.data.map(G=>{const ne=_.has(G.name);return f.jsx("button",{type:"button",onClick:()=>B(G.name),"aria-pressed":ne,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",ne?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:G.name},G.name)})})]}),f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),f.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[O.map(G=>f.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-accent-yellow)] border-2 border-[var(--color-text)] rounded-full",children:[G,f.jsx("button",{type:"button",onClick:()=>z(G),className:"hover:text-[var(--color-crashed)]","aria-label":a("cardModal.label.removeAria",{label:G}),children:f.jsx(_r,{size:10,strokeWidth:3})})]},G)),f.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:a("cardModal.label.addPlaceholder"),value:M,onChange:G=>I(G.target.value),onKeyDown:G=>{G.key==="Enter"&&!G.nativeEvent.isComposing&&(G.preventDefault(),H())}}),M&&f.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:H,"aria-label":a("cardModal.label.addAria"),children:f.jsx(Vr,{size:10,strokeWidth:3})})]}),f.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:a("cardModal.label.note")})]})]}):f.jsxs(f.Fragment,{children:[d.skills.length>0&&f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),f.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:d.skills.map(G=>f.jsx(Gb,{name:G},G))})]}),d.labels.length>0&&f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),f.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:d.labels.map(G=>f.jsx(DN,{label:G,kind:G==="NEEDS-FIX"?"warn":"default"},G))})]})]}),b?f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:a("cardModal.section.description")}),f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:k,onChange:G=>j(G.target.value),"aria-label":a("cardModal.body.aria")}),f.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:a("cardModal.body.replaceNote")})]}),(((oe=d.checklist)==null?void 0:oe.total)??0)>0&&f.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[f.jsx("div",{className:"flex items-center justify-between mb-2",children:f.jsxs("span",{className:"font-bold text-sm",children:[a("cardModal.section.checklist")," ",((ge=d.checklist)==null?void 0:ge.done)??0,"/",((te=d.checklist)==null?void 0:te.total)??0]})}),f.jsx("ul",{className:"text-sm space-y-1",children:(((ue=d.checklist)==null?void 0:ue.items)??[]).map((G,ne)=>f.jsxs("li",{className:`flex items-start gap-2 ${G.done?"opacity-60 line-through":""}`,children:[f.jsx("span",{children:G.done?"✓":"○"}),f.jsx("span",{children:G.text})]},ne))})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:a("cardModal.section.description")}),f.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:zy(d.body,"描述")||a("cardModal.section.empty")})]}),f.jsxs("div",{children:[f.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:[a("cardModal.section.checklist")," ",f.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[((K=d.checklist)==null?void 0:K.done)??0,"/",((D=d.checklist)==null?void 0:D.total)??0]})]}),f.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:(((L=d.checklist)==null?void 0:L.total)??0)>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"flex items-center justify-end mb-2",children:f.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:f.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${((V=d.checklist)==null?void 0:V.percent)??0}%`}})})}),f.jsx("ul",{className:"text-sm space-y-1",children:(((R=d.checklist)==null?void 0:R.items)??[]).map((G,ne)=>f.jsxs("li",{className:`flex items-start gap-2 ${G.done?"opacity-60 line-through":""}`,children:[f.jsx("span",{children:G.done?"✓":"○"}),f.jsx("span",{children:G.text})]},ne))})]}):f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("cardModal.checklist.empty")})})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:a("cardModal.section.log")}),f.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:zy(d.body,"日志")||a("cardModal.section.empty")})]})]}),f.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:b?f.jsxs(f.Fragment,{children:[f.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{E(!1),y()},disabled:q.isPending,children:a("common.cancel")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>q.mutate(),disabled:!Q||!w.trim()||q.isPending,"aria-label":a("cardDetail.save"),children:[q.isPending?f.jsx(pt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(ql,{size:14,strokeWidth:3}),a("common.save")]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",disabled:d.state==="Done"||U,title:d.state==="Done"?a("cardModal.action.launch.disabledDone"):U?a("cardModal.action.launch.disabledRunning"):void 0,onClick:async()=>{try{await PI(e,t),r()}catch(G){u({title:a("cardModal.action.launch.error"),body:G instanceof Error?G.message:String(G)})}},children:[f.jsx(Fu,{size:14,strokeWidth:3}),a("cardModal.action.launch")]}),f.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await l({title:a("cardModal.action.reset.confirm.title",{seq:t}),body:a("cardModal.action.reset.confirm.body"),confirm:a("cardModal.action.reset.confirm.button"),danger:!0}))try{await II(e,t),r(),n()}catch(ne){u({title:a("cardModal.action.reset.error"),body:ne instanceof Error?ne.message:String(ne)})}},children:[f.jsx(w_,{size:14,strokeWidth:2.5}),a("cardModal.action.reset")]}),f.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await l({title:a("cardModal.action.delete.confirm1.title",{seq:t}),body:a("cardModal.action.delete.confirm1.body",{title:d.title}),confirm:a("cardModal.action.delete.confirm1.button"),danger:!0})||!await l({title:a("cardModal.action.delete.confirm2.title"),body:a("cardModal.action.delete.confirm2.body",{seq:t}),confirm:a("cardModal.action.delete"),danger:!0})))try{await zI(e,t),r(),n()}catch(de){u({title:a("projectDetail.pipelines.delete.error"),body:de instanceof Error?de.message:String(de)})}},"aria-label":a("cardModal.action.delete"),children:[f.jsx(ho,{size:14,strokeWidth:2.5}),a("cardModal.action.delete")]})]})})]})]})})}function tz({current:e,onChange:t}){const[n,r]=T.useState(!1),a=T.useRef(null),{data:o}=tt({queryKey:["projects"],queryFn:pa});return T.useEffect(()=>{const l=u=>{var d;(d=a.current)!=null&&d.contains(u.target)||r(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]),f.jsxs("div",{className:"relative",ref:a,children:[f.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>r(l=>!l),children:[e,f.jsx(Bu,{size:14,strokeWidth:2.5})]}),n&&o&&f.jsx("div",{className:"absolute right-0 mt-2 z-20 min-w-[200px] max-h-[60vh] overflow-y-auto bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[5px_5px_0_var(--color-text)]",children:jb(o.data,"activity").map(l=>{const u=l.pipelineStatus==="running";return f.jsxs("button",{type:"button",onClick:()=>{t(l.name),r(!1)},className:["w-full text-left px-4 py-2 text-sm font-semibold flex items-center gap-2",l.name===e?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[u&&f.jsx(Fu,{size:12,strokeWidth:3,className:"text-[var(--color-running)] shrink-0","aria-label":"运行中"}),f.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:l.name}),f.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)]",children:[l.cards.total," cards"]})]},l.name)})})]})}const nz=[{state:"Planning",labelKey:"board.col.planning",bg:"var(--color-accent-purple)"},{state:"Backlog",labelKey:"board.col.backlog",bg:"var(--color-bg-cream)"},{state:"Todo",labelKey:"board.col.todo",bg:"var(--color-accent-yellow)"},{state:"Inprogress",labelKey:"board.col.inprogress",bg:"var(--color-secondary)"},{state:"QA",labelKey:"board.col.qa",bg:"var(--color-accent-pink)"},{state:"Done",labelKey:"board.col.done",bg:"var(--color-accent-mint)"}],RN="sps-console:last-board-project";function rz(){if(typeof window>"u")return null;try{return localStorage.getItem(RN)}catch{return null}}function iz(e){if(!(typeof window>"u"))try{localStorage.setItem(RN,e)}catch{}}function az(){var z,Y,W;const e=Be(),[t,n]=d_(),r=t.get("project"),[a,o]=T.useState(null),[l,u]=T.useState(""),[d,h]=T.useState(()=>new Set),[g,m]=T.useState(()=>new Set),{confirm:y,alert:b}=Zn();HI(r);const E=tt({queryKey:["projects"],queryFn:pa}),w=tt({queryKey:["cards",r],queryFn:()=>RI(r??""),enabled:!!r}),S=wn(),k=()=>{S.invalidateQueries({queryKey:["cards",r]}),S.invalidateQueries({queryKey:["projects"]}),S.invalidateQueries({queryKey:["pipeline-status",r]})},j=K=>{n({project:K})};T.useEffect(()=>{var D;if(r){iz(r);return}const K=rz();K&&((D=E.data)!=null&&D.data.some(L=>L.name===K))&&n({project:K},{replace:!0})},[r,E.data,n]);const _=rn({mutationFn:()=>MN(r),onSuccess:()=>{k()},onError:K=>{b({title:e("board.action.startError"),body:K instanceof Error?K.message:String(K)})}}),N=rn({mutationFn:()=>ON(r),onSuccess:()=>k(),onError:K=>{b({title:e("board.action.stopError"),body:K instanceof Error?K.message:String(K)})}}),O=rn({mutationFn:()=>FI(r,{all:!0}),onSuccess:()=>k(),onError:K=>{b({title:e("board.action.resetError"),body:K instanceof Error?K.message:String(K)})}}),[A,M]=T.useState(!1),I=rn({mutationFn:K=>BI(r,K),onSuccess:()=>{k(),M(!1)},onError:K=>{b({title:e("board.action.newCard.error"),body:K instanceof Error?K.message:String(K)})}}),F=rn({mutationFn:({seq:K,state:D})=>UI(r,K,D),onMutate:async({seq:K,state:D})=>{await S.cancelQueries({queryKey:["cards",r]});const L=S.getQueryData(["cards",r]);return L&&S.setQueryData(["cards",r],{...L,data:L.data.map(V=>V.seq===K?{...V,state:D}:V)}),{prev:L}},onError:(K,D,L)=>{L!=null&&L.prev&&S.setQueryData(["cards",r],L.prev),b({title:e("board.action.moveCard.error"),body:K instanceof Error?K.message:String(K)})},onSettled:()=>{S.invalidateQueries({queryKey:["cards",r]})}}),$=((z=w.data)==null?void 0:z.data)??[],{allSkills:U,allLabels:q}=T.useMemo(()=>{const K=new Set,D=new Set;for(const L of $){for(const V of L.skills)K.add(V);for(const V of L.labels)D.add(V)}return{allSkills:[...K].sort(),allLabels:[...D].sort()}},[$]);if(!r)return f.jsxs("div",{className:"flex flex-col gap-6 w-full",children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("board.title.bare")}),f.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("board.pickPrompt.title")}),f.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:e("board.pickPrompt.body")}),f.jsx("div",{className:"flex flex-wrap gap-2",children:(Y=E.data)==null?void 0:Y.data.map(K=>f.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>j(K.name),type:"button",children:K.name},K.name))})]})]});const Q=$.filter(K=>{if(l){const D=l.toLowerCase();if(!(K.title.toLowerCase().includes(D)||K.skills.some(V=>V.toLowerCase().includes(D))||K.labels.some(V=>V.toLowerCase().includes(D))))return!1}return!(d.size>0&&!K.skills.some(L=>d.has(L))||g.size>0&&!K.labels.some(L=>g.has(L)))}),B=(W=E.data)==null?void 0:W.data.find(K=>K.name===r),H=(B==null?void 0:B.pipelineStatus)==="running";return f.jsxs("div",{className:"flex flex-col gap-4 max-w-full flex-1 min-h-0",children:[f.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3 shrink-0",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("board.title")}),f.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:B?e("board.subtitle",{name:B.name,cards:B.cards.total,workers:B.workers.active}):e("common.loading")})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsx(tz,{current:r,onChange:j}),f.jsxs("button",{className:H?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>H?N.mutate():_.mutate(),disabled:_.isPending||N.isPending,type:"button","aria-label":e(H?"board.action.stopAria":"board.action.startAria"),title:e(H?"board.action.stopAria":"board.action.startAria"),children:[_.isPending||N.isPending?f.jsx(pt,{size:14,strokeWidth:3,className:"animate-spin"}):H?f.jsx(Nb,{size:14,strokeWidth:3}):f.jsx(Fu,{size:14,strokeWidth:3}),e(H?"board.action.stop":"board.action.start")]}),f.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await y({title:e("board.action.reset.confirm.title"),body:e("board.action.reset.confirm.body"),confirm:e("board.action.reset.confirm.button"),danger:!0})&&O.mutate()},disabled:O.isPending,children:[O.isPending?f.jsx(pt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(w_,{size:14,strokeWidth:2.5}),e("board.action.reset")]}),f.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>M(!0),disabled:I.isPending,children:[I.isPending?f.jsx(pt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(Vr,{size:14,strokeWidth:3}),e("board.action.newCard")]})]})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-wrap shrink-0",children:[f.jsxs("div",{className:"relative flex-1 max-w-md",children:[f.jsx(ah,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),f.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("board.search.placeholder"),value:l,onChange:K=>u(K.target.value),"aria-label":e("board.search.aria")})]}),f.jsx(iE,{label:"skill",options:U,selected:d,onChange:h}),f.jsx(iE,{label:"label",options:q,selected:g,onChange:m}),(l||d.size>0||g.size>0)&&f.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{u(""),h(new Set),m(new Set)},type:"button","aria-label":e("board.filter.clearAria"),children:[f.jsx(_r,{size:11,strokeWidth:3}),e("board.filter.clear")]}),f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[f.jsx(mR,{size:12}),Q.length," / ",$.length]})]}),w.isError&&f.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[f.jsx("p",{className:"font-semibold",children:e("board.error.loadCards")}),f.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:w.error instanceof Error?w.error.message:String(w.error)})]}),!w.isError&&f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6 auto-rows-fr gap-3 flex-1 min-h-0",children:nz.map(K=>f.jsx(JI,{label:e(K.labelKey),bg:K.bg,cards:Q.filter(sz(K.state)),onCardClick:D=>o(D.seq),onDropCard:D=>F.mutate({seq:D,state:K.state})},K.state))}),a!==null&&f.jsx(ez,{project:r,seq:a,onClose:()=>o(null),onChanged:k}),A&&f.jsx(DI,{project:r,isPending:I.isPending,onCancel:()=>M(!1),onCreate:K=>I.mutate(K)})]})}function sz(e){return t=>e==="QA"?t.state==="QA"||t.state==="Review":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function iE({label:e,options:t,selected:n,onChange:r}){const a=Be(),[o,l]=T.useState(!1),u=T.useRef(null);T.useEffect(()=>{if(!o)return;const m=b=>{var E;(E=u.current)!=null&&E.contains(b.target)||l(!1)},y=b=>{b.key==="Escape"&&l(!1)};return window.addEventListener("click",m),window.addEventListener("keydown",y),()=>{window.removeEventListener("click",m),window.removeEventListener("keydown",y)}},[o]);const d=m=>{const y=new Set(n);y.has(m)?y.delete(m):y.add(m),r(y)},h=t.length===0,g=n.size;return f.jsxs("div",{ref:u,className:"relative",children:[f.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!h&&l(m=>!m),disabled:h,"aria-haspopup":"listbox","aria-expanded":o,"aria-label":a("board.filter.aria",{label:e}),children:[e,g>0&&f.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:g}),f.jsx(Bu,{size:11,strokeWidth:3,className:["transition-transform",o?"rotate-180":""].join(" ")})]}),o&&f.jsxs("div",{role:"listbox",className:"absolute left-0 top-full mt-2 z-20 min-w-[200px] max-h-64 overflow-auto nb-card p-2",style:{padding:8},children:[t.map(m=>{const y=n.has(m);return f.jsxs("label",{className:["flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer text-sm font-[family-name:var(--font-mono)]",y?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[f.jsx("input",{type:"checkbox",checked:y,onChange:()=>d(m),className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",children:m})]},m)}),g>0&&f.jsx("button",{type:"button",className:"w-full mt-2 pt-2 border-t-2 border-dashed border-[var(--color-text)] text-xs font-bold text-[var(--color-crashed)] text-center",onClick:()=>r(new Set),children:a("board.filter.clearSelection")})]})]})}function oz(){return Mt("/api/workers/all")}function lz(e){return Mt(`/api/projects/${encodeURIComponent(e)}/workers`)}function cz(e,t){return Mt(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function LN(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function aE(e,t){return LN(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function uz(e,t,n){return LN(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function Vb({state:e}){const n={running:{bg:"var(--color-running-bg)",color:"var(--color-running)",label:"running"},starting:{bg:"var(--color-secondary)",color:"var(--color-text)",label:"starting",icon:f.jsx(pt,{size:9,strokeWidth:3,className:"animate-spin"})},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)",label:"stuck"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)",label:"crashed",icon:f.jsx(iL,{size:9,strokeWidth:2.5})},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)",label:"idle"}}[e];return f.jsxs("span",{className:"nb-status inline-flex items-center gap-1",style:{background:n.bg,color:n.color},children:[n.icon,n.label]})}function Yb(e){if(e==null||e<=0)return"—";const t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),a=t%60;return n>0?`${n}h ${r}m`:r>0?`${r}m ${a}s`:`${a}s`}function dz(e){if(e==null||e<=0)return"text-[var(--color-text-muted)]";const t=e/6e4;return t<10?"text-[var(--color-running)]":t<60?"text-[var(--color-stuck)]":"text-[var(--color-crashed)]"}function Qb(e){const t=Date.now()-new Date(e).getTime();return t<6e4?`${Math.floor(t/1e3)}s 前`:t<36e5?`${Math.floor(t/6e4)}m 前`:`${Math.floor(t/36e5)}h 前`}function fz({alerts:e,selected:t,onSelect:n}){const r=Be();return e.length===0?f.jsxs("div",{className:"nb-card bg-[var(--color-running-bg)] flex items-center gap-3",children:[f.jsx(pu,{size:18,strokeWidth:2.5,className:"text-[var(--color-running)]"}),f.jsx("span",{className:"text-sm font-bold text-[var(--color-running)]",children:r("workers.alerts.allHealthy")})]}):f.jsxs("section",{children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2 text-[var(--color-crashed)]",children:[f.jsx(dL,{size:14,strokeWidth:2.5}),"Alerts (",e.length,")"]}),f.jsx("div",{className:"flex flex-col gap-2",children:e.map(a=>{const o=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return f.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",o?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(Vb,{state:a.state}),f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[a.project,"/worker-",a.slot]}),a.card&&f.jsxs("span",{className:"truncate",children:["#",a.card.seq," ",a.card.title]}),f.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1",children:[f.jsx(m_,{size:10,strokeWidth:2.5}),Yb(a.runtimeMs)]})]}),a.markerUpdatedAt&&f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:a.state==="crashed"?r("workers.alerts.pidDead"):r("workers.alerts.markerStale",{ago:Qb(a.markerUpdatedAt)})})]},`${a.project}-${a.slot}`)})})]})}function hz({active:e,selected:t,onSelect:n}){const r=Be();return e.length===0?f.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:r("workers.active.empty")})}):f.jsxs("section",{children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2",children:[f.jsx(Mh,{size:14,strokeWidth:2.5}),"Active (",e.length,")"]}),f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.map(a=>{const o=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return f.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="starting"?"bg-[var(--color-secondary)]":"bg-[var(--color-running-bg)]",o?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx(Vb,{state:a.state}),f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm flex-1 truncate",children:[a.project,"/worker-",a.slot]}),f.jsx("span",{className:`text-xs font-[family-name:var(--font-mono)] ${dz(a.runtimeMs)}`,children:Yb(a.runtimeMs)})]}),a.card&&f.jsxs("div",{className:"text-sm font-semibold mb-1 truncate",children:["#",a.card.seq," · ",a.card.title]}),f.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-2 mb-1",children:[a.stage&&f.jsxs("span",{children:["stage: ",a.stage]}),a.markerUpdatedAt&&f.jsxs("span",{className:"ml-auto",children:["marker ",Qb(a.markerUpdatedAt)]})]}),a.lastLogLine&&f.jsxs("div",{className:"text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded px-2 py-1 mt-2 truncate",children:[f.jsx(S_,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function pz({capacity:e,selected:t,onSelect:n}){const r=Be();return e.length===0?null:f.jsxs("section",{className:"flex flex-col min-h-0 flex-1",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 shrink-0",children:"Capacity"}),f.jsx("div",{className:"nb-card p-0 overflow-y-auto min-h-0 flex-1",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[f.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:r("workers.capacity.col.project")}),f.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:r("workers.capacity.col.usage")}),f.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"running"}),f.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:r("workers.capacity.col.other")}),f.jsx("th",{className:"px-3 py-2"})]})}),f.jsx("tbody",{children:e.map(a=>{const o=a.running+a.starting+a.stuck+a.crashed,l=(t==null?void 0:t.project)===a.project;return f.jsxs("tr",{onClick:()=>n(a.project),className:["border-b border-dashed border-[var(--color-border-light)] last:border-0 cursor-pointer hover:bg-[var(--color-accent-yellow)]",l?"bg-[var(--color-accent-yellow)]":""].join(" "),children:[f.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:a.project}),f.jsx("td",{className:"px-3 py-2",children:f.jsx(mz,{total:a.total,cap:a})}),f.jsxs("td",{className:"px-3 py-2 text-right font-[family-name:var(--font-mono)]",children:[f.jsx("span",{className:"text-[var(--color-running)] font-bold",children:a.running}),f.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",a.total]})]}),f.jsxs("td",{className:"px-3 py-2 text-right text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:[a.starting>0&&f.jsxs("span",{className:"mr-2",children:["starting ",a.starting]}),a.stuck>0&&f.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",a.stuck]}),a.crashed>0&&f.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",a.crashed]}),o===0&&f.jsx("span",{children:"idle"})]}),f.jsx("td",{className:"px-3 py-2 text-right",children:f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:r("workers.capacity.detailHint")})})]},a.project)})})]})})]})}function mz({total:e,cap:t}){const n=[];for(let r=0;r<t.crashed;r++)n.push("crashed");for(let r=0;r<t.stuck;r++)n.push("stuck");for(let r=0;r<t.starting;r++)n.push("starting");for(let r=0;r<t.running;r++)n.push("running");for(let r=0;r<t.idle;r++)n.push("idle");return f.jsxs("div",{className:"flex gap-1 items-center",children:[n.map((r,a)=>f.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-[var(--color-text)]",style:{background:gz(r)},title:r},a)),f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] ml-2 font-[family-name:var(--font-mono)]",children:[e," slot",e!==1?"s":""]})]})}function gz(e){switch(e){case"running":return"var(--color-running-bg)";case"starting":return"var(--color-secondary)";case"stuck":return"var(--color-stuck-bg)";case"crashed":return"var(--color-crashed-bg)";default:return"var(--color-idle-bg)"}}function yz({project:e,initialSlot:t,onChange:n}){var h;const r=Be(),a=tt({queryKey:["workers",e],queryFn:()=>lz(e),refetchInterval:3e3}),o=((h=a.data)==null?void 0:h.data)??[],[l,u]=T.useState(null);T.useEffect(()=>{if(o.length===0){u(null);return}const g=o[0].slot;u(m=>m!=null&&o.some(y=>y.slot===m)?m:t!=null&&o.some(y=>y.slot===t)?t:g)},[e,t,o.length]);const d=o.find(g=>g.slot===l)??null;return f.jsxs("div",{className:"flex flex-col h-full",children:[f.jsxs("div",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold truncate",children:e}),f.jsx(fo,{to:`/board?project=${encodeURIComponent(e)}`,className:"text-xs underline text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:r("workers.panel.boardLink")})]}),a.isLoading&&o.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:r("workers.panel.loading")}):o.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:r("workers.panel.empty.slots")}):f.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(g=>f.jsx(bz,{worker:g,active:g.slot===l,onClick:()=>u(g.slot)},g.slot))})]}),d?f.jsx(xz,{project:e,worker:d,onChange:n}):f.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:f.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:o.length===0?r("workers.panel.empty.noWorker"):r("workers.panel.empty.pickOne")})})]})}function bz({worker:e,active:t,onClick:n}){const r=Be();return f.jsxs("button",{type:"button",onClick:n,className:["nb-card p-2 text-left min-w-[130px] transition-transform",t?"ring-4 ring-[var(--color-text)]":"opacity-80 hover:opacity-100"].join(" "),children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx(Vb,{state:e.state}),f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs",children:["worker-",e.slot]})]}),e.card?f.jsxs("div",{className:"text-[11px] truncate font-[family-name:var(--font-mono)]",children:["#",e.card.seq," ",e.card.title]}):f.jsx("div",{className:"text-[11px] text-[var(--color-text-muted)] italic",children:r("workers.panel.idle.short")})]})}function xz({project:e,worker:t,onChange:n}){var y,b;const r=Be(),{confirm:a,alert:o}=Zn(),l=t.state==="crashed"||t.state==="stuck",u=tt({queryKey:["worker-detail",e,t.slot],queryFn:()=>cz(e,t.slot),refetchInterval:3e3}),d=((y=u.data)==null?void 0:y.recentOutput)??[],h=((b=u.data)==null?void 0:b.recentLogs)??[],g=T.useRef(null),m=T.useRef(!0);return T.useEffect(()=>{const E=g.current;E&&m.current&&(E.scrollTop=E.scrollHeight)},[d]),f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[t.card?f.jsxs("div",{children:[f.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1",children:r("workers.panel.section.currentCard")}),f.jsxs("div",{className:"text-sm font-semibold break-words",children:["#",t.card.seq," · ",t.card.title]})]}):f.jsx("div",{className:"text-sm text-[var(--color-text-muted)] italic",children:r("workers.panel.idle.full")}),f.jsxs("dl",{className:"grid grid-cols-[100px_1fr] gap-y-2 text-sm",children:[f.jsx("dt",{className:"font-bold",children:"Stage"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.stage??"—"}),f.jsx("dt",{className:"font-bold",children:"PID"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pid??"—"}),f.jsx("dt",{className:"font-bold",children:"Runtime"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:Yb(t.runtimeMs)}),f.jsx("dt",{className:"font-bold",children:"Started"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.startedAt?new Date(t.startedAt).toLocaleString():"—"}),f.jsx("dt",{className:"font-bold",children:"Marker"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.markerUpdatedAt?Qb(t.markerUpdatedAt):"—"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 flex items-center gap-1",children:[f.jsx(S_,{size:10,strokeWidth:2.5}),r("workers.panel.section.claudeOutput",{n:d.length})]}),u.isLoading&&d.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:r("workers.panel.output.loading")}):d.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:r("workers.panel.output.empty")}):f.jsx("pre",{ref:g,onScroll:E=>{const w=E.currentTarget;m.current=w.scrollHeight-w.scrollTop-w.clientHeight<24},className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-80 overflow-auto whitespace-pre-wrap break-words",children:d.map(E=>`${E.ts?`${E.ts} [${E.kind}] `:`[${E.kind}] `}${E.text}`).join(`
|
|
539
|
+
`)})]}),h.length>0&&f.jsxs("div",{children:[f.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 opacity-60",children:r("workers.panel.section.heartbeat",{n:h.length})}),f.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-40 overflow-auto whitespace-pre-wrap break-words opacity-80",children:h.map(E=>`${E.ts??""} [${E.level}] ${E.msg}`).join(`
|
|
540
|
+
`)}),f.jsx(fo,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:r("workers.panel.heartbeat.fullLog")})]})]}),f.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] flex gap-2 justify-end flex-wrap",children:[l&&t.card&&f.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:r("workers.panel.action.restart.confirm.title",{slot:t.slot}),body:r("workers.panel.action.restart.confirm.body",{seq:t.card.seq}),confirm:r("workers.panel.action.restart.confirm.button")})){try{await aE(e,t.slot)}catch{}try{await uz(e,t.slot,t.card.seq),n()}catch(w){o({title:r("workers.panel.action.restart.error"),body:w instanceof Error?w.message:String(w)})}}},children:[f.jsx(lL,{size:11,strokeWidth:2.5})," ",r("workers.panel.action.restart")]}),t.state!=="idle"&&f.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:r("workers.panel.action.kill.confirm.title",{slot:t.slot}),body:r("workers.panel.action.kill.confirm.body"),confirm:r("workers.panel.action.kill.confirm.button"),danger:!0}))try{await aE(e,t.slot),n()}catch(w){o({title:r("workers.panel.action.kill.error"),body:w instanceof Error?w.message:String(w)})}},children:[f.jsx(yL,{size:11,strokeWidth:2.5})," ",r("workers.panel.action.kill")]})]})]})}function vz(){var l;const e=Be(),t=wn(),[n,r]=T.useState(null),a=tt({queryKey:["workers-agg"],queryFn:oz,refetchInterval:5e3});T.useEffect(()=>{if(!a.data)return;const u=a.data.capacity.map(h=>h.project),d=[];for(const h of u){const g=new EventSource(`/stream/projects/${encodeURIComponent(h)}`),m=()=>{t.invalidateQueries({queryKey:["workers-agg"]})};g.addEventListener("worker.updated",m),g.addEventListener("worker.added",m),g.addEventListener("worker.deleted",m),g.addEventListener("card.updated",m),d.push(g)}return()=>{for(const h of d)h.close()}},[(l=a.data)==null?void 0:l.capacity.map(u=>u.project).join(","),t]);const o=T.useMemo(()=>{if(!a.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const u={projects:a.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const d of a.data.capacity)u.running+=d.running,u.starting+=d.starting,u.stuck+=d.stuck,u.crashed+=d.crashed,u.idle+=d.idle;return u},[a.data]);return f.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[f.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("workers.title")}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:e("workers.summary",{projects:o.projects,running:o.running,starting:o.starting,stuck:o.stuck,crashed:o.crashed,idle:o.idle})})]}),f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a.refetch(),disabled:a.isFetching,type:"button","aria-label":e("workers.refresh.aria"),children:[a.isFetching?f.jsx(pt,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(ps,{size:12,strokeWidth:2.5}),e("workers.refresh")]})]}),f.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[f.jsxs("div",{className:"flex flex-col gap-4 min-h-0 pr-2",children:[a.isLoading&&f.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:e("common.loading")}),a.isError&&f.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:f.jsx("p",{children:e("workers.error.load",{detail:a.error instanceof Error?a.error.message:String(a.error)})})}),a.data&&f.jsxs(f.Fragment,{children:[f.jsx(fz,{alerts:a.data.alerts,selected:n,onSelect:(u,d)=>r({project:u,slot:d})}),f.jsx(hz,{active:a.data.active,selected:n,onSelect:(u,d)=>r({project:u,slot:d})}),f.jsx(pz,{capacity:a.data.capacity,selected:n,onSelect:u=>r({project:u})})]})]}),f.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:n?f.jsx(yz,{project:n.project,initialSlot:n.slot,onChange:()=>t.invalidateQueries({queryKey:["workers-agg"]})}):f.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:f.jsxs("div",{children:[f.jsx(Mh,{size:32,className:"mx-auto mb-3 text-[var(--color-text-subtle)]",strokeWidth:2}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:e("workers.empty.hint")})]})})})]})]})}function wz(e){const t=new URLSearchParams;return e.project&&t.set("project",e.project),e.worker&&t.set("worker",e.worker),t.set("limit",String(e.limit)),e.since&&t.set("since",e.since),Mt(`/api/logs?${t}`)}function Ez(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const kz=["error","warn","info","debug"],Sz=["error","warn","info"];function _z(){var F,$;const e=Be(),[t,n]=d_(),r=t.get("project"),a=t.get("worker")??"",[o,l]=T.useState([]),[u,d]=T.useState(!1),[h,g]=T.useState(!0),[m,y]=T.useState(()=>new Set(Sz)),[b,E]=T.useState(""),[w,S]=T.useState("live"),[k,j]=T.useState(()=>{const U=new Date(Date.now()-36e5),q=Q=>String(Q).padStart(2,"0");return`${U.getFullYear()}-${q(U.getMonth()+1)}-${q(U.getDate())}T${q(U.getHours())}:${q(U.getMinutes())}`}),_=T.useRef(null),N=!r,O=tt({queryKey:["projects"],queryFn:pa}),{data:A,refetch:M}=tt({queryKey:["logs",r??"agg",a,w,w==="history"?k:"live"],queryFn:()=>wz({project:r||void 0,worker:a||void 0,limit:w==="history"?2e3:500,since:w==="history"?new Date(k).toISOString():void 0}),refetchInterval:N&&w==="live"?5e3:!1});T.useEffect(()=>{A!=null&&A.data&&l(A.data)},[A]),T.useEffect(()=>{if(!r||w!=="live")return;const U=Ez({project:r,worker:a||void 0}),q=new EventSource(U);return q.addEventListener("log.line",Q=>{if(!u)try{const B=JSON.parse(Q.data);l(H=>{const z=[...H,B];return z.length>5e3&&z.splice(0,z.length-5e3),z})}catch{}}),()=>q.close()},[r,a,u,w]),T.useEffect(()=>{if(!h)return;const U=_.current;U&&(U.scrollTop=U.scrollHeight)},[o,h]);const I=T.useMemo(()=>{const U=b.toLowerCase();return o.filter(q=>!(!m.has(q.level)||U&&!q.msg.toLowerCase().includes(U)))},[o,m,b]);return f.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[f.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("logs.title")}),f.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[N?e("logs.subtitle.allProjectsCount",{count:((F=O.data)==null?void 0:F.data.length)??0}):r,a&&` · worker-${a}`," · ",N&&w==="live"?e("logs.poll.5s"):"tail -f"," · ",o.length," lines",u&&f.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:e("logs.paused")})]})]})}),f.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[f.jsxs("button",{type:"button",onClick:()=>S("live"),"aria-pressed":w==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",w==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[f.jsx(v_,{size:11,strokeWidth:2.5}),e("logs.mode.live")]}),f.jsxs("button",{type:"button",onClick:()=>S("history"),"aria-pressed":w==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",w==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[f.jsx(wR,{size:11,strokeWidth:2.5}),e("logs.mode.history")]})]}),w==="history"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:k,onChange:U=>j(U.target.value),"aria-label":e("logs.history.startAria")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>M(),type:"button","aria-label":e("logs.history.queryAria"),children:[f.jsx(ah,{size:11,strokeWidth:3}),e("logs.history.query")]})]}),f.jsxs("div",{className:"relative",children:[f.jsx(mu,{size:14,strokeWidth:2.5,className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"}),f.jsxs("select",{className:"nb-input appearance-none pl-9 pr-9 font-[family-name:var(--font-mono)] cursor-pointer",style:{padding:"10px 36px 10px 36px",fontSize:13,minWidth:180},value:r??"",onChange:U=>{const q=U.target.value;n(q?{project:q}:{})},"aria-label":e("logs.filter.project.aria"),children:[f.jsx("option",{value:"",children:e("logs.filter.project.all")}),jb((($=O.data)==null?void 0:$.data)??[],"activity").map(U=>f.jsx("option",{value:U.name,children:U.name},U.name))]}),f.jsx(Bu,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),f.jsxs("div",{className:"relative flex-1 max-w-md",children:[f.jsx(ah,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),f.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("logs.filter.keyword.placeholder"),value:b,onChange:U=>E(U.target.value),"aria-label":e("logs.filter.keyword.aria")})]}),f.jsx("div",{className:"flex items-center gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:kz.map(U=>f.jsx(Nz,{level:U,enabled:m.has(U),onToggle:()=>{y(q=>{const Q=new Set(q);return Q.has(U)?Q.delete(U):Q.add(U),Q})}},U))}),f.jsxs("div",{className:"ml-auto flex gap-2",children:[w==="live"&&f.jsxs(f.Fragment,{children:[f.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>g(U=>!U),type:"button",children:h?"✓ Auto-scroll":"Auto-scroll"}),f.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>d(U=>!U),type:"button",children:u?f.jsxs(f.Fragment,{children:[f.jsx(Fu,{size:12,strokeWidth:3})," Resume"]}):f.jsxs(f.Fragment,{children:[f.jsx(PR,{size:12,strokeWidth:3})," Pause"]})})]}),f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const U=new Blob([I.map(B=>B.raw).join(`
|
|
541
|
+
`)],{type:"text/plain"}),q=URL.createObjectURL(U),Q=document.createElement("a");Q.href=q,Q.download=`${r}-log-${Date.now()}.log`,Q.click(),URL.revokeObjectURL(q)},type:"button",children:[f.jsx(y_,{size:12,strokeWidth:2.5})," Export"]})]})]}),f.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[f.jsxs("div",{className:"px-4 py-2 bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)] flex items-center justify-between font-[family-name:var(--font-mono)] text-xs",children:[f.jsx("span",{className:"text-[var(--color-text-muted)]",children:(A==null?void 0:A.file)??"~/.coral/projects/.../logs/*.log"}),w==="live"?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):f.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),f.jsxs("div",{ref:_,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:U=>{const q=U.currentTarget;!(q.scrollHeight-q.scrollTop-q.clientHeight<40)&&h&&g(!1)},children:[I.map((U,q)=>f.jsx(Cz,{line:U},q)),I.length===0&&f.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:e("logs.empty.match")})]})]})]})}function Nz({level:e,enabled:t,onToggle:n}){const r={error:"var(--color-crashed-bg)",warn:"var(--color-stuck-bg)",info:"var(--color-secondary)",debug:"var(--color-accent-purple)"},a={error:"var(--color-crashed)",warn:"var(--color-stuck)",info:"var(--color-text)",debug:"var(--color-text)"};return f.jsx("button",{type:"button",onClick:n,"aria-pressed":t,className:["px-3 py-0.5 rounded-full font-[family-name:var(--font-mono)] text-[10px] font-bold tracking-widest cursor-pointer",t?"border-[1.5px] border-[var(--color-text)]":"text-[var(--color-text-subtle)]"].join(" "),style:t?{background:r[e],color:a[e]}:{},children:e.toUpperCase()})}function Cz({line:e}){var r;const t={error:"bg-[var(--color-crashed)] text-[var(--color-text)]",warn:"bg-[var(--color-stuck)] text-[var(--color-text)]",info:"bg-[var(--color-secondary)] text-[var(--color-text)]",debug:"",trace:""},n=!!e.project;return f.jsxs("div",{className:["grid gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",n?"grid-cols-[100px_90px_60px_1fr]":"grid-cols-[100px_60px_1fr]"].join(" "),children:[f.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((r=e.ts.split("T")[1])==null?void 0:r.replace("Z",""))??e.ts:"--"}),n&&f.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),f.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),f.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function jz(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Az=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tz=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mz={};function sE(e,t){return(Mz.jsx?Tz:Az).test(e)}const Oz=/[ \t\n\f\r]/g;function Dz(e){return typeof e=="object"?e.type==="text"?oE(e.value):!1:oE(e)}function oE(e){return e.replace(Oz,"")===""}class Gu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Gu.prototype.normal={};Gu.prototype.property={};Gu.prototype.space=void 0;function IN(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Gu(n,r,t)}function Py(e){return e.toLowerCase()}class dr{constructor(t,n){this.attribute=n,this.property=t}}dr.prototype.attribute="";dr.prototype.booleanish=!1;dr.prototype.boolean=!1;dr.prototype.commaOrSpaceSeparated=!1;dr.prototype.commaSeparated=!1;dr.prototype.defined=!1;dr.prototype.mustUseProperty=!1;dr.prototype.number=!1;dr.prototype.overloadedBoolean=!1;dr.prototype.property="";dr.prototype.spaceSeparated=!1;dr.prototype.space=void 0;let Rz=0;const Je=go(),pn=go(),By=go(),ve=go(),zt=go(),gl=go(),vr=go();function go(){return 2**++Rz}const Uy=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:pn,commaOrSpaceSeparated:vr,commaSeparated:gl,number:ve,overloadedBoolean:By,spaceSeparated:zt},Symbol.toStringTag,{value:"Module"})),Ag=Object.keys(Uy);class Wb extends dr{constructor(t,n,r,a){let o=-1;if(super(t,n),lE(this,"space",a),typeof r=="number")for(;++o<Ag.length;){const l=Ag[o];lE(this,Ag[o],(r&Uy[l])===Uy[l])}}}Wb.prototype.defined=!0;function lE(e,t,n){n&&(e[t]=n)}function Zl(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new Wb(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Py(r)]=r,n[Py(o.attribute)]=r}return new Gu(t,n,e.space)}const zN=Zl({properties:{ariaActiveDescendant:null,ariaAtomic:pn,ariaAutoComplete:null,ariaBusy:pn,ariaChecked:pn,ariaColCount:ve,ariaColIndex:ve,ariaColSpan:ve,ariaControls:zt,ariaCurrent:null,ariaDescribedBy:zt,ariaDetails:null,ariaDisabled:pn,ariaDropEffect:zt,ariaErrorMessage:null,ariaExpanded:pn,ariaFlowTo:zt,ariaGrabbed:pn,ariaHasPopup:null,ariaHidden:pn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:zt,ariaLevel:ve,ariaLive:null,ariaModal:pn,ariaMultiLine:pn,ariaMultiSelectable:pn,ariaOrientation:null,ariaOwns:zt,ariaPlaceholder:null,ariaPosInSet:ve,ariaPressed:pn,ariaReadOnly:pn,ariaRelevant:null,ariaRequired:pn,ariaRoleDescription:zt,ariaRowCount:ve,ariaRowIndex:ve,ariaRowSpan:ve,ariaSelected:pn,ariaSetSize:ve,ariaSort:null,ariaValueMax:ve,ariaValueMin:ve,ariaValueNow:ve,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function PN(e,t){return t in e?e[t]:t}function BN(e,t){return PN(e,t.toLowerCase())}const Lz=Zl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gl,acceptCharset:zt,accessKey:zt,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:zt,autoFocus:Je,autoPlay:Je,blocking:zt,capture:null,charSet:null,checked:Je,cite:null,className:zt,cols:ve,colSpan:null,content:null,contentEditable:pn,controls:Je,controlsList:zt,coords:ve|gl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:By,draggable:pn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:zt,height:ve,hidden:By,high:ve,href:null,hrefLang:null,htmlFor:zt,httpEquiv:zt,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:zt,itemRef:zt,itemScope:Je,itemType:zt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Je,low:ve,manifest:null,max:null,maxLength:ve,media:null,method:null,min:null,minLength:ve,multiple:Je,muted:Je,name:null,nonce:null,noModule:Je,noValidate:Je,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:Je,optimum:ve,pattern:null,ping:zt,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:zt,required:Je,reversed:Je,rows:ve,rowSpan:ve,sandbox:zt,scope:null,scoped:Je,seamless:Je,selected:Je,shadowRootClonable:Je,shadowRootDelegatesFocus:Je,shadowRootMode:null,shape:null,size:ve,sizes:null,slot:null,span:ve,spellCheck:pn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ve,step:null,style:null,tabIndex:ve,target:null,title:null,translate:null,type:null,typeMustMatch:Je,useMap:null,value:pn,width:ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:zt,axis:null,background:null,bgColor:null,border:ve,borderColor:null,bottomMargin:ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Je,declare:Je,event:null,face:null,frame:null,frameBorder:null,hSpace:ve,leftMargin:ve,link:null,longDesc:null,lowSrc:null,marginHeight:ve,marginWidth:ve,noResize:Je,noHref:Je,noShade:Je,noWrap:Je,object:null,profile:null,prompt:null,rev:null,rightMargin:ve,rules:null,scheme:null,scrolling:pn,standby:null,summary:null,text:null,topMargin:ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ve,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Je,disableRemotePlayback:Je,prefix:null,property:null,results:ve,security:null,unselectable:null},space:"html",transform:BN}),Iz=Zl({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:vr,accentHeight:ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ve,amplitude:ve,arabicForm:null,ascent:ve,attributeName:null,attributeType:null,azimuth:ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ve,by:null,calcMode:null,capHeight:ve,className:zt,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:ve,diffuseConstant:ve,direction:null,display:null,dur:null,divisor:ve,dominantBaseline:null,download:Je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ve,enableBackground:null,end:null,event:null,exponent:ve,externalResourcesRequired:null,fill:null,fillOpacity:ve,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:gl,g2:gl,glyphName:gl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ve,horizOriginX:ve,horizOriginY:ve,id:null,ideographic:ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ve,k:ve,k1:ve,k2:ve,k3:ve,k4:ve,kernelMatrix:vr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ve,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:ve,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:ve,overlineThickness:ve,paintOrder:null,panose1:null,path:null,pathLength:ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:zt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ve,pointsAtY:ve,pointsAtZ:ve,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vr,rev:vr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vr,requiredFeatures:vr,requiredFonts:vr,requiredFormats:vr,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:ve,specularExponent:ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ve,strikethroughThickness:ve,string:null,stroke:null,strokeDashArray:vr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ve,strokeOpacity:ve,strokeWidth:null,style:null,surfaceScale:ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vr,tabIndex:ve,tableValues:null,target:null,targetX:ve,targetY:ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ve,underlineThickness:ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ve,values:null,vAlphabetic:ve,vMathematical:ve,vectorEffect:null,vHanging:ve,vIdeographic:ve,version:null,vertAdvY:ve,vertOriginX:ve,vertOriginY:ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:PN}),UN=Zl({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()}}),$N=Zl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:BN}),FN=Zl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zz={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"},Pz=/[A-Z]/g,cE=/-[a-z]/g,Bz=/^data[-\w.:]+$/i;function Uz(e,t){const n=Py(t);let r=t,a=dr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Bz.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(cE,Fz);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!cE.test(o)){let l=o.replace(Pz,$z);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=Wb}return new a(r,t)}function $z(e){return"-"+e.toLowerCase()}function Fz(e){return e.charAt(1).toUpperCase()}const Hz=IN([zN,Lz,UN,$N,FN],"html"),Xb=IN([zN,Iz,UN,$N,FN],"svg");function qz(e){return e.join(" ").trim()}var tl={},Tg,uE;function Kz(){if(uE)return Tg;uE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
|
|
542
|
+
`,h="/",g="*",m="",y="comment",b="declaration";function E(S,k){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];k=k||{};var j=1,_=1;function N(B){var H=B.match(t);H&&(j+=H.length);var z=B.lastIndexOf(d);_=~z?B.length-z:_+B.length}function O(){var B={line:j,column:_};return function(H){return H.position=new A(B),F(),H}}function A(B){this.start=B,this.end={line:j,column:_},this.source=k.source}A.prototype.content=S;function M(B){var H=new Error(k.source+":"+j+":"+_+": "+B);if(H.reason=B,H.filename=k.source,H.line=j,H.column=_,H.source=S,!k.silent)throw H}function I(B){var H=B.exec(S);if(H){var z=H[0];return N(z),S=S.slice(z.length),H}}function F(){I(n)}function $(B){var H;for(B=B||[];H=U();)H!==!1&&B.push(H);return B}function U(){var B=O();if(!(h!=S.charAt(0)||g!=S.charAt(1))){for(var H=2;m!=S.charAt(H)&&(g!=S.charAt(H)||h!=S.charAt(H+1));)++H;if(H+=2,m===S.charAt(H-1))return M("End of comment missing");var z=S.slice(2,H-2);return _+=2,N(z),S=S.slice(H),_+=2,B({type:y,comment:z})}}function q(){var B=O(),H=I(r);if(H){if(U(),!I(a))return M("property missing ':'");var z=I(o),Y=B({type:b,property:w(H[0].replace(e,m)),value:z?w(z[0].replace(e,m)):m});return I(l),Y}}function Q(){var B=[];$(B);for(var H;H=q();)H!==!1&&(B.push(H),$(B));return B}return F(),Q()}function w(S){return S?S.replace(u,m):m}return Tg=E,Tg}var dE;function Gz(){if(dE)return tl;dE=1;var e=tl&&tl.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tl,"__esModule",{value:!0}),tl.default=n;const t=e(Kz());function n(r,a){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),u=typeof a=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:g}=d;u?a(h,g,d):g&&(o=o||{},o[h]=g)}),o}return tl}var Vc={},fE;function Vz(){if(fE)return Vc;fE=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},l=function(h,g){return g.toUpperCase()},u=function(h,g){return"".concat(g,"-")},d=function(h,g){return g===void 0&&(g={}),o(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(a,u):h=h.replace(r,u),h.replace(t,l))};return Vc.camelCase=d,Vc}var Yc,hE;function Yz(){if(hE)return Yc;hE=1;var e=Yc&&Yc.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Gz()),n=Vz();function r(a,o){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(u,d){u&&d&&(l[(0,n.camelCase)(u,o)]=d)}),l}return r.default=r,Yc=r,Yc}var Qz=Yz();const Wz=Lu(Qz),HN=qN("end"),Zb=qN("start");function qN(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Xz(e){const t=Zb(e),n=HN(e);if(t&&n)return{start:t,end:n}}function au(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?pE(e.position):"start"in e||"end"in e?pE(e):"line"in e||"column"in e?$y(e):""}function $y(e){return mE(e&&e.line)+":"+mE(e&&e.column)}function pE(e){return $y(e&&e.start)+"-"+$y(e&&e.end)}function mE(e){return e&&typeof e=="number"?e:1}class Hn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?a=t:!o.cause&&t&&(l=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=u?u.line:void 0,this.name=au(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Hn.prototype.file="";Hn.prototype.name="";Hn.prototype.reason="";Hn.prototype.message="";Hn.prototype.stack="";Hn.prototype.column=void 0;Hn.prototype.line=void 0;Hn.prototype.ancestors=void 0;Hn.prototype.cause=void 0;Hn.prototype.fatal=void 0;Hn.prototype.place=void 0;Hn.prototype.ruleId=void 0;Hn.prototype.source=void 0;const Jb={}.hasOwnProperty,Zz=new Map,Jz=/[A-Z]/g,e4=new Set(["table","tbody","thead","tfoot","tr"]),t4=new Set(["td","th"]),KN="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function n4(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=u4(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=c4(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Xb:Hz,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=GN(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function GN(e,t,n){if(t.type==="element")return r4(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return i4(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return s4(e,t,n);if(t.type==="mdxjsEsm")return a4(e,t);if(t.type==="root")return o4(e,t,n);if(t.type==="text")return l4(e,t)}function r4(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=Xb,e.schema=a),e.ancestors.push(t);const o=YN(e,t.tagName,!1),l=d4(e,t);let u=tx(e,t);return e4.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!Dz(d):!0})),VN(e,l,o,t),ex(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function i4(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}xu(e,t.position)}function a4(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xu(e,t.position)}function s4(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=Xb,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:YN(e,t.name,!0),l=f4(e,t),u=tx(e,t);return VN(e,l,o,t),ex(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function o4(e,t,n){const r={};return ex(r,tx(e,t)),e.create(t,e.Fragment,r,n)}function l4(e,t){return t.value}function VN(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ex(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function c4(e,t,n){return r;function r(a,o,l,u){const h=Array.isArray(l.children)?n:t;return u?h(o,l,u):h(o,l)}}function u4(e,t){return n;function n(r,a,o,l){const u=Array.isArray(o.children),d=Zb(r);return t(a,o,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function d4(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Jb.call(t.properties,a)){const o=h4(e,a,t.properties[a]);if(o){const[l,u]=o;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&t4.has(t.tagName)?r=u:n[l]=u}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function f4(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else xu(e,t.position);else{const a=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else xu(e,t.position);else o=r.value===null?!0:r.value;n[a]=o}return n}function tx(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Zz;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=a.get(d)||0;l=d+"-"+h,a.set(d,h+1)}}const u=GN(e,o,l);u!==void 0&&n.push(u)}return n}function h4(e,t,n){const r=Uz(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?jz(n):qz(n)),r.property==="style"){let a=typeof n=="object"?n:p4(e,String(n));return e.stylePropertyNameCase==="css"&&(a=m4(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?zz[r.property]||r.property:r.attribute,n]}}function p4(e,t){try{return Wz(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=KN+"#cannot-parse-style-attribute",a}}function YN(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,l;for(;++o<a.length;){const u=sE(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}r=l}else r=sE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Jb.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);xu(e)}function xu(e,t){const n=new Hn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=KN+"#cannot-handle-mdx-estrees-without-createevaluater",n}function m4(e){const t={};let n;for(n in e)Jb.call(e,n)&&(t[g4(n)]=e[n]);return t}function g4(e){let t=e.replace(Jz,y4);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function y4(e){return"-"+e.toLowerCase()}const Mg={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"]},b4={};function nx(e,t){const n=b4,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return QN(e,r,a)}function QN(e,t,n){if(x4(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return gE(e.children,t,n)}return Array.isArray(e)?gE(e,t,n):""}function gE(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=QN(e[a],t,n);return r.join("")}function x4(e){return!!(e&&typeof e=="object")}const yE=document.createElement("i");function rx(e){const t="&"+e+";";yE.innerHTML=t;const n=yE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Sr(e,t,n,r){const a=e.length;let o=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function Fr(e,t){return e.length>0?(Sr(e,e.length,0,t),e):t}const bE={}.hasOwnProperty;function WN(e){const t={};let n=-1;for(;++n<e.length;)v4(t,e[n]);return t}function v4(e,t){let n;for(n in t){const a=(bE.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){bE.call(a,l)||(a[l]=[]);const u=o[l];w4(a[l],Array.isArray(u)?u:u?[u]:[])}}}function w4(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Sr(e,0,0,r)}function XN(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function di(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xn=bs(/[A-Za-z]/),$n=bs(/[\dA-Za-z]/),E4=bs(/[#-'*+\--9=?A-Z^-~]/);function uh(e){return e!==null&&(e<32||e===127)}const Fy=bs(/\d/),k4=bs(/[\dA-Fa-f]/),S4=bs(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function Rt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const Kh=bs(new RegExp("\\p{P}|\\p{S}","u")),ao=bs(/\s/);function bs(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Jl(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&$n(e.charCodeAt(n+1))&&$n(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(l=String.fromCharCode(o,u),a=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function dt(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(d){return it(d)?(e.enter(n),u(d)):t(d)}function u(d){return it(d)&&o++<a?(e.consume(d),u):(e.exit(n),t(d))}}const _4={tokenize:N4};function N4(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),dt(e,t,"linePrefix")}function a(u){return e.enter("paragraph"),o(u)}function o(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Ue(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),l)}}const C4={tokenize:j4},xE={tokenize:A4};function j4(e){const t=this,n=[];let r=0,a,o,l;return u;function u(_){if(r<n.length){const N=n[r];return t.containerState=N[1],e.attempt(N[0].continuation,d,h)(_)}return h(_)}function d(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&j();const N=t.events.length;let O=N,A;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){A=t.events[O][1].end;break}k(r);let M=N;for(;M<t.events.length;)t.events[M][1].end={...A},M++;return Sr(t.events,O+1,0,t.events.slice(N)),t.events.length=M,h(_)}return u(_)}function h(_){if(r===n.length){if(!a)return y(_);if(a.currentConstruct&&a.currentConstruct.concrete)return E(_);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xE,g,m)(_)}function g(_){return a&&j(),k(r),y(_)}function m(_){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,E(_)}function y(_){return t.containerState={},e.attempt(xE,b,E)(_)}function b(_){return r++,n.push([t.currentConstruct,t.containerState]),y(_)}function E(_){if(_===null){a&&j(),k(0),e.consume(_);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),w(_)}function w(_){if(_===null){S(e.exit("chunkFlow"),!0),k(0),e.consume(_);return}return Ue(_)?(e.consume(_),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(_),w)}function S(_,N){const O=t.sliceStream(_);if(N&&O.push(null),_.previous=o,o&&(o.next=_),o=_,a.defineSkip(_.start),a.write(O),t.parser.lazy[_.start.line]){let A=a.events.length;for(;A--;)if(a.events[A][1].start.offset<l&&(!a.events[A][1].end||a.events[A][1].end.offset>l))return;const M=t.events.length;let I=M,F,$;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(F){$=t.events[I][1].end;break}F=!0}for(k(r),A=M;A<t.events.length;)t.events[A][1].end={...$},A++;Sr(t.events,I+1,0,t.events.slice(M)),t.events.length=A}}function k(_){let N=n.length;for(;N-- >_;){const O=n[N];t.containerState=O[1],O[0].exit.call(t,e)}n.length=_}function j(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function A4(e,t,n){return dt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dl(e){if(e===null||Rt(e)||ao(e))return 1;if(Kh(e))return 2}function Gh(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Hy={name:"attention",resolveAll:T4,tokenize:M4};function T4(e,t){let n=-1,r,a,o,l,u,d,h,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},y={...e[n][1].start};vE(m,-d),vE(y,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Fr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Fr(h,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=Fr(h,Gh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Fr(h,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,h=Fr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,Sr(e,r-1,n-r+3,h),n=r+h.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function M4(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Dl(r);let o;return l;function l(d){return o=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===o)return e.consume(d),u;const h=e.exit("attentionSequence"),g=Dl(d),m=!g||g===2&&a||n.includes(d),y=!a||a===2&&g||n.includes(r);return h._open=!!(o===42?m:m&&(a||!y)),h._close=!!(o===42?y:y&&(g||!m)),t(d)}}function vE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const O4={name:"autolink",tokenize:D4};function D4(e,t,n){let r=0;return a;function a(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(b){return Xn(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||$n(b)?(r=1,u(b)):h(b)}function u(b){return b===58?(e.consume(b),r=0,d):(b===43||b===45||b===46||$n(b))&&r++<32?(e.consume(b),u):(r=0,h(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||uh(b)?n(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),g):E4(b)?(e.consume(b),h):n(b)}function g(b){return $n(b)?m(b):n(b)}function m(b){return b===46?(e.consume(b),r=0,g):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):y(b)}function y(b){if((b===45||$n(b))&&r++<63){const E=b===45?y:m;return e.consume(b),E}return n(b)}}const Vu={partial:!0,tokenize:R4};function R4(e,t,n){return r;function r(o){return it(o)?dt(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||Ue(o)?t(o):n(o)}}const ZN={continuation:{tokenize:I4},exit:z4,name:"blockQuote",tokenize:L4};function L4(e,t,n){const r=this;return a;function a(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return it(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function I4(e,t,n){const r=this;return a;function a(l){return it(l)?dt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(ZN,t,n)(l)}}function z4(e){e.exit("blockQuote")}const JN={name:"characterEscape",tokenize:P4};function P4(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return S4(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const e2={name:"characterReference",tokenize:B4};function B4(e,t,n){const r=this;let a=0,o,l;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=$n,g(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=k4,g):(e.enter("characterReferenceValue"),o=7,l=Fy,g(m))}function g(m){if(m===59&&a){const y=e.exit("characterReferenceValue");return l===$n&&!rx(r.sliceSerialize(y))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&a++<o?(e.consume(m),g):n(m)}}const wE={partial:!0,tokenize:$4},EE={concrete:!0,name:"codeFenced",tokenize:U4};function U4(e,t,n){const r=this,a={partial:!0,tokenize:O};let o=0,l=0,u;return d;function d(A){return h(A)}function h(A){const M=r.events[r.events.length-1];return o=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,u=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(A)}function g(A){return A===u?(l++,e.consume(A),g):l<3?n(A):(e.exit("codeFencedFenceSequence"),it(A)?dt(e,m,"whitespace")(A):m(A))}function m(A){return A===null||Ue(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(wE,w,N)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===null||Ue(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):it(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),dt(e,b,"whitespace")(A)):A===96&&A===u?n(A):(e.consume(A),y)}function b(A){return A===null||Ue(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(A))}function E(A){return A===null||Ue(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===u?n(A):(e.consume(A),E)}function w(A){return e.attempt(a,N,S)(A)}function S(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),k}function k(A){return o>0&&it(A)?dt(e,j,"linePrefix",o+1)(A):j(A)}function j(A){return A===null||Ue(A)?e.check(wE,w,N)(A):(e.enter("codeFlowValue"),_(A))}function _(A){return A===null||Ue(A)?(e.exit("codeFlowValue"),j(A)):(e.consume(A),_)}function N(A){return e.exit("codeFenced"),t(A)}function O(A,M,I){let F=0;return $;function $(H){return A.enter("lineEnding"),A.consume(H),A.exit("lineEnding"),U}function U(H){return A.enter("codeFencedFence"),it(H)?dt(A,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):q(H)}function q(H){return H===u?(A.enter("codeFencedFenceSequence"),Q(H)):I(H)}function Q(H){return H===u?(F++,A.consume(H),Q):F>=l?(A.exit("codeFencedFenceSequence"),it(H)?dt(A,B,"whitespace")(H):B(H)):I(H)}function B(H){return H===null||Ue(H)?(A.exit("codeFencedFence"),M(H)):I(H)}}}function $4(e,t,n){const r=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Og={name:"codeIndented",tokenize:H4},F4={partial:!0,tokenize:q4};function H4(e,t,n){const r=this;return a;function a(h){return e.enter("codeIndented"),dt(e,o,"linePrefix",5)(h)}function o(h){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Ue(h)?e.attempt(F4,l,d)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||Ue(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),u)}function d(h){return e.exit("codeIndented"),t(h)}}function q4(e,t,n){const r=this;return a;function a(l){return r.parser.lazy[r.now().line]?n(l):Ue(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):dt(e,o,"linePrefix",5)(l)}function o(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):Ue(l)?a(l):n(l)}}const K4={name:"codeText",previous:V4,resolve:G4,tokenize:Y4};function G4(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function V4(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Y4(e,t,n){let r=0,a,o;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),r++,u):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(o=e.enter("codeTextSequence"),a=0,g(m)):Ue(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Ue(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function g(m){return m===96?(e.consume(m),a++,g):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class Q4{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Qc(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Qc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Qc(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Qc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Qc(this.left,n.reverse())}}}function Qc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function t2(e){const t={};let n=-1,r,a,o,l,u,d,h;const g=new Q4(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(r=g.get(n),n&&r[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,W4(g,n)),n=t[n],h=!0);else if(r[1]._container){for(o=n,a=void 0;o--;)if(l=g.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(g.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(r[1].end={...g.get(a)[1].start},u=g.slice(a,n),u.unshift(r),g.splice(a,n-a+1,u))}}return Sr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function W4(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],h={};let g,m,y=-1,b=n,E=0,w=0;const S=[w];for(;b;){for(;e.get(++a)[1]!==b;);o.push(a),b._tokenizer||(g=r.sliceStream(b),b.next||g.push(null),m&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(g),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=b,b=b.next}for(b=n;++y<u.length;)u[y][0]==="exit"&&u[y-1][0]==="enter"&&u[y][1].type===u[y-1][1].type&&u[y][1].start.line!==u[y][1].end.line&&(w=y+1,S.push(w),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):S.pop(),y=S.length;y--;){const k=u.slice(S[y],S[y+1]),j=o.pop();d.push([j,j+k.length-1]),e.splice(j,2,k)}for(d.reverse(),y=-1;++y<d.length;)h[E+d[y][0]]=E+d[y][1],E+=d[y][1]-d[y][0]-1;return h}const X4={resolve:J4,tokenize:eP},Z4={partial:!0,tokenize:tP};function J4(e){return t2(e),e}function eP(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(u)}function a(u){return u===null?o(u):Ue(u)?e.check(Z4,l,o)(u):(e.consume(u),a)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function tP(e,t,n){const r=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),dt(e,o,"linePrefix")}function o(l){if(l===null||Ue(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function n2(e,t,n,r,a,o,l,u,d){const h=d||Number.POSITIVE_INFINITY;let g=0;return m;function m(k){return k===60?(e.enter(r),e.enter(a),e.enter(o),e.consume(k),e.exit(o),y):k===null||k===32||k===41||uh(k)?n(k):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),w(k))}function y(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===62?(e.exit("chunkString"),e.exit(u),y(k)):k===null||k===60||Ue(k)?n(k):(e.consume(k),k===92?E:b)}function E(k){return k===60||k===62||k===92?(e.consume(k),b):b(k)}function w(k){return!g&&(k===null||k===41||Rt(k))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(k)):g<h&&k===40?(e.consume(k),g++,w):k===41?(e.consume(k),g--,w):k===null||k===32||k===40||uh(k)?n(k):(e.consume(k),k===92?S:w)}function S(k){return k===40||k===41||k===92?(e.consume(k),w):w(k)}}function r2(e,t,n,r,a,o){const l=this;let u=0,d;return h;function h(b){return e.enter(r),e.enter(a),e.consume(b),e.exit(a),e.enter(o),g}function g(b){return u>999||b===null||b===91||b===93&&!d||b===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(o),e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):Ue(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||b===91||b===93||Ue(b)||u++>999?(e.exit("chunkString"),g(b)):(e.consume(b),d||(d=!it(b)),b===92?y:m)}function y(b){return b===91||b===92||b===93?(e.consume(b),u++,m):m(b)}}function i2(e,t,n,r,a,o){let l;return u;function u(y){return y===34||y===39||y===40?(e.enter(r),e.enter(a),e.consume(y),e.exit(a),l=y===40?41:y,d):n(y)}function d(y){return y===l?(e.enter(a),e.consume(y),e.exit(a),e.exit(r),t):(e.enter(o),h(y))}function h(y){return y===l?(e.exit(o),d(l)):y===null?n(y):Ue(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),dt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===l||y===null||Ue(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?m:g)}function m(y){return y===l||y===92?(e.consume(y),g):g(y)}}function su(e,t){let n;return r;function r(a){return Ue(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):it(a)?dt(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const nP={name:"definition",tokenize:iP},rP={partial:!0,tokenize:aP};function iP(e,t,n){const r=this;let a;return o;function o(b){return e.enter("definition"),l(b)}function l(b){return r2.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function u(b){return a=di(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return Rt(b)?su(e,h)(b):h(b)}function h(b){return n2(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return e.attempt(rP,m,m)(b)}function m(b){return it(b)?dt(e,y,"whitespace")(b):y(b)}function y(b){return b===null||Ue(b)?(e.exit("definition"),r.parser.defined.push(a),t(b)):n(b)}}function aP(e,t,n){return r;function r(u){return Rt(u)?su(e,a)(u):n(u)}function a(u){return i2(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return it(u)?dt(e,l,"whitespace")(u):l(u)}function l(u){return u===null||Ue(u)?t(u):n(u)}}const sP={name:"hardBreakEscape",tokenize:oP};function oP(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return Ue(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const lP={name:"headingAtx",resolve:cP,tokenize:uP};function cP(e,t){let n=e.length-2,r=3,a,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Sr(e,r,n-r+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]])),e}function uP(e,t,n){let r=0;return a;function a(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),l(g)}function l(g){return g===35&&r++<6?(e.consume(g),l):g===null||Rt(g)?(e.exit("atxHeadingSequence"),u(g)):n(g)}function u(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||Ue(g)?(e.exit("atxHeading"),t(g)):it(g)?dt(e,u,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),u(g))}function h(g){return g===null||g===35||Rt(g)?(e.exit("atxHeadingText"),u(g)):(e.consume(g),h)}}const dP=["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"],kE=["pre","script","style","textarea"],fP={concrete:!0,name:"htmlFlow",resolveTo:mP,tokenize:gP},hP={partial:!0,tokenize:bP},pP={partial:!0,tokenize:yP};function mP(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 gP(e,t,n){const r=this;let a,o,l,u,d;return h;function h(R){return g(R)}function g(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),y):R===47?(e.consume(R),o=!0,w):R===63?(e.consume(R),a=3,r.interrupt?t:D):Xn(R)?(e.consume(R),l=String.fromCharCode(R),S):n(R)}function y(R){return R===45?(e.consume(R),a=2,b):R===91?(e.consume(R),a=5,u=0,E):Xn(R)?(e.consume(R),a=4,r.interrupt?t:D):n(R)}function b(R){return R===45?(e.consume(R),r.interrupt?t:D):n(R)}function E(R){const oe="CDATA[";return R===oe.charCodeAt(u++)?(e.consume(R),u===oe.length?r.interrupt?t:q:E):n(R)}function w(R){return Xn(R)?(e.consume(R),l=String.fromCharCode(R),S):n(R)}function S(R){if(R===null||R===47||R===62||Rt(R)){const oe=R===47,ge=l.toLowerCase();return!oe&&!o&&kE.includes(ge)?(a=1,r.interrupt?t(R):q(R)):dP.includes(l.toLowerCase())?(a=6,oe?(e.consume(R),k):r.interrupt?t(R):q(R)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):o?j(R):_(R))}return R===45||$n(R)?(e.consume(R),l+=String.fromCharCode(R),S):n(R)}function k(R){return R===62?(e.consume(R),r.interrupt?t:q):n(R)}function j(R){return it(R)?(e.consume(R),j):$(R)}function _(R){return R===47?(e.consume(R),$):R===58||R===95||Xn(R)?(e.consume(R),N):it(R)?(e.consume(R),_):$(R)}function N(R){return R===45||R===46||R===58||R===95||$n(R)?(e.consume(R),N):O(R)}function O(R){return R===61?(e.consume(R),A):it(R)?(e.consume(R),O):_(R)}function A(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),d=R,M):it(R)?(e.consume(R),A):I(R)}function M(R){return R===d?(e.consume(R),d=null,F):R===null||Ue(R)?n(R):(e.consume(R),M)}function I(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Rt(R)?O(R):(e.consume(R),I)}function F(R){return R===47||R===62||it(R)?_(R):n(R)}function $(R){return R===62?(e.consume(R),U):n(R)}function U(R){return R===null||Ue(R)?q(R):it(R)?(e.consume(R),U):n(R)}function q(R){return R===45&&a===2?(e.consume(R),z):R===60&&a===1?(e.consume(R),Y):R===62&&a===4?(e.consume(R),L):R===63&&a===3?(e.consume(R),D):R===93&&a===5?(e.consume(R),K):Ue(R)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(hP,V,Q)(R)):R===null||Ue(R)?(e.exit("htmlFlowData"),Q(R)):(e.consume(R),q)}function Q(R){return e.check(pP,B,V)(R)}function B(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),H}function H(R){return R===null||Ue(R)?Q(R):(e.enter("htmlFlowData"),q(R))}function z(R){return R===45?(e.consume(R),D):q(R)}function Y(R){return R===47?(e.consume(R),l="",W):q(R)}function W(R){if(R===62){const oe=l.toLowerCase();return kE.includes(oe)?(e.consume(R),L):q(R)}return Xn(R)&&l.length<8?(e.consume(R),l+=String.fromCharCode(R),W):q(R)}function K(R){return R===93?(e.consume(R),D):q(R)}function D(R){return R===62?(e.consume(R),L):R===45&&a===2?(e.consume(R),D):q(R)}function L(R){return R===null||Ue(R)?(e.exit("htmlFlowData"),V(R)):(e.consume(R),L)}function V(R){return e.exit("htmlFlow"),t(R)}}function yP(e,t,n){const r=this;return a;function a(l){return Ue(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function bP(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Vu,t,n)}}const xP={name:"htmlText",tokenize:vP};function vP(e,t,n){const r=this;let a,o,l;return u;function u(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),d}function d(D){return D===33?(e.consume(D),h):D===47?(e.consume(D),O):D===63?(e.consume(D),_):Xn(D)?(e.consume(D),I):n(D)}function h(D){return D===45?(e.consume(D),g):D===91?(e.consume(D),o=0,E):Xn(D)?(e.consume(D),j):n(D)}function g(D){return D===45?(e.consume(D),b):n(D)}function m(D){return D===null?n(D):D===45?(e.consume(D),y):Ue(D)?(l=m,Y(D)):(e.consume(D),m)}function y(D){return D===45?(e.consume(D),b):m(D)}function b(D){return D===62?z(D):D===45?y(D):m(D)}function E(D){const L="CDATA[";return D===L.charCodeAt(o++)?(e.consume(D),o===L.length?w:E):n(D)}function w(D){return D===null?n(D):D===93?(e.consume(D),S):Ue(D)?(l=w,Y(D)):(e.consume(D),w)}function S(D){return D===93?(e.consume(D),k):w(D)}function k(D){return D===62?z(D):D===93?(e.consume(D),k):w(D)}function j(D){return D===null||D===62?z(D):Ue(D)?(l=j,Y(D)):(e.consume(D),j)}function _(D){return D===null?n(D):D===63?(e.consume(D),N):Ue(D)?(l=_,Y(D)):(e.consume(D),_)}function N(D){return D===62?z(D):_(D)}function O(D){return Xn(D)?(e.consume(D),A):n(D)}function A(D){return D===45||$n(D)?(e.consume(D),A):M(D)}function M(D){return Ue(D)?(l=M,Y(D)):it(D)?(e.consume(D),M):z(D)}function I(D){return D===45||$n(D)?(e.consume(D),I):D===47||D===62||Rt(D)?F(D):n(D)}function F(D){return D===47?(e.consume(D),z):D===58||D===95||Xn(D)?(e.consume(D),$):Ue(D)?(l=F,Y(D)):it(D)?(e.consume(D),F):z(D)}function $(D){return D===45||D===46||D===58||D===95||$n(D)?(e.consume(D),$):U(D)}function U(D){return D===61?(e.consume(D),q):Ue(D)?(l=U,Y(D)):it(D)?(e.consume(D),U):F(D)}function q(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),a=D,Q):Ue(D)?(l=q,Y(D)):it(D)?(e.consume(D),q):(e.consume(D),B)}function Q(D){return D===a?(e.consume(D),a=void 0,H):D===null?n(D):Ue(D)?(l=Q,Y(D)):(e.consume(D),Q)}function B(D){return D===null||D===34||D===39||D===60||D===61||D===96?n(D):D===47||D===62||Rt(D)?F(D):(e.consume(D),B)}function H(D){return D===47||D===62||Rt(D)?F(D):n(D)}function z(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):n(D)}function Y(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),W}function W(D){return it(D)?dt(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):K(D)}function K(D){return e.enter("htmlTextData"),l(D)}}const ix={name:"labelEnd",resolveAll:SP,resolveTo:_P,tokenize:NP},wP={tokenize:CP},EP={tokenize:jP},kP={tokenize:AP};function SP(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&Sr(e,0,e.length,n),e}function _P(e,t){let n=e.length,r=0,a,o,l,u;for(;n--;)if(a=e[n][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(l=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},g={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",h,t]],u=Fr(u,e.slice(o+1,o+r+3)),u=Fr(u,[["enter",g,t]]),u=Fr(u,Gh(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),u=Fr(u,[["exit",g,t],e[l-2],e[l-1],["exit",h,t]]),u=Fr(u,e.slice(l+1)),u=Fr(u,[["exit",d,t]]),Sr(e,o,e.length,u),e}function NP(e,t,n){const r=this;let a=r.events.length,o,l;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){o=r.events[a][1];break}return u;function u(y){return o?o._inactive?m(y):(l=r.parser.defined.includes(di(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),d):n(y)}function d(y){return y===40?e.attempt(wP,g,l?g:m)(y):y===91?e.attempt(EP,g,l?h:m)(y):l?g(y):m(y)}function h(y){return e.attempt(kP,g,m)(y)}function g(y){return t(y)}function m(y){return o._balanced=!0,n(y)}}function CP(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return Rt(m)?su(e,o)(m):o(m)}function o(m){return m===41?g(m):n2(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return Rt(m)?su(e,d)(m):g(m)}function u(m){return n(m)}function d(m){return m===34||m===39||m===40?i2(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):g(m)}function h(m){return Rt(m)?su(e,g)(m):g(m)}function g(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function jP(e,t,n){const r=this;return a;function a(u){return r2.call(r,e,o,l,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(di(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function AP(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const TP={name:"labelStartImage",resolveAll:ix.resolveAll,tokenize:MP};function MP(e,t,n){const r=this;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const OP={name:"labelStartLink",resolveAll:ix.resolveAll,tokenize:DP};function DP(e,t,n){const r=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Dg={name:"lineEnding",tokenize:RP};function RP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),dt(e,t,"linePrefix")}}const Yf={name:"thematicBreak",tokenize:LP};function LP(e,t,n){let r=0,a;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return a=h,u(h)}function u(h){return h===a?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Ue(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===a?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),it(h)?dt(e,u,"whitespace")(h):u(h))}}const sr={continuation:{tokenize:BP},exit:$P,name:"list",tokenize:PP},IP={partial:!0,tokenize:FP},zP={partial:!0,tokenize:UP};function PP(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return u;function u(b){const E=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:Fy(b)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Yf,n,h)(b):h(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return Fy(b)&&++l<10?(e.consume(b),d):(!r.interrupt||l<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(Vu,r.interrupt?n:g,e.attempt(IP,y,m))}function g(b){return r.containerState.initialBlankLine=!0,o++,y(b)}function m(b){return it(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),y):n(b)}function y(b){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function BP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Vu,a,o);function a(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,dt(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!it(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(zP,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,dt(e,e.attempt(sr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function UP(e,t,n){const r=this;return dt(e,a,"listItemIndent",r.containerState.size+1);function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function $P(e){e.exit(this.containerState.type)}function FP(e,t,n){const r=this;return dt(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const l=r.events[r.events.length-1];return!it(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const SE={name:"setextUnderline",resolveTo:HP,tokenize:qP};function HP(e,t){let n=e.length,r,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function qP(e,t,n){const r=this;let a;return o;function o(h){let g=r.events.length,m;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){m=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),a=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===a?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),it(h)?dt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ue(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const KP={tokenize:GP};function GP(e){const t=this,n=e.attempt(Vu,r,e.attempt(this.parser.constructs.flowInitial,a,dt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(X4,a)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const VP={resolveAll:s2()},YP=a2("string"),QP=a2("text");function a2(e){return{resolveAll:s2(e==="text"?WP:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],o=n.attempt(a,l,u);return l;function l(g){return h(g)?o(g):u(g)}function u(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),d}function d(g){return h(g)?(n.exit("data"),o(g)):(n.consume(g),d)}function h(g){if(g===null)return!0;const m=a[g];let y=-1;if(m)for(;++y<m.length;){const b=m[y];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function s2(e){return t;function t(n,r){let a=-1,o;for(;++a<=n.length;)o===void 0?n[a]&&n[a][1].type==="data"&&(o=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==o+2&&(n[o][1].end=n[a-1][1].end,n.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(n,r):n}}function WP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let o=a.length,l=-1,u=0,d;for(;o--;){const h=a[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(h===-2)d=!0,u++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const h={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const XP={42:sr,43:sr,45:sr,48:sr,49:sr,50:sr,51:sr,52:sr,53:sr,54:sr,55:sr,56:sr,57:sr,62:ZN},ZP={91:nP},JP={[-2]:Og,[-1]:Og,32:Og},eB={35:lP,42:Yf,45:[SE,Yf],60:fP,61:SE,95:Yf,96:EE,126:EE},tB={38:e2,92:JN},nB={[-5]:Dg,[-4]:Dg,[-3]:Dg,33:TP,38:e2,42:Hy,60:[O4,xP],91:OP,92:[sP,JN],93:ix,95:Hy,96:K4},rB={null:[Hy,VP]},iB={null:[42,95]},aB={null:[]},sB=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:iB,contentInitial:ZP,disable:aB,document:XP,flow:eB,flowInitial:JP,insideSpan:rB,string:tB,text:nB},Symbol.toStringTag,{value:"Module"}));function oB(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let l=[],u=[];const d={attempt:M(O),check:M(A),consume:j,enter:_,exit:N,interrupt:M(A,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:E,parser:e,previous:null,sliceSerialize:y,sliceStream:b,write:m};let g=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function m(U){return l=Fr(l,U),S(),l[l.length-1]!==null?[]:(I(t,0),h.events=Gh(o,h.events,h),h.events)}function y(U,q){return cB(b(U),q)}function b(U){return lB(l,U)}function E(){const{_bufferIndex:U,_index:q,line:Q,column:B,offset:H}=r;return{_bufferIndex:U,_index:q,line:Q,column:B,offset:H}}function w(U){a[U.line]=U.column,$()}function S(){let U;for(;r._index<l.length;){const q=l[r._index];if(typeof q=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<q.length;)k(q.charCodeAt(r._bufferIndex));else k(q)}}function k(U){g=g(U)}function j(U){Ue(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,$()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=U}function _(U,q){const Q=q||{};return Q.type=U,Q.start=E(),h.events.push(["enter",Q,h]),u.push(Q),Q}function N(U){const q=u.pop();return q.end=E(),h.events.push(["exit",q,h]),q}function O(U,q){I(U,q.from)}function A(U,q){q.restore()}function M(U,q){return Q;function Q(B,H,z){let Y,W,K,D;return Array.isArray(B)?V(B):"tokenize"in B?V([B]):L(B);function L(te){return ue;function ue(G){const ne=G!==null&&te[G],de=G!==null&&te.null,xe=[...Array.isArray(ne)?ne:ne?[ne]:[],...Array.isArray(de)?de:de?[de]:[]];return V(xe)(G)}}function V(te){return Y=te,W=0,te.length===0?z:R(te[W])}function R(te){return ue;function ue(G){return D=F(),K=te,te.partial||(h.currentConstruct=te),te.name&&h.parser.constructs.disable.null.includes(te.name)?ge():te.tokenize.call(q?Object.assign(Object.create(h),q):h,d,oe,ge)(G)}}function oe(te){return U(K,D),H}function ge(te){return D.restore(),++W<Y.length?R(Y[W]):z}}}function I(U,q){U.resolveAll&&!o.includes(U)&&o.push(U),U.resolve&&Sr(h.events,q,h.events.length-q,U.resolve(h.events.slice(q),h)),U.resolveTo&&(h.events=U.resolveTo(h.events,h))}function F(){const U=E(),q=h.previous,Q=h.currentConstruct,B=h.events.length,H=Array.from(u);return{from:B,restore:z};function z(){r=U,h.previous=q,h.currentConstruct=Q,h.events.length=B,u=H,$()}}function $(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function lB(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(r,o)];else{if(l=e.slice(n,a),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}o>0&&l.push(e[a].slice(0,o))}return l}function cB(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
543
|
+
`;break}case-3:{l=`\r
|
|
544
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(o)}a=o===-2,r.push(l)}return r.join("")}function uB(e){const r={constructs:WN([sB,...(e||{}).extensions||[]]),content:a(_4),defined:[],document:a(C4),flow:a(KP),lazy:{},string:a(YP),text:a(QP)};return r;function a(o){return l;function l(u){return oB(r,o,u)}}}function dB(e){for(;!t2(e););return e}const _E=/[\0\t\n\r]/g;function fB(){let e=1,t="",n=!0,r;return a;function a(o,l,u){const d=[];let h,g,m,y,b;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(_E.lastIndex=m,h=_E.exec(o),y=h&&h.index!==void 0?h.index:o.length,b=o.charCodeAt(y),!h){t=o.slice(m);break}if(b===10&&m===y&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<y&&(d.push(o.slice(m,y)),e+=y-m),b){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=y+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const hB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function pB(e){return e.replace(hB,mB)}function mB(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return XN(n.slice(o?2:1),o?16:10)}return rx(n)||e}const o2={}.hasOwnProperty;function gB(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),yB(n)(dB(uB(n).document().write(fB()(e,t,!0))))}function yB(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(an),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Qe),blockQuote:o(de),characterEscape:F,characterReference:F,codeFenced:o(xe),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(xe,l),codeText:o(ke,l),codeTextData:F,data:F,codeFlowValue:F,definition:o(we),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(ze),hardBreakEscape:o(Ce),hardBreakTrailing:o(Ce),htmlFlow:o(ht,l),htmlFlowData:F,htmlText:o(ht,l),htmlTextData:F,image:o(Pt),label:l,link:o(an),listItem:o(jn),listItemValue:y,listOrdered:o(ln,m),listUnordered:o(ln),paragraph:o(Yr),reference:R,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Qe),strong:o(Jn),thematicBreak:o(En)},exit:{atxHeading:d(),atxHeadingSequence:O,autolink:d(),autolinkEmail:ne,autolinkProtocol:G,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:te,characterReference:ue,codeFenced:d(S),codeFencedFence:w,codeFencedFenceInfo:b,codeFencedFenceMeta:E,codeFlowValue:$,codeIndented:d(k),codeText:d(H),codeTextData:$,data:$,definition:d(),definitionDestinationString:N,definitionLabelString:j,definitionTitleString:_,emphasis:d(),hardBreakEscape:d(q),hardBreakTrailing:d(q),htmlFlow:d(Q),htmlFlowData:$,htmlText:d(B),htmlTextData:$,image:d(Y),label:K,labelText:W,lineEnding:U,link:d(z),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:oe,resourceDestinationString:D,resourceTitleString:L,resource:V,setextHeading:d(I),setextHeadingLineSequence:M,setextHeadingText:A,strong:d(),thematicBreak:d()}};l2(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ce){let ye={type:"root",children:[]};const Re={stack:[ye],tokenStack:[],config:t,enter:u,exit:h,buffer:l,resume:g,data:n},We=[];let at=-1;for(;++at<ce.length;)if(ce[at][1].type==="listOrdered"||ce[at][1].type==="listUnordered")if(ce[at][0]==="enter")We.push(at);else{const An=We.pop();at=a(ce,An,at)}for(at=-1;++at<ce.length;){const An=t[ce[at][0]];o2.call(An,ce[at][1].type)&&An[ce[at][1].type].call(Object.assign({sliceSerialize:ce[at][2].sliceSerialize},Re),ce[at][1])}if(Re.tokenStack.length>0){const An=Re.tokenStack[Re.tokenStack.length-1];(An[1]||NE).call(Re,void 0,An[0])}for(ye.position={start:Xa(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:Xa(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},at=-1;++at<t.transforms.length;)ye=t.transforms[at](ye)||ye;return ye}function a(ce,ye,Re){let We=ye-1,at=-1,An=!1,fr,gn,$t,kn;for(;++We<=Re;){const xt=ce[We];switch(xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xt[0]==="enter"?at++:at--,kn=void 0;break}case"lineEndingBlank":{xt[0]==="enter"&&(fr&&!kn&&!at&&!$t&&($t=We),kn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:kn=void 0}if(!at&&xt[0]==="enter"&&xt[1].type==="listItemPrefix"||at===-1&&xt[0]==="exit"&&(xt[1].type==="listUnordered"||xt[1].type==="listOrdered")){if(fr){let jr=We;for(gn=void 0;jr--;){const Tn=ce[jr];if(Tn[1].type==="lineEnding"||Tn[1].type==="lineEndingBlank"){if(Tn[0]==="exit")continue;gn&&(ce[gn][1].type="lineEndingBlank",An=!0),Tn[1].type="lineEnding",gn=jr}else if(!(Tn[1].type==="linePrefix"||Tn[1].type==="blockQuotePrefix"||Tn[1].type==="blockQuotePrefixWhitespace"||Tn[1].type==="blockQuoteMarker"||Tn[1].type==="listItemIndent"))break}$t&&(!gn||$t<gn)&&(fr._spread=!0),fr.end=Object.assign({},gn?ce[gn][1].start:xt[1].end),ce.splice(gn||We,0,["exit",fr,xt[2]]),We++,Re++}if(xt[1].type==="listItemPrefix"){const jr={type:"listItem",_spread:!1,start:Object.assign({},xt[1].start),end:void 0};fr=jr,ce.splice(We,0,["enter",jr,xt[2]]),We++,Re++,$t=void 0,kn=!0}}}return ce[ye][1]._spread=An,Re}function o(ce,ye){return Re;function Re(We){u.call(this,ce(We),We),ye&&ye.call(this,We)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(ce,ye,Re){this.stack[this.stack.length-1].children.push(ce),this.stack.push(ce),this.tokenStack.push([ye,Re||void 0]),ce.position={start:Xa(ye.start),end:void 0}}function d(ce){return ye;function ye(Re){ce&&ce.call(this,Re),h.call(this,Re)}}function h(ce,ye){const Re=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==ce.type&&(ye?ye.call(this,ce,We[0]):(We[1]||NE).call(this,ce,We[0]));else throw new Error("Cannot close `"+ce.type+"` ("+au({start:ce.start,end:ce.end})+"): it’s not open");Re.position.end=Xa(ce.end)}function g(){return nx(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function y(ce){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(ce),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=ce}function E(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=ce}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ce.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ce.replace(/(\r?\n|\r)$/g,"")}function j(ce){const ye=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ye,Re.identifier=di(this.sliceSerialize(ce)).toLowerCase()}function _(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ce}function N(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ce}function O(ce){const ye=this.stack[this.stack.length-1];if(!ye.depth){const Re=this.sliceSerialize(ce).length;ye.depth=Re}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function M(ce){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(ce).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function F(ce){const Re=this.stack[this.stack.length-1].children;let We=Re[Re.length-1];(!We||We.type!=="text")&&(We=bt(),We.position={start:Xa(ce.start),end:void 0},Re.push(We)),this.stack.push(We)}function $(ce){const ye=this.stack.pop();ye.value+=this.sliceSerialize(ce),ye.position.end=Xa(ce.end)}function U(ce){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=ye.children[ye.children.length-1];Re.position.end=Xa(ce.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ye.type)&&(F.call(this,ce),$.call(this,ce))}function q(){this.data.atHardBreak=!0}function Q(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ce}function B(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ce}function H(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ce}function z(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=ye,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function Y(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=ye,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function W(ce){const ye=this.sliceSerialize(ce),Re=this.stack[this.stack.length-2];Re.label=pB(ye),Re.identifier=di(ye).toLowerCase()}function K(){const ce=this.stack[this.stack.length-1],ye=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const We=ce.children;Re.children=We}else Re.alt=ye}function D(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ce}function L(){const ce=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ce}function V(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function oe(ce){const ye=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ye,Re.identifier=di(this.sliceSerialize(ce)).toLowerCase(),this.data.referenceType="full"}function ge(ce){this.data.characterReferenceType=ce.type}function te(ce){const ye=this.sliceSerialize(ce),Re=this.data.characterReferenceType;let We;Re?(We=XN(ye,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=rx(ye);const at=this.stack[this.stack.length-1];at.value+=We}function ue(ce){const ye=this.stack.pop();ye.position.end=Xa(ce.end)}function G(ce){$.call(this,ce);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(ce)}function ne(ce){$.call(this,ce);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(ce)}function de(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function ke(){return{type:"inlineCode",value:""}}function we(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ze(){return{type:"emphasis",children:[]}}function Qe(){return{type:"heading",depth:0,children:[]}}function Ce(){return{type:"break"}}function ht(){return{type:"html",value:""}}function Pt(){return{type:"image",title:null,url:"",alt:null}}function an(){return{type:"link",title:null,url:"",children:[]}}function ln(ce){return{type:"list",ordered:ce.type==="listOrdered",start:null,spread:ce._spread,children:[]}}function jn(ce){return{type:"listItem",spread:ce._spread,checked:null,children:[]}}function Yr(){return{type:"paragraph",children:[]}}function Jn(){return{type:"strong",children:[]}}function bt(){return{type:"text",value:""}}function En(){return{type:"thematicBreak"}}}function Xa(e){return{line:e.line,column:e.column,offset:e.offset}}function l2(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?l2(e,r):bB(e,r)}}function bB(e,t){let n;for(n in t)if(o2.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function NE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+au({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+au({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+au({start:t.start,end:t.end})+") is still open")}function xB(e){const t=this;t.parser=n;function n(r){return gB(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function vB(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function wB(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
545
|
+
`}]}function EB(e,t){const n=t.value?t.value+`
|
|
546
|
+
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function kB(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SB(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _B(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Jl(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function NB(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CB(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function c2(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=r:a.push({type:"text",value:r}),a}function jB(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return c2(e,t);const a={src:Jl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)}function AB(e,t){const n={src:Jl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function TB(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function MB(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return c2(e,t);const a={href:Jl(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function OB(e,t){const n={href:Jl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function DB(e,t,n){const r=e.all(t),a=n?RB(n):u2(t),o={},l=[];if(typeof t.checked=="boolean"){const g=r[0];let m;g&&g.type==="element"&&g.tagName==="p"?m=g:(m={type:"element",tagName:"p",properties:{},children:[]},r.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:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const g=r[u];(a||u!==0||g.type!=="element"||g.tagName!=="p")&&l.push({type:"text",value:`
|
|
547
|
+
`}),g.type==="element"&&g.tagName==="p"&&!a?l.push(...g.children):l.push(g)}const d=r[r.length-1];d&&(a||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
548
|
+
`});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function RB(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=u2(n[r])}return t}function u2(e){const t=e.spread;return t??e.children.length>1}function LB(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const l=r[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function IB(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zB(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function PB(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BB(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Zb(t.children[1]),d=HN(t.children[t.children.length-1]);u&&d&&(l.position={start:u,end:d}),a.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function UB(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let d=-1;const h=[];for(;++d<u;){const m=t.children[d],y={},b=l?l[d]:void 0;b&&(y.align=b);let E={type:"element",tagName:o,properties:y,children:[]};m&&(E.children=e.all(m),e.patch(m,E),E=e.applyData(m,E)),h.push(E)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function $B(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const CE=9,jE=32;function FB(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(AE(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(AE(t.slice(a),a>0,!1)),o.join("")}function AE(e,t,n){let r=0,a=e.length;if(t){let o=e.codePointAt(r);for(;o===CE||o===jE;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(a-1);for(;o===CE||o===jE;)a--,o=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function HB(e,t){const n={type:"text",value:FB(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function qB(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const KB={blockquote:vB,break:wB,code:EB,delete:kB,emphasis:SB,footnoteReference:_B,heading:NB,html:CB,imageReference:jB,image:AB,inlineCode:TB,linkReference:MB,link:OB,listItem:DB,list:LB,paragraph:IB,root:zB,strong:PB,table:BB,tableCell:$B,tableRow:UB,text:HB,thematicBreak:qB,toml:kf,yaml:kf,definition:kf,footnoteDefinition:kf};function kf(){}const d2=-1,Vh=0,ou=1,dh=2,ax=3,sx=4,ox=5,lx=6,f2=7,h2=8,TE=typeof self=="object"?self:globalThis,GB=(e,t)=>{const n=(a,o)=>(e.set(o,a),a),r=a=>{if(e.has(a))return e.get(a);const[o,l]=t[a];switch(o){case Vh:case d2:return n(l,a);case ou:{const u=n([],a);for(const d of l)u.push(r(d));return u}case dh:{const u=n({},a);for(const[d,h]of l)u[r(d)]=r(h);return u}case ax:return n(new Date(l),a);case sx:{const{source:u,flags:d}=l;return n(new RegExp(u,d),a)}case ox:{const u=n(new Map,a);for(const[d,h]of l)u.set(r(d),r(h));return u}case lx:{const u=n(new Set,a);for(const d of l)u.add(r(d));return u}case f2:{const{name:u,message:d}=l;return n(new TE[u](d),a)}case h2:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return n(new TE[o](l),a)};return r},ME=e=>GB(new Map,e)(0),nl="",{toString:VB}={},{keys:YB}=Object,Wc=e=>{const t=typeof e;if(t!=="object"||!e)return[Vh,t];const n=VB.call(e).slice(8,-1);switch(n){case"Array":return[ou,nl];case"Object":return[dh,nl];case"Date":return[ax,nl];case"RegExp":return[sx,nl];case"Map":return[ox,nl];case"Set":return[lx,nl];case"DataView":return[ou,n]}return n.includes("Array")?[ou,n]:n.includes("Error")?[f2,n]:[dh,n]},Sf=([e,t])=>e===Vh&&(t==="function"||t==="symbol"),QB=(e,t,n,r)=>{const a=(l,u)=>{const d=r.push(l)-1;return n.set(u,d),d},o=l=>{if(n.has(l))return n.get(l);let[u,d]=Wc(l);switch(u){case Vh:{let g=l;switch(d){case"bigint":u=h2,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return a([d2],l)}return a([u,g],l)}case ou:{if(d){let y=l;return d==="DataView"?y=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(y=new Uint8Array(l)),a([d,[...y]],l)}const g=[],m=a([u,g],l);for(const y of l)g.push(o(y));return m}case dh:{if(d)switch(d){case"BigInt":return a([d,l.toString()],l);case"Boolean":case"Number":case"String":return a([d,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const g=[],m=a([u,g],l);for(const y of YB(l))(e||!Sf(Wc(l[y])))&&g.push([o(y),o(l[y])]);return m}case ax:return a([u,l.toISOString()],l);case sx:{const{source:g,flags:m}=l;return a([u,{source:g,flags:m}],l)}case ox:{const g=[],m=a([u,g],l);for(const[y,b]of l)(e||!(Sf(Wc(y))||Sf(Wc(b))))&&g.push([o(y),o(b)]);return m}case lx:{const g=[],m=a([u,g],l);for(const y of l)(e||!Sf(Wc(y)))&&g.push(o(y));return m}}const{message:h}=l;return a([u,{name:d,message:h}],l)};return o},OE=(e,{json:t,lossy:n}={})=>{const r=[];return QB(!(t||n),!!t,new Map,r)(e),r},fh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ME(OE(e,t)):structuredClone(e):(e,t)=>ME(OE(e,t));function WB(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function XB(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ZB(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||WB,r=e.options.footnoteBackLabel||XB,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const g=e.all(h),m=String(h.identifier).toUpperCase(),y=Jl(m.toLowerCase());let b=0;const E=[],w=e.footnoteCounts.get(m);for(;w!==void 0&&++b<=w;){E.length>0&&E.push({type:"text",value:" "});let j=typeof n=="string"?n:n(d,b);typeof j=="string"&&(j={type:"text",value:j}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,b),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const S=g[g.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const j=S.children[S.children.length-1];j&&j.type==="text"?j.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...E)}else g.push(...E);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(g,!0)};e.patch(h,k),u.push(k)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...fh(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
549
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
550
|
+
`}]}}const Yu=(function(e){if(e==null)return n5;if(typeof e=="function")return Yh(e);if(typeof e=="object")return Array.isArray(e)?JB(e):e5(e);if(typeof e=="string")return t5(e);throw new Error("Expected function, string, or object as test")});function JB(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Yu(e[n]);return Yh(r);function r(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function e5(e){const t=e;return Yh(n);function n(r){const a=r;let o;for(o in e)if(a[o]!==t[o])return!1;return!0}}function t5(e){return Yh(t);function t(n){return n&&n.type===e}}function Yh(e){return t;function t(n,r,a){return!!(r5(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function n5(){return!0}function r5(e){return e!==null&&typeof e=="object"&&"type"in e}const p2=[],i5=!0,qy=!1,a5="skip";function m2(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const o=Yu(a),l=r?-1:1;u(e,void 0,[])();function u(d,h,g){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const b=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return y;function y(){let b=p2,E,w,S;if((!t||o(d,h,g[g.length-1]||void 0))&&(b=s5(n(d,g)),b[0]===qy))return b;if("children"in d&&d.children){const k=d;if(k.children&&b[0]!==a5)for(w=(r?k.children.length:-1)+l,S=g.concat(k);w>-1&&w<k.children.length;){const j=k.children[w];if(E=u(j,w,S)(),E[0]===qy)return E;w=typeof E[1]=="number"?E[1]:w+l}}return b}}}function s5(e){return Array.isArray(e)?e:typeof e=="number"?[i5,e]:e==null?p2:[e]}function Qh(e,t,n,r){let a,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,a=n):(o=t,l=n,a=r),m2(e,o,u,a);function u(d,h){const g=h[h.length-1],m=g?g.children.indexOf(d):void 0;return l(d,m,g)}}const Ky={}.hasOwnProperty,o5={};function l5(e,t){const n=t||o5,r=new Map,a=new Map,o=new Map,l={...KB,...n.handlers},u={all:h,applyData:u5,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:l,one:d,options:n,patch:c5,wrap:f5};return Qh(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const m=g.type==="definition"?r:a,y=String(g.identifier).toUpperCase();m.has(y)||m.set(y,g)}}),u;function d(g,m){const y=g.type,b=u.handlers[y];if(Ky.call(u.handlers,y)&&b)return b(u,g,m);if(u.options.passThrough&&u.options.passThrough.includes(y)){if("children"in g){const{children:w,...S}=g,k=fh(S);return k.children=u.all(g),k}return fh(g)}return(u.options.unknownHandler||d5)(u,g,m)}function h(g){const m=[];if("children"in g){const y=g.children;let b=-1;for(;++b<y.length;){const E=u.one(y[b],g);if(E){if(b&&y[b-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=DE(E.value)),!Array.isArray(E)&&E.type==="element")){const w=E.children[0];w&&w.type==="text"&&(w.value=DE(w.value))}Array.isArray(E)?m.push(...E):m.push(E)}}}return m}}function c5(e,t){e.position&&(t.position=Xz(e))}function u5(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,fh(o)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function d5(e,t){const n=t.data||{},r="value"in t&&!(Ky.call(n,"hProperties")||Ky.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function f5(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
551
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
552
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
553
|
+
`}),n}function DE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function RE(e,t){const n=l5(e,t),r=n.one(e,void 0),a=ZB(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:`
|
|
554
|
+
`},a),o}function h5(e,t){return e&&"run"in e?async function(n,r){const a=RE(n,{file:r,...t});await e.run(a,r)}:function(n,r){return RE(n,{file:r,...e||t})}}function LE(e){if(e)throw e}var Rg,IE;function p5(){if(IE)return Rg;IE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!m)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},l=function(h,g){n&&g.name==="__proto__"?n(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},u=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(r)return r(h,g).value}else return;return h[g]};return Rg=function d(){var h,g,m,y,b,E,w=arguments[0],S=1,k=arguments.length,j=!1;for(typeof w=="boolean"&&(j=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<k;++S)if(h=arguments[S],h!=null)for(g in h)m=u(w,g),y=u(h,g),w!==y&&(j&&y&&(o(y)||(b=a(y)))?(b?(b=!1,E=m&&a(m)?m:[]):E=m&&o(m)?m:{},l(w,{name:g,newValue:d(j,E,y)})):typeof y<"u"&&l(w,{name:g,newValue:y}));return w},Rg}var m5=p5();const Lg=Lu(m5);function Gy(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 g5(){const e=[],t={run:n,use:r};return t;function n(...a){let o=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...a);function u(d,...h){const g=e[++o];let m=-1;if(d){l(d);return}for(;++m<a.length;)(h[m]===null||h[m]===void 0)&&(h[m]=a[m]);a=h,g?y5(g,u)(...h):l(null,...h)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function y5(e,t){let n;return r;function r(...l){const u=e.length>l.length;let d;u&&l.push(a);try{d=e.apply(this,l)}catch(h){const g=h;if(u&&n)throw g;return a(g)}u||(d&&d.then&&typeof d.then=="function"?d.then(o,a):d instanceof Error?a(d):o(d))}function a(l,...u){n||(n=!0,t(l,...u))}function o(l){a(null,l)}}const ki={basename:b5,dirname:x5,extname:v5,join:w5,sep:"/"};function b5(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Qu(e);let n=0,r=-1,a=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else r<0&&(o=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else l<0&&(o=!0,l=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function x5(e){if(Qu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function v5(e){Qu(e);let t=e.length,n=-1,r=0,a=-1,o=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?a<0?a=t:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||n<0||o===0||o===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function w5(...e){let t=-1,n;for(;++t<e.length;)Qu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":E5(n)}function E5(e){Qu(e);const t=e.codePointAt(0)===47;let n=k5(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function k5(e,t){let n="",r=0,a=-1,o=0,l=-1,u,d;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(a===l-1||o===1))if(a!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),a=l,o=0;continue}}else if(n.length>0){n="",r=0,a=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),r=l-a-1;a=l,o=0}else u===46&&o>-1?o++:o=-1}return n}function Qu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const S5={cwd:_5};function _5(){return"/"}function Vy(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function N5(e){if(typeof e=="string")e=new URL(e);else if(!Vy(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 C5(e)}function C5(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Ig=["history","path","basename","stem","extname","dirname"];class g2{constructor(t){let n;t?Vy(t)?n={path:t}:typeof t=="string"||j5(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":S5.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ig.length;){const o=Ig[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let a;for(a in n)Ig.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?ki.basename(this.path):void 0}set basename(t){Pg(t,"basename"),zg(t,"basename"),this.path=ki.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ki.dirname(this.path):void 0}set dirname(t){zE(this.basename,"dirname"),this.path=ki.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ki.extname(this.path):void 0}set extname(t){if(zg(t,"extname"),zE(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=ki.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vy(t)&&(t=N5(t)),Pg(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ki.basename(this.path,this.extname):void 0}set stem(t){Pg(t,"stem"),zg(t,"stem"),this.path=ki.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Hn(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function zg(e,t){if(e&&e.includes(ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ki.sep+"`")}function Pg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function zE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function j5(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const A5=(function(e){const r=this.constructor.prototype,a=r[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),T5={}.hasOwnProperty;class cx extends A5{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=g5()}copy(){const t=new cx;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Lg(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?($g("data",this.frozen),this.namespace[t]=n,this):T5.call(this.namespace,t)&&this.namespace[t]||void 0:t?($g("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=_f(t),r=this.parser||this.Parser;return Bg("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Bg("process",this.parser||this.Parser),Ug("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(o,l){const u=_f(t),d=r.parse(u);r.run(d,u,function(g,m,y){if(g||!m||!y)return h(g);const b=m,E=r.stringify(b,y);D5(E)?y.value=E:y.result=E,h(g,y)});function h(g,m){g||!m?l(g):o?o(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Bg("processSync",this.parser||this.Parser),Ug("processSync",this.compiler||this.Compiler),this.process(t,a),BE("processSync","process",n),r;function a(o,l){n=!0,LE(o),r=l}}run(t,n,r){PE(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,u){const d=_f(n);a.run(t,d,h);function h(g,m,y){const b=m||t;g?u(g):l?l(b):r(void 0,b,y)}}}runSync(t,n){let r=!1,a;return this.run(t,n,o),BE("runSync","run",r),a;function o(l,u){LE(l),a=u,r=!0}}stringify(t,n){this.freeze();const r=_f(n),a=this.compiler||this.Compiler;return Ug("stringify",a),PE(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if($g("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...m]=h;d(g,m)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))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");u(h.plugins),h.settings&&(a.settings=Lg(!0,a.settings,h.settings))}function u(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const m=h[g];o(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,g){let m=-1,y=-1;for(;++m<r.length;)if(r[m][0]===h){y=m;break}if(y===-1)r.push([h,...g]);else if(g.length>0){let[b,...E]=g;const w=r[y][1];Gy(w)&&Gy(b)&&(b=Lg(!0,w,b)),r[y]=[h,b,...E]}}}}const M5=new cx().freeze();function Bg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ug(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $g(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 PE(e){if(!Gy(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function BE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function _f(e){return O5(e)?e:new g2(e)}function O5(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function D5(e){return typeof e=="string"||R5(e)}function R5(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const L5="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",UE=[],$E={allowDangerousHtml:!0},I5=/^(https?|ircs?|mailto|xmpp)$/i,z5=[{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 ux(e){const t=P5(e),n=B5(e);return U5(t.runSync(t.parse(n),n),e)}function P5(e){const t=e.rehypePlugins||UE,n=e.remarkPlugins||UE,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$E}:$E;return M5().use(xB).use(n).use(h5,r).use(t)}function B5(e){const t=e.children||"",n=new g2;return typeof t=="string"&&(n.value=t),n}function U5(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,o=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||$5;for(const g of z5)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+L5+g.id,void 0);return Qh(e,h),n4(e,{Fragment:f.Fragment,components:a,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function h(g,m,y){if(g.type==="raw"&&y&&typeof m=="number")return l?y.children.splice(m,1):y.children[m]={type:"text",value:g.value},m;if(g.type==="element"){let b;for(b in Mg)if(Object.hasOwn(Mg,b)&&Object.hasOwn(g.properties,b)){const E=g.properties[b],w=Mg[b];(w===null||w.includes(g.tagName))&&(g.properties[b]=d(String(E||""),b,g))}}if(g.type==="element"){let b=n?!n.includes(g.tagName):o?o.includes(g.tagName):!1;if(!b&&r&&typeof m=="number"&&(b=!r(g,m,y)),b&&y&&typeof m=="number")return u&&g.children?y.children.splice(m,1,...g.children):y.children.splice(m,1),m}}}function $5(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||I5.test(e.slice(0,t))?e:""}function FE(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function F5(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function H5(e,t,n){const a=Yu((n||{}).ignore||[]),o=q5(t);let l=-1;for(;++l<o.length;)m2(e,"text",u);function u(h,g){let m=-1,y;for(;++m<g.length;){const b=g[m],E=y?y.children:void 0;if(a(b,E?E.indexOf(b):void 0,y))return;y=b}if(y)return d(h,g)}function d(h,g){const m=g[g.length-1],y=o[l][0],b=o[l][1];let E=0;const S=m.children.indexOf(h);let k=!1,j=[];y.lastIndex=0;let _=y.exec(h.value);for(;_;){const N=_.index,O={index:_.index,input:_.input,stack:[...g,h]};let A=b(..._,O);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?y.lastIndex=N+1:(E!==N&&j.push({type:"text",value:h.value.slice(E,N)}),Array.isArray(A)?j.push(...A):A&&j.push(A),E=N+_[0].length,k=!0),!y.global)break;_=y.exec(h.value)}return k?(E<h.value.length&&j.push({type:"text",value:h.value.slice(E)}),m.children.splice(S,1,...j)):j=[h],S+j.length}}function q5(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const a=n[r];t.push([K5(a[0]),G5(a[1])])}return t}function K5(e){return typeof e=="string"?new RegExp(F5(e),"g"):e}function G5(e){return typeof e=="function"?e:function(){return e}}const Fg="phrasing",Hg=["autolink","link","image","label"];function V5(){return{transforms:[eU],enter:{literalAutolink:Q5,literalAutolinkEmail:qg,literalAutolinkHttp:qg,literalAutolinkWww:qg},exit:{literalAutolink:J5,literalAutolinkEmail:Z5,literalAutolinkHttp:W5,literalAutolinkWww:X5}}}function Y5(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Fg,notInConstruct:Hg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Fg,notInConstruct:Hg},{character:":",before:"[ps]",after:"\\/",inConstruct:Fg,notInConstruct:Hg}]}}function Q5(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function qg(e){this.config.enter.autolinkProtocol.call(this,e)}function W5(e){this.config.exit.autolinkProtocol.call(this,e)}function X5(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 Z5(e){this.config.exit.autolinkEmail.call(this,e)}function J5(e){this.exit(e)}function eU(e){H5(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tU],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),nU]],{ignore:["link","linkReference"]})}function tU(e,t,n,r,a){let o="";if(!y2(a)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!rU(n)))return!1;const l=iU(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function nU(e,t,n,r){return!y2(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function rU(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 iU(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=FE(e,"(");let o=FE(e,")");for(;r!==-1&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function y2(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ao(n)||Kh(n))&&(!t||n!==47)}b2.peek=hU;function aU(){this.buffer()}function sU(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function oU(){this.buffer()}function lU(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function cU(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=di(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uU(e){this.exit(e)}function dU(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=di(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fU(e){this.exit(e)}function hU(){return"["}function b2(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),u(),l(),o+=a.move("]"),o}function pU(){return{enter:{gfmFootnoteCallString:aU,gfmFootnoteCall:sU,gfmFootnoteDefinitionLabelString:oU,gfmFootnoteDefinition:lU},exit:{gfmFootnoteCallString:cU,gfmFootnoteCall:uU,gfmFootnoteDefinitionLabelString:dU,gfmFootnoteDefinition:fU}}}function mU(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:b2},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,a,o,l){const u=o.createTracker(l);let d=u.move("[^");const h=o.enter("footnoteDefinition"),g=o.enter("label");return d+=u.move(o.safe(o.associationId(r),{before:d,after:"]"})),g(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
|
|
555
|
+
`:" ")+o.indentLines(o.containerFlow(r,u.current()),t?x2:gU))),h(),d}}function gU(e,t,n){return t===0?e:x2(e,t,n)}function x2(e,t,n){return(n?"":" ")+e}const yU=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];v2.peek=EU;function bU(){return{canContainEols:["delete"],enter:{strikethrough:vU},exit:{strikethrough:wU}}}function xU(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yU}],handlers:{delete:v2}}}function vU(e){this.enter({type:"delete",children:[]},e)}function wU(e){this.exit(e)}function v2(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),o(),l}function EU(){return"~"}function kU(e){return e.length}function SU(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||kU,o=[],l=[],u=[],d=[];let h=0,g=-1;for(;++g<e.length;){const w=[],S=[];let k=-1;for(e[g].length>h&&(h=e[g].length);++k<e[g].length;){const j=_U(e[g][k]);if(n.alignDelimiters!==!1){const _=a(j);S[k]=_,(d[k]===void 0||_>d[k])&&(d[k]=_)}w.push(j)}l[g]=w,u[g]=S}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<h;)o[m]=HE(r[m]);else{const w=HE(r);for(;++m<h;)o[m]=w}m=-1;const y=[],b=[];for(;++m<h;){const w=o[m];let S="",k="";w===99?(S=":",k=":"):w===108?S=":":w===114&&(k=":");let j=n.alignDelimiters===!1?1:Math.max(1,d[m]-S.length-k.length);const _=S+"-".repeat(j)+k;n.alignDelimiters!==!1&&(j=S.length+j+k.length,j>d[m]&&(d[m]=j),b[m]=j),y[m]=_}l.splice(1,0,y),u.splice(1,0,b),g=-1;const E=[];for(;++g<l.length;){const w=l[g],S=u[g];m=-1;const k=[];for(;++m<h;){const j=w[m]||"";let _="",N="";if(n.alignDelimiters!==!1){const O=d[m]-(S[m]||0),A=o[m];A===114?_=" ".repeat(O):A===99?O%2?(_=" ".repeat(O/2+.5),N=" ".repeat(O/2-.5)):(_=" ".repeat(O/2),N=_):N=" ".repeat(O)}n.delimiterStart!==!1&&!m&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||m)&&k.push(" "),n.alignDelimiters!==!1&&k.push(_),k.push(j),n.alignDelimiters!==!1&&k.push(N),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||m!==h-1)&&k.push("|")}E.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return E.join(`
|
|
556
|
+
`)}function _U(e){return e==null?"":String(e)}function HE(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 NU(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),CU);return a(),l}function CU(e,t,n){return">"+(n?"":" ")+e}function jU(e,t){return qE(e,t.inConstruct,!0)&&!qE(e,t.notInConstruct,!1)}function qE(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function KE(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
557
|
+
`&&jU(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
558
|
+
`}function AU(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++o>l&&(l=o):o=1,a=r+t.length,r=n.indexOf(t,a);return l}function TU(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 MU(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 OU(e,t,n,r){const a=MU(n),o=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(TU(e,n)){const m=n.enter("codeIndented"),y=n.indentLines(o,DU);return m(),y}const u=n.createTracker(r),d=a.repeat(Math.max(AU(o,a)+1,3)),h=n.enter("codeFenced");let g=u.move(d);if(e.lang){const m=n.enter(`codeFencedLang${l}`);g+=u.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...u.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);g+=u.move(" "),g+=u.move(n.safe(e.meta,{before:g,after:`
|
|
559
|
+
`,encode:["`"],...u.current()})),m()}return g+=u.move(`
|
|
560
|
+
`),o&&(g+=u.move(o+`
|
|
561
|
+
`)),g+=u.move(d),h(),g}function DU(e,t,n){return(n?"":" ")+e}function dx(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 RU(e,t,n,r){const a=dx(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let u=n.enter("label");const d=n.createTracker(r);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(u=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
562
|
+
`,...d.current()}))),u(),e.title&&(u=n.enter(`title${o}`),h+=d.move(" "+a),h+=d.move(n.safe(e.title,{before:h,after:a,...d.current()})),h+=d.move(a),u()),l(),h}function LU(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 vu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function hh(e,t,n){const r=Dl(e),a=Dl(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}w2.peek=IU;function w2(e,t,n,r){const a=LU(n),o=n.enter("emphasis"),l=n.createTracker(r),u=l.move(a);let d=l.move(n.containerPhrasing(e,{after:a,before:u,...l.current()}));const h=d.charCodeAt(0),g=hh(r.before.charCodeAt(r.before.length-1),h,a);g.inside&&(d=vu(h)+d.slice(1));const m=d.charCodeAt(d.length-1),y=hh(r.after.charCodeAt(0),m,a);y.inside&&(d=d.slice(0,-1)+vu(m));const b=l.move(a);return o(),n.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},u+d+b}function IU(e,t,n){return n.options.emphasis||"*"}function zU(e,t){let n=!1;return Qh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,qy}),!!((!e.depth||e.depth<3)&&nx(e)&&(t.options.setext||n))}function PU(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(zU(e,n)){const g=n.enter("headingSetext"),m=n.enter("phrasing"),y=n.containerPhrasing(e,{...o.current(),before:`
|
|
563
|
+
`,after:`
|
|
564
|
+
`});return m(),g(),y+`
|
|
565
|
+
`+(a===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
566
|
+
`))+1))}const l="#".repeat(a),u=n.enter("headingAtx"),d=n.enter("phrasing");o.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
567
|
+
`,...o.current()});return/^[\t ]/.test(h)&&(h=vu(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),d(),u(),h}E2.peek=BU;function E2(e){return e.value||""}function BU(){return"<"}k2.peek=UU;function k2(e,t,n,r){const a=dx(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let u=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(u=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),u(),e.title&&(u=n.enter(`title${o}`),h+=d.move(" "+a),h+=d.move(n.safe(e.title,{before:h,after:a,...d.current()})),h+=d.move(a),u()),h+=d.move(")"),l(),h}function UU(){return"!"}S2.peek=$U;function S2(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const u=n.createTracker(r);let d=u.move("![");const h=n.safe(e.alt,{before:d,after:"]",...u.current()});d+=u.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=g,o(),a==="full"||!h||h!==m?d+=u.move(m+"]"):a==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function $U(){return"!"}_2.peek=FU;function _2(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],u=n.compilePattern(l);let d;if(l.atBreak)for(;d=u.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return a+r+a}function FU(){return"`"}function N2(e,t){const n=nx(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}C2.peek=HU;function C2(e,t,n,r){const a=dx(n),o=a==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let u,d;if(N2(e,n)){const g=n.stack;n.stack=[],u=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),u(),n.stack=g,m}u=n.enter("link"),d=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(d=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=l.move(" "+a),h+=l.move(n.safe(e.title,{before:h,after:a,...l.current()})),h+=l.move(a),d()),h+=l.move(")"),u(),h}function HU(e,t,n){return N2(e,n)?"<":"["}j2.peek=qU;function j2(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const u=n.createTracker(r);let d=u.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...u.current()});d+=u.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=g,o(),a==="full"||!h||h!==m?d+=u.move(m+"]"):a==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function qU(){return"["}function fx(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 KU(e){const t=fx(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function GU(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 A2(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 VU(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?GU(n):fx(n);const u=e.ordered?l==="."?")":".":KU(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),A2(n)===l&&g){let m=-1;for(;++m<e.children.length;){const y=e.children[m];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=u),n.bulletCurrent=l;const h=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,a(),h}function YU(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 QU(e,t,n,r){const a=YU(n);let o=n.bulletCurrent||fx(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(l-o.length)),u.shift(l);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,u.current()),g);return d(),h;function g(m,y,b){return y?(b?"":" ".repeat(l))+m:(b?o:o+" ".repeat(l-o.length))+m}}function WU(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),a(),l}const XU=Yu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ZU(e,t,n,r){return(e.children.some(function(l){return XU(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function JU(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}T2.peek=e6;function T2(e,t,n,r){const a=JU(n),o=n.enter("strong"),l=n.createTracker(r),u=l.move(a+a);let d=l.move(n.containerPhrasing(e,{after:a,before:u,...l.current()}));const h=d.charCodeAt(0),g=hh(r.before.charCodeAt(r.before.length-1),h,a);g.inside&&(d=vu(h)+d.slice(1));const m=d.charCodeAt(d.length-1),y=hh(r.after.charCodeAt(0),m,a);y.inside&&(d=d.slice(0,-1)+vu(m));const b=l.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},u+d+b}function e6(e,t,n){return n.options.strong||"*"}function t6(e,t,n,r){return n.safe(e.value,r)}function n6(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 r6(e,t,n){const r=(A2(n)+(n.options.ruleSpaces?" ":"")).repeat(n6(n));return n.options.ruleSpaces?r.slice(0,-1):r}const M2={blockquote:NU,break:KE,code:OU,definition:RU,emphasis:w2,hardBreak:KE,heading:PU,html:E2,image:k2,imageReference:S2,inlineCode:_2,link:C2,linkReference:j2,list:VU,listItem:QU,paragraph:WU,root:ZU,strong:T2,text:t6,thematicBreak:r6};function i6(){return{enter:{table:a6,tableData:GE,tableHeader:GE,tableRow:o6},exit:{codeText:l6,table:s6,tableData:Kg,tableHeader:Kg,tableRow:Kg}}}function a6(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function s6(e){this.exit(e),this.data.inTable=void 0}function o6(e){this.enter({type:"tableRow",children:[]},e)}function Kg(e){this.exit(e)}function GE(e){this.enter({type:"tableCell",children:[]},e)}function l6(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,c6));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function c6(e,t){return t==="|"?t:e}function u6(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
568
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:l,tableCell:d,tableRow:u}};function l(b,E,w,S){return h(g(b,w,S),b.align)}function u(b,E,w,S){const k=m(b,w,S),j=h([k]);return j.slice(0,j.indexOf(`
|
|
569
|
+
`))}function d(b,E,w,S){const k=w.enter("tableCell"),j=w.enter("phrasing"),_=w.containerPhrasing(b,{...S,before:o,after:o});return j(),k(),_}function h(b,E){return SU(b,{align:E,alignDelimiters:r,padding:n,stringLength:a})}function g(b,E,w){const S=b.children;let k=-1;const j=[],_=E.enter("table");for(;++k<S.length;)j[k]=m(S[k],E,w);return _(),j}function m(b,E,w){const S=b.children;let k=-1;const j=[],_=E.enter("tableRow");for(;++k<S.length;)j[k]=d(S[k],b,E,w);return _(),j}function y(b,E,w){let S=M2.inlineCode(b,E,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function d6(){return{exit:{taskListCheckValueChecked:VE,taskListCheckValueUnchecked:VE,paragraph:h6}}}function f6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:p6}}}function VE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function h6(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let o=-1,l;for(;++o<a.length;){const u=a[o];if(u.type==="paragraph"){l=u;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function p6(e,t,n,r){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);o&&u.move(l);let d=M2.listItem(e,t,n,{...r,...u.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(g){return g+l}}function m6(){return[V5(),pU(),bU(),i6(),d6()]}function g6(e){return{extensions:[Y5(),mU(e),xU(),u6(e),f6()]}}const y6={tokenize:k6,partial:!0},O2={tokenize:S6,partial:!0},D2={tokenize:_6,partial:!0},R2={tokenize:N6,partial:!0},b6={tokenize:C6,partial:!0},L2={name:"wwwAutolink",tokenize:w6,previous:z2},I2={name:"protocolAutolink",tokenize:E6,previous:P2},ma={name:"emailAutolink",tokenize:v6,previous:B2},Oi={};function x6(){return{text:Oi}}let Bs=48;for(;Bs<123;)Oi[Bs]=ma,Bs++,Bs===58?Bs=65:Bs===91&&(Bs=97);Oi[43]=ma;Oi[45]=ma;Oi[46]=ma;Oi[95]=ma;Oi[72]=[ma,I2];Oi[104]=[ma,I2];Oi[87]=[ma,L2];Oi[119]=[ma,L2];function v6(e,t,n){const r=this;let a,o;return l;function l(m){return!Yy(m)||!B2.call(r,r.previous)||hx(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(m))}function u(m){return Yy(m)?(e.consume(m),u):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(b6,g,h)(m):m===45||m===95||$n(m)?(o=!0,e.consume(m),d):g(m)}function h(m){return e.consume(m),a=!0,d}function g(m){return o&&a&&Xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function w6(e,t,n){const r=this;return a;function a(l){return l!==87&&l!==119||!z2.call(r,r.previous)||hx(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(y6,e.attempt(O2,e.attempt(D2,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function E6(e,t,n){const r=this;let a="",o=!1;return l;function l(m){return(m===72||m===104)&&P2.call(r,r.previous)&&!hx(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(m),e.consume(m),u):n(m)}function u(m){if(Xn(m)&&a.length<5)return a+=String.fromCodePoint(m),e.consume(m),u;if(m===58){const y=a.toLowerCase();if(y==="http"||y==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),o?h:(o=!0,d)):n(m)}function h(m){return m===null||uh(m)||Rt(m)||ao(m)||Kh(m)?n(m):e.attempt(O2,e.attempt(D2,g),n)(m)}function g(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function k6(e,t,n){let r=0;return a;function a(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),a):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function S6(e,t,n){let r,a,o;return l;function l(h){return h===46||h===95?e.check(R2,d,u)(h):h===null||Rt(h)||ao(h)||h!==45&&Kh(h)?d(h):(o=!0,e.consume(h),l)}function u(h){return h===95?r=!0:(a=r,r=void 0),e.consume(h),l}function d(h){return a||r||!o?n(h):t(h)}}function _6(e,t){let n=0,r=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(R2,t,o)(l):l===null||Rt(l)||ao(l)?t(l):(e.consume(l),a)}function o(l){return l===41&&r++,e.consume(l),a}}function N6(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),a):u===60||u===null||Rt(u)||ao(u)?t(u):n(u)}function a(u){return u===null||u===40||u===91||Rt(u)||ao(u)?t(u):r(u)}function o(u){return Xn(u)?l(u):n(u)}function l(u){return u===59?(e.consume(u),r):Xn(u)?(e.consume(u),l):n(u)}}function C6(e,t,n){return r;function r(o){return e.consume(o),a}function a(o){return $n(o)?n(o):t(o)}}function z2(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Rt(e)}function P2(e){return!Xn(e)}function B2(e){return!(e===47||Yy(e))}function Yy(e){return e===43||e===45||e===46||e===95||$n(e)}function hx(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const j6={tokenize:I6,partial:!0};function A6(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:D6,continuation:{tokenize:R6},exit:L6}},text:{91:{name:"gfmFootnoteCall",tokenize:O6},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:T6,resolveTo:M6}}}}function T6(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;a--;){const d=r.events[a][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return u;function u(d){if(!l||!l._balanced)return n(d);const h=di(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function M6(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function O6(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return u;function u(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(m){if(o>999||m===93&&!l||m===null||m===91||Rt(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return a.includes(di(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Rt(m)||(l=!0),o++,e.consume(m),m===92?g:h}function g(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}}function D6(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,u;return d;function d(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(E)}function g(E){if(l>999||E===93&&!u||E===null||E===91||Rt(E))return n(E);if(E===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=di(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Rt(E)||(u=!0),l++,e.consume(E),E===92?m:g}function m(E){return E===91||E===92||E===93?(e.consume(E),l++,g):g(E)}function y(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),a.includes(o)||a.push(o),dt(e,b,"gfmFootnoteDefinitionWhitespace")):n(E)}function b(E){return t(E)}}function R6(e,t,n){return e.check(Vu,t,e.attempt(j6,t,n))}function L6(e){e.exit("gfmFootnoteDefinition")}function I6(e,t,n){const r=this;return dt(e,a,"gfmFootnoteDefinitionIndent",5);function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function z6(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(l,u){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let h=d;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[d][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[d][1].end)},m={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[d][1].start)},y=[["enter",g,u],["enter",l[h][1],u],["exit",l[h][1],u],["enter",m,u]],b=u.parser.constructs.insideSpan.null;b&&Sr(y,y.length,0,Gh(b,l.slice(h+1,d),u)),Sr(y,y.length,0,[["exit",m,u],["enter",l[d][1],u],["exit",l[d][1],u],["exit",g,u]]),Sr(l,h-1,d-h+3,y),d=h+y.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function o(l,u,d){const h=this.previous,g=this.events;let m=0;return y;function y(E){return h===126&&g[g.length-1][1].type!=="characterEscape"?d(E):(l.enter("strikethroughSequenceTemporary"),b(E))}function b(E){const w=Dl(h);if(E===126)return m>1?d(E):(l.consume(E),m++,b);if(m<2&&!n)return d(E);const S=l.exit("strikethroughSequenceTemporary"),k=Dl(E);return S._open=!k||k===2&&!!w,S._close=!w||w===2&&!!k,u(E)}}}class P6{constructor(){this.map=[]}add(t,n,r){B6(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const o of a)t.push(o);a=r.pop()}this.map.length=0}}function B6(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function U6(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function $6(){return{flow:{null:{name:"table",tokenize:F6,resolveAll:H6}}}}function F6(e,t,n){const r=this;let a=0,o=0,l;return u;function u($){let U=r.events.length-1;for(;U>-1;){const B=r.events[U][1].type;if(B==="lineEnding"||B==="linePrefix")U--;else break}const q=U>-1?r.events[U][1].type:null,Q=q==="tableHead"||q==="tableRow"?A:d;return Q===A&&r.parser.lazy[r.now().line]?n($):Q($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),h($)}function h($){return $===124||(l=!0,o+=1),g($)}function g($){return $===null?n($):Ue($)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),b):n($):it($)?dt(e,g,"whitespace")($):(o+=1,l&&(l=!1,a+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),m($)))}function m($){return $===null||$===124||Rt($)?(e.exit("data"),g($)):(e.consume($),$===92?y:m)}function y($){return $===92||$===124?(e.consume($),m):m($)}function b($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),l=!1,it($)?dt(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):E($))}function E($){return $===45||$===58?S($):$===124?(l=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),w):O($)}function w($){return it($)?dt(e,S,"whitespace")($):S($)}function S($){return $===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),k):$===45?(o+=1,k($)):$===null||Ue($)?N($):O($)}function k($){return $===45?(e.enter("tableDelimiterFiller"),j($)):O($)}function j($){return $===45?(e.consume($),j):$===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_($))}function _($){return it($)?dt(e,N,"whitespace")($):N($)}function N($){return $===124?E($):$===null||Ue($)?!l||a!==o?O($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):O($)}function O($){return n($)}function A($){return e.enter("tableRow"),M($)}function M($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),M):$===null||Ue($)?(e.exit("tableRow"),t($)):it($)?dt(e,M,"whitespace")($):(e.enter("data"),I($))}function I($){return $===null||$===124||Rt($)?(e.exit("data"),M($)):(e.consume($),$===92?F:I)}function F($){return $===92||$===124?(e.consume($),I):I($)}}function H6(e,t){let n=-1,r=!0,a=0,o=[0,0,0,0],l=[0,0,0,0],u=!1,d=0,h,g,m;const y=new P6;for(;++n<e.length;){const b=e[n],E=b[1];b[0]==="enter"?E.type==="tableHead"?(u=!1,d!==0&&(YE(y,t,d,h,g),g=void 0,d=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},y.add(n,0,[["enter",h,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,m=void 0,o=[0,0,0,0],l=[0,n+1,0,0],u&&(u=!1,g={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},y.add(n,0,[["enter",g,t]])),a=E.type==="tableDelimiterRow"?2:g?3:1):a&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],m=Nf(y,t,o,a,void 0,m),o=[0,0,0,0]),l[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],m=Nf(y,t,o,a,void 0,m)),o=l,l=[o[1],n,0,0])):E.type==="tableHead"?(u=!0,d=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(d=n,o[1]!==0?(l[0]=l[1],m=Nf(y,t,o,a,n,m)):l[1]!==0&&(m=Nf(y,t,l,a,n,m)),a=0):a&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&YE(y,t,d,h,g),y.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=U6(t.events,n))}return e}function Nf(e,t,n,r,a,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},al(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const d=al(t.events,n[1]);if(o={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=al(t.events,n[2]),g=al(t.events,n[3]),m={type:u,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const y=t.events[n[2]],b=t.events[n[3]];if(y[1].end=Object.assign({},b[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,w=n[3]-n[2]-1;e.add(E,w,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return a!==void 0&&(o.end=Object.assign({},al(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function YE(e,t,n,r,a){const o=[],l=al(t.events,n);a&&(a.end=Object.assign({},l),o.push(["exit",a,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function al(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const q6={name:"tasklistCheck",tokenize:G6};function K6(){return{text:{91:q6}}}function G6(e,t,n){const r=this;return a;function a(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return Rt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(d)}function u(d){return Ue(d)?t(d):it(d)?e.check({tokenize:V6},t,n)(d):n(d)}}function V6(e,t,n){return dt(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function Y6(e){return WN([x6(),A6(),z6(e),$6(),K6()])}const Q6={};function px(e){const t=this,n=e||Q6,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(Y6(n)),o.push(m6()),l.push(g6(n))}const QE=(function(e,t,n){const r=Yu(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),yo=(function(e){if(e==null)return Z6;if(typeof e=="string")return X6(e);if(typeof e=="object")return W6(e);if(typeof e=="function")return mx(e);throw new Error("Expected function, string, or array as `test`")});function W6(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=yo(e[n]);return mx(r);function r(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function X6(e){return mx(t);function t(n){return n.tagName===e}}function mx(e){return t;function t(n,r,a){return!!(J6(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function Z6(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function J6(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const WE=/\n/g,XE=/[\t ]+/g,Qy=yo("br"),ZE=yo(o$),e$=yo("p"),JE=yo("tr"),t$=yo(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",s$,l$]),U2=yo(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function n$(e,t){const n=t||{},r="children"in e?e.children:[],a=U2(e),o=H2(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...F2(e,{breakBefore:!0,breakAfter:!0}));let u=-1;for(;++u<r.length;)l.push(...$2(r[u],e,{whitespace:o,breakBefore:u?void 0:a,breakAfter:u<r.length-1?Qy(r[u+1]):a}));const d=[];let h;for(u=-1;++u<l.length;){const g=l[u];typeof g=="number"?h!==void 0&&g>h&&(h=g):g&&(h!==void 0&&h>-1&&d.push(`
|
|
570
|
+
`.repeat(h)||" "),h=-1,d.push(g))}return d.join("")}function $2(e,t,n){return e.type==="element"?r$(e,t,n):e.type==="text"?n.whitespace==="normal"?F2(e,n):i$(e):[]}function r$(e,t,n){const r=H2(e,n),a=e.children||[];let o=-1,l=[];if(t$(e))return l;let u,d;for(Qy(e)||JE(e)&&QE(t,e,JE)?d=`
|
|
571
|
+
`:e$(e)?(u=2,d=2):U2(e)&&(u=1,d=1);++o<a.length;)l=l.concat($2(a[o],e,{whitespace:r,breakBefore:o?void 0:u,breakAfter:o<a.length-1?Qy(a[o+1]):d}));return ZE(e)&&QE(t,e,ZE)&&l.push(" "),u&&l.unshift(u),d&&l.push(d),l}function F2(e,t){const n=String(e.value),r=[],a=[];let o=0;for(;o<=n.length;){WE.lastIndex=o;const d=WE.exec(n),h=d&&"index"in d?d.index:n.length;r.push(a$(n.slice(o,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,h===n.length?t.breakAfter:!0)),o=h+1}let l=-1,u;for(;++l<r.length;)r[l].charCodeAt(r[l].length-1)===8203||l<r.length-1&&r[l+1].charCodeAt(0)===8203?(a.push(r[l]),u=void 0):r[l]?(typeof u=="number"&&a.push(u),a.push(r[l]),u=0):(l===0||l===r.length-1)&&a.push(0);return a}function i$(e){return[String(e.value)]}function a$(e,t,n){const r=[];let a=0,o;for(;a<e.length;){XE.lastIndex=a;const l=XE.exec(e);o=l?l.index:e.length,!a&&!o&&l&&!t&&r.push(""),a!==o&&r.push(e.slice(a,o)),a=l?o+l[0].length:o}return a!==o&&!n&&r.push(""),r.join(" ")}function H2(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function s$(e){return!!(e.properties||{}).hidden}function o$(e){return e.tagName==="td"||e.tagName==="th"}function l$(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function c$(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},b=t.optional(a)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],k=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],N={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},O={className:"function.dispatch",relevance:0,keywords:{_hint:k},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[O,m,u,n,e.C_BLOCK_COMMENT_MODE,g,h],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:N,contains:A.concat([{begin:/\(/,end:/\)/,keywords:N,contains:A.concat(["self"]),relevance:0}]),relevance:0},I={className:"function",begin:"("+l+"[\\*&\\s]+)+"+b,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:N,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:N,relevance:0},{begin:b,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,g,u,{begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:N,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,I,O,A,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:N,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:N},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function u$(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=c$(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function d$(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),l={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,a]};a.contains.push(u);const d={match:/\\"/},h={className:"string",begin:/'/,end:/'/},g={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],b=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),E={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],S=["true","false"],k={match:/(\/[a-z._-]+)+/},j=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],N=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],O=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:w,literal:S,built_in:[...j,..._,"set","shopt",...N,...O]},contains:[b,e.SHEBANG(),E,m,o,l,k,u,d,h,g,n]}}function f$(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",l="("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},b=t.optional(a)+e.IDENT_RE+"\\s*\\(",S={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},k=[m,u,n,e.C_BLOCK_COMMENT_MODE,g,h],j={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:k.concat([{begin:/\(/,end:/\)/,keywords:S,contains:k.concat(["self"]),relevance:0}]),relevance:0},_={begin:"("+l+"[\\*&\\s]+)+"+b,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:S,relevance:0},{begin:b,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,g,u,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:S,disableAutodetect:!0,illegal:"</",contains:[].concat(j,_,k,[m,{begin:e.IDENT_RE+"::",keywords:S},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:h,keywords:S}}}function h$(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},b=t.optional(a)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],k=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],N={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},O={className:"function.dispatch",relevance:0,keywords:{_hint:k},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[O,m,u,n,e.C_BLOCK_COMMENT_MODE,g,h],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:N,contains:A.concat([{begin:/\(/,end:/\)/,keywords:N,contains:A.concat(["self"]),relevance:0}]),relevance:0},I={className:"function",begin:"("+l+"[\\*&\\s]+)+"+b,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:N,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:N,relevance:0},{begin:b,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,g,u,{begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:N,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,I,O,A,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:N,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:N},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function p$(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],a=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],l={keyword:a.concat(o),built_in:t,literal:r},u=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},h={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(g,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:l},b=e.inherit(y,{illegal:/\n/}),E={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,b]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},S=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]});y.contains=[w,E,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],b.contains=[S,E,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const k={variants:[h,w,E,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},j={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",N={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:l,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},k,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,j,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,j,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:l,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,j],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,relevance:0,contains:[k,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},N]}}const m$=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),g$=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],y$=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],b$=[...g$,...y$],x$=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),v$=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),w$=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),E$=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function k$(e){const t=e.regex,n=m$(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},a="and or not only",o=/@-?\w[\w]*(-\w+)*/,l="[a-zA-Z-][a-zA-Z0-9_-]*",u=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+l,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+v$.join("|")+")"},{begin:":(:)?("+w$.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+E$.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...u,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...u,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:x$.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...u,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+b$.join("|")+")\\b"}]}}function S$(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function _$(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function N$(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function C$(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const a={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[r,o,a,l,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,g=/'[^']*'/,m=t.either(d,h,g),y=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[r,u,o,a,l,n]}}]}}var sl="[0-9](_*[0-9])*",Cf=`\\.(${sl})`,jf="[0-9a-fA-F](_*[0-9a-fA-F])*",ek={className:"number",variants:[{begin:`(\\b(${sl})((${Cf})|\\.)?|(${Cf}))[eE][+-]?(${sl})[fFdD]?\\b`},{begin:`\\b(${sl})((${Cf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Cf})[fFdD]?\\b`},{begin:`\\b(${sl})[fFdD]\\b`},{begin:`\\b0[xX]((${jf})\\.?|(${jf})?\\.(${jf}))[pP][+-]?(${sl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${jf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function q2(e,t,n){return n===-1?"":e.replace(t,r=>q2(e,t,n-1))}function j$(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+q2("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},h={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[g,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,ek,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},ek,h]}}const tk="[A-Za-z$_][0-9A-Za-z$_]*",A$=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],T$=["true","false","null","undefined","NaN","Infinity"],K2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],G2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],V2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],M$=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],O$=[].concat(V2,K2,G2);function D$(e){const t=e.regex,n=(W,{after:K})=>{const D="</"+W[0].slice(1);return W.input.indexOf(D,K)!==-1},r=tk,a={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,K)=>{const D=W[0].length+W.index,L=W.input[D];if(L==="<"||L===","){K.ignoreMatch();return}L===">"&&(n(W,{after:D})||K.ignoreMatch());let V;const R=W.input.substring(D);if(V=R.match(/^\s*=/)){K.ignoreMatch();return}if((V=R.match(/^\s+extends\s+/))&&V.index===0){K.ignoreMatch();return}}},u={$pattern:tk,keyword:A$,literal:T$,built_in:O$,"variable.language":M$},d="[0-9](_?[0-9])*",h=`\\.(${d})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${g})((${h})|\\.)?|(${h}))[eE][+-]?(${d})\\b`},{begin:`\\b(${g})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},b={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},j={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,E,w,S,{match:/\$\d+/},m];y.contains=_.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(_)});const N=[].concat(j,y.contains),O=N.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(N)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:O},M={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},I={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...K2,...G2]}},F={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},$={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function q(W){return t.concat("(?!",W.join("|"),")")}const Q={match:t.concat(/\b/,q([...V2,"super","import"].map(W=>`${W}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},B={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),F,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,E,w,S,j,{match:/\$\d+/},m,I,{scope:"attr",match:r+t.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[j,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:o},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},$,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},B,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},Q,U,M,H,{match:/\$[(.]/}]}}function R$(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],a={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,a,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var ol="[0-9](_*[0-9])*",Af=`\\.(${ol})`,Tf="[0-9a-fA-F](_*[0-9a-fA-F])*",L$={className:"number",variants:[{begin:`(\\b(${ol})((${Af})|\\.)?|(${Af}))[eE][+-]?(${ol})[fFdD]?\\b`},{begin:`\\b(${ol})((${Af})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Af})[fFdD]?\\b`},{begin:`\\b(${ol})[fFdD]\\b`},{begin:`\\b0[xX]((${Tf})\\.?|(${Tf})?\\.(${Tf}))[pP][+-]?(${ol})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Tf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function I$(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},a={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},l={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,a]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,a]}]};a.contains.push(l);const u={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},h=L$,g=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=m;return y.variants[1].contains=[m],m.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,g,n,r,u,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,g],relevance:0},e.C_LINE_COMMENT_MODE,g,u,d,l,e.C_NUMBER_MODE]},g]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},u,d]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
572
|
+
`},h]}}const z$=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),P$=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],B$=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],U$=[...P$,...B$],$$=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Y2=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Q2=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),F$=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),H$=Y2.concat(Q2).sort().reverse();function q$(e){const t=z$(e),n=H$,r="and or not only",a="[\\w-]+",o="("+a+"|@\\{"+a+"\\})",l=[],u=[],d=function(_){return{className:"string",begin:"~?"+_+".*?"+_}},h=function(_,N,O){return{className:_,begin:N,relevance:O}},g={$pattern:/[a-z-]+/,keyword:r,attribute:$$.join(" ")},m={begin:"\\(",end:"\\)",contains:u,keywords:g,relevance:0};u.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,h("variable","@@?"+a,10),h("variable","@\\{"+a+"\\}"),h("built_in","~?`[^`]*?`"),{className:"attribute",begin:a+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const y=u.concat({begin:/\{/,end:/\}/,contains:l}),b={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(u)},E={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+F$.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:u}}]},w={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:g,returnEnd:!0,contains:u,relevance:0}},S={className:"variable",variants:[{begin:"@"+a+"\\s*:",relevance:15},{begin:"@"+a}],starts:{end:"[;}]",returnEnd:!0,contains:y}},k={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,b,h("keyword","all\\b"),h("variable","@\\{"+a+"\\}"),{begin:"\\b("+U$.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,h("selector-tag",o,0),h("selector-id","#"+o),h("selector-class","\\."+o,0),h("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Y2.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Q2.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:y},{begin:"!important"},t.FUNCTION_DISPATCH]},j={begin:a+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[k]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,S,j,E,k,b,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function K$(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},a=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:a.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:a}].concat(a)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function G$(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},a={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},l={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,a,o,l]}}function V$(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},a={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},l={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},h={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(h,{contains:[]}),y=e.inherit(g,{contains:[]});h.contains.push(y),g.contains.push(m);let b=[n,d];return[h,g,m,y].forEach(k=>{k.contains=k.contains.concat(b)}),b=b.concat(h,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:b},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:b}]}]},n,o,h,g,{className:"quote",begin:"^>\\s+",contains:b,end:"$"},a,r,d,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Y$(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function Q$(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,a={$pattern:/[\w.]+/,keyword:n.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:a},l={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},h={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},g=[e.BACKSLASH_ESCAPE,o,d],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(w,S,k="\\1")=>{const j=k==="\\1"?k:t.concat(k,S);return t.concat(t.concat("(?:",w,")"),S,/(?:\\.|[^\\\/])*?/,j,/(?:\\.|[^\\\/])*?/,k,r)},b=(w,S,k)=>t.concat(t.concat("(?:",w,")"),S,/(?:\\.|[^\\\/])*?/,k,r),E=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),l,{className:"string",contains:g,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},h,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",t.either(...m,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:b("(?:m|qr)?",/\//,/\//)},{begin:b("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:b("m|qr",/\(/,/\)/)},{begin:b("m|qr",/\[/,/\]/)},{begin:b("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u,h]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=E,l.contains=E,{name:"Perl",aliases:["pl","pm"],keywords:a,contains:E}}function W$(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),a=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),l={scope:"variable",match:"\\$+"+r},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=e.inherit(e.APOS_STRING_MODE,{illegal:null}),g=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(B,H)=>{H.data._beginMatch=B[1]||B[2]},"on:end":(B,H)=>{H.data._beginMatch!==B[1]&&H.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),b=`[
|
|
573
|
+
]`,E={scope:"string",variants:[g,h,m,y]},w={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},S=["false","null","true"],k=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],j=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],N={keyword:k,literal:(B=>{const H=[];return B.forEach(z=>{H.push(z),z.toLowerCase()===z?H.push(z.toUpperCase()):H.push(z.toLowerCase())}),H})(S),built_in:j},O=B=>B.map(H=>H.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,t.concat(b,"+"),t.concat("(?!",O(j).join("\\b|"),"\\b)"),a],scope:{1:"keyword",4:"title.class"}}]},M=t.concat(r,"\\b(?!\\()"),I={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),M],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[a,t.concat(/::/,t.lookahead(/(?!class\b)/)),M],scope:{1:"title.class",3:"variable.constant"}},{match:[a,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[a,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},F={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},$={relevance:0,begin:/\(/,end:/\)/,keywords:N,contains:[F,l,I,e.C_BLOCK_COMMENT_MODE,E,w,A]},U={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",O(k).join("\\b|"),"|",O(j).join("\\b|"),"\\b)"),r,t.concat(b,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[$]};$.contains.push(U);const q=[F,I,e.C_BLOCK_COMMENT_MODE,E,w,A],Q={begin:t.concat(/#\[\s*\\?/,t.either(a,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:S,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:S,keyword:["new","array"]},contains:["self",...q]},...q,{scope:"meta",variants:[{match:a},{match:o}]}]};return{case_insensitive:!1,keywords:N,contains:[Q,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},l,U,I,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},A,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:N,contains:["self",Q,l,I,e.C_BLOCK_COMMENT_MODE,E,w]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},E,w]}}function X$(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function Z$(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function J$(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},g={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,g,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,g,h]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",b=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,E=`\\b|${r.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${b}))[eE][+-]?(${y})[jJ]?(?=${E})`},{begin:`(${b})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${E})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${E})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${E})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${E})`},{begin:`\\b(${y})[jJ](?=${E})`}]},S={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},k={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",d,w,m,e.HASH_COMMENT_MODE]}]};return h.contains=[m,w,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[d,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,S,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[k]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[w,k,m]}]}}function e9(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function t9(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),a=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[a,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:a},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function n9(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),a=t.concat(r,/(::\w+)*/),l={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},h=[e.COMMENT("#","$",{contains:[u]}),e.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:l},m={className:"string",contains:[e.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},y="[1-9](_?[0-9])*|0",b="[0-9](_?[0-9])*",E={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${b}))?([eE][+-]?(${b})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},w={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},A=[m,{variants:[{match:[/class\s+/,a,/\s+<\s+/,a]},{match:[/\b(class|module)\s+/,a]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:l},{match:[/(include|extend)\s+/,a],scope:{2:"title.class"},keywords:l},{relevance:0,match:[a,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},E,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:l},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,h),relevance:0}].concat(d,h);g.contains=A,w.contains=A;const $=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:A}}];return h.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat($).concat(h).concat(A)}}function r9(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),a=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,a,t.lookahead(/\s*\(/))},l="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],h=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],g=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:g,keyword:u,literal:d,built_in:h},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+l},{begin:"\\b0o([0-7_]+)"+l},{begin:"\\b0x([A-Fa-f0-9_]+)"+l},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+l}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:h,type:g}},{className:"punctuation",begin:"->"},o]}}const i9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),a9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],s9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],o9=[...a9,...s9],l9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),c9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),u9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function f9(e){const t=i9(e),n=u9,r=c9,a="@[a-z-]+",o="and or not only",u={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+o9.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},u,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d9.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,u,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:a,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:l9.join(" ")},contains:[{begin:a,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},u,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function h9(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function p9(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},a={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],l=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],h=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],m=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],b=g,E=[...h,...d].filter(O=>!g.includes(O)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},S={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},k={match:t.concat(/\b/,t.either(...b),/\s*\(/),relevance:0,keywords:{built_in:b}};function j(O){return t.concat(/\b/,t.either(...O.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const _={scope:"keyword",match:j(y),relevance:0};function N(O,{exceptions:A,when:M}={}){const I=M;return A=A||[],O.map(F=>F.match(/\|\d+$/)||A.includes(F)?F:I(F)?`${F}|0`:F)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:N(E,{when:O=>O.length<3}),literal:o,type:u,built_in:m},contains:[{scope:"type",match:j(l)},_,k,w,r,a,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,S]}}function W2(e){return e?typeof e=="string"?e:e.source:null}function Xc(e){return Tt("(?=",e,")")}function Tt(...e){return e.map(n=>W2(n)).join("")}function m9(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Yn(...e){return"("+(m9(e).capture?"":"?:")+e.map(r=>W2(r)).join("|")+")"}const gx=e=>Tt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),g9=["Protocol","Type"].map(gx),nk=["init","self"].map(gx),y9=["Any","Self"],Gg=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],rk=["false","nil","true"],b9=["assignment","associativity","higherThan","left","lowerThan","none","right"],x9=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],ik=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],X2=Yn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Z2=Yn(X2,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Vg=Tt(X2,Z2,"*"),J2=Yn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),ph=Yn(J2,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Ei=Tt(J2,ph,"*"),Mf=Tt(/[A-Z]/,ph,"*"),v9=["attached","autoclosure",Tt(/convention\(/,Yn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Tt(/objc\(/,Ei,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],w9=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function E9(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],a={match:[/\./,Yn(...g9,...nk)],className:{2:"keyword"}},o={match:Tt(/\./,Yn(...Gg)),relevance:0},l=Gg.filter(Ce=>typeof Ce=="string").concat(["_|0"]),u=Gg.filter(Ce=>typeof Ce!="string").concat(y9).map(gx),d={variants:[{className:"keyword",match:Yn(...u,...nk)}]},h={$pattern:Yn(/\b\w+/,/#\w+/),keyword:l.concat(x9),literal:rk},g=[a,o,d],m={match:Tt(/\./,Yn(...ik)),relevance:0},y={className:"built_in",match:Tt(/\b/,Yn(...ik),/(?=\()/)},b=[m,y],E={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:Vg},{match:`\\.(\\.|${Z2})+`}]},S=[E,w],k="([0-9]_*)+",j="([0-9a-fA-F]_*)+",_={className:"number",relevance:0,variants:[{match:`\\b(${k})(\\.(${k}))?([eE][+-]?(${k}))?\\b`},{match:`\\b0x(${j})(\\.(${j}))?([pP][+-]?(${k}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},N=(Ce="")=>({className:"subst",variants:[{match:Tt(/\\/,Ce,/[0\\tnr"']/)},{match:Tt(/\\/,Ce,/u\{[0-9a-fA-F]{1,8}\}/)}]}),O=(Ce="")=>({className:"subst",match:Tt(/\\/,Ce,/[\t ]*(?:[\r\n]|\r\n)/)}),A=(Ce="")=>({className:"subst",label:"interpol",begin:Tt(/\\/,Ce,/\(/),end:/\)/}),M=(Ce="")=>({begin:Tt(Ce,/"""/),end:Tt(/"""/,Ce),contains:[N(Ce),O(Ce),A(Ce)]}),I=(Ce="")=>({begin:Tt(Ce,/"/),end:Tt(/"/,Ce),contains:[N(Ce),A(Ce)]}),F={className:"string",variants:[M(),M("#"),M("##"),M("###"),I(),I("#"),I("##"),I("###")]},$=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],U={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:$},q=Ce=>{const ht=Tt(Ce,/\//),Pt=Tt(/\//,Ce);return{begin:ht,end:Pt,contains:[...$,{scope:"comment",begin:`#(?!.*${Pt})`,end:/$/}]}},Q={scope:"regexp",variants:[q("###"),q("##"),q("#"),U]},B={match:Tt(/`/,Ei,/`/)},H={className:"variable",match:/\$\d+/},z={className:"variable",match:`\\$${ph}+`},Y=[B,H,z],W={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:w9,contains:[...S,_,F]}]}},K={scope:"keyword",match:Tt(/@/,Yn(...v9),Xc(Yn(/\(/,/\s+/)))},D={scope:"meta",match:Tt(/@/,Ei)},L=[W,K,D],V={match:Xc(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Tt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,ph,"+")},{className:"type",match:Mf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Tt(/\s+&\s+/,Xc(Mf)),relevance:0}]},R={begin:/</,end:/>/,keywords:h,contains:[...r,...g,...L,E,V]};V.contains.push(R);const oe={match:Tt(Ei,/\s*:/),keywords:"_|0",relevance:0},ge={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",oe,...r,Q,...g,...b,...S,_,F,...Y,...L,V]},te={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,V]},ue={begin:Yn(Xc(Tt(Ei,/\s*:/)),Xc(Tt(Ei,/\s+/,Ei,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Ei}]},G={begin:/\(/,end:/\)/,keywords:h,contains:[ue,...r,...g,...S,_,F,...L,V,ge],endsParent:!0,illegal:/["']/},ne={match:[/(func|macro)/,/\s+/,Yn(B.match,Ei,Vg)],className:{1:"keyword",3:"title.function"},contains:[te,G,t],illegal:[/\[/,/%/]},de={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[te,G,t],illegal:/\[|%/},xe={match:[/operator/,/\s+/,Vg],className:{1:"keyword",3:"title"}},ke={begin:[/precedencegroup/,/\s+/,Mf],className:{1:"keyword",3:"title"},contains:[V],keywords:[...b9,...rk],end:/}/},we={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},ze={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Qe={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Ei,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[te,...g,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:Mf},...g],relevance:0}]};for(const Ce of F.variants){const ht=Ce.contains.find(an=>an.label==="interpol");ht.keywords=h;const Pt=[...g,...b,...S,_,F,...Y];ht.contains=[...Pt,{begin:/\(/,end:/\)/,contains:["self",...Pt]}]}return{name:"Swift",keywords:h,contains:[...r,ne,de,we,ze,Qe,xe,ke,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},Q,...g,...b,...S,_,F,...Y,...L,V,ge]}}const mh="[A-Za-z$_][0-9A-Za-z$_]*",eC=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],tC=["true","false","null","undefined","NaN","Infinity"],nC=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],rC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],iC=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],aC=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],sC=[].concat(iC,nC,rC);function k9(e){const t=e.regex,n=(W,{after:K})=>{const D="</"+W[0].slice(1);return W.input.indexOf(D,K)!==-1},r=mh,a={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,K)=>{const D=W[0].length+W.index,L=W.input[D];if(L==="<"||L===","){K.ignoreMatch();return}L===">"&&(n(W,{after:D})||K.ignoreMatch());let V;const R=W.input.substring(D);if(V=R.match(/^\s*=/)){K.ignoreMatch();return}if((V=R.match(/^\s+extends\s+/))&&V.index===0){K.ignoreMatch();return}}},u={$pattern:mh,keyword:eC,literal:tC,built_in:sC,"variable.language":aC},d="[0-9](_?[0-9])*",h=`\\.(${d})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${g})((${h})|\\.)?|(${h}))[eE][+-]?(${d})\\b`},{begin:`\\b(${g})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},b={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},j={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,E,w,S,{match:/\$\d+/},m];y.contains=_.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(_)});const N=[].concat(j,y.contains),O=N.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(N)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:O},M={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},I={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...nC,...rC]}},F={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},$={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function q(W){return t.concat("(?!",W.join("|"),")")}const Q={match:t.concat(/\b/,q([...iC,"super","import"].map(W=>`${W}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},B={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),F,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,E,w,S,j,{match:/\$\d+/},m,I,{scope:"attr",match:r+t.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[j,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:o},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},$,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},B,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},Q,U,M,H,{match:/\$[(.]/}]}}function S9(e){const t=e.regex,n=k9(e),r=mh,a=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:a},contains:[n.exports.CLASS_REFERENCE]},u={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:mh,keyword:eC.concat(d),literal:tC,built_in:sC.concat(a),"variable.language":aC},g={className:"meta",begin:"@"+r},m=(w,S,k)=>{const j=w.contains.findIndex(_=>_.label===S);if(j===-1)throw new Error("can not find mode to replace");w.contains.splice(j,1,k)};Object.assign(n.keywords,h),n.exports.PARAMS_CONTAINS.push(g);const y=n.contains.find(w=>w.scope==="attr"),b=Object.assign({},y,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,y,b]),n.contains=n.contains.concat([g,o,l,b]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",u);const E=n.contains.find(w=>w.label==="func.def");return E.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function _9(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},a=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,l=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,a),/ *#/)},{begin:t.concat(/# */,u,/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,t.either(o,a),/ +/,t.either(l,u),/ *#/)}]},h={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},g={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,d,h,g,m,y,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[y]}]}}function N9(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],a={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},l={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},h={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,l,a,e.QUOTE_STRING_MODE,d,h,u]}}function C9(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},l=e.inherit(o,{begin:/\(/,end:/\)/}),u=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,d,u,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,l,d,u]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:h}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function j9(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},l={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,a]},u=e.inherit(l,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},b={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},E={begin:/\{/,end:/\}/,contains:[b],illegal:"\\n",relevance:0},w={begin:"\\[",end:"\\]",contains:[b],illegal:"\\n",relevance:0},S=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},E,w,o,l],k=[...S];return k.pop(),k.push(u),b.contains=k,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:S}}const A9={arduino:u$,bash:d$,c:f$,cpp:h$,csharp:p$,css:k$,diff:S$,go:_$,graphql:N$,ini:C$,java:j$,javascript:D$,json:R$,kotlin:I$,less:q$,lua:K$,makefile:G$,markdown:V$,objectivec:Y$,perl:Q$,php:W$,"php-template":X$,plaintext:Z$,python:J$,"python-repl":e9,r:t9,ruby:n9,rust:r9,scss:f9,shell:h9,sql:p9,swift:E9,typescript:S9,vbnet:_9,wasm:N9,xml:C9,yaml:j9};var Yg,ak;function T9(){if(ak)return Yg;ak=1;function e(J){return J instanceof Map?J.clear=J.delete=J.set=function(){throw new Error("map is read-only")}:J instanceof Set&&(J.add=J.clear=J.delete=function(){throw new Error("set is read-only")}),Object.freeze(J),Object.getOwnPropertyNames(J).forEach(he=>{const Se=J[he],qe=typeof Se;(qe==="object"||qe==="function")&&!Object.isFrozen(Se)&&e(Se)}),J}class t{constructor(he){he.data===void 0&&(he.data={}),this.data=he.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(J){return J.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(J,...he){const Se=Object.create(null);for(const qe in J)Se[qe]=J[qe];return he.forEach(function(qe){for(const Ot in qe)Se[Ot]=qe[Ot]}),Se}const a="</span>",o=J=>!!J.scope,l=(J,{prefix:he})=>{if(J.startsWith("language:"))return J.replace("language:","language-");if(J.includes(".")){const Se=J.split(".");return[`${he}${Se.shift()}`,...Se.map((qe,Ot)=>`${qe}${"_".repeat(Ot+1)}`)].join(" ")}return`${he}${J}`};class u{constructor(he,Se){this.buffer="",this.classPrefix=Se.classPrefix,he.walk(this)}addText(he){this.buffer+=n(he)}openNode(he){if(!o(he))return;const Se=l(he.scope,{prefix:this.classPrefix});this.span(Se)}closeNode(he){o(he)&&(this.buffer+=a)}value(){return this.buffer}span(he){this.buffer+=`<span class="${he}">`}}const d=(J={})=>{const he={children:[]};return Object.assign(he,J),he};class h{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(he){this.top.children.push(he)}openNode(he){const Se=d({scope:he});this.add(Se),this.stack.push(Se)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(he){return this.constructor._walk(he,this.rootNode)}static _walk(he,Se){return typeof Se=="string"?he.addText(Se):Se.children&&(he.openNode(Se),Se.children.forEach(qe=>this._walk(he,qe)),he.closeNode(Se)),he}static _collapse(he){typeof he!="string"&&he.children&&(he.children.every(Se=>typeof Se=="string")?he.children=[he.children.join("")]:he.children.forEach(Se=>{h._collapse(Se)}))}}class g extends h{constructor(he){super(),this.options=he}addText(he){he!==""&&this.add(he)}startScope(he){this.openNode(he)}endScope(){this.closeNode()}__addSublanguage(he,Se){const qe=he.root;Se&&(qe.scope=`language:${Se}`),this.add(qe)}toHTML(){return new u(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(J){return J?typeof J=="string"?J:J.source:null}function y(J){return w("(?=",J,")")}function b(J){return w("(?:",J,")*")}function E(J){return w("(?:",J,")?")}function w(...J){return J.map(Se=>m(Se)).join("")}function S(J){const he=J[J.length-1];return typeof he=="object"&&he.constructor===Object?(J.splice(J.length-1,1),he):{}}function k(...J){return"("+(S(J).capture?"":"?:")+J.map(qe=>m(qe)).join("|")+")"}function j(J){return new RegExp(J.toString()+"|").exec("").length-1}function _(J,he){const Se=J&&J.exec(he);return Se&&Se.index===0}const N=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function O(J,{joinWith:he}){let Se=0;return J.map(qe=>{Se+=1;const Ot=Se;let Et=m(qe),Ae="";for(;Et.length>0;){const Ne=N.exec(Et);if(!Ne){Ae+=Et;break}Ae+=Et.substring(0,Ne.index),Et=Et.substring(Ne.index+Ne[0].length),Ne[0][0]==="\\"&&Ne[1]?Ae+="\\"+String(Number(Ne[1])+Ot):(Ae+=Ne[0],Ne[0]==="("&&Se++)}return Ae}).map(qe=>`(${qe})`).join(he)}const A=/\b\B/,M="[a-zA-Z]\\w*",I="[a-zA-Z_]\\w*",F="\\b\\d+(\\.\\d+)?",$="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",U="\\b(0b[01]+)",q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Q=(J={})=>{const he=/^#![ ]*\//;return J.binary&&(J.begin=w(he,/.*\b/,J.binary,/\b.*/)),r({scope:"meta",begin:he,end:/$/,relevance:0,"on:begin":(Se,qe)=>{Se.index!==0&&qe.ignoreMatch()}},J)},B={begin:"\\\\[\\s\\S]",relevance:0},H={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[B]},z={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[B]},Y={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},W=function(J,he,Se={}){const qe=r({scope:"comment",begin:J,end:he,contains:[]},Se);qe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Ot=k("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return qe.contains.push({begin:w(/[ ]+/,"(",Ot,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),qe},K=W("//","$"),D=W("/\\*","\\*/"),L=W("#","$"),V={scope:"number",begin:F,relevance:0},R={scope:"number",begin:$,relevance:0},oe={scope:"number",begin:U,relevance:0},ge={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[B,{begin:/\[/,end:/\]/,relevance:0,contains:[B]}]},te={scope:"title",begin:M,relevance:0},ue={scope:"title",begin:I,relevance:0},G={begin:"\\.\\s*"+I,relevance:0};var de=Object.freeze({__proto__:null,APOS_STRING_MODE:H,BACKSLASH_ESCAPE:B,BINARY_NUMBER_MODE:oe,BINARY_NUMBER_RE:U,COMMENT:W,C_BLOCK_COMMENT_MODE:D,C_LINE_COMMENT_MODE:K,C_NUMBER_MODE:R,C_NUMBER_RE:$,END_SAME_AS_BEGIN:function(J){return Object.assign(J,{"on:begin":(he,Se)=>{Se.data._beginMatch=he[1]},"on:end":(he,Se)=>{Se.data._beginMatch!==he[1]&&Se.ignoreMatch()}})},HASH_COMMENT_MODE:L,IDENT_RE:M,MATCH_NOTHING_RE:A,METHOD_GUARD:G,NUMBER_MODE:V,NUMBER_RE:F,PHRASAL_WORDS_MODE:Y,QUOTE_STRING_MODE:z,REGEXP_MODE:ge,RE_STARTERS_RE:q,SHEBANG:Q,TITLE_MODE:te,UNDERSCORE_IDENT_RE:I,UNDERSCORE_TITLE_MODE:ue});function xe(J,he){J.input[J.index-1]==="."&&he.ignoreMatch()}function ke(J,he){J.className!==void 0&&(J.scope=J.className,delete J.className)}function we(J,he){he&&J.beginKeywords&&(J.begin="\\b("+J.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",J.__beforeBegin=xe,J.keywords=J.keywords||J.beginKeywords,delete J.beginKeywords,J.relevance===void 0&&(J.relevance=0))}function ze(J,he){Array.isArray(J.illegal)&&(J.illegal=k(...J.illegal))}function Qe(J,he){if(J.match){if(J.begin||J.end)throw new Error("begin & end are not supported with match");J.begin=J.match,delete J.match}}function Ce(J,he){J.relevance===void 0&&(J.relevance=1)}const ht=(J,he)=>{if(!J.beforeMatch)return;if(J.starts)throw new Error("beforeMatch cannot be used with starts");const Se=Object.assign({},J);Object.keys(J).forEach(qe=>{delete J[qe]}),J.keywords=Se.keywords,J.begin=w(Se.beforeMatch,y(Se.begin)),J.starts={relevance:0,contains:[Object.assign(Se,{endsParent:!0})]},J.relevance=0,delete Se.beforeMatch},Pt=["of","and","for","in","not","or","if","then","parent","list","value"],an="keyword";function ln(J,he,Se=an){const qe=Object.create(null);return typeof J=="string"?Ot(Se,J.split(" ")):Array.isArray(J)?Ot(Se,J):Object.keys(J).forEach(function(Et){Object.assign(qe,ln(J[Et],he,Et))}),qe;function Ot(Et,Ae){he&&(Ae=Ae.map(Ne=>Ne.toLowerCase())),Ae.forEach(function(Ne){const $e=Ne.split("|");qe[$e[0]]=[Et,jn($e[0],$e[1])]})}}function jn(J,he){return he?Number(he):Yr(J)?0:1}function Yr(J){return Pt.includes(J.toLowerCase())}const Jn={},bt=J=>{console.error(J)},En=(J,...he)=>{console.log(`WARN: ${J}`,...he)},ce=(J,he)=>{Jn[`${J}/${he}`]||(console.log(`Deprecated as of ${J}. ${he}`),Jn[`${J}/${he}`]=!0)},ye=new Error;function Re(J,he,{key:Se}){let qe=0;const Ot=J[Se],Et={},Ae={};for(let Ne=1;Ne<=he.length;Ne++)Ae[Ne+qe]=Ot[Ne],Et[Ne+qe]=!0,qe+=j(he[Ne-1]);J[Se]=Ae,J[Se]._emit=Et,J[Se]._multi=!0}function We(J){if(Array.isArray(J.begin)){if(J.skip||J.excludeBegin||J.returnBegin)throw bt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ye;if(typeof J.beginScope!="object"||J.beginScope===null)throw bt("beginScope must be object"),ye;Re(J,J.begin,{key:"beginScope"}),J.begin=O(J.begin,{joinWith:""})}}function at(J){if(Array.isArray(J.end)){if(J.skip||J.excludeEnd||J.returnEnd)throw bt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ye;if(typeof J.endScope!="object"||J.endScope===null)throw bt("endScope must be object"),ye;Re(J,J.end,{key:"endScope"}),J.end=O(J.end,{joinWith:""})}}function An(J){J.scope&&typeof J.scope=="object"&&J.scope!==null&&(J.beginScope=J.scope,delete J.scope)}function fr(J){An(J),typeof J.beginScope=="string"&&(J.beginScope={_wrap:J.beginScope}),typeof J.endScope=="string"&&(J.endScope={_wrap:J.endScope}),We(J),at(J)}function gn(J){function he(Ae,Ne){return new RegExp(m(Ae),"m"+(J.case_insensitive?"i":"")+(J.unicodeRegex?"u":"")+(Ne?"g":""))}class Se{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ne,$e){$e.position=this.position++,this.matchIndexes[this.matchAt]=$e,this.regexes.push([$e,Ne]),this.matchAt+=j(Ne)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ne=this.regexes.map($e=>$e[1]);this.matcherRe=he(O(Ne,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ne){this.matcherRe.lastIndex=this.lastIndex;const $e=this.matcherRe.exec(Ne);if(!$e)return null;const Vt=$e.findIndex((Qr,ba)=>ba>0&&Qr!==void 0),It=this.matchIndexes[Vt];return $e.splice(0,Vt),Object.assign($e,It)}}class qe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ne){if(this.multiRegexes[Ne])return this.multiRegexes[Ne];const $e=new Se;return this.rules.slice(Ne).forEach(([Vt,It])=>$e.addRule(Vt,It)),$e.compile(),this.multiRegexes[Ne]=$e,$e}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ne,$e){this.rules.push([Ne,$e]),$e.type==="begin"&&this.count++}exec(Ne){const $e=this.getMatcher(this.regexIndex);$e.lastIndex=this.lastIndex;let Vt=$e.exec(Ne);if(this.resumingScanAtSamePosition()&&!(Vt&&Vt.index===this.lastIndex)){const It=this.getMatcher(0);It.lastIndex=this.lastIndex+1,Vt=It.exec(Ne)}return Vt&&(this.regexIndex+=Vt.position+1,this.regexIndex===this.count&&this.considerAll()),Vt}}function Ot(Ae){const Ne=new qe;return Ae.contains.forEach($e=>Ne.addRule($e.begin,{rule:$e,type:"begin"})),Ae.terminatorEnd&&Ne.addRule(Ae.terminatorEnd,{type:"end"}),Ae.illegal&&Ne.addRule(Ae.illegal,{type:"illegal"}),Ne}function Et(Ae,Ne){const $e=Ae;if(Ae.isCompiled)return $e;[ke,Qe,fr,ht].forEach(It=>It(Ae,Ne)),J.compilerExtensions.forEach(It=>It(Ae,Ne)),Ae.__beforeBegin=null,[we,ze,Ce].forEach(It=>It(Ae,Ne)),Ae.isCompiled=!0;let Vt=null;return typeof Ae.keywords=="object"&&Ae.keywords.$pattern&&(Ae.keywords=Object.assign({},Ae.keywords),Vt=Ae.keywords.$pattern,delete Ae.keywords.$pattern),Vt=Vt||/\w+/,Ae.keywords&&(Ae.keywords=ln(Ae.keywords,J.case_insensitive)),$e.keywordPatternRe=he(Vt,!0),Ne&&(Ae.begin||(Ae.begin=/\B|\b/),$e.beginRe=he($e.begin),!Ae.end&&!Ae.endsWithParent&&(Ae.end=/\B|\b/),Ae.end&&($e.endRe=he($e.end)),$e.terminatorEnd=m($e.end)||"",Ae.endsWithParent&&Ne.terminatorEnd&&($e.terminatorEnd+=(Ae.end?"|":"")+Ne.terminatorEnd)),Ae.illegal&&($e.illegalRe=he(Ae.illegal)),Ae.contains||(Ae.contains=[]),Ae.contains=[].concat(...Ae.contains.map(function(It){return kn(It==="self"?Ae:It)})),Ae.contains.forEach(function(It){Et(It,$e)}),Ae.starts&&Et(Ae.starts,Ne),$e.matcher=Ot($e),$e}if(J.compilerExtensions||(J.compilerExtensions=[]),J.contains&&J.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return J.classNameAliases=r(J.classNameAliases||{}),Et(J)}function $t(J){return J?J.endsWithParent||$t(J.starts):!1}function kn(J){return J.variants&&!J.cachedVariants&&(J.cachedVariants=J.variants.map(function(he){return r(J,{variants:null},he)})),J.cachedVariants?J.cachedVariants:$t(J)?r(J,{starts:J.starts?r(J.starts):null}):Object.isFrozen(J)?r(J):J}var xt="11.11.1";class jr extends Error{constructor(he,Se){super(he),this.name="HTMLInjectionError",this.html=Se}}const Tn=n,bo=r,Ri=Symbol("nomatch"),ya=7,Li=function(J){const he=Object.create(null),Se=Object.create(null),qe=[];let Ot=!0;const Et="Could not find the language '{}', did you forget to load/include a language module?",Ae={disableAutodetect:!0,name:"Plain text",contains:[]};let Ne={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function $e(be){return Ne.noHighlightRe.test(be)}function Vt(be){let Le=be.className+" ";Le+=be.parentNode?be.parentNode.className:"";const et=Ne.languageDetectRe.exec(Le);if(et){const mt=Mn(et[1]);return mt||(En(Et.replace("{}",et[1])),En("Falling back to no-highlight mode for this block.",be)),mt?et[1]:"no-highlight"}return Le.split(/\s+/).find(mt=>$e(mt)||Mn(mt))}function It(be,Le,et){let mt="",Qt="";typeof Le=="object"?(mt=be,et=Le.ignoreIllegals,Qt=Le.language):(ce("10.7.0","highlight(lang, code, ...args) has been deprecated."),ce("10.7.0",`Please use highlight(code, options) instead.
|
|
574
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Qt=be,mt=Le),et===void 0&&(et=!0);const _n={code:mt,language:Qt};zi("before:highlight",_n);const qn=_n.result?_n.result:Qr(_n.language,_n.code,et);return qn.code=_n.code,zi("after:highlight",qn),qn}function Qr(be,Le,et,mt){const Qt=Object.create(null);function _n(Ee,Te){return Ee.keywords[Te]}function qn(){if(!He.keywords){cn.addText(kt);return}let Ee=0;He.keywordPatternRe.lastIndex=0;let Te=He.keywordPatternRe.exec(kt),Ve="";for(;Te;){Ve+=kt.substring(Ee,Te.index);const st=yn.case_insensitive?Te[0].toLowerCase():Te[0],Wt=_n(He,st);if(Wt){const[Tr,tc]=Wt;if(cn.addText(Ve),Ve="",Qt[st]=(Qt[st]||0)+1,Qt[st]<=ya&&(_a+=tc),Tr.startsWith("_"))Ve+=Te[0];else{const rd=yn.classNameAliases[Tr]||Tr;Kn(Te[0],rd)}}else Ve+=Te[0];Ee=He.keywordPatternRe.lastIndex,Te=He.keywordPatternRe.exec(kt)}Ve+=kt.substring(Ee),cn.addText(Ve)}function zn(){if(kt==="")return;let Ee=null;if(typeof He.subLanguage=="string"){if(!he[He.subLanguage]){cn.addText(kt);return}Ee=Qr(He.subLanguage,kt,!0,nd[He.subLanguage]),nd[He.subLanguage]=Ee._top}else Ee=xa(kt,He.subLanguage.length?He.subLanguage:null);He.relevance>0&&(_a+=Ee.relevance),cn.__addSublanguage(Ee._emitter,Ee.language)}function Nt(){He.subLanguage!=null?zn():qn(),kt=""}function Kn(Ee,Te){Ee!==""&&(cn.startScope(Te),cn.addText(Ee),cn.endScope())}function wo(Ee,Te){let Ve=1;const st=Te.length-1;for(;Ve<=st;){if(!Ee._emit[Ve]){Ve++;continue}const Wt=yn.classNameAliases[Ee[Ve]]||Ee[Ve],Tr=Te[Ve];Wt?Kn(Tr,Wt):(kt=Tr,qn(),kt=""),Ve++}}function Ea(Ee,Te){return Ee.scope&&typeof Ee.scope=="string"&&cn.openNode(yn.classNameAliases[Ee.scope]||Ee.scope),Ee.beginScope&&(Ee.beginScope._wrap?(Kn(kt,yn.classNameAliases[Ee.beginScope._wrap]||Ee.beginScope._wrap),kt=""):Ee.beginScope._multi&&(wo(Ee.beginScope,Te),kt="")),He=Object.create(Ee,{parent:{value:He}}),He}function yi(Ee,Te,Ve){let st=_(Ee.endRe,Ve);if(st){if(Ee["on:end"]){const Wt=new t(Ee);Ee["on:end"](Te,Wt),Wt.isMatchIgnored&&(st=!1)}if(st){for(;Ee.endsParent&&Ee.parent;)Ee=Ee.parent;return Ee}}if(Ee.endsWithParent)return yi(Ee.parent,Te,Ve)}function ka(Ee){return He.matcher.regexIndex===0?(kt+=Ee[0],1):(Na=!0,0)}function Eo(Ee){const Te=Ee[0],Ve=Ee.rule,st=new t(Ve),Wt=[Ve.__beforeBegin,Ve["on:begin"]];for(const Tr of Wt)if(Tr&&(Tr(Ee,st),st.isMatchIgnored))return ka(Te);return Ve.skip?kt+=Te:(Ve.excludeBegin&&(kt+=Te),Nt(),!Ve.returnBegin&&!Ve.excludeBegin&&(kt=Te)),Ea(Ve,Ee),Ve.returnBegin?0:Te.length}function Pn(Ee){const Te=Ee[0],Ve=Le.substring(Ee.index),st=yi(He,Ee,Ve);if(!st)return Ri;const Wt=He;He.endScope&&He.endScope._wrap?(Nt(),Kn(Te,He.endScope._wrap)):He.endScope&&He.endScope._multi?(Nt(),wo(He.endScope,Ee)):Wt.skip?kt+=Te:(Wt.returnEnd||Wt.excludeEnd||(kt+=Te),Nt(),Wt.excludeEnd&&(kt=Te));do He.scope&&cn.closeNode(),!He.skip&&!He.subLanguage&&(_a+=He.relevance),He=He.parent;while(He!==st.parent);return st.starts&&Ea(st.starts,Ee),Wt.returnEnd?0:Te.length}function ws(){const Ee=[];for(let Te=He;Te!==yn;Te=Te.parent)Te.scope&&Ee.unshift(Te.scope);Ee.forEach(Te=>cn.openNode(Te))}let ei={};function Sa(Ee,Te){const Ve=Te&&Te[0];if(kt+=Ee,Ve==null)return Nt(),0;if(ei.type==="begin"&&Te.type==="end"&&ei.index===Te.index&&Ve===""){if(kt+=Le.slice(Te.index,Te.index+1),!Ot){const st=new Error(`0 width match regex (${be})`);throw st.languageName=be,st.badRule=ei.rule,st}return 1}if(ei=Te,Te.type==="begin")return Eo(Te);if(Te.type==="illegal"&&!et){const st=new Error('Illegal lexeme "'+Ve+'" for mode "'+(He.scope||"<unnamed>")+'"');throw st.mode=He,st}else if(Te.type==="end"){const st=Pn(Te);if(st!==Ri)return st}if(Te.type==="illegal"&&Ve==="")return kt+=`
|
|
575
|
+
`,1;if(ec>1e5&&ec>Te.index*3)throw new Error("potential infinite loop, way more iterations than matches");return kt+=Ve,Ve.length}const yn=Mn(be);if(!yn)throw bt(Et.replace("{}",be)),new Error('Unknown language: "'+be+'"');const Es=gn(yn);let ko="",He=mt||Es;const nd={},cn=new Ne.__emitter(Ne);ws();let kt="",_a=0,Pi=0,ec=0,Na=!1;try{if(yn.__emitTokens)yn.__emitTokens(Le,cn);else{for(He.matcher.considerAll();;){ec++,Na?Na=!1:He.matcher.considerAll(),He.matcher.lastIndex=Pi;const Ee=He.matcher.exec(Le);if(!Ee)break;const Te=Le.substring(Pi,Ee.index),Ve=Sa(Te,Ee);Pi=Ee.index+Ve}Sa(Le.substring(Pi))}return cn.finalize(),ko=cn.toHTML(),{language:be,value:ko,relevance:_a,illegal:!1,_emitter:cn,_top:He}}catch(Ee){if(Ee.message&&Ee.message.includes("Illegal"))return{language:be,value:Tn(Le),illegal:!0,relevance:0,_illegalBy:{message:Ee.message,index:Pi,context:Le.slice(Pi-100,Pi+100),mode:Ee.mode,resultSoFar:ko},_emitter:cn};if(Ot)return{language:be,value:Tn(Le),illegal:!1,relevance:0,errorRaised:Ee,_emitter:cn,_top:He};throw Ee}}function ba(be){const Le={value:Tn(be),illegal:!1,relevance:0,_top:Ae,_emitter:new Ne.__emitter(Ne)};return Le._emitter.addText(be),Le}function xa(be,Le){Le=Le||Ne.languages||Object.keys(he);const et=ba(be),mt=Le.filter(Mn).filter(Zr).map(Nt=>Qr(Nt,be,!1));mt.unshift(et);const Qt=mt.sort((Nt,Kn)=>{if(Nt.relevance!==Kn.relevance)return Kn.relevance-Nt.relevance;if(Nt.language&&Kn.language){if(Mn(Nt.language).supersetOf===Kn.language)return 1;if(Mn(Kn.language).supersetOf===Nt.language)return-1}return 0}),[_n,qn]=Qt,zn=_n;return zn.secondBest=qn,zn}function Ar(be,Le,et){const mt=Le&&Se[Le]||et;be.classList.add("hljs"),be.classList.add(`language-${mt}`)}function Yt(be){let Le=null;const et=Vt(be);if($e(et))return;if(zi("before:highlightElement",{el:be,language:et}),be.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",be);return}if(be.children.length>0&&(Ne.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(be)),Ne.throwUnescapedHTML))throw new jr("One of your code blocks includes unescaped HTML.",be.innerHTML);Le=be;const mt=Le.textContent,Qt=et?It(mt,{language:et,ignoreIllegals:!0}):xa(mt);be.innerHTML=Qt.value,be.dataset.highlighted="yes",Ar(be,et,Qt.language),be.result={language:Qt.language,re:Qt.relevance,relevance:Qt.relevance},Qt.secondBest&&(be.secondBest={language:Qt.secondBest.language,relevance:Qt.secondBest.relevance}),zi("after:highlightElement",{el:be,result:Qt,text:mt})}function Sn(be){Ne=bo(Ne,be)}const Wr=()=>{wa(),ce("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function va(){wa(),ce("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let xs=!1;function wa(){function be(){wa()}if(document.readyState==="loading"){xs||window.addEventListener("DOMContentLoaded",be,!1),xs=!0;return}document.querySelectorAll(Ne.cssSelector).forEach(Yt)}function xo(be,Le){let et=null;try{et=Le(J)}catch(mt){if(bt("Language definition for '{}' could not be registered.".replace("{}",be)),Ot)bt(mt);else throw mt;et=Ae}et.name||(et.name=be),he[be]=et,et.rawDefinition=Le.bind(null,J),et.aliases&&Xr(et.aliases,{languageName:be})}function Ii(be){delete he[be];for(const Le of Object.keys(Se))Se[Le]===be&&delete Se[Le]}function vs(){return Object.keys(he)}function Mn(be){return be=(be||"").toLowerCase(),he[be]||he[Se[be]]}function Xr(be,{languageName:Le}){typeof be=="string"&&(be=[be]),be.forEach(et=>{Se[et.toLowerCase()]=Le})}function Zr(be){const Le=Mn(be);return Le&&!Le.disableAutodetect}function gi(be){be["before:highlightBlock"]&&!be["before:highlightElement"]&&(be["before:highlightElement"]=Le=>{be["before:highlightBlock"](Object.assign({block:Le.el},Le))}),be["after:highlightBlock"]&&!be["after:highlightElement"]&&(be["after:highlightElement"]=Le=>{be["after:highlightBlock"](Object.assign({block:Le.el},Le))})}function Jt(be){gi(be),qe.push(be)}function vo(be){const Le=qe.indexOf(be);Le!==-1&&qe.splice(Le,1)}function zi(be,Le){const et=be;qe.forEach(function(mt){mt[et]&&mt[et](Le)})}function Jr(be){return ce("10.7.0","highlightBlock will be removed entirely in v12.0"),ce("10.7.0","Please use highlightElement now."),Yt(be)}Object.assign(J,{highlight:It,highlightAuto:xa,highlightAll:wa,highlightElement:Yt,highlightBlock:Jr,configure:Sn,initHighlighting:Wr,initHighlightingOnLoad:va,registerLanguage:xo,unregisterLanguage:Ii,listLanguages:vs,getLanguage:Mn,registerAliases:Xr,autoDetection:Zr,inherit:bo,addPlugin:Jt,removePlugin:vo}),J.debugMode=function(){Ot=!1},J.safeMode=function(){Ot=!0},J.versionString=xt,J.regex={concat:w,lookahead:y,either:k,optional:E,anyNumberOfTimes:b};for(const be in de)typeof de[be]=="object"&&e(de[be]);return Object.assign(J,de),J},In=Li({});return In.newInstance=()=>Li({}),Yg=In,In.HighlightJS=In,In.default=In,Yg}var M9=T9();const O9=Lu(M9),sk={},D9="hljs-";function R9(e){const t=O9.newInstance();return e&&o(e),{highlight:n,highlightAuto:r,listLanguages:a,register:o,registerAlias:l,registered:u};function n(d,h,g){const m=g||sk,y=typeof m.prefix=="string"?m.prefix:D9;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:L9,classPrefix:y});const b=t.highlight(h,{ignoreIllegals:!0,language:d});if(b.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:b.errorRaised});const E=b._emitter.root,w=E.data;return w.language=b.language,w.relevance=b.relevance,E}function r(d,h){const m=(h||sk).subset||a();let y=-1,b=0,E;for(;++y<m.length;){const w=m[y];if(!t.getLanguage(w))continue;const S=n(w,d,h);S.data&&S.data.relevance!==void 0&&S.data.relevance>b&&(b=S.data.relevance,E=S)}return E||{type:"root",children:[],data:{language:void 0,relevance:b}}}function a(){return t.listLanguages()}function o(d,h){if(typeof d=="string")t.registerLanguage(d,h);else{let g;for(g in d)Object.hasOwn(d,g)&&t.registerLanguage(g,d[g])}}function l(d,h){if(typeof d=="string")t.registerAliases(typeof h=="string"?h:[...h],{languageName:d});else{let g;for(g in d)if(Object.hasOwn(d,g)){const m=d[g];t.registerAliases(typeof m=="string"?m:[...m],{languageName:g})}}}function u(d){return!!t.getLanguage(d)}}class L9{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],a=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:a}):r.children.push(...a)}openNode(t){const n=this,r=t.split(".").map(function(l,u){return u?l+"_".repeat(u):n.options.classPrefix+l}),a=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:r},children:[]};a.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const I9={};function yx(e){const t=e||I9,n=t.aliases,r=t.detect||!1,a=t.languages||A9,o=t.plainText,l=t.prefix,u=t.subset;let d="hljs";const h=R9(a);if(n&&h.registerAlias(n),l){const g=l.indexOf("-");d=g===-1?l:l.slice(0,g)}return function(g,m){Qh(g,"element",function(y,b,E){if(y.tagName!=="code"||!E||E.type!=="element"||E.tagName!=="pre")return;const w=z9(y);if(w===!1||!w&&!r||w&&o&&o.includes(w))return;Array.isArray(y.properties.className)||(y.properties.className=[]),y.properties.className.includes(d)||y.properties.className.unshift(d);const S=n$(y,{whitespace:"pre"});let k;try{k=w?h.highlight(w,S,{prefix:l}):h.highlightAuto(S,{prefix:l,subset:u})}catch(j){const _=j;if(w&&/Unknown language/.test(_.message)){m.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[E,y],cause:_,place:y.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw _}!w&&k.data&&k.data.language&&y.properties.className.push("language-"+k.data.language),k.children.length>0&&(y.children=k.children)})}}function z9(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const a=String(t[n]);if(a==="no-highlight"||a==="nohighlight")return!1;!r&&a.slice(0,5)==="lang-"&&(r=a.slice(5)),!r&&a.slice(0,9)==="language-"&&(r=a.slice(9))}return r}function P9({name:e,onClose:t}){const n=Be(),{data:r,isLoading:a,isError:o,error:l}=tt({queryKey:["skill",e],queryFn:()=>AI(e)});return T.useEffect(()=>{const u=d=>{d.key==="Escape"&&t()};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[t]),f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:f.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl",children:[f.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),r&&f.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[r.category," · ",r.origin||"local"]})]}),f.jsx("button",{onClick:t,className:"nb-btn nb-btn-mint p-2","aria-label":n("skillDetail.close.aria"),type:"button",children:f.jsx(_r,{size:16,strokeWidth:3})})]}),a&&f.jsx("p",{children:n("skillDetail.loading")}),o&&f.jsx("p",{className:"text-[var(--color-crashed)]",children:n("skillDetail.error.load",{detail:l instanceof Error?l.message:String(l)})}),r&&f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:n("skillDetail.section.preview")}),f.jsx("div",{className:"prose-chat bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-80 overflow-auto text-sm",children:r.body?f.jsx(ux,{remarkPlugins:[px],rehypePlugins:[yx],children:r.body}):f.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),r.references.length>0&&f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),f.jsx("ul",{className:"flex flex-col gap-2",children:r.references.map(u=>f.jsx(B9,{skillName:e,file:u.name,lines:u.lines},u.name))})]})]})]})})}function B9({skillName:e,file:t,lines:n}){const r=Be(),[a,o]=T.useState(!1),{data:l,isLoading:u,isError:d,error:h}=tt({queryKey:["skill-ref",e,t],queryFn:()=>TI(e,t),enabled:a,staleTime:1/0});return f.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[f.jsxs("button",{type:"button",onClick:()=>o(g=>!g),"aria-label":r("skillDetail.toggleSection.aria",{action:r(a?"skillDetail.collapse":"skillDetail.expand"),file:t}),"aria-expanded":a,className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[f.jsx(Uu,{size:12,strokeWidth:3,className:["transition-transform",a?"rotate-90":""].join(" ")}),f.jsx($u,{size:12,strokeWidth:2.5}),f.jsx("span",{className:"flex-1 text-left font-bold",children:t}),f.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[n," lines"]})]}),a&&f.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[u&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:r("skillDetail.loading")}),d&&f.jsx("p",{className:"text-xs text-[var(--color-crashed)]",children:r("skillDetail.error.load",{detail:h instanceof Error?h.message:String(h)})}),l&&f.jsx("div",{className:"prose-chat text-sm",children:f.jsx(ux,{remarkPlugins:[px],rehypePlugins:[yx],children:l.content})})]})]})}const U9=[{value:"all",labelKey:"skills.category.all"},{value:"language",labelKey:"skills.category.language"},{value:"end",labelKey:"skills.category.end"},{value:"persona",labelKey:"skills.category.persona"},{value:"workflow",labelKey:"skills.category.workflow"},{value:"other",labelKey:"skills.category.other"}],$9={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function F9(){const e=Be(),[t,n]=T.useState("all"),[r,a]=T.useState(""),[o,l]=T.useState(null),u=wn(),{data:d,isLoading:h}=tt({queryKey:["skills"],queryFn:()=>Kb()}),g=tt({queryKey:["projects"],queryFn:pa}),m=T.useMemo(()=>((d==null?void 0:d.data)??[]).filter(E=>!(t!=="all"&&E.category!==t||r&&!E.name.toLowerCase().includes(r.toLowerCase()))),[d,t,r]),y=T.useMemo(()=>{const b=(d==null?void 0:d.data)??[],E={all:b.length};for(const w of b)E[w.category]=(E[w.category]??0)+1;return E},[d]);return f.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[f.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:h?e("common.loading"):e("skills.subtitleCount",{count:(d==null?void 0:d.data.length)??0})})]}),f.jsx("div",{className:"flex gap-3 items-center",children:f.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await OI(),u.invalidateQueries({queryKey:["skills"]})},type:"button",children:[f.jsx(ps,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsxs("div",{className:"relative flex-1 max-w-md",children:[f.jsx(ah,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),f.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("skills.search.placeholder"),value:r,onChange:b=>a(b.target.value),"aria-label":e("skills.search.aria")})]}),f.jsx("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:U9.map(b=>f.jsxs("button",{type:"button",onClick:()=>n(b.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",t===b.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[e(b.labelKey)," ",y[b.value]]},b.value))})]}),f.jsx("div",{className:"grid gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:m.map(b=>{var E;return f.jsx(H9,{skill:b,projectCount:((E=g.data)==null?void 0:E.data.length)??0,onOpen:()=>l(b.name)},b.name)})}),o&&f.jsx(P9,{name:o,onClose:()=>l(null)})]})}function H9({skill:e,projectCount:t,onOpen:n}){const r=$9[e.category];return f.jsxs("article",{onClick:n,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n())},tabIndex:0,role:"button","aria-label":`Open ${e.name}`,className:"nb-card nb-card-interactive flex flex-col gap-3",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),f.jsx("span",{className:"nb-badge text-[10px]",style:{background:r},children:e.category})]}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),f.jsxs("div",{className:"flex items-center justify-between text-xs font-[family-name:var(--font-mono)] pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[f.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),f.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function q9(){var o;const e=Be(),t=tt({queryKey:["system-info"],queryFn:M_}),n=tt({queryKey:["system-env"],queryFn:CL}),[r,a]=T.useState(!1);return f.jsxs("div",{className:"flex flex-col gap-6 w-full",children:[f.jsx("header",{children:f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("system.h1")})}),f.jsx(K9,{current:(o=t.data)==null?void 0:o.version}),f.jsxs("section",{className:"nb-card",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("system.runtime")}),t.data?f.jsxs("dl",{className:"grid grid-cols-1 sm:grid-cols-[160px_1fr] gap-y-2 text-sm",children:[f.jsx("dt",{className:"font-bold",children:"Node"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.nodeVersion}),f.jsx("dt",{className:"font-bold",children:"Platform"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.platform}),f.jsx("dt",{className:"font-bold",children:"PID"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.pid??"—"}),f.jsx("dt",{className:"font-bold",children:"Uptime"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:Q9(t.data.uptimeMs)})]}):f.jsx("p",{className:"text-[var(--color-text-muted)]",children:e("common.loading")})]}),f.jsxs("section",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:[e("system.env.title.prefix"),f.jsx("code",{className:"text-sm font-[family-name:var(--font-mono)] font-normal bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"~/.coral/env"})]}),r?f.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:e("system.env.editing.label")}):f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a(!0),type:"button","aria-label":e("system.env.edit.aria"),children:[f.jsx(_b,{size:12,strokeWidth:2.5})," ",e("system.env.edit.button")]})]}),r?f.jsx(G9,{onClose:()=>{a(!1),n.refetch()}}):n.data&&n.data.exists?f.jsx("dl",{className:"grid grid-cols-1 sm:grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:n.data.entries.map(l=>f.jsxs("div",{className:"contents",children:[f.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[l.masked&&f.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),l.key]}),f.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:l.value})]},l.key))}):f.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:[e("system.env.empty.before"),f.jsx("code",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded font-[family-name:var(--font-mono)]",children:"sps setup"}),e("system.env.empty.after")]})]}),f.jsx(V9,{})]})}function K9({current:e}){var w;const t=Be(),{confirm:n,alert:r}=Zn(),[a,o]=T.useState(!1),[l,u]=T.useState(null),d=tt({queryKey:["latest-version"],queryFn:DL,enabled:!1}),[h,g]=T.useState(null),[m,y]=T.useState("npm i -g @coralai/sps-cli@latest"),b=async()=>{var k;if(await n({title:t("system.upgrade.confirm.title"),body:t("system.upgrade.confirm.body",{current:e??"?",latest:((k=d.data)==null?void 0:k.latest)??"?"}),confirm:t("system.upgrade.confirm.button")})){o(!0),u(null),g(null);try{const j=await RL();if(u(j.output),g(j.installedVersion),y(j.command),j.ok)r({title:t("system.upgrade.success.title"),body:t("system.upgrade.success.body",{version:j.installedVersion??"?"})});else{const _=j.installedVersion&&j.installedVersion===e?t("system.upgrade.notEffective.same",{version:j.installedVersion}):t("system.upgrade.notEffective.notInstalled");r({title:t("system.upgrade.notEffective.title"),body:_})}}catch(j){u(j.message),r({title:t("system.upgrade.error.title"),body:j.message})}finally{o(!1)}}},E=async()=>{const S=d.data&&!d.data.upToDate?`npm i -g @coralai/sps-cli@${d.data.latest}`:m;try{await navigator.clipboard.writeText(S),r({title:t("system.upgrade.copy.success.title"),body:t("system.upgrade.copy.success.body",{cmd:S})})}catch{r({title:t("system.upgrade.copy.fail.title"),body:t("system.upgrade.copy.fail.body",{cmd:S})})}};return f.jsxs("section",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:t("system.upgrade.title")}),f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>d.refetch(),disabled:d.isFetching||!e,type:"button","aria-label":t("system.upgrade.checkLatest.aria"),children:[d.isFetching?f.jsx(pt,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(ps,{size:12,strokeWidth:2.5}),t("system.upgrade.checkUpdate")]})]}),f.jsxs("dl",{className:"grid grid-cols-1 sm:grid-cols-[160px_1fr] gap-y-2 text-sm",children:[f.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.current")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),d.data&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.latest")}),f.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2 flex-wrap",children:[d.data.latest,d.data.upToDate?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("system.upgrade.latestPill")}):f.jsxs(f.Fragment,{children:[f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:b,disabled:a,type:"button","aria-label":t("system.upgrade.button.upgradeAria"),children:[a?f.jsx(pt,{size:11,strokeWidth:3,className:"animate-spin"}):f.jsx(y_,{size:11,strokeWidth:2.5}),t("system.upgrade.button.upgrade")]}),f.jsxs("button",{className:"nb-btn",style:{padding:"3px 10px",fontSize:11},onClick:E,type:"button","aria-label":t("system.upgrade.button.copyAria"),title:t("system.upgrade.button.copyTitle"),children:[f.jsx(rR,{size:11,strokeWidth:2.5})," ",t("system.upgrade.button.copy")]})]})]})]}),h&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.installed")}),f.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[h,h===((w=d.data)==null?void 0:w.latest)?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("system.upgrade.installed.ok")}):h===e?f.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:t("system.upgrade.installed.fail")}):null]})]}),d.isError&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.check")}),f.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:d.error instanceof Error?d.error.message:String(d.error)})]})]}),l&&f.jsx("pre",{className:"mt-3 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-40 overflow-auto whitespace-pre-wrap",children:l})]})}function G9({onClose:e}){const t=Be(),n=wn(),{alert:r}=Zn(),a=tt({queryKey:["system-env-raw"],queryFn:jL}),[o,l]=T.useState(null),[u,d]=T.useState(null);T.useEffect(()=>{a.data&&o===null&&(l(a.data.content),d(a.data.etag))},[a.data,o]);const h=o!==null&&a.data&&o!==a.data.content,g=rn({mutationFn:()=>{if(o===null)throw new Error("no draft");return AL(o,u??"")},onSuccess:()=>{n.invalidateQueries({queryKey:["system-env"]}),n.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:m=>{const y=m.status;r({title:t(y===409?"system.env.error.conflict.title":"system.env.error.save.title"),body:y===409?t("system.env.error.conflict.body"):m instanceof Error?m.message:String(m)})}});return a.isLoading?f.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")}):f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:t("system.env.warning")}),f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:o??"",onChange:m=>l(m.target.value),spellCheck:!1,"aria-label":t("system.env.aria")}),f.jsxs("div",{className:"flex items-center justify-between mt-3",children:[f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[u?`etag: ${u}`:"",h?t("system.env.dirtyMark"):""]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:g.isPending,type:"button",children:[f.jsx(_r,{size:12,strokeWidth:3})," ",t("system.env.cancel")]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>g.mutate(),disabled:!h||g.isPending,type:"button","aria-label":t("system.env.save.aria"),children:[g.isPending?f.jsx(pt,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(ql,{size:12,strokeWidth:3}),t("system.env.save")]})]})]})]})}function V9(){var y;const e=Be(),{alert:t}=Zn(),n=tt({queryKey:["projects"],queryFn:pa}),[r,a]=T.useState({}),[o,l]=T.useState({}),[u,d]=T.useState({}),h=(((y=n.data)==null?void 0:y.data)??[]).map(b=>({project:b.name})),g=async(b,E)=>{l(w=>({...w,[b]:E?"fix":"check"}));try{const w=await LL(b,E);a(S=>({...S,[b]:w})),d(S=>({...S,[b]:!0}))}catch(w){t({title:e(E?"system.diagnostics.error.fix":"system.diagnostics.error.check"),body:w instanceof Error?w.message:String(w)})}finally{l(w=>({...w,[b]:null}))}},m=async()=>{for(const b of h)await g(b.project,!1)};return f.jsxs("section",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:e("system.diagnostics.title")}),f.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>{m()},disabled:h.length===0||Object.values(o).some(Boolean),type:"button",children:[f.jsx(ps,{size:12,strokeWidth:2.5}),e("system.diagnostics.checkAll")]})]}),h.length===0?f.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:e("system.diagnostics.empty")}):f.jsx("ul",{className:"flex flex-col gap-2",children:h.map(b=>{const E=r[b.project],w=o[b.project],S=E?E.checks.filter(N=>N.status==="fail").length:0,k=E?E.checks.filter(N=>N.status==="warn").length:0,j=u[b.project]??!1,_=E!=null;return f.jsxs("li",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[f.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[f.jsxs("button",{type:"button",onClick:()=>d(N=>({...N,[b.project]:!j})),disabled:!_,className:"flex items-center gap-2 flex-1 text-left min-w-0","aria-label":e(j?"system.diagnostics.collapseAria":"system.diagnostics.expandAria"),children:[_&&E.ok?f.jsx(ih,{size:16,className:"text-[var(--color-running)] shrink-0",strokeWidth:2.5}):_?f.jsx(hu,{size:16,className:"text-[var(--color-stuck)] shrink-0",strokeWidth:2.5}):f.jsx(ih,{size:16,className:"text-[var(--color-text-subtle)] shrink-0",strokeWidth:2.5}),_&&(j?f.jsx(Bu,{size:12}):f.jsx(Uu,{size:12})),f.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:b.project}),_?E.ok?f.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"}):f.jsxs("span",{className:"text-xs text-[var(--color-stuck)] font-semibold",children:[S," fail · ",k," warn"]}):f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("system.diagnostics.never")})]}),f.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{g(b.project,!1)},disabled:!!w,type:"button","aria-label":e("system.diagnostics.checkAria"),children:[w==="check"?f.jsx(pt,{size:11,strokeWidth:3,className:"animate-spin"}):f.jsx(ps,{size:11,strokeWidth:2.5}),e("system.diagnostics.check")]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>{g(b.project,!0)},disabled:!!w||_&&E.ok,type:"button","aria-label":e("system.diagnostics.fixAria"),title:_&&E.ok?e("system.diagnostics.noFixesNeeded"):e("system.diagnostics.fix.tip"),children:[w==="fix"?f.jsx(pt,{size:11,strokeWidth:3,className:"animate-spin"}):f.jsx(N_,{size:11,strokeWidth:2.5}),e("system.diagnostics.fix")]})]}),j&&_&&f.jsxs("div",{className:"border-t-2 border-dashed border-[var(--color-text)] px-3 py-2",children:[f.jsx("ul",{className:"flex flex-col gap-1 text-xs font-[family-name:var(--font-mono)]",children:E.checks.map((N,O)=>f.jsx(Y9,{check:N},`${N.name}-${O}`))}),E.fixes.length>0&&f.jsxs("div",{className:"mt-3 bg-[var(--color-running-bg)] border-2 border-[var(--color-running)] rounded p-2",children:[f.jsx("div",{className:"text-xs font-bold text-[var(--color-running)] mb-1",children:e("system.diagnostics.fixed")}),f.jsx("ul",{className:"text-xs list-disc pl-4",children:E.fixes.map((N,O)=>f.jsx("li",{children:N},O))})]})]})]},b.project)})})]})}function Y9({check:e}){const t=e.status==="pass"?f.jsx(ih,{size:12,className:"text-[var(--color-running)]",strokeWidth:2.5}):e.status==="fail"?f.jsx(hu,{size:12,className:"text-[var(--color-crashed)]",strokeWidth:2.5}):e.status==="warn"?f.jsx(hu,{size:12,className:"text-[var(--color-stuck)]",strokeWidth:2.5}):f.jsx("span",{className:"w-3 h-3 rounded-full bg-[var(--color-text-subtle)] inline-block"});return f.jsxs("li",{className:"flex items-start gap-2",children:[f.jsx("span",{className:"pt-0.5 shrink-0",children:t}),f.jsx("span",{className:"font-bold w-32 shrink-0",children:e.name}),f.jsx("span",{className:"text-[var(--color-text-muted)] break-words",children:e.message})]})}function Q9(e){const t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),a=t%60;return n>0?`${n}h ${r}m ${a}s`:r>0?`${r}m ${a}s`:`${a}s`}function W9(){return Mt("/api/chat/sessions")}function X9(e){return Mt(`/api/chat/sessions/${e}`)}async function Qg(e={}){const t=await fetch("/api/chat/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return await t.json()}async function Z9(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function J9(e,t,n){const r=await fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,attachments:n})});if(!r.ok)throw new Error(`${r.status}: ${await r.text()}`);return await r.json()}async function eF(e){const t=await fetch(`/api/chat/sessions/${e}/interrupt`,{method:"POST"});if(!t.ok&&t.status!==204)throw new Error(`${t.status}: ${await t.text()}`)}function tF(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return Mt(`/api/chat/sessions/${e}/messages${n}`)}function ok(){var Y,W,K,D,L,V,R,oe,ge;const e=Be(),{sessionId:t}=r_(),n=gs(),r=wn(),{confirm:a,alert:o}=Zn(),l=tt({queryKey:["chat-sessions"],queryFn:W9}),u=tt({queryKey:["chat-session",t],queryFn:()=>X9(t??""),enabled:!!t}),[d,h]=T.useState(null),[g,m]=T.useState(""),[y,b]=T.useState(!1),E=T.useRef(null),[w,S]=T.useState(!1),[k,j]=T.useState([]),[_,N]=T.useState(!1),[O,A]=T.useState(!1),[M,I]=T.useState(!1),[F,$]=T.useState(null);T.useEffect(()=>{if(!t)return;const te=new EventSource(`/stream/chat/${encodeURIComponent(t)}`);let ue=!0;return te.addEventListener("open",()=>{if(ue){ue=!1;return}const G=r.getQueryData(["chat-session",t]),ne=G!=null&&G.messages.length?G.messages[G.messages.length-1].ts:void 0;tF(t,ne).then(de=>{de.data.length!==0&&r.setQueryData(["chat-session",t],xe=>{if(!xe)return xe;const ke=new Set(xe.messages.map(ze=>ze.id)),we=de.data.filter(ze=>!ke.has(ze.id));return we.length===0?xe:{...xe,messages:[...xe.messages,...we],lastMessageAt:we[we.length-1].ts,messageCount:xe.messageCount+we.length}})}).catch(()=>{})}),te.addEventListener("chat.message",G=>{try{const ne=JSON.parse(G.data);r.setQueryData(["chat-session",t],de=>{if(!de||de.messages.some(we=>we.id===ne.message.id))return de;const ke=de.messages.findIndex(we=>we.role==="user"&&we.id.startsWith("optim-")&&we.content===ne.message.content);if(ke>=0){const we=[...de.messages];return we[ke]=ne.message,{...de,messages:we}}return{...de,messages:[...de.messages,ne.message]}})}catch{}}),te.addEventListener("chat.message.pending",G=>{try{const ne=JSON.parse(G.data);h({id:ne.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),te.addEventListener("chat.message.chunk.text",G=>{try{const ne=JSON.parse(G.data);h(de=>{if(!de||de.id!==ne.assistantId)return de;const xe=[...de.blocks],ke=xe[xe.length-1];return ke&&ke.type==="text"?xe[xe.length-1]={...ke,target:ke.target+ne.text}:xe.push({type:"text",target:ne.text,displayed:""}),{...de,blocks:xe}})}catch{}}),te.addEventListener("chat.message.chunk.tool_use",G=>{try{const ne=JSON.parse(G.data);h(de=>!de||de.id!==ne.assistantId?de:{...de,blocks:[...de.blocks,{type:"tool_use",id:ne.id,title:ne.title,kind:ne.kind,status:ne.status}]})}catch{}}),te.addEventListener("chat.message.chunk.tool_update",G=>{try{const ne=JSON.parse(G.data);h(de=>!de||de.id!==ne.assistantId?de:{...de,blocks:de.blocks.map(xe=>xe.type==="tool_use"&&xe.id===ne.id?{...xe,status:ne.status}:xe)})}catch{}}),te.addEventListener("chat.message.complete",G=>{try{const ne=JSON.parse(G.data);h(de=>de&&de.id===ne.assistantId?{...de,done:!0,finalMessage:ne.message}:de)}catch{}}),()=>te.close()},[t,r]),T.useEffect(()=>{if(!d)return;const te=d.blocks.reduce((G,ne)=>ne.type==="text"?G+(ne.target.length-ne.displayed.length):G,0);if(te<=0){if(d.done&&d.finalMessage){const G=d.finalMessage;r.setQueryData(["chat-session",t],ne=>!ne||ne.messages.some(de=>de.id===G.id)?ne:{...ne,messages:[...ne.messages,G],lastMessageAt:G.ts,messageCount:ne.messageCount+1}),r.invalidateQueries({queryKey:["chat-sessions"]}),h(null),b(!1)}return}const ue=setTimeout(()=>{h(G=>{if(!G)return G;let ne=Math.max(1,Math.ceil(te/40));const de=G.blocks.map(xe=>{if(xe.type!=="text"||ne<=0)return xe;const ke=xe.target.length-xe.displayed.length;if(ke<=0)return xe;const we=Math.min(ke,ne);return ne-=we,{...xe,displayed:xe.target.slice(0,xe.displayed.length+we)}});return{...G,blocks:de}})},25);return()=>clearTimeout(ue)},[d,r,t]),T.useEffect(()=>{const te=E.current;te&&(te.scrollTop=te.scrollHeight)},[u.data,d]);const U=T.useCallback(async(te={})=>{var ue,G;try{const ne=await Qg({cwd:((ue=te.cwd)==null?void 0:ue.trim())||void 0,title:((G=te.title)==null?void 0:G.trim())||void 0,agentKind:te.agentKind});r.invalidateQueries({queryKey:["chat-sessions"]}),n(`/chat/${ne.id}`),S(!1)}catch(ne){o({title:e("chat.error.create.title"),body:ne instanceof Error?ne.message:String(ne)})}},[r,n,o,e]),q=T.useCallback(async()=>{const te=g.trim();if(!te&&k.length===0||y)return;let ue=t;if(!ue){const de=await Qg();r.invalidateQueries({queryKey:["chat-sessions"]}),ue=de.id,n(`/chat/${ue}`,{replace:!0})}const G=k.map(de=>de.path),ne={id:`optim-${Date.now()}`,role:"user",content:te||e("chat.placeholder.attachment"),ts:new Date().toISOString(),status:"complete",attachments:G.length>0?G:void 0};r.setQueryData(["chat-session",ue],de=>de?{...de,messages:[...de.messages,ne],lastMessageAt:ne.ts,messageCount:de.messageCount+1}:{id:ue,createdAt:ne.ts,lastMessageAt:ne.ts,title:te.slice(0,60)||e("chat.placeholder.attachmentTitle"),project:null,messageCount:1,messages:[ne]}),m(""),j([]),b(!0);try{await J9(ue,te||e("chat.placeholder.viewAttachment"),G.length>0?G:void 0)}catch(de){b(!1),console.error("sendMessage failed",de),o({title:e("chat.error.send.title"),body:de instanceof Error?de.message:String(de)})}},[g,k,y,t,r,n,o,e]),Q=T.useCallback(async te=>{if(te.size>D_){o({title:e("chat.error.fileTooBig.title"),body:e("chat.error.fileTooBig.body",{size:(te.size/1024/1024).toFixed(2),name:te.name})});return}let ue=t;if(!ue){const G=await Qg();r.invalidateQueries({queryKey:["chat-sessions"]}),ue=G.id,n(`/chat/${ue}`,{replace:!0})}N(!0);try{const G=await s3(ue,te);j(ne=>[...ne,{path:G.path,name:G.name}])}catch(G){o({title:e("chat.error.uploadAttachment.title"),body:G instanceof Error?G.message:String(G)})}finally{N(!1)}},[t,r,n,o,e]),B=T.useCallback(te=>{j(ue=>ue.filter(G=>G.path!==te))},[]),H=T.useCallback(async(te,ue)=>{await a({title:e("chat.delete.confirm.title"),body:e(ue==="cli"?"chat.delete.confirm.body.cli":"chat.delete.confirm.body.console"),confirm:e("chat.delete.confirm.button"),danger:!0})&&(await Z9(te),r.invalidateQueries({queryKey:["chat-sessions"]}),t===te&&n("/chat"))},[r,t,n,a,e]),z=T.useCallback(async()=>{if(t)try{await eF(t)}catch(te){o({title:e("chat.error.interrupt.title"),body:te instanceof Error?te.message:String(te)})}},[t,o,e]);return f.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[f.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[f.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:()=>S(!0),type:"button",children:[f.jsx(Vr,{size:14,strokeWidth:3}),e("chat.list.new")]}),f.jsx("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:e("chat.list.heading",{count:((Y=l.data)==null?void 0:Y.data.length)??0})}),f.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((W=l.data)==null?void 0:W.data)??[]).map(te=>f.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",t===te.id?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[f.jsxs("button",{type:"button","aria-label":e("chat.list.openAria",{title:te.title,cwd:te.cwd?e("chat.list.cwdSuffix",{cwd:te.cwd}):""}),onClick:()=>n(`/chat/${te.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[f.jsx(K1,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[f.jsx("p",{className:"text-sm font-semibold truncate flex-1",children:te.title}),te.source==="cli"&&f.jsx("span",{className:"flex-shrink-0 px-1.5 py-0 rounded-md bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] text-[9px] font-[family-name:var(--font-mono)] uppercase tracking-wider leading-tight",title:e("chat.cliBadge.tooltip"),children:e("chat.cliBadge")})]}),f.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:e("chat.list.msgs",{count:te.messageCount,time:cC(te.lastMessageAt??te.createdAt,e)})}),te.cwd&&f.jsxs("p",{className:"text-[10px] text-[var(--color-text-subtle)] font-[family-name:var(--font-mono)] truncate flex items-center gap-1",title:te.cwd,children:[f.jsx(mu,{size:9,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",dir:"rtl",children:te.cwd})]})]})]}),f.jsx("button",{type:"button","aria-label":te.source==="cli"?e("chat.list.deleteCli.aria"):e("chat.list.delete.aria"),className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:ue=>{ue.stopPropagation(),H(te.id,te.source)},children:f.jsx(ho,{size:12})})]},te.id)),(((K=l.data)==null?void 0:K.data)??[]).length===0&&f.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:e("chat.list.empty")})]})]}),f.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:t?f.jsxs(f.Fragment,{children:[f.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((D=u.data)==null?void 0:D.title)??e("common.loading")}),f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:t}),((L=u.data)==null?void 0:L.cwd)&&f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1 mt-1",title:u.data.cwd,children:[f.jsx(mu,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",children:u.data.cwd})]})]}),f.jsxs("div",{ref:E,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((V=u.data)==null?void 0:V.messages)??[]).map(te=>f.jsx(iF,{msg:te,sessionId:t??null,onPreviewAttachment:ue=>$(ue)},te.id)),d&&f.jsx(sF,{pending:d}),!u.isLoading&&(((R=u.data)==null?void 0:R.messages)??[]).length===0&&!d&&!y&&f.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:e("chat.session.empty")})]}),((oe=u.data)==null?void 0:oe.source)==="cli"?f.jsxs("div",{className:"border-t-2 border-[var(--color-text)] p-4 bg-[var(--color-accent-purple)]",children:[f.jsxs("p",{className:"text-sm font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] text-center",children:[f.jsx("strong",{children:e("chat.cli.banner.bold")})," — ",e("chat.cli.banner")]}),f.jsxs("pre",{className:"mt-2 px-3 py-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md text-xs font-[family-name:var(--font-mono)] overflow-x-auto",children:["sps agent --chat --name ",(t??"").replace(/^session-/,"")]})]}):f.jsxs("div",{className:["border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)] transition-colors",M?"bg-[var(--color-accent-mint)]":""].join(" "),onDragOver:te=>{te.dataTransfer.types.includes("Files")&&(te.preventDefault(),te.dataTransfer.dropEffect="copy",M||I(!0))},onDragLeave:()=>I(!1),onDrop:te=>{if(!te.dataTransfer.types.includes("Files"))return;te.preventDefault(),I(!1);const ue=Array.from(te.dataTransfer.files??[]);for(const G of ue)Q(G)},children:[(k.length>0||_)&&f.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[k.map(te=>f.jsxs("button",{type:"button",className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-[var(--color-bg)] border-2 border-[var(--color-text)] text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-mint)] group",onClick:()=>$(te.path),title:e("chat.attachment.previewTooltip",{name:te.name,path:te.path}),children:[gh(te.path)?f.jsx(_R,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}):f.jsx($u,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate max-w-[180px]",children:te.name}),f.jsx("span",{role:"button","aria-label":e("chat.input.removeAttachment",{name:te.name}),className:"ml-1 hover:text-[var(--color-crashed)] cursor-pointer",onClick:ue=>{ue.stopPropagation(),B(te.path)},children:f.jsx(_r,{size:11,strokeWidth:3})})]},te.path)),_&&f.jsxs("span",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[f.jsx(pt,{size:11,strokeWidth:2.5,className:"animate-spin"}),e("chat.input.uploading")]})]}),f.jsxs("div",{className:"flex gap-2 items-end",children:[f.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>A(!0),disabled:y,"aria-label":e("chat.input.attach.aria"),title:e("chat.input.attach.title"),children:f.jsx(IR,{size:14,strokeWidth:2.5})}),f.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:e(M?"chat.input.dragOver":"chat.input.placeholder"),rows:2,value:g,onChange:te=>m(te.target.value),onKeyDown:te=>{te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing&&(te.preventDefault(),q())},onPaste:te=>{const G=Array.from(te.clipboardData.items??[]).filter(ne=>ne.kind==="file"&&ne.type.startsWith("image/"));if(G.length!==0){te.preventDefault();for(const ne of G){const de=ne.getAsFile();de&&Q(de)}}},"aria-label":e("chat.input.aria")}),d?f.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:z,type:"button","aria-label":e("chat.input.interrupt.aria"),children:[f.jsx(Nb,{size:14,strokeWidth:3}),e("chat.input.interrupt")]}):f.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:q,disabled:!g.trim()&&k.length===0||y,type:"button","aria-label":e("chat.input.send.aria"),children:[y?f.jsx(pt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(tL,{size:14,strokeWidth:3}),e("chat.input.send")]})]})]})]}):f.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:f.jsxs("div",{className:"text-center max-w-md",children:[f.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center mx-auto mb-4",children:f.jsx(K1,{size:32,strokeWidth:2.5})}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("chat.empty.title")}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:e("chat.empty.hint")}),f.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:e("chat.empty.shortcuts")})]})})}),w&&f.jsx(rF,{onCancel:()=>S(!1),onCreate:te=>U(te)}),O&&f.jsx(Ab,{mode:"file",title:e("chat.filePicker.title"),initialPath:((ge=u.data)==null?void 0:ge.cwd)??void 0,onCancel:()=>A(!1),onSelect:te=>{j(ue=>{if(ue.some(ne=>ne.path===te))return ue;const G=te.split(/[\\/]/).pop()||te;return[...ue,{path:te,name:G}]}),A(!1)}}),F&&t&&f.jsx(nF,{sessionId:t,path:F,onClose:()=>$(null)})]})}function gh(e){return/\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function lk(e){return/\.pdf$/i.test(e)}function Wg(e){return/\.(txt|md|log|json|yaml|yml|csv|html|xml|tsx?|jsx?|css|sh|ya?ml|conf|toml|ini|env|gitignore|sql|py|rb|go|rs|java|kt|swift|c|cc|cpp|h|hpp)$/i.test(e)}function nF({sessionId:e,path:t,onClose:n}){const r=Be(),[a,o]=T.useState(null),[l,u]=T.useState(null);T.useEffect(()=>{const g=m=>{m.key==="Escape"&&(m.preventDefault(),n())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[n]),T.useEffect(()=>{if(!Wg(t))return;let g=!1;return fetch(Ty(e,t)).then(async m=>{if(!m.ok)throw new Error(`${m.status}`);return m.text()}).then(m=>{g||o(m.length>2e5?m.slice(0,2e5)+`
|
|
576
|
+
|
|
577
|
+
…(truncated)`:m)}).catch(m=>{g||u(m instanceof Error?m.message:String(m))}),()=>{g=!0}},[e,t]);const d=Ty(e,t),h=t.split(/[\\/]/).pop()??t;return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.6)] p-4",role:"presentation",children:f.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-3xl w-full p-5 flex flex-col",style:{maxHeight:"85vh"},role:"dialog","aria-modal":"true","aria-label":r("chat.attachment.preview.aria",{name:h}),children:[f.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[f.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f.jsx(oR,{size:16,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base truncate",children:h})]}),f.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded flex-shrink-0",onClick:n,"aria-label":r("chat.attachment.close.aria"),children:f.jsx(_r,{size:16,strokeWidth:3})})]}),f.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate mb-2 shrink-0",title:t,dir:"rtl",children:t}),f.jsxs("div",{className:"flex-1 overflow-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[gh(t)&&f.jsx("div",{className:"flex items-center justify-center p-4",children:f.jsx("img",{src:d,alt:`Preview: ${h}`,className:"max-w-full max-h-[60vh] object-contain"})}),lk(t)&&f.jsx("iframe",{src:d,title:`PDF: ${h}`,className:"w-full",style:{height:"60vh",border:0}}),Wg(t)&&f.jsx("pre",{className:"p-3 text-xs font-[family-name:var(--font-mono)] whitespace-pre-wrap break-words",children:l?f.jsx("span",{className:"text-[var(--color-crashed)]",children:r("chat.attachment.readErr",{detail:l})}):a===null?f.jsx("span",{className:"text-[var(--color-text-muted)]",children:r("chat.attachment.loading")}):a}),!gh(t)&&!lk(t)&&!Wg(t)&&f.jsxs("div",{className:"p-6 text-center text-sm text-[var(--color-text-muted)]",children:[f.jsx("p",{className:"mb-3",children:r("chat.attachment.unsupported")}),f.jsx("a",{href:d,download:h,className:"nb-btn nb-btn-primary inline-flex",children:r("chat.attachment.download")})]})]})]})})}function rF({onCancel:e,onCreate:t}){const n=Be(),[r,a]=T.useState(""),[o,l]=T.useState(""),[u,d]=T.useState("claude"),[h,g]=T.useState(!1),[m,y]=T.useState(!1);T.useEffect(()=>{if(m)return;const E=w=>{w.key==="Escape"&&(w.preventDefault(),e())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[e,m]);const b=async()=>{if(!h){g(!0);try{t({title:r.trim()||void 0,cwd:o.trim()||void 0,agentKind:u})}finally{g(!1)}}};return f.jsxs("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-[rgba(45,55,72,0.4)] p-4",role:"presentation",children:[f.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-md w-full p-5",role:"dialog","aria-modal":"true","aria-label":n("chat.newSession.title.aria"),children:[f.jsxs("header",{className:"flex items-center justify-between mb-4",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:n("chat.newSession.title")}),f.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:e,"aria-label":n("chat.newSession.close.aria"),children:f.jsx(_r,{size:16,strokeWidth:3})})]}),f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{children:[f.jsx("span",{className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("chat.newSession.field.agent")}),f.jsx("div",{className:"grid grid-cols-2 gap-2",children:["claude","openai"].map(E=>{const w=u===E;return f.jsx("button",{type:"button",onClick:()=>d(E),"aria-pressed":w,className:["rounded-xl border-2 px-3 py-2 text-sm font-bold transition-all",w?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)]":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:E==="claude"?"Claude":"OpenAI"},E)})})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"new-session-title",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("chat.newSession.field.title")}),f.jsx("input",{id:"new-session-title",type:"text",className:"nb-input w-full",placeholder:n("chat.newSession.field.title.placeholder"),value:r,onChange:E=>a(E.target.value),autoFocus:!0})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"new-session-cwd",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("chat.newSession.field.cwd")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{id:"new-session-cwd",type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)] text-sm",placeholder:"/home/coral/projects/my-app",value:o,onChange:E=>l(E.target.value)}),f.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>y(!0),"aria-label":n("chat.newSession.field.cwd.browseAria"),title:n("chat.newSession.field.cwd.browseAria"),children:[f.jsx(b_,{size:14,strokeWidth:2.5}),n("chat.newSession.field.cwd.browse")]})]}),f.jsxs("p",{className:"text-[11px] text-[var(--color-text-muted)] mt-1.5 leading-relaxed",children:[f.jsx(mu,{size:10,strokeWidth:2.5,className:"inline mr-1 -mt-0.5"}),n("chat.newSession.field.cwd.help1")," ",n("chat.newSession.field.cwd.help2")]})]}),f.jsxs("div",{className:"flex gap-2 justify-end pt-2",children:[f.jsx("button",{type:"button",className:"nb-btn",onClick:e,children:n("chat.newSession.cancel")}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:b,disabled:h,children:[h?f.jsx(pt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(Vr,{size:14,strokeWidth:3}),n("chat.newSession.create")]})]})]})]}),m&&f.jsx(Ab,{initialPath:o.trim()||void 0,onCancel:()=>y(!1),onSelect:E=>{l(E),y(!1)}})]})}function iF({msg:e,sessionId:t,onPreviewAttachment:n}){const r=Be(),a=e.role==="user",o=e.role==="error",l=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}],u=e.attachments??[];return f.jsx("div",{className:a?"self-end max-w-3xl":"self-start max-w-3xl",children:f.jsxs("div",{className:["nb-card",a?"bg-[var(--color-secondary)]":o?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[f.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[r(a?"chat.message.role.you":o?"chat.message.role.error":"chat.message.role.assistant"),f.jsx("span",{className:"font-normal",children:"·"}),f.jsx("span",{className:"font-normal cursor-help",title:lF(e.ts),children:cC(e.ts,r)})]}),f.jsx("div",{className:"flex flex-col gap-2",children:l.map((d,h)=>f.jsx(oF,{block:d},h))}),u.length>0&&t&&f.jsx("div",{className:"mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)]/30 flex flex-wrap gap-2",children:u.map(d=>f.jsx(aF,{sessionId:t,path:d,onPreview:()=>n(d)},d))}),e.truncated&&f.jsx("p",{className:"mt-3 px-3 py-2 bg-[var(--color-stuck-bg)] border-2 border-[var(--color-stuck)] rounded-lg text-xs text-[var(--color-stuck)] font-bold",children:r("chat.message.truncated")})]})})}function aF({sessionId:e,path:t,onPreview:n}){const r=Be(),a=t.split(/[\\/]/).pop()??t;return gh(t)?f.jsx("button",{type:"button",onClick:n,className:"block rounded-md overflow-hidden border-2 border-[var(--color-text)] hover:shadow-[2px_2px_0_var(--color-text)] transition-shadow",title:r("chat.attachment.previewSimpleTooltip",{name:a}),children:f.jsx("img",{src:Ty(e,t),alt:a,className:"block max-h-40 max-w-[12rem] object-cover",loading:"lazy"})}):f.jsxs("button",{type:"button",onClick:n,className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-[var(--color-bg)] border-2 border-[var(--color-text)] text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-mint)]",title:r("chat.attachment.previewTooltip",{name:a,path:t}),children:[f.jsx($u,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate max-w-[200px]",children:a})]})}function sF({pending:e}){const t=(()=>{for(let n=e.blocks.length-1;n>=0;n--)if(e.blocks[n].type==="text")return n;return-1})();return f.jsx("div",{className:"self-start max-w-3xl",children:f.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[f.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",f.jsx("span",{className:"font-normal",children:"·"}),f.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[f.jsx(pt,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"…"}),e.blocks.map((n,r)=>{if(n.type==="text"){const a=r===t;return f.jsxs("div",{className:"relative",children:[f.jsx(oC,{text:n.displayed}),a&&f.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},r)}return f.jsx(lC,{tool:n},r)})]})]})})}function oF({block:e}){return e.type==="text"?f.jsx(oC,{text:e.text}):f.jsx(lC,{tool:e})}function oC({text:e}){return e?f.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:f.jsx(ux,{remarkPlugins:[px],rehypePlugins:[yx],children:e})}):null}function lC({tool:e}){const[t,n]=T.useState(!1),r=e.status==="completed",a=e.status==="failed",o=!r&&!a;return f.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[f.jsxs("button",{type:"button",onClick:()=>n(l=>!l),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[f.jsx(Uu,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),f.jsx(N_,{size:12,strokeWidth:2.5}),f.jsx("span",{className:"font-bold",children:e.kind}),f.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),o&&f.jsx(pt,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),r&&f.jsx(pu,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),a&&f.jsx(p_,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&f.jsxs("div",{className:"px-3 py-2 text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] border-t-2 border-[var(--color-text)]",children:[f.jsxs("div",{children:["id: ",f.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),f.jsxs("div",{children:["status: ",f.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function cC(e,t){if(!e)return"";const n=new Date(e),r=Date.now()-n.getTime();return r<6e4?t("kanban.time.justNow"):r<36e5?t("kanban.time.minutes",{n:Math.floor(r/6e4)}):r<864e5?t("kanban.time.hours",{n:Math.floor(r/36e5)}):n.toLocaleDateString()}function lF(e){if(!e)return;const t=new Date(e),n=r=>String(r).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function cF(){return Mt("/api/processes").then(e=>e.data)}function uF(e){return NL(`/api/processes/${e}/kill`)}const dF="border-[3px] border-[var(--color-text)] rounded-2xl bg-white shadow-[4px_4px_0_var(--color-text)]";function fF({p:e}){const t=e.alive?e.sessionState??"alive":"offline",n=e.alive?"bg-[var(--color-accent-mint)]":"bg-[var(--color-bg-cream)] text-[var(--color-text)]/60";return f.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-lg border-2 border-[var(--color-text)] text-xs font-bold font-[family-name:var(--font-mono)] ${n}`,children:[f.jsx("span",{className:`w-2 h-2 rounded-full ${e.alive?"bg-green-600":"bg-gray-400"}`}),t]})}function hF(){const e=Be(),t=wn(),[n,r]=T.useState(null),[a,o]=T.useState("all"),l=tt({queryKey:["processes"],queryFn:cF,refetchInterval:5e3}),u=rn({mutationFn:uF,onSuccess:g=>{r(g.message),t.invalidateQueries({queryKey:["processes"]})},onError:g=>r(g instanceof Error?g.message:String(g))}),d=l.data??[],h=d.filter(g=>a==="all"?!0:g.kind===a);return f.jsxs("div",{className:"max-w-full",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[f.jsx(g_,{size:22,strokeWidth:2.5}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl",children:e("processes.title")}),f.jsxs("button",{type:"button","aria-label":e("processes.refresh"),onClick:()=>t.invalidateQueries({queryKey:["processes"]}),className:"ml-auto inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl border-2 border-[var(--color-text)] bg-white text-sm font-semibold shadow-[2px_2px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px focus-visible:outline focus-visible:outline-2",children:[l.isFetching?f.jsx(pt,{size:15,className:"animate-spin"}):f.jsx(ps,{size:15}),e("processes.refresh")]})]}),f.jsxs("p",{className:"text-sm text-[var(--color-text)]/70 mb-4",children:[e("processes.subtitle")," · ",e("processes.aliveCount").replace("{n}",String(d.length))]}),n&&f.jsx("div",{className:"mb-3 px-3 py-2 rounded-xl border-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] text-sm font-mono",children:n}),f.jsx("div",{className:"flex flex-wrap gap-2 mb-3 items-center",children:["all","worker","chat"].map(g=>f.jsx("button",{type:"button","aria-label":e(`processes.kind.${g}`),onClick:()=>o(g),className:`px-3 py-1 rounded-lg border-2 border-[var(--color-text)] text-sm font-bold shadow-[2px_2px_0_var(--color-text)] focus-visible:outline focus-visible:outline-2 ${a===g?"bg-[var(--color-accent-yellow)]":"bg-white hover:-translate-x-px hover:-translate-y-px"}`,children:e(`processes.kind.${g}`)},g))}),f.jsx("div",{className:`${dF} overflow-hidden`,children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{className:"bg-[var(--color-bg-cream)] font-[family-name:var(--font-heading)]",children:f.jsxs("tr",{className:"text-left",children:[f.jsx("th",{className:"px-3 py-2",children:e("processes.col.kind")}),f.jsx("th",{className:"px-3 py-2",children:e("processes.col.slot")}),f.jsx("th",{className:"px-3 py-2",children:e("processes.col.project")}),f.jsx("th",{className:"px-3 py-2",children:"PID"}),f.jsx("th",{className:"px-3 py-2",children:e("processes.col.state")}),f.jsx("th",{className:"px-3 py-2",children:e("processes.col.memory")}),f.jsx("th",{className:"px-3 py-2",children:e("processes.col.action")})]})}),f.jsxs("tbody",{className:"font-[family-name:var(--font-mono)]",children:[h.length===0&&f.jsx("tr",{children:f.jsx("td",{colSpan:7,className:"px-3 py-6 text-center text-[var(--color-text)]/50",children:e("processes.empty")})}),h.map(g=>f.jsxs("tr",{className:"border-t-2 border-[var(--color-text)]/10",title:g.cwd??"",children:[f.jsx("td",{className:"px-3 py-2",children:f.jsx("span",{className:`inline-block px-2 py-0.5 rounded-lg border-2 border-[var(--color-text)] text-xs font-bold ${g.kind==="worker"?"bg-[var(--color-accent-yellow)]":"bg-[var(--color-accent-purple)]"}`,children:e(`processes.kind.${g.kind}`)})}),f.jsx("td",{className:"px-3 py-2 max-w-[260px] truncate",children:g.slot}),f.jsx("td",{className:"px-3 py-2",children:g.project??"—"}),f.jsx("td",{className:"px-3 py-2",children:g.pid??"—"}),f.jsx("td",{className:"px-3 py-2",children:f.jsx(fF,{p:g})}),f.jsx("td",{className:"px-3 py-2",children:g.memoryMB!=null?`${g.memoryMB} MB`:"—"}),f.jsx("td",{className:"px-3 py-2",children:g.alive&&g.pid!=null?f.jsxs("button",{type:"button","aria-label":`${e("processes.kill")} ${g.slot}`,onClick:()=>{confirm(e("processes.killConfirm").replace("{slot}",g.slot))&&u.mutate(g.pid)},className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-lg border-2 border-[var(--color-text)] bg-[var(--color-accent-pink)] text-xs font-bold shadow-[2px_2px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px active:translate-x-0.5 active:translate-y-0.5 focus-visible:outline focus-visible:outline-2",children:[f.jsx(p_,{size:13})," ",e("processes.kill")]}):f.jsx("span",{className:"text-[var(--color-text)]/40 text-xs",children:"—"})})]},g.slot))]})]})})]})}function pF(e={}){const t=new URLSearchParams;e.project&&t.set("project",e.project),e.action&&t.set("action",e.action);const n=t.toString();return Mt(`/api/audit${n?`?${n}`:""}`).then(r=>r.data)}const mF="border-[3px] border-[var(--color-text)] rounded-2xl bg-white shadow-[4px_4px_0_var(--color-text)]",gF={create:"bg-[var(--color-accent-mint)]",modify:"bg-[var(--color-accent-yellow)]",delete:"bg-[var(--color-accent-pink)]",daemon:"bg-[var(--color-accent-purple)]"};function yF(){const e=Be(),t=wn(),[n,r]=T.useState(""),a=tt({queryKey:["audit",n],queryFn:()=>pF(n?{action:n}:{}),refetchInterval:8e3}),o=a.data??[],l=u=>e(`audit.action.${u}`);return f.jsxs("div",{className:"max-w-full",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[f.jsx(E_,{size:22,strokeWidth:2.5}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl",children:e("audit.title")}),f.jsxs("button",{type:"button","aria-label":e("audit.refresh"),onClick:()=>t.invalidateQueries({queryKey:["audit"]}),className:"ml-auto inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl border-2 border-[var(--color-text)] bg-white text-sm font-semibold shadow-[2px_2px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px focus-visible:outline focus-visible:outline-2",children:[a.isFetching?f.jsx(pt,{size:15,className:"animate-spin"}):f.jsx(ps,{size:15}),e("audit.refresh")]})]}),f.jsx("p",{className:"text-sm text-[var(--color-text)]/70 mb-4",children:e("audit.subtitle")}),f.jsx("div",{className:"flex gap-2 mb-3",children:["","create","modify","delete","daemon"].map(u=>f.jsx("button",{type:"button","aria-label":u?l(u):e("audit.filter.all"),onClick:()=>r(u),className:`px-3 py-1 rounded-lg border-2 border-[var(--color-text)] text-sm font-bold shadow-[2px_2px_0_var(--color-text)] focus-visible:outline focus-visible:outline-2 ${n===u?"bg-[var(--color-accent-purple)]":"bg-white hover:-translate-x-px hover:-translate-y-px"}`,children:u?l(u):e("audit.filter.all")},u||"all"))}),f.jsx("div",{className:`${mF} overflow-hidden`,children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{className:"bg-[var(--color-bg-cream)] font-[family-name:var(--font-heading)]",children:f.jsxs("tr",{className:"text-left",children:[f.jsx("th",{className:"px-3 py-2",children:e("audit.col.time")}),f.jsx("th",{className:"px-3 py-2",children:e("audit.col.action")}),f.jsx("th",{className:"px-3 py-2",children:e("audit.col.project")}),f.jsx("th",{className:"px-3 py-2",children:e("audit.col.detail")})]})}),f.jsxs("tbody",{className:"font-[family-name:var(--font-mono)]",children:[o.length===0&&f.jsx("tr",{children:f.jsx("td",{colSpan:4,className:"px-3 py-6 text-center text-[var(--color-text)]/50",children:e("audit.empty")})}),o.map((u,d)=>f.jsxs("tr",{className:"border-t-2 border-[var(--color-text)]/10",children:[f.jsx("td",{className:"px-3 py-2 whitespace-nowrap",children:new Date(u.ts).toLocaleString()}),f.jsx("td",{className:"px-3 py-2",children:f.jsx("span",{className:`inline-block px-2 py-0.5 rounded-lg border-2 border-[var(--color-text)] text-xs font-bold ${gF[u.action]}`,children:l(u.action)})}),f.jsx("td",{className:"px-3 py-2",children:u.project}),f.jsx("td",{className:"px-3 py-2 text-[var(--color-text)]/70",children:u.detail??(u.source?`(${u.source})`:"—")})]},`${u.ts}-${d}`))]})]})})]})}const Xg="rounded-xl border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] bg-white p-3";function bF(){const e=Be(),[t,n]=T.useState(""),[r,a]=T.useState([]),[o,l]=T.useState([]),[u,d]=T.useState(!1),[h,g]=T.useState(null),[m,y]=T.useState(null);T.useEffect(()=>{fetch("/api/memory-cfg").then(w=>w.json()).then(w=>y(w.viewerUrl??"")).catch(()=>y(""))},[]);async function b(){try{const w=await fetch("/api/memory/sessions");if(!w.ok)throw new Error(`HTTP ${w.status}`);const S=await w.json();l((S.sessions??S??[]).slice(0,30))}catch(w){g(w instanceof Error?w.message:String(w))}}T.useEffect(()=>{b()},[]);async function E(){if(t.trim()){d(!0),g(null);try{const w=await fetch("/api/memory/smart-search",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:t,limit:15})});if(!w.ok)throw new Error(`HTTP ${w.status}`);const S=await w.json();a(S.results??S.hits??[])}catch(w){g(w instanceof Error?w.message:String(w))}finally{d(!1)}}}return m===null?null:m?f.jsxs("div",{className:"flex flex-col gap-4 h-full min-h-0",children:[f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsxs("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl text-[var(--color-text)]",children:["🧠 ",e("nav.memory")]}),f.jsxs("a",{href:m,target:"_blank",rel:"noreferrer",className:"text-sm font-semibold underline decoration-2 underline-offset-2 text-[var(--color-text)] hover:opacity-70",children:["↗ ",m]})]}),f.jsx("div",{className:"flex-1 min-h-0 rounded-2xl border-[3px] border-[var(--color-text)] shadow-[4px_4px_0_var(--color-text)] overflow-hidden bg-white",children:f.jsx("iframe",{src:m,title:"agentmemory dashboard",className:"w-full h-full border-0",style:{minHeight:"calc(100vh - 160px)"}})})]}):f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsxs("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl text-[var(--color-text)]",children:["🧠 ",e("nav.memory")]}),f.jsx("span",{className:"text-xs text-[var(--color-text)] opacity-60",children:e("memory.sub")})]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{value:t,onChange:w=>n(w.target.value),onKeyDown:w=>w.key==="Enter"&&E(),placeholder:e("memory.searchPlaceholder"),"aria-label":e("memory.searchPlaceholder"),className:"flex-1 rounded-xl border-[3px] border-[var(--color-text)] px-3 py-2 font-[family-name:var(--font-mono)] text-sm focus-visible:shadow-[3px_3px_0_var(--color-text)] outline-none"}),f.jsx("button",{type:"button",onClick:E,disabled:u,"aria-label":e("memory.search"),className:"rounded-xl border-[3px] border-[var(--color-text)] bg-[var(--color-accent-mint)] px-4 py-2 font-bold text-sm shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] active:translate-x-0.5 active:translate-y-0.5 active:shadow-[1px_1px_0_var(--color-text)] disabled:opacity-50",children:u?"…":e("memory.search")})]}),h&&f.jsxs("div",{className:"text-sm text-[var(--color-accent-pink,#d6336c)] font-semibold",children:["⚠ ",h]}),r.length>0&&f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-sm text-[var(--color-text)]",children:[e("memory.results"),"(",r.length,")"]}),r.map(w=>{var S;return f.jsxs("div",{className:Xg,children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs opacity-60 font-[family-name:var(--font-mono)]",children:[f.jsx("span",{children:w.type||w.title}),f.jsx("span",{children:"·"}),f.jsx("span",{children:new Date(w.timestamp).toLocaleString()}),f.jsx("span",{children:"·"}),f.jsxs("span",{children:["score ",(S=w.score)==null?void 0:S.toFixed(3)]})]}),f.jsx("div",{className:"text-sm mt-1 text-[var(--color-text)]",children:w.text||w.content||w.summary||f.jsx("span",{className:"opacity-50 italic",children:e("memory.rawHint")})})]},w.obsId)})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-sm text-[var(--color-text)]",children:[e("memory.sessions"),"(",o.length,")"]}),o.length===0&&f.jsx("div",{className:`${Xg} text-sm opacity-60`,children:e("memory.empty")}),o.map((w,S)=>{var k;return f.jsxs("div",{className:Xg,children:[f.jsx("div",{className:"font-[family-name:var(--font-mono)] text-xs text-[var(--color-text)]",children:(w.cwd??"").split("/").pop()||((k=w.sessionId)==null?void 0:k.slice(0,8))||"?"}),w.firstPrompt&&f.jsx("div",{className:"text-xs opacity-60 mt-1 line-clamp-2",children:w.firstPrompt.slice(0,160)})]},w.sessionId??S)})]})]})}function xF(){return Mt("/api/providers")}async function vF(e,t){const n=await fetch("/api/providers",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:e,entry:t})});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json()}async function wF(e,t){const n=await fetch(`/api/providers/${e}/${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json()}const ck=[{key:"memory",labelKey:"plugins.tab.memory"},{key:"channel",labelKey:"plugins.tab.channel"},{key:"model",labelKey:"plugins.tab.model"},{key:"tool",labelKey:"plugins.tab.tool"}];function EF(){const e=Be(),[t,n]=T.useState("memory");return f.jsxs("div",{className:"flex flex-col gap-6 w-full",children:[f.jsxs("header",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("plugins.h1")}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:e("plugins.desc")})]}),f.jsx("div",{role:"tablist","aria-label":e("plugins.h1"),className:"flex gap-2 flex-wrap",children:ck.map(r=>{const a=t===r.key;return f.jsx("button",{role:"tab","aria-selected":a,type:"button",onClick:()=>n(r.key),className:["px-4 py-2 rounded-xl font-bold text-sm border-2 transition-transform duration-150",a?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)]":"border-[var(--color-text)] bg-white hover:-translate-x-px hover:-translate-y-px hover:shadow-[3px_3px_0_var(--color-text)]"].join(" "),children:e(r.labelKey)},r.key)})}),f.jsx("div",{role:"tabpanel",children:t==="memory"?f.jsx(SF,{}):t==="model"?f.jsx(_F,{}):f.jsx(kF,{label:e(ck.find(r=>r.key===t).labelKey)})})]})}function kF({label:e}){const t=Be();return f.jsx("section",{className:"nb-card",children:f.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:[e," — ",t("plugins.comingSoon")]})})}function SF(){var E,w,S;const e=Be(),t=wn(),{alert:n}=Zn(),r=tt({queryKey:["system-memory"],queryFn:TL}),[a,o]=T.useState(null),[l,u]=T.useState(null);T.useEffect(()=>{r.data&&a===null&&(o(r.data.provider),u(r.data.url))},[r.data,a]);const d=a??((E=r.data)==null?void 0:E.provider)??"agentmemory",h=l??((w=r.data)==null?void 0:w.url)??"",g=r.data!=null&&(d!==r.data.provider||d==="custom"&&h!==r.data.url),m=k=>{const j=`system.memory.opt.${k}`;return e(j)},y=rn({mutationFn:()=>ML(d,d==="custom"?h:""),onSuccess:()=>{t.invalidateQueries({queryKey:["system-memory"]}),t.invalidateQueries({queryKey:["system-env"]})},onError:k=>{n({title:e("system.memory.error"),body:k instanceof Error?k.message:String(k)})}}),b=((S=r.data)==null?void 0:S.options)??["none","builtin","agentmemory","custom"];return f.jsxs("section",{className:"nb-card",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-1",children:e("system.memory.title")}),f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:e("system.memory.desc")}),f.jsxs("div",{className:"flex flex-col gap-3 max-w-md",children:[f.jsxs("label",{className:"flex flex-col gap-1 text-sm",children:[f.jsx("span",{className:"font-bold",children:e("system.memory.provider")}),f.jsx("select",{className:"nb-input",value:d,onChange:k=>o(k.target.value),"aria-label":e("system.memory.provider"),children:b.map(k=>f.jsx("option",{value:k,children:m(k)},k))})]}),d==="custom"&&f.jsxs("label",{className:"flex flex-col gap-1 text-sm",children:[f.jsx("span",{className:"font-bold",children:e("system.memory.url")}),f.jsx("input",{className:"nb-input font-[family-name:var(--font-mono)] text-xs",type:"text",value:h,onChange:k=>u(k.target.value),placeholder:e("system.memory.url.placeholder"),spellCheck:!1,"aria-label":e("system.memory.url")})]}),f.jsx("div",{className:"flex justify-end",children:f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>y.mutate(),disabled:!g||y.isPending,type:"button","aria-label":e("system.memory.save.aria"),children:[y.isPending?f.jsx(pt,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(ql,{size:12,strokeWidth:3}),y.isSuccess&&!g?e("system.memory.saved"):e("system.memory.save")]})})]})]})}function _F(){var S,k,j;const e=wn(),{alert:t,confirm:n}=Zn(),r=tt({queryKey:["providers"],queryFn:xF}),o=(S=tt({queryKey:["system-agents"],queryFn:O_}).data)==null?void 0:S.agents,[l,u]=T.useState(null),d=rn({mutationFn:()=>vF(l.kind,l.entry),onSuccess:()=>{u(null),e.invalidateQueries({queryKey:["providers"]})},onError:_=>void t({title:"保存失败",body:_ instanceof Error?_.message:String(_)})}),h=rn({mutationFn:_=>wF(_.kind,_.id),onSuccess:()=>void e.invalidateQueries({queryKey:["providers"]}),onError:_=>void t({title:"删除失败",body:_ instanceof Error?_.message:String(_)})}),g=rn({mutationFn:_=>OL(_),onSuccess:()=>void e.invalidateQueries({queryKey:["system-agents"]}),onError:_=>void t({title:"设默认失败",body:_ instanceof Error?_.message:String(_)})}),m=(_,N,O)=>{if(!o)return!1;const A=_==="anthropic"?o.worker:o.reviewer;return(A.providerId||"official")===N&&A.model===O},y=(_,N,O)=>{if(!o)return;let A;if(_==="anthropic"){const M={...o.worker,model:O};N==="official"?delete M.providerId:M.providerId=N,A={...o,worker:M}}else A={...o,reviewer:{...o.reviewer,providerId:N,model:O}};g.mutate(A)},b=[{kind:"anthropic",title:"Anthropic 兼容(worker / claude)",items:((k=r.data)==null?void 0:k.anthropic)??[]},{kind:"openai",title:"OpenAI 兼容(reviewer / openai agent)",items:((j=r.data)==null?void 0:j.openai)??[]}],E=_=>u({kind:_,isNew:!0,entry:{id:"",name:"",baseUrl:"",apiKey:"",models:[]}}),w=(_,N)=>u({kind:_,isNew:!1,entry:{id:N.id,name:N.name,baseUrl:N.baseUrl,apiKey:"",models:N.models}});return f.jsxs("section",{className:"nb-card",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-1",children:"模型 API 端点"}),f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-4",children:"本地官方订阅(已登录验证)自动置顶,不可编辑;下方可增删第三方兼容端点。**点模型标签设为默认**(anthropic→worker / openai→监工);✓ = 当前默认。"}),f.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:b.map(_=>f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-bold text-sm",children:_.title}),f.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:12},type:"button",onClick:()=>E(_.kind),"aria-label":`添加 ${_.title} 端点`,children:[f.jsx(Vr,{size:12,strokeWidth:3})," 添加"]})]}),_.items.length===0&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"(无端点)"}),_.items.map(N=>f.jsxs("div",{className:["rounded-lg px-3 py-2 border-2",N.builtin?"border-[var(--color-text)] bg-[var(--color-bg-cream)]":"border-[var(--color-text)]"].join(" "),children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:N.id}),f.jsxs("span",{className:"text-[var(--color-text-muted)] text-sm",children:[" · ",N.name]}),N.builtin?f.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] truncate",children:["本地订阅",N.detail?` · ${N.detail}`:""," · 已验证可用"]}):f.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] truncate",children:[N.baseUrl," · key ",N.hasKey?N.apiKey:"未设置"]})]}),N.builtin?f.jsx("span",{className:"shrink-0 text-[10px] font-bold px-2 py-0.5 rounded-md border-2 border-[var(--color-text)] bg-[var(--color-accent-yellow)]",children:"内置"}):f.jsxs("div",{className:"flex gap-1 shrink-0",children:[f.jsx("button",{className:"nb-btn",style:{padding:"4px 8px"},type:"button",onClick:()=>w(_.kind,N),"aria-label":`编辑 ${N.id}`,children:f.jsx($R,{size:12,strokeWidth:3})}),f.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 8px"},type:"button",onClick:async()=>{await n({title:"删除端点",body:`删除 ${N.id}?`,danger:!0})&&h.mutate({kind:_.kind,id:N.id})},"aria-label":`删除 ${N.id}`,children:f.jsx(ho,{size:12,strokeWidth:3})})]})]}),N.models.length>0&&f.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:N.models.map(O=>{const A=m(_.kind,N.id,O);return f.jsxs("button",{type:"button",onClick:()=>y(_.kind,N.id,O),disabled:g.isPending,"aria-pressed":A,className:["px-2 py-0.5 rounded-md text-xs font-[family-name:var(--font-mono)] border-2 border-[var(--color-text)]",A?"bg-[var(--color-accent-mint)] font-bold":"bg-[var(--color-bg)] hover:bg-[var(--color-bg-cream)]"].join(" "),title:A?"当前默认":"设为默认",children:[O,A?" ✓":""]},O)})})]},N.id))]},_.kind))}),l&&f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",onClick:()=>u(null),children:f.jsx("div",{onClick:_=>_.stopPropagation(),children:f.jsx(NF,{state:l,onChange:_=>u({...l,entry:_}),onCancel:()=>u(null),onSave:()=>d.mutate(),saving:d.isPending})})})]})}function NF({state:e,onChange:t,onCancel:n,onSave:r,saving:a}){const o=e.entry,l=d=>t({...o,...d}),u=/^[a-zA-Z0-9_-]+$/.test(o.id)&&o.name.trim()&&o.baseUrl.trim();return f.jsxs("div",{className:"border-[3px] border-[var(--color-text)] rounded-2xl p-6 bg-[var(--color-bg-cream)] shadow-[6px_6px_0_var(--color-text)] flex flex-col gap-4 w-[min(92vw,640px)] max-h-[88vh] overflow-y-auto",children:[f.jsxs("span",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:[e.isNew?"新增端点":`编辑 ${o.id}`,f.jsxs("span",{className:"text-[var(--color-text-muted)] text-sm font-normal",children:["(",e.kind,")"]})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1 text-sm font-bold",children:["id(英数 _ -)",f.jsx("input",{className:"nb-input font-[family-name:var(--font-mono)]",value:o.id,disabled:!e.isNew,onChange:d=>l({id:d.target.value}),placeholder:"如 my-openai",spellCheck:!1})]}),f.jsxs("label",{className:"flex flex-col gap-1 text-sm font-bold",children:["名称",f.jsx("input",{className:"nb-input",value:o.name,onChange:d=>l({name:d.target.value}),placeholder:"显示名"})]})]}),f.jsxs("label",{className:"flex flex-col gap-1 text-sm font-bold",children:["Base URL",f.jsx("input",{className:"nb-input font-[family-name:var(--font-mono)] text-sm",value:o.baseUrl,onChange:d=>l({baseUrl:d.target.value}),placeholder:"https://api.example.com/v1",spellCheck:!1})]}),f.jsxs("label",{className:"flex flex-col gap-1 text-sm font-bold",children:["API Key",!e.isNew&&"(留空=保留)",f.jsx("input",{className:"nb-input font-[family-name:var(--font-mono)] text-sm",type:"password",value:o.apiKey??"",onChange:d=>l({apiKey:d.target.value}),placeholder:e.isNew?"sk-...":"••••(留空不改)",spellCheck:!1})]}),f.jsxs("label",{className:"flex flex-col gap-1 text-sm font-bold",children:["Models(逗号或换行分隔)",f.jsx("textarea",{className:"nb-input font-[family-name:var(--font-mono)] text-sm",rows:5,value:o.models.join(", "),onChange:d=>l({models:d.target.value.split(/[,\n]/).map(h=>h.trim()).filter(Boolean)}),placeholder:"gpt-5.4, gpt-4o",spellCheck:!1})]}),f.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[f.jsx("button",{className:"nb-btn",style:{padding:"8px 16px"},type:"button",onClick:n,children:"取消"}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"8px 16px"},type:"button",disabled:!u||a,onClick:r,children:[a?f.jsx(pt,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(ql,{size:14,strokeWidth:3})," 保存"]})]})]})}function mn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=mn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var CF={value:()=>{}};function Wh(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Qf(n)}function Qf(e){this._=e}function jF(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Qf.prototype=Wh.prototype={constructor:Qf,on:function(e,t){var n=this._,r=jF(e+"",n),a,o=-1,l=r.length;if(arguments.length<2){for(;++o<l;)if((a=(e=r[o]).type)&&(a=AF(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<l;)if(a=(e=r[o]).type)n[a]=uk(n[a],e.name,t);else if(t==null)for(a in n)n[a]=uk(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Qf(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,o;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,a=o.length;r<a;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],a=0,o=r.length;a<o;++a)r[a].value.apply(t,n)}};function AF(e,t){for(var n=0,r=e.length,a;n<r;++n)if((a=e[n]).name===t)return a.value}function uk(e,t,n){for(var r=0,a=e.length;r<a;++r)if(e[r].name===t){e[r]=CF,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Wy="http://www.w3.org/1999/xhtml";const dk={svg:"http://www.w3.org/2000/svg",xhtml:Wy,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xh(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),dk.hasOwnProperty(t)?{space:dk[t],local:e}:e}function TF(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Wy&&t.documentElement.namespaceURI===Wy?t.createElement(e):t.createElementNS(n,e)}}function MF(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function uC(e){var t=Xh(e);return(t.local?MF:TF)(t)}function OF(){}function bx(e){return e==null?OF:function(){return this.querySelector(e)}}function DF(e){typeof e!="function"&&(e=bx(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var o=t[a],l=o.length,u=r[a]=new Array(l),d,h,g=0;g<l;++g)(d=o[g])&&(h=e.call(d,d.__data__,g,o))&&("__data__"in d&&(h.__data__=d.__data__),u[g]=h);return new Nr(r,this._parents)}function RF(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function LF(){return[]}function dC(e){return e==null?LF:function(){return this.querySelectorAll(e)}}function IF(e){return function(){return RF(e.apply(this,arguments))}}function zF(e){typeof e=="function"?e=IF(e):e=dC(e);for(var t=this._groups,n=t.length,r=[],a=[],o=0;o<n;++o)for(var l=t[o],u=l.length,d,h=0;h<u;++h)(d=l[h])&&(r.push(e.call(d,d.__data__,h,l)),a.push(d));return new Nr(r,a)}function fC(e){return function(){return this.matches(e)}}function hC(e){return function(t){return t.matches(e)}}var PF=Array.prototype.find;function BF(e){return function(){return PF.call(this.children,e)}}function UF(){return this.firstElementChild}function $F(e){return this.select(e==null?UF:BF(typeof e=="function"?e:hC(e)))}var FF=Array.prototype.filter;function HF(){return Array.from(this.children)}function qF(e){return function(){return FF.call(this.children,e)}}function KF(e){return this.selectAll(e==null?HF:qF(typeof e=="function"?e:hC(e)))}function GF(e){typeof e!="function"&&(e=fC(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var o=t[a],l=o.length,u=r[a]=[],d,h=0;h<l;++h)(d=o[h])&&e.call(d,d.__data__,h,o)&&u.push(d);return new Nr(r,this._parents)}function pC(e){return new Array(e.length)}function VF(){return new Nr(this._enter||this._groups.map(pC),this._parents)}function yh(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}yh.prototype={constructor:yh,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function YF(e){return function(){return e}}function QF(e,t,n,r,a,o){for(var l=0,u,d=t.length,h=o.length;l<h;++l)(u=t[l])?(u.__data__=o[l],r[l]=u):n[l]=new yh(e,o[l]);for(;l<d;++l)(u=t[l])&&(a[l]=u)}function WF(e,t,n,r,a,o,l){var u,d,h=new Map,g=t.length,m=o.length,y=new Array(g),b;for(u=0;u<g;++u)(d=t[u])&&(y[u]=b=l.call(d,d.__data__,u,t)+"",h.has(b)?a[u]=d:h.set(b,d));for(u=0;u<m;++u)b=l.call(e,o[u],u,o)+"",(d=h.get(b))?(r[u]=d,d.__data__=o[u],h.delete(b)):n[u]=new yh(e,o[u]);for(u=0;u<g;++u)(d=t[u])&&h.get(y[u])===d&&(a[u]=d)}function XF(e){return e.__data__}function ZF(e,t){if(!arguments.length)return Array.from(this,XF);var n=t?WF:QF,r=this._parents,a=this._groups;typeof e!="function"&&(e=YF(e));for(var o=a.length,l=new Array(o),u=new Array(o),d=new Array(o),h=0;h<o;++h){var g=r[h],m=a[h],y=m.length,b=JF(e.call(g,g&&g.__data__,h,r)),E=b.length,w=u[h]=new Array(E),S=l[h]=new Array(E),k=d[h]=new Array(y);n(g,m,w,S,k,b,t);for(var j=0,_=0,N,O;j<E;++j)if(N=w[j]){for(j>=_&&(_=j+1);!(O=S[_])&&++_<E;);N._next=O||null}}return l=new Nr(l,r),l._enter=u,l._exit=d,l}function JF(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function eH(){return new Nr(this._exit||this._groups.map(pC),this._parents)}function tH(e,t,n){var r=this.enter(),a=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?o.remove():n(o),r&&a?r.merge(a).order():a}function nH(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,a=n.length,o=r.length,l=Math.min(a,o),u=new Array(a),d=0;d<l;++d)for(var h=n[d],g=r[d],m=h.length,y=u[d]=new Array(m),b,E=0;E<m;++E)(b=h[E]||g[E])&&(y[E]=b);for(;d<a;++d)u[d]=n[d];return new Nr(u,this._parents)}function rH(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],a=r.length-1,o=r[a],l;--a>=0;)(l=r[a])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function iH(e){e||(e=aH);function t(m,y){return m&&y?e(m.__data__,y.__data__):!m-!y}for(var n=this._groups,r=n.length,a=new Array(r),o=0;o<r;++o){for(var l=n[o],u=l.length,d=a[o]=new Array(u),h,g=0;g<u;++g)(h=l[g])&&(d[g]=h);d.sort(t)}return new Nr(a,this._parents).order()}function aH(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function sH(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function oH(){return Array.from(this)}function lH(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,o=r.length;a<o;++a){var l=r[a];if(l)return l}return null}function cH(){let e=0;for(const t of this)++e;return e}function uH(){return!this.node()}function dH(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a=t[n],o=0,l=a.length,u;o<l;++o)(u=a[o])&&e.call(u,u.__data__,o,a);return this}function fH(e){return function(){this.removeAttribute(e)}}function hH(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pH(e,t){return function(){this.setAttribute(e,t)}}function mH(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function gH(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function yH(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function bH(e,t){var n=Xh(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?hH:fH:typeof t=="function"?n.local?yH:gH:n.local?mH:pH)(n,t))}function mC(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function xH(e){return function(){this.style.removeProperty(e)}}function vH(e,t,n){return function(){this.style.setProperty(e,t,n)}}function wH(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function EH(e,t,n){return arguments.length>1?this.each((t==null?xH:typeof t=="function"?wH:vH)(e,t,n??"")):Rl(this.node(),e)}function Rl(e,t){return e.style.getPropertyValue(t)||mC(e).getComputedStyle(e,null).getPropertyValue(t)}function kH(e){return function(){delete this[e]}}function SH(e,t){return function(){this[e]=t}}function _H(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function NH(e,t){return arguments.length>1?this.each((t==null?kH:typeof t=="function"?_H:SH)(e,t)):this.node()[e]}function gC(e){return e.trim().split(/^|\s+/)}function xx(e){return e.classList||new yC(e)}function yC(e){this._node=e,this._names=gC(e.getAttribute("class")||"")}yC.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function bC(e,t){for(var n=xx(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function xC(e,t){for(var n=xx(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function CH(e){return function(){bC(this,e)}}function jH(e){return function(){xC(this,e)}}function AH(e,t){return function(){(t.apply(this,arguments)?bC:xC)(this,e)}}function TH(e,t){var n=gC(e+"");if(arguments.length<2){for(var r=xx(this.node()),a=-1,o=n.length;++a<o;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?AH:t?CH:jH)(n,t))}function MH(){this.textContent=""}function OH(e){return function(){this.textContent=e}}function DH(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function RH(e){return arguments.length?this.each(e==null?MH:(typeof e=="function"?DH:OH)(e)):this.node().textContent}function LH(){this.innerHTML=""}function IH(e){return function(){this.innerHTML=e}}function zH(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function PH(e){return arguments.length?this.each(e==null?LH:(typeof e=="function"?zH:IH)(e)):this.node().innerHTML}function BH(){this.nextSibling&&this.parentNode.appendChild(this)}function UH(){return this.each(BH)}function $H(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function FH(){return this.each($H)}function HH(e){var t=typeof e=="function"?e:uC(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function qH(){return null}function KH(e,t){var n=typeof e=="function"?e:uC(e),r=t==null?qH:typeof t=="function"?t:bx(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function GH(){var e=this.parentNode;e&&e.removeChild(this)}function VH(){return this.each(GH)}function YH(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function QH(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function WH(e){return this.select(e?QH:YH)}function XH(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ZH(e){return function(t){e.call(this,t,this.__data__)}}function JH(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function e8(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,a=t.length,o;n<a;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function t8(e,t,n){return function(){var r=this.__on,a,o=ZH(t);if(r){for(var l=0,u=r.length;l<u;++l)if((a=r[l]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=n),a.value=t;return}}this.addEventListener(e.type,o,n),a={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(a):this.__on=[a]}}function n8(e,t,n){var r=JH(e+""),a,o=r.length,l;if(arguments.length<2){var u=this.node().__on;if(u){for(var d=0,h=u.length,g;d<h;++d)for(a=0,g=u[d];a<o;++a)if((l=r[a]).type===g.type&&l.name===g.name)return g.value}return}for(u=t?t8:e8,a=0;a<o;++a)this.each(u(r[a],t,n));return this}function vC(e,t,n){var r=mC(e),a=r.CustomEvent;typeof a=="function"?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function r8(e,t){return function(){return vC(this,e,t)}}function i8(e,t){return function(){return vC(this,e,t.apply(this,arguments))}}function a8(e,t){return this.each((typeof t=="function"?i8:r8)(e,t))}function*s8(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,o=r.length,l;a<o;++a)(l=r[a])&&(yield l)}var wC=[null];function Nr(e,t){this._groups=e,this._parents=t}function Wu(){return new Nr([[document.documentElement]],wC)}function o8(){return this}Nr.prototype=Wu.prototype={constructor:Nr,select:DF,selectAll:zF,selectChild:$F,selectChildren:KF,filter:GF,data:ZF,enter:VF,exit:eH,join:tH,merge:nH,selection:o8,order:rH,sort:iH,call:sH,nodes:oH,node:lH,size:cH,empty:uH,each:dH,attr:bH,style:EH,property:NH,classed:TH,text:RH,html:PH,raise:UH,lower:FH,append:HH,insert:KH,remove:VH,clone:WH,datum:XH,on:n8,dispatch:a8,[Symbol.iterator]:s8};function kr(e){return typeof e=="string"?new Nr([[document.querySelector(e)]],[document.documentElement]):new Nr([[e]],wC)}function l8(e){let t;for(;t=e.sourceEvent;)e=t;return e}function si(e,t){if(e=l8(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const c8={passive:!1},wu={capture:!0,passive:!1};function Zg(e){e.stopImmediatePropagation()}function yl(e){e.preventDefault(),e.stopImmediatePropagation()}function EC(e){var t=e.document.documentElement,n=kr(e).on("dragstart.drag",yl,wu);"onselectstart"in t?n.on("selectstart.drag",yl,wu):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function kC(e,t){var n=e.document.documentElement,r=kr(e).on("dragstart.drag",null);t&&(r.on("click.drag",yl,wu),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Of=e=>()=>e;function Xy(e,{sourceEvent:t,subject:n,target:r,identifier:a,active:o,x:l,y:u,dx:d,dy:h,dispatch:g}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:g}})}Xy.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function u8(e){return!e.ctrlKey&&!e.button}function d8(){return this.parentNode}function f8(e,t){return t??{x:e.x,y:e.y}}function h8(){return navigator.maxTouchPoints||"ontouchstart"in this}function SC(){var e=u8,t=d8,n=f8,r=h8,a={},o=Wh("start","drag","end"),l=0,u,d,h,g,m=0;function y(N){N.on("mousedown.drag",b).filter(r).on("touchstart.drag",S).on("touchmove.drag",k,c8).on("touchend.drag touchcancel.drag",j).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(N,O){if(!(g||!e.call(this,N,O))){var A=_(this,t.call(this,N,O),N,O,"mouse");A&&(kr(N.view).on("mousemove.drag",E,wu).on("mouseup.drag",w,wu),EC(N.view),Zg(N),h=!1,u=N.clientX,d=N.clientY,A("start",N))}}function E(N){if(yl(N),!h){var O=N.clientX-u,A=N.clientY-d;h=O*O+A*A>m}a.mouse("drag",N)}function w(N){kr(N.view).on("mousemove.drag mouseup.drag",null),kC(N.view,h),yl(N),a.mouse("end",N)}function S(N,O){if(e.call(this,N,O)){var A=N.changedTouches,M=t.call(this,N,O),I=A.length,F,$;for(F=0;F<I;++F)($=_(this,M,N,O,A[F].identifier,A[F]))&&(Zg(N),$("start",N,A[F]))}}function k(N){var O=N.changedTouches,A=O.length,M,I;for(M=0;M<A;++M)(I=a[O[M].identifier])&&(yl(N),I("drag",N,O[M]))}function j(N){var O=N.changedTouches,A=O.length,M,I;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),M=0;M<A;++M)(I=a[O[M].identifier])&&(Zg(N),I("end",N,O[M]))}function _(N,O,A,M,I,F){var $=o.copy(),U=si(F||A,O),q,Q,B;if((B=n.call(N,new Xy("beforestart",{sourceEvent:A,target:y,identifier:I,active:l,x:U[0],y:U[1],dx:0,dy:0,dispatch:$}),M))!=null)return q=B.x-U[0]||0,Q=B.y-U[1]||0,function H(z,Y,W){var K=U,D;switch(z){case"start":a[I]=H,D=l++;break;case"end":delete a[I],--l;case"drag":U=si(W||Y,O),D=l;break}$.call(z,N,new Xy(z,{sourceEvent:Y,subject:B,target:y,identifier:I,active:D,x:U[0]+q,y:U[1]+Q,dx:U[0]-K[0],dy:U[1]-K[1],dispatch:$}),M)}}return y.filter=function(N){return arguments.length?(e=typeof N=="function"?N:Of(!!N),y):e},y.container=function(N){return arguments.length?(t=typeof N=="function"?N:Of(N),y):t},y.subject=function(N){return arguments.length?(n=typeof N=="function"?N:Of(N),y):n},y.touchable=function(N){return arguments.length?(r=typeof N=="function"?N:Of(!!N),y):r},y.on=function(){var N=o.on.apply(o,arguments);return N===o?y:N},y.clickDistance=function(N){return arguments.length?(m=(N=+N)*N,y):Math.sqrt(m)},y}function vx(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _C(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Xu(){}var Eu=.7,bh=1/Eu,bl="\\s*([+-]?\\d+)\\s*",ku="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",p8=/^#([0-9a-f]{3,8})$/,m8=new RegExp(`^rgb\\(${bl},${bl},${bl}\\)$`),g8=new RegExp(`^rgb\\(${Ti},${Ti},${Ti}\\)$`),y8=new RegExp(`^rgba\\(${bl},${bl},${bl},${ku}\\)$`),b8=new RegExp(`^rgba\\(${Ti},${Ti},${Ti},${ku}\\)$`),x8=new RegExp(`^hsl\\(${ku},${Ti},${Ti}\\)$`),v8=new RegExp(`^hsla\\(${ku},${Ti},${Ti},${ku}\\)$`),fk={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};vx(Xu,so,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hk,formatHex:hk,formatHex8:w8,formatHsl:E8,formatRgb:pk,toString:pk});function hk(){return this.rgb().formatHex()}function w8(){return this.rgb().formatHex8()}function E8(){return NC(this).formatHsl()}function pk(){return this.rgb().formatRgb()}function so(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=p8.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?mk(t):n===3?new ur(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Df(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Df(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=m8.exec(e))?new ur(t[1],t[2],t[3],1):(t=g8.exec(e))?new ur(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=y8.exec(e))?Df(t[1],t[2],t[3],t[4]):(t=b8.exec(e))?Df(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=x8.exec(e))?bk(t[1],t[2]/100,t[3]/100,1):(t=v8.exec(e))?bk(t[1],t[2]/100,t[3]/100,t[4]):fk.hasOwnProperty(e)?mk(fk[e]):e==="transparent"?new ur(NaN,NaN,NaN,0):null}function mk(e){return new ur(e>>16&255,e>>8&255,e&255,1)}function Df(e,t,n,r){return r<=0&&(e=t=n=NaN),new ur(e,t,n,r)}function k8(e){return e instanceof Xu||(e=so(e)),e?(e=e.rgb(),new ur(e.r,e.g,e.b,e.opacity)):new ur}function Zy(e,t,n,r){return arguments.length===1?k8(e):new ur(e,t,n,r??1)}function ur(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}vx(ur,Zy,_C(Xu,{brighter(e){return e=e==null?bh:Math.pow(bh,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Eu:Math.pow(Eu,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ur(to(this.r),to(this.g),to(this.b),xh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:gk,formatHex:gk,formatHex8:S8,formatRgb:yk,toString:yk}));function gk(){return`#${Ks(this.r)}${Ks(this.g)}${Ks(this.b)}`}function S8(){return`#${Ks(this.r)}${Ks(this.g)}${Ks(this.b)}${Ks((isNaN(this.opacity)?1:this.opacity)*255)}`}function yk(){const e=xh(this.opacity);return`${e===1?"rgb(":"rgba("}${to(this.r)}, ${to(this.g)}, ${to(this.b)}${e===1?")":`, ${e})`}`}function xh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function to(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ks(e){return e=to(e),(e<16?"0":"")+e.toString(16)}function bk(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new oi(e,t,n,r)}function NC(e){if(e instanceof oi)return new oi(e.h,e.s,e.l,e.opacity);if(e instanceof Xu||(e=so(e)),!e)return new oi;if(e instanceof oi)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,u=o-a,d=(o+a)/2;return u?(t===o?l=(n-r)/u+(n<r)*6:n===o?l=(r-t)/u+2:l=(t-n)/u+4,u/=d<.5?o+a:2-o-a,l*=60):u=d>0&&d<1?0:l,new oi(l,u,d,e.opacity)}function _8(e,t,n,r){return arguments.length===1?NC(e):new oi(e,t,n,r??1)}function oi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}vx(oi,_8,_C(Xu,{brighter(e){return e=e==null?bh:Math.pow(bh,e),new oi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Eu:Math.pow(Eu,e),new oi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new ur(Jg(e>=240?e-240:e+120,a,r),Jg(e,a,r),Jg(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new oi(xk(this.h),Rf(this.s),Rf(this.l),xh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=xh(this.opacity);return`${e===1?"hsl(":"hsla("}${xk(this.h)}, ${Rf(this.s)*100}%, ${Rf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xk(e){return e=(e||0)%360,e<0?e+360:e}function Rf(e){return Math.max(0,Math.min(1,e||0))}function Jg(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const wx=e=>()=>e;function N8(e,t){return function(n){return e+n*t}}function C8(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function j8(e){return(e=+e)==1?CC:function(t,n){return n-t?C8(t,n,e):wx(isNaN(t)?n:t)}}function CC(e,t){var n=t-e;return n?N8(e,n):wx(isNaN(e)?t:e)}const vh=(function e(t){var n=j8(t);function r(a,o){var l=n((a=Zy(a)).r,(o=Zy(o)).r),u=n(a.g,o.g),d=n(a.b,o.b),h=CC(a.opacity,o.opacity);return function(g){return a.r=l(g),a.g=u(g),a.b=d(g),a.opacity=h(g),a+""}}return r.gamma=e,r})(1);function A8(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(o){for(a=0;a<n;++a)r[a]=e[a]*(1-o)+t[a]*o;return r}}function T8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function M8(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)a[l]=lu(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(u){for(l=0;l<r;++l)o[l]=a[l](u);return o}}function O8(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ci(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function D8(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=lu(e[a],t[a]):r[a]=t[a];return function(o){for(a in n)r[a]=n[a](o);return r}}var Jy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ey=new RegExp(Jy.source,"g");function R8(e){return function(){return e}}function L8(e){return function(t){return e(t)+""}}function jC(e,t){var n=Jy.lastIndex=ey.lastIndex=0,r,a,o,l=-1,u=[],d=[];for(e=e+"",t=t+"";(r=Jy.exec(e))&&(a=ey.exec(t));)(o=a.index)>n&&(o=t.slice(n,o),u[l]?u[l]+=o:u[++l]=o),(r=r[0])===(a=a[0])?u[l]?u[l]+=a:u[++l]=a:(u[++l]=null,d.push({i:l,x:Ci(r,a)})),n=ey.lastIndex;return n<t.length&&(o=t.slice(n),u[l]?u[l]+=o:u[++l]=o),u.length<2?d[0]?L8(d[0].x):R8(t):(t=d.length,function(h){for(var g=0,m;g<t;++g)u[(m=d[g]).i]=m.x(h);return u.join("")})}function lu(e,t){var n=typeof t,r;return t==null||n==="boolean"?wx(t):(n==="number"?Ci:n==="string"?(r=so(t))?(t=r,vh):jC:t instanceof so?vh:t instanceof Date?O8:T8(t)?A8:Array.isArray(t)?M8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?D8:Ci)(e,t)}var vk=180/Math.PI,eb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function AC(e,t,n,r,a,o){var l,u,d;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(d=e*n+t*r)&&(n-=e*d,r-=t*d),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,d/=u),e*r<t*n&&(e=-e,t=-t,d=-d,l=-l),{translateX:a,translateY:o,rotate:Math.atan2(t,e)*vk,skewX:Math.atan(d)*vk,scaleX:l,scaleY:u}}var Lf;function I8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?eb:AC(t.a,t.b,t.c,t.d,t.e,t.f)}function z8(e){return e==null||(Lf||(Lf=document.createElementNS("http://www.w3.org/2000/svg","g")),Lf.setAttribute("transform",e),!(e=Lf.transform.baseVal.consolidate()))?eb:(e=e.matrix,AC(e.a,e.b,e.c,e.d,e.e,e.f))}function TC(e,t,n,r){function a(h){return h.length?h.pop()+" ":""}function o(h,g,m,y,b,E){if(h!==m||g!==y){var w=b.push("translate(",null,t,null,n);E.push({i:w-4,x:Ci(h,m)},{i:w-2,x:Ci(g,y)})}else(m||y)&&b.push("translate("+m+t+y+n)}function l(h,g,m,y){h!==g?(h-g>180?g+=360:g-h>180&&(h+=360),y.push({i:m.push(a(m)+"rotate(",null,r)-2,x:Ci(h,g)})):g&&m.push(a(m)+"rotate("+g+r)}function u(h,g,m,y){h!==g?y.push({i:m.push(a(m)+"skewX(",null,r)-2,x:Ci(h,g)}):g&&m.push(a(m)+"skewX("+g+r)}function d(h,g,m,y,b,E){if(h!==m||g!==y){var w=b.push(a(b)+"scale(",null,",",null,")");E.push({i:w-4,x:Ci(h,m)},{i:w-2,x:Ci(g,y)})}else(m!==1||y!==1)&&b.push(a(b)+"scale("+m+","+y+")")}return function(h,g){var m=[],y=[];return h=e(h),g=e(g),o(h.translateX,h.translateY,g.translateX,g.translateY,m,y),l(h.rotate,g.rotate,m,y),u(h.skewX,g.skewX,m,y),d(h.scaleX,h.scaleY,g.scaleX,g.scaleY,m,y),h=g=null,function(b){for(var E=-1,w=y.length,S;++E<w;)m[(S=y[E]).i]=S.x(b);return m.join("")}}}var P8=TC(I8,"px, ","px)","deg)"),B8=TC(z8,", ",")",")"),U8=1e-12;function wk(e){return((e=Math.exp(e))+1/e)/2}function $8(e){return((e=Math.exp(e))-1/e)/2}function F8(e){return((e=Math.exp(2*e))-1)/(e+1)}const Wf=(function e(t,n,r){function a(o,l){var u=o[0],d=o[1],h=o[2],g=l[0],m=l[1],y=l[2],b=g-u,E=m-d,w=b*b+E*E,S,k;if(w<U8)k=Math.log(y/h)/t,S=function(M){return[u+M*b,d+M*E,h*Math.exp(t*M*k)]};else{var j=Math.sqrt(w),_=(y*y-h*h+r*w)/(2*h*n*j),N=(y*y-h*h-r*w)/(2*y*n*j),O=Math.log(Math.sqrt(_*_+1)-_),A=Math.log(Math.sqrt(N*N+1)-N);k=(A-O)/t,S=function(M){var I=M*k,F=wk(O),$=h/(n*j)*(F*F8(t*I+O)-$8(O));return[u+$*b,d+$*E,h*F/wk(t*I+O)]}}return S.duration=k*1e3*t/Math.SQRT2,S}return a.rho=function(o){var l=Math.max(.001,+o),u=l*l,d=u*u;return e(l,u,d)},a})(Math.SQRT2,2,4);var Ll=0,nu=0,Zc=0,MC=1e3,wh,ru,Eh=0,oo=0,Zh=0,Su=typeof performance=="object"&&performance.now?performance:Date,OC=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ex(){return oo||(OC(H8),oo=Su.now()+Zh)}function H8(){oo=0}function kh(){this._call=this._time=this._next=null}kh.prototype=DC.prototype={constructor:kh,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ex():+n)+(t==null?0:+t),!this._next&&ru!==this&&(ru?ru._next=this:wh=this,ru=this),this._call=e,this._time=n,tb()},stop:function(){this._call&&(this._call=null,this._time=1/0,tb())}};function DC(e,t,n){var r=new kh;return r.restart(e,t,n),r}function q8(){Ex(),++Ll;for(var e=wh,t;e;)(t=oo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ll}function Ek(){oo=(Eh=Su.now())+Zh,Ll=nu=0;try{q8()}finally{Ll=0,G8(),oo=0}}function K8(){var e=Su.now(),t=e-Eh;t>MC&&(Zh-=t,Eh=e)}function G8(){for(var e,t=wh,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:wh=n);ru=e,tb(r)}function tb(e){if(!Ll){nu&&(nu=clearTimeout(nu));var t=e-oo;t>24?(e<1/0&&(nu=setTimeout(Ek,e-Su.now()-Zh)),Zc&&(Zc=clearInterval(Zc))):(Zc||(Eh=Su.now(),Zc=setInterval(K8,MC)),Ll=1,OC(Ek))}}function kk(e,t,n){var r=new kh;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var V8=Wh("start","end","cancel","interrupt"),Y8=[],RC=0,Sk=1,nb=2,Xf=3,_k=4,rb=5,Zf=6;function Jh(e,t,n,r,a,o){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;Q8(e,n,{name:t,index:r,group:a,on:V8,tween:Y8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:RC})}function kx(e,t){var n=mi(e,t);if(n.state>RC)throw new Error("too late; already scheduled");return n}function Di(e,t){var n=mi(e,t);if(n.state>Xf)throw new Error("too late; already running");return n}function mi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Q8(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=DC(o,0,n.time);function o(h){n.state=Sk,n.timer.restart(l,n.delay,n.time),n.delay<=h&&l(h-n.delay)}function l(h){var g,m,y,b;if(n.state!==Sk)return d();for(g in r)if(b=r[g],b.name===n.name){if(b.state===Xf)return kk(l);b.state===_k?(b.state=Zf,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete r[g]):+g<t&&(b.state=Zf,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete r[g])}if(kk(function(){n.state===Xf&&(n.state=_k,n.timer.restart(u,n.delay,n.time),u(h))}),n.state=nb,n.on.call("start",e,e.__data__,n.index,n.group),n.state===nb){for(n.state=Xf,a=new Array(y=n.tween.length),g=0,m=-1;g<y;++g)(b=n.tween[g].value.call(e,e.__data__,n.index,n.group))&&(a[++m]=b);a.length=m+1}}function u(h){for(var g=h<n.duration?n.ease.call(null,h/n.duration):(n.timer.restart(d),n.state=rb,1),m=-1,y=a.length;++m<y;)a[m].call(e,g);n.state===rb&&(n.on.call("end",e,e.__data__,n.index,n.group),d())}function d(){n.state=Zf,n.timer.stop(),delete r[t];for(var h in r)return;delete e.__transition}}function Jf(e,t){var n=e.__transition,r,a,o=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((r=n[l]).name!==t){o=!1;continue}a=r.state>nb&&r.state<rb,r.state=Zf,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[l]}o&&delete e.__transition}}function W8(e){return this.each(function(){Jf(this,e)})}function X8(e,t){var n,r;return function(){var a=Di(this,e),o=a.tween;if(o!==n){r=n=o;for(var l=0,u=r.length;l<u;++l)if(r[l].name===t){r=r.slice(),r.splice(l,1);break}}a.tween=r}}function Z8(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var o=Di(this,e),l=o.tween;if(l!==r){a=(r=l).slice();for(var u={name:t,value:n},d=0,h=a.length;d<h;++d)if(a[d].name===t){a[d]=u;break}d===h&&a.push(u)}o.tween=a}}function J8(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=mi(this.node(),n).tween,a=0,o=r.length,l;a<o;++a)if((l=r[a]).name===e)return l.value;return null}return this.each((t==null?X8:Z8)(n,e,t))}function Sx(e,t,n){var r=e._id;return e.each(function(){var a=Di(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return mi(a,r).value[t]}}function LC(e,t){var n;return(typeof t=="number"?Ci:t instanceof so?vh:(n=so(t))?(t=n,vh):jC)(e,t)}function eq(e){return function(){this.removeAttribute(e)}}function tq(e){return function(){this.removeAttributeNS(e.space,e.local)}}function nq(e,t,n){var r,a=n+"",o;return function(){var l=this.getAttribute(e);return l===a?null:l===r?o:o=t(r=l,n)}}function rq(e,t,n){var r,a=n+"",o;return function(){var l=this.getAttributeNS(e.space,e.local);return l===a?null:l===r?o:o=t(r=l,n)}}function iq(e,t,n){var r,a,o;return function(){var l,u=n(this),d;return u==null?void this.removeAttribute(e):(l=this.getAttribute(e),d=u+"",l===d?null:l===r&&d===a?o:(a=d,o=t(r=l,u)))}}function aq(e,t,n){var r,a,o;return function(){var l,u=n(this),d;return u==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),d=u+"",l===d?null:l===r&&d===a?o:(a=d,o=t(r=l,u)))}}function sq(e,t){var n=Xh(e),r=n==="transform"?B8:LC;return this.attrTween(e,typeof t=="function"?(n.local?aq:iq)(n,r,Sx(this,"attr."+e,t)):t==null?(n.local?tq:eq)(n):(n.local?rq:nq)(n,r,t))}function oq(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function lq(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function cq(e,t){var n,r;function a(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&lq(e,o)),n}return a._value=t,a}function uq(e,t){var n,r;function a(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&oq(e,o)),n}return a._value=t,a}function dq(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Xh(e);return this.tween(n,(r.local?cq:uq)(r,t))}function fq(e,t){return function(){kx(this,e).delay=+t.apply(this,arguments)}}function hq(e,t){return t=+t,function(){kx(this,e).delay=t}}function pq(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?fq:hq)(t,e)):mi(this.node(),t).delay}function mq(e,t){return function(){Di(this,e).duration=+t.apply(this,arguments)}}function gq(e,t){return t=+t,function(){Di(this,e).duration=t}}function yq(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?mq:gq)(t,e)):mi(this.node(),t).duration}function bq(e,t){if(typeof t!="function")throw new Error;return function(){Di(this,e).ease=t}}function xq(e){var t=this._id;return arguments.length?this.each(bq(t,e)):mi(this.node(),t).ease}function vq(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Di(this,e).ease=n}}function wq(e){if(typeof e!="function")throw new Error;return this.each(vq(this._id,e))}function Eq(e){typeof e!="function"&&(e=fC(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var o=t[a],l=o.length,u=r[a]=[],d,h=0;h<l;++h)(d=o[h])&&e.call(d,d.__data__,h,o)&&u.push(d);return new ha(r,this._parents,this._name,this._id)}function kq(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,a=n.length,o=Math.min(r,a),l=new Array(r),u=0;u<o;++u)for(var d=t[u],h=n[u],g=d.length,m=l[u]=new Array(g),y,b=0;b<g;++b)(y=d[b]||h[b])&&(m[b]=y);for(;u<r;++u)l[u]=t[u];return new ha(l,this._parents,this._name,this._id)}function Sq(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function _q(e,t,n){var r,a,o=Sq(t)?kx:Di;return function(){var l=o(this,e),u=l.on;u!==r&&(a=(r=u).copy()).on(t,n),l.on=a}}function Nq(e,t){var n=this._id;return arguments.length<2?mi(this.node(),n).on.on(e):this.each(_q(n,e,t))}function Cq(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function jq(){return this.on("end.remove",Cq(this._id))}function Aq(e){var t=this._name,n=this._id;typeof e!="function"&&(e=bx(e));for(var r=this._groups,a=r.length,o=new Array(a),l=0;l<a;++l)for(var u=r[l],d=u.length,h=o[l]=new Array(d),g,m,y=0;y<d;++y)(g=u[y])&&(m=e.call(g,g.__data__,y,u))&&("__data__"in g&&(m.__data__=g.__data__),h[y]=m,Jh(h[y],t,n,y,h,mi(g,n)));return new ha(o,this._parents,t,n)}function Tq(e){var t=this._name,n=this._id;typeof e!="function"&&(e=dC(e));for(var r=this._groups,a=r.length,o=[],l=[],u=0;u<a;++u)for(var d=r[u],h=d.length,g,m=0;m<h;++m)if(g=d[m]){for(var y=e.call(g,g.__data__,m,d),b,E=mi(g,n),w=0,S=y.length;w<S;++w)(b=y[w])&&Jh(b,t,n,w,y,E);o.push(y),l.push(g)}return new ha(o,l,t,n)}var Mq=Wu.prototype.constructor;function Oq(){return new Mq(this._groups,this._parents)}function Dq(e,t){var n,r,a;return function(){var o=Rl(this,e),l=(this.style.removeProperty(e),Rl(this,e));return o===l?null:o===n&&l===r?a:a=t(n=o,r=l)}}function IC(e){return function(){this.style.removeProperty(e)}}function Rq(e,t,n){var r,a=n+"",o;return function(){var l=Rl(this,e);return l===a?null:l===r?o:o=t(r=l,n)}}function Lq(e,t,n){var r,a,o;return function(){var l=Rl(this,e),u=n(this),d=u+"";return u==null&&(d=u=(this.style.removeProperty(e),Rl(this,e))),l===d?null:l===r&&d===a?o:(a=d,o=t(r=l,u))}}function Iq(e,t){var n,r,a,o="style."+t,l="end."+o,u;return function(){var d=Di(this,e),h=d.on,g=d.value[o]==null?u||(u=IC(t)):void 0;(h!==n||a!==g)&&(r=(n=h).copy()).on(l,a=g),d.on=r}}function zq(e,t,n){var r=(e+="")=="transform"?P8:LC;return t==null?this.styleTween(e,Dq(e,r)).on("end.style."+e,IC(e)):typeof t=="function"?this.styleTween(e,Lq(e,r,Sx(this,"style."+e,t))).each(Iq(this._id,e)):this.styleTween(e,Rq(e,r,t),n).on("end.style."+e,null)}function Pq(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Bq(e,t,n){var r,a;function o(){var l=t.apply(this,arguments);return l!==a&&(r=(a=l)&&Pq(e,l,n)),r}return o._value=t,o}function Uq(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Bq(e,t,n??""))}function $q(e){return function(){this.textContent=e}}function Fq(e){return function(){var t=e(this);this.textContent=t??""}}function Hq(e){return this.tween("text",typeof e=="function"?Fq(Sx(this,"text",e)):$q(e==null?"":e+""))}function qq(e){return function(t){this.textContent=e.call(this,t)}}function Kq(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&qq(a)),t}return r._value=e,r}function Gq(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Kq(e))}function Vq(){for(var e=this._name,t=this._id,n=zC(),r=this._groups,a=r.length,o=0;o<a;++o)for(var l=r[o],u=l.length,d,h=0;h<u;++h)if(d=l[h]){var g=mi(d,t);Jh(d,e,n,h,l,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new ha(r,this._parents,e,n)}function Yq(){var e,t,n=this,r=n._id,a=n.size();return new Promise(function(o,l){var u={value:l},d={value:function(){--a===0&&o()}};n.each(function(){var h=Di(this,r),g=h.on;g!==e&&(t=(e=g).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(d)),h.on=t}),a===0&&o()})}var Qq=0;function ha(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function zC(){return++Qq}var ta=Wu.prototype;ha.prototype={constructor:ha,select:Aq,selectAll:Tq,selectChild:ta.selectChild,selectChildren:ta.selectChildren,filter:Eq,merge:kq,selection:Oq,transition:Vq,call:ta.call,nodes:ta.nodes,node:ta.node,size:ta.size,empty:ta.empty,each:ta.each,on:Nq,attr:sq,attrTween:dq,style:zq,styleTween:Uq,text:Hq,textTween:Gq,remove:jq,tween:J8,delay:pq,duration:yq,ease:xq,easeVarying:wq,end:Yq,[Symbol.iterator]:ta[Symbol.iterator]};function Wq(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Xq={time:null,delay:0,duration:250,ease:Wq};function Zq(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Jq(e){var t,n;e instanceof ha?(t=e._id,e=e._name):(t=zC(),(n=Xq).time=Ex(),e=e==null?null:e+"");for(var r=this._groups,a=r.length,o=0;o<a;++o)for(var l=r[o],u=l.length,d,h=0;h<u;++h)(d=l[h])&&Jh(d,e,t,h,l,n||Zq(d,t));return new ha(r,this._parents,e,t)}Wu.prototype.interrupt=W8;Wu.prototype.transition=Jq;const If=e=>()=>e;function e7(e,{sourceEvent:t,target:n,transform:r,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function la(e,t,n){this.k=e,this.x=t,this.y=n}la.prototype={constructor:la,scale:function(e){return e===1?this:new la(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new la(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ep=new la(1,0,0);PC.prototype=la.prototype;function PC(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ep;return e.__zoom}function ty(e){e.stopImmediatePropagation()}function Jc(e){e.preventDefault(),e.stopImmediatePropagation()}function t7(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function n7(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Nk(){return this.__zoom||ep}function r7(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function i7(){return navigator.maxTouchPoints||"ontouchstart"in this}function a7(e,t,n){var r=e.invertX(t[0][0])-n[0][0],a=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a),l>o?(o+l)/2:Math.min(0,o)||Math.max(0,l))}function BC(){var e=t7,t=n7,n=a7,r=r7,a=i7,o=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],u=250,d=Wf,h=Wh("start","zoom","end"),g,m,y,b=500,E=150,w=0,S=10;function k(B){B.property("__zoom",Nk).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",$).filter(a).on("touchstart.zoom",U).on("touchmove.zoom",q).on("touchend.zoom touchcancel.zoom",Q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(B,H,z,Y){var W=B.selection?B.selection():B;W.property("__zoom",Nk),B!==W?O(B,H,z,Y):W.interrupt().each(function(){A(this,arguments).event(Y).start().zoom(null,typeof H=="function"?H.apply(this,arguments):H).end()})},k.scaleBy=function(B,H,z,Y){k.scaleTo(B,function(){var W=this.__zoom.k,K=typeof H=="function"?H.apply(this,arguments):H;return W*K},z,Y)},k.scaleTo=function(B,H,z,Y){k.transform(B,function(){var W=t.apply(this,arguments),K=this.__zoom,D=z==null?N(W):typeof z=="function"?z.apply(this,arguments):z,L=K.invert(D),V=typeof H=="function"?H.apply(this,arguments):H;return n(_(j(K,V),D,L),W,l)},z,Y)},k.translateBy=function(B,H,z,Y){k.transform(B,function(){return n(this.__zoom.translate(typeof H=="function"?H.apply(this,arguments):H,typeof z=="function"?z.apply(this,arguments):z),t.apply(this,arguments),l)},null,Y)},k.translateTo=function(B,H,z,Y,W){k.transform(B,function(){var K=t.apply(this,arguments),D=this.__zoom,L=Y==null?N(K):typeof Y=="function"?Y.apply(this,arguments):Y;return n(ep.translate(L[0],L[1]).scale(D.k).translate(typeof H=="function"?-H.apply(this,arguments):-H,typeof z=="function"?-z.apply(this,arguments):-z),K,l)},Y,W)};function j(B,H){return H=Math.max(o[0],Math.min(o[1],H)),H===B.k?B:new la(H,B.x,B.y)}function _(B,H,z){var Y=H[0]-z[0]*B.k,W=H[1]-z[1]*B.k;return Y===B.x&&W===B.y?B:new la(B.k,Y,W)}function N(B){return[(+B[0][0]+ +B[1][0])/2,(+B[0][1]+ +B[1][1])/2]}function O(B,H,z,Y){B.on("start.zoom",function(){A(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(Y).end()}).tween("zoom",function(){var W=this,K=arguments,D=A(W,K).event(Y),L=t.apply(W,K),V=z==null?N(L):typeof z=="function"?z.apply(W,K):z,R=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),oe=W.__zoom,ge=typeof H=="function"?H.apply(W,K):H,te=d(oe.invert(V).concat(R/oe.k),ge.invert(V).concat(R/ge.k));return function(ue){if(ue===1)ue=ge;else{var G=te(ue),ne=R/G[2];ue=new la(ne,V[0]-G[0]*ne,V[1]-G[1]*ne)}D.zoom(null,ue)}})}function A(B,H,z){return!z&&B.__zooming||new M(B,H)}function M(B,H){this.that=B,this.args=H,this.active=0,this.sourceEvent=null,this.extent=t.apply(B,H),this.taps=0}M.prototype={event:function(B){return B&&(this.sourceEvent=B),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(B,H){return this.mouse&&B!=="mouse"&&(this.mouse[1]=H.invert(this.mouse[0])),this.touch0&&B!=="touch"&&(this.touch0[1]=H.invert(this.touch0[0])),this.touch1&&B!=="touch"&&(this.touch1[1]=H.invert(this.touch1[0])),this.that.__zoom=H,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(B){var H=kr(this.that).datum();h.call(B,this.that,new e7(B,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:h}),H)}};function I(B,...H){if(!e.apply(this,arguments))return;var z=A(this,H).event(B),Y=this.__zoom,W=Math.max(o[0],Math.min(o[1],Y.k*Math.pow(2,r.apply(this,arguments)))),K=si(B);if(z.wheel)(z.mouse[0][0]!==K[0]||z.mouse[0][1]!==K[1])&&(z.mouse[1]=Y.invert(z.mouse[0]=K)),clearTimeout(z.wheel);else{if(Y.k===W)return;z.mouse=[K,Y.invert(K)],Jf(this),z.start()}Jc(B),z.wheel=setTimeout(D,E),z.zoom("mouse",n(_(j(Y,W),z.mouse[0],z.mouse[1]),z.extent,l));function D(){z.wheel=null,z.end()}}function F(B,...H){if(y||!e.apply(this,arguments))return;var z=B.currentTarget,Y=A(this,H,!0).event(B),W=kr(B.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",R,!0),K=si(B,z),D=B.clientX,L=B.clientY;EC(B.view),ty(B),Y.mouse=[K,this.__zoom.invert(K)],Jf(this),Y.start();function V(oe){if(Jc(oe),!Y.moved){var ge=oe.clientX-D,te=oe.clientY-L;Y.moved=ge*ge+te*te>w}Y.event(oe).zoom("mouse",n(_(Y.that.__zoom,Y.mouse[0]=si(oe,z),Y.mouse[1]),Y.extent,l))}function R(oe){W.on("mousemove.zoom mouseup.zoom",null),kC(oe.view,Y.moved),Jc(oe),Y.event(oe).end()}}function $(B,...H){if(e.apply(this,arguments)){var z=this.__zoom,Y=si(B.changedTouches?B.changedTouches[0]:B,this),W=z.invert(Y),K=z.k*(B.shiftKey?.5:2),D=n(_(j(z,K),Y,W),t.apply(this,H),l);Jc(B),u>0?kr(this).transition().duration(u).call(O,D,Y,B):kr(this).call(k.transform,D,Y,B)}}function U(B,...H){if(e.apply(this,arguments)){var z=B.touches,Y=z.length,W=A(this,H,B.changedTouches.length===Y).event(B),K,D,L,V;for(ty(B),D=0;D<Y;++D)L=z[D],V=si(L,this),V=[V,this.__zoom.invert(V),L.identifier],W.touch0?!W.touch1&&W.touch0[2]!==V[2]&&(W.touch1=V,W.taps=0):(W.touch0=V,K=!0,W.taps=1+!!g);g&&(g=clearTimeout(g)),K&&(W.taps<2&&(m=V[0],g=setTimeout(function(){g=null},b)),Jf(this),W.start())}}function q(B,...H){if(this.__zooming){var z=A(this,H).event(B),Y=B.changedTouches,W=Y.length,K,D,L,V;for(Jc(B),K=0;K<W;++K)D=Y[K],L=si(D,this),z.touch0&&z.touch0[2]===D.identifier?z.touch0[0]=L:z.touch1&&z.touch1[2]===D.identifier&&(z.touch1[0]=L);if(D=z.that.__zoom,z.touch1){var R=z.touch0[0],oe=z.touch0[1],ge=z.touch1[0],te=z.touch1[1],ue=(ue=ge[0]-R[0])*ue+(ue=ge[1]-R[1])*ue,G=(G=te[0]-oe[0])*G+(G=te[1]-oe[1])*G;D=j(D,Math.sqrt(ue/G)),L=[(R[0]+ge[0])/2,(R[1]+ge[1])/2],V=[(oe[0]+te[0])/2,(oe[1]+te[1])/2]}else if(z.touch0)L=z.touch0[0],V=z.touch0[1];else return;z.zoom("touch",n(_(D,L,V),z.extent,l))}}function Q(B,...H){if(this.__zooming){var z=A(this,H).event(B),Y=B.changedTouches,W=Y.length,K,D;for(ty(B),y&&clearTimeout(y),y=setTimeout(function(){y=null},b),K=0;K<W;++K)D=Y[K],z.touch0&&z.touch0[2]===D.identifier?delete z.touch0:z.touch1&&z.touch1[2]===D.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(D=si(D,this),Math.hypot(m[0]-D[0],m[1]-D[1])<S)){var L=kr(this).on("dblclick.zoom");L&&L.apply(this,arguments)}}}return k.wheelDelta=function(B){return arguments.length?(r=typeof B=="function"?B:If(+B),k):r},k.filter=function(B){return arguments.length?(e=typeof B=="function"?B:If(!!B),k):e},k.touchable=function(B){return arguments.length?(a=typeof B=="function"?B:If(!!B),k):a},k.extent=function(B){return arguments.length?(t=typeof B=="function"?B:If([[+B[0][0],+B[0][1]],[+B[1][0],+B[1][1]]]),k):t},k.scaleExtent=function(B){return arguments.length?(o[0]=+B[0],o[1]=+B[1],k):[o[0],o[1]]},k.translateExtent=function(B){return arguments.length?(l[0][0]=+B[0][0],l[1][0]=+B[1][0],l[0][1]=+B[0][1],l[1][1]=+B[1][1],k):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},k.constrain=function(B){return arguments.length?(n=B,k):n},k.duration=function(B){return arguments.length?(u=+B,k):u},k.interpolate=function(B){return arguments.length?(d=B,k):d},k.on=function(){var B=h.on.apply(h,arguments);return B===h?k:B},k.clickDistance=function(B){return arguments.length?(w=(B=+B)*B,k):Math.sqrt(w)},k.tapDistance=function(B){return arguments.length?(S=+B,k):S},k}const fi={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},_u=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],UC=["Enter"," ","Escape"],$C={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Il;(function(e){e.Strict="strict",e.Loose="loose"})(Il||(Il={}));var no;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(no||(no={}));var Nu;(function(e){e.Partial="partial",e.Full="full"})(Nu||(Nu={}));const FC={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ns;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ns||(ns={}));var Sh;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Sh||(Sh={}));var De;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(De||(De={}));const Ck={[De.Left]:De.Right,[De.Right]:De.Left,[De.Top]:De.Bottom,[De.Bottom]:De.Top};function HC(e){return e===null?null:e?"valid":"invalid"}const qC=e=>"id"in e&&"source"in e&&"target"in e,s7=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),_x=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Zu=(e,t=[0,0])=>{const{width:n,height:r}=ga(e),a=e.origin??t,o=n*a[0],l=r*a[1];return{x:e.position.x-o,y:e.position.y-l}},o7=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,a)=>{const o=typeof a=="string";let l=!t.nodeLookup&&!o?a:void 0;t.nodeLookup&&(l=o?t.nodeLookup.get(a):_x(a)?a:t.nodeLookup.get(a.id));const u=l?_h(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return tp(r,u)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return np(n)},Ju=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(a=>{(t.filter===void 0||t.filter(a))&&(n=tp(n,_h(a)),r=!0)}),r?np(n):{x:0,y:0,width:0,height:0}},Nx=(e,t,[n,r,a]=[0,0,1],o=!1,l=!1)=>{const u=(t.x-n)/a,d=(t.y-r)/a,h=t.width/a,g=t.height/a,m=[];for(const y of e.values()){const{measured:b,selectable:E=!0,hidden:w=!1}=y;if(l&&!E||w)continue;const S=b.width??y.width??y.initialWidth??0,k=b.height??y.height??y.initialHeight??0,{x:j,y:_}=y.internals.positionAbsolute,N=YC(u,d,h,g,j,_,S,k),O=S*k,A=o&&N>0;(!y.internals.handleBounds||A||N>=O||y.dragging)&&m.push(y)}return m},l7=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function c7(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(a=>a.id)):null;return e.forEach(a=>{a.measured.width&&a.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!a.hidden)&&(!r||r.has(a.id))&&n.set(a.id,a)}),n}async function u7({nodes:e,width:t,height:n,panZoom:r,minZoom:a,maxZoom:o},l){if(e.size===0)return!0;const u=c7(e,l),d=Ju(u),h=jx(d,t,n,(l==null?void 0:l.minZoom)??a,(l==null?void 0:l.maxZoom)??o,(l==null?void 0:l.padding)??.1);return await r.setViewport(h,{duration:l==null?void 0:l.duration,ease:l==null?void 0:l.ease,interpolate:l==null?void 0:l.interpolate}),!0}function KC({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:a,onError:o}){const l=n.get(e),u=l.parentId?n.get(l.parentId):void 0,{x:d,y:h}=u?u.internals.positionAbsolute:{x:0,y:0},g=l.origin??r;let m=l.extent||a;if(l.extent==="parent"&&!l.expandParent)if(!u)o==null||o("005",fi.error005());else{const b=u.measured.width,E=u.measured.height;b&&E&&(m=[[d,h],[d+b,h+E]])}else u&&co(l.extent)&&(m=[[l.extent[0][0]+d,l.extent[0][1]+h],[l.extent[1][0]+d,l.extent[1][1]+h]]);const y=co(m)?lo(t,m,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&(o==null||o("015",fi.error015())),{position:{x:y.x-d+(l.measured.width??0)*g[0],y:y.y-h+(l.measured.height??0)*g[1]},positionAbsolute:y}}async function d7({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:a}){const o=new Set(e.map(y=>y.id)),l=[];for(const y of n){if(y.deletable===!1)continue;const b=o.has(y.id),E=!b&&y.parentId&&l.find(w=>w.id===y.parentId);(b||E)&&l.push(y)}const u=new Set(t.map(y=>y.id)),d=r.filter(y=>y.deletable!==!1),g=l7(l,d);for(const y of d)u.has(y.id)&&!g.find(E=>E.id===y.id)&&g.push(y);if(!a)return{edges:g,nodes:l};const m=await a({nodes:l,edges:g});return typeof m=="boolean"?m?{edges:g,nodes:l}:{edges:[],nodes:[]}:m}const zl=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),lo=(e={x:0,y:0},t,n)=>({x:zl(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:zl(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function GC(e,t,n){const{width:r,height:a}=ga(n),{x:o,y:l}=n.internals.positionAbsolute;return lo(e,[[o,l],[o+r,l+a]],t)}const jk=(e,t,n)=>e<t?zl(Math.abs(e-t),1,t)/t:e>n?-zl(Math.abs(e-n),1,t)/t:0,Cx=(e,t,n=15,r=40)=>{const a=jk(e.x,r,t.width-r)*n,o=jk(e.y,r,t.height-r)*n;return[a,o]},tp=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),ib=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),np=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Cu=(e,t=[0,0])=>{var a,o;const{x:n,y:r}=_x(e)?e.internals.positionAbsolute:Zu(e,t);return{x:n,y:r,width:((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},_h=(e,t=[0,0])=>{var a,o;const{x:n,y:r}=_x(e)?e.internals.positionAbsolute:Zu(e,t);return{x:n,y:r,x2:n+(((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},VC=(e,t)=>np(tp(ib(e),ib(t))),YC=(e,t,n,r,a,o,l,u)=>{const d=Math.max(0,Math.min(e+n,a+l)-Math.max(e,a)),h=Math.max(0,Math.min(t+r,o+u)-Math.max(t,o));return Math.ceil(d*h)},Nh=(e,t)=>YC(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),Ak=e=>li(e.width)&&li(e.height)&&li(e.x)&&li(e.y),li=e=>!isNaN(e)&&isFinite(e),QC=(e,t)=>(n,r)=>{},ed=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),td=({x:e,y:t},[n,r,a],o=!1,l=[1,1])=>{const u={x:(e-n)/a,y:(t-r)/a};return o?ed(u,l):u},Pl=({x:e,y:t},[n,r,a])=>({x:e*a+n,y:t*a+r});function rl(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function f7(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=rl(e,n),a=rl(e,t);return{top:r,right:a,bottom:r,left:a,x:a*2,y:r*2}}if(typeof e=="object"){const r=rl(e.top??e.y??0,n),a=rl(e.bottom??e.y??0,n),o=rl(e.left??e.x??0,t),l=rl(e.right??e.x??0,t);return{top:r,right:l,bottom:a,left:o,x:o+l,y:r+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function h7(e,t,n,r,a,o){const{x:l,y:u}=Pl(e,[t,n,r]),{x:d,y:h}=Pl({x:e.x+e.width,y:e.y+e.height},[t,n,r]),g=a-d,m=o-h;return{left:Math.floor(l),top:Math.floor(u),right:Math.floor(g),bottom:Math.floor(m)}}const jx=(e,t,n,r,a,o)=>{const l=f7(o,t,n),u=(t-l.x)/e.width,d=(n-l.y)/e.height,h=Math.min(u,d),g=zl(h,r,a),m=e.x+e.width/2,y=e.y+e.height/2,b=t/2-m*g,E=n/2-y*g,w=h7(e,b,E,g,t,n),S={left:Math.min(w.left-l.left,0),top:Math.min(w.top-l.top,0),right:Math.min(w.right-l.right,0),bottom:Math.min(w.bottom-l.bottom,0)};return{x:b-S.left+S.right,y:E-S.top+S.bottom,zoom:g}},ju=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function co(e){return e!=null&&e!=="parent"}function ga(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function WC(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function XC(e,t={width:0,height:0},n,r,a){const o={...e},l=r.get(n);if(l){const u=l.origin||a;o.x+=l.internals.positionAbsolute.x-(t.width??0)*u[0],o.y+=l.internals.positionAbsolute.y-(t.height??0)*u[1]}return o}function Tk(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function p7(){let e,t;return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}function m7(e){return{...$C,...e||{}}}function cu(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:a}){const{x:o,y:l}=ci(e),u=td({x:o-((a==null?void 0:a.left)??0),y:l-((a==null?void 0:a.top)??0)},r),{x:d,y:h}=n?ed(u,t):u;return{xSnapped:d,ySnapped:h,...u}}const Ax=e=>({width:e.offsetWidth,height:e.offsetHeight}),ZC=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},g7=["INPUT","SELECT","TEXTAREA"];function JC(e){var r,a;const t=((a=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:a[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:g7.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const ej=e=>"clientX"in e,ci=(e,t)=>{var o,l;const n=ej(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,a=n?e.clientY:(l=e.touches)==null?void 0:l[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}},Mk=(e,t,n,r,a)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(l=>{const u=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:a,position:l.getAttribute("data-handlepos"),x:(u.left-n.left)/r,y:(u.top-n.top)/r,...Ax(l)}})};function tj({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:a,sourceControlY:o,targetControlX:l,targetControlY:u}){const d=e*.125+a*.375+l*.375+n*.125,h=t*.125+o*.375+u*.375+r*.125,g=Math.abs(d-e),m=Math.abs(h-t);return[d,h,g,m]}function zf(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ok({pos:e,x1:t,y1:n,x2:r,y2:a,c:o}){switch(e){case De.Left:return[t-zf(t-r,o),n];case De.Right:return[t+zf(r-t,o),n];case De.Top:return[t,n-zf(n-a,o)];case De.Bottom:return[t,n+zf(a-n,o)]}}function nj({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:a,targetPosition:o=De.Top,curvature:l=.25}){const[u,d]=Ok({pos:n,x1:e,y1:t,x2:r,y2:a,c:l}),[h,g]=Ok({pos:o,x1:r,y1:a,x2:e,y2:t,c:l}),[m,y,b,E]=tj({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:u,sourceControlY:d,targetControlX:h,targetControlY:g});return[`M${e},${t} C${u},${d} ${h},${g} ${r},${a}`,m,y,b,E]}function rj({sourceX:e,sourceY:t,targetX:n,targetY:r}){const a=Math.abs(n-e)/2,o=n<e?n+a:n-a,l=Math.abs(r-t)/2,u=r<t?r+l:r-l;return[o,u,a,l]}function y7({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:a=!1,zIndexMode:o="basic"}){if(o==="manual")return r;const l=a&&n?r+1e3:r,u=Math.max(e.parentId||a&&e.selected?e.internals.z:0,t.parentId||a&&t.selected?t.internals.z:0);return l+u}function b7({sourceNode:e,targetNode:t,width:n,height:r,transform:a}){const o=tp(_h(e),_h(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const l={x:-a[0]/a[2],y:-a[1]/a[2],width:n/a[2],height:r/a[2]};return Nh(l,np(o))>0}const x7=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,v7=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),w7=(e,t,n={})=>{var o;if(!e.source||!e.target)return(o=n.onError)==null||o.call(n,"006",fi.error006()),t;const r=n.getEdgeId||x7;let a;return qC(e)?a={...e}:a={...e,id:r(e)},v7(a,t)?t:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,t.concat(a))};function ij({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[a,o,l,u]=rj({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,a,o,l,u]}const Dk={[De.Left]:{x:-1,y:0},[De.Right]:{x:1,y:0},[De.Top]:{x:0,y:-1},[De.Bottom]:{x:0,y:1}},E7=({source:e,sourcePosition:t=De.Bottom,target:n})=>t===De.Left||t===De.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Rk=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function k7({source:e,sourcePosition:t=De.Bottom,target:n,targetPosition:r=De.Top,center:a,offset:o,stepPosition:l}){const u=Dk[t],d=Dk[r],h={x:e.x+u.x*o,y:e.y+u.y*o},g={x:n.x+d.x*o,y:n.y+d.y*o},m=E7({source:h,sourcePosition:t,target:g}),y=m.x!==0?"x":"y",b=m[y];let E=[],w,S;const k={x:0,y:0},j={x:0,y:0},[,,_,N]=rj({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(u[y]*d[y]===-1){y==="x"?(w=a.x??h.x+(g.x-h.x)*l,S=a.y??(h.y+g.y)/2):(w=a.x??(h.x+g.x)/2,S=a.y??h.y+(g.y-h.y)*l);const I=[{x:w,y:h.y},{x:w,y:g.y}],F=[{x:h.x,y:S},{x:g.x,y:S}];u[y]===b?E=y==="x"?I:F:E=y==="x"?F:I}else{const I=[{x:h.x,y:g.y}],F=[{x:g.x,y:h.y}];if(y==="x"?E=u.x===b?F:I:E=u.y===b?I:F,t===r){const B=Math.abs(e[y]-n[y]);if(B<=o){const H=Math.min(o-1,o-B);u[y]===b?k[y]=(h[y]>e[y]?-1:1)*H:j[y]=(g[y]>n[y]?-1:1)*H}}if(t!==r){const B=y==="x"?"y":"x",H=u[y]===d[B],z=h[B]>g[B],Y=h[B]<g[B];(u[y]===1&&(!H&&z||H&&Y)||u[y]!==1&&(!H&&Y||H&&z))&&(E=y==="x"?I:F)}const $={x:h.x+k.x,y:h.y+k.y},U={x:g.x+j.x,y:g.y+j.y},q=Math.max(Math.abs($.x-E[0].x),Math.abs(U.x-E[0].x)),Q=Math.max(Math.abs($.y-E[0].y),Math.abs(U.y-E[0].y));q>=Q?(w=($.x+U.x)/2,S=E[0].y):(w=E[0].x,S=($.y+U.y)/2)}const O={x:h.x+k.x,y:h.y+k.y},A={x:g.x+j.x,y:g.y+j.y};return[[e,...O.x!==E[0].x||O.y!==E[0].y?[O]:[],...E,...A.x!==E[E.length-1].x||A.y!==E[E.length-1].y?[A]:[],n],w,S,_,N]}function S7(e,t,n,r){const a=Math.min(Rk(e,t)/2,Rk(t,n)/2,r),{x:o,y:l}=t;if(e.x===o&&o===n.x||e.y===l&&l===n.y)return`L${o} ${l}`;if(e.y===l){const h=e.x<n.x?-1:1,g=e.y<n.y?1:-1;return`L ${o+a*h},${l}Q ${o},${l} ${o},${l+a*g}`}const u=e.x<n.x?1:-1,d=e.y<n.y?-1:1;return`L ${o},${l+a*d}Q ${o},${l} ${o+a*u},${l}`}function ab({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:a,targetPosition:o=De.Top,borderRadius:l=5,centerX:u,centerY:d,offset:h=20,stepPosition:g=.5}){const[m,y,b,E,w]=k7({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:a},targetPosition:o,center:{x:u,y:d},offset:h,stepPosition:g});let S=`M${m[0].x} ${m[0].y}`;for(let k=1;k<m.length-1;k++)S+=S7(m[k-1],m[k],m[k+1],l);return S+=`L${m[m.length-1].x} ${m[m.length-1].y}`,[S,y,b,E,w]}function Lk(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function _7(e){var m;const{sourceNode:t,targetNode:n}=e;if(!Lk(t)||!Lk(n))return null;const r=t.internals.handleBounds||Ik(t.handles),a=n.internals.handleBounds||Ik(n.handles),o=zk((r==null?void 0:r.source)??[],e.sourceHandle),l=zk(e.connectionMode===Il.Strict?(a==null?void 0:a.target)??[]:((a==null?void 0:a.target)??[]).concat((a==null?void 0:a.source)??[]),e.targetHandle);if(!o||!l)return(m=e.onError)==null||m.call(e,"008",fi.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const u=(o==null?void 0:o.position)||De.Bottom,d=(l==null?void 0:l.position)||De.Top,h=uo(t,o,u),g=uo(n,l,d);return{sourceX:h.x,sourceY:h.y,targetX:g.x,targetY:g.y,sourcePosition:u,targetPosition:d}}function Ik(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function uo(e,t,n=De.Left,r=!1){const a=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:l,height:u}=t??ga(e);if(r)return{x:a+l/2,y:o+u/2};switch((t==null?void 0:t.position)??n){case De.Top:return{x:a+l/2,y:o};case De.Right:return{x:a+l,y:o+u/2};case De.Bottom:return{x:a+l/2,y:o+u};case De.Left:return{x:a,y:o+u/2}}}function zk(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function sb(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function N7(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:a}){const o=new Set;return e.reduce((l,u)=>([u.markerStart||r,u.markerEnd||a].forEach(d=>{if(d&&typeof d=="object"){const h=sb(d,t);o.has(h)||(l.push({id:h,color:d.color||n,...d}),o.add(h))}}),l),[]).sort((l,u)=>l.id.localeCompare(u.id))}const aj=1e3,C7=10,Tx={nodeOrigin:[0,0],nodeExtent:_u,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},j7={...Tx,checkEquality:!0};function Mx(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function A7(e,t,n){const r=Mx(Tx,n);for(const a of e.values())if(a.parentId)Dx(a,e,t,r);else{const o=Zu(a,r.nodeOrigin),l=co(a.extent)?a.extent:r.nodeExtent,u=lo(o,l,ga(a));a.internals.positionAbsolute=u}}function T7(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const a of e.handles){const o={id:a.id,width:a.width??1,height:a.height??1,nodeId:e.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?n.push(o):a.type==="target"&&r.push(o)}return{source:n,target:r}}function Ox(e){return e==="manual"}function ob(e,t,n,r={}){var g,m;const a=Mx(j7,r),o={i:0},l=new Map(t),u=a!=null&&a.elevateNodesOnSelect&&!Ox(a.zIndexMode)?aj:0;let d=e.length>0,h=!1;t.clear(),n.clear();for(const y of e){let b=l.get(y.id);if(a.checkEquality&&y===(b==null?void 0:b.internals.userNode))t.set(y.id,b);else{const E=Zu(y,a.nodeOrigin),w=co(y.extent)?y.extent:a.nodeExtent,S=lo(E,w,ga(y));b={...a.defaults,...y,measured:{width:(g=y.measured)==null?void 0:g.width,height:(m=y.measured)==null?void 0:m.height},internals:{positionAbsolute:S,handleBounds:T7(y,b),z:sj(y,u,a.zIndexMode),userNode:y}},t.set(y.id,b)}(b.measured===void 0||b.measured.width===void 0||b.measured.height===void 0)&&!b.hidden&&(d=!1),y.parentId&&Dx(b,t,n,r,o),h||(h=y.selected??!1)}return{nodesInitialized:d,hasSelectedNodes:h}}function M7(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Dx(e,t,n,r,a){const{elevateNodesOnSelect:o,nodeOrigin:l,nodeExtent:u,zIndexMode:d}=Mx(Tx,r),h=e.parentId,g=t.get(h);if(!g){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}M7(e,n),a&&!g.parentId&&g.internals.rootParentIndex===void 0&&d==="auto"&&(g.internals.rootParentIndex=++a.i,g.internals.z=g.internals.z+a.i*C7),a&&g.internals.rootParentIndex!==void 0&&(a.i=g.internals.rootParentIndex);const m=o&&!Ox(d)?aj:0,{x:y,y:b,z:E}=O7(e,g,l,u,m,d),{positionAbsolute:w}=e.internals,S=y!==w.x||b!==w.y;(S||E!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:y,y:b}:w,z:E}})}function sj(e,t,n){const r=li(e.zIndex)?e.zIndex:0;return Ox(n)?r:r+(e.selected?t:0)}function O7(e,t,n,r,a,o){const{x:l,y:u}=t.internals.positionAbsolute,d=ga(e),h=Zu(e,n),g=co(e.extent)?lo(h,e.extent,d):h;let m=lo({x:l+g.x,y:u+g.y},r,d);e.extent==="parent"&&(m=GC(m,d,t));const y=sj(e,a,o),b=t.internals.z??0;return{x:m.x,y:m.y,z:b>=y?b+1:y}}function Rx(e,t,n,r=[0,0]){var l;const a=[],o=new Map;for(const u of e){const d=t.get(u.parentId);if(!d)continue;const h=((l=o.get(u.parentId))==null?void 0:l.expandedRect)??Cu(d),g=VC(h,u.rect);o.set(u.parentId,{expandedRect:g,parent:d})}return o.size>0&&o.forEach(({expandedRect:u,parent:d},h)=>{var _;const g=d.internals.positionAbsolute,m=ga(d),y=d.origin??r,b=u.x<g.x?Math.round(Math.abs(g.x-u.x)):0,E=u.y<g.y?Math.round(Math.abs(g.y-u.y)):0,w=Math.max(m.width,Math.round(u.width)),S=Math.max(m.height,Math.round(u.height)),k=(w-m.width)*y[0],j=(S-m.height)*y[1];(b>0||E>0||k||j)&&(a.push({id:h,type:"position",position:{x:d.position.x-b+k,y:d.position.y-E+j}}),(_=n.get(h))==null||_.forEach(N=>{e.some(O=>O.id===N.id)||a.push({id:N.id,type:"position",position:{x:N.position.x+b,y:N.position.y+E}})})),(m.width<u.width||m.height<u.height||b||E)&&a.push({id:h,type:"dimensions",setAttributes:!0,dimensions:{width:w+(b?y[0]*b-k:0),height:S+(E?y[1]*E-j:0)}})}),a}function D7(e,t,n,r,a,o,l){const u=r==null?void 0:r.querySelector(".xyflow__viewport");let d=!1;if(!u)return{changes:[],updatedInternals:d};const h=[],g=window.getComputedStyle(u),{m22:m}=new window.DOMMatrixReadOnly(g.transform),y=[];for(const b of e.values()){const E=t.get(b.id);if(!E)continue;if(E.hidden){t.set(E.id,{...E,internals:{...E.internals,handleBounds:void 0}}),d=!0;continue}const w=Ax(b.nodeElement),S=E.measured.width!==w.width||E.measured.height!==w.height;if(!!(w.width&&w.height&&(S||!E.internals.handleBounds||b.force))){const j=b.nodeElement.getBoundingClientRect(),_=co(E.extent)?E.extent:o;let{positionAbsolute:N}=E.internals;E.parentId&&E.extent==="parent"?N=GC(N,w,t.get(E.parentId)):_&&(N=lo(N,_,w));const O={...E,measured:w,internals:{...E.internals,positionAbsolute:N,handleBounds:{source:Mk("source",b.nodeElement,j,m,E.id),target:Mk("target",b.nodeElement,j,m,E.id)}}};t.set(E.id,O),E.parentId&&Dx(O,t,n,{nodeOrigin:a,zIndexMode:l}),d=!0,S&&(h.push({id:E.id,type:"dimensions",dimensions:w}),E.expandParent&&E.parentId&&y.push({id:E.id,parentId:E.parentId,rect:Cu(O,a)}))}}if(y.length>0){const b=Rx(y,t,n,a);h.push(...b)}return{changes:h,updatedInternals:d}}async function R7({delta:e,panZoom:t,transform:n,translateExtent:r,width:a,height:o}){if(!t||!e.x&&!e.y)return!1;const l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[a,o]],r);return!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2])}function Pk(e,t,n,r,a,o){let l=a;const u=r.get(l)||new Map;r.set(l,u.set(n,t)),l=`${a}-${e}`;const d=r.get(l)||new Map;if(r.set(l,d.set(n,t)),o){l=`${a}-${e}-${o}`;const h=r.get(l)||new Map;r.set(l,h.set(n,t))}}function oj(e,t,n){e.clear(),t.clear();for(const r of n){const{source:a,target:o,sourceHandle:l=null,targetHandle:u=null}=r,d={edgeId:r.id,source:a,target:o,sourceHandle:l,targetHandle:u},h=`${a}-${l}--${o}-${u}`,g=`${o}-${u}--${a}-${l}`;Pk("source",d,g,e,a,l),Pk("target",d,h,e,o,u),t.set(r.id,r)}}function lj(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:lj(n,t):!1}function Bk(e,t,n){var a;let r=e;do{if((a=r==null?void 0:r.matches)!=null&&a.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function L7(e,t,n,r){const a=new Map;for(const[o,l]of e)if((l.selected||l.id===r)&&(!l.parentId||!lj(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){const u=e.get(o);u&&a.set(o,{id:o,position:u.position||{x:0,y:0},distance:{x:n.x-u.internals.positionAbsolute.x,y:n.y-u.internals.positionAbsolute.y},extent:u.extent,parentId:u.parentId,origin:u.origin,expandParent:u.expandParent,internals:{positionAbsolute:u.internals.positionAbsolute||{x:0,y:0}},measured:{width:u.measured.width??0,height:u.measured.height??0}})}return a}function ny({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var l,u,d;const a=[];for(const[h,g]of t){const m=(l=n.get(h))==null?void 0:l.internals.userNode;m&&a.push({...m,position:g.position,dragging:r})}if(!e)return[a[0],a];const o=(u=n.get(e))==null?void 0:u.internals.userNode;return[o?{...o,position:((d=t.get(e))==null?void 0:d.position)||o.position,dragging:r}:a[0],a]}function I7({dragItems:e,snapGrid:t,x:n,y:r}){const a=e.values().next().value;if(!a)return null;const o={x:n-a.distance.x,y:r-a.distance.y},l=ed(o,t);return{x:l.x-o.x,y:l.y-o.y}}function z7({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:a}){let o={x:null,y:null},l=0,u=new Map,d=!1,h={x:0,y:0},g=null,m=!1,y=null,b=!1,E=!1,w=null;function S({noDragClassName:j,handleSelector:_,domNode:N,isSelectable:O,nodeId:A,nodeClickDistance:M=0}){y=kr(N);function I({x:q,y:Q}){const{nodeLookup:B,nodeExtent:H,snapGrid:z,snapToGrid:Y,nodeOrigin:W,onNodeDrag:K,onSelectionDrag:D,onError:L,updateNodePositions:V}=t();o={x:q,y:Q};let R=!1;const oe=u.size>1,ge=oe&&H?ib(Ju(u)):null,te=oe&&Y?I7({dragItems:u,snapGrid:z,x:q,y:Q}):null;for(const[ue,G]of u){if(!B.has(ue))continue;let ne={x:q-G.distance.x,y:Q-G.distance.y};Y&&(ne=te?{x:Math.round(ne.x+te.x),y:Math.round(ne.y+te.y)}:ed(ne,z));let de=null;if(oe&&H&&!G.extent&&ge){const{positionAbsolute:we}=G.internals,ze=we.x-ge.x+H[0][0],Qe=we.x+G.measured.width-ge.x2+H[1][0],Ce=we.y-ge.y+H[0][1],ht=we.y+G.measured.height-ge.y2+H[1][1];de=[[ze,Ce],[Qe,ht]]}const{position:xe,positionAbsolute:ke}=KC({nodeId:ue,nextPosition:ne,nodeLookup:B,nodeExtent:de||H,nodeOrigin:W,onError:L});R=R||G.position.x!==xe.x||G.position.y!==xe.y,G.position=xe,G.internals.positionAbsolute=ke}if(E=E||R,!!R&&(V(u,!0),w&&(r||K||!A&&D))){const[ue,G]=ny({nodeId:A,dragItems:u,nodeLookup:B});r==null||r(w,u,ue,G),K==null||K(w,ue,G),A||D==null||D(w,G)}}async function F(){if(!g)return;const{transform:q,panBy:Q,autoPanSpeed:B,autoPanOnNodeDrag:H}=t();if(!H){d=!1,cancelAnimationFrame(l);return}const[z,Y]=Cx(h,g,B);(z!==0||Y!==0)&&(o.x=(o.x??0)-z/q[2],o.y=(o.y??0)-Y/q[2],await Q({x:z,y:Y})&&I(o)),l=requestAnimationFrame(F)}function $(q){var oe;const{nodeLookup:Q,multiSelectionActive:B,nodesDraggable:H,transform:z,snapGrid:Y,snapToGrid:W,selectNodesOnDrag:K,onNodeDragStart:D,onSelectionDragStart:L,unselectNodesAndEdges:V}=t();m=!0,(!K||!O)&&!B&&A&&((oe=Q.get(A))!=null&&oe.selected||V()),O&&K&&A&&(e==null||e(A));const R=cu(q.sourceEvent,{transform:z,snapGrid:Y,snapToGrid:W,containerBounds:g});if(o=R,u=L7(Q,H,R,A),u.size>0&&(n||D||!A&&L)){const[ge,te]=ny({nodeId:A,dragItems:u,nodeLookup:Q});n==null||n(q.sourceEvent,u,ge,te),D==null||D(q.sourceEvent,ge,te),A||L==null||L(q.sourceEvent,te)}}const U=SC().clickDistance(M).on("start",q=>{const{domNode:Q,nodeDragThreshold:B,transform:H,snapGrid:z,snapToGrid:Y}=t();g=(Q==null?void 0:Q.getBoundingClientRect())||null,b=!1,E=!1,w=q.sourceEvent,B===0&&$(q),o=cu(q.sourceEvent,{transform:H,snapGrid:z,snapToGrid:Y,containerBounds:g}),h=ci(q.sourceEvent,g)}).on("drag",q=>{const{autoPanOnNodeDrag:Q,transform:B,snapGrid:H,snapToGrid:z,nodeDragThreshold:Y,nodeLookup:W}=t(),K=cu(q.sourceEvent,{transform:B,snapGrid:H,snapToGrid:z,containerBounds:g});if(w=q.sourceEvent,(q.sourceEvent.type==="touchmove"&&q.sourceEvent.touches.length>1||A&&!W.has(A))&&(b=!0),!b){if(!d&&Q&&m&&(d=!0,F()),!m){const D=ci(q.sourceEvent,g),L=D.x-h.x,V=D.y-h.y;Math.sqrt(L*L+V*V)>Y&&$(q)}(o.x!==K.xSnapped||o.y!==K.ySnapped)&&u&&m&&(h=ci(q.sourceEvent,g),I(K))}}).on("end",q=>{if(!m||b){b&&u.size>0&&t().updateNodePositions(u,!1);return}if(d=!1,m=!1,cancelAnimationFrame(l),u.size>0){const{nodeLookup:Q,updateNodePositions:B,onNodeDragStop:H,onSelectionDragStop:z}=t();if(E&&(B(u,!1),E=!1),a||H||!A&&z){const[Y,W]=ny({nodeId:A,dragItems:u,nodeLookup:Q,dragging:!1});a==null||a(q.sourceEvent,u,Y,W),H==null||H(q.sourceEvent,Y,W),A||z==null||z(q.sourceEvent,W)}}}).filter(q=>{const Q=q.target;return!q.button&&(!j||!Bk(Q,`.${j}`,N))&&(!_||Bk(Q,_,N))});y.call(U)}function k(){y==null||y.on(".drag",null)}return{update:S,destroy:k}}function P7(e,t,n){const r=[],a={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())Nh(a,Cu(o))>0&&r.push(o);return r}const B7=250;function U7(e,t,n,r){var u,d;let a=[],o=1/0;const l=P7(e,n,t+B7);for(const h of l){const g=[...((u=h.internals.handleBounds)==null?void 0:u.source)??[],...((d=h.internals.handleBounds)==null?void 0:d.target)??[]];for(const m of g){if(r.nodeId===m.nodeId&&r.type===m.type&&r.id===m.id)continue;const{x:y,y:b}=uo(h,m,m.position,!0),E=Math.sqrt(Math.pow(y-e.x,2)+Math.pow(b-e.y,2));E>t||(E<o?(a=[{...m,x:y,y:b}],o=E):E===o&&a.push({...m,x:y,y:b}))}}if(!a.length)return null;if(a.length>1){const h=r.type==="source"?"target":"source";return a.find(g=>g.type===h)??a[0]}return a[0]}function cj(e,t,n,r,a,o=!1){var h,g,m;const l=r.get(e);if(!l)return null;const u=a==="strict"?(h=l.internals.handleBounds)==null?void 0:h[t]:[...((g=l.internals.handleBounds)==null?void 0:g.source)??[],...((m=l.internals.handleBounds)==null?void 0:m.target)??[]],d=(n?u==null?void 0:u.find(y=>y.id===n):u==null?void 0:u[0])??null;return d&&o?{...d,...uo(l,d,d.position,!0)}:d}function uj(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function $7(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const dj=()=>!0;function F7(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:a,edgeUpdaterType:o,isTarget:l,domNode:u,nodeLookup:d,lib:h,autoPanOnConnect:g,flowId:m,panBy:y,cancelConnection:b,onConnectStart:E,onConnect:w,onConnectEnd:S,isValidConnection:k=dj,onReconnectEnd:j,updateConnection:_,getTransform:N,getFromHandle:O,autoPanSpeed:A,dragThreshold:M=1,handleDomNode:I}){const F=ZC(e.target);let $=0,U;const{x:q,y:Q}=ci(e),B=uj(o,I),H=u==null?void 0:u.getBoundingClientRect();let z=!1;if(!H||!B)return;const Y=cj(a,B,r,d,t);if(!Y)return;let W=ci(e,H),K=!1,D=null,L=!1,V=null;function R(){if(!g||!H)return;const[xe,ke]=Cx(W,H,A);y({x:xe,y:ke}),$=requestAnimationFrame(R)}const oe={...Y,nodeId:a,type:B,position:Y.position},ge=d.get(a);let ue={inProgress:!0,isValid:null,from:uo(ge,oe,De.Left,!0),fromHandle:oe,fromPosition:oe.position,fromNode:ge,to:W,toHandle:null,toPosition:Ck[oe.position],toNode:null,pointer:W};function G(){z=!0,_(ue),E==null||E(e,{nodeId:a,handleId:r,handleType:B})}M===0&&G();function ne(xe){if(!z){const{x:ht,y:Pt}=ci(xe),an=ht-q,ln=Pt-Q;if(!(an*an+ln*ln>M*M))return;G()}if(!O()||!oe){de(xe);return}const ke=N();W=ci(xe,H),U=U7(td(W,ke,!1,[1,1]),n,d,oe),K||(R(),K=!0);const we=fj(xe,{handle:U,connectionMode:t,fromNodeId:a,fromHandleId:r,fromType:l?"target":"source",isValidConnection:k,doc:F,lib:h,flowId:m,nodeLookup:d});V=we.handleDomNode,D=we.connection,L=$7(!!U,we.isValid);const ze=d.get(a),Qe=ze?uo(ze,oe,De.Left,!0):ue.from,Ce={...ue,from:Qe,isValid:L,to:we.toHandle&&L?Pl({x:we.toHandle.x,y:we.toHandle.y},ke):W,toHandle:we.toHandle,toPosition:L&&we.toHandle?we.toHandle.position:Ck[oe.position],toNode:we.toHandle?d.get(we.toHandle.nodeId):null,pointer:W};_(Ce),ue=Ce}function de(xe){if(!("touches"in xe&&xe.touches.length>0)){if(z){(U||V)&&D&&L&&(w==null||w(D));const{inProgress:ke,...we}=ue,ze={...we,toPosition:ue.toHandle?ue.toPosition:null};S==null||S(xe,ze),o&&(j==null||j(xe,ze))}b(),cancelAnimationFrame($),K=!1,L=!1,D=null,V=null,F.removeEventListener("mousemove",ne),F.removeEventListener("mouseup",de),F.removeEventListener("touchmove",ne),F.removeEventListener("touchend",de)}}F.addEventListener("mousemove",ne),F.addEventListener("mouseup",de),F.addEventListener("touchmove",ne),F.addEventListener("touchend",de)}function fj(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:a,fromType:o,doc:l,lib:u,flowId:d,isValidConnection:h=dj,nodeLookup:g}){const m=o==="target",y=t?l.querySelector(`.${u}-flow__handle[data-id="${d}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:b,y:E}=ci(e),w=l.elementFromPoint(b,E),S=w!=null&&w.classList.contains(`${u}-flow__handle`)?w:y,k={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const j=uj(void 0,S),_=S.getAttribute("data-nodeid"),N=S.getAttribute("data-handleid"),O=S.classList.contains("connectable"),A=S.classList.contains("connectableend");if(!_||!j)return k;const M={source:m?_:r,sourceHandle:m?N:a,target:m?r:_,targetHandle:m?a:N};k.connection=M;const F=O&&A&&(n===Il.Strict?m&&j==="source"||!m&&j==="target":_!==r||N!==a);k.isValid=F&&h(M),k.toHandle=cj(_,j,N,g,n,!0)}return k}const lb={onPointerDown:F7,isValid:fj};function H7({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const a=kr(e);function o({translateExtent:u,width:d,height:h,zoomStep:g=1,pannable:m=!0,zoomable:y=!0,inversePan:b=!1}){const E=_=>{if(_.sourceEvent.type!=="wheel"||!t)return;const N=n(),O=_.sourceEvent.ctrlKey&&ju()?10:1,A=-_.sourceEvent.deltaY*(_.sourceEvent.deltaMode===1?.05:_.sourceEvent.deltaMode?1:.002)*g,M=N[2]*Math.pow(2,A*O);t.scaleTo(M)};let w=[0,0];const S=_=>{(_.sourceEvent.type==="mousedown"||_.sourceEvent.type==="touchstart")&&(w=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY])},k=_=>{const N=n();if(_.sourceEvent.type!=="mousemove"&&_.sourceEvent.type!=="touchmove"||!t)return;const O=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY],A=[O[0]-w[0],O[1]-w[1]];w=O;const M=r()*Math.max(N[2],Math.log(N[2]))*(b?-1:1),I={x:N[0]-A[0]*M,y:N[1]-A[1]*M},F=[[0,0],[d,h]];t.setViewportConstrained({x:I.x,y:I.y,zoom:N[2]},F,u)},j=BC().on("start",S).on("zoom",m?k:null).on("zoom.wheel",y?E:null);a.call(j,{})}function l(){a.on("zoom",null)}return{update:o,destroy:l,pointer:si}}const rp=e=>({x:e.x,y:e.y,zoom:e.k}),ry=({x:e,y:t,zoom:n})=>ep.translate(e,t).scale(n),fl=(e,t)=>e.target.closest(`.${t}`),hj=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),q7=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,iy=(e,t=0,n=q7,r=()=>{})=>{const a=typeof t=="number"&&t>0;return a||r(),a?e.transition().duration(t).ease(n).on("end",r):e},pj=e=>{const t=e.ctrlKey&&ju()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function K7({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:a,panOnScrollSpeed:o,zoomOnPinch:l,onPanZoomStart:u,onPanZoom:d,onPanZoomEnd:h}){return g=>{if(fl(g,t))return g.ctrlKey&&g.preventDefault(),!1;g.preventDefault(),g.stopImmediatePropagation();const m=n.property("__zoom").k||1;if(g.ctrlKey&&l){const S=si(g),k=pj(g),j=m*Math.pow(2,k);r.scaleTo(n,j,S,g);return}const y=g.deltaMode===1?20:1;let b=a===no.Vertical?0:g.deltaX*y,E=a===no.Horizontal?0:g.deltaY*y;!ju()&&g.shiftKey&&a!==no.Vertical&&(b=g.deltaY*y,E=0),r.translateBy(n,-(b/m)*o,-(E/m)*o,{internal:!0});const w=rp(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(d==null||d(g,w),e.panScrollTimeout=setTimeout(()=>{h==null||h(g,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,u==null||u(g,w))}}function G7({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,a){const o=r.type==="wheel",l=!t&&o&&!r.ctrlKey,u=fl(r,e);if(r.ctrlKey&&o&&u&&r.preventDefault(),l||u)return null;r.preventDefault(),n.call(this,r,a)}}function V7({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,l,u;if((o=r.sourceEvent)!=null&&o.internal)return;const a=rp(r.transform);e.mouseButton=((l=r.sourceEvent)==null?void 0:l.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=a,((u=r.sourceEvent)==null?void 0:u.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,a))}}function Y7({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:a}){return o=>{var l,u;e.usedRightMouseButton=!!(n&&hj(t,e.mouseButton??0)),(l=o.sourceEvent)!=null&&l.sync||r([o.transform.x,o.transform.y,o.transform.k]),a&&!((u=o.sourceEvent)!=null&&u.internal)&&(a==null||a(o.sourceEvent,rp(o.transform)))}}function Q7({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:a,onPaneContextMenu:o}){return l=>{var u;if(!((u=l.sourceEvent)!=null&&u.internal)&&(e.isZoomingOrPanning=!1,o&&hj(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&o(l.sourceEvent),e.usedRightMouseButton=!1,r(!1),a)){const d=rp(l.transform);e.prevViewport=d,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a==null||a(l.sourceEvent,d)},n?150:0)}}}function W7({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:a,zoomOnDoubleClick:o,userSelectionActive:l,noWheelClassName:u,noPanClassName:d,lib:h,connectionInProgress:g}){return m=>{var S;const y=e||t,b=n&&m.ctrlKey,E=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&(fl(m,`${h}-flow__node`)||fl(m,`${h}-flow__edge`)))return!0;if(!r&&!y&&!a&&!o&&!n||l||g&&!E||fl(m,u)&&E||fl(m,d)&&(!E||a&&E&&!e)||!n&&m.ctrlKey&&E)return!1;if(!n&&m.type==="touchstart"&&((S=m.touches)==null?void 0:S.length)>1)return m.preventDefault(),!1;if(!y&&!a&&!b&&E||!r&&(m.type==="mousedown"||m.type==="touchstart")||Array.isArray(r)&&!r.includes(m.button)&&m.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(m.button)||!m.button||m.button<=1;return(!m.ctrlKey||E)&&w}}function X7({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:a,onPanZoom:o,onPanZoomStart:l,onPanZoomEnd:u,onDraggingChange:d}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},g=e.getBoundingClientRect(),m=BC().scaleExtent([t,n]).translateExtent(r),y=kr(e).call(m);j({x:a.x,y:a.y,zoom:zl(a.zoom,t,n)},[[0,0],[g.width,g.height]],r);const b=y.on("wheel.zoom"),E=y.on("dblclick.zoom");m.wheelDelta(pj);async function w(U,q){return y?new Promise(Q=>{m==null||m.interpolate((q==null?void 0:q.interpolate)==="linear"?lu:Wf).transform(iy(y,q==null?void 0:q.duration,q==null?void 0:q.ease,()=>Q(!0)),U)}):!1}function S({noWheelClassName:U,noPanClassName:q,onPaneContextMenu:Q,userSelectionActive:B,panOnScroll:H,panOnDrag:z,panOnScrollMode:Y,panOnScrollSpeed:W,preventScrolling:K,zoomOnPinch:D,zoomOnScroll:L,zoomOnDoubleClick:V,zoomActivationKeyPressed:R,lib:oe,onTransformChange:ge,connectionInProgress:te,paneClickDistance:ue,selectionOnDrag:G}){B&&!h.isZoomingOrPanning&&k();const ne=H&&!R&&!B;m.clickDistance(G?1/0:!li(ue)||ue<0?0:ue);const de=ne?K7({zoomPanValues:h,noWheelClassName:U,d3Selection:y,d3Zoom:m,panOnScrollMode:Y,panOnScrollSpeed:W,zoomOnPinch:D,onPanZoomStart:l,onPanZoom:o,onPanZoomEnd:u}):G7({noWheelClassName:U,preventScrolling:K,d3ZoomHandler:b});y.on("wheel.zoom",de,{passive:!1});const xe=V7({zoomPanValues:h,onDraggingChange:d,onPanZoomStart:l});m.on("start",xe);const ke=Y7({zoomPanValues:h,panOnDrag:z,onPaneContextMenu:!!Q,onPanZoom:o,onTransformChange:ge});m.on("zoom",ke);const we=Q7({zoomPanValues:h,panOnDrag:z,panOnScroll:H,onPaneContextMenu:Q,onPanZoomEnd:u,onDraggingChange:d});m.on("end",we);const ze=W7({zoomActivationKeyPressed:R,panOnDrag:z,zoomOnScroll:L,panOnScroll:H,zoomOnDoubleClick:V,zoomOnPinch:D,userSelectionActive:B,noPanClassName:q,noWheelClassName:U,lib:oe,connectionInProgress:te});m.filter(ze),V?y.on("dblclick.zoom",E):y.on("dblclick.zoom",null)}function k(){m.on("zoom",null)}async function j(U,q,Q){const B=ry(U),H=m==null?void 0:m.constrain()(B,q,Q);return H&&await w(H),H}async function _(U,q){const Q=ry(U);return await w(Q,q),Q}function N(U){if(y){const q=ry(U),Q=y.property("__zoom");(Q.k!==U.zoom||Q.x!==U.x||Q.y!==U.y)&&(m==null||m.transform(y,q,null,{sync:!0}))}}function O(){const U=y?PC(y.node()):{x:0,y:0,k:1};return{x:U.x,y:U.y,zoom:U.k}}async function A(U,q){return y?new Promise(Q=>{m==null||m.interpolate((q==null?void 0:q.interpolate)==="linear"?lu:Wf).scaleTo(iy(y,q==null?void 0:q.duration,q==null?void 0:q.ease,()=>Q(!0)),U)}):!1}async function M(U,q){return y?new Promise(Q=>{m==null||m.interpolate((q==null?void 0:q.interpolate)==="linear"?lu:Wf).scaleBy(iy(y,q==null?void 0:q.duration,q==null?void 0:q.ease,()=>Q(!0)),U)}):!1}function I(U){m==null||m.scaleExtent(U)}function F(U){m==null||m.translateExtent(U)}function $(U){const q=!li(U)||U<0?0:U;m==null||m.clickDistance(q)}return{update:S,destroy:k,setViewport:_,setViewportConstrained:j,getViewport:O,scaleTo:A,scaleBy:M,setScaleExtent:I,setTranslateExtent:F,syncViewport:N,setClickDistance:$}}var Bl;(function(e){e.Line="line",e.Handle="handle"})(Bl||(Bl={}));function Z7({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:a,affectsY:o}){const l=e-t,u=n-r,d=[l>0?1:l<0?-1:0,u>0?1:u<0?-1:0];return l&&a&&(d[0]=d[0]*-1),u&&o&&(d[1]=d[1]*-1),d}function Uk(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),a=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:a}}function Za(e,t){return Math.max(0,t-e)}function Ja(e,t){return Math.max(0,e-t)}function Pf(e,t,n){return Math.max(0,t-e,e-n)}function $k(e,t){return e?!t:t}function J7(e,t,n,r,a,o,l,u){let{affectsX:d,affectsY:h}=t;const{isHorizontal:g,isVertical:m}=t,y=g&&m,{xSnapped:b,ySnapped:E}=n,{minWidth:w,maxWidth:S,minHeight:k,maxHeight:j}=r,{x:_,y:N,width:O,height:A,aspectRatio:M}=e;let I=Math.floor(g?b-e.pointerX:0),F=Math.floor(m?E-e.pointerY:0);const $=O+(d?-I:I),U=A+(h?-F:F),q=-o[0]*O,Q=-o[1]*A;let B=Pf($,w,S),H=Pf(U,k,j);if(l){let W=0,K=0;d&&I<0?W=Za(_+I+q,l[0][0]):!d&&I>0&&(W=Ja(_+$+q,l[1][0])),h&&F<0?K=Za(N+F+Q,l[0][1]):!h&&F>0&&(K=Ja(N+U+Q,l[1][1])),B=Math.max(B,W),H=Math.max(H,K)}if(u){let W=0,K=0;d&&I>0?W=Ja(_+I,u[0][0]):!d&&I<0&&(W=Za(_+$,u[1][0])),h&&F>0?K=Ja(N+F,u[0][1]):!h&&F<0&&(K=Za(N+U,u[1][1])),B=Math.max(B,W),H=Math.max(H,K)}if(a){if(g){const W=Pf($/M,k,j)*M;if(B=Math.max(B,W),l){let K=0;!d&&!h||d&&!h&&y?K=Ja(N+Q+$/M,l[1][1])*M:K=Za(N+Q+(d?I:-I)/M,l[0][1])*M,B=Math.max(B,K)}if(u){let K=0;!d&&!h||d&&!h&&y?K=Za(N+$/M,u[1][1])*M:K=Ja(N+(d?I:-I)/M,u[0][1])*M,B=Math.max(B,K)}}if(m){const W=Pf(U*M,w,S)/M;if(H=Math.max(H,W),l){let K=0;!d&&!h||h&&!d&&y?K=Ja(_+U*M+q,l[1][0])/M:K=Za(_+(h?F:-F)*M+q,l[0][0])/M,H=Math.max(H,K)}if(u){let K=0;!d&&!h||h&&!d&&y?K=Za(_+U*M,u[1][0])/M:K=Ja(_+(h?F:-F)*M,u[0][0])/M,H=Math.max(H,K)}}}F=F+(F<0?H:-H),I=I+(I<0?B:-B),a&&(y?$>U*M?F=($k(d,h)?-I:I)/M:I=($k(d,h)?-F:F)*M:g?(F=I/M,h=d):(I=F*M,d=h));const z=d?_+I:_,Y=h?N+F:N;return{width:O+(d?-I:I),height:A+(h?-F:F),x:o[0]*I*(d?-1:1)+z,y:o[1]*F*(h?-1:1)+Y}}const mj={width:0,height:0,x:0,y:0},eK={...mj,pointerX:0,pointerY:0,aspectRatio:1};function tK(e,t,n){const r=t.position.x+e.position.x,a=t.position.y+e.position.y,o=e.measured.width??0,l=e.measured.height??0,u=n[0]*o,d=n[1]*l;return[[r-u,a-d],[r+o-u,a+l-d]]}function nK({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:a}){const o=kr(e);let l={controlDirection:Uk("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function u({controlPosition:h,boundaries:g,keepAspectRatio:m,resizeDirection:y,onResizeStart:b,onResize:E,onResizeEnd:w,shouldResize:S}){let k={...mj},j={...eK};l={boundaries:g,resizeDirection:y,keepAspectRatio:m,controlDirection:Uk(h)};let _,N=null,O=[],A,M,I,F=!1;const $=SC().on("start",U=>{const{nodeLookup:q,transform:Q,snapGrid:B,snapToGrid:H,nodeOrigin:z,paneDomNode:Y}=n();if(_=q.get(t),!_)return;N=(Y==null?void 0:Y.getBoundingClientRect())??null;const{xSnapped:W,ySnapped:K}=cu(U.sourceEvent,{transform:Q,snapGrid:B,snapToGrid:H,containerBounds:N});k={width:_.measured.width??0,height:_.measured.height??0,x:_.position.x??0,y:_.position.y??0},j={...k,pointerX:W,pointerY:K,aspectRatio:k.width/k.height},A=void 0,M=co(_.extent)?_.extent:void 0,_.parentId&&(_.extent==="parent"||_.expandParent)&&(A=q.get(_.parentId)),A&&_.extent==="parent"&&(M=[[0,0],[A.measured.width,A.measured.height]]),O=[],I=void 0;for(const[D,L]of q)if(L.parentId===t&&(O.push({id:D,position:{...L.position},extent:L.extent}),L.extent==="parent"||L.expandParent)){const V=tK(L,_,L.origin??z);I?I=[[Math.min(V[0][0],I[0][0]),Math.min(V[0][1],I[0][1])],[Math.max(V[1][0],I[1][0]),Math.max(V[1][1],I[1][1])]]:I=V}b==null||b(U,{...k})}).on("drag",U=>{const{transform:q,snapGrid:Q,snapToGrid:B,nodeOrigin:H}=n(),z=cu(U.sourceEvent,{transform:q,snapGrid:Q,snapToGrid:B,containerBounds:N}),Y=[];if(!_)return;const{x:W,y:K,width:D,height:L}=k,V={},R=_.origin??H,{width:oe,height:ge,x:te,y:ue}=J7(j,l.controlDirection,z,l.boundaries,l.keepAspectRatio,R,M,I),G=oe!==D,ne=ge!==L,de=te!==W&&G,xe=ue!==K&≠if(!de&&!xe&&!G&&!ne)return;if((de||xe||R[0]===1||R[1]===1)&&(V.x=de?te:k.x,V.y=xe?ue:k.y,k.x=V.x,k.y=V.y,O.length>0)){const Qe=te-W,Ce=ue-K;for(const ht of O)ht.position={x:ht.position.x-Qe+R[0]*(oe-D),y:ht.position.y-Ce+R[1]*(ge-L)},Y.push(ht)}if((G||ne)&&(V.width=G&&(!l.resizeDirection||l.resizeDirection==="horizontal")?oe:k.width,V.height=ne&&(!l.resizeDirection||l.resizeDirection==="vertical")?ge:k.height,k.width=V.width,k.height=V.height),A&&_.expandParent){const Qe=R[0]*(V.width??0);V.x&&V.x<Qe&&(k.x=Qe,j.x=j.x-(V.x-Qe));const Ce=R[1]*(V.height??0);V.y&&V.y<Ce&&(k.y=Ce,j.y=j.y-(V.y-Ce))}const ke=Z7({width:k.width,prevWidth:D,height:k.height,prevHeight:L,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),we={...k,direction:ke};(S==null?void 0:S(U,we))!==!1&&(F=!0,E==null||E(U,we),r(V,Y))}).on("end",U=>{F&&(w==null||w(U,{...k}),a==null||a({...k}),F=!1)});o.call($)}function d(){o.on(".drag",null)}return{update:u,destroy:d}}var ay={exports:{}},sy={},oy={exports:{}},ly={};/**
|
|
578
|
+
* @license React
|
|
579
|
+
* use-sync-external-store-shim.production.js
|
|
580
|
+
*
|
|
581
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
582
|
+
*
|
|
583
|
+
* This source code is licensed under the MIT license found in the
|
|
584
|
+
* LICENSE file in the root directory of this source tree.
|
|
585
|
+
*/var Fk;function rK(){if(Fk)return ly;Fk=1;var e=Iu();function t(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(m,y){var b=y(),E=r({inst:{value:b,getSnapshot:y}}),w=E[0].inst,S=E[1];return o(function(){w.value=b,w.getSnapshot=y,d(w)&&S({inst:w})},[m,b,y]),a(function(){return d(w)&&S({inst:w}),m(function(){d(w)&&S({inst:w})})},[m]),l(b),b}function d(m){var y=m.getSnapshot;m=m.value;try{var b=y();return!n(m,b)}catch{return!0}}function h(m,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return ly.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,ly}var Hk;function iK(){return Hk||(Hk=1,oy.exports=rK()),oy.exports}/**
|
|
586
|
+
* @license React
|
|
587
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
588
|
+
*
|
|
589
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
590
|
+
*
|
|
591
|
+
* This source code is licensed under the MIT license found in the
|
|
592
|
+
* LICENSE file in the root directory of this source tree.
|
|
593
|
+
*/var qk;function aK(){if(qk)return sy;qk=1;var e=Iu(),t=iK();function n(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return sy.useSyncExternalStoreWithSelector=function(h,g,m,y,b){var E=o(null);if(E.current===null){var w={hasValue:!1,value:null};E.current=w}else w=E.current;E=u(function(){function k(A){if(!j){if(j=!0,_=A,A=y(A),b!==void 0&&w.hasValue){var M=w.value;if(b(M,A))return N=M}return N=A}if(M=N,r(_,A))return M;var I=y(A);return b!==void 0&&b(M,I)?(_=A,M):(_=A,N=I)}var j=!1,_,N,O=m===void 0?null:m;return[function(){return k(g())},O===null?void 0:function(){return k(O())}]},[g,m,y,b]);var S=a(h,E[0],E[1]);return l(function(){w.hasValue=!0,w.value=S},[S]),d(S),S},sy}var Kk;function sK(){return Kk||(Kk=1,ay.exports=aK()),ay.exports}var oK=sK();const lK=Lu(oK),cK={},Gk=e=>{let t;const n=new Set,r=(g,m)=>{const y=typeof g=="function"?g(t):g;if(!Object.is(y,t)){const b=t;t=m??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(E=>E(t,b))}},a=()=>t,d={setState:r,getState:a,getInitialState:()=>h,subscribe:g=>(n.add(g),()=>n.delete(g)),destroy:()=>{(cK?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},h=t=e(r,a,d);return d},uK=e=>e?Gk(e):Gk,{useDebugValue:dK}=uM,{useSyncExternalStoreWithSelector:fK}=lK,hK=e=>e;function gj(e,t=hK,n){const r=fK(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return dK(r),r}const Vk=(e,t)=>{const n=uK(e),r=(a,o=t)=>gj(n,a,o);return Object.assign(r,n),r},pK=(e,t)=>e?Vk(e,t):Vk;function Kt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const ip=T.createContext(null),mK=ip.Provider,yj=fi.error001("react");function ft(e,t){const n=T.useContext(ip);if(n===null)throw new Error(yj);return gj(n,e,t)}function Gt(){const e=T.useContext(ip);if(e===null)throw new Error(yj);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Yk={display:"none"},gK={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},bj="react-flow__node-desc",xj="react-flow__edge-desc",yK="react-flow__aria-live",bK=e=>e.ariaLiveMessage,xK=e=>e.ariaLabelConfig;function vK({rfId:e}){const t=ft(bK);return f.jsx("div",{id:`${yK}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:gK,children:t})}function wK({rfId:e,disableKeyboardA11y:t}){const n=ft(xK);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${bj}-${e}`,style:Yk,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${xj}-${e}`,style:Yk,children:n["edge.a11yDescription.default"]}),!t&&f.jsx(vK,{rfId:e})]})}const ap=T.forwardRef(({position:e="top-left",children:t,className:n,style:r,...a},o)=>{const l=`${e}`.split("-");return f.jsx("div",{className:mn(["react-flow__panel",n,...l]),style:r,ref:o,...a,children:t})});ap.displayName="Panel";const Qk="https://reactflow.dev?utm_source=attribution";function EK({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(ap,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${Qk}`,children:f.jsx("a",{href:Qk,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const kK=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Bf=e=>e.id;function SK(e,t){return Kt(e.selectedNodes.map(Bf),t.selectedNodes.map(Bf))&&Kt(e.selectedEdges.map(Bf),t.selectedEdges.map(Bf))}function _K({onSelectionChange:e}){const t=Gt(),{selectedNodes:n,selectedEdges:r}=ft(kK,SK);return T.useEffect(()=>{const a={nodes:n,edges:r};e==null||e(a),t.getState().onSelectionChangeHandlers.forEach(o=>o(a))},[n,r,e]),null}const NK=e=>!!e.onSelectionChangeHandlers;function CK({onSelectionChange:e}){const t=ft(NK);return e||t?f.jsx(_K,{onSelectionChange:e}):null}const vj=[0,0],jK={x:0,y:0,zoom:1},AK=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Wk=[...AK,"rfId"],TK=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Xk={translateExtent:_u,nodeOrigin:vj,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function MK(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:a,setTranslateExtent:o,setNodeExtent:l,reset:u,setDefaultNodesAndEdges:d}=ft(TK,Kt),h=Gt();T.useEffect(()=>(d(e.defaultNodes,e.defaultEdges),()=>{g.current=Xk,u()}),[]);const g=T.useRef(Xk);return T.useEffect(()=>{for(const m of Wk){const y=e[m],b=g.current[m];y!==b&&(typeof e[m]>"u"||(m==="nodes"?t(y):m==="edges"?n(y):m==="minZoom"?r(y):m==="maxZoom"?a(y):m==="translateExtent"?o(y):m==="nodeExtent"?l(y):m==="ariaLabelConfig"?h.setState({ariaLabelConfig:m7(y)}):m==="fitView"?h.setState({fitViewQueued:y}):m==="fitViewOptions"?h.setState({fitViewOptions:y}):h.setState({[m]:y})))}g.current=e},Wk.map(m=>e[m])),null}function Zk(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function OK(e){var r;const[t,n]=T.useState(e==="system"?null:e);return T.useEffect(()=>{if(e!=="system"){n(e);return}const a=Zk(),o=()=>n(a!=null&&a.matches?"dark":"light");return o(),a==null||a.addEventListener("change",o),()=>{a==null||a.removeEventListener("change",o)}},[e]),t!==null?t:(r=Zk())!=null&&r.matches?"dark":"light"}const Jk=typeof document<"u"?document:null;function Au(e=null,t={target:Jk,actInsideInputWithModifier:!0}){const[n,r]=T.useState(!1),a=T.useRef(!1),o=T.useRef(new Set([])),[l,u]=T.useMemo(()=>{if(e!==null){const h=(Array.isArray(e)?e:[e]).filter(m=>typeof m=="string").map(m=>m.replace("+",`
|
|
594
|
+
`).replace(`
|
|
595
|
+
|
|
596
|
+
`,`
|
|
597
|
+
+`).split(`
|
|
598
|
+
`)),g=h.reduce((m,y)=>m.concat(...y),[]);return[h,g]}return[[],[]]},[e]);return T.useEffect(()=>{const d=(t==null?void 0:t.target)??Jk,h=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const g=b=>{var S,k;if(a.current=b.ctrlKey||b.metaKey||b.shiftKey||b.altKey,(!a.current||a.current&&!h)&&JC(b))return!1;const w=tS(b.code,u);if(o.current.add(b[w]),eS(l,o.current,!1)){const j=((k=(S=b.composedPath)==null?void 0:S.call(b))==null?void 0:k[0])||b.target,_=(j==null?void 0:j.nodeName)==="BUTTON"||(j==null?void 0:j.nodeName)==="A";t.preventDefault!==!1&&(a.current||!_)&&b.preventDefault(),r(!0)}},m=b=>{const E=tS(b.code,u);eS(l,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(b[E]),b.key==="Meta"&&o.current.clear(),a.current=!1},y=()=>{o.current.clear(),r(!1)};return d==null||d.addEventListener("keydown",g),d==null||d.addEventListener("keyup",m),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{d==null||d.removeEventListener("keydown",g),d==null||d.removeEventListener("keyup",m),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[e,r]),n}function eS(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(a=>t.has(a)))}function tS(e,t){return t.includes(e)?"code":"key"}const DK=()=>{const e=Gt();return T.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,a,o],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??r,y:t.y??a,zoom:t.zoom??o},n),!0):!1},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:a,minZoom:o,maxZoom:l,panZoom:u}=e.getState(),d=jx(t,r,a,o,l,(n==null?void 0:n.padding)??.1);return u?(await u.setViewport(d,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:a,snapToGrid:o,domNode:l}=e.getState();if(!l)return t;const{x:u,y:d}=l.getBoundingClientRect(),h={x:t.x-u,y:t.y-d},g=n.snapGrid??a,m=n.snapToGrid??o;return td(h,r,m,g)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:a,y:o}=r.getBoundingClientRect(),l=Pl(t,n);return{x:l.x+a,y:l.y+o}}}),[])};function wj(e,t){const n=[],r=new Map,a=[];for(const o of e)if(o.type==="add"){a.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const l=r.get(o.id);l?l.push(o):r.set(o.id,[o])}for(const o of t){const l=r.get(o.id);if(!l){n.push(o);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}const u={...o};for(const d of l)RK(d,u);n.push(u)}return a.length&&a.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function RK(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Ej(e,t){return wj(e,t)}function kj(e,t){return wj(e,t)}function Us(e,t){return{id:e,type:"select",selected:t}}function hl(e,t=new Set,n=!1){const r=[];for(const[a,o]of e){const l=t.has(a);!(o.selected===void 0&&!l)&&o.selected!==l&&(n&&(o.selected=l),r.push(Us(o.id,l)))}return r}function nS({items:e=[],lookup:t}){var a;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,l]of e.entries()){const u=t.get(l.id),d=((a=u==null?void 0:u.internals)==null?void 0:a.userNode)??u;d!==void 0&&d!==l&&n.push({id:l.id,item:l,type:"replace"}),d===void 0&&n.push({item:l,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function rS(e){return{id:e.id,type:"remove"}}const LK=QC();function IK(e,t,n={}){return w7(e,t,{...n,onError:n.onError??LK})}const iS=e=>s7(e),zK=e=>qC(e);function Sj(e){return T.forwardRef(e)}const PK=typeof window<"u"?T.useLayoutEffect:T.useEffect;function aS(e){const[t,n]=T.useState(BigInt(0)),[r]=T.useState(()=>BK(()=>n(a=>a+BigInt(1))));return PK(()=>{const a=r.get();a.length&&(e(a),r.reset())},[t]),r}function BK(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const _j=T.createContext(null);function UK({children:e}){const t=Gt(),n=T.useCallback(u=>{const{nodes:d=[],setNodes:h,hasDefaultNodes:g,onNodesChange:m,nodeLookup:y,fitViewQueued:b,onNodesChangeMiddlewareMap:E}=t.getState();let w=d;for(const k of u)w=typeof k=="function"?k(w):k;let S=nS({items:w,lookup:y});for(const k of E.values())S=k(S);g&&h(w),S.length>0?m==null||m(S):b&&window.requestAnimationFrame(()=>{const{fitViewQueued:k,nodes:j,setNodes:_}=t.getState();k&&_(j)})},[]),r=aS(n),a=T.useCallback(u=>{const{edges:d=[],setEdges:h,hasDefaultEdges:g,onEdgesChange:m,edgeLookup:y}=t.getState();let b=d;for(const E of u)b=typeof E=="function"?E(b):E;g?h(b):m&&m(nS({items:b,lookup:y}))},[]),o=aS(a),l=T.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return f.jsx(_j.Provider,{value:l,children:e})}function $K(){const e=T.useContext(_j);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const FK=e=>!!e.panZoom;function sp(){const e=DK(),t=Gt(),n=$K(),r=ft(FK),a=T.useMemo(()=>{const o=m=>t.getState().nodeLookup.get(m),l=m=>{n.nodeQueue.push(m)},u=m=>{n.edgeQueue.push(m)},d=m=>{var k,j;const{nodeLookup:y,nodeOrigin:b}=t.getState(),E=iS(m)?m:y.get(m.id),w=E.parentId?XC(E.position,E.measured,E.parentId,y,b):E.position,S={...E,position:w,width:((k=E.measured)==null?void 0:k.width)??E.width,height:((j=E.measured)==null?void 0:j.height)??E.height};return Cu(S)},h=(m,y,b={replace:!1})=>{l(E=>E.map(w=>{if(w.id===m){const S=typeof y=="function"?y(w):y;return b.replace&&iS(S)?S:{...w,...S}}return w}))},g=(m,y,b={replace:!1})=>{u(E=>E.map(w=>{if(w.id===m){const S=typeof y=="function"?y(w):y;return b.replace&&zK(S)?S:{...w,...S}}return w}))};return{getNodes:()=>t.getState().nodes.map(m=>({...m})),getNode:m=>{var y;return(y=o(m))==null?void 0:y.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:m=[]}=t.getState();return m.map(y=>({...y}))},getEdge:m=>t.getState().edgeLookup.get(m),setNodes:l,setEdges:u,addNodes:m=>{const y=Array.isArray(m)?m:[m];n.nodeQueue.push(b=>[...b,...y])},addEdges:m=>{const y=Array.isArray(m)?m:[m];n.edgeQueue.push(b=>[...b,...y])},toObject:()=>{const{nodes:m=[],edges:y=[],transform:b}=t.getState(),[E,w,S]=b;return{nodes:m.map(k=>({...k})),edges:y.map(k=>({...k})),viewport:{x:E,y:w,zoom:S}}},deleteElements:async({nodes:m=[],edges:y=[]})=>{const{nodes:b,edges:E,onNodesDelete:w,onEdgesDelete:S,triggerNodeChanges:k,triggerEdgeChanges:j,onDelete:_,onBeforeDelete:N}=t.getState(),{nodes:O,edges:A}=await d7({nodesToRemove:m,edgesToRemove:y,nodes:b,edges:E,onBeforeDelete:N}),M=A.length>0,I=O.length>0;if(M){const F=A.map(rS);S==null||S(A),j(F)}if(I){const F=O.map(rS);w==null||w(O),k(F)}return(I||M)&&(_==null||_({nodes:O,edges:A})),{deletedNodes:O,deletedEdges:A}},getIntersectingNodes:(m,y=!0,b)=>{const E=Ak(m),w=E?m:d(m),S=b!==void 0;return w?(b||t.getState().nodes).filter(k=>{const j=t.getState().nodeLookup.get(k.id);if(j&&!E&&(k.id===m.id||!j.internals.positionAbsolute))return!1;const _=Cu(S?k:j),N=Nh(_,w);return y&&N>0||N>=_.width*_.height||N>=w.width*w.height}):[]},isNodeIntersecting:(m,y,b=!0)=>{const w=Ak(m)?m:d(m);if(!w)return!1;const S=Nh(w,y);return b&&S>0||S>=y.width*y.height||S>=w.width*w.height},updateNode:h,updateNodeData:(m,y,b={replace:!1})=>{h(m,E=>{const w=typeof y=="function"?y(E):y;return b.replace?{...E,data:w}:{...E,data:{...E.data,...w}}},b)},updateEdge:g,updateEdgeData:(m,y,b={replace:!1})=>{g(m,E=>{const w=typeof y=="function"?y(E):y;return b.replace?{...E,data:w}:{...E,data:{...E.data,...w}}},b)},getNodesBounds:m=>{const{nodeLookup:y,nodeOrigin:b}=t.getState();return o7(m,{nodeLookup:y,nodeOrigin:b})},getHandleConnections:({type:m,id:y,nodeId:b})=>{var E;return Array.from(((E=t.getState().connectionLookup.get(`${b}-${m}${y?`-${y}`:""}`))==null?void 0:E.values())??[])},getNodeConnections:({type:m,handleId:y,nodeId:b})=>{var E;return Array.from(((E=t.getState().connectionLookup.get(`${b}${m?y?`-${m}-${y}`:`-${m}`:""}`))==null?void 0:E.values())??[])},fitView:async m=>{const y=t.getState().fitViewResolver??p7();return t.setState({fitViewQueued:!0,fitViewOptions:m,fitViewResolver:y}),n.nodeQueue.push(b=>[...b]),y.promise}}},[]);return T.useMemo(()=>({...a,...e,viewportInitialized:r}),[r])}const sS=e=>e.selected,HK=typeof window<"u"?window:void 0;function qK({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Gt(),{deleteElements:r}=sp(),a=Au(e,{actInsideInputWithModifier:!1}),o=Au(t,{target:HK});T.useEffect(()=>{if(a){const{edges:l,nodes:u}=n.getState();r({nodes:u.filter(sS),edges:l.filter(sS)}),n.setState({nodesSelectionActive:!1})}},[a]),T.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function KK(e){const t=Gt();T.useEffect(()=>{const n=()=>{var a,o,l,u;if(!e.current||!(((o=(a=e.current).checkVisibility)==null?void 0:o.call(a))??!0))return!1;const r=Ax(e.current);(r.height===0||r.width===0)&&((u=(l=t.getState()).onError)==null||u.call(l,"004",fi.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const op={position:"absolute",width:"100%",height:"100%",top:0,left:0},GK=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function VK({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:a=.5,panOnScrollMode:o=no.Free,zoomOnDoubleClick:l=!0,panOnDrag:u=!0,defaultViewport:d,translateExtent:h,minZoom:g,maxZoom:m,zoomActivationKeyCode:y,preventScrolling:b=!0,children:E,noWheelClassName:w,noPanClassName:S,onViewportChange:k,isControlledViewport:j,paneClickDistance:_,selectionOnDrag:N}){const O=Gt(),A=T.useRef(null),{userSelectionActive:M,lib:I,connectionInProgress:F}=ft(GK,Kt),$=Au(y),U=T.useRef();KK(A);const q=T.useCallback(Q=>{k==null||k({x:Q[0],y:Q[1],zoom:Q[2]}),j||O.setState({transform:Q})},[k,j]);return T.useEffect(()=>{if(A.current){U.current=X7({domNode:A.current,minZoom:g,maxZoom:m,translateExtent:h,viewport:d,onDraggingChange:z=>O.setState(Y=>Y.paneDragging===z?Y:{paneDragging:z}),onPanZoomStart:(z,Y)=>{const{onViewportChangeStart:W,onMoveStart:K}=O.getState();K==null||K(z,Y),W==null||W(Y)},onPanZoom:(z,Y)=>{const{onViewportChange:W,onMove:K}=O.getState();K==null||K(z,Y),W==null||W(Y)},onPanZoomEnd:(z,Y)=>{const{onViewportChangeEnd:W,onMoveEnd:K}=O.getState();K==null||K(z,Y),W==null||W(Y)}});const{x:Q,y:B,zoom:H}=U.current.getViewport();return O.setState({panZoom:U.current,transform:[Q,B,H],domNode:A.current.closest(".react-flow")}),()=>{var z;(z=U.current)==null||z.destroy()}}},[]),T.useEffect(()=>{var Q;(Q=U.current)==null||Q.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:a,panOnScrollMode:o,zoomOnDoubleClick:l,panOnDrag:u,zoomActivationKeyPressed:$,preventScrolling:b,noPanClassName:S,userSelectionActive:M,noWheelClassName:w,lib:I,onTransformChange:q,connectionInProgress:F,selectionOnDrag:N,paneClickDistance:_})},[e,t,n,r,a,o,l,u,$,b,S,M,w,I,q,F,N,_]),f.jsx("div",{className:"react-flow__renderer",ref:A,style:op,children:E})}const YK=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function QK(){const{userSelectionActive:e,userSelectionRect:t}=ft(YK,Kt);return e&&t?f.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const cy=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},WK=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function XK({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Nu.Full,panOnDrag:r,autoPanOnSelection:a,paneClickDistance:o,selectionOnDrag:l,onSelectionStart:u,onSelectionEnd:d,onPaneClick:h,onPaneContextMenu:g,onPaneScroll:m,onPaneMouseEnter:y,onPaneMouseMove:b,onPaneMouseLeave:E,children:w}){const S=T.useRef(0),k=Gt(),{userSelectionActive:j,elementsSelectable:_,dragging:N,panBy:O,autoPanSpeed:A}=ft(WK,Kt),M=_&&(e||j),I=T.useRef(null),F=T.useRef(),$=T.useRef(new Set),U=T.useRef(new Set),q=T.useRef(!1),Q=T.useRef(!1),B=T.useRef({x:0,y:0}),H=T.useRef(!1),z=G=>{if(Q.current||q.current||k.getState().connection.inProgress){Q.current=!1,q.current=!1;return}h==null||h(G),k.getState().resetSelectedElements(),k.setState({nodesSelectionActive:!1})},Y=G=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){G.preventDefault();return}g==null||g(G)},W=m?G=>m(G):void 0,K=G=>{Q.current&&(G.stopPropagation(),Q.current=!1)},D=G=>{var ht,Pt;const{domNode:ne,transform:de}=k.getState();if(F.current=ne==null?void 0:ne.getBoundingClientRect(),!F.current)return;const xe=G.target===I.current;if(!xe&&!!G.target.closest(".nokey")||!e||!(l&&xe||t)||G.button!==0||!G.isPrimary)return;(Pt=(ht=G.target)==null?void 0:ht.setPointerCapture)==null||Pt.call(ht,G.pointerId),Q.current=!1;const{x:ze,y:Qe}=ci(G.nativeEvent,F.current),Ce=td({x:ze,y:Qe},de);k.setState({userSelectionRect:{width:0,height:0,startX:Ce.x,startY:Ce.y,x:ze,y:Qe}}),xe||(G.stopPropagation(),G.preventDefault())};function L(G,ne){const{userSelectionRect:de}=k.getState();if(!de)return;const{transform:xe,nodeLookup:ke,edgeLookup:we,connectionLookup:ze,triggerNodeChanges:Qe,triggerEdgeChanges:Ce,defaultEdgeOptions:ht}=k.getState(),Pt={x:de.startX,y:de.startY},{x:an,y:ln}=Pl(Pt,xe),jn={startX:Pt.x,startY:Pt.y,x:G<an?G:an,y:ne<ln?ne:ln,width:Math.abs(G-an),height:Math.abs(ne-ln)},Yr=$.current,Jn=U.current;$.current=new Set(Nx(ke,jn,xe,n===Nu.Partial,!0).map(En=>En.id)),U.current=new Set;const bt=(ht==null?void 0:ht.selectable)??!0;for(const En of $.current){const ce=ze.get(En);if(ce)for(const{edgeId:ye}of ce.values()){const Re=we.get(ye);Re&&(Re.selectable??bt)&&U.current.add(ye)}}if(!Tk(Yr,$.current)){const En=hl(ke,$.current,!0);Qe(En)}if(!Tk(Jn,U.current)){const En=hl(we,U.current);Ce(En)}k.setState({userSelectionRect:jn,userSelectionActive:!0,nodesSelectionActive:!1})}function V(){if(!a||!F.current)return;const[G,ne]=Cx(B.current,F.current,A);O({x:G,y:ne}).then(de=>{if(!Q.current||!de){S.current=requestAnimationFrame(V);return}const{x:xe,y:ke}=B.current;L(xe,ke),S.current=requestAnimationFrame(V)})}const R=()=>{cancelAnimationFrame(S.current),S.current=0,H.current=!1};T.useEffect(()=>()=>R(),[]);const oe=G=>{const{userSelectionRect:ne,transform:de,resetSelectedElements:xe}=k.getState();if(!F.current||!ne)return;const{x:ke,y:we}=ci(G.nativeEvent,F.current);B.current={x:ke,y:we};const ze=Pl({x:ne.startX,y:ne.startY},de);if(!Q.current){const Qe=t?0:o;if(Math.hypot(ke-ze.x,we-ze.y)<=Qe)return;xe(),u==null||u(G)}Q.current=!0,H.current||(V(),H.current=!0),L(ke,we)},ge=G=>{var ne,de;if(!M){G.target===I.current&&k.getState().connection.inProgress&&(q.current=!0);return}G.button===0&&((de=(ne=G.target)==null?void 0:ne.releasePointerCapture)==null||de.call(ne,G.pointerId),!j&&G.target===I.current&&k.getState().userSelectionRect&&(z==null||z(G)),k.setState({userSelectionActive:!1,userSelectionRect:null}),Q.current&&(d==null||d(G),k.setState({nodesSelectionActive:$.current.size>0})),R())},te=G=>{var ne,de;(de=(ne=G.target)==null?void 0:ne.releasePointerCapture)==null||de.call(ne,G.pointerId),R()},ue=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:mn(["react-flow__pane",{draggable:ue,dragging:N,selection:e}]),onClick:M?void 0:cy(z,I),onContextMenu:cy(Y,I),onWheel:cy(W,I),onPointerEnter:M?void 0:y,onPointerMove:M?oe:b,onPointerUp:ge,onPointerCancel:M?te:void 0,onPointerDownCapture:M?D:void 0,onClickCapture:M?K:void 0,onPointerLeave:E,ref:I,style:op,children:[w,f.jsx(QK,{})]})}function cb({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:a,unselectNodesAndEdges:o,multiSelectionActive:l,nodeLookup:u,onError:d}=t.getState(),h=u.get(e);if(!h){d==null||d("012",fi.error012(e));return}t.setState({nodesSelectionActive:!1}),h.selected?(n||h.selected&&l)&&(o({nodes:[h],edges:[]}),requestAnimationFrame(()=>{var g;return(g=r==null?void 0:r.current)==null?void 0:g.blur()})):a([e])}function Nj({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:a,isSelectable:o,nodeClickDistance:l}){const u=Gt(),[d,h]=T.useState(!1),g=T.useRef();return T.useEffect(()=>{g.current=z7({getStoreItems:()=>u.getState(),onNodeMouseDown:m=>{cb({id:m,store:u,nodeRef:e})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),T.useEffect(()=>{if(!(t||!e.current||!g.current))return g.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:a,nodeClickDistance:l}),()=>{var m;(m=g.current)==null||m.destroy()}},[n,r,t,o,e,a,l]),d}const ZK=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Cj(){const e=Gt();return T.useCallback(n=>{const{nodeExtent:r,snapToGrid:a,snapGrid:o,nodesDraggable:l,onError:u,updateNodePositions:d,nodeLookup:h,nodeOrigin:g}=e.getState(),m=new Map,y=ZK(l),b=a?o[0]:5,E=a?o[1]:5,w=n.direction.x*b*n.factor,S=n.direction.y*E*n.factor;for(const[,k]of h){if(!y(k))continue;let j={x:k.internals.positionAbsolute.x+w,y:k.internals.positionAbsolute.y+S};a&&(j=ed(j,o));const{position:_,positionAbsolute:N}=KC({nodeId:k.id,nextPosition:j,nodeLookup:h,nodeExtent:r,nodeOrigin:g,onError:u});k.position=_,k.internals.positionAbsolute=N,m.set(k.id,k)}d(m)},[])}const Lx=T.createContext(null),JK=Lx.Provider;Lx.Consumer;const jj=()=>T.useContext(Lx),eG=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Aj=T.createContext(null);function tG({children:e}){const t=ft(eG,Kt);return f.jsx(Aj.Provider,{value:t,children:e})}function nG(){const e=T.useContext(Aj);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const rG={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},iG=(e,t,n)=>r=>{const{connectionClickStartHandle:a,connectionMode:o,connection:l}=r,{fromHandle:u,toHandle:d,isValid:h}=l;if(!u&&!a)return rG;const g=(d==null?void 0:d.nodeId)===e&&(d==null?void 0:d.id)===t&&(d==null?void 0:d.type)===n;return{connectingFrom:(u==null?void 0:u.nodeId)===e&&(u==null?void 0:u.id)===t&&(u==null?void 0:u.type)===n,connectingTo:g,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,isPossibleEndHandle:o===Il.Strict?(u==null?void 0:u.type)!==n:e!==(u==null?void 0:u.nodeId)||t!==(u==null?void 0:u.id),connectionInProcess:!!u,clickConnectionInProcess:!!a,valid:g&&h}};function aG({type:e="source",position:t=De.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:a=!0,isConnectableEnd:o=!0,id:l,onConnect:u,children:d,className:h,onMouseDown:g,onTouchStart:m,...y},b){var H,z;const E=l||null,w=e==="target",S=Gt(),k=jj(),{connectOnClick:j,noPanClassName:_,rfId:N}=nG(),{connectingFrom:O,connectingTo:A,clickConnecting:M,isPossibleEndHandle:I,connectionInProcess:F,clickConnectionInProcess:$,valid:U}=ft(iG(k,E,e),Kt);k||(z=(H=S.getState()).onError)==null||z.call(H,"010",fi.error010());const q=Y=>{const{defaultEdgeOptions:W,onConnect:K,hasDefaultEdges:D}=S.getState(),L={...W,...Y};if(D){const{edges:V,setEdges:R,onError:oe}=S.getState();R(IK(L,V,{onError:oe}))}K==null||K(L),u==null||u(L)},Q=Y=>{if(!k)return;const W=ej(Y.nativeEvent);if(a&&(W&&Y.button===0||!W)){const K=S.getState();lb.onPointerDown(Y.nativeEvent,{handleDomNode:Y.currentTarget,autoPanOnConnect:K.autoPanOnConnect,connectionMode:K.connectionMode,connectionRadius:K.connectionRadius,domNode:K.domNode,nodeLookup:K.nodeLookup,lib:K.lib,isTarget:w,handleId:E,nodeId:k,flowId:K.rfId,panBy:K.panBy,cancelConnection:K.cancelConnection,onConnectStart:K.onConnectStart,onConnectEnd:(...D)=>{var L,V;return(V=(L=S.getState()).onConnectEnd)==null?void 0:V.call(L,...D)},updateConnection:K.updateConnection,onConnect:q,isValidConnection:n||((...D)=>{var L,V;return((V=(L=S.getState()).isValidConnection)==null?void 0:V.call(L,...D))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:K.autoPanSpeed,dragThreshold:K.connectionDragThreshold})}W?g==null||g(Y):m==null||m(Y)},B=Y=>{const{onClickConnectStart:W,onClickConnectEnd:K,connectionClickStartHandle:D,connectionMode:L,isValidConnection:V,lib:R,rfId:oe,nodeLookup:ge,connection:te}=S.getState();if(!k||!D&&!a)return;if(!D){W==null||W(Y.nativeEvent,{nodeId:k,handleId:E,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:k,type:e,id:E}});return}const ue=ZC(Y.target),G=n||V,{connection:ne,isValid:de}=lb.isValid(Y.nativeEvent,{handle:{nodeId:k,id:E,type:e},connectionMode:L,fromNodeId:D.nodeId,fromHandleId:D.id||null,fromType:D.type,isValidConnection:G,flowId:oe,doc:ue,lib:R,nodeLookup:ge});de&&ne&&q(ne);const xe=structuredClone(te);delete xe.inProgress,xe.toPosition=xe.toHandle?xe.toHandle.position:null,K==null||K(Y,xe),S.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":E,"data-nodeid":k,"data-handlepos":t,"data-id":`${N}-${k}-${E}-${e}`,className:mn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",_,h,{source:!w,target:w,connectable:r,connectablestart:a,connectableend:o,clickconnecting:M,connectingfrom:O,connectingto:A,valid:U,connectionindicator:r&&(!F||I)&&(F||$?o:a)}]),onMouseDown:Q,onTouchStart:Q,onClick:j?B:void 0,ref:b,...y,children:d})}const ji=T.memo(Sj(aG));function sG({data:e,isConnectable:t,sourcePosition:n=De.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(ji,{type:"source",position:n,isConnectable:t})]})}function oG({data:e,isConnectable:t,targetPosition:n=De.Top,sourcePosition:r=De.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(ji,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,f.jsx(ji,{type:"source",position:r,isConnectable:t})]})}function lG(){return null}function cG({data:e,isConnectable:t,targetPosition:n=De.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(ji,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Ch={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},oS={input:sG,default:oG,output:cG,group:lG};function uG(e){var t,n,r,a;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((a=e.style)==null?void 0:a.height)}}const dG=e=>{const{width:t,height:n,x:r,y:a}=Ju(e.nodeLookup,{filter:o=>!!o.selected});return{width:li(t)?t:null,height:li(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${a}px)`}};function fG({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Gt(),{width:a,height:o,transformString:l,userSelectionActive:u}=ft(dG,Kt),d=Cj(),h=T.useRef(null);T.useEffect(()=>{var b;n||(b=h.current)==null||b.focus({preventScroll:!0})},[n]);const g=!u&&a!==null&&o!==null;if(Nj({nodeRef:h,disabled:!g}),!g)return null;const m=e?b=>{const E=r.getState().nodes.filter(w=>w.selected);e(b,E)}:void 0,y=b=>{Object.prototype.hasOwnProperty.call(Ch,b.key)&&(b.preventDefault(),d({direction:Ch[b.key],factor:b.shiftKey?4:1}))};return f.jsx("div",{className:mn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:f.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:n?void 0:-1,onKeyDown:n?void 0:y,style:{width:a,height:o}})})}const lS=typeof window<"u"?window:void 0,hG=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Tj({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:o,onPaneScroll:l,paneClickDistance:u,deleteKeyCode:d,selectionKeyCode:h,selectionOnDrag:g,selectionMode:m,onSelectionStart:y,onSelectionEnd:b,multiSelectionKeyCode:E,panActivationKeyCode:w,zoomActivationKeyCode:S,elementsSelectable:k,zoomOnScroll:j,zoomOnPinch:_,panOnScroll:N,panOnScrollSpeed:O,panOnScrollMode:A,zoomOnDoubleClick:M,panOnDrag:I,autoPanOnSelection:F,defaultViewport:$,translateExtent:U,minZoom:q,maxZoom:Q,preventScrolling:B,onSelectionContextMenu:H,noWheelClassName:z,noPanClassName:Y,disableKeyboardA11y:W,onViewportChange:K,isControlledViewport:D}){const{nodesSelectionActive:L,userSelectionActive:V}=ft(hG,Kt),R=Au(h,{target:lS}),oe=Au(w,{target:lS}),ge=oe||I,te=oe||N,ue=g&&ge!==!0,G=R||V||ue;return qK({deleteKeyCode:d,multiSelectionKeyCode:E}),f.jsx(VK,{onPaneContextMenu:o,elementsSelectable:k,zoomOnScroll:j,zoomOnPinch:_,panOnScroll:te,panOnScrollSpeed:O,panOnScrollMode:A,zoomOnDoubleClick:M,panOnDrag:!R&&ge,defaultViewport:$,translateExtent:U,minZoom:q,maxZoom:Q,zoomActivationKeyCode:S,preventScrolling:B,noWheelClassName:z,noPanClassName:Y,onViewportChange:K,isControlledViewport:D,paneClickDistance:u,selectionOnDrag:ue,children:f.jsxs(XK,{onSelectionStart:y,onSelectionEnd:b,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:o,onPaneScroll:l,panOnDrag:ge,autoPanOnSelection:F,isSelecting:!!G,selectionMode:m,selectionKeyPressed:R,paneClickDistance:u,selectionOnDrag:ue,children:[e,L&&f.jsx(fG,{onSelectionContextMenu:H,noPanClassName:Y,disableKeyboardA11y:W})]})})}Tj.displayName="FlowRenderer";const pG=T.memo(Tj),mG=e=>t=>e?Nx(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function gG(e){return ft(T.useCallback(mG(e),[e]),Kt)}const yG=e=>e.updateNodeInternals;function bG(){const e=ft(yG),[t]=T.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(a=>{const o=a.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:a.target,force:!0})}),e(r)}));return T.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function xG({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const a=Gt(),o=T.useRef(null),l=T.useRef(null),u=T.useRef(e.sourcePosition),d=T.useRef(e.targetPosition),h=T.useRef(t),g=n&&!!e.internals.handleBounds;return T.useEffect(()=>{o.current&&!e.hidden&&(!g||l.current!==o.current)&&(l.current&&(r==null||r.unobserve(l.current)),r==null||r.observe(o.current),l.current=o.current)},[g,e.hidden]),T.useEffect(()=>()=>{l.current&&(r==null||r.unobserve(l.current),l.current=null)},[]),T.useEffect(()=>{if(o.current){const m=h.current!==t,y=u.current!==e.sourcePosition,b=d.current!==e.targetPosition;(m||y||b)&&(h.current=t,u.current=e.sourcePosition,d.current=e.targetPosition,a.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function vG({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:a,onContextMenu:o,onDoubleClick:l,nodesDraggable:u,elementsSelectable:d,nodesConnectable:h,nodesFocusable:g,resizeObserver:m,noDragClassName:y,noPanClassName:b,disableKeyboardA11y:E,rfId:w,nodeTypes:S,nodeClickDistance:k,onError:j}){const{node:_,internals:N,isParent:O}=ft(G=>{const ne=G.nodeLookup.get(e),de=G.parentLookup.has(e);return{node:ne,internals:ne.internals,isParent:de}},Kt);let A=_.type||"default",M=(S==null?void 0:S[A])||oS[A];M===void 0&&(j==null||j("003",fi.error003(A)),A="default",M=(S==null?void 0:S.default)||oS.default);const I=!!(_.draggable||u&&typeof _.draggable>"u"),F=!!(_.selectable||d&&typeof _.selectable>"u"),$=!!(_.connectable||h&&typeof _.connectable>"u"),U=!!(_.focusable||g&&typeof _.focusable>"u"),q=Gt(),Q=WC(_),B=xG({node:_,nodeType:A,hasDimensions:Q,resizeObserver:m}),H=Nj({nodeRef:B,disabled:_.hidden||!I,noDragClassName:y,handleSelector:_.dragHandle,nodeId:e,isSelectable:F,nodeClickDistance:k}),z=Cj();if(_.hidden)return null;const Y=ga(_),W=uG(_),K=F||I||t||n||r||a,D=n?G=>n(G,{...N.userNode}):void 0,L=r?G=>r(G,{...N.userNode}):void 0,V=a?G=>a(G,{...N.userNode}):void 0,R=o?G=>o(G,{...N.userNode}):void 0,oe=l?G=>l(G,{...N.userNode}):void 0,ge=G=>{const{selectNodesOnDrag:ne,nodeDragThreshold:de}=q.getState();F&&(!ne||!I||de>0)&&cb({id:e,store:q,nodeRef:B}),t&&t(G,{...N.userNode})},te=G=>{if(!(JC(G.nativeEvent)||E)){if(UC.includes(G.key)&&F){const ne=G.key==="Escape";cb({id:e,store:q,unselect:ne,nodeRef:B})}else if(I&&_.selected&&Object.prototype.hasOwnProperty.call(Ch,G.key)){G.preventDefault();const{ariaLabelConfig:ne}=q.getState();q.setState({ariaLiveMessage:ne["node.a11yDescription.ariaLiveMessage"]({direction:G.key.replace("Arrow","").toLowerCase(),x:~~N.positionAbsolute.x,y:~~N.positionAbsolute.y})}),z({direction:Ch[G.key],factor:G.shiftKey?4:1})}}},ue=()=>{var ze;if(E||!((ze=B.current)!=null&&ze.matches(":focus-visible")))return;const{transform:G,width:ne,height:de,autoPanOnNodeFocus:xe,setCenter:ke}=q.getState();if(!xe)return;Nx(new Map([[e,_]]),{x:0,y:0,width:ne,height:de},G,!0).length>0||ke(_.position.x+Y.width/2,_.position.y+Y.height/2,{zoom:G[2]})};return f.jsx("div",{className:mn(["react-flow__node",`react-flow__node-${A}`,{[b]:I},_.className,{selected:_.selected,selectable:F,parent:O,draggable:I,dragging:H}]),ref:B,style:{zIndex:N.z,transform:`translate(${N.positionAbsolute.x}px,${N.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:Q?"visible":"hidden",..._.style,...W},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:D,onMouseMove:L,onMouseLeave:V,onContextMenu:R,onClick:ge,onDoubleClick:oe,onKeyDown:U?te:void 0,tabIndex:U?0:void 0,onFocus:U?ue:void 0,role:_.ariaRole??(U?"group":void 0),"aria-roledescription":"node","aria-describedby":E?void 0:`${bj}-${w}`,"aria-label":_.ariaLabel,..._.domAttributes,children:f.jsx(JK,{value:e,children:f.jsx(M,{id:e,data:_.data,type:A,positionAbsoluteX:N.positionAbsolute.x,positionAbsoluteY:N.positionAbsolute.y,selected:_.selected??!1,selectable:F,draggable:I,deletable:_.deletable??!0,isConnectable:$,sourcePosition:_.sourcePosition,targetPosition:_.targetPosition,dragging:H,dragHandle:_.dragHandle,zIndex:N.z,parentId:_.parentId,...Y})})})}var wG=T.memo(vG);const EG=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Mj(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,onError:o}=ft(EG,Kt),l=gG(e.onlyRenderVisibleElements),u=bG();return f.jsx("div",{className:"react-flow__nodes",style:op,children:l.map(d=>f.jsx(wG,{id:d,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:u,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:o},d))})}Mj.displayName="NodeRenderer";const kG=T.memo(Mj);function SG(e){return ft(T.useCallback(n=>{if(!e)return n.edges.map(a=>a.id);const r=[];if(n.width&&n.height)for(const a of n.edges){const o=n.nodeLookup.get(a.source),l=n.nodeLookup.get(a.target);o&&l&&b7({sourceNode:o,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&r.push(a.id)}return r},[e]),Kt)}const _G=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},NG=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},cS={[Sh.Arrow]:_G,[Sh.ArrowClosed]:NG};function CG(e){const t=Gt();return T.useMemo(()=>{var a,o;return Object.prototype.hasOwnProperty.call(cS,e)?cS[e]:((o=(a=t.getState()).onError)==null||o.call(a,"009",fi.error009(e)),null)},[e])}const jG=({id:e,type:t,color:n,width:r=12.5,height:a=12.5,markerUnits:o="strokeWidth",strokeWidth:l,orient:u="auto-start-reverse"})=>{const d=CG(t);return d?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:u,refX:"0",refY:"0",children:f.jsx(d,{color:n,strokeWidth:l})}):null},Oj=({defaultColor:e,rfId:t})=>{const n=ft(o=>o.edges),r=ft(o=>o.defaultEdgeOptions),a=T.useMemo(()=>N7(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return a.length?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:a.map(o=>f.jsx(jG,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};Oj.displayName="MarkerDefinitions";var AG=T.memo(Oj);function Dj({x:e,y:t,label:n,labelStyle:r,labelShowBg:a=!0,labelBgStyle:o,labelBgPadding:l=[2,4],labelBgBorderRadius:u=2,children:d,className:h,...g}){const[m,y]=T.useState({x:1,y:0,width:0,height:0}),b=mn(["react-flow__edge-textwrapper",h]),E=T.useRef(null);return T.useEffect(()=>{if(E.current){const w=E.current.getBBox();y({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?f.jsxs("g",{transform:`translate(${e-m.width/2} ${t-m.height/2})`,className:b,visibility:m.width?"visible":"hidden",...g,children:[a&&f.jsx("rect",{width:m.width+2*l[0],x:-l[0],y:-l[1],height:m.height+2*l[1],className:"react-flow__edge-textbg",style:o,rx:u,ry:u}),f.jsx("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:E,style:r,children:n}),d]}):null}Dj.displayName="EdgeText";const TG=T.memo(Dj);function lp({path:e,labelX:t,labelY:n,label:r,labelStyle:a,labelShowBg:o,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,interactionWidth:h=20,...g}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...g,d:e,fill:"none",className:mn(["react-flow__edge-path",g.className])}),h?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,r&&li(t)&&li(n)?f.jsx(TG,{x:t,y:n,label:r,labelStyle:a,labelShowBg:o,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d}):null]})}function uS({pos:e,x1:t,y1:n,x2:r,y2:a}){return e===De.Left||e===De.Right?[.5*(t+r),n]:[t,.5*(n+a)]}function Rj({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:a,targetPosition:o=De.Top}){const[l,u]=uS({pos:n,x1:e,y1:t,x2:r,y2:a}),[d,h]=uS({pos:o,x1:r,y1:a,x2:e,y2:t}),[g,m,y,b]=tj({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:l,sourceControlY:u,targetControlX:d,targetControlY:h});return[`M${e},${t} C${l},${u} ${d},${h} ${r},${a}`,g,m,y,b]}function Lj(e){return T.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:o,sourcePosition:l,targetPosition:u,label:d,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:b,style:E,markerEnd:w,markerStart:S,interactionWidth:k})=>{const[j,_,N]=Rj({sourceX:n,sourceY:r,sourcePosition:l,targetX:a,targetY:o,targetPosition:u}),O=e.isInternal?void 0:t;return f.jsx(lp,{id:O,path:j,labelX:_,labelY:N,label:d,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:b,style:E,markerEnd:w,markerStart:S,interactionWidth:k})})}const MG=Lj({isInternal:!1}),Ij=Lj({isInternal:!0});MG.displayName="SimpleBezierEdge";Ij.displayName="SimpleBezierEdgeInternal";function zj(e){return T.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:o,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:m,style:y,sourcePosition:b=De.Bottom,targetPosition:E=De.Top,markerEnd:w,markerStart:S,pathOptions:k,interactionWidth:j})=>{const[_,N,O]=ab({sourceX:n,sourceY:r,sourcePosition:b,targetX:a,targetY:o,targetPosition:E,borderRadius:k==null?void 0:k.borderRadius,offset:k==null?void 0:k.offset,stepPosition:k==null?void 0:k.stepPosition}),A=e.isInternal?void 0:t;return f.jsx(lp,{id:A,path:_,labelX:N,labelY:O,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:m,style:y,markerEnd:w,markerStart:S,interactionWidth:j})})}const Pj=zj({isInternal:!1}),Bj=zj({isInternal:!0});Pj.displayName="SmoothStepEdge";Bj.displayName="SmoothStepEdgeInternal";function Uj(e){return T.memo(({id:t,...n})=>{var a;const r=e.isInternal?void 0:t;return f.jsx(Pj,{...n,id:r,pathOptions:T.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(a=n.pathOptions)==null?void 0:a.offset])})})}const OG=Uj({isInternal:!1}),$j=Uj({isInternal:!0});OG.displayName="StepEdge";$j.displayName="StepEdgeInternal";function Fj(e){return T.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:o,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:E,interactionWidth:w})=>{const[S,k,j]=ij({sourceX:n,sourceY:r,targetX:a,targetY:o}),_=e.isInternal?void 0:t;return f.jsx(lp,{id:_,path:S,labelX:k,labelY:j,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:E,interactionWidth:w})})}const DG=Fj({isInternal:!1}),Hj=Fj({isInternal:!0});DG.displayName="StraightEdge";Hj.displayName="StraightEdgeInternal";function qj(e){return T.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:o,sourcePosition:l=De.Bottom,targetPosition:u=De.Top,label:d,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:b,style:E,markerEnd:w,markerStart:S,pathOptions:k,interactionWidth:j})=>{const[_,N,O]=nj({sourceX:n,sourceY:r,sourcePosition:l,targetX:a,targetY:o,targetPosition:u,curvature:k==null?void 0:k.curvature}),A=e.isInternal?void 0:t;return f.jsx(lp,{id:A,path:_,labelX:N,labelY:O,label:d,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:b,style:E,markerEnd:w,markerStart:S,interactionWidth:j})})}const RG=qj({isInternal:!1}),Kj=qj({isInternal:!0});RG.displayName="BezierEdge";Kj.displayName="BezierEdgeInternal";const dS={default:Kj,straight:Hj,step:$j,smoothstep:Bj,simplebezier:Ij},fS={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},LG=(e,t,n)=>n===De.Left?e-t:n===De.Right?e+t:e,IG=(e,t,n)=>n===De.Top?e-t:n===De.Bottom?e+t:e,hS="react-flow__edgeupdater";function pS({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:a,onMouseEnter:o,onMouseOut:l,type:u}){return f.jsx("circle",{onMouseDown:a,onMouseEnter:o,onMouseOut:l,className:mn([hS,`${hS}-${u}`]),cx:LG(t,r,e),cy:IG(n,r,e),r,stroke:"transparent",fill:"transparent"})}function zG({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:a,targetX:o,targetY:l,sourcePosition:u,targetPosition:d,onReconnect:h,onReconnectStart:g,onReconnectEnd:m,setReconnecting:y,setUpdateHover:b}){const E=Gt(),w=(N,O)=>{if(N.button!==0)return;const{autoPanOnConnect:A,domNode:M,connectionMode:I,connectionRadius:F,lib:$,onConnectStart:U,cancelConnection:q,nodeLookup:Q,rfId:B,panBy:H,updateConnection:z}=E.getState(),Y=O.type==="target",W=(L,V)=>{y(!1),m==null||m(L,n,O.type,V)},K=L=>h==null?void 0:h(n,L),D=(L,V)=>{y(!0),g==null||g(N,n,O.type),U==null||U(L,V)};lb.onPointerDown(N.nativeEvent,{autoPanOnConnect:A,connectionMode:I,connectionRadius:F,domNode:M,handleId:O.id,nodeId:O.nodeId,nodeLookup:Q,isTarget:Y,edgeUpdaterType:O.type,lib:$,flowId:B,cancelConnection:q,panBy:H,isValidConnection:(...L)=>{var V,R;return((R=(V=E.getState()).isValidConnection)==null?void 0:R.call(V,...L))??!0},onConnect:K,onConnectStart:D,onConnectEnd:(...L)=>{var V,R;return(R=(V=E.getState()).onConnectEnd)==null?void 0:R.call(V,...L)},onReconnectEnd:W,updateConnection:z,getTransform:()=>E.getState().transform,getFromHandle:()=>E.getState().connection.fromHandle,dragThreshold:E.getState().connectionDragThreshold,handleDomNode:N.currentTarget})},S=N=>w(N,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),k=N=>w(N,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),j=()=>b(!0),_=()=>b(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(pS,{position:u,centerX:r,centerY:a,radius:t,onMouseDown:S,onMouseEnter:j,onMouseOut:_,type:"source"}),(e===!0||e==="target")&&f.jsx(pS,{position:d,centerX:o,centerY:l,radius:t,onMouseDown:k,onMouseEnter:j,onMouseOut:_,type:"target"})]})}function PG({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:a,onDoubleClick:o,onContextMenu:l,onMouseEnter:u,onMouseMove:d,onMouseLeave:h,reconnectRadius:g,onReconnect:m,onReconnectStart:y,onReconnectEnd:b,rfId:E,edgeTypes:w,noPanClassName:S,onError:k,disableKeyboardA11y:j}){let _=ft(ke=>ke.edgeLookup.get(e));const N=ft(ke=>ke.defaultEdgeOptions);_=N?{...N,..._}:_;let O=_.type||"default",A=(w==null?void 0:w[O])||dS[O];A===void 0&&(k==null||k("011",fi.error011(O)),O="default",A=(w==null?void 0:w.default)||dS.default);const M=!!(_.focusable||t&&typeof _.focusable>"u"),I=typeof m<"u"&&(_.reconnectable||n&&typeof _.reconnectable>"u"),F=!!(_.selectable||r&&typeof _.selectable>"u"),$=T.useRef(null),[U,q]=T.useState(!1),[Q,B]=T.useState(!1),H=Gt(),{zIndex:z=_.zIndex,sourceX:Y,sourceY:W,targetX:K,targetY:D,sourcePosition:L,targetPosition:V}=ft(T.useCallback(ke=>{const we=ke.nodeLookup.get(_.source),ze=ke.nodeLookup.get(_.target);if(!we||!ze)return fS;const Qe=_7({id:e,sourceNode:we,targetNode:ze,sourceHandle:_.sourceHandle||null,targetHandle:_.targetHandle||null,connectionMode:ke.connectionMode,onError:k}),Ce=y7({selected:_.selected,zIndex:_.zIndex,sourceNode:we,targetNode:ze,elevateOnSelect:ke.elevateEdgesOnSelect,zIndexMode:ke.zIndexMode});return{...Qe||fS,zIndex:Ce}},[_.source,_.target,_.sourceHandle,_.targetHandle,_.selected,_.zIndex]),Kt),R=T.useMemo(()=>_.markerStart?`url('#${sb(_.markerStart,E)}')`:void 0,[_.markerStart,E]),oe=T.useMemo(()=>_.markerEnd?`url('#${sb(_.markerEnd,E)}')`:void 0,[_.markerEnd,E]);if(_.hidden||Y===null||W===null||K===null||D===null)return null;const ge=ke=>{var Ce;const{addSelectedEdges:we,unselectNodesAndEdges:ze,multiSelectionActive:Qe}=H.getState();F&&(H.setState({nodesSelectionActive:!1}),_.selected&&Qe?(ze({nodes:[],edges:[_]}),(Ce=$.current)==null||Ce.blur()):we([e])),a&&a(ke,_)},te=o?ke=>{o(ke,{..._})}:void 0,ue=l?ke=>{l(ke,{..._})}:void 0,G=u?ke=>{u(ke,{..._})}:void 0,ne=d?ke=>{d(ke,{..._})}:void 0,de=h?ke=>{h(ke,{..._})}:void 0,xe=ke=>{var we;if(!j&&UC.includes(ke.key)&&F){const{unselectNodesAndEdges:ze,addSelectedEdges:Qe}=H.getState();ke.key==="Escape"?((we=$.current)==null||we.blur(),ze({edges:[_]})):Qe([e])}};return f.jsx("svg",{style:{zIndex:z},children:f.jsxs("g",{className:mn(["react-flow__edge",`react-flow__edge-${O}`,_.className,S,{selected:_.selected,animated:_.animated,inactive:!F&&!a,updating:U,selectable:F}]),onClick:ge,onDoubleClick:te,onContextMenu:ue,onMouseEnter:G,onMouseMove:ne,onMouseLeave:de,onKeyDown:M?xe:void 0,tabIndex:M?0:void 0,role:_.ariaRole??(M?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":_.ariaLabel===null?void 0:_.ariaLabel||`Edge from ${_.source} to ${_.target}`,"aria-describedby":M?`${xj}-${E}`:void 0,ref:$,..._.domAttributes,children:[!Q&&f.jsx(A,{id:e,source:_.source,target:_.target,type:_.type,selected:_.selected,animated:_.animated,selectable:F,deletable:_.deletable??!0,label:_.label,labelStyle:_.labelStyle,labelShowBg:_.labelShowBg,labelBgStyle:_.labelBgStyle,labelBgPadding:_.labelBgPadding,labelBgBorderRadius:_.labelBgBorderRadius,sourceX:Y,sourceY:W,targetX:K,targetY:D,sourcePosition:L,targetPosition:V,data:_.data,style:_.style,sourceHandleId:_.sourceHandle,targetHandleId:_.targetHandle,markerStart:R,markerEnd:oe,pathOptions:"pathOptions"in _?_.pathOptions:void 0,interactionWidth:_.interactionWidth}),I&&f.jsx(zG,{edge:_,isReconnectable:I,reconnectRadius:g,onReconnect:m,onReconnectStart:y,onReconnectEnd:b,sourceX:Y,sourceY:W,targetX:K,targetY:D,sourcePosition:L,targetPosition:V,setUpdateHover:q,setReconnecting:B})]})})}var BG=T.memo(PG);const UG=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Gj({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:a,onReconnect:o,onEdgeContextMenu:l,onEdgeMouseEnter:u,onEdgeMouseMove:d,onEdgeMouseLeave:h,onEdgeClick:g,reconnectRadius:m,onEdgeDoubleClick:y,onReconnectStart:b,onReconnectEnd:E,disableKeyboardA11y:w}){const{edgesFocusable:S,edgesReconnectable:k,elementsSelectable:j,onError:_}=ft(UG,Kt),N=SG(t);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(AG,{defaultColor:e,rfId:n}),N.map(O=>f.jsx(BG,{id:O,edgesFocusable:S,edgesReconnectable:k,elementsSelectable:j,noPanClassName:a,onReconnect:o,onContextMenu:l,onMouseEnter:u,onMouseMove:d,onMouseLeave:h,onClick:g,reconnectRadius:m,onDoubleClick:y,onReconnectStart:b,onReconnectEnd:E,rfId:n,onError:_,edgeTypes:r,disableKeyboardA11y:w},O))]})}Gj.displayName="EdgeRenderer";const $G=T.memo(Gj),FG=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function HG({children:e}){const t=ft(FG);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function qG(e){const t=sp(),n=T.useRef(!1);T.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const KG=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function GG(e){const t=ft(KG),n=Gt();return T.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function VG(e){return e.connection.inProgress?{...e.connection,to:td(e.connection.to,e.transform)}:{...e.connection}}function YG(e){return VG}function QG(e){const t=YG();return ft(t,Kt)}const WG=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function XG({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:a,width:o,height:l,isValid:u,inProgress:d}=ft(WG,Kt);return!(o&&a&&d)?null:f.jsx("svg",{style:e,width:o,height:l,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:mn(["react-flow__connection",HC(u)]),children:f.jsx(Vj,{style:t,type:n,CustomComponent:r,isValid:u})})})}const Vj=({style:e,type:t=ns.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:a,from:o,fromNode:l,fromHandle:u,fromPosition:d,to:h,toNode:g,toHandle:m,toPosition:y,pointer:b}=QG();if(!a)return;if(n)return f.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:u,fromX:o.x,fromY:o.y,toX:h.x,toY:h.y,fromPosition:d,toPosition:y,connectionStatus:HC(r),toNode:g,toHandle:m,pointer:b});let E="";const w={sourceX:o.x,sourceY:o.y,sourcePosition:d,targetX:h.x,targetY:h.y,targetPosition:y};switch(t){case ns.Bezier:[E]=nj(w);break;case ns.SimpleBezier:[E]=Rj(w);break;case ns.Step:[E]=ab({...w,borderRadius:0});break;case ns.SmoothStep:[E]=ab(w);break;default:[E]=ij(w)}return f.jsx("path",{d:E,fill:"none",className:"react-flow__connection-path",style:e})};Vj.displayName="ConnectionLine";const ZG={};function mS(e=ZG){T.useRef(e),Gt(),T.useEffect(()=>{},[e])}function JG(){Gt(),T.useRef(!1),T.useEffect(()=>{},[])}function Yj({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:a,onNodeDoubleClick:o,onEdgeDoubleClick:l,onNodeMouseEnter:u,onNodeMouseMove:d,onNodeMouseLeave:h,onNodeContextMenu:g,onSelectionContextMenu:m,onSelectionStart:y,onSelectionEnd:b,connectionLineType:E,connectionLineStyle:w,connectionLineComponent:S,connectionLineContainerStyle:k,selectionKeyCode:j,selectionOnDrag:_,selectionMode:N,multiSelectionKeyCode:O,panActivationKeyCode:A,zoomActivationKeyCode:M,deleteKeyCode:I,onlyRenderVisibleElements:F,elementsSelectable:$,defaultViewport:U,translateExtent:q,minZoom:Q,maxZoom:B,preventScrolling:H,defaultMarkerColor:z,zoomOnScroll:Y,zoomOnPinch:W,panOnScroll:K,panOnScrollSpeed:D,panOnScrollMode:L,zoomOnDoubleClick:V,panOnDrag:R,autoPanOnSelection:oe,onPaneClick:ge,onPaneMouseEnter:te,onPaneMouseMove:ue,onPaneMouseLeave:G,onPaneScroll:ne,onPaneContextMenu:de,paneClickDistance:xe,nodeClickDistance:ke,onEdgeContextMenu:we,onEdgeMouseEnter:ze,onEdgeMouseMove:Qe,onEdgeMouseLeave:Ce,reconnectRadius:ht,onReconnect:Pt,onReconnectStart:an,onReconnectEnd:ln,noDragClassName:jn,noWheelClassName:Yr,noPanClassName:Jn,disableKeyboardA11y:bt,nodeExtent:En,rfId:ce,viewport:ye,onViewportChange:Re}){return mS(e),mS(t),JG(),qG(n),GG(ye),f.jsx(pG,{onPaneClick:ge,onPaneMouseEnter:te,onPaneMouseMove:ue,onPaneMouseLeave:G,onPaneContextMenu:de,onPaneScroll:ne,paneClickDistance:xe,deleteKeyCode:I,selectionKeyCode:j,selectionOnDrag:_,selectionMode:N,onSelectionStart:y,onSelectionEnd:b,multiSelectionKeyCode:O,panActivationKeyCode:A,zoomActivationKeyCode:M,elementsSelectable:$,zoomOnScroll:Y,zoomOnPinch:W,zoomOnDoubleClick:V,panOnScroll:K,panOnScrollSpeed:D,panOnScrollMode:L,panOnDrag:R,autoPanOnSelection:oe,defaultViewport:U,translateExtent:q,minZoom:Q,maxZoom:B,onSelectionContextMenu:m,preventScrolling:H,noDragClassName:jn,noWheelClassName:Yr,noPanClassName:Jn,disableKeyboardA11y:bt,onViewportChange:Re,isControlledViewport:!!ye,children:f.jsxs(HG,{children:[f.jsx($G,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:l,onReconnect:Pt,onReconnectStart:an,onReconnectEnd:ln,onlyRenderVisibleElements:F,onEdgeContextMenu:we,onEdgeMouseEnter:ze,onEdgeMouseMove:Qe,onEdgeMouseLeave:Ce,reconnectRadius:ht,defaultMarkerColor:z,noPanClassName:Jn,disableKeyboardA11y:bt,rfId:ce}),f.jsx(XG,{style:w,type:E,component:S,containerStyle:k}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(kG,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:u,onNodeMouseMove:d,onNodeMouseLeave:h,onNodeContextMenu:g,nodeClickDistance:ke,onlyRenderVisibleElements:F,noPanClassName:Jn,noDragClassName:jn,disableKeyboardA11y:bt,nodeExtent:En,rfId:ce}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}Yj.displayName="GraphView";const eV=T.memo(Yj),tV=QC(),gS=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:o,fitView:l,fitViewOptions:u,minZoom:d=.5,maxZoom:h=2,nodeOrigin:g,nodeExtent:m,zIndexMode:y="basic"}={})=>{const b=new Map,E=new Map,w=new Map,S=new Map,k=r??t??[],j=n??e??[],_=g??[0,0],N=m??_u;oj(w,S,k);const{nodesInitialized:O}=ob(j,b,E,{nodeOrigin:_,nodeExtent:N,zIndexMode:y});let A=[0,0,1];if(l&&a&&o){const M=Ju(b,{filter:U=>!!((U.width||U.initialWidth)&&(U.height||U.initialHeight))}),{x:I,y:F,zoom:$}=jx(M,a,o,d,h,(u==null?void 0:u.padding)??.1);A=[I,F,$]}return{rfId:"1",width:a??0,height:o??0,transform:A,nodes:j,nodesInitialized:O,nodeLookup:b,parentLookup:E,edges:k,edgeLookup:S,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:d,maxZoom:h,translateExtent:_u,nodeExtent:N,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Il.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:_,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:u,fitViewResolver:null,connection:{...FC},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:tV,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:$C,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},nV=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:o,fitView:l,fitViewOptions:u,minZoom:d,maxZoom:h,nodeOrigin:g,nodeExtent:m,zIndexMode:y})=>pK((b,E)=>{async function w(){const{nodeLookup:S,panZoom:k,fitViewOptions:j,fitViewResolver:_,width:N,height:O,minZoom:A,maxZoom:M}=E();k&&(await u7({nodes:S,width:N,height:O,panZoom:k,minZoom:A,maxZoom:M},j),_==null||_.resolve(!0),b({fitViewResolver:null}))}return{...gS({nodes:e,edges:t,width:a,height:o,fitView:l,fitViewOptions:u,minZoom:d,maxZoom:h,nodeOrigin:g,nodeExtent:m,defaultNodes:n,defaultEdges:r,zIndexMode:y}),setNodes:S=>{const{nodeLookup:k,parentLookup:j,nodeOrigin:_,elevateNodesOnSelect:N,fitViewQueued:O,zIndexMode:A,nodesSelectionActive:M}=E(),{nodesInitialized:I,hasSelectedNodes:F}=ob(S,k,j,{nodeOrigin:_,nodeExtent:m,elevateNodesOnSelect:N,checkEquality:!0,zIndexMode:A}),$=M&&F;O&&I?(w(),b({nodes:S,nodesInitialized:I,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:$})):b({nodes:S,nodesInitialized:I,nodesSelectionActive:$})},setEdges:S=>{const{connectionLookup:k,edgeLookup:j}=E();oj(k,j,S),b({edges:S})},setDefaultNodesAndEdges:(S,k)=>{if(S){const{setNodes:j}=E();j(S),b({hasDefaultNodes:!0})}if(k){const{setEdges:j}=E();j(k),b({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:k,nodeLookup:j,parentLookup:_,domNode:N,nodeOrigin:O,nodeExtent:A,debug:M,fitViewQueued:I,zIndexMode:F}=E(),{changes:$,updatedInternals:U}=D7(S,j,_,N,O,A,F);U&&(A7(j,_,{nodeOrigin:O,nodeExtent:A,zIndexMode:F}),I?(w(),b({fitViewQueued:!1,fitViewOptions:void 0})):b({}),($==null?void 0:$.length)>0&&(M&&console.log("React Flow: trigger node changes",$),k==null||k($)))},updateNodePositions:(S,k=!1)=>{const j=[];let _=[];const{nodeLookup:N,triggerNodeChanges:O,connection:A,updateConnection:M,onNodesChangeMiddlewareMap:I}=E();for(const[F,$]of S){const U=N.get(F),q=!!(U!=null&&U.expandParent&&(U!=null&&U.parentId)&&($!=null&&$.position)),Q={id:F,type:"position",position:q?{x:Math.max(0,$.position.x),y:Math.max(0,$.position.y)}:$.position,dragging:k};if(U&&A.inProgress&&A.fromNode.id===U.id){const B=uo(U,A.fromHandle,De.Left,!0);M({...A,from:B})}q&&U.parentId&&j.push({id:F,parentId:U.parentId,rect:{...$.internals.positionAbsolute,width:$.measured.width??0,height:$.measured.height??0}}),_.push(Q)}if(j.length>0){const{parentLookup:F,nodeOrigin:$}=E(),U=Rx(j,N,F,$);_.push(...U)}for(const F of I.values())_=F(_);O(_)},triggerNodeChanges:S=>{const{onNodesChange:k,setNodes:j,nodes:_,hasDefaultNodes:N,debug:O}=E();if(S!=null&&S.length){if(N){const A=Ej(S,_);j(A)}O&&console.log("React Flow: trigger node changes",S),k==null||k(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:k,setEdges:j,edges:_,hasDefaultEdges:N,debug:O}=E();if(S!=null&&S.length){if(N){const A=kj(S,_);j(A)}O&&console.log("React Flow: trigger edge changes",S),k==null||k(S)}},addSelectedNodes:S=>{const{multiSelectionActive:k,edgeLookup:j,nodeLookup:_,triggerNodeChanges:N,triggerEdgeChanges:O}=E();if(k){const A=S.map(M=>Us(M,!0));N(A);return}N(hl(_,new Set([...S]),!0)),O(hl(j))},addSelectedEdges:S=>{const{multiSelectionActive:k,edgeLookup:j,nodeLookup:_,triggerNodeChanges:N,triggerEdgeChanges:O}=E();if(k){const A=S.map(M=>Us(M,!0));O(A);return}O(hl(j,new Set([...S]))),N(hl(_,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:k}={})=>{const{edges:j,nodes:_,nodeLookup:N,triggerNodeChanges:O,triggerEdgeChanges:A}=E(),M=S||_,I=k||j,F=[];for(const U of M){if(!U.selected)continue;const q=N.get(U.id);q&&(q.selected=!1),F.push(Us(U.id,!1))}const $=[];for(const U of I)U.selected&&$.push(Us(U.id,!1));O(F),A($)},setMinZoom:S=>{const{panZoom:k,maxZoom:j}=E();k==null||k.setScaleExtent([S,j]),b({minZoom:S})},setMaxZoom:S=>{const{panZoom:k,minZoom:j}=E();k==null||k.setScaleExtent([j,S]),b({maxZoom:S})},setTranslateExtent:S=>{var k;(k=E().panZoom)==null||k.setTranslateExtent(S),b({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:k,triggerNodeChanges:j,triggerEdgeChanges:_,elementsSelectable:N}=E();if(!N)return;const O=k.reduce((M,I)=>I.selected?[...M,Us(I.id,!1)]:M,[]),A=S.reduce((M,I)=>I.selected?[...M,Us(I.id,!1)]:M,[]);j(O),_(A)},setNodeExtent:S=>{const{nodes:k,nodeLookup:j,parentLookup:_,nodeOrigin:N,elevateNodesOnSelect:O,nodeExtent:A,zIndexMode:M}=E();S[0][0]===A[0][0]&&S[0][1]===A[0][1]&&S[1][0]===A[1][0]&&S[1][1]===A[1][1]||(ob(k,j,_,{nodeOrigin:N,nodeExtent:S,elevateNodesOnSelect:O,checkEquality:!1,zIndexMode:M}),b({nodeExtent:S}))},panBy:S=>{const{transform:k,width:j,height:_,panZoom:N,translateExtent:O}=E();return R7({delta:S,panZoom:N,transform:k,translateExtent:O,width:j,height:_})},setCenter:async(S,k,j)=>{const{width:_,height:N,maxZoom:O,panZoom:A}=E();if(!A)return!1;const M=typeof(j==null?void 0:j.zoom)<"u"?j.zoom:O;return await A.setViewport({x:_/2-S*M,y:N/2-k*M,zoom:M},{duration:j==null?void 0:j.duration,ease:j==null?void 0:j.ease,interpolate:j==null?void 0:j.interpolate}),!0},cancelConnection:()=>{b({connection:{...FC}})},updateConnection:S=>{b({connection:S})},reset:()=>b({...gS()})}},Object.is);function Qj({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:a,initialHeight:o,initialMinZoom:l,initialMaxZoom:u,initialFitViewOptions:d,fitView:h,nodeOrigin:g,nodeExtent:m,zIndexMode:y,children:b}){const[E]=T.useState(()=>nV({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:o,fitView:h,minZoom:l,maxZoom:u,fitViewOptions:d,nodeOrigin:g,nodeExtent:m,zIndexMode:y}));return f.jsx(mK,{value:E,children:f.jsx(UK,{children:f.jsx(tG,{children:b})})})}function rV({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:a,width:o,height:l,fitView:u,fitViewOptions:d,minZoom:h,maxZoom:g,nodeOrigin:m,nodeExtent:y,zIndexMode:b}){return T.useContext(ip)?f.jsx(f.Fragment,{children:e}):f.jsx(Qj,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:a,initialWidth:o,initialHeight:l,fitView:u,initialFitViewOptions:d,initialMinZoom:h,initialMaxZoom:g,nodeOrigin:m,nodeExtent:y,zIndexMode:b,children:e})}const iV={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function aV({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:a,nodeTypes:o,edgeTypes:l,onNodeClick:u,onEdgeClick:d,onInit:h,onMove:g,onMoveStart:m,onMoveEnd:y,onConnect:b,onConnectStart:E,onConnectEnd:w,onClickConnectStart:S,onClickConnectEnd:k,onNodeMouseEnter:j,onNodeMouseMove:_,onNodeMouseLeave:N,onNodeContextMenu:O,onNodeDoubleClick:A,onNodeDragStart:M,onNodeDrag:I,onNodeDragStop:F,onNodesDelete:$,onEdgesDelete:U,onDelete:q,onSelectionChange:Q,onSelectionDragStart:B,onSelectionDrag:H,onSelectionDragStop:z,onSelectionContextMenu:Y,onSelectionStart:W,onSelectionEnd:K,onBeforeDelete:D,connectionMode:L,connectionLineType:V=ns.Bezier,connectionLineStyle:R,connectionLineComponent:oe,connectionLineContainerStyle:ge,deleteKeyCode:te="Backspace",selectionKeyCode:ue="Shift",selectionOnDrag:G=!1,selectionMode:ne=Nu.Full,panActivationKeyCode:de="Space",multiSelectionKeyCode:xe=ju()?"Meta":"Control",zoomActivationKeyCode:ke=ju()?"Meta":"Control",snapToGrid:we,snapGrid:ze,onlyRenderVisibleElements:Qe=!1,selectNodesOnDrag:Ce,nodesDraggable:ht,autoPanOnNodeFocus:Pt,nodesConnectable:an,nodesFocusable:ln,nodeOrigin:jn=vj,edgesFocusable:Yr,edgesReconnectable:Jn,elementsSelectable:bt=!0,defaultViewport:En=jK,minZoom:ce=.5,maxZoom:ye=2,translateExtent:Re=_u,preventScrolling:We=!0,nodeExtent:at,defaultMarkerColor:An="#b1b1b7",zoomOnScroll:fr=!0,zoomOnPinch:gn=!0,panOnScroll:$t=!1,panOnScrollSpeed:kn=.5,panOnScrollMode:xt=no.Free,zoomOnDoubleClick:jr=!0,panOnDrag:Tn=!0,onPaneClick:bo,onPaneMouseEnter:Ri,onPaneMouseMove:ya,onPaneMouseLeave:Li,onPaneScroll:In,onPaneContextMenu:J,paneClickDistance:he=1,nodeClickDistance:Se=0,children:qe,onReconnect:Ot,onReconnectStart:Et,onReconnectEnd:Ae,onEdgeContextMenu:Ne,onEdgeDoubleClick:$e,onEdgeMouseEnter:Vt,onEdgeMouseMove:It,onEdgeMouseLeave:Qr,reconnectRadius:ba=10,onNodesChange:xa,onEdgesChange:Ar,noDragClassName:Yt="nodrag",noWheelClassName:Sn="nowheel",noPanClassName:Wr="nopan",fitView:va,fitViewOptions:xs,connectOnClick:wa,attributionPosition:xo,proOptions:Ii,defaultEdgeOptions:vs,elevateNodesOnSelect:Mn=!0,elevateEdgesOnSelect:Xr=!1,disableKeyboardA11y:Zr=!1,autoPanOnConnect:gi,autoPanOnNodeDrag:Jt,autoPanOnSelection:vo=!0,autoPanSpeed:zi,connectionRadius:Jr,isValidConnection:be,onError:Le,style:et,id:mt,nodeDragThreshold:Qt,connectionDragThreshold:_n,viewport:qn,onViewportChange:zn,width:Nt,height:Kn,colorMode:wo="light",debug:Ea,onScroll:yi,ariaLabelConfig:ka,zIndexMode:Eo="basic",...Pn},ws){const ei=mt||"1",Sa=OK(wo),yn=T.useCallback(Es=>{Es.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),yi==null||yi(Es)},[yi]);return f.jsx("div",{"data-testid":"rf__wrapper",...Pn,onScroll:yn,style:{...et,...iV},ref:ws,className:mn(["react-flow",a,Sa]),id:mt,role:"application",children:f.jsxs(rV,{nodes:e,edges:t,width:Nt,height:Kn,fitView:va,fitViewOptions:xs,minZoom:ce,maxZoom:ye,nodeOrigin:jn,nodeExtent:at,zIndexMode:Eo,children:[f.jsx(MK,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:b,onConnectStart:E,onConnectEnd:w,onClickConnectStart:S,onClickConnectEnd:k,nodesDraggable:ht,autoPanOnNodeFocus:Pt,nodesConnectable:an,nodesFocusable:ln,edgesFocusable:Yr,edgesReconnectable:Jn,elementsSelectable:bt,elevateNodesOnSelect:Mn,elevateEdgesOnSelect:Xr,minZoom:ce,maxZoom:ye,nodeExtent:at,onNodesChange:xa,onEdgesChange:Ar,snapToGrid:we,snapGrid:ze,connectionMode:L,translateExtent:Re,connectOnClick:wa,defaultEdgeOptions:vs,fitView:va,fitViewOptions:xs,onNodesDelete:$,onEdgesDelete:U,onDelete:q,onNodeDragStart:M,onNodeDrag:I,onNodeDragStop:F,onSelectionDrag:H,onSelectionDragStart:B,onSelectionDragStop:z,onMove:g,onMoveStart:m,onMoveEnd:y,noPanClassName:Wr,nodeOrigin:jn,rfId:ei,autoPanOnConnect:gi,autoPanOnNodeDrag:Jt,autoPanSpeed:zi,onError:Le,connectionRadius:Jr,isValidConnection:be,selectNodesOnDrag:Ce,nodeDragThreshold:Qt,connectionDragThreshold:_n,onBeforeDelete:D,debug:Ea,ariaLabelConfig:ka,zIndexMode:Eo}),f.jsx(eV,{onInit:h,onNodeClick:u,onEdgeClick:d,onNodeMouseEnter:j,onNodeMouseMove:_,onNodeMouseLeave:N,onNodeContextMenu:O,onNodeDoubleClick:A,nodeTypes:o,edgeTypes:l,connectionLineType:V,connectionLineStyle:R,connectionLineComponent:oe,connectionLineContainerStyle:ge,selectionKeyCode:ue,selectionOnDrag:G,selectionMode:ne,deleteKeyCode:te,multiSelectionKeyCode:xe,panActivationKeyCode:de,zoomActivationKeyCode:ke,onlyRenderVisibleElements:Qe,defaultViewport:En,translateExtent:Re,minZoom:ce,maxZoom:ye,preventScrolling:We,zoomOnScroll:fr,zoomOnPinch:gn,zoomOnDoubleClick:jr,panOnScroll:$t,panOnScrollSpeed:kn,panOnScrollMode:xt,panOnDrag:Tn,autoPanOnSelection:vo,onPaneClick:bo,onPaneMouseEnter:Ri,onPaneMouseMove:ya,onPaneMouseLeave:Li,onPaneScroll:In,onPaneContextMenu:J,paneClickDistance:he,nodeClickDistance:Se,onSelectionContextMenu:Y,onSelectionStart:W,onSelectionEnd:K,onReconnect:Ot,onReconnectStart:Et,onReconnectEnd:Ae,onEdgeContextMenu:Ne,onEdgeDoubleClick:$e,onEdgeMouseEnter:Vt,onEdgeMouseMove:It,onEdgeMouseLeave:Qr,reconnectRadius:ba,defaultMarkerColor:An,noDragClassName:Yt,noWheelClassName:Sn,noPanClassName:Wr,rfId:ei,disableKeyboardA11y:Zr,nodeExtent:at,viewport:qn,onViewportChange:zn}),f.jsx(CK,{onSelectionChange:Q}),qe,f.jsx(EK,{proOptions:Ii,position:xo}),f.jsx(wK,{rfId:ei,disableKeyboardA11y:Zr})]})})}var sV=Sj(aV);function oV(e){const[t,n]=T.useState(e),r=T.useCallback(a=>n(o=>Ej(a,o)),[]);return[t,n,r]}function lV(e){const[t,n]=T.useState(e),r=T.useCallback(a=>n(o=>kj(a,o)),[]);return[t,n,r]}function cV({dimensions:e,lineWidth:t,variant:n,className:r}){return f.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:mn(["react-flow__background-pattern",n,r])})}function uV({radius:e,className:t}){return f.jsx("circle",{cx:e,cy:e,r:e,className:mn(["react-flow__background-pattern","dots",t])})}var ua;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(ua||(ua={}));const dV={[ua.Dots]:1,[ua.Lines]:1,[ua.Cross]:6},fV=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Wj({id:e,variant:t=ua.Dots,gap:n=20,size:r,lineWidth:a=1,offset:o=0,color:l,bgColor:u,style:d,className:h,patternClassName:g}){const m=T.useRef(null),{transform:y,patternId:b}=ft(fV,Kt),E=r||dV[t],w=t===ua.Dots,S=t===ua.Cross,k=Array.isArray(n)?n:[n,n],j=[k[0]*y[2]||1,k[1]*y[2]||1],_=E*y[2],N=Array.isArray(o)?o:[o,o],O=S?[_,_]:j,A=[N[0]*y[2]||1+O[0]/2,N[1]*y[2]||1+O[1]/2],M=`${b}${e||""}`;return f.jsxs("svg",{className:mn(["react-flow__background",h]),style:{...d,...op,"--xy-background-color-props":u,"--xy-background-pattern-color-props":l},ref:m,"data-testid":"rf__background",children:[f.jsx("pattern",{id:M,x:y[0]%j[0],y:y[1]%j[1],width:j[0],height:j[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:w?f.jsx(uV,{radius:_/2,className:g}):f.jsx(cV,{dimensions:O,lineWidth:a,variant:t,className:g})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${M})`})]})}Wj.displayName="Background";const hV=T.memo(Wj);function pV(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function mV(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function gV(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function yV(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function bV(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Uf({children:e,className:t,...n}){return f.jsx("button",{type:"button",className:mn(["react-flow__controls-button",t]),...n,children:e})}const xV=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Xj({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:a,onZoomIn:o,onZoomOut:l,onFitView:u,onInteractiveChange:d,className:h,children:g,position:m="bottom-left",orientation:y="vertical","aria-label":b}){const E=Gt(),{isInteractive:w,minZoomReached:S,maxZoomReached:k,ariaLabelConfig:j}=ft(xV,Kt),{zoomIn:_,zoomOut:N,fitView:O}=sp(),A=()=>{_(),o==null||o()},M=()=>{N(),l==null||l()},I=()=>{O(a),u==null||u()},F=()=>{E.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),d==null||d(!w)},$=y==="horizontal"?"horizontal":"vertical";return f.jsxs(ap,{className:mn(["react-flow__controls",$,h]),position:m,style:e,"data-testid":"rf__controls","aria-label":b??j["controls.ariaLabel"],children:[t&&f.jsxs(f.Fragment,{children:[f.jsx(Uf,{onClick:A,className:"react-flow__controls-zoomin",title:j["controls.zoomIn.ariaLabel"],"aria-label":j["controls.zoomIn.ariaLabel"],disabled:k,children:f.jsx(pV,{})}),f.jsx(Uf,{onClick:M,className:"react-flow__controls-zoomout",title:j["controls.zoomOut.ariaLabel"],"aria-label":j["controls.zoomOut.ariaLabel"],disabled:S,children:f.jsx(mV,{})})]}),n&&f.jsx(Uf,{className:"react-flow__controls-fitview",onClick:I,title:j["controls.fitView.ariaLabel"],"aria-label":j["controls.fitView.ariaLabel"],children:f.jsx(gV,{})}),r&&f.jsx(Uf,{className:"react-flow__controls-interactive",onClick:F,title:j["controls.interactive.ariaLabel"],"aria-label":j["controls.interactive.ariaLabel"],children:w?f.jsx(bV,{}):f.jsx(yV,{})}),g]})}Xj.displayName="Controls";const vV=T.memo(Xj);function wV({id:e,x:t,y:n,width:r,height:a,style:o,color:l,strokeColor:u,strokeWidth:d,className:h,borderRadius:g,shapeRendering:m,selected:y,onClick:b}){const{background:E,backgroundColor:w}=o||{},S=l||E||w;return f.jsx("rect",{className:mn(["react-flow__minimap-node",{selected:y},h]),x:t,y:n,rx:g,ry:g,width:r,height:a,style:{fill:S,stroke:u,strokeWidth:d},shapeRendering:m,onClick:b?k=>b(k,e):void 0})}const EV=T.memo(wV),kV=e=>e.nodes.map(t=>t.id),uy=e=>e instanceof Function?e:()=>e;function SV({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:a,nodeComponent:o=EV,onClick:l}){const u=ft(kV,Kt),d=uy(t),h=uy(e),g=uy(n),m=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:u.map(y=>f.jsx(NV,{id:y,nodeColorFunc:d,nodeStrokeColorFunc:h,nodeClassNameFunc:g,nodeBorderRadius:r,nodeStrokeWidth:a,NodeComponent:o,onClick:l,shapeRendering:m},y))})}function _V({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:a,nodeStrokeWidth:o,shapeRendering:l,NodeComponent:u,onClick:d}){const{node:h,x:g,y:m,width:y,height:b}=ft(E=>{const w=E.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const S=w.internals.userNode,{x:k,y:j}=w.internals.positionAbsolute,{width:_,height:N}=ga(S);return{node:S,x:k,y:j,width:_,height:N}},Kt);return!h||h.hidden||!WC(h)?null:f.jsx(u,{x:g,y:m,width:y,height:b,style:h.style,selected:!!h.selected,className:r(h),color:t(h),borderRadius:a,strokeColor:n(h),strokeWidth:o,shapeRendering:l,onClick:d,id:h.id})}const NV=T.memo(_V);var CV=T.memo(SV);const jV=200,AV=150,TV=e=>!e.hidden,MV=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?VC(Ju(e.nodeLookup,{filter:TV}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},OV="react-flow__minimap-desc";function Zj({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:a="",nodeBorderRadius:o=5,nodeStrokeWidth:l,nodeComponent:u,bgColor:d,maskColor:h,maskStrokeColor:g,maskStrokeWidth:m,position:y="bottom-right",onClick:b,onNodeClick:E,pannable:w=!1,zoomable:S=!1,ariaLabel:k,inversePan:j,zoomStep:_=1,offsetScale:N=5}){const O=Gt(),A=T.useRef(null),{boundingRect:M,viewBB:I,rfId:F,panZoom:$,translateExtent:U,flowWidth:q,flowHeight:Q,ariaLabelConfig:B}=ft(MV,Kt),H=(e==null?void 0:e.width)??jV,z=(e==null?void 0:e.height)??AV,Y=M.width/H,W=M.height/z,K=Math.max(Y,W),D=K*H,L=K*z,V=N*K,R=M.x-(D-M.width)/2-V,oe=M.y-(L-M.height)/2-V,ge=D+V*2,te=L+V*2,ue=`${OV}-${F}`,G=T.useRef(0),ne=T.useRef();G.current=K,T.useEffect(()=>{if(A.current&&$)return ne.current=H7({domNode:A.current,panZoom:$,getTransform:()=>O.getState().transform,getViewScale:()=>G.current}),()=>{var we;(we=ne.current)==null||we.destroy()}},[$]),T.useEffect(()=>{var we;(we=ne.current)==null||we.update({translateExtent:U,width:q,height:Q,inversePan:j,pannable:w,zoomStep:_,zoomable:S})},[w,S,j,_,U,q,Q]);const de=b?we=>{var Ce;const[ze,Qe]=((Ce=ne.current)==null?void 0:Ce.pointer(we))||[0,0];b(we,{x:ze,y:Qe})}:void 0,xe=E?T.useCallback((we,ze)=>{const Qe=O.getState().nodeLookup.get(ze).internals.userNode;E(we,Qe)},[]):void 0,ke=k??B["minimap.ariaLabel"];return f.jsx(ap,{position:y,style:{...e,"--xy-minimap-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-width-props":typeof m=="number"?m*K:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:mn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:H,height:z,viewBox:`${R} ${oe} ${ge} ${te}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ue,ref:A,onClick:de,children:[ke&&f.jsx("title",{id:ue,children:ke}),f.jsx(CV,{onClick:xe,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:a,nodeStrokeWidth:l,nodeComponent:u}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${R-V},${oe-V}h${ge+V*2}v${te+V*2}h${-ge-V*2}z
|
|
599
|
+
M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Zj.displayName="MiniMap";T.memo(Zj);const DV=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,RV={[Bl.Line]:"right",[Bl.Handle]:"bottom-right"};function LV({nodeId:e,position:t,variant:n=Bl.Handle,className:r,style:a=void 0,children:o,color:l,minWidth:u=10,minHeight:d=10,maxWidth:h=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:m=!1,resizeDirection:y,autoScale:b=!0,shouldResize:E,onResizeStart:w,onResize:S,onResizeEnd:k}){const j=jj(),_=typeof e=="string"?e:j,N=Gt(),O=T.useRef(null),A=n===Bl.Handle,M=ft(T.useCallback(DV(A&&b),[A,b]),Kt),I=T.useRef(null),F=t??RV[n];T.useEffect(()=>{if(!(!O.current||!_))return I.current||(I.current=nK({domNode:O.current,nodeId:_,getStoreItems:()=>{const{nodeLookup:U,transform:q,snapGrid:Q,snapToGrid:B,nodeOrigin:H,domNode:z}=N.getState();return{nodeLookup:U,transform:q,snapGrid:Q,snapToGrid:B,nodeOrigin:H,paneDomNode:z}},onChange:(U,q)=>{const{triggerNodeChanges:Q,nodeLookup:B,parentLookup:H,nodeOrigin:z}=N.getState(),Y=[],W={x:U.x,y:U.y},K=B.get(_);if(K&&K.expandParent&&K.parentId){const D=K.origin??z,L=U.width??K.measured.width??0,V=U.height??K.measured.height??0,R={id:K.id,parentId:K.parentId,rect:{width:L,height:V,...XC({x:U.x??K.position.x,y:U.y??K.position.y},{width:L,height:V},K.parentId,B,D)}},oe=Rx([R],B,H,z);Y.push(...oe),W.x=U.x?Math.max(D[0]*L,U.x):void 0,W.y=U.y?Math.max(D[1]*V,U.y):void 0}if(W.x!==void 0&&W.y!==void 0){const D={id:_,type:"position",position:{...W}};Y.push(D)}if(U.width!==void 0&&U.height!==void 0){const L={id:_,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:U.width,height:U.height}};Y.push(L)}for(const D of q){const L={...D,type:"position"};Y.push(L)}Q(Y)},onEnd:({width:U,height:q})=>{const Q={id:_,type:"dimensions",resizing:!1,dimensions:{width:U,height:q}};N.getState().triggerNodeChanges([Q])}})),I.current.update({controlPosition:F,boundaries:{minWidth:u,minHeight:d,maxWidth:h,maxHeight:g},keepAspectRatio:m,resizeDirection:y,onResizeStart:w,onResize:S,onResizeEnd:k,shouldResize:E}),()=>{var U;(U=I.current)==null||U.destroy()}},[F,u,d,h,g,m,w,S,k,E]);const $=F.split("-");return f.jsx("div",{className:mn(["react-flow__resize-control","nodrag",...$,n,r]),ref:O,style:{...a,scale:M,...l&&{[A?"backgroundColor":"borderColor"]:l}},children:o})}T.memo(LV);function IV(e){return Mt(`/api/smartarrange/${encodeURIComponent(e)}`)}async function zV(e){const t=await fetch(`/api/smartarrange/${encodeURIComponent(e)}/approve`,{method:"POST"});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return t.json()}const dy=["var(--color-accent-mint)","var(--color-accent-pink)","var(--color-accent-purple)","var(--color-accent-yellow)","var(--color-running-bg)","var(--color-idle-bg)","var(--color-stuck-bg)"];function yS(e,t){return dy[t%dy.length]??dy[0]}const Jj={done:"var(--color-cta)",doing:"var(--color-secondary-dark)",todo:"var(--color-text-subtle)",stuck:"var(--color-crashed)"},il={width:9,height:9,background:"var(--color-bg)",border:"2px solid var(--color-text)"},PV=T.memo(function({data:t,selected:n}){var a;const r=t;return f.jsxs("div",{className:"rounded-xl border-[3px] border-[var(--color-text)] bg-[var(--color-bg)] overflow-hidden cursor-pointer flex flex-col",style:{width:260,height:158,boxShadow:n?"5px 5px 0 var(--color-text)":"3px 3px 0 var(--color-text)",transform:n?"translate(-1px,-1px)":void 0},children:[f.jsx(ji,{id:"l-t",type:"target",position:De.Left,style:il}),f.jsx(ji,{id:"r-t",type:"target",position:De.Right,style:il}),f.jsx(ji,{id:"t-t",type:"target",position:De.Top,style:il}),f.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1.5 border-b-[3px] border-[var(--color-text)]",style:{background:r.color},children:[f.jsxs("span",{className:"font-[family-name:var(--font-mono)] text-xs font-bold text-[var(--color-text)]",children:["#",r.seq]}),f.jsx("span",{className:"text-[11px] text-[var(--color-text)] truncate",children:r.taskLabel}),f.jsx("span",{className:"w-2.5 h-2.5 rounded-full inline-block shrink-0 ml-auto border border-[var(--color-text)]",style:{background:Jj[r.status]??"gray"},title:r.status})]}),f.jsxs("div",{className:"px-2.5 py-2 flex-1 min-h-0 overflow-hidden",children:[f.jsx("p",{className:"text-[13px] font-semibold text-[var(--color-text)] leading-snug line-clamp-3",children:r.title}),((a=r.skills)==null?void 0:a.length)>0&&f.jsx("div",{className:"flex flex-wrap gap-1 mt-2 max-h-[46px] overflow-hidden",children:r.skills.slice(0,6).map(o=>f.jsx("span",{className:"text-[10px] font-[family-name:var(--font-mono)] px-1.5 py-0.5 rounded border border-[var(--color-text)] bg-[var(--color-bg-cream)] text-[var(--color-text)]",children:o},o))})]}),f.jsx(ji,{id:"r-s",type:"source",position:De.Right,style:il}),f.jsx(ji,{id:"l-s",type:"source",position:De.Left,style:il}),f.jsx(ji,{id:"b-s",type:"source",position:De.Bottom,style:il})]})});function BV({card:e,status:t,onClose:n}){var a;const r=Be();return T.useEffect(()=>{const o=l=>{l.key==="Escape"&&n()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[n]),f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:n,children:f.jsxs("div",{className:"nb-card mt-12 w-full max-w-2xl bg-[var(--color-bg)]",onClick:o=>o.stopPropagation(),children:[f.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full",children:["#",e.seq]}),f.jsxs("span",{className:"font-[family-name:var(--font-mono)] text-xs px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full font-semibold",children:[r("arrange.cardTask")," T",e.taskId]}),f.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs px-2 py-0.5 border-2 border-[var(--color-text)] rounded-full font-semibold",children:[f.jsx("span",{className:"w-2.5 h-2.5 rounded-full inline-block border border-[var(--color-text)]",style:{background:Jj[t]??"gray"}}),t]})]}),f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:e.title})]}),f.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2 flex-shrink-0","aria-label":r("arrange.close"),type:"button",children:f.jsx(_r,{size:14,strokeWidth:3})})]}),f.jsxs("div",{className:"flex flex-col gap-4",children:[e.at&&f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(m_,{size:14,strokeWidth:2.5}),f.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:e.at})]}),((a=e.skills)==null?void 0:a.length)>0&&f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:r("arrange.cardSkills")}),f.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:e.skills.map(o=>f.jsx(Gb,{name:o},o))})]}),e.prompt&&f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:r("arrange.cardPrompt")}),f.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-72 overflow-auto",children:e.prompt})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:r("arrange.cardLog")}),f.jsxs("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[e.at?`${e.at} [派发] #${e.seq} → ${r("arrange.cardTask")} T${e.taskId}`:"—",`
|
|
600
|
+
${e.at??""} [状态] ${t}`]})]})]})]})})}const UV=T.memo(function({data:t}){const n=t;return f.jsxs("div",{className:"relative w-full h-full rounded-2xl border-2 border-dashed border-[var(--color-text)]",children:[f.jsx("div",{className:"absolute inset-0 rounded-2xl",style:{background:n.color,opacity:.16}}),f.jsx("span",{className:"absolute top-1.5 left-2.5 px-2 py-0.5 text-[11px] font-bold rounded-md border-2 border-[var(--color-text)] bg-[var(--color-bg)] text-[var(--color-text)] whitespace-nowrap max-w-[90%] truncate",children:n.label})]})}),$V={card:PV,laneBox:UV},Ix=260,eA=Ix+36,FV=200,HV={todo:"var(--color-text-subtle)",doing:"var(--color-secondary-dark)",done:"var(--color-cta)",rework:"var(--color-secondary-dark)"};function ub(e,t,n){return e==="doing"&&t<n?"stuck":e}function qV(e,t){const n=Math.floor(e/t),r=e%t;return{x:(n%2===0?r:t-1-r)*eA,y:n*FV}}function KV(e,t,n){const r=Math.floor(e/n),a=Math.floor(t/n);return r===a?r%2===0?{sourceHandle:"r-s",targetHandle:"l-t"}:{sourceHandle:"l-s",targetHandle:"r-t"}:{sourceHandle:"b-s",targetHandle:"t-t"}}function GV(e){return e==="done"?{animated:!1,style:{stroke:"var(--color-cta)",strokeWidth:2.5}}:e==="doing"?{animated:!0,style:{stroke:"var(--color-secondary-dark)",strokeWidth:3}}:e==="stuck"?{animated:!1,style:{stroke:"var(--color-crashed)",strokeWidth:2.5,strokeDasharray:"6 4"}}:{animated:!1,style:{stroke:"var(--color-accent-yellow)",strokeWidth:2.5,strokeDasharray:"6 4"}}}const tA=158,bS=Ix+60,xS=tA+28,vS=40;function VV({cards:e,taskMeta:t,view:n,onSelect:r}){const a=T.useRef(null),[o,l]=T.useState(4),u=sp(),[d,h,g]=oV([]),[m,y]=lV([]),b=T.useRef("");return T.useEffect(()=>{const E=a.current;if(!E)return;const w=new ResizeObserver(S=>{var j;const k=((j=S[0])==null?void 0:j.contentRect.width)??800;l(Math.max(1,Math.min(8,Math.floor((k-40)/eA))))});return w.observe(E),()=>w.disconnect()},[]),T.useEffect(()=>{const E=[...e].sort((A,M)=>A.seq-M.seq),w=`${n}:${o}:${E.length}`,S=b.current!==w;b.current=w;const k=new Map,j=(A,M)=>{var I;if(n==="lane"){const F=((I=t.get(A.taskId))==null?void 0:I.order)??0,$=k.get(A.taskId)??0;return k.set(A.taskId,$+1),{x:F*bS,y:$*xS}}return qV(M,o)},_=[];if(n==="lane"){const A=new Map;for(const M of E)A.set(M.taskId,(A.get(M.taskId)??0)+1);for(const[M,I]of A){const F=t.get(M),$=(F==null?void 0:F.order)??0;_.push({id:`lane-${M}`,type:"laneBox",position:{x:$*bS-16,y:-vS},data:{label:F!=null&&F.title?`T${M} · ${F.title}`:`T${M}`,color:(F==null?void 0:F.color)??"var(--color-bg-cream)"},style:{width:Ix+32,height:vS+(I-1)*xS+tA+14},draggable:!1,selectable:!1,zIndex:0})}}const N=E.length?E[E.length-1].seq:0;h(A=>{const M=new Map(A.map(F=>[F.id,F])),I=E.map((F,$)=>{const U=t.get(F.taskId),q={seq:F.seq,title:F.title,skills:F.skills??[],taskLabel:`T${F.taskId}`,status:ub(F.status,F.seq,N),color:(U==null?void 0:U.color)??"var(--color-bg-cream)"},Q=String(F.seq),B=M.get(Q),H=j(F,$);return{...B&&!S?{...B,data:q}:{id:Q,type:"card",position:H,data:q},zIndex:1}});return[..._,...I]});const O=[];for(let A=1;A<E.length;A++){const M=E[A-1],I=E[A];if(!M||!I)continue;const F=n==="lane"?M.taskId===I.taskId?{sourceHandle:"b-s",targetHandle:"t-t"}:{sourceHandle:"r-s",targetHandle:"l-t"}:KV(A-1,A,o);O.push({id:`e${M.seq}-${I.seq}`,source:String(M.seq),target:String(I.seq),...F,...GV(ub(I.status,I.seq,N))})}y(O),S&&requestAnimationFrame(()=>u.fitView({padding:.2,maxZoom:1.1,duration:300}))},[e,o,t,n,h,y,u]),f.jsx("div",{ref:a,className:"w-full h-full",children:f.jsxs(sV,{nodes:d,edges:m,onNodesChange:g,nodeTypes:$V,onNodeClick:(E,w)=>r(Number(w.id)),fitView:!0,fitViewOptions:{padding:.2,maxZoom:1.1},proOptions:{hideAttribution:!0},minZoom:.15,children:[f.jsx(hV,{variant:ua.Dots,gap:20,size:1.5,color:"var(--color-border-light)"}),f.jsx(vV,{showInteractive:!1})]})})}function YV(){var $,U,q;const e=Be(),t=wn(),{alert:n}=Zn(),a=((($=tt({queryKey:["projects"],queryFn:pa,refetchInterval:3e3}).data)==null?void 0:$.data)??[]).filter(Q=>Q.pipelineMode==="smartArrange"),o=a.map(Q=>Q.name),[l,u]=T.useState(()=>localStorage.getItem("arrange.project")??""),d=l&&o.includes(l)?l:o[0]??"";T.useEffect(()=>{l&&localStorage.setItem("arrange.project",l)},[l]);const h=a.find(Q=>Q.name===d),g=(h==null?void 0:h.pipelineStatus)==="running",m=tt({queryKey:["smartarrange",d],queryFn:()=>IV(d),enabled:!!d,refetchInterval:3e3}),y=rn({mutationFn:()=>zV(d),onSuccess:()=>t.invalidateQueries({queryKey:["smartarrange",d]}),onError:Q=>void n({title:e("arrange.approveErr"),body:Q instanceof Error?Q.message:String(Q)})}),b=rn({mutationFn:()=>MN(d),onSuccess:()=>t.invalidateQueries({queryKey:["projects"]}),onError:Q=>void n({title:e("arrange.startErr"),body:Q instanceof Error?Q.message:String(Q)})}),E=rn({mutationFn:()=>ON(d),onSuccess:()=>t.invalidateQueries({queryKey:["projects"]}),onError:Q=>void n({title:e("arrange.startErr"),body:Q instanceof Error?Q.message:String(Q)})}),w=(U=m.data)==null?void 0:U.plan,S=T.useMemo(()=>{var Q;return((Q=m.data)==null?void 0:Q.cards)??[]},[(q=m.data)==null?void 0:q.cards]),[k,j]=T.useState(()=>localStorage.getItem("arrange.view")==="lane"?"lane":"free");T.useEffect(()=>{localStorage.setItem("arrange.view",k)},[k]);const _=T.useMemo(()=>{const Q=new Map;return((w==null?void 0:w.tasks)??[]).forEach((B,H)=>Q.set(B.id,{order:H,status:B.status,color:yS(B.id,H),title:B.title})),Q},[w==null?void 0:w.tasks]),[N,O]=T.useState(()=>localStorage.getItem("arrange.panel")!=="0");T.useEffect(()=>{localStorage.setItem("arrange.panel",N?"1":"0")},[N]);const[A,M]=T.useState(null),I=T.useMemo(()=>S.find(Q=>Q.seq===A),[S,A]),F=S.length?Math.max(...S.map(Q=>Q.seq)):0;return f.jsxs("div",{className:"flex flex-col gap-4 h-full min-h-0",children:[f.jsxs("header",{className:"flex items-center justify-between gap-3 flex-wrap shrink-0",children:[f.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e("arrange.h1")}),d&&f.jsxs("div",{className:"flex items-center gap-2",children:[g?f.jsxs("button",{className:"nb-btn nb-btn-yellow",style:{padding:"6px 12px",fontSize:12},onClick:()=>E.mutate(),disabled:E.isPending,type:"button","aria-label":e("arrange.stop"),children:[E.isPending?f.jsx(pt,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(Nb,{size:12,strokeWidth:3}),e("arrange.stop")]}):f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>b.mutate(),disabled:b.isPending,type:"button","aria-label":e("arrange.start"),children:[b.isPending?f.jsx(pt,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(Fu,{size:12,strokeWidth:3}),e("arrange.start")]}),w&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"nb-status",style:{background:"var(--color-bg-cream)",color:"var(--color-text)"},children:w.status}),f.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:["round ",w.round,"/",w.maxRounds]}),w.status==="awaiting-approval"&&f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>y.mutate(),disabled:y.isPending,type:"button","aria-label":e("arrange.approve"),children:[y.isPending?f.jsx(pt,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(ih,{size:12,strokeWidth:2.5}),e("arrange.approve")]})]})]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[w&&f.jsxs("button",{className:"nb-btn",style:{padding:"6px 10px",fontSize:12},onClick:()=>j(k==="free"?"lane":"free"),type:"button","aria-label":e("arrange.view"),children:[k==="lane"?f.jsx(WR,{size:14,strokeWidth:2.5}):f.jsx(x_,{size:14,strokeWidth:2.5}),e(k==="lane"?"arrange.viewLane":"arrange.viewFree")]}),f.jsxs("select",{className:"nb-input",style:{maxWidth:240},value:d,onChange:Q=>u(Q.target.value),"aria-label":e("arrange.project"),children:[o.length===0&&f.jsx("option",{value:"",children:"—"}),o.map(Q=>f.jsx("option",{value:Q,children:Q},Q))]})]})]}),w?f.jsxs("div",{className:"flex gap-4 flex-1 min-h-0",children:[f.jsxs("div",{className:"relative flex-1 min-h-0 rounded-2xl border-[3px] border-[var(--color-text)] overflow-hidden bg-[var(--color-bg-soft)]",style:{boxShadow:"4px 4px 0 var(--color-text)"},children:[S.length===0?f.jsx("div",{className:"absolute inset-0 grid place-items-center p-6",children:w.status==="running"?f.jsxs("div",{className:"flex flex-col items-center gap-3 text-[var(--color-text-muted)]",children:[f.jsx(pt,{size:28,strokeWidth:3,className:"animate-spin"}),f.jsx("p",{className:"text-sm",children:e("arrange.orchestrating")})]}):f.jsx("p",{className:"text-[var(--color-text-muted)] text-sm text-center max-w-sm",children:e("arrange.noCards")})}):f.jsx(Qj,{children:f.jsx(VV,{cards:S,taskMeta:_,view:k,onSelect:M})}),!N&&f.jsxs("button",{className:"nb-btn absolute right-3 top-3 z-10",style:{padding:"6px 10px",fontSize:12},onClick:()=>O(!0),type:"button","aria-label":e("arrange.expand"),children:[f.jsx(Uu,{size:14,strokeWidth:3,className:"rotate-180"}),e("arrange.tasks")]})]}),N&&f.jsxs("aside",{className:"w-72 shrink-0 nb-card overflow-auto flex flex-col gap-2",style:{padding:12},children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:e("arrange.tasks")}),f.jsx("button",{className:"nb-btn",style:{padding:"2px 6px"},onClick:()=>O(!1),type:"button","aria-label":e("arrange.collapse"),children:f.jsx(RR,{size:14,strokeWidth:2.5})})]}),w.tasks.length===0?f.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-10 text-[var(--color-text-muted)]",children:[f.jsx(pt,{size:22,strokeWidth:3,className:"animate-spin"}),f.jsx("p",{className:"text-xs text-center",children:e("arrange.planning")})]}):f.jsx("ul",{className:"flex flex-col gap-2",children:w.tasks.map((Q,B)=>f.jsxs("li",{className:"rounded-lg border-2 border-[var(--color-text)] p-2",style:{background:yS(Q.id,B)},children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"w-2.5 h-2.5 rounded-full inline-block shrink-0 border border-[var(--color-text)]",style:{background:HV[Q.status]??"gray"}}),f.jsxs("span",{className:"font-bold text-xs text-[var(--color-text)]",children:["T",Q.id]}),f.jsxs("span",{className:"text-[11px] ml-auto font-[family-name:var(--font-mono)] text-[var(--color-text)]",children:[Q.cardSeqs.length," ",e("arrange.cardsCount")]})]}),f.jsx("p",{className:"text-xs text-[var(--color-text)] mt-1 leading-snug",children:Q.title})]},Q.id))})]})]}):f.jsx("section",{className:"nb-card",children:g?f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(pt,{size:18,strokeWidth:3,className:"animate-spin"}),f.jsx("p",{className:"text-sm font-bold",children:e("arrange.starting")})]}):f.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:e("arrange.none")})}),I&&f.jsx(BV,{card:I,status:ub(I.status,I.seq,F),onClose:()=>M(null)})]})}function QV(){const e=Be();return f.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:e("notFound.title")}),f.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:e("notFound.body")}),f.jsx(fo,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:e("notFound.home")})]})}function WV(){return f.jsx(ZL,{children:f.jsx(eD,{children:f.jsxs(xn,{element:f.jsx(WL,{}),children:[f.jsx(xn,{index:!0,element:f.jsx(XO,{to:"/projects",replace:!0})}),f.jsx(xn,{path:"/projects",element:f.jsx(e3,{})}),f.jsx(xn,{path:"/projects/new",element:f.jsx(d3,{})}),f.jsx(xn,{path:"/projects/:name",element:f.jsx(SI,{})}),f.jsx(xn,{path:"/board",element:f.jsx(az,{})}),f.jsx(xn,{path:"/workers",element:f.jsx(vz,{})}),f.jsx(xn,{path:"/logs",element:f.jsx(_z,{})}),f.jsx(xn,{path:"/skills",element:f.jsx(F9,{})}),f.jsx(xn,{path:"/system",element:f.jsx(q9,{})}),f.jsx(xn,{path:"/processes",element:f.jsx(hF,{})}),f.jsx(xn,{path:"/audit",element:f.jsx(yF,{})}),f.jsx(xn,{path:"/chat",element:f.jsx(ok,{})}),f.jsx(xn,{path:"/chat/:sessionId",element:f.jsx(ok,{})}),f.jsx(xn,{path:"/memory",element:f.jsx(bF,{})}),f.jsx(xn,{path:"/plugins",element:f.jsx(EF,{})}),f.jsx(xn,{path:"/arrange",element:f.jsx(YV,{})}),f.jsx(xn,{path:"*",element:f.jsx(QV,{})})]})})})}XL();const XV=new $M({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),nA=document.getElementById("root");if(!nA)throw new Error("#root not found");gM.createRoot(nA).render(f.jsx(T.StrictMode,{children:f.jsx(EL,{children:f.jsx(FM,{client:XV,children:f.jsx(_D,{children:f.jsx(l3,{children:f.jsx(WV,{})})})})})}));
|