toolroll 0.9.103 → 0.9.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/README.md +27 -27
- package/dist/accent-colors.js +0 -29
- package/dist/acp-agents.js +0 -3
- package/dist/acp-attest.js +0 -30
- package/dist/acp-check.js +3 -70
- package/dist/acp-client.js +3 -94
- package/dist/acp-inspect.js +1 -20
- package/dist/action-ledger.js +0 -8
- package/dist/activity-line.js +0 -14
- package/dist/actor.js +0 -15
- package/dist/advanced-schema.js +12 -0
- package/dist/advanced-view.js +26 -0
- package/dist/advanced.js +61 -0
- package/dist/agent-board.js +0 -117
- package/dist/agent-fence.js +11 -367
- package/dist/agent-onboard.js +12 -50
- package/dist/agent-pulse.js +5 -38
- package/dist/agent-state-words.js +0 -8
- package/dist/agent-state.js +1 -45
- package/dist/agent-turns.js +3 -17
- package/dist/agentconfig.js +1 -99
- package/dist/agents-board.js +0 -60
- package/dist/agents-live.js +1 -8
- package/dist/api-tokens.js +0 -27
- package/dist/approval-authority.js +0 -59
- package/dist/approval-password.js +0 -10
- package/dist/approval-policy.js +0 -29
- package/dist/approval-rules-ui.js +0 -9
- package/dist/assignment-adapters.js +0 -14
- package/dist/assignment-brief.js +1 -17
- package/dist/assignment-delivery.js +0 -22
- package/dist/assignment-presentation.js +0 -14
- package/dist/assignment-status.js +1 -30
- package/dist/assignment-ui.js +0 -12
- package/dist/assignment.js +117 -103
- package/dist/attest.js +0 -38
- package/dist/audit-cli.js +0 -9
- package/dist/backend.js +0 -59
- package/dist/backup-ui.js +0 -12
- package/dist/backup.js +8 -61
- package/dist/batch-checks.js +0 -20
- package/dist/batch-policy.js +0 -4
- package/dist/beads.js +0 -48
- package/dist/bin.js +0 -8
- package/dist/board.js +1 -36
- package/dist/boot-identity.js +0 -42
- package/dist/bounded-spawn.js +4 -28
- package/dist/brand-mark.js +0 -21
- package/dist/brief-fence.js +0 -16
- package/dist/browser/terminal.css +1 -1
- package/dist/browser/terminal.js +16 -16
- package/dist/browser/workspace.css +2 -2
- package/dist/browser/workspace.js +26 -26
- package/dist/browser-crew.js +0 -8
- package/dist/browser-shell.js +2 -15
- package/dist/browser-workspace.js +6 -30
- package/dist/budget-alerts.js +1 -4
- package/dist/build-review.js +2 -50
- package/dist/builder-restart.js +0 -13
- package/dist/builder.js +21 -1035
- package/dist/canonical-json.js +0 -12
- package/dist/capscan.js +1 -32
- package/dist/card-catalog.js +0 -12
- package/dist/card-cli.js +0 -1
- package/dist/card-render.js +0 -25
- package/dist/card-sources.js +0 -10
- package/dist/chat-acceptance.js +0 -7
- package/dist/chat-actions.js +5 -190
- package/dist/chat-admission.js +0 -7
- package/dist/chat-approval.js +0 -25
- package/dist/chat-ask.js +0 -17
- package/dist/chat-card-part.js +0 -3
- package/dist/chat-card.js +0 -6
- package/dist/chat-channel.js +2 -83
- package/dist/chat-continuity.js +0 -31
- package/dist/chat-controls.js +0 -7
- package/dist/chat-core.js +0 -55
- package/dist/chat-decide.js +2 -153
- package/dist/chat-delivery-state.js +0 -49
- package/dist/chat-delivery.js +2 -143
- package/dist/chat-display.js +0 -2
- package/dist/chat-evidence.js +0 -65
- package/dist/chat-flow.js +0 -72
- package/dist/chat-follow.js +0 -13
- package/dist/chat-inbox.js +0 -34
- package/dist/chat-live-schema.js +0 -14
- package/dist/chat-live.js +2 -87
- package/dist/chat-message-states.js +13 -40
- package/dist/chat-messages.js +0 -153
- package/dist/chat-migration.js +0 -57
- package/dist/chat-polish.js +0 -7
- package/dist/chat-quiet.js +0 -37
- package/dist/chat-review.js +0 -4
- package/dist/chat-rooms.js +0 -22
- package/dist/chat-settings-page.js +0 -4
- package/dist/chat-task-actions.js +0 -7
- package/dist/chat-terms.js +0 -21
- package/dist/chat-voice.js +0 -38
- package/dist/chat-warmth.js +1 -3
- package/dist/check-access.js +0 -30
- package/dist/check-facts.js +2 -62
- package/dist/check-failure.js +0 -98
- package/dist/check-levels-ui.js +4 -10
- package/dist/check-levels.js +3 -35
- package/dist/check-load.js +1 -49
- package/dist/check-only-standing.js +0 -6
- package/dist/check-only.js +0 -22
- package/dist/check-progress.js +0 -32
- package/dist/check-repair.js +2 -35
- package/dist/check-report.js +1 -108
- package/dist/check-stamp.js +0 -20
- package/dist/checkout-cleanup.js +0 -84
- package/dist/checkout-proof.js +1 -13
- package/dist/child-database.js +0 -3
- package/dist/claim.js +4 -508
- package/dist/claude-print.js +0 -10
- package/dist/cli-fast.js +0 -8
- package/dist/cli-help.js +90 -78
- package/dist/cli-http.js +0 -10
- package/dist/cli.js +26 -241
- package/dist/code-extract.js +0 -6
- package/dist/code-map-acts.js +0 -7
- package/dist/code-map-admission.js +2 -26
- package/dist/code-map-build.js +3 -24
- package/dist/code-map-cli.js +0 -4
- package/dist/code-map-main.js +0 -6
- package/dist/code-map-read.js +0 -12
- package/dist/code-map-report.js +0 -9
- package/dist/code-map-shape.js +0 -19
- package/dist/code-map-store.js +0 -26
- package/dist/codex-limits.js +1 -17
- package/dist/coding-context.js +0 -10
- package/dist/coding-handoff.js +0 -14
- package/dist/coding-provider.js +0 -39
- package/dist/coding-shipping-ui.js +0 -1
- package/dist/coding-ui.js +0 -1
- package/dist/coding-update.js +1 -18
- package/dist/coding-workspace.js +0 -27
- package/dist/commit-extract.js +0 -83
- package/dist/connect-cli.js +0 -19
- package/dist/console-chrome.js +1 -34
- package/dist/console-instance.js +2 -91
- package/dist/container-state.js +0 -4
- package/dist/containment.js +2 -105
- package/dist/contract-changes.js +0 -6
- package/dist/contracts/acceptance-terms.js +0 -7
- package/dist/contracts/chat-actions.js +0 -46
- package/dist/contracts/chat-callback-rows.js +0 -8
- package/dist/contracts/chat-card.js +0 -14
- package/dist/contracts/chat-content.js +0 -55
- package/dist/contracts/chat-tables.js +0 -7
- package/dist/contracts/cli.js +0 -59
- package/dist/contracts/coding-activity.js +0 -15
- package/dist/contracts/coding-context.js +0 -15
- package/dist/contracts/coding-handoff.js +0 -11
- package/dist/contracts/coding-workspace.js +0 -14
- package/dist/contracts/console-api.js +3 -54
- package/dist/contracts/contract-test.js +0 -14
- package/dist/contracts/contract.js +0 -48
- package/dist/contracts/decision.js +0 -20
- package/dist/contracts/diff-stat.js +0 -16
- package/dist/contracts/discord-callback.js +0 -9
- package/dist/contracts/flow-card.js +0 -18
- package/dist/contracts/flow-propose.js +0 -8
- package/dist/contracts/flow-send.js +0 -31
- package/dist/contracts/flow.js +0 -112
- package/dist/contracts/gateway-tools.js +0 -22
- package/dist/contracts/handoff.js +0 -22
- package/dist/contracts/integration-metadata.js +0 -39
- package/dist/contracts/lead-context.js +0 -14
- package/dist/contracts/lead-tools.js +0 -49
- package/dist/contracts/mcp-oauth.js +0 -12
- package/dist/contracts/memory-pass.js +0 -21
- package/dist/contracts/model-catalog.js +0 -9
- package/dist/contracts/observation-request.js +0 -11
- package/dist/contracts/plan.js +0 -16
- package/dist/contracts/project-knowledge.js +0 -26
- package/dist/contracts/project-memory.js +0 -16
- package/dist/contracts/project-skills.js +0 -31
- package/dist/contracts/proof.js +0 -23
- package/dist/contracts/provider.js +0 -9
- package/dist/contracts/recipes.js +0 -16
- package/dist/contracts/release-check.js +0 -61
- package/dist/contracts/release-terms.js +0 -27
- package/dist/contracts/retention.js +0 -12
- package/dist/contracts/review-findings.js +0 -13
- package/dist/contracts/route-results.js +0 -15
- package/dist/contracts/route.js +0 -33
- package/dist/contracts/scope.js +0 -29
- package/dist/contracts/scout-report.js +0 -34
- package/dist/contracts/slack-callback.js +0 -11
- package/dist/contracts/sort-answer.js +0 -24
- package/dist/contracts/stage-output.js +0 -46
- package/dist/contracts/storage.js +0 -8
- package/dist/contracts/store-json.js +0 -41
- package/dist/contracts/subagent-turn.js +0 -23
- package/dist/contracts/task-sizing.js +0 -10
- package/dist/contracts/teams-callback.js +0 -7
- package/dist/contracts/telegram-callback.js +0 -27
- package/dist/contracts/trigger-payloads.js +0 -41
- package/dist/contracts/update-journal.js +0 -47
- package/dist/contracts/verification-receipt.js +0 -36
- package/dist/contracts/verification-view.js +0 -15
- package/dist/contracts/youiyoux-request.js +0 -26
- package/dist/control-setup.js +0 -7
- package/dist/control-ui.js +0 -3
- package/dist/controller-service.js +0 -4
- package/dist/controller-supervisor.js +0 -15
- package/dist/converse.js +3 -129
- package/dist/coordinator-proposals.js +1 -6
- package/dist/coordinator.js +0 -65
- package/dist/credentials-ui.js +0 -6
- package/dist/daemon.js +0 -137
- package/dist/database-reclaim.js +0 -3
- package/dist/decision.js +0 -78
- package/dist/demo-chat.js +4 -15
- package/dist/demo-sign-in.js +77 -0
- package/dist/demo.js +5 -194
- package/dist/deploy-gate.js +0 -20
- package/dist/deploy-lock.js +0 -4
- package/dist/deploy-phase.js +0 -22
- package/dist/deploy-rescue.js +0 -21
- package/dist/deprecations.js +0 -12
- package/dist/design/kit.css +9 -6
- package/dist/design/kit.js +2 -33
- package/dist/desktop-access.js +0 -9
- package/dist/desktop-bundle.js +1 -3
- package/dist/desktop-host.js +0 -34
- package/dist/desktop-update-gate.js +0 -8
- package/dist/desktop-update-recovery.js +1 -18
- package/dist/desktop-update.js +2 -48
- package/dist/digest-times.js +0 -2
- package/dist/disclosure.js +0 -5
- package/dist/discord-api.js +0 -6
- package/dist/discord-chat.js +0 -31
- package/dist/discord.js +0 -7
- package/dist/discover.js +0 -50
- package/dist/dispatch.js +61 -60
- package/dist/dispose.js +0 -208
- package/dist/doctor.js +0 -48
- package/dist/easy-start-args.js +7 -7
- package/dist/easy-start.js +32 -45
- package/dist/egress.js +1 -63
- package/dist/email-settings.js +0 -8
- package/dist/envelope.js +50 -86
- package/dist/eval-gate.js +1 -37
- package/dist/eval-hooks.js +0 -120
- package/dist/eval-oracle-main.js +0 -7
- package/dist/eval-oracle.js +3 -42
- package/dist/eval-world.js +1 -23
- package/dist/evals.js +6 -134
- package/dist/evidence-pack.js +0 -29
- package/dist/evidence-pair.js +0 -17
- package/dist/evidence.js +4 -280
- package/dist/exec.js +19 -404
- package/dist/exhaustion.js +0 -30
- package/dist/export-ui.js +0 -7
- package/dist/export.js +1 -38
- package/dist/failing-first.js +0 -6
- package/dist/fallback-schema.js +0 -5
- package/dist/fallback.js +0 -81
- package/dist/fast-start.js +0 -97
- package/dist/fast-terms.js +0 -3
- package/dist/fenced-check-coverage.js +0 -11
- package/dist/findings.js +1 -63
- package/dist/first-run.js +4 -57
- package/dist/first-tasks-child.js +0 -5
- package/dist/flaky-ci.js +1 -24
- package/dist/flaky-cli.js +0 -4
- package/dist/flaky.js +0 -43
- package/dist/fleet-schema.js +0 -11
- package/dist/flow-actions.js +0 -31
- package/dist/flow-browser.js +0 -42
- package/dist/flow-cadence.js +1 -24
- package/dist/flow-card-task.js +0 -11
- package/dist/flow-changed.js +0 -16
- package/dist/flow-code.js +1 -45
- package/dist/flow-draft.js +0 -17
- package/dist/flow-engine.js +2 -76
- package/dist/flow-gallery-ui.js +0 -28
- package/dist/flow-gallery.js +0 -54
- package/dist/flow-insights.js +0 -12
- package/dist/flow-items.js +0 -27
- package/dist/flow-live.js +0 -31
- package/dist/flow-people.js +0 -14
- package/dist/flow-pull-request.js +0 -32
- package/dist/flow-replies.js +0 -9
- package/dist/flow-result-card.js +0 -8
- package/dist/flow-schedule.js +0 -74
- package/dist/flow-scripts.js +0 -13
- package/dist/flow-secrets.js +0 -10
- package/dist/flow-send.js +0 -45
- package/dist/flow-share.js +0 -60
- package/dist/flow-sort.js +1 -24
- package/dist/flow-starters-ui.js +0 -2
- package/dist/flow-starters.js +0 -13
- package/dist/flow-steps.js +0 -80
- package/dist/flow-triggers.js +2 -256
- package/dist/flow-unattended-words.js +0 -13
- package/dist/flow-unattended.js +2 -115
- package/dist/flows-cli.js +2 -36
- package/dist/flows-ui.js +0 -51
- package/dist/flows.js +0 -158
- package/dist/folder-gate.js +0 -21
- package/dist/folder-look.js +0 -42
- package/dist/follow-through-brief.js +0 -6
- package/dist/follow-through-cli.js +0 -5
- package/dist/fonts.js +0 -13
- package/dist/gaps.js +0 -20
- package/dist/gate-failure.js +0 -7
- package/dist/git-floor.js +0 -12
- package/dist/git-incident.js +2 -38
- package/dist/git-views.js +0 -24
- package/dist/git.js +0 -31
- package/dist/github-import.js +0 -22
- package/dist/github-jobs.js +0 -12
- package/dist/google-mail.js +2 -27
- package/dist/grant.js +0 -110
- package/dist/graph.js +0 -108
- package/dist/guides.js +4 -15
- package/dist/handover-note.js +0 -12
- package/dist/health-cli.js +0 -2
- package/dist/home-groups.js +0 -15
- package/dist/html.js +0 -54
- package/dist/install-method.js +0 -12
- package/dist/integrations-ui.js +0 -15
- package/dist/integrations.js +7 -50
- package/dist/invoke.js +1 -381
- package/dist/is-record.js +0 -1
- package/dist/issues.js +0 -48
- package/dist/jsonl-discriminants.js +0 -6
- package/dist/keymap.js +2 -16
- package/dist/keys.js +0 -56
- package/dist/kits-ui.js +0 -3
- package/dist/kits.js +1 -24
- package/dist/knowledge-cli.js +0 -4
- package/dist/knowledge-ui.js +0 -8
- package/dist/landed-cleanup.js +0 -119
- package/dist/laptop-background.js +0 -85
- package/dist/laptop-service.js +0 -67
- package/dist/latency-timeline.js +2 -23
- package/dist/lead-about.js +0 -7
- package/dist/lead-answer-eval.js +0 -39
- package/dist/lead-capabilities.js +0 -19
- package/dist/lead-cli-live.js +0 -22
- package/dist/lead-cli.js +0 -27
- package/dist/lead-commitments.js +1 -27
- package/dist/lead-context.js +2 -42
- package/dist/lead-contract.js +0 -8
- package/dist/lead-doors.js +0 -105
- package/dist/lead-follow.js +0 -41
- package/dist/lead-identity.js +1 -4
- package/dist/lead-latency-schema.js +0 -13
- package/dist/lead-people.js +3 -18
- package/dist/lead-progress.js +0 -12
- package/dist/lead-queue-runtime.js +0 -26
- package/dist/lead-queue.js +0 -35
- package/dist/lead-route.js +0 -33
- package/dist/lead-status.js +0 -37
- package/dist/lead-sweep.js +0 -18
- package/dist/lead-tools.js +0 -160
- package/dist/lead-voice.js +0 -54
- package/dist/lead.js +2 -105
- package/dist/learning-child.js +0 -6
- package/dist/learning-look.js +0 -14
- package/dist/ledger-chain.js +0 -34
- package/dist/ledger-csv.js +0 -2
- package/dist/ledger-view.js +0 -3
- package/dist/lesson-notes.js +0 -56
- package/dist/limits-ui.js +0 -14
- package/dist/link.js +0 -79
- package/dist/live-backup.js +3 -33
- package/dist/live-bus.js +7 -81
- package/dist/live-children-read.js +4 -47
- package/dist/live-children.js +4 -44
- package/dist/live-detail.js +0 -17
- package/dist/live-input.js +5 -68
- package/dist/live-main-read.js +1 -14
- package/dist/live-notes.js +0 -12
- package/dist/live-open.js +1 -23
- package/dist/live-records.js +4 -151
- package/dist/live-reply.js +1 -51
- package/dist/live-terminal.js +12 -111
- package/dist/live.js +4 -130
- package/dist/local-owner-acts.js +168 -0
- package/dist/local-owner.js +15 -80
- package/dist/log.js +0 -8
- package/dist/login-secrets.js +2 -38
- package/dist/machine-check.js +0 -2
- package/dist/machine-identity.js +1 -46
- package/dist/mailbox.js +0 -30
- package/dist/maintenance.js +1 -3
- package/dist/mcp-connect.js +0 -88
- package/dist/mcp-core.js +0 -45
- package/dist/mcp-http.js +0 -13
- package/dist/mcp-oauth.js +0 -37
- package/dist/mcp-person.js +0 -11
- package/dist/mcp.js +3 -73
- package/dist/memory-cli.js +0 -3
- package/dist/memory-pass.js +0 -53
- package/dist/memory-tidy.js +0 -55
- package/dist/memory-use.js +2 -24
- package/dist/merge-checklist.js +21 -29
- package/dist/metrics.js +0 -10
- package/dist/mobile-viewport.js +0 -6
- package/dist/model-catalog.js +1 -33
- package/dist/model-choices.js +9 -84
- package/dist/model-names.js +0 -9
- package/dist/models-cli.js +0 -13
- package/dist/models-ui.js +0 -17
- package/dist/modes.js +0 -35
- package/dist/monitoring-settings.js +2 -27
- package/dist/monitoring-ui.js +2 -14
- package/dist/monitoring.js +2 -38
- package/dist/names.js +0 -39
- package/dist/needs-you.js +7 -70
- package/dist/never-index.js +0 -9
- package/dist/nightly-check.js +0 -74
- package/dist/nightly-github.js +0 -168
- package/dist/notification-delivery.js +0 -3
- package/dist/notification-rows.js +0 -17
- package/dist/oauth-run-token.js +1 -37
- package/dist/observations.js +0 -16
- package/dist/oidc.js +1 -20
- package/dist/onboard.js +4 -57
- package/dist/one-step-chat-schema.js +0 -15
- package/dist/openrouter-models.js +0 -6
- package/dist/operate-remote-arguments.js +2 -17
- package/dist/operate-remote.js +0 -33
- package/dist/operate.js +280 -2304
- package/dist/orphan-sweep.js +3 -37
- package/dist/page-work-contract.js +0 -3
- package/dist/password-bearer.js +1 -11
- package/dist/passwordless.js +0 -3
- package/dist/peek-cli.js +0 -46
- package/dist/peek.js +2 -61
- package/dist/people-audit-ui.js +0 -6
- package/dist/person-proof.js +0 -6
- package/dist/phase-routing.js +8 -183
- package/dist/plain-schema.js +0 -14
- package/dist/plain-words.js +18 -12
- package/dist/plan-auto.js +3 -18
- package/dist/plan-login.js +0 -16
- package/dist/plan.js +0 -68
- package/dist/plane-review.js +0 -56
- package/dist/planner-source.js +0 -96
- package/dist/planner.js +0 -117
- package/dist/policy-ui.js +0 -8
- package/dist/policy.js +0 -47
- package/dist/prepared-evidence.js +0 -5
- package/dist/principal.js +0 -29
- package/dist/probe.js +0 -30
- package/dist/process-custody.js +0 -15
- package/dist/process-liveness.js +0 -32
- package/dist/process-tree.js +3 -29
- package/dist/project-access.js +0 -10
- package/dist/project-admission.js +1 -41
- package/dist/project-cli.js +0 -6
- package/dist/project-concurrency.js +0 -35
- package/dist/project-delete-ui.js +4 -29
- package/dist/project-delete.js +1 -73
- package/dist/project-demo.js +0 -13
- package/dist/project-file.js +0 -2
- package/dist/project-identity.js +0 -41
- package/dist/project-knowledge.js +0 -39
- package/dist/project-learning.js +3 -55
- package/dist/project-memory.js +2 -45
- package/dist/project-outcomes.js +0 -6
- package/dist/project-sandbox.js +0 -23
- package/dist/project-skills.js +0 -12
- package/dist/project-tools.js +6 -184
- package/dist/project.js +0 -48
- package/dist/prompt.js +0 -31
- package/dist/proof.js +0 -220
- package/dist/proposal.js +0 -50
- package/dist/protected-storage-look.js +0 -6
- package/dist/protected-storage.js +1 -84
- package/dist/provider-auth.js +3 -69
- package/dist/provider-capture.js +1 -15
- package/dist/provider-connection.js +0 -8
- package/dist/provider-home.js +0 -25
- package/dist/provider-limits.js +0 -14
- package/dist/provider.js +0 -324
- package/dist/public-access.js +11 -30
- package/dist/public-check.js +0 -16
- package/dist/publish.js +1 -150
- package/dist/pull-request-flow.js +6 -74
- package/dist/pull-request-schema.js +0 -4
- package/dist/pull-request-ui.js +0 -5
- package/dist/pulls.js +0 -80
- package/dist/push.js +5 -89
- package/dist/quick-start.js +1 -23
- package/dist/read-executor-worker.js +0 -1
- package/dist/read-executor.js +0 -10
- package/dist/read-only-request.js +0 -7
- package/dist/recipe-ui.js +0 -6
- package/dist/recipes.js +0 -13
- package/dist/release-adapters.js +6 -214
- package/dist/release-approval.js +0 -74
- package/dist/release-authority.js +0 -42
- package/dist/release-auto.js +0 -142
- package/dist/release-card.js +26 -103
- package/dist/release-carry.js +0 -132
- package/dist/release-ci-hold.js +0 -20
- package/dist/release-cli.js +0 -46
- package/dist/release-coverage.js +0 -16
- package/dist/release-gate.js +0 -30
- package/dist/release-git.js +0 -24
- package/dist/release-links.js +0 -17
- package/dist/release-net.js +0 -42
- package/dist/release-next.js +0 -25
- package/dist/release-recheck.js +0 -89
- package/dist/release-refusal.js +0 -18
- package/dist/release-view.js +0 -5
- package/dist/release.js +7 -341
- package/dist/releases.js +0 -49
- package/dist/remote-audit.js +0 -25
- package/dist/remote-command.js +0 -16
- package/dist/remote-destination.js +5 -26
- package/dist/remote-exec.js +1 -27
- package/dist/remote-main.js +1 -53
- package/dist/remote-run.js +0 -5
- package/dist/remote.js +0 -49
- package/dist/render.js +0 -133
- package/dist/reply-shape.js +0 -85
- package/dist/reply-voice.js +0 -7
- package/dist/report-summary.js +0 -5
- package/dist/reported-usage.js +0 -30
- package/dist/repos.js +9 -62
- package/dist/repository-context.js +1 -24
- package/dist/request-budget-ui.js +0 -4
- package/dist/request-budget.js +0 -23
- package/dist/restart-certification.js +0 -37
- package/dist/result-actions.js +0 -62
- package/dist/result-acts.js +0 -34
- package/dist/result-completion.js +9 -28
- package/dist/result-evidence-readers.js +0 -3
- package/dist/result-follow-ups.js +1 -39
- package/dist/result-review.js +0 -86
- package/dist/result-shots.js +0 -39
- package/dist/retention-ui.js +0 -7
- package/dist/retention.js +2 -46
- package/dist/review-context.js +0 -129
- package/dist/review-evidence.js +0 -4
- package/dist/review-switch.js +1 -7
- package/dist/reviewer.js +0 -35
- package/dist/route-change-check.js +0 -2
- package/dist/route-change.js +0 -16
- package/dist/route-hooks.js +0 -27
- package/dist/route-results.js +2 -58
- package/dist/route-rules.js +1 -106
- package/dist/route-savings.js +0 -36
- package/dist/route-store.js +1 -133
- package/dist/run-closeout.js +2 -50
- package/dist/run-efficiency.js +2 -44
- package/dist/run-ending.js +0 -13
- package/dist/runner-process.js +0 -33
- package/dist/runner.js +17 -189
- package/dist/sample-project.js +2 -27
- package/dist/sandbox-launch.js +4 -25
- package/dist/sandbox-runtime.js +1 -88
- package/dist/scan.js +0 -27
- package/dist/scope.js +88 -566
- package/dist/scout-browser-lock.js +0 -6
- package/dist/scout-browser.js +2 -68
- package/dist/scout-net.js +1 -32
- package/dist/scout-report.js +0 -22
- package/dist/scout.js +1 -116
- package/dist/secret-mint.js +0 -6
- package/dist/serve.js +29 -564
- package/dist/server/agents-computers.js +0 -10
- package/dist/server/agents-live-filed.js +0 -13
- package/dist/server/agents-live-lead.js +0 -19
- package/dist/server/agents-live-room.js +0 -19
- package/dist/server/chat.js +2 -194
- package/dist/server/chrome.js +17 -263
- package/dist/server/console.css +4 -4
- package/dist/server/edge-refusal.js +0 -3
- package/dist/server/flows.js +5 -74
- package/dist/server/guards.js +9 -86
- package/dist/server/handler-registry.js +0 -2
- package/dist/server/home-asks.js +1 -22
- package/dist/server/home.js +1 -30
- package/dist/server/http.js +0 -82
- package/dist/server/in-place.js +0 -15
- package/dist/server/kit-standalone.js +0 -20
- package/dist/server/kit.js +2 -114
- package/dist/server/last-checks.js +0 -2
- package/dist/server/live.js +1 -36
- package/dist/server/merge-ready-view.js +0 -6
- package/dist/server/mutation-key.js +3 -40
- package/dist/server/pages-assets.js +0 -16
- package/dist/server/pages.js +7 -195
- package/dist/server/people-tokens.js +3 -101
- package/dist/server/remote-hooks.js +0 -13
- package/dist/server/remote.js +0 -28
- package/dist/server/render-chat.js +8 -144
- package/dist/server/render-code-map.js +0 -5
- package/dist/server/render-flaky.js +0 -8
- package/dist/server/render-follow-through.js +2 -5
- package/dist/server/render-history.js +2 -34
- package/dist/server/render-new-task.js +2 -29
- package/dist/server/render-pages.js +1 -111
- package/dist/server/render-people.js +2 -46
- package/dist/server/render-projects.js +15 -32
- package/dist/server/render-release.js +1 -14
- package/dist/server/render-results.js +4 -355
- package/dist/server/render-settings.js +0 -15
- package/dist/server/render-tasks.js +17 -497
- package/dist/server/request-context.js +2 -9
- package/dist/server/retired-routes.js +0 -11
- package/dist/server/route-policy.js +0 -3
- package/dist/server/route-table.js +8 -133
- package/dist/server/runtime.js +0 -1
- package/dist/server/session.js +0 -28
- package/dist/server/settings.js +40 -246
- package/dist/server/signup-gate.js +0 -11
- package/dist/server/sweeps.js +0 -6
- package/dist/server/task-views.js +12 -227
- package/dist/server/tasks.js +37 -531
- package/dist/server/terminals.js +2 -46
- package/dist/server/welcome.js +2 -22
- package/dist/server-telemetry.js +0 -9
- package/dist/settings-groups-ui.js +50 -63
- package/dist/settings-kit-script.js +0 -19
- package/dist/settings-kit.js +0 -63
- package/dist/settings-proofs.js +0 -23
- package/dist/setup-guide.js +1 -9
- package/dist/shared-deps.js +9 -84
- package/dist/sign-in-guard.js +0 -27
- package/dist/skills-ui.js +0 -2
- package/dist/skills.js +2 -54
- package/dist/slack-api.js +0 -3
- package/dist/slack-chat.js +0 -25
- package/dist/slack-settings.js +0 -1
- package/dist/slack-socket.js +0 -5
- package/dist/slack.js +0 -4
- package/dist/sleep.js +0 -1
- package/dist/source-key.js +0 -10
- package/dist/spend-report.js +0 -29
- package/dist/spend-ui.js +0 -26
- package/dist/spend.js +0 -40
- package/dist/sqlite-runtime.js +0 -2
- package/dist/sqlite-telemetry.js +0 -9
- package/dist/sso-settings.js +0 -13
- package/dist/sso-ui.js +0 -2
- package/dist/staged-runtimes.js +5 -39
- package/dist/steer-capabilities.js +1 -7
- package/dist/steer-controls.js +0 -10
- package/dist/steer-live.js +0 -31
- package/dist/steer-mailbox.js +4 -65
- package/dist/steer-status.js +0 -7
- package/dist/stop-proof.js +5 -62
- package/dist/storage-sweep-child.js +1 -5
- package/dist/storage-sweep-process.js +2 -20
- package/dist/storage-sweep-schedule.js +0 -32
- package/dist/storage-sweep.js +2 -51
- package/dist/storage-ui.js +0 -18
- package/dist/storage.js +0 -31
- package/dist/store-baseline.js +0 -14
- package/dist/store.js +109 -4763
- package/dist/stream-scope.js +0 -16
- package/dist/structured-output.js +0 -39
- package/dist/style-asset.js +0 -2
- package/dist/subagent-admin.js +0 -9
- package/dist/subagent-desk.js +0 -29
- package/dist/subagent-memory.js +0 -38
- package/dist/subagent-question.js +0 -29
- package/dist/subagent-tools.js +1 -60
- package/dist/subagent-week.js +0 -28
- package/dist/subagent-work.js +1 -39
- package/dist/subagents-ui.js +1 -13
- package/dist/subagents.js +0 -40
- package/dist/subscription-chat.js +1 -42
- package/dist/summary.js +0 -19
- package/dist/surface.js +8 -73
- package/dist/sweep-gate.js +0 -2
- package/dist/sweep-quarantine.js +2 -13
- package/dist/sync.js +0 -47
- package/dist/tailnet.js +0 -9
- package/dist/tamper-scan.js +0 -15
- package/dist/task-activity.js +1 -16
- package/dist/task-aliases.js +0 -3
- package/dist/task-archive.js +0 -7
- package/dist/task-base.js +0 -18
- package/dist/task-composer.js +0 -2
- package/dist/task-control.js +0 -74
- package/dist/task-live.js +0 -23
- package/dist/task-moves.js +0 -28
- package/dist/task-outcome-cli.js +66 -19
- package/dist/task-review-brief.js +0 -7
- package/dist/task-sizing.js +0 -47
- package/dist/task-source.js +0 -23
- package/dist/task-status.js +0 -106
- package/dist/task-text.js +0 -12
- package/dist/team-chat-authorization.js +0 -3
- package/dist/team-contract.js +0 -2
- package/dist/team-http.js +0 -4
- package/dist/team-leads.js +1 -16
- package/dist/team-runtime.js +0 -13
- package/dist/team-ui.js +0 -1
- package/dist/team-updates.js +0 -4
- package/dist/teams-api.js +0 -12
- package/dist/teams-chat.js +0 -28
- package/dist/teams.js +0 -12
- package/dist/teardown-git.js +6 -294
- package/dist/telegram-flow.js +0 -51
- package/dist/telegram-lead.js +2 -203
- package/dist/telegram-live.js +1 -42
- package/dist/telegram-progress.js +0 -18
- package/dist/telegram-settings.js +0 -7
- package/dist/telegram-status.js +0 -46
- package/dist/telegram-team.js +1 -33
- package/dist/telegram.js +6 -454
- package/dist/templates.js +0 -24
- package/dist/terminal-catalog.js +2 -20
- package/dist/terminal-text.js +0 -12
- package/dist/test-infra.js +0 -50
- package/dist/test-temp.js +3 -26
- package/dist/text-limits.js +0 -92
- package/dist/tidy.js +0 -76
- package/dist/tier-report.js +0 -2
- package/dist/token-notices.js +1 -9
- package/dist/tokens-cli.js +0 -13
- package/dist/tool-broker.js +2 -53
- package/dist/tool-launcher.js +0 -14
- package/dist/tool-secret-store.js +3 -125
- package/dist/toolroll-update-cli.js +0 -9
- package/dist/toolroll-update-ui.js +0 -14
- package/dist/toolroll-update.js +13 -252
- package/dist/tools-ui.js +0 -17
- package/dist/transitions-recipes.js +0 -2
- package/dist/tree-proof.js +0 -23
- package/dist/tui-contract.js +0 -8
- package/dist/tui-source.js +91 -40
- package/dist/tui.js +54 -54
- package/dist/typed-start.js +0 -27
- package/dist/unfenced-test-support.js +0 -5
- package/dist/up-processes.js +1 -40
- package/dist/up-role-child.js +1 -13
- package/dist/update-notice.js +0 -1
- package/dist/vanished-retry.js +0 -40
- package/dist/verification-evidence.js +0 -39
- package/dist/version.js +0 -1
- package/dist/wake-hub.js +0 -28
- package/dist/webhook-limits.js +0 -7
- package/dist/webhook-readers.js +0 -30
- package/dist/webhook-signing.js +0 -14
- package/dist/webhooks.js +0 -54
- package/dist/welcome-facts.js +2 -14
- package/dist/when-html.js +0 -27
- package/dist/work-index.js +26 -98
- package/dist/work-summary.js +2 -17
- package/dist/workspace-motion.js +0 -2
- package/dist/workspace-revision.js +1 -21
- package/dist/workspace-ui.js +15 -135
- package/dist/worktree-notices.js +0 -3
- package/dist/worktree.js +0 -308
- package/dist/writes-mode.js +0 -1
- package/dist/youiyoux-intake.js +4 -159
- package/package.json +5 -4
- package/dist/accent-colors.d.ts +0 -51
- package/dist/acp-agents.d.ts +0 -43
- package/dist/acp-attest.d.ts +0 -44
- package/dist/acp-check.d.ts +0 -37
- package/dist/acp-client.d.ts +0 -163
- package/dist/acp-inspect.d.ts +0 -23
- package/dist/action-ledger.d.ts +0 -27
- package/dist/activity-line.d.ts +0 -29
- package/dist/actor.d.ts +0 -11
- package/dist/agent-board.d.ts +0 -229
- package/dist/agent-fence.d.ts +0 -479
- package/dist/agent-onboard.d.ts +0 -158
- package/dist/agent-pulse.d.ts +0 -43
- package/dist/agent-state-words.d.ts +0 -19
- package/dist/agent-state.d.ts +0 -65
- package/dist/agent-turns.d.ts +0 -52
- package/dist/agentconfig.d.ts +0 -191
- package/dist/agents-board.d.ts +0 -145
- package/dist/agents-live.d.ts +0 -31
- package/dist/api-tokens.d.ts +0 -80
- package/dist/approval-authority.d.ts +0 -51
- package/dist/approval-password.d.ts +0 -31
- package/dist/approval-policy.d.ts +0 -69
- package/dist/approval-rules-ui.d.ts +0 -40
- package/dist/assignment-adapters.d.ts +0 -152
- package/dist/assignment-brief.d.ts +0 -83
- package/dist/assignment-delivery.d.ts +0 -86
- package/dist/assignment-presentation.d.ts +0 -37
- package/dist/assignment-status.d.ts +0 -71
- package/dist/assignment-ui.d.ts +0 -68
- package/dist/assignment.d.ts +0 -318
- package/dist/attest.d.ts +0 -59
- package/dist/audit-cli.d.ts +0 -17
- package/dist/backend.d.ts +0 -97
- package/dist/backup-ui.d.ts +0 -32
- package/dist/backup.d.ts +0 -92
- package/dist/batch-checks.d.ts +0 -15
- package/dist/batch-policy.d.ts +0 -23
- package/dist/beads.d.ts +0 -34
- package/dist/bin.d.ts +0 -2
- package/dist/board.d.ts +0 -134
- package/dist/boot-identity.d.ts +0 -64
- package/dist/bounded-spawn.d.ts +0 -57
- package/dist/brand-icons.d.ts +0 -168
- package/dist/brand-mark.d.ts +0 -28
- package/dist/brief-fence.d.ts +0 -9
- package/dist/browser-crew.d.ts +0 -12
- package/dist/browser-shell.d.ts +0 -9
- package/dist/browser-workspace.d.ts +0 -1972
- package/dist/budget-alerts.d.ts +0 -19
- package/dist/build-review.d.ts +0 -38
- package/dist/builder-restart.d.ts +0 -21
- package/dist/builder.d.ts +0 -409
- package/dist/canonical-json.d.ts +0 -14
- package/dist/capscan.d.ts +0 -35
- package/dist/card-catalog.d.ts +0 -209
- package/dist/card-cli.d.ts +0 -43
- package/dist/card-render.d.ts +0 -43
- package/dist/card-sources.d.ts +0 -68
- package/dist/chat-acceptance.d.ts +0 -74
- package/dist/chat-actions.d.ts +0 -460
- package/dist/chat-admission.d.ts +0 -19
- package/dist/chat-approval.d.ts +0 -58
- package/dist/chat-ask.d.ts +0 -32
- package/dist/chat-card-part.d.ts +0 -11
- package/dist/chat-card.d.ts +0 -46
- package/dist/chat-channel.d.ts +0 -126
- package/dist/chat-continuity.d.ts +0 -32
- package/dist/chat-controls.d.ts +0 -117
- package/dist/chat-core.d.ts +0 -177
- package/dist/chat-decide.d.ts +0 -269
- package/dist/chat-delivery-state.d.ts +0 -132
- package/dist/chat-delivery.d.ts +0 -71
- package/dist/chat-display.d.ts +0 -1
- package/dist/chat-evidence.d.ts +0 -123
- package/dist/chat-flow.d.ts +0 -70
- package/dist/chat-follow.d.ts +0 -20
- package/dist/chat-inbox.d.ts +0 -57
- package/dist/chat-live-schema.d.ts +0 -17
- package/dist/chat-live.d.ts +0 -161
- package/dist/chat-message-states.d.ts +0 -75
- package/dist/chat-messages.d.ts +0 -338
- package/dist/chat-migration.d.ts +0 -30
- package/dist/chat-polish.d.ts +0 -17
- package/dist/chat-quiet.d.ts +0 -40
- package/dist/chat-review.d.ts +0 -51
- package/dist/chat-rooms.d.ts +0 -123
- package/dist/chat-settings-page.d.ts +0 -43
- package/dist/chat-task-actions.d.ts +0 -59
- package/dist/chat-terms.d.ts +0 -29
- package/dist/chat-voice.d.ts +0 -69
- package/dist/chat-warmth.d.ts +0 -21
- package/dist/check-access.d.ts +0 -54
- package/dist/check-facts.d.ts +0 -126
- package/dist/check-failure.d.ts +0 -113
- package/dist/check-levels-ui.d.ts +0 -36
- package/dist/check-levels.d.ts +0 -70
- package/dist/check-load.d.ts +0 -85
- package/dist/check-only-standing.d.ts +0 -36
- package/dist/check-only.d.ts +0 -15
- package/dist/check-progress.d.ts +0 -78
- package/dist/check-repair.d.ts +0 -47
- package/dist/check-report.d.ts +0 -177
- package/dist/check-stamp.d.ts +0 -46
- package/dist/checkout-cleanup.d.ts +0 -157
- package/dist/checkout-proof.d.ts +0 -28
- package/dist/child-database.d.ts +0 -12
- package/dist/claim.d.ts +0 -627
- package/dist/claude-print.d.ts +0 -12
- package/dist/cli-fast.d.ts +0 -8
- package/dist/cli-help.d.ts +0 -8
- package/dist/cli-http.d.ts +0 -58
- package/dist/cli.d.ts +0 -149
- package/dist/code-extract.d.ts +0 -44
- package/dist/code-map-acts.d.ts +0 -24
- package/dist/code-map-admission.d.ts +0 -52
- package/dist/code-map-build.d.ts +0 -63
- package/dist/code-map-cli.d.ts +0 -153
- package/dist/code-map-main.d.ts +0 -1
- package/dist/code-map-read.d.ts +0 -106
- package/dist/code-map-report.d.ts +0 -37
- package/dist/code-map-shape.d.ts +0 -172
- package/dist/code-map-store.d.ts +0 -136
- package/dist/codex-limits.d.ts +0 -15
- package/dist/coding-context.d.ts +0 -18
- package/dist/coding-handoff.d.ts +0 -39
- package/dist/coding-provider.d.ts +0 -88
- package/dist/coding-shipping-ui.d.ts +0 -5
- package/dist/coding-types.d.ts +0 -16
- package/dist/coding-ui.d.ts +0 -19
- package/dist/coding-update.d.ts +0 -28
- package/dist/coding-workspace.d.ts +0 -141
- package/dist/commit-extract.d.ts +0 -135
- package/dist/connect-cli.d.ts +0 -34
- package/dist/console-chrome.d.ts +0 -41
- package/dist/console-instance.d.ts +0 -157
- package/dist/container-state.d.ts +0 -5
- package/dist/containment.d.ts +0 -205
- package/dist/contract-changes.d.ts +0 -52
- package/dist/contracts/acceptance-terms.d.ts +0 -14
- package/dist/contracts/chat-actions.d.ts +0 -465
- package/dist/contracts/chat-callback-rows.d.ts +0 -59
- package/dist/contracts/chat-card.d.ts +0 -91
- package/dist/contracts/chat-content.d.ts +0 -551
- package/dist/contracts/chat-tables.d.ts +0 -12
- package/dist/contracts/cli.d.ts +0 -987
- package/dist/contracts/coding-activity.d.ts +0 -64
- package/dist/contracts/coding-context.d.ts +0 -97
- package/dist/contracts/coding-handoff.d.ts +0 -44
- package/dist/contracts/coding-workspace.d.ts +0 -165
- package/dist/contracts/console-api.d.ts +0 -539
- package/dist/contracts/contract-test.d.ts +0 -45
- package/dist/contracts/contract.d.ts +0 -92
- package/dist/contracts/decision.d.ts +0 -45
- package/dist/contracts/diff-stat.d.ts +0 -58
- package/dist/contracts/discord-callback.d.ts +0 -45
- package/dist/contracts/flow-card.d.ts +0 -53
- package/dist/contracts/flow-propose.d.ts +0 -334
- package/dist/contracts/flow-send.d.ts +0 -245
- package/dist/contracts/flow.d.ts +0 -19565
- package/dist/contracts/gateway-tools.d.ts +0 -472
- package/dist/contracts/handoff.d.ts +0 -91
- package/dist/contracts/health.d.ts +0 -82
- package/dist/contracts/integration-metadata.d.ts +0 -100
- package/dist/contracts/lead-context.d.ts +0 -165
- package/dist/contracts/lead-tools.d.ts +0 -2312
- package/dist/contracts/mcp-oauth.d.ts +0 -53
- package/dist/contracts/memory-pass.d.ts +0 -157
- package/dist/contracts/model-catalog.d.ts +0 -21
- package/dist/contracts/observation-request.d.ts +0 -37
- package/dist/contracts/plan.d.ts +0 -58
- package/dist/contracts/project-knowledge.d.ts +0 -159
- package/dist/contracts/project-memory.d.ts +0 -119
- package/dist/contracts/project-skills.d.ts +0 -120
- package/dist/contracts/proof.d.ts +0 -136
- package/dist/contracts/provider.d.ts +0 -40
- package/dist/contracts/recipes.d.ts +0 -166
- package/dist/contracts/release-check.d.ts +0 -371
- package/dist/contracts/release-terms.d.ts +0 -107
- package/dist/contracts/retention.d.ts +0 -42
- package/dist/contracts/review-findings.d.ts +0 -46
- package/dist/contracts/route-results.d.ts +0 -121
- package/dist/contracts/route.d.ts +0 -897
- package/dist/contracts/scope.d.ts +0 -105
- package/dist/contracts/scout-report.d.ts +0 -234
- package/dist/contracts/slack-callback.d.ts +0 -43
- package/dist/contracts/sort-answer.d.ts +0 -83
- package/dist/contracts/stage-output.d.ts +0 -127
- package/dist/contracts/storage.d.ts +0 -37
- package/dist/contracts/store-json.d.ts +0 -313
- package/dist/contracts/subagent-turn.d.ts +0 -43
- package/dist/contracts/task-sizing.d.ts +0 -24
- package/dist/contracts/teams-callback.d.ts +0 -13
- package/dist/contracts/telegram-callback.d.ts +0 -120
- package/dist/contracts/trigger-payloads.d.ts +0 -389
- package/dist/contracts/update-journal.d.ts +0 -254
- package/dist/contracts/verification-receipt.d.ts +0 -200
- package/dist/contracts/verification-view.d.ts +0 -102
- package/dist/contracts/youiyoux-request.d.ts +0 -248
- package/dist/control-setup.d.ts +0 -44
- package/dist/control-ui.d.ts +0 -37
- package/dist/controller-service.d.ts +0 -1
- package/dist/controller-supervisor.d.ts +0 -38
- package/dist/converse.d.ts +0 -316
- package/dist/coordinator-proposals.d.ts +0 -29
- package/dist/coordinator.d.ts +0 -186
- package/dist/credentials-ui.d.ts +0 -33
- package/dist/daemon.d.ts +0 -226
- package/dist/database-reclaim.d.ts +0 -4
- package/dist/decision.d.ts +0 -119
- package/dist/demo-chat.d.ts +0 -32
- package/dist/demo.d.ts +0 -153
- package/dist/deploy-gate.d.ts +0 -20
- package/dist/deploy-lock.d.ts +0 -8
- package/dist/deploy-phase.d.ts +0 -37
- package/dist/deploy-rescue.d.ts +0 -42
- package/dist/deprecations.d.ts +0 -20
- package/dist/design/kit.d.ts +0 -216
- package/dist/desktop-access.d.ts +0 -28
- package/dist/desktop-bundle.d.ts +0 -16
- package/dist/desktop-host.d.ts +0 -54
- package/dist/desktop-update-gate.d.ts +0 -12
- package/dist/desktop-update-recovery.d.ts +0 -14
- package/dist/desktop-update.d.ts +0 -147
- package/dist/digest-times.d.ts +0 -3
- package/dist/disclosure.d.ts +0 -6
- package/dist/discord-api.d.ts +0 -24
- package/dist/discord-chat.d.ts +0 -27
- package/dist/discord-settings.d.ts +0 -4
- package/dist/discord.d.ts +0 -10
- package/dist/discover.d.ts +0 -75
- package/dist/dispatch.d.ts +0 -123
- package/dist/dispose.d.ts +0 -194
- package/dist/doctor.d.ts +0 -67
- package/dist/easy-start-args.d.ts +0 -13
- package/dist/easy-start.d.ts +0 -77
- package/dist/egress.d.ts +0 -121
- package/dist/email-settings.d.ts +0 -34
- package/dist/envelope.d.ts +0 -47
- package/dist/eval-gate.d.ts +0 -51
- package/dist/eval-hooks.d.ts +0 -94
- package/dist/eval-oracle-main.d.ts +0 -1
- package/dist/eval-oracle.d.ts +0 -60
- package/dist/eval-world.d.ts +0 -17
- package/dist/evals.d.ts +0 -299
- package/dist/evidence-pack.d.ts +0 -186
- package/dist/evidence-pair.d.ts +0 -53
- package/dist/evidence.d.ts +0 -371
- package/dist/exec.d.ts +0 -355
- package/dist/exhaustion.d.ts +0 -58
- package/dist/export-ui.d.ts +0 -11
- package/dist/export.d.ts +0 -48
- package/dist/failing-first.d.ts +0 -31
- package/dist/fallback-schema.d.ts +0 -8
- package/dist/fallback.d.ts +0 -138
- package/dist/fast-start.d.ts +0 -213
- package/dist/fast-terms.d.ts +0 -9
- package/dist/fenced-check-coverage.d.ts +0 -62
- package/dist/findings.d.ts +0 -224
- package/dist/first-run.d.ts +0 -197
- package/dist/first-tasks-child.d.ts +0 -1
- package/dist/flaky-ci.d.ts +0 -31
- package/dist/flaky-cli.d.ts +0 -60
- package/dist/flaky.d.ts +0 -83
- package/dist/fleet-schema.d.ts +0 -17
- package/dist/flow-actions.d.ts +0 -79
- package/dist/flow-browser.d.ts +0 -103
- package/dist/flow-cadence.d.ts +0 -48
- package/dist/flow-card-task.d.ts +0 -11
- package/dist/flow-changed.d.ts +0 -14
- package/dist/flow-code.d.ts +0 -84
- package/dist/flow-draft.d.ts +0 -42
- package/dist/flow-engine.d.ts +0 -82
- package/dist/flow-gallery-ui.d.ts +0 -73
- package/dist/flow-gallery.d.ts +0 -147
- package/dist/flow-insights.d.ts +0 -104
- package/dist/flow-items.d.ts +0 -37
- package/dist/flow-live.d.ts +0 -16
- package/dist/flow-people.d.ts +0 -23
- package/dist/flow-pull-request.d.ts +0 -14
- package/dist/flow-replies.d.ts +0 -48
- package/dist/flow-result-card.d.ts +0 -22
- package/dist/flow-schedule.d.ts +0 -154
- package/dist/flow-scripts.d.ts +0 -31
- package/dist/flow-secrets.d.ts +0 -13
- package/dist/flow-send.d.ts +0 -54
- package/dist/flow-share.d.ts +0 -78
- package/dist/flow-sort.d.ts +0 -63
- package/dist/flow-starters-ui.d.ts +0 -15
- package/dist/flow-starters.d.ts +0 -63
- package/dist/flow-steps.d.ts +0 -52
- package/dist/flow-triggers.d.ts +0 -303
- package/dist/flow-unattended-words.d.ts +0 -48
- package/dist/flow-unattended.d.ts +0 -259
- package/dist/flows-cli.d.ts +0 -358
- package/dist/flows-ui.d.ts +0 -70
- package/dist/flows.d.ts +0 -136
- package/dist/folder-gate.d.ts +0 -32
- package/dist/folder-look.d.ts +0 -110
- package/dist/follow-through-brief.d.ts +0 -12
- package/dist/follow-through-cli.d.ts +0 -23
- package/dist/fonts.d.ts +0 -19
- package/dist/gaps.d.ts +0 -35
- package/dist/gate-failure.d.ts +0 -40
- package/dist/git-floor.d.ts +0 -16
- package/dist/git-incident.d.ts +0 -65
- package/dist/git-views.d.ts +0 -20
- package/dist/git.d.ts +0 -54
- package/dist/github-import.d.ts +0 -62
- package/dist/github-jobs.d.ts +0 -25
- package/dist/google-mail.d.ts +0 -59
- package/dist/grant.d.ts +0 -136
- package/dist/graph.d.ts +0 -164
- package/dist/guides.d.ts +0 -22
- package/dist/handover-note.d.ts +0 -33
- package/dist/health-cli.d.ts +0 -3
- package/dist/home-groups.d.ts +0 -39
- package/dist/html.d.ts +0 -85
- package/dist/install-method.d.ts +0 -17
- package/dist/integrations-ui.d.ts +0 -17
- package/dist/integrations.d.ts +0 -138
- package/dist/invoke.d.ts +0 -228
- package/dist/is-record.d.ts +0 -2
- package/dist/issues.d.ts +0 -41
- package/dist/jsonl-discriminants.d.ts +0 -11
- package/dist/keymap.d.ts +0 -41
- package/dist/keys.d.ts +0 -108
- package/dist/kits-ui.d.ts +0 -16
- package/dist/kits.d.ts +0 -88
- package/dist/knowledge-cli.d.ts +0 -132
- package/dist/knowledge-ui.d.ts +0 -45
- package/dist/landed-cleanup.d.ts +0 -175
- package/dist/laptop-background.d.ts +0 -187
- package/dist/laptop-service.d.ts +0 -111
- package/dist/latency-timeline.d.ts +0 -46
- package/dist/lead-about.d.ts +0 -35
- package/dist/lead-answer-eval.d.ts +0 -93
- package/dist/lead-capabilities.d.ts +0 -57
- package/dist/lead-cli-live.d.ts +0 -56
- package/dist/lead-cli.d.ts +0 -58
- package/dist/lead-commitments.d.ts +0 -84
- package/dist/lead-context.d.ts +0 -45
- package/dist/lead-contract.d.ts +0 -10
- package/dist/lead-doors.d.ts +0 -122
- package/dist/lead-follow.d.ts +0 -26
- package/dist/lead-identity.d.ts +0 -23
- package/dist/lead-latency-schema.d.ts +0 -24
- package/dist/lead-people.d.ts +0 -55
- package/dist/lead-progress.d.ts +0 -67
- package/dist/lead-queue-runtime.d.ts +0 -46
- package/dist/lead-queue.d.ts +0 -104
- package/dist/lead-route.d.ts +0 -56
- package/dist/lead-status.d.ts +0 -116
- package/dist/lead-sweep.d.ts +0 -67
- package/dist/lead-tools.d.ts +0 -167
- package/dist/lead-voice.d.ts +0 -85
- package/dist/lead.d.ts +0 -142
- package/dist/learning-child.d.ts +0 -1
- package/dist/learning-look.d.ts +0 -25
- package/dist/ledger-chain.d.ts +0 -46
- package/dist/ledger-csv.d.ts +0 -4
- package/dist/ledger-view.d.ts +0 -27
- package/dist/lesson-notes.d.ts +0 -81
- package/dist/limits-ui.d.ts +0 -34
- package/dist/link.d.ts +0 -72
- package/dist/live-backup.d.ts +0 -39
- package/dist/live-bus.d.ts +0 -141
- package/dist/live-children-read.d.ts +0 -52
- package/dist/live-children.d.ts +0 -73
- package/dist/live-detail.d.ts +0 -27
- package/dist/live-input.d.ts +0 -68
- package/dist/live-main-read.d.ts +0 -19
- package/dist/live-notes.d.ts +0 -20
- package/dist/live-open.d.ts +0 -28
- package/dist/live-records.d.ts +0 -149
- package/dist/live-reply.d.ts +0 -83
- package/dist/live-terminal.d.ts +0 -273
- package/dist/live.d.ts +0 -152
- package/dist/local-owner.d.ts +0 -124
- package/dist/log.d.ts +0 -7
- package/dist/login-secrets.d.ts +0 -60
- package/dist/machine-check.d.ts +0 -16
- package/dist/machine-identity.d.ts +0 -75
- package/dist/mailbox.d.ts +0 -57
- package/dist/maintenance.d.ts +0 -13
- package/dist/mcp-connect.d.ts +0 -181
- package/dist/mcp-core.d.ts +0 -110
- package/dist/mcp-http.d.ts +0 -32
- package/dist/mcp-oauth.d.ts +0 -92
- package/dist/mcp-person.d.ts +0 -22
- package/dist/mcp.d.ts +0 -20
- package/dist/memory-cli.d.ts +0 -768
- package/dist/memory-pass.d.ts +0 -151
- package/dist/memory-tidy.d.ts +0 -181
- package/dist/memory-use.d.ts +0 -35
- package/dist/merge-checklist.d.ts +0 -55
- package/dist/metrics.d.ts +0 -6
- package/dist/mobile-viewport.d.ts +0 -7
- package/dist/model-catalog.d.ts +0 -123
- package/dist/model-choices.d.ts +0 -235
- package/dist/model-names.d.ts +0 -6
- package/dist/models-cli.d.ts +0 -307
- package/dist/models-ui.d.ts +0 -161
- package/dist/modes.d.ts +0 -99
- package/dist/monitoring-settings.d.ts +0 -44
- package/dist/monitoring-ui.d.ts +0 -23
- package/dist/monitoring.d.ts +0 -34
- package/dist/names.d.ts +0 -67
- package/dist/needs-you.d.ts +0 -164
- package/dist/never-index.d.ts +0 -3
- package/dist/nightly-check.d.ts +0 -107
- package/dist/nightly-github.d.ts +0 -318
- package/dist/notification-delivery.d.ts +0 -19
- package/dist/notification-rows.d.ts +0 -30
- package/dist/oauth-run-token.d.ts +0 -51
- package/dist/observations.d.ts +0 -36
- package/dist/oidc.d.ts +0 -71
- package/dist/onboard.d.ts +0 -108
- package/dist/one-step-chat-schema.d.ts +0 -22
- package/dist/openrouter-models.d.ts +0 -34
- package/dist/operate-remote-arguments.d.ts +0 -36
- package/dist/operate-remote.d.ts +0 -98
- package/dist/operate.d.ts +0 -401
- package/dist/orphan-sweep.d.ts +0 -65
- package/dist/page-work-contract.d.ts +0 -21
- package/dist/password-bearer.d.ts +0 -25
- package/dist/passwordless.d.ts +0 -23
- package/dist/peek-cli.d.ts +0 -112
- package/dist/peek.d.ts +0 -110
- package/dist/people-audit-ui.d.ts +0 -16
- package/dist/person-proof.d.ts +0 -2
- package/dist/phase-routing.d.ts +0 -401
- package/dist/plain-schema.d.ts +0 -23
- package/dist/plain-words.d.ts +0 -20
- package/dist/plan-auto.d.ts +0 -25
- package/dist/plan-login.d.ts +0 -14
- package/dist/plan.d.ts +0 -188
- package/dist/plane-review.d.ts +0 -54
- package/dist/planner-source.d.ts +0 -225
- package/dist/planner.d.ts +0 -76
- package/dist/policy-ui.d.ts +0 -22
- package/dist/policy.d.ts +0 -92
- package/dist/prepared-evidence.d.ts +0 -17
- package/dist/principal.d.ts +0 -42
- package/dist/probe.d.ts +0 -46
- package/dist/process-custody.d.ts +0 -17
- package/dist/process-liveness.d.ts +0 -13
- package/dist/process-tree.d.ts +0 -39
- package/dist/project-access.d.ts +0 -17
- package/dist/project-activity.d.ts +0 -20
- package/dist/project-admission.d.ts +0 -105
- package/dist/project-cli.d.ts +0 -19
- package/dist/project-concurrency.d.ts +0 -62
- package/dist/project-delete-ui.d.ts +0 -96
- package/dist/project-delete.d.ts +0 -59
- package/dist/project-demo.d.ts +0 -12
- package/dist/project-file.d.ts +0 -3
- package/dist/project-identity.d.ts +0 -52
- package/dist/project-knowledge.d.ts +0 -124
- package/dist/project-learning.d.ts +0 -120
- package/dist/project-memory.d.ts +0 -70
- package/dist/project-outcomes.d.ts +0 -119
- package/dist/project-sandbox.d.ts +0 -59
- package/dist/project-skills.d.ts +0 -139
- package/dist/project-tools.d.ts +0 -318
- package/dist/project.d.ts +0 -65
- package/dist/prompt.d.ts +0 -33
- package/dist/proof.d.ts +0 -457
- package/dist/proposal.d.ts +0 -70
- package/dist/protected-storage-look.d.ts +0 -1
- package/dist/protected-storage.d.ts +0 -98
- package/dist/provider-auth.d.ts +0 -143
- package/dist/provider-capture.d.ts +0 -34
- package/dist/provider-connection.d.ts +0 -23
- package/dist/provider-home.d.ts +0 -22
- package/dist/provider-limits.d.ts +0 -37
- package/dist/provider.d.ts +0 -369
- package/dist/public-access.d.ts +0 -52
- package/dist/public-check.d.ts +0 -37
- package/dist/publish.d.ts +0 -146
- package/dist/pull-request-flow.d.ts +0 -189
- package/dist/pull-request-schema.d.ts +0 -5
- package/dist/pull-request-ui.d.ts +0 -25
- package/dist/pulls.d.ts +0 -121
- package/dist/push.d.ts +0 -120
- package/dist/quality.d.ts +0 -8
- package/dist/quick-start.d.ts +0 -26
- package/dist/read-executor-worker.d.ts +0 -1
- package/dist/read-executor.d.ts +0 -66
- package/dist/read-only-request.d.ts +0 -4
- package/dist/recipe-ui.d.ts +0 -21
- package/dist/recipes.d.ts +0 -56
- package/dist/release-adapters.d.ts +0 -205
- package/dist/release-approval.d.ts +0 -180
- package/dist/release-authority.d.ts +0 -173
- package/dist/release-auto.d.ts +0 -184
- package/dist/release-card.d.ts +0 -156
- package/dist/release-carry.d.ts +0 -261
- package/dist/release-ci-hold.d.ts +0 -41
- package/dist/release-cli.d.ts +0 -34
- package/dist/release-coverage.d.ts +0 -16
- package/dist/release-gate.d.ts +0 -84
- package/dist/release-git.d.ts +0 -43
- package/dist/release-links.d.ts +0 -29
- package/dist/release-net.d.ts +0 -90
- package/dist/release-next.d.ts +0 -48
- package/dist/release-recheck.d.ts +0 -146
- package/dist/release-refusal.d.ts +0 -32
- package/dist/release-view.d.ts +0 -37
- package/dist/release.d.ts +0 -806
- package/dist/releases.d.ts +0 -94
- package/dist/remote-audit.d.ts +0 -79
- package/dist/remote-command.d.ts +0 -45
- package/dist/remote-destination.d.ts +0 -36
- package/dist/remote-exec.d.ts +0 -38
- package/dist/remote-main.d.ts +0 -111
- package/dist/remote-run.d.ts +0 -20
- package/dist/remote.d.ts +0 -67
- package/dist/render.d.ts +0 -64
- package/dist/reply-shape.d.ts +0 -106
- package/dist/reply-voice.d.ts +0 -23
- package/dist/report-summary.d.ts +0 -22
- package/dist/reported-usage.d.ts +0 -69
- package/dist/repos.d.ts +0 -67
- package/dist/repository-context-ui.d.ts +0 -3
- package/dist/repository-context.d.ts +0 -66
- package/dist/request-budget-ui.d.ts +0 -14
- package/dist/request-budget.d.ts +0 -127
- package/dist/restart-certification.d.ts +0 -133
- package/dist/result-actions.d.ts +0 -36
- package/dist/result-acts.d.ts +0 -112
- package/dist/result-completion.d.ts +0 -35
- package/dist/result-evidence-readers.d.ts +0 -42
- package/dist/result-follow-ups.d.ts +0 -118
- package/dist/result-review.d.ts +0 -220
- package/dist/result-shots.d.ts +0 -59
- package/dist/retention-ui.d.ts +0 -21
- package/dist/retention.d.ts +0 -77
- package/dist/review-context.d.ts +0 -245
- package/dist/review-evidence.d.ts +0 -33
- package/dist/review-switch.d.ts +0 -36
- package/dist/reviewer.d.ts +0 -99
- package/dist/route-change-check.d.ts +0 -4
- package/dist/route-change.d.ts +0 -22
- package/dist/route-hooks.d.ts +0 -54
- package/dist/route-results.d.ts +0 -75
- package/dist/route-rules.d.ts +0 -324
- package/dist/route-savings.d.ts +0 -136
- package/dist/route-store.d.ts +0 -300
- package/dist/run-closeout.d.ts +0 -89
- package/dist/run-efficiency.d.ts +0 -74
- package/dist/run-ending.d.ts +0 -21
- package/dist/runner-process.d.ts +0 -76
- package/dist/runner.d.ts +0 -324
- package/dist/sample-project.d.ts +0 -31
- package/dist/sandbox-launch.d.ts +0 -1
- package/dist/sandbox-runtime.d.ts +0 -128
- package/dist/scan.d.ts +0 -32
- package/dist/scope.d.ts +0 -1067
- package/dist/scout-browser-lock.d.ts +0 -69
- package/dist/scout-browser.d.ts +0 -107
- package/dist/scout-net.d.ts +0 -25
- package/dist/scout-report.d.ts +0 -23
- package/dist/scout.d.ts +0 -142
- package/dist/secret-mint.d.ts +0 -1
- package/dist/serve.d.ts +0 -11
- package/dist/server/agents-computers.d.ts +0 -9
- package/dist/server/agents-live-filed.d.ts +0 -17
- package/dist/server/agents-live-lead.d.ts +0 -47
- package/dist/server/agents-live-room.d.ts +0 -23
- package/dist/server/chat.d.ts +0 -39
- package/dist/server/chrome.d.ts +0 -328
- package/dist/server/edge-refusal.d.ts +0 -7
- package/dist/server/flows.d.ts +0 -8
- package/dist/server/guards.d.ts +0 -80
- package/dist/server/handler-context.d.ts +0 -22
- package/dist/server/handler-registry.d.ts +0 -23
- package/dist/server/home-asks.d.ts +0 -45
- package/dist/server/home.d.ts +0 -65
- package/dist/server/http.d.ts +0 -337
- package/dist/server/in-place.d.ts +0 -15
- package/dist/server/kit-standalone.d.ts +0 -22
- package/dist/server/kit.d.ts +0 -452
- package/dist/server/last-checks.d.ts +0 -17
- package/dist/server/live.d.ts +0 -74
- package/dist/server/merge-ready-view.d.ts +0 -10
- package/dist/server/mutation-key.d.ts +0 -70
- package/dist/server/pages-assets.d.ts +0 -11
- package/dist/server/pages.d.ts +0 -8
- package/dist/server/people-tokens.d.ts +0 -18
- package/dist/server/remote-hooks.d.ts +0 -29
- package/dist/server/remote.d.ts +0 -59
- package/dist/server/render-chat.d.ts +0 -439
- package/dist/server/render-code-map.d.ts +0 -30
- package/dist/server/render-flaky.d.ts +0 -20
- package/dist/server/render-follow-through.d.ts +0 -11
- package/dist/server/render-history.d.ts +0 -51
- package/dist/server/render-new-task.d.ts +0 -54
- package/dist/server/render-pages.d.ts +0 -236
- package/dist/server/render-people.d.ts +0 -102
- package/dist/server/render-projects.d.ts +0 -104
- package/dist/server/render-release.d.ts +0 -19
- package/dist/server/render-results.d.ts +0 -754
- package/dist/server/render-settings.d.ts +0 -93
- package/dist/server/render-tasks.d.ts +0 -774
- package/dist/server/request-context.d.ts +0 -78
- package/dist/server/retired-routes.d.ts +0 -17
- package/dist/server/route-policy.d.ts +0 -18
- package/dist/server/route-table.d.ts +0 -114
- package/dist/server/runtime.d.ts +0 -342
- package/dist/server/session.d.ts +0 -192
- package/dist/server/settings.d.ts +0 -76
- package/dist/server/signup-gate.d.ts +0 -9
- package/dist/server/sweeps.d.ts +0 -4
- package/dist/server/task-views.d.ts +0 -98
- package/dist/server/tasks.d.ts +0 -83
- package/dist/server/terminals.d.ts +0 -31
- package/dist/server/welcome.d.ts +0 -28
- package/dist/server-telemetry.d.ts +0 -87
- package/dist/settings-groups-ui.d.ts +0 -286
- package/dist/settings-kit-script.d.ts +0 -21
- package/dist/settings-kit.d.ts +0 -173
- package/dist/settings-proofs.d.ts +0 -64
- package/dist/setup-guide.d.ts +0 -39
- package/dist/shared-deps.d.ts +0 -115
- package/dist/sign-in-guard.d.ts +0 -70
- package/dist/skills-ui.d.ts +0 -12
- package/dist/skills.d.ts +0 -99
- package/dist/slack-api.d.ts +0 -59
- package/dist/slack-chat.d.ts +0 -37
- package/dist/slack-settings.d.ts +0 -4
- package/dist/slack-socket.d.ts +0 -12
- package/dist/slack.d.ts +0 -6
- package/dist/sleep.d.ts +0 -2
- package/dist/source-key.d.ts +0 -2
- package/dist/spend-report.d.ts +0 -87
- package/dist/spend-ui.d.ts +0 -80
- package/dist/spend.d.ts +0 -142
- package/dist/sqlite-runtime.d.ts +0 -3
- package/dist/sqlite-telemetry.d.ts +0 -9
- package/dist/sso-settings.d.ts +0 -33
- package/dist/sso-ui.d.ts +0 -26
- package/dist/staged-runtimes.d.ts +0 -54
- package/dist/steer-capabilities.d.ts +0 -32
- package/dist/steer-controls.d.ts +0 -14
- package/dist/steer-live.d.ts +0 -19
- package/dist/steer-mailbox.d.ts +0 -46
- package/dist/steer-status.d.ts +0 -25
- package/dist/stop-proof.d.ts +0 -67
- package/dist/storage-sweep-child.d.ts +0 -1
- package/dist/storage-sweep-process.d.ts +0 -55
- package/dist/storage-sweep-schedule.d.ts +0 -30
- package/dist/storage-sweep.d.ts +0 -77
- package/dist/storage-ui.d.ts +0 -23
- package/dist/storage.d.ts +0 -68
- package/dist/store-baseline.d.ts +0 -19
- package/dist/store.d.ts +0 -8613
- package/dist/stream-scope.d.ts +0 -18
- package/dist/structured-output.d.ts +0 -57
- package/dist/style-asset.d.ts +0 -7
- package/dist/subagent-admin.d.ts +0 -53
- package/dist/subagent-desk.d.ts +0 -59
- package/dist/subagent-memory.d.ts +0 -65
- package/dist/subagent-question.d.ts +0 -59
- package/dist/subagent-tools.d.ts +0 -125
- package/dist/subagent-week.d.ts +0 -68
- package/dist/subagent-work.d.ts +0 -76
- package/dist/subagents-ui.d.ts +0 -22
- package/dist/subagents.d.ts +0 -146
- package/dist/subscription-chat.d.ts +0 -54
- package/dist/summary.d.ts +0 -33
- package/dist/surface.d.ts +0 -49
- package/dist/sweep-gate.d.ts +0 -10
- package/dist/sweep-quarantine.d.ts +0 -29
- package/dist/sync.d.ts +0 -94
- package/dist/tailnet.d.ts +0 -11
- package/dist/tamper-scan.d.ts +0 -4
- package/dist/task-activity.d.ts +0 -27
- package/dist/task-aliases.d.ts +0 -5
- package/dist/task-archive.d.ts +0 -13
- package/dist/task-base.d.ts +0 -39
- package/dist/task-composer.d.ts +0 -14
- package/dist/task-control.d.ts +0 -159
- package/dist/task-live.d.ts +0 -8
- package/dist/task-moves.d.ts +0 -90
- package/dist/task-outcome-cli.d.ts +0 -30
- package/dist/task-review-brief.d.ts +0 -69
- package/dist/task-sizing.d.ts +0 -58
- package/dist/task-source.d.ts +0 -77
- package/dist/task-status.d.ts +0 -324
- package/dist/task-text.d.ts +0 -31
- package/dist/team-chat-authorization.d.ts +0 -11
- package/dist/team-contract.d.ts +0 -103
- package/dist/team-http.d.ts +0 -25
- package/dist/team-leads.d.ts +0 -85
- package/dist/team-runtime.d.ts +0 -25
- package/dist/team-ui.d.ts +0 -4
- package/dist/team-updates.d.ts +0 -8
- package/dist/teams-api.d.ts +0 -33
- package/dist/teams-chat.d.ts +0 -36
- package/dist/teams-settings.d.ts +0 -14
- package/dist/teams.d.ts +0 -24
- package/dist/teardown-git.d.ts +0 -164
- package/dist/telegram-flow.d.ts +0 -112
- package/dist/telegram-lead.d.ts +0 -151
- package/dist/telegram-live.d.ts +0 -116
- package/dist/telegram-progress.d.ts +0 -20
- package/dist/telegram-settings.d.ts +0 -9
- package/dist/telegram-status.d.ts +0 -83
- package/dist/telegram-team.d.ts +0 -68
- package/dist/telegram.d.ts +0 -271
- package/dist/templates.d.ts +0 -69
- package/dist/terminal-catalog.d.ts +0 -11
- package/dist/terminal-text.d.ts +0 -11
- package/dist/test-infra.d.ts +0 -34
- package/dist/test-temp.d.ts +0 -40
- package/dist/text-limits.d.ts +0 -297
- package/dist/tidy.d.ts +0 -130
- package/dist/tier-report.d.ts +0 -44
- package/dist/token-notices.d.ts +0 -11
- package/dist/tokens-cli.d.ts +0 -21
- package/dist/tool-broker.d.ts +0 -52
- package/dist/tool-launcher.d.ts +0 -1
- package/dist/tool-secret-store.d.ts +0 -167
- package/dist/toolroll-update-cli.d.ts +0 -15
- package/dist/toolroll-update-ui.d.ts +0 -47
- package/dist/toolroll-update.d.ts +0 -265
- package/dist/tools-ui.d.ts +0 -51
- package/dist/transitions-recipes.d.ts +0 -1
- package/dist/tree-proof.d.ts +0 -34
- package/dist/tui-contract.d.ts +0 -144
- package/dist/tui-source.d.ts +0 -14
- package/dist/typed-start.d.ts +0 -51
- package/dist/unfenced-test-support.d.ts +0 -2
- package/dist/up-processes.d.ts +0 -162
- package/dist/up-role-child.d.ts +0 -1
- package/dist/update-notice.d.ts +0 -5
- package/dist/vanished-retry.d.ts +0 -30
- package/dist/verification-evidence.d.ts +0 -68
- package/dist/version.d.ts +0 -2
- package/dist/wake-hub.d.ts +0 -72
- package/dist/webhook-limits.d.ts +0 -23
- package/dist/webhook-readers.d.ts +0 -56
- package/dist/webhook-signing.d.ts +0 -27
- package/dist/webhooks.d.ts +0 -84
- package/dist/welcome-facts.d.ts +0 -18
- package/dist/when-html.d.ts +0 -40
- package/dist/work-index.d.ts +0 -175
- package/dist/work-summary.d.ts +0 -61
- package/dist/workspace-motion.d.ts +0 -4
- package/dist/workspace-revision.d.ts +0 -48
- package/dist/workspace-ui.d.ts +0 -385
- package/dist/worktree-notices.d.ts +0 -13
- package/dist/worktree.d.ts +0 -365
- package/dist/writes-mode.d.ts +0 -9
- package/dist/youiyoux-intake.d.ts +0 -234
package/dist/browser/terminal.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*! Third-party notices: /assets/THIRD_PARTY_NOTICES.txt */
|
|
2
|
-
var N2=Object.create;var u_=Object.defineProperty;var B2=Object.getOwnPropertyDescriptor;var O2=Object.getOwnPropertyNames;var z2=Object.getPrototypeOf,H2=Object.prototype.hasOwnProperty;var Yi=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(i){throw t=0,i}};var U2=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of O2(t))!H2.call(e,r)&&r!==i&&u_(e,r,{get:()=>t[r],enumerable:!(s=B2(t,r))||s.enumerable});return e};var H=(e,t,i)=>(i=e!=null?N2(z2(e)):{},U2(t||!e||!e.__esModule?u_(i,"default",{value:e,enumerable:!0}):i,e));var x_=Yi(j=>{"use strict";var Uu=Symbol.for("react.transitional.element"),P2=Symbol.for("react.portal"),q2=Symbol.for("react.fragment"),I2=Symbol.for("react.strict_mode"),F2=Symbol.for("react.profiler"),$2=Symbol.for("react.consumer"),K2=Symbol.for("react.context"),W2=Symbol.for("react.forward_ref"),V2=Symbol.for("react.suspense"),j2=Symbol.for("react.memo"),m_=Symbol.for("react.lazy"),G2=Symbol.for("react.activity"),Y2=Symbol.for("react.view_transition"),d_=Symbol.iterator;function X2(e){return e===null||typeof e!="object"?null:(e=d_&&e[d_]||e["@@iterator"],typeof e=="function"?e:null)}var __={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v_=Object.assign,y_={};function On(e,t,i){this.props=e,this.context=t,this.refs=y_,this.updater=i||__}On.prototype.isReactComponent={};On.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};On.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function b_(){}b_.prototype=On.prototype;function Pu(e,t,i){this.props=e,this.context=t,this.refs=y_,this.updater=i||__}var qu=Pu.prototype=new b_;qu.constructor=Pu;v_(qu,On.prototype);qu.isPureReactComponent=!0;var f_=Array.isArray;function Hu(){}var ye={H:null,A:null,T:null,S:null},w_=Object.prototype.hasOwnProperty;function Iu(e,t,i){var s=i.ref;return{$$typeof:Uu,type:e,key:t,ref:s!==void 0?s:null,props:i}}function Z2(e,t){return Iu(e.type,t,e.props)}function Fu(e){return typeof e=="object"&&e!==null&&e.$$typeof===Uu}function Q2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(i){return t[i]})}var p_=/\/+/g;function zu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Q2(""+e.key):t.toString(36)}function J2(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Hu,Hu):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Bn(e,t,i,s,r){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(n){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Uu:case P2:o=!0;break;case m_:return o=e._init,Bn(o(e._payload),t,i,s,r)}}if(o)return r=r(e),o=s===""?"."+zu(e,0):s,f_(r)?(i="",o!=null&&(i=o.replace(p_,"$&/")+"/"),Bn(r,t,i,"",function(c){return c})):r!=null&&(Fu(r)&&(r=Z2(r,i+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(p_,"$&/")+"/")+o)),t.push(r)),1;o=0;var a=s===""?".":s+":";if(f_(e))for(var l=0;l<e.length;l++)s=e[l],n=a+zu(s,l),o+=Bn(s,t,i,n,r);else if(l=X2(e),typeof l=="function")for(e=l.call(e),l=0;!(s=e.next()).done;)s=s.value,n=a+zu(s,l++),o+=Bn(s,t,i,n,r);else if(n==="object"){if(typeof e.then=="function")return Bn(J2(e),t,i,s,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function Il(e,t,i){if(e==null)return e;var s=[],r=0;return Bn(e,s,"","",function(n){return t.call(i,n,r++)}),s}function e5(e){if(e._status===-1){var t=e._result,i=t();i.then(function(s){(e._status===0||e._status===-1)&&(e._status=1,e._result=s,i.status===void 0&&(i.status="fulfilled",i.value=s))},function(s){(e._status===0||e._status===-1)&&(e._status=2,e._result=s,i.status===void 0&&(i.status="rejected",i.reason=s))}),e._status===-1&&(e._status=0,e._result=i)}if(e._status===1)return e._result.default;throw e._result}var g_=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function S_(e){var t=ye.T,i={};i.types=t!==null?t.types:null,ye.T=i;try{var s=e(),r=ye.S;r!==null&&r(i,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Hu,g_)}catch(n){g_(n)}finally{t!==null&&i.types!==null&&(t.types=i.types),ye.T=t}}function k_(e){var t=ye.T;if(t!==null){var i=t.types;i===null?t.types=[e]:i.indexOf(e)===-1&&i.push(e)}else S_(k_.bind(null,e))}var t5={map:Il,forEach:function(e,t,i){Il(e,function(){t.apply(this,arguments)},i)},count:function(e){var t=0;return Il(e,function(){t++}),t},toArray:function(e){return Il(e,function(t){return t})||[]},only:function(e){if(!Fu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};j.Activity=G2;j.Children=t5;j.Component=On;j.Fragment=q2;j.Profiler=F2;j.PureComponent=Pu;j.StrictMode=I2;j.Suspense=V2;j.ViewTransition=Y2;j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ye;j.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ye.H.useMemoCache(e)}};j.addTransitionType=k_;j.cache=function(e){return function(){return e.apply(null,arguments)}};j.cacheSignal=function(){return null};j.cloneElement=function(e,t,i){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=v_({},e.props),r=e.key;if(t!=null)for(n in t.key!==void 0&&(r=""+t.key),t)!w_.call(t,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&t.ref===void 0||(s[n]=t[n]);var n=arguments.length-2;if(n===1)s.children=i;else if(1<n){for(var o=Array(n),a=0;a<n;a++)o[a]=arguments[a+2];s.children=o}return Iu(e.type,r,s)};j.createContext=function(e){return e={$$typeof:K2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:$2,_context:e},e};j.createElement=function(e,t,i){var s,r={},n=null;if(t!=null)for(s in t.key!==void 0&&(n=""+t.key),t)w_.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(r[s]=t[s]);var o=arguments.length-2;if(o===1)r.children=i;else if(1<o){for(var a=Array(o),l=0;l<o;l++)a[l]=arguments[l+2];r.children=a}if(e&&e.defaultProps)for(s in o=e.defaultProps,o)r[s]===void 0&&(r[s]=o[s]);return Iu(e,n,r)};j.createRef=function(){return{current:null}};j.forwardRef=function(e){return{$$typeof:W2,render:e}};j.isValidElement=Fu;j.lazy=function(e){return{$$typeof:m_,_payload:{_status:-1,_result:e},_init:e5}};j.memo=function(e,t){return{$$typeof:j2,type:e,compare:t===void 0?null:t}};j.startTransition=S_;j.unstable_useCacheRefresh=function(){return ye.H.useCacheRefresh()};j.use=function(e){return ye.H.use(e)};j.useActionState=function(e,t,i){return ye.H.useActionState(e,t,i)};j.useCallback=function(e,t){return ye.H.useCallback(e,t)};j.useContext=function(e){return ye.H.useContext(e)};j.useDebugValue=function(){};j.useDeferredValue=function(e,t){return ye.H.useDeferredValue(e,t)};j.useEffect=function(e,t){return ye.H.useEffect(e,t)};j.useEffectEvent=function(e){return ye.H.useEffectEvent(e)};j.useId=function(){return ye.H.useId()};j.useImperativeHandle=function(e,t,i){return ye.H.useImperativeHandle(e,t,i)};j.useInsertionEffect=function(e,t){return ye.H.useInsertionEffect(e,t)};j.useLayoutEffect=function(e,t){return ye.H.useLayoutEffect(e,t)};j.useMemo=function(e,t){return ye.H.useMemo(e,t)};j.useOptimistic=function(e,t){return ye.H.useOptimistic(e,t)};j.useReducer=function(e,t,i){return ye.H.useReducer(e,t,i)};j.useRef=function(e){return ye.H.useRef(e)};j.useState=function(e){return ye.H.useState(e)};j.useSyncExternalStore=function(e,t,i){return ye.H.useSyncExternalStore(e,t,i)};j.useTransition=function(){return ye.H.useTransition()};j.version="19.3.0"});var ri=Yi((W8,C_)=>{"use strict";C_.exports=x_()});var O_=Yi(Ae=>{"use strict";function Vu(e,t){var i=e.length;e.push(t);e:for(;0<i;){var s=i-1>>>1,r=e[s];if(0<Fl(r,t))e[s]=t,e[i]=r,i=s;else break e}}function Xi(e){return e.length===0?null:e[0]}function Kl(e){if(e.length===0)return null;var t=e[0],i=e.pop();if(i!==t){e[0]=i;e:for(var s=0,r=e.length,n=r>>>1;s<n;){var o=2*(s+1)-1,a=e[o],l=o+1,c=e[l];if(0>Fl(a,i))l<r&&0>Fl(c,a)?(e[s]=c,e[l]=i,s=l):(e[s]=a,e[o]=i,s=o);else if(l<r&&0>Fl(c,i))e[s]=c,e[l]=i,s=l;else break e}}return t}function Fl(e,t){var i=e.sortIndex-t.sortIndex;return i!==0?i:e.id-t.id}Ae.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(E_=performance,Ae.unstable_now=function(){return E_.now()}):($u=Date,T_=$u.now(),Ae.unstable_now=function(){return $u.now()-T_});var E_,$u,T_,ws=[],ir=[],i5=1,Si=null,Lt=3,ju=!1,Qo=!1,Jo=!1,Gu=!1,R_=typeof setTimeout=="function"?setTimeout:null,L_=typeof clearTimeout=="function"?clearTimeout:null,A_=typeof setImmediate<"u"?setImmediate:null;function $l(e){for(var t=Xi(ir);t!==null;){if(t.callback===null)Kl(ir);else if(t.startTime<=e)Kl(ir),t.sortIndex=t.expirationTime,Vu(ws,t);else break;t=Xi(ir)}}function Yu(e){if(Jo=!1,$l(e),!Qo)if(Xi(ws)!==null)Qo=!0,Hn||(Hn=!0,zn());else{var t=Xi(ir);t!==null&&Xu(Yu,t.startTime-e)}}var Hn=!1,ea=-1,D_=5,N_=-1;function B_(){return Gu?!0:!(Ae.unstable_now()-N_<D_)}function Ku(){if(Gu=!1,Hn){var e=Ae.unstable_now();N_=e;var t=!0;try{e:{Qo=!1,Jo&&(Jo=!1,L_(ea),ea=-1),ju=!0;var i=Lt;try{t:{for($l(e),Si=Xi(ws);Si!==null&&!(Si.expirationTime>e&&B_());){var s=Si.callback;if(typeof s=="function"){Si.callback=null,Lt=Si.priorityLevel;var r=s(Si.expirationTime<=e);if(e=Ae.unstable_now(),typeof r=="function"){Si.callback=r,$l(e),t=!0;break t}Si===Xi(ws)&&Kl(ws),$l(e)}else Kl(ws);Si=Xi(ws)}if(Si!==null)t=!0;else{var n=Xi(ir);n!==null&&Xu(Yu,n.startTime-e),t=!1}}break e}finally{Si=null,Lt=i,ju=!1}t=void 0}}finally{t?zn():Hn=!1}}}var zn;typeof A_=="function"?zn=function(){A_(Ku)}:typeof MessageChannel<"u"?(Wu=new MessageChannel,M_=Wu.port2,Wu.port1.onmessage=Ku,zn=function(){M_.postMessage(null)}):zn=function(){R_(Ku,0)};var Wu,M_;function Xu(e,t){ea=R_(function(){e(Ae.unstable_now())},t)}Ae.unstable_IdlePriority=5;Ae.unstable_ImmediatePriority=1;Ae.unstable_LowPriority=4;Ae.unstable_NormalPriority=3;Ae.unstable_Profiling=null;Ae.unstable_UserBlockingPriority=2;Ae.unstable_cancelCallback=function(e){e.callback=null};Ae.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D_=0<e?Math.floor(1e3/e):5};Ae.unstable_getCurrentPriorityLevel=function(){return Lt};Ae.unstable_next=function(e){switch(Lt){case 1:case 2:case 3:var t=3;break;default:t=Lt}var i=Lt;Lt=t;try{return e()}finally{Lt=i}};Ae.unstable_requestPaint=function(){Gu=!0};Ae.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var i=Lt;Lt=e;try{return t()}finally{Lt=i}};Ae.unstable_scheduleCallback=function(e,t,i){var s=Ae.unstable_now();switch(typeof i=="object"&&i!==null?(i=i.delay,i=typeof i=="number"&&0<i?s+i:s):i=s,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=i+r,e={id:i5++,callback:t,priorityLevel:e,startTime:i,expirationTime:r,sortIndex:-1},i>s?(e.sortIndex=i,Vu(ir,e),Xi(ws)===null&&e===Xi(ir)&&(Jo?(L_(ea),ea=-1):Jo=!0,Xu(Yu,i-s))):(e.sortIndex=r,Vu(ws,e),Qo||ju||(Qo=!0,Hn||(Hn=!0,zn()))),e};Ae.unstable_shouldYield=B_;Ae.unstable_wrapCallback=function(e){var t=Lt;return function(){var i=Lt;Lt=t;try{return e.apply(this,arguments)}finally{Lt=i}}}});var H_=Yi((j8,z_)=>{"use strict";z_.exports=O_()});var q_=Yi(Dt=>{"use strict";var s5=ri();function P_(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function sr(){}var Ht={d:{f:sr,r:function(){throw Error(P_(522))},D:sr,C:sr,L:sr,m:sr,X:sr,S:sr,M:sr},p:0,findDOMNode:null},r5=Symbol.for("react.portal"),n5=Symbol.for("react.recoverable"),U_=Symbol.for("react.optimistic_key");function o5(e,t,i){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r5,key:s==null?null:s===U_?U_:""+s,children:e,containerInfo:t,implementation:i}}var ta=s5.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Wl(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ht;Dt.browser=function(e){return{$$typeof:n5,_reason:e}};Dt.createPortal=function(e,t){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(P_(299));return o5(e,t,null,i)};Dt.flushSync=function(e){var t=ta.T,i=Ht.p;try{if(ta.T=null,Ht.p=2,e)return e()}finally{ta.T=t,Ht.p=i,Ht.d.f()}};Dt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Ht.d.C(e,t))};Dt.prefetchDNS=function(e){typeof e=="string"&&Ht.d.D(e)};Dt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var i=t.as,s=Wl(i,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,n=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;i==="style"?Ht.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:s,integrity:r,fetchPriority:n}):i==="script"&&Ht.d.X(e,{crossOrigin:s,integrity:r,fetchPriority:n,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Dt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var i=Wl(t.as,t.crossOrigin);Ht.d.M(e,{crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}}else t==null&&Ht.d.M(e)};Dt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var i=t.as,s=Wl(i,t.crossOrigin);Ht.d.L(e,i,{crossOrigin:s,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Dt.preloadModule=function(e,t){if(typeof e=="string")if(t){var i=Wl(t.as,t.crossOrigin);Ht.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}else Ht.d.m(e)};Dt.requestFormReset=function(e){Ht.d.r(e)};Dt.unstable_batchedUpdates=function(e,t){return e(t)};Dt.useFormState=function(e,t,i){return ta.H.useFormState(e,t,i)};Dt.useFormStatus=function(){return ta.H.useHostTransitionStatus()};Dt.version="19.3.0"});var Zu=Yi((Y8,F_)=>{"use strict";function I_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(I_)}catch(e){console.error(e)}}I_(),F_.exports=q_()});var Ab=Yi(Eh=>{"use strict";var et=H_(),T0=ri(),a5=Zu();function R(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function A0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Fa(e){for(var t=e,i=t;i&&!i.alternate;)t=i,(t.flags&4098)!==0&&(e=t.return),i=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function M0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function R0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function $_(e){if(Fa(e)!==e)throw Error(R(188))}function l5(e){var t=e.alternate;if(!t){if(t=Fa(e),t===null)throw Error(R(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var n=r.alternate;if(n===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===n.child){for(n=r.child;n;){if(n===i)return $_(r),e;if(n===s)return $_(r),t;n=n.sibling}throw Error(R(188))}if(i.return!==s.return)i=r,s=n;else{for(var o=!1,a=r.child;a;){if(a===i){o=!0,i=r,s=n;break}if(a===s){o=!0,s=r,i=n;break}a=a.sibling}if(!o){for(a=n.child;a;){if(a===i){o=!0,i=n,s=r;break}if(a===s){o=!0,s=n,i=r;break}a=a.sibling}if(!o)throw Error(R(189))}}if(i.alternate!==s)throw Error(R(190))}if(i.tag!==3)throw Error(R(188));return i.stateNode.current===i?e:t}function L0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=L0(e),t!==null)return t;e=e.sibling}return null}function Jt(e,t,i,s,r,n){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&i(e,s,r,n)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&Jt(e.child,t,i,s,r,n))return!0;e=e.sibling}return!1}function mn(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function K_(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function D0(e){var t=[null,null],i=mn(e);return i===null||N0(t,e,i.child,{foundSelf:!1}),t}function N0(e,t,i,s){for(;i!==null;){if(i===t)s.foundSelf=!0;else if(i.tag===5||i.tag===27||i.tag===6){if(s.foundSelf)return e[1]=i,!0;e[0]=i}else if((i.tag!==22||i.memoizedState===null)&&N0(e,t,i.child,s))return!0;i=i.sibling}return!1}function Je(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(R(559))}}var Kn=null,Md=null;function c5(e,t,i){return e===i?!0:e===t?(Kn=e,!0):!1}function h5(e,t,i){return e===i?(Md=e,!1):e===t?(Md!==null&&(Kn=e),!0):!1}function W_(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function Rd(e,t,i){for(var s=0,r=e;r;r=i(r))s++;r=0;for(var n=t;n;n=i(n))r++;for(;0<s-r;)e=i(e),s--;for(;0<r-s;)t=i(t),r--;for(;s--;){if(e===t||t!==null&&e===t.alternate)return e;e=i(e),t=i(t)}return null}var ve=Object.assign,u5=Symbol.for("react.element"),Vl=Symbol.for("react.transitional.element"),la=Symbol.for("react.portal"),Wn=Symbol.for("react.fragment"),B0=Symbol.for("react.strict_mode"),Ld=Symbol.for("react.profiler"),O0=Symbol.for("react.consumer"),is=Symbol.for("react.context"),If=Symbol.for("react.forward_ref"),Dd=Symbol.for("react.suspense"),Nd=Symbol.for("react.suspense_list"),Ff=Symbol.for("react.memo"),ar=Symbol.for("react.lazy"),Bd=Symbol.for("react.activity"),d5=Symbol.for("react.legacy_hidden"),f5=Symbol.for("react.memo_cache_sentinel"),Od=Symbol.for("react.view_transition"),p5=Symbol.for("react.recoverable"),V_=Symbol.iterator;function ia(e){return e===null||typeof e!="object"?null:(e=V_&&e[V_]||e["@@iterator"],typeof e=="function"?e:null)}var g5=Symbol.for("react.client.reference");function zd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===g5?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wn:return"Fragment";case Ld:return"Profiler";case B0:return"StrictMode";case Dd:return"Suspense";case Nd:return"SuspenseList";case Bd:return"Activity";case Od:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case la:return"Portal";case is:return e.displayName||"Context";case O0:return(e._context.displayName||"Context")+".Consumer";case If:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ff:return t=e.displayName||null,t!==null?t:zd(e.type)||"Memo";case ar:t=e._payload,e=e._init;try{return zd(e(t))}catch{}}return null}var ca=Array.isArray,W=T0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=a5.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,sn={pending:!1,data:null,method:null,action:null},Hd=[],Vn=-1;function cs(e){return{current:e}}function kt(e){0>Vn||(e.current=Hd[Vn],Hd[Vn]=null,Vn--)}function Se(e,t){Vn++,Hd[Vn]=e.current,e.current=t}var os=cs(null),Ea=cs(null),mr=cs(null),Dc=cs(null);function Nc(e,t){switch(Se(mr,t),Se(Ea,e),Se(os,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?o0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=o0(t),e=sb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}kt(os),Se(os,e)}function fo(){kt(os),kt(Ea),kt(mr)}function Ud(e){var t=e.memoizedState;t!==null&&(ko._currentValue=t.memoizedState,Se(Dc,e)),t=os.current;var i=sb(t,e.type);t!==i&&(Se(Ea,e),Se(os,i))}function Bc(e){Ea.current===e&&(kt(os),kt(Ea)),Dc.current===e&&(kt(Dc),ko._currentValue=sn)}var Qu,j_;function nr(e){if(Qu===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Qu=t&&t[1]||"",j_=-1<i.stack.indexOf(`
|
|
2
|
+
var N2=Object.create;var u_=Object.defineProperty;var B2=Object.getOwnPropertyDescriptor;var O2=Object.getOwnPropertyNames;var z2=Object.getPrototypeOf,H2=Object.prototype.hasOwnProperty;var Yi=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(i){throw t=0,i}};var U2=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of O2(t))!H2.call(e,r)&&r!==i&&u_(e,r,{get:()=>t[r],enumerable:!(s=B2(t,r))||s.enumerable});return e};var H=(e,t,i)=>(i=e!=null?N2(z2(e)):{},U2(t||!e||!e.__esModule?u_(i,"default",{value:e,enumerable:!0}):i,e));var x_=Yi(G=>{"use strict";var Uu=Symbol.for("react.transitional.element"),P2=Symbol.for("react.portal"),q2=Symbol.for("react.fragment"),I2=Symbol.for("react.strict_mode"),F2=Symbol.for("react.profiler"),$2=Symbol.for("react.consumer"),K2=Symbol.for("react.context"),W2=Symbol.for("react.forward_ref"),V2=Symbol.for("react.suspense"),j2=Symbol.for("react.memo"),m_=Symbol.for("react.lazy"),G2=Symbol.for("react.activity"),Y2=Symbol.for("react.view_transition"),d_=Symbol.iterator;function X2(e){return e===null||typeof e!="object"?null:(e=d_&&e[d_]||e["@@iterator"],typeof e=="function"?e:null)}var __={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v_=Object.assign,y_={};function On(e,t,i){this.props=e,this.context=t,this.refs=y_,this.updater=i||__}On.prototype.isReactComponent={};On.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};On.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function b_(){}b_.prototype=On.prototype;function Pu(e,t,i){this.props=e,this.context=t,this.refs=y_,this.updater=i||__}var qu=Pu.prototype=new b_;qu.constructor=Pu;v_(qu,On.prototype);qu.isPureReactComponent=!0;var f_=Array.isArray;function Hu(){}var ye={H:null,A:null,T:null,S:null},w_=Object.prototype.hasOwnProperty;function Iu(e,t,i){var s=i.ref;return{$$typeof:Uu,type:e,key:t,ref:s!==void 0?s:null,props:i}}function Z2(e,t){return Iu(e.type,t,e.props)}function Fu(e){return typeof e=="object"&&e!==null&&e.$$typeof===Uu}function Q2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(i){return t[i]})}var p_=/\/+/g;function zu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Q2(""+e.key):t.toString(36)}function J2(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Hu,Hu):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Bn(e,t,i,s,r){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(n){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Uu:case P2:o=!0;break;case m_:return o=e._init,Bn(o(e._payload),t,i,s,r)}}if(o)return r=r(e),o=s===""?"."+zu(e,0):s,f_(r)?(i="",o!=null&&(i=o.replace(p_,"$&/")+"/"),Bn(r,t,i,"",function(c){return c})):r!=null&&(Fu(r)&&(r=Z2(r,i+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(p_,"$&/")+"/")+o)),t.push(r)),1;o=0;var a=s===""?".":s+":";if(f_(e))for(var l=0;l<e.length;l++)s=e[l],n=a+zu(s,l),o+=Bn(s,t,i,n,r);else if(l=X2(e),typeof l=="function")for(e=l.call(e),l=0;!(s=e.next()).done;)s=s.value,n=a+zu(s,l++),o+=Bn(s,t,i,n,r);else if(n==="object"){if(typeof e.then=="function")return Bn(J2(e),t,i,s,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function Il(e,t,i){if(e==null)return e;var s=[],r=0;return Bn(e,s,"","",function(n){return t.call(i,n,r++)}),s}function e5(e){if(e._status===-1){var t=e._result,i=t();i.then(function(s){(e._status===0||e._status===-1)&&(e._status=1,e._result=s,i.status===void 0&&(i.status="fulfilled",i.value=s))},function(s){(e._status===0||e._status===-1)&&(e._status=2,e._result=s,i.status===void 0&&(i.status="rejected",i.reason=s))}),e._status===-1&&(e._status=0,e._result=i)}if(e._status===1)return e._result.default;throw e._result}var g_=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function S_(e){var t=ye.T,i={};i.types=t!==null?t.types:null,ye.T=i;try{var s=e(),r=ye.S;r!==null&&r(i,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Hu,g_)}catch(n){g_(n)}finally{t!==null&&i.types!==null&&(t.types=i.types),ye.T=t}}function k_(e){var t=ye.T;if(t!==null){var i=t.types;i===null?t.types=[e]:i.indexOf(e)===-1&&i.push(e)}else S_(k_.bind(null,e))}var t5={map:Il,forEach:function(e,t,i){Il(e,function(){t.apply(this,arguments)},i)},count:function(e){var t=0;return Il(e,function(){t++}),t},toArray:function(e){return Il(e,function(t){return t})||[]},only:function(e){if(!Fu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};G.Activity=G2;G.Children=t5;G.Component=On;G.Fragment=q2;G.Profiler=F2;G.PureComponent=Pu;G.StrictMode=I2;G.Suspense=V2;G.ViewTransition=Y2;G.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ye;G.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ye.H.useMemoCache(e)}};G.addTransitionType=k_;G.cache=function(e){return function(){return e.apply(null,arguments)}};G.cacheSignal=function(){return null};G.cloneElement=function(e,t,i){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=v_({},e.props),r=e.key;if(t!=null)for(n in t.key!==void 0&&(r=""+t.key),t)!w_.call(t,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&t.ref===void 0||(s[n]=t[n]);var n=arguments.length-2;if(n===1)s.children=i;else if(1<n){for(var o=Array(n),a=0;a<n;a++)o[a]=arguments[a+2];s.children=o}return Iu(e.type,r,s)};G.createContext=function(e){return e={$$typeof:K2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:$2,_context:e},e};G.createElement=function(e,t,i){var s,r={},n=null;if(t!=null)for(s in t.key!==void 0&&(n=""+t.key),t)w_.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(r[s]=t[s]);var o=arguments.length-2;if(o===1)r.children=i;else if(1<o){for(var a=Array(o),l=0;l<o;l++)a[l]=arguments[l+2];r.children=a}if(e&&e.defaultProps)for(s in o=e.defaultProps,o)r[s]===void 0&&(r[s]=o[s]);return Iu(e,n,r)};G.createRef=function(){return{current:null}};G.forwardRef=function(e){return{$$typeof:W2,render:e}};G.isValidElement=Fu;G.lazy=function(e){return{$$typeof:m_,_payload:{_status:-1,_result:e},_init:e5}};G.memo=function(e,t){return{$$typeof:j2,type:e,compare:t===void 0?null:t}};G.startTransition=S_;G.unstable_useCacheRefresh=function(){return ye.H.useCacheRefresh()};G.use=function(e){return ye.H.use(e)};G.useActionState=function(e,t,i){return ye.H.useActionState(e,t,i)};G.useCallback=function(e,t){return ye.H.useCallback(e,t)};G.useContext=function(e){return ye.H.useContext(e)};G.useDebugValue=function(){};G.useDeferredValue=function(e,t){return ye.H.useDeferredValue(e,t)};G.useEffect=function(e,t){return ye.H.useEffect(e,t)};G.useEffectEvent=function(e){return ye.H.useEffectEvent(e)};G.useId=function(){return ye.H.useId()};G.useImperativeHandle=function(e,t,i){return ye.H.useImperativeHandle(e,t,i)};G.useInsertionEffect=function(e,t){return ye.H.useInsertionEffect(e,t)};G.useLayoutEffect=function(e,t){return ye.H.useLayoutEffect(e,t)};G.useMemo=function(e,t){return ye.H.useMemo(e,t)};G.useOptimistic=function(e,t){return ye.H.useOptimistic(e,t)};G.useReducer=function(e,t,i){return ye.H.useReducer(e,t,i)};G.useRef=function(e){return ye.H.useRef(e)};G.useState=function(e){return ye.H.useState(e)};G.useSyncExternalStore=function(e,t,i){return ye.H.useSyncExternalStore(e,t,i)};G.useTransition=function(){return ye.H.useTransition()};G.version="19.3.0"});var ri=Yi((W8,C_)=>{"use strict";C_.exports=x_()});var O_=Yi(Ae=>{"use strict";function Vu(e,t){var i=e.length;e.push(t);e:for(;0<i;){var s=i-1>>>1,r=e[s];if(0<Fl(r,t))e[s]=t,e[i]=r,i=s;else break e}}function Xi(e){return e.length===0?null:e[0]}function Kl(e){if(e.length===0)return null;var t=e[0],i=e.pop();if(i!==t){e[0]=i;e:for(var s=0,r=e.length,n=r>>>1;s<n;){var o=2*(s+1)-1,a=e[o],l=o+1,c=e[l];if(0>Fl(a,i))l<r&&0>Fl(c,a)?(e[s]=c,e[l]=i,s=l):(e[s]=a,e[o]=i,s=o);else if(l<r&&0>Fl(c,i))e[s]=c,e[l]=i,s=l;else break e}}return t}function Fl(e,t){var i=e.sortIndex-t.sortIndex;return i!==0?i:e.id-t.id}Ae.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(E_=performance,Ae.unstable_now=function(){return E_.now()}):($u=Date,T_=$u.now(),Ae.unstable_now=function(){return $u.now()-T_});var E_,$u,T_,ws=[],ir=[],i5=1,Si=null,Lt=3,ju=!1,Qo=!1,Jo=!1,Gu=!1,R_=typeof setTimeout=="function"?setTimeout:null,L_=typeof clearTimeout=="function"?clearTimeout:null,A_=typeof setImmediate<"u"?setImmediate:null;function $l(e){for(var t=Xi(ir);t!==null;){if(t.callback===null)Kl(ir);else if(t.startTime<=e)Kl(ir),t.sortIndex=t.expirationTime,Vu(ws,t);else break;t=Xi(ir)}}function Yu(e){if(Jo=!1,$l(e),!Qo)if(Xi(ws)!==null)Qo=!0,Hn||(Hn=!0,zn());else{var t=Xi(ir);t!==null&&Xu(Yu,t.startTime-e)}}var Hn=!1,ea=-1,D_=5,N_=-1;function B_(){return Gu?!0:!(Ae.unstable_now()-N_<D_)}function Ku(){if(Gu=!1,Hn){var e=Ae.unstable_now();N_=e;var t=!0;try{e:{Qo=!1,Jo&&(Jo=!1,L_(ea),ea=-1),ju=!0;var i=Lt;try{t:{for($l(e),Si=Xi(ws);Si!==null&&!(Si.expirationTime>e&&B_());){var s=Si.callback;if(typeof s=="function"){Si.callback=null,Lt=Si.priorityLevel;var r=s(Si.expirationTime<=e);if(e=Ae.unstable_now(),typeof r=="function"){Si.callback=r,$l(e),t=!0;break t}Si===Xi(ws)&&Kl(ws),$l(e)}else Kl(ws);Si=Xi(ws)}if(Si!==null)t=!0;else{var n=Xi(ir);n!==null&&Xu(Yu,n.startTime-e),t=!1}}break e}finally{Si=null,Lt=i,ju=!1}t=void 0}}finally{t?zn():Hn=!1}}}var zn;typeof A_=="function"?zn=function(){A_(Ku)}:typeof MessageChannel<"u"?(Wu=new MessageChannel,M_=Wu.port2,Wu.port1.onmessage=Ku,zn=function(){M_.postMessage(null)}):zn=function(){R_(Ku,0)};var Wu,M_;function Xu(e,t){ea=R_(function(){e(Ae.unstable_now())},t)}Ae.unstable_IdlePriority=5;Ae.unstable_ImmediatePriority=1;Ae.unstable_LowPriority=4;Ae.unstable_NormalPriority=3;Ae.unstable_Profiling=null;Ae.unstable_UserBlockingPriority=2;Ae.unstable_cancelCallback=function(e){e.callback=null};Ae.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D_=0<e?Math.floor(1e3/e):5};Ae.unstable_getCurrentPriorityLevel=function(){return Lt};Ae.unstable_next=function(e){switch(Lt){case 1:case 2:case 3:var t=3;break;default:t=Lt}var i=Lt;Lt=t;try{return e()}finally{Lt=i}};Ae.unstable_requestPaint=function(){Gu=!0};Ae.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var i=Lt;Lt=e;try{return t()}finally{Lt=i}};Ae.unstable_scheduleCallback=function(e,t,i){var s=Ae.unstable_now();switch(typeof i=="object"&&i!==null?(i=i.delay,i=typeof i=="number"&&0<i?s+i:s):i=s,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=i+r,e={id:i5++,callback:t,priorityLevel:e,startTime:i,expirationTime:r,sortIndex:-1},i>s?(e.sortIndex=i,Vu(ir,e),Xi(ws)===null&&e===Xi(ir)&&(Jo?(L_(ea),ea=-1):Jo=!0,Xu(Yu,i-s))):(e.sortIndex=r,Vu(ws,e),Qo||ju||(Qo=!0,Hn||(Hn=!0,zn()))),e};Ae.unstable_shouldYield=B_;Ae.unstable_wrapCallback=function(e){var t=Lt;return function(){var i=Lt;Lt=t;try{return e.apply(this,arguments)}finally{Lt=i}}}});var H_=Yi((j8,z_)=>{"use strict";z_.exports=O_()});var q_=Yi(Dt=>{"use strict";var s5=ri();function P_(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function sr(){}var Ht={d:{f:sr,r:function(){throw Error(P_(522))},D:sr,C:sr,L:sr,m:sr,X:sr,S:sr,M:sr},p:0,findDOMNode:null},r5=Symbol.for("react.portal"),n5=Symbol.for("react.recoverable"),U_=Symbol.for("react.optimistic_key");function o5(e,t,i){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r5,key:s==null?null:s===U_?U_:""+s,children:e,containerInfo:t,implementation:i}}var ta=s5.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Wl(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ht;Dt.browser=function(e){return{$$typeof:n5,_reason:e}};Dt.createPortal=function(e,t){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(P_(299));return o5(e,t,null,i)};Dt.flushSync=function(e){var t=ta.T,i=Ht.p;try{if(ta.T=null,Ht.p=2,e)return e()}finally{ta.T=t,Ht.p=i,Ht.d.f()}};Dt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Ht.d.C(e,t))};Dt.prefetchDNS=function(e){typeof e=="string"&&Ht.d.D(e)};Dt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var i=t.as,s=Wl(i,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,n=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;i==="style"?Ht.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:s,integrity:r,fetchPriority:n}):i==="script"&&Ht.d.X(e,{crossOrigin:s,integrity:r,fetchPriority:n,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Dt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var i=Wl(t.as,t.crossOrigin);Ht.d.M(e,{crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}}else t==null&&Ht.d.M(e)};Dt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var i=t.as,s=Wl(i,t.crossOrigin);Ht.d.L(e,i,{crossOrigin:s,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Dt.preloadModule=function(e,t){if(typeof e=="string")if(t){var i=Wl(t.as,t.crossOrigin);Ht.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}else Ht.d.m(e)};Dt.requestFormReset=function(e){Ht.d.r(e)};Dt.unstable_batchedUpdates=function(e,t){return e(t)};Dt.useFormState=function(e,t,i){return ta.H.useFormState(e,t,i)};Dt.useFormStatus=function(){return ta.H.useHostTransitionStatus()};Dt.version="19.3.0"});var Zu=Yi((Y8,F_)=>{"use strict";function I_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(I_)}catch(e){console.error(e)}}I_(),F_.exports=q_()});var Ab=Yi(Eh=>{"use strict";var et=H_(),T0=ri(),a5=Zu();function R(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function A0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Fa(e){for(var t=e,i=t;i&&!i.alternate;)t=i,(t.flags&4098)!==0&&(e=t.return),i=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function M0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function R0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function $_(e){if(Fa(e)!==e)throw Error(R(188))}function l5(e){var t=e.alternate;if(!t){if(t=Fa(e),t===null)throw Error(R(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var n=r.alternate;if(n===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===n.child){for(n=r.child;n;){if(n===i)return $_(r),e;if(n===s)return $_(r),t;n=n.sibling}throw Error(R(188))}if(i.return!==s.return)i=r,s=n;else{for(var o=!1,a=r.child;a;){if(a===i){o=!0,i=r,s=n;break}if(a===s){o=!0,s=r,i=n;break}a=a.sibling}if(!o){for(a=n.child;a;){if(a===i){o=!0,i=n,s=r;break}if(a===s){o=!0,s=n,i=r;break}a=a.sibling}if(!o)throw Error(R(189))}}if(i.alternate!==s)throw Error(R(190))}if(i.tag!==3)throw Error(R(188));return i.stateNode.current===i?e:t}function L0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=L0(e),t!==null)return t;e=e.sibling}return null}function Jt(e,t,i,s,r,n){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&i(e,s,r,n)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&Jt(e.child,t,i,s,r,n))return!0;e=e.sibling}return!1}function mn(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function K_(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function D0(e){var t=[null,null],i=mn(e);return i===null||N0(t,e,i.child,{foundSelf:!1}),t}function N0(e,t,i,s){for(;i!==null;){if(i===t)s.foundSelf=!0;else if(i.tag===5||i.tag===27||i.tag===6){if(s.foundSelf)return e[1]=i,!0;e[0]=i}else if((i.tag!==22||i.memoizedState===null)&&N0(e,t,i.child,s))return!0;i=i.sibling}return!1}function Je(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(R(559))}}var Kn=null,Md=null;function c5(e,t,i){return e===i?!0:e===t?(Kn=e,!0):!1}function h5(e,t,i){return e===i?(Md=e,!1):e===t?(Md!==null&&(Kn=e),!0):!1}function W_(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function Rd(e,t,i){for(var s=0,r=e;r;r=i(r))s++;r=0;for(var n=t;n;n=i(n))r++;for(;0<s-r;)e=i(e),s--;for(;0<r-s;)t=i(t),r--;for(;s--;){if(e===t||t!==null&&e===t.alternate)return e;e=i(e),t=i(t)}return null}var ve=Object.assign,u5=Symbol.for("react.element"),Vl=Symbol.for("react.transitional.element"),la=Symbol.for("react.portal"),Wn=Symbol.for("react.fragment"),B0=Symbol.for("react.strict_mode"),Ld=Symbol.for("react.profiler"),O0=Symbol.for("react.consumer"),is=Symbol.for("react.context"),If=Symbol.for("react.forward_ref"),Dd=Symbol.for("react.suspense"),Nd=Symbol.for("react.suspense_list"),Ff=Symbol.for("react.memo"),ar=Symbol.for("react.lazy"),Bd=Symbol.for("react.activity"),d5=Symbol.for("react.legacy_hidden"),f5=Symbol.for("react.memo_cache_sentinel"),Od=Symbol.for("react.view_transition"),p5=Symbol.for("react.recoverable"),V_=Symbol.iterator;function ia(e){return e===null||typeof e!="object"?null:(e=V_&&e[V_]||e["@@iterator"],typeof e=="function"?e:null)}var g5=Symbol.for("react.client.reference");function zd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===g5?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wn:return"Fragment";case Ld:return"Profiler";case B0:return"StrictMode";case Dd:return"Suspense";case Nd:return"SuspenseList";case Bd:return"Activity";case Od:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case la:return"Portal";case is:return e.displayName||"Context";case O0:return(e._context.displayName||"Context")+".Consumer";case If:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ff:return t=e.displayName||null,t!==null?t:zd(e.type)||"Memo";case ar:t=e._payload,e=e._init;try{return zd(e(t))}catch{}}return null}var ca=Array.isArray,V=T0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=a5.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,sn={pending:!1,data:null,method:null,action:null},Hd=[],Vn=-1;function cs(e){return{current:e}}function kt(e){0>Vn||(e.current=Hd[Vn],Hd[Vn]=null,Vn--)}function Se(e,t){Vn++,Hd[Vn]=e.current,e.current=t}var os=cs(null),Ea=cs(null),mr=cs(null),Dc=cs(null);function Nc(e,t){switch(Se(mr,t),Se(Ea,e),Se(os,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?o0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=o0(t),e=sb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}kt(os),Se(os,e)}function fo(){kt(os),kt(Ea),kt(mr)}function Ud(e){var t=e.memoizedState;t!==null&&(ko._currentValue=t.memoizedState,Se(Dc,e)),t=os.current;var i=sb(t,e.type);t!==i&&(Se(Ea,e),Se(os,i))}function Bc(e){Ea.current===e&&(kt(os),kt(Ea)),Dc.current===e&&(kt(Dc),ko._currentValue=sn)}var Qu,j_;function nr(e){if(Qu===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Qu=t&&t[1]||"",j_=-1<i.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+Qu+e+j_}var Ju=!1;function ed(e,t){if(!e||Ju)return"";Ju=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(g){var d=g}Reflect.construct(e,[],u)}else{try{u.call()}catch(g){d=g}u=!1;try{var f=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),u=!0,new e}finally{u&&(f!==void 0?Object.defineProperty(e.prototype,"props",f):delete e.prototype.props)}}}else{try{throw Error()}catch(g){d=g}(u=e())&&typeof u.catch=="function"&&u.catch(function(){})}}catch(g){if(g&&d&&typeof g.stack=="string")return[g.stack,d.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var n=s.DetermineComponentFrameRoot(),o=n[0],a=n[1];if(o&&a){var l=o.split(`
|
|
5
5
|
`),c=a.split(`
|
|
6
6
|
`);for(r=s=0;s<l.length&&!l[s].includes("DetermineComponentFrameRoot");)s++;for(;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;if(s===l.length||r===c.length)for(s=l.length-1,r=c.length-1;1<=s&&0<=r&&l[s]!==c[r];)r--;for(;1<=s&&0<=r;s--,r--)if(l[s]!==c[r]){if(s!==1||r!==1)do if(s--,r--,0>r||l[s]!==c[r]){var h=`
|
|
7
7
|
`+l[s].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),h}while(1<=s&&0<=r);break}}}finally{Ju=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?nr(i):""}function m5(e,t){switch(e.tag){case 26:case 27:case 5:return nr(e.type);case 16:return nr("Lazy");case 13:return e.child!==t&&t!==null?nr("Suspense Fallback"):nr("Suspense");case 19:return nr("SuspenseList");case 0:case 15:return ed(e.type,!1);case 11:return ed(e.type.render,!1);case 1:return ed(e.type,!0);case 31:return nr("Activity");case 30:return nr("ViewTransition");default:return""}}function G_(e){try{var t="",i=null;do t+=m5(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
8
8
|
Error generating stack: `+s.message+`
|
|
9
|
-
`+s.stack}}var Pd=Object.prototype.hasOwnProperty,$f=et.unstable_scheduleCallback,td=et.unstable_cancelCallback,_5=et.unstable_shouldYield,v5=et.unstable_requestPaint,hi=et.unstable_now,y5=et.unstable_getCurrentPriorityLevel,z0=et.unstable_ImmediatePriority,H0=et.unstable_UserBlockingPriority,Oc=et.unstable_NormalPriority,b5=et.unstable_LowPriority,U0=et.unstable_IdlePriority,w5=et.log,S5=et.unstable_setDisableYieldValue,$a=null,ui=null;function hr(e){if(typeof w5=="function"&&S5(e),ui&&typeof ui.setStrictMode=="function")try{ui.setStrictMode($a,e)}catch{}}var di=Math.clz32?Math.clz32:C5,k5=Math.log,x5=Math.LN2;function C5(e){return e>>>=0,e===0?32:31-(k5(e)/x5|0)|0}var jl=256,Gl=262144,Yl=4194304;function Zr(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ah(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var a=s&134217727;return a!==0?(s=a&~n,s!==0?r=Zr(s):(o&=a,o!==0?r=Zr(o):i||(i=a&~e,i!==0&&(r=Zr(i))))):(a=s&~n,a!==0?r=Zr(a):o!==0?r=Zr(o):i||(i=s&~e,i!==0&&(r=Zr(i)))),r===0?0:t!==0&&t!==r&&(t&n)===0&&(n=r&-r,i=t&-t,n>=i||n===32&&(i&4194048)!==0)?t:r}function Ka(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function P0(e,t){(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var s=31-di(i),r=1<<s;t|=e[s],i&=~r}return t}function E5(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 q0(){var e=Yl;return Yl<<=1,(Yl&62914560)===0&&(Yl=4194304),e}function id(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Wa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function T5(e,t,i,s,r,n){var o=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var a=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(i=o&~i;0<i;){var h=31-di(i),u=1<<h;a[h]=0,l[h]=-1;var d=c[h];if(d!==null)for(c[h]=null,h=0;h<d.length;h++){var f=d[h];f!==null&&(f.lane&=-536870913)}i&=~u}s!==0&&I0(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(o&~t))}function I0(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-di(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function F0(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-di(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function $0(e,t){var i=t&-t;return i=(i&42)!==0?1:Kf(i),(i&(e.suspendedLanes|t))!==0?0:i}function Kf(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Wf(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function K0(){var e=ce.p;return e!==0?e:(e=window.event,e===void 0?32:Cb(e.type))}function Y_(e,t){var i=ce.p;try{return ce.p=e,t()}finally{ce.p=i}}var Bs=Math.random().toString(36).slice(2),wt="__reactFiber$"+Bs,ei="__reactProps$"+Bs,Eo="__reactContainer$"+Bs,X_="__reactEvents$"+Bs,A5="__reactListeners$"+Bs,M5="__reactHandles$"+Bs,Z_="__reactResources$"+Bs,Va="__reactMarker$"+Bs,zc="__reactLoad$"+Bs;function lh(e){delete e[wt],delete e[ei],delete e[A5],delete e[M5]}function en(e){var t;if(t=e[wt])return t;for(var i=e.parentNode;i;){if(t=i[Eo]||i[wt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=p0(e);e!==null;){if(i=e[wt])return i;e=p0(e)}return t}e=i,i=e.parentNode}return null}function To(e){if(e=e[wt]||e[Eo]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ha(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(R(33))}function io(e){var t=e[Z_];return t||(t=e[Z_]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function at(e){e[Va]=!0}function W0(e){e[zc]=void 0}var V0=new Set,j0={};function _n(e,t){po(e,t),po(e+"Capture",t)}function po(e,t){for(j0[e]=t,e=0;e<t.length;e++)V0.add(t[e])}var R5=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]*$"),Q_={},J_={};function L5(e){return Pd.call(J_,e)?!0:Pd.call(Q_,e)?!1:R5.test(e)?J_[e]=!0:(Q_[e]=!0,!1)}var ae=!1;function ev(){var e=ae;return ae=!1,e}function fc(e,t,i){if(L5(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,i)}}function Xl(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,i)}}function Ss(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,s)}}function oi(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function G0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function D5(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,n=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,n.call(this,o)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qd(e){if(!e._valueTracker){var t=G0(e)?"checked":"value";e._valueTracker=D5(e,t,""+e[t])}}function Y0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=G0(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}var N5=/[\n"\\]/g;function Ti(e){return e.replace(N5,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Id(e,t,i,s,r,n,o,a){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+oi(t)):e.value!==""+oi(t)&&(e.value=""+oi(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?o==="number"&&e.value==t?sd(e,oi(e.value)):sd(e,oi(t)):i!=null?sd(e,oi(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.name=""+oi(a):e.removeAttribute("name")}function X0(e,t,i,s,r,n,o,a){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(e.type=n),t!=null||i!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){qd(e);return}i=i!=null?""+oi(i):"",t=t!=null?""+oi(t):i,a||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=a?e.checked:!!s,e.defaultChecked=!!s,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),qd(e)}function sd(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function so(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+oi(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Z0(e,t,i){if(t!=null&&(t=""+oi(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+oi(i):""}function Q0(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(R(92));if(ca(s)){if(1<s.length)throw Error(R(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=oi(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),qd(e)}function go(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var B5=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 tv(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||B5.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function J0(e,t,i){if(t!=null&&typeof t!="object")throw Error(R(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="",ae=!0);for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&(tv(e,r,s),ae=!0)}else for(var n in t)t.hasOwnProperty(n)&&tv(e,n,t[n])}function Vf(e){if(e.indexOf("-")===-1)return!1;switch(e){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 O5=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"],["maskType","mask-type"],["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"]]),z5=/^[\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 pc(e){return z5.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ss(){}var Fd=null;function jf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jn=null,ro=null;function iv(e){var t=To(e);if(t&&(e=t.stateNode)){var i=e[ei]||null;e:switch(e=t.stateNode,t.type){case"input":if(Id(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ti(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[ei]||null;if(!r)throw Error(R(90));Id(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Y0(s)}break e;case"textarea":Z0(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&so(e,!!i.multiple,t,!1)}}}var rd=!1;function e1(e,t,i){if(rd)return e(t,i);rd=!0;try{var s=e(t);return s}finally{if(rd=!1,(jn!==null||ro!==null)&&(Sh(),jn&&(t=jn,e=ro,ro=jn=null,iv(t),e)))for(t=0;t<e.length;t++)iv(e[t])}}function Ta(e,t){var i=e.stateNode;if(i===null)return null;var s=i[ei]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(R(231,t,typeof i));return i}var As=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$d=!1;if(As)try{Un={},Object.defineProperty(Un,"passive",{get:function(){$d=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{$d=!1}var Un,ur=null,Gf=null,gc=null;function t1(){if(gc)return gc;var e,t=Gf,i=t.length,s,r="value"in ur?ur.value:ur.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var o=i-e;for(s=1;s<=o&&t[i-s]===r[n-s];s++);return gc=r.slice(e,1<s?1-s:void 0)}function mc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Zl(){return!0}function sv(){return!1}function It(e){function t(i,s,r,n,o){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(i=e[a],this[a]=i?i(n):n[a]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?Zl:sv,this.isPropagationStopped=sv,this}return ve(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Zl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Zl)},persist:function(){},isPersistent:Zl}),t}var Lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ch=It(Lr),ja=ve({},Lr,{view:0,detail:0}),H5=It(ja),nd,od,sa,hh=ve({},ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yf,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sa&&(sa&&e.type==="mousemove"?(nd=e.screenX-sa.screenX,od=e.screenY-sa.screenY):od=nd=0,sa=e),nd)},movementY:function(e){return"movementY"in e?e.movementY:od}}),rv=It(hh),U5=ve({},hh,{dataTransfer:0}),P5=It(U5),q5=ve({},ja,{relatedTarget:0}),ad=It(q5),I5=ve({},Lr,{animationName:0,elapsedTime:0,pseudoElement:0}),F5=It(I5),$5=ve({},Lr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),K5=It($5),W5=ve({},Lr,{data:0}),nv=It(W5),V5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},j5={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"},G5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y5(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=G5[e])?!!t[e]:!1}function Yf(){return Y5}var X5=ve({},ja,{key:function(e){if(e.key){var t=V5[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?j5[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yf,charCode:function(e){return e.type==="keypress"?mc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Z5=It(X5),Q5=ve({},hh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ov=It(Q5),J5=ve({},Lr,{submitter:0}),eC=It(J5),tC=ve({},ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yf}),iC=It(tC),sC=ve({},Lr,{propertyName:0,elapsedTime:0,pseudoElement:0}),rC=It(sC),nC=ve({},hh,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),oC=It(nC),aC=ve({},Lr,{newState:0,oldState:0,source:0}),lC=It(aC),cC=[9,13,27,32],Xf=As&&"CompositionEvent"in window,fa=null;As&&"documentMode"in document&&(fa=document.documentMode);var hC=As&&"TextEvent"in window&&!fa,i1=As&&(!Xf||fa&&8<fa&&11>=fa),av=" ",lv=!1;function s1(e,t){switch(e){case"keyup":return cC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function r1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gn=!1;function uC(e,t){switch(e){case"compositionend":return r1(t);case"keypress":return t.which!==32?null:(lv=!0,av);case"textInput":return e=t.data,e===av&&lv?null:e;default:return null}}function dC(e,t){if(Gn)return e==="compositionend"||!Xf&&s1(e,t)?(e=t1(),gc=Gf=ur=null,Gn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return i1&&t.locale!=="ko"?null:t.data;default:return null}}var fC={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 cv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fC[e.type]:t==="textarea"}function n1(e,t,i,s){jn?ro?ro.push(s):ro=[s]:jn=s,t=rh(t,"onChange"),0<t.length&&(i=new ch("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var pa=null,Aa=null;function pC(e){eb(e,0)}function uh(e){var t=ha(e);if(Y0(t))return e}function hv(e,t){if(e==="change")return t}var o1=!1;As&&(As?(Jl="oninput"in document,Jl||(ld=document.createElement("div"),ld.setAttribute("oninput","return;"),Jl=typeof ld.oninput=="function"),Ql=Jl):Ql=!1,o1=Ql&&(!document.documentMode||9<document.documentMode));var Ql,Jl,ld;function uv(){pa&&(pa.detachEvent("onpropertychange",a1),Aa=pa=null)}function a1(e){if(e.propertyName==="value"&&uh(Aa)){var t=[];n1(t,Aa,e,jf(e)),e1(pC,t)}}function gC(e,t,i){e==="focusin"?(uv(),pa=t,Aa=i,pa.attachEvent("onpropertychange",a1)):e==="focusout"&&uv()}function mC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uh(Aa)}function _C(e,t){if(e==="click")return uh(t)}function vC(e,t){if(e==="input"||e==="change")return uh(t)}function yC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pi=typeof Object.is=="function"?Object.is:yC;function Ma(e,t){if(pi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!Pd.call(t,r)||!pi(e[r],t[r]))return!1}return!0}function Kd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function dv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fv(e,t){var i=dv(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=dv(i)}}function l1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?l1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function c1(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kd(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Kd(e.document)}return t}function Zf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var bC=As&&"documentMode"in document&&11>=document.documentMode,Yn=null,Wd=null,ga=null,Vd=!1;function pv(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Vd||Yn==null||Yn!==Kd(s)||(s=Yn,"selectionStart"in s&&Zf(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),ga&&Ma(ga,s)||(ga=s,s=rh(Wd,"onSelect"),0<s.length&&(t=new ch("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Yn)))}function Yr(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Xn={animationend:Yr("Animation","AnimationEnd"),animationiteration:Yr("Animation","AnimationIteration"),animationstart:Yr("Animation","AnimationStart"),transitionrun:Yr("Transition","TransitionRun"),transitionstart:Yr("Transition","TransitionStart"),transitioncancel:Yr("Transition","TransitionCancel"),transitionend:Yr("Transition","TransitionEnd")},cd={},h1={};As&&(h1=document.createElement("div").style,"AnimationEvent"in window||(delete Xn.animationend.animation,delete Xn.animationiteration.animation,delete Xn.animationstart.animation),"TransitionEvent"in window||delete Xn.transitionend.transition);function vn(e){if(cd[e])return cd[e];if(!Xn[e])return e;var t=Xn[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in h1)return cd[e]=t[i];return e}var u1=vn("animationend"),d1=vn("animationiteration"),f1=vn("animationstart"),wC=vn("transitionrun"),SC=vn("transitionstart"),kC=vn("transitioncancel"),p1=vn("transitionend"),g1=new Map,jd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");jd.push("scrollEnd");function Ki(e,t){g1.set(e,t),_n(t,[e])}var xC=0;function Ms(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=$i.identifierPrefix;var i=xC++;return e="_"+e+"t_"+i.toString(32)+"_",t.autoName=e}function gv(e){if(e==null||typeof e=="string")return e;var t=null,i=uo;if(i!==null)for(var s=0;s<i.length;s++){var r=e[i[s]];if(r!=null){if(r==="none")return"none";t=t==null?r:t+(" "+r)}}return t??e.default}function Os(e,t){return e=gv(e),t=gv(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Hc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},xi=[],Zn=0,Qf=0;function dh(){for(var e=Zn,t=Qf=Zn=0;t<e;){var i=xi[t];xi[t++]=null;var s=xi[t];xi[t++]=null;var r=xi[t];xi[t++]=null;var n=xi[t];if(xi[t++]=null,s!==null&&r!==null){var o=s.pending;o===null?r.next=r:(r.next=o.next,o.next=r),s.pending=r}n!==0&&m1(i,r,n)}}function fh(e,t,i,s){xi[Zn++]=e,xi[Zn++]=t,xi[Zn++]=i,xi[Zn++]=s,Qf|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Jf(e,t,i,s){return fh(e,t,i,s),Uc(e)}function yn(e,t){return fh(e,null,null,t),Uc(e)}function m1(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,n=e.return;n!==null;)n.childLanes|=i,s=n.alternate,s!==null&&(s.childLanes|=i),n.tag===22&&(e=n.stateNode,e===null||e._visibility&1||(r=!0)),e=n,n=n.return;return e.tag===3?(n=e.stateNode,r&&t!==null&&(r=31-di(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function Uc(e){if(50<Ca)throw Ca=0,Ec=null,Error(R(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qn={};function CC(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(e,t,i,s){return new CC(e,t,i,s)}function ep(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Es(e,t){var i=e.alternate;return i===null?(i=Zt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&1206910976,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function _1(e,t){e.flags&=1206910978;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _c(e,t,i,s,r,n){var o=0;if(s=e,typeof s=="function")ep(s)&&(o=1);else if(typeof s=="string")o=Z3(e,i,os.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case Bd:return e=Zt(31,i,t,r),e.elementType=Bd,e.lanes=n,e;case Wn:return rn(i.children,r,n,t);case B0:o=8,r|=24;break;case Ld:return e=Zt(12,i,t,r|2),e.elementType=Ld,e.lanes=n,e;case Dd:return e=Zt(13,i,t,r),e.elementType=Dd,e.lanes=n,e;case Nd:return e=Zt(19,i,t,r),e.elementType=Nd,e.lanes=n,e;case d5:case Od:return e=r|32,e=Zt(30,i,t,e),e.elementType=Od,e.lanes=n,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case is:o=10;break e;case O0:o=9;break e;case If:o=11;break e;case Ff:o=14;break e;case ar:o=16,s=null;break e}o=29,i=Error(R(130,e===null?"null":typeof e,"")),s=null}return t=Zt(o,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function rn(e,t,i,s){return e=Zt(7,e,s,t),e.lanes=i,e}function hd(e,t,i){return e=Zt(6,e,null,t),e.lanes=i,e}function v1(e){var t=Zt(18,null,null,0);return t.stateNode=e,t}function ud(e,t,i){return t=Zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mv=new WeakMap;function Ai(e,t){if(typeof e=="object"&&e!==null){var i=mv.get(e);return i!==void 0?i:(t={value:e,source:t,stack:G_(t)},mv.set(e,t),t)}return{value:e,source:t,stack:G_(t)}}var Jn=[],eo=0,Pc=null,Ra=0,Ci=[],Ei=0,Er=null,rs=1,ns="";function xs(e,t){Jn[eo++]=Ra,Jn[eo++]=Pc,Pc=e,Ra=t}function y1(e,t,i){Ci[Ei++]=rs,Ci[Ei++]=ns,Ci[Ei++]=Er,Er=e;var s=rs;e=ns;var r=32-di(s)-1;s&=~(1<<r),i+=1;var n=32-di(t)+r;if(30<n){var o=r-r%5;n=(s&(1<<o)-1).toString(32),s>>=o,r-=o,rs=1<<32-di(t)+r|i<<r|s,ns=n+e}else rs=1<<n|i<<r|s,ns=e}function ph(e){e.return!==null&&(xs(e,1),y1(e,1,0))}function tp(e){for(;e===Pc;)Pc=Jn[--eo],Jn[eo]=null,Ra=Jn[--eo],Jn[eo]=null;for(;e===Er;)Er=Ci[--Ei],Ci[Ei]=null,ns=Ci[--Ei],Ci[Ei]=null,rs=Ci[--Ei],Ci[Ei]=null}function b1(e,t){Ci[Ei++]=rs,Ci[Ei++]=ns,Ci[Ei++]=Er,rs=t.id,ns=t.overflow,Er=e}var lt=null,we=null,Q=!1,_r=null,Mi=!1,Gd=Error(R(519));function Tr(e){var t=Error(R(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw La(Ai(t,e)),Gd}function _v(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[wt]=e,t[ei]=s,i){case"dialog":ee("cancel",t),ee("close",t);break;case"iframe":case"object":case"embed":ee("load",t);break;case"video":case"audio":for(i=0;i<Oa.length;i++)ee(Oa[i],t);break;case"source":ee("error",t);break;case"img":case"image":case"link":ee("error",t),ee("load",t);break;case"details":ee("toggle",t);break;case"input":ee("invalid",t),X0(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":ee("invalid",t);break;case"textarea":ee("invalid",t),Q0(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||ib(t.textContent,i)?(s.popover!=null&&(ee("beforetoggle",t),ee("toggle",t)),s.onScroll!=null&&ee("scroll",t),s.onScrollEnd!=null&&ee("scrollend",t),s.onClick!=null&&(t.onclick=ss),t=!0):t=!1,t||Tr(e,!0)}function qc(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Mi=!1;return;case 27:case 3:Mi=!0;return;default:lt=lt.return}}function Pn(e){if(e!==lt)return!1;if(!Q)return qc(e),Q=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Nf(e.type,e.memoizedProps)),i=!i),i&&we&&Tr(e),qc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));we=f0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));we=f0(e)}else t===27?(t=we,Dr(e.type)?(e=Hf,Hf=null,we=e):we=t):we=lt?Ri(e.stateNode.nextSibling):null;return!0}function ln(){we=lt=null,Q=!1}function dd(){var e=_r;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),_r=null),e}function La(e){_r===null?_r=[e]:_r.push(e)}var Yd=cs(null),bn=null,Cs=null;function dr(e,t,i){Se(Yd,t._currentValue),t._currentValue=i}function Ts(e){e._currentValue=Yd.current,kt(Yd)}function vc(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Xd(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var o=r.child;n=n.firstContext;e:for(;n!==null;){var a=n;n=r;for(var l=0;l<t.length;l++)if(a.context===t[l]){n.lanes|=i,a=n.alternate,a!==null&&(a.lanes|=i),vc(n.return,i,e),s||(o=null);break e}n=a.next}}else if(r.tag===18){if(o=r.return,o===null)throw Error(R(341));o.lanes|=i,n=o.alternate,n!==null&&(n.lanes|=i),vc(o,i,e),o=null}else r.tag===13&&r.memoizedState!==null&&r.memoizedState.dehydrated===null?(r.lanes|=i,o=r.alternate,o!==null&&(o.lanes|=i),vc(r.return,i,e),o=r.child,o=o!==null?o.sibling:null):o=r.child;if(o!==null)o.return=r;else for(o=r;o!==null;){if(o===e){o=null;break}if(r=o.sibling,r!==null){r.return=o.return,o=r;break}o=o.return}r=o}}function cn(e,t,i,s){e=null;for(var r=t,n=!1;r!==null;){if(!n){if((r.flags&524288)!==0)n=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var o=r.alternate;if(o===null)throw Error(R(387));if(o=o.memoizedProps,o!==null){var a=r.type;pi(r.pendingProps.value,o.value)||(e!==null?e.push(a):e=[a])}}else if(r===Dc.current){if(o=r.alternate,o===null)throw Error(R(387));o.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ko):e=[ko])}r=r.return}return e!==null&&Xd(t,e,i,s),t.flags|=262144,e!==null}function Ic(e){for(e=e.firstContext;e!==null;){if(!pi(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function hn(e){bn=e,Cs=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return w1(bn,e)}function ec(e,t){return bn===null&&hn(e),w1(e,t)}function w1(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Cs===null){if(e===null)throw Error(R(308));Cs=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Cs=Cs.next=t;return i}var EC=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},TC=et.unstable_scheduleCallback,AC=et.unstable_NormalPriority,je={$$typeof:is,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ip(){return{controller:new EC,data:new Map,refCount:0}}function Ga(e){e.refCount--,e.refCount===0&&TC(AC,function(){e.controller.abort()})}function vv(e,t){if((e.pendingLanes&4194048)!==0){var i=e.transitionTypes;for(i===null&&(i=e.transitionTypes=[]),e=0;e<t.length;e++){var s=t[e];i.indexOf(s)===-1&&i.push(s)}}}var ua=null;function MC(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var ma=null,Zd=0,un=0,no=null;function RC(e,t){if(ma===null){var i=ma=[];Zd=0,un=Rp(),no={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Zd++,t.then(yv,yv),t}function yv(){if(--Zd===0&&(ua=null,ma!==null)){no!==null&&(no.status="fulfilled");var e=ma;ma=null,un=0,no=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function LC(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var bv=W.S;W.S=function(e,t){if(Py=hi(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&RC(e,t),ua!==null)for(var i=bo;i!==null;)vv(i,ua),i=i.next;if(i=e.types,i!==null){for(var s=bo;s!==null;)vv(s,i),s=s.next;if(un!==0){s=ua,s===null&&(s=ua=[]);for(var r=0;r<i.length;r++){var n=i[r];s.indexOf(n)===-1&&s.push(n)}}}bv!==null&&bv(e,t)};var nn=cs(null);function sp(){var e=nn.current;return e!==null?e:_e.pooledCache}function yc(e,t){t===null?Se(nn,nn.current):Se(nn,t.pool)}function S1(){var e=sp();return e===null?null:{parent:je._currentValue,pool:e}}var Ao=Error(R(460)),rp=Error(R(474)),gh=Error(R(542)),Fc={then:function(){}};function wv(e){return e=e.status,e==="fulfilled"||e==="rejected"}function k1(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ss,ss),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,kv(e),e===void 0&&!("reason"in t)?Error(R(600)):e;default:if(typeof t.status=="string")t.then(ss,ss);else{if(e=_e,e!==null&&100<e.shellSuspendCounter)throw Error(R(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,kv(e),e}throw on=t,Ao}}function Qr(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(on=i,Ao):i}}var on=null;function Sv(){if(on===null)throw Error(R(459));var e=on;return on=null,e}function kv(e){if(e===Ao||e===gh)throw Error(R(483))}var oo=null,Da=0;function tc(e){var t=Da;return Da+=1,oo===null&&(oo=[]),k1(oo,e,t)}function rr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ic(e,t){throw t.$$typeof===u5?Error(R(525)):(e=Object.prototype.toString.call(t),Error(R(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function x1(e){function t(_,m){if(e){var v=_.deletions;v===null?(_.deletions=[m],_.flags|=16):v.push(m)}}function i(_,m){if(!e)return null;for(;m!==null;)t(_,m),m=m.sibling;return null}function s(_){for(var m=new Map;_!==null;)_.key===null?m.set(_.index,_):m.set(_.key,_),_=_.sibling;return m}function r(_,m){return _=Es(_,m),_.index=0,_.sibling=null,_}function n(_,m,v){return _.index=v,e?(v=_.alternate,v!==null?(v=v.index,v<m?(_.flags|=2,m):v):(_.flags|=134217730,m)):(_.flags|=1048576,m)}function o(_){return e&&_.alternate===null&&(_.flags|=134217730),_}function a(_,m,v,p){return m===null||m.tag!==6?(m=hd(v,_.mode,p),m.return=_,m):(m=r(m,v),m.return=_,m)}function l(_,m,v,p){var E=v.type;return E===Wn?(_=h(_,m,v.props.children,p,v.key),rr(_,v),_):m!==null&&(m.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ar&&Qr(E)===m.type)?(m=r(m,v.props),rr(m,v),m.return=_,m):(m=_c(v.type,v.key,v.props,null,_.mode,p),rr(m,v),m.return=_,m)}function c(_,m,v,p){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=ud(v,_.mode,p),m.return=_,m):(m=r(m,v.children||[]),m.return=_,m)}function h(_,m,v,p,E){return m===null||m.tag!==7?(m=rn(v,_.mode,p,E),m.return=_,m):(m=r(m,v),m.return=_,m)}function u(_,m,v){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=hd(""+m,_.mode,v),m.return=_,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Vl:return v=_c(m.type,m.key,m.props,null,_.mode,v),rr(v,m),v.return=_,v;case la:return m=ud(m,_.mode,v),m.return=_,m;case ar:return m=Qr(m),u(_,m,v)}if(ca(m)||ia(m))return m=rn(m,_.mode,v,null),m.return=_,m;if(typeof m.then=="function")return u(_,tc(m),v);if(m.$$typeof===is)return u(_,ec(_,m),v);ic(_,m)}return null}function d(_,m,v,p){var E=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return E!==null?null:a(_,m,""+v,p);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Vl:return v.key===E?l(_,m,v,p):null;case la:return v.key===E?c(_,m,v,p):null;case ar:return v=Qr(v),d(_,m,v,p)}if(ca(v)||ia(v))return E!==null?null:h(_,m,v,p,null);if(typeof v.then=="function")return d(_,m,tc(v),p);if(v.$$typeof===is)return d(_,m,ec(_,v),p);ic(_,v)}return null}function f(_,m,v,p,E){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return _=_.get(v)||null,a(m,_,""+p,E);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Vl:return _=_.get(p.key===null?v:p.key)||null,l(m,_,p,E);case la:return _=_.get(p.key===null?v:p.key)||null,c(m,_,p,E);case ar:return p=Qr(p),f(_,m,v,p,E)}if(ca(p)||ia(p))return _=_.get(v)||null,h(m,_,p,E,null);if(typeof p.then=="function")return f(_,m,v,tc(p),E);if(p.$$typeof===is)return f(_,m,v,ec(m,p),E);ic(m,p)}return null}function g(_,m,v,p){for(var E=null,A=null,L=m,B=m=0,K=null;L!==null&&B<v.length;B++){L.index>B?(K=L,L=null):K=L.sibling;var $=d(_,L,v[B],p);if($===null){L===null&&(L=K);break}e&&L&&$.alternate===null&&t(_,L),m=n($,m,B),A===null?E=$:A.sibling=$,A=$,L=K}if(B===v.length)return i(_,L),Q&&xs(_,B),E;if(L===null){for(;B<v.length;B++)L=u(_,v[B],p),L!==null&&(m=n(L,m,B),A===null?E=L:A.sibling=L,A=L);return Q&&xs(_,B),E}for(L=s(L);B<v.length;B++)K=f(L,_,B,v[B],p),K!==null&&(e&&($=K.alternate,$!==null&&L.delete($.key===null?B:$.key)),m=n(K,m,B),A===null?E=K:A.sibling=K,A=K);return e&&L.forEach(function(P){return t(_,P)}),Q&&xs(_,B),E}function b(_,m,v,p){if(v==null)throw Error(R(151));for(var E=null,A=null,L=m,B=m=0,K=null,$=v.next();L!==null&&!$.done;B++,$=v.next()){L.index>B?(K=L,L=null):K=L.sibling;var P=d(_,L,$.value,p);if(P===null){L===null&&(L=K);break}e&&L&&P.alternate===null&&t(_,L),m=n(P,m,B),A===null?E=P:A.sibling=P,A=P,L=K}if($.done)return i(_,L),Q&&xs(_,B),E;if(L===null){for(;!$.done;B++,$=v.next())$=u(_,$.value,p),$!==null&&(m=n($,m,B),A===null?E=$:A.sibling=$,A=$);return Q&&xs(_,B),E}for(L=s(L);!$.done;B++,$=v.next())$=f(L,_,B,$.value,p),$!==null&&(e&&(K=$.alternate,K!==null&&L.delete(K.key===null?B:K.key)),m=n($,m,B),A===null?E=$:A.sibling=$,A=$);return e&&L.forEach(function(Rt){return t(_,Rt)}),Q&&xs(_,B),E}function T(_,m,v,p){if(typeof v=="object"&&v!==null&&v.type===Wn&&v.key===null&&v.props.ref===void 0&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Vl:e:{for(var E=v.key;m!==null;){if(m.key===E){if(E=v.type,E===Wn){if(m.tag===7){i(_,m.sibling),p=r(m,v.props.children),rr(p,v),p.return=_,_=p;break e}}else if(m.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ar&&Qr(E)===m.type){i(_,m.sibling),p=r(m,v.props),rr(p,v),p.return=_,_=p;break e}i(_,m);break}else t(_,m);m=m.sibling}v.type===Wn?(p=rn(v.props.children,_.mode,p,v.key),rr(p,v),p.return=_,_=p):(p=_c(v.type,v.key,v.props,null,_.mode,p),rr(p,v),p.return=_,_=p)}return o(_);case la:e:{for(E=v.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){i(_,m.sibling),p=r(m,v.children||[]),p.return=_,_=p;break e}else{i(_,m);break}else t(_,m);m=m.sibling}p=ud(v,_.mode,p),p.return=_,_=p}return o(_);case ar:return v=Qr(v),T(_,m,v,p)}if(ca(v))return g(_,m,v,p);if(ia(v)){if(E=ia(v),typeof E!="function")throw Error(R(150));return v=E.call(v),b(_,m,v,p)}if(typeof v.then=="function")return T(_,m,tc(v),p);if(v.$$typeof===is)return T(_,m,ec(_,v),p);ic(_,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,m!==null&&m.tag===6?(i(_,m.sibling),p=r(m,v),p.return=_,_=p):(i(_,m),p=hd(v,_.mode,p),p.return=_,_=p),o(_)):i(_,m)}return function(_,m,v,p){try{Da=0;var E=T(_,m,v,p);return oo=null,E}catch(L){if(L===Ao||L===gh)throw L;var A=Zt(29,L,null,_.mode);return A.lanes=p,A.return=_,A}}}var dn=x1(!0),C1=x1(!1),lr=!1;function np(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yr(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(le&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Uc(e),m1(e,null,i),t}return fh(e,s,t,i),Uc(e)}function _a(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,F0(e,i)}}function fd(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,n=null;if(i=i.firstBaseUpdate,i!==null){do{var o={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=o:n=n.next=o,i=i.next}while(i!==null);n===null?r=n=t:n=n.next=t}else r=n=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:n,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Jd=!1;function va(){if(Jd){var e=no;if(e!==null)throw e}}function ya(e,t,i,s){Jd=!1;var r=e.updateQueue;lr=!1;var n=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?n=c:o.next=c,o=l;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=l))}if(n!==null){var u=r.baseState;o=0,h=c=l=null,a=n;do{var d=a.lane&-536870913,f=d!==a.lane;if(f?(re&d)===d:(s&d)===d){d!==0&&d===un&&(Jd=!0),h!==null&&(h=h.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var g=e,b=a;d=t;var T=i;switch(b.tag){case 1:if(g=b.payload,typeof g=="function"){u=g.call(T,u,d);break e}u=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,d=typeof g=="function"?g.call(T,u,d):g,d==null)break e;u=ve({},u,d);break e;case 2:lr=!0}}d=a.callback,d!==null&&(e.flags|=64,f&&(e.flags|=8192),f=r.callbacks,f===null?r.callbacks=[d]:f.push(d))}else f={lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=f,l=u):h=h.next=f,o|=d;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;f=a,a=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(!0);h===null&&(l=u),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=h,n===null&&(r.shared.lanes=0),Rr|=o,e.lanes=o,e.memoizedState=u}}function E1(e,t){if(typeof e!="function")throw Error(R(191,e));e.call(t)}function T1(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)E1(i[e],t)}var Ar=cs(null),$c=cs(0);function xv(e,t){e=Ns,Se($c,e),Se(Ar,t),Ns=e|t.baseLanes}function ef(){Se($c,Ns),Se(Ar,Ar.current)}function op(){Ns=$c.current,kt(Ar),kt($c)}var Et=cs(null),Nt=null;function br(e){var t=e.alternate;Se(xt,xt.current&1),Se(Et,e),Nt===null&&(t===null||Ar.current!==null||t.memoizedState!==null)&&(Nt=e)}function tf(e){Se(xt,xt.current),Se(Et,e),Nt===null&&(Nt=e)}function A1(e){e.tag===22?(Se(xt,xt.current),Se(Et,e),Nt===null&&(Nt=e)):wr()}function wr(){Se(xt,xt.current),Se(Et,Et.current)}function ai(e){kt(Et),Nt===e&&(Nt=null),kt(xt)}var xt=cs(0);function Na(e,t){Se(Et,Et.current),Se(xt,t)}function ap(e){kt(xt),kt(Et),Nt===e&&(Nt=null)}function Kc(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||zf(i)||Bp(i)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rs=0,Y=null,ge=null,Ve=null,Wc=!1,ao=!1,fn=!1,Vc=0,Ba=0,lo=null,DC=0;function ze(){throw Error(R(321))}function lp(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!pi(e[i],t[i]))return!1;return!0}function cp(e,t,i,s,r,n){return Rs=n,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,W.H=e===null||e.memoizedState===null?ny:oy,fn=!1,n=i(s,r),fn=!1,ao&&(n=R1(t,i,s,r)),M1(e),n}function M1(e){W.H=jc;var t=ge!==null&&ge.next!==null;if(Rs=0,Ve=ge=Y=null,Wc=!1,Ba=0,lo=null,t)throw Error(R(300));e===null||Ge||(e=e.dependencies,e!==null&&Ic(e)&&(Ge=!0))}function R1(e,t,i,s){Y=e;var r=0;do{if(ao&&(lo=null),Ba=0,ao=!1,25<=r)throw Error(R(301));if(r+=1,Ve=ge=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}W.H=qC,n=t(i,s)}while(ao);return n}function NC(){var e=W.H,t=e.useState()[0];return t=typeof t.then=="function"?Ya(t):t,e=e.useState()[0],(ge!==null?ge.memoizedState:null)!==e&&(Y.flags|=1024),t}function hp(){var e=Vc!==0;return Vc=0,e}function up(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function dp(e){if(Wc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wc=!1}Rs=0,Ve=ge=Y=null,ao=!1,Ba=Vc=0,lo=null}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ve===null?Y.memoizedState=Ve=e:Ve=Ve.next=e,Ve}function $e(){if(ge===null){var e=Y.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=Ve===null?Y.memoizedState:Ve.next;if(t!==null)Ve=t,ge=e;else{if(e===null)throw Y.alternate===null?Error(R(467)):Error(R(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},Ve===null?Y.memoizedState=Ve=e:Ve=Ve.next=e}return Ve}function mh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ya(e){var t=Ba;return Ba+=1,lo===null&&(lo=[]),e=k1(lo,e,t),t=Y,(Ve===null?t.memoizedState:Ve.next)===null&&(t=t.alternate,W.H=t===null||t.memoizedState===null?ny:oy),e}function _h(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ya(e);if(e.$$typeof===p5)return;if(e.$$typeof===is)return St(e)}throw Error(R(438,String(e)))}function fp(e){var t=null,i=Y.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Y.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=mh(),Y.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=f5;return t.index++,i}function Ls(e,t){return typeof t=="function"?t(e):t}function bc(e){var t=$e();return pp(t,ge,e)}function pp(e,t,i){var s=e.queue;if(s===null)throw Error(R(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var o=r.next;r.next=n.next,n.next=o}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var a=o=null,l=null,c=t,h=!1;do{var u=c.lane&-536870913;if(u!==c.lane?(re&u)===u:(Rs&u)===u){var d=c.revertLane;if(d===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),u===un&&(h=!0);else if((Rs&d)===d){c=c.next,d===un&&(h=!0);continue}else u={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(a=l=u,o=n):l=l.next=u,Y.lanes|=d,Rr|=d;u=c.action,fn&&i(n,u),n=c.hasEagerState?c.eagerState:i(n,u)}else d={lane:u,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(a=l=d,o=n):l=l.next=d,Y.lanes|=u,Rr|=u;c=c.next}while(c!==null&&c!==t);if(l===null?o=n:l.next=a,!pi(n,e.memoizedState)&&(Ge=!0,h&&(i=no,i!==null)))throw i;e.memoizedState=n,e.baseState=o,e.baseQueue=l,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function pd(e){var t=$e(),i=t.queue;if(i===null)throw Error(R(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var o=r=r.next;do n=e(n,o.action),o=o.next;while(o!==r);pi(n,t.memoizedState)||(Ge=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function L1(e,t,i){var s=Y,r=$e(),n=Q;if(n){if(i===void 0)throw Error(R(407));i=i()}else i=t();var o=!pi((ge||r).memoizedState,i);if(o&&(r.memoizedState=i,Ge=!0),r=r.queue,gp(B1.bind(null,s,r,e),[e]),e=r.getSnapshot!==t||o||Ve!==null&&(Ve.memoizedState.tag&1)!==0,mo(e?9:8,{destroy:void 0},N1.bind(null,s,r,i,t),null),e){if(s.flags|=2048,_e===null)throw Error(R(349));n||(Rs&127)!==0||D1(s,t,i)}return i}function D1(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Y.updateQueue,t===null?(t=mh(),Y.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function N1(e,t,i,s){t.value=i,t.getSnapshot=s,O1(t)&&z1(e)}function B1(e,t,i){return i(function(){O1(t)&&z1(e)})}function O1(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!pi(e,i)}catch{return!0}}function z1(e){var t=yn(e,2);t!==null&&Qt(t,e,2)}function sf(e){var t=qt();if(typeof e=="function"){var i=e;if(e=i(),fn){hr(!0);try{i()}finally{hr(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ls,lastRenderedState:e},t}function H1(e,t,i,s){return e.baseState=i,pp(e,ge,typeof s=="function"?s:Ls)}function BC(e,t,i,s,r){if(yh(e))throw Error(R(485));if(e=t.action,e!==null){var n={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){n.listeners.push(o)}};W.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,U1(t,n)):(n.next=i.next,t.pending=i.next=n)}}function U1(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=W.T,o={};o.types=n!==null?n.types:null,W.T=o;try{var a=i(r,s),l=W.S;l!==null&&l(o,a),Cv(e,t,a)}catch(c){rf(e,t,c)}finally{n!==null&&o.types!==null&&(n.types=o.types),W.T=n}}else try{n=i(r,s),Cv(e,t,n)}catch(c){rf(e,t,c)}}function Cv(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Ev(e,t,s)},function(s){return rf(e,t,s)}):Ev(e,t,i)}function Ev(e,t,i){t.status="fulfilled",t.value=i,P1(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,U1(e,i)))}function rf(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,P1(t),t=t.next;while(t!==s)}e.action=null}function P1(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function q1(e,t){return t}function Tv(e,t){if(Q){var i=_e.formState;if(i!==null){e:{var s=Y;if(Q){if(we){t:{for(var r=we,n=Mi;r.nodeType!==8;){if(!n){r=null;break t}if(r=Ri(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){we=Ri(r.nextSibling),s=r.data==="F!";break e}}Tr(s)}s=!1}s&&(t=i[0])}}return i=qt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:q1,lastRenderedState:t},i.queue=s,i=iy.bind(null,Y,s),s.dispatch=i,s=sf(!1),n=yp.bind(null,Y,!1,s.queue),s=qt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=BC.bind(null,Y,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function Av(e){var t=$e();return I1(t,ge,e)}function I1(e,t,i){if(t=pp(e,t,q1)[0],e=bc(Ls)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ya(t)}catch(o){throw o===Ao?gh:o}else s=t;t=$e();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Y.flags|=2048,mo(9,{destroy:void 0},OC.bind(null,r,i),null)),[s,n,e]}function OC(e,t){e.action=t}function Mv(e){var t=$e(),i=ge;if(i!==null)return I1(t,i,e);$e(),t=t.memoizedState,i=$e();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function mo(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Y.updateQueue,t===null&&(t=mh(),Y.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function F1(){return $e().memoizedState}function wc(e,t,i,s){var r=qt();Y.flags|=e,r.memoizedState=mo(1|t,{destroy:void 0},i,s===void 0?null:s)}function vh(e,t,i,s){var r=$e();s=s===void 0?null:s;var n=r.memoizedState.inst;ge!==null&&s!==null&&lp(s,ge.memoizedState.deps)?r.memoizedState=mo(t,n,i,s):(Y.flags|=e,r.memoizedState=mo(1|t,n,i,s))}function Rv(e,t){wc(8390656,8,e,t)}function gp(e,t){vh(2048,8,e,t)}function zC(e){Y.flags|=4;var t=Y.updateQueue;if(t===null)t=mh(),Y.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function $1(e){var t=$e().memoizedState;return zC({ref:t,nextImpl:e}),function(){if((le&2)!==0)throw Error(R(440));return t.impl.apply(void 0,arguments)}}function K1(e,t){return vh(4,2,e,t)}function W1(e,t){return vh(4,4,e,t)}function V1(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function j1(e,t,i){i=i!=null?i.concat([e]):null,vh(4,4,V1.bind(null,t,e),i)}function mp(){}function G1(e,t){var i=$e();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&lp(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Y1(e,t){var i=$e();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&lp(t,s[1]))return s[0];if(s=e(),fn){hr(!0);try{e()}finally{hr(!1)}}return i.memoizedState=[s,t],s}function _p(e,t,i){return i===void 0||(Rs&1073741824)!==0&&(re&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Iy(),Y.lanes|=e,Rr|=e,i)}function X1(e,t,i,s){return pi(i,t)?i:Ar.current!==null?(e=_p(e,i,s),pi(e,t)||(Ge=!0),e):(Rs&106)===0||(Rs&1073741824)!==0&&(re&261930)===0?(Ge=!0,e.memoizedState=i):(e=Iy(),Y.lanes|=e,Rr|=e,t)}function Z1(e,t,i,s,r){var n=ce.p;ce.p=n!==0&&8>n?n:8;var o=W.T,a={};a.types=o!==null?o.types:null,W.T=a,yp(e,!1,t,i);try{var l=r(),c=W.S;if(c!==null&&c(a,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var h=LC(l,s);ba(e,t,h,fi(e))}else ba(e,t,s,fi(e))}catch(u){ba(e,t,{then:function(){},status:"rejected",reason:u},fi())}finally{ce.p=n,o!==null&&a.types!==null&&(o.types=a.types),W.T=o}}function HC(){}function nf(e,t,i,s){if(e.tag!==5)throw Error(R(476));var r=Q1(e).queue;Z1(e,r,t,sn,i===null?HC:function(){return J1(e),i(s)})}function Q1(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:sn,baseState:sn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ls,lastRenderedState:sn},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ls,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function J1(e){var t=Q1(e);t.next===null&&(t=e.alternate.memoizedState),ba(e,t.next.queue,{},fi())}function vp(){return St(ko)}function ey(){return $e().memoizedState}function ty(){return $e().memoizedState}function UC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=fi();e=vr(i);var s=yr(t,e,i);s!==null&&(Qt(s,t,i),_a(s,t,i)),t={cache:ip()},e.payload=t;return}t=t.return}}function PC(e,t,i){var s=fi();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},yh(e)?sy(t,i):(i=Jf(e,t,i,s),i!==null&&(Qt(i,e,s),ry(i,t,s)))}function iy(e,t,i){var s=fi();ba(e,t,i,s)}function ba(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(yh(e))sy(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var o=t.lastRenderedState,a=n(o,i);if(r.hasEagerState=!0,r.eagerState=a,pi(a,o))return fh(e,t,r,0),_e===null&&dh(),!1}catch{}if(i=Jf(e,t,r,s),i!==null)return Qt(i,e,s),ry(i,t,s),!0}return!1}function yp(e,t,i,s){if(s={lane:2,revertLane:Rp(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},yh(e)){if(t)throw Error(R(479))}else t=Jf(e,i,s,2),t!==null&&Qt(t,e,2)}function yh(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function sy(e,t){ao=Wc=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function ry(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,F0(e,i)}}var jc={readContext:St,use:_h,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useLayoutEffect:ze,useInsertionEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useSyncExternalStore:ze,useId:ze,useHostTransitionStatus:ze,useFormState:ze,useActionState:ze,useOptimistic:ze,useMemoCache:ze,useCacheRefresh:ze,useEffectEvent:ze},ny={readContext:St,use:_h,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:Rv,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,wc(4194308,4,V1.bind(null,t,e),i)},useLayoutEffect:function(e,t){return wc(4194308,4,e,t)},useInsertionEffect:function(e,t){wc(4,2,e,t)},useMemo:function(e,t){var i=qt();t=t===void 0?null:t;var s=e();if(fn){hr(!0);try{e()}finally{hr(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=qt();if(i!==void 0){var r=i(t);if(fn){hr(!0);try{i(t)}finally{hr(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=PC.bind(null,Y,e),[s.memoizedState,e]},useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:function(e){e=sf(e);var t=e.queue,i=iy.bind(null,Y,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:mp,useDeferredValue:function(e,t){var i=qt();return _p(i,e,t)},useTransition:function(){var e=sf(!1);return e=Z1.bind(null,Y,e.queue,!0,!1),qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Y,r=qt();if(Q){if(i===void 0)throw Error(R(407));i=i()}else{if(i=t(),_e===null)throw Error(R(349));(re&127)!==0||D1(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,Rv(B1.bind(null,s,n,e),[e]),s.flags|=2048,mo(9,{destroy:void 0},N1.bind(null,s,n,i,t),null),i},useId:function(){var e=qt(),t=_e.identifierPrefix;if(Q){var i=ns,s=rs;i=(s&~(1<<32-di(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Vc++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=DC++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vp,useFormState:Tv,useActionState:Tv,useOptimistic:function(e){var t=qt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=yp.bind(null,Y,!0,i),i.dispatch=t,[e,t]},useMemoCache:fp,useCacheRefresh:function(){return qt().memoizedState=UC.bind(null,Y)},useEffectEvent:function(e){var t=qt(),i={impl:e};return t.memoizedState=i,function(){if((le&2)!==0)throw Error(R(440));return i.impl.apply(void 0,arguments)}}},oy={readContext:St,use:_h,useCallback:G1,useContext:St,useEffect:gp,useImperativeHandle:j1,useInsertionEffect:K1,useLayoutEffect:W1,useMemo:Y1,useReducer:bc,useRef:F1,useState:function(){return bc(Ls)},useDebugValue:mp,useDeferredValue:function(e,t){var i=$e();return X1(i,ge.memoizedState,e,t)},useTransition:function(){var e=bc(Ls)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Ya(e),t]},useSyncExternalStore:L1,useId:ey,useHostTransitionStatus:vp,useFormState:Av,useActionState:Av,useOptimistic:function(e,t){var i=$e();return H1(i,ge,e,t)},useMemoCache:fp,useCacheRefresh:ty,useEffectEvent:$1},qC={readContext:St,use:_h,useCallback:G1,useContext:St,useEffect:gp,useImperativeHandle:j1,useInsertionEffect:K1,useLayoutEffect:W1,useMemo:Y1,useReducer:pd,useRef:F1,useState:function(){return pd(Ls)},useDebugValue:mp,useDeferredValue:function(e,t){var i=$e();return ge===null?_p(i,e,t):X1(i,ge.memoizedState,e,t)},useTransition:function(){var e=pd(Ls)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Ya(e),t]},useSyncExternalStore:L1,useId:ey,useHostTransitionStatus:vp,useFormState:Mv,useActionState:Mv,useOptimistic:function(e,t){var i=$e();return ge!==null?H1(i,ge,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:fp,useCacheRefresh:ty,useEffectEvent:$1};function gd(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:ve({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var of={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=fi(),r=vr(s);r.payload=t,i!=null&&(r.callback=i),t=yr(e,r,s),t!==null&&(Qt(t,e,s),_a(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=fi(),r=vr(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=yr(e,r,s),t!==null&&(Qt(t,e,s),_a(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=fi(),s=vr(i);s.tag=2,t!=null&&(s.callback=t),t=yr(e,s,i),t!==null&&(Qt(t,e,i),_a(t,e,i))}};function Lv(e,t,i,s,r,n,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,o):t.prototype&&t.prototype.isPureReactComponent?!Ma(i,s)||!Ma(r,n):!0}function Dv(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&of.enqueueReplaceState(t,t.state,null)}function pn(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=ve({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function ay(e){Hc(e)}function ly(e){console.error(e)}function cy(e){Hc(e)}function Gc(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Nv(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function af(e,t,i){return i=vr(i),i.tag=3,i.payload={element:null},i.callback=function(){Gc(e,t)},i}function hy(e){return e=vr(e),e.tag=3,e}function uy(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var n=s.value;e.payload=function(){return r(n)},e.callback=function(){Nv(t,i,s)}}var o=i.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Nv(t,i,s),typeof r!="function"&&(Sr===null?Sr=new Set([this]):Sr.add(this));var a=s.stack;this.componentDidCatch(s.value,{componentStack:a!==null?a:""})})}function IC(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&cn(t,i,r,!0),i=Et.current,i!==null){switch(i.tag){case 31:case 13:case 19:return Nt===null?ih():i.alternate===null&&He===0&&(He=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===Fc?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Sd(e,s,r)),!1;case 22:return i.flags|=65536,s===Fc?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Sd(e,s,r)),!1}throw Error(R(435,i.tag))}return Sd(e,s,r),ih(),!1}if(Q)return t=Et.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Gd&&(e=Error(R(422),{cause:s}),La(Ai(e,i)))):(s!==Gd&&(t=Error(R(423),{cause:s}),La(Ai(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Ai(s,i),r=af(e.stateNode,s,r),fd(e,r),He!==4&&(He=2)),!1;var n=Error(R(520),{cause:s});if(n=Ai(n,i),xa===null?xa=[n]:xa.push(n),He!==4&&(He=2),t===null)return!0;s=Ai(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=af(i.stateNode,s,e),fd(i,e),!1;case 1:if(t=i.type,n=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(Sr===null||!Sr.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=hy(r),uy(r,e,i,s),fd(i,r),!1;break;case 22:if(i.memoizedState!==null)return i.flags|=65536,!1}i=i.return}while(i!==null);return!1}var bp=Error(R(461)),Ge=!1;function Qe(e,t,i,s){t.child=e===null?C1(t,null,i,s):dn(t,e.child,i,s)}function Bv(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var o={};for(var a in s)a!=="ref"&&(o[a]=s[a])}else o=s;return hn(t),s=cp(e,t,i,o,n,r),a=hp(),e!==null&&!Ge?(up(e,t,r),Ds(e,t,r)):(Q&&a&&ph(t),t.flags|=1,Qe(e,t,s,r),t.child)}function Ov(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!ep(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,dy(e,t,n,s,r)):(e=_c(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Sp(e,r)){var o=n.memoizedProps;if(i=i.compare,i=i!==null?i:Ma,i(o,s)&&e.ref===t.ref)return Ds(e,t,r)}return t.flags|=1,e=Es(n,s),e.ref=t.ref,e.return=t,t.child=e}function dy(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(Ma(n,s)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=s=n,Sp(e,r))(e.flags&131072)!==0&&(Ge=!0);else return t.lanes=e.lanes,Ds(e,t,r)}return lf(e,t,i,s,r)}function fy(e,t,i,s){var r=s.children,n=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(n=n!==null?n.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~n}else s=0,t.child=null;return zv(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yc(t,n!==null?n.cachePool:null),n!==null?xv(t,n):ef(),A1(t);else return s=t.lanes=536870912,zv(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(yc(t,n.cachePool),xv(t,n),wr(),t.memoizedState=null):(e!==null&&yc(t,null),ef(),wr());return Qe(e,t,r,i),t.child}function wa(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function zv(e,t,i,s,r){var n=sp();return n=n===null?null:{parent:je._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&yc(t,null),ef(),A1(t),e!==null&&cn(e,t,s,!0),t.childLanes=r,null}function Sc(e,t){return t=bh({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hv(e,t,i){return dn(t,e.child,null,i),e=Sc(t,t.pendingProps),e.flags|=2,ai(t),t.memoizedState=null,e}function FC(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Q){if(s.mode==="hidden")return e=Sc(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},wa(null,e);if(tf(t),(e=we)?(e=fb(e,Mi),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Er!==null?{id:rs,overflow:ns}:null,retryLane:536870912,hydrationErrors:null},i=v1(e),i.return=t,t.child=i,lt=t,we=null)):e=null,e===null)throw Tr(t);return t.lanes=536870912,null}return Sc(t,s)}var n=e.memoizedState;if(n!==null){var o=n.dehydrated;if(tf(t),r)if(t.flags&256)t.flags&=-257,t=Hv(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(R(558));else if(Ge||cn(e,t,i,!1),r=(i&e.childLanes)!==0,Ge||r){if(Ar.current===null){if(s=_e,s!==null&&(o=$0(s,i),o!==0&&o!==n.retryLane))throw n.retryLane=o,yn(e,o),Qt(s,e,o),bp;ih()}t=Hv(e,t,i)}else e=n.treeContext,we=Ri(o.nextSibling),lt=t,Q=!0,_r=null,Mi=!1,e!==null&&b1(t,e),t=Sc(t,s),t.flags|=134221824;return t}return e=Es(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function In(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(R(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function lf(e,t,i,s,r){return hn(t),i=cp(e,t,i,s,void 0,r),s=hp(),e!==null&&!Ge?(up(e,t,r),Ds(e,t,r)):(Q&&s&&ph(t),t.flags|=1,Qe(e,t,i,r),t.child)}function Uv(e,t,i,s,r,n){return hn(t),t.updateQueue=null,i=R1(t,s,i,r),M1(e),s=hp(),e!==null&&!Ge?(up(e,t,n),Ds(e,t,n)):(Q&&s&&ph(t),t.flags|=1,Qe(e,t,i,n),t.child)}function Pv(e,t,i,s,r){if(hn(t),t.stateNode===null){var n=Qn,o=i.contextType;typeof o=="object"&&o!==null&&(n=St(o)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=of,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},np(t),o=i.contextType,n.context=typeof o=="object"&&o!==null?St(o):Qn,n.state=t.memoizedState,o=i.getDerivedStateFromProps,typeof o=="function"&&(gd(t,i,o,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(o=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),o!==n.state&&of.enqueueReplaceState(n,n.state,null),ya(t,s,n,r),va(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var a=t.memoizedProps,l=pn(i,a);n.props=l;var c=n.context,h=i.contextType;o=Qn,typeof h=="object"&&h!==null&&(o=St(h));var u=i.getDerivedStateFromProps;h=typeof u=="function"||typeof n.getSnapshotBeforeUpdate=="function",a=t.pendingProps!==a,h||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(a||c!==o)&&Dv(t,n,s,o),lr=!1;var d=t.memoizedState;n.state=d,ya(t,s,n,r),va(),c=t.memoizedState,a||d!==c||lr?(typeof u=="function"&&(gd(t,i,u,s),c=t.memoizedState),(l=lr||Lv(t,i,l,s,d,c,o))?(h||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount()),typeof n.componentDidMount=="function"&&(t.flags|=4194308)):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=c),n.props=s,n.state=c,n.context=o,s=l):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,Qd(e,t),o=t.memoizedProps,h=pn(i,o),n.props=h,u=t.pendingProps,d=n.context,c=i.contextType,l=Qn,typeof c=="object"&&c!==null&&(l=St(c)),a=i.getDerivedStateFromProps,(c=typeof a=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(o!==u||d!==l)&&Dv(t,n,s,l),lr=!1,d=t.memoizedState,n.state=d,ya(t,s,n,r),va();var f=t.memoizedState;o!==u||d!==f||lr||e!==null&&e.dependencies!==null&&Ic(e.dependencies)?(typeof a=="function"&&(gd(t,i,a,s),f=t.memoizedState),(h=lr||Lv(t,i,h,s,d,f,l)||e!==null&&e.dependencies!==null&&Ic(e.dependencies))?(c||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,f,l),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,f,l)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=f),n.props=s,n.state=f,n.context=l,s=h):(typeof n.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,In(e,t),s=(t.flags&128)!==0,n||s?(n=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:n.render(),t.flags|=1,e!==null&&s?(t.child=dn(t,e.child,null,r),t.child=dn(t,null,i,r)):Qe(e,t,i,r),t.memoizedState=n.state,e=t.child):e=Ds(e,t,r),e}function qv(e,t,i,s){return ln(),t.flags|=256,Qe(e,t,i,s),t.child}var cf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hf(e){return{baseLanes:e,cachePool:S1()}}function uf(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=ci),e}function py(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,o;if((o=n)||(o=e!==null&&e.memoizedState===null?!1:(xt.current&2)!==0),o&&(r=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Q){if(r?br(t):wr(),(e=we)?(e=fb(e,Mi),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Er!==null?{id:rs,overflow:ns}:null,retryLane:536870912,hydrationErrors:null},i=v1(e),i.return=t,t.child=i,lt=t,we=null)):e=null,e===null)throw Tr(t);return Bp(e)?t.lanes=32:t.lanes=536870912,null}return n=s.children,s=s.fallback,r?(wr(),r=t.mode,n=bh({mode:"hidden",children:n},r),s=rn(s,r,i,null),n.return=t,s.return=t,n.sibling=s,t.child=n,s=t.child,s.memoizedState=hf(i),s.childLanes=uf(e,o,i),t.memoizedState=cf,wa(null,s)):(br(t),wp(t,n))}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(l!==null)return $C(e,t,n,o,s,l,a,i)}return r?(wr(),r=s.fallback,n=t.mode,a=e.child,l=a.sibling,s=Es(a,{mode:"hidden",children:s.children}),s.subtreeFlags=a.subtreeFlags&1206910976,l!==null?r=Es(l,r):(r=rn(r,n,i,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,wa(null,s),s=t.child,r=e.child.memoizedState,r===null?r=hf(i):(n=r.cachePool,n!==null?(a=je._currentValue,n=n.parent!==a?{parent:a,pool:a}:n):n=S1(),r={baseLanes:r.baseLanes|i,cachePool:n}),s.memoizedState=r,s.childLanes=uf(e,o,i),t.memoizedState=cf,wa(e.child,s)):(br(t),i=e.child,e=i.sibling,i=Es(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=i,t.memoizedState=null,i)}function wp(e,t){return t=bh({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function bh(e,t){return e=Zt(22,e,null,t),e.lanes=0,e}function sc(e,t,i){return dn(t,e.child,null,i),e=wp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $C(e,t,i,s,r,n,o,a){if(i)return t.flags&256?(br(t),t.flags&=-257,sc(e,t,a)):t.memoizedState!==null?(wr(),t.child=e.child,t.flags|=128,null):(wr(),n=r.fallback,o=t.mode,r=bh({mode:"visible",children:r.children},o),n=rn(n,o,a,null),n.flags|=2,r.return=t,n.return=t,r.sibling=n,t.child=r,dn(t,e.child,null,a),r=t.child,r.memoizedState=hf(a),r.childLanes=uf(e,s,a),t.memoizedState=cf,wa(null,r));if(br(t),Bp(n)){if(s=n.nextSibling&&n.nextSibling.dataset,s)var l=s.dgst;return s=l,s!==""&&(r=Error(R(419)),r.stack="",r.digest=s,La({value:r,source:null,stack:null})),sc(e,t,a)}if(Ge||cn(e,t,a,!1),s=(a&e.childLanes)!==0,Ge||s){if(Ar.current!==null)return sc(e,t,a);if(s=_e,s!==null&&(r=$0(s,a),r!==0&&r!==o.retryLane))throw o.retryLane=r,yn(e,r),Qt(s,e,r),bp;return zf(n)||ih(),sc(e,t,a)}return zf(n)?(t.flags|=192,t.child=e.child,null):(e=o.treeContext,we=Ri(n.nextSibling),lt=t,Q=!0,_r=null,Mi=!1,e!==null&&b1(t,e),t=wp(t,r.children),t.flags|=134221824,t)}function Iv(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),vc(e.return,t,i)}function Fv(e){for(var t=null;e!==null;){var i=e.alternate;i!==null&&Kc(i)===null&&(t=e),e=e.sibling}return t}function rc(e,t,i,s,r,n){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=s,o.tail=i,o.tailMode=r,o.treeForkCount=n)}function md(e){var t=e.child;for(e.child=null;t!==null;){var i=t.sibling;t.sibling=e.child,e.child=t,t=i}}function df(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var o=xt.current;if(t.flags&128)return Na(t,o),null;var a=(o&2)!==0;if(a?(o=o&1|2,t.flags|=128):o&=1,Na(t,o),r==="backwards"&&e!==null?(md(e),Qe(e,t,s,i),md(e)):Qe(e,t,s,i),s=Q?Ra:0,!a&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Iv(e,i,t);else if(e.tag===19)Iv(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"backwards":i=Fv(t.child),i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null,md(t)),rc(t,!0,r,null,n,s);break;case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Kc(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}rc(t,!0,i,null,n,s);break;case"together":rc(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:i=Fv(t.child),i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),rc(t,!1,r,i,n,s)}return t.child}function $v(e,t,i){var s=t.pendingProps;return dr(t,t.type,s.value),Qe(e,t,s.children,i),t.child}function Ds(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Rr|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(cn(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,i=Es(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Es(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Sp(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ic(e)))}function KC(e,t,i){switch(t.tag){case 3:Nc(t,t.stateNode.containerInfo),dr(t,je,e.memoizedState.cache),ln();break;case 27:case 5:Ud(t);break;case 4:Nc(t,t.stateNode.containerInfo);break;case 10:dr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,tf(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return br(t),t.flags|=128,null;s=cn(e,t,i,!1);var r=t.child.childLanes;return s||(i&r)!==0?py(e,t,i):(br(t),e=Ds(e,t,i),e!==null?e.sibling:null)}br(t);break;case 19:if(t.flags&128)return df(e,t,i);if(r=(e.flags&128)!==0,s=(i&t.childLanes)!==0,s||(cn(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return df(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Na(t,xt.current),s)break;return null;case 22:return t.lanes=0,fy(e,t,i,t.pendingProps);case 24:dr(t,je,e.memoizedState.cache)}return Ds(e,t,i)}function gy(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ge=!0;else{if(!Sp(e,i)&&(t.flags&128)===0)return Ge=!1,KC(e,t,i);Ge=(e.flags&131072)!==0}else Ge=!1,Q&&(t.flags&1048576)!==0&&y1(t,Ra,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Qr(t.elementType),t.type=e,typeof e=="function")ep(e)?(s=pn(e,s),t.tag=1,t=Pv(null,t,e,s,i)):(t.tag=0,t=lf(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===If){t.tag=11,t=Bv(null,t,e,s,i);break e}else if(r===Ff){t.tag=14,t=Ov(null,t,e,s,i);break e}else if(r===is){t.tag=10,t.type=e,t=$v(null,t,i);break e}}throw t=zd(e)||e,Error(R(306,t,""))}}return t;case 0:return lf(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=pn(s,t.pendingProps),Pv(e,t,s,r,i);case 3:e:{if(Nc(t,t.stateNode.containerInfo),e===null)throw Error(R(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,Qd(e,t),ya(t,s,null,i);var o=t.memoizedState;if(s=o.cache,dr(t,je,s),s!==n.cache&&Xd(t,[je],i,!0),va(),s=o.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=qv(e,t,s,i);break e}else if(s!==r){r=Ai(Error(R(424)),t),La(r),t=qv(e,t,s,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,we=Ri(e.firstChild),lt=t,Q=!0,_r=null,Mi=!0,i=C1(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|134221824,i=i.sibling;else{if(ln(),s===r){t=Ds(e,t,i);break e}Qe(e,t,s,i)}t=t.child}return t;case 26:return In(e,t),e===null?(i=m0(t.type,null,t.pendingProps,null))?t.memoizedState=i:Q||(t.stateNode=rb(t.type,t.pendingProps,mr.current,t)):t.memoizedState=m0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ud(t),e===null&&Q&&(s=t.stateNode=pb(t.type,t.pendingProps,mr.current),lt=t,Mi=!0,r=we,Dr(t.type)?(Hf=r,we=Ri(s.firstChild)):we=r),Qe(e,t,t.pendingProps.children,i),In(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Q&&((r=s=we)&&(s=z3(s,t.type,t.pendingProps,Mi),s!==null?(t.stateNode=s,lt=t,we=Ri(s.firstChild),Mi=!1,r=!0):r=!1),r||Tr(t)),Ud(t),r=t.type,n=t.pendingProps,o=e!==null?e.memoizedProps:null,s=n.children,Nf(r,n)?s=null:o!==null&&Nf(r,o)&&(t.flags|=32),t.memoizedState!==null&&(r=cp(e,t,NC,null,null,i),ko._currentValue=r),In(e,t),Qe(e,t,s,i),t.child;case 6:return e===null&&Q&&((e=i=we)&&(i=H3(i,t.pendingProps,Mi),i!==null?(t.stateNode=i,lt=t,we=null,e=!0):e=!1),e||Tr(t)),null;case 13:return py(e,t,i);case 4:return Nc(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=dn(t,null,s,i):Qe(e,t,s,i),t.child;case 11:return Bv(e,t,t.type,t.pendingProps,i);case 7:return s=t.pendingProps,In(e,t),Qe(e,t,s,i),t.child;case 8:return Qe(e,t,t.pendingProps.children,i),t.child;case 12:return Qe(e,t,t.pendingProps.children,i),t.child;case 10:return $v(e,t,i);case 9:return r=t.type._context,s=t.pendingProps.children,hn(t),r=St(r),s=s(r),t.flags|=1,Qe(e,t,s,i),t.child;case 14:return Ov(e,t,t.type,t.pendingProps,i);case 15:return dy(e,t,t.type,t.pendingProps,i);case 19:return df(e,t,i);case 31:return FC(e,t,i);case 22:return fy(e,t,i,t.pendingProps);case 24:return hn(t),s=St(je),e===null?(r=sp(),r===null&&(r=_e,n=ip(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},np(t),dr(t,je,r)):((e.lanes&i)!==0&&(Qd(e,t),ya(t,null,null,i),va()),r=e.memoizedState,n=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),dr(t,je,s)):(s=n.cache,dr(t,je,s),s!==r.cache&&Xd(t,[je],i,!0))),Qe(e,t,t.pendingProps.children,i),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=t.pendingProps,s.name!=null&&s.name!=="auto"?t.flags|=e===null?18882560:18874368:Q&&ph(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:In(e,t),Qe(e,t,s.children,i),t.child;case 29:throw t.pendingProps}throw Error(R(156,t.tag))}function ks(e){e.flags|=4}function _d(e,t,i,s,r){var n;if((n=(e.mode&32)!==0)&&(n=i===null?y0(t,s):y0(t,s)&&(s.src!==i.src||s.srcSet!==i.srcSet)),n){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Ky())e.flags|=8192;else throw on=Fc,rp}else e.flags&=-16777217}function Kv(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!vb(t))if(Ky())e.flags|=8192;else throw on=Fc,rp}function nc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?q0():536870912,e.lanes|=t,_o|=t)}function ra(e,t){if(!Q)switch(e.tailMode){case"visible":break;case"collapsed":for(var i=e.tail,s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null;break;default:for(t=e.tail,i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null}}function be(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&1206910976,s|=r.flags&1206910976,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function WC(e,t,i){var s=t.pendingProps;switch(tp(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return be(t),null;case 1:return be(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ts(je),fo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Pn(t)?ks(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,dd())),be(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(ks(t),n!==null?(be(t),Kv(t,n)):(be(t),_d(t,r,null,s,i))):n?n!==e.memoizedState?(ks(t),be(t),Kv(t,n)):(be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ks(t),be(t),_d(t,r,e,s,i)),null;case 27:if(Bc(t),i=mr.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ks(t);else{if(!s){if(t.stateNode===null)throw Error(R(166));return be(t),t.subtreeFlags&=-33554433,null}e=os.current,Pn(t)?_v(t,e):(e=pb(r,s,i),t.stateNode=e,ks(t))}return be(t),t.subtreeFlags&=-33554433,null;case 5:if(Bc(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ks(t);else{if(!s){if(t.stateNode===null)throw Error(R(166));return be(t),t.subtreeFlags&=-33554433,null}if(n=os.current,Pn(t))_v(t,n);else{var o=Ha(mr.current);switch(n){case 1:n=o.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=o.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=o.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=o.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=o.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?o.createElement("select",{is:s.is}):o.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?o.createElement(r,{is:s.is}):o.createElement(r)}}n[wt]=t,n[ei]=s;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)n.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=n;e:switch(Ct(n,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&ks(t)}}return be(t),t.subtreeFlags&=-33554433,_d(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&ks(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(R(166));if(e=mr.current,Pn(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=lt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[wt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||ib(e.nodeValue,i)),e||Tr(t,!0)}else e=Ha(e).createTextNode(s),e[wt]=t,t.stateNode=e}return be(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Pn(t),i!==null){if(e===null){if(!s)throw Error(R(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(557));e[wt]=t}else ln(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;be(t),e=!1}else i=dd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(ai(t),t):(ai(t),null);if((t.flags&128)!==0)throw Error(R(558))}return be(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Pn(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(R(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(R(317));r[wt]=t}else ln(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;be(t),r=!1}else r=dd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ai(t),t):(ai(t),null)}return ai(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),nc(t,t.updateQueue),be(t),null);case 4:return fo(),e===null&&Lp(t.stateNode.containerInfo),t.flags|=67108864,be(t),null;case 10:return Ts(t.type),be(t),null;case 19:if(ap(t),s=t.memoizedState,s===null)return be(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)ra(s,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=Kc(e),n!==null){for(t.flags|=128,ra(s,!1),e=n.updateQueue,t.updateQueue=e,nc(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)_1(i,e),i=i.sibling;return Na(t,xt.current&1|2),Q&&xs(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&hi()>eh&&(t.flags|=128,r=!0,ra(s,!1),t.lanes=4194304)}else{if(!r)if(e=Kc(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,nc(t,e),ra(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!n.alternate&&!Q)return be(t),null}else 2*hi()-s.renderingStartTime>eh&&i!==536870912&&(t.flags|=128,r=!0,ra(s,!1),t.lanes=4194304);s.isBackwards?(n.sibling=t.child,t.child=n):(e=s.last,e!==null?e.sibling=n:t.child=n,s.last=n)}if(s.tail!==null){e=s.tail;e:{for(i=e;i!==null;){if(i.alternate!==null){i=!1;break e}i=i.sibling}i=!0}return s.rendering=e,s.tail=e.sibling,s.renderingStartTime=hi(),e.sibling=null,n=xt.current,n=r?n&1|2:n&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!i||Q?Na(t,n):(i=n,Se(Et,t),Se(xt,i),Nt===null&&(Nt=t)),Q&&xs(t,s.treeForkCount),e}return be(t),null;case 22:case 23:return ai(t),op(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(be(t),t.subtreeFlags&6&&(t.flags|=8192)):be(t),i=t.updateQueue,i!==null&&nc(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&kt(nn),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ts(je),be(t),null;case 25:return null;case 30:return t.flags|=33554432,be(t),null}throw Error(R(156,t.tag))}function VC(e,t){switch(tp(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ts(je),fo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Bc(t),null;case 31:if(t.memoizedState!==null){if(ai(t),t.alternate===null)throw Error(R(340));ln()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ai(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ln()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ap(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return fo(),null;case 10:return Ts(t.type),null;case 22:case 23:return ai(t),op(),e!==null&&kt(nn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ts(je),null;case 25:return null;default:return null}}function my(e,t){switch(tp(t),t.tag){case 3:Ts(je),fo();break;case 26:case 27:case 5:Bc(t);break;case 4:fo();break;case 31:t.memoizedState!==null&&ai(t);break;case 13:ai(t);break;case 19:ap(t);break;case 10:Ts(t.type);break;case 22:case 23:ai(t),op(),e!==null&&kt(nn);break;case 24:Ts(je)}}function Xa(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var n=i.create,o=i.inst;s=n(),o.destroy=s}i=i.next}while(i!==r)}}catch(a){pe(t,t.return,a)}}function Mr(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var n=r.next;s=n;do{if((s.tag&e)===e){var o=s.inst,a=o.destroy;if(a!==void 0){o.destroy=void 0,r=t;var l=i,c=a;try{c()}catch(h){pe(r,l,h)}}}s=s.next}while(s!==n)}}catch(h){pe(t,t.return,h)}}function _y(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{T1(t,i)}catch(s){pe(e,e.return,s)}}}function vy(e,t,i){i.props=pn(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){pe(e,t,s)}}function es(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:var r=e.stateNode,n=Ms(e.memoizedProps,r);(r.ref===null||r.ref.name!==n)&&(r.ref=lb(n)),s=r.ref;break;case 7:if(e.stateNode===null){var o=new gi(e);Jt(e.child,!1,B3,o,void 0,void 0),e.stateNode=o}s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(a){pe(e,t,a)}}function bt(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){pe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){pe(e,t,r)}else i.current=null}function Yc(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var i=0;i<t.length;i++)db(e.stateNode,t[i])}function Wv(e){for(var t=e.return;t!==null&&(xp(t)&&db(e.stateNode,t.stateNode),!kp(t));)t=t.return}function Sa(e){for(var t=e.return;t!==null&&(xp(t)&&O3(e.stateNode,t.stateNode),!kp(t));)t=t.return}function kp(e){return e.tag===5||e.tag===3||e.tag===27}function xp(e){return e&&e.tag===7&&e.stateNode!==null}function ff(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){pe(e,e.return,r)}}function vd(e,t,i){try{var s=e.stateNode;m3(s,e.type,i,t),s[ei]=t}catch(r){pe(e,e.return,r)}}function yy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dr(e.type)||e.tag===4}function yd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Dr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pf(e,t,i,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(r,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(r),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=ss)),Yc(e,s),ae=!0;else if(r!==4&&(r===27&&(Yc(e,s),s=null,Dr(e.type)&&(i=e.stateNode,t=null)),e=e.child,e!==null))for(pf(e,t,i,s),e=e.sibling;e!==null;)pf(e,t,i,s),e=e.sibling}function Xc(e,t,i,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?i.insertBefore(r,t):i.appendChild(r),Yc(e,s),ae=!0;else if(r!==4&&(r===27&&(Yc(e,s),s=null,Dr(e.type)&&(i=e.stateNode)),e=e.child,e!==null))for(Xc(e,t,i,s),e=e.sibling;e!==null;)Xc(e,t,i,s),e=e.sibling}function by(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Ct(t,s,i),t[wt]=e,t[ei]=i}catch(n){pe(e,e.return,n)}}var Zc=!1,li=null;function Vv(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Zc=!0)}var ts=null;function jv(){var e=ts;return ts=null,e}var Xt=0;function Mo(e,t,i,s,r){return Xt=0,wy(e.child,t,i,s,r)}function wy(e,t,i,s,r){for(var n=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(s!==null){var a=Bf(o);s.push(a),a.view&&(n=!0)}else n||Bf(o).view&&(n=!0);Zc=!0,nb(o,Xt===0?t:t+"_"+Xt,i),Xt++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&r||wy(e.child,t,i,s,r)&&(n=!0));e=e.sibling}return n}function ls(e,t){for(;e!==null;)e.tag===5?ob(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||ls(e.child,t)),e=e.sibling}function kc(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(kc(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(R(544));var i=t.name;t=Os(t.default,t.share),t!=="none"&&(Mo(e,i,t,null,!1)||ls(e.child,!1))}e=e.sibling}}function gf(e,t){if(e.tag===30){var i=e.stateNode,s=e.memoizedProps,r=Ms(s,i),n=Os(s.default,i.paired?s.share:s.enter);n!=="none"?Mo(e,r,n,null,!1)?(kc(e),i.paired||t||vo(e,s.onEnter)):ls(e.child,!1):kc(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)gf(e,t),e=e.sibling;else kc(e)}function mf(e){if(li!==null&&li.size!==0){var t=li;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var i=e.memoizedProps,s=i.name;if(s!=null&&s!=="auto"){var r=t.get(s);if(r!==void 0){var n=Os(i.default,i.share);if(n!=="none"&&(Mo(e,s,n,null,!1)?(n=e.stateNode,r.paired=n,n.paired=r,vo(e,i.onShare)):ls(e.child,!1)),t.delete(s),t.size===0)break}}}mf(e)}e=e.sibling}}}function _f(e){if(e.tag===30){var t=e.memoizedProps,i=Ms(t,e.stateNode),s=li!==null?li.get(i):void 0,r=Os(t.default,s!==void 0?t.share:t.exit);r!=="none"&&(Mo(e,i,r,null,!1)?s!==void 0?(r=e.stateNode,s.paired=r,r.paired=s,li.delete(i),vo(e,t.onShare)):vo(e,t.onExit):ls(e.child,!1)),li!==null&&mf(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)_f(e),e=e.sibling;else li!==null&&mf(e)}function Sy(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,i=Ms(t,e.stateNode);t=Os(t.default,t.update),e.flags&=-5,t!=="none"&&Mo(e,i,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Sy(e);e=e.sibling}}function vf(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,ls(e.child,!1))}vf(e)}e=e.sibling}}function xc(e){if(e.tag===30)e.stateNode.paired=null,ls(e.child,!1),vf(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)xc(e),e=e.sibling;else vf(e)}function ky(e){for(e=e.child;e!==null;)e.tag===30?ls(e.child,!1):(e.subtreeFlags&33554432)!==0&&ky(e),e=e.sibling}function Cp(e,t,i,s,r,n,o){for(var a=!1;t!==null;){if(t.tag===5){var l=t.stateNode;if(n!==null&&Xt<n.length){var c=n[Xt],h=Bf(l);(c.view||h.view)&&(a=!0);var u;if(u=(e.flags&4)===0)if(h.clip)u=!0;else{u=c.rect;var d=h.rect;u=u.y!==d.y||u.x!==d.x||u.height!==d.height||u.width!==d.width}u&&(e.flags|=4),h.abs?h=!c.abs:(c=c.rect,h=h.rect,h=c.height!==h.height||c.width!==h.width),h&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&nb(l,Xt===0?i:i+"_"+Xt,r),a&&(e.flags&4)!==0||(ts===null&&(ts=[]),ts.push(l,Xt===0?s:s+"_"+Xt,t.memoizedProps)),Xt++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Cp(e,t.child,i,s,r,n,o)&&(a=!0));t=t.sibling}return a}function xy(e,t){for(e=e.child;e!==null;){if(e.tag===30){var i=e.memoizedProps,s=e.stateNode,r=Ms(i,s),n=Os(i.default,i.update);if(t){s=s.clones;var o=s===null?null:s.map(S3)}else o=e.memoizedState,e.memoizedState=null;s=e;var a=e.child;Xt=0,r=Cp(s,a,r,r,n,o,!1),(e.flags&4)!==0&&r&&(t||vo(e,i.onUpdate))}else(e.subtreeFlags&33554432)!==0&&xy(e,t);e=e.sibling}}var nt=!1,ue=!1,Zi=!1,bd=!1,Gv=typeof WeakSet=="function"?WeakSet:Set,ot=null,Qi=!1,da=!1,Qc=!1,yf=!1;function jC(e,t,i){if(e=e.containerInfo,Lf=xo,e=c1(e),Zf(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var n=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{s.nodeType,o.nodeType}catch{s=null;break e}var a=0,l=-1,c=-1,h=0,u=0,d=e,f=null;t:for(;;){for(var g;d!==s||n!==0&&d.nodeType!==3||(l=a+n),d!==o||r!==0&&d.nodeType!==3||(c=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(g=d.firstChild)!==null;)f=d,d=g;for(;;){if(d===e)break t;if(f===s&&++h===n&&(l=a),f===o&&++u===r&&(c=a),(g=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=g}s=l===-1||c===-1?null:{start:l,end:c}}else s=null}s=s||{start:0,end:0}}else s=null;for(Df={focusedElem:e,selectionRange:s},xo=!1,i=(i&335544064)===i,ot=t,t=i?9270:1024;ot!==null;){if(e=ot,i&&(s=e.deletions,s!==null))for(n=0;n<s.length;n++)i&&_f(s[n]);if(e.alternate===null&&(e.flags&2)!==0)i&&Vv(e),oc(i);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&i&&_f(s),oc(i);continue}else if(s!==null&&s.memoizedState!==null){i&&Vv(e),oc(i);continue}}s=e.child,(e.subtreeFlags&t)!==0&&s!==null?(s.return=e,ot=s):(i&&Sy(e),oc(i))}}li=null}function oc(e){for(;ot!==null;){var t=ot,i=e,s=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((r&1024)!==0&&s!==null){i=void 0,r=s.memoizedProps,s=s.memoizedState;var n=t.stateNode;try{var o=pn(t.type,r);i=n.getSnapshotBeforeUpdate(o,s),n.__reactInternalSnapshotBeforeUpdate=i}catch(a){pe(t,t.return,a)}}break;case 3:if((r&1024)!==0){if(s=t.stateNode.containerInfo,i=s.nodeType,i===9)Of(s);else if(i===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Of(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:i&&s!==null&&(i=Ms(s.memoizedProps,s.stateNode),r=t.memoizedProps,r=Os(r.default,r.update),r!=="none"&&Mo(s,i,r,s.memoizedState=[],!0));break;default:if((r&1024)!==0)throw Error(R(163))}if(s=t.sibling,s!==null){s.return=t.return,ot=s;break}ot=t.return}}function Cy(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Ji(e,i),s&4&&Xa(5,i);break;case 1:if(Ji(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(o){pe(i,i.return,o)}else{var r=pn(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){pe(i,i.return,o)}}s&64&&_y(i),s&512&&es(i,i.return);break;case 3:if(Ji(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{T1(e,t)}catch(o){pe(i,i.return,o)}}break;case 27:t===null&&s&4&&by(i);case 26:case 5:Ji(e,i),t===null&&s&4&&ff(i),s&512&&es(i,i.return);break;case 12:Ji(e,i);break;case 31:Ji(e,i),s&4&&My(e,i);break;case 13:Ji(e,i),s&4&&Ry(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=n3.bind(null,i),U3(e,i))));break;case 22:if(s=i.memoizedState!==null||nt,!s){var n=t!==null&&t.memoizedState!==null||ue;t=nt,r=ue,nt=s,(ue=n)&&!r?(s=2,(i.subtreeFlags&8772)!==0&&(s|=1),qi(e,i,s)):Ji(e,i),nt=t,ue=r}break;case 30:Ji(e,i),s&512&&es(i,i.return);break;case 7:s&512&&es(i,i.return);default:Ji(e,i)}}function bf(e,t){for(e=e.child;e!==null;)Ey(e,t),e=e.sibling}function Ey(e,t){switch(e.tag){case 5:case 26:try{var i=e.stateNode;if(t){var s=i.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var r=e.stateNode,n=e.memoizedProps.style,o=n!=null&&n.hasOwnProperty("display")?n.display:null;r.style.display=o==null||typeof o=="boolean"?"":(""+o).trim()}}catch(l){pe(e,e.return,l)}wf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,ae=!0}catch(l){pe(e,e.return,l)}break;case 18:try{var a=e.stateNode;t?h0(a,!0):h0(e.stateNode,!1)}catch(l){pe(e,e.return,l)}break;case 22:case 23:e.memoizedState===null&&bf(e,t);break;default:bf(e,t)}}function wf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var i=e,s=t;switch(i.tag){case 4:Ey(i,s);break e;case 22:i.memoizedState===null&&wf(i,s);break e;default:wf(i,s)}}e=e.sibling}}function Ty(e){var t=e.alternate;t!==null&&(e.alternate=null,Ty(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&lh(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Me=null,Gt=!1;function Pi(e,t,i){for(i=i.child;i!==null;)Ay(e,t,i),i=i.sibling}function Ay(e,t,i){if(ui&&typeof ui.onCommitFiberUnmount=="function")try{ui.onCommitFiberUnmount($a,i)}catch{}switch(i.tag){case 26:ue||bt(i,t),Pi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&!ue&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ue||bt(i,t),Sa(i);var s=Me,r=Gt;Dr(i.type)&&(Me=i.stateNode,Gt=!1),Pi(e,t,i),gb(i.stateNode,i.type,i.memoizedProps),Me=s,Gt=r;break;case 5:ue||bt(i,t),Sa(i);case 6:if(i.tag===6&&Sa(i),s=Me,r=Gt,Me=null,Pi(e,t,i),Me=s,Gt=r,Me!==null)if(Gt)try{(Me.nodeType===9?Me.body:Me.nodeName==="HTML"?Me.ownerDocument.body:Me).removeChild(i.stateNode),ae=!0}catch(n){pe(i,t,n)}else try{Me.removeChild(i.stateNode),ae=!0}catch(n){pe(i,t,n)}break;case 18:Me!==null&&(Gt?(e=Me,c0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Co(e)):c0(Me,i.stateNode));break;case 4:s=Me,r=Gt,Me=i.stateNode.containerInfo,Gt=!0,Pi(e,t,i),Me=s,Gt=r;break;case 0:case 11:case 14:case 15:Mr(2,i,t),ue||Mr(4,i,t),Pi(e,t,i);break;case 1:ue||(bt(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&vy(i,t,s)),Pi(e,t,i);break;case 21:Pi(e,t,i);break;case 22:ue=(s=ue)||i.memoizedState!==null,Pi(e,t,i),ue=s;break;case 30:bt(i,t),Pi(e,t,i);break;case 7:ue||bt(i,t),Pi(e,t,i);break;default:Pi(e,t,i)}}function My(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Co(e)}catch(i){pe(t,t.return,i)}}}function Ry(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Co(e)}catch(i){pe(t,t.return,i)}}function GC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Gv),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Gv),t;default:throw Error(R(435,e.tag))}}function ac(e,t){var i=GC(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=o3.bind(null,e,s);s.then(r,r)}})}function Ut(e,t,i){var s=t.deletions;if(s!==null)for(var r=0;r<s.length;r++){var n=s[r],o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 27:if(Dr(l.type)){Me=l.stateNode,Gt=!1;break e}break;case 5:Me=l.stateNode,Gt=!1;break e;case 3:case 4:Me=l.stateNode.containerInfo,Gt=!0;break e}l=l.return}if(Me===null)throw Error(R(160));Ay(o,a,n),Me=null,Gt=!1,o=n.alternate,o!==null&&(o.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ly(t,e,i),t=t.sibling}var Ii=null;function Ly(e,t,i){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(r&4&&(s=e.updateQueue,s=s!==null?s.events:null,s!==null))for(var n=0;n<s.length;n++){var o=s[n];o.ref.impl=o.nextImpl}Ut(t,e,i),Pt(e),r&4&&(Mr(3,e,e.return),Xa(3,e),Mr(5,e,e.return));break;case 1:Ut(t,e,i),Pt(e),r&512&&(ue||s===null||bt(s,s.return)),r&64&&nt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?t:i.concat(t))));break;case 26:if(n=Ii,Ut(t,e,i),Pt(e),r&512&&(ue||s===null||bt(s,s.return)),r&4)if(r=s!==null?s.memoizedState:null,i=e.memoizedState,s===null)if(i===null)if(e.stateNode===null)if(nt)e.stateNode=rb(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,i=e.memoizedProps,r=n.ownerDocument||n;t:switch(t){case"title":s=r.getElementsByTagName("title")[0],(!s||s[Va]||s[wt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(t),r.head.insertBefore(s,r.querySelector("head > title"))),Ct(s,t,i),s[wt]=e,at(s),t=s;break e;case"link":if(n=v0("link","href",r).get(t+(i.href||""))){for(o=0;o<n.length;o++)if(s=n[o],s.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&s.getAttribute("rel")===(i.rel==null?null:i.rel)&&s.getAttribute("title")===(i.title==null?null:i.title)&&s.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){n.splice(o,1);break t}}s=r.createElement(t),Ct(s,t,i),r.head.appendChild(s);break;case"meta":if(n=v0("meta","content",r).get(t+(i.content||""))){for(o=0;o<n.length;o++)if(s=n[o],s.getAttribute("content")===(i.content==null?null:""+i.content)&&s.getAttribute("name")===(i.name==null?null:i.name)&&s.getAttribute("property")===(i.property==null?null:i.property)&&s.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&s.getAttribute("charset")===(i.charSet==null?null:i.charSet)){n.splice(o,1);break t}}s=r.createElement(t),Ct(s,t,i),r.head.appendChild(s);break;default:throw Error(R(468,t))}s[wt]=e,at(s),t=s}e.stateNode=t}else nt||Uf(n,e.type,e.stateNode);else e.stateNode=_0(n,i,e.memoizedProps);else r!==i?(r===null?(t=s.stateNode,t===null||ue||t.parentNode.removeChild(t)):r.count--,i===null?nt||Uf(n,e.type,e.stateNode):_0(n,i,e.memoizedProps)):i===null&&e.stateNode!==null&&vd(e,e.memoizedProps,s.memoizedProps);break;case 27:Ut(t,e,i),Pt(e),r&512&&(ue||s===null||bt(s,s.return)),s!==null&&r&4&&vd(e,e.memoizedProps,s.memoizedProps);break;case 5:if(n=Zi,Zi=!1,Ut(t,e,i),Zi=n,Pt(e),r&512&&(ue||s===null||bt(s,s.return)),e.flags&32){t=e.stateNode;try{go(t,""),ae=!0}catch(h){pe(e,e.return,h)}}r&4&&e.stateNode!=null&&(t=e.memoizedProps,vd(e,t,s!==null?s.memoizedProps:t)),r&1024&&(bd=!0);break;case 6:if(Ut(t,e,i),Pt(e),r&4){if(e.stateNode===null)throw Error(R(162));t=e.memoizedProps,i=e.stateNode;try{i.nodeValue=t,ae=!0}catch(h){pe(e,e.return,h)}}break;case 3:if(ae=!1,Ac=null,n=Ii,Ii=Ua(t.containerInfo),Ut(t,e,i),Ii=n,Pt(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{Co(t.containerInfo)}catch(h){pe(e,e.return,h)}bd&&(bd=!1,Dy(e)),ae=!1;break;case 4:r=Zi,Zi=nt,s=ev(),n=Ii,Ii=Ua(e.stateNode.containerInfo),Ut(t,e,i),Pt(e),Ii=n,ae&&da&&(Qc=!0),ae=s,Zi=r;break;case 12:Ut(t,e,i),Pt(e);break;case 31:Ut(t,e,i),Pt(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ac(e,t)));break;case 13:Ut(t,e,i),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(wh=hi()),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ac(e,t)));break;case 22:n=e.memoizedState!==null,o=s!==null&&s.memoizedState!==null;var a=nt,l=ue,c=Zi;nt=a||n,Zi=c||n,ue=l||o,Ut(t,e,i),ue=l,Zi=c,nt=a,Pt(e),r&8192&&(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,!n||s===null||o||nt||ue||(t=o||ue,i=nt,s=ue,nt=n||nt,ue=t,or(e,2),nt=i,ue=s),!n&&Zi||bf(e,n)),r&4&&(t=e.updateQueue,t!==null&&(i=t.retryQueue,i!==null&&(t.retryQueue=null,ac(e,i))));break;case 19:Ut(t,e,i),Pt(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ac(e,t)));break;case 30:r&512&&(ue||s===null||bt(s,s.return)),r=ev(),n=da,o=(i&335544064)===i,a=e.memoizedProps,da=o&&Os(a.default,a.update)!=="none",Ut(t,e,i),Pt(e),o&&s!==null&&ae&&(e.flags|=4),da=n,ae=r;break;case 21:break;case 7:r&512&&(ue||s===null||bt(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=e);default:Ut(t,e,i),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(yy(s)){i=s;break}s=s.return}s=null;for(var r=e.return;r!==null;){if(xp(r)){var n=r.stateNode;s===null?s=[n]:s.push(n)}if(kp(r))break;r=r.return}var o=s;if(i==null)throw Error(R(160));switch(i.tag){case 27:var a=i.stateNode,l=yd(e);Xc(e,l,a,o);break;case 5:var c=i.stateNode;i.flags&32&&(go(c,""),i.flags&=-33);var h=yd(e);Xc(e,h,c,o);break;case 3:case 4:var u=i.stateNode.containerInfo,d=yd(e);pf(e,d,u,o);break;default:throw Error(R(161))}}catch(f){pe(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Dy(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,xo=!0,t.reset(),xo=!1),e=e.sibling}}function qn(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ny(t,e),t=t.sibling;else xy(t,!1)}function Ny(e,t){var i=e.alternate;if(i===null)gf(e,!1);else switch(e.tag){case 3:if(yf=Qi=!1,jv(),qn(t,e),!Qi&&!Qc){if(e=ts,e!==null)for(var s=0;s<e.length;s+=3){i=e[s];var r=e[s+1];ob(i,e[s+2]),i=i.ownerDocument.documentElement,i!==null&&i.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+r+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),yf=!0}ts=null;break;case 5:qn(t,e);break;case 4:s=Qi,Qi=!1,qn(t,e),Qi&&(Qc=!0),Qi=s;break;case 22:e.memoizedState===null&&(i.memoizedState!==null?gf(e,!1):qn(t,e));break;case 30:s=Qi,r=jv(),Qi=!1,qn(t,e),Qi&&(e.flags|=4);var n=e.memoizedProps,o=e.stateNode;t=Ms(n,o),o=Ms(i.memoizedProps,o);var a=Os(n.default,n.update);a==="none"?t=!1:(n=i.memoizedState,i.memoizedState=null,i=e.child,Xt=0,t=Cp(e,i,t,o,a,n,!0),Xt!==(n===null?0:n.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(vo(e,e.memoizedProps.onUpdate),ts=r):r!==null&&(r.push.apply(r,ts),ts=r),Qi=(e.flags&32)!==0?!0:s;break;default:qn(t,e)}}function Ji(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Cy(e,t.alternate,t),t=t.sibling}function or(e,t){for(e=e.child;e!==null;){var i=e,s=t;switch(i.tag){case 0:case 11:case 14:case 15:Mr(4,i,i.return),or(i,s);break;case 1:bt(i,i.return);var r=i.stateNode;typeof r.componentWillUnmount=="function"&&vy(i,i.return,r),or(i,s);break;case 27:(s&2)!==0&&gb(i.stateNode,i.type,i.memoizedProps);case 5:bt(i,i.return),i.tag!==5&&i.tag!==27||Sa(i),or(i,s);break;case 6:Sa(i);break;case 26:bt(i,i.return),r=i.stateNode,i.memoizedState!==null||r===null||ue||r.parentNode.removeChild(r),or(i,s);break;case 22:i.memoizedState===null&&or(i,s);break;case 30:bt(i,i.return),or(i,s);break;case 7:bt(i,i.return);default:or(i,s)}e=e.sibling}}function qi(e,t,i){for(i=(t.subtreeFlags&8772)!==0?i:i&-2,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,o=n.flags,a=(i&1)!==0;switch(n.tag){case 0:case 11:case 15:qi(r,n,i),Xa(4,n);break;case 1:if(qi(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(h){pe(s,s.return,h)}if(s=n,r=s.updateQueue,r!==null){var l=s.stateNode;try{var c=r.shared.hiddenCallbacks;if(c!==null)for(r.shared.hiddenCallbacks=null,r=0;r<c.length;r++)E1(c[r],l)}catch(h){pe(s,s.return,h)}}a&&o&64&&_y(n),es(n,n.return);break;case 27:(i&2)!==0&&by(n);case 5:n.tag!==5&&n.tag!==27||Wv(n),qi(r,n,i),a&&s===null&&o&4&&ff(n),es(n,n.return);break;case 6:Wv(n);break;case 26:l=n.stateNode,n.memoizedState!==null||l===null||nt||Uf(Ua(l.ownerDocument),n.type,l),qi(r,n,i),a&&s===null&&o&4&&ff(n),es(n,n.return);break;case 12:qi(r,n,i);break;case 31:qi(r,n,i),a&&o&4&&My(r,n);break;case 13:qi(r,n,i),a&&o&4&&Ry(r,n);break;case 22:n.memoizedState===null&&qi(r,n,i),es(n,n.return);break;case 30:qi(r,n,i),es(n,n.return);break;case 7:es(n,n.return);default:qi(r,n,i)}t=t.sibling}}function Ep(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Ga(i))}function Tp(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ga(e))}function ki(e,t,i,s){var r=(i&335544064)===i;if(t.subtreeFlags&(r?10262:10256))for(t=t.child;t!==null;)By(e,t,i,s),t=t.sibling;else r&&ky(t)}function By(e,t,i,s){var r=(i&335544064)===i;r&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&xc(t);var n=t.flags;switch(t.tag){case 0:case 11:case 15:ki(e,t,i,s),n&2048&&Xa(9,t);break;case 1:ki(e,t,i,s);break;case 3:ki(e,t,i,s),r&&yf&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),n&2048&&(n=null,t.alternate!==null&&(n=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==n&&(t.refCount++,n!=null&&Ga(n)));break;case 12:if(n&2048){ki(e,t,i,s),n=t.stateNode;try{var o=t.memoizedProps,a=o.id,l=o.onPostCommit;typeof l=="function"&&l(a,t.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(c){pe(t,t.return,c)}}else ki(e,t,i,s);break;case 31:ki(e,t,i,s);break;case 13:ki(e,t,i,s);break;case 23:break;case 22:o=t.stateNode,a=t.alternate,t.memoizedState!==null?(r&&a!==null&&a.memoizedState===null&&xc(a),o._visibility&2?ki(e,t,i,s):ka(e,t)):(r&&a!==null&&a.memoizedState!==null&&xc(t),o._visibility&2?ki(e,t,i,s):(o._visibility|=2,Fn(e,t,i,s,(t.subtreeFlags&10256)!==0||!1))),n&2048&&Ep(a,t);break;case 24:ki(e,t,i,s),n&2048&&Tp(t.alternate,t);break;case 30:r&&(n=t.alternate,n!==null&&(ls(n.child,!0),ls(t.child,!0))),ki(e,t,i,s);break;default:ki(e,t,i,s)}}function Fn(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,o=t,a=i,l=s,c=o.flags;switch(o.tag){case 0:case 11:case 15:Fn(n,o,a,l,r),Xa(8,o);break;case 23:break;case 22:var h=o.stateNode;o.memoizedState!==null?h._visibility&2?Fn(n,o,a,l,r):ka(n,o):(h._visibility|=2,Fn(n,o,a,l,r)),r&&c&2048&&Ep(o.alternate,o);break;case 24:Fn(n,o,a,l,r),r&&c&2048&&Tp(o.alternate,o);break;default:Fn(n,o,a,l,r)}t=t.sibling}}function ka(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:ka(i,s),r&2048&&Ep(s.alternate,s);break;case 24:ka(i,s),r&2048&&Tp(s.alternate,s);break;default:ka(i,s)}t=t.sibling}}var Jr=8192;function Xr(e,t,i){if(e.subtreeFlags&Jr)for(e=e.child;e!==null;)Oy(e,t,i),e=e.sibling}function Oy(e,t,i){switch(e.tag){case 26:Xr(e,t,i),e.flags&Jr&&(e.memoizedState!==null?Q3(i,Ii,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&b0(i,e)));break;case 5:Xr(e,t,i),e.flags&Jr&&(e=e.stateNode,(t&335544128)===t&&b0(i,e));break;case 3:case 4:var s=Ii;Ii=Ua(e.stateNode.containerInfo),Xr(e,t,i),Ii=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Jr,Jr=16777216,Xr(e,t,i),Jr=s):Xr(e,t,i));break;case 30:if((e.flags&Jr)!==0&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var r=e.stateNode;r.paired=null,li===null&&(li=new Map),li.set(s,r)}Xr(e,t,i);break;default:Xr(e,t,i)}}function zy(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function na(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ot=s,Uy(s,e)}zy(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hy(e),e=e.sibling}function Hy(e){switch(e.tag){case 0:case 11:case 15:na(e),e.flags&2048&&Mr(9,e,e.return);break;case 3:na(e);break;case 12:na(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Cc(e)):na(e);break;default:na(e)}}function Cc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ot=s,Uy(s,e)}zy(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Mr(8,t,t.return),Cc(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Cc(t));break;default:Cc(t)}e=e.sibling}}function Uy(e,t){for(;ot!==null;){var i=ot;switch(i.tag){case 0:case 11:case 15:Mr(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ga(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,ot=s;else e:for(i=e;ot!==null;){s=ot;var r=s.sibling,n=s.return;if(Ty(s),s===i){ot=null;break e}if(r!==null){r.return=n,ot=r;break e}ot=n}}}var YC={getCacheForType:function(e){var t=St(je),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return St(je).controller.signal}},XC=typeof WeakMap=="function"?WeakMap:Map,le=0,_e=null,te=null,re=0,de=0,ni=null,fr=!1,Ro=!1,Ap=!1,Ns=0,He=0,Rr=0,an=0,Jc=0,ci=0,_o=0,xa=null,Yt=null,Sf=!1,wh=0,Py=0,eh=1/0,th=null,Sr=null,Le=0,$i=null,gn=null,as=0,kf=0,xf=null,qy=null,co=null,ho=null,uo=null,Ca=0,Ec=null;function fi(){return(le&2)!==0&&re!==0?re&-re:W.T!==null?Rp():K0()}function Iy(){if(ci===0)if((re&536870912)===0||Q){var e=Gl;Gl<<=1,(Gl&3932160)===0&&(Gl=262144),ci=e}else ci=536870912;return e=Et.current,e!==null&&(e.flags|=32),ci}function vo(e,t){if(t!=null){var i=e.stateNode,s=i.ref;s===null&&(s=i.ref=lb(Ms(e.memoizedProps,i))),ho===null&&(ho=[]),ho.push(t.bind(null,s))}}function Qt(e,t,i){(e===_e&&(de===2||de===9)||e.cancelPendingCommit!==null)&&(yo(e,0),pr(e,re,ci,!1)),Wa(e,i),((le&2)===0||e!==_e)&&(e===_e&&((le&2)===0&&(an|=i),He===4&&pr(e,re,ci,!1)),hs(e))}function Fy(e,t,i){if((le&6)!==0)throw Error(R(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ka(e,t),r=s?JC(e,t):wd(e,t,!0),n=s;do{if(r===0){Ro&&!s&&pr(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!ZC(i)){r=wd(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var a=e;r=xa;var l=a.current.memoizedState.isDehydrated;if(l&&(yo(a,o).flags|=256),o=wd(a,o,!1),o!==2&&o!==6){if(Ap&&!l){a.errorRecoveryDisabledLanes|=n,an|=n,r=4;break e}n=Yt,Yt=r,n!==null&&(Yt===null?Yt=n:Yt.push.apply(Yt,n))}r=o}if(n=!1,r!==2)continue}}if(r===1){yo(e,0),pr(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(R(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:pr(s,t,ci,!fr);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(R(329))}if((t&62914560)===t&&(r=wh+300-hi(),10<r)){if(pr(s,t,ci,!fr),ah(s,0,!0)!==0)break e;as=t,s.timeoutHandle=Dp(Yv.bind(null,s,i,Yt,th,Sf,t,ci,an,_o,fr,n,"Throttled",-0,0),r);break e}Yv(s,i,Yt,th,Sf,t,ci,an,_o,fr,n,null,-0,0)}}break}while(!0);hs(e)}function Yv(e,t,i,s,r,n,o,a,l,c,h,u,d,f){e.timeoutHandle=-1;var g=t.subtreeFlags,b=(n&335544064)===n;if(u=null,(b||g&8192||(g&16785408)===16785408)&&(u={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ss},li=null,Oy(t,n,u),b&&(g=u,b=e.containerInfo,b=(b.nodeType===9?b:b.ownerDocument).__reactViewTransition,b!=null&&(g.count++,g.waitingForViewTransition=!0,g=Pa.bind(g),b.finished.then(g,g))),g=(n&62914560)===n?wh-hi():(n&4194048)===n?Py-hi():0,g=J3(u,g),g!==null)){as=n,e.cancelPendingCommit=g(Zv.bind(null,e,t,n,i,s,r,o,a,l,c,h,u,null,d,f)),pr(e,n,o,!c);return}Zv(e,t,n,i,s,r,o,a,l,c,h,u)}function ZC(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var r=i[s],n=r.getSnapshot;r=r.value;try{if(!pi(n(),r))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function pr(e,t,i,s){t=P0(e,t),t&=~Jc,t&=~an,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-di(r),o=1<<n;s[n]=-1,r&=~o}i!==0&&I0(e,i,t)}function Sh(){return(le&6)===0?(Za(0,!1),!1):!0}function Mp(){if(te!==null){if(de===0)var e=te.return;else e=te,Cs=bn=null,dp(e),oo=null,Da=0,e=te;for(;e!==null;)my(e.alternate,e),e=e.return;te=null}}function yo(e,t){var i=e.timeoutHandle;return i!==-1&&(e.timeoutHandle=-1,y3(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),as=0,Mp(),_e=e,te=i=Es(e.current,null),re=t,de=0,ni=null,fr=!1,Ro=Ka(e,t),Ap=!1,_o=ci=Jc=an=Rr=He=0,Yt=xa=null,Sf=!1,Ns=P0(e,t),dh(),i}function $y(e,t){Y=null,W.H=jc,t===Ao||t===gh?(t=Sv(),de=3):t===rp?(t=Sv(),de=4):de=t===bp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ni=t,te===null&&(He=1,Gc(e,Ai(t,e.current)))}function Ky(){var e=Et.current;return e===null?!0:(re&4194048)===re?Nt===null:(re&62914560)===re||(re&536870912)!==0?e===Nt:!1}function Wy(){var e=W.H;return W.H=jc,e===null?jc:e}function Vy(){var e=W.A;return W.A=YC,e}function ih(){He=4,fr||(re&4194048)!==re&&Et.current!==null||(Ro=!0),(Rr&134217727)===0&&(an&134217727)===0||_e===null||pr(_e,re,ci,!1)}function wd(e,t,i){var s=le;le|=2;var r=Wy(),n=Vy();(_e!==e||re!==t)&&(th=null,yo(e,t)),t=!1;var o=He;e:do try{if(de!==0&&te!==null){var a=te,l=ni;switch(de){case 8:Mp(),o=6;break e;case 3:case 2:case 9:case 6:Et.current===null&&(t=!0);var c=de;if(de=0,ni=null,to(e,a,l,c),i&&Ro){o=0;break e}break;default:c=de,de=0,ni=null,to(e,a,l,c)}}QC(),o=He;break}catch(h){$y(e,h)}while(!0);return t&&e.shellSuspendCounter++,Cs=bn=null,le=s,W.H=r,W.A=n,te===null&&(_e=null,re=0,dh()),o}function QC(){for(;te!==null;)jy(te)}function JC(e,t){var i=le;le|=2;var s=Wy(),r=Vy();_e!==e||re!==t?(th=null,eh=hi()+500,yo(e,t)):Ro=Ka(e,t);e:do try{if(de!==0&&te!==null){t=te;var n=ni;t:switch(de){case 1:de=0,ni=null,to(e,t,n,1);break;case 2:case 9:if(wv(n)){de=0,ni=null,Xv(t);break}t=function(){de!==2&&de!==9||_e!==e||(de=7),hs(e)},n.then(t,t);break e;case 3:de=7;break e;case 4:de=5;break e;case 7:wv(n)?(de=0,ni=null,Xv(t)):(de=0,ni=null,to(e,t,n,7));break;case 5:var o=null;switch(te.tag){case 26:o=te.memoizedState;case 5:case 27:var a=te;if(o?vb(o):a.stateNode.complete){de=0,ni=null;var l=a.sibling;if(l!==null)te=l;else{var c=a.return;c!==null?(te=c,kh(c)):te=null}break t}}de=0,ni=null,to(e,t,n,5);break;case 6:de=0,ni=null,to(e,t,n,6);break;case 8:Mp(),He=6;break e;default:throw Error(R(462))}}e3();break}catch(h){$y(e,h)}while(!0);return Cs=bn=null,W.H=s,W.A=r,le=i,te!==null?0:(_e=null,re=0,dh(),He)}function e3(){for(;te!==null&&!_5();)jy(te)}function jy(e){var t=gy(e.alternate,e,Ns);e.memoizedProps=e.pendingProps,t===null?kh(e):te=t}function Xv(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Uv(i,t,t.pendingProps,t.type,void 0,re);break;case 11:t=Uv(i,t,t.pendingProps,t.type.render,t.ref,re);break;case 5:dp(t);var s=t;s===lt&&(Q?(qc(s),s.tag===5&&s.stateNode!=null&&(we=s.stateNode)):(qc(s),Q=!0));default:my(i,t),t=te=_1(t,Ns),t=gy(i,t,Ns)}e.memoizedProps=e.pendingProps,t===null?kh(e):te=t}function to(e,t,i,s){Cs=bn=null,dp(t),oo=null,Da=0;var r=t.return;try{if(IC(e,r,t,i,re)){He=1,Gc(e,Ai(i,e.current)),te=null;return}}catch(n){if(r!==null)throw te=r,n;He=1,Gc(e,Ai(i,e.current)),te=null;return}t.flags&32768?(Q||s===1?e=!0:Ro||(re&536870912)!==0?e=!1:(fr=e=!0,(s===2||s===9||s===3||s===6)&&(s=Et.current,s!==null&&s.tag===13&&(s.flags|=16384))),Gy(t,e)):kh(t)}function kh(e){var t=e;do{if((t.flags&32768)!==0){Gy(t,fr);return}e=t.return;var i=WC(t.alternate,t,Ns);if(i!==null){te=i;return}if(t=t.sibling,t!==null){te=t;return}te=t=e}while(t!==null);He===0&&(He=5)}function Gy(e,t){do{var i=VC(e.alternate,e);if(i!==null){i.flags&=32767,te=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){te=e;return}te=e=i}while(e!==null);He=6,te=null}function Zv(e,t,i,s,r,n,o,a,l,c,h,u){e.cancelPendingCommit=null;do xh();while(Le!==0);if((le&6)!==0)throw Error(R(327));if(t!==null){if(t===e.current)throw Error(R(177));e===_e&&(te=_e=null,re=0),gn=t,$i=e,as=i,xf=r,qy=s,t3(e,t,i,o,a,l,u)}}function t3(e,t,i,s,r,n,o){var a=t.lanes|t.childLanes;if(kf=a,a|=Qf,T5(e,i,a,s,r,n),ho=null,(i&335544064)===i?(uo=MC(e),s=10262):(uo=null,s=10256),(t.subtreeFlags&s)!==0||(t.flags&s)!==0?(e.callbackNode=null,e.callbackPriority=0,a3(Oc,function(){return Af(),null})):(e.callbackNode=null,e.callbackPriority=0),Zc=!1,s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=W.T,W.T=null,r=ce.p,ce.p=2,n=le,le|=4;try{jC(e,t,i)}finally{le=n,ce.p=r,W.T=s}}Le=1,Zc?co=C3(o,e.containerInfo,uo,Cf,Ef,s3,Tf,Af,i3,null,null):(Cf(),Ef(),Tf())}function i3(e){if(Le!==0){var t=$i.onRecoverableError;t(e,{componentStack:null})}}function s3(){Le===3&&(Le=0,Ny(gn,$i),Le=4)}function Cf(){if(Le===1){Le=0;var e=$i,t=gn,i=as,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=W.T,W.T=null;var r=ce.p;ce.p=2;var n=le;le|=4;try{da=Qc=!1,Ly(t,e,i),i=Df;var o=c1(e.containerInfo),a=i.focusedElem,l=i.selectionRange;if(o!==a&&a&&a.ownerDocument&&l1(a.ownerDocument.documentElement,a)){if(l!==null&&Zf(a)){var c=l.start,h=l.end;if(h===void 0&&(h=c),"selectionStart"in a)a.selectionStart=c,a.selectionEnd=Math.min(h,a.value.length);else{var u=a.ownerDocument||document,d=u&&u.defaultView||window;if(d.getSelection){var f=d.getSelection(),g=a.textContent.length,b=Math.min(l.start,g),T=l.end===void 0?b:Math.min(l.end,g);!f.extend&&b>T&&(o=T,T=b,b=o);var _=fv(a,b),m=fv(a,T);if(_&&m&&(f.rangeCount!==1||f.anchorNode!==_.node||f.anchorOffset!==_.offset||f.focusNode!==m.node||f.focusOffset!==m.offset)){var v=u.createRange();v.setStart(_.node,_.offset),f.removeAllRanges(),b>T?(f.addRange(v),f.extend(m.node,m.offset)):(v.setEnd(m.node,m.offset),f.addRange(v))}}}}for(u=[],f=a;f=f.parentNode;)f.nodeType===1&&u.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<u.length;a++){var p=u[a];p.element.scrollLeft=p.left,p.element.scrollTop=p.top}}xo=!!Lf,Df=Lf=null}finally{le=n,ce.p=r,W.T=s}}e.current=t,Le=2}}function Ef(){if(Le===2){Le=0;var e=$i,t=gn,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=W.T,W.T=null;var s=ce.p;ce.p=2;var r=le;le|=4;try{Cy(e,t.alternate,t)}finally{le=r,ce.p=s,W.T=i}}Le=3}}function Tf(){if(Le===4||Le===3){Le=0;var e=co;co=null,v5();var t=$i,i=gn,s=as,r=qy,n=(s&335544064)===s?10262:10256;if((i.subtreeFlags&n)!==0||(i.flags&n)!==0?Le=5:(Le=0,gn=$i=null,Yy(t,t.pendingLanes)),n=t.pendingLanes,n===0&&(Sr=null),Wf(s),i=i.stateNode,ui&&typeof ui.onCommitFiberRoot=="function")try{ui.onCommitFiberRoot($a,i,void 0,(i.current.flags&128)===128)}catch{}if(r!==null){i=W.T,n=ce.p,ce.p=2,W.T=null;try{for(var o=t.onRecoverableError,a=0;a<r.length;a++){var l=r[a];o(l.value,{componentStack:l.stack})}}finally{W.T=i,ce.p=n}}if(r=ho,o=uo,uo=null,r!==null&&(ho=null,o===null&&(o=[]),e!==null))for(l=0;l<r.length;l++)i=(0,r[l])(o),i!==void 0&&e.finished.finally(i);(as&3)!==0&&xh(),hs(t),n=t.pendingLanes,(s&261930)!==0&&(n&42)!==0?t===Ec?Ca++:(Ca=0,Ec=t):(Ca=0,Ec=null),Za(0,!1)}}function Yy(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ga(t)))}function xh(){return co!==null&&(co.skipTransition(),co=null),Cf(),Ef(),Tf(),Af()}function Af(){if(Le!==5)return!1;var e=$i,t=kf;kf=0;var i=Wf(as),s=W.T,r=ce.p;try{ce.p=32>i?32:i,W.T=null,i=xf,xf=null;var n=$i,o=as;if(Le=0,gn=$i=null,as=0,(le&6)!==0)throw Error(R(331));var a=le;if(le|=4,Hy(n.current),By(n,n.current,o,i),le=a,Za(0,!1),ui&&typeof ui.onPostCommitFiberRoot=="function")try{ui.onPostCommitFiberRoot($a,n)}catch{}return!0}finally{ce.p=r,W.T=s,Yy(e,t)}}function Qv(e,t,i){t=Ai(i,t),t=af(e.stateNode,t,2),e=yr(e,t,2),e!==null&&(Wa(e,2),hs(e))}function pe(e,t,i){if(e.tag===3)Qv(e,e,i);else for(;t!==null;){if(t.tag===3){Qv(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Sr===null||!Sr.has(s))){e=Ai(i,e),i=hy(2),s=yr(t,i,2),s!==null&&(uy(i,s,t,e),Wa(s,2),hs(s));break}}t=t.return}}function Sd(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new XC;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(Ap=!0,r.add(i),e=r3.bind(null,e,t,i),t.then(e,e))}function r3(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,_e===e&&(re&i)===i&&((He===4||He===3&&(re&62914560)===re&&300>hi()-wh)&&(le&2)===0?yo(e,0):Jc|=i,_o===re&&(_o=0)),hs(e)}function Xy(e,t){t===0&&(t=q0()),e=yn(e,t),e!==null&&(Wa(e,t),hs(e))}function n3(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Xy(e,i)}function o3(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(R(314))}s!==null&&s.delete(t),Xy(e,i)}function a3(e,t){return $f(e,t)}var bo=null,$n=null,Mf=!1,sh=!1,kd=!1,gr=0;function hs(e){e!==$n&&e.next===null&&($n===null?bo=$n=e:$n=$n.next=e),sh=!0,Mf||(Mf=!0,c3())}function Za(e,t){if(!kd&&sh){kd=!0;do for(var i=!1,s=bo;s!==null;){if(!t)if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var o=s.suspendedLanes,a=s.pingedLanes;n=(1<<31-di(42|e)+1)-1,n&=r&~(o&~a),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Jv(s,n))}else n=re,n=ah(s,s===_e?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||Ka(s,n)||(i=!0,Jv(s,n));s=s.next}while(i);kd=!1}}function l3(){Zy()}function Zy(){sh=Mf=!1;var e=0;gr!==0&&v3()&&(e=gr);for(var t=hi(),i=null,s=bo;s!==null;){var r=s.next,n=Qy(s,t);n===0?(s.next=null,i===null?bo=r:i.next=r,r===null&&($n=i)):(i=s,(e!==0||(n&3)!==0)&&(sh=!0)),s=r}Le!==0&&Le!==5||Za(e,!1),gr!==0&&(gr=0)}function Qy(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var o=31-di(n),a=1<<o,l=r[o];l===-1?((a&i)===0||(a&s)!==0)&&(r[o]=E5(a,t)):l<=t&&(e.expiredLanes|=a),n&=~a}if(t=_e,i=re,i=ah(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(de===2||de===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&td(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ka(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&td(s),Wf(i)){case 2:case 8:i=H0;break;case 32:i=Oc;break;case 268435456:i=U0;break;default:i=Oc}return s=Jy.bind(null,e),i=$f(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&td(s),e.callbackPriority=2,e.callbackNode=null,2}function Jy(e,t){if(Le!==0&&Le!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(xh()&&e.callbackNode!==i)return null;var s=re;return s=ah(e,e===_e?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Fy(e,s,t),Qy(e,hi()),e.callbackNode!=null&&e.callbackNode===i?Jy.bind(null,e):null)}function Jv(e,t){if(xh())return null;Fy(e,t,!0)}function c3(){b3(function(){(le&6)!==0?$f(z0,l3):Zy()})}function Rp(){if(gr===0){var e=un;e===0&&(e=jl,jl<<=1,(jl&261888)===0&&(jl=256)),gr=e}return gr}function e0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:pc(e)}function h3(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=e0((r[ei]||null).action),o=s.submitter;o&&(t=(t=o[ei]||null)?e0(t.formAction):o.getAttribute("formAction"),t!==null&&(n=t,o=null));var a=new ch("action","action",null,s,r);e.push({event:a,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(gr!==0){var l=new FormData(r,o);nf(i,{pending:!0,data:l,method:r.method,action:n},null,l)}}else typeof n=="function"&&(a.preventDefault(),l=new FormData(r,o),nf(i,{pending:!0,data:l,method:r.method,action:n},n,l))},currentTarget:r}]})}}for(lc=0;lc<jd.length;lc++)cc=jd[lc],t0=cc.toLowerCase(),i0=cc[0].toUpperCase()+cc.slice(1),Ki(t0,"on"+i0);var cc,t0,i0,lc;Ki(u1,"onAnimationEnd");Ki(d1,"onAnimationIteration");Ki(f1,"onAnimationStart");Ki("dblclick","onDoubleClick");Ki("focusin","onFocus");Ki("focusout","onBlur");Ki(wC,"onTransitionRun");Ki(SC,"onTransitionStart");Ki(kC,"onTransitionCancel");Ki(p1,"onTransitionEnd");po("onMouseEnter",["mouseout","mouseover"]);po("onMouseLeave",["mouseout","mouseover"]);po("onPointerEnter",["pointerout","pointerover"]);po("onPointerLeave",["pointerout","pointerover"]);_n("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));_n("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));_n("onBeforeInput",["compositionend","keypress","textInput","paste"]);_n("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));_n("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));_n("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oa="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(" "),u3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Oa));function eb(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var n=void 0;if(t)for(var o=s.length-1;0<=o;o--){var a=s[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==n&&r.isPropagationStopped())break e;n=a,r.currentTarget=c;try{n(r)}catch(h){Hc(h)}r.currentTarget=null,n=l}else for(o=0;o<s.length;o++){if(a=s[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==n&&r.isPropagationStopped())break e;n=a,r.currentTarget=c;try{n(r)}catch(h){Hc(h)}r.currentTarget=null,n=l}}}}function ee(e,t){var i=t[X_];i===void 0&&(i=t[X_]=new Set);var s=e+"__bubble";i.has(s)||(tb(t,e,2,!1),i.add(s))}function xd(e,t,i){var s=0;t&&(s|=4),tb(i,e,s,t)}var hc="_reactListening"+Math.random().toString(36).slice(2);function Lp(e){if(!e[hc]){e[hc]=!0,V0.forEach(function(i){i!=="selectionchange"&&(u3.has(i)||xd(i,!1,e),xd(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hc]||(t[hc]=!0,xd("selectionchange",!1,t))}}function tb(e,t,i,s){switch(Cb(t)){case 2:var r=sE;break;case 8:r=rE;break;default:r=Up}i=r.bind(null,t,i,e),r=void 0,!$d||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function Cd(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var o=s.tag;if(o===3||o===4){var a=s.stateNode.containerInfo;if(a===r)break;if(o===4)for(o=s.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===r)return;o=o.return}for(;a!==null;){if(o=en(a),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){s=n=o;continue e}a=a.parentNode}}s=s.return}e1(function(){var c=n,h=jf(i),u=[];e:{var d=g1.get(e);if(d!==void 0){var f=ch,g=e;switch(e){case"keypress":if(mc(i)===0)break e;case"keydown":case"keyup":f=Z5;break;case"focusin":g="focus",f=ad;break;case"focusout":g="blur",f=ad;break;case"beforeblur":case"afterblur":f=ad;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=rv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=P5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=iC;break;case u1:case d1:case f1:f=F5;break;case p1:f=rC;break;case"scroll":case"scrollend":f=H5;break;case"wheel":f=oC;break;case"copy":case"cut":case"paste":f=K5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=ov;break;case"submit":f=eC;break;case"toggle":case"beforetoggle":f=lC}var b=(t&4)!==0,T=!b&&(e==="scroll"||e==="scrollend"),_=b?d!==null?d+"Capture":null:d;b=[];for(var m=c,v;m!==null;){var p=m;if(v=p.stateNode,p=p.tag,p!==5&&p!==26&&p!==27||v===null||_===null||(p=Ta(m,_),p!=null&&b.push(za(m,p,v))),T)break;m=m.return}0<b.length&&(d=new f(d,g,null,i,h),u.push({event:d,listeners:b}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",f&&i!==Fd&&(g=i.relatedTarget||i.fromElement)&&(en(g)||g[Eo]))break e;(d||f)&&(g=h.window===h?h:(f=h.ownerDocument)?f.defaultView||f.parentWindow:window,d?(f=i.relatedTarget||i.toElement,d=c,f=f?en(f):null,f!==null&&(T=Fa(f),b=f.tag,f!==T||b!==5&&b!==27&&b!==6)&&(f=null)):(d=null,f=c),d!==f&&(b=rv,p="onMouseLeave",_="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(b=ov,p="onPointerLeave",_="onPointerEnter",m="pointer"),T=d==null?g:ha(d),v=f==null?g:ha(f),g=new b(p,m+"leave",d,i,h),g.target=T,g.relatedTarget=v,p=null,en(h)===c&&(b=new b(_,m+"enter",f,i,h),b.target=v,b.relatedTarget=T,p=b),T=p,b=d&&f?Rd(d,f,d3):null,d!==null&&s0(u,g,d,b,!1),f!==null&&T!==null&&s0(u,T,f,b,!0)))}e:{if(d=c?ha(c):window,f=d.nodeName&&d.nodeName.toLowerCase(),f==="select"||f==="input"&&d.type==="file")var E=hv;else if(cv(d))if(o1)E=vC;else{E=mC;var A=gC}else f=d.nodeName,!f||f.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&Vf(c.elementType)&&(E=hv):E=_C;if(E&&(E=E(e,c))){n1(u,E,i,h);break e}A&&A(e,d,c)}switch(A=c?ha(c):window,e){case"focusin":(cv(A)||A.contentEditable==="true")&&(Yn=A,Wd=c,ga=null);break;case"focusout":ga=Wd=Yn=null;break;case"mousedown":Vd=!0;break;case"contextmenu":case"mouseup":case"dragend":Vd=!1,pv(u,i,h);break;case"selectionchange":if(bC)break;case"keydown":case"keyup":pv(u,i,h)}var L;if(Xf)e:{switch(e){case"compositionstart":var B="onCompositionStart";break e;case"compositionend":B="onCompositionEnd";break e;case"compositionupdate":B="onCompositionUpdate";break e}B=void 0}else Gn?s1(e,i)&&(B="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(B="onCompositionStart");B&&(i1&&i.locale!=="ko"&&(Gn||B!=="onCompositionStart"?B==="onCompositionEnd"&&Gn&&(L=t1()):(ur=h,Gf="value"in ur?ur.value:ur.textContent,Gn=!0)),A=rh(c,B),0<A.length&&(B=new nv(B,e,null,i,h),u.push({event:B,listeners:A}),L?B.data=L:(L=r1(i),L!==null&&(B.data=L)))),(L=hC?uC(e,i):dC(e,i))&&(B=rh(c,"onBeforeInput"),0<B.length&&(A=new nv("onBeforeInput","beforeinput",null,i,h),u.push({event:A,listeners:B}),A.data=L)),h3(u,e,c,i,h)}eb(u,t)})}function za(e,t,i){return{instance:e,listener:t,currentTarget:i}}function rh(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,n=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||n===null||(r=Ta(e,i),r!=null&&s.unshift(za(e,r,n)),r=Ta(e,t),r!=null&&s.push(za(e,r,n))),e.tag===3)return s;e=e.return}return[]}function d3(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function s0(e,t,i,s,r){for(var n=t._reactName,o=[];i!==null&&i!==s;){var a=i,l=a.alternate,c=a.stateNode;if(a=a.tag,l!==null&&l===s)break;a!==5&&a!==26&&a!==27||c===null||(l=c,r?(c=Ta(i,n),c!=null&&o.unshift(za(i,c,l))):r||(c=Ta(i,n),c!=null&&o.push(za(i,c,l)))),i=i.return}o.length!==0&&e.push({event:t,listeners:o})}var f3=/\r\n?/g,p3=/\u0000|\uFFFD/g;function r0(e){return(typeof e=="string"?e:""+e).replace(f3,`
|
|
10
|
-
`).replace(p3,"")}function ib(e,t){return t=r0(t),r0(e)===t}function fe(e,t,i,s,r,n){switch(i){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||go(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&go(e,""+s);else return;break;case"className":Xl(e,"class",s);break;case"tabIndex":Xl(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Xl(e,i,s);break;case"style":J0(e,s,n);return;case"data":if(t!=="object"){Xl(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=pc(s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"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 n=="function"&&(i==="formAction"?(t!=="input"&&fe(e,t,"name",r.name,r,null),fe(e,t,"formEncType",r.formEncType,r,null),fe(e,t,"formMethod",r.formMethod,r,null),fe(e,t,"formTarget",r.formTarget,r,null)):(fe(e,t,"encType",r.encType,r,null),fe(e,t,"method",r.method,r,null),fe(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=pc(s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ss);return;case"onScroll":s!=null&&ee("scroll",e);return;case"onScrollEnd":s!=null&&ee("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(R(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(R(60));n?.__html!==i&&(e.innerHTML=i)}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=pc(s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":ee("beforetoggle",e),ee("toggle",e),fc(e,"popover",s);break;case"xlinkActuate":Ss(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ss(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ss(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ss(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ss(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ss(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ss(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ss(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ss(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":fc(e,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")i=O5.get(i)||i,fc(e,i,s);else return}ae=!0}function Rf(e,t,i,s,r,n){switch(i){case"style":J0(e,s,n);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(R(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(R(60));n?.__html!==i&&(e.innerHTML=i)}}break;case"children":if(typeof s=="string")go(e,s);else if(typeof s=="number"||typeof s=="bigint")go(e,""+s);else return;break;case"onScroll":s!=null&&ee("scroll",e);return;case"onScrollEnd":s!=null&&ee("scrollend",e);return;case"onClick":s!=null&&(e.onclick=ss);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!j0.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),n=i.slice(2,r?i.length-7:void 0),t=e[ei]||null,t=t!=null?t[i]:null,typeof t=="function"&&e.removeEventListener(n,t,r),typeof s=="function")){typeof t!="function"&&t!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,s,r);break e}ae=!0,i in e?e[i]=s:s===!0?e.setAttribute(i,""):fc(e,i,s)}return}ae=!0}function Ct(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ee("error",e),ee("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var o=i[n];if(o!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(R(137,t));default:fe(e,t,n,o,i,null)}}r&&fe(e,t,"srcSet",i.srcSet,i,null),s&&fe(e,t,"src",i.src,i,null);return;case"input":ee("invalid",e);var a=n=o=r=null,l=null,c=null;for(s in i)if(i.hasOwnProperty(s)){var h=i[s];if(h!=null)switch(s){case"name":r=h;break;case"type":o=h;break;case"checked":l=h;break;case"defaultChecked":c=h;break;case"value":n=h;break;case"defaultValue":a=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(R(137,t));break;default:fe(e,t,s,h,i,null)}}X0(e,n,a,l,c,o,r,!1);return;case"select":ee("invalid",e),s=o=n=null;for(r in i)if(i.hasOwnProperty(r)&&(a=i[r],a!=null))switch(r){case"value":n=a;break;case"defaultValue":o=a;break;case"multiple":s=a;default:fe(e,t,r,a,i,null)}t=n,i=o,e.multiple=!!s,t!=null?so(e,!!s,t,!1):i!=null&&so(e,!!s,i,!0);return;case"textarea":ee("invalid",e),n=r=s=null;for(o in i)if(i.hasOwnProperty(o)&&(a=i[o],a!=null))switch(o){case"value":s=a;break;case"defaultValue":r=a;break;case"children":n=a;break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(R(91));break;default:fe(e,t,o,a,i,null)}Q0(e,s,r,n);return;case"option":for(l in i)i.hasOwnProperty(l)&&(s=i[l],s!=null)&&(l==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":fe(e,t,l,s,i,null));return;case"dialog":ee("beforetoggle",e),ee("toggle",e),ee("cancel",e),ee("close",e);break;case"iframe":case"object":ee("load",e);break;case"video":case"audio":for(s=0;s<Oa.length;s++)ee(Oa[s],e);break;case"image":ee("error",e),ee("load",e);break;case"details":ee("toggle",e);break;case"embed":case"source":case"link":ee("error",e),ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in i)if(i.hasOwnProperty(c)&&(s=i[c],s!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(R(137,t));default:fe(e,t,c,s,i,null)}return;default:if(Vf(t)){for(h in i)i.hasOwnProperty(h)&&(s=i[h],s!==void 0&&Rf(e,t,h,s,i,void 0));return}}for(a in i)i.hasOwnProperty(a)&&(s=i[a],s!=null&&fe(e,t,a,s,i,null))}var g3={};function m3(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,n=null,o=null,a=null,l=null,c=null,h=null;for(f in i){var u=i[f];if(i.hasOwnProperty(f)&&u!=null)switch(f){case"checked":break;case"value":break;case"defaultValue":l=u;default:s.hasOwnProperty(f)||fe(e,t,f,null,s,u)}}for(var d in s){var f=s[d];if(u=i[d],s.hasOwnProperty(d)&&(f!=null||u!=null))switch(d){case"type":f!==u&&(ae=!0),n=f;break;case"name":f!==u&&(ae=!0),r=f;break;case"checked":f!==u&&(ae=!0),c=f;break;case"defaultChecked":f!==u&&(ae=!0),h=f;break;case"value":f!==u&&(ae=!0),o=f;break;case"defaultValue":f!==u&&(ae=!0),a=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(R(137,t));break;default:f!==u&&fe(e,t,d,f,s,u)}}Id(e,o,a,l,c,h,n,r);return;case"select":f=o=a=d=null;for(n in i)if(l=i[n],i.hasOwnProperty(n)&&l!=null)switch(n){case"value":break;case"multiple":f=l;default:s.hasOwnProperty(n)||fe(e,t,n,null,s,l)}for(r in s)if(n=s[r],l=i[r],s.hasOwnProperty(r)&&(n!=null||l!=null))switch(r){case"value":n!==l&&(ae=!0),d=n;break;case"defaultValue":n!==l&&(ae=!0),a=n;break;case"multiple":n!==l&&(ae=!0),o=n;default:n!==l&&fe(e,t,r,n,s,l)}t=a,i=o,s=f,d!=null?so(e,!!i,d,!1):!!s!=!!i&&(t!=null?so(e,!!i,t,!0):so(e,!!i,i?[]:"",!1));return;case"textarea":f=d=null;for(a in i)if(r=i[a],i.hasOwnProperty(a)&&r!=null&&!s.hasOwnProperty(a))switch(a){case"value":break;case"children":break;default:fe(e,t,a,null,s,r)}for(o in s)if(r=s[o],n=i[o],s.hasOwnProperty(o)&&(r!=null||n!=null))switch(o){case"value":r!==n&&(ae=!0),d=r;break;case"defaultValue":r!==n&&(ae=!0),f=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(R(91));break;default:r!==n&&fe(e,t,o,r,s,n)}Z0(e,d,f);return;case"option":for(var g in i)d=i[g],i.hasOwnProperty(g)&&d!=null&&!s.hasOwnProperty(g)&&(g==="selected"?e.selected=!1:fe(e,t,g,null,s,d));for(l in s)d=s[l],f=i[l],s.hasOwnProperty(l)&&d!==f&&(d!=null||f!=null)&&(l==="selected"?(d!==f&&(ae=!0),e.selected=d&&typeof d!="function"&&typeof d!="symbol"):fe(e,t,l,d,s,f));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 b in i)d=i[b],i.hasOwnProperty(b)&&d!=null&&!s.hasOwnProperty(b)&&fe(e,t,b,null,s,d);for(c in s)if(d=s[c],f=i[c],s.hasOwnProperty(c)&&d!==f&&(d!=null||f!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(R(137,t));break;default:fe(e,t,c,d,s,f)}return;default:if(Vf(t)){for(var T in i)d=i[T],i.hasOwnProperty(T)&&d!==void 0&&!s.hasOwnProperty(T)&&Rf(e,t,T,void 0,s,d);for(h in s)d=s[h],f=i[h],!s.hasOwnProperty(h)||d===f||d===void 0&&f===void 0||Rf(e,t,h,d,s,f);return}}for(var _ in i)d=i[_],i.hasOwnProperty(_)&&d!=null&&!s.hasOwnProperty(_)&&fe(e,t,_,null,s,d);for(u in s)d=s[u],f=i[u],!s.hasOwnProperty(u)||d===f||d==null&&f==null||fe(e,t,u,d,s,f)}function n0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _3(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],n=r.transferSize,o=r.initiatorType,a=r.duration;if(n&&a&&n0(o)){for(o=0,a=r.responseEnd,s+=1;s<i.length;s++){var l=i[s],c=l.startTime;if(c>a)break;var h=l.transferSize,u=l.initiatorType;h&&n0(u)&&(l=l.responseEnd,o+=h*(l<a?1:(a-c)/(l-c)))}if(--s,t+=8*(n+o)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Lf=null,Df=null;function Ha(e){return e.nodeType===9?e:e.ownerDocument}function o0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sb(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function rb(e,t,i,s){return i=Ha(i).createElement(e),i[wt]=s,i[ei]=t,Ct(i,e,t),at(i),i}function Nf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ed=null;function v3(){var e=window.event;return e&&e.type==="popstate"?e===Ed?!1:(Ed=e,!0):(Ed=null,!1)}var Dp=typeof setTimeout=="function"?setTimeout:void 0,y3=typeof clearTimeout=="function"?clearTimeout:void 0,a0=typeof Promise=="function"?Promise:void 0,l0=typeof requestAnimationFrame=="function"?requestAnimationFrame:Dp,b3=typeof queueMicrotask=="function"?queueMicrotask:typeof a0<"u"?function(e){return a0.resolve(null).then(e).catch(w3)}:Dp;function w3(e){setTimeout(function(){throw e})}function Dr(e){return e==="head"}function c0(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),Co(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Ad(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Ad(i);for(var n=i.firstChild;n;){var o=n.nextSibling,a=n.nodeName;n[Va]||a==="SCRIPT"||a==="STYLE"||a==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=o}}else i==="body"&&Ad(e.ownerDocument.body);i=r}while(i);Co(t)}function h0(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function nb(e,t,i){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,i!=null&&(e.style.viewTransitionClass=i),i=getComputedStyle(e),i.display==="inline"){if(t=e.getClientRects(),t.length===1)var s=1;else for(var r=s=0;r<t.length;r++){var n=t[r];0<n.width&&0<n.height&&s++}s===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+i.paddingTop,e.marginBottom="-"+i.paddingBottom)}}function ob(e,t){e=e.style,t=t.style;var i=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=i==null||typeof i=="boolean"?"":(""+i).trim(),i=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=i==null||typeof i=="boolean"?"":(""+i).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(i=t.display,e.display=i==null||typeof i=="boolean"?"":i,i=t.margin,i!=null?e.margin=i:(i=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=i==null||typeof i=="boolean"?"":i,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function ab(e,t,i){return i=i.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=i.innerHeight&&e.left<=i.innerWidth}}function Bf(e){var t=e.getBoundingClientRect(),i=getComputedStyle(e);return ab(t,i,e)}function S3(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var i=getComputedStyle(e);return ab(t,i,e)}function k3(e){return e.documentElement.clientHeight}function x3(e){this.addEventListener("load",e),this.addEventListener("error",e)}function C3(e,t,i,s,r,n,o,a,l){var c=t.nodeType===9?t:t.ownerDocument;try{var h=c.startViewTransition({update:function(){var d=c.defaultView,f=d.navigation&&d.navigation.transition,g=c.fonts.status;s();var b=[];if(g==="loaded"&&(k3(c),c.fonts.status==="loading"&&b.push(c.fonts.ready)),g=b.length,e!==null)for(var T=e.suspenseyImages,_=0,m=0;m<T.length;m++){var v=T[m];if(!v.complete){var p=v.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<d.innerHeight&&p.left<d.innerWidth){if(_+=yb(v),_>Mc){b.length=g;break}v=new Promise(x3.bind(v)),b.push(v)}}}if(0<b.length)return d=Promise.race([Promise.all(b),new Promise(function(E){return setTimeout(E,500)})]).then(r,r),(f?Promise.allSettled([f.finished,d]):d).then(n,n);if(r(),f)return f.finished.then(n,n);n()},types:i});c.__reactViewTransition=h;var u=[];return h.ready.then(function(){for(var d=c.documentElement.getAnimations({subtree:!0}),f=0;f<d.length;f++){var g=d[f],b=g.effect,T=b.pseudoElement;if(T!=null&&T.startsWith("::view-transition")){u.push(g),g=b.getKeyframes();for(var _=T=void 0,m=!0,v=0;v<g.length;v++){var p=g[v],E=p.width;if(T===void 0)T=E;else if(T!==E){m=!1;break}if(E=p.height,_===void 0)_=E;else if(_!==E){m=!1;break}delete p.width,delete p.height,p.transform==="none"&&delete p.transform}m&&T!==void 0&&_!==void 0&&(b.setKeyframes(g),m=getComputedStyle(b.target,b.pseudoElement),m.width!==T||m.height!==_)&&(m=g[0],m.width=T,m.height=_,m=g[g.length-1],m.width=T,m.height=_,b.setKeyframes(g))}}o()},function(d){c.__reactViewTransition===h&&(c.__reactViewTransition=null);try{typeof d=="object"&&d!==null&&d.name==="InvalidStateError"&&(d.message==="View transition was skipped because document visibility state is hidden."||d.message==="Skipping view transition because document visibility state has become hidden."||d.message==="Skipping view transition because viewport size changed."||d.message==="Transition was aborted because of invalid state")&&(d=null),d!==null&&l(d)}finally{s(),r(),o()}}),h.finished.finally(function(){for(var d=0;d<u.length;d++)u[d].cancel();c.__reactViewTransition===h&&(c.__reactViewTransition=null),a()}),h}catch{return s(),r(),o(),null}}function tn(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}tn.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:ve({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};tn.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,i=e.getAnimations({subtree:!0}),s=[],r=0;r<i.length;r++){var n=i[r].effect;n!==null&&n.target===e&&n.pseudoElement===t&&s.push(i[r])}return s};tn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function lb(e){return{name:e,group:new tn("group",e),imagePair:new tn("image-pair",e),old:new tn("old",e),new:new tn("new",e)}}function gi(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}gi.prototype.addEventListener=function(e,t,i){var s=null,r=null;if(!(i!=null&&typeof i!="boolean"&&(s=i.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var n=this._eventListeners;if(cb(n,e,t,i)===-1){var o=this,a=t;i!=null&&typeof i!="boolean"&&i.once===!0&&(a=function(l){o.removeEventListener(e,t,i),typeof t=="function"?t.call(this,l):t.handleEvent(l)}),s!==null&&(r=o.removeEventListener.bind(o,e,t,i),s.addEventListener("abort",r,{once:!0}),r=s.removeEventListener.bind(s,"abort",r)),s=wo(i),n.push({type:e,listener:t,optionsOrUseCapture:i,attachedListener:a,cleanup:r}),Jt(this._fragmentFiber.child,!1,E3,e,a,s)}this._eventListeners=n}};function E3(e,t,i,s){return Je(e).addEventListener(t,i,s),!1}gi.prototype.removeEventListener=function(e,t,i){var s=this._eventListeners;if(s!==null&&(t=cb(s,e,t,i),t!==-1)){var r=s[t];i=r.attachedListener;var n=r.cleanup;r=wo(r.optionsOrUseCapture),Jt(this._fragmentFiber.child,!1,T3,e,i,r),s.splice(t,1),n!==null&&n()}};function T3(e,t,i,s){return Je(e).removeEventListener(t,i,s),!1}function wo(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function u0(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function cb(e,t,i,s){if(e.length===0)return-1;s=u0(s);for(var r=0;r<e.length;r++){var n=e[r];if(n.type===t&&n.listener===i&&u0(n.optionsOrUseCapture)===s)return r}return-1}gi.prototype.dispatchEvent=function(e){var t=mn(this._fragmentFiber);if(t===null)return!0;t=Je(t);var i=this._eventListeners;if(i!==null&&0<i.length||!e.bubbles){var s=t.nodeType===9?t.createComment(""):document.createTextNode("");if(i)for(var r=0;r<i.length;r++){var n=i[r];s.addEventListener(n.type,n.attachedListener,wo(n.optionsOrUseCapture))}if(t.appendChild(s),e=s.dispatchEvent(e),i)for(r=0;r<i.length;r++)n=i[r],s.removeEventListener(n.type,n.attachedListener,wo(n.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)};gi.prototype.focus=function(e){Jt(this._fragmentFiber.child,!0,hb,e,void 0,void 0)};function hb(e,t){return e.tag===6?!1:(e=Je(e),P3(e,t))}gi.prototype.focusLast=function(e){var t=[];Jt(this._fragmentFiber.child,!0,Np,t,void 0,void 0);for(var i=t.length-1;0<=i&&!hb(t[i],e);i--);};function Np(e,t){return t.push(e),!1}gi.prototype.blur=function(){var e=mn(this._fragmentFiber);e!==null&&(e=Je(e),e=Ha(e).activeElement,e!==null&&Jt(this._fragmentFiber.child,!1,A3,e,void 0,void 0))};function A3(e,t){return e.tag===6?!1:(e=Je(e),e===t||e.contains(t)?(t.blur(),!0):!1)}gi.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),Jt(this._fragmentFiber.child,!1,M3,e,void 0,void 0)};function M3(e,t){return e.tag===6||(e=Je(e),t.observe(e)),!1}gi.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),Jt(this._fragmentFiber.child,!1,R3,e,void 0,void 0);for(var i=t=0;i<Fi.length;i++){var s=Fi[i];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):Fi[t++]=s}Fi.length=t}};function R3(e,t){return e.tag===6||(e=Je(e),t.unobserve(e)),!1}var Fi=[],Td=!1;function L3(e,t,i){Fi.push({fragmentInstance:e,observer:t,instance:i}),Td||(Td=!0,q3(function(){Td=!1;var s=Fi;Fi=[];for(var r=0;r<s.length;r++){var n=s[r];n.observer.unobserve(n.instance)}}))}gi.prototype.getClientRects=function(){var e=[];return Jt(this._fragmentFiber.child,!1,D3,e,void 0,void 0),e};function D3(e,t){if(e.tag===6){e=e.stateNode;var i=e.ownerDocument.createRange();i.selectNodeContents(e),t.push.apply(t,i.getClientRects())}else e=Je(e),t.push.apply(t,e.getClientRects());return!1}gi.prototype.getRootNode=function(e){var t=mn(this._fragmentFiber);return t===null?this:Je(t).getRootNode(e)};gi.prototype.compareDocumentPosition=function(e){var t=mn(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var i=[];Jt(this._fragmentFiber.child,!1,Np,i,void 0,void 0);var s=Je(t);if(i.length===0){if(i=s,K_(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(i=t)}t=this._fragmentFiber;var r=s=i.compareDocumentPosition(e);return i===e?r=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(i=D0(t)[1],i===null?r=Node.DOCUMENT_POSITION_PRECEDING:(e=Je(i).compareDocumentPosition(e),r=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),r|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=Je(i[0]),r=Je(i[i.length-1]);var n=K_(this._fragmentFiber)?t.parentElement:s;if(n==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,n=n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),a=r.compareDocumentPosition(e),l=o&Node.DOCUMENT_POSITION_CONTAINED_BY||a&Node.DOCUMENT_POSITION_CONTAINED_BY;return a=s&&n&&o&Node.DOCUMENT_POSITION_FOLLOWING&&a&Node.DOCUMENT_POSITION_PRECEDING,t=s&&t===e||n&&r===e||l||a?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&t===e||!n&&r===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||N3(t,this._fragmentFiber,i[0],i[i.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function N3(e,t,i,s,r){var n=en(r);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(i=!!n)e:{for(;n!==null;){if(n.tag===7&&(n===t||n.alternate===t)){i=!0;break e}n=n.return}i=!1}return i}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(n===null)return n=r.ownerDocument,r===n||r===n.documentElement||r===n.body;e:{for(n=t,t=mn(t);n!==null;){if(!(n.tag!==5&&n.tag!==3&&n.tag!==27||n!==t&&n.alternate!==t)){n=!0;break e}n=n.return}n=!1}return n}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!n)&&!(t=n===i)&&(t=Rd(i,n,W_),t===null?t=!1:(Jt(t,!0,c5,n,i),n=Kn,Kn=null,t=n!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!n)&&!(t=n===s)&&(t=Rd(s,n,W_),t===null?t=!1:(Jt(t,!0,h5,n,s),n=Kn,Md=Kn=null,t=n!==null)),t):!1}function d0(e,t){var i=e.ownerDocument.createRange();i.selectNodeContents(e),e=i.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}gi.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(R(566));var t=[];Jt(this._fragmentFiber.child,!1,Np,t,void 0,void 0);var i=e!==!1;if(t.length===0){var s=D0(this._fragmentFiber);if(s=i?s[1]||s[0]||mn(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=Je(s),d0(e,i);return}if(s=Je(s),s.nodeType!==9){if(s.nodeType===11){i="host"in s?s.host:null,i!==null&&i.scrollIntoView(e);return}s.scrollIntoView(e)}}for(s=i?t.length-1:0;s!==(i?-1:t.length);){var r=t[s];r.tag===6?(r=Je(r),d0(r,i)):Je(r).scrollIntoView(e),s+=i?-1:1}};function B3(e,t){return e=Je(e),ub(e,t),!1}function ub(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function db(e,t){var i=t._eventListeners;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];e.addEventListener(r.type,r.attachedListener,wo(r.optionsOrUseCapture))}e.nodeType!==3&&(i=t._observers,i!==null&&i.forEach(function(n){for(var o=0,a=0;a<Fi.length;a++){var l=Fi[a];(l.fragmentInstance!==t||l.observer!==n||l.instance!==e)&&(Fi[o++]=l)}Fi.length=o,n.observe(e)}),ub(e,t))}function O3(e,t){var i=t._eventListeners;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];e.removeEventListener(r.type,r.attachedListener,wo(r.optionsOrUseCapture))}e.nodeType!==3&&(i=t._observers,i!==null&&i.forEach(function(n){typeof n.rootMargin=="string"?L3(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Of(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Of(i),lh(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function z3(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Va])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(n=e.getAttribute("rel"),n==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(n!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(n=e.getAttribute("src"),(n!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&n&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var n=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===n)return e}else return e;if(e=Ri(e.nextSibling),e===null)break}return null}function H3(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ri(e.nextSibling),e===null))return null;return e}function fb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ri(e.nextSibling),e===null))return null;return e}function zf(e){return e.data==="$?"||e.data==="$~"}function Bp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function U3(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ri(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Hf=null;function f0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ri(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function p0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function P3(e,t){function i(){s=!0}if(e.ownerDocument.activeElement===e)return!0;var s=!1;try{e.ownerDocument.addEventListener("focus",i,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",i,!0)}return s}function q3(e){l0(function(){l0(function(t){return e(t)})})}function pb(e,t,i){switch(t=Ha(i),e){case"html":if(e=t.documentElement,!e)throw Error(R(452));return e;case"head":if(e=t.head,!e)throw Error(R(453));return e;case"body":if(e=t.body,!e)throw Error(R(454));return e;default:throw Error(R(451))}}function gb(e,t,i){for(var s in i){var r=i[s];i.hasOwnProperty(s)&&r!=null&&fe(e,t,s,null,g3,r)}i.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===ss&&(e.onclick=null),lh(e)}function Ad(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lh(e)}var Li=new Map,g0=new Set;function Ua(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var zs=ce.d;ce.d={f:I3,r:F3,D:$3,C:K3,L:W3,m:V3,X:G3,S:j3,M:Y3};function I3(){var e=zs.f(),t=Sh();return e||t}function F3(e){var t=To(e);t!==null&&t.tag===5&&t.type==="form"?J1(t):zs.r(e)}var Lo=typeof document>"u"?null:document;function mb(e,t,i){var s=Lo;if(s&&typeof t=="string"&&t){var r=Ti(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),g0.has(r)||(g0.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Ct(t,"link",e),at(t),s.head.appendChild(t)))}}function $3(e){zs.D(e),mb("dns-prefetch",e,null)}function K3(e,t){zs.C(e,t),mb("preconnect",e,t)}function W3(e,t,i){zs.L(e,t,i);var s=Lo;if(s&&e&&t){var r='link[rel="preload"][as="'+Ti(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ti(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ti(i.imageSizes)+'"]')):r+='[href="'+Ti(e)+'"]';var n=r;switch(t){case"style":n=So(e);break;case"script":n=Do(e)}if(!(Li.has(n)||(e=ve({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Li.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Qa(n))||t==="script"&&s.querySelector(Ja(n))))){var o=s.createElement("link");Ct(o,"link",e),t==="style"&&(o[zc]=!0,o.onload=o.onerror=function(){W0(o)}),at(o),s.head.appendChild(o)}}}function V3(e,t){zs.m(e,t);var i=Lo;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ti(s)+'"][href="'+Ti(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=Do(e)}if(!Li.has(n)&&(e=ve({rel:"modulepreload",href:e},t),Li.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ja(n)))return}s=i.createElement("link"),Ct(s,"link",e),at(s),i.head.appendChild(s)}}}function j3(e,t,i){zs.S(e,t,i);var s=Lo;if(s&&e){var r=io(s).hoistableStyles,n=So(e);t=t||"default";var o=r.get(n);if(!o){var a={loading:0,preload:null};if(o=s.querySelector(Qa(n)))a.loading=5;else{e=ve({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Li.get(n))&&Op(e,i);var l=o=s.createElement("link");at(l),Ct(l,"link",e),l._p=new Promise(function(c,h){l.onload=c,l.onerror=h}),l.addEventListener("load",function(){a.loading|=1}),l.addEventListener("error",function(){a.loading|=2}),a.loading|=4,Tc(o,t,s)}o={type:"stylesheet",instance:o,count:1,state:a},r.set(n,o)}}}function G3(e,t){zs.X(e,t);var i=Lo;if(i&&e){var s=io(i).hoistableScripts,r=Do(e),n=s.get(r);n||(n=i.querySelector(Ja(r)),n||(e=ve({src:e,async:!0},t),(t=Li.get(r))&&zp(e,t),n=i.createElement("script"),at(n),Ct(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function Y3(e,t){zs.M(e,t);var i=Lo;if(i&&e){var s=io(i).hoistableScripts,r=Do(e),n=s.get(r);n||(n=i.querySelector(Ja(r)),n||(e=ve({src:e,async:!0,type:"module"},t),(t=Li.get(r))&&zp(e,t),n=i.createElement("script"),at(n),Ct(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function m0(e,t,i,s){var r=(r=mr.current)?Ua(r):null;if(!r)throw Error(R(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(i=So(i.href),t=io(r).hoistableStyles,s=t.get(i),s||(s={type:"style",instance:null,count:0,state:null},t.set(i,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=So(i.href);var n=io(r).hoistableStyles,o=n.get(e);if(o||(r=r.ownerDocument||r,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,o),(n=r.querySelector(Qa(e)))?n._p||(o.instance=n,o.state.loading=5):(n=Li.get(e),n||(n={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Li.set(e,n)),X3(r,e,n,o.state))),t&&s===null)throw Error(R(528,""));return o}if(t&&s!==null)throw Error(R(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(i=Do(i),t=io(r).hoistableScripts,s=t.get(i),s||(s={type:"script",instance:null,count:0,state:null},t.set(i,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(R(444,e))}}function So(e){return'href="'+Ti(e)+'"'}function Qa(e){return'link[rel="stylesheet"]['+e+"]"}function _b(e){return ve({},e,{"data-precedence":e.precedence,precedence:null})}function X3(e,t,i,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[zc]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[zc]=!0,t.onload=t.onerror=W0.bind(null,t),Ct(t,"link",i),at(t),e.head.appendChild(t);s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2})}function Do(e){return'[src="'+Ti(e)+'"]'}function Ja(e){return"script[async]"+e}function _0(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ti(i.href)+'"]');if(s)return t.instance=s,at(s),s;var r=ve({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),at(s),Ct(s,"style",r),Tc(s,i.precedence,e),t.instance=s;case"stylesheet":r=So(i.href);var n=e.querySelector(Qa(r));if(n)return t.state.loading|=4,t.instance=n,at(n),n;s=_b(i),(r=Li.get(r))&&Op(s,r),n=(e.ownerDocument||e).createElement("link"),at(n);var o=n;return o._p=new Promise(function(a,l){o.onload=a,o.onerror=l}),Ct(n,"link",s),t.state.loading|=4,Tc(n,i.precedence,e),t.instance=n;case"script":return n=Do(i.src),(r=e.querySelector(Ja(n)))?(t.instance=r,at(r),r):(s=i,(r=Li.get(n))&&(s=ve({},i),zp(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),at(r),Ct(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(R(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Tc(s,i.precedence,e));return t.instance}function Tc(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,n=r,o=0;o<s.length;o++){var a=s[o];if(a.dataset.precedence===t)n=a;else if(n!==r)break}n?n.parentNode.insertBefore(e,n.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Op(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function zp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ac=null;function v0(e,t,i){if(Ac===null){var s=new Map,r=Ac=new Map;r.set(i,s)}else r=Ac,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var n=i[r];if(!(n[Va]||n[wt]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var o=n.getAttribute(t)||"";o=e+o;var a=s.get(o);a?a.push(n):s.set(o,[n])}}return s}function Uf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Z3(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function y0(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function vb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function yb(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function b0(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=yb(t),e.suspenseyImages.push(t)),e=eE.bind(e),t.decode().then(e,e))}function Q3(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=So(s.href),n=t.querySelector(Qa(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Pa.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,at(n);return}n=t.ownerDocument||t,s=_b(s),(r=Li.get(r))&&Op(s,r),n=n.createElement("link"),at(n);var o=n;o._p=new Promise(function(a,l){o.onload=a,o.onerror=l}),Ct(n,"link",s),i.instance=n}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Pa.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Mc=0;function J3(e,t){return e.stylesheets&&e.count===0&&Rc(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&Rc(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&Mc===0&&(Mc=62500*_3());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Rc(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>Mc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function bb(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Rc(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Pa(){this.count--,bb(this)}function eE(){this.imgCount--,bb(this)}var nh=null;function Rc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nh=new Map,t.forEach(tE,e),nh=null,Pa.call(e))}function tE(e,t){if(!(t.state.loading&4)){var i=nh.get(e);if(i)var s=i.get(null);else{i=new Map,nh.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var o=r[n];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(i.set(o.dataset.precedence,o),s=o)}s&&i.set(null,s)}r=t.instance,o=r.getAttribute("data-precedence"),n=i.get(o)||s,n===s&&i.set(null,r),i.set(o,r),this.count++,s=Pa.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),n?n.parentNode.insertBefore(r,n.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var ko={$$typeof:is,Provider:null,Consumer:null,_currentValue:sn,_currentValue2:sn,_threadCount:0};function iE(e,t,i,s,r,n,o,a,l){this.tag=1,this.containerInfo=e,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=id(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=id(0),this.hiddenUpdates=id(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.transitionTypes=null,this.incompleteTransitions=new Map}function wb(e,t,i,s,r,n,o,a,l,c,h,u){return e=new iE(e,t,i,o,l,c,h,u,a),t=1,n===!0&&(t|=24),n=Zt(3,null,null,t),e.current=n,n.stateNode=e,t=ip(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},np(n),e}function Sb(e){return e?(e=Qn,e):Qn}function kb(e,t,i,s,r,n){r=Sb(r),s.context===null?s.context=r:s.pendingContext=r,s=vr(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=yr(e,s,t),i!==null&&(Qt(i,e,t),_a(i,e,t))}function w0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Hp(e,t){w0(e,t),(e=e.alternate)&&w0(e,t)}function xb(e){if(e.tag===13||e.tag===31){var t=yn(e,67108864);t!==null&&Qt(t,e,67108864),Hp(e,67108864)}}function S0(e){if(e.tag===13||e.tag===31){var t=fi();t=Kf(t);var i=yn(e,t);i!==null&&Qt(i,e,t),Hp(e,t)}}var xo=!0;function sE(e,t,i,s){var r=W.T;W.T=null;var n=ce.p;try{ce.p=2,Up(e,t,i,s)}finally{ce.p=n,W.T=r}}function rE(e,t,i,s){var r=W.T;W.T=null;var n=ce.p;try{ce.p=8,Up(e,t,i,s)}finally{ce.p=n,W.T=r}}function Up(e,t,i,s){if(xo){var r=Pf(s);if(r===null)Cd(e,t,s,oh,i),k0(e,s);else if(oE(r,e,t,i,s))s.stopPropagation();else if(k0(e,s),t&4&&-1<nE.indexOf(e)){for(;r!==null;){var n=To(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var o=Zr(n.pendingLanes);if(o!==0){var a=n;for(a.pendingLanes|=2,a.entangledLanes|=2;o;){var l=1<<31-di(o);a.entanglements[1]|=l,o&=~l}hs(n),(le&6)===0&&(eh=hi()+500,Za(0,!1))}}break;case 31:case 13:a=yn(n,2),a!==null&&Qt(a,n,2),Sh(),Hp(n,2)}if(n=Pf(s),n===null&&Cd(e,t,s,oh,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else Cd(e,t,s,null,i)}}function Pf(e){return e=jf(e),Pp(e)}var oh=null;function Pp(e){if(oh=null,e=en(e),e!==null){var t=Fa(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=M0(t),e!==null)return e;e=null}else if(i===31){if(e=R0(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return oh=e,null}function Cb(e){switch(e){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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(y5()){case z0:return 2;case H0:return 8;case Oc:case b5:return 32;case U0:return 268435456;default:return 32}default:return 32}}var qf=!1,kr=null,xr=null,Cr=null,qa=new Map,Ia=new Map,cr=[],nE="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 k0(e,t){switch(e){case"focusin":case"focusout":kr=null;break;case"dragenter":case"dragleave":xr=null;break;case"mouseover":case"mouseout":Cr=null;break;case"pointerover":case"pointerout":qa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ia.delete(t.pointerId)}}function oa(e,t,i,s,r,n){return e===null||e.nativeEvent!==n?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:n,targetContainers:[r]},t!==null&&(t=To(t),t!==null&&xb(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function oE(e,t,i,s,r){switch(t){case"focusin":return kr=oa(kr,e,t,i,s,r),!0;case"dragenter":return xr=oa(xr,e,t,i,s,r),!0;case"mouseover":return Cr=oa(Cr,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return qa.set(n,oa(qa.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,Ia.set(n,oa(Ia.get(n)||null,e,t,i,s,r)),!0}return!1}function Eb(e){var t=en(e.target);if(t!==null){var i=Fa(t);if(i!==null){if(t=i.tag,t===13){if(t=M0(i),t!==null){e.blockedOn=t,Y_(e.priority,function(){S0(i)});return}}else if(t===31){if(t=R0(i),t!==null){e.blockedOn=t,Y_(e.priority,function(){S0(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Pf(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Fd=s,i.target.dispatchEvent(s),Fd=null}else return t=To(i),t!==null&&xb(t),e.blockedOn=i,!1;t.shift()}return!0}function x0(e,t,i){Lc(e)&&i.delete(t)}function aE(){qf=!1,kr!==null&&Lc(kr)&&(kr=null),xr!==null&&Lc(xr)&&(xr=null),Cr!==null&&Lc(Cr)&&(Cr=null),qa.forEach(x0),Ia.forEach(x0)}function uc(e,t){e.blockedOn===t&&(e.blockedOn=null,qf||(qf=!0,et.unstable_scheduleCallback(et.unstable_NormalPriority,aE)))}var dc=null;function C0(e){dc!==e&&(dc=e,et.unstable_scheduleCallback(et.unstable_NormalPriority,function(){dc===e&&(dc=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(Pp(s||i)===null)continue;break}var n=To(i);n!==null&&(e.splice(t,3),t-=3,nf(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Co(e){function t(l){return uc(l,e)}kr!==null&&uc(kr,e),xr!==null&&uc(xr,e),Cr!==null&&uc(Cr,e),qa.forEach(t),Ia.forEach(t);for(var i=0;i<cr.length;i++){var s=cr[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<cr.length&&(i=cr[0],i.blockedOn===null);)Eb(i),i.blockedOn===null&&cr.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],n=i[s+1],o=r[ei]||null;if(typeof n=="function")o||C0(i);else if(o){var a=null;if(n&&n.hasAttribute("formAction")){if(r=n,o=n[ei]||null)a=o.formAction;else if(Pp(r)!==null)continue}else a=o.action;typeof a=="function"?i[s+1]=a:(i.splice(s,3),s-=3),C0(i)}}}function Tb(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(o){return r=o})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var n=navigation.currentEntry;n&&n.url!=null&&navigation.navigate(n.url,{state:n.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function qp(e){this._internalRoot=e}Ch.prototype.render=qp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(R(409));var i=t.current,s=fi();kb(i,s,e,t,null,null)};Ch.prototype.unmount=qp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kb(e.current,2,null,e,null,null),Sh(),t[Eo]=null}};function Ch(e){this._internalRoot=e}Ch.prototype.unstable_scheduleHydration=function(e){if(e){var t=K0();e={blockedOn:null,target:e,priority:t};for(var i=0;i<cr.length&&t!==0&&t<cr[i].priority;i++);cr.splice(i,0,e),i===0&&Eb(e)}};var E0=T0.version;if(E0!=="19.3.0")throw Error(R(527,E0,"19.3.0"));ce.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(R(188)):(e=Object.keys(e).join(","),Error(R(268,e)));return e=l5(t),e=e!==null?L0(e):null,e=e===null?null:e.stateNode,e};var lE={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(aa=__REACT_DEVTOOLS_GLOBAL_HOOK__,!aa.isDisabled&&aa.supportsFiber))try{$a=aa.inject(lE),ui=aa}catch{}var aa;Eh.createRoot=function(e,t){if(!A0(e))throw Error(R(299));var i=!1,s="",r=ay,n=ly,o=cy;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(n=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=wb(e,1,!1,null,null,i,s,null,r,n,o,Tb),e[Eo]=t.current,Lp(e),new qp(t)};Eh.hydrateRoot=function(e,t,i){if(!A0(e))throw Error(R(299));var s=!1,r="",n=ay,o=ly,a=cy,l=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(n=i.onUncaughtError),i.onCaughtError!==void 0&&(o=i.onCaughtError),i.onRecoverableError!==void 0&&(a=i.onRecoverableError),i.formState!==void 0&&(l=i.formState)),t=wb(e,1,!0,t,i??null,s,r,l,n,o,a,Tb),t.context=Sb(null),i=t.current,s=fi(),s=Kf(s),r=vr(s),r.callback=null,yr(i,r,s),i=s,t.current.lanes=i,Wa(t,i),hs(t),e[Eo]=t.current,Lp(e),new Ch(t)};Eh.version="19.3.0"});var Lb=Yi((Z8,Rb)=>{"use strict";function Mb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mb)}catch(e){console.error(e)}}Mb(),Rb.exports=Ab()});var Rx=Yi(xu=>{"use strict";var GR=Symbol.for("react.transitional.element"),YR=Symbol.for("react.fragment");function Mx(e,t,i){var s=null;if(i!==void 0&&(s=""+i),t.key!==void 0&&(s=""+t.key),"key"in t){i={};for(var r in t)r!=="key"&&(i[r]=t[r])}else i=t;return t=i.ref,{$$typeof:GR,type:e,key:s,ref:t!==void 0?t:null,props:i}}xu.Fragment=YR;xu.jsx=Mx;xu.jsxs=Mx});var F=Yi((FB,Lx)=>{"use strict";Lx.exports=Rx()});var Be=H(ri(),1),A2=H(Lb(),1);var Ow=Object.defineProperty,cE=Object.getOwnPropertyDescriptor,hE=(e,t)=>{for(var i in t)Ow(e,i,{get:t[i],enumerable:!0})},Pe=(e,t,i,s)=>{for(var r=s>1?void 0:s?cE(t,i):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&Ow(t,i,r),r},q=(e,t)=>(i,s)=>t(i,s,e),Db="Terminal input",sg={get:()=>Db,set:e=>Db=e},Nb="Too much output to announce, navigate to rows manually to read",rg={get:()=>Nb,set:e=>Nb=e};function uE(e){return e.replace(/\r?\n/g,"\r")}function dE(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function fE(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function pE(e,t,i,s){if(e.stopPropagation(),e.clipboardData){let r=e.clipboardData.getData("text/plain");zw(r,t,i,s)}}function zw(e,t,i,s){e=uE(e),e=dE(e,i.decPrivateModes.bracketedPasteMode&&s.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(e,!0),t.value=""}function Hw(e,t,i){let s=i.getBoundingClientRect(),r=e.clientX-s.left-10,n=e.clientY-s.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${r}px`,t.style.top=`${n}px`,t.style.zIndex="1000",t.focus()}function Bb(e,t,i,s,r){Hw(e,t,i),r&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}function Hr(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Zh(e,t=0,i=e.length){let s="";for(let r=t;r<i;++r){let n=e[r];n>65535?(n-=65536,s+=String.fromCharCode((n>>10)+55296)+String.fromCharCode(n%1024+56320)):s+=String.fromCharCode(n)}return s}var gE=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r=0;if(this._interim){let n=e.charCodeAt(r++);56320<=n&&n<=57343?t[s++]=(this._interim-55296)*1024+n-56320+65536:(t[s++]=this._interim,t[s++]=n),this._interim=0}for(let n=r;n<i;++n){let o=e.charCodeAt(n);if(55296<=o&&o<=56319){if(++n>=i)return this._interim=o,s;let a=e.charCodeAt(n);56320<=a&&a<=57343?t[s++]=(o-55296)*1024+a-56320+65536:(t[s++]=o,t[s++]=a);continue}o!==65279&&(t[s++]=o)}return s}},mE=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r,n,o,a,l=0,c=0;if(this.interim[0]){let d=!1,f=this.interim[0];f&=(f&224)===192?31:(f&240)===224?15:7;let g=0,b;for(;(b=this.interim[++g]&63)&&g<4;)f<<=6,f|=b;let T=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,_=T-g;for(;c<_;){if(c>=i)return 0;if(b=e[c++],(b&192)!==128){c--,d=!0;break}else this.interim[g++]=b,f<<=6,f|=b&63}d||(T===2?f<128?c--:t[s++]=f:T===3?f<2048||f>=55296&&f<=57343||f===65279||(t[s++]=f):f<65536||f>1114111||(t[s++]=f)),this.interim.fill(0)}let h=i-4,u=c;for(;u<i;){for(;u<h&&!((r=e[u])&128)&&!((n=e[u+1])&128)&&!((o=e[u+2])&128)&&!((a=e[u+3])&128);)t[s++]=r,t[s++]=n,t[s++]=o,t[s++]=a,u+=4;if(r=e[u++],r<128)t[s++]=r;else if((r&224)===192){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(l=(r&31)<<6|n&63,l<128){u--;continue}t[s++]=l}else if((r&240)===224){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,s;if(o=e[u++],(o&192)!==128){u--;continue}if(l=(r&15)<<12|(n&63)<<6|o&63,l<2048||l>=55296&&l<=57343||l===65279)continue;t[s++]=l}else if((r&248)===240){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,s;if(o=e[u++],(o&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,this.interim[2]=o,s;if(a=e[u++],(a&192)!==128){u--;continue}if(l=(r&7)<<18|(n&63)<<12|(o&63)<<6|a&63,l<65536||l>1114111)continue;t[s++]=l}}return s}},Uw="",Ur=" ",yl=class Pw{constructor(){this.fg=0,this.bg=0,this.extended=new Fh}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new Pw;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Fh=class qw{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new qw(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Oi=class Iw extends yl{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Fh,this.combinedData=""}static fromCharData(t){let i=new Iw;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Hr(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let r=t[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(s-55296)*1024+r-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Ob="di$target",ng="di$dependencies",Ip=new Map;function _E(e){return e[ng]||[]}function ft(e){if(Ip.has(e))return Ip.get(e);let t=function(i,s,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");vE(t,i,r)};return t._id=e,Ip.set(e,t),t}function vE(e,t,i){t[Ob]===t?t[ng].push({id:e,index:i}):(t[ng]=[{id:e,index:i}],t[Ob]=t)}var $t=ft("BufferService"),Fw=ft("CoreMouseService"),An=ft("CoreService"),yE=ft("CharsetService"),Ig=ft("InstantiationService"),$w=ft("LogService"),Kt=ft("OptionsService"),Kw=ft("OscLinkService"),bE=ft("UnicodeService"),bl=ft("DecorationService"),og=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){let i=this._bufferService.buffer.lines.get(e-1);if(!i){t(void 0);return}let s=[],r=this._optionsService.rawOptions.linkHandler,n=new Oi,o=i.getTrimmedLength(),a=-1,l=-1,c=!1;for(let h=0;h<o;h++)if(!(l===-1&&!i.hasContent(h))){if(i.loadCell(h,n),n.hasExtendedAttrs()&&n.extended.urlId)if(l===-1){l=h,a=n.extended.urlId;continue}else c=n.extended.urlId!==a;else l!==-1&&(c=!0);if(c||l!==-1&&h===o-1){let u=this._oscLinkService.getLinkData(a)?.uri;if(u){let d={start:{x:l+1,y:e},end:{x:h+(!c&&h===o-1?1:0),y:e}},f=!1;if(!r?.allowNonHttpProtocols)try{let g=new URL(u);["http:","https:"].includes(g.protocol)||(f=!0)}catch{f=!0}f||s.push({text:u,range:d,activate:(g,b)=>r?r.activate(g,b,d):wE(g,b),hover:(g,b)=>r?.hover?.(g,b,d),leave:(g,b)=>r?.leave?.(g,b,d)})}c=!1,n.hasExtendedAttrs()&&n.extended.urlId?(l=h,a=n.extended.urlId):(l=-1,a=-1)}}t(s)}};og=Pe([q(0,$t),q(1,Kt),q(2,Kw)],og);function wE(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
9
|
+
`+s.stack}}var Pd=Object.prototype.hasOwnProperty,$f=et.unstable_scheduleCallback,td=et.unstable_cancelCallback,_5=et.unstable_shouldYield,v5=et.unstable_requestPaint,hi=et.unstable_now,y5=et.unstable_getCurrentPriorityLevel,z0=et.unstable_ImmediatePriority,H0=et.unstable_UserBlockingPriority,Oc=et.unstable_NormalPriority,b5=et.unstable_LowPriority,U0=et.unstable_IdlePriority,w5=et.log,S5=et.unstable_setDisableYieldValue,$a=null,ui=null;function hr(e){if(typeof w5=="function"&&S5(e),ui&&typeof ui.setStrictMode=="function")try{ui.setStrictMode($a,e)}catch{}}var di=Math.clz32?Math.clz32:C5,k5=Math.log,x5=Math.LN2;function C5(e){return e>>>=0,e===0?32:31-(k5(e)/x5|0)|0}var jl=256,Gl=262144,Yl=4194304;function Zr(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ah(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var a=s&134217727;return a!==0?(s=a&~n,s!==0?r=Zr(s):(o&=a,o!==0?r=Zr(o):i||(i=a&~e,i!==0&&(r=Zr(i))))):(a=s&~n,a!==0?r=Zr(a):o!==0?r=Zr(o):i||(i=s&~e,i!==0&&(r=Zr(i)))),r===0?0:t!==0&&t!==r&&(t&n)===0&&(n=r&-r,i=t&-t,n>=i||n===32&&(i&4194048)!==0)?t:r}function Ka(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function P0(e,t){(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var s=31-di(i),r=1<<s;t|=e[s],i&=~r}return t}function E5(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 q0(){var e=Yl;return Yl<<=1,(Yl&62914560)===0&&(Yl=4194304),e}function id(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Wa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function T5(e,t,i,s,r,n){var o=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var a=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(i=o&~i;0<i;){var h=31-di(i),u=1<<h;a[h]=0,l[h]=-1;var d=c[h];if(d!==null)for(c[h]=null,h=0;h<d.length;h++){var f=d[h];f!==null&&(f.lane&=-536870913)}i&=~u}s!==0&&I0(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(o&~t))}function I0(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-di(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function F0(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-di(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function $0(e,t){var i=t&-t;return i=(i&42)!==0?1:Kf(i),(i&(e.suspendedLanes|t))!==0?0:i}function Kf(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Wf(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function K0(){var e=ce.p;return e!==0?e:(e=window.event,e===void 0?32:Cb(e.type))}function Y_(e,t){var i=ce.p;try{return ce.p=e,t()}finally{ce.p=i}}var Bs=Math.random().toString(36).slice(2),wt="__reactFiber$"+Bs,ei="__reactProps$"+Bs,Eo="__reactContainer$"+Bs,X_="__reactEvents$"+Bs,A5="__reactListeners$"+Bs,M5="__reactHandles$"+Bs,Z_="__reactResources$"+Bs,Va="__reactMarker$"+Bs,zc="__reactLoad$"+Bs;function lh(e){delete e[wt],delete e[ei],delete e[A5],delete e[M5]}function en(e){var t;if(t=e[wt])return t;for(var i=e.parentNode;i;){if(t=i[Eo]||i[wt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=p0(e);e!==null;){if(i=e[wt])return i;e=p0(e)}return t}e=i,i=e.parentNode}return null}function To(e){if(e=e[wt]||e[Eo]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ha(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(R(33))}function io(e){var t=e[Z_];return t||(t=e[Z_]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function at(e){e[Va]=!0}function W0(e){e[zc]=void 0}var V0=new Set,j0={};function _n(e,t){po(e,t),po(e+"Capture",t)}function po(e,t){for(j0[e]=t,e=0;e<t.length;e++)V0.add(t[e])}var R5=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]*$"),Q_={},J_={};function L5(e){return Pd.call(J_,e)?!0:Pd.call(Q_,e)?!1:R5.test(e)?J_[e]=!0:(Q_[e]=!0,!1)}var ae=!1;function ev(){var e=ae;return ae=!1,e}function fc(e,t,i){if(L5(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,i)}}function Xl(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,i)}}function Ss(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,s)}}function oi(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function G0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function D5(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,n=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,n.call(this,o)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qd(e){if(!e._valueTracker){var t=G0(e)?"checked":"value";e._valueTracker=D5(e,t,""+e[t])}}function Y0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=G0(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}var N5=/[\n"\\]/g;function Ti(e){return e.replace(N5,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Id(e,t,i,s,r,n,o,a){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+oi(t)):e.value!==""+oi(t)&&(e.value=""+oi(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?o==="number"&&e.value==t?sd(e,oi(e.value)):sd(e,oi(t)):i!=null?sd(e,oi(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.name=""+oi(a):e.removeAttribute("name")}function X0(e,t,i,s,r,n,o,a){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(e.type=n),t!=null||i!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){qd(e);return}i=i!=null?""+oi(i):"",t=t!=null?""+oi(t):i,a||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=a?e.checked:!!s,e.defaultChecked=!!s,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),qd(e)}function sd(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function so(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+oi(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Z0(e,t,i){if(t!=null&&(t=""+oi(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+oi(i):""}function Q0(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(R(92));if(ca(s)){if(1<s.length)throw Error(R(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=oi(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),qd(e)}function go(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var B5=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 tv(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||B5.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function J0(e,t,i){if(t!=null&&typeof t!="object")throw Error(R(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="",ae=!0);for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&(tv(e,r,s),ae=!0)}else for(var n in t)t.hasOwnProperty(n)&&tv(e,n,t[n])}function Vf(e){if(e.indexOf("-")===-1)return!1;switch(e){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 O5=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"],["maskType","mask-type"],["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"]]),z5=/^[\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 pc(e){return z5.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ss(){}var Fd=null;function jf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jn=null,ro=null;function iv(e){var t=To(e);if(t&&(e=t.stateNode)){var i=e[ei]||null;e:switch(e=t.stateNode,t.type){case"input":if(Id(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ti(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[ei]||null;if(!r)throw Error(R(90));Id(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Y0(s)}break e;case"textarea":Z0(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&so(e,!!i.multiple,t,!1)}}}var rd=!1;function e1(e,t,i){if(rd)return e(t,i);rd=!0;try{var s=e(t);return s}finally{if(rd=!1,(jn!==null||ro!==null)&&(Sh(),jn&&(t=jn,e=ro,ro=jn=null,iv(t),e)))for(t=0;t<e.length;t++)iv(e[t])}}function Ta(e,t){var i=e.stateNode;if(i===null)return null;var s=i[ei]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(R(231,t,typeof i));return i}var As=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$d=!1;if(As)try{Un={},Object.defineProperty(Un,"passive",{get:function(){$d=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{$d=!1}var Un,ur=null,Gf=null,gc=null;function t1(){if(gc)return gc;var e,t=Gf,i=t.length,s,r="value"in ur?ur.value:ur.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var o=i-e;for(s=1;s<=o&&t[i-s]===r[n-s];s++);return gc=r.slice(e,1<s?1-s:void 0)}function mc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Zl(){return!0}function sv(){return!1}function It(e){function t(i,s,r,n,o){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(i=e[a],this[a]=i?i(n):n[a]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?Zl:sv,this.isPropagationStopped=sv,this}return ve(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Zl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Zl)},persist:function(){},isPersistent:Zl}),t}var Lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ch=It(Lr),ja=ve({},Lr,{view:0,detail:0}),H5=It(ja),nd,od,sa,hh=ve({},ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yf,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sa&&(sa&&e.type==="mousemove"?(nd=e.screenX-sa.screenX,od=e.screenY-sa.screenY):od=nd=0,sa=e),nd)},movementY:function(e){return"movementY"in e?e.movementY:od}}),rv=It(hh),U5=ve({},hh,{dataTransfer:0}),P5=It(U5),q5=ve({},ja,{relatedTarget:0}),ad=It(q5),I5=ve({},Lr,{animationName:0,elapsedTime:0,pseudoElement:0}),F5=It(I5),$5=ve({},Lr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),K5=It($5),W5=ve({},Lr,{data:0}),nv=It(W5),V5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},j5={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"},G5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y5(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=G5[e])?!!t[e]:!1}function Yf(){return Y5}var X5=ve({},ja,{key:function(e){if(e.key){var t=V5[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?j5[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yf,charCode:function(e){return e.type==="keypress"?mc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Z5=It(X5),Q5=ve({},hh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ov=It(Q5),J5=ve({},Lr,{submitter:0}),eC=It(J5),tC=ve({},ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yf}),iC=It(tC),sC=ve({},Lr,{propertyName:0,elapsedTime:0,pseudoElement:0}),rC=It(sC),nC=ve({},hh,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),oC=It(nC),aC=ve({},Lr,{newState:0,oldState:0,source:0}),lC=It(aC),cC=[9,13,27,32],Xf=As&&"CompositionEvent"in window,fa=null;As&&"documentMode"in document&&(fa=document.documentMode);var hC=As&&"TextEvent"in window&&!fa,i1=As&&(!Xf||fa&&8<fa&&11>=fa),av=" ",lv=!1;function s1(e,t){switch(e){case"keyup":return cC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function r1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gn=!1;function uC(e,t){switch(e){case"compositionend":return r1(t);case"keypress":return t.which!==32?null:(lv=!0,av);case"textInput":return e=t.data,e===av&&lv?null:e;default:return null}}function dC(e,t){if(Gn)return e==="compositionend"||!Xf&&s1(e,t)?(e=t1(),gc=Gf=ur=null,Gn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return i1&&t.locale!=="ko"?null:t.data;default:return null}}var fC={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 cv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fC[e.type]:t==="textarea"}function n1(e,t,i,s){jn?ro?ro.push(s):ro=[s]:jn=s,t=rh(t,"onChange"),0<t.length&&(i=new ch("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var pa=null,Aa=null;function pC(e){eb(e,0)}function uh(e){var t=ha(e);if(Y0(t))return e}function hv(e,t){if(e==="change")return t}var o1=!1;As&&(As?(Jl="oninput"in document,Jl||(ld=document.createElement("div"),ld.setAttribute("oninput","return;"),Jl=typeof ld.oninput=="function"),Ql=Jl):Ql=!1,o1=Ql&&(!document.documentMode||9<document.documentMode));var Ql,Jl,ld;function uv(){pa&&(pa.detachEvent("onpropertychange",a1),Aa=pa=null)}function a1(e){if(e.propertyName==="value"&&uh(Aa)){var t=[];n1(t,Aa,e,jf(e)),e1(pC,t)}}function gC(e,t,i){e==="focusin"?(uv(),pa=t,Aa=i,pa.attachEvent("onpropertychange",a1)):e==="focusout"&&uv()}function mC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uh(Aa)}function _C(e,t){if(e==="click")return uh(t)}function vC(e,t){if(e==="input"||e==="change")return uh(t)}function yC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pi=typeof Object.is=="function"?Object.is:yC;function Ma(e,t){if(pi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!Pd.call(t,r)||!pi(e[r],t[r]))return!1}return!0}function Kd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function dv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fv(e,t){var i=dv(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=dv(i)}}function l1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?l1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function c1(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kd(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Kd(e.document)}return t}function Zf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var bC=As&&"documentMode"in document&&11>=document.documentMode,Yn=null,Wd=null,ga=null,Vd=!1;function pv(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Vd||Yn==null||Yn!==Kd(s)||(s=Yn,"selectionStart"in s&&Zf(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),ga&&Ma(ga,s)||(ga=s,s=rh(Wd,"onSelect"),0<s.length&&(t=new ch("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Yn)))}function Yr(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Xn={animationend:Yr("Animation","AnimationEnd"),animationiteration:Yr("Animation","AnimationIteration"),animationstart:Yr("Animation","AnimationStart"),transitionrun:Yr("Transition","TransitionRun"),transitionstart:Yr("Transition","TransitionStart"),transitioncancel:Yr("Transition","TransitionCancel"),transitionend:Yr("Transition","TransitionEnd")},cd={},h1={};As&&(h1=document.createElement("div").style,"AnimationEvent"in window||(delete Xn.animationend.animation,delete Xn.animationiteration.animation,delete Xn.animationstart.animation),"TransitionEvent"in window||delete Xn.transitionend.transition);function vn(e){if(cd[e])return cd[e];if(!Xn[e])return e;var t=Xn[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in h1)return cd[e]=t[i];return e}var u1=vn("animationend"),d1=vn("animationiteration"),f1=vn("animationstart"),wC=vn("transitionrun"),SC=vn("transitionstart"),kC=vn("transitioncancel"),p1=vn("transitionend"),g1=new Map,jd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");jd.push("scrollEnd");function Ki(e,t){g1.set(e,t),_n(t,[e])}var xC=0;function Ms(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=$i.identifierPrefix;var i=xC++;return e="_"+e+"t_"+i.toString(32)+"_",t.autoName=e}function gv(e){if(e==null||typeof e=="string")return e;var t=null,i=uo;if(i!==null)for(var s=0;s<i.length;s++){var r=e[i[s]];if(r!=null){if(r==="none")return"none";t=t==null?r:t+(" "+r)}}return t??e.default}function Os(e,t){return e=gv(e),t=gv(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Hc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},xi=[],Zn=0,Qf=0;function dh(){for(var e=Zn,t=Qf=Zn=0;t<e;){var i=xi[t];xi[t++]=null;var s=xi[t];xi[t++]=null;var r=xi[t];xi[t++]=null;var n=xi[t];if(xi[t++]=null,s!==null&&r!==null){var o=s.pending;o===null?r.next=r:(r.next=o.next,o.next=r),s.pending=r}n!==0&&m1(i,r,n)}}function fh(e,t,i,s){xi[Zn++]=e,xi[Zn++]=t,xi[Zn++]=i,xi[Zn++]=s,Qf|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Jf(e,t,i,s){return fh(e,t,i,s),Uc(e)}function yn(e,t){return fh(e,null,null,t),Uc(e)}function m1(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,n=e.return;n!==null;)n.childLanes|=i,s=n.alternate,s!==null&&(s.childLanes|=i),n.tag===22&&(e=n.stateNode,e===null||e._visibility&1||(r=!0)),e=n,n=n.return;return e.tag===3?(n=e.stateNode,r&&t!==null&&(r=31-di(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function Uc(e){if(50<Ca)throw Ca=0,Ec=null,Error(R(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qn={};function CC(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(e,t,i,s){return new CC(e,t,i,s)}function ep(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Es(e,t){var i=e.alternate;return i===null?(i=Zt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&1206910976,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function _1(e,t){e.flags&=1206910978;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _c(e,t,i,s,r,n){var o=0;if(s=e,typeof s=="function")ep(s)&&(o=1);else if(typeof s=="string")o=Z3(e,i,os.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case Bd:return e=Zt(31,i,t,r),e.elementType=Bd,e.lanes=n,e;case Wn:return rn(i.children,r,n,t);case B0:o=8,r|=24;break;case Ld:return e=Zt(12,i,t,r|2),e.elementType=Ld,e.lanes=n,e;case Dd:return e=Zt(13,i,t,r),e.elementType=Dd,e.lanes=n,e;case Nd:return e=Zt(19,i,t,r),e.elementType=Nd,e.lanes=n,e;case d5:case Od:return e=r|32,e=Zt(30,i,t,e),e.elementType=Od,e.lanes=n,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case is:o=10;break e;case O0:o=9;break e;case If:o=11;break e;case Ff:o=14;break e;case ar:o=16,s=null;break e}o=29,i=Error(R(130,e===null?"null":typeof e,"")),s=null}return t=Zt(o,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function rn(e,t,i,s){return e=Zt(7,e,s,t),e.lanes=i,e}function hd(e,t,i){return e=Zt(6,e,null,t),e.lanes=i,e}function v1(e){var t=Zt(18,null,null,0);return t.stateNode=e,t}function ud(e,t,i){return t=Zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mv=new WeakMap;function Ai(e,t){if(typeof e=="object"&&e!==null){var i=mv.get(e);return i!==void 0?i:(t={value:e,source:t,stack:G_(t)},mv.set(e,t),t)}return{value:e,source:t,stack:G_(t)}}var Jn=[],eo=0,Pc=null,Ra=0,Ci=[],Ei=0,Er=null,rs=1,ns="";function xs(e,t){Jn[eo++]=Ra,Jn[eo++]=Pc,Pc=e,Ra=t}function y1(e,t,i){Ci[Ei++]=rs,Ci[Ei++]=ns,Ci[Ei++]=Er,Er=e;var s=rs;e=ns;var r=32-di(s)-1;s&=~(1<<r),i+=1;var n=32-di(t)+r;if(30<n){var o=r-r%5;n=(s&(1<<o)-1).toString(32),s>>=o,r-=o,rs=1<<32-di(t)+r|i<<r|s,ns=n+e}else rs=1<<n|i<<r|s,ns=e}function ph(e){e.return!==null&&(xs(e,1),y1(e,1,0))}function tp(e){for(;e===Pc;)Pc=Jn[--eo],Jn[eo]=null,Ra=Jn[--eo],Jn[eo]=null;for(;e===Er;)Er=Ci[--Ei],Ci[Ei]=null,ns=Ci[--Ei],Ci[Ei]=null,rs=Ci[--Ei],Ci[Ei]=null}function b1(e,t){Ci[Ei++]=rs,Ci[Ei++]=ns,Ci[Ei++]=Er,rs=t.id,ns=t.overflow,Er=e}var lt=null,we=null,Q=!1,_r=null,Mi=!1,Gd=Error(R(519));function Tr(e){var t=Error(R(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw La(Ai(t,e)),Gd}function _v(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[wt]=e,t[ei]=s,i){case"dialog":ee("cancel",t),ee("close",t);break;case"iframe":case"object":case"embed":ee("load",t);break;case"video":case"audio":for(i=0;i<Oa.length;i++)ee(Oa[i],t);break;case"source":ee("error",t);break;case"img":case"image":case"link":ee("error",t),ee("load",t);break;case"details":ee("toggle",t);break;case"input":ee("invalid",t),X0(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":ee("invalid",t);break;case"textarea":ee("invalid",t),Q0(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||ib(t.textContent,i)?(s.popover!=null&&(ee("beforetoggle",t),ee("toggle",t)),s.onScroll!=null&&ee("scroll",t),s.onScrollEnd!=null&&ee("scrollend",t),s.onClick!=null&&(t.onclick=ss),t=!0):t=!1,t||Tr(e,!0)}function qc(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Mi=!1;return;case 27:case 3:Mi=!0;return;default:lt=lt.return}}function Pn(e){if(e!==lt)return!1;if(!Q)return qc(e),Q=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Nf(e.type,e.memoizedProps)),i=!i),i&&we&&Tr(e),qc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));we=f0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));we=f0(e)}else t===27?(t=we,Dr(e.type)?(e=Hf,Hf=null,we=e):we=t):we=lt?Ri(e.stateNode.nextSibling):null;return!0}function ln(){we=lt=null,Q=!1}function dd(){var e=_r;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),_r=null),e}function La(e){_r===null?_r=[e]:_r.push(e)}var Yd=cs(null),bn=null,Cs=null;function dr(e,t,i){Se(Yd,t._currentValue),t._currentValue=i}function Ts(e){e._currentValue=Yd.current,kt(Yd)}function vc(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Xd(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var o=r.child;n=n.firstContext;e:for(;n!==null;){var a=n;n=r;for(var l=0;l<t.length;l++)if(a.context===t[l]){n.lanes|=i,a=n.alternate,a!==null&&(a.lanes|=i),vc(n.return,i,e),s||(o=null);break e}n=a.next}}else if(r.tag===18){if(o=r.return,o===null)throw Error(R(341));o.lanes|=i,n=o.alternate,n!==null&&(n.lanes|=i),vc(o,i,e),o=null}else r.tag===13&&r.memoizedState!==null&&r.memoizedState.dehydrated===null?(r.lanes|=i,o=r.alternate,o!==null&&(o.lanes|=i),vc(r.return,i,e),o=r.child,o=o!==null?o.sibling:null):o=r.child;if(o!==null)o.return=r;else for(o=r;o!==null;){if(o===e){o=null;break}if(r=o.sibling,r!==null){r.return=o.return,o=r;break}o=o.return}r=o}}function cn(e,t,i,s){e=null;for(var r=t,n=!1;r!==null;){if(!n){if((r.flags&524288)!==0)n=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var o=r.alternate;if(o===null)throw Error(R(387));if(o=o.memoizedProps,o!==null){var a=r.type;pi(r.pendingProps.value,o.value)||(e!==null?e.push(a):e=[a])}}else if(r===Dc.current){if(o=r.alternate,o===null)throw Error(R(387));o.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ko):e=[ko])}r=r.return}return e!==null&&Xd(t,e,i,s),t.flags|=262144,e!==null}function Ic(e){for(e=e.firstContext;e!==null;){if(!pi(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function hn(e){bn=e,Cs=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return w1(bn,e)}function ec(e,t){return bn===null&&hn(e),w1(e,t)}function w1(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Cs===null){if(e===null)throw Error(R(308));Cs=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Cs=Cs.next=t;return i}var EC=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},TC=et.unstable_scheduleCallback,AC=et.unstable_NormalPriority,je={$$typeof:is,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ip(){return{controller:new EC,data:new Map,refCount:0}}function Ga(e){e.refCount--,e.refCount===0&&TC(AC,function(){e.controller.abort()})}function vv(e,t){if((e.pendingLanes&4194048)!==0){var i=e.transitionTypes;for(i===null&&(i=e.transitionTypes=[]),e=0;e<t.length;e++){var s=t[e];i.indexOf(s)===-1&&i.push(s)}}}var ua=null;function MC(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var ma=null,Zd=0,un=0,no=null;function RC(e,t){if(ma===null){var i=ma=[];Zd=0,un=Rp(),no={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Zd++,t.then(yv,yv),t}function yv(){if(--Zd===0&&(ua=null,ma!==null)){no!==null&&(no.status="fulfilled");var e=ma;ma=null,un=0,no=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function LC(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var bv=V.S;V.S=function(e,t){if(Py=hi(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&RC(e,t),ua!==null)for(var i=bo;i!==null;)vv(i,ua),i=i.next;if(i=e.types,i!==null){for(var s=bo;s!==null;)vv(s,i),s=s.next;if(un!==0){s=ua,s===null&&(s=ua=[]);for(var r=0;r<i.length;r++){var n=i[r];s.indexOf(n)===-1&&s.push(n)}}}bv!==null&&bv(e,t)};var nn=cs(null);function sp(){var e=nn.current;return e!==null?e:_e.pooledCache}function yc(e,t){t===null?Se(nn,nn.current):Se(nn,t.pool)}function S1(){var e=sp();return e===null?null:{parent:je._currentValue,pool:e}}var Ao=Error(R(460)),rp=Error(R(474)),gh=Error(R(542)),Fc={then:function(){}};function wv(e){return e=e.status,e==="fulfilled"||e==="rejected"}function k1(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ss,ss),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,kv(e),e===void 0&&!("reason"in t)?Error(R(600)):e;default:if(typeof t.status=="string")t.then(ss,ss);else{if(e=_e,e!==null&&100<e.shellSuspendCounter)throw Error(R(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,kv(e),e}throw on=t,Ao}}function Qr(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(on=i,Ao):i}}var on=null;function Sv(){if(on===null)throw Error(R(459));var e=on;return on=null,e}function kv(e){if(e===Ao||e===gh)throw Error(R(483))}var oo=null,Da=0;function tc(e){var t=Da;return Da+=1,oo===null&&(oo=[]),k1(oo,e,t)}function rr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ic(e,t){throw t.$$typeof===u5?Error(R(525)):(e=Object.prototype.toString.call(t),Error(R(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function x1(e){function t(_,m){if(e){var v=_.deletions;v===null?(_.deletions=[m],_.flags|=16):v.push(m)}}function i(_,m){if(!e)return null;for(;m!==null;)t(_,m),m=m.sibling;return null}function s(_){for(var m=new Map;_!==null;)_.key===null?m.set(_.index,_):m.set(_.key,_),_=_.sibling;return m}function r(_,m){return _=Es(_,m),_.index=0,_.sibling=null,_}function n(_,m,v){return _.index=v,e?(v=_.alternate,v!==null?(v=v.index,v<m?(_.flags|=2,m):v):(_.flags|=134217730,m)):(_.flags|=1048576,m)}function o(_){return e&&_.alternate===null&&(_.flags|=134217730),_}function a(_,m,v,p){return m===null||m.tag!==6?(m=hd(v,_.mode,p),m.return=_,m):(m=r(m,v),m.return=_,m)}function l(_,m,v,p){var E=v.type;return E===Wn?(_=h(_,m,v.props.children,p,v.key),rr(_,v),_):m!==null&&(m.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ar&&Qr(E)===m.type)?(m=r(m,v.props),rr(m,v),m.return=_,m):(m=_c(v.type,v.key,v.props,null,_.mode,p),rr(m,v),m.return=_,m)}function c(_,m,v,p){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=ud(v,_.mode,p),m.return=_,m):(m=r(m,v.children||[]),m.return=_,m)}function h(_,m,v,p,E){return m===null||m.tag!==7?(m=rn(v,_.mode,p,E),m.return=_,m):(m=r(m,v),m.return=_,m)}function u(_,m,v){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=hd(""+m,_.mode,v),m.return=_,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Vl:return v=_c(m.type,m.key,m.props,null,_.mode,v),rr(v,m),v.return=_,v;case la:return m=ud(m,_.mode,v),m.return=_,m;case ar:return m=Qr(m),u(_,m,v)}if(ca(m)||ia(m))return m=rn(m,_.mode,v,null),m.return=_,m;if(typeof m.then=="function")return u(_,tc(m),v);if(m.$$typeof===is)return u(_,ec(_,m),v);ic(_,m)}return null}function d(_,m,v,p){var E=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return E!==null?null:a(_,m,""+v,p);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Vl:return v.key===E?l(_,m,v,p):null;case la:return v.key===E?c(_,m,v,p):null;case ar:return v=Qr(v),d(_,m,v,p)}if(ca(v)||ia(v))return E!==null?null:h(_,m,v,p,null);if(typeof v.then=="function")return d(_,m,tc(v),p);if(v.$$typeof===is)return d(_,m,ec(_,v),p);ic(_,v)}return null}function f(_,m,v,p,E){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return _=_.get(v)||null,a(m,_,""+p,E);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Vl:return _=_.get(p.key===null?v:p.key)||null,l(m,_,p,E);case la:return _=_.get(p.key===null?v:p.key)||null,c(m,_,p,E);case ar:return p=Qr(p),f(_,m,v,p,E)}if(ca(p)||ia(p))return _=_.get(v)||null,h(m,_,p,E,null);if(typeof p.then=="function")return f(_,m,v,tc(p),E);if(p.$$typeof===is)return f(_,m,v,ec(m,p),E);ic(m,p)}return null}function g(_,m,v,p){for(var E=null,A=null,L=m,B=m=0,W=null;L!==null&&B<v.length;B++){L.index>B?(W=L,L=null):W=L.sibling;var $=d(_,L,v[B],p);if($===null){L===null&&(L=W);break}e&&L&&$.alternate===null&&t(_,L),m=n($,m,B),A===null?E=$:A.sibling=$,A=$,L=W}if(B===v.length)return i(_,L),Q&&xs(_,B),E;if(L===null){for(;B<v.length;B++)L=u(_,v[B],p),L!==null&&(m=n(L,m,B),A===null?E=L:A.sibling=L,A=L);return Q&&xs(_,B),E}for(L=s(L);B<v.length;B++)W=f(L,_,B,v[B],p),W!==null&&(e&&($=W.alternate,$!==null&&L.delete($.key===null?B:$.key)),m=n(W,m,B),A===null?E=W:A.sibling=W,A=W);return e&&L.forEach(function(P){return t(_,P)}),Q&&xs(_,B),E}function b(_,m,v,p){if(v==null)throw Error(R(151));for(var E=null,A=null,L=m,B=m=0,W=null,$=v.next();L!==null&&!$.done;B++,$=v.next()){L.index>B?(W=L,L=null):W=L.sibling;var P=d(_,L,$.value,p);if(P===null){L===null&&(L=W);break}e&&L&&P.alternate===null&&t(_,L),m=n(P,m,B),A===null?E=P:A.sibling=P,A=P,L=W}if($.done)return i(_,L),Q&&xs(_,B),E;if(L===null){for(;!$.done;B++,$=v.next())$=u(_,$.value,p),$!==null&&(m=n($,m,B),A===null?E=$:A.sibling=$,A=$);return Q&&xs(_,B),E}for(L=s(L);!$.done;B++,$=v.next())$=f(L,_,B,$.value,p),$!==null&&(e&&(W=$.alternate,W!==null&&L.delete(W.key===null?B:W.key)),m=n($,m,B),A===null?E=$:A.sibling=$,A=$);return e&&L.forEach(function(Rt){return t(_,Rt)}),Q&&xs(_,B),E}function T(_,m,v,p){if(typeof v=="object"&&v!==null&&v.type===Wn&&v.key===null&&v.props.ref===void 0&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Vl:e:{for(var E=v.key;m!==null;){if(m.key===E){if(E=v.type,E===Wn){if(m.tag===7){i(_,m.sibling),p=r(m,v.props.children),rr(p,v),p.return=_,_=p;break e}}else if(m.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ar&&Qr(E)===m.type){i(_,m.sibling),p=r(m,v.props),rr(p,v),p.return=_,_=p;break e}i(_,m);break}else t(_,m);m=m.sibling}v.type===Wn?(p=rn(v.props.children,_.mode,p,v.key),rr(p,v),p.return=_,_=p):(p=_c(v.type,v.key,v.props,null,_.mode,p),rr(p,v),p.return=_,_=p)}return o(_);case la:e:{for(E=v.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){i(_,m.sibling),p=r(m,v.children||[]),p.return=_,_=p;break e}else{i(_,m);break}else t(_,m);m=m.sibling}p=ud(v,_.mode,p),p.return=_,_=p}return o(_);case ar:return v=Qr(v),T(_,m,v,p)}if(ca(v))return g(_,m,v,p);if(ia(v)){if(E=ia(v),typeof E!="function")throw Error(R(150));return v=E.call(v),b(_,m,v,p)}if(typeof v.then=="function")return T(_,m,tc(v),p);if(v.$$typeof===is)return T(_,m,ec(_,v),p);ic(_,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,m!==null&&m.tag===6?(i(_,m.sibling),p=r(m,v),p.return=_,_=p):(i(_,m),p=hd(v,_.mode,p),p.return=_,_=p),o(_)):i(_,m)}return function(_,m,v,p){try{Da=0;var E=T(_,m,v,p);return oo=null,E}catch(L){if(L===Ao||L===gh)throw L;var A=Zt(29,L,null,_.mode);return A.lanes=p,A.return=_,A}}}var dn=x1(!0),C1=x1(!1),lr=!1;function np(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yr(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(le&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Uc(e),m1(e,null,i),t}return fh(e,s,t,i),Uc(e)}function _a(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,F0(e,i)}}function fd(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,n=null;if(i=i.firstBaseUpdate,i!==null){do{var o={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=o:n=n.next=o,i=i.next}while(i!==null);n===null?r=n=t:n=n.next=t}else r=n=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:n,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Jd=!1;function va(){if(Jd){var e=no;if(e!==null)throw e}}function ya(e,t,i,s){Jd=!1;var r=e.updateQueue;lr=!1;var n=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?n=c:o.next=c,o=l;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=l))}if(n!==null){var u=r.baseState;o=0,h=c=l=null,a=n;do{var d=a.lane&-536870913,f=d!==a.lane;if(f?(re&d)===d:(s&d)===d){d!==0&&d===un&&(Jd=!0),h!==null&&(h=h.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var g=e,b=a;d=t;var T=i;switch(b.tag){case 1:if(g=b.payload,typeof g=="function"){u=g.call(T,u,d);break e}u=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,d=typeof g=="function"?g.call(T,u,d):g,d==null)break e;u=ve({},u,d);break e;case 2:lr=!0}}d=a.callback,d!==null&&(e.flags|=64,f&&(e.flags|=8192),f=r.callbacks,f===null?r.callbacks=[d]:f.push(d))}else f={lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=f,l=u):h=h.next=f,o|=d;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;f=a,a=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(!0);h===null&&(l=u),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=h,n===null&&(r.shared.lanes=0),Rr|=o,e.lanes=o,e.memoizedState=u}}function E1(e,t){if(typeof e!="function")throw Error(R(191,e));e.call(t)}function T1(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)E1(i[e],t)}var Ar=cs(null),$c=cs(0);function xv(e,t){e=Ns,Se($c,e),Se(Ar,t),Ns=e|t.baseLanes}function ef(){Se($c,Ns),Se(Ar,Ar.current)}function op(){Ns=$c.current,kt(Ar),kt($c)}var Et=cs(null),Nt=null;function br(e){var t=e.alternate;Se(xt,xt.current&1),Se(Et,e),Nt===null&&(t===null||Ar.current!==null||t.memoizedState!==null)&&(Nt=e)}function tf(e){Se(xt,xt.current),Se(Et,e),Nt===null&&(Nt=e)}function A1(e){e.tag===22?(Se(xt,xt.current),Se(Et,e),Nt===null&&(Nt=e)):wr()}function wr(){Se(xt,xt.current),Se(Et,Et.current)}function ai(e){kt(Et),Nt===e&&(Nt=null),kt(xt)}var xt=cs(0);function Na(e,t){Se(Et,Et.current),Se(xt,t)}function ap(e){kt(xt),kt(Et),Nt===e&&(Nt=null)}function Kc(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||zf(i)||Bp(i)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rs=0,Y=null,ge=null,Ve=null,Wc=!1,ao=!1,fn=!1,Vc=0,Ba=0,lo=null,DC=0;function ze(){throw Error(R(321))}function lp(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!pi(e[i],t[i]))return!1;return!0}function cp(e,t,i,s,r,n){return Rs=n,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?ny:oy,fn=!1,n=i(s,r),fn=!1,ao&&(n=R1(t,i,s,r)),M1(e),n}function M1(e){V.H=jc;var t=ge!==null&&ge.next!==null;if(Rs=0,Ve=ge=Y=null,Wc=!1,Ba=0,lo=null,t)throw Error(R(300));e===null||Ge||(e=e.dependencies,e!==null&&Ic(e)&&(Ge=!0))}function R1(e,t,i,s){Y=e;var r=0;do{if(ao&&(lo=null),Ba=0,ao=!1,25<=r)throw Error(R(301));if(r+=1,Ve=ge=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}V.H=qC,n=t(i,s)}while(ao);return n}function NC(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?Ya(t):t,e=e.useState()[0],(ge!==null?ge.memoizedState:null)!==e&&(Y.flags|=1024),t}function hp(){var e=Vc!==0;return Vc=0,e}function up(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function dp(e){if(Wc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wc=!1}Rs=0,Ve=ge=Y=null,ao=!1,Ba=Vc=0,lo=null}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ve===null?Y.memoizedState=Ve=e:Ve=Ve.next=e,Ve}function $e(){if(ge===null){var e=Y.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=Ve===null?Y.memoizedState:Ve.next;if(t!==null)Ve=t,ge=e;else{if(e===null)throw Y.alternate===null?Error(R(467)):Error(R(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},Ve===null?Y.memoizedState=Ve=e:Ve=Ve.next=e}return Ve}function mh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ya(e){var t=Ba;return Ba+=1,lo===null&&(lo=[]),e=k1(lo,e,t),t=Y,(Ve===null?t.memoizedState:Ve.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?ny:oy),e}function _h(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ya(e);if(e.$$typeof===p5)return;if(e.$$typeof===is)return St(e)}throw Error(R(438,String(e)))}function fp(e){var t=null,i=Y.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Y.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=mh(),Y.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=f5;return t.index++,i}function Ls(e,t){return typeof t=="function"?t(e):t}function bc(e){var t=$e();return pp(t,ge,e)}function pp(e,t,i){var s=e.queue;if(s===null)throw Error(R(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var o=r.next;r.next=n.next,n.next=o}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var a=o=null,l=null,c=t,h=!1;do{var u=c.lane&-536870913;if(u!==c.lane?(re&u)===u:(Rs&u)===u){var d=c.revertLane;if(d===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),u===un&&(h=!0);else if((Rs&d)===d){c=c.next,d===un&&(h=!0);continue}else u={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(a=l=u,o=n):l=l.next=u,Y.lanes|=d,Rr|=d;u=c.action,fn&&i(n,u),n=c.hasEagerState?c.eagerState:i(n,u)}else d={lane:u,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(a=l=d,o=n):l=l.next=d,Y.lanes|=u,Rr|=u;c=c.next}while(c!==null&&c!==t);if(l===null?o=n:l.next=a,!pi(n,e.memoizedState)&&(Ge=!0,h&&(i=no,i!==null)))throw i;e.memoizedState=n,e.baseState=o,e.baseQueue=l,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function pd(e){var t=$e(),i=t.queue;if(i===null)throw Error(R(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var o=r=r.next;do n=e(n,o.action),o=o.next;while(o!==r);pi(n,t.memoizedState)||(Ge=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function L1(e,t,i){var s=Y,r=$e(),n=Q;if(n){if(i===void 0)throw Error(R(407));i=i()}else i=t();var o=!pi((ge||r).memoizedState,i);if(o&&(r.memoizedState=i,Ge=!0),r=r.queue,gp(B1.bind(null,s,r,e),[e]),e=r.getSnapshot!==t||o||Ve!==null&&(Ve.memoizedState.tag&1)!==0,mo(e?9:8,{destroy:void 0},N1.bind(null,s,r,i,t),null),e){if(s.flags|=2048,_e===null)throw Error(R(349));n||(Rs&127)!==0||D1(s,t,i)}return i}function D1(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Y.updateQueue,t===null?(t=mh(),Y.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function N1(e,t,i,s){t.value=i,t.getSnapshot=s,O1(t)&&z1(e)}function B1(e,t,i){return i(function(){O1(t)&&z1(e)})}function O1(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!pi(e,i)}catch{return!0}}function z1(e){var t=yn(e,2);t!==null&&Qt(t,e,2)}function sf(e){var t=qt();if(typeof e=="function"){var i=e;if(e=i(),fn){hr(!0);try{i()}finally{hr(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ls,lastRenderedState:e},t}function H1(e,t,i,s){return e.baseState=i,pp(e,ge,typeof s=="function"?s:Ls)}function BC(e,t,i,s,r){if(yh(e))throw Error(R(485));if(e=t.action,e!==null){var n={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){n.listeners.push(o)}};V.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,U1(t,n)):(n.next=i.next,t.pending=i.next=n)}}function U1(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=V.T,o={};o.types=n!==null?n.types:null,V.T=o;try{var a=i(r,s),l=V.S;l!==null&&l(o,a),Cv(e,t,a)}catch(c){rf(e,t,c)}finally{n!==null&&o.types!==null&&(n.types=o.types),V.T=n}}else try{n=i(r,s),Cv(e,t,n)}catch(c){rf(e,t,c)}}function Cv(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Ev(e,t,s)},function(s){return rf(e,t,s)}):Ev(e,t,i)}function Ev(e,t,i){t.status="fulfilled",t.value=i,P1(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,U1(e,i)))}function rf(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,P1(t),t=t.next;while(t!==s)}e.action=null}function P1(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function q1(e,t){return t}function Tv(e,t){if(Q){var i=_e.formState;if(i!==null){e:{var s=Y;if(Q){if(we){t:{for(var r=we,n=Mi;r.nodeType!==8;){if(!n){r=null;break t}if(r=Ri(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){we=Ri(r.nextSibling),s=r.data==="F!";break e}}Tr(s)}s=!1}s&&(t=i[0])}}return i=qt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:q1,lastRenderedState:t},i.queue=s,i=iy.bind(null,Y,s),s.dispatch=i,s=sf(!1),n=yp.bind(null,Y,!1,s.queue),s=qt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=BC.bind(null,Y,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function Av(e){var t=$e();return I1(t,ge,e)}function I1(e,t,i){if(t=pp(e,t,q1)[0],e=bc(Ls)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ya(t)}catch(o){throw o===Ao?gh:o}else s=t;t=$e();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Y.flags|=2048,mo(9,{destroy:void 0},OC.bind(null,r,i),null)),[s,n,e]}function OC(e,t){e.action=t}function Mv(e){var t=$e(),i=ge;if(i!==null)return I1(t,i,e);$e(),t=t.memoizedState,i=$e();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function mo(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Y.updateQueue,t===null&&(t=mh(),Y.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function F1(){return $e().memoizedState}function wc(e,t,i,s){var r=qt();Y.flags|=e,r.memoizedState=mo(1|t,{destroy:void 0},i,s===void 0?null:s)}function vh(e,t,i,s){var r=$e();s=s===void 0?null:s;var n=r.memoizedState.inst;ge!==null&&s!==null&&lp(s,ge.memoizedState.deps)?r.memoizedState=mo(t,n,i,s):(Y.flags|=e,r.memoizedState=mo(1|t,n,i,s))}function Rv(e,t){wc(8390656,8,e,t)}function gp(e,t){vh(2048,8,e,t)}function zC(e){Y.flags|=4;var t=Y.updateQueue;if(t===null)t=mh(),Y.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function $1(e){var t=$e().memoizedState;return zC({ref:t,nextImpl:e}),function(){if((le&2)!==0)throw Error(R(440));return t.impl.apply(void 0,arguments)}}function K1(e,t){return vh(4,2,e,t)}function W1(e,t){return vh(4,4,e,t)}function V1(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function j1(e,t,i){i=i!=null?i.concat([e]):null,vh(4,4,V1.bind(null,t,e),i)}function mp(){}function G1(e,t){var i=$e();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&lp(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Y1(e,t){var i=$e();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&lp(t,s[1]))return s[0];if(s=e(),fn){hr(!0);try{e()}finally{hr(!1)}}return i.memoizedState=[s,t],s}function _p(e,t,i){return i===void 0||(Rs&1073741824)!==0&&(re&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Iy(),Y.lanes|=e,Rr|=e,i)}function X1(e,t,i,s){return pi(i,t)?i:Ar.current!==null?(e=_p(e,i,s),pi(e,t)||(Ge=!0),e):(Rs&106)===0||(Rs&1073741824)!==0&&(re&261930)===0?(Ge=!0,e.memoizedState=i):(e=Iy(),Y.lanes|=e,Rr|=e,t)}function Z1(e,t,i,s,r){var n=ce.p;ce.p=n!==0&&8>n?n:8;var o=V.T,a={};a.types=o!==null?o.types:null,V.T=a,yp(e,!1,t,i);try{var l=r(),c=V.S;if(c!==null&&c(a,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var h=LC(l,s);ba(e,t,h,fi(e))}else ba(e,t,s,fi(e))}catch(u){ba(e,t,{then:function(){},status:"rejected",reason:u},fi())}finally{ce.p=n,o!==null&&a.types!==null&&(o.types=a.types),V.T=o}}function HC(){}function nf(e,t,i,s){if(e.tag!==5)throw Error(R(476));var r=Q1(e).queue;Z1(e,r,t,sn,i===null?HC:function(){return J1(e),i(s)})}function Q1(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:sn,baseState:sn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ls,lastRenderedState:sn},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ls,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function J1(e){var t=Q1(e);t.next===null&&(t=e.alternate.memoizedState),ba(e,t.next.queue,{},fi())}function vp(){return St(ko)}function ey(){return $e().memoizedState}function ty(){return $e().memoizedState}function UC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=fi();e=vr(i);var s=yr(t,e,i);s!==null&&(Qt(s,t,i),_a(s,t,i)),t={cache:ip()},e.payload=t;return}t=t.return}}function PC(e,t,i){var s=fi();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},yh(e)?sy(t,i):(i=Jf(e,t,i,s),i!==null&&(Qt(i,e,s),ry(i,t,s)))}function iy(e,t,i){var s=fi();ba(e,t,i,s)}function ba(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(yh(e))sy(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var o=t.lastRenderedState,a=n(o,i);if(r.hasEagerState=!0,r.eagerState=a,pi(a,o))return fh(e,t,r,0),_e===null&&dh(),!1}catch{}if(i=Jf(e,t,r,s),i!==null)return Qt(i,e,s),ry(i,t,s),!0}return!1}function yp(e,t,i,s){if(s={lane:2,revertLane:Rp(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},yh(e)){if(t)throw Error(R(479))}else t=Jf(e,i,s,2),t!==null&&Qt(t,e,2)}function yh(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function sy(e,t){ao=Wc=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function ry(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,F0(e,i)}}var jc={readContext:St,use:_h,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useLayoutEffect:ze,useInsertionEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useSyncExternalStore:ze,useId:ze,useHostTransitionStatus:ze,useFormState:ze,useActionState:ze,useOptimistic:ze,useMemoCache:ze,useCacheRefresh:ze,useEffectEvent:ze},ny={readContext:St,use:_h,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:Rv,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,wc(4194308,4,V1.bind(null,t,e),i)},useLayoutEffect:function(e,t){return wc(4194308,4,e,t)},useInsertionEffect:function(e,t){wc(4,2,e,t)},useMemo:function(e,t){var i=qt();t=t===void 0?null:t;var s=e();if(fn){hr(!0);try{e()}finally{hr(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=qt();if(i!==void 0){var r=i(t);if(fn){hr(!0);try{i(t)}finally{hr(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=PC.bind(null,Y,e),[s.memoizedState,e]},useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:function(e){e=sf(e);var t=e.queue,i=iy.bind(null,Y,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:mp,useDeferredValue:function(e,t){var i=qt();return _p(i,e,t)},useTransition:function(){var e=sf(!1);return e=Z1.bind(null,Y,e.queue,!0,!1),qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Y,r=qt();if(Q){if(i===void 0)throw Error(R(407));i=i()}else{if(i=t(),_e===null)throw Error(R(349));(re&127)!==0||D1(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,Rv(B1.bind(null,s,n,e),[e]),s.flags|=2048,mo(9,{destroy:void 0},N1.bind(null,s,n,i,t),null),i},useId:function(){var e=qt(),t=_e.identifierPrefix;if(Q){var i=ns,s=rs;i=(s&~(1<<32-di(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Vc++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=DC++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vp,useFormState:Tv,useActionState:Tv,useOptimistic:function(e){var t=qt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=yp.bind(null,Y,!0,i),i.dispatch=t,[e,t]},useMemoCache:fp,useCacheRefresh:function(){return qt().memoizedState=UC.bind(null,Y)},useEffectEvent:function(e){var t=qt(),i={impl:e};return t.memoizedState=i,function(){if((le&2)!==0)throw Error(R(440));return i.impl.apply(void 0,arguments)}}},oy={readContext:St,use:_h,useCallback:G1,useContext:St,useEffect:gp,useImperativeHandle:j1,useInsertionEffect:K1,useLayoutEffect:W1,useMemo:Y1,useReducer:bc,useRef:F1,useState:function(){return bc(Ls)},useDebugValue:mp,useDeferredValue:function(e,t){var i=$e();return X1(i,ge.memoizedState,e,t)},useTransition:function(){var e=bc(Ls)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Ya(e),t]},useSyncExternalStore:L1,useId:ey,useHostTransitionStatus:vp,useFormState:Av,useActionState:Av,useOptimistic:function(e,t){var i=$e();return H1(i,ge,e,t)},useMemoCache:fp,useCacheRefresh:ty,useEffectEvent:$1},qC={readContext:St,use:_h,useCallback:G1,useContext:St,useEffect:gp,useImperativeHandle:j1,useInsertionEffect:K1,useLayoutEffect:W1,useMemo:Y1,useReducer:pd,useRef:F1,useState:function(){return pd(Ls)},useDebugValue:mp,useDeferredValue:function(e,t){var i=$e();return ge===null?_p(i,e,t):X1(i,ge.memoizedState,e,t)},useTransition:function(){var e=pd(Ls)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Ya(e),t]},useSyncExternalStore:L1,useId:ey,useHostTransitionStatus:vp,useFormState:Mv,useActionState:Mv,useOptimistic:function(e,t){var i=$e();return ge!==null?H1(i,ge,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:fp,useCacheRefresh:ty,useEffectEvent:$1};function gd(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:ve({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var of={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=fi(),r=vr(s);r.payload=t,i!=null&&(r.callback=i),t=yr(e,r,s),t!==null&&(Qt(t,e,s),_a(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=fi(),r=vr(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=yr(e,r,s),t!==null&&(Qt(t,e,s),_a(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=fi(),s=vr(i);s.tag=2,t!=null&&(s.callback=t),t=yr(e,s,i),t!==null&&(Qt(t,e,i),_a(t,e,i))}};function Lv(e,t,i,s,r,n,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,o):t.prototype&&t.prototype.isPureReactComponent?!Ma(i,s)||!Ma(r,n):!0}function Dv(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&of.enqueueReplaceState(t,t.state,null)}function pn(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=ve({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function ay(e){Hc(e)}function ly(e){console.error(e)}function cy(e){Hc(e)}function Gc(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Nv(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function af(e,t,i){return i=vr(i),i.tag=3,i.payload={element:null},i.callback=function(){Gc(e,t)},i}function hy(e){return e=vr(e),e.tag=3,e}function uy(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var n=s.value;e.payload=function(){return r(n)},e.callback=function(){Nv(t,i,s)}}var o=i.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Nv(t,i,s),typeof r!="function"&&(Sr===null?Sr=new Set([this]):Sr.add(this));var a=s.stack;this.componentDidCatch(s.value,{componentStack:a!==null?a:""})})}function IC(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&cn(t,i,r,!0),i=Et.current,i!==null){switch(i.tag){case 31:case 13:case 19:return Nt===null?ih():i.alternate===null&&He===0&&(He=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===Fc?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Sd(e,s,r)),!1;case 22:return i.flags|=65536,s===Fc?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Sd(e,s,r)),!1}throw Error(R(435,i.tag))}return Sd(e,s,r),ih(),!1}if(Q)return t=Et.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Gd&&(e=Error(R(422),{cause:s}),La(Ai(e,i)))):(s!==Gd&&(t=Error(R(423),{cause:s}),La(Ai(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Ai(s,i),r=af(e.stateNode,s,r),fd(e,r),He!==4&&(He=2)),!1;var n=Error(R(520),{cause:s});if(n=Ai(n,i),xa===null?xa=[n]:xa.push(n),He!==4&&(He=2),t===null)return!0;s=Ai(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=af(i.stateNode,s,e),fd(i,e),!1;case 1:if(t=i.type,n=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(Sr===null||!Sr.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=hy(r),uy(r,e,i,s),fd(i,r),!1;break;case 22:if(i.memoizedState!==null)return i.flags|=65536,!1}i=i.return}while(i!==null);return!1}var bp=Error(R(461)),Ge=!1;function Qe(e,t,i,s){t.child=e===null?C1(t,null,i,s):dn(t,e.child,i,s)}function Bv(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var o={};for(var a in s)a!=="ref"&&(o[a]=s[a])}else o=s;return hn(t),s=cp(e,t,i,o,n,r),a=hp(),e!==null&&!Ge?(up(e,t,r),Ds(e,t,r)):(Q&&a&&ph(t),t.flags|=1,Qe(e,t,s,r),t.child)}function Ov(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!ep(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,dy(e,t,n,s,r)):(e=_c(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Sp(e,r)){var o=n.memoizedProps;if(i=i.compare,i=i!==null?i:Ma,i(o,s)&&e.ref===t.ref)return Ds(e,t,r)}return t.flags|=1,e=Es(n,s),e.ref=t.ref,e.return=t,t.child=e}function dy(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(Ma(n,s)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=s=n,Sp(e,r))(e.flags&131072)!==0&&(Ge=!0);else return t.lanes=e.lanes,Ds(e,t,r)}return lf(e,t,i,s,r)}function fy(e,t,i,s){var r=s.children,n=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(n=n!==null?n.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~n}else s=0,t.child=null;return zv(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yc(t,n!==null?n.cachePool:null),n!==null?xv(t,n):ef(),A1(t);else return s=t.lanes=536870912,zv(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(yc(t,n.cachePool),xv(t,n),wr(),t.memoizedState=null):(e!==null&&yc(t,null),ef(),wr());return Qe(e,t,r,i),t.child}function wa(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function zv(e,t,i,s,r){var n=sp();return n=n===null?null:{parent:je._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&yc(t,null),ef(),A1(t),e!==null&&cn(e,t,s,!0),t.childLanes=r,null}function Sc(e,t){return t=bh({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hv(e,t,i){return dn(t,e.child,null,i),e=Sc(t,t.pendingProps),e.flags|=2,ai(t),t.memoizedState=null,e}function FC(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Q){if(s.mode==="hidden")return e=Sc(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},wa(null,e);if(tf(t),(e=we)?(e=fb(e,Mi),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Er!==null?{id:rs,overflow:ns}:null,retryLane:536870912,hydrationErrors:null},i=v1(e),i.return=t,t.child=i,lt=t,we=null)):e=null,e===null)throw Tr(t);return t.lanes=536870912,null}return Sc(t,s)}var n=e.memoizedState;if(n!==null){var o=n.dehydrated;if(tf(t),r)if(t.flags&256)t.flags&=-257,t=Hv(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(R(558));else if(Ge||cn(e,t,i,!1),r=(i&e.childLanes)!==0,Ge||r){if(Ar.current===null){if(s=_e,s!==null&&(o=$0(s,i),o!==0&&o!==n.retryLane))throw n.retryLane=o,yn(e,o),Qt(s,e,o),bp;ih()}t=Hv(e,t,i)}else e=n.treeContext,we=Ri(o.nextSibling),lt=t,Q=!0,_r=null,Mi=!1,e!==null&&b1(t,e),t=Sc(t,s),t.flags|=134221824;return t}return e=Es(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function In(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(R(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function lf(e,t,i,s,r){return hn(t),i=cp(e,t,i,s,void 0,r),s=hp(),e!==null&&!Ge?(up(e,t,r),Ds(e,t,r)):(Q&&s&&ph(t),t.flags|=1,Qe(e,t,i,r),t.child)}function Uv(e,t,i,s,r,n){return hn(t),t.updateQueue=null,i=R1(t,s,i,r),M1(e),s=hp(),e!==null&&!Ge?(up(e,t,n),Ds(e,t,n)):(Q&&s&&ph(t),t.flags|=1,Qe(e,t,i,n),t.child)}function Pv(e,t,i,s,r){if(hn(t),t.stateNode===null){var n=Qn,o=i.contextType;typeof o=="object"&&o!==null&&(n=St(o)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=of,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},np(t),o=i.contextType,n.context=typeof o=="object"&&o!==null?St(o):Qn,n.state=t.memoizedState,o=i.getDerivedStateFromProps,typeof o=="function"&&(gd(t,i,o,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(o=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),o!==n.state&&of.enqueueReplaceState(n,n.state,null),ya(t,s,n,r),va(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var a=t.memoizedProps,l=pn(i,a);n.props=l;var c=n.context,h=i.contextType;o=Qn,typeof h=="object"&&h!==null&&(o=St(h));var u=i.getDerivedStateFromProps;h=typeof u=="function"||typeof n.getSnapshotBeforeUpdate=="function",a=t.pendingProps!==a,h||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(a||c!==o)&&Dv(t,n,s,o),lr=!1;var d=t.memoizedState;n.state=d,ya(t,s,n,r),va(),c=t.memoizedState,a||d!==c||lr?(typeof u=="function"&&(gd(t,i,u,s),c=t.memoizedState),(l=lr||Lv(t,i,l,s,d,c,o))?(h||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount()),typeof n.componentDidMount=="function"&&(t.flags|=4194308)):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=c),n.props=s,n.state=c,n.context=o,s=l):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,Qd(e,t),o=t.memoizedProps,h=pn(i,o),n.props=h,u=t.pendingProps,d=n.context,c=i.contextType,l=Qn,typeof c=="object"&&c!==null&&(l=St(c)),a=i.getDerivedStateFromProps,(c=typeof a=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(o!==u||d!==l)&&Dv(t,n,s,l),lr=!1,d=t.memoizedState,n.state=d,ya(t,s,n,r),va();var f=t.memoizedState;o!==u||d!==f||lr||e!==null&&e.dependencies!==null&&Ic(e.dependencies)?(typeof a=="function"&&(gd(t,i,a,s),f=t.memoizedState),(h=lr||Lv(t,i,h,s,d,f,l)||e!==null&&e.dependencies!==null&&Ic(e.dependencies))?(c||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,f,l),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,f,l)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=f),n.props=s,n.state=f,n.context=l,s=h):(typeof n.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,In(e,t),s=(t.flags&128)!==0,n||s?(n=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:n.render(),t.flags|=1,e!==null&&s?(t.child=dn(t,e.child,null,r),t.child=dn(t,null,i,r)):Qe(e,t,i,r),t.memoizedState=n.state,e=t.child):e=Ds(e,t,r),e}function qv(e,t,i,s){return ln(),t.flags|=256,Qe(e,t,i,s),t.child}var cf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hf(e){return{baseLanes:e,cachePool:S1()}}function uf(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=ci),e}function py(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,o;if((o=n)||(o=e!==null&&e.memoizedState===null?!1:(xt.current&2)!==0),o&&(r=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Q){if(r?br(t):wr(),(e=we)?(e=fb(e,Mi),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Er!==null?{id:rs,overflow:ns}:null,retryLane:536870912,hydrationErrors:null},i=v1(e),i.return=t,t.child=i,lt=t,we=null)):e=null,e===null)throw Tr(t);return Bp(e)?t.lanes=32:t.lanes=536870912,null}return n=s.children,s=s.fallback,r?(wr(),r=t.mode,n=bh({mode:"hidden",children:n},r),s=rn(s,r,i,null),n.return=t,s.return=t,n.sibling=s,t.child=n,s=t.child,s.memoizedState=hf(i),s.childLanes=uf(e,o,i),t.memoizedState=cf,wa(null,s)):(br(t),wp(t,n))}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(l!==null)return $C(e,t,n,o,s,l,a,i)}return r?(wr(),r=s.fallback,n=t.mode,a=e.child,l=a.sibling,s=Es(a,{mode:"hidden",children:s.children}),s.subtreeFlags=a.subtreeFlags&1206910976,l!==null?r=Es(l,r):(r=rn(r,n,i,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,wa(null,s),s=t.child,r=e.child.memoizedState,r===null?r=hf(i):(n=r.cachePool,n!==null?(a=je._currentValue,n=n.parent!==a?{parent:a,pool:a}:n):n=S1(),r={baseLanes:r.baseLanes|i,cachePool:n}),s.memoizedState=r,s.childLanes=uf(e,o,i),t.memoizedState=cf,wa(e.child,s)):(br(t),i=e.child,e=i.sibling,i=Es(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=i,t.memoizedState=null,i)}function wp(e,t){return t=bh({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function bh(e,t){return e=Zt(22,e,null,t),e.lanes=0,e}function sc(e,t,i){return dn(t,e.child,null,i),e=wp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $C(e,t,i,s,r,n,o,a){if(i)return t.flags&256?(br(t),t.flags&=-257,sc(e,t,a)):t.memoizedState!==null?(wr(),t.child=e.child,t.flags|=128,null):(wr(),n=r.fallback,o=t.mode,r=bh({mode:"visible",children:r.children},o),n=rn(n,o,a,null),n.flags|=2,r.return=t,n.return=t,r.sibling=n,t.child=r,dn(t,e.child,null,a),r=t.child,r.memoizedState=hf(a),r.childLanes=uf(e,s,a),t.memoizedState=cf,wa(null,r));if(br(t),Bp(n)){if(s=n.nextSibling&&n.nextSibling.dataset,s)var l=s.dgst;return s=l,s!==""&&(r=Error(R(419)),r.stack="",r.digest=s,La({value:r,source:null,stack:null})),sc(e,t,a)}if(Ge||cn(e,t,a,!1),s=(a&e.childLanes)!==0,Ge||s){if(Ar.current!==null)return sc(e,t,a);if(s=_e,s!==null&&(r=$0(s,a),r!==0&&r!==o.retryLane))throw o.retryLane=r,yn(e,r),Qt(s,e,r),bp;return zf(n)||ih(),sc(e,t,a)}return zf(n)?(t.flags|=192,t.child=e.child,null):(e=o.treeContext,we=Ri(n.nextSibling),lt=t,Q=!0,_r=null,Mi=!1,e!==null&&b1(t,e),t=wp(t,r.children),t.flags|=134221824,t)}function Iv(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),vc(e.return,t,i)}function Fv(e){for(var t=null;e!==null;){var i=e.alternate;i!==null&&Kc(i)===null&&(t=e),e=e.sibling}return t}function rc(e,t,i,s,r,n){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=s,o.tail=i,o.tailMode=r,o.treeForkCount=n)}function md(e){var t=e.child;for(e.child=null;t!==null;){var i=t.sibling;t.sibling=e.child,e.child=t,t=i}}function df(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var o=xt.current;if(t.flags&128)return Na(t,o),null;var a=(o&2)!==0;if(a?(o=o&1|2,t.flags|=128):o&=1,Na(t,o),r==="backwards"&&e!==null?(md(e),Qe(e,t,s,i),md(e)):Qe(e,t,s,i),s=Q?Ra:0,!a&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Iv(e,i,t);else if(e.tag===19)Iv(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"backwards":i=Fv(t.child),i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null,md(t)),rc(t,!0,r,null,n,s);break;case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Kc(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}rc(t,!0,i,null,n,s);break;case"together":rc(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:i=Fv(t.child),i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),rc(t,!1,r,i,n,s)}return t.child}function $v(e,t,i){var s=t.pendingProps;return dr(t,t.type,s.value),Qe(e,t,s.children,i),t.child}function Ds(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Rr|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(cn(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,i=Es(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Es(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Sp(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ic(e)))}function KC(e,t,i){switch(t.tag){case 3:Nc(t,t.stateNode.containerInfo),dr(t,je,e.memoizedState.cache),ln();break;case 27:case 5:Ud(t);break;case 4:Nc(t,t.stateNode.containerInfo);break;case 10:dr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,tf(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return br(t),t.flags|=128,null;s=cn(e,t,i,!1);var r=t.child.childLanes;return s||(i&r)!==0?py(e,t,i):(br(t),e=Ds(e,t,i),e!==null?e.sibling:null)}br(t);break;case 19:if(t.flags&128)return df(e,t,i);if(r=(e.flags&128)!==0,s=(i&t.childLanes)!==0,s||(cn(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return df(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Na(t,xt.current),s)break;return null;case 22:return t.lanes=0,fy(e,t,i,t.pendingProps);case 24:dr(t,je,e.memoizedState.cache)}return Ds(e,t,i)}function gy(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ge=!0;else{if(!Sp(e,i)&&(t.flags&128)===0)return Ge=!1,KC(e,t,i);Ge=(e.flags&131072)!==0}else Ge=!1,Q&&(t.flags&1048576)!==0&&y1(t,Ra,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Qr(t.elementType),t.type=e,typeof e=="function")ep(e)?(s=pn(e,s),t.tag=1,t=Pv(null,t,e,s,i)):(t.tag=0,t=lf(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===If){t.tag=11,t=Bv(null,t,e,s,i);break e}else if(r===Ff){t.tag=14,t=Ov(null,t,e,s,i);break e}else if(r===is){t.tag=10,t.type=e,t=$v(null,t,i);break e}}throw t=zd(e)||e,Error(R(306,t,""))}}return t;case 0:return lf(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=pn(s,t.pendingProps),Pv(e,t,s,r,i);case 3:e:{if(Nc(t,t.stateNode.containerInfo),e===null)throw Error(R(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,Qd(e,t),ya(t,s,null,i);var o=t.memoizedState;if(s=o.cache,dr(t,je,s),s!==n.cache&&Xd(t,[je],i,!0),va(),s=o.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=qv(e,t,s,i);break e}else if(s!==r){r=Ai(Error(R(424)),t),La(r),t=qv(e,t,s,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,we=Ri(e.firstChild),lt=t,Q=!0,_r=null,Mi=!0,i=C1(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|134221824,i=i.sibling;else{if(ln(),s===r){t=Ds(e,t,i);break e}Qe(e,t,s,i)}t=t.child}return t;case 26:return In(e,t),e===null?(i=m0(t.type,null,t.pendingProps,null))?t.memoizedState=i:Q||(t.stateNode=rb(t.type,t.pendingProps,mr.current,t)):t.memoizedState=m0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ud(t),e===null&&Q&&(s=t.stateNode=pb(t.type,t.pendingProps,mr.current),lt=t,Mi=!0,r=we,Dr(t.type)?(Hf=r,we=Ri(s.firstChild)):we=r),Qe(e,t,t.pendingProps.children,i),In(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Q&&((r=s=we)&&(s=z3(s,t.type,t.pendingProps,Mi),s!==null?(t.stateNode=s,lt=t,we=Ri(s.firstChild),Mi=!1,r=!0):r=!1),r||Tr(t)),Ud(t),r=t.type,n=t.pendingProps,o=e!==null?e.memoizedProps:null,s=n.children,Nf(r,n)?s=null:o!==null&&Nf(r,o)&&(t.flags|=32),t.memoizedState!==null&&(r=cp(e,t,NC,null,null,i),ko._currentValue=r),In(e,t),Qe(e,t,s,i),t.child;case 6:return e===null&&Q&&((e=i=we)&&(i=H3(i,t.pendingProps,Mi),i!==null?(t.stateNode=i,lt=t,we=null,e=!0):e=!1),e||Tr(t)),null;case 13:return py(e,t,i);case 4:return Nc(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=dn(t,null,s,i):Qe(e,t,s,i),t.child;case 11:return Bv(e,t,t.type,t.pendingProps,i);case 7:return s=t.pendingProps,In(e,t),Qe(e,t,s,i),t.child;case 8:return Qe(e,t,t.pendingProps.children,i),t.child;case 12:return Qe(e,t,t.pendingProps.children,i),t.child;case 10:return $v(e,t,i);case 9:return r=t.type._context,s=t.pendingProps.children,hn(t),r=St(r),s=s(r),t.flags|=1,Qe(e,t,s,i),t.child;case 14:return Ov(e,t,t.type,t.pendingProps,i);case 15:return dy(e,t,t.type,t.pendingProps,i);case 19:return df(e,t,i);case 31:return FC(e,t,i);case 22:return fy(e,t,i,t.pendingProps);case 24:return hn(t),s=St(je),e===null?(r=sp(),r===null&&(r=_e,n=ip(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},np(t),dr(t,je,r)):((e.lanes&i)!==0&&(Qd(e,t),ya(t,null,null,i),va()),r=e.memoizedState,n=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),dr(t,je,s)):(s=n.cache,dr(t,je,s),s!==r.cache&&Xd(t,[je],i,!0))),Qe(e,t,t.pendingProps.children,i),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=t.pendingProps,s.name!=null&&s.name!=="auto"?t.flags|=e===null?18882560:18874368:Q&&ph(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:In(e,t),Qe(e,t,s.children,i),t.child;case 29:throw t.pendingProps}throw Error(R(156,t.tag))}function ks(e){e.flags|=4}function _d(e,t,i,s,r){var n;if((n=(e.mode&32)!==0)&&(n=i===null?y0(t,s):y0(t,s)&&(s.src!==i.src||s.srcSet!==i.srcSet)),n){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Ky())e.flags|=8192;else throw on=Fc,rp}else e.flags&=-16777217}function Kv(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!vb(t))if(Ky())e.flags|=8192;else throw on=Fc,rp}function nc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?q0():536870912,e.lanes|=t,_o|=t)}function ra(e,t){if(!Q)switch(e.tailMode){case"visible":break;case"collapsed":for(var i=e.tail,s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null;break;default:for(t=e.tail,i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null}}function be(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&1206910976,s|=r.flags&1206910976,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function WC(e,t,i){var s=t.pendingProps;switch(tp(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return be(t),null;case 1:return be(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ts(je),fo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Pn(t)?ks(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,dd())),be(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(ks(t),n!==null?(be(t),Kv(t,n)):(be(t),_d(t,r,null,s,i))):n?n!==e.memoizedState?(ks(t),be(t),Kv(t,n)):(be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ks(t),be(t),_d(t,r,e,s,i)),null;case 27:if(Bc(t),i=mr.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ks(t);else{if(!s){if(t.stateNode===null)throw Error(R(166));return be(t),t.subtreeFlags&=-33554433,null}e=os.current,Pn(t)?_v(t,e):(e=pb(r,s,i),t.stateNode=e,ks(t))}return be(t),t.subtreeFlags&=-33554433,null;case 5:if(Bc(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ks(t);else{if(!s){if(t.stateNode===null)throw Error(R(166));return be(t),t.subtreeFlags&=-33554433,null}if(n=os.current,Pn(t))_v(t,n);else{var o=Ha(mr.current);switch(n){case 1:n=o.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=o.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=o.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=o.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=o.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?o.createElement("select",{is:s.is}):o.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?o.createElement(r,{is:s.is}):o.createElement(r)}}n[wt]=t,n[ei]=s;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)n.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=n;e:switch(Ct(n,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&ks(t)}}return be(t),t.subtreeFlags&=-33554433,_d(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&ks(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(R(166));if(e=mr.current,Pn(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=lt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[wt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||ib(e.nodeValue,i)),e||Tr(t,!0)}else e=Ha(e).createTextNode(s),e[wt]=t,t.stateNode=e}return be(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Pn(t),i!==null){if(e===null){if(!s)throw Error(R(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(557));e[wt]=t}else ln(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;be(t),e=!1}else i=dd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(ai(t),t):(ai(t),null);if((t.flags&128)!==0)throw Error(R(558))}return be(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Pn(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(R(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(R(317));r[wt]=t}else ln(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;be(t),r=!1}else r=dd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ai(t),t):(ai(t),null)}return ai(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),nc(t,t.updateQueue),be(t),null);case 4:return fo(),e===null&&Lp(t.stateNode.containerInfo),t.flags|=67108864,be(t),null;case 10:return Ts(t.type),be(t),null;case 19:if(ap(t),s=t.memoizedState,s===null)return be(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)ra(s,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=Kc(e),n!==null){for(t.flags|=128,ra(s,!1),e=n.updateQueue,t.updateQueue=e,nc(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)_1(i,e),i=i.sibling;return Na(t,xt.current&1|2),Q&&xs(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&hi()>eh&&(t.flags|=128,r=!0,ra(s,!1),t.lanes=4194304)}else{if(!r)if(e=Kc(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,nc(t,e),ra(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!n.alternate&&!Q)return be(t),null}else 2*hi()-s.renderingStartTime>eh&&i!==536870912&&(t.flags|=128,r=!0,ra(s,!1),t.lanes=4194304);s.isBackwards?(n.sibling=t.child,t.child=n):(e=s.last,e!==null?e.sibling=n:t.child=n,s.last=n)}if(s.tail!==null){e=s.tail;e:{for(i=e;i!==null;){if(i.alternate!==null){i=!1;break e}i=i.sibling}i=!0}return s.rendering=e,s.tail=e.sibling,s.renderingStartTime=hi(),e.sibling=null,n=xt.current,n=r?n&1|2:n&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!i||Q?Na(t,n):(i=n,Se(Et,t),Se(xt,i),Nt===null&&(Nt=t)),Q&&xs(t,s.treeForkCount),e}return be(t),null;case 22:case 23:return ai(t),op(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(be(t),t.subtreeFlags&6&&(t.flags|=8192)):be(t),i=t.updateQueue,i!==null&&nc(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&kt(nn),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ts(je),be(t),null;case 25:return null;case 30:return t.flags|=33554432,be(t),null}throw Error(R(156,t.tag))}function VC(e,t){switch(tp(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ts(je),fo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Bc(t),null;case 31:if(t.memoizedState!==null){if(ai(t),t.alternate===null)throw Error(R(340));ln()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ai(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ln()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ap(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return fo(),null;case 10:return Ts(t.type),null;case 22:case 23:return ai(t),op(),e!==null&&kt(nn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ts(je),null;case 25:return null;default:return null}}function my(e,t){switch(tp(t),t.tag){case 3:Ts(je),fo();break;case 26:case 27:case 5:Bc(t);break;case 4:fo();break;case 31:t.memoizedState!==null&&ai(t);break;case 13:ai(t);break;case 19:ap(t);break;case 10:Ts(t.type);break;case 22:case 23:ai(t),op(),e!==null&&kt(nn);break;case 24:Ts(je)}}function Xa(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var n=i.create,o=i.inst;s=n(),o.destroy=s}i=i.next}while(i!==r)}}catch(a){pe(t,t.return,a)}}function Mr(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var n=r.next;s=n;do{if((s.tag&e)===e){var o=s.inst,a=o.destroy;if(a!==void 0){o.destroy=void 0,r=t;var l=i,c=a;try{c()}catch(h){pe(r,l,h)}}}s=s.next}while(s!==n)}}catch(h){pe(t,t.return,h)}}function _y(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{T1(t,i)}catch(s){pe(e,e.return,s)}}}function vy(e,t,i){i.props=pn(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){pe(e,t,s)}}function es(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:var r=e.stateNode,n=Ms(e.memoizedProps,r);(r.ref===null||r.ref.name!==n)&&(r.ref=lb(n)),s=r.ref;break;case 7:if(e.stateNode===null){var o=new gi(e);Jt(e.child,!1,B3,o,void 0,void 0),e.stateNode=o}s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(a){pe(e,t,a)}}function bt(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){pe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){pe(e,t,r)}else i.current=null}function Yc(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var i=0;i<t.length;i++)db(e.stateNode,t[i])}function Wv(e){for(var t=e.return;t!==null&&(xp(t)&&db(e.stateNode,t.stateNode),!kp(t));)t=t.return}function Sa(e){for(var t=e.return;t!==null&&(xp(t)&&O3(e.stateNode,t.stateNode),!kp(t));)t=t.return}function kp(e){return e.tag===5||e.tag===3||e.tag===27}function xp(e){return e&&e.tag===7&&e.stateNode!==null}function ff(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){pe(e,e.return,r)}}function vd(e,t,i){try{var s=e.stateNode;m3(s,e.type,i,t),s[ei]=t}catch(r){pe(e,e.return,r)}}function yy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dr(e.type)||e.tag===4}function yd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Dr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pf(e,t,i,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(r,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(r),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=ss)),Yc(e,s),ae=!0;else if(r!==4&&(r===27&&(Yc(e,s),s=null,Dr(e.type)&&(i=e.stateNode,t=null)),e=e.child,e!==null))for(pf(e,t,i,s),e=e.sibling;e!==null;)pf(e,t,i,s),e=e.sibling}function Xc(e,t,i,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?i.insertBefore(r,t):i.appendChild(r),Yc(e,s),ae=!0;else if(r!==4&&(r===27&&(Yc(e,s),s=null,Dr(e.type)&&(i=e.stateNode)),e=e.child,e!==null))for(Xc(e,t,i,s),e=e.sibling;e!==null;)Xc(e,t,i,s),e=e.sibling}function by(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Ct(t,s,i),t[wt]=e,t[ei]=i}catch(n){pe(e,e.return,n)}}var Zc=!1,li=null;function Vv(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Zc=!0)}var ts=null;function jv(){var e=ts;return ts=null,e}var Xt=0;function Mo(e,t,i,s,r){return Xt=0,wy(e.child,t,i,s,r)}function wy(e,t,i,s,r){for(var n=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(s!==null){var a=Bf(o);s.push(a),a.view&&(n=!0)}else n||Bf(o).view&&(n=!0);Zc=!0,nb(o,Xt===0?t:t+"_"+Xt,i),Xt++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&r||wy(e.child,t,i,s,r)&&(n=!0));e=e.sibling}return n}function ls(e,t){for(;e!==null;)e.tag===5?ob(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||ls(e.child,t)),e=e.sibling}function kc(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(kc(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(R(544));var i=t.name;t=Os(t.default,t.share),t!=="none"&&(Mo(e,i,t,null,!1)||ls(e.child,!1))}e=e.sibling}}function gf(e,t){if(e.tag===30){var i=e.stateNode,s=e.memoizedProps,r=Ms(s,i),n=Os(s.default,i.paired?s.share:s.enter);n!=="none"?Mo(e,r,n,null,!1)?(kc(e),i.paired||t||vo(e,s.onEnter)):ls(e.child,!1):kc(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)gf(e,t),e=e.sibling;else kc(e)}function mf(e){if(li!==null&&li.size!==0){var t=li;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var i=e.memoizedProps,s=i.name;if(s!=null&&s!=="auto"){var r=t.get(s);if(r!==void 0){var n=Os(i.default,i.share);if(n!=="none"&&(Mo(e,s,n,null,!1)?(n=e.stateNode,r.paired=n,n.paired=r,vo(e,i.onShare)):ls(e.child,!1)),t.delete(s),t.size===0)break}}}mf(e)}e=e.sibling}}}function _f(e){if(e.tag===30){var t=e.memoizedProps,i=Ms(t,e.stateNode),s=li!==null?li.get(i):void 0,r=Os(t.default,s!==void 0?t.share:t.exit);r!=="none"&&(Mo(e,i,r,null,!1)?s!==void 0?(r=e.stateNode,s.paired=r,r.paired=s,li.delete(i),vo(e,t.onShare)):vo(e,t.onExit):ls(e.child,!1)),li!==null&&mf(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)_f(e),e=e.sibling;else li!==null&&mf(e)}function Sy(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,i=Ms(t,e.stateNode);t=Os(t.default,t.update),e.flags&=-5,t!=="none"&&Mo(e,i,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Sy(e);e=e.sibling}}function vf(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,ls(e.child,!1))}vf(e)}e=e.sibling}}function xc(e){if(e.tag===30)e.stateNode.paired=null,ls(e.child,!1),vf(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)xc(e),e=e.sibling;else vf(e)}function ky(e){for(e=e.child;e!==null;)e.tag===30?ls(e.child,!1):(e.subtreeFlags&33554432)!==0&&ky(e),e=e.sibling}function Cp(e,t,i,s,r,n,o){for(var a=!1;t!==null;){if(t.tag===5){var l=t.stateNode;if(n!==null&&Xt<n.length){var c=n[Xt],h=Bf(l);(c.view||h.view)&&(a=!0);var u;if(u=(e.flags&4)===0)if(h.clip)u=!0;else{u=c.rect;var d=h.rect;u=u.y!==d.y||u.x!==d.x||u.height!==d.height||u.width!==d.width}u&&(e.flags|=4),h.abs?h=!c.abs:(c=c.rect,h=h.rect,h=c.height!==h.height||c.width!==h.width),h&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&nb(l,Xt===0?i:i+"_"+Xt,r),a&&(e.flags&4)!==0||(ts===null&&(ts=[]),ts.push(l,Xt===0?s:s+"_"+Xt,t.memoizedProps)),Xt++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Cp(e,t.child,i,s,r,n,o)&&(a=!0));t=t.sibling}return a}function xy(e,t){for(e=e.child;e!==null;){if(e.tag===30){var i=e.memoizedProps,s=e.stateNode,r=Ms(i,s),n=Os(i.default,i.update);if(t){s=s.clones;var o=s===null?null:s.map(S3)}else o=e.memoizedState,e.memoizedState=null;s=e;var a=e.child;Xt=0,r=Cp(s,a,r,r,n,o,!1),(e.flags&4)!==0&&r&&(t||vo(e,i.onUpdate))}else(e.subtreeFlags&33554432)!==0&&xy(e,t);e=e.sibling}}var nt=!1,ue=!1,Zi=!1,bd=!1,Gv=typeof WeakSet=="function"?WeakSet:Set,ot=null,Qi=!1,da=!1,Qc=!1,yf=!1;function jC(e,t,i){if(e=e.containerInfo,Lf=xo,e=c1(e),Zf(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var n=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{s.nodeType,o.nodeType}catch{s=null;break e}var a=0,l=-1,c=-1,h=0,u=0,d=e,f=null;t:for(;;){for(var g;d!==s||n!==0&&d.nodeType!==3||(l=a+n),d!==o||r!==0&&d.nodeType!==3||(c=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(g=d.firstChild)!==null;)f=d,d=g;for(;;){if(d===e)break t;if(f===s&&++h===n&&(l=a),f===o&&++u===r&&(c=a),(g=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=g}s=l===-1||c===-1?null:{start:l,end:c}}else s=null}s=s||{start:0,end:0}}else s=null;for(Df={focusedElem:e,selectionRange:s},xo=!1,i=(i&335544064)===i,ot=t,t=i?9270:1024;ot!==null;){if(e=ot,i&&(s=e.deletions,s!==null))for(n=0;n<s.length;n++)i&&_f(s[n]);if(e.alternate===null&&(e.flags&2)!==0)i&&Vv(e),oc(i);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&i&&_f(s),oc(i);continue}else if(s!==null&&s.memoizedState!==null){i&&Vv(e),oc(i);continue}}s=e.child,(e.subtreeFlags&t)!==0&&s!==null?(s.return=e,ot=s):(i&&Sy(e),oc(i))}}li=null}function oc(e){for(;ot!==null;){var t=ot,i=e,s=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((r&1024)!==0&&s!==null){i=void 0,r=s.memoizedProps,s=s.memoizedState;var n=t.stateNode;try{var o=pn(t.type,r);i=n.getSnapshotBeforeUpdate(o,s),n.__reactInternalSnapshotBeforeUpdate=i}catch(a){pe(t,t.return,a)}}break;case 3:if((r&1024)!==0){if(s=t.stateNode.containerInfo,i=s.nodeType,i===9)Of(s);else if(i===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Of(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:i&&s!==null&&(i=Ms(s.memoizedProps,s.stateNode),r=t.memoizedProps,r=Os(r.default,r.update),r!=="none"&&Mo(s,i,r,s.memoizedState=[],!0));break;default:if((r&1024)!==0)throw Error(R(163))}if(s=t.sibling,s!==null){s.return=t.return,ot=s;break}ot=t.return}}function Cy(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Ji(e,i),s&4&&Xa(5,i);break;case 1:if(Ji(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(o){pe(i,i.return,o)}else{var r=pn(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){pe(i,i.return,o)}}s&64&&_y(i),s&512&&es(i,i.return);break;case 3:if(Ji(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{T1(e,t)}catch(o){pe(i,i.return,o)}}break;case 27:t===null&&s&4&&by(i);case 26:case 5:Ji(e,i),t===null&&s&4&&ff(i),s&512&&es(i,i.return);break;case 12:Ji(e,i);break;case 31:Ji(e,i),s&4&&My(e,i);break;case 13:Ji(e,i),s&4&&Ry(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=n3.bind(null,i),U3(e,i))));break;case 22:if(s=i.memoizedState!==null||nt,!s){var n=t!==null&&t.memoizedState!==null||ue;t=nt,r=ue,nt=s,(ue=n)&&!r?(s=2,(i.subtreeFlags&8772)!==0&&(s|=1),qi(e,i,s)):Ji(e,i),nt=t,ue=r}break;case 30:Ji(e,i),s&512&&es(i,i.return);break;case 7:s&512&&es(i,i.return);default:Ji(e,i)}}function bf(e,t){for(e=e.child;e!==null;)Ey(e,t),e=e.sibling}function Ey(e,t){switch(e.tag){case 5:case 26:try{var i=e.stateNode;if(t){var s=i.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var r=e.stateNode,n=e.memoizedProps.style,o=n!=null&&n.hasOwnProperty("display")?n.display:null;r.style.display=o==null||typeof o=="boolean"?"":(""+o).trim()}}catch(l){pe(e,e.return,l)}wf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,ae=!0}catch(l){pe(e,e.return,l)}break;case 18:try{var a=e.stateNode;t?h0(a,!0):h0(e.stateNode,!1)}catch(l){pe(e,e.return,l)}break;case 22:case 23:e.memoizedState===null&&bf(e,t);break;default:bf(e,t)}}function wf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var i=e,s=t;switch(i.tag){case 4:Ey(i,s);break e;case 22:i.memoizedState===null&&wf(i,s);break e;default:wf(i,s)}}e=e.sibling}}function Ty(e){var t=e.alternate;t!==null&&(e.alternate=null,Ty(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&lh(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Me=null,Gt=!1;function Pi(e,t,i){for(i=i.child;i!==null;)Ay(e,t,i),i=i.sibling}function Ay(e,t,i){if(ui&&typeof ui.onCommitFiberUnmount=="function")try{ui.onCommitFiberUnmount($a,i)}catch{}switch(i.tag){case 26:ue||bt(i,t),Pi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&!ue&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ue||bt(i,t),Sa(i);var s=Me,r=Gt;Dr(i.type)&&(Me=i.stateNode,Gt=!1),Pi(e,t,i),gb(i.stateNode,i.type,i.memoizedProps),Me=s,Gt=r;break;case 5:ue||bt(i,t),Sa(i);case 6:if(i.tag===6&&Sa(i),s=Me,r=Gt,Me=null,Pi(e,t,i),Me=s,Gt=r,Me!==null)if(Gt)try{(Me.nodeType===9?Me.body:Me.nodeName==="HTML"?Me.ownerDocument.body:Me).removeChild(i.stateNode),ae=!0}catch(n){pe(i,t,n)}else try{Me.removeChild(i.stateNode),ae=!0}catch(n){pe(i,t,n)}break;case 18:Me!==null&&(Gt?(e=Me,c0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Co(e)):c0(Me,i.stateNode));break;case 4:s=Me,r=Gt,Me=i.stateNode.containerInfo,Gt=!0,Pi(e,t,i),Me=s,Gt=r;break;case 0:case 11:case 14:case 15:Mr(2,i,t),ue||Mr(4,i,t),Pi(e,t,i);break;case 1:ue||(bt(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&vy(i,t,s)),Pi(e,t,i);break;case 21:Pi(e,t,i);break;case 22:ue=(s=ue)||i.memoizedState!==null,Pi(e,t,i),ue=s;break;case 30:bt(i,t),Pi(e,t,i);break;case 7:ue||bt(i,t),Pi(e,t,i);break;default:Pi(e,t,i)}}function My(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Co(e)}catch(i){pe(t,t.return,i)}}}function Ry(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Co(e)}catch(i){pe(t,t.return,i)}}function GC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Gv),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Gv),t;default:throw Error(R(435,e.tag))}}function ac(e,t){var i=GC(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=o3.bind(null,e,s);s.then(r,r)}})}function Ut(e,t,i){var s=t.deletions;if(s!==null)for(var r=0;r<s.length;r++){var n=s[r],o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 27:if(Dr(l.type)){Me=l.stateNode,Gt=!1;break e}break;case 5:Me=l.stateNode,Gt=!1;break e;case 3:case 4:Me=l.stateNode.containerInfo,Gt=!0;break e}l=l.return}if(Me===null)throw Error(R(160));Ay(o,a,n),Me=null,Gt=!1,o=n.alternate,o!==null&&(o.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ly(t,e,i),t=t.sibling}var Ii=null;function Ly(e,t,i){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(r&4&&(s=e.updateQueue,s=s!==null?s.events:null,s!==null))for(var n=0;n<s.length;n++){var o=s[n];o.ref.impl=o.nextImpl}Ut(t,e,i),Pt(e),r&4&&(Mr(3,e,e.return),Xa(3,e),Mr(5,e,e.return));break;case 1:Ut(t,e,i),Pt(e),r&512&&(ue||s===null||bt(s,s.return)),r&64&&nt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?t:i.concat(t))));break;case 26:if(n=Ii,Ut(t,e,i),Pt(e),r&512&&(ue||s===null||bt(s,s.return)),r&4)if(r=s!==null?s.memoizedState:null,i=e.memoizedState,s===null)if(i===null)if(e.stateNode===null)if(nt)e.stateNode=rb(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,i=e.memoizedProps,r=n.ownerDocument||n;t:switch(t){case"title":s=r.getElementsByTagName("title")[0],(!s||s[Va]||s[wt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(t),r.head.insertBefore(s,r.querySelector("head > title"))),Ct(s,t,i),s[wt]=e,at(s),t=s;break e;case"link":if(n=v0("link","href",r).get(t+(i.href||""))){for(o=0;o<n.length;o++)if(s=n[o],s.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&s.getAttribute("rel")===(i.rel==null?null:i.rel)&&s.getAttribute("title")===(i.title==null?null:i.title)&&s.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){n.splice(o,1);break t}}s=r.createElement(t),Ct(s,t,i),r.head.appendChild(s);break;case"meta":if(n=v0("meta","content",r).get(t+(i.content||""))){for(o=0;o<n.length;o++)if(s=n[o],s.getAttribute("content")===(i.content==null?null:""+i.content)&&s.getAttribute("name")===(i.name==null?null:i.name)&&s.getAttribute("property")===(i.property==null?null:i.property)&&s.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&s.getAttribute("charset")===(i.charSet==null?null:i.charSet)){n.splice(o,1);break t}}s=r.createElement(t),Ct(s,t,i),r.head.appendChild(s);break;default:throw Error(R(468,t))}s[wt]=e,at(s),t=s}e.stateNode=t}else nt||Uf(n,e.type,e.stateNode);else e.stateNode=_0(n,i,e.memoizedProps);else r!==i?(r===null?(t=s.stateNode,t===null||ue||t.parentNode.removeChild(t)):r.count--,i===null?nt||Uf(n,e.type,e.stateNode):_0(n,i,e.memoizedProps)):i===null&&e.stateNode!==null&&vd(e,e.memoizedProps,s.memoizedProps);break;case 27:Ut(t,e,i),Pt(e),r&512&&(ue||s===null||bt(s,s.return)),s!==null&&r&4&&vd(e,e.memoizedProps,s.memoizedProps);break;case 5:if(n=Zi,Zi=!1,Ut(t,e,i),Zi=n,Pt(e),r&512&&(ue||s===null||bt(s,s.return)),e.flags&32){t=e.stateNode;try{go(t,""),ae=!0}catch(h){pe(e,e.return,h)}}r&4&&e.stateNode!=null&&(t=e.memoizedProps,vd(e,t,s!==null?s.memoizedProps:t)),r&1024&&(bd=!0);break;case 6:if(Ut(t,e,i),Pt(e),r&4){if(e.stateNode===null)throw Error(R(162));t=e.memoizedProps,i=e.stateNode;try{i.nodeValue=t,ae=!0}catch(h){pe(e,e.return,h)}}break;case 3:if(ae=!1,Ac=null,n=Ii,Ii=Ua(t.containerInfo),Ut(t,e,i),Ii=n,Pt(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{Co(t.containerInfo)}catch(h){pe(e,e.return,h)}bd&&(bd=!1,Dy(e)),ae=!1;break;case 4:r=Zi,Zi=nt,s=ev(),n=Ii,Ii=Ua(e.stateNode.containerInfo),Ut(t,e,i),Pt(e),Ii=n,ae&&da&&(Qc=!0),ae=s,Zi=r;break;case 12:Ut(t,e,i),Pt(e);break;case 31:Ut(t,e,i),Pt(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ac(e,t)));break;case 13:Ut(t,e,i),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(wh=hi()),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ac(e,t)));break;case 22:n=e.memoizedState!==null,o=s!==null&&s.memoizedState!==null;var a=nt,l=ue,c=Zi;nt=a||n,Zi=c||n,ue=l||o,Ut(t,e,i),ue=l,Zi=c,nt=a,Pt(e),r&8192&&(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,!n||s===null||o||nt||ue||(t=o||ue,i=nt,s=ue,nt=n||nt,ue=t,or(e,2),nt=i,ue=s),!n&&Zi||bf(e,n)),r&4&&(t=e.updateQueue,t!==null&&(i=t.retryQueue,i!==null&&(t.retryQueue=null,ac(e,i))));break;case 19:Ut(t,e,i),Pt(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ac(e,t)));break;case 30:r&512&&(ue||s===null||bt(s,s.return)),r=ev(),n=da,o=(i&335544064)===i,a=e.memoizedProps,da=o&&Os(a.default,a.update)!=="none",Ut(t,e,i),Pt(e),o&&s!==null&&ae&&(e.flags|=4),da=n,ae=r;break;case 21:break;case 7:r&512&&(ue||s===null||bt(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=e);default:Ut(t,e,i),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(yy(s)){i=s;break}s=s.return}s=null;for(var r=e.return;r!==null;){if(xp(r)){var n=r.stateNode;s===null?s=[n]:s.push(n)}if(kp(r))break;r=r.return}var o=s;if(i==null)throw Error(R(160));switch(i.tag){case 27:var a=i.stateNode,l=yd(e);Xc(e,l,a,o);break;case 5:var c=i.stateNode;i.flags&32&&(go(c,""),i.flags&=-33);var h=yd(e);Xc(e,h,c,o);break;case 3:case 4:var u=i.stateNode.containerInfo,d=yd(e);pf(e,d,u,o);break;default:throw Error(R(161))}}catch(f){pe(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Dy(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,xo=!0,t.reset(),xo=!1),e=e.sibling}}function qn(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ny(t,e),t=t.sibling;else xy(t,!1)}function Ny(e,t){var i=e.alternate;if(i===null)gf(e,!1);else switch(e.tag){case 3:if(yf=Qi=!1,jv(),qn(t,e),!Qi&&!Qc){if(e=ts,e!==null)for(var s=0;s<e.length;s+=3){i=e[s];var r=e[s+1];ob(i,e[s+2]),i=i.ownerDocument.documentElement,i!==null&&i.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+r+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),yf=!0}ts=null;break;case 5:qn(t,e);break;case 4:s=Qi,Qi=!1,qn(t,e),Qi&&(Qc=!0),Qi=s;break;case 22:e.memoizedState===null&&(i.memoizedState!==null?gf(e,!1):qn(t,e));break;case 30:s=Qi,r=jv(),Qi=!1,qn(t,e),Qi&&(e.flags|=4);var n=e.memoizedProps,o=e.stateNode;t=Ms(n,o),o=Ms(i.memoizedProps,o);var a=Os(n.default,n.update);a==="none"?t=!1:(n=i.memoizedState,i.memoizedState=null,i=e.child,Xt=0,t=Cp(e,i,t,o,a,n,!0),Xt!==(n===null?0:n.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(vo(e,e.memoizedProps.onUpdate),ts=r):r!==null&&(r.push.apply(r,ts),ts=r),Qi=(e.flags&32)!==0?!0:s;break;default:qn(t,e)}}function Ji(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Cy(e,t.alternate,t),t=t.sibling}function or(e,t){for(e=e.child;e!==null;){var i=e,s=t;switch(i.tag){case 0:case 11:case 14:case 15:Mr(4,i,i.return),or(i,s);break;case 1:bt(i,i.return);var r=i.stateNode;typeof r.componentWillUnmount=="function"&&vy(i,i.return,r),or(i,s);break;case 27:(s&2)!==0&&gb(i.stateNode,i.type,i.memoizedProps);case 5:bt(i,i.return),i.tag!==5&&i.tag!==27||Sa(i),or(i,s);break;case 6:Sa(i);break;case 26:bt(i,i.return),r=i.stateNode,i.memoizedState!==null||r===null||ue||r.parentNode.removeChild(r),or(i,s);break;case 22:i.memoizedState===null&&or(i,s);break;case 30:bt(i,i.return),or(i,s);break;case 7:bt(i,i.return);default:or(i,s)}e=e.sibling}}function qi(e,t,i){for(i=(t.subtreeFlags&8772)!==0?i:i&-2,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,o=n.flags,a=(i&1)!==0;switch(n.tag){case 0:case 11:case 15:qi(r,n,i),Xa(4,n);break;case 1:if(qi(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(h){pe(s,s.return,h)}if(s=n,r=s.updateQueue,r!==null){var l=s.stateNode;try{var c=r.shared.hiddenCallbacks;if(c!==null)for(r.shared.hiddenCallbacks=null,r=0;r<c.length;r++)E1(c[r],l)}catch(h){pe(s,s.return,h)}}a&&o&64&&_y(n),es(n,n.return);break;case 27:(i&2)!==0&&by(n);case 5:n.tag!==5&&n.tag!==27||Wv(n),qi(r,n,i),a&&s===null&&o&4&&ff(n),es(n,n.return);break;case 6:Wv(n);break;case 26:l=n.stateNode,n.memoizedState!==null||l===null||nt||Uf(Ua(l.ownerDocument),n.type,l),qi(r,n,i),a&&s===null&&o&4&&ff(n),es(n,n.return);break;case 12:qi(r,n,i);break;case 31:qi(r,n,i),a&&o&4&&My(r,n);break;case 13:qi(r,n,i),a&&o&4&&Ry(r,n);break;case 22:n.memoizedState===null&&qi(r,n,i),es(n,n.return);break;case 30:qi(r,n,i),es(n,n.return);break;case 7:es(n,n.return);default:qi(r,n,i)}t=t.sibling}}function Ep(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Ga(i))}function Tp(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ga(e))}function ki(e,t,i,s){var r=(i&335544064)===i;if(t.subtreeFlags&(r?10262:10256))for(t=t.child;t!==null;)By(e,t,i,s),t=t.sibling;else r&&ky(t)}function By(e,t,i,s){var r=(i&335544064)===i;r&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&xc(t);var n=t.flags;switch(t.tag){case 0:case 11:case 15:ki(e,t,i,s),n&2048&&Xa(9,t);break;case 1:ki(e,t,i,s);break;case 3:ki(e,t,i,s),r&&yf&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),n&2048&&(n=null,t.alternate!==null&&(n=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==n&&(t.refCount++,n!=null&&Ga(n)));break;case 12:if(n&2048){ki(e,t,i,s),n=t.stateNode;try{var o=t.memoizedProps,a=o.id,l=o.onPostCommit;typeof l=="function"&&l(a,t.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(c){pe(t,t.return,c)}}else ki(e,t,i,s);break;case 31:ki(e,t,i,s);break;case 13:ki(e,t,i,s);break;case 23:break;case 22:o=t.stateNode,a=t.alternate,t.memoizedState!==null?(r&&a!==null&&a.memoizedState===null&&xc(a),o._visibility&2?ki(e,t,i,s):ka(e,t)):(r&&a!==null&&a.memoizedState!==null&&xc(t),o._visibility&2?ki(e,t,i,s):(o._visibility|=2,Fn(e,t,i,s,(t.subtreeFlags&10256)!==0||!1))),n&2048&&Ep(a,t);break;case 24:ki(e,t,i,s),n&2048&&Tp(t.alternate,t);break;case 30:r&&(n=t.alternate,n!==null&&(ls(n.child,!0),ls(t.child,!0))),ki(e,t,i,s);break;default:ki(e,t,i,s)}}function Fn(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,o=t,a=i,l=s,c=o.flags;switch(o.tag){case 0:case 11:case 15:Fn(n,o,a,l,r),Xa(8,o);break;case 23:break;case 22:var h=o.stateNode;o.memoizedState!==null?h._visibility&2?Fn(n,o,a,l,r):ka(n,o):(h._visibility|=2,Fn(n,o,a,l,r)),r&&c&2048&&Ep(o.alternate,o);break;case 24:Fn(n,o,a,l,r),r&&c&2048&&Tp(o.alternate,o);break;default:Fn(n,o,a,l,r)}t=t.sibling}}function ka(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:ka(i,s),r&2048&&Ep(s.alternate,s);break;case 24:ka(i,s),r&2048&&Tp(s.alternate,s);break;default:ka(i,s)}t=t.sibling}}var Jr=8192;function Xr(e,t,i){if(e.subtreeFlags&Jr)for(e=e.child;e!==null;)Oy(e,t,i),e=e.sibling}function Oy(e,t,i){switch(e.tag){case 26:Xr(e,t,i),e.flags&Jr&&(e.memoizedState!==null?Q3(i,Ii,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&b0(i,e)));break;case 5:Xr(e,t,i),e.flags&Jr&&(e=e.stateNode,(t&335544128)===t&&b0(i,e));break;case 3:case 4:var s=Ii;Ii=Ua(e.stateNode.containerInfo),Xr(e,t,i),Ii=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Jr,Jr=16777216,Xr(e,t,i),Jr=s):Xr(e,t,i));break;case 30:if((e.flags&Jr)!==0&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var r=e.stateNode;r.paired=null,li===null&&(li=new Map),li.set(s,r)}Xr(e,t,i);break;default:Xr(e,t,i)}}function zy(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function na(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ot=s,Uy(s,e)}zy(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hy(e),e=e.sibling}function Hy(e){switch(e.tag){case 0:case 11:case 15:na(e),e.flags&2048&&Mr(9,e,e.return);break;case 3:na(e);break;case 12:na(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Cc(e)):na(e);break;default:na(e)}}function Cc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ot=s,Uy(s,e)}zy(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Mr(8,t,t.return),Cc(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Cc(t));break;default:Cc(t)}e=e.sibling}}function Uy(e,t){for(;ot!==null;){var i=ot;switch(i.tag){case 0:case 11:case 15:Mr(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ga(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,ot=s;else e:for(i=e;ot!==null;){s=ot;var r=s.sibling,n=s.return;if(Ty(s),s===i){ot=null;break e}if(r!==null){r.return=n,ot=r;break e}ot=n}}}var YC={getCacheForType:function(e){var t=St(je),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return St(je).controller.signal}},XC=typeof WeakMap=="function"?WeakMap:Map,le=0,_e=null,te=null,re=0,de=0,ni=null,fr=!1,Ro=!1,Ap=!1,Ns=0,He=0,Rr=0,an=0,Jc=0,ci=0,_o=0,xa=null,Yt=null,Sf=!1,wh=0,Py=0,eh=1/0,th=null,Sr=null,Le=0,$i=null,gn=null,as=0,kf=0,xf=null,qy=null,co=null,ho=null,uo=null,Ca=0,Ec=null;function fi(){return(le&2)!==0&&re!==0?re&-re:V.T!==null?Rp():K0()}function Iy(){if(ci===0)if((re&536870912)===0||Q){var e=Gl;Gl<<=1,(Gl&3932160)===0&&(Gl=262144),ci=e}else ci=536870912;return e=Et.current,e!==null&&(e.flags|=32),ci}function vo(e,t){if(t!=null){var i=e.stateNode,s=i.ref;s===null&&(s=i.ref=lb(Ms(e.memoizedProps,i))),ho===null&&(ho=[]),ho.push(t.bind(null,s))}}function Qt(e,t,i){(e===_e&&(de===2||de===9)||e.cancelPendingCommit!==null)&&(yo(e,0),pr(e,re,ci,!1)),Wa(e,i),((le&2)===0||e!==_e)&&(e===_e&&((le&2)===0&&(an|=i),He===4&&pr(e,re,ci,!1)),hs(e))}function Fy(e,t,i){if((le&6)!==0)throw Error(R(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ka(e,t),r=s?JC(e,t):wd(e,t,!0),n=s;do{if(r===0){Ro&&!s&&pr(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!ZC(i)){r=wd(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var a=e;r=xa;var l=a.current.memoizedState.isDehydrated;if(l&&(yo(a,o).flags|=256),o=wd(a,o,!1),o!==2&&o!==6){if(Ap&&!l){a.errorRecoveryDisabledLanes|=n,an|=n,r=4;break e}n=Yt,Yt=r,n!==null&&(Yt===null?Yt=n:Yt.push.apply(Yt,n))}r=o}if(n=!1,r!==2)continue}}if(r===1){yo(e,0),pr(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(R(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:pr(s,t,ci,!fr);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(R(329))}if((t&62914560)===t&&(r=wh+300-hi(),10<r)){if(pr(s,t,ci,!fr),ah(s,0,!0)!==0)break e;as=t,s.timeoutHandle=Dp(Yv.bind(null,s,i,Yt,th,Sf,t,ci,an,_o,fr,n,"Throttled",-0,0),r);break e}Yv(s,i,Yt,th,Sf,t,ci,an,_o,fr,n,null,-0,0)}}break}while(!0);hs(e)}function Yv(e,t,i,s,r,n,o,a,l,c,h,u,d,f){e.timeoutHandle=-1;var g=t.subtreeFlags,b=(n&335544064)===n;if(u=null,(b||g&8192||(g&16785408)===16785408)&&(u={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ss},li=null,Oy(t,n,u),b&&(g=u,b=e.containerInfo,b=(b.nodeType===9?b:b.ownerDocument).__reactViewTransition,b!=null&&(g.count++,g.waitingForViewTransition=!0,g=Pa.bind(g),b.finished.then(g,g))),g=(n&62914560)===n?wh-hi():(n&4194048)===n?Py-hi():0,g=J3(u,g),g!==null)){as=n,e.cancelPendingCommit=g(Zv.bind(null,e,t,n,i,s,r,o,a,l,c,h,u,null,d,f)),pr(e,n,o,!c);return}Zv(e,t,n,i,s,r,o,a,l,c,h,u)}function ZC(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var r=i[s],n=r.getSnapshot;r=r.value;try{if(!pi(n(),r))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function pr(e,t,i,s){t=P0(e,t),t&=~Jc,t&=~an,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-di(r),o=1<<n;s[n]=-1,r&=~o}i!==0&&I0(e,i,t)}function Sh(){return(le&6)===0?(Za(0,!1),!1):!0}function Mp(){if(te!==null){if(de===0)var e=te.return;else e=te,Cs=bn=null,dp(e),oo=null,Da=0,e=te;for(;e!==null;)my(e.alternate,e),e=e.return;te=null}}function yo(e,t){var i=e.timeoutHandle;return i!==-1&&(e.timeoutHandle=-1,y3(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),as=0,Mp(),_e=e,te=i=Es(e.current,null),re=t,de=0,ni=null,fr=!1,Ro=Ka(e,t),Ap=!1,_o=ci=Jc=an=Rr=He=0,Yt=xa=null,Sf=!1,Ns=P0(e,t),dh(),i}function $y(e,t){Y=null,V.H=jc,t===Ao||t===gh?(t=Sv(),de=3):t===rp?(t=Sv(),de=4):de=t===bp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ni=t,te===null&&(He=1,Gc(e,Ai(t,e.current)))}function Ky(){var e=Et.current;return e===null?!0:(re&4194048)===re?Nt===null:(re&62914560)===re||(re&536870912)!==0?e===Nt:!1}function Wy(){var e=V.H;return V.H=jc,e===null?jc:e}function Vy(){var e=V.A;return V.A=YC,e}function ih(){He=4,fr||(re&4194048)!==re&&Et.current!==null||(Ro=!0),(Rr&134217727)===0&&(an&134217727)===0||_e===null||pr(_e,re,ci,!1)}function wd(e,t,i){var s=le;le|=2;var r=Wy(),n=Vy();(_e!==e||re!==t)&&(th=null,yo(e,t)),t=!1;var o=He;e:do try{if(de!==0&&te!==null){var a=te,l=ni;switch(de){case 8:Mp(),o=6;break e;case 3:case 2:case 9:case 6:Et.current===null&&(t=!0);var c=de;if(de=0,ni=null,to(e,a,l,c),i&&Ro){o=0;break e}break;default:c=de,de=0,ni=null,to(e,a,l,c)}}QC(),o=He;break}catch(h){$y(e,h)}while(!0);return t&&e.shellSuspendCounter++,Cs=bn=null,le=s,V.H=r,V.A=n,te===null&&(_e=null,re=0,dh()),o}function QC(){for(;te!==null;)jy(te)}function JC(e,t){var i=le;le|=2;var s=Wy(),r=Vy();_e!==e||re!==t?(th=null,eh=hi()+500,yo(e,t)):Ro=Ka(e,t);e:do try{if(de!==0&&te!==null){t=te;var n=ni;t:switch(de){case 1:de=0,ni=null,to(e,t,n,1);break;case 2:case 9:if(wv(n)){de=0,ni=null,Xv(t);break}t=function(){de!==2&&de!==9||_e!==e||(de=7),hs(e)},n.then(t,t);break e;case 3:de=7;break e;case 4:de=5;break e;case 7:wv(n)?(de=0,ni=null,Xv(t)):(de=0,ni=null,to(e,t,n,7));break;case 5:var o=null;switch(te.tag){case 26:o=te.memoizedState;case 5:case 27:var a=te;if(o?vb(o):a.stateNode.complete){de=0,ni=null;var l=a.sibling;if(l!==null)te=l;else{var c=a.return;c!==null?(te=c,kh(c)):te=null}break t}}de=0,ni=null,to(e,t,n,5);break;case 6:de=0,ni=null,to(e,t,n,6);break;case 8:Mp(),He=6;break e;default:throw Error(R(462))}}e3();break}catch(h){$y(e,h)}while(!0);return Cs=bn=null,V.H=s,V.A=r,le=i,te!==null?0:(_e=null,re=0,dh(),He)}function e3(){for(;te!==null&&!_5();)jy(te)}function jy(e){var t=gy(e.alternate,e,Ns);e.memoizedProps=e.pendingProps,t===null?kh(e):te=t}function Xv(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Uv(i,t,t.pendingProps,t.type,void 0,re);break;case 11:t=Uv(i,t,t.pendingProps,t.type.render,t.ref,re);break;case 5:dp(t);var s=t;s===lt&&(Q?(qc(s),s.tag===5&&s.stateNode!=null&&(we=s.stateNode)):(qc(s),Q=!0));default:my(i,t),t=te=_1(t,Ns),t=gy(i,t,Ns)}e.memoizedProps=e.pendingProps,t===null?kh(e):te=t}function to(e,t,i,s){Cs=bn=null,dp(t),oo=null,Da=0;var r=t.return;try{if(IC(e,r,t,i,re)){He=1,Gc(e,Ai(i,e.current)),te=null;return}}catch(n){if(r!==null)throw te=r,n;He=1,Gc(e,Ai(i,e.current)),te=null;return}t.flags&32768?(Q||s===1?e=!0:Ro||(re&536870912)!==0?e=!1:(fr=e=!0,(s===2||s===9||s===3||s===6)&&(s=Et.current,s!==null&&s.tag===13&&(s.flags|=16384))),Gy(t,e)):kh(t)}function kh(e){var t=e;do{if((t.flags&32768)!==0){Gy(t,fr);return}e=t.return;var i=WC(t.alternate,t,Ns);if(i!==null){te=i;return}if(t=t.sibling,t!==null){te=t;return}te=t=e}while(t!==null);He===0&&(He=5)}function Gy(e,t){do{var i=VC(e.alternate,e);if(i!==null){i.flags&=32767,te=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){te=e;return}te=e=i}while(e!==null);He=6,te=null}function Zv(e,t,i,s,r,n,o,a,l,c,h,u){e.cancelPendingCommit=null;do xh();while(Le!==0);if((le&6)!==0)throw Error(R(327));if(t!==null){if(t===e.current)throw Error(R(177));e===_e&&(te=_e=null,re=0),gn=t,$i=e,as=i,xf=r,qy=s,t3(e,t,i,o,a,l,u)}}function t3(e,t,i,s,r,n,o){var a=t.lanes|t.childLanes;if(kf=a,a|=Qf,T5(e,i,a,s,r,n),ho=null,(i&335544064)===i?(uo=MC(e),s=10262):(uo=null,s=10256),(t.subtreeFlags&s)!==0||(t.flags&s)!==0?(e.callbackNode=null,e.callbackPriority=0,a3(Oc,function(){return Af(),null})):(e.callbackNode=null,e.callbackPriority=0),Zc=!1,s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=V.T,V.T=null,r=ce.p,ce.p=2,n=le,le|=4;try{jC(e,t,i)}finally{le=n,ce.p=r,V.T=s}}Le=1,Zc?co=C3(o,e.containerInfo,uo,Cf,Ef,s3,Tf,Af,i3,null,null):(Cf(),Ef(),Tf())}function i3(e){if(Le!==0){var t=$i.onRecoverableError;t(e,{componentStack:null})}}function s3(){Le===3&&(Le=0,Ny(gn,$i),Le=4)}function Cf(){if(Le===1){Le=0;var e=$i,t=gn,i=as,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=V.T,V.T=null;var r=ce.p;ce.p=2;var n=le;le|=4;try{da=Qc=!1,Ly(t,e,i),i=Df;var o=c1(e.containerInfo),a=i.focusedElem,l=i.selectionRange;if(o!==a&&a&&a.ownerDocument&&l1(a.ownerDocument.documentElement,a)){if(l!==null&&Zf(a)){var c=l.start,h=l.end;if(h===void 0&&(h=c),"selectionStart"in a)a.selectionStart=c,a.selectionEnd=Math.min(h,a.value.length);else{var u=a.ownerDocument||document,d=u&&u.defaultView||window;if(d.getSelection){var f=d.getSelection(),g=a.textContent.length,b=Math.min(l.start,g),T=l.end===void 0?b:Math.min(l.end,g);!f.extend&&b>T&&(o=T,T=b,b=o);var _=fv(a,b),m=fv(a,T);if(_&&m&&(f.rangeCount!==1||f.anchorNode!==_.node||f.anchorOffset!==_.offset||f.focusNode!==m.node||f.focusOffset!==m.offset)){var v=u.createRange();v.setStart(_.node,_.offset),f.removeAllRanges(),b>T?(f.addRange(v),f.extend(m.node,m.offset)):(v.setEnd(m.node,m.offset),f.addRange(v))}}}}for(u=[],f=a;f=f.parentNode;)f.nodeType===1&&u.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<u.length;a++){var p=u[a];p.element.scrollLeft=p.left,p.element.scrollTop=p.top}}xo=!!Lf,Df=Lf=null}finally{le=n,ce.p=r,V.T=s}}e.current=t,Le=2}}function Ef(){if(Le===2){Le=0;var e=$i,t=gn,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=V.T,V.T=null;var s=ce.p;ce.p=2;var r=le;le|=4;try{Cy(e,t.alternate,t)}finally{le=r,ce.p=s,V.T=i}}Le=3}}function Tf(){if(Le===4||Le===3){Le=0;var e=co;co=null,v5();var t=$i,i=gn,s=as,r=qy,n=(s&335544064)===s?10262:10256;if((i.subtreeFlags&n)!==0||(i.flags&n)!==0?Le=5:(Le=0,gn=$i=null,Yy(t,t.pendingLanes)),n=t.pendingLanes,n===0&&(Sr=null),Wf(s),i=i.stateNode,ui&&typeof ui.onCommitFiberRoot=="function")try{ui.onCommitFiberRoot($a,i,void 0,(i.current.flags&128)===128)}catch{}if(r!==null){i=V.T,n=ce.p,ce.p=2,V.T=null;try{for(var o=t.onRecoverableError,a=0;a<r.length;a++){var l=r[a];o(l.value,{componentStack:l.stack})}}finally{V.T=i,ce.p=n}}if(r=ho,o=uo,uo=null,r!==null&&(ho=null,o===null&&(o=[]),e!==null))for(l=0;l<r.length;l++)i=(0,r[l])(o),i!==void 0&&e.finished.finally(i);(as&3)!==0&&xh(),hs(t),n=t.pendingLanes,(s&261930)!==0&&(n&42)!==0?t===Ec?Ca++:(Ca=0,Ec=t):(Ca=0,Ec=null),Za(0,!1)}}function Yy(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ga(t)))}function xh(){return co!==null&&(co.skipTransition(),co=null),Cf(),Ef(),Tf(),Af()}function Af(){if(Le!==5)return!1;var e=$i,t=kf;kf=0;var i=Wf(as),s=V.T,r=ce.p;try{ce.p=32>i?32:i,V.T=null,i=xf,xf=null;var n=$i,o=as;if(Le=0,gn=$i=null,as=0,(le&6)!==0)throw Error(R(331));var a=le;if(le|=4,Hy(n.current),By(n,n.current,o,i),le=a,Za(0,!1),ui&&typeof ui.onPostCommitFiberRoot=="function")try{ui.onPostCommitFiberRoot($a,n)}catch{}return!0}finally{ce.p=r,V.T=s,Yy(e,t)}}function Qv(e,t,i){t=Ai(i,t),t=af(e.stateNode,t,2),e=yr(e,t,2),e!==null&&(Wa(e,2),hs(e))}function pe(e,t,i){if(e.tag===3)Qv(e,e,i);else for(;t!==null;){if(t.tag===3){Qv(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Sr===null||!Sr.has(s))){e=Ai(i,e),i=hy(2),s=yr(t,i,2),s!==null&&(uy(i,s,t,e),Wa(s,2),hs(s));break}}t=t.return}}function Sd(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new XC;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(Ap=!0,r.add(i),e=r3.bind(null,e,t,i),t.then(e,e))}function r3(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,_e===e&&(re&i)===i&&((He===4||He===3&&(re&62914560)===re&&300>hi()-wh)&&(le&2)===0?yo(e,0):Jc|=i,_o===re&&(_o=0)),hs(e)}function Xy(e,t){t===0&&(t=q0()),e=yn(e,t),e!==null&&(Wa(e,t),hs(e))}function n3(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Xy(e,i)}function o3(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(R(314))}s!==null&&s.delete(t),Xy(e,i)}function a3(e,t){return $f(e,t)}var bo=null,$n=null,Mf=!1,sh=!1,kd=!1,gr=0;function hs(e){e!==$n&&e.next===null&&($n===null?bo=$n=e:$n=$n.next=e),sh=!0,Mf||(Mf=!0,c3())}function Za(e,t){if(!kd&&sh){kd=!0;do for(var i=!1,s=bo;s!==null;){if(!t)if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var o=s.suspendedLanes,a=s.pingedLanes;n=(1<<31-di(42|e)+1)-1,n&=r&~(o&~a),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Jv(s,n))}else n=re,n=ah(s,s===_e?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||Ka(s,n)||(i=!0,Jv(s,n));s=s.next}while(i);kd=!1}}function l3(){Zy()}function Zy(){sh=Mf=!1;var e=0;gr!==0&&v3()&&(e=gr);for(var t=hi(),i=null,s=bo;s!==null;){var r=s.next,n=Qy(s,t);n===0?(s.next=null,i===null?bo=r:i.next=r,r===null&&($n=i)):(i=s,(e!==0||(n&3)!==0)&&(sh=!0)),s=r}Le!==0&&Le!==5||Za(e,!1),gr!==0&&(gr=0)}function Qy(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var o=31-di(n),a=1<<o,l=r[o];l===-1?((a&i)===0||(a&s)!==0)&&(r[o]=E5(a,t)):l<=t&&(e.expiredLanes|=a),n&=~a}if(t=_e,i=re,i=ah(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(de===2||de===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&td(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ka(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&td(s),Wf(i)){case 2:case 8:i=H0;break;case 32:i=Oc;break;case 268435456:i=U0;break;default:i=Oc}return s=Jy.bind(null,e),i=$f(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&td(s),e.callbackPriority=2,e.callbackNode=null,2}function Jy(e,t){if(Le!==0&&Le!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(xh()&&e.callbackNode!==i)return null;var s=re;return s=ah(e,e===_e?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Fy(e,s,t),Qy(e,hi()),e.callbackNode!=null&&e.callbackNode===i?Jy.bind(null,e):null)}function Jv(e,t){if(xh())return null;Fy(e,t,!0)}function c3(){b3(function(){(le&6)!==0?$f(z0,l3):Zy()})}function Rp(){if(gr===0){var e=un;e===0&&(e=jl,jl<<=1,(jl&261888)===0&&(jl=256)),gr=e}return gr}function e0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:pc(e)}function h3(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=e0((r[ei]||null).action),o=s.submitter;o&&(t=(t=o[ei]||null)?e0(t.formAction):o.getAttribute("formAction"),t!==null&&(n=t,o=null));var a=new ch("action","action",null,s,r);e.push({event:a,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(gr!==0){var l=new FormData(r,o);nf(i,{pending:!0,data:l,method:r.method,action:n},null,l)}}else typeof n=="function"&&(a.preventDefault(),l=new FormData(r,o),nf(i,{pending:!0,data:l,method:r.method,action:n},n,l))},currentTarget:r}]})}}for(lc=0;lc<jd.length;lc++)cc=jd[lc],t0=cc.toLowerCase(),i0=cc[0].toUpperCase()+cc.slice(1),Ki(t0,"on"+i0);var cc,t0,i0,lc;Ki(u1,"onAnimationEnd");Ki(d1,"onAnimationIteration");Ki(f1,"onAnimationStart");Ki("dblclick","onDoubleClick");Ki("focusin","onFocus");Ki("focusout","onBlur");Ki(wC,"onTransitionRun");Ki(SC,"onTransitionStart");Ki(kC,"onTransitionCancel");Ki(p1,"onTransitionEnd");po("onMouseEnter",["mouseout","mouseover"]);po("onMouseLeave",["mouseout","mouseover"]);po("onPointerEnter",["pointerout","pointerover"]);po("onPointerLeave",["pointerout","pointerover"]);_n("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));_n("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));_n("onBeforeInput",["compositionend","keypress","textInput","paste"]);_n("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));_n("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));_n("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oa="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(" "),u3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Oa));function eb(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var n=void 0;if(t)for(var o=s.length-1;0<=o;o--){var a=s[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==n&&r.isPropagationStopped())break e;n=a,r.currentTarget=c;try{n(r)}catch(h){Hc(h)}r.currentTarget=null,n=l}else for(o=0;o<s.length;o++){if(a=s[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==n&&r.isPropagationStopped())break e;n=a,r.currentTarget=c;try{n(r)}catch(h){Hc(h)}r.currentTarget=null,n=l}}}}function ee(e,t){var i=t[X_];i===void 0&&(i=t[X_]=new Set);var s=e+"__bubble";i.has(s)||(tb(t,e,2,!1),i.add(s))}function xd(e,t,i){var s=0;t&&(s|=4),tb(i,e,s,t)}var hc="_reactListening"+Math.random().toString(36).slice(2);function Lp(e){if(!e[hc]){e[hc]=!0,V0.forEach(function(i){i!=="selectionchange"&&(u3.has(i)||xd(i,!1,e),xd(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hc]||(t[hc]=!0,xd("selectionchange",!1,t))}}function tb(e,t,i,s){switch(Cb(t)){case 2:var r=sE;break;case 8:r=rE;break;default:r=Up}i=r.bind(null,t,i,e),r=void 0,!$d||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function Cd(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var o=s.tag;if(o===3||o===4){var a=s.stateNode.containerInfo;if(a===r)break;if(o===4)for(o=s.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===r)return;o=o.return}for(;a!==null;){if(o=en(a),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){s=n=o;continue e}a=a.parentNode}}s=s.return}e1(function(){var c=n,h=jf(i),u=[];e:{var d=g1.get(e);if(d!==void 0){var f=ch,g=e;switch(e){case"keypress":if(mc(i)===0)break e;case"keydown":case"keyup":f=Z5;break;case"focusin":g="focus",f=ad;break;case"focusout":g="blur",f=ad;break;case"beforeblur":case"afterblur":f=ad;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=rv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=P5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=iC;break;case u1:case d1:case f1:f=F5;break;case p1:f=rC;break;case"scroll":case"scrollend":f=H5;break;case"wheel":f=oC;break;case"copy":case"cut":case"paste":f=K5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=ov;break;case"submit":f=eC;break;case"toggle":case"beforetoggle":f=lC}var b=(t&4)!==0,T=!b&&(e==="scroll"||e==="scrollend"),_=b?d!==null?d+"Capture":null:d;b=[];for(var m=c,v;m!==null;){var p=m;if(v=p.stateNode,p=p.tag,p!==5&&p!==26&&p!==27||v===null||_===null||(p=Ta(m,_),p!=null&&b.push(za(m,p,v))),T)break;m=m.return}0<b.length&&(d=new f(d,g,null,i,h),u.push({event:d,listeners:b}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",f&&i!==Fd&&(g=i.relatedTarget||i.fromElement)&&(en(g)||g[Eo]))break e;(d||f)&&(g=h.window===h?h:(f=h.ownerDocument)?f.defaultView||f.parentWindow:window,d?(f=i.relatedTarget||i.toElement,d=c,f=f?en(f):null,f!==null&&(T=Fa(f),b=f.tag,f!==T||b!==5&&b!==27&&b!==6)&&(f=null)):(d=null,f=c),d!==f&&(b=rv,p="onMouseLeave",_="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(b=ov,p="onPointerLeave",_="onPointerEnter",m="pointer"),T=d==null?g:ha(d),v=f==null?g:ha(f),g=new b(p,m+"leave",d,i,h),g.target=T,g.relatedTarget=v,p=null,en(h)===c&&(b=new b(_,m+"enter",f,i,h),b.target=v,b.relatedTarget=T,p=b),T=p,b=d&&f?Rd(d,f,d3):null,d!==null&&s0(u,g,d,b,!1),f!==null&&T!==null&&s0(u,T,f,b,!0)))}e:{if(d=c?ha(c):window,f=d.nodeName&&d.nodeName.toLowerCase(),f==="select"||f==="input"&&d.type==="file")var E=hv;else if(cv(d))if(o1)E=vC;else{E=mC;var A=gC}else f=d.nodeName,!f||f.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&Vf(c.elementType)&&(E=hv):E=_C;if(E&&(E=E(e,c))){n1(u,E,i,h);break e}A&&A(e,d,c)}switch(A=c?ha(c):window,e){case"focusin":(cv(A)||A.contentEditable==="true")&&(Yn=A,Wd=c,ga=null);break;case"focusout":ga=Wd=Yn=null;break;case"mousedown":Vd=!0;break;case"contextmenu":case"mouseup":case"dragend":Vd=!1,pv(u,i,h);break;case"selectionchange":if(bC)break;case"keydown":case"keyup":pv(u,i,h)}var L;if(Xf)e:{switch(e){case"compositionstart":var B="onCompositionStart";break e;case"compositionend":B="onCompositionEnd";break e;case"compositionupdate":B="onCompositionUpdate";break e}B=void 0}else Gn?s1(e,i)&&(B="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(B="onCompositionStart");B&&(i1&&i.locale!=="ko"&&(Gn||B!=="onCompositionStart"?B==="onCompositionEnd"&&Gn&&(L=t1()):(ur=h,Gf="value"in ur?ur.value:ur.textContent,Gn=!0)),A=rh(c,B),0<A.length&&(B=new nv(B,e,null,i,h),u.push({event:B,listeners:A}),L?B.data=L:(L=r1(i),L!==null&&(B.data=L)))),(L=hC?uC(e,i):dC(e,i))&&(B=rh(c,"onBeforeInput"),0<B.length&&(A=new nv("onBeforeInput","beforeinput",null,i,h),u.push({event:A,listeners:B}),A.data=L)),h3(u,e,c,i,h)}eb(u,t)})}function za(e,t,i){return{instance:e,listener:t,currentTarget:i}}function rh(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,n=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||n===null||(r=Ta(e,i),r!=null&&s.unshift(za(e,r,n)),r=Ta(e,t),r!=null&&s.push(za(e,r,n))),e.tag===3)return s;e=e.return}return[]}function d3(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function s0(e,t,i,s,r){for(var n=t._reactName,o=[];i!==null&&i!==s;){var a=i,l=a.alternate,c=a.stateNode;if(a=a.tag,l!==null&&l===s)break;a!==5&&a!==26&&a!==27||c===null||(l=c,r?(c=Ta(i,n),c!=null&&o.unshift(za(i,c,l))):r||(c=Ta(i,n),c!=null&&o.push(za(i,c,l)))),i=i.return}o.length!==0&&e.push({event:t,listeners:o})}var f3=/\r\n?/g,p3=/\u0000|\uFFFD/g;function r0(e){return(typeof e=="string"?e:""+e).replace(f3,`
|
|
10
|
+
`).replace(p3,"")}function ib(e,t){return t=r0(t),r0(e)===t}function fe(e,t,i,s,r,n){switch(i){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||go(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&go(e,""+s);else return;break;case"className":Xl(e,"class",s);break;case"tabIndex":Xl(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Xl(e,i,s);break;case"style":J0(e,s,n);return;case"data":if(t!=="object"){Xl(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=pc(s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"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 n=="function"&&(i==="formAction"?(t!=="input"&&fe(e,t,"name",r.name,r,null),fe(e,t,"formEncType",r.formEncType,r,null),fe(e,t,"formMethod",r.formMethod,r,null),fe(e,t,"formTarget",r.formTarget,r,null)):(fe(e,t,"encType",r.encType,r,null),fe(e,t,"method",r.method,r,null),fe(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=pc(s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ss);return;case"onScroll":s!=null&&ee("scroll",e);return;case"onScrollEnd":s!=null&&ee("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(R(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(R(60));n?.__html!==i&&(e.innerHTML=i)}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=pc(s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":ee("beforetoggle",e),ee("toggle",e),fc(e,"popover",s);break;case"xlinkActuate":Ss(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ss(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ss(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ss(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ss(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ss(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ss(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ss(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ss(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":fc(e,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")i=O5.get(i)||i,fc(e,i,s);else return}ae=!0}function Rf(e,t,i,s,r,n){switch(i){case"style":J0(e,s,n);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(R(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(R(60));n?.__html!==i&&(e.innerHTML=i)}}break;case"children":if(typeof s=="string")go(e,s);else if(typeof s=="number"||typeof s=="bigint")go(e,""+s);else return;break;case"onScroll":s!=null&&ee("scroll",e);return;case"onScrollEnd":s!=null&&ee("scrollend",e);return;case"onClick":s!=null&&(e.onclick=ss);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!j0.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),n=i.slice(2,r?i.length-7:void 0),t=e[ei]||null,t=t!=null?t[i]:null,typeof t=="function"&&e.removeEventListener(n,t,r),typeof s=="function")){typeof t!="function"&&t!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,s,r);break e}ae=!0,i in e?e[i]=s:s===!0?e.setAttribute(i,""):fc(e,i,s)}return}ae=!0}function Ct(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ee("error",e),ee("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var o=i[n];if(o!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(R(137,t));default:fe(e,t,n,o,i,null)}}r&&fe(e,t,"srcSet",i.srcSet,i,null),s&&fe(e,t,"src",i.src,i,null);return;case"input":ee("invalid",e);var a=n=o=r=null,l=null,c=null;for(s in i)if(i.hasOwnProperty(s)){var h=i[s];if(h!=null)switch(s){case"name":r=h;break;case"type":o=h;break;case"checked":l=h;break;case"defaultChecked":c=h;break;case"value":n=h;break;case"defaultValue":a=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(R(137,t));break;default:fe(e,t,s,h,i,null)}}X0(e,n,a,l,c,o,r,!1);return;case"select":ee("invalid",e),s=o=n=null;for(r in i)if(i.hasOwnProperty(r)&&(a=i[r],a!=null))switch(r){case"value":n=a;break;case"defaultValue":o=a;break;case"multiple":s=a;default:fe(e,t,r,a,i,null)}t=n,i=o,e.multiple=!!s,t!=null?so(e,!!s,t,!1):i!=null&&so(e,!!s,i,!0);return;case"textarea":ee("invalid",e),n=r=s=null;for(o in i)if(i.hasOwnProperty(o)&&(a=i[o],a!=null))switch(o){case"value":s=a;break;case"defaultValue":r=a;break;case"children":n=a;break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(R(91));break;default:fe(e,t,o,a,i,null)}Q0(e,s,r,n);return;case"option":for(l in i)i.hasOwnProperty(l)&&(s=i[l],s!=null)&&(l==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":fe(e,t,l,s,i,null));return;case"dialog":ee("beforetoggle",e),ee("toggle",e),ee("cancel",e),ee("close",e);break;case"iframe":case"object":ee("load",e);break;case"video":case"audio":for(s=0;s<Oa.length;s++)ee(Oa[s],e);break;case"image":ee("error",e),ee("load",e);break;case"details":ee("toggle",e);break;case"embed":case"source":case"link":ee("error",e),ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in i)if(i.hasOwnProperty(c)&&(s=i[c],s!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(R(137,t));default:fe(e,t,c,s,i,null)}return;default:if(Vf(t)){for(h in i)i.hasOwnProperty(h)&&(s=i[h],s!==void 0&&Rf(e,t,h,s,i,void 0));return}}for(a in i)i.hasOwnProperty(a)&&(s=i[a],s!=null&&fe(e,t,a,s,i,null))}var g3={};function m3(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,n=null,o=null,a=null,l=null,c=null,h=null;for(f in i){var u=i[f];if(i.hasOwnProperty(f)&&u!=null)switch(f){case"checked":break;case"value":break;case"defaultValue":l=u;default:s.hasOwnProperty(f)||fe(e,t,f,null,s,u)}}for(var d in s){var f=s[d];if(u=i[d],s.hasOwnProperty(d)&&(f!=null||u!=null))switch(d){case"type":f!==u&&(ae=!0),n=f;break;case"name":f!==u&&(ae=!0),r=f;break;case"checked":f!==u&&(ae=!0),c=f;break;case"defaultChecked":f!==u&&(ae=!0),h=f;break;case"value":f!==u&&(ae=!0),o=f;break;case"defaultValue":f!==u&&(ae=!0),a=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(R(137,t));break;default:f!==u&&fe(e,t,d,f,s,u)}}Id(e,o,a,l,c,h,n,r);return;case"select":f=o=a=d=null;for(n in i)if(l=i[n],i.hasOwnProperty(n)&&l!=null)switch(n){case"value":break;case"multiple":f=l;default:s.hasOwnProperty(n)||fe(e,t,n,null,s,l)}for(r in s)if(n=s[r],l=i[r],s.hasOwnProperty(r)&&(n!=null||l!=null))switch(r){case"value":n!==l&&(ae=!0),d=n;break;case"defaultValue":n!==l&&(ae=!0),a=n;break;case"multiple":n!==l&&(ae=!0),o=n;default:n!==l&&fe(e,t,r,n,s,l)}t=a,i=o,s=f,d!=null?so(e,!!i,d,!1):!!s!=!!i&&(t!=null?so(e,!!i,t,!0):so(e,!!i,i?[]:"",!1));return;case"textarea":f=d=null;for(a in i)if(r=i[a],i.hasOwnProperty(a)&&r!=null&&!s.hasOwnProperty(a))switch(a){case"value":break;case"children":break;default:fe(e,t,a,null,s,r)}for(o in s)if(r=s[o],n=i[o],s.hasOwnProperty(o)&&(r!=null||n!=null))switch(o){case"value":r!==n&&(ae=!0),d=r;break;case"defaultValue":r!==n&&(ae=!0),f=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(R(91));break;default:r!==n&&fe(e,t,o,r,s,n)}Z0(e,d,f);return;case"option":for(var g in i)d=i[g],i.hasOwnProperty(g)&&d!=null&&!s.hasOwnProperty(g)&&(g==="selected"?e.selected=!1:fe(e,t,g,null,s,d));for(l in s)d=s[l],f=i[l],s.hasOwnProperty(l)&&d!==f&&(d!=null||f!=null)&&(l==="selected"?(d!==f&&(ae=!0),e.selected=d&&typeof d!="function"&&typeof d!="symbol"):fe(e,t,l,d,s,f));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 b in i)d=i[b],i.hasOwnProperty(b)&&d!=null&&!s.hasOwnProperty(b)&&fe(e,t,b,null,s,d);for(c in s)if(d=s[c],f=i[c],s.hasOwnProperty(c)&&d!==f&&(d!=null||f!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(R(137,t));break;default:fe(e,t,c,d,s,f)}return;default:if(Vf(t)){for(var T in i)d=i[T],i.hasOwnProperty(T)&&d!==void 0&&!s.hasOwnProperty(T)&&Rf(e,t,T,void 0,s,d);for(h in s)d=s[h],f=i[h],!s.hasOwnProperty(h)||d===f||d===void 0&&f===void 0||Rf(e,t,h,d,s,f);return}}for(var _ in i)d=i[_],i.hasOwnProperty(_)&&d!=null&&!s.hasOwnProperty(_)&&fe(e,t,_,null,s,d);for(u in s)d=s[u],f=i[u],!s.hasOwnProperty(u)||d===f||d==null&&f==null||fe(e,t,u,d,s,f)}function n0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _3(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],n=r.transferSize,o=r.initiatorType,a=r.duration;if(n&&a&&n0(o)){for(o=0,a=r.responseEnd,s+=1;s<i.length;s++){var l=i[s],c=l.startTime;if(c>a)break;var h=l.transferSize,u=l.initiatorType;h&&n0(u)&&(l=l.responseEnd,o+=h*(l<a?1:(a-c)/(l-c)))}if(--s,t+=8*(n+o)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Lf=null,Df=null;function Ha(e){return e.nodeType===9?e:e.ownerDocument}function o0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sb(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function rb(e,t,i,s){return i=Ha(i).createElement(e),i[wt]=s,i[ei]=t,Ct(i,e,t),at(i),i}function Nf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ed=null;function v3(){var e=window.event;return e&&e.type==="popstate"?e===Ed?!1:(Ed=e,!0):(Ed=null,!1)}var Dp=typeof setTimeout=="function"?setTimeout:void 0,y3=typeof clearTimeout=="function"?clearTimeout:void 0,a0=typeof Promise=="function"?Promise:void 0,l0=typeof requestAnimationFrame=="function"?requestAnimationFrame:Dp,b3=typeof queueMicrotask=="function"?queueMicrotask:typeof a0<"u"?function(e){return a0.resolve(null).then(e).catch(w3)}:Dp;function w3(e){setTimeout(function(){throw e})}function Dr(e){return e==="head"}function c0(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),Co(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Ad(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Ad(i);for(var n=i.firstChild;n;){var o=n.nextSibling,a=n.nodeName;n[Va]||a==="SCRIPT"||a==="STYLE"||a==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=o}}else i==="body"&&Ad(e.ownerDocument.body);i=r}while(i);Co(t)}function h0(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function nb(e,t,i){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,i!=null&&(e.style.viewTransitionClass=i),i=getComputedStyle(e),i.display==="inline"){if(t=e.getClientRects(),t.length===1)var s=1;else for(var r=s=0;r<t.length;r++){var n=t[r];0<n.width&&0<n.height&&s++}s===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+i.paddingTop,e.marginBottom="-"+i.paddingBottom)}}function ob(e,t){e=e.style,t=t.style;var i=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=i==null||typeof i=="boolean"?"":(""+i).trim(),i=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=i==null||typeof i=="boolean"?"":(""+i).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(i=t.display,e.display=i==null||typeof i=="boolean"?"":i,i=t.margin,i!=null?e.margin=i:(i=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=i==null||typeof i=="boolean"?"":i,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function ab(e,t,i){return i=i.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=i.innerHeight&&e.left<=i.innerWidth}}function Bf(e){var t=e.getBoundingClientRect(),i=getComputedStyle(e);return ab(t,i,e)}function S3(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var i=getComputedStyle(e);return ab(t,i,e)}function k3(e){return e.documentElement.clientHeight}function x3(e){this.addEventListener("load",e),this.addEventListener("error",e)}function C3(e,t,i,s,r,n,o,a,l){var c=t.nodeType===9?t:t.ownerDocument;try{var h=c.startViewTransition({update:function(){var d=c.defaultView,f=d.navigation&&d.navigation.transition,g=c.fonts.status;s();var b=[];if(g==="loaded"&&(k3(c),c.fonts.status==="loading"&&b.push(c.fonts.ready)),g=b.length,e!==null)for(var T=e.suspenseyImages,_=0,m=0;m<T.length;m++){var v=T[m];if(!v.complete){var p=v.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<d.innerHeight&&p.left<d.innerWidth){if(_+=yb(v),_>Mc){b.length=g;break}v=new Promise(x3.bind(v)),b.push(v)}}}if(0<b.length)return d=Promise.race([Promise.all(b),new Promise(function(E){return setTimeout(E,500)})]).then(r,r),(f?Promise.allSettled([f.finished,d]):d).then(n,n);if(r(),f)return f.finished.then(n,n);n()},types:i});c.__reactViewTransition=h;var u=[];return h.ready.then(function(){for(var d=c.documentElement.getAnimations({subtree:!0}),f=0;f<d.length;f++){var g=d[f],b=g.effect,T=b.pseudoElement;if(T!=null&&T.startsWith("::view-transition")){u.push(g),g=b.getKeyframes();for(var _=T=void 0,m=!0,v=0;v<g.length;v++){var p=g[v],E=p.width;if(T===void 0)T=E;else if(T!==E){m=!1;break}if(E=p.height,_===void 0)_=E;else if(_!==E){m=!1;break}delete p.width,delete p.height,p.transform==="none"&&delete p.transform}m&&T!==void 0&&_!==void 0&&(b.setKeyframes(g),m=getComputedStyle(b.target,b.pseudoElement),m.width!==T||m.height!==_)&&(m=g[0],m.width=T,m.height=_,m=g[g.length-1],m.width=T,m.height=_,b.setKeyframes(g))}}o()},function(d){c.__reactViewTransition===h&&(c.__reactViewTransition=null);try{typeof d=="object"&&d!==null&&d.name==="InvalidStateError"&&(d.message==="View transition was skipped because document visibility state is hidden."||d.message==="Skipping view transition because document visibility state has become hidden."||d.message==="Skipping view transition because viewport size changed."||d.message==="Transition was aborted because of invalid state")&&(d=null),d!==null&&l(d)}finally{s(),r(),o()}}),h.finished.finally(function(){for(var d=0;d<u.length;d++)u[d].cancel();c.__reactViewTransition===h&&(c.__reactViewTransition=null),a()}),h}catch{return s(),r(),o(),null}}function tn(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}tn.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:ve({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};tn.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,i=e.getAnimations({subtree:!0}),s=[],r=0;r<i.length;r++){var n=i[r].effect;n!==null&&n.target===e&&n.pseudoElement===t&&s.push(i[r])}return s};tn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function lb(e){return{name:e,group:new tn("group",e),imagePair:new tn("image-pair",e),old:new tn("old",e),new:new tn("new",e)}}function gi(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}gi.prototype.addEventListener=function(e,t,i){var s=null,r=null;if(!(i!=null&&typeof i!="boolean"&&(s=i.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var n=this._eventListeners;if(cb(n,e,t,i)===-1){var o=this,a=t;i!=null&&typeof i!="boolean"&&i.once===!0&&(a=function(l){o.removeEventListener(e,t,i),typeof t=="function"?t.call(this,l):t.handleEvent(l)}),s!==null&&(r=o.removeEventListener.bind(o,e,t,i),s.addEventListener("abort",r,{once:!0}),r=s.removeEventListener.bind(s,"abort",r)),s=wo(i),n.push({type:e,listener:t,optionsOrUseCapture:i,attachedListener:a,cleanup:r}),Jt(this._fragmentFiber.child,!1,E3,e,a,s)}this._eventListeners=n}};function E3(e,t,i,s){return Je(e).addEventListener(t,i,s),!1}gi.prototype.removeEventListener=function(e,t,i){var s=this._eventListeners;if(s!==null&&(t=cb(s,e,t,i),t!==-1)){var r=s[t];i=r.attachedListener;var n=r.cleanup;r=wo(r.optionsOrUseCapture),Jt(this._fragmentFiber.child,!1,T3,e,i,r),s.splice(t,1),n!==null&&n()}};function T3(e,t,i,s){return Je(e).removeEventListener(t,i,s),!1}function wo(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function u0(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function cb(e,t,i,s){if(e.length===0)return-1;s=u0(s);for(var r=0;r<e.length;r++){var n=e[r];if(n.type===t&&n.listener===i&&u0(n.optionsOrUseCapture)===s)return r}return-1}gi.prototype.dispatchEvent=function(e){var t=mn(this._fragmentFiber);if(t===null)return!0;t=Je(t);var i=this._eventListeners;if(i!==null&&0<i.length||!e.bubbles){var s=t.nodeType===9?t.createComment(""):document.createTextNode("");if(i)for(var r=0;r<i.length;r++){var n=i[r];s.addEventListener(n.type,n.attachedListener,wo(n.optionsOrUseCapture))}if(t.appendChild(s),e=s.dispatchEvent(e),i)for(r=0;r<i.length;r++)n=i[r],s.removeEventListener(n.type,n.attachedListener,wo(n.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)};gi.prototype.focus=function(e){Jt(this._fragmentFiber.child,!0,hb,e,void 0,void 0)};function hb(e,t){return e.tag===6?!1:(e=Je(e),P3(e,t))}gi.prototype.focusLast=function(e){var t=[];Jt(this._fragmentFiber.child,!0,Np,t,void 0,void 0);for(var i=t.length-1;0<=i&&!hb(t[i],e);i--);};function Np(e,t){return t.push(e),!1}gi.prototype.blur=function(){var e=mn(this._fragmentFiber);e!==null&&(e=Je(e),e=Ha(e).activeElement,e!==null&&Jt(this._fragmentFiber.child,!1,A3,e,void 0,void 0))};function A3(e,t){return e.tag===6?!1:(e=Je(e),e===t||e.contains(t)?(t.blur(),!0):!1)}gi.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),Jt(this._fragmentFiber.child,!1,M3,e,void 0,void 0)};function M3(e,t){return e.tag===6||(e=Je(e),t.observe(e)),!1}gi.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),Jt(this._fragmentFiber.child,!1,R3,e,void 0,void 0);for(var i=t=0;i<Fi.length;i++){var s=Fi[i];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):Fi[t++]=s}Fi.length=t}};function R3(e,t){return e.tag===6||(e=Je(e),t.unobserve(e)),!1}var Fi=[],Td=!1;function L3(e,t,i){Fi.push({fragmentInstance:e,observer:t,instance:i}),Td||(Td=!0,q3(function(){Td=!1;var s=Fi;Fi=[];for(var r=0;r<s.length;r++){var n=s[r];n.observer.unobserve(n.instance)}}))}gi.prototype.getClientRects=function(){var e=[];return Jt(this._fragmentFiber.child,!1,D3,e,void 0,void 0),e};function D3(e,t){if(e.tag===6){e=e.stateNode;var i=e.ownerDocument.createRange();i.selectNodeContents(e),t.push.apply(t,i.getClientRects())}else e=Je(e),t.push.apply(t,e.getClientRects());return!1}gi.prototype.getRootNode=function(e){var t=mn(this._fragmentFiber);return t===null?this:Je(t).getRootNode(e)};gi.prototype.compareDocumentPosition=function(e){var t=mn(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var i=[];Jt(this._fragmentFiber.child,!1,Np,i,void 0,void 0);var s=Je(t);if(i.length===0){if(i=s,K_(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(i=t)}t=this._fragmentFiber;var r=s=i.compareDocumentPosition(e);return i===e?r=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(i=D0(t)[1],i===null?r=Node.DOCUMENT_POSITION_PRECEDING:(e=Je(i).compareDocumentPosition(e),r=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),r|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=Je(i[0]),r=Je(i[i.length-1]);var n=K_(this._fragmentFiber)?t.parentElement:s;if(n==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,n=n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),a=r.compareDocumentPosition(e),l=o&Node.DOCUMENT_POSITION_CONTAINED_BY||a&Node.DOCUMENT_POSITION_CONTAINED_BY;return a=s&&n&&o&Node.DOCUMENT_POSITION_FOLLOWING&&a&Node.DOCUMENT_POSITION_PRECEDING,t=s&&t===e||n&&r===e||l||a?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&t===e||!n&&r===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||N3(t,this._fragmentFiber,i[0],i[i.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function N3(e,t,i,s,r){var n=en(r);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(i=!!n)e:{for(;n!==null;){if(n.tag===7&&(n===t||n.alternate===t)){i=!0;break e}n=n.return}i=!1}return i}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(n===null)return n=r.ownerDocument,r===n||r===n.documentElement||r===n.body;e:{for(n=t,t=mn(t);n!==null;){if(!(n.tag!==5&&n.tag!==3&&n.tag!==27||n!==t&&n.alternate!==t)){n=!0;break e}n=n.return}n=!1}return n}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!n)&&!(t=n===i)&&(t=Rd(i,n,W_),t===null?t=!1:(Jt(t,!0,c5,n,i),n=Kn,Kn=null,t=n!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!n)&&!(t=n===s)&&(t=Rd(s,n,W_),t===null?t=!1:(Jt(t,!0,h5,n,s),n=Kn,Md=Kn=null,t=n!==null)),t):!1}function d0(e,t){var i=e.ownerDocument.createRange();i.selectNodeContents(e),e=i.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}gi.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(R(566));var t=[];Jt(this._fragmentFiber.child,!1,Np,t,void 0,void 0);var i=e!==!1;if(t.length===0){var s=D0(this._fragmentFiber);if(s=i?s[1]||s[0]||mn(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=Je(s),d0(e,i);return}if(s=Je(s),s.nodeType!==9){if(s.nodeType===11){i="host"in s?s.host:null,i!==null&&i.scrollIntoView(e);return}s.scrollIntoView(e)}}for(s=i?t.length-1:0;s!==(i?-1:t.length);){var r=t[s];r.tag===6?(r=Je(r),d0(r,i)):Je(r).scrollIntoView(e),s+=i?-1:1}};function B3(e,t){return e=Je(e),ub(e,t),!1}function ub(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function db(e,t){var i=t._eventListeners;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];e.addEventListener(r.type,r.attachedListener,wo(r.optionsOrUseCapture))}e.nodeType!==3&&(i=t._observers,i!==null&&i.forEach(function(n){for(var o=0,a=0;a<Fi.length;a++){var l=Fi[a];(l.fragmentInstance!==t||l.observer!==n||l.instance!==e)&&(Fi[o++]=l)}Fi.length=o,n.observe(e)}),ub(e,t))}function O3(e,t){var i=t._eventListeners;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];e.removeEventListener(r.type,r.attachedListener,wo(r.optionsOrUseCapture))}e.nodeType!==3&&(i=t._observers,i!==null&&i.forEach(function(n){typeof n.rootMargin=="string"?L3(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Of(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Of(i),lh(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function z3(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Va])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(n=e.getAttribute("rel"),n==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(n!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(n=e.getAttribute("src"),(n!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&n&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var n=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===n)return e}else return e;if(e=Ri(e.nextSibling),e===null)break}return null}function H3(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ri(e.nextSibling),e===null))return null;return e}function fb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ri(e.nextSibling),e===null))return null;return e}function zf(e){return e.data==="$?"||e.data==="$~"}function Bp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function U3(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ri(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Hf=null;function f0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ri(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function p0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function P3(e,t){function i(){s=!0}if(e.ownerDocument.activeElement===e)return!0;var s=!1;try{e.ownerDocument.addEventListener("focus",i,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",i,!0)}return s}function q3(e){l0(function(){l0(function(t){return e(t)})})}function pb(e,t,i){switch(t=Ha(i),e){case"html":if(e=t.documentElement,!e)throw Error(R(452));return e;case"head":if(e=t.head,!e)throw Error(R(453));return e;case"body":if(e=t.body,!e)throw Error(R(454));return e;default:throw Error(R(451))}}function gb(e,t,i){for(var s in i){var r=i[s];i.hasOwnProperty(s)&&r!=null&&fe(e,t,s,null,g3,r)}i.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===ss&&(e.onclick=null),lh(e)}function Ad(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lh(e)}var Li=new Map,g0=new Set;function Ua(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var zs=ce.d;ce.d={f:I3,r:F3,D:$3,C:K3,L:W3,m:V3,X:G3,S:j3,M:Y3};function I3(){var e=zs.f(),t=Sh();return e||t}function F3(e){var t=To(e);t!==null&&t.tag===5&&t.type==="form"?J1(t):zs.r(e)}var Lo=typeof document>"u"?null:document;function mb(e,t,i){var s=Lo;if(s&&typeof t=="string"&&t){var r=Ti(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),g0.has(r)||(g0.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Ct(t,"link",e),at(t),s.head.appendChild(t)))}}function $3(e){zs.D(e),mb("dns-prefetch",e,null)}function K3(e,t){zs.C(e,t),mb("preconnect",e,t)}function W3(e,t,i){zs.L(e,t,i);var s=Lo;if(s&&e&&t){var r='link[rel="preload"][as="'+Ti(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ti(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ti(i.imageSizes)+'"]')):r+='[href="'+Ti(e)+'"]';var n=r;switch(t){case"style":n=So(e);break;case"script":n=Do(e)}if(!(Li.has(n)||(e=ve({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Li.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Qa(n))||t==="script"&&s.querySelector(Ja(n))))){var o=s.createElement("link");Ct(o,"link",e),t==="style"&&(o[zc]=!0,o.onload=o.onerror=function(){W0(o)}),at(o),s.head.appendChild(o)}}}function V3(e,t){zs.m(e,t);var i=Lo;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ti(s)+'"][href="'+Ti(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=Do(e)}if(!Li.has(n)&&(e=ve({rel:"modulepreload",href:e},t),Li.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ja(n)))return}s=i.createElement("link"),Ct(s,"link",e),at(s),i.head.appendChild(s)}}}function j3(e,t,i){zs.S(e,t,i);var s=Lo;if(s&&e){var r=io(s).hoistableStyles,n=So(e);t=t||"default";var o=r.get(n);if(!o){var a={loading:0,preload:null};if(o=s.querySelector(Qa(n)))a.loading=5;else{e=ve({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Li.get(n))&&Op(e,i);var l=o=s.createElement("link");at(l),Ct(l,"link",e),l._p=new Promise(function(c,h){l.onload=c,l.onerror=h}),l.addEventListener("load",function(){a.loading|=1}),l.addEventListener("error",function(){a.loading|=2}),a.loading|=4,Tc(o,t,s)}o={type:"stylesheet",instance:o,count:1,state:a},r.set(n,o)}}}function G3(e,t){zs.X(e,t);var i=Lo;if(i&&e){var s=io(i).hoistableScripts,r=Do(e),n=s.get(r);n||(n=i.querySelector(Ja(r)),n||(e=ve({src:e,async:!0},t),(t=Li.get(r))&&zp(e,t),n=i.createElement("script"),at(n),Ct(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function Y3(e,t){zs.M(e,t);var i=Lo;if(i&&e){var s=io(i).hoistableScripts,r=Do(e),n=s.get(r);n||(n=i.querySelector(Ja(r)),n||(e=ve({src:e,async:!0,type:"module"},t),(t=Li.get(r))&&zp(e,t),n=i.createElement("script"),at(n),Ct(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function m0(e,t,i,s){var r=(r=mr.current)?Ua(r):null;if(!r)throw Error(R(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(i=So(i.href),t=io(r).hoistableStyles,s=t.get(i),s||(s={type:"style",instance:null,count:0,state:null},t.set(i,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=So(i.href);var n=io(r).hoistableStyles,o=n.get(e);if(o||(r=r.ownerDocument||r,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,o),(n=r.querySelector(Qa(e)))?n._p||(o.instance=n,o.state.loading=5):(n=Li.get(e),n||(n={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Li.set(e,n)),X3(r,e,n,o.state))),t&&s===null)throw Error(R(528,""));return o}if(t&&s!==null)throw Error(R(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(i=Do(i),t=io(r).hoistableScripts,s=t.get(i),s||(s={type:"script",instance:null,count:0,state:null},t.set(i,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(R(444,e))}}function So(e){return'href="'+Ti(e)+'"'}function Qa(e){return'link[rel="stylesheet"]['+e+"]"}function _b(e){return ve({},e,{"data-precedence":e.precedence,precedence:null})}function X3(e,t,i,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[zc]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[zc]=!0,t.onload=t.onerror=W0.bind(null,t),Ct(t,"link",i),at(t),e.head.appendChild(t);s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2})}function Do(e){return'[src="'+Ti(e)+'"]'}function Ja(e){return"script[async]"+e}function _0(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ti(i.href)+'"]');if(s)return t.instance=s,at(s),s;var r=ve({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),at(s),Ct(s,"style",r),Tc(s,i.precedence,e),t.instance=s;case"stylesheet":r=So(i.href);var n=e.querySelector(Qa(r));if(n)return t.state.loading|=4,t.instance=n,at(n),n;s=_b(i),(r=Li.get(r))&&Op(s,r),n=(e.ownerDocument||e).createElement("link"),at(n);var o=n;return o._p=new Promise(function(a,l){o.onload=a,o.onerror=l}),Ct(n,"link",s),t.state.loading|=4,Tc(n,i.precedence,e),t.instance=n;case"script":return n=Do(i.src),(r=e.querySelector(Ja(n)))?(t.instance=r,at(r),r):(s=i,(r=Li.get(n))&&(s=ve({},i),zp(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),at(r),Ct(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(R(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Tc(s,i.precedence,e));return t.instance}function Tc(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,n=r,o=0;o<s.length;o++){var a=s[o];if(a.dataset.precedence===t)n=a;else if(n!==r)break}n?n.parentNode.insertBefore(e,n.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Op(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function zp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ac=null;function v0(e,t,i){if(Ac===null){var s=new Map,r=Ac=new Map;r.set(i,s)}else r=Ac,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var n=i[r];if(!(n[Va]||n[wt]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var o=n.getAttribute(t)||"";o=e+o;var a=s.get(o);a?a.push(n):s.set(o,[n])}}return s}function Uf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Z3(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function y0(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function vb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function yb(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function b0(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=yb(t),e.suspenseyImages.push(t)),e=eE.bind(e),t.decode().then(e,e))}function Q3(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=So(s.href),n=t.querySelector(Qa(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Pa.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,at(n);return}n=t.ownerDocument||t,s=_b(s),(r=Li.get(r))&&Op(s,r),n=n.createElement("link"),at(n);var o=n;o._p=new Promise(function(a,l){o.onload=a,o.onerror=l}),Ct(n,"link",s),i.instance=n}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Pa.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Mc=0;function J3(e,t){return e.stylesheets&&e.count===0&&Rc(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&Rc(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&Mc===0&&(Mc=62500*_3());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Rc(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>Mc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function bb(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Rc(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Pa(){this.count--,bb(this)}function eE(){this.imgCount--,bb(this)}var nh=null;function Rc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nh=new Map,t.forEach(tE,e),nh=null,Pa.call(e))}function tE(e,t){if(!(t.state.loading&4)){var i=nh.get(e);if(i)var s=i.get(null);else{i=new Map,nh.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var o=r[n];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(i.set(o.dataset.precedence,o),s=o)}s&&i.set(null,s)}r=t.instance,o=r.getAttribute("data-precedence"),n=i.get(o)||s,n===s&&i.set(null,r),i.set(o,r),this.count++,s=Pa.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),n?n.parentNode.insertBefore(r,n.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var ko={$$typeof:is,Provider:null,Consumer:null,_currentValue:sn,_currentValue2:sn,_threadCount:0};function iE(e,t,i,s,r,n,o,a,l){this.tag=1,this.containerInfo=e,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=id(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=id(0),this.hiddenUpdates=id(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.transitionTypes=null,this.incompleteTransitions=new Map}function wb(e,t,i,s,r,n,o,a,l,c,h,u){return e=new iE(e,t,i,o,l,c,h,u,a),t=1,n===!0&&(t|=24),n=Zt(3,null,null,t),e.current=n,n.stateNode=e,t=ip(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},np(n),e}function Sb(e){return e?(e=Qn,e):Qn}function kb(e,t,i,s,r,n){r=Sb(r),s.context===null?s.context=r:s.pendingContext=r,s=vr(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=yr(e,s,t),i!==null&&(Qt(i,e,t),_a(i,e,t))}function w0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Hp(e,t){w0(e,t),(e=e.alternate)&&w0(e,t)}function xb(e){if(e.tag===13||e.tag===31){var t=yn(e,67108864);t!==null&&Qt(t,e,67108864),Hp(e,67108864)}}function S0(e){if(e.tag===13||e.tag===31){var t=fi();t=Kf(t);var i=yn(e,t);i!==null&&Qt(i,e,t),Hp(e,t)}}var xo=!0;function sE(e,t,i,s){var r=V.T;V.T=null;var n=ce.p;try{ce.p=2,Up(e,t,i,s)}finally{ce.p=n,V.T=r}}function rE(e,t,i,s){var r=V.T;V.T=null;var n=ce.p;try{ce.p=8,Up(e,t,i,s)}finally{ce.p=n,V.T=r}}function Up(e,t,i,s){if(xo){var r=Pf(s);if(r===null)Cd(e,t,s,oh,i),k0(e,s);else if(oE(r,e,t,i,s))s.stopPropagation();else if(k0(e,s),t&4&&-1<nE.indexOf(e)){for(;r!==null;){var n=To(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var o=Zr(n.pendingLanes);if(o!==0){var a=n;for(a.pendingLanes|=2,a.entangledLanes|=2;o;){var l=1<<31-di(o);a.entanglements[1]|=l,o&=~l}hs(n),(le&6)===0&&(eh=hi()+500,Za(0,!1))}}break;case 31:case 13:a=yn(n,2),a!==null&&Qt(a,n,2),Sh(),Hp(n,2)}if(n=Pf(s),n===null&&Cd(e,t,s,oh,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else Cd(e,t,s,null,i)}}function Pf(e){return e=jf(e),Pp(e)}var oh=null;function Pp(e){if(oh=null,e=en(e),e!==null){var t=Fa(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=M0(t),e!==null)return e;e=null}else if(i===31){if(e=R0(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return oh=e,null}function Cb(e){switch(e){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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(y5()){case z0:return 2;case H0:return 8;case Oc:case b5:return 32;case U0:return 268435456;default:return 32}default:return 32}}var qf=!1,kr=null,xr=null,Cr=null,qa=new Map,Ia=new Map,cr=[],nE="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 k0(e,t){switch(e){case"focusin":case"focusout":kr=null;break;case"dragenter":case"dragleave":xr=null;break;case"mouseover":case"mouseout":Cr=null;break;case"pointerover":case"pointerout":qa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ia.delete(t.pointerId)}}function oa(e,t,i,s,r,n){return e===null||e.nativeEvent!==n?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:n,targetContainers:[r]},t!==null&&(t=To(t),t!==null&&xb(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function oE(e,t,i,s,r){switch(t){case"focusin":return kr=oa(kr,e,t,i,s,r),!0;case"dragenter":return xr=oa(xr,e,t,i,s,r),!0;case"mouseover":return Cr=oa(Cr,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return qa.set(n,oa(qa.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,Ia.set(n,oa(Ia.get(n)||null,e,t,i,s,r)),!0}return!1}function Eb(e){var t=en(e.target);if(t!==null){var i=Fa(t);if(i!==null){if(t=i.tag,t===13){if(t=M0(i),t!==null){e.blockedOn=t,Y_(e.priority,function(){S0(i)});return}}else if(t===31){if(t=R0(i),t!==null){e.blockedOn=t,Y_(e.priority,function(){S0(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Pf(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Fd=s,i.target.dispatchEvent(s),Fd=null}else return t=To(i),t!==null&&xb(t),e.blockedOn=i,!1;t.shift()}return!0}function x0(e,t,i){Lc(e)&&i.delete(t)}function aE(){qf=!1,kr!==null&&Lc(kr)&&(kr=null),xr!==null&&Lc(xr)&&(xr=null),Cr!==null&&Lc(Cr)&&(Cr=null),qa.forEach(x0),Ia.forEach(x0)}function uc(e,t){e.blockedOn===t&&(e.blockedOn=null,qf||(qf=!0,et.unstable_scheduleCallback(et.unstable_NormalPriority,aE)))}var dc=null;function C0(e){dc!==e&&(dc=e,et.unstable_scheduleCallback(et.unstable_NormalPriority,function(){dc===e&&(dc=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(Pp(s||i)===null)continue;break}var n=To(i);n!==null&&(e.splice(t,3),t-=3,nf(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Co(e){function t(l){return uc(l,e)}kr!==null&&uc(kr,e),xr!==null&&uc(xr,e),Cr!==null&&uc(Cr,e),qa.forEach(t),Ia.forEach(t);for(var i=0;i<cr.length;i++){var s=cr[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<cr.length&&(i=cr[0],i.blockedOn===null);)Eb(i),i.blockedOn===null&&cr.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],n=i[s+1],o=r[ei]||null;if(typeof n=="function")o||C0(i);else if(o){var a=null;if(n&&n.hasAttribute("formAction")){if(r=n,o=n[ei]||null)a=o.formAction;else if(Pp(r)!==null)continue}else a=o.action;typeof a=="function"?i[s+1]=a:(i.splice(s,3),s-=3),C0(i)}}}function Tb(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(o){return r=o})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var n=navigation.currentEntry;n&&n.url!=null&&navigation.navigate(n.url,{state:n.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function qp(e){this._internalRoot=e}Ch.prototype.render=qp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(R(409));var i=t.current,s=fi();kb(i,s,e,t,null,null)};Ch.prototype.unmount=qp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kb(e.current,2,null,e,null,null),Sh(),t[Eo]=null}};function Ch(e){this._internalRoot=e}Ch.prototype.unstable_scheduleHydration=function(e){if(e){var t=K0();e={blockedOn:null,target:e,priority:t};for(var i=0;i<cr.length&&t!==0&&t<cr[i].priority;i++);cr.splice(i,0,e),i===0&&Eb(e)}};var E0=T0.version;if(E0!=="19.3.0")throw Error(R(527,E0,"19.3.0"));ce.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(R(188)):(e=Object.keys(e).join(","),Error(R(268,e)));return e=l5(t),e=e!==null?L0(e):null,e=e===null?null:e.stateNode,e};var lE={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(aa=__REACT_DEVTOOLS_GLOBAL_HOOK__,!aa.isDisabled&&aa.supportsFiber))try{$a=aa.inject(lE),ui=aa}catch{}var aa;Eh.createRoot=function(e,t){if(!A0(e))throw Error(R(299));var i=!1,s="",r=ay,n=ly,o=cy;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(n=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=wb(e,1,!1,null,null,i,s,null,r,n,o,Tb),e[Eo]=t.current,Lp(e),new qp(t)};Eh.hydrateRoot=function(e,t,i){if(!A0(e))throw Error(R(299));var s=!1,r="",n=ay,o=ly,a=cy,l=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(n=i.onUncaughtError),i.onCaughtError!==void 0&&(o=i.onCaughtError),i.onRecoverableError!==void 0&&(a=i.onRecoverableError),i.formState!==void 0&&(l=i.formState)),t=wb(e,1,!0,t,i??null,s,r,l,n,o,a,Tb),t.context=Sb(null),i=t.current,s=fi(),s=Kf(s),r=vr(s),r.callback=null,yr(i,r,s),i=s,t.current.lanes=i,Wa(t,i),hs(t),e[Eo]=t.current,Lp(e),new Ch(t)};Eh.version="19.3.0"});var Lb=Yi((Z8,Rb)=>{"use strict";function Mb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mb)}catch(e){console.error(e)}}Mb(),Rb.exports=Ab()});var Rx=Yi(xu=>{"use strict";var GR=Symbol.for("react.transitional.element"),YR=Symbol.for("react.fragment");function Mx(e,t,i){var s=null;if(i!==void 0&&(s=""+i),t.key!==void 0&&(s=""+t.key),"key"in t){i={};for(var r in t)r!=="key"&&(i[r]=t[r])}else i=t;return t=i.ref,{$$typeof:GR,type:e,key:s,ref:t!==void 0?t:null,props:i}}xu.Fragment=YR;xu.jsx=Mx;xu.jsxs=Mx});var F=Yi(($B,Lx)=>{"use strict";Lx.exports=Rx()});var Be=H(ri(),1),A2=H(Lb(),1);var Ow=Object.defineProperty,cE=Object.getOwnPropertyDescriptor,hE=(e,t)=>{for(var i in t)Ow(e,i,{get:t[i],enumerable:!0})},Pe=(e,t,i,s)=>{for(var r=s>1?void 0:s?cE(t,i):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&Ow(t,i,r),r},q=(e,t)=>(i,s)=>t(i,s,e),Db="Terminal input",sg={get:()=>Db,set:e=>Db=e},Nb="Too much output to announce, navigate to rows manually to read",rg={get:()=>Nb,set:e=>Nb=e};function uE(e){return e.replace(/\r?\n/g,"\r")}function dE(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function fE(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function pE(e,t,i,s){if(e.stopPropagation(),e.clipboardData){let r=e.clipboardData.getData("text/plain");zw(r,t,i,s)}}function zw(e,t,i,s){e=uE(e),e=dE(e,i.decPrivateModes.bracketedPasteMode&&s.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(e,!0),t.value=""}function Hw(e,t,i){let s=i.getBoundingClientRect(),r=e.clientX-s.left-10,n=e.clientY-s.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${r}px`,t.style.top=`${n}px`,t.style.zIndex="1000",t.focus()}function Bb(e,t,i,s,r){Hw(e,t,i),r&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}function Hr(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Zh(e,t=0,i=e.length){let s="";for(let r=t;r<i;++r){let n=e[r];n>65535?(n-=65536,s+=String.fromCharCode((n>>10)+55296)+String.fromCharCode(n%1024+56320)):s+=String.fromCharCode(n)}return s}var gE=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r=0;if(this._interim){let n=e.charCodeAt(r++);56320<=n&&n<=57343?t[s++]=(this._interim-55296)*1024+n-56320+65536:(t[s++]=this._interim,t[s++]=n),this._interim=0}for(let n=r;n<i;++n){let o=e.charCodeAt(n);if(55296<=o&&o<=56319){if(++n>=i)return this._interim=o,s;let a=e.charCodeAt(n);56320<=a&&a<=57343?t[s++]=(o-55296)*1024+a-56320+65536:(t[s++]=o,t[s++]=a);continue}o!==65279&&(t[s++]=o)}return s}},mE=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r,n,o,a,l=0,c=0;if(this.interim[0]){let d=!1,f=this.interim[0];f&=(f&224)===192?31:(f&240)===224?15:7;let g=0,b;for(;(b=this.interim[++g]&63)&&g<4;)f<<=6,f|=b;let T=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,_=T-g;for(;c<_;){if(c>=i)return 0;if(b=e[c++],(b&192)!==128){c--,d=!0;break}else this.interim[g++]=b,f<<=6,f|=b&63}d||(T===2?f<128?c--:t[s++]=f:T===3?f<2048||f>=55296&&f<=57343||f===65279||(t[s++]=f):f<65536||f>1114111||(t[s++]=f)),this.interim.fill(0)}let h=i-4,u=c;for(;u<i;){for(;u<h&&!((r=e[u])&128)&&!((n=e[u+1])&128)&&!((o=e[u+2])&128)&&!((a=e[u+3])&128);)t[s++]=r,t[s++]=n,t[s++]=o,t[s++]=a,u+=4;if(r=e[u++],r<128)t[s++]=r;else if((r&224)===192){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(l=(r&31)<<6|n&63,l<128){u--;continue}t[s++]=l}else if((r&240)===224){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,s;if(o=e[u++],(o&192)!==128){u--;continue}if(l=(r&15)<<12|(n&63)<<6|o&63,l<2048||l>=55296&&l<=57343||l===65279)continue;t[s++]=l}else if((r&248)===240){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,s;if(o=e[u++],(o&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,this.interim[2]=o,s;if(a=e[u++],(a&192)!==128){u--;continue}if(l=(r&7)<<18|(n&63)<<12|(o&63)<<6|a&63,l<65536||l>1114111)continue;t[s++]=l}}return s}},Uw="",Ur=" ",yl=class Pw{constructor(){this.fg=0,this.bg=0,this.extended=new Fh}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new Pw;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Fh=class qw{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new qw(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Oi=class Iw extends yl{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Fh,this.combinedData=""}static fromCharData(t){let i=new Iw;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Hr(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let r=t[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(s-55296)*1024+r-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Ob="di$target",ng="di$dependencies",Ip=new Map;function _E(e){return e[ng]||[]}function ft(e){if(Ip.has(e))return Ip.get(e);let t=function(i,s,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");vE(t,i,r)};return t._id=e,Ip.set(e,t),t}function vE(e,t,i){t[Ob]===t?t[ng].push({id:e,index:i}):(t[ng]=[{id:e,index:i}],t[Ob]=t)}var $t=ft("BufferService"),Fw=ft("CoreMouseService"),An=ft("CoreService"),yE=ft("CharsetService"),Ig=ft("InstantiationService"),$w=ft("LogService"),Kt=ft("OptionsService"),Kw=ft("OscLinkService"),bE=ft("UnicodeService"),bl=ft("DecorationService"),og=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){let i=this._bufferService.buffer.lines.get(e-1);if(!i){t(void 0);return}let s=[],r=this._optionsService.rawOptions.linkHandler,n=new Oi,o=i.getTrimmedLength(),a=-1,l=-1,c=!1;for(let h=0;h<o;h++)if(!(l===-1&&!i.hasContent(h))){if(i.loadCell(h,n),n.hasExtendedAttrs()&&n.extended.urlId)if(l===-1){l=h,a=n.extended.urlId;continue}else c=n.extended.urlId!==a;else l!==-1&&(c=!0);if(c||l!==-1&&h===o-1){let u=this._oscLinkService.getLinkData(a)?.uri;if(u){let d={start:{x:l+1,y:e},end:{x:h+(!c&&h===o-1?1:0),y:e}},f=!1;if(!r?.allowNonHttpProtocols)try{let g=new URL(u);["http:","https:"].includes(g.protocol)||(f=!0)}catch{f=!0}f||s.push({text:u,range:d,activate:(g,b)=>r?r.activate(g,b,d):wE(g,b),hover:(g,b)=>r?.hover?.(g,b,d),leave:(g,b)=>r?.leave?.(g,b,d)})}c=!1,n.hasExtendedAttrs()&&n.extended.urlId?(l=h,a=n.extended.urlId):(l=-1,a=-1)}}t(s)}};og=Pe([q(0,$t),q(1,Kt),q(2,Kw)],og);function wE(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
11
11
|
|
|
12
12
|
WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){try{i.opener=null}catch{}i.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var Qh=ft("CharSizeService"),Is=ft("CoreBrowserService"),Fg=ft("MouseService"),Fs=ft("RenderService"),SE=ft("SelectionService"),Ww=ft("CharacterJoinerService"),zo=ft("ThemeService"),Vw=ft("LinkProviderService"),kE=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?zb.isErrorNoTelemetry(e)?new zb(e.message+`
|
|
13
13
|
|
|
14
14
|
`+e.stack):new Error(e.message+`
|
|
15
15
|
|
|
16
|
-
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},xE=new kE;function Dh(e){CE(e)||xE.onUnexpectedError(e)}var ag="Canceled";function CE(e){return e instanceof EE?!0:e instanceof Error&&e.name===ag&&e.message===ag}var EE=class extends Error{constructor(){super(ag),this.name=this.message}};function TE(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}var zb=class lg extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof lg)return t;let i=new lg;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},cg=class jw extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,jw.prototype)}};function AE(e,t,i=0,s=e.length){let r=i,n=s;for(;r<n;){let o=Math.floor((r+n)/2);t(e[o])?r=o+1:n=o}return r-1}var ME=class Gw{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(Gw.assertInvariants){if(this._prevFindLastPredicate){for(let s of this._array)if(this._prevFindLastPredicate(s)&&!t(s))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let i=AE(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=i+1,i===-1?void 0:this._array[i]}};ME.assertInvariants=!1;function mi(e,t=0){return e[e.length-(1+t)]}var Yw;(e=>{function t(n){return n<0}e.isLessThan=t;function i(n){return n<=0}e.isLessThanOrEqual=i;function s(n){return n>0}e.isGreaterThan=s;function r(n){return n===0}e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Yw||={});function RE(e,t){return(i,s)=>t(e(i),e(s))}var LE=(e,t)=>e-t,Hb=class hg{constructor(t){this.iterate=t}forEach(t){this.iterate(i=>(t(i),!0))}toArray(){let t=[];return this.iterate(i=>(t.push(i),!0)),t}filter(t){return new hg(i=>this.iterate(s=>t(s)?i(s):!0))}map(t){return new hg(i=>this.iterate(s=>i(t(s))))}some(t){let i=!1;return this.iterate(s=>(i=t(s),!i)),i}findFirst(t){let i;return this.iterate(s=>t(s)?(i=s,!1):!0),i}findLast(t){let i;return this.iterate(s=>(t(s)&&(i=s),!0)),i}findLastMaxBy(t){let i,s=!0;return this.iterate(r=>((s||Yw.isGreaterThan(t(r,i)))&&(s=!1,i=r),!0)),i}};Hb.empty=new Hb(e=>{});function DE(e,t){let i=Object.create(null);for(let s of e){let r=t(s),n=i[r];n||(n=i[r]=[]),n.push(s)}return i}var Ub,Pb,Q8=class{constructor(e,t){this.toKey=t,this._map=new Map,this[Ub]="SetWithKey";for(let i of e)this.add(i)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[(Pb=Symbol.iterator,Ub=Symbol.toStringTag,Pb)](){return this.values()}},NE=class{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){let i=this.map.get(e);i&&(i.delete(t),i.size===0&&this.map.delete(e))}forEach(e,t){let i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}};function BE(e,t){let i=this,s=!1,r;return function(){if(s)return r;if(s=!0,t)try{r=e.apply(i,arguments)}finally{t()}else r=e.apply(i,arguments);return r}}var Xw;(e=>{function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function s(){return i}e.empty=s;function*r(p){yield p}e.single=r;function n(p){return t(p)?p:r(p)}e.wrap=n;function o(p){return p||i}e.from=o;function*a(p){for(let E=p.length-1;E>=0;E--)yield p[E]}e.reverse=a;function l(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(p){return p[Symbol.iterator]().next().value}e.first=c;function h(p,E){let A=0;for(let L of p)if(E(L,A++))return!0;return!1}e.some=h;function u(p,E){for(let A of p)if(E(A))return A}e.find=u;function*d(p,E){for(let A of p)E(A)&&(yield A)}e.filter=d;function*f(p,E){let A=0;for(let L of p)yield E(L,A++)}e.map=f;function*g(p,E){let A=0;for(let L of p)yield*E(L,A++)}e.flatMap=g;function*b(...p){for(let E of p)yield*E}e.concat=b;function T(p,E,A){let L=A;for(let B of p)L=E(L,B);return L}e.reduce=T;function*_(p,E,A=p.length){for(E<0&&(E+=p.length),A<0?A+=p.length:A>p.length&&(A=p.length);E<A;E++)yield p[E]}e.slice=_;function m(p,E=Number.POSITIVE_INFINITY){let A=[];if(E===0)return[A,p];let L=p[Symbol.iterator]();for(let B=0;B<E;B++){let
|
|
16
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},xE=new kE;function Dh(e){CE(e)||xE.onUnexpectedError(e)}var ag="Canceled";function CE(e){return e instanceof EE?!0:e instanceof Error&&e.name===ag&&e.message===ag}var EE=class extends Error{constructor(){super(ag),this.name=this.message}};function TE(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}var zb=class lg extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof lg)return t;let i=new lg;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},cg=class jw extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,jw.prototype)}};function AE(e,t,i=0,s=e.length){let r=i,n=s;for(;r<n;){let o=Math.floor((r+n)/2);t(e[o])?r=o+1:n=o}return r-1}var ME=class Gw{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(Gw.assertInvariants){if(this._prevFindLastPredicate){for(let s of this._array)if(this._prevFindLastPredicate(s)&&!t(s))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let i=AE(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=i+1,i===-1?void 0:this._array[i]}};ME.assertInvariants=!1;function mi(e,t=0){return e[e.length-(1+t)]}var Yw;(e=>{function t(n){return n<0}e.isLessThan=t;function i(n){return n<=0}e.isLessThanOrEqual=i;function s(n){return n>0}e.isGreaterThan=s;function r(n){return n===0}e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Yw||={});function RE(e,t){return(i,s)=>t(e(i),e(s))}var LE=(e,t)=>e-t,Hb=class hg{constructor(t){this.iterate=t}forEach(t){this.iterate(i=>(t(i),!0))}toArray(){let t=[];return this.iterate(i=>(t.push(i),!0)),t}filter(t){return new hg(i=>this.iterate(s=>t(s)?i(s):!0))}map(t){return new hg(i=>this.iterate(s=>i(t(s))))}some(t){let i=!1;return this.iterate(s=>(i=t(s),!i)),i}findFirst(t){let i;return this.iterate(s=>t(s)?(i=s,!1):!0),i}findLast(t){let i;return this.iterate(s=>(t(s)&&(i=s),!0)),i}findLastMaxBy(t){let i,s=!0;return this.iterate(r=>((s||Yw.isGreaterThan(t(r,i)))&&(s=!1,i=r),!0)),i}};Hb.empty=new Hb(e=>{});function DE(e,t){let i=Object.create(null);for(let s of e){let r=t(s),n=i[r];n||(n=i[r]=[]),n.push(s)}return i}var Ub,Pb,Q8=class{constructor(e,t){this.toKey=t,this._map=new Map,this[Ub]="SetWithKey";for(let i of e)this.add(i)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[(Pb=Symbol.iterator,Ub=Symbol.toStringTag,Pb)](){return this.values()}},NE=class{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){let i=this.map.get(e);i&&(i.delete(t),i.size===0&&this.map.delete(e))}forEach(e,t){let i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}};function BE(e,t){let i=this,s=!1,r;return function(){if(s)return r;if(s=!0,t)try{r=e.apply(i,arguments)}finally{t()}else r=e.apply(i,arguments);return r}}var Xw;(e=>{function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function s(){return i}e.empty=s;function*r(p){yield p}e.single=r;function n(p){return t(p)?p:r(p)}e.wrap=n;function o(p){return p||i}e.from=o;function*a(p){for(let E=p.length-1;E>=0;E--)yield p[E]}e.reverse=a;function l(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(p){return p[Symbol.iterator]().next().value}e.first=c;function h(p,E){let A=0;for(let L of p)if(E(L,A++))return!0;return!1}e.some=h;function u(p,E){for(let A of p)if(E(A))return A}e.find=u;function*d(p,E){for(let A of p)E(A)&&(yield A)}e.filter=d;function*f(p,E){let A=0;for(let L of p)yield E(L,A++)}e.map=f;function*g(p,E){let A=0;for(let L of p)yield*E(L,A++)}e.flatMap=g;function*b(...p){for(let E of p)yield*E}e.concat=b;function T(p,E,A){let L=A;for(let B of p)L=E(L,B);return L}e.reduce=T;function*_(p,E,A=p.length){for(E<0&&(E+=p.length),A<0?A+=p.length:A>p.length&&(A=p.length);E<A;E++)yield p[E]}e.slice=_;function m(p,E=Number.POSITIVE_INFINITY){let A=[];if(E===0)return[A,p];let L=p[Symbol.iterator]();for(let B=0;B<E;B++){let W=L.next();if(W.done)return[A,e.empty()];A.push(W.value)}return[A,{[Symbol.iterator](){return L}}]}e.consume=m;async function v(p){let E=[];for await(let A of p)E.push(A);return Promise.resolve(E)}e.asyncToArray=v})(Xw||={});var OE=!1,Cn=null,zE=class Zw{constructor(){this.livingDisposables=new Map}getDisposableData(t){let i=this.livingDisposables.get(t);return i||(i={parent:null,source:null,isSingleton:!1,value:t,idx:Zw.idx++},this.livingDisposables.set(t,i)),i}trackDisposable(t){let i=this.getDisposableData(t);i.source||(i.source=new Error().stack)}setParent(t,i){let s=this.getDisposableData(t);s.parent=i}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,i){let s=i.get(t);if(s)return s;let r=t.parent?this.getRootParent(this.getDisposableData(t.parent),i):t;return i.set(t,r),r}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,i])=>i.source!==null&&!this.getRootParent(i,t).isSingleton).flatMap(([i])=>i)}computeLeakingDisposables(t=10,i){let s;if(i)s=i;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let h=new Set(c.map(u=>u.value));if(s=c.filter(u=>!(u.parent&&h.has(u.parent))),s.length===0)throw new Error("There are cyclic diposable chains!")}if(!s)return;function r(l){function c(u,d){for(;u.length>0&&d.some(f=>typeof f=="string"?f===u[0]:u[0].match(f));)u.shift()}let h=l.source.split(`
|
|
17
17
|
`).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(h,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),h.reverse()}let n=new NE;for(let l of s){let c=r(l);for(let h=0;h<=c.length;h++)n.add(c.slice(0,h).join(`
|
|
18
18
|
`),l)}s.sort(RE(l=>l.idx,LE));let o="",a=0;for(let l of s.slice(0,t)){a++;let c=r(l),h=[];for(let u=0;u<c.length;u++){let d=c[u];d=`(shared with ${n.get(c.slice(0,u+1).join(`
|
|
19
19
|
`)).size}/${s.length} leaks) at ${d}`;let f=n.get(c.slice(0,u).join(`
|
|
@@ -30,23 +30,23 @@ ${h.join(`
|
|
|
30
30
|
|
|
31
31
|
... and ${s.length-t} more leaking disposables
|
|
32
32
|
|
|
33
|
-
`),{leaks:s,details:o}}};zE.idx=0;function HE(e){Cn=e}if(OE){let e="__is_disposable_tracked__";HE(new class{trackDisposable(t){let i=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(i)},3e3)}setParent(t,i){if(t&&t!==X.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==X.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function Jh(e){return Cn?.trackDisposable(e),e}function eu(e){Cn?.markAsDisposed(e)}function gl(e,t){Cn?.setParent(e,t)}function UE(e,t){if(Cn)for(let i of e)Cn.setParent(i,t)}function qb(e){return Cn?.markAsSingleton(e),e}function En(e){if(Xw.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function PE(...e){let t=Ce(()=>En(e));return UE(e,t),t}function Ce(e){let t=Jh({dispose:BE(()=>{eu(t),e()})});return t}var Qw=class Jw{constructor(){this._toDispose=new Set,this._isDisposed=!1,Jh(this)}dispose(){this._isDisposed||(eu(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{En(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return gl(t,this),this._isDisposed?Jw.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),gl(t,null))}};Qw.DISABLE_DISPOSED_WARNING=!1;var Pr=Qw,X=class{constructor(){this._store=new Pr,Jh(this),gl(this._store,this)}dispose(){eu(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};X.None=Object.freeze({dispose(){}});var Oo=class{constructor(){this._isDisposed=!1,Jh(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&gl(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,eu(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&gl(e,null),e}},yi=typeof window=="object"?window:globalThis,ug=class dg{constructor(t){this.element=t,this.next=dg.Undefined,this.prev=dg.Undefined}};ug.Undefined=new ug(void 0);var De=ug,Ib=class{constructor(){this._first=De.Undefined,this._last=De.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===De.Undefined}clear(){let e=this._first;for(;e!==De.Undefined;){let t=e.next;e.prev=De.Undefined,e.next=De.Undefined,e=t}this._first=De.Undefined,this._last=De.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new De(e);if(this._first===De.Undefined)this._first=i,this._last=i;else if(t){let r=this._last;this._last=i,i.prev=r,r.next=i}else{let r=this._first;this._first=i,i.next=r,r.prev=i}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(i))}}shift(){if(this._first!==De.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==De.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==De.Undefined&&e.next!==De.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===De.Undefined&&e.next===De.Undefined?(this._first=De.Undefined,this._last=De.Undefined):e.next===De.Undefined?(this._last=this._last.prev,this._last.next=De.Undefined):e.prev===De.Undefined&&(this._first=this._first.next,this._first.prev=De.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==De.Undefined;)yield e.element,e=e.next}},qE=globalThis.performance&&typeof globalThis.performance.now=="function",IE=class eS{static create(t){return new eS(t)}constructor(t){this._now=qE&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},FE=!1,Fb=!1,$E=!1,Tt;(e=>{e.None=()=>X.None;function t(S){if($E){let{onDidAddListener:y}=S,k=gg.create(),w=0;S.onDidAddListener=()=>{++w===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),k.print()),y?.()}}}function i(S,y){return d(S,()=>{},0,void 0,!0,void 0,y)}e.defer=i;function s(S){return(y,k=null,w)=>{let C=!1,x;return x=S(M=>{if(!C)return x?x.dispose():C=!0,y.call(k,M)},null,w),C&&x.dispose(),x}}e.once=s;function r(S,y,k){return h((w,C=null,x)=>S(M=>w.call(C,y(M)),null,x),k)}e.map=r;function n(S,y,k){return h((w,C=null,x)=>S(M=>{y(M),w.call(C,M)},null,x),k)}e.forEach=n;function o(S,y,k){return h((w,C=null,x)=>S(M=>y(M)&&w.call(C,M),null,x),k)}e.filter=o;function a(S){return S}e.signal=a;function l(...S){return(y,k=null,w)=>{let C=PE(...S.map(x=>x(M=>y.call(k,M))));return u(C,w)}}e.any=l;function c(S,y,k,w){let C=k;return r(S,x=>(C=y(C,x),C),w)}e.reduce=c;function h(S,y){let k,w={onWillAddFirstListener(){k=S(C.fire,C)},onDidRemoveLastListener(){k?.dispose()}};y||t(w);let C=new z(w);return y?.add(C),C.event}function u(S,y){return y instanceof Array?y.push(S):y&&y.add(S),S}function d(S,y,k=100,w=!1,C=!1,x,M){let N,I,ie,Z=0,se,We={leakWarningThreshold:x,onWillAddFirstListener(){N=S(Re=>{Z++,I=y(I,Re),w&&!ie&&(ne.fire(I),I=void 0),se=()=>{let he=I;I=void 0,ie=void 0,(!w||Z>1)&&ne.fire(he),Z=0},typeof k=="number"?(clearTimeout(ie),ie=setTimeout(se,k)):ie===void 0&&(ie=0,queueMicrotask(se))})},onWillRemoveListener(){C&&Z>0&&se?.()},onDidRemoveLastListener(){se=void 0,N.dispose()}};M||t(We);let ne=new z(We);return M?.add(ne),ne.event}e.debounce=d;function f(S,y=0,k){return e.debounce(S,(w,C)=>w?(w.push(C),w):[C],y,void 0,!0,void 0,k)}e.accumulate=f;function g(S,y=(w,C)=>w===C,k){let w=!0,C;return o(S,x=>{let M=w||!y(x,C);return w=!1,C=x,M},k)}e.latch=g;function b(S,y,k){return[e.filter(S,y,k),e.filter(S,w=>!y(w),k)]}e.split=b;function T(S,y=!1,k=[],w){let C=k.slice(),x=S(I=>{C?C.push(I):N.fire(I)});w&&w.add(x);let M=()=>{C?.forEach(I=>N.fire(I)),C=null},N=new z({onWillAddFirstListener(){x||(x=S(I=>N.fire(I)),w&&w.add(x))},onDidAddFirstListener(){C&&(y?setTimeout(M):M())},onDidRemoveLastListener(){x&&x.dispose(),x=null}});return w&&w.add(N),N.event}e.buffer=T;function _(S,y){return(k,w,C)=>{let x=y(new v);return S(function(M){let N=x.evaluate(M);N!==m&&k.call(w,N)},void 0,C)}}e.chain=_;let m=Symbol("HaltChainable");class v{constructor(){this.steps=[]}map(y){return this.steps.push(y),this}forEach(y){return this.steps.push(k=>(y(k),k)),this}filter(y){return this.steps.push(k=>y(k)?k:m),this}reduce(y,k){let w=k;return this.steps.push(C=>(w=y(w,C),w)),this}latch(y=(k,w)=>k===w){let k=!0,w;return this.steps.push(C=>{let x=k||!y(C,w);return k=!1,w=C,x?C:m}),this}evaluate(y){for(let k of this.steps)if(y=k(y),y===m)break;return y}}function p(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.on(y,w),x=()=>S.removeListener(y,w),M=new z({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromNodeEventEmitter=p;function E(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.addEventListener(y,w),x=()=>S.removeEventListener(y,w),M=new z({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromDOMEventEmitter=E;function A(S){return new Promise(y=>s(S)(y))}e.toPromise=A;function L(S){let y=new z;return S.then(k=>{y.fire(k)},()=>{y.fire(void 0)}).finally(()=>{y.dispose()}),y.event}e.fromPromise=L;function B(S,y){return S(k=>y.fire(k))}e.forward=B;function K(S,y,k){return y(k),S(w=>y(w))}e.runAndSubscribe=K;class ${constructor(y,k){this._observable=y,this._counter=0,this._hasChanged=!1;let w={onWillAddFirstListener:()=>{y.addObserver(this)},onDidRemoveLastListener:()=>{y.removeObserver(this)}};k||t(w),this.emitter=new z(w),k&&k.add(this.emitter)}beginUpdate(y){this._counter++}handlePossibleChange(y){}handleChange(y,k){this._hasChanged=!0}endUpdate(y){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function P(S,y){return new $(S,y).emitter.event}e.fromObservable=P;function Rt(S){return(y,k,w)=>{let C=0,x=!1,M={beginUpdate(){C++},endUpdate(){C--,C===0&&(S.reportChanges(),x&&(x=!1,y.call(k)))},handlePossibleChange(){},handleChange(){x=!0}};S.addObserver(M),S.reportChanges();let N={dispose(){S.removeObserver(M)}};return w instanceof Pr?w.add(N):Array.isArray(w)&&w.push(N),N}}e.fromObservableLight=Rt})(Tt||={});var fg=class pg{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${pg._idPool++}`,pg.all.add(this)}start(t){this._stopWatch=new IE,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};fg.all=new Set,fg._idPool=0;var KE=fg,$b=-1,tS=class iS{constructor(t,i,s=(iS._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=s,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,i){let s=this.threshold;if(s<=0||i<s)return;this._stacks||(this._stacks=new Map);let r=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let[n,o]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${o}):`;console.warn(a),console.warn(n);let l=new VE(a,n);this._errorHandler(l)}return()=>{let n=this._stacks.get(t.value)||0;this._stacks.set(t.value,n-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[s,r]of this._stacks)(!t||i<r)&&(t=[s,r],i=r);return t}};tS._idPool=1;var WE=tS,gg=class sS{constructor(t){this.value=t}static create(){let t=new Error;return new sS(t.stack??"")}print(){console.warn(this.value.split(`
|
|
33
|
+
`),{leaks:s,details:o}}};zE.idx=0;function HE(e){Cn=e}if(OE){let e="__is_disposable_tracked__";HE(new class{trackDisposable(t){let i=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(i)},3e3)}setParent(t,i){if(t&&t!==X.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==X.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function Jh(e){return Cn?.trackDisposable(e),e}function eu(e){Cn?.markAsDisposed(e)}function gl(e,t){Cn?.setParent(e,t)}function UE(e,t){if(Cn)for(let i of e)Cn.setParent(i,t)}function qb(e){return Cn?.markAsSingleton(e),e}function En(e){if(Xw.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function PE(...e){let t=Ce(()=>En(e));return UE(e,t),t}function Ce(e){let t=Jh({dispose:BE(()=>{eu(t),e()})});return t}var Qw=class Jw{constructor(){this._toDispose=new Set,this._isDisposed=!1,Jh(this)}dispose(){this._isDisposed||(eu(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{En(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return gl(t,this),this._isDisposed?Jw.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),gl(t,null))}};Qw.DISABLE_DISPOSED_WARNING=!1;var Pr=Qw,X=class{constructor(){this._store=new Pr,Jh(this),gl(this._store,this)}dispose(){eu(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};X.None=Object.freeze({dispose(){}});var Oo=class{constructor(){this._isDisposed=!1,Jh(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&gl(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,eu(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&gl(e,null),e}},yi=typeof window=="object"?window:globalThis,ug=class dg{constructor(t){this.element=t,this.next=dg.Undefined,this.prev=dg.Undefined}};ug.Undefined=new ug(void 0);var De=ug,Ib=class{constructor(){this._first=De.Undefined,this._last=De.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===De.Undefined}clear(){let e=this._first;for(;e!==De.Undefined;){let t=e.next;e.prev=De.Undefined,e.next=De.Undefined,e=t}this._first=De.Undefined,this._last=De.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new De(e);if(this._first===De.Undefined)this._first=i,this._last=i;else if(t){let r=this._last;this._last=i,i.prev=r,r.next=i}else{let r=this._first;this._first=i,i.next=r,r.prev=i}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(i))}}shift(){if(this._first!==De.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==De.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==De.Undefined&&e.next!==De.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===De.Undefined&&e.next===De.Undefined?(this._first=De.Undefined,this._last=De.Undefined):e.next===De.Undefined?(this._last=this._last.prev,this._last.next=De.Undefined):e.prev===De.Undefined&&(this._first=this._first.next,this._first.prev=De.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==De.Undefined;)yield e.element,e=e.next}},qE=globalThis.performance&&typeof globalThis.performance.now=="function",IE=class eS{static create(t){return new eS(t)}constructor(t){this._now=qE&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},FE=!1,Fb=!1,$E=!1,Tt;(e=>{e.None=()=>X.None;function t(S){if($E){let{onDidAddListener:y}=S,k=gg.create(),w=0;S.onDidAddListener=()=>{++w===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),k.print()),y?.()}}}function i(S,y){return d(S,()=>{},0,void 0,!0,void 0,y)}e.defer=i;function s(S){return(y,k=null,w)=>{let C=!1,x;return x=S(M=>{if(!C)return x?x.dispose():C=!0,y.call(k,M)},null,w),C&&x.dispose(),x}}e.once=s;function r(S,y,k){return h((w,C=null,x)=>S(M=>w.call(C,y(M)),null,x),k)}e.map=r;function n(S,y,k){return h((w,C=null,x)=>S(M=>{y(M),w.call(C,M)},null,x),k)}e.forEach=n;function o(S,y,k){return h((w,C=null,x)=>S(M=>y(M)&&w.call(C,M),null,x),k)}e.filter=o;function a(S){return S}e.signal=a;function l(...S){return(y,k=null,w)=>{let C=PE(...S.map(x=>x(M=>y.call(k,M))));return u(C,w)}}e.any=l;function c(S,y,k,w){let C=k;return r(S,x=>(C=y(C,x),C),w)}e.reduce=c;function h(S,y){let k,w={onWillAddFirstListener(){k=S(C.fire,C)},onDidRemoveLastListener(){k?.dispose()}};y||t(w);let C=new z(w);return y?.add(C),C.event}function u(S,y){return y instanceof Array?y.push(S):y&&y.add(S),S}function d(S,y,k=100,w=!1,C=!1,x,M){let N,I,ie,Z=0,se,We={leakWarningThreshold:x,onWillAddFirstListener(){N=S(Re=>{Z++,I=y(I,Re),w&&!ie&&(ne.fire(I),I=void 0),se=()=>{let he=I;I=void 0,ie=void 0,(!w||Z>1)&&ne.fire(he),Z=0},typeof k=="number"?(clearTimeout(ie),ie=setTimeout(se,k)):ie===void 0&&(ie=0,queueMicrotask(se))})},onWillRemoveListener(){C&&Z>0&&se?.()},onDidRemoveLastListener(){se=void 0,N.dispose()}};M||t(We);let ne=new z(We);return M?.add(ne),ne.event}e.debounce=d;function f(S,y=0,k){return e.debounce(S,(w,C)=>w?(w.push(C),w):[C],y,void 0,!0,void 0,k)}e.accumulate=f;function g(S,y=(w,C)=>w===C,k){let w=!0,C;return o(S,x=>{let M=w||!y(x,C);return w=!1,C=x,M},k)}e.latch=g;function b(S,y,k){return[e.filter(S,y,k),e.filter(S,w=>!y(w),k)]}e.split=b;function T(S,y=!1,k=[],w){let C=k.slice(),x=S(I=>{C?C.push(I):N.fire(I)});w&&w.add(x);let M=()=>{C?.forEach(I=>N.fire(I)),C=null},N=new z({onWillAddFirstListener(){x||(x=S(I=>N.fire(I)),w&&w.add(x))},onDidAddFirstListener(){C&&(y?setTimeout(M):M())},onDidRemoveLastListener(){x&&x.dispose(),x=null}});return w&&w.add(N),N.event}e.buffer=T;function _(S,y){return(k,w,C)=>{let x=y(new v);return S(function(M){let N=x.evaluate(M);N!==m&&k.call(w,N)},void 0,C)}}e.chain=_;let m=Symbol("HaltChainable");class v{constructor(){this.steps=[]}map(y){return this.steps.push(y),this}forEach(y){return this.steps.push(k=>(y(k),k)),this}filter(y){return this.steps.push(k=>y(k)?k:m),this}reduce(y,k){let w=k;return this.steps.push(C=>(w=y(w,C),w)),this}latch(y=(k,w)=>k===w){let k=!0,w;return this.steps.push(C=>{let x=k||!y(C,w);return k=!1,w=C,x?C:m}),this}evaluate(y){for(let k of this.steps)if(y=k(y),y===m)break;return y}}function p(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.on(y,w),x=()=>S.removeListener(y,w),M=new z({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromNodeEventEmitter=p;function E(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.addEventListener(y,w),x=()=>S.removeEventListener(y,w),M=new z({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromDOMEventEmitter=E;function A(S){return new Promise(y=>s(S)(y))}e.toPromise=A;function L(S){let y=new z;return S.then(k=>{y.fire(k)},()=>{y.fire(void 0)}).finally(()=>{y.dispose()}),y.event}e.fromPromise=L;function B(S,y){return S(k=>y.fire(k))}e.forward=B;function W(S,y,k){return y(k),S(w=>y(w))}e.runAndSubscribe=W;class ${constructor(y,k){this._observable=y,this._counter=0,this._hasChanged=!1;let w={onWillAddFirstListener:()=>{y.addObserver(this)},onDidRemoveLastListener:()=>{y.removeObserver(this)}};k||t(w),this.emitter=new z(w),k&&k.add(this.emitter)}beginUpdate(y){this._counter++}handlePossibleChange(y){}handleChange(y,k){this._hasChanged=!0}endUpdate(y){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function P(S,y){return new $(S,y).emitter.event}e.fromObservable=P;function Rt(S){return(y,k,w)=>{let C=0,x=!1,M={beginUpdate(){C++},endUpdate(){C--,C===0&&(S.reportChanges(),x&&(x=!1,y.call(k)))},handlePossibleChange(){},handleChange(){x=!0}};S.addObserver(M),S.reportChanges();let N={dispose(){S.removeObserver(M)}};return w instanceof Pr?w.add(N):Array.isArray(w)&&w.push(N),N}}e.fromObservableLight=Rt})(Tt||={});var fg=class pg{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${pg._idPool++}`,pg.all.add(this)}start(t){this._stopWatch=new IE,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};fg.all=new Set,fg._idPool=0;var KE=fg,$b=-1,tS=class iS{constructor(t,i,s=(iS._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=s,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,i){let s=this.threshold;if(s<=0||i<s)return;this._stacks||(this._stacks=new Map);let r=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let[n,o]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${o}):`;console.warn(a),console.warn(n);let l=new VE(a,n);this._errorHandler(l)}return()=>{let n=this._stacks.get(t.value)||0;this._stacks.set(t.value,n-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[s,r]of this._stacks)(!t||i<r)&&(t=[s,r],i=r);return t}};tS._idPool=1;var WE=tS,gg=class sS{constructor(t){this.value=t}static create(){let t=new Error;return new sS(t.stack??"")}print(){console.warn(this.value.split(`
|
|
34
34
|
`).slice(2).join(`
|
|
35
35
|
`))}},VE=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},jE=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},GE=0,Nh=class{constructor(e){this.value=e,this.id=GE++}},YE=2,XE=(e,t)=>{if(e instanceof Nh)t(e);else for(let i=0;i<e.length;i++){let s=e[i];s&&t(s)}},Bh;if(FE){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
|
|
36
36
|
`)),e.length=0)},3e3),Bh=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var z=class{constructor(e){this._size=0,this._options=e,this._leakageMon=$b>0||this._options?.leakWarningThreshold?new WE(e?.onListenerError??Dh,this._options?.leakWarningThreshold??$b):void 0,this._perfMon=this._options?._profName?new KE(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(Fb){let e=this._listeners;queueMicrotask(()=>{XE(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new jE(`${a}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Dh)(c),X.None}if(this._disposed)return X.None;t&&(e=e.bind(t));let s=new Nh(e),r,n;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=gg.create(),r=this._leakageMon.check(s.stack,this._size+1)),Fb&&(s.stack=n??gg.create()),this._listeners?this._listeners instanceof Nh?(this._deliveryQueue??=new ZE,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;let o=Ce(()=>{Bh?.unregister(o),r?.(),this._removeListener(s)});if(i instanceof Pr?i.add(o):Array.isArray(i)&&i.push(o),Bh){let a=new Error().stack.split(`
|
|
37
37
|
`).slice(2,3).join(`
|
|
38
|
-
`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(a);Bh.register(o,l?.[2]??a,o)}return o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let s=this._deliveryQueue.current===this;if(this._size*YE<=t.length){let r=0;for(let n=0;n<t.length;n++)t[n]?t[r++]=t[n]:s&&(this._deliveryQueue.end--,r<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=r}}_deliver(e,t){if(!e)return;let i=this._options?.onListenerError||Dh;if(!i){e.value(t);return}try{e.value(t)}catch(s){i(s)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Nh)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},ZE=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},mg=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new z,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new z,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,i){if(this.getZoomLevel(i)===t)return;let s=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(s,t),this._onDidChangeZoomLevel.fire(s)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),t)}setFullscreen(t,i){if(this.isFullscreen(i)===t)return;let s=this.getWindowId(i);this.mapWindowIdToFullScreen.set(s,t),this._onDidChangeFullscreen.fire(s)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};mg.INSTANCE=new mg;var $g=mg;function QE(e,t,i){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",i)}var eL=$g.INSTANCE.onDidChangeZoomLevel;function JE(e){return $g.INSTANCE.getZoomFactor(e)}var tL=$g.INSTANCE.onDidChangeFullscreen,Ho=typeof navigator=="object"?navigator.userAgent:"",_g=Ho.indexOf("Firefox")>=0,Oh=Ho.indexOf("AppleWebKit")>=0,Kg=Ho.indexOf("Chrome")>=0,rS=!Kg&&Ho.indexOf("Safari")>=0,iL=Ho.indexOf("Electron/")>=0,sL=Ho.indexOf("Android")>=0,zh=!1;if(typeof yi.matchMedia=="function"){let e=yi.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=yi.matchMedia("(display-mode: fullscreen)");zh=e.matches,QE(yi,e,({matches:i})=>{zh&&t.matches||(zh=i)})}function e6(){return zh}var Bo="en",$h=!1,Kh=!1,fl=!1,t6=!1,nS=!1,oS=!1,i6=!1,s6=!1,r6=!1,n6=!1,Th,Hh=Bo,Kb=Bo,o6,Us,qs=globalThis,vi;typeof qs.vscode<"u"&&typeof qs.vscode.process<"u"?vi=qs.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(vi=process);var aS=typeof vi?.versions?.electron=="string",a6=aS&&vi?.type==="renderer";if(typeof vi=="object"){$h=vi.platform==="win32",Kh=vi.platform==="darwin",fl=vi.platform==="linux",t6=fl&&!!vi.env.SNAP&&!!vi.env.SNAP_REVISION,i6=aS,r6=!!vi.env.CI||!!vi.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Th=Bo,Hh=Bo;let e=vi.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Th=t.userLocale,Kb=t.osLocale,Hh=t.resolvedLanguage||Bo,o6=t.languagePack?.translationsConfigFile}catch{}nS=!0}else typeof navigator=="object"&&!a6?(Us=navigator.userAgent,$h=Us.indexOf("Windows")>=0,Kh=Us.indexOf("Macintosh")>=0,s6=(Us.indexOf("Macintosh")>=0||Us.indexOf("iPad")>=0||Us.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,fl=Us.indexOf("Linux")>=0,n6=Us?.indexOf("Mobi")>=0,oS=!0,Hh=globalThis._VSCODE_NLS_LANGUAGE||Bo,Th=navigator.language.toLowerCase(),Kb=Th):console.error("Unable to resolve platform.");var Fp=0;Kh?Fp=1:$h?Fp=3:fl&&(Fp=2);var lS=$h,ps=Kh,l6=fl,$p=nS,c6=oS&&typeof qs.importScripts=="function",rL=c6?qs.origin:void 0,gs=Us,Nr=Hh,h6;(e=>{function t(){return Nr}e.value=t;function i(){return Nr.length===2?Nr==="en":Nr.length>=3?Nr[0]==="e"&&Nr[1]==="n"&&Nr[2]==="-":!1}e.isDefaultVariant=i;function s(){return Nr==="en"}e.isDefault=s})(h6||={});var u6=typeof qs.postMessage=="function"&&!qs.importScripts,d6=(()=>{if(u6){let e=[];qs.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let s=0,r=e.length;s<r;s++){let n=e[s];if(n.id===i.data.vscodeScheduleAsyncWork){e.splice(s,1),n.callback();return}}});let t=0;return i=>{let s=++t;e.push({id:s,callback:i}),qs.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})(),f6=!!(gs&&gs.indexOf("Chrome")>=0),nL=!!(gs&&gs.indexOf("Firefox")>=0),oL=!!(!f6&&gs&&gs.indexOf("Safari")>=0),aL=!!(gs&&gs.indexOf("Edg/")>=0),lL=!!(gs&&gs.indexOf("Android")>=0),Br=typeof navigator=="object"?navigator:{},cL={clipboard:{writeText:$p||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(Br&&Br.clipboard&&Br.clipboard.writeText),readText:$p||!!(Br&&Br.clipboard&&Br.clipboard.readText)},keyboard:$p||e6()?0:Br.keyboard||rS?1:2,touch:"ontouchstart"in yi||Br.maxTouchPoints>0,pointerEvents:yi.PointerEvent&&("ontouchstart"in yi||navigator.maxTouchPoints>0)},Wg=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Kp=new Wg,Wb=new Wg,Vb=new Wg,p6=new Array(230),cS;(e=>{function t(a){return Kp.keyCodeToStr(a)}e.toString=t;function i(a){return Kp.strToKeyCode(a)}e.fromString=i;function s(a){return Wb.keyCodeToStr(a)}e.toUserSettingsUS=s;function r(a){return Vb.keyCodeToStr(a)}e.toUserSettingsGeneral=r;function n(a){return Wb.strToKeyCode(a)||Vb.strToKeyCode(a)}e.fromUserSettings=n;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Kp.keyCodeToStr(a)}e.toElectronAccelerator=o})(cS||={});var g6=class hS{constructor(t,i,s,r,n){this.ctrlKey=t,this.shiftKey=i,this.altKey=s,this.metaKey=r,this.keyCode=n}equals(t){return t instanceof hS&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",i=this.shiftKey?"1":"0",s=this.altKey?"1":"0",r=this.metaKey?"1":"0";return`K${t}${i}${s}${r}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new m6([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},m6=class{constructor(e){if(e.length===0)throw TE("chords");this.chords=e}getHashCode(){let e="";for(let t=0,i=this.chords.length;t<i;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function _6(e){if(e.charCode){let i=String.fromCharCode(e.charCode).toUpperCase();return cS.fromString(i)}let t=e.keyCode;if(t===3)return 7;if(_g)switch(t){case 59:return 85;case 60:if(l6)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(ps)return 57;break}else if(Oh&&(ps&&t===93||!ps&&t===92))return 57;return p6[t]||0}var v6=ps?256:2048,y6=512,b6=1024,w6=ps?2048:256,vg=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=_6(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=v6),this.altKey&&(t|=y6),this.shiftKey&&(t|=b6),this.metaKey&&(t|=w6),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new g6(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},jb=new WeakMap;function S6(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if(t.origin!=="null"&&i.origin!=="null"&&t.origin!==i.origin)return null}catch{return null}return e.parent}var k6=class{static getSameOriginWindowChain(e){let t=jb.get(e);if(!t){t=[],jb.set(e,t);let i=e,s;do s=S6(i),s?t.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):t.push({window:new WeakRef(i),iframeElement:null}),i=s;while(i)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,s=0,r=this.getSameOriginWindowChain(e);for(let n of r){let o=n.window.deref();if(i+=o?.scrollY??0,s+=o?.scrollX??0,o===t||!n.iframeElement)break;let a=n.iframeElement.getBoundingClientRect();i+=a.top,s+=a.left}return{top:i,left:s}}},al=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let i=k6.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},Gb=class{constructor(e,t=0,i=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let s=!1;if(Kg){let r=navigator.userAgent.match(/Chrome\/(\d+)/);s=(r?parseInt(r[1]):123)<=122}if(e){let r=e,n=e,o=e.view?.devicePixelRatio||1;if(typeof r.wheelDeltaY<"u")s?this.deltaY=r.wheelDeltaY/(120*o):this.deltaY=r.wheelDeltaY/120;else if(typeof n.VERTICAL_AXIS<"u"&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if(e.type==="wheel"){let a=e;a.deltaMode===a.DOM_DELTA_LINE?_g&&!ps?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof r.wheelDeltaX<"u")rS&&lS?this.deltaX=-(r.wheelDeltaX/120):s?this.deltaX=r.wheelDeltaX/(120*o):this.deltaX=r.wheelDeltaX/120;else if(typeof n.HORIZONTAL_AXIS<"u"&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let a=e;a.deltaMode===a.DOM_DELTA_LINE?_g&&!ps?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(s?this.deltaY=e.wheelDelta/(120*o):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},uS=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}),x6;(e=>{function t(i){return i===e.None||i===e.Cancelled||i instanceof C6?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Tt.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:uS})})(x6||={});var C6=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?uS:(this._emitter||(this._emitter=new z),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var Vg=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new cg("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new cg("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},E6=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new cg("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let s=i.setInterval(()=>{e()},t);this.disposable=Ce(()=>{i.clearInterval(s),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},T6,Wp;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?Wp=(e,t)=>{d6(()=>{if(i)return;let s=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:Wp=(e,t,i)=>{let s=e.requestIdleCallback(t,typeof i=="number"?{timeout:i}:void 0),r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(s))}}},T6=e=>Wp(globalThis,e)})();var A6;(e=>{async function t(s){let r,n=await Promise.all(s.map(o=>o.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return n}e.settled=t;function i(s){return new Promise(async(r,n)=>{try{await s(r,n)}catch(o){n(o)}})}e.withAsyncBody=i})(A6||={});var Yb=class Ni{static fromArray(t){return new Ni(i=>{i.emitMany(t)})}static fromPromise(t){return new Ni(async i=>{i.emitMany(await t)})}static fromPromises(t){return new Ni(async i=>{await Promise.all(t.map(async s=>i.emitOne(await s)))})}static merge(t){return new Ni(async i=>{await Promise.all(t.map(async s=>{for await(let r of s)i.emitOne(r)}))})}constructor(t,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new z,queueMicrotask(async()=>{let s={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(t(s)),this.resolve()}catch(r){this.reject(r)}finally{s.emitOne=void 0,s.emitMany=void 0,s.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Tt.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new Ni(async s=>{for await(let r of t)s.emitOne(i(r))})}map(t){return Ni.map(this,t)}static filter(t,i){return new Ni(async s=>{for await(let r of t)i(r)&&s.emitOne(r)})}filter(t){return Ni.filter(this,t)}static coalesce(t){return Ni.filter(t,i=>!!i)}coalesce(){return Ni.coalesce(this)}static async toPromise(t){let i=[];for await(let s of t)i.push(s);return i}toPromise(){return Ni.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};Yb.EMPTY=Yb.fromArray([]);function M6(e){return 55296<=e&&e<=56319}function Xb(e){return 56320<=e&&e<=57343}function R6(e,t){return(e-55296<<10)+(t-56320)+65536}function L6(e){return jg(e,0)}function jg(e,t){switch(typeof e){case"object":return e===null?Ps(349,t):Array.isArray(e)?N6(e,t):B6(e,t);case"string":return dS(e,t);case"boolean":return D6(e,t);case"number":return Ps(e,t);case"undefined":return Ps(937,t);default:return Ps(617,t)}}function Ps(e,t){return(t<<5)-t+e|0}function D6(e,t){return Ps(e?433:863,t)}function dS(e,t){t=Ps(149417,t);for(let i=0,s=e.length;i<s;i++)t=Ps(e.charCodeAt(i),t);return t}function N6(e,t){return t=Ps(104579,t),e.reduce((i,s)=>jg(s,i),t)}function B6(e,t){return t=Ps(181387,t),Object.keys(e).sort().reduce((i,s)=>(i=dS(s,i),jg(e[s],i)),t)}function Vp(e,t,i=32){let s=i-t,r=~((1<<s)-1);return(e<<t|(r&e)>>>s)>>>0}function Zb(e,t=0,i=e.byteLength,s=0){for(let r=0;r<i;r++)e[t+r]=s}function O6(e,t,i="0"){for(;e.length<t;)e=i+e;return e}function el(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(i=>i.toString(16).padStart(2,"0")).join(""):O6((e>>>0).toString(16),t/4)}var z6=class fS{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let i=t.length;if(i===0)return;let s=this._buff,r=this._buffLen,n=this._leftoverHighSurrogate,o,a;for(n!==0?(o=n,a=-1,n=0):(o=t.charCodeAt(0),a=0);;){let l=o;if(M6(o))if(a+1<i){let c=t.charCodeAt(a+1);Xb(c)?(a++,l=R6(o,c)):l=65533}else{n=o;break}else Xb(o)&&(l=65533);if(r=this._push(s,r,l),a++,a<i)o=t.charCodeAt(a);else break}this._buffLen=r,this._leftoverHighSurrogate=n}_push(t,i,s){return s<128?t[i++]=s:s<2048?(t[i++]=192|(s&1984)>>>6,t[i++]=128|(s&63)>>>0):s<65536?(t[i++]=224|(s&61440)>>>12,t[i++]=128|(s&4032)>>>6,t[i++]=128|(s&63)>>>0):(t[i++]=240|(s&1835008)>>>18,t[i++]=128|(s&258048)>>>12,t[i++]=128|(s&4032)>>>6,t[i++]=128|(s&63)>>>0),i>=64&&(this._step(),i-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),i}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),el(this._h0)+el(this._h1)+el(this._h2)+el(this._h3)+el(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Zb(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Zb(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=fS._bigBlock32,i=this._buffDV;for(let u=0;u<64;u+=4)t.setUint32(u,i.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)t.setUint32(u,Vp(t.getUint32(u-12,!1)^t.getUint32(u-32,!1)^t.getUint32(u-56,!1)^t.getUint32(u-64,!1),1),!1);let s=this._h0,r=this._h1,n=this._h2,o=this._h3,a=this._h4,l,c,h;for(let u=0;u<80;u++)u<20?(l=r&n|~r&o,c=1518500249):u<40?(l=r^n^o,c=1859775393):u<60?(l=r&n|r&o|n&o,c=2400959708):(l=r^n^o,c=3395469782),h=Vp(s,5)+l+a+c+t.getUint32(u*4,!1)&4294967295,a=o,o=n,n=Vp(r,30),r=s,s=h;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+n&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}};z6._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:hL,getWindow:Wi,getDocument:uL,getWindows:dL,getWindowsCount:fL,getWindowId:Qb,getWindowById:pL,hasWindow:gL,onDidRegisterWindow:H6,onWillUnregisterWindow:mL,onDidUnregisterWindow:_L}=(function(){let e=new Map,t={window:yi,disposables:new Pr};e.set(yi.vscodeWindowId,t);let i=new z,s=new z,r=new z;function n(o,a){return(typeof o=="number"?e.get(o):void 0)??(a?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:r.event,onDidUnregisterWindow:s.event,registerWindow(o){if(e.has(o.vscodeWindowId))return X.None;let a=new Pr,l={window:o,disposables:a.add(new Pr)};return e.set(o.vscodeWindowId,l),a.add(Ce(()=>{e.delete(o.vscodeWindowId),s.fire(o)})),a.add(V(o,ct.BEFORE_UNLOAD,()=>{r.fire(o)})),i.fire(l),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(o){return o.vscodeWindowId},hasWindow(o){return e.has(o)},getWindowById:n,getWindow(o){let a=o;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let l=o;return l?.view?l.view.window:yi},getDocument(o){return Wi(o).document}}})(),U6=class{constructor(e,t,i,s){this._node=e,this._type=t,this._handler=i,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function V(e,t,i,s){return new U6(e,t,i,s)}function P6(e,t){return function(i){return t(new al(e,i))}}function q6(e){return function(t){return e(new vg(t))}}var Jb=function(e,t,i,s){let r=i;return t==="click"||t==="mousedown"||t==="contextmenu"?r=P6(Wi(e),i):(t==="keydown"||t==="keypress"||t==="keyup")&&(r=q6(i)),V(e,t,r,s)},I6,Wh,F6=class extends E6{constructor(e){super(),this.defaultTarget=e&&Wi(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}},jp=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Dh(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,i=new Map,s=new Map,r=n=>{i.set(n,!1);let o=e.get(n)??[];for(t.set(n,o),e.set(n,[]),s.set(n,!0);o.length>0;)o.sort(jp.sort),o.shift().execute();s.set(n,!1)};Wh=(n,o,a=0)=>{let l=Qb(n),c=new jp(o,a),h=e.get(l);return h||(h=[],e.set(l,h)),h.push(c),i.get(l)||(i.set(l,!0),n.requestAnimationFrame(()=>r(l))),c},I6=(n,o,a)=>{let l=Qb(n);if(s.get(l)){let c=new jp(o,a),h=t.get(l);return h||(h=[],t.set(l,h)),h.push(c),c}else return Wh(n,o,a)}})();var ew=class Uh{constructor(t,i){this.width=t,this.height=i}with(t=this.width,i=this.height){return t!==this.width||i!==this.height?new Uh(t,i):this}static is(t){return typeof t=="object"&&typeof t.height=="number"&&typeof t.width=="number"}static lift(t){return t instanceof Uh?t:new Uh(t.width,t.height)}static equals(t,i){return t===i?!0:!t||!i?!1:t.width===i.width&&t.height===i.height}};ew.None=new ew(0,0);function $6(e){let t=e.getBoundingClientRect(),i=Wi(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}var vL=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let s=this.mutationObservers.get(e);s||(s=new Map,this.mutationObservers.set(e,s));let r=L6(i),n=s.get(r);if(n)n.users+=1;else{let o=new z,a=new MutationObserver(c=>o.fire(c));a.observe(e,i);let l=n={users:1,observer:a,onDidMutate:o.event};t.add(Ce(()=>{l.users-=1,l.users===0&&(o.dispose(),a.disconnect(),s?.delete(r),s?.size===0&&this.mutationObservers.delete(e))})),s.set(r,n)}return n.onDidMutate}},ct={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:Oh?"webkitAnimationStart":"animationstart",ANIMATION_END:Oh?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Oh?"webkitAnimationIteration":"animationiteration"},K6=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function pS(e,t,i,...s){let r=K6.exec(t);if(!r)throw new Error("Bad use of emmet");let n=r[1]||"div",o;return e!=="http://www.w3.org/1999/xhtml"?o=document.createElementNS(e,n):o=document.createElement(n),r[3]&&(o.id=r[3]),r[4]&&(o.className=r[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?o[a]=l:a==="selected"?l&&o.setAttribute(a,"true"):o.setAttribute(a,l))}),o.append(...s),o}function W6(e,t,...i){return pS("http://www.w3.org/1999/xhtml",e,t,...i)}W6.SVG=function(e,t,...i){return pS("http://www.w3.org/2000/svg",e,t,...i)};var V6=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=ti(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=ti(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=ti(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=ti(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=ti(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=ti(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=ti(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=ti(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=ti(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=ti(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=ti(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=ti(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=ti(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=ti(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function ti(e){return typeof e=="number"?`${e}px`:e}function pl(e){return new V6(e)}var gS=class{constructor(){this._hooks=new Pr,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,s,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=r;let n=e;try{e.setPointerCapture(t),this._hooks.add(Ce(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{n=Wi(e)}this._hooks.add(V(n,ct.POINTER_MOVE,o=>{if(o.buttons!==i){this.stopMonitoring(!0);return}o.preventDefault(),this._pointerMoveCallback(o)})),this._hooks.add(V(n,ct.POINTER_UP,o=>this.stopMonitoring(!0)))}};function j6(e,t,i){let s=null,r=null;if(typeof i.value=="function"?(s="value",r=i.value,r.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof i.get=="function"&&(s="get",r=i.get),!r)throw new Error("not supported");let n=`$memoize$${t}`;i[s]=function(...o){return this.hasOwnProperty(n)||Object.defineProperty(this,n,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,o)}),this[n]}}var fs;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(fs||={});var ll=class Bt extends X{constructor(){super(),this.dispatched=!1,this.targets=new Ib,this.ignoreTargets=new Ib,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Tt.runAndSubscribe(H6,({window:t,disposables:i})=>{i.add(V(t.document,"touchstart",s=>this.onTouchStart(s),{passive:!1})),i.add(V(t.document,"touchend",s=>this.onTouchEnd(t,s))),i.add(V(t.document,"touchmove",s=>this.onTouchMove(s),{passive:!1}))},{window:yi,disposables:this._store}))}static addTarget(t){if(!Bt.isTouchDevice())return X.None;Bt.INSTANCE||(Bt.INSTANCE=qb(new Bt));let i=Bt.INSTANCE.targets.push(t);return Ce(i)}static ignoreTarget(t){if(!Bt.isTouchDevice())return X.None;Bt.INSTANCE||(Bt.INSTANCE=qb(new Bt));let i=Bt.INSTANCE.ignoreTargets.push(t);return Ce(i)}static isTouchDevice(){return"ontouchstart"in yi||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let i=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let s=0,r=t.targetTouches.length;s<r;s++){let n=t.targetTouches.item(s);this.activeTouches[n.identifier]={id:n.identifier,initialTarget:n.target,initialTimeStamp:i,initialPageX:n.pageX,initialPageY:n.pageY,rollingTimestamps:[i],rollingPageX:[n.pageX],rollingPageY:[n.pageY]};let o=this.newGestureEvent(fs.Start,n.target);o.pageX=n.pageX,o.pageY=n.pageY,this.dispatchEvent(o)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,i){let s=Date.now(),r=Object.keys(this.activeTouches).length;for(let n=0,o=i.changedTouches.length;n<o;n++){let a=i.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(a.identifier))){console.warn("move of an UNKNOWN touch",a);continue}let l=this.activeTouches[a.identifier],c=Date.now()-l.initialTimeStamp;if(c<Bt.HOLD_DELAY&&Math.abs(l.initialPageX-mi(l.rollingPageX))<30&&Math.abs(l.initialPageY-mi(l.rollingPageY))<30){let h=this.newGestureEvent(fs.Tap,l.initialTarget);h.pageX=mi(l.rollingPageX),h.pageY=mi(l.rollingPageY),this.dispatchEvent(h)}else if(c>=Bt.HOLD_DELAY&&Math.abs(l.initialPageX-mi(l.rollingPageX))<30&&Math.abs(l.initialPageY-mi(l.rollingPageY))<30){let h=this.newGestureEvent(fs.Contextmenu,l.initialTarget);h.pageX=mi(l.rollingPageX),h.pageY=mi(l.rollingPageY),this.dispatchEvent(h)}else if(r===1){let h=mi(l.rollingPageX),u=mi(l.rollingPageY),d=mi(l.rollingTimestamps)-l.rollingTimestamps[0],f=h-l.rollingPageX[0],g=u-l.rollingPageY[0],b=[...this.targets].filter(T=>l.initialTarget instanceof Node&&T.contains(l.initialTarget));this.inertia(t,b,s,Math.abs(f)/d,f>0?1:-1,h,Math.abs(g)/d,g>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(fs.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,i){let s=document.createEvent("CustomEvent");return s.initEvent(t,!1,!0),s.initialTarget=i,s.tapCount=0,s}dispatchEvent(t){if(t.type===fs.Tap){let i=new Date().getTime(),s=0;i-this._lastSetTapCountTime>Bt.CLEAR_TAP_COUNT_TIME?s=1:s=2,this._lastSetTapCountTime=i,t.tapCount=s}else(t.type===fs.Change||t.type===fs.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let s of this.ignoreTargets)if(s.contains(t.initialTarget))return;let i=[];for(let s of this.targets)if(s.contains(t.initialTarget)){let r=0,n=t.initialTarget;for(;n&&n!==s;)r++,n=n.parentElement;i.push([r,s])}i.sort((s,r)=>s[0]-r[0]);for(let[s,r]of i)r.dispatchEvent(t),this.dispatched=!0}}inertia(t,i,s,r,n,o,a,l,c){this.handle=Wh(t,()=>{let h=Date.now(),u=h-s,d=0,f=0,g=!0;r+=Bt.SCROLL_FRICTION*u,a+=Bt.SCROLL_FRICTION*u,r>0&&(g=!1,d=n*r*u),a>0&&(g=!1,f=l*a*u);let b=this.newGestureEvent(fs.Change);b.translationX=d,b.translationY=f,i.forEach(T=>T.dispatchEvent(b)),g||this.inertia(t,i,h,r,n,o+d,a,l,c+f)})}onTouchMove(t){let i=Date.now();for(let s=0,r=t.changedTouches.length;s<r;s++){let n=t.changedTouches.item(s);if(!this.activeTouches.hasOwnProperty(String(n.identifier))){console.warn("end of an UNKNOWN touch",n);continue}let o=this.activeTouches[n.identifier],a=this.newGestureEvent(fs.Change,o.initialTarget);a.translationX=n.pageX-mi(o.rollingPageX),a.translationY=n.pageY-mi(o.rollingPageY),a.pageX=n.pageX,a.pageY=n.pageY,this.dispatchEvent(a),o.rollingPageX.length>3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(n.pageX),o.rollingPageY.push(n.pageY),o.rollingTimestamps.push(i)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};ll.SCROLL_FRICTION=-.005,ll.HOLD_DELAY=700,ll.CLEAR_TAP_COUNT_TIME=400,Pe([j6],ll,"isTouchDevice",1);var G6=ll,Gg=class extends X{onclick(e,t){this._register(V(e,ct.CLICK,i=>t(new al(Wi(e),i))))}onmousedown(e,t){this._register(V(e,ct.MOUSE_DOWN,i=>t(new al(Wi(e),i))))}onmouseover(e,t){this._register(V(e,ct.MOUSE_OVER,i=>t(new al(Wi(e),i))))}onmouseleave(e,t){this._register(V(e,ct.MOUSE_LEAVE,i=>t(new al(Wi(e),i))))}onkeydown(e,t){this._register(V(e,ct.KEY_DOWN,i=>t(new vg(i))))}onkeyup(e,t){this._register(V(e,ct.KEY_UP,i=>t(new vg(i))))}oninput(e,t){this._register(V(e,ct.INPUT,t))}onblur(e,t){this._register(V(e,ct.BLUR,t))}onfocus(e,t){this._register(V(e,ct.FOCUS,t))}onchange(e,t){this._register(V(e,ct.CHANGE,t))}ignoreGesture(e){return G6.ignoreTarget(e)}},tw=11,Y6=class extends Gg{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=tw+"px",this.domNode.style.height=tw+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new gS),this._register(Jb(this.bgDomNode,ct.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(Jb(this.domNode,ct.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new F6),this._pointerdownScheduleRepeatTimer=this._register(new Vg)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Wi(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},X6=class yg{constructor(t,i,s,r,n,o,a){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(i=i|0,s=s|0,r=r|0,n=n|0,o=o|0,a=a|0),this.rawScrollLeft=r,this.rawScrollTop=a,i<0&&(i=0),r+i>s&&(r=s-i),r<0&&(r=0),n<0&&(n=0),a+n>o&&(a=o-n),a<0&&(a=0),this.width=i,this.scrollWidth=s,this.scrollLeft=r,this.height=n,this.scrollHeight=o,this.scrollTop=a}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,i){return new yg(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,i?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,i?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new yg(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,i){let s=this.width!==t.width,r=this.scrollWidth!==t.scrollWidth,n=this.scrollLeft!==t.scrollLeft,o=this.height!==t.height,a=this.scrollHeight!==t.scrollHeight,l=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:i,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:s,scrollWidthChanged:r,scrollLeftChanged:n,heightChanged:o,scrollHeightChanged:a,scrollTopChanged:l}}},Z6=class extends X{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new z),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new X6(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let s;t?s=new sw(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):s=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=s}else{let i=this._state.withScrollPosition(e);this._smoothScrolling=sw.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}},iw=class{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}};function Gp(e,t){let i=t-e;return function(s){return e+i*e4(s)}}function Q6(e,t,i){return function(s){return s<i?e(s/i):t((s-i)/(1-i))}}var sw=class bg{constructor(t,i,s,r){this.from=t,this.to=i,this.duration=r,this.startTime=s,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,i,s){if(Math.abs(t-i)>2.5*s){let r,n;return t<i?(r=t+.75*s,n=i-.75*s):(r=t-.75*s,n=i+.75*s),Q6(Gp(t,r),Gp(n,i),.33)}return Gp(t,i)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let i=(t-this.startTime)/this.duration;if(i<1){let s=this.scrollLeft(i),r=this.scrollTop(i);return new iw(s,r,!1)}return new iw(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,i,s){return bg.start(t,i,s)}static start(t,i,s){s=s+10;let r=Date.now()-10;return new bg(t,i,r,s)}};function J6(e){return Math.pow(e,3)}function e4(e){return 1-J6(1-e)}var t4=class extends X{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Vg)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}},i4=140,mS=class extends Gg{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new t4(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new gS),this._shouldRender=!0,this.domNode=pl(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(V(this.domNode.domNode,ct.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new Y6(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,s){this.slider=pl(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof s=="number"&&this.slider.setHeight(s),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(V(this.slider.domNode,ct.POINTER_DOWN,r=>{r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))})),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),s=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderPointerPosition(e);i<=r&&r<=s?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{let r=$6(this.domNode.domNode);t=e.pageX-r.left,i=e.pageY-r.top}let s=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(s):this._scrollbarState.getDesiredScrollPositionFromOffset(s)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{let n=this._sliderOrthogonalPointerPosition(r),o=Math.abs(n-i);if(lS&&o>i4){this._setDesiredScrollPositionNow(s.getScrollPosition());return}let a=this._sliderPointerPosition(r)-t;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(a))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},_S=class wg{constructor(t,i,s,r,n,o){this._scrollbarSize=Math.round(i),this._oppositeScrollbarSize=Math.round(s),this._arrowSize=Math.round(t),this._visibleSize=r,this._scrollSize=n,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new wg(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let i=Math.round(t);return this._visibleSize!==i?(this._visibleSize=i,this._refreshComputedValues(),!0):!1}setScrollSize(t){let i=Math.round(t);return this._scrollSize!==i?(this._scrollSize=i,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let i=Math.round(t);return this._scrollPosition!==i?(this._scrollPosition=i,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,i,s,r,n){let o=Math.max(0,s-t),a=Math.max(0,o-2*i),l=r>0&&r>s;if(!l)return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(s*a/r))),h=(a-c)/(r-s),u=n*h;return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:h,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=wg._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize-this._computedSliderSize/2;return Math.round(i/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize,s=this._scrollPosition;return i<this._computedSliderPosition?s-=this._visibleSize:s+=this._visibleSize,s}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let i=this._computedSliderPosition+t;return Math.round(i/this._computedSliderRatio)}},s4=class extends mS{constructor(e,t,i){let s=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new _S(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,s.width,s.scrollWidth,r.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},r4=class extends mS{constructor(e,t,i){let s=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new _S(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,s.height,s.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},n4=500,rw=50,nw=!0,o4=class{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}},Sg=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,i=0,s=1,r=this._rear;do{let n=r===this._front?t:Math.pow(2,-s);if(t-=n,i+=this._memory[r].score*n,r===this._front)break;r=(this._capacity+r-1)%this._capacity,s++}while(!0);return i<=.5}acceptStandardWheelEvent(t){if(Kg){let i=Wi(t.browserEvent),s=JE(i);this.accept(Date.now(),t.deltaX*s,t.deltaY*s)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,i,s){let r=null,n=new o4(t,i,s);this._front===-1&&this._rear===-1?(this._memory[0]=n,this._front=0,this._rear=0):(r=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n),n.score=this._computeScore(n,r)}_computeScore(t,i){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let s=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(s+=.25),i){let r=Math.abs(t.deltaX),n=Math.abs(t.deltaY),o=Math.abs(i.deltaX),a=Math.abs(i.deltaY),l=Math.max(Math.min(r,o),1),c=Math.max(Math.min(n,a),1),h=Math.max(r,o),u=Math.max(n,a);h%l===0&&u%c===0&&(s-=.5)}return Math.min(Math.max(s,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};Sg.INSTANCE=new Sg;var a4=Sg,l4=class extends Gg{constructor(e,t,i){super(),this._onScroll=this._register(new z),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new z),this.onWillScroll=this._onWillScroll.event,this._options=h4(t),this._scrollable=i,this._register(this._scrollable.onScroll(r=>{this._onWillScroll.fire(r),this._onDidScroll(r),this._onScroll.fire(r)}));let s={onMouseWheel:r=>this._onMouseWheel(r),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new r4(this._scrollable,this._options,s)),this._horizontalScrollbar=this._register(new s4(this._scrollable,this._options,s)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=pl(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=pl(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=pl(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,r=>this._onMouseOver(r)),this.onmouseleave(this._listenOnDomNode,r=>this._onMouseLeave(r)),this._hideTimeout=this._register(new Vg),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=En(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,ps&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new Gb(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=En(this._mouseWheelToDispose),e)){let t=i=>{this._onMouseWheel(new Gb(i))};this._mouseWheelToDispose.push(V(this._listenOnDomNode,ct.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=a4.INSTANCE;nw&&t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,n=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&n+r===0?n=r=0:Math.abs(r)>=Math.abs(n)?n=0:r=0),this._options.flipAxes&&([r,n]=[n,r]);let o=!ps&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||o)&&!n&&(n=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(n=n*this._options.fastScrollSensitivity,r=r*this._options.fastScrollSensitivity);let a=this._scrollable.getFutureScrollPosition(),l={};if(r){let c=rw*r,h=a.scrollTop-(c<0?Math.floor(c):Math.ceil(c));this._verticalScrollbar.writeScrollPosition(l,h)}if(n){let c=rw*n,h=a.scrollLeft-(c<0?Math.floor(c):Math.ceil(c));this._horizontalScrollbar.writeScrollPosition(l,h)}l=this._scrollable.validateScrollPosition(l),(a.scrollLeft!==l.scrollLeft||a.scrollTop!==l.scrollTop)&&(nw&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),i=!0)}let s=i;!s&&this._options.alwaysConsumeMouseWheel&&(s=!0),!s&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(s=!0),s&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,s=i?" left":"",r=t?" top":"",n=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${s}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${n}${r}${s}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),n4)}},c4=class extends l4{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function h4(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,ps&&(t.className+=" mac"),t}var kg=class extends X{constructor(e,t,i,s,r,n,o,a){super(),this._bufferService=i,this._optionsService=o,this._renderService=a,this._onRequestScrollLines=this._register(new z),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let l=this._register(new Z6({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:c=>Wh(s.window,c)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{l.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new c4(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},l)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(r.onProtocolChange(c=>{this._scrollableElement.updateOptions({handleMouseWheel:!(c&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(Tt.runAndSubscribe(n.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=n.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Ce(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=s.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Ce(()=>this._styleElement.remove())),this._register(Tt.runAndSubscribe(n.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${n.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${n.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${n.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
|
|
38
|
+
`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(a);Bh.register(o,l?.[2]??a,o)}return o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let s=this._deliveryQueue.current===this;if(this._size*YE<=t.length){let r=0;for(let n=0;n<t.length;n++)t[n]?t[r++]=t[n]:s&&(this._deliveryQueue.end--,r<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=r}}_deliver(e,t){if(!e)return;let i=this._options?.onListenerError||Dh;if(!i){e.value(t);return}try{e.value(t)}catch(s){i(s)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Nh)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},ZE=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},mg=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new z,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new z,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,i){if(this.getZoomLevel(i)===t)return;let s=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(s,t),this._onDidChangeZoomLevel.fire(s)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),t)}setFullscreen(t,i){if(this.isFullscreen(i)===t)return;let s=this.getWindowId(i);this.mapWindowIdToFullScreen.set(s,t),this._onDidChangeFullscreen.fire(s)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};mg.INSTANCE=new mg;var $g=mg;function QE(e,t,i){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",i)}var eL=$g.INSTANCE.onDidChangeZoomLevel;function JE(e){return $g.INSTANCE.getZoomFactor(e)}var tL=$g.INSTANCE.onDidChangeFullscreen,Ho=typeof navigator=="object"?navigator.userAgent:"",_g=Ho.indexOf("Firefox")>=0,Oh=Ho.indexOf("AppleWebKit")>=0,Kg=Ho.indexOf("Chrome")>=0,rS=!Kg&&Ho.indexOf("Safari")>=0,iL=Ho.indexOf("Electron/")>=0,sL=Ho.indexOf("Android")>=0,zh=!1;if(typeof yi.matchMedia=="function"){let e=yi.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=yi.matchMedia("(display-mode: fullscreen)");zh=e.matches,QE(yi,e,({matches:i})=>{zh&&t.matches||(zh=i)})}function e6(){return zh}var Bo="en",$h=!1,Kh=!1,fl=!1,t6=!1,nS=!1,oS=!1,i6=!1,s6=!1,r6=!1,n6=!1,Th,Hh=Bo,Kb=Bo,o6,Us,qs=globalThis,vi;typeof qs.vscode<"u"&&typeof qs.vscode.process<"u"?vi=qs.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(vi=process);var aS=typeof vi?.versions?.electron=="string",a6=aS&&vi?.type==="renderer";if(typeof vi=="object"){$h=vi.platform==="win32",Kh=vi.platform==="darwin",fl=vi.platform==="linux",t6=fl&&!!vi.env.SNAP&&!!vi.env.SNAP_REVISION,i6=aS,r6=!!vi.env.CI||!!vi.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Th=Bo,Hh=Bo;let e=vi.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Th=t.userLocale,Kb=t.osLocale,Hh=t.resolvedLanguage||Bo,o6=t.languagePack?.translationsConfigFile}catch{}nS=!0}else typeof navigator=="object"&&!a6?(Us=navigator.userAgent,$h=Us.indexOf("Windows")>=0,Kh=Us.indexOf("Macintosh")>=0,s6=(Us.indexOf("Macintosh")>=0||Us.indexOf("iPad")>=0||Us.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,fl=Us.indexOf("Linux")>=0,n6=Us?.indexOf("Mobi")>=0,oS=!0,Hh=globalThis._VSCODE_NLS_LANGUAGE||Bo,Th=navigator.language.toLowerCase(),Kb=Th):console.error("Unable to resolve platform.");var Fp=0;Kh?Fp=1:$h?Fp=3:fl&&(Fp=2);var lS=$h,ps=Kh,l6=fl,$p=nS,c6=oS&&typeof qs.importScripts=="function",rL=c6?qs.origin:void 0,gs=Us,Nr=Hh,h6;(e=>{function t(){return Nr}e.value=t;function i(){return Nr.length===2?Nr==="en":Nr.length>=3?Nr[0]==="e"&&Nr[1]==="n"&&Nr[2]==="-":!1}e.isDefaultVariant=i;function s(){return Nr==="en"}e.isDefault=s})(h6||={});var u6=typeof qs.postMessage=="function"&&!qs.importScripts,d6=(()=>{if(u6){let e=[];qs.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let s=0,r=e.length;s<r;s++){let n=e[s];if(n.id===i.data.vscodeScheduleAsyncWork){e.splice(s,1),n.callback();return}}});let t=0;return i=>{let s=++t;e.push({id:s,callback:i}),qs.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})(),f6=!!(gs&&gs.indexOf("Chrome")>=0),nL=!!(gs&&gs.indexOf("Firefox")>=0),oL=!!(!f6&&gs&&gs.indexOf("Safari")>=0),aL=!!(gs&&gs.indexOf("Edg/")>=0),lL=!!(gs&&gs.indexOf("Android")>=0),Br=typeof navigator=="object"?navigator:{},cL={clipboard:{writeText:$p||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(Br&&Br.clipboard&&Br.clipboard.writeText),readText:$p||!!(Br&&Br.clipboard&&Br.clipboard.readText)},keyboard:$p||e6()?0:Br.keyboard||rS?1:2,touch:"ontouchstart"in yi||Br.maxTouchPoints>0,pointerEvents:yi.PointerEvent&&("ontouchstart"in yi||navigator.maxTouchPoints>0)},Wg=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Kp=new Wg,Wb=new Wg,Vb=new Wg,p6=new Array(230),cS;(e=>{function t(a){return Kp.keyCodeToStr(a)}e.toString=t;function i(a){return Kp.strToKeyCode(a)}e.fromString=i;function s(a){return Wb.keyCodeToStr(a)}e.toUserSettingsUS=s;function r(a){return Vb.keyCodeToStr(a)}e.toUserSettingsGeneral=r;function n(a){return Wb.strToKeyCode(a)||Vb.strToKeyCode(a)}e.fromUserSettings=n;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Kp.keyCodeToStr(a)}e.toElectronAccelerator=o})(cS||={});var g6=class hS{constructor(t,i,s,r,n){this.ctrlKey=t,this.shiftKey=i,this.altKey=s,this.metaKey=r,this.keyCode=n}equals(t){return t instanceof hS&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",i=this.shiftKey?"1":"0",s=this.altKey?"1":"0",r=this.metaKey?"1":"0";return`K${t}${i}${s}${r}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new m6([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},m6=class{constructor(e){if(e.length===0)throw TE("chords");this.chords=e}getHashCode(){let e="";for(let t=0,i=this.chords.length;t<i;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function _6(e){if(e.charCode){let i=String.fromCharCode(e.charCode).toUpperCase();return cS.fromString(i)}let t=e.keyCode;if(t===3)return 7;if(_g)switch(t){case 59:return 85;case 60:if(l6)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(ps)return 57;break}else if(Oh&&(ps&&t===93||!ps&&t===92))return 57;return p6[t]||0}var v6=ps?256:2048,y6=512,b6=1024,w6=ps?2048:256,vg=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=_6(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=v6),this.altKey&&(t|=y6),this.shiftKey&&(t|=b6),this.metaKey&&(t|=w6),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new g6(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},jb=new WeakMap;function S6(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if(t.origin!=="null"&&i.origin!=="null"&&t.origin!==i.origin)return null}catch{return null}return e.parent}var k6=class{static getSameOriginWindowChain(e){let t=jb.get(e);if(!t){t=[],jb.set(e,t);let i=e,s;do s=S6(i),s?t.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):t.push({window:new WeakRef(i),iframeElement:null}),i=s;while(i)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,s=0,r=this.getSameOriginWindowChain(e);for(let n of r){let o=n.window.deref();if(i+=o?.scrollY??0,s+=o?.scrollX??0,o===t||!n.iframeElement)break;let a=n.iframeElement.getBoundingClientRect();i+=a.top,s+=a.left}return{top:i,left:s}}},al=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let i=k6.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},Gb=class{constructor(e,t=0,i=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let s=!1;if(Kg){let r=navigator.userAgent.match(/Chrome\/(\d+)/);s=(r?parseInt(r[1]):123)<=122}if(e){let r=e,n=e,o=e.view?.devicePixelRatio||1;if(typeof r.wheelDeltaY<"u")s?this.deltaY=r.wheelDeltaY/(120*o):this.deltaY=r.wheelDeltaY/120;else if(typeof n.VERTICAL_AXIS<"u"&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if(e.type==="wheel"){let a=e;a.deltaMode===a.DOM_DELTA_LINE?_g&&!ps?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof r.wheelDeltaX<"u")rS&&lS?this.deltaX=-(r.wheelDeltaX/120):s?this.deltaX=r.wheelDeltaX/(120*o):this.deltaX=r.wheelDeltaX/120;else if(typeof n.HORIZONTAL_AXIS<"u"&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let a=e;a.deltaMode===a.DOM_DELTA_LINE?_g&&!ps?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(s?this.deltaY=e.wheelDelta/(120*o):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},uS=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}),x6;(e=>{function t(i){return i===e.None||i===e.Cancelled||i instanceof C6?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Tt.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:uS})})(x6||={});var C6=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?uS:(this._emitter||(this._emitter=new z),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var Vg=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new cg("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new cg("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},E6=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new cg("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let s=i.setInterval(()=>{e()},t);this.disposable=Ce(()=>{i.clearInterval(s),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},T6,Wp;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?Wp=(e,t)=>{d6(()=>{if(i)return;let s=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:Wp=(e,t,i)=>{let s=e.requestIdleCallback(t,typeof i=="number"?{timeout:i}:void 0),r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(s))}}},T6=e=>Wp(globalThis,e)})();var A6;(e=>{async function t(s){let r,n=await Promise.all(s.map(o=>o.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return n}e.settled=t;function i(s){return new Promise(async(r,n)=>{try{await s(r,n)}catch(o){n(o)}})}e.withAsyncBody=i})(A6||={});var Yb=class Ni{static fromArray(t){return new Ni(i=>{i.emitMany(t)})}static fromPromise(t){return new Ni(async i=>{i.emitMany(await t)})}static fromPromises(t){return new Ni(async i=>{await Promise.all(t.map(async s=>i.emitOne(await s)))})}static merge(t){return new Ni(async i=>{await Promise.all(t.map(async s=>{for await(let r of s)i.emitOne(r)}))})}constructor(t,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new z,queueMicrotask(async()=>{let s={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(t(s)),this.resolve()}catch(r){this.reject(r)}finally{s.emitOne=void 0,s.emitMany=void 0,s.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Tt.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new Ni(async s=>{for await(let r of t)s.emitOne(i(r))})}map(t){return Ni.map(this,t)}static filter(t,i){return new Ni(async s=>{for await(let r of t)i(r)&&s.emitOne(r)})}filter(t){return Ni.filter(this,t)}static coalesce(t){return Ni.filter(t,i=>!!i)}coalesce(){return Ni.coalesce(this)}static async toPromise(t){let i=[];for await(let s of t)i.push(s);return i}toPromise(){return Ni.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};Yb.EMPTY=Yb.fromArray([]);function M6(e){return 55296<=e&&e<=56319}function Xb(e){return 56320<=e&&e<=57343}function R6(e,t){return(e-55296<<10)+(t-56320)+65536}function L6(e){return jg(e,0)}function jg(e,t){switch(typeof e){case"object":return e===null?Ps(349,t):Array.isArray(e)?N6(e,t):B6(e,t);case"string":return dS(e,t);case"boolean":return D6(e,t);case"number":return Ps(e,t);case"undefined":return Ps(937,t);default:return Ps(617,t)}}function Ps(e,t){return(t<<5)-t+e|0}function D6(e,t){return Ps(e?433:863,t)}function dS(e,t){t=Ps(149417,t);for(let i=0,s=e.length;i<s;i++)t=Ps(e.charCodeAt(i),t);return t}function N6(e,t){return t=Ps(104579,t),e.reduce((i,s)=>jg(s,i),t)}function B6(e,t){return t=Ps(181387,t),Object.keys(e).sort().reduce((i,s)=>(i=dS(s,i),jg(e[s],i)),t)}function Vp(e,t,i=32){let s=i-t,r=~((1<<s)-1);return(e<<t|(r&e)>>>s)>>>0}function Zb(e,t=0,i=e.byteLength,s=0){for(let r=0;r<i;r++)e[t+r]=s}function O6(e,t,i="0"){for(;e.length<t;)e=i+e;return e}function el(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(i=>i.toString(16).padStart(2,"0")).join(""):O6((e>>>0).toString(16),t/4)}var z6=class fS{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let i=t.length;if(i===0)return;let s=this._buff,r=this._buffLen,n=this._leftoverHighSurrogate,o,a;for(n!==0?(o=n,a=-1,n=0):(o=t.charCodeAt(0),a=0);;){let l=o;if(M6(o))if(a+1<i){let c=t.charCodeAt(a+1);Xb(c)?(a++,l=R6(o,c)):l=65533}else{n=o;break}else Xb(o)&&(l=65533);if(r=this._push(s,r,l),a++,a<i)o=t.charCodeAt(a);else break}this._buffLen=r,this._leftoverHighSurrogate=n}_push(t,i,s){return s<128?t[i++]=s:s<2048?(t[i++]=192|(s&1984)>>>6,t[i++]=128|(s&63)>>>0):s<65536?(t[i++]=224|(s&61440)>>>12,t[i++]=128|(s&4032)>>>6,t[i++]=128|(s&63)>>>0):(t[i++]=240|(s&1835008)>>>18,t[i++]=128|(s&258048)>>>12,t[i++]=128|(s&4032)>>>6,t[i++]=128|(s&63)>>>0),i>=64&&(this._step(),i-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),i}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),el(this._h0)+el(this._h1)+el(this._h2)+el(this._h3)+el(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Zb(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Zb(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=fS._bigBlock32,i=this._buffDV;for(let u=0;u<64;u+=4)t.setUint32(u,i.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)t.setUint32(u,Vp(t.getUint32(u-12,!1)^t.getUint32(u-32,!1)^t.getUint32(u-56,!1)^t.getUint32(u-64,!1),1),!1);let s=this._h0,r=this._h1,n=this._h2,o=this._h3,a=this._h4,l,c,h;for(let u=0;u<80;u++)u<20?(l=r&n|~r&o,c=1518500249):u<40?(l=r^n^o,c=1859775393):u<60?(l=r&n|r&o|n&o,c=2400959708):(l=r^n^o,c=3395469782),h=Vp(s,5)+l+a+c+t.getUint32(u*4,!1)&4294967295,a=o,o=n,n=Vp(r,30),r=s,s=h;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+n&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}};z6._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:hL,getWindow:Wi,getDocument:uL,getWindows:dL,getWindowsCount:fL,getWindowId:Qb,getWindowById:pL,hasWindow:gL,onDidRegisterWindow:H6,onWillUnregisterWindow:mL,onDidUnregisterWindow:_L}=(function(){let e=new Map,t={window:yi,disposables:new Pr};e.set(yi.vscodeWindowId,t);let i=new z,s=new z,r=new z;function n(o,a){return(typeof o=="number"?e.get(o):void 0)??(a?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:r.event,onDidUnregisterWindow:s.event,registerWindow(o){if(e.has(o.vscodeWindowId))return X.None;let a=new Pr,l={window:o,disposables:a.add(new Pr)};return e.set(o.vscodeWindowId,l),a.add(Ce(()=>{e.delete(o.vscodeWindowId),s.fire(o)})),a.add(j(o,ct.BEFORE_UNLOAD,()=>{r.fire(o)})),i.fire(l),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(o){return o.vscodeWindowId},hasWindow(o){return e.has(o)},getWindowById:n,getWindow(o){let a=o;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let l=o;return l?.view?l.view.window:yi},getDocument(o){return Wi(o).document}}})(),U6=class{constructor(e,t,i,s){this._node=e,this._type=t,this._handler=i,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function j(e,t,i,s){return new U6(e,t,i,s)}function P6(e,t){return function(i){return t(new al(e,i))}}function q6(e){return function(t){return e(new vg(t))}}var Jb=function(e,t,i,s){let r=i;return t==="click"||t==="mousedown"||t==="contextmenu"?r=P6(Wi(e),i):(t==="keydown"||t==="keypress"||t==="keyup")&&(r=q6(i)),j(e,t,r,s)},I6,Wh,F6=class extends E6{constructor(e){super(),this.defaultTarget=e&&Wi(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}},jp=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Dh(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,i=new Map,s=new Map,r=n=>{i.set(n,!1);let o=e.get(n)??[];for(t.set(n,o),e.set(n,[]),s.set(n,!0);o.length>0;)o.sort(jp.sort),o.shift().execute();s.set(n,!1)};Wh=(n,o,a=0)=>{let l=Qb(n),c=new jp(o,a),h=e.get(l);return h||(h=[],e.set(l,h)),h.push(c),i.get(l)||(i.set(l,!0),n.requestAnimationFrame(()=>r(l))),c},I6=(n,o,a)=>{let l=Qb(n);if(s.get(l)){let c=new jp(o,a),h=t.get(l);return h||(h=[],t.set(l,h)),h.push(c),c}else return Wh(n,o,a)}})();var ew=class Uh{constructor(t,i){this.width=t,this.height=i}with(t=this.width,i=this.height){return t!==this.width||i!==this.height?new Uh(t,i):this}static is(t){return typeof t=="object"&&typeof t.height=="number"&&typeof t.width=="number"}static lift(t){return t instanceof Uh?t:new Uh(t.width,t.height)}static equals(t,i){return t===i?!0:!t||!i?!1:t.width===i.width&&t.height===i.height}};ew.None=new ew(0,0);function $6(e){let t=e.getBoundingClientRect(),i=Wi(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}var vL=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let s=this.mutationObservers.get(e);s||(s=new Map,this.mutationObservers.set(e,s));let r=L6(i),n=s.get(r);if(n)n.users+=1;else{let o=new z,a=new MutationObserver(c=>o.fire(c));a.observe(e,i);let l=n={users:1,observer:a,onDidMutate:o.event};t.add(Ce(()=>{l.users-=1,l.users===0&&(o.dispose(),a.disconnect(),s?.delete(r),s?.size===0&&this.mutationObservers.delete(e))})),s.set(r,n)}return n.onDidMutate}},ct={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:Oh?"webkitAnimationStart":"animationstart",ANIMATION_END:Oh?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Oh?"webkitAnimationIteration":"animationiteration"},K6=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function pS(e,t,i,...s){let r=K6.exec(t);if(!r)throw new Error("Bad use of emmet");let n=r[1]||"div",o;return e!=="http://www.w3.org/1999/xhtml"?o=document.createElementNS(e,n):o=document.createElement(n),r[3]&&(o.id=r[3]),r[4]&&(o.className=r[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?o[a]=l:a==="selected"?l&&o.setAttribute(a,"true"):o.setAttribute(a,l))}),o.append(...s),o}function W6(e,t,...i){return pS("http://www.w3.org/1999/xhtml",e,t,...i)}W6.SVG=function(e,t,...i){return pS("http://www.w3.org/2000/svg",e,t,...i)};var V6=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=ti(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=ti(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=ti(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=ti(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=ti(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=ti(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=ti(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=ti(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=ti(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=ti(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=ti(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=ti(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=ti(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=ti(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function ti(e){return typeof e=="number"?`${e}px`:e}function pl(e){return new V6(e)}var gS=class{constructor(){this._hooks=new Pr,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,s,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=r;let n=e;try{e.setPointerCapture(t),this._hooks.add(Ce(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{n=Wi(e)}this._hooks.add(j(n,ct.POINTER_MOVE,o=>{if(o.buttons!==i){this.stopMonitoring(!0);return}o.preventDefault(),this._pointerMoveCallback(o)})),this._hooks.add(j(n,ct.POINTER_UP,o=>this.stopMonitoring(!0)))}};function j6(e,t,i){let s=null,r=null;if(typeof i.value=="function"?(s="value",r=i.value,r.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof i.get=="function"&&(s="get",r=i.get),!r)throw new Error("not supported");let n=`$memoize$${t}`;i[s]=function(...o){return this.hasOwnProperty(n)||Object.defineProperty(this,n,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,o)}),this[n]}}var fs;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(fs||={});var ll=class Bt extends X{constructor(){super(),this.dispatched=!1,this.targets=new Ib,this.ignoreTargets=new Ib,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Tt.runAndSubscribe(H6,({window:t,disposables:i})=>{i.add(j(t.document,"touchstart",s=>this.onTouchStart(s),{passive:!1})),i.add(j(t.document,"touchend",s=>this.onTouchEnd(t,s))),i.add(j(t.document,"touchmove",s=>this.onTouchMove(s),{passive:!1}))},{window:yi,disposables:this._store}))}static addTarget(t){if(!Bt.isTouchDevice())return X.None;Bt.INSTANCE||(Bt.INSTANCE=qb(new Bt));let i=Bt.INSTANCE.targets.push(t);return Ce(i)}static ignoreTarget(t){if(!Bt.isTouchDevice())return X.None;Bt.INSTANCE||(Bt.INSTANCE=qb(new Bt));let i=Bt.INSTANCE.ignoreTargets.push(t);return Ce(i)}static isTouchDevice(){return"ontouchstart"in yi||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let i=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let s=0,r=t.targetTouches.length;s<r;s++){let n=t.targetTouches.item(s);this.activeTouches[n.identifier]={id:n.identifier,initialTarget:n.target,initialTimeStamp:i,initialPageX:n.pageX,initialPageY:n.pageY,rollingTimestamps:[i],rollingPageX:[n.pageX],rollingPageY:[n.pageY]};let o=this.newGestureEvent(fs.Start,n.target);o.pageX=n.pageX,o.pageY=n.pageY,this.dispatchEvent(o)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,i){let s=Date.now(),r=Object.keys(this.activeTouches).length;for(let n=0,o=i.changedTouches.length;n<o;n++){let a=i.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(a.identifier))){console.warn("move of an UNKNOWN touch",a);continue}let l=this.activeTouches[a.identifier],c=Date.now()-l.initialTimeStamp;if(c<Bt.HOLD_DELAY&&Math.abs(l.initialPageX-mi(l.rollingPageX))<30&&Math.abs(l.initialPageY-mi(l.rollingPageY))<30){let h=this.newGestureEvent(fs.Tap,l.initialTarget);h.pageX=mi(l.rollingPageX),h.pageY=mi(l.rollingPageY),this.dispatchEvent(h)}else if(c>=Bt.HOLD_DELAY&&Math.abs(l.initialPageX-mi(l.rollingPageX))<30&&Math.abs(l.initialPageY-mi(l.rollingPageY))<30){let h=this.newGestureEvent(fs.Contextmenu,l.initialTarget);h.pageX=mi(l.rollingPageX),h.pageY=mi(l.rollingPageY),this.dispatchEvent(h)}else if(r===1){let h=mi(l.rollingPageX),u=mi(l.rollingPageY),d=mi(l.rollingTimestamps)-l.rollingTimestamps[0],f=h-l.rollingPageX[0],g=u-l.rollingPageY[0],b=[...this.targets].filter(T=>l.initialTarget instanceof Node&&T.contains(l.initialTarget));this.inertia(t,b,s,Math.abs(f)/d,f>0?1:-1,h,Math.abs(g)/d,g>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(fs.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,i){let s=document.createEvent("CustomEvent");return s.initEvent(t,!1,!0),s.initialTarget=i,s.tapCount=0,s}dispatchEvent(t){if(t.type===fs.Tap){let i=new Date().getTime(),s=0;i-this._lastSetTapCountTime>Bt.CLEAR_TAP_COUNT_TIME?s=1:s=2,this._lastSetTapCountTime=i,t.tapCount=s}else(t.type===fs.Change||t.type===fs.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let s of this.ignoreTargets)if(s.contains(t.initialTarget))return;let i=[];for(let s of this.targets)if(s.contains(t.initialTarget)){let r=0,n=t.initialTarget;for(;n&&n!==s;)r++,n=n.parentElement;i.push([r,s])}i.sort((s,r)=>s[0]-r[0]);for(let[s,r]of i)r.dispatchEvent(t),this.dispatched=!0}}inertia(t,i,s,r,n,o,a,l,c){this.handle=Wh(t,()=>{let h=Date.now(),u=h-s,d=0,f=0,g=!0;r+=Bt.SCROLL_FRICTION*u,a+=Bt.SCROLL_FRICTION*u,r>0&&(g=!1,d=n*r*u),a>0&&(g=!1,f=l*a*u);let b=this.newGestureEvent(fs.Change);b.translationX=d,b.translationY=f,i.forEach(T=>T.dispatchEvent(b)),g||this.inertia(t,i,h,r,n,o+d,a,l,c+f)})}onTouchMove(t){let i=Date.now();for(let s=0,r=t.changedTouches.length;s<r;s++){let n=t.changedTouches.item(s);if(!this.activeTouches.hasOwnProperty(String(n.identifier))){console.warn("end of an UNKNOWN touch",n);continue}let o=this.activeTouches[n.identifier],a=this.newGestureEvent(fs.Change,o.initialTarget);a.translationX=n.pageX-mi(o.rollingPageX),a.translationY=n.pageY-mi(o.rollingPageY),a.pageX=n.pageX,a.pageY=n.pageY,this.dispatchEvent(a),o.rollingPageX.length>3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(n.pageX),o.rollingPageY.push(n.pageY),o.rollingTimestamps.push(i)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};ll.SCROLL_FRICTION=-.005,ll.HOLD_DELAY=700,ll.CLEAR_TAP_COUNT_TIME=400,Pe([j6],ll,"isTouchDevice",1);var G6=ll,Gg=class extends X{onclick(e,t){this._register(j(e,ct.CLICK,i=>t(new al(Wi(e),i))))}onmousedown(e,t){this._register(j(e,ct.MOUSE_DOWN,i=>t(new al(Wi(e),i))))}onmouseover(e,t){this._register(j(e,ct.MOUSE_OVER,i=>t(new al(Wi(e),i))))}onmouseleave(e,t){this._register(j(e,ct.MOUSE_LEAVE,i=>t(new al(Wi(e),i))))}onkeydown(e,t){this._register(j(e,ct.KEY_DOWN,i=>t(new vg(i))))}onkeyup(e,t){this._register(j(e,ct.KEY_UP,i=>t(new vg(i))))}oninput(e,t){this._register(j(e,ct.INPUT,t))}onblur(e,t){this._register(j(e,ct.BLUR,t))}onfocus(e,t){this._register(j(e,ct.FOCUS,t))}onchange(e,t){this._register(j(e,ct.CHANGE,t))}ignoreGesture(e){return G6.ignoreTarget(e)}},tw=11,Y6=class extends Gg{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=tw+"px",this.domNode.style.height=tw+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new gS),this._register(Jb(this.bgDomNode,ct.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(Jb(this.domNode,ct.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new F6),this._pointerdownScheduleRepeatTimer=this._register(new Vg)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Wi(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},X6=class yg{constructor(t,i,s,r,n,o,a){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(i=i|0,s=s|0,r=r|0,n=n|0,o=o|0,a=a|0),this.rawScrollLeft=r,this.rawScrollTop=a,i<0&&(i=0),r+i>s&&(r=s-i),r<0&&(r=0),n<0&&(n=0),a+n>o&&(a=o-n),a<0&&(a=0),this.width=i,this.scrollWidth=s,this.scrollLeft=r,this.height=n,this.scrollHeight=o,this.scrollTop=a}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,i){return new yg(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,i?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,i?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new yg(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,i){let s=this.width!==t.width,r=this.scrollWidth!==t.scrollWidth,n=this.scrollLeft!==t.scrollLeft,o=this.height!==t.height,a=this.scrollHeight!==t.scrollHeight,l=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:i,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:s,scrollWidthChanged:r,scrollLeftChanged:n,heightChanged:o,scrollHeightChanged:a,scrollTopChanged:l}}},Z6=class extends X{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new z),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new X6(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let s;t?s=new sw(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):s=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=s}else{let i=this._state.withScrollPosition(e);this._smoothScrolling=sw.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}},iw=class{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}};function Gp(e,t){let i=t-e;return function(s){return e+i*e4(s)}}function Q6(e,t,i){return function(s){return s<i?e(s/i):t((s-i)/(1-i))}}var sw=class bg{constructor(t,i,s,r){this.from=t,this.to=i,this.duration=r,this.startTime=s,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,i,s){if(Math.abs(t-i)>2.5*s){let r,n;return t<i?(r=t+.75*s,n=i-.75*s):(r=t-.75*s,n=i+.75*s),Q6(Gp(t,r),Gp(n,i),.33)}return Gp(t,i)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let i=(t-this.startTime)/this.duration;if(i<1){let s=this.scrollLeft(i),r=this.scrollTop(i);return new iw(s,r,!1)}return new iw(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,i,s){return bg.start(t,i,s)}static start(t,i,s){s=s+10;let r=Date.now()-10;return new bg(t,i,r,s)}};function J6(e){return Math.pow(e,3)}function e4(e){return 1-J6(1-e)}var t4=class extends X{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Vg)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}},i4=140,mS=class extends Gg{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new t4(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new gS),this._shouldRender=!0,this.domNode=pl(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(j(this.domNode.domNode,ct.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new Y6(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,s){this.slider=pl(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof s=="number"&&this.slider.setHeight(s),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(j(this.slider.domNode,ct.POINTER_DOWN,r=>{r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))})),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),s=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderPointerPosition(e);i<=r&&r<=s?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{let r=$6(this.domNode.domNode);t=e.pageX-r.left,i=e.pageY-r.top}let s=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(s):this._scrollbarState.getDesiredScrollPositionFromOffset(s)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{let n=this._sliderOrthogonalPointerPosition(r),o=Math.abs(n-i);if(lS&&o>i4){this._setDesiredScrollPositionNow(s.getScrollPosition());return}let a=this._sliderPointerPosition(r)-t;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(a))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},_S=class wg{constructor(t,i,s,r,n,o){this._scrollbarSize=Math.round(i),this._oppositeScrollbarSize=Math.round(s),this._arrowSize=Math.round(t),this._visibleSize=r,this._scrollSize=n,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new wg(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let i=Math.round(t);return this._visibleSize!==i?(this._visibleSize=i,this._refreshComputedValues(),!0):!1}setScrollSize(t){let i=Math.round(t);return this._scrollSize!==i?(this._scrollSize=i,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let i=Math.round(t);return this._scrollPosition!==i?(this._scrollPosition=i,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,i,s,r,n){let o=Math.max(0,s-t),a=Math.max(0,o-2*i),l=r>0&&r>s;if(!l)return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(s*a/r))),h=(a-c)/(r-s),u=n*h;return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:h,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=wg._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize-this._computedSliderSize/2;return Math.round(i/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize,s=this._scrollPosition;return i<this._computedSliderPosition?s-=this._visibleSize:s+=this._visibleSize,s}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let i=this._computedSliderPosition+t;return Math.round(i/this._computedSliderRatio)}},s4=class extends mS{constructor(e,t,i){let s=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new _S(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,s.width,s.scrollWidth,r.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},r4=class extends mS{constructor(e,t,i){let s=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new _S(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,s.height,s.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},n4=500,rw=50,nw=!0,o4=class{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}},Sg=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,i=0,s=1,r=this._rear;do{let n=r===this._front?t:Math.pow(2,-s);if(t-=n,i+=this._memory[r].score*n,r===this._front)break;r=(this._capacity+r-1)%this._capacity,s++}while(!0);return i<=.5}acceptStandardWheelEvent(t){if(Kg){let i=Wi(t.browserEvent),s=JE(i);this.accept(Date.now(),t.deltaX*s,t.deltaY*s)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,i,s){let r=null,n=new o4(t,i,s);this._front===-1&&this._rear===-1?(this._memory[0]=n,this._front=0,this._rear=0):(r=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n),n.score=this._computeScore(n,r)}_computeScore(t,i){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let s=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(s+=.25),i){let r=Math.abs(t.deltaX),n=Math.abs(t.deltaY),o=Math.abs(i.deltaX),a=Math.abs(i.deltaY),l=Math.max(Math.min(r,o),1),c=Math.max(Math.min(n,a),1),h=Math.max(r,o),u=Math.max(n,a);h%l===0&&u%c===0&&(s-=.5)}return Math.min(Math.max(s,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};Sg.INSTANCE=new Sg;var a4=Sg,l4=class extends Gg{constructor(e,t,i){super(),this._onScroll=this._register(new z),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new z),this.onWillScroll=this._onWillScroll.event,this._options=h4(t),this._scrollable=i,this._register(this._scrollable.onScroll(r=>{this._onWillScroll.fire(r),this._onDidScroll(r),this._onScroll.fire(r)}));let s={onMouseWheel:r=>this._onMouseWheel(r),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new r4(this._scrollable,this._options,s)),this._horizontalScrollbar=this._register(new s4(this._scrollable,this._options,s)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=pl(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=pl(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=pl(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,r=>this._onMouseOver(r)),this.onmouseleave(this._listenOnDomNode,r=>this._onMouseLeave(r)),this._hideTimeout=this._register(new Vg),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=En(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,ps&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new Gb(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=En(this._mouseWheelToDispose),e)){let t=i=>{this._onMouseWheel(new Gb(i))};this._mouseWheelToDispose.push(j(this._listenOnDomNode,ct.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=a4.INSTANCE;nw&&t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,n=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&n+r===0?n=r=0:Math.abs(r)>=Math.abs(n)?n=0:r=0),this._options.flipAxes&&([r,n]=[n,r]);let o=!ps&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||o)&&!n&&(n=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(n=n*this._options.fastScrollSensitivity,r=r*this._options.fastScrollSensitivity);let a=this._scrollable.getFutureScrollPosition(),l={};if(r){let c=rw*r,h=a.scrollTop-(c<0?Math.floor(c):Math.ceil(c));this._verticalScrollbar.writeScrollPosition(l,h)}if(n){let c=rw*n,h=a.scrollLeft-(c<0?Math.floor(c):Math.ceil(c));this._horizontalScrollbar.writeScrollPosition(l,h)}l=this._scrollable.validateScrollPosition(l),(a.scrollLeft!==l.scrollLeft||a.scrollTop!==l.scrollTop)&&(nw&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),i=!0)}let s=i;!s&&this._options.alwaysConsumeMouseWheel&&(s=!0),!s&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(s=!0),s&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,s=i?" left":"",r=t?" top":"",n=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${s}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${n}${r}${s}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),n4)}},c4=class extends l4{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function h4(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,ps&&(t.className+=" mac"),t}var kg=class extends X{constructor(e,t,i,s,r,n,o,a){super(),this._bufferService=i,this._optionsService=o,this._renderService=a,this._onRequestScrollLines=this._register(new z),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let l=this._register(new Z6({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:c=>Wh(s.window,c)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{l.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new c4(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},l)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(r.onProtocolChange(c=>{this._scrollableElement.updateOptions({handleMouseWheel:!(c&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(Tt.runAndSubscribe(n.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=n.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Ce(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=s.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Ce(()=>this._styleElement.remove())),this._register(Tt.runAndSubscribe(n.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${n.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${n.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${n.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
|
|
39
39
|
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(c=>this._handleScroll(c)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),i=t-this._bufferService.buffer.ydisp;i!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(i)),this._isHandlingScroll=!1}};kg=Pe([q(2,$t),q(3,Is),q(4,Fw),q(5,zo),q(6,Kt),q(7,Fs)],kg);var xg=class extends X{constructor(e,t,i,s,r){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=i,this._decorationService=s,this._renderService=r,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(n=>this._removeDecoration(n))),this._register(Ce(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",e?.options?.layer==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let i=e.options.x??0;return i&&i>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let i=this._decorationElements.get(e);i||(i=this._createElement(e),e.element=i,this._decorationElements.set(e,i),this._container.appendChild(i),e.onDispose(()=>{this._decorationElements.delete(e),i.remove()})),i.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(i.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,i.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,i.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,i.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(i)}}_refreshXPosition(e,t=e.element){if(!t)return;let i=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=i?`${i*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=i?`${i*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};xg=Pe([q(1,$t),q(2,Is),q(3,bl),q(4,Fs)],xg);var u4=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,i){return t>=e.startBufferLine-this._linePadding[i||"full"]&&t<=e.endBufferLine+this._linePadding[i||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},us={full:0,left:0,center:0,right:0},Or={full:0,left:0,center:0,right:0},tl={full:0,left:0,center:0,right:0},Vh=class extends X{constructor(e,t,i,s,r,n,o,a){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=i,this._decorationService=s,this._renderService=r,this._optionsService=n,this._themeService=o,this._coreBrowserService=a,this._colorZoneStore=new u4,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(Ce(()=>this._canvas?.remove()));let l=this._canvas.getContext("2d");if(l)this._ctx=l;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Or.full=this._canvas.width,Or.left=e,Or.center=t,Or.right=e,this._refreshDrawHeightConstants(),tl.full=1,tl.left=1,tl.center=1+Or.left,tl.right=1+Or.left+Or.center}_refreshDrawHeightConstants(){us.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);us.left=t,us.center=t,us.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*us.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*us.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*us.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*us.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(tl[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-us[e.position||"full"]/2),Or[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+us[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};Vh=Pe([q(2,$t),q(3,bl),q(4,Fs),q(5,Kt),q(6,zo),q(7,Is)],Vh);var D;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
|
|
40
|
-
`,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(D||={});var Ph;(e=>(e.PAD="",e.HOP="",e.BPH="",e.NBH="",e.IND="",e.NEL="
",e.SSA="",e.ESA="",e.HTS="",e.HTJ="",e.VTS="",e.PLD="",e.PLU="",e.RI="",e.SS2="",e.SS3="",e.DCS="",e.PU1="",e.PU2="",e.STS="",e.CCH="",e.MW="",e.SPA="",e.EPA="",e.SOS="",e.SGCI="",e.SCI="",e.CSI="",e.ST="",e.OSC="",e.PM="",e.APC=""))(Ph||={});var vS;(e=>e.ST=`${D.ESC}\\`)(vS||={});var Cg=class{constructor(e,t,i,s,r,n){this._textarea=e,this._compositionView=t,this._bufferService=i,this._optionsService=s,this._coreService=r,this._renderService=n,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let i;t.start+=this._dataAlreadySent.length,this._isComposing?i=this._textarea.value.substring(t.start,this._compositionPosition.start):i=this._textarea.value.substring(t.start),i.length>0&&this._coreService.triggerDataEvent(i,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,i=t.replace(e,"");this._dataAlreadySent=i,t.length>e.length?this._coreService.triggerDataEvent(i,!0):t.length<e.length?this._coreService.triggerDataEvent(`${D.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),i=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let n=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(n.width,1)+"px",this._textarea.style.height=Math.max(n.height,1)+"px",this._textarea.style.lineHeight=n.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};Cg=Pe([q(2,$t),q(3,Kt),q(4,An),q(5,Fs)],Cg);var ht=0,ut=0,dt=0,Ue=0,ow={css:"#00000000",rgba:0},Xe;(e=>{function t(r,n,o,a){return a!==void 0?`#${wn(r)}${wn(n)}${wn(o)}${wn(a)}`:`#${wn(r)}${wn(n)}${wn(o)}`}e.toCss=t;function i(r,n,o,a=255){return(r<<24|n<<16|o<<8|a)>>>0}e.toRgba=i;function s(r,n,o,a){return{css:e.toCss(r,n,o,a),rgba:e.toRgba(r,n,o,a)}}e.toColor=s})(Xe||={});var xe;(e=>{function t(l,c){if(Ue=(c.rgba&255)/255,Ue===1)return{css:c.css,rgba:c.rgba};let h=c.rgba>>24&255,u=c.rgba>>16&255,d=c.rgba>>8&255,f=l.rgba>>24&255,g=l.rgba>>16&255,b=l.rgba>>8&255;ht=f+Math.round((h-f)*Ue),ut=g+Math.round((u-g)*Ue),dt=b+Math.round((d-b)*Ue);let T=Xe.toCss(ht,ut,dt),_=Xe.toRgba(ht,ut,dt);return{css:T,rgba:_}}e.blend=t;function i(l){return(l.rgba&255)===255}e.isOpaque=i;function s(l,c,h){let u=qh.ensureContrastRatio(l.rgba,c.rgba,h);if(u)return Xe.toColor(u>>24&255,u>>16&255,u>>8&255)}e.ensureContrastRatio=s;function r(l){let c=(l.rgba|255)>>>0;return[ht,ut,dt]=qh.toChannels(c),{css:Xe.toCss(ht,ut,dt),rgba:c}}e.opaque=r;function n(l,c){return Ue=Math.round(c*255),[ht,ut,dt]=qh.toChannels(l.rgba),{css:Xe.toCss(ht,ut,dt,Ue),rgba:Xe.toRgba(ht,ut,dt,Ue)}}e.opacity=n;function o(l,c){return Ue=l.rgba&255,n(l,Ue*c/255)}e.multiplyOpacity=o;function a(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}e.toColorRGB=a})(xe||={});var Ne;(e=>{let t,i;try{let r=document.createElement("canvas");r.width=1,r.height=1;let n=r.getContext("2d",{willReadFrequently:!0});n&&(t=n,t.globalCompositeOperation="copy",i=t.createLinearGradient(0,0,1,1))}catch{}function s(r){if(r.match(/#[\da-f]{3,8}/i))switch(r.length){case 4:return ht=parseInt(r.slice(1,2).repeat(2),16),ut=parseInt(r.slice(2,3).repeat(2),16),dt=parseInt(r.slice(3,4).repeat(2),16),Xe.toColor(ht,ut,dt);case 5:return ht=parseInt(r.slice(1,2).repeat(2),16),ut=parseInt(r.slice(2,3).repeat(2),16),dt=parseInt(r.slice(3,4).repeat(2),16),Ue=parseInt(r.slice(4,5).repeat(2),16),Xe.toColor(ht,ut,dt,Ue);case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}let n=r.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(n)return ht=parseInt(n[1]),ut=parseInt(n[2]),dt=parseInt(n[3]),Ue=Math.round((n[5]===void 0?1:parseFloat(n[5]))*255),Xe.toColor(ht,ut,dt,Ue);if(!t||!i)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=i,t.fillStyle=r,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[ht,ut,dt,Ue]=t.getImageData(0,0,1,1).data,Ue!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Xe.toRgba(ht,ut,dt,Ue),css:r}}e.toColor=s})(Ne||={});var Ft;(e=>{function t(s){return i(s>>16&255,s>>8&255,s&255)}e.relativeLuminance=t;function i(s,r,n){let o=s/255,a=r/255,l=n/255,c=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),h=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),u=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return c*.2126+h*.7152+u*.0722}e.relativeLuminance2=i})(Ft||={});var qh;(e=>{function t(o,a){if(Ue=(a&255)/255,Ue===1)return a;let l=a>>24&255,c=a>>16&255,h=a>>8&255,u=o>>24&255,d=o>>16&255,f=o>>8&255;return ht=u+Math.round((l-u)*Ue),ut=d+Math.round((c-d)*Ue),dt=f+Math.round((h-f)*Ue),Xe.toRgba(ht,ut,dt)}e.blend=t;function i(o,a,l){let c=Ft.relativeLuminance(o>>8),h=Ft.relativeLuminance(a>>8);if(Hs(c,h)<l){if(h<c){let f=s(o,a,l),g=Hs(c,Ft.relativeLuminance(f>>8));if(g<l){let b=r(o,a,l),T=Hs(c,Ft.relativeLuminance(b>>8));return g>T?f:b}return f}let u=r(o,a,l),d=Hs(c,Ft.relativeLuminance(u>>8));if(d<l){let f=s(o,a,l),g=Hs(c,Ft.relativeLuminance(f>>8));return d>g?u:f}return u}}e.ensureContrastRatio=i;function s(o,a,l){let c=o>>24&255,h=o>>16&255,u=o>>8&255,d=a>>24&255,f=a>>16&255,g=a>>8&255,b=Hs(Ft.relativeLuminance2(d,f,g),Ft.relativeLuminance2(c,h,u));for(;b<l&&(d>0||f>0||g>0);)d-=Math.max(0,Math.ceil(d*.1)),f-=Math.max(0,Math.ceil(f*.1)),g-=Math.max(0,Math.ceil(g*.1)),b=Hs(Ft.relativeLuminance2(d,f,g),Ft.relativeLuminance2(c,h,u));return(d<<24|f<<16|g<<8|255)>>>0}e.reduceLuminance=s;function r(o,a,l){let c=o>>24&255,h=o>>16&255,u=o>>8&255,d=a>>24&255,f=a>>16&255,g=a>>8&255,b=Hs(Ft.relativeLuminance2(d,f,g),Ft.relativeLuminance2(c,h,u));for(;b<l&&(d<255||f<255||g<255);)d=Math.min(255,d+Math.ceil((255-d)*.1)),f=Math.min(255,f+Math.ceil((255-f)*.1)),g=Math.min(255,g+Math.ceil((255-g)*.1)),b=Hs(Ft.relativeLuminance2(d,f,g),Ft.relativeLuminance2(c,h,u));return(d<<24|f<<16|g<<8|255)>>>0}e.increaseLuminance=r;function n(o){return[o>>24&255,o>>16&255,o>>8&255,o&255]}e.toChannels=n})(qh||={});function wn(e){let t=e.toString(16);return t.length<2?"0"+t:t}function Hs(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var d4=class extends yl{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},jh=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Oi}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let i=[],s=t.translateToString(!0),r=0,n=0,o=0,a=t.getFg(0),l=t.getBg(0);for(let c=0;c<t.getTrimmedLength();c++)if(t.loadCell(c,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==a||this._workCell.bg!==l){if(c-r>1){let h=this._getJoinedRanges(s,o,n,t,r);for(let u=0;u<h.length;u++)i.push(h[u])}r=c,o=n,a=this._workCell.fg,l=this._workCell.bg}n+=this._workCell.getChars().length||Ur.length}if(this._bufferService.cols-r>1){let c=this._getJoinedRanges(s,o,n,t,r);for(let h=0;h<c.length;h++)i.push(c[h])}return i}_getJoinedRanges(e,t,i,s,r){let n=e.substring(t,i),o=[];try{o=this._characterJoiners[0].handler(n)}catch(a){console.error(a)}for(let a=1;a<this._characterJoiners.length;a++)try{let l=this._characterJoiners[a].handler(n);for(let c=0;c<l.length;c++)jh._mergeRanges(o,l[c])}catch(l){console.error(l)}return this._stringRangesToCellRanges(o,s,r),o}_stringRangesToCellRanges(e,t,i){let s=0,r=!1,n=0,o=e[s];if(o){for(let a=i;a<this._bufferService.cols;a++){let l=t.getWidth(a),c=t.getString(a).length||Ur.length;if(l!==0){if(!r&&o[0]<=n&&(o[0]=a,r=!0),o[1]<=n){if(o[1]=a,o=e[++s],!o)break;o[0]<=n?(o[0]=a,r=!0):r=!1}n+=c}}o&&(o[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let i=!1;for(let s=0;s<e.length;s++){let r=e[s];if(i){if(t[1]<=r[0])return e[s-1][1]=t[1],e;if(t[1]<=r[1])return e[s-1][1]=Math.max(t[1],r[1]),e.splice(s,1),e;e.splice(s,1),s--}else{if(t[1]<=r[0])return e.splice(s,0,t),e;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),e;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),i=!0);continue}}return i?e[e.length-1][1]=t[1]:e.push(t),e}};jh=Pe([q(0,$t)],jh);function f4(e){return 57508<=e&&e<=57558}function p4(e){return 9472<=e&&e<=9631}function g4(e){return f4(e)||p4(e)}function m4(){return{css:{canvas:Ah(),cell:Ah()},device:{canvas:Ah(),cell:Ah(),char:{width:0,height:0,left:0,top:0}}}}function Ah(){return{width:0,height:0}}var Eg=class{constructor(e,t,i,s,r,n,o){this._document=e,this._characterJoinerService=t,this._optionsService=i,this._coreBrowserService=s,this._coreService=r,this._decorationService=n,this._themeService=o,this._workCell=new Oi,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,i){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i}createRow(e,t,i,s,r,n,o,a,l,c,h){let u=[],d=this._characterJoinerService.getJoinedCharacters(t),f=this._themeService.colors,g=e.getNoBgTrimmedLength();i&&g<n+1&&(g=n+1);let b,T=0,_="",m=0,v=0,p=0,E=0,A=!1,L=0,B=!1,K=0,$=0,P=[],Rt=c!==-1&&h!==-1;for(let S=0;S<g;S++){e.loadCell(S,this._workCell);let y=this._workCell.getWidth();if(y===0)continue;let k=!1,w=S>=$,C=S,x=this._workCell;if(d.length>0&&S===d[0][0]&&w){let oe=d.shift(),tr=this._isCellInSelection(oe[0],t);for(m=oe[0]+1;m<oe[1];m++)w&&=tr===this._isCellInSelection(m,t);w&&=!i||n<oe[0]||n>=oe[1],w?(k=!0,x=new d4(this._workCell,e.translateToString(!0,oe[0],oe[1]),oe[1]-oe[0]),C=oe[1]-1,y=x.getWidth()):$=oe[1]}let M=this._isCellInSelection(S,t),N=i&&S===n,I=Rt&&S>=c&&S<=h,ie=!1;this._decorationService.forEachDecorationAtCell(S,t,void 0,oe=>{ie=!0});let Z=x.getChars()||Ur;if(Z===" "&&(x.isUnderline()||x.isOverline())&&(Z=" "),K=y*a-l.get(Z,x.isBold(),x.isItalic()),!b)b=this._document.createElement("span");else if(T&&(M&&B||!M&&!B&&x.bg===v)&&(M&&B&&f.selectionForeground||x.fg===p)&&x.extended.ext===E&&I===A&&K===L&&!N&&!k&&!ie&&w){x.isInvisible()?_+=Ur:_+=Z,T++;continue}else T&&(b.textContent=_),b=this._document.createElement("span"),T=0,_="";if(v=x.bg,p=x.fg,E=x.extended.ext,A=I,L=K,B=M,k&&n>=S&&n<=C&&(n=S),!this._coreService.isCursorHidden&&N&&this._coreService.isCursorInitialized){if(P.push("xterm-cursor"),this._coreBrowserService.isFocused)o&&P.push("xterm-cursor-blink"),P.push(s==="bar"?"xterm-cursor-bar":s==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(r)switch(r){case"outline":P.push("xterm-cursor-outline");break;case"block":P.push("xterm-cursor-block");break;case"bar":P.push("xterm-cursor-bar");break;case"underline":P.push("xterm-cursor-underline");break;default:break}}if(x.isBold()&&P.push("xterm-bold"),x.isItalic()&&P.push("xterm-italic"),x.isDim()&&P.push("xterm-dim"),x.isInvisible()?_=Ur:_=x.getChars()||Ur,x.isUnderline()&&(P.push(`xterm-underline-${x.extended.underlineStyle}`),_===" "&&(_=" "),!x.isUnderlineColorDefault()))if(x.isUnderlineColorRGB())b.style.textDecorationColor=`rgb(${yl.toColorRGB(x.getUnderlineColor()).join(",")})`;else{let oe=x.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&x.isBold()&&oe<8&&(oe+=8),b.style.textDecorationColor=f.ansi[oe].css}x.isOverline()&&(P.push("xterm-overline"),_===" "&&(_=" ")),x.isStrikethrough()&&P.push("xterm-strikethrough"),I&&(b.style.textDecoration="underline");let se=x.getFgColor(),We=x.getFgColorMode(),ne=x.getBgColor(),Re=x.getBgColorMode(),he=!!x.isInverse();if(he){let oe=se;se=ne,ne=oe;let tr=We;We=Re,Re=tr}let Oe,er,Gi=!1;this._decorationService.forEachDecorationAtCell(S,t,void 0,oe=>{oe.options.layer!=="top"&&Gi||(oe.backgroundColorRGB&&(Re=50331648,ne=oe.backgroundColorRGB.rgba>>8&16777215,Oe=oe.backgroundColorRGB),oe.foregroundColorRGB&&(We=50331648,se=oe.foregroundColorRGB.rgba>>8&16777215,er=oe.foregroundColorRGB),Gi=oe.options.layer==="top")}),!Gi&&M&&(Oe=this._coreBrowserService.isFocused?f.selectionBackgroundOpaque:f.selectionInactiveBackgroundOpaque,ne=Oe.rgba>>8&16777215,Re=50331648,Gi=!0,f.selectionForeground&&(We=50331648,se=f.selectionForeground.rgba>>8&16777215,er=f.selectionForeground)),Gi&&P.push("xterm-decoration-top");let si;switch(Re){case 16777216:case 33554432:si=f.ansi[ne],P.push(`xterm-bg-${ne}`);break;case 50331648:si=Xe.toColor(ne>>16,ne>>8&255,ne&255),this._addStyle(b,`background-color:#${aw((ne>>>0).toString(16),"0",6)}`);break;default:he?(si=f.foreground,P.push("xterm-bg-257")):si=f.background}switch(Oe||x.isDim()&&(Oe=xe.multiplyOpacity(si,.5)),We){case 16777216:case 33554432:x.isBold()&&se<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(se+=8),this._applyMinimumContrast(b,si,f.ansi[se],x,Oe,void 0)||P.push(`xterm-fg-${se}`);break;case 50331648:let oe=Xe.toColor(se>>16&255,se>>8&255,se&255);this._applyMinimumContrast(b,si,oe,x,Oe,er)||this._addStyle(b,`color:#${aw(se.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(b,si,f.foreground,x,Oe,er)||he&&P.push("xterm-fg-257")}P.length&&(b.className=P.join(" "),P.length=0),!N&&!k&&!ie&&w?T++:b.textContent=_,K!==this.defaultSpacing&&(b.style.letterSpacing=`${K}px`),u.push(b),S=C}return b&&T&&(b.textContent=_),u}_applyMinimumContrast(e,t,i,s,r,n){if(this._optionsService.rawOptions.minimumContrastRatio===1||g4(s.getCode()))return!1;let o=this._getContrastCache(s),a;if(!r&&!n&&(a=o.getColor(t.rgba,i.rgba)),a===void 0){let l=this._optionsService.rawOptions.minimumContrastRatio/(s.isDim()?2:1);a=xe.ensureContrastRatio(r||t,n||i,l),o.setColor((r||t).rgba,(n||i).rgba,a??null)}return a?(this._addStyle(e,`color:${a.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let i=this._selectionStart,s=this._selectionEnd;return!i||!s?!1:this._columnSelectMode?i[0]<=s[0]?e>=i[0]&&t>=i[1]&&e<s[0]&&t<=s[1]:e<i[0]&&t>=i[1]&&e>=s[0]&&t<=s[1]:t>i[1]&&t<s[1]||i[1]===s[1]&&t===i[1]&&e>=i[0]&&e<s[0]||i[1]<s[1]&&t===s[1]&&e<s[0]||i[1]<s[1]&&t===i[1]&&e>=i[0]}};Eg=Pe([q(1,Ww),q(2,Kt),q(3,Is),q(4,An),q(5,bl),q(6,zo)],Eg);function aw(e,t,i){for(;e.length<i;)e=t+e;return e}var _4=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let i=e.createElement("span");i.classList.add("xterm-char-measure-element");let s=e.createElement("span");s.classList.add("xterm-char-measure-element"),s.style.fontWeight="bold";let r=e.createElement("span");r.classList.add("xterm-char-measure-element"),r.style.fontStyle="italic";let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold",n.style.fontStyle="italic",this._measureElements=[i,s,r,n],this._container.appendChild(i),this._container.appendChild(s),this._container.appendChild(r),this._container.appendChild(n),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,i,s){e===this._font&&t===this._fontSize&&i===this._weight&&s===this._weightBold||(this._font=e,this._fontSize=t,this._weight=i,this._weightBold=s,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${i}`,this._measureElements[1].style.fontWeight=`${s}`,this._measureElements[2].style.fontWeight=`${i}`,this._measureElements[3].style.fontWeight=`${s}`,this.clear())}get(e,t,i){let s=0;if(!t&&!i&&e.length===1&&(s=e.charCodeAt(0))<256){if(this._flat[s]!==-9999)return this._flat[s];let o=this._measure(e,0);return o>0&&(this._flat[s]=o),o}let r=e;t&&(r+="B"),i&&(r+="I");let n=this._holey.get(r);if(n===void 0){let o=0;t&&(o|=1),i&&(o|=2),n=this._measure(e,o),n>0&&this._holey.set(r,n)}return n}_measure(e,t){let i=this._measureElements[t];return i.textContent=e.repeat(32),i.offsetWidth/32}},v4=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,i,s=!1){if(this.selectionStart=t,this.selectionEnd=i,!t||!i||t[0]===i[0]&&t[1]===i[1]){this.clear();return}let r=e.buffers.active.ydisp,n=t[1]-r,o=i[1]-r,a=Math.max(n,0),l=Math.min(o,e.rows-1);if(a>=e.rows||l<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=s,this.viewportStartRow=n,this.viewportEndRow=o,this.viewportCappedStartRow=a,this.viewportCappedEndRow=l,this.startCol=t[0],this.endCol=i[0]}isCellSelected(e,t,i){return this.hasSelection?(i-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&i>=this.viewportCappedStartRow&&t<this.endCol&&i<=this.viewportCappedEndRow:t<this.startCol&&i>=this.viewportCappedStartRow&&t>=this.endCol&&i<=this.viewportCappedEndRow:i>this.viewportStartRow&&i<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol):!1}};function y4(){return new v4}var Yp="xterm-dom-renderer-owner-",Di="xterm-rows",Mh="xterm-fg-",lw="xterm-bg-",il="xterm-focus",Rh="xterm-selection",b4=1,Tg=class extends X{constructor(e,t,i,s,r,n,o,a,l,c,h,u,d,f){super(),this._terminal=e,this._document=t,this._element=i,this._screenElement=s,this._viewportElement=r,this._helperContainer=n,this._linkifier2=o,this._charSizeService=l,this._optionsService=c,this._bufferService=h,this._coreService=u,this._coreBrowserService=d,this._themeService=f,this._terminalClass=b4++,this._rowElements=[],this._selectionRenderModel=y4(),this.onRequestRedraw=this._register(new z).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Di),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(Rh),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=m4(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(g=>this._injectCss(g))),this._injectCss(this._themeService.colors),this._rowFactory=a.createInstance(Eg,document),this._element.classList.add(Yp+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(g=>this._handleLinkHover(g))),this._register(this._linkifier2.onHideLinkUnderline(g=>this._handleLinkLeave(g))),this._register(Ce(()=>{this._element.classList.remove(Yp+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new _4(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let i of this._rowElements)i.style.width=`${this.dimensions.css.canvas.width}px`,i.style.height=`${this.dimensions.css.cell.height}px`,i.style.lineHeight=`${this.dimensions.css.cell.height}px`,i.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${Di} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${Di} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${Di} .xterm-dim { color: ${xe.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let i=`blink_underline_${this._terminalClass}`,s=`blink_bar_${this._terminalClass}`,r=`blink_block_${this._terminalClass}`;t+=`@keyframes ${i} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${s} { 50% { box-shadow: none; }}`,t+=`@keyframes ${r} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Di}.${il} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${Di}.${il} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${s} 1s step-end infinite;}${this._terminalSelector} .${Di}.${il} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${Di} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Di} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Di} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Di} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Di} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${Rh} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Rh} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Rh} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[n,o]of e.ansi.entries())t+=`${this._terminalSelector} .${Mh}${n} { color: ${o.css}; }${this._terminalSelector} .${Mh}${n}.xterm-dim { color: ${xe.multiplyOpacity(o,.5).css}; }${this._terminalSelector} .${lw}${n} { background-color: ${o.css}; }`;t+=`${this._terminalSelector} .${Mh}257 { color: ${xe.opaque(e.background).css}; }${this._terminalSelector} .${Mh}257.xterm-dim { color: ${xe.multiplyOpacity(xe.opaque(e.background),.5).css}; }${this._terminalSelector} .${lw}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let i=this._rowElements.length;i<=t;i++){let s=this._document.createElement("div");this._rowContainer.appendChild(s),this._rowElements.push(s)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(il),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(il),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,i){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,i),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,i),!this._selectionRenderModel.hasSelection))return;let s=this._selectionRenderModel.viewportStartRow,r=this._selectionRenderModel.viewportEndRow,n=this._selectionRenderModel.viewportCappedStartRow,o=this._selectionRenderModel.viewportCappedEndRow,a=this._document.createDocumentFragment();if(i){let l=e[0]>t[0];a.appendChild(this._createSelectionElement(n,l?t[0]:e[0],l?e[0]:t[0],o-n+1))}else{let l=s===n?e[0]:0,c=n===r?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(n,l,c));let h=o-n-1;if(a.appendChild(this._createSelectionElement(n+1,0,this._bufferService.cols,h)),n!==o){let u=r===o?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(o,0,u))}}this._selectionContainer.appendChild(a)}_createSelectionElement(e,t,i,s=1){let r=this._document.createElement("div"),n=t*this.dimensions.css.cell.width,o=this.dimensions.css.cell.width*(i-t);return n+o>this.dimensions.css.canvas.width&&(o=this.dimensions.css.canvas.width-n),r.style.height=`${s*this.dimensions.css.cell.height}px`,r.style.top=`${e*this.dimensions.css.cell.height}px`,r.style.left=`${n}px`,r.style.width=`${o}px`,r}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let i=this._bufferService.buffer,s=i.ybase+i.y,r=Math.min(i.x,this._bufferService.cols-1),n=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,o=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,a=this._optionsService.rawOptions.cursorInactiveStyle;for(let l=e;l<=t;l++){let c=l+i.ydisp,h=this._rowElements[l],u=i.lines.get(c);if(!h||!u)break;h.replaceChildren(...this._rowFactory.createRow(u,c,c===s,o,a,r,n,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${Yp}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,i,s,r,n){i<0&&(e=0),s<0&&(t=0);let o=this._bufferService.rows-1;i=Math.max(Math.min(i,o),0),s=Math.max(Math.min(s,o),0),r=Math.min(r,this._bufferService.cols);let a=this._bufferService.buffer,l=a.ybase+a.y,c=Math.min(a.x,r-1),h=this._optionsService.rawOptions.cursorBlink,u=this._optionsService.rawOptions.cursorStyle,d=this._optionsService.rawOptions.cursorInactiveStyle;for(let f=i;f<=s;++f){let g=f+a.ydisp,b=this._rowElements[f],T=a.lines.get(g);if(!b||!T)break;b.replaceChildren(...this._rowFactory.createRow(T,g,g===l,u,d,c,h,this.dimensions.css.cell.width,this._widthCache,n?f===i?e:0:-1,n?(f===s?t:r)-1:-1))}}};Tg=Pe([q(7,Ig),q(8,Qh),q(9,Kt),q(10,$t),q(11,An),q(12,Is),q(13,zo)],Tg);var Ag=class extends X{constructor(e,t,i){super(),this._optionsService=i,this.width=0,this.height=0,this._onCharSizeChange=this._register(new z),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new S4(this._optionsService))}catch{this._measureStrategy=this._register(new w4(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};Ag=Pe([q(2,Kt)],Ag);var yS=class extends X{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},w4=class extends yS{constructor(e,t,i){super(),this._document=e,this._parentElement=t,this._optionsService=i,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},S4=class extends yS{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},k4=class extends X{constructor(e,t,i){super(),this._textarea=e,this._window=t,this.mainDocument=i,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new x4(this._window)),this._onDprChange=this._register(new z),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new z),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(s=>this._screenDprMonitor.setWindow(s))),this._register(Tt.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(V(this._textarea,"focus",()=>this._isFocused=!0)),this._register(V(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},x4=class extends X{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new Oo),this._onDprChange=this._register(new z),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Ce(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=V(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},C4=class extends X{constructor(){super(),this.linkProviders=[],this._register(Ce(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function Yg(e,t,i){let s=i.getBoundingClientRect(),r=e.getComputedStyle(i),n=parseInt(r.getPropertyValue("padding-left")),o=parseInt(r.getPropertyValue("padding-top"));return[t.clientX-s.left-n,t.clientY-s.top-o]}function E4(e,t,i,s,r,n,o,a,l){if(!n)return;let c=Yg(e,t,i);if(c)return c[0]=Math.ceil((c[0]+(l?o/2:0))/o),c[1]=Math.ceil(c[1]/a),c[0]=Math.min(Math.max(c[0],1),s+(l?1:0)),c[1]=Math.min(Math.max(c[1],1),r),c}var Mg=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,i,s,r){return E4(window,e,t,i,s,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,r)}getMouseReportCoords(e,t){let i=Yg(window,e,t);if(this._charSizeService.hasValidSize)return i[0]=Math.min(Math.max(i[0],0),this._renderService.dimensions.css.canvas.width-1),i[1]=Math.min(Math.max(i[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(i[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(i[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(i[0]),y:Math.floor(i[1])}}};Mg=Pe([q(0,Fs),q(1,Qh)],Mg);var T4=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},bS={};hE(bS,{getSafariVersion:()=>M4,isChromeOS:()=>xS,isFirefox:()=>wS,isIpad:()=>R4,isIphone:()=>L4,isLegacyEdge:()=>A4,isLinux:()=>Xg,isMac:()=>Gh,isNode:()=>tu,isSafari:()=>SS,isWindows:()=>kS});var tu=typeof process<"u"&&"title"in process,wl=tu?"node":navigator.userAgent,Sl=tu?"node":navigator.platform,wS=wl.includes("Firefox"),A4=wl.includes("Edge"),SS=/^((?!chrome|android).)*safari/i.test(wl);function M4(){if(!SS)return 0;let e=wl.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Gh=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Sl),R4=Sl==="iPad",L4=Sl==="iPhone",kS=["Windows","Win16","Win32","WinCE"].includes(Sl),Xg=Sl.indexOf("Linux")>=0,xS=/\bCrOS\b/.test(wl),CS=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,i=0,s=e.timeRemaining(),r=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),i=Math.max(t,i),r=e.timeRemaining(),i*1.5>r){s-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),this._start();return}s=r}this.clear()}},D4=class extends CS{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},N4=class extends CS{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},Yh=!tu&&"requestIdleCallback"in window?N4:D4,B4=class{constructor(){this._queue=new Yh}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},Rg=class extends X{constructor(e,t,i,s,r,n,o,a,l){super(),this._rowCount=e,this._optionsService=i,this._charSizeService=s,this._coreService=r,this._coreBrowserService=a,this._renderer=this._register(new Oo),this._pausedResizeTask=new B4,this._observerDisposable=this._register(new Oo),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new z),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new z),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new z),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new z),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new T4((c,h)=>this._renderRows(c,h),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new O4(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Ce(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(o.onResize(()=>this._fullRefresh())),this._register(o.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(n.onDecorationRegistered(()=>this._fullRefresh())),this._register(n.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(o.cols,o.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(o.buffer.y,o.buffer.y,!0))),this._register(l.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(c=>this._registerIntersectionObserver(c,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let i=new e.IntersectionObserver(s=>this._handleIntersectionChange(s[s.length-1]),{threshold:0});i.observe(t),this._observerDisposable.value=Ce(()=>i.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,i=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let s=this._syncOutputHandler.flush();s&&(e=Math.min(e,s.start),t=Math.max(t,s.end)),i||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,i){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=i,this._renderer.value?.handleSelectionChanged(e,t,i)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};Rg=Pe([q(2,Kt),q(3,Qh),q(4,An),q(5,bl),q(6,$t),q(7,Is),q(8,zo)],Rg);var O4=class{constructor(e,t,i){this._coreBrowserService=e,this._coreService=t,this._onTimeout=i,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function z4(e,t,i,s){let r=i.buffer.x,n=i.buffer.y;if(!i.buffer.hasScrollback)return P4(r,n,e,t,i,s)+iu(n,t,i,s)+q4(r,n,e,t,i,s);let o;if(n===t)return o=r>e?"D":"C",_l(Math.abs(r-e),ml(o,s));o=n>t?"D":"C";let a=Math.abs(n-t),l=U4(n>t?e:r,i)+(a-1)*i.cols+1+H4(n>t?r:e,i);return _l(l,ml(o,s))}function H4(e,t){return e-1}function U4(e,t){return t.cols-e}function P4(e,t,i,s,r,n){return iu(t,s,r,n).length===0?"":_l(TS(e,t,e,t-Tn(t,r),!1,r).length,ml("D",n))}function iu(e,t,i,s){let r=e-Tn(e,i),n=t-Tn(t,i),o=Math.abs(r-n)-I4(e,t,i);return _l(o,ml(ES(e,t),s))}function q4(e,t,i,s,r,n){let o;iu(t,s,r,n).length>0?o=s-Tn(s,r):o=t;let a=s,l=F4(e,t,i,s,r,n);return _l(TS(e,o,i,a,l==="C",r).length,ml(l,n))}function I4(e,t,i){let s=0,r=e-Tn(e,i),n=t-Tn(t,i);for(let o=0;o<Math.abs(r-n);o++){let a=ES(e,t)==="A"?-1:1;i.buffer.lines.get(r+a*o)?.isWrapped&&s++}return s}function Tn(e,t){let i=0,s=t.buffer.lines.get(e),r=s?.isWrapped;for(;r&&e>=0&&e<t.rows;)i++,s=t.buffer.lines.get(--e),r=s?.isWrapped;return i}function F4(e,t,i,s,r,n){let o;return iu(i,s,r,n).length>0?o=s-Tn(s,r):o=t,e<i&&o<=s||e>=i&&o<s?"C":"D"}function ES(e,t){return e>t?"A":"B"}function TS(e,t,i,s,r,n){let o=e,a=t,l="";for(;(o!==i||a!==s)&&a>=0&&a<n.buffer.lines.length;)o+=r?1:-1,r&&o>n.cols-1?(l+=n.buffer.translateBufferLineToString(a,!1,e,o),o=0,e=0,a++):!r&&o<0&&(l+=n.buffer.translateBufferLineToString(a,!1,0,e+1),o=n.cols-1,e=o,a--);return l+n.buffer.translateBufferLineToString(a,!1,e,o)}function ml(e,t){let i=t?"O":"[";return D.ESC+i+e}function _l(e,t){e=Math.floor(e);let i="";for(let s=0;s<e;s++)i+=t;return i}var $4=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function cw(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var Xp=50,K4=15,W4=50,V4=500,j4=" ",G4=new RegExp(j4,"g"),Lg=class extends X{constructor(e,t,i,s,r,n,o,a,l){super(),this._element=e,this._screenElement=t,this._linkifier=i,this._bufferService=s,this._coreService=r,this._mouseService=n,this._optionsService=o,this._renderService=a,this._coreBrowserService=l,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new Oi,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new z),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new z),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new z),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new z),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=c=>this._handleMouseMove(c),this._mouseUpListener=c=>this._handleMouseUp(c),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(c=>this._handleTrim(c)),this._register(this._bufferService.buffers.onBufferActivate(c=>this._handleBufferActivate(c))),this.enable(),this._model=new $4(this._bufferService),this._activeSelectionMode=0,this._register(Ce(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(c=>{c.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let i=this._bufferService.buffer,s=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let r=e[0]<t[0]?e[0]:t[0],n=e[0]<t[0]?t[0]:e[0];for(let o=e[1];o<=t[1];o++){let a=i.translateBufferLineToString(o,!0,r,n);s.push(a)}}else{let r=e[1]===t[1]?t[0]:void 0;s.push(i.translateBufferLineToString(e[1],!0,e[0],r));for(let n=e[1]+1;n<=t[1]-1;n++){let o=i.lines.get(n),a=i.translateBufferLineToString(n,!0);o?.isWrapped?s[s.length-1]+=a:s.push(a)}if(e[1]!==t[1]){let n=i.lines.get(t[1]),o=i.translateBufferLineToString(t[1],!0,0,t[0]);n&&n.isWrapped?s[s.length-1]+=o:s.push(o)}}return s.map(r=>r.replace(G4," ")).join(kS?`\r
|
|
40
|
+
`,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(D||={});var Ph;(e=>(e.PAD="",e.HOP="",e.BPH="",e.NBH="",e.IND="",e.NEL="
",e.SSA="",e.ESA="",e.HTS="",e.HTJ="",e.VTS="",e.PLD="",e.PLU="",e.RI="",e.SS2="",e.SS3="",e.DCS="",e.PU1="",e.PU2="",e.STS="",e.CCH="",e.MW="",e.SPA="",e.EPA="",e.SOS="",e.SGCI="",e.SCI="",e.CSI="",e.ST="",e.OSC="",e.PM="",e.APC=""))(Ph||={});var vS;(e=>e.ST=`${D.ESC}\\`)(vS||={});var Cg=class{constructor(e,t,i,s,r,n){this._textarea=e,this._compositionView=t,this._bufferService=i,this._optionsService=s,this._coreService=r,this._renderService=n,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let i;t.start+=this._dataAlreadySent.length,this._isComposing?i=this._textarea.value.substring(t.start,this._compositionPosition.start):i=this._textarea.value.substring(t.start),i.length>0&&this._coreService.triggerDataEvent(i,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,i=t.replace(e,"");this._dataAlreadySent=i,t.length>e.length?this._coreService.triggerDataEvent(i,!0):t.length<e.length?this._coreService.triggerDataEvent(`${D.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),i=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let n=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(n.width,1)+"px",this._textarea.style.height=Math.max(n.height,1)+"px",this._textarea.style.lineHeight=n.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};Cg=Pe([q(2,$t),q(3,Kt),q(4,An),q(5,Fs)],Cg);var ht=0,ut=0,dt=0,Ue=0,ow={css:"#00000000",rgba:0},Xe;(e=>{function t(r,n,o,a){return a!==void 0?`#${wn(r)}${wn(n)}${wn(o)}${wn(a)}`:`#${wn(r)}${wn(n)}${wn(o)}`}e.toCss=t;function i(r,n,o,a=255){return(r<<24|n<<16|o<<8|a)>>>0}e.toRgba=i;function s(r,n,o,a){return{css:e.toCss(r,n,o,a),rgba:e.toRgba(r,n,o,a)}}e.toColor=s})(Xe||={});var xe;(e=>{function t(l,c){if(Ue=(c.rgba&255)/255,Ue===1)return{css:c.css,rgba:c.rgba};let h=c.rgba>>24&255,u=c.rgba>>16&255,d=c.rgba>>8&255,f=l.rgba>>24&255,g=l.rgba>>16&255,b=l.rgba>>8&255;ht=f+Math.round((h-f)*Ue),ut=g+Math.round((u-g)*Ue),dt=b+Math.round((d-b)*Ue);let T=Xe.toCss(ht,ut,dt),_=Xe.toRgba(ht,ut,dt);return{css:T,rgba:_}}e.blend=t;function i(l){return(l.rgba&255)===255}e.isOpaque=i;function s(l,c,h){let u=qh.ensureContrastRatio(l.rgba,c.rgba,h);if(u)return Xe.toColor(u>>24&255,u>>16&255,u>>8&255)}e.ensureContrastRatio=s;function r(l){let c=(l.rgba|255)>>>0;return[ht,ut,dt]=qh.toChannels(c),{css:Xe.toCss(ht,ut,dt),rgba:c}}e.opaque=r;function n(l,c){return Ue=Math.round(c*255),[ht,ut,dt]=qh.toChannels(l.rgba),{css:Xe.toCss(ht,ut,dt,Ue),rgba:Xe.toRgba(ht,ut,dt,Ue)}}e.opacity=n;function o(l,c){return Ue=l.rgba&255,n(l,Ue*c/255)}e.multiplyOpacity=o;function a(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}e.toColorRGB=a})(xe||={});var Ne;(e=>{let t,i;try{let r=document.createElement("canvas");r.width=1,r.height=1;let n=r.getContext("2d",{willReadFrequently:!0});n&&(t=n,t.globalCompositeOperation="copy",i=t.createLinearGradient(0,0,1,1))}catch{}function s(r){if(r.match(/#[\da-f]{3,8}/i))switch(r.length){case 4:return ht=parseInt(r.slice(1,2).repeat(2),16),ut=parseInt(r.slice(2,3).repeat(2),16),dt=parseInt(r.slice(3,4).repeat(2),16),Xe.toColor(ht,ut,dt);case 5:return ht=parseInt(r.slice(1,2).repeat(2),16),ut=parseInt(r.slice(2,3).repeat(2),16),dt=parseInt(r.slice(3,4).repeat(2),16),Ue=parseInt(r.slice(4,5).repeat(2),16),Xe.toColor(ht,ut,dt,Ue);case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}let n=r.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(n)return ht=parseInt(n[1]),ut=parseInt(n[2]),dt=parseInt(n[3]),Ue=Math.round((n[5]===void 0?1:parseFloat(n[5]))*255),Xe.toColor(ht,ut,dt,Ue);if(!t||!i)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=i,t.fillStyle=r,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[ht,ut,dt,Ue]=t.getImageData(0,0,1,1).data,Ue!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Xe.toRgba(ht,ut,dt,Ue),css:r}}e.toColor=s})(Ne||={});var Ft;(e=>{function t(s){return i(s>>16&255,s>>8&255,s&255)}e.relativeLuminance=t;function i(s,r,n){let o=s/255,a=r/255,l=n/255,c=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),h=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),u=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return c*.2126+h*.7152+u*.0722}e.relativeLuminance2=i})(Ft||={});var qh;(e=>{function t(o,a){if(Ue=(a&255)/255,Ue===1)return a;let l=a>>24&255,c=a>>16&255,h=a>>8&255,u=o>>24&255,d=o>>16&255,f=o>>8&255;return ht=u+Math.round((l-u)*Ue),ut=d+Math.round((c-d)*Ue),dt=f+Math.round((h-f)*Ue),Xe.toRgba(ht,ut,dt)}e.blend=t;function i(o,a,l){let c=Ft.relativeLuminance(o>>8),h=Ft.relativeLuminance(a>>8);if(Hs(c,h)<l){if(h<c){let f=s(o,a,l),g=Hs(c,Ft.relativeLuminance(f>>8));if(g<l){let b=r(o,a,l),T=Hs(c,Ft.relativeLuminance(b>>8));return g>T?f:b}return f}let u=r(o,a,l),d=Hs(c,Ft.relativeLuminance(u>>8));if(d<l){let f=s(o,a,l),g=Hs(c,Ft.relativeLuminance(f>>8));return d>g?u:f}return u}}e.ensureContrastRatio=i;function s(o,a,l){let c=o>>24&255,h=o>>16&255,u=o>>8&255,d=a>>24&255,f=a>>16&255,g=a>>8&255,b=Hs(Ft.relativeLuminance2(d,f,g),Ft.relativeLuminance2(c,h,u));for(;b<l&&(d>0||f>0||g>0);)d-=Math.max(0,Math.ceil(d*.1)),f-=Math.max(0,Math.ceil(f*.1)),g-=Math.max(0,Math.ceil(g*.1)),b=Hs(Ft.relativeLuminance2(d,f,g),Ft.relativeLuminance2(c,h,u));return(d<<24|f<<16|g<<8|255)>>>0}e.reduceLuminance=s;function r(o,a,l){let c=o>>24&255,h=o>>16&255,u=o>>8&255,d=a>>24&255,f=a>>16&255,g=a>>8&255,b=Hs(Ft.relativeLuminance2(d,f,g),Ft.relativeLuminance2(c,h,u));for(;b<l&&(d<255||f<255||g<255);)d=Math.min(255,d+Math.ceil((255-d)*.1)),f=Math.min(255,f+Math.ceil((255-f)*.1)),g=Math.min(255,g+Math.ceil((255-g)*.1)),b=Hs(Ft.relativeLuminance2(d,f,g),Ft.relativeLuminance2(c,h,u));return(d<<24|f<<16|g<<8|255)>>>0}e.increaseLuminance=r;function n(o){return[o>>24&255,o>>16&255,o>>8&255,o&255]}e.toChannels=n})(qh||={});function wn(e){let t=e.toString(16);return t.length<2?"0"+t:t}function Hs(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var d4=class extends yl{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},jh=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Oi}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let i=[],s=t.translateToString(!0),r=0,n=0,o=0,a=t.getFg(0),l=t.getBg(0);for(let c=0;c<t.getTrimmedLength();c++)if(t.loadCell(c,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==a||this._workCell.bg!==l){if(c-r>1){let h=this._getJoinedRanges(s,o,n,t,r);for(let u=0;u<h.length;u++)i.push(h[u])}r=c,o=n,a=this._workCell.fg,l=this._workCell.bg}n+=this._workCell.getChars().length||Ur.length}if(this._bufferService.cols-r>1){let c=this._getJoinedRanges(s,o,n,t,r);for(let h=0;h<c.length;h++)i.push(c[h])}return i}_getJoinedRanges(e,t,i,s,r){let n=e.substring(t,i),o=[];try{o=this._characterJoiners[0].handler(n)}catch(a){console.error(a)}for(let a=1;a<this._characterJoiners.length;a++)try{let l=this._characterJoiners[a].handler(n);for(let c=0;c<l.length;c++)jh._mergeRanges(o,l[c])}catch(l){console.error(l)}return this._stringRangesToCellRanges(o,s,r),o}_stringRangesToCellRanges(e,t,i){let s=0,r=!1,n=0,o=e[s];if(o){for(let a=i;a<this._bufferService.cols;a++){let l=t.getWidth(a),c=t.getString(a).length||Ur.length;if(l!==0){if(!r&&o[0]<=n&&(o[0]=a,r=!0),o[1]<=n){if(o[1]=a,o=e[++s],!o)break;o[0]<=n?(o[0]=a,r=!0):r=!1}n+=c}}o&&(o[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let i=!1;for(let s=0;s<e.length;s++){let r=e[s];if(i){if(t[1]<=r[0])return e[s-1][1]=t[1],e;if(t[1]<=r[1])return e[s-1][1]=Math.max(t[1],r[1]),e.splice(s,1),e;e.splice(s,1),s--}else{if(t[1]<=r[0])return e.splice(s,0,t),e;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),e;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),i=!0);continue}}return i?e[e.length-1][1]=t[1]:e.push(t),e}};jh=Pe([q(0,$t)],jh);function f4(e){return 57508<=e&&e<=57558}function p4(e){return 9472<=e&&e<=9631}function g4(e){return f4(e)||p4(e)}function m4(){return{css:{canvas:Ah(),cell:Ah()},device:{canvas:Ah(),cell:Ah(),char:{width:0,height:0,left:0,top:0}}}}function Ah(){return{width:0,height:0}}var Eg=class{constructor(e,t,i,s,r,n,o){this._document=e,this._characterJoinerService=t,this._optionsService=i,this._coreBrowserService=s,this._coreService=r,this._decorationService=n,this._themeService=o,this._workCell=new Oi,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,i){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i}createRow(e,t,i,s,r,n,o,a,l,c,h){let u=[],d=this._characterJoinerService.getJoinedCharacters(t),f=this._themeService.colors,g=e.getNoBgTrimmedLength();i&&g<n+1&&(g=n+1);let b,T=0,_="",m=0,v=0,p=0,E=0,A=!1,L=0,B=!1,W=0,$=0,P=[],Rt=c!==-1&&h!==-1;for(let S=0;S<g;S++){e.loadCell(S,this._workCell);let y=this._workCell.getWidth();if(y===0)continue;let k=!1,w=S>=$,C=S,x=this._workCell;if(d.length>0&&S===d[0][0]&&w){let oe=d.shift(),tr=this._isCellInSelection(oe[0],t);for(m=oe[0]+1;m<oe[1];m++)w&&=tr===this._isCellInSelection(m,t);w&&=!i||n<oe[0]||n>=oe[1],w?(k=!0,x=new d4(this._workCell,e.translateToString(!0,oe[0],oe[1]),oe[1]-oe[0]),C=oe[1]-1,y=x.getWidth()):$=oe[1]}let M=this._isCellInSelection(S,t),N=i&&S===n,I=Rt&&S>=c&&S<=h,ie=!1;this._decorationService.forEachDecorationAtCell(S,t,void 0,oe=>{ie=!0});let Z=x.getChars()||Ur;if(Z===" "&&(x.isUnderline()||x.isOverline())&&(Z=" "),W=y*a-l.get(Z,x.isBold(),x.isItalic()),!b)b=this._document.createElement("span");else if(T&&(M&&B||!M&&!B&&x.bg===v)&&(M&&B&&f.selectionForeground||x.fg===p)&&x.extended.ext===E&&I===A&&W===L&&!N&&!k&&!ie&&w){x.isInvisible()?_+=Ur:_+=Z,T++;continue}else T&&(b.textContent=_),b=this._document.createElement("span"),T=0,_="";if(v=x.bg,p=x.fg,E=x.extended.ext,A=I,L=W,B=M,k&&n>=S&&n<=C&&(n=S),!this._coreService.isCursorHidden&&N&&this._coreService.isCursorInitialized){if(P.push("xterm-cursor"),this._coreBrowserService.isFocused)o&&P.push("xterm-cursor-blink"),P.push(s==="bar"?"xterm-cursor-bar":s==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(r)switch(r){case"outline":P.push("xterm-cursor-outline");break;case"block":P.push("xterm-cursor-block");break;case"bar":P.push("xterm-cursor-bar");break;case"underline":P.push("xterm-cursor-underline");break;default:break}}if(x.isBold()&&P.push("xterm-bold"),x.isItalic()&&P.push("xterm-italic"),x.isDim()&&P.push("xterm-dim"),x.isInvisible()?_=Ur:_=x.getChars()||Ur,x.isUnderline()&&(P.push(`xterm-underline-${x.extended.underlineStyle}`),_===" "&&(_=" "),!x.isUnderlineColorDefault()))if(x.isUnderlineColorRGB())b.style.textDecorationColor=`rgb(${yl.toColorRGB(x.getUnderlineColor()).join(",")})`;else{let oe=x.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&x.isBold()&&oe<8&&(oe+=8),b.style.textDecorationColor=f.ansi[oe].css}x.isOverline()&&(P.push("xterm-overline"),_===" "&&(_=" ")),x.isStrikethrough()&&P.push("xterm-strikethrough"),I&&(b.style.textDecoration="underline");let se=x.getFgColor(),We=x.getFgColorMode(),ne=x.getBgColor(),Re=x.getBgColorMode(),he=!!x.isInverse();if(he){let oe=se;se=ne,ne=oe;let tr=We;We=Re,Re=tr}let Oe,er,Gi=!1;this._decorationService.forEachDecorationAtCell(S,t,void 0,oe=>{oe.options.layer!=="top"&&Gi||(oe.backgroundColorRGB&&(Re=50331648,ne=oe.backgroundColorRGB.rgba>>8&16777215,Oe=oe.backgroundColorRGB),oe.foregroundColorRGB&&(We=50331648,se=oe.foregroundColorRGB.rgba>>8&16777215,er=oe.foregroundColorRGB),Gi=oe.options.layer==="top")}),!Gi&&M&&(Oe=this._coreBrowserService.isFocused?f.selectionBackgroundOpaque:f.selectionInactiveBackgroundOpaque,ne=Oe.rgba>>8&16777215,Re=50331648,Gi=!0,f.selectionForeground&&(We=50331648,se=f.selectionForeground.rgba>>8&16777215,er=f.selectionForeground)),Gi&&P.push("xterm-decoration-top");let si;switch(Re){case 16777216:case 33554432:si=f.ansi[ne],P.push(`xterm-bg-${ne}`);break;case 50331648:si=Xe.toColor(ne>>16,ne>>8&255,ne&255),this._addStyle(b,`background-color:#${aw((ne>>>0).toString(16),"0",6)}`);break;default:he?(si=f.foreground,P.push("xterm-bg-257")):si=f.background}switch(Oe||x.isDim()&&(Oe=xe.multiplyOpacity(si,.5)),We){case 16777216:case 33554432:x.isBold()&&se<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(se+=8),this._applyMinimumContrast(b,si,f.ansi[se],x,Oe,void 0)||P.push(`xterm-fg-${se}`);break;case 50331648:let oe=Xe.toColor(se>>16&255,se>>8&255,se&255);this._applyMinimumContrast(b,si,oe,x,Oe,er)||this._addStyle(b,`color:#${aw(se.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(b,si,f.foreground,x,Oe,er)||he&&P.push("xterm-fg-257")}P.length&&(b.className=P.join(" "),P.length=0),!N&&!k&&!ie&&w?T++:b.textContent=_,W!==this.defaultSpacing&&(b.style.letterSpacing=`${W}px`),u.push(b),S=C}return b&&T&&(b.textContent=_),u}_applyMinimumContrast(e,t,i,s,r,n){if(this._optionsService.rawOptions.minimumContrastRatio===1||g4(s.getCode()))return!1;let o=this._getContrastCache(s),a;if(!r&&!n&&(a=o.getColor(t.rgba,i.rgba)),a===void 0){let l=this._optionsService.rawOptions.minimumContrastRatio/(s.isDim()?2:1);a=xe.ensureContrastRatio(r||t,n||i,l),o.setColor((r||t).rgba,(n||i).rgba,a??null)}return a?(this._addStyle(e,`color:${a.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let i=this._selectionStart,s=this._selectionEnd;return!i||!s?!1:this._columnSelectMode?i[0]<=s[0]?e>=i[0]&&t>=i[1]&&e<s[0]&&t<=s[1]:e<i[0]&&t>=i[1]&&e>=s[0]&&t<=s[1]:t>i[1]&&t<s[1]||i[1]===s[1]&&t===i[1]&&e>=i[0]&&e<s[0]||i[1]<s[1]&&t===s[1]&&e<s[0]||i[1]<s[1]&&t===i[1]&&e>=i[0]}};Eg=Pe([q(1,Ww),q(2,Kt),q(3,Is),q(4,An),q(5,bl),q(6,zo)],Eg);function aw(e,t,i){for(;e.length<i;)e=t+e;return e}var _4=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let i=e.createElement("span");i.classList.add("xterm-char-measure-element");let s=e.createElement("span");s.classList.add("xterm-char-measure-element"),s.style.fontWeight="bold";let r=e.createElement("span");r.classList.add("xterm-char-measure-element"),r.style.fontStyle="italic";let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold",n.style.fontStyle="italic",this._measureElements=[i,s,r,n],this._container.appendChild(i),this._container.appendChild(s),this._container.appendChild(r),this._container.appendChild(n),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,i,s){e===this._font&&t===this._fontSize&&i===this._weight&&s===this._weightBold||(this._font=e,this._fontSize=t,this._weight=i,this._weightBold=s,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${i}`,this._measureElements[1].style.fontWeight=`${s}`,this._measureElements[2].style.fontWeight=`${i}`,this._measureElements[3].style.fontWeight=`${s}`,this.clear())}get(e,t,i){let s=0;if(!t&&!i&&e.length===1&&(s=e.charCodeAt(0))<256){if(this._flat[s]!==-9999)return this._flat[s];let o=this._measure(e,0);return o>0&&(this._flat[s]=o),o}let r=e;t&&(r+="B"),i&&(r+="I");let n=this._holey.get(r);if(n===void 0){let o=0;t&&(o|=1),i&&(o|=2),n=this._measure(e,o),n>0&&this._holey.set(r,n)}return n}_measure(e,t){let i=this._measureElements[t];return i.textContent=e.repeat(32),i.offsetWidth/32}},v4=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,i,s=!1){if(this.selectionStart=t,this.selectionEnd=i,!t||!i||t[0]===i[0]&&t[1]===i[1]){this.clear();return}let r=e.buffers.active.ydisp,n=t[1]-r,o=i[1]-r,a=Math.max(n,0),l=Math.min(o,e.rows-1);if(a>=e.rows||l<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=s,this.viewportStartRow=n,this.viewportEndRow=o,this.viewportCappedStartRow=a,this.viewportCappedEndRow=l,this.startCol=t[0],this.endCol=i[0]}isCellSelected(e,t,i){return this.hasSelection?(i-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&i>=this.viewportCappedStartRow&&t<this.endCol&&i<=this.viewportCappedEndRow:t<this.startCol&&i>=this.viewportCappedStartRow&&t>=this.endCol&&i<=this.viewportCappedEndRow:i>this.viewportStartRow&&i<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol):!1}};function y4(){return new v4}var Yp="xterm-dom-renderer-owner-",Di="xterm-rows",Mh="xterm-fg-",lw="xterm-bg-",il="xterm-focus",Rh="xterm-selection",b4=1,Tg=class extends X{constructor(e,t,i,s,r,n,o,a,l,c,h,u,d,f){super(),this._terminal=e,this._document=t,this._element=i,this._screenElement=s,this._viewportElement=r,this._helperContainer=n,this._linkifier2=o,this._charSizeService=l,this._optionsService=c,this._bufferService=h,this._coreService=u,this._coreBrowserService=d,this._themeService=f,this._terminalClass=b4++,this._rowElements=[],this._selectionRenderModel=y4(),this.onRequestRedraw=this._register(new z).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Di),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(Rh),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=m4(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(g=>this._injectCss(g))),this._injectCss(this._themeService.colors),this._rowFactory=a.createInstance(Eg,document),this._element.classList.add(Yp+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(g=>this._handleLinkHover(g))),this._register(this._linkifier2.onHideLinkUnderline(g=>this._handleLinkLeave(g))),this._register(Ce(()=>{this._element.classList.remove(Yp+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new _4(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let i of this._rowElements)i.style.width=`${this.dimensions.css.canvas.width}px`,i.style.height=`${this.dimensions.css.cell.height}px`,i.style.lineHeight=`${this.dimensions.css.cell.height}px`,i.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${Di} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${Di} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${Di} .xterm-dim { color: ${xe.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let i=`blink_underline_${this._terminalClass}`,s=`blink_bar_${this._terminalClass}`,r=`blink_block_${this._terminalClass}`;t+=`@keyframes ${i} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${s} { 50% { box-shadow: none; }}`,t+=`@keyframes ${r} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Di}.${il} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${Di}.${il} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${s} 1s step-end infinite;}${this._terminalSelector} .${Di}.${il} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${Di} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Di} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Di} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Di} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Di} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${Rh} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Rh} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Rh} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[n,o]of e.ansi.entries())t+=`${this._terminalSelector} .${Mh}${n} { color: ${o.css}; }${this._terminalSelector} .${Mh}${n}.xterm-dim { color: ${xe.multiplyOpacity(o,.5).css}; }${this._terminalSelector} .${lw}${n} { background-color: ${o.css}; }`;t+=`${this._terminalSelector} .${Mh}257 { color: ${xe.opaque(e.background).css}; }${this._terminalSelector} .${Mh}257.xterm-dim { color: ${xe.multiplyOpacity(xe.opaque(e.background),.5).css}; }${this._terminalSelector} .${lw}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let i=this._rowElements.length;i<=t;i++){let s=this._document.createElement("div");this._rowContainer.appendChild(s),this._rowElements.push(s)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(il),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(il),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,i){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,i),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,i),!this._selectionRenderModel.hasSelection))return;let s=this._selectionRenderModel.viewportStartRow,r=this._selectionRenderModel.viewportEndRow,n=this._selectionRenderModel.viewportCappedStartRow,o=this._selectionRenderModel.viewportCappedEndRow,a=this._document.createDocumentFragment();if(i){let l=e[0]>t[0];a.appendChild(this._createSelectionElement(n,l?t[0]:e[0],l?e[0]:t[0],o-n+1))}else{let l=s===n?e[0]:0,c=n===r?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(n,l,c));let h=o-n-1;if(a.appendChild(this._createSelectionElement(n+1,0,this._bufferService.cols,h)),n!==o){let u=r===o?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(o,0,u))}}this._selectionContainer.appendChild(a)}_createSelectionElement(e,t,i,s=1){let r=this._document.createElement("div"),n=t*this.dimensions.css.cell.width,o=this.dimensions.css.cell.width*(i-t);return n+o>this.dimensions.css.canvas.width&&(o=this.dimensions.css.canvas.width-n),r.style.height=`${s*this.dimensions.css.cell.height}px`,r.style.top=`${e*this.dimensions.css.cell.height}px`,r.style.left=`${n}px`,r.style.width=`${o}px`,r}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let i=this._bufferService.buffer,s=i.ybase+i.y,r=Math.min(i.x,this._bufferService.cols-1),n=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,o=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,a=this._optionsService.rawOptions.cursorInactiveStyle;for(let l=e;l<=t;l++){let c=l+i.ydisp,h=this._rowElements[l],u=i.lines.get(c);if(!h||!u)break;h.replaceChildren(...this._rowFactory.createRow(u,c,c===s,o,a,r,n,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${Yp}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,i,s,r,n){i<0&&(e=0),s<0&&(t=0);let o=this._bufferService.rows-1;i=Math.max(Math.min(i,o),0),s=Math.max(Math.min(s,o),0),r=Math.min(r,this._bufferService.cols);let a=this._bufferService.buffer,l=a.ybase+a.y,c=Math.min(a.x,r-1),h=this._optionsService.rawOptions.cursorBlink,u=this._optionsService.rawOptions.cursorStyle,d=this._optionsService.rawOptions.cursorInactiveStyle;for(let f=i;f<=s;++f){let g=f+a.ydisp,b=this._rowElements[f],T=a.lines.get(g);if(!b||!T)break;b.replaceChildren(...this._rowFactory.createRow(T,g,g===l,u,d,c,h,this.dimensions.css.cell.width,this._widthCache,n?f===i?e:0:-1,n?(f===s?t:r)-1:-1))}}};Tg=Pe([q(7,Ig),q(8,Qh),q(9,Kt),q(10,$t),q(11,An),q(12,Is),q(13,zo)],Tg);var Ag=class extends X{constructor(e,t,i){super(),this._optionsService=i,this.width=0,this.height=0,this._onCharSizeChange=this._register(new z),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new S4(this._optionsService))}catch{this._measureStrategy=this._register(new w4(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};Ag=Pe([q(2,Kt)],Ag);var yS=class extends X{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},w4=class extends yS{constructor(e,t,i){super(),this._document=e,this._parentElement=t,this._optionsService=i,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},S4=class extends yS{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},k4=class extends X{constructor(e,t,i){super(),this._textarea=e,this._window=t,this.mainDocument=i,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new x4(this._window)),this._onDprChange=this._register(new z),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new z),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(s=>this._screenDprMonitor.setWindow(s))),this._register(Tt.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(j(this._textarea,"focus",()=>this._isFocused=!0)),this._register(j(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},x4=class extends X{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new Oo),this._onDprChange=this._register(new z),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Ce(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=j(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},C4=class extends X{constructor(){super(),this.linkProviders=[],this._register(Ce(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function Yg(e,t,i){let s=i.getBoundingClientRect(),r=e.getComputedStyle(i),n=parseInt(r.getPropertyValue("padding-left")),o=parseInt(r.getPropertyValue("padding-top"));return[t.clientX-s.left-n,t.clientY-s.top-o]}function E4(e,t,i,s,r,n,o,a,l){if(!n)return;let c=Yg(e,t,i);if(c)return c[0]=Math.ceil((c[0]+(l?o/2:0))/o),c[1]=Math.ceil(c[1]/a),c[0]=Math.min(Math.max(c[0],1),s+(l?1:0)),c[1]=Math.min(Math.max(c[1],1),r),c}var Mg=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,i,s,r){return E4(window,e,t,i,s,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,r)}getMouseReportCoords(e,t){let i=Yg(window,e,t);if(this._charSizeService.hasValidSize)return i[0]=Math.min(Math.max(i[0],0),this._renderService.dimensions.css.canvas.width-1),i[1]=Math.min(Math.max(i[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(i[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(i[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(i[0]),y:Math.floor(i[1])}}};Mg=Pe([q(0,Fs),q(1,Qh)],Mg);var T4=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},bS={};hE(bS,{getSafariVersion:()=>M4,isChromeOS:()=>xS,isFirefox:()=>wS,isIpad:()=>R4,isIphone:()=>L4,isLegacyEdge:()=>A4,isLinux:()=>Xg,isMac:()=>Gh,isNode:()=>tu,isSafari:()=>SS,isWindows:()=>kS});var tu=typeof process<"u"&&"title"in process,wl=tu?"node":navigator.userAgent,Sl=tu?"node":navigator.platform,wS=wl.includes("Firefox"),A4=wl.includes("Edge"),SS=/^((?!chrome|android).)*safari/i.test(wl);function M4(){if(!SS)return 0;let e=wl.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Gh=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Sl),R4=Sl==="iPad",L4=Sl==="iPhone",kS=["Windows","Win16","Win32","WinCE"].includes(Sl),Xg=Sl.indexOf("Linux")>=0,xS=/\bCrOS\b/.test(wl),CS=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,i=0,s=e.timeRemaining(),r=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),i=Math.max(t,i),r=e.timeRemaining(),i*1.5>r){s-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),this._start();return}s=r}this.clear()}},D4=class extends CS{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},N4=class extends CS{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},Yh=!tu&&"requestIdleCallback"in window?N4:D4,B4=class{constructor(){this._queue=new Yh}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},Rg=class extends X{constructor(e,t,i,s,r,n,o,a,l){super(),this._rowCount=e,this._optionsService=i,this._charSizeService=s,this._coreService=r,this._coreBrowserService=a,this._renderer=this._register(new Oo),this._pausedResizeTask=new B4,this._observerDisposable=this._register(new Oo),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new z),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new z),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new z),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new z),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new T4((c,h)=>this._renderRows(c,h),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new O4(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Ce(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(o.onResize(()=>this._fullRefresh())),this._register(o.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(n.onDecorationRegistered(()=>this._fullRefresh())),this._register(n.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(o.cols,o.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(o.buffer.y,o.buffer.y,!0))),this._register(l.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(c=>this._registerIntersectionObserver(c,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let i=new e.IntersectionObserver(s=>this._handleIntersectionChange(s[s.length-1]),{threshold:0});i.observe(t),this._observerDisposable.value=Ce(()=>i.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,i=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let s=this._syncOutputHandler.flush();s&&(e=Math.min(e,s.start),t=Math.max(t,s.end)),i||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,i){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=i,this._renderer.value?.handleSelectionChanged(e,t,i)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};Rg=Pe([q(2,Kt),q(3,Qh),q(4,An),q(5,bl),q(6,$t),q(7,Is),q(8,zo)],Rg);var O4=class{constructor(e,t,i){this._coreBrowserService=e,this._coreService=t,this._onTimeout=i,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function z4(e,t,i,s){let r=i.buffer.x,n=i.buffer.y;if(!i.buffer.hasScrollback)return P4(r,n,e,t,i,s)+iu(n,t,i,s)+q4(r,n,e,t,i,s);let o;if(n===t)return o=r>e?"D":"C",_l(Math.abs(r-e),ml(o,s));o=n>t?"D":"C";let a=Math.abs(n-t),l=U4(n>t?e:r,i)+(a-1)*i.cols+1+H4(n>t?r:e,i);return _l(l,ml(o,s))}function H4(e,t){return e-1}function U4(e,t){return t.cols-e}function P4(e,t,i,s,r,n){return iu(t,s,r,n).length===0?"":_l(TS(e,t,e,t-Tn(t,r),!1,r).length,ml("D",n))}function iu(e,t,i,s){let r=e-Tn(e,i),n=t-Tn(t,i),o=Math.abs(r-n)-I4(e,t,i);return _l(o,ml(ES(e,t),s))}function q4(e,t,i,s,r,n){let o;iu(t,s,r,n).length>0?o=s-Tn(s,r):o=t;let a=s,l=F4(e,t,i,s,r,n);return _l(TS(e,o,i,a,l==="C",r).length,ml(l,n))}function I4(e,t,i){let s=0,r=e-Tn(e,i),n=t-Tn(t,i);for(let o=0;o<Math.abs(r-n);o++){let a=ES(e,t)==="A"?-1:1;i.buffer.lines.get(r+a*o)?.isWrapped&&s++}return s}function Tn(e,t){let i=0,s=t.buffer.lines.get(e),r=s?.isWrapped;for(;r&&e>=0&&e<t.rows;)i++,s=t.buffer.lines.get(--e),r=s?.isWrapped;return i}function F4(e,t,i,s,r,n){let o;return iu(i,s,r,n).length>0?o=s-Tn(s,r):o=t,e<i&&o<=s||e>=i&&o<s?"C":"D"}function ES(e,t){return e>t?"A":"B"}function TS(e,t,i,s,r,n){let o=e,a=t,l="";for(;(o!==i||a!==s)&&a>=0&&a<n.buffer.lines.length;)o+=r?1:-1,r&&o>n.cols-1?(l+=n.buffer.translateBufferLineToString(a,!1,e,o),o=0,e=0,a++):!r&&o<0&&(l+=n.buffer.translateBufferLineToString(a,!1,0,e+1),o=n.cols-1,e=o,a--);return l+n.buffer.translateBufferLineToString(a,!1,e,o)}function ml(e,t){let i=t?"O":"[";return D.ESC+i+e}function _l(e,t){e=Math.floor(e);let i="";for(let s=0;s<e;s++)i+=t;return i}var $4=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function cw(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var Xp=50,K4=15,W4=50,V4=500,j4=" ",G4=new RegExp(j4,"g"),Lg=class extends X{constructor(e,t,i,s,r,n,o,a,l){super(),this._element=e,this._screenElement=t,this._linkifier=i,this._bufferService=s,this._coreService=r,this._mouseService=n,this._optionsService=o,this._renderService=a,this._coreBrowserService=l,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new Oi,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new z),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new z),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new z),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new z),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=c=>this._handleMouseMove(c),this._mouseUpListener=c=>this._handleMouseUp(c),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(c=>this._handleTrim(c)),this._register(this._bufferService.buffers.onBufferActivate(c=>this._handleBufferActivate(c))),this.enable(),this._model=new $4(this._bufferService),this._activeSelectionMode=0,this._register(Ce(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(c=>{c.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let i=this._bufferService.buffer,s=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let r=e[0]<t[0]?e[0]:t[0],n=e[0]<t[0]?t[0]:e[0];for(let o=e[1];o<=t[1];o++){let a=i.translateBufferLineToString(o,!0,r,n);s.push(a)}}else{let r=e[1]===t[1]?t[0]:void 0;s.push(i.translateBufferLineToString(e[1],!0,e[0],r));for(let n=e[1]+1;n<=t[1]-1;n++){let o=i.lines.get(n),a=i.translateBufferLineToString(n,!0);o?.isWrapped?s[s.length-1]+=a:s.push(a)}if(e[1]!==t[1]){let n=i.lines.get(t[1]),o=i.translateBufferLineToString(t[1],!0,0,t[0]);n&&n.isWrapped?s[s.length-1]+=o:s.push(o)}}return s.map(r=>r.replace(G4," ")).join(kS?`\r
|
|
41
41
|
`:`
|
|
42
42
|
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),Xg&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),i=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!i||!s||!t?!1:this._areCoordsInSelection(t,i,s)}isCellInSelection(e,t){let i=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!i||!s?!1:this._areCoordsInSelection([e,t],i,s)}_areCoordsInSelection(e,t,i){return e[1]>t[1]&&e[1]<i[1]||t[1]===i[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<i[0]||t[1]<i[1]&&e[1]===i[1]&&e[0]<i[0]||t[1]<i[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let i=this._linkifier.currentLink?.link?.range;if(i)return this._model.selectionStart=[i.start.x-1,i.start.y-1],this._model.selectionStartLength=cw(i,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let s=this._getMouseBufferCoords(e);return s?(this._selectWordAt(s,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=Yg(this._coreBrowserService.window,e,this._screenElement)[1],i=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=i?0:(t>i&&(t-=i),t=Math.min(Math.max(t,-Xp),Xp),t/=Xp,t/Math.abs(t)+Math.round(t*(K4-1)))}shouldForceSelection(e){return Gh?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),W4)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(Gh&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let i=this._bufferService.buffer;if(this._model.selectionEnd[1]<i.lines.length){let s=i.lines.get(this._model.selectionEnd[1]);s&&s.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<V4&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let i=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(i&&i[0]!==void 0&&i[1]!==void 0){let s=z4(i[0]-1,i[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(s,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,i=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!i){this._oldHasSelection&&this._fireOnSelectionChange(e,t,i);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,i)}_fireOnSelectionChange(e,t,i){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=i,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let i=t;for(let s=0;t>=s;s++){let r=e.loadCell(s,this._workCell).getChars().length;this._workCell.getWidth()===0?i--:r>1&&t!==s&&(i+=r-1)}return i}setSelection(e,t,i){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=i,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,i=!0,s=!0){if(e[0]>=this._bufferService.cols)return;let r=this._bufferService.buffer,n=r.lines.get(e[1]);if(!n)return;let o=r.translateBufferLineToString(e[1],!1),a=this._convertViewportColToCharacterIndex(n,e[0]),l=a,c=e[0]-a,h=0,u=0,d=0,f=0;if(o.charAt(a)===" "){for(;a>0&&o.charAt(a-1)===" ";)a--;for(;l<o.length&&o.charAt(l+1)===" ";)l++}else{let T=e[0],_=e[0];n.getWidth(T)===0&&(h++,T--),n.getWidth(_)===2&&(u++,_++);let m=n.getString(_).length;for(m>1&&(f+=m-1,l+=m-1);T>0&&a>0&&!this._isCharWordSeparator(n.loadCell(T-1,this._workCell));){n.loadCell(T-1,this._workCell);let v=this._workCell.getChars().length;this._workCell.getWidth()===0?(h++,T--):v>1&&(d+=v-1,a-=v-1),a--,T--}for(;_<n.length&&l+1<o.length&&!this._isCharWordSeparator(n.loadCell(_+1,this._workCell));){n.loadCell(_+1,this._workCell);let v=this._workCell.getChars().length;this._workCell.getWidth()===2?(u++,_++):v>1&&(f+=v-1,l+=v-1),l++,_++}}l++;let g=a+c-h+d,b=Math.min(this._bufferService.cols,l-a+h+u-d-f);if(!(!t&&o.slice(a,l).trim()==="")){if(i&&g===0&&n.getCodePoint(0)!==32){let T=r.lines.get(e[1]-1);if(T&&n.isWrapped&&T.getCodePoint(this._bufferService.cols-1)!==32){let _=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(_){let m=this._bufferService.cols-_.start;g-=m,b+=m}}}if(s&&g+b===this._bufferService.cols&&n.getCodePoint(this._bufferService.cols-1)!==32){let T=r.lines.get(e[1]+1);if(T?.isWrapped&&T.getCodePoint(0)!==32){let _=this._getWordAt([0,e[1]+1],!1,!1,!0);_&&(b+=_.length)}}return{start:g,length:b}}}_selectWordAt(e,t){let i=this._getWordAt(e,t);if(i){for(;i.start<0;)i.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[i.start,e[1]],this._model.selectionStartLength=i.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let i=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,i--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),i={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=cw(i,this._bufferService.cols)}};Lg=Pe([q(3,$t),q(4,An),q(5,Fg),q(6,Kt),q(7,Fs),q(8,Is)],Lg);var hw=class{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},uw=class{constructor(){this._color=new hw,this._css=new hw}setCss(e,t,i){this._css.set(e,t,i)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,i){this._color.set(e,t,i)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},tt=Object.freeze((()=>{let e=[Ne.toColor("#2e3436"),Ne.toColor("#cc0000"),Ne.toColor("#4e9a06"),Ne.toColor("#c4a000"),Ne.toColor("#3465a4"),Ne.toColor("#75507b"),Ne.toColor("#06989a"),Ne.toColor("#d3d7cf"),Ne.toColor("#555753"),Ne.toColor("#ef2929"),Ne.toColor("#8ae234"),Ne.toColor("#fce94f"),Ne.toColor("#729fcf"),Ne.toColor("#ad7fa8"),Ne.toColor("#34e2e2"),Ne.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let i=0;i<216;i++){let s=t[i/36%6|0],r=t[i/6%6|0],n=t[i%6];e.push({css:Xe.toCss(s,r,n),rgba:Xe.toRgba(s,r,n)})}for(let i=0;i<24;i++){let s=8+i*10;e.push({css:Xe.toCss(s,s,s),rgba:Xe.toRgba(s,s,s)})}return e})()),Sn=Ne.toColor("#ffffff"),cl=Ne.toColor("#000000"),dw=Ne.toColor("#ffffff"),fw=cl,sl={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},Y4=Sn,Dg=class extends X{constructor(e){super(),this._optionsService=e,this._contrastCache=new uw,this._halfContrastCache=new uw,this._onChangeColors=this._register(new z),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:Sn,background:cl,cursor:dw,cursorAccent:fw,selectionForeground:void 0,selectionBackgroundTransparent:sl,selectionBackgroundOpaque:xe.blend(cl,sl),selectionInactiveBackgroundTransparent:sl,selectionInactiveBackgroundOpaque:xe.blend(cl,sl),scrollbarSliderBackground:xe.opacity(Sn,.2),scrollbarSliderHoverBackground:xe.opacity(Sn,.4),scrollbarSliderActiveBackground:xe.opacity(Sn,.5),overviewRulerBorder:Sn,ansi:tt.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=me(e.foreground,Sn),t.background=me(e.background,cl),t.cursor=xe.blend(t.background,me(e.cursor,dw)),t.cursorAccent=xe.blend(t.background,me(e.cursorAccent,fw)),t.selectionBackgroundTransparent=me(e.selectionBackground,sl),t.selectionBackgroundOpaque=xe.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=me(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=xe.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?me(e.selectionForeground,ow):void 0,t.selectionForeground===ow&&(t.selectionForeground=void 0),xe.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=xe.opacity(t.selectionBackgroundTransparent,.3)),xe.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=xe.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=me(e.scrollbarSliderBackground,xe.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=me(e.scrollbarSliderHoverBackground,xe.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=me(e.scrollbarSliderActiveBackground,xe.opacity(t.foreground,.5)),t.overviewRulerBorder=me(e.overviewRulerBorder,Y4),t.ansi=tt.slice(),t.ansi[0]=me(e.black,tt[0]),t.ansi[1]=me(e.red,tt[1]),t.ansi[2]=me(e.green,tt[2]),t.ansi[3]=me(e.yellow,tt[3]),t.ansi[4]=me(e.blue,tt[4]),t.ansi[5]=me(e.magenta,tt[5]),t.ansi[6]=me(e.cyan,tt[6]),t.ansi[7]=me(e.white,tt[7]),t.ansi[8]=me(e.brightBlack,tt[8]),t.ansi[9]=me(e.brightRed,tt[9]),t.ansi[10]=me(e.brightGreen,tt[10]),t.ansi[11]=me(e.brightYellow,tt[11]),t.ansi[12]=me(e.brightBlue,tt[12]),t.ansi[13]=me(e.brightMagenta,tt[13]),t.ansi[14]=me(e.brightCyan,tt[14]),t.ansi[15]=me(e.brightWhite,tt[15]),e.extendedAnsi){let i=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let s=0;s<i;s++)t.ansi[s+16]=me(e.extendedAnsi[s],tt[s+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};Dg=Pe([q(0,Kt)],Dg);function me(e,t){if(e!==void 0)try{return Ne.toColor(e)}catch{}return t}var X4=class{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){let i=this._entries.get(e);return this._entries.set(e,t),i}forEach(e){for(let[t,i]of this._entries.entries())e(t,i)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},Z4=class{constructor(){this._services=new X4,this._services.set(Ig,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let i=_E(e).sort((n,o)=>n.index-o.index),s=[];for(let n of i){let o=this._services.get(n.id);if(!o)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${n.id._id}.`);s.push(o)}let r=i.length>0?i[0].index:t.length;if(t.length!==r)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);return new e(...t,...s)}},Q4={trace:0,debug:1,info:2,warn:3,error:4,off:5},J4="xterm.js: ",Ng=class extends X{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),eT=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=Q4[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":J4)+t,...i)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};Ng=Pe([q(0,Kt)],Ng);var eT,pw=class extends X{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new z),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new z),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new z),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let i=0;i<Math.min(e,this.length);i++)t[i]=this._array[this._getCyclicIndex(i)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...i){if(t){for(let s=e;s<this._length-t;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let s=this._length-1;s>=e;s--)this._array[this._getCyclicIndex(s+i.length)]=this._array[this._getCyclicIndex(s)];for(let s=0;s<i.length;s++)this._array[this._getCyclicIndex(e+s)]=i[s];if(i.length&&this.onInsertEmitter.fire({index:e,amount:i.length}),this._length+i.length>this._maxLength){let s=this._length+i.length-this._maxLength;this._startIndex+=s,this._length=this._maxLength,this.onTrimEmitter.fire(s)}else this._length+=i.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(let r=t-1;r>=0;r--)this.set(e+r+i,this.get(e+r));let s=e+t+i-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let s=0;s<t;s++)this.set(e+s+i,this.get(e+s))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},J=3,Ye=Object.freeze(new yl),Lh=0,Zp=2,hl=class AS{constructor(t,i,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*J);let r=i||Oi.fromCharData([0,Uw,1,0]);for(let n=0;n<t;++n)this.setCell(n,r);this.length=t}get(t){let i=this._data[t*J+0],s=i&2097151;return[this._data[t*J+1],i&2097152?this._combined[t]:s?Hr(s):"",i>>22,i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):s]}set(t,i){this._data[t*J+1]=i[0],i[1].length>1?(this._combined[t]=i[1],this._data[t*J+0]=t|2097152|i[2]<<22):this._data[t*J+0]=i[1].charCodeAt(0)|i[2]<<22}getWidth(t){return this._data[t*J+0]>>22}hasWidth(t){return this._data[t*J+0]&12582912}getFg(t){return this._data[t*J+1]}getBg(t){return this._data[t*J+2]}hasContent(t){return this._data[t*J+0]&4194303}getCodePoint(t){let i=this._data[t*J+0];return i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):i&2097151}isCombined(t){return this._data[t*J+0]&2097152}getString(t){let i=this._data[t*J+0];return i&2097152?this._combined[t]:i&2097151?Hr(i&2097151):""}isProtected(t){return this._data[t*J+2]&536870912}loadCell(t,i){return Lh=t*J,i.content=this._data[Lh+0],i.fg=this._data[Lh+1],i.bg=this._data[Lh+2],i.content&2097152&&(i.combinedData=this._combined[t]),i.bg&268435456&&(i.extended=this._extendedAttrs[t]),i}setCell(t,i){i.content&2097152&&(this._combined[t]=i.combinedData),i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*J+0]=i.content,this._data[t*J+1]=i.fg,this._data[t*J+2]=i.bg}setCellFromCodepoint(t,i,s,r){r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*J+0]=i|s<<22,this._data[t*J+1]=r.fg,this._data[t*J+2]=r.bg}addCodepointToCell(t,i,s){let r=this._data[t*J+0];r&2097152?this._combined[t]+=Hr(i):r&2097151?(this._combined[t]=Hr(r&2097151)+Hr(i),r&=-2097152,r|=2097152):r=i|1<<22,s&&(r&=-12582913,r|=s<<22),this._data[t*J+0]=r}insertCells(t,i,s){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),i<this.length-t){let r=new Oi;for(let n=this.length-t-i-1;n>=0;--n)this.setCell(t+i+n,this.loadCell(t+n,r));for(let n=0;n<i;++n)this.setCell(t+n,s)}else for(let r=t;r<this.length;++r)this.setCell(r,s);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,s)}deleteCells(t,i,s){if(t%=this.length,i<this.length-t){let r=new Oi;for(let n=0;n<this.length-t-i;++n)this.setCell(t+n,this.loadCell(t+i+n,r));for(let n=this.length-i;n<this.length;++n)this.setCell(n,s)}else for(let r=t;r<this.length;++r)this.setCell(r,s);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,s)}replaceCells(t,i,s,r=!1){if(r){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,s),i<this.length&&this.getWidth(i-1)===2&&!this.isProtected(i)&&this.setCellFromCodepoint(i,0,1,s);t<i&&t<this.length;)this.isProtected(t)||this.setCell(t,s),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),i<this.length&&this.getWidth(i-1)===2&&this.setCellFromCodepoint(i,0,1,s);t<i&&t<this.length;)this.setCell(t++,s)}resize(t,i){if(t===this.length)return this._data.length*4*Zp<this._data.buffer.byteLength;let s=t*J;if(t>this.length){if(this._data.buffer.byteLength>=s*4)this._data=new Uint32Array(this._data.buffer,0,s);else{let r=new Uint32Array(s);r.set(this._data),this._data=r}for(let r=this.length;r<t;++r)this.setCell(r,i)}else{this._data=this._data.subarray(0,s);let r=Object.keys(this._combined);for(let o=0;o<r.length;o++){let a=parseInt(r[o],10);a>=t&&delete this._combined[a]}let n=Object.keys(this._extendedAttrs);for(let o=0;o<n.length;o++){let a=parseInt(n[o],10);a>=t&&delete this._extendedAttrs[a]}}return this.length=t,s*4*Zp<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*Zp<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,i=!1){if(i){for(let s=0;s<this.length;++s)this.isProtected(s)||this.setCell(s,t);return}this._combined={},this._extendedAttrs={};for(let s=0;s<this.length;++s)this.setCell(s,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let i in t._combined)this._combined[i]=t._combined[i];this._extendedAttrs={};for(let i in t._extendedAttrs)this._extendedAttrs[i]=t._extendedAttrs[i];this.isWrapped=t.isWrapped}clone(){let t=new AS(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let i in this._combined)t._combined[i]=this._combined[i];for(let i in this._extendedAttrs)t._extendedAttrs[i]=this._extendedAttrs[i];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*J+0]&4194303)return t+(this._data[t*J+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*J+0]&4194303||this._data[t*J+2]&50331648)return t+(this._data[t*J+0]>>22);return 0}copyCellsFrom(t,i,s,r,n){let o=t._data;if(n)for(let l=r-1;l>=0;l--){for(let c=0;c<J;c++)this._data[(s+l)*J+c]=o[(i+l)*J+c];o[(i+l)*J+2]&268435456&&(this._extendedAttrs[s+l]=t._extendedAttrs[i+l])}else for(let l=0;l<r;l++){for(let c=0;c<J;c++)this._data[(s+l)*J+c]=o[(i+l)*J+c];o[(i+l)*J+2]&268435456&&(this._extendedAttrs[s+l]=t._extendedAttrs[i+l])}let a=Object.keys(t._combined);for(let l=0;l<a.length;l++){let c=parseInt(a[l],10);c>=i&&(this._combined[c-i+s]=t._combined[c])}}translateToString(t,i,s,r){i=i??0,s=s??this.length,t&&(s=Math.min(s,this.getTrimmedLength())),r&&(r.length=0);let n="";for(;i<s;){let o=this._data[i*J+0],a=o&2097151,l=o&2097152?this._combined[i]:a?Hr(a):Ur;if(n+=l,r)for(let c=0;c<l.length;++c)r.push(i);i+=o>>22||1}return r&&r.push(i),n}};function tT(e,t,i,s,r,n){let o=[];for(let a=0;a<e.length-1;a++){let l=a,c=e.get(++l);if(!c.isWrapped)continue;let h=[e.get(a)];for(;l<e.length&&c.isWrapped;)h.push(c),c=e.get(++l);if(!n&&s>=a&&s<l){a+=h.length-1;continue}let u=0,d=vl(h,u,t),f=1,g=0;for(;f<h.length;){let T=vl(h,f,t),_=T-g,m=i-d,v=Math.min(_,m);h[u].copyCellsFrom(h[f],g,d,v,!1),d+=v,d===i&&(u++,d=0),g+=v,g===T&&(f++,g=0),d===0&&u!==0&&h[u-1].getWidth(i-1)===2&&(h[u].copyCellsFrom(h[u-1],i-1,d++,1,!1),h[u-1].setCell(i-1,r))}h[u].replaceCells(d,i,r);let b=0;for(let T=h.length-1;T>0&&(T>u||h[T].getTrimmedLength()===0);T--)b++;b>0&&(o.push(a+h.length-b),o.push(b)),a+=h.length-1}return o}function iT(e,t){let i=[],s=0,r=t[s],n=0;for(let o=0;o<e.length;o++)if(r===o){let a=t[++s];e.onDeleteEmitter.fire({index:o-n,amount:a}),o+=a-1,n+=a,r=t[++s]}else i.push(o);return{layout:i,countRemoved:n}}function sT(e,t){let i=[];for(let s=0;s<t.length;s++)i.push(e.get(t[s]));for(let s=0;s<i.length;s++)e.set(s,i[s]);e.length=t.length}function rT(e,t,i){let s=[],r=e.map((l,c)=>vl(e,c,t)).reduce((l,c)=>l+c),n=0,o=0,a=0;for(;a<r;){if(r-a<i){s.push(r-a);break}n+=i;let l=vl(e,o,t);n>l&&(n-=l,o++);let c=e[o].getWidth(n-1)===2;c&&n--;let h=c?i-1:i;s.push(h),a+=h}return s}function vl(e,t,i){if(t===e.length-1)return e[t].getTrimmedLength();let s=!e[t].hasContent(i-1)&&e[t].getWidth(i-1)===1,r=e[t+1].getWidth(0)===2;return s&&r?i-1:i}var MS=class RS{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=RS._nextId++,this._onDispose=this.register(new z),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),En(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};MS._nextId=1;var nT=MS,st={},kn=st.B;st[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"};st.A={"#":"£"};st.B=void 0;st[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};st.C=st[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};st.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};st.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};st.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};st.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};st.E=st[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};st.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};st.H=st[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};st["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var gw=4294967295,mw=class{constructor(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=Ye.clone(),this.savedCharset=kn,this.markers=[],this._nullCell=Oi.fromCharData([0,Uw,1,0]),this._whitespaceCell=Oi.fromCharData([0,Ur,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new Yh,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new pw(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new Fh),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new Fh),this._whitespaceCell}getBlankLine(e,t){return new hl(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>gw?gw:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=Ye);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new pw(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let i=this.getNullCell(Ye),s=0,r=this._getCorrectBufferLength(t);if(r>this.lines.maxLength&&(this.lines.maxLength=r),this.lines.length>0){if(this._cols<e)for(let o=0;o<this.lines.length;o++)s+=+this.lines.get(o).resize(e,i);let n=0;if(this._rows<t)for(let o=this._rows;o<t;o++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new hl(e,i)):this.ybase>0&&this.lines.length<=this.ybase+this.y+n+1?(this.ybase--,n++,this.ydisp>0&&this.ydisp--):this.lines.push(new hl(e,i)));else for(let o=this._rows;o>t;o--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(r<this.lines.maxLength){let o=this.lines.length-r;o>0&&(this.lines.trimStart(o),this.ybase=Math.max(this.ybase-o,0),this.ydisp=Math.max(this.ydisp-o,0),this.savedY=Math.max(this.savedY-o,0)),this.lines.maxLength=r}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),n&&(this.y+=n),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let n=0;n<this.lines.length;n++)s+=+this.lines.get(n).resize(e,i);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),s>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,s=tT(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(Ye),i);if(s.length>0){let r=iT(this.lines,s);sT(this.lines,r.layout),this._reflowLargerAdjustViewport(e,t,r.countRemoved)}}_reflowLargerAdjustViewport(e,t,i){let s=this.getNullCell(Ye),r=i;for(;r-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new hl(e,s))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-i,0)}_reflowSmaller(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,s=this.getNullCell(Ye),r=[],n=0;for(let o=this.lines.length-1;o>=0;o--){let a=this.lines.get(o);if(!a||!a.isWrapped&&a.getTrimmedLength()<=e)continue;let l=[a];for(;a.isWrapped&&o>0;)a=this.lines.get(--o),l.unshift(a);if(!i){let v=this.ybase+this.y;if(v>=o&&v<o+l.length)continue}let c=l[l.length-1].getTrimmedLength(),h=rT(l,this._cols,e),u=h.length-l.length,d;this.ybase===0&&this.y!==this.lines.length-1?d=Math.max(0,this.y-this.lines.maxLength+u):d=Math.max(0,this.lines.length-this.lines.maxLength+u);let f=[];for(let v=0;v<u;v++){let p=this.getBlankLine(Ye,!0);f.push(p)}f.length>0&&(r.push({start:o+l.length+n,newLines:f}),n+=f.length),l.push(...f);let g=h.length-1,b=h[g];b===0&&(g--,b=h[g]);let T=l.length-u-1,_=c;for(;T>=0;){let v=Math.min(_,b);if(l[g]===void 0)break;if(l[g].copyCellsFrom(l[T],_-v,b-v,v,!0),b-=v,b===0&&(g--,b=h[g]),_-=v,_===0){T--;let p=Math.max(T,0);_=vl(l,p,this._cols)}}for(let v=0;v<l.length;v++)h[v]<e&&l[v].setCell(h[v],s);let m=u-d;for(;m-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+n)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+u,this.ybase+t-1)}if(r.length>0){let o=[],a=[];for(let b=0;b<this.lines.length;b++)a.push(this.lines.get(b));let l=this.lines.length,c=l-1,h=0,u=r[h];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+n);let d=0;for(let b=Math.min(this.lines.maxLength-1,l+n-1);b>=0;b--)if(u&&u.start>c+d){for(let T=u.newLines.length-1;T>=0;T--)this.lines.set(b--,u.newLines[T]);b++,o.push({index:c+1,amount:u.newLines.length}),d+=u.newLines.length,u=r[++h]}else this.lines.set(b,a[c--]);let f=0;for(let b=o.length-1;b>=0;b--)o[b].index+=f,this.lines.onInsertEmitter.fire(o[b]),f+=o[b].amount;let g=Math.max(0,l+n-this.lines.maxLength);g>0&&this.lines.onTrimEmitter.fire(g)}}translateBufferLineToString(e,t,i=0,s){let r=this.lines.get(e);return r?r.translateToString(t,i,s):""}getWrappedRangeForLine(e){let t=e,i=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;i+1<this.lines.length&&this.lines.get(i+1).isWrapped;)i++;return{first:t,last:i}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new nT(e);return this.markers.push(t),t.register(this.lines.onTrim(i=>{t.line-=i,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(i=>{t.line>=i.index&&(t.line+=i.amount)})),t.register(this.lines.onDelete(i=>{t.line>=i.index&&t.line<i.index+i.amount&&t.dispose(),t.line>i.index&&(t.line-=i.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},oT=class extends X{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new z),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new mw(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new mw(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},LS=2,DS=1,Bg=class extends X{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new z),this.onResize=this._onResize.event,this._onScroll=this._register(new z),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,LS),this.rows=Math.max(e.rawOptions.rows||0,DS),this.buffers=this._register(new oT(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let i=this.cols!==e,s=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:i,rowsChanged:s})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let i=this.buffer,s;s=this._cachedBlankLine,(!s||s.length!==this.cols||s.getFg(0)!==e.fg||s.getBg(0)!==e.bg)&&(s=i.getBlankLine(e,t),this._cachedBlankLine=s),s.isWrapped=t;let r=i.ybase+i.scrollTop,n=i.ybase+i.scrollBottom;if(i.scrollTop===0){let o=i.lines.isFull;n===i.lines.length-1?o?i.lines.recycle().copyFrom(s):i.lines.push(s.clone()):i.lines.splice(n+1,0,s.clone()),o?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{let o=n-r+1;i.lines.shiftElements(r+1,o-1,-1),i.lines.set(n,s.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)}scrollLines(e,t){let i=this.buffer;if(e<0){if(i.ydisp===0)return;this.isUserScrolling=!0}else e+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);let s=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+e,i.ybase),0),s!==i.ydisp&&(t||this._onScroll.fire(i.ydisp))}};Bg=Pe([q(0,Kt)],Bg);var No={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Gh,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},aT=["normal","bold","100","200","300","400","500","600","700","800","900"],lT=class extends X{constructor(e){super(),this._onOptionChange=this._register(new z),this.onOptionChange=this._onOptionChange.event;let t={...No};for(let i in e)if(i in t)try{let s=e[i];t[i]=this._sanitizeAndValidateOption(i,s)}catch(s){console.error(s)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Ce(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(i=>{i===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(i=>{e.indexOf(i)!==-1&&t()})}_setupOptions(){let e=i=>{if(!(i in No))throw new Error(`No option with key "${i}"`);return this.rawOptions[i]},t=(i,s)=>{if(!(i in No))throw new Error(`No option with key "${i}"`);s=this._sanitizeAndValidateOption(i,s),this.rawOptions[i]!==s&&(this.rawOptions[i]=s,this._onOptionChange.fire(i))};for(let i in this.rawOptions){let s={get:e.bind(this,i),set:t.bind(this,i)};Object.defineProperty(this.options,i,s)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=No[e]),!cT(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=No[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=aT.includes(t)?t:No[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function cT(e){return e==="block"||e==="underline"||e==="bar"}function ul(e,t=5){if(typeof e!="object")return e;let i=Array.isArray(e)?[]:{};for(let s in e)i[s]=t<=1?e[s]:e[s]&&ul(e[s],t-1);return i}var _w=Object.freeze({insertMode:!1}),vw=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),Og=class extends X{constructor(e,t,i){super(),this._bufferService=e,this._logService=t,this._optionsService=i,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new z),this.onData=this._onData.event,this._onUserInput=this._register(new z),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new z),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new z),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=ul(_w),this.decPrivateModes=ul(vw)}reset(){this.modes=ul(_w),this.decPrivateModes=ul(vw)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let i=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&i.ybase!==i.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(s=>s.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};Og=Pe([q(0,$t),q(1,$w),q(2,Kt)],Og);var yw={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function Qp(e,t){let i=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(i|=64,i|=e.action):(i|=e.button&3,e.button&4&&(i|=64),e.button&8&&(i|=128),e.action===32?i|=32:e.action===0&&!t&&(i|=3)),i}var Jp=String.fromCharCode,bw={DEFAULT:e=>{let t=[Qp(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${Jp(t[0])}${Jp(t[1])}${Jp(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${Qp(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${Qp(e,!0)};${e.x};${e.y}${t}`}},zg=class extends X{constructor(e,t,i){super(),this._bufferService=e,this._coreService=t,this._optionsService=i,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new z),this.onProtocolChange=this._onProtocolChange.event;for(let s of Object.keys(yw))this.addProtocol(s,yw[s]);for(let s of Object.keys(bw))this.addEncoding(s,bw[s]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,i){if(e.deltaY===0||e.shiftKey||t===void 0||i===void 0)return 0;let s=t/i,r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(r/=s+0,Math.abs(e.deltaY)<50&&(r*=.3),this._wheelPartialScroll+=r,r=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._bufferService.rows),r}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,i){if(i){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};zg=Pe([q(0,$t),q(1,An),q(2,Kt)],zg);var eg=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],hT=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],it;function uT(e,t){let i=0,s=t.length-1,r;if(e<t[0][0]||e>t[s][1])return!1;for(;s>=i;)if(r=i+s>>1,e>t[r][1])i=r+1;else if(e<t[r][0])s=r-1;else return!0;return!1}var dT=class{constructor(){if(this.version="6",!it){it=new Uint8Array(65536),it.fill(1),it[0]=0,it.fill(0,1,32),it.fill(0,127,160),it.fill(2,4352,4448),it[9001]=2,it[9002]=2,it.fill(2,11904,42192),it[12351]=1,it.fill(2,44032,55204),it.fill(2,63744,64256),it.fill(2,65040,65050),it.fill(2,65072,65136),it.fill(2,65280,65377),it.fill(2,65504,65511);for(let e=0;e<eg.length;++e)it.fill(0,eg[e][0],eg[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?it[e]:uT(e,hT)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let i=this.wcwidth(e),s=i===0&&t!==0;if(s){let r=xn.extractWidth(t);r===0?s=!1:r>i&&(i=r)}return xn.createPropertyValue(0,i,s)}},xn=class Ih{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new z,this.onChange=this._onChange.event;let t=new dT;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,i,s=!1){return(t&16777215)<<3|(i&3)<<1|(s?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let i=0,s=0,r=t.length;for(let n=0;n<r;++n){let o=t.charCodeAt(n);if(55296<=o&&o<=56319){if(++n>=r)return i+this.wcwidth(o);let c=t.charCodeAt(n);56320<=c&&c<=57343?o=(o-55296)*1024+c-56320+65536:i+=this.wcwidth(c)}let a=this.charProperties(o,s),l=Ih.extractWidth(a);Ih.extractShouldJoin(a)&&(l-=Ih.extractWidth(s)),i+=l,s=a}return i}charProperties(t,i){return this._activeProvider.charProperties(t,i)}},fT=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function ww(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),i=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);i&&t&&(i.isWrapped=t[3]!==0&&t[3]!==32)}var rl=2147483647,pT=256,NS=class Hg{constructor(t=32,i=32){if(this.maxLength=t,this.maxSubParamsLength=i,i>pT)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(i),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let i=new Hg;if(!t.length)return i;for(let s=Array.isArray(t[0])?1:0;s<t.length;++s){let r=t[s];if(Array.isArray(r))for(let n=0;n<r.length;++n)i.addSubParam(r[n]);else i.addParam(r)}return i}clone(){let t=new Hg(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let i=0;i<this.length;++i){t.push(this.params[i]);let s=this._subParamsIdx[i]>>8,r=this._subParamsIdx[i]&255;r-s>0&&t.push(Array.prototype.slice.call(this._subParams,s,r))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>rl?rl:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>rl?rl:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let i=this._subParamsIdx[t]>>8,s=this._subParamsIdx[t]&255;return s-i>0?this._subParams.subarray(i,s):null}getSubParamsAll(){let t={};for(let i=0;i<this.length;++i){let s=this._subParamsIdx[i]>>8,r=this._subParamsIdx[i]&255;r-s>0&&(t[i]=this._subParams.slice(s,r))}return t}addDigit(t){let i;if(this._rejectDigits||!(i=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let s=this._digitIsSub?this._subParams:this.params,r=s[i-1];s[i-1]=~r?Math.min(r*10+t,rl):t}},nl=[],gT=class{constructor(){this._state=0,this._active=nl,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let s=i.indexOf(t);s!==-1&&i.splice(s,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=nl}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=nl,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||nl,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,i){if(!this._active.length)this._handlerFb(this._id,"PUT",Zh(e,t,i));else for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,i)}start(){this.reset(),this._state=1}put(e,t,i){if(this._state!==3){if(this._state===1)for(;t<i;){let s=e[t++];if(s===59){this._state=2,this._start();break}if(s<48||57<s){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+s-48}this._state===2&&i-t>0&&this._put(e,t,i)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let i=!1,s=this._active.length-1,r=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&i===!1){for(;s>=0&&(i=this._active[s].end(e),i!==!0);s--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,i;s--}for(;s>=0;s--)if(i=this._active[s].end(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,i}this._active=nl,this._id=-1,this._state=0}}},_i=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=Zh(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(i=>(this._data="",this._hitLimit=!1,i));return this._data="",this._hitLimit=!1,t}},ol=[],mT=class{constructor(){this._handlers=Object.create(null),this._active=ol,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=ol}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let s=i.indexOf(t);s!==-1&&i.splice(s,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=ol,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||ol,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let i=this._active.length-1;i>=0;i--)this._active[i].hook(t)}put(e,t,i){if(!this._active.length)this._handlerFb(this._ident,"PUT",Zh(e,t,i));else for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,i)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let i=!1,s=this._active.length-1,r=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&i===!1){for(;s>=0&&(i=this._active[s].unhook(e),i!==!0);s--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,i;s--}for(;s>=0;s--)if(i=this._active[s].unhook(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,i}this._active=ol,this._ident=0}},dl=new NS;dl.addParam(0);var Sw=class{constructor(e){this._handler=e,this._data="",this._params=dl,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():dl,this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=Zh(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(i=>(this._params=dl,this._data="",this._hitLimit=!1,i));return this._params=dl,this._data="",this._hitLimit=!1,t}},_T=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,i,s){this.table[t<<8|e]=i<<4|s}addMany(e,t,i,s){for(let r=0;r<e.length;r++)this.table[t<<8|e[r]]=i<<4|s}},Bi=160,vT=(function(){let e=new _T(4095),t=Array.apply(null,Array(256)).map((a,l)=>l),i=(a,l)=>t.slice(a,l),s=i(32,127),r=i(0,24);r.push(25),r.push.apply(r,i(28,32));let n=i(0,14),o;e.setDefault(1,0),e.addMany(s,0,2,0);for(o in n)e.addMany([24,26,153,154],o,3,0),e.addMany(i(128,144),o,3,0),e.addMany(i(144,152),o,3,0),e.add(156,o,0,0),e.add(27,o,11,1),e.add(157,o,4,8),e.addMany([152,158,159],o,0,7),e.add(155,o,11,3),e.add(144,o,11,9);return e.addMany(r,0,3,0),e.addMany(r,1,3,1),e.add(127,1,0,1),e.addMany(r,8,0,8),e.addMany(r,3,3,3),e.add(127,3,0,3),e.addMany(r,4,3,4),e.add(127,4,0,4),e.addMany(r,6,3,6),e.addMany(r,5,3,5),e.add(127,5,0,5),e.addMany(r,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(s,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(i(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(s,7,0,7),e.addMany(r,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(i(64,127),3,7,0),e.addMany(i(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(i(48,60),4,8,4),e.addMany(i(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(i(32,64),6,0,6),e.add(127,6,0,6),e.addMany(i(64,127),6,0,0),e.addMany(i(32,48),3,9,5),e.addMany(i(32,48),5,9,5),e.addMany(i(48,64),5,0,6),e.addMany(i(64,127),5,7,0),e.addMany(i(32,48),4,9,5),e.addMany(i(32,48),1,9,2),e.addMany(i(32,48),2,9,2),e.addMany(i(48,127),2,10,0),e.addMany(i(48,80),1,10,0),e.addMany(i(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(i(96,127),1,10,0),e.add(80,1,11,9),e.addMany(r,9,0,9),e.add(127,9,0,9),e.addMany(i(28,32),9,0,9),e.addMany(i(32,48),9,9,12),e.addMany(i(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(r,11,0,11),e.addMany(i(32,128),11,0,11),e.addMany(i(28,32),11,0,11),e.addMany(r,10,0,10),e.add(127,10,0,10),e.addMany(i(28,32),10,0,10),e.addMany(i(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(i(32,48),10,9,12),e.addMany(r,12,0,12),e.add(127,12,0,12),e.addMany(i(28,32),12,0,12),e.addMany(i(32,48),12,9,12),e.addMany(i(48,64),12,0,11),e.addMany(i(64,127),12,12,13),e.addMany(i(64,127),10,12,13),e.addMany(i(64,127),9,12,13),e.addMany(r,13,13,13),e.addMany(s,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(Bi,0,2,0),e.add(Bi,8,5,8),e.add(Bi,6,0,6),e.add(Bi,11,0,11),e.add(Bi,13,13,13),e})(),yT=class extends X{constructor(e=vT){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new NS,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,i,s)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,i)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Ce(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new gT),this._dcsParser=this._register(new mT),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let i=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(i=e.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let r=0;r<e.intermediates.length;++r){let n=e.intermediates.charCodeAt(r);if(32>n||n>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");i<<=8,i|=n}}if(e.final.length!==1)throw new Error("final must be a single byte");let s=e.final.charCodeAt(0);if(t[0]>s||s>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return i<<=8,i|=s,i}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let i=this._identifier(e,[48,126]);this._escHandlers[i]===void 0&&(this._escHandlers[i]=[]);let s=this._escHandlers[i];return s.push(t),{dispose:()=>{let r=s.indexOf(t);r!==-1&&s.splice(r,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let i=this._identifier(e);this._csiHandlers[i]===void 0&&(this._csiHandlers[i]=[]);let s=this._csiHandlers[i];return s.push(t),{dispose:()=>{let r=s.indexOf(t);r!==-1&&s.splice(r,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,i,s,r){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=i,this._parseStack.transition=s,this._parseStack.chunkPos=r}parse(e,t,i){let s=0,r=0,n=0,o;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,n=this._parseStack.chunkPos+1;else{if(i===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let a=this._parseStack.handlers,l=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(i===!1&&l>-1){for(;l>=0&&(o=a[l](this._params),o!==!0);l--)if(o instanceof Promise)return this._parseStack.handlerPos=l,o}this._parseStack.handlers=[];break;case 4:if(i===!1&&l>-1){for(;l>=0&&(o=a[l](),o!==!0);l--)if(o instanceof Promise)return this._parseStack.handlerPos=l,o}this._parseStack.handlers=[];break;case 6:if(s=e[this._parseStack.chunkPos],o=this._dcsParser.unhook(s!==24&&s!==26,i),o)return o;s===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(s=e[this._parseStack.chunkPos],o=this._oscParser.end(s!==24&&s!==26,i),o)return o;s===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,n=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let a=n;a<t;++a){switch(s=e[a],r=this._transitions.table[this.currentState<<8|(s<160?s:Bi)],r>>4){case 2:for(let d=a+1;;++d){if(d>=t||(s=e[d])<32||s>126&&s<Bi){this._printHandler(e,a,d),a=d-1;break}if(++d>=t||(s=e[d])<32||s>126&&s<Bi){this._printHandler(e,a,d),a=d-1;break}if(++d>=t||(s=e[d])<32||s>126&&s<Bi){this._printHandler(e,a,d),a=d-1;break}if(++d>=t||(s=e[d])<32||s>126&&s<Bi){this._printHandler(e,a,d),a=d-1;break}}break;case 3:this._executeHandlers[s]?this._executeHandlers[s]():this._executeHandlerFb(s),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:a,code:s,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let l=this._csiHandlers[this._collect<<8|s],c=l?l.length-1:-1;for(;c>=0&&(o=l[c](this._params),o!==!0);c--)if(o instanceof Promise)return this._preserveStack(3,l,c,r,a),o;c<0&&this._csiHandlerFb(this._collect<<8|s,this._params),this.precedingJoinState=0;break;case 8:do switch(s){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(s-48)}while(++a<t&&(s=e[a])>47&&s<60);a--;break;case 9:this._collect<<=8,this._collect|=s;break;case 10:let h=this._escHandlers[this._collect<<8|s],u=h?h.length-1:-1;for(;u>=0&&(o=h[u](),o!==!0);u--)if(o instanceof Promise)return this._preserveStack(4,h,u,r,a),o;u<0&&this._escHandlerFb(this._collect<<8|s),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|s,this._params);break;case 13:for(let d=a+1;;++d)if(d>=t||(s=e[d])===24||s===26||s===27||s>127&&s<Bi){this._dcsParser.put(e,a,d),a=d-1;break}break;case 14:if(o=this._dcsParser.unhook(s!==24&&s!==26),o)return this._preserveStack(6,[],0,r,a),o;s===27&&(r|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let d=a+1;;d++)if(d>=t||(s=e[d])<32||s>127&&s<Bi){this._oscParser.put(e,a,d),a=d-1;break}break;case 6:if(o=this._oscParser.end(s!==24&&s!==26),o)return this._preserveStack(5,[],0,r,a),o;s===27&&(r|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=r&15}}},bT=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,wT=/^[\da-f]+$/;function kw(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let i=bT.exec(t);if(i){let s=i[1]?15:i[4]?255:i[7]?4095:65535;return[Math.round(parseInt(i[1]||i[4]||i[7]||i[10],16)/s*255),Math.round(parseInt(i[2]||i[5]||i[8]||i[11],16)/s*255),Math.round(parseInt(i[3]||i[6]||i[9]||i[12],16)/s*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),wT.exec(t)&&[3,6,9,12].includes(t.length))){let i=t.length/3,s=[0,0,0];for(let r=0;r<3;++r){let n=parseInt(t.slice(i*r,i*r+i),16);s[r]=i===1?n<<4:i===2?n:i===3?n>>4:n>>8}return s}}function tg(e,t){let i=e.toString(16),s=i.length<2?"0"+i:i;switch(t){case 4:return i[0];case 8:return s;case 12:return(s+s).slice(0,3);default:return s+s}}function ST(e,t=16){let[i,s,r]=e;return`rgb:${tg(i,t)}/${tg(s,t)}/${tg(r,t)}`}var kT={"(":0,")":1,"*":2,"+":3,"-":1,".":2},zr=131072,xw=10;function Cw(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var Ew=5e3,Tw=0,xT=class extends X{constructor(e,t,i,s,r,n,o,a,l=new yT){super(),this._bufferService=e,this._charsetService=t,this._coreService=i,this._logService=s,this._optionsService=r,this._oscLinkService=n,this._coreMouseService=o,this._unicodeService=a,this._parser=l,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new gE,this._utf8Decoder=new mE,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=Ye.clone(),this._eraseAttrDataInternal=Ye.clone(),this._onRequestBell=this._register(new z),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new z),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new z),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new z),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new z),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new z),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new z),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new z),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new z),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new z),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new z),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new z),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new z),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new Ug(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(c=>this._activeBuffer=c.activeBuffer)),this._parser.setCsiHandlerFallback((c,h)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(c),params:h.toArray()})}),this._parser.setEscHandlerFallback(c=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(c)})}),this._parser.setExecuteHandlerFallback(c=>{this._logService.debug("Unknown EXECUTE code: ",{code:c})}),this._parser.setOscHandlerFallback((c,h,u)=>{this._logService.debug("Unknown OSC code: ",{identifier:c,action:h,data:u})}),this._parser.setDcsHandlerFallback((c,h,u)=>{h==="HOOK"&&(u=u.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(c),action:h,payload:u})}),this._parser.setPrintHandler((c,h,u)=>this.print(c,h,u)),this._parser.registerCsiHandler({final:"@"},c=>this.insertChars(c)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},c=>this.scrollLeft(c)),this._parser.registerCsiHandler({final:"A"},c=>this.cursorUp(c)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},c=>this.scrollRight(c)),this._parser.registerCsiHandler({final:"B"},c=>this.cursorDown(c)),this._parser.registerCsiHandler({final:"C"},c=>this.cursorForward(c)),this._parser.registerCsiHandler({final:"D"},c=>this.cursorBackward(c)),this._parser.registerCsiHandler({final:"E"},c=>this.cursorNextLine(c)),this._parser.registerCsiHandler({final:"F"},c=>this.cursorPrecedingLine(c)),this._parser.registerCsiHandler({final:"G"},c=>this.cursorCharAbsolute(c)),this._parser.registerCsiHandler({final:"H"},c=>this.cursorPosition(c)),this._parser.registerCsiHandler({final:"I"},c=>this.cursorForwardTab(c)),this._parser.registerCsiHandler({final:"J"},c=>this.eraseInDisplay(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},c=>this.eraseInDisplay(c,!0)),this._parser.registerCsiHandler({final:"K"},c=>this.eraseInLine(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},c=>this.eraseInLine(c,!0)),this._parser.registerCsiHandler({final:"L"},c=>this.insertLines(c)),this._parser.registerCsiHandler({final:"M"},c=>this.deleteLines(c)),this._parser.registerCsiHandler({final:"P"},c=>this.deleteChars(c)),this._parser.registerCsiHandler({final:"S"},c=>this.scrollUp(c)),this._parser.registerCsiHandler({final:"T"},c=>this.scrollDown(c)),this._parser.registerCsiHandler({final:"X"},c=>this.eraseChars(c)),this._parser.registerCsiHandler({final:"Z"},c=>this.cursorBackwardTab(c)),this._parser.registerCsiHandler({final:"`"},c=>this.charPosAbsolute(c)),this._parser.registerCsiHandler({final:"a"},c=>this.hPositionRelative(c)),this._parser.registerCsiHandler({final:"b"},c=>this.repeatPrecedingCharacter(c)),this._parser.registerCsiHandler({final:"c"},c=>this.sendDeviceAttributesPrimary(c)),this._parser.registerCsiHandler({prefix:">",final:"c"},c=>this.sendDeviceAttributesSecondary(c)),this._parser.registerCsiHandler({final:"d"},c=>this.linePosAbsolute(c)),this._parser.registerCsiHandler({final:"e"},c=>this.vPositionRelative(c)),this._parser.registerCsiHandler({final:"f"},c=>this.hVPosition(c)),this._parser.registerCsiHandler({final:"g"},c=>this.tabClear(c)),this._parser.registerCsiHandler({final:"h"},c=>this.setMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"h"},c=>this.setModePrivate(c)),this._parser.registerCsiHandler({final:"l"},c=>this.resetMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"l"},c=>this.resetModePrivate(c)),this._parser.registerCsiHandler({final:"m"},c=>this.charAttributes(c)),this._parser.registerCsiHandler({final:"n"},c=>this.deviceStatus(c)),this._parser.registerCsiHandler({prefix:"?",final:"n"},c=>this.deviceStatusPrivate(c)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},c=>this.softReset(c)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},c=>this.setCursorStyle(c)),this._parser.registerCsiHandler({final:"r"},c=>this.setScrollRegion(c)),this._parser.registerCsiHandler({final:"s"},c=>this.saveCursor(c)),this._parser.registerCsiHandler({final:"t"},c=>this.windowOptions(c)),this._parser.registerCsiHandler({final:"u"},c=>this.restoreCursor(c)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},c=>this.insertColumns(c)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},c=>this.deleteColumns(c)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},c=>this.selectProtected(c)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},c=>this.requestMode(c,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},c=>this.requestMode(c,!1)),this._parser.setExecuteHandler(D.BEL,()=>this.bell()),this._parser.setExecuteHandler(D.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(D.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(D.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(D.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(D.BS,()=>this.backspace()),this._parser.setExecuteHandler(D.HT,()=>this.tab()),this._parser.setExecuteHandler(D.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(D.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Ph.IND,()=>this.index()),this._parser.setExecuteHandler(Ph.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Ph.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new _i(c=>(this.setTitle(c),this.setIconName(c),!0))),this._parser.registerOscHandler(1,new _i(c=>this.setIconName(c))),this._parser.registerOscHandler(2,new _i(c=>this.setTitle(c))),this._parser.registerOscHandler(4,new _i(c=>this.setOrReportIndexedColor(c))),this._parser.registerOscHandler(8,new _i(c=>this.setHyperlink(c))),this._parser.registerOscHandler(10,new _i(c=>this.setOrReportFgColor(c))),this._parser.registerOscHandler(11,new _i(c=>this.setOrReportBgColor(c))),this._parser.registerOscHandler(12,new _i(c=>this.setOrReportCursorColor(c))),this._parser.registerOscHandler(104,new _i(c=>this.restoreIndexedColor(c))),this._parser.registerOscHandler(110,new _i(c=>this.restoreFgColor(c))),this._parser.registerOscHandler(111,new _i(c=>this.restoreBgColor(c))),this._parser.registerOscHandler(112,new _i(c=>this.restoreCursorColor(c))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let c in st)this._parser.registerEscHandler({intermediates:"(",final:c},()=>this.selectCharset("("+c)),this._parser.registerEscHandler({intermediates:")",final:c},()=>this.selectCharset(")"+c)),this._parser.registerEscHandler({intermediates:"*",final:c},()=>this.selectCharset("*"+c)),this._parser.registerEscHandler({intermediates:"+",final:c},()=>this.selectCharset("+"+c)),this._parser.registerEscHandler({intermediates:"-",final:c},()=>this.selectCharset("-"+c)),this._parser.registerEscHandler({intermediates:".",final:c},()=>this.selectCharset("."+c)),this._parser.registerEscHandler({intermediates:"/",final:c},()=>this.selectCharset("/"+c));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(c=>(this._logService.error("Parsing error: ",c),c)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new Sw((c,h)=>this.requestStatusString(c,h)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,i,s){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=i,this._parseStack.position=s}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,i)=>setTimeout(()=>i("#SLOW_TIMEOUT"),Ew))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${Ew} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let i,s=this._activeBuffer.x,r=this._activeBuffer.y,n=0,o=this._parseStack.paused;if(o){if(i=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(i),i;s=this._parseStack.cursorStartX,r=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>zr&&(n=this._parseStack.position+zr)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,c=>String.fromCharCode(c)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(c=>c.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<zr&&(this._parseBuffer=new Uint32Array(Math.min(e.length,zr))),o||this._dirtyRowTracker.clearRange(),e.length>zr)for(let c=n;c<e.length;c+=zr){let h=c+zr<e.length?c+zr:e.length,u=typeof e=="string"?this._stringDecoder.decode(e.substring(c,h),this._parseBuffer):this._utf8Decoder.decode(e.subarray(c,h),this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,u))return this._preserveStack(s,r,u,c),this._logSlowResolvingAsync(i),i}else if(!o){let c=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,c))return this._preserveStack(s,r,c,0),this._logSlowResolvingAsync(i),i}(this._activeBuffer.x!==s||this._activeBuffer.y!==r)&&this._onCursorMove.fire();let a=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),l=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);l<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(l,this._bufferService.rows-1),end:Math.min(a,this._bufferService.rows-1)})}print(e,t,i){let s,r,n=this._charsetService.charset,o=this._optionsService.rawOptions.screenReaderMode,a=this._bufferService.cols,l=this._coreService.decPrivateModes.wraparound,c=this._coreService.modes.insertMode,h=this._curAttrData,u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&i-t>0&&u.getWidth(this._activeBuffer.x-1)===2&&u.setCellFromCodepoint(this._activeBuffer.x-1,0,1,h);let d=this._parser.precedingJoinState;for(let f=t;f<i;++f){if(s=e[f],s<127&&n){let _=n[String.fromCharCode(s)];_&&(s=_.charCodeAt(0))}let g=this._unicodeService.charProperties(s,d);r=xn.extractWidth(g);let b=xn.extractShouldJoin(g),T=b?xn.extractWidth(d):0;if(d=g,o&&this._onA11yChar.fire(Hr(s)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+r-T>a){if(l){let _=u,m=this._activeBuffer.x-T;for(this._activeBuffer.x=T,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),T>0&&u instanceof hl&&u.copyCellsFrom(_,m,0,T,!1);m<a;)_.setCellFromCodepoint(m++,0,1,h)}else if(this._activeBuffer.x=a-1,r===2)continue}if(b&&this._activeBuffer.x){let _=u.getWidth(this._activeBuffer.x-1)?1:2;u.addCodepointToCell(this._activeBuffer.x-_,s,r);for(let m=r-T;--m>=0;)u.setCellFromCodepoint(this._activeBuffer.x++,0,0,h);continue}if(c&&(u.insertCells(this._activeBuffer.x,r-T,this._activeBuffer.getNullCell(h)),u.getWidth(a-1)===2&&u.setCellFromCodepoint(a-1,0,1,h)),u.setCellFromCodepoint(this._activeBuffer.x++,s,r,h),r>0)for(;--r;)u.setCellFromCodepoint(this._activeBuffer.x++,0,0,h)}this._parser.precedingJoinState=d,this._activeBuffer.x<a&&i-t>0&&u.getWidth(this._activeBuffer.x)===0&&!u.hasContent(this._activeBuffer.x)&&u.setCellFromCodepoint(this._activeBuffer.x,0,1,h),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,i=>Cw(i.params[0],this._optionsService.rawOptions.windowOptions)?t(i):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new Sw(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new _i(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,i,s=!1,r=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.replaceCells(t,i,this._activeBuffer.getNullCell(this._eraseAttrData()),r),s&&(n.isWrapped=!1)}_resetBufferLine(e,t=!1){let i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i&&(i.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),i.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let i;switch(e.params[0]){case 0:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);i<this._bufferService.rows;i++)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(i);break;case 1:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(i+1).isWrapped=!1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(i=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,i-1);i--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+i)?.getTrimmedLength(););for(;i>=0;i--)this._bufferService.scroll(this._eraseAttrData())}else{for(i=this._bufferService.rows,this._dirtyRowTracker.markDirty(i-1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let s=this._activeBuffer.lines.length-this._bufferService.rows;s>0&&(this._activeBuffer.lines.trimStart(s),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-s,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-s,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let i=this._activeBuffer.ybase+this._activeBuffer.y,s=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-s+1;for(;t--;)this._activeBuffer.lines.splice(r-1,1),this._activeBuffer.lines.splice(i,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let i=this._activeBuffer.ybase+this._activeBuffer.y,s;for(s=this._bufferService.rows-1-this._activeBuffer.scrollBottom,s=this._bufferService.rows-1+this._activeBuffer.ybase-s;t--;)this._activeBuffer.lines.splice(i,1),this._activeBuffer.lines.splice(s,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(Ye));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);s.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);s.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);s.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);s.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let i=e.params[0]||1,s=xn.extractWidth(t),r=this._activeBuffer.x-s,n=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(r),o=new Uint32Array(n.length*i),a=0;for(let c=0;c<n.length;){let h=n.codePointAt(c)||0;o[a++]=h,c+=h>65535?2:1}let l=a;for(let c=1;c<i;++c)o.copyWithin(l,0,a),l+=a;return this.print(o,0,l),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(D.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(D.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(D.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(D.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(D.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,kn),this._charsetService.setgCharset(1,kn),this._charsetService.setgCharset(2,kn),this._charsetService.setgCharset(3,kn);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){let i;(b=>(b[b.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",b[b.SET=1]="SET",b[b.RESET=2]="RESET",b[b.PERMANENTLY_SET=3]="PERMANENTLY_SET",b[b.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(i||={});let s=this._coreService.decPrivateModes,{activeProtocol:r,activeEncoding:n}=this._coreMouseService,o=this._coreService,{buffers:a,cols:l}=this._bufferService,{active:c,alt:h}=a,u=this._optionsService.rawOptions,d=(b,T)=>(o.triggerDataEvent(`${D.ESC}[${t?"":"?"}${b};${T}$y`),!0),f=b=>b?1:2,g=e.params[0];return t?g===2?d(g,4):g===4?d(g,f(o.modes.insertMode)):g===12?d(g,3):g===20?d(g,f(u.convertEol)):d(g,0):g===1?d(g,f(s.applicationCursorKeys)):g===3?d(g,u.windowOptions.setWinLines?l===80?2:l===132?1:0:0):g===6?d(g,f(s.origin)):g===7?d(g,f(s.wraparound)):g===8?d(g,3):g===9?d(g,f(r==="X10")):g===12?d(g,f(u.cursorBlink)):g===25?d(g,f(!o.isCursorHidden)):g===45?d(g,f(s.reverseWraparound)):g===66?d(g,f(s.applicationKeypad)):g===67?d(g,4):g===1e3?d(g,f(r==="VT200")):g===1002?d(g,f(r==="DRAG")):g===1003?d(g,f(r==="ANY")):g===1004?d(g,f(s.sendFocus)):g===1005?d(g,4):g===1006?d(g,f(n==="SGR")):g===1015?d(g,4):g===1016?d(g,f(n==="SGR_PIXELS")):g===1048?d(g,1):g===47||g===1047||g===1049?d(g,f(c===h)):g===2004?d(g,f(s.bracketedPasteMode)):g===2026?d(g,f(s.synchronizedOutput)):d(g,0)}_updateAttrColor(e,t,i,s,r){return t===2?(e|=50331648,e&=-16777216,e|=yl.fromColorRGB([i,s,r])):t===5&&(e&=-50331904,e|=33554432|i&255),e}_extractColor(e,t,i){let s=[0,0,-1,0,0,0],r=0,n=0;do{if(s[n+r]=e.params[t+n],e.hasSubParams(t+n)){let o=e.getSubParams(t+n),a=0;do s[1]===5&&(r=1),s[n+a+1+r]=o[a];while(++a<o.length&&a+n+1+r<s.length);break}if(s[1]===5&&n+r>=2||s[1]===2&&n+r>=5)break;s[1]&&(r=1)}while(++n+t<e.length&&n+r<s.length);for(let o=2;o<s.length;++o)s[o]===-1&&(s[o]=0);switch(s[0]){case 38:i.fg=this._updateAttrColor(i.fg,s[1],s[3],s[4],s[5]);break;case 48:i.bg=this._updateAttrColor(i.bg,s[1],s[3],s[4],s[5]);break;case 58:i.extended=i.extended.clone(),i.extended.underlineColor=this._updateAttrColor(i.extended.underlineColor,s[1],s[3],s[4],s[5])}return n}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=Ye.fg,e.bg=Ye.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,i,s=this._curAttrData;for(let r=0;r<t;r++)i=e.params[r],i>=30&&i<=37?(s.fg&=-50331904,s.fg|=16777216|i-30):i>=40&&i<=47?(s.bg&=-50331904,s.bg|=16777216|i-40):i>=90&&i<=97?(s.fg&=-50331904,s.fg|=16777216|i-90|8):i>=100&&i<=107?(s.bg&=-50331904,s.bg|=16777216|i-100|8):i===0?this._processSGR0(s):i===1?s.fg|=134217728:i===3?s.bg|=67108864:i===4?(s.fg|=268435456,this._processUnderline(e.hasSubParams(r)?e.getSubParams(r)[0]:1,s)):i===5?s.fg|=536870912:i===7?s.fg|=67108864:i===8?s.fg|=1073741824:i===9?s.fg|=2147483648:i===2?s.bg|=134217728:i===21?this._processUnderline(2,s):i===22?(s.fg&=-134217729,s.bg&=-134217729):i===23?s.bg&=-67108865:i===24?(s.fg&=-268435457,this._processUnderline(0,s)):i===25?s.fg&=-536870913:i===27?s.fg&=-67108865:i===28?s.fg&=-1073741825:i===29?s.fg&=2147483647:i===39?(s.fg&=-67108864,s.fg|=Ye.fg&16777215):i===49?(s.bg&=-67108864,s.bg|=Ye.bg&16777215):i===38||i===48||i===58?r+=this._extractColor(e,r,s):i===53?s.bg|=1073741824:i===55?s.bg&=-1073741825:i===59?(s.extended=s.extended.clone(),s.extended.underlineColor=-1,s.updateExtended()):i===100?(s.fg&=-67108864,s.fg|=Ye.fg&16777215,s.bg&=-67108864,s.bg|=Ye.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",i);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${D.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${D.ESC}[${t};${i}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${D.ESC}[?${t};${i}R`);break;case 15:break;case 25:break;case 26:break;case 53:break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=Ye.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let i=t%2===1;this._coreService.decPrivateModes.cursorBlink=i}return!0}setScrollRegion(e){let t=e.params[0]||1,i;return(e.length<2||(i=e.params[1])>this._bufferService.rows||i===0)&&(i=this._bufferService.rows),i>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=i-1,this._setCursor(0,0)),!0}windowOptions(e){if(!Cw(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${D.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>xw&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>xw&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],i=e.split(";");for(;i.length>1;){let s=i.shift(),r=i.shift();if(/^\d+$/.exec(s)){let n=parseInt(s);if(Aw(n))if(r==="?")t.push({type:0,index:n});else{let o=kw(r);o&&t.push({type:1,index:n,color:o})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let i=e.slice(0,t).trim(),s=e.slice(t+1);return s?this._createHyperlink(i,s):i.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let i=e.split(":"),s,r=i.findIndex(n=>n.startsWith("id="));return r!==-1&&(s=i[r].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:s,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let i=e.split(";");for(let s=0;s<i.length&&!(t>=this._specialColors.length);++s,++t)if(i[s]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let r=kw(i[s]);r&&this._onColor.fire([{type:1,index:this._specialColors[t],color:r}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],i=e.split(";");for(let s=0;s<i.length;++s)if(/^\d+$/.exec(i[s])){let r=parseInt(i[s]);Aw(r)&&t.push({type:2,index:r})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,kn),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(kT[e[0]],st[e[1]]||kn),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=Ye.clone(),this._eraseAttrDataInternal=Ye.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new Oi;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let i=this._activeBuffer.ybase+this._activeBuffer.y+t,s=this._activeBuffer.lines.get(i);s&&(s.fill(e),s.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let i=o=>(this._coreService.triggerDataEvent(`${D.ESC}${o}${D.ESC}\\`),!0),s=this._bufferService.buffer,r=this._optionsService.rawOptions;return i(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${s.scrollTop+1};${s.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[r.cursorStyle]-(r.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},Ug=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(Tw=e,e=t,t=Tw),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};Ug=Pe([q(0,$t)],Ug);function Aw(e){return 0<=e&&e<256}var CT=5e7,Mw=12,ET=50,TT=class extends X{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new z),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let i;for(;i=this._writeBuffer.shift();){this._action(i);let s=this._callbacks.shift();s&&s()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>CT)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let i=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let s=this._writeBuffer[this._bufferOffset],r=this._action(s,t);if(r){let o=a=>performance.now()-i>=Mw?setTimeout(()=>this._innerWrite(0,a)):this._innerWrite(i,a);r.catch(a=>(queueMicrotask(()=>{throw a}),Promise.resolve(!1))).then(o);return}let n=this._callbacks[this._bufferOffset];if(n&&n(),this._bufferOffset++,this._pendingData-=s.length,performance.now()-i>=Mw)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>ET&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},Pg=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let a=t.addMarker(t.ybase+t.y),l={data:e,id:this._nextId++,lines:[a]};return a.onDispose(()=>this._removeMarkerFromLink(l,a)),this._dataByLinkId.set(l.id,l),l.id}let i=e,s=this._getEntryIdKey(i),r=this._entriesWithId.get(s);if(r)return this.addLineToLink(r.id,t.ybase+t.y),r.id;let n=t.addMarker(t.ybase+t.y),o={id:this._nextId++,key:this._getEntryIdKey(i),data:i,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(o,n)),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(e,t){let i=this._dataByLinkId.get(e);if(i&&i.lines.every(s=>s.line!==t)){let s=this._bufferService.buffer.addMarker(t);i.lines.push(s),s.onDispose(()=>this._removeMarkerFromLink(i,s))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let i=e.lines.indexOf(t);i!==-1&&(e.lines.splice(i,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};Pg=Pe([q(0,$t)],Pg);var Rw=!1,AT=class extends X{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new Oo),this._onBinary=this._register(new z),this.onBinary=this._onBinary.event,this._onData=this._register(new z),this.onData=this._onData.event,this._onLineFeed=this._register(new z),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new z),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new z),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new z),this._instantiationService=new Z4,this.optionsService=this._register(new lT(e)),this._instantiationService.setService(Kt,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(Bg)),this._instantiationService.setService($t,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(Ng)),this._instantiationService.setService($w,this._logService),this.coreService=this._register(this._instantiationService.createInstance(Og)),this._instantiationService.setService(An,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(zg)),this._instantiationService.setService(Fw,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(xn)),this._instantiationService.setService(bE,this.unicodeService),this._charsetService=this._instantiationService.createInstance(fT),this._instantiationService.setService(yE,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(Pg),this._instantiationService.setService(Kw,this._oscLinkService),this._inputHandler=this._register(new xT(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(Tt.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(Tt.forward(this._bufferService.onResize,this._onResize)),this._register(Tt.forward(this.coreService.onData,this._onData)),this._register(Tt.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new TT((t,i)=>this._inputHandler.parse(t,i))),this._register(Tt.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new z),this._onScroll.event(e=>{this._onScrollApi?.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!Rw&&(this._logService.warn("writeSync is unreliable and will be removed soon."),Rw=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,LS),t=Math.max(t,DS),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(ww.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(ww(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Ce(()=>{for(let t of e)t.dispose()})}}},MT={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function RT(e,t,i,s){let r={type:0,cancel:!1,key:void 0},n=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?r.key=D.ESC+"OA":r.key=D.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?r.key=D.ESC+"OD":r.key=D.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?r.key=D.ESC+"OC":r.key=D.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?r.key=D.ESC+"OB":r.key=D.ESC+"[B");break;case 8:r.key=e.ctrlKey?"\b":D.DEL,e.altKey&&(r.key=D.ESC+r.key);break;case 9:if(e.shiftKey){r.key=D.ESC+"[Z";break}r.key=D.HT,r.cancel=!0;break;case 13:r.key=e.altKey?D.ESC+D.CR:D.CR,r.cancel=!0;break;case 27:r.key=D.ESC,e.altKey&&(r.key=D.ESC+D.ESC),r.cancel=!0;break;case 37:if(e.metaKey)break;n?r.key=D.ESC+"[1;"+(n+1)+"D":t?r.key=D.ESC+"OD":r.key=D.ESC+"[D";break;case 39:if(e.metaKey)break;n?r.key=D.ESC+"[1;"+(n+1)+"C":t?r.key=D.ESC+"OC":r.key=D.ESC+"[C";break;case 38:if(e.metaKey)break;n?r.key=D.ESC+"[1;"+(n+1)+"A":t?r.key=D.ESC+"OA":r.key=D.ESC+"[A";break;case 40:if(e.metaKey)break;n?r.key=D.ESC+"[1;"+(n+1)+"B":t?r.key=D.ESC+"OB":r.key=D.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(r.key=D.ESC+"[2~");break;case 46:n?r.key=D.ESC+"[3;"+(n+1)+"~":r.key=D.ESC+"[3~";break;case 36:n?r.key=D.ESC+"[1;"+(n+1)+"H":t?r.key=D.ESC+"OH":r.key=D.ESC+"[H";break;case 35:n?r.key=D.ESC+"[1;"+(n+1)+"F":t?r.key=D.ESC+"OF":r.key=D.ESC+"[F";break;case 33:e.shiftKey?r.type=2:e.ctrlKey?r.key=D.ESC+"[5;"+(n+1)+"~":r.key=D.ESC+"[5~";break;case 34:e.shiftKey?r.type=3:e.ctrlKey?r.key=D.ESC+"[6;"+(n+1)+"~":r.key=D.ESC+"[6~";break;case 112:n?r.key=D.ESC+"[1;"+(n+1)+"P":r.key=D.ESC+"OP";break;case 113:n?r.key=D.ESC+"[1;"+(n+1)+"Q":r.key=D.ESC+"OQ";break;case 114:n?r.key=D.ESC+"[1;"+(n+1)+"R":r.key=D.ESC+"OR";break;case 115:n?r.key=D.ESC+"[1;"+(n+1)+"S":r.key=D.ESC+"OS";break;case 116:n?r.key=D.ESC+"[15;"+(n+1)+"~":r.key=D.ESC+"[15~";break;case 117:n?r.key=D.ESC+"[17;"+(n+1)+"~":r.key=D.ESC+"[17~";break;case 118:n?r.key=D.ESC+"[18;"+(n+1)+"~":r.key=D.ESC+"[18~";break;case 119:n?r.key=D.ESC+"[19;"+(n+1)+"~":r.key=D.ESC+"[19~";break;case 120:n?r.key=D.ESC+"[20;"+(n+1)+"~":r.key=D.ESC+"[20~";break;case 121:n?r.key=D.ESC+"[21;"+(n+1)+"~":r.key=D.ESC+"[21~";break;case 122:n?r.key=D.ESC+"[23;"+(n+1)+"~":r.key=D.ESC+"[23~";break;case 123:n?r.key=D.ESC+"[24;"+(n+1)+"~":r.key=D.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?r.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?r.key=D.NUL:e.keyCode>=51&&e.keyCode<=55?r.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?r.key=D.DEL:e.keyCode===219?r.key=D.ESC:e.keyCode===220?r.key=D.FS:e.keyCode===221&&(r.key=D.GS);else if((!i||s)&&e.altKey&&!e.metaKey){let o=MT[e.keyCode]?.[e.shiftKey?1:0];if(o)r.key=D.ESC+o;else if(e.keyCode>=65&&e.keyCode<=90){let a=e.ctrlKey?e.keyCode-64:e.keyCode+32,l=String.fromCharCode(a);e.shiftKey&&(l=l.toUpperCase()),r.key=D.ESC+l}else if(e.keyCode===32)r.key=D.ESC+(e.ctrlKey?D.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let a=e.code.slice(3,4);e.shiftKey||(a=a.toLowerCase()),r.key=D.ESC+a,r.cancel=!0}}else i&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(r.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?r.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(r.key=D.US),e.key==="@"&&(r.key=D.NUL));break}return r}var Ke=0,LT=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new Yh,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new Yh,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((r,n)=>this._getKey(r)-this._getKey(n)),t=0,i=0,s=new Array(this._array.length+this._insertedValues.length);for(let r=0;r<s.length;r++)i>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[i])?(s[r]=e[t],t++):s[r]=this._array[i++];this._array=s,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(Ke=this._search(t),Ke===-1)||this._getKey(this._array[Ke])!==t)return!1;do if(this._array[Ke]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(Ke),!0;while(++Ke<this._array.length&&this._getKey(this._array[Ke])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((r,n)=>r-n),t=0,i=new Array(this._array.length-e.length),s=0;for(let r=0;r<this._array.length;r++)e[t]===r?t++:i[s++]=this._array[r];this._array=i,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Ke=this._search(e),!(Ke<0||Ke>=this._array.length)&&this._getKey(this._array[Ke])===e))do yield this._array[Ke];while(++Ke<this._array.length&&this._getKey(this._array[Ke])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Ke=this._search(e),!(Ke<0||Ke>=this._array.length)&&this._getKey(this._array[Ke])===e))do t(this._array[Ke]);while(++Ke<this._array.length&&this._getKey(this._array[Ke])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,i=this._array.length-1;for(;i>=t;){let s=t+i>>1,r=this._getKey(this._array[s]);if(r>e)i=s-1;else if(r<e)t=s+1;else{for(;s>0&&this._getKey(this._array[s-1])===e;)s--;return s}}return t}},ig=0,Lw=0,DT=class extends X{constructor(){super(),this._decorations=new LT(e=>e?.marker.line),this._onDecorationRegistered=this._register(new z),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new z),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(Ce(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new NT(e);if(t){let i=t.marker.onDispose(()=>t.dispose()),s=t.onDispose(()=>{s.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),i.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,i){let s=0,r=0;for(let n of this._decorations.getKeyIterator(t))s=n.options.x??0,r=s+(n.options.width??1),e>=s&&e<r&&(!i||(n.options.layer??"bottom")===i)&&(yield n)}forEachDecorationAtCell(e,t,i,s){this._decorations.forEachByKey(t,r=>{ig=r.options.x??0,Lw=ig+(r.options.width??1),e>=ig&&e<Lw&&(!i||(r.options.layer??"bottom")===i)&&s(r)})}},NT=class extends Pr{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new z),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new z),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Ne.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Ne.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},BT=1e3,OT=class{constructor(e,t=BT){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let s=performance.now();if(s-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=s,this._innerRefresh();else if(!this._additionalRefreshRequested){let r=s-this._lastRefreshMs,n=this._debounceThresholdMS-r;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},n)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},Dw=20,Nw=!1,Xh=class extends X{constructor(e,t,i,s){super(),this._terminal=e,this._coreBrowserService=i,this._renderService=s,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let r=this._coreBrowserService.mainDocument;this._accessibilityContainer=r.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=r.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let n=0;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);if(this._topBoundaryFocusListener=n=>this._handleBoundaryFocus(n,0),this._bottomBoundaryFocusListener=n=>this._handleBoundaryFocus(n,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=r.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new OT(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");Nw?(this._accessibilityContainer.classList.add("debug"),this._rowContainer.classList.add("debug"),this._debugRootContainer=r.createElement("div"),this._debugRootContainer.classList.add("xterm"),this._debugRootContainer.appendChild(r.createTextNode("------start a11y------")),this._debugRootContainer.appendChild(this._accessibilityContainer),this._debugRootContainer.appendChild(r.createTextNode("------end a11y------")),this._terminal.element.insertAdjacentElement("afterend",this._debugRootContainer)):this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(n=>this._handleResize(n.rows))),this._register(this._terminal.onRender(n=>this._refreshRows(n.start,n.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(n=>this._handleChar(n))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
43
|
-
`))),this._register(this._terminal.onA11yTab(n=>this._handleTab(n))),this._register(this._terminal.onKey(n=>this._handleKey(n.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(
|
|
44
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===Dw+1&&(this._liveRegion.textContent+=rg.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let i=this._terminal.buffer,s=i.lines.length.toString();for(let r=e;r<=t;r++){let n=i.lines.get(i.ydisp+r),o=[],a=n?.translateToString(!0,void 0,void 0,o)||"",l=(i.ydisp+r+1).toString(),c=this._rowElements[r];c&&(a.length===0?(c.textContent=" ",this._rowColumns.set(c,[0,1])):(c.textContent=a,this._rowColumns.set(c,o)),c.setAttribute("aria-posinset",l),c.setAttribute("aria-setsize",s),this._alignRowWidth(c))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let i=e.target,s=this._rowElements[t===0?1:this._rowElements.length-2],r=i.getAttribute("aria-posinset"),n=t===0?"1":`${this._terminal.buffer.lines.length}`;if(r===n||e.relatedTarget!==s)return;let o,a;if(t===0?(o=i,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(o=this._rowElements.shift(),a=i,this._rowContainer.removeChild(o)),o.removeEventListener("focus",this._topBoundaryFocusListener),a.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let l=this._createAccessibilityTreeNode();this._rowElements.unshift(l),this._rowContainer.insertAdjacentElement("afterbegin",l)}else{let l=this._createAccessibilityTreeNode();this._rowElements.push(l),this._rowContainer.appendChild(l)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},i={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===i.node&&t.offset>i.offset)&&([t,i]=[i,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let s=this._rowElements.slice(-1)[0];if(i.node.compareDocumentPosition(s)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(i={node:s,offset:s.textContent?.length??0}),!this._rowContainer.contains(i.node))return;let r=({node:a,offset:l})=>{let c=a instanceof Text?a.parentNode:a,h=parseInt(c?.getAttribute("aria-posinset"),10)-1;if(isNaN(h))return console.warn("row is invalid. Race condition?"),null;let u=this._rowColumns.get(c);if(!u)return console.warn("columns is null. Race condition?"),null;let d=l<u.length?u[l]:u.slice(-1)[0]+1;return d>=this._terminal.cols&&(++h,d=0),{row:h,column:d}},n=r(t),o=r(i);if(!(!n||!o)){if(n.row>o.row||n.row===o.row&&n.column>=o.column)throw new Error("invalid range");this._terminal.select(n.column,n.row,(o.row-n.row)*this._terminal.cols-n.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform="";let t=e.getBoundingClientRect().width,i=this._rowColumns.get(e)?.slice(-1)?.[0];if(!i)return;let s=i*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${s/t})`}};Xh=Pe([q(1,Ig),q(2,Is),q(3,Fs)],Xh);var qg=class extends X{constructor(e,t,i,s,r){super(),this._element=e,this._mouseService=t,this._renderService=i,this._bufferService=s,this._linkProviderService=r,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new z),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new z),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Ce(()=>{En(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(V(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(V(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(V(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(V(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let i=e.composedPath();for(let s=0;s<i.length;s++){let r=i[s];if(r.classList.contains("xterm"))break;if(r.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(s=>{s?.forEach(r=>{r.link.dispose&&r.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let i=!1;for(let[s,r]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(s)&&(i=this._checkLinkProviderResult(s,e,i)):r.provideLinks(e.y,n=>{if(this._isMouseOut)return;let o=n?.map(a=>({link:a}));this._activeProviderReplies?.set(s,o),i=this._checkLinkProviderResult(s,e,i),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let i=new Set;for(let s=0;s<t.size;s++){let r=t.get(s);if(r)for(let n=0;n<r.length;n++){let o=r[n],a=o.link.range.start.y<e?0:o.link.range.start.x,l=o.link.range.end.y>e?this._bufferService.cols:o.link.range.end.x;for(let c=a;c<=l;c++){if(i.has(c)){r.splice(n--,1);break}i.add(c)}}}}_checkLinkProviderResult(e,t,i){if(!this._activeProviderReplies)return i;let s=this._activeProviderReplies.get(e),r=!1;for(let n=0;n<e;n++)(!this._activeProviderReplies.has(n)||this._activeProviderReplies.get(n))&&(r=!0);if(!r&&s){let n=s.find(o=>this._linkAtPosition(o.link,t));n&&(i=!0,this._handleNewLink(n))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let n=0;n<this._activeProviderReplies.size;n++){let o=this._activeProviderReplies.get(n)?.find(a=>this._linkAtPosition(a.link,t));if(o){i=!0,this._handleNewLink(o);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&zT(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,En(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:i=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:i=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;let s=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,r=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=r&&(this._clearCurrentLink(s,r),this._lastMouseEvent)){let n=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);n&&this._askForLink(n,!1)}})))}_linkHover(e,t,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(i,t.text)}_fireUnderlineEvent(e,t){let i=e.range,s=this._bufferService.buffer.ydisp,r=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-s-1,i.end.x,i.end.y-s-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(r)}_linkLeave(e,t,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(i,t.text)}_linkAtPosition(e,t){let i=e.range.start.y*this._bufferService.cols+e.range.start.x,s=e.range.end.y*this._bufferService.cols+e.range.end.x,r=t.y*this._bufferService.cols+t.x;return i<=r&&r<=s}_positionFromMouseEvent(e,t,i){let s=i.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(s)return{x:s[0],y:s[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,i,s,r){return{x1:e,y1:t,x2:i,y2:s,cols:this._bufferService.cols,fg:r}}};qg=Pe([q(1,Fg),q(2,Fs),q(3,$t),q(4,Vw)],qg);function zT(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var HT=class extends AT{constructor(e={}){super(e),this._linkifier=this._register(new Oo),this.browser=bS,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new Oo),this._onCursorMove=this._register(new z),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new z),this.onKey=this._onKey.event,this._onRender=this._register(new z),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new z),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new z),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new z),this.onBell=this._onBell.event,this._onFocus=this._register(new z),this._onBlur=this._register(new z),this._onA11yCharEmitter=this._register(new z),this._onA11yTabEmitter=this._register(new z),this._onWillOpen=this._register(new z),this._setup(),this._decorationService=this._instantiationService.createInstance(DT),this._instantiationService.setService(bl,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(C4),this._instantiationService.setService(Vw,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(og)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh(t?.start??0,t?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(Tt.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(Tt.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(Tt.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(Tt.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Ce(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let i,s="";switch(t.index){case 256:i="foreground",s="10";break;case 257:i="background",s="11";break;case 258:i="cursor",s="12";break;default:i="ansi",s="4;"+t.index}switch(t.type){case 0:let r=xe.toColorRGB(i==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[i]);this.coreService.triggerDataEvent(`${D.ESC}]${s};${ST(r)}${vS.ST}`);break;case 1:if(i==="ansi")this._themeService.modifyColors(n=>n.ansi[t.index]=Xe.toColor(...t.color));else{let n=i;this._themeService.modifyColors(o=>o[n]=Xe.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Xh,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(D.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(D.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let i=Math.min(this.buffer.x,this.cols-1),s=this._renderService.dimensions.css.cell.height,r=t.getWidth(i),n=this._renderService.dimensions.css.cell.width*r,o=this.buffer.y*this._renderService.dimensions.css.cell.height,a=i*this._renderService.dimensions.css.cell.width;this.textarea.style.left=a+"px",this.textarea.style.top=o+"px",this.textarea.style.width=n+"px",this.textarea.style.height=s+"px",this.textarea.style.lineHeight=s+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(V(this.element,"copy",t=>{this.hasSelection()&&fE(t,this._selectionService)}));let e=t=>pE(t,this.textarea,this.coreService,this.optionsService);this._register(V(this.textarea,"paste",e)),this._register(V(this.element,"paste",e)),wS?this._register(V(this.element,"mousedown",t=>{t.button===2&&Bb(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(V(this.element,"contextmenu",t=>{Bb(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Xg&&this._register(V(this.element,"auxclick",t=>{t.button===1&&Hw(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(V(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(V(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(V(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(V(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(V(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(V(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(V(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(V(this.screenElement,"mousemove",r=>this.updateCursorStyle(r))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let i=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",sg.get()),xS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>i.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(k4,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(Is,this._coreBrowserService),this._register(V(this.textarea,"focus",r=>this._handleTextAreaFocus(r))),this._register(V(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(Ag,this._document,this._helperContainer),this._instantiationService.setService(Qh,this._charSizeService),this._themeService=this._instantiationService.createInstance(Dg),this._instantiationService.setService(zo,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(jh),this._instantiationService.setService(Ww,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(Rg,this.rows,this.screenElement)),this._instantiationService.setService(Fs,this._renderService),this._register(this._renderService.onRenderedViewportChange(r=>this._onRender.fire(r))),this.onResize(r=>this._renderService.resize(r.cols,r.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Cg,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(Mg),this._instantiationService.setService(Fg,this._mouseService);let s=this._linkifier.value=this._register(this._instantiationService.createInstance(qg,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(kg,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(r=>{super.scrollLines(r,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Lg,this.element,this.screenElement,s)),this._instantiationService.setService(SE,this._selectionService),this._register(this._selectionService.onRequestScrollLines(r=>this.scrollLines(r.amount,r.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(r=>this._renderService.handleSelectionChanged(r.start,r.end,r.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(r=>{this.textarea.value=r,this.textarea.focus(),this.textarea.select()})),this._register(Tt.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(xg,this.screenElement)),this._register(V(this.element,"mousedown",r=>this._selectionService.handleMouseDown(r))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(Xh,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",r=>this._handleScreenReaderModeOptionChange(r))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Vh,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",r=>{!this._overviewRulerRenderer&&r&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Vh,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Tg,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function i(n){let o=e._mouseService.getMouseReportCoords(n,e.screenElement);if(!o)return!1;let a,l;switch(n.overrideType||n.type){case"mousemove":l=32,n.buttons===void 0?(a=3,n.button!==void 0&&(a=n.button<3?n.button:3)):a=n.buttons&1?0:n.buttons&4?1:n.buttons&2?2:3;break;case"mouseup":l=0,a=n.button<3?n.button:3;break;case"mousedown":l=1,a=n.button<3?n.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(n)===!1)return!1;let c=n.deltaY;if(c===0||e.coreMouseService.consumeWheelEvent(n,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;l=c<0?0:1,a=4;break;default:return!1}return l===void 0||a===void 0||a>4?!1:e.coreMouseService.triggerMouseEvent({col:o.col,row:o.row,x:o.x,y:o.y,button:a,action:l,ctrl:n.ctrlKey,alt:n.altKey,shift:n.shiftKey})}let s={mouseup:null,wheel:null,mousedrag:null,mousemove:null},r={mouseup:n=>(i(n),n.buttons||(this._document.removeEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.removeEventListener("mousemove",s.mousedrag)),this.cancel(n)),wheel:n=>(i(n),this.cancel(n,!0)),mousedrag:n=>{n.buttons&&i(n)},mousemove:n=>{n.buttons||i(n)}};this._register(this.coreMouseService.onProtocolChange(n=>{n?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(n)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),n&8?s.mousemove||(t.addEventListener("mousemove",r.mousemove),s.mousemove=r.mousemove):(t.removeEventListener("mousemove",s.mousemove),s.mousemove=null),n&16?s.wheel||(t.addEventListener("wheel",r.wheel,{passive:!1}),s.wheel=r.wheel):(t.removeEventListener("wheel",s.wheel),s.wheel=null),n&2?s.mouseup||(s.mouseup=r.mouseup):(this._document.removeEventListener("mouseup",s.mouseup),s.mouseup=null),n&4?s.mousedrag||(s.mousedrag=r.mousedrag):(this._document.removeEventListener("mousemove",s.mousedrag),s.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(V(t,"mousedown",n=>{if(n.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(n)))return i(n),s.mouseup&&this._document.addEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.addEventListener("mousemove",s.mousedrag),this.cancel(n)})),this._register(V(t,"wheel",n=>{if(!s.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(n)===!1)return!1;if(!this.buffer.hasScrollback){if(n.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(n,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(n,!0);let o=D.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(n.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(o,!0),this.cancel(n,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){zw(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,i){this._selectionService.setSelection(e,t,i)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let i=RT(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),i.type===3||i.type===2){let s=this.rows-1;return this.scrollLines(i.type===2?-s:s),this.cancel(e,!0)}if(i.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(i.cancel&&this.cancel(e,!0),!i.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((i.key===D.ETX||i.key===D.CR)&&(this.textarea.value=""),this._onKey.fire({key:i.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(i.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let i=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?i:i&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(UT(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(Ye));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(D.ESC+"[I"):this.coreService.triggerDataEvent(D.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),i=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${D.ESC}[4;${i};${t}t`);break;case 1:let s=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${D.ESC}[6;${r};${s}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function UT(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var PT=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=()=>this._wrappedAddonDispose(i),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let i=0;i<this._addons.length;i++)if(this._addons[i]===e){t=i;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},qT=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new Oi)}translateToString(e,t,i){return this._line.translateToString(e,t,i)}},Bw=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new qT(t)}getNullCell(){return new Oi}},IT=class extends X{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new z),this.onBufferChange=this._onBufferChange.event,this._normal=new Bw(this._core.buffers.normal,"normal"),this._alternate=new Bw(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},FT=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,i=>t(i.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(i,s)=>t(i,s.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},$T=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},KT=["cols","rows"],ds=0,BS=class extends X{constructor(e){super(),this._core=this._register(new HT(e)),this._addonManager=this._register(new PT),this._publicOptions={...this._core.options};let t=s=>this._core.options[s],i=(s,r)=>{this._checkReadonlyOptions(s),this._core.options[s]=r};for(let s in this._core.options){let r={get:t.bind(this,s),set:i.bind(this,s)};Object.defineProperty(this._publicOptions,s,r)}}_checkReadonlyOptions(e){if(KT.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new FT(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new $T(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new IT(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
|
|
43
|
+
`))),this._register(this._terminal.onA11yTab(n=>this._handleTab(n))),this._register(this._terminal.onKey(n=>this._handleKey(n.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(j(r,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Ce(()=>{Nw?this._debugRootContainer.remove():this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<Dw+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
44
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===Dw+1&&(this._liveRegion.textContent+=rg.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let i=this._terminal.buffer,s=i.lines.length.toString();for(let r=e;r<=t;r++){let n=i.lines.get(i.ydisp+r),o=[],a=n?.translateToString(!0,void 0,void 0,o)||"",l=(i.ydisp+r+1).toString(),c=this._rowElements[r];c&&(a.length===0?(c.textContent=" ",this._rowColumns.set(c,[0,1])):(c.textContent=a,this._rowColumns.set(c,o)),c.setAttribute("aria-posinset",l),c.setAttribute("aria-setsize",s),this._alignRowWidth(c))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let i=e.target,s=this._rowElements[t===0?1:this._rowElements.length-2],r=i.getAttribute("aria-posinset"),n=t===0?"1":`${this._terminal.buffer.lines.length}`;if(r===n||e.relatedTarget!==s)return;let o,a;if(t===0?(o=i,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(o=this._rowElements.shift(),a=i,this._rowContainer.removeChild(o)),o.removeEventListener("focus",this._topBoundaryFocusListener),a.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let l=this._createAccessibilityTreeNode();this._rowElements.unshift(l),this._rowContainer.insertAdjacentElement("afterbegin",l)}else{let l=this._createAccessibilityTreeNode();this._rowElements.push(l),this._rowContainer.appendChild(l)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},i={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===i.node&&t.offset>i.offset)&&([t,i]=[i,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let s=this._rowElements.slice(-1)[0];if(i.node.compareDocumentPosition(s)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(i={node:s,offset:s.textContent?.length??0}),!this._rowContainer.contains(i.node))return;let r=({node:a,offset:l})=>{let c=a instanceof Text?a.parentNode:a,h=parseInt(c?.getAttribute("aria-posinset"),10)-1;if(isNaN(h))return console.warn("row is invalid. Race condition?"),null;let u=this._rowColumns.get(c);if(!u)return console.warn("columns is null. Race condition?"),null;let d=l<u.length?u[l]:u.slice(-1)[0]+1;return d>=this._terminal.cols&&(++h,d=0),{row:h,column:d}},n=r(t),o=r(i);if(!(!n||!o)){if(n.row>o.row||n.row===o.row&&n.column>=o.column)throw new Error("invalid range");this._terminal.select(n.column,n.row,(o.row-n.row)*this._terminal.cols-n.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform="";let t=e.getBoundingClientRect().width,i=this._rowColumns.get(e)?.slice(-1)?.[0];if(!i)return;let s=i*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${s/t})`}};Xh=Pe([q(1,Ig),q(2,Is),q(3,Fs)],Xh);var qg=class extends X{constructor(e,t,i,s,r){super(),this._element=e,this._mouseService=t,this._renderService=i,this._bufferService=s,this._linkProviderService=r,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new z),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new z),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Ce(()=>{En(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(j(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(j(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(j(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(j(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let i=e.composedPath();for(let s=0;s<i.length;s++){let r=i[s];if(r.classList.contains("xterm"))break;if(r.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(s=>{s?.forEach(r=>{r.link.dispose&&r.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let i=!1;for(let[s,r]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(s)&&(i=this._checkLinkProviderResult(s,e,i)):r.provideLinks(e.y,n=>{if(this._isMouseOut)return;let o=n?.map(a=>({link:a}));this._activeProviderReplies?.set(s,o),i=this._checkLinkProviderResult(s,e,i),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let i=new Set;for(let s=0;s<t.size;s++){let r=t.get(s);if(r)for(let n=0;n<r.length;n++){let o=r[n],a=o.link.range.start.y<e?0:o.link.range.start.x,l=o.link.range.end.y>e?this._bufferService.cols:o.link.range.end.x;for(let c=a;c<=l;c++){if(i.has(c)){r.splice(n--,1);break}i.add(c)}}}}_checkLinkProviderResult(e,t,i){if(!this._activeProviderReplies)return i;let s=this._activeProviderReplies.get(e),r=!1;for(let n=0;n<e;n++)(!this._activeProviderReplies.has(n)||this._activeProviderReplies.get(n))&&(r=!0);if(!r&&s){let n=s.find(o=>this._linkAtPosition(o.link,t));n&&(i=!0,this._handleNewLink(n))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let n=0;n<this._activeProviderReplies.size;n++){let o=this._activeProviderReplies.get(n)?.find(a=>this._linkAtPosition(a.link,t));if(o){i=!0,this._handleNewLink(o);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&zT(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,En(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:i=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:i=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;let s=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,r=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=r&&(this._clearCurrentLink(s,r),this._lastMouseEvent)){let n=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);n&&this._askForLink(n,!1)}})))}_linkHover(e,t,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(i,t.text)}_fireUnderlineEvent(e,t){let i=e.range,s=this._bufferService.buffer.ydisp,r=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-s-1,i.end.x,i.end.y-s-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(r)}_linkLeave(e,t,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(i,t.text)}_linkAtPosition(e,t){let i=e.range.start.y*this._bufferService.cols+e.range.start.x,s=e.range.end.y*this._bufferService.cols+e.range.end.x,r=t.y*this._bufferService.cols+t.x;return i<=r&&r<=s}_positionFromMouseEvent(e,t,i){let s=i.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(s)return{x:s[0],y:s[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,i,s,r){return{x1:e,y1:t,x2:i,y2:s,cols:this._bufferService.cols,fg:r}}};qg=Pe([q(1,Fg),q(2,Fs),q(3,$t),q(4,Vw)],qg);function zT(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var HT=class extends AT{constructor(e={}){super(e),this._linkifier=this._register(new Oo),this.browser=bS,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new Oo),this._onCursorMove=this._register(new z),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new z),this.onKey=this._onKey.event,this._onRender=this._register(new z),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new z),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new z),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new z),this.onBell=this._onBell.event,this._onFocus=this._register(new z),this._onBlur=this._register(new z),this._onA11yCharEmitter=this._register(new z),this._onA11yTabEmitter=this._register(new z),this._onWillOpen=this._register(new z),this._setup(),this._decorationService=this._instantiationService.createInstance(DT),this._instantiationService.setService(bl,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(C4),this._instantiationService.setService(Vw,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(og)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh(t?.start??0,t?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(Tt.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(Tt.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(Tt.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(Tt.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Ce(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let i,s="";switch(t.index){case 256:i="foreground",s="10";break;case 257:i="background",s="11";break;case 258:i="cursor",s="12";break;default:i="ansi",s="4;"+t.index}switch(t.type){case 0:let r=xe.toColorRGB(i==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[i]);this.coreService.triggerDataEvent(`${D.ESC}]${s};${ST(r)}${vS.ST}`);break;case 1:if(i==="ansi")this._themeService.modifyColors(n=>n.ansi[t.index]=Xe.toColor(...t.color));else{let n=i;this._themeService.modifyColors(o=>o[n]=Xe.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Xh,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(D.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(D.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let i=Math.min(this.buffer.x,this.cols-1),s=this._renderService.dimensions.css.cell.height,r=t.getWidth(i),n=this._renderService.dimensions.css.cell.width*r,o=this.buffer.y*this._renderService.dimensions.css.cell.height,a=i*this._renderService.dimensions.css.cell.width;this.textarea.style.left=a+"px",this.textarea.style.top=o+"px",this.textarea.style.width=n+"px",this.textarea.style.height=s+"px",this.textarea.style.lineHeight=s+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(j(this.element,"copy",t=>{this.hasSelection()&&fE(t,this._selectionService)}));let e=t=>pE(t,this.textarea,this.coreService,this.optionsService);this._register(j(this.textarea,"paste",e)),this._register(j(this.element,"paste",e)),wS?this._register(j(this.element,"mousedown",t=>{t.button===2&&Bb(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(j(this.element,"contextmenu",t=>{Bb(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Xg&&this._register(j(this.element,"auxclick",t=>{t.button===1&&Hw(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(j(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(j(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(j(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(j(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(j(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(j(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(j(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(j(this.screenElement,"mousemove",r=>this.updateCursorStyle(r))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let i=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",sg.get()),xS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>i.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(k4,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(Is,this._coreBrowserService),this._register(j(this.textarea,"focus",r=>this._handleTextAreaFocus(r))),this._register(j(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(Ag,this._document,this._helperContainer),this._instantiationService.setService(Qh,this._charSizeService),this._themeService=this._instantiationService.createInstance(Dg),this._instantiationService.setService(zo,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(jh),this._instantiationService.setService(Ww,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(Rg,this.rows,this.screenElement)),this._instantiationService.setService(Fs,this._renderService),this._register(this._renderService.onRenderedViewportChange(r=>this._onRender.fire(r))),this.onResize(r=>this._renderService.resize(r.cols,r.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Cg,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(Mg),this._instantiationService.setService(Fg,this._mouseService);let s=this._linkifier.value=this._register(this._instantiationService.createInstance(qg,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(kg,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(r=>{super.scrollLines(r,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Lg,this.element,this.screenElement,s)),this._instantiationService.setService(SE,this._selectionService),this._register(this._selectionService.onRequestScrollLines(r=>this.scrollLines(r.amount,r.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(r=>this._renderService.handleSelectionChanged(r.start,r.end,r.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(r=>{this.textarea.value=r,this.textarea.focus(),this.textarea.select()})),this._register(Tt.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(xg,this.screenElement)),this._register(j(this.element,"mousedown",r=>this._selectionService.handleMouseDown(r))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(Xh,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",r=>this._handleScreenReaderModeOptionChange(r))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Vh,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",r=>{!this._overviewRulerRenderer&&r&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Vh,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Tg,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function i(n){let o=e._mouseService.getMouseReportCoords(n,e.screenElement);if(!o)return!1;let a,l;switch(n.overrideType||n.type){case"mousemove":l=32,n.buttons===void 0?(a=3,n.button!==void 0&&(a=n.button<3?n.button:3)):a=n.buttons&1?0:n.buttons&4?1:n.buttons&2?2:3;break;case"mouseup":l=0,a=n.button<3?n.button:3;break;case"mousedown":l=1,a=n.button<3?n.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(n)===!1)return!1;let c=n.deltaY;if(c===0||e.coreMouseService.consumeWheelEvent(n,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;l=c<0?0:1,a=4;break;default:return!1}return l===void 0||a===void 0||a>4?!1:e.coreMouseService.triggerMouseEvent({col:o.col,row:o.row,x:o.x,y:o.y,button:a,action:l,ctrl:n.ctrlKey,alt:n.altKey,shift:n.shiftKey})}let s={mouseup:null,wheel:null,mousedrag:null,mousemove:null},r={mouseup:n=>(i(n),n.buttons||(this._document.removeEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.removeEventListener("mousemove",s.mousedrag)),this.cancel(n)),wheel:n=>(i(n),this.cancel(n,!0)),mousedrag:n=>{n.buttons&&i(n)},mousemove:n=>{n.buttons||i(n)}};this._register(this.coreMouseService.onProtocolChange(n=>{n?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(n)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),n&8?s.mousemove||(t.addEventListener("mousemove",r.mousemove),s.mousemove=r.mousemove):(t.removeEventListener("mousemove",s.mousemove),s.mousemove=null),n&16?s.wheel||(t.addEventListener("wheel",r.wheel,{passive:!1}),s.wheel=r.wheel):(t.removeEventListener("wheel",s.wheel),s.wheel=null),n&2?s.mouseup||(s.mouseup=r.mouseup):(this._document.removeEventListener("mouseup",s.mouseup),s.mouseup=null),n&4?s.mousedrag||(s.mousedrag=r.mousedrag):(this._document.removeEventListener("mousemove",s.mousedrag),s.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(j(t,"mousedown",n=>{if(n.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(n)))return i(n),s.mouseup&&this._document.addEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.addEventListener("mousemove",s.mousedrag),this.cancel(n)})),this._register(j(t,"wheel",n=>{if(!s.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(n)===!1)return!1;if(!this.buffer.hasScrollback){if(n.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(n,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(n,!0);let o=D.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(n.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(o,!0),this.cancel(n,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){zw(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,i){this._selectionService.setSelection(e,t,i)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let i=RT(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),i.type===3||i.type===2){let s=this.rows-1;return this.scrollLines(i.type===2?-s:s),this.cancel(e,!0)}if(i.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(i.cancel&&this.cancel(e,!0),!i.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((i.key===D.ETX||i.key===D.CR)&&(this.textarea.value=""),this._onKey.fire({key:i.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(i.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let i=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?i:i&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(UT(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(Ye));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(D.ESC+"[I"):this.coreService.triggerDataEvent(D.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),i=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${D.ESC}[4;${i};${t}t`);break;case 1:let s=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${D.ESC}[6;${r};${s}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function UT(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var PT=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=()=>this._wrappedAddonDispose(i),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let i=0;i<this._addons.length;i++)if(this._addons[i]===e){t=i;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},qT=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new Oi)}translateToString(e,t,i){return this._line.translateToString(e,t,i)}},Bw=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new qT(t)}getNullCell(){return new Oi}},IT=class extends X{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new z),this.onBufferChange=this._onBufferChange.event,this._normal=new Bw(this._core.buffers.normal,"normal"),this._alternate=new Bw(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},FT=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,i=>t(i.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(i,s)=>t(i,s.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},$T=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},KT=["cols","rows"],ds=0,BS=class extends X{constructor(e){super(),this._core=this._register(new HT(e)),this._addonManager=this._register(new PT),this._publicOptions={...this._core.options};let t=s=>this._core.options[s],i=(s,r)=>{this._checkReadonlyOptions(s),this._core.options[s]=r};for(let s in this._core.options){let r={get:t.bind(this,s),set:i.bind(this,s)};Object.defineProperty(this._publicOptions,s,r)}}_checkReadonlyOptions(e){if(KT.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new FT(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new $T(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new IT(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
|
|
45
45
|
`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return sg.get()},set promptLabel(e){sg.set(e)},get tooMuchOutput(){return rg.get()},set tooMuchOutput(e){rg.set(e)}}}_verifyIntegers(...e){for(ds of e)if(ds===1/0||isNaN(ds)||ds%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(ds of e)if(ds&&(ds===1/0||isNaN(ds)||ds%1!==0||ds<0))throw new Error("This API only accepts positive integers")}};var WT=2,VT=1,OS=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,i=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(i.getPropertyValue("height")),r=Math.max(0,parseInt(i.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),o={top:parseInt(n.getPropertyValue("padding-top")),bottom:parseInt(n.getPropertyValue("padding-bottom")),right:parseInt(n.getPropertyValue("padding-right")),left:parseInt(n.getPropertyValue("padding-left"))},a=o.top+o.bottom,l=o.right+o.left,c=s-a,h=r-l-t;return{cols:Math.max(WT,Math.floor(h/e.css.cell.width)),rows:Math.max(VT,Math.floor(c/e.css.cell.height))}}};var Zg=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],jT=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],rt;function GT(e,t){let i=0,s=t.length-1,r;if(e<t[0][0]||e>t[s][1])return!1;for(;s>=i;)if(r=i+s>>1,e>t[r][1])i=r+1;else if(e<t[r][0])s=r-1;else return!0;return!1}var YT=class{constructor(){if(this.version="6",!rt){rt=new Uint8Array(65536),rt.fill(1),rt[0]=0,rt.fill(0,1,32),rt.fill(0,127,160),rt.fill(2,4352,4448),rt[9001]=2,rt[9002]=2,rt.fill(2,11904,42192),rt[12351]=1,rt.fill(2,44032,55204),rt.fill(2,63744,64256),rt.fill(2,65040,65050),rt.fill(2,65072,65136),rt.fill(2,65280,65377),rt.fill(2,65504,65511);for(let e=0;e<Zg.length;++e)rt.fill(0,Zg[e][0],Zg[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?rt[e]:GT(e,jT)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let i=this.wcwidth(e),s=i===0&&t!==0;if(s){let r=ou.extractWidth(t);r===0?s=!1:r>i&&(i=r)}return ou.createPropertyValue(0,i,s)}},XT=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?zS.isErrorNoTelemetry(e)?new zS(e.message+`
|
|
46
46
|
|
|
47
47
|
`+e.stack):new Error(e.message+`
|
|
48
48
|
|
|
49
|
-
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},ZT=new XT;function Qg(e){QT(e)||ZT.onUnexpectedError(e)}var tm="Canceled";function QT(e){return e instanceof JT?!0:e instanceof Error&&e.name===tm&&e.message===tm}var JT=class extends Error{constructor(){super(tm),this.name=this.message}},zS=class im extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof im)return t;let i=new im;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function eA(e,t){let i=this,s=!1,r;return function(){if(s)return r;if(s=!0,t)try{r=e.apply(i,arguments)}finally{t()}else r=e.apply(i,arguments);return r}}function tA(e,t,i=0,s=e.length){let r=i,n=s;for(;r<n;){let o=Math.floor((r+n)/2);t(e[o])?r=o+1:n=o}return r-1}var iA=class KS{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(KS.assertInvariants){if(this._prevFindLastPredicate){for(let s of this._array)if(this._prevFindLastPredicate(s)&&!t(s))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let i=tA(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=i+1,i===-1?void 0:this._array[i]}};iA.assertInvariants=!1;var WS;(e=>{function t(n){return n<0}e.isLessThan=t;function i(n){return n<=0}e.isLessThanOrEqual=i;function s(n){return n>0}e.isGreaterThan=s;function r(n){return n===0}e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(WS||={});function sA(e,t){return(i,s)=>t(e(i),e(s))}var rA=(e,t)=>e-t,HS=class sm{constructor(t){this.iterate=t}forEach(t){this.iterate(i=>(t(i),!0))}toArray(){let t=[];return this.iterate(i=>(t.push(i),!0)),t}filter(t){return new sm(i=>this.iterate(s=>t(s)?i(s):!0))}map(t){return new sm(i=>this.iterate(s=>i(t(s))))}some(t){let i=!1;return this.iterate(s=>(i=t(s),!i)),i}findFirst(t){let i;return this.iterate(s=>t(s)?(i=s,!1):!0),i}findLast(t){let i;return this.iterate(s=>(t(s)&&(i=s),!0)),i}findLastMaxBy(t){let i,s=!0;return this.iterate(r=>((s||WS.isGreaterThan(t(r,i)))&&(s=!1,i=r),!0)),i}};HS.empty=new HS(e=>{});function nA(e,t){let i=Object.create(null);for(let s of e){let r=t(s),n=i[r];n||(n=i[r]=[]),n.push(s)}return i}var US,PS,CD=class{constructor(e,t){this.toKey=t,this._map=new Map,this[US]="SetWithKey";for(let i of e)this.add(i)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[(PS=Symbol.iterator,US=Symbol.toStringTag,PS)](){return this.values()}},oA=class{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){let i=this.map.get(e);i&&(i.delete(t),i.size===0&&this.map.delete(e))}forEach(e,t){let i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}},VS;(e=>{function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function s(){return i}e.empty=s;function*r(p){yield p}e.single=r;function n(p){return t(p)?p:r(p)}e.wrap=n;function o(p){return p||i}e.from=o;function*a(p){for(let E=p.length-1;E>=0;E--)yield p[E]}e.reverse=a;function l(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(p){return p[Symbol.iterator]().next().value}e.first=c;function h(p,E){let A=0;for(let L of p)if(E(L,A++))return!0;return!1}e.some=h;function u(p,E){for(let A of p)if(E(A))return A}e.find=u;function*d(p,E){for(let A of p)E(A)&&(yield A)}e.filter=d;function*f(p,E){let A=0;for(let L of p)yield E(L,A++)}e.map=f;function*g(p,E){let A=0;for(let L of p)yield*E(L,A++)}e.flatMap=g;function*b(...p){for(let E of p)yield*E}e.concat=b;function T(p,E,A){let L=A;for(let B of p)L=E(L,B);return L}e.reduce=T;function*_(p,E,A=p.length){for(E<0&&(E+=p.length),A<0?A+=p.length:A>p.length&&(A=p.length);E<A;E++)yield p[E]}e.slice=_;function m(p,E=Number.POSITIVE_INFINITY){let A=[];if(E===0)return[A,p];let L=p[Symbol.iterator]();for(let B=0;B<E;B++){let
|
|
49
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},ZT=new XT;function Qg(e){QT(e)||ZT.onUnexpectedError(e)}var tm="Canceled";function QT(e){return e instanceof JT?!0:e instanceof Error&&e.name===tm&&e.message===tm}var JT=class extends Error{constructor(){super(tm),this.name=this.message}},zS=class im extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof im)return t;let i=new im;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function eA(e,t){let i=this,s=!1,r;return function(){if(s)return r;if(s=!0,t)try{r=e.apply(i,arguments)}finally{t()}else r=e.apply(i,arguments);return r}}function tA(e,t,i=0,s=e.length){let r=i,n=s;for(;r<n;){let o=Math.floor((r+n)/2);t(e[o])?r=o+1:n=o}return r-1}var iA=class KS{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(KS.assertInvariants){if(this._prevFindLastPredicate){for(let s of this._array)if(this._prevFindLastPredicate(s)&&!t(s))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let i=tA(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=i+1,i===-1?void 0:this._array[i]}};iA.assertInvariants=!1;var WS;(e=>{function t(n){return n<0}e.isLessThan=t;function i(n){return n<=0}e.isLessThanOrEqual=i;function s(n){return n>0}e.isGreaterThan=s;function r(n){return n===0}e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(WS||={});function sA(e,t){return(i,s)=>t(e(i),e(s))}var rA=(e,t)=>e-t,HS=class sm{constructor(t){this.iterate=t}forEach(t){this.iterate(i=>(t(i),!0))}toArray(){let t=[];return this.iterate(i=>(t.push(i),!0)),t}filter(t){return new sm(i=>this.iterate(s=>t(s)?i(s):!0))}map(t){return new sm(i=>this.iterate(s=>i(t(s))))}some(t){let i=!1;return this.iterate(s=>(i=t(s),!i)),i}findFirst(t){let i;return this.iterate(s=>t(s)?(i=s,!1):!0),i}findLast(t){let i;return this.iterate(s=>(t(s)&&(i=s),!0)),i}findLastMaxBy(t){let i,s=!0;return this.iterate(r=>((s||WS.isGreaterThan(t(r,i)))&&(s=!1,i=r),!0)),i}};HS.empty=new HS(e=>{});function nA(e,t){let i=Object.create(null);for(let s of e){let r=t(s),n=i[r];n||(n=i[r]=[]),n.push(s)}return i}var US,PS,CD=class{constructor(e,t){this.toKey=t,this._map=new Map,this[US]="SetWithKey";for(let i of e)this.add(i)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[(PS=Symbol.iterator,US=Symbol.toStringTag,PS)](){return this.values()}},oA=class{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){let i=this.map.get(e);i&&(i.delete(t),i.size===0&&this.map.delete(e))}forEach(e,t){let i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}},VS;(e=>{function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function s(){return i}e.empty=s;function*r(p){yield p}e.single=r;function n(p){return t(p)?p:r(p)}e.wrap=n;function o(p){return p||i}e.from=o;function*a(p){for(let E=p.length-1;E>=0;E--)yield p[E]}e.reverse=a;function l(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(p){return p[Symbol.iterator]().next().value}e.first=c;function h(p,E){let A=0;for(let L of p)if(E(L,A++))return!0;return!1}e.some=h;function u(p,E){for(let A of p)if(E(A))return A}e.find=u;function*d(p,E){for(let A of p)E(A)&&(yield A)}e.filter=d;function*f(p,E){let A=0;for(let L of p)yield E(L,A++)}e.map=f;function*g(p,E){let A=0;for(let L of p)yield*E(L,A++)}e.flatMap=g;function*b(...p){for(let E of p)yield*E}e.concat=b;function T(p,E,A){let L=A;for(let B of p)L=E(L,B);return L}e.reduce=T;function*_(p,E,A=p.length){for(E<0&&(E+=p.length),A<0?A+=p.length:A>p.length&&(A=p.length);E<A;E++)yield p[E]}e.slice=_;function m(p,E=Number.POSITIVE_INFINITY){let A=[];if(E===0)return[A,p];let L=p[Symbol.iterator]();for(let B=0;B<E;B++){let W=L.next();if(W.done)return[A,e.empty()];A.push(W.value)}return[A,{[Symbol.iterator](){return L}}]}e.consume=m;async function v(p){let E=[];for await(let A of p)E.push(A);return Promise.resolve(E)}e.asyncToArray=v})(VS||={});var aA=!1,Uo=null,lA=class jS{constructor(){this.livingDisposables=new Map}getDisposableData(t){let i=this.livingDisposables.get(t);return i||(i={parent:null,source:null,isSingleton:!1,value:t,idx:jS.idx++},this.livingDisposables.set(t,i)),i}trackDisposable(t){let i=this.getDisposableData(t);i.source||(i.source=new Error().stack)}setParent(t,i){let s=this.getDisposableData(t);s.parent=i}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,i){let s=i.get(t);if(s)return s;let r=t.parent?this.getRootParent(this.getDisposableData(t.parent),i):t;return i.set(t,r),r}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,i])=>i.source!==null&&!this.getRootParent(i,t).isSingleton).flatMap(([i])=>i)}computeLeakingDisposables(t=10,i){let s;if(i)s=i;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let h=new Set(c.map(u=>u.value));if(s=c.filter(u=>!(u.parent&&h.has(u.parent))),s.length===0)throw new Error("There are cyclic diposable chains!")}if(!s)return;function r(l){function c(u,d){for(;u.length>0&&d.some(f=>typeof f=="string"?f===u[0]:u[0].match(f));)u.shift()}let h=l.source.split(`
|
|
50
50
|
`).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(h,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),h.reverse()}let n=new oA;for(let l of s){let c=r(l);for(let h=0;h<=c.length;h++)n.add(c.slice(0,h).join(`
|
|
51
51
|
`),l)}s.sort(sA(l=>l.idx,rA));let o="",a=0;for(let l of s.slice(0,t)){a++;let c=r(l),h=[];for(let u=0;u<c.length;u++){let d=c[u];d=`(shared with ${n.get(c.slice(0,u+1).join(`
|
|
52
52
|
`)).size}/${s.length} leaks) at ${d}`;let f=n.get(c.slice(0,u).join(`
|
|
@@ -63,7 +63,7 @@ ${h.join(`
|
|
|
63
63
|
|
|
64
64
|
... and ${s.length-t} more leaking disposables
|
|
65
65
|
|
|
66
|
-
`),{leaks:s,details:o}}};lA.idx=0;function cA(e){Uo=e}if(aA){let e="__is_disposable_tracked__";cA(new class{trackDisposable(t){let i=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(i)},3e3)}setParent(t,i){if(t&&t!==Po.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==Po.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function cm(e){return Uo?.trackDisposable(e),e}function hm(e){Uo?.markAsDisposed(e)}function rm(e,t){Uo?.setParent(e,t)}function hA(e,t){if(Uo)for(let i of e)Uo.setParent(i,t)}function GS(e){if(VS.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function uA(...e){let t=YS(()=>GS(e));return hA(e,t),t}function YS(e){let t=cm({dispose:eA(()=>{hm(t),e()})});return t}var XS=class ZS{constructor(){this._toDispose=new Set,this._isDisposed=!1,cm(this)}dispose(){this._isDisposed||(hm(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{GS(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return rm(t,this),this._isDisposed?ZS.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),rm(t,null))}};XS.DISABLE_DISPOSED_WARNING=!1;var um=XS,Po=class{constructor(){this._store=new um,cm(this),rm(this._store,this)}dispose(){hm(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Po.None=Object.freeze({dispose(){}});var qS=class nm{constructor(t){this.element=t,this.next=nm.Undefined,this.prev=nm.Undefined}};qS.Undefined=new qS(void 0);var dA=globalThis.performance&&typeof globalThis.performance.now=="function",fA=class QS{static create(t){return new QS(t)}constructor(t){this._now=dA&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},pA=!1,IS=!1,gA=!1,mA;(e=>{e.None=()=>Po.None;function t(S){if(gA){let{onDidAddListener:y}=S,k=lm.create(),w=0;S.onDidAddListener=()=>{++w===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),k.print()),y?.()}}}function i(S,y){return d(S,()=>{},0,void 0,!0,void 0,y)}e.defer=i;function s(S){return(y,k=null,w)=>{let C=!1,x;return x=S(M=>{if(!C)return x?x.dispose():C=!0,y.call(k,M)},null,w),C&&x.dispose(),x}}e.once=s;function r(S,y,k){return h((w,C=null,x)=>S(M=>w.call(C,y(M)),null,x),k)}e.map=r;function n(S,y,k){return h((w,C=null,x)=>S(M=>{y(M),w.call(C,M)},null,x),k)}e.forEach=n;function o(S,y,k){return h((w,C=null,x)=>S(M=>y(M)&&w.call(C,M),null,x),k)}e.filter=o;function a(S){return S}e.signal=a;function l(...S){return(y,k=null,w)=>{let C=uA(...S.map(x=>x(M=>y.call(k,M))));return u(C,w)}}e.any=l;function c(S,y,k,w){let C=k;return r(S,x=>(C=y(C,x),C),w)}e.reduce=c;function h(S,y){let k,w={onWillAddFirstListener(){k=S(C.fire,C)},onDidRemoveLastListener(){k?.dispose()}};y||t(w);let C=new qr(w);return y?.add(C),C.event}function u(S,y){return y instanceof Array?y.push(S):y&&y.add(S),S}function d(S,y,k=100,w=!1,C=!1,x,M){let N,I,ie,Z=0,se,We={leakWarningThreshold:x,onWillAddFirstListener(){N=S(Re=>{Z++,I=y(I,Re),w&&!ie&&(ne.fire(I),I=void 0),se=()=>{let he=I;I=void 0,ie=void 0,(!w||Z>1)&&ne.fire(he),Z=0},typeof k=="number"?(clearTimeout(ie),ie=setTimeout(se,k)):ie===void 0&&(ie=0,queueMicrotask(se))})},onWillRemoveListener(){C&&Z>0&&se?.()},onDidRemoveLastListener(){se=void 0,N.dispose()}};M||t(We);let ne=new qr(We);return M?.add(ne),ne.event}e.debounce=d;function f(S,y=0,k){return e.debounce(S,(w,C)=>w?(w.push(C),w):[C],y,void 0,!0,void 0,k)}e.accumulate=f;function g(S,y=(w,C)=>w===C,k){let w=!0,C;return o(S,x=>{let M=w||!y(x,C);return w=!1,C=x,M},k)}e.latch=g;function b(S,y,k){return[e.filter(S,y,k),e.filter(S,w=>!y(w),k)]}e.split=b;function T(S,y=!1,k=[],w){let C=k.slice(),x=S(I=>{C?C.push(I):N.fire(I)});w&&w.add(x);let M=()=>{C?.forEach(I=>N.fire(I)),C=null},N=new qr({onWillAddFirstListener(){x||(x=S(I=>N.fire(I)),w&&w.add(x))},onDidAddFirstListener(){C&&(y?setTimeout(M):M())},onDidRemoveLastListener(){x&&x.dispose(),x=null}});return w&&w.add(N),N.event}e.buffer=T;function _(S,y){return(k,w,C)=>{let x=y(new v);return S(function(M){let N=x.evaluate(M);N!==m&&k.call(w,N)},void 0,C)}}e.chain=_;let m=Symbol("HaltChainable");class v{constructor(){this.steps=[]}map(y){return this.steps.push(y),this}forEach(y){return this.steps.push(k=>(y(k),k)),this}filter(y){return this.steps.push(k=>y(k)?k:m),this}reduce(y,k){let w=k;return this.steps.push(C=>(w=y(w,C),w)),this}latch(y=(k,w)=>k===w){let k=!0,w;return this.steps.push(C=>{let x=k||!y(C,w);return k=!1,w=C,x?C:m}),this}evaluate(y){for(let k of this.steps)if(y=k(y),y===m)break;return y}}function p(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.on(y,w),x=()=>S.removeListener(y,w),M=new qr({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromNodeEventEmitter=p;function E(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.addEventListener(y,w),x=()=>S.removeEventListener(y,w),M=new qr({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromDOMEventEmitter=E;function A(S){return new Promise(y=>s(S)(y))}e.toPromise=A;function L(S){let y=new qr;return S.then(k=>{y.fire(k)},()=>{y.fire(void 0)}).finally(()=>{y.dispose()}),y.event}e.fromPromise=L;function B(S,y){return S(k=>y.fire(k))}e.forward=B;function
|
|
66
|
+
`),{leaks:s,details:o}}};lA.idx=0;function cA(e){Uo=e}if(aA){let e="__is_disposable_tracked__";cA(new class{trackDisposable(t){let i=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(i)},3e3)}setParent(t,i){if(t&&t!==Po.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==Po.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function cm(e){return Uo?.trackDisposable(e),e}function hm(e){Uo?.markAsDisposed(e)}function rm(e,t){Uo?.setParent(e,t)}function hA(e,t){if(Uo)for(let i of e)Uo.setParent(i,t)}function GS(e){if(VS.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function uA(...e){let t=YS(()=>GS(e));return hA(e,t),t}function YS(e){let t=cm({dispose:eA(()=>{hm(t),e()})});return t}var XS=class ZS{constructor(){this._toDispose=new Set,this._isDisposed=!1,cm(this)}dispose(){this._isDisposed||(hm(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{GS(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return rm(t,this),this._isDisposed?ZS.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),rm(t,null))}};XS.DISABLE_DISPOSED_WARNING=!1;var um=XS,Po=class{constructor(){this._store=new um,cm(this),rm(this._store,this)}dispose(){hm(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Po.None=Object.freeze({dispose(){}});var qS=class nm{constructor(t){this.element=t,this.next=nm.Undefined,this.prev=nm.Undefined}};qS.Undefined=new qS(void 0);var dA=globalThis.performance&&typeof globalThis.performance.now=="function",fA=class QS{static create(t){return new QS(t)}constructor(t){this._now=dA&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},pA=!1,IS=!1,gA=!1,mA;(e=>{e.None=()=>Po.None;function t(S){if(gA){let{onDidAddListener:y}=S,k=lm.create(),w=0;S.onDidAddListener=()=>{++w===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),k.print()),y?.()}}}function i(S,y){return d(S,()=>{},0,void 0,!0,void 0,y)}e.defer=i;function s(S){return(y,k=null,w)=>{let C=!1,x;return x=S(M=>{if(!C)return x?x.dispose():C=!0,y.call(k,M)},null,w),C&&x.dispose(),x}}e.once=s;function r(S,y,k){return h((w,C=null,x)=>S(M=>w.call(C,y(M)),null,x),k)}e.map=r;function n(S,y,k){return h((w,C=null,x)=>S(M=>{y(M),w.call(C,M)},null,x),k)}e.forEach=n;function o(S,y,k){return h((w,C=null,x)=>S(M=>y(M)&&w.call(C,M),null,x),k)}e.filter=o;function a(S){return S}e.signal=a;function l(...S){return(y,k=null,w)=>{let C=uA(...S.map(x=>x(M=>y.call(k,M))));return u(C,w)}}e.any=l;function c(S,y,k,w){let C=k;return r(S,x=>(C=y(C,x),C),w)}e.reduce=c;function h(S,y){let k,w={onWillAddFirstListener(){k=S(C.fire,C)},onDidRemoveLastListener(){k?.dispose()}};y||t(w);let C=new qr(w);return y?.add(C),C.event}function u(S,y){return y instanceof Array?y.push(S):y&&y.add(S),S}function d(S,y,k=100,w=!1,C=!1,x,M){let N,I,ie,Z=0,se,We={leakWarningThreshold:x,onWillAddFirstListener(){N=S(Re=>{Z++,I=y(I,Re),w&&!ie&&(ne.fire(I),I=void 0),se=()=>{let he=I;I=void 0,ie=void 0,(!w||Z>1)&&ne.fire(he),Z=0},typeof k=="number"?(clearTimeout(ie),ie=setTimeout(se,k)):ie===void 0&&(ie=0,queueMicrotask(se))})},onWillRemoveListener(){C&&Z>0&&se?.()},onDidRemoveLastListener(){se=void 0,N.dispose()}};M||t(We);let ne=new qr(We);return M?.add(ne),ne.event}e.debounce=d;function f(S,y=0,k){return e.debounce(S,(w,C)=>w?(w.push(C),w):[C],y,void 0,!0,void 0,k)}e.accumulate=f;function g(S,y=(w,C)=>w===C,k){let w=!0,C;return o(S,x=>{let M=w||!y(x,C);return w=!1,C=x,M},k)}e.latch=g;function b(S,y,k){return[e.filter(S,y,k),e.filter(S,w=>!y(w),k)]}e.split=b;function T(S,y=!1,k=[],w){let C=k.slice(),x=S(I=>{C?C.push(I):N.fire(I)});w&&w.add(x);let M=()=>{C?.forEach(I=>N.fire(I)),C=null},N=new qr({onWillAddFirstListener(){x||(x=S(I=>N.fire(I)),w&&w.add(x))},onDidAddFirstListener(){C&&(y?setTimeout(M):M())},onDidRemoveLastListener(){x&&x.dispose(),x=null}});return w&&w.add(N),N.event}e.buffer=T;function _(S,y){return(k,w,C)=>{let x=y(new v);return S(function(M){let N=x.evaluate(M);N!==m&&k.call(w,N)},void 0,C)}}e.chain=_;let m=Symbol("HaltChainable");class v{constructor(){this.steps=[]}map(y){return this.steps.push(y),this}forEach(y){return this.steps.push(k=>(y(k),k)),this}filter(y){return this.steps.push(k=>y(k)?k:m),this}reduce(y,k){let w=k;return this.steps.push(C=>(w=y(w,C),w)),this}latch(y=(k,w)=>k===w){let k=!0,w;return this.steps.push(C=>{let x=k||!y(C,w);return k=!1,w=C,x?C:m}),this}evaluate(y){for(let k of this.steps)if(y=k(y),y===m)break;return y}}function p(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.on(y,w),x=()=>S.removeListener(y,w),M=new qr({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromNodeEventEmitter=p;function E(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.addEventListener(y,w),x=()=>S.removeEventListener(y,w),M=new qr({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromDOMEventEmitter=E;function A(S){return new Promise(y=>s(S)(y))}e.toPromise=A;function L(S){let y=new qr;return S.then(k=>{y.fire(k)},()=>{y.fire(void 0)}).finally(()=>{y.dispose()}),y.event}e.fromPromise=L;function B(S,y){return S(k=>y.fire(k))}e.forward=B;function W(S,y,k){return y(k),S(w=>y(w))}e.runAndSubscribe=W;class ${constructor(y,k){this._observable=y,this._counter=0,this._hasChanged=!1;let w={onWillAddFirstListener:()=>{y.addObserver(this)},onDidRemoveLastListener:()=>{y.removeObserver(this)}};k||t(w),this.emitter=new qr(w),k&&k.add(this.emitter)}beginUpdate(y){this._counter++}handlePossibleChange(y){}handleChange(y,k){this._hasChanged=!0}endUpdate(y){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function P(S,y){return new $(S,y).emitter.event}e.fromObservable=P;function Rt(S){return(y,k,w)=>{let C=0,x=!1,M={beginUpdate(){C++},endUpdate(){C--,C===0&&(S.reportChanges(),x&&(x=!1,y.call(k)))},handlePossibleChange(){},handleChange(){x=!0}};S.addObserver(M),S.reportChanges();let N={dispose(){S.removeObserver(M)}};return w instanceof um?w.add(N):Array.isArray(w)&&w.push(N),N}}e.fromObservableLight=Rt})(mA||={});var om=class am{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${am._idPool++}`,am.all.add(this)}start(t){this._stopWatch=new fA,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};om.all=new Set,om._idPool=0;var _A=om,FS=-1,JS=class ek{constructor(t,i,s=(ek._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=s,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,i){let s=this.threshold;if(s<=0||i<s)return;this._stacks||(this._stacks=new Map);let r=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let[n,o]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${o}):`;console.warn(a),console.warn(n);let l=new yA(a,n);this._errorHandler(l)}return()=>{let n=this._stacks.get(t.value)||0;this._stacks.set(t.value,n-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[s,r]of this._stacks)(!t||i<r)&&(t=[s,r],i=r);return t}};JS._idPool=1;var vA=JS,lm=class tk{constructor(t){this.value=t}static create(){let t=new Error;return new tk(t.stack??"")}print(){console.warn(this.value.split(`
|
|
67
67
|
`).slice(2).join(`
|
|
68
68
|
`))}},yA=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},bA=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},wA=0,su=class{constructor(e){this.value=e,this.id=wA++}},SA=2,kA=(e,t)=>{if(e instanceof su)t(e);else for(let i=0;i<e.length;i++){let s=e[i];s&&t(s)}},ru;if(pA){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
|
|
69
69
|
`)),e.length=0)},3e3),ru=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var qr=class{constructor(e){this._size=0,this._options=e,this._leakageMon=FS>0||this._options?.leakWarningThreshold?new vA(e?.onListenerError??Qg,this._options?.leakWarningThreshold??FS):void 0,this._perfMon=this._options?._profName?new _A(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(IS){let e=this._listeners;queueMicrotask(()=>{kA(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new bA(`${a}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Qg)(c),Po.None}if(this._disposed)return Po.None;t&&(e=e.bind(t));let s=new su(e),r,n;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=lm.create(),r=this._leakageMon.check(s.stack,this._size+1)),IS&&(s.stack=n??lm.create()),this._listeners?this._listeners instanceof su?(this._deliveryQueue??=new xA,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;let o=YS(()=>{ru?.unregister(o),r?.(),this._removeListener(s)});if(i instanceof um?i.add(o):Array.isArray(i)&&i.push(o),ru){let a=new Error().stack.split(`
|
|
@@ -72,7 +72,7 @@ ${h.join(`
|
|
|
72
72
|
|
|
73
73
|
`+e.stack):new Error(e.message+`
|
|
74
74
|
|
|
75
|
-
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},NA=new DA;function uu(e){BA(e)||NA.onUnexpectedError(e)}var Em="Canceled";function BA(e){return e instanceof OA?!0:e instanceof Error&&e.name===Em&&e.message===Em}var OA=class extends Error{constructor(){super(Em),this.name=this.message}},sk=class Tm extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Tm)return t;let i=new Tm;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function zA(e,t,i=0,s=e.length){let r=i,n=s;for(;r<n;){let o=Math.floor((r+n)/2);t(e[o])?r=o+1:n=o}return r-1}var HA=class qk{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(qk.assertInvariants){if(this._prevFindLastPredicate){for(let s of this._array)if(this._prevFindLastPredicate(s)&&!t(s))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let i=zA(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=i+1,i===-1?void 0:this._array[i]}};HA.assertInvariants=!1;var Ik;(e=>{function t(n){return n<0}e.isLessThan=t;function i(n){return n<=0}e.isLessThanOrEqual=i;function s(n){return n>0}e.isGreaterThan=s;function r(n){return n===0}e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Ik||={});function UA(e,t){return(i,s)=>t(e(i),e(s))}var PA=(e,t)=>e-t,rk=class Am{constructor(t){this.iterate=t}forEach(t){this.iterate(i=>(t(i),!0))}toArray(){let t=[];return this.iterate(i=>(t.push(i),!0)),t}filter(t){return new Am(i=>this.iterate(s=>t(s)?i(s):!0))}map(t){return new Am(i=>this.iterate(s=>i(t(s))))}some(t){let i=!1;return this.iterate(s=>(i=t(s),!i)),i}findFirst(t){let i;return this.iterate(s=>t(s)?(i=s,!1):!0),i}findLast(t){let i;return this.iterate(s=>(t(s)&&(i=s),!0)),i}findLastMaxBy(t){let i,s=!0;return this.iterate(r=>((s||Ik.isGreaterThan(t(r,i)))&&(s=!1,i=r),!0)),i}};rk.empty=new rk(e=>{});function qA(e,t){let i=Object.create(null);for(let s of e){let r=t(s),n=i[r];n||(n=i[r]=[]),n.push(s)}return i}var nk,ok,ID=class{constructor(e,t){this.toKey=t,this._map=new Map,this[nk]="SetWithKey";for(let i of e)this.add(i)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[(ok=Symbol.iterator,nk=Symbol.toStringTag,ok)](){return this.values()}},IA=class{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){let i=this.map.get(e);i&&(i.delete(t),i.size===0&&this.map.delete(e))}forEach(e,t){let i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}};function FA(e,t){let i=this,s=!1,r;return function(){if(s)return r;if(s=!0,t)try{r=e.apply(i,arguments)}finally{t()}else r=e.apply(i,arguments);return r}}var Fk;(e=>{function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function s(){return i}e.empty=s;function*r(p){yield p}e.single=r;function n(p){return t(p)?p:r(p)}e.wrap=n;function o(p){return p||i}e.from=o;function*a(p){for(let E=p.length-1;E>=0;E--)yield p[E]}e.reverse=a;function l(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(p){return p[Symbol.iterator]().next().value}e.first=c;function h(p,E){let A=0;for(let L of p)if(E(L,A++))return!0;return!1}e.some=h;function u(p,E){for(let A of p)if(E(A))return A}e.find=u;function*d(p,E){for(let A of p)E(A)&&(yield A)}e.filter=d;function*f(p,E){let A=0;for(let L of p)yield E(L,A++)}e.map=f;function*g(p,E){let A=0;for(let L of p)yield*E(L,A++)}e.flatMap=g;function*b(...p){for(let E of p)yield*E}e.concat=b;function T(p,E,A){let L=A;for(let B of p)L=E(L,B);return L}e.reduce=T;function*_(p,E,A=p.length){for(E<0&&(E+=p.length),A<0?A+=p.length:A>p.length&&(A=p.length);E<A;E++)yield p[E]}e.slice=_;function m(p,E=Number.POSITIVE_INFINITY){let A=[];if(E===0)return[A,p];let L=p[Symbol.iterator]();for(let B=0;B<E;B++){let
|
|
75
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},NA=new DA;function uu(e){BA(e)||NA.onUnexpectedError(e)}var Em="Canceled";function BA(e){return e instanceof OA?!0:e instanceof Error&&e.name===Em&&e.message===Em}var OA=class extends Error{constructor(){super(Em),this.name=this.message}},sk=class Tm extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Tm)return t;let i=new Tm;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function zA(e,t,i=0,s=e.length){let r=i,n=s;for(;r<n;){let o=Math.floor((r+n)/2);t(e[o])?r=o+1:n=o}return r-1}var HA=class qk{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(qk.assertInvariants){if(this._prevFindLastPredicate){for(let s of this._array)if(this._prevFindLastPredicate(s)&&!t(s))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let i=zA(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=i+1,i===-1?void 0:this._array[i]}};HA.assertInvariants=!1;var Ik;(e=>{function t(n){return n<0}e.isLessThan=t;function i(n){return n<=0}e.isLessThanOrEqual=i;function s(n){return n>0}e.isGreaterThan=s;function r(n){return n===0}e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Ik||={});function UA(e,t){return(i,s)=>t(e(i),e(s))}var PA=(e,t)=>e-t,rk=class Am{constructor(t){this.iterate=t}forEach(t){this.iterate(i=>(t(i),!0))}toArray(){let t=[];return this.iterate(i=>(t.push(i),!0)),t}filter(t){return new Am(i=>this.iterate(s=>t(s)?i(s):!0))}map(t){return new Am(i=>this.iterate(s=>i(t(s))))}some(t){let i=!1;return this.iterate(s=>(i=t(s),!i)),i}findFirst(t){let i;return this.iterate(s=>t(s)?(i=s,!1):!0),i}findLast(t){let i;return this.iterate(s=>(t(s)&&(i=s),!0)),i}findLastMaxBy(t){let i,s=!0;return this.iterate(r=>((s||Ik.isGreaterThan(t(r,i)))&&(s=!1,i=r),!0)),i}};rk.empty=new rk(e=>{});function qA(e,t){let i=Object.create(null);for(let s of e){let r=t(s),n=i[r];n||(n=i[r]=[]),n.push(s)}return i}var nk,ok,ID=class{constructor(e,t){this.toKey=t,this._map=new Map,this[nk]="SetWithKey";for(let i of e)this.add(i)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[(ok=Symbol.iterator,nk=Symbol.toStringTag,ok)](){return this.values()}},IA=class{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){let i=this.map.get(e);i&&(i.delete(t),i.size===0&&this.map.delete(e))}forEach(e,t){let i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}};function FA(e,t){let i=this,s=!1,r;return function(){if(s)return r;if(s=!0,t)try{r=e.apply(i,arguments)}finally{t()}else r=e.apply(i,arguments);return r}}var Fk;(e=>{function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function s(){return i}e.empty=s;function*r(p){yield p}e.single=r;function n(p){return t(p)?p:r(p)}e.wrap=n;function o(p){return p||i}e.from=o;function*a(p){for(let E=p.length-1;E>=0;E--)yield p[E]}e.reverse=a;function l(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(p){return p[Symbol.iterator]().next().value}e.first=c;function h(p,E){let A=0;for(let L of p)if(E(L,A++))return!0;return!1}e.some=h;function u(p,E){for(let A of p)if(E(A))return A}e.find=u;function*d(p,E){for(let A of p)E(A)&&(yield A)}e.filter=d;function*f(p,E){let A=0;for(let L of p)yield E(L,A++)}e.map=f;function*g(p,E){let A=0;for(let L of p)yield*E(L,A++)}e.flatMap=g;function*b(...p){for(let E of p)yield*E}e.concat=b;function T(p,E,A){let L=A;for(let B of p)L=E(L,B);return L}e.reduce=T;function*_(p,E,A=p.length){for(E<0&&(E+=p.length),A<0?A+=p.length:A>p.length&&(A=p.length);E<A;E++)yield p[E]}e.slice=_;function m(p,E=Number.POSITIVE_INFINITY){let A=[];if(E===0)return[A,p];let L=p[Symbol.iterator]();for(let B=0;B<E;B++){let W=L.next();if(W.done)return[A,e.empty()];A.push(W.value)}return[A,{[Symbol.iterator](){return L}}]}e.consume=m;async function v(p){let E=[];for await(let A of p)E.push(A);return Promise.resolve(E)}e.asyncToArray=v})(Fk||={});var $A=!1,Wo=null,KA=class $k{constructor(){this.livingDisposables=new Map}getDisposableData(t){let i=this.livingDisposables.get(t);return i||(i={parent:null,source:null,isSingleton:!1,value:t,idx:$k.idx++},this.livingDisposables.set(t,i)),i}trackDisposable(t){let i=this.getDisposableData(t);i.source||(i.source=new Error().stack)}setParent(t,i){let s=this.getDisposableData(t);s.parent=i}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,i){let s=i.get(t);if(s)return s;let r=t.parent?this.getRootParent(this.getDisposableData(t.parent),i):t;return i.set(t,r),r}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,i])=>i.source!==null&&!this.getRootParent(i,t).isSingleton).flatMap(([i])=>i)}computeLeakingDisposables(t=10,i){let s;if(i)s=i;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let h=new Set(c.map(u=>u.value));if(s=c.filter(u=>!(u.parent&&h.has(u.parent))),s.length===0)throw new Error("There are cyclic diposable chains!")}if(!s)return;function r(l){function c(u,d){for(;u.length>0&&d.some(f=>typeof f=="string"?f===u[0]:u[0].match(f));)u.shift()}let h=l.source.split(`
|
|
76
76
|
`).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(h,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),h.reverse()}let n=new IA;for(let l of s){let c=r(l);for(let h=0;h<=c.length;h++)n.add(c.slice(0,h).join(`
|
|
77
77
|
`),l)}s.sort(UA(l=>l.idx,PA));let o="",a=0;for(let l of s.slice(0,t)){a++;let c=r(l),h=[];for(let u=0;u<c.length;u++){let d=c[u];d=`(shared with ${n.get(c.slice(0,u+1).join(`
|
|
78
78
|
`)).size}/${s.length} leaks) at ${d}`;let f=n.get(c.slice(0,u).join(`
|
|
@@ -89,12 +89,12 @@ ${h.join(`
|
|
|
89
89
|
|
|
90
90
|
... and ${s.length-t} more leaking disposables
|
|
91
91
|
|
|
92
|
-
`),{leaks:s,details:o}}};KA.idx=0;function WA(e){Wo=e}if($A){let e="__is_disposable_tracked__";WA(new class{trackDisposable(t){let i=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(i)},3e3)}setParent(t,i){if(t&&t!==wi.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==wi.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function wu(e){return Wo?.trackDisposable(e),e}function Su(e){Wo?.markAsDisposed(e)}function Ml(e,t){Wo?.setParent(e,t)}function VA(e,t){if(Wo)for(let i of e)Wo.setParent(i,t)}function Kk(e){if(Fk.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Wk(...e){let t=Mt(()=>Kk(e));return VA(e,t),t}function Mt(e){let t=wu({dispose:FA(()=>{Su(t),e()})});return t}var Vk=class jk{constructor(){this._toDispose=new Set,this._isDisposed=!1,wu(this)}dispose(){this._isDisposed||(Su(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Kk(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Ml(t,this),this._isDisposed?jk.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Ml(t,null))}};Vk.DISABLE_DISPOSED_WARNING=!1;var Ko=Vk,wi=class{constructor(){this._store=new Ko,wu(this),Ml(this._store,this)}dispose(){Su(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};wi.None=Object.freeze({dispose(){}});var kl=class{constructor(){this._isDisposed=!1,wu(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Ml(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,Su(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Ml(e,null),e}},Hm=typeof process<"u"&&"title"in process,Ll=Hm?"node":navigator.userAgent,Um=Hm?"node":navigator.platform,jA=Ll.includes("Firefox"),GA=Ll.includes("Edge"),Gk=/^((?!chrome|android).)*safari/i.test(Ll);function YA(){if(!Gk)return 0;let e=Ll.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var FD=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Um),$D=["Windows","Win16","Win32","WinCE"].includes(Um),KD=Um.indexOf("Linux")>=0,WD=/\bCrOS\b/.test(Ll),XA="",gt=0,mt=0,_t=0,Ie=0,zi={css:"#00000000",rgba:0},Vt;(e=>{function t(r,n,o,a){return a!==void 0?`#${Mn(r)}${Mn(n)}${Mn(o)}${Mn(a)}`:`#${Mn(r)}${Mn(n)}${Mn(o)}`}e.toCss=t;function i(r,n,o,a=255){return(r<<24|n<<16|o<<8|a)>>>0}e.toRgba=i;function s(r,n,o,a){return{css:e.toCss(r,n,o,a),rgba:e.toRgba(r,n,o,a)}}e.toColor=s})(Vt||={});var Al;(e=>{function t(l,c){if(Ie=(c.rgba&255)/255,Ie===1)return{css:c.css,rgba:c.rgba};let h=c.rgba>>24&255,u=c.rgba>>16&255,d=c.rgba>>8&255,f=l.rgba>>24&255,g=l.rgba>>16&255,b=l.rgba>>8&255;gt=f+Math.round((h-f)*Ie),mt=g+Math.round((u-g)*Ie),_t=b+Math.round((d-b)*Ie);let T=Vt.toCss(gt,mt,_t),_=Vt.toRgba(gt,mt,_t);return{css:T,rgba:_}}e.blend=t;function i(l){return(l.rgba&255)===255}e.isOpaque=i;function s(l,c,h){let u=Rn.ensureContrastRatio(l.rgba,c.rgba,h);if(u)return Vt.toColor(u>>24&255,u>>16&255,u>>8&255)}e.ensureContrastRatio=s;function r(l){let c=(l.rgba|255)>>>0;return[gt,mt,_t]=Rn.toChannels(c),{css:Vt.toCss(gt,mt,_t),rgba:c}}e.opaque=r;function n(l,c){return Ie=Math.round(c*255),[gt,mt,_t]=Rn.toChannels(l.rgba),{css:Vt.toCss(gt,mt,_t,Ie),rgba:Vt.toRgba(gt,mt,_t,Ie)}}e.opacity=n;function o(l,c){return Ie=l.rgba&255,n(l,Ie*c/255)}e.multiplyOpacity=o;function a(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}e.toColorRGB=a})(Al||={});var ZA;(e=>{let t,i;try{let r=document.createElement("canvas");r.width=1,r.height=1;let n=r.getContext("2d",{willReadFrequently:!0});n&&(t=n,t.globalCompositeOperation="copy",i=t.createLinearGradient(0,0,1,1))}catch{}function s(r){if(r.match(/#[\da-f]{3,8}/i))switch(r.length){case 4:return gt=parseInt(r.slice(1,2).repeat(2),16),mt=parseInt(r.slice(2,3).repeat(2),16),_t=parseInt(r.slice(3,4).repeat(2),16),Vt.toColor(gt,mt,_t);case 5:return gt=parseInt(r.slice(1,2).repeat(2),16),mt=parseInt(r.slice(2,3).repeat(2),16),_t=parseInt(r.slice(3,4).repeat(2),16),Ie=parseInt(r.slice(4,5).repeat(2),16),Vt.toColor(gt,mt,_t,Ie);case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}let n=r.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(n)return gt=parseInt(n[1]),mt=parseInt(n[2]),_t=parseInt(n[3]),Ie=Math.round((n[5]===void 0?1:parseFloat(n[5]))*255),Vt.toColor(gt,mt,_t,Ie);if(!t||!i)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=i,t.fillStyle=r,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[gt,mt,_t,Ie]=t.getImageData(0,0,1,1).data,Ie!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Vt.toRgba(gt,mt,_t,Ie),css:r}}e.toColor=s})(ZA||={});var Wt;(e=>{function t(s){return i(s>>16&255,s>>8&255,s&255)}e.relativeLuminance=t;function i(s,r,n){let o=s/255,a=r/255,l=n/255,c=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),h=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),u=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return c*.2126+h*.7152+u*.0722}e.relativeLuminance2=i})(Wt||={});var Rn;(e=>{function t(o,a){if(Ie=(a&255)/255,Ie===1)return a;let l=a>>24&255,c=a>>16&255,h=a>>8&255,u=o>>24&255,d=o>>16&255,f=o>>8&255;return gt=u+Math.round((l-u)*Ie),mt=d+Math.round((c-d)*Ie),_t=f+Math.round((h-f)*Ie),Vt.toRgba(gt,mt,_t)}e.blend=t;function i(o,a,l){let c=Wt.relativeLuminance(o>>8),h=Wt.relativeLuminance(a>>8);if(Ks(c,h)<l){if(h<c){let f=s(o,a,l),g=Ks(c,Wt.relativeLuminance(f>>8));if(g<l){let b=r(o,a,l),T=Ks(c,Wt.relativeLuminance(b>>8));return g>T?f:b}return f}let u=r(o,a,l),d=Ks(c,Wt.relativeLuminance(u>>8));if(d<l){let f=s(o,a,l),g=Ks(c,Wt.relativeLuminance(f>>8));return d>g?u:f}return u}}e.ensureContrastRatio=i;function s(o,a,l){let c=o>>24&255,h=o>>16&255,u=o>>8&255,d=a>>24&255,f=a>>16&255,g=a>>8&255,b=Ks(Wt.relativeLuminance2(d,f,g),Wt.relativeLuminance2(c,h,u));for(;b<l&&(d>0||f>0||g>0);)d-=Math.max(0,Math.ceil(d*.1)),f-=Math.max(0,Math.ceil(f*.1)),g-=Math.max(0,Math.ceil(g*.1)),b=Ks(Wt.relativeLuminance2(d,f,g),Wt.relativeLuminance2(c,h,u));return(d<<24|f<<16|g<<8|255)>>>0}e.reduceLuminance=s;function r(o,a,l){let c=o>>24&255,h=o>>16&255,u=o>>8&255,d=a>>24&255,f=a>>16&255,g=a>>8&255,b=Ks(Wt.relativeLuminance2(d,f,g),Wt.relativeLuminance2(c,h,u));for(;b<l&&(d<255||f<255||g<255);)d=Math.min(255,d+Math.ceil((255-d)*.1)),f=Math.min(255,f+Math.ceil((255-f)*.1)),g=Math.min(255,g+Math.ceil((255-g)*.1)),b=Ks(Wt.relativeLuminance2(d,f,g),Wt.relativeLuminance2(c,h,u));return(d<<24|f<<16|g<<8|255)>>>0}e.increaseLuminance=r;function n(o){return[o>>24&255,o>>16&255,o>>8&255,o&255]}e.toChannels=n})(Rn||={});function Mn(e){let t=e.toString(16);return t.length<2?"0"+t:t}function Ks(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}function Ze(e){if(!e)throw new Error("value must not be falsy");return e}function Pm(e){return 57508<=e&&e<=57558}function QA(e){return 57520<=e&&e<=57527}function JA(e){return 57344<=e&&e<=63743}function eM(e){return 9472<=e&&e<=9631}function tM(e){return e>=128512&&e<=128591||e>=127744&&e<=128511||e>=128640&&e<=128767||e>=9728&&e<=9983||e>=9984&&e<=10175||e>=65024&&e<=65039||e>=129280&&e<=129535||e>=127462&&e<=127487}function iM(e,t,i,s){return t===1&&i>Math.ceil(s*1.5)&&e!==void 0&&e>255&&!tM(e)&&!Pm(e)&&!JA(e)}function Yk(e){return Pm(e)||eM(e)}function sM(){return{css:{canvas:au(),cell:au()},device:{canvas:au(),cell:au(),char:{width:0,height:0,left:0,top:0}}}}function au(){return{width:0,height:0}}function rM(e,t,i=0){return(e-(Math.round(t)*2-i))%(Math.round(t)*2)}var At=0,pt=0,ms=!1,Ws=!1,lu=!1,ii,dm=0,nM=class{constructor(e,t,i,s,r,n){this._terminal=e,this._optionService=t,this._selectionRenderModel=i,this._decorationService=s,this._coreBrowserService=r,this._themeService=n,this.result={fg:0,bg:0,ext:0}}resolve(e,t,i,s){if(this.result.bg=e.bg,this.result.fg=e.fg,this.result.ext=e.bg&268435456?e.extended.ext:0,pt=0,At=0,Ws=!1,ms=!1,lu=!1,ii=this._themeService.colors,dm=0,e.getCode()!==0&&e.extended.underlineStyle===4){let r=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));dm=t*s%(Math.round(r)*2)}if(this._decorationService.forEachDecorationAtCell(t,i,"bottom",r=>{r.backgroundColorRGB&&(pt=r.backgroundColorRGB.rgba>>8&16777215,Ws=!0),r.foregroundColorRGB&&(At=r.foregroundColorRGB.rgba>>8&16777215,ms=!0)}),lu=this._selectionRenderModel.isCellSelected(this._terminal,t,i),lu){if(this.result.fg&67108864||(this.result.bg&50331648)!==0){if(this.result.fg&67108864)switch(this.result.fg&50331648){case 16777216:case 33554432:pt=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:pt=(this.result.fg&16777215)<<8|255;break;default:pt=this._themeService.colors.foreground.rgba}else switch(this.result.bg&50331648){case 16777216:case 33554432:pt=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:pt=(this.result.bg&16777215)<<8|255;break}pt=Rn.blend(pt,(this._coreBrowserService.isFocused?ii.selectionBackgroundOpaque:ii.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}else pt=(this._coreBrowserService.isFocused?ii.selectionBackgroundOpaque:ii.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(Ws=!0,ii.selectionForeground&&(At=ii.selectionForeground.rgba>>8&16777215,ms=!0),Yk(e.getCode())){if(this.result.fg&67108864&&(this.result.bg&50331648)===0)At=(this._coreBrowserService.isFocused?ii.selectionBackgroundOpaque:ii.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(this.result.fg&67108864)switch(this.result.bg&50331648){case 16777216:case 33554432:At=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:At=(this.result.bg&16777215)<<8|255;break}else switch(this.result.fg&50331648){case 16777216:case 33554432:At=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:At=(this.result.fg&16777215)<<8|255;break;default:At=this._themeService.colors.foreground.rgba}At=Rn.blend(At,(this._coreBrowserService.isFocused?ii.selectionBackgroundOpaque:ii.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}ms=!0}}this._decorationService.forEachDecorationAtCell(t,i,"top",r=>{r.backgroundColorRGB&&(pt=r.backgroundColorRGB.rgba>>8&16777215,Ws=!0),r.foregroundColorRGB&&(At=r.foregroundColorRGB.rgba>>8&16777215,ms=!0)}),Ws&&(lu?pt=e.bg&-16777216&-134217729|pt|50331648:pt=e.bg&-16777216|pt|50331648),ms&&(At=e.fg&-16777216&-67108865|At|50331648),this.result.fg&67108864&&(Ws&&!ms&&((this.result.bg&50331648)===0?At=this.result.fg&-134217728|ii.background.rgba>>8&16777215&16777215|50331648:At=this.result.fg&-134217728|this.result.bg&67108863,ms=!0),!Ws&&ms&&((this.result.fg&50331648)===0?pt=this.result.bg&-67108864|ii.foreground.rgba>>8&16777215&16777215|50331648:pt=this.result.bg&-67108864|this.result.fg&67108863,Ws=!0)),ii=void 0,this.result.bg=Ws?pt:this.result.bg,this.result.fg=ms?At:this.result.fg,this.result.ext&=536870911,this.result.ext|=dm<<29&3758096384}},oM=.5,Xk=jA||GA?"bottom":"ideographic",aM={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]},lM={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]},cM={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"║":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╒":{1:(e,t)=>`M.5,1 L.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╓":{1:(e,t)=>`M${.5-e},1 L${.5-e},.5 L1,.5 M${.5+e},.5 L${.5+e},1`},"╔":{1:(e,t)=>`M1,${.5-t} L${.5-e},${.5-t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1`},"╕":{1:(e,t)=>`M0,${.5-t} L.5,${.5-t} L.5,1 M0,${.5+t} L.5,${.5+t}`},"╖":{1:(e,t)=>`M${.5+e},1 L${.5+e},.5 L0,.5 M${.5-e},.5 L${.5-e},1`},"╗":{1:(e,t)=>`M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M0,${.5-t} L${.5+e},${.5-t} L${.5+e},1`},"╘":{1:(e,t)=>`M.5,0 L.5,${.5+t} L1,${.5+t} M.5,${.5-t} L1,${.5-t}`},"╙":{1:(e,t)=>`M1,.5 L${.5-e},.5 L${.5-e},0 M${.5+e},.5 L${.5+e},0`},"╚":{1:(e,t)=>`M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0 M1,${.5+t} L${.5-e},${.5+t} L${.5-e},0`},"╛":{1:(e,t)=>`M0,${.5+t} L.5,${.5+t} L.5,0 M0,${.5-t} L.5,${.5-t}`},"╜":{1:(e,t)=>`M0,.5 L${.5+e},.5 L${.5+e},0 M${.5-e},.5 L${.5-e},0`},"╝":{1:(e,t)=>`M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M0,${.5+t} L${.5+e},${.5+t} L${.5+e},0`},"╞":{1:(e,t)=>`M.5,0 L.5,1 M.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╟":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1 M${.5+e},.5 L1,.5`},"╠":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╡":{1:(e,t)=>`M.5,0 L.5,1 M0,${.5-t} L.5,${.5-t} M0,${.5+t} L.5,${.5+t}`},"╢":{1:(e,t)=>`M0,.5 L${.5-e},.5 M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╣":{1:(e,t)=>`M${.5+e},0 L${.5+e},1 M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0`},"╤":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t} M.5,${.5+t} L.5,1`},"╥":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},.5 L${.5-e},1 M${.5+e},.5 L${.5+e},1`},"╦":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1`},"╧":{1:(e,t)=>`M.5,0 L.5,${.5-t} M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╨":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},.5 L${.5-e},0 M${.5+e},.5 L${.5+e},0`},"╩":{1:(e,t)=>`M0,${.5+t} L1,${.5+t} M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╪":{1:(e,t)=>`M.5,0 L.5,1 M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╫":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╬":{1:(e,t)=>`M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1 M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`},"╮":{1:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`},"╯":{1:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`},"╰":{1:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`}},Rl={"":{d:"M.3,1 L.03,1 L.03,.88 C.03,.82,.06,.78,.11,.73 C.15,.7,.2,.68,.28,.65 L.43,.6 C.49,.58,.53,.56,.56,.53 C.59,.5,.6,.47,.6,.43 L.6,.27 L.4,.27 L.69,.1 L.98,.27 L.78,.27 L.78,.46 C.78,.52,.76,.56,.72,.61 C.68,.66,.63,.67,.56,.7 L.48,.72 C.42,.74,.38,.76,.35,.78 C.32,.8,.31,.84,.31,.88 L.31,1 M.3,.5 L.03,.59 L.03,.09 L.3,.09 L.3,.655",type:0},"":{d:"M.7,.4 L.7,.47 L.2,.47 L.2,.03 L.355,.03 L.355,.4 L.705,.4 M.7,.5 L.86,.5 L.86,.95 L.69,.95 L.44,.66 L.46,.86 L.46,.95 L.3,.95 L.3,.49 L.46,.49 L.71,.78 L.69,.565 L.69,.5",type:0},"":{d:"M.25,.94 C.16,.94,.11,.92,.11,.87 L.11,.53 C.11,.48,.15,.455,.23,.45 L.23,.3 C.23,.25,.26,.22,.31,.19 C.36,.16,.43,.15,.51,.15 C.59,.15,.66,.16,.71,.19 C.77,.22,.79,.26,.79,.3 L.79,.45 C.87,.45,.91,.48,.91,.53 L.91,.87 C.91,.92,.86,.94,.77,.94 L.24,.94 M.53,.2 C.49,.2,.45,.21,.42,.23 C.39,.25,.38,.27,.38,.3 L.38,.45 L.68,.45 L.68,.3 C.68,.27,.67,.25,.64,.23 C.61,.21,.58,.2,.53,.2 M.58,.82 L.58,.66 C.63,.65,.65,.63,.65,.6 C.65,.58,.64,.57,.61,.56 C.58,.55,.56,.54,.52,.54 C.48,.54,.46,.55,.43,.56 C.4,.57,.39,.59,.39,.6 C.39,.63,.41,.64,.46,.66 L.46,.82 L.57,.82",type:0},"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}};Rl[""]=Rl[""];Rl[""]=Rl[""];function hM(e,t,i,s,r,n,o,a){let l=aM[t];if(l)return uM(e,l,i,s,r,n),!0;let c=lM[t];if(c)return dM(e,c,i,s,r,n),!0;let h=cM[t];if(h)return fM(e,h,i,s,r,n,a),!0;let u=Rl[t];return u?(pM(e,u,i,s,r,n,o,a),!0):!1}function uM(e,t,i,s,r,n){for(let o=0;o<t.length;o++){let a=t[o],l=r/8,c=n/8;e.fillRect(i+a.x*l,s+a.y*c,a.w*l,a.h*c)}}var ak=new Map;function dM(e,t,i,s,r,n){let o=ak.get(t);o||(o=new Map,ak.set(t,o));let a=e.fillStyle;if(typeof a!="string")throw new Error(`Unexpected fillStyle type "${a}"`);let l=o.get(a);if(!l){let c=t[0].length,h=t.length,u=e.canvas.ownerDocument.createElement("canvas");u.width=c,u.height=h;let d=Ze(u.getContext("2d")),f=new ImageData(c,h),g,b,T,_;if(a.startsWith("#"))g=parseInt(a.slice(1,3),16),b=parseInt(a.slice(3,5),16),T=parseInt(a.slice(5,7),16),_=a.length>7&&parseInt(a.slice(7,9),16)||1;else if(a.startsWith("rgba"))[g,b,T,_]=a.substring(5,a.length-1).split(",").map(m=>parseFloat(m));else throw new Error(`Unexpected fillStyle color format "${a}" when drawing pattern glyph`);for(let m=0;m<h;m++)for(let v=0;v<c;v++)f.data[(m*c+v)*4]=g,f.data[(m*c+v)*4+1]=b,f.data[(m*c+v)*4+2]=T,f.data[(m*c+v)*4+3]=t[m][v]*(_*255);d.putImageData(f,0,0),l=Ze(e.createPattern(u,null)),o.set(a,l)}e.fillStyle=l,e.fillRect(i,s,r,n)}function fM(e,t,i,s,r,n,o){e.strokeStyle=e.fillStyle;for(let[a,l]of Object.entries(t)){e.beginPath(),e.lineWidth=o*Number.parseInt(a);let c;if(typeof l=="function"){let h=.15/n*r;c=l(.15,h)}else c=l;for(let h of c.split(" ")){let u=h[0],d=Zk[u];if(!d){console.error(`Could not find drawing instructions for "${u}"`);continue}let f=h.substring(1).split(",");!f[0]||!f[1]||d(e,Qk(f,r,n,i,s,!0,o))}e.stroke(),e.closePath()}}function pM(e,t,i,s,r,n,o,a){let l=new Path2D;l.rect(i,s,r,n),e.clip(l),e.beginPath();let c=o/12;e.lineWidth=a*c;for(let h of t.d.split(" ")){let u=h[0],d=Zk[u];if(!d){console.error(`Could not find drawing instructions for "${u}"`);continue}let f=h.substring(1).split(",");!f[0]||!f[1]||d(e,Qk(f,r,n,i,s,!1,a,(t.leftPadding??0)*(c/2),(t.rightPadding??0)*(c/2)))}t.type===1?(e.strokeStyle=e.fillStyle,e.stroke()):e.fill(),e.closePath()}function lk(e,t,i=0){return Math.max(Math.min(e,t),i)}var Zk={C:(e,t)=>e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]),L:(e,t)=>e.lineTo(t[0],t[1]),M:(e,t)=>e.moveTo(t[0],t[1])};function Qk(e,t,i,s,r,n,o,a=0,l=0){let c=e.map(h=>parseFloat(h)||parseInt(h));if(c.length<2)throw new Error("Too few arguments for instruction");for(let h=0;h<c.length;h+=2)c[h]*=t-a*o-l*o,n&&c[h]!==0&&(c[h]=lk(Math.round(c[h]+.5)-.5,t,0)),c[h]+=s+a*o;for(let h=1;h<c.length;h+=2)c[h]*=i,n&&c[h]!==0&&(c[h]=lk(Math.round(c[h]+.5)-.5,i,0)),c[h]+=r;return c}var ck=class{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},hk=class{constructor(){this._data=new ck}set(e,t,i,s,r){this._data.get(e,t)||this._data.set(e,t,new ck),this._data.get(e,t).set(i,s,r)}get(e,t,i,s){return this._data.get(e,t)?.get(i,s)}clear(){this._data.clear()}},Jk=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,i=0,s=e.timeRemaining(),r=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),i=Math.max(t,i),r=e.timeRemaining(),i*1.5>r){s-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),this._start();return}s=r}this.clear()}},gM=class extends Jk{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},mM=class extends Jk{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},_M=!Hm&&"requestIdleCallback"in window?mM:gM,Fo=class ex{constructor(){this.fg=0,this.bg=0,this.extended=new tx}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new ex;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},tx=class ix{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new ix(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},uk=class Mm{constructor(t){this.element=t,this.next=Mm.Undefined,this.prev=Mm.Undefined}};uk.Undefined=new uk(void 0);var vM=globalThis.performance&&typeof globalThis.performance.now=="function",yM=class sx{static create(t){return new sx(t)}constructor(t){this._now=vM&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},bM=!1,dk=!1,wM=!1,Ys;(e=>{e.None=()=>wi.None;function t(S){if(wM){let{onDidAddListener:y}=S,k=Dm.create(),w=0;S.onDidAddListener=()=>{++w===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),k.print()),y?.()}}}function i(S,y){return d(S,()=>{},0,void 0,!0,void 0,y)}e.defer=i;function s(S){return(y,k=null,w)=>{let C=!1,x;return x=S(M=>{if(!C)return x?x.dispose():C=!0,y.call(k,M)},null,w),C&&x.dispose(),x}}e.once=s;function r(S,y,k){return h((w,C=null,x)=>S(M=>w.call(C,y(M)),null,x),k)}e.map=r;function n(S,y,k){return h((w,C=null,x)=>S(M=>{y(M),w.call(C,M)},null,x),k)}e.forEach=n;function o(S,y,k){return h((w,C=null,x)=>S(M=>y(M)&&w.call(C,M),null,x),k)}e.filter=o;function a(S){return S}e.signal=a;function l(...S){return(y,k=null,w)=>{let C=Wk(...S.map(x=>x(M=>y.call(k,M))));return u(C,w)}}e.any=l;function c(S,y,k,w){let C=k;return r(S,x=>(C=y(C,x),C),w)}e.reduce=c;function h(S,y){let k,w={onWillAddFirstListener(){k=S(C.fire,C)},onDidRemoveLastListener(){k?.dispose()}};y||t(w);let C=new ke(w);return y?.add(C),C.event}function u(S,y){return y instanceof Array?y.push(S):y&&y.add(S),S}function d(S,y,k=100,w=!1,C=!1,x,M){let N,I,ie,Z=0,se,We={leakWarningThreshold:x,onWillAddFirstListener(){N=S(Re=>{Z++,I=y(I,Re),w&&!ie&&(ne.fire(I),I=void 0),se=()=>{let he=I;I=void 0,ie=void 0,(!w||Z>1)&&ne.fire(he),Z=0},typeof k=="number"?(clearTimeout(ie),ie=setTimeout(se,k)):ie===void 0&&(ie=0,queueMicrotask(se))})},onWillRemoveListener(){C&&Z>0&&se?.()},onDidRemoveLastListener(){se=void 0,N.dispose()}};M||t(We);let ne=new ke(We);return M?.add(ne),ne.event}e.debounce=d;function f(S,y=0,k){return e.debounce(S,(w,C)=>w?(w.push(C),w):[C],y,void 0,!0,void 0,k)}e.accumulate=f;function g(S,y=(w,C)=>w===C,k){let w=!0,C;return o(S,x=>{let M=w||!y(x,C);return w=!1,C=x,M},k)}e.latch=g;function b(S,y,k){return[e.filter(S,y,k),e.filter(S,w=>!y(w),k)]}e.split=b;function T(S,y=!1,k=[],w){let C=k.slice(),x=S(I=>{C?C.push(I):N.fire(I)});w&&w.add(x);let M=()=>{C?.forEach(I=>N.fire(I)),C=null},N=new ke({onWillAddFirstListener(){x||(x=S(I=>N.fire(I)),w&&w.add(x))},onDidAddFirstListener(){C&&(y?setTimeout(M):M())},onDidRemoveLastListener(){x&&x.dispose(),x=null}});return w&&w.add(N),N.event}e.buffer=T;function _(S,y){return(k,w,C)=>{let x=y(new v);return S(function(M){let N=x.evaluate(M);N!==m&&k.call(w,N)},void 0,C)}}e.chain=_;let m=Symbol("HaltChainable");class v{constructor(){this.steps=[]}map(y){return this.steps.push(y),this}forEach(y){return this.steps.push(k=>(y(k),k)),this}filter(y){return this.steps.push(k=>y(k)?k:m),this}reduce(y,k){let w=k;return this.steps.push(C=>(w=y(w,C),w)),this}latch(y=(k,w)=>k===w){let k=!0,w;return this.steps.push(C=>{let x=k||!y(C,w);return k=!1,w=C,x?C:m}),this}evaluate(y){for(let k of this.steps)if(y=k(y),y===m)break;return y}}function p(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.on(y,w),x=()=>S.removeListener(y,w),M=new ke({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromNodeEventEmitter=p;function E(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.addEventListener(y,w),x=()=>S.removeEventListener(y,w),M=new ke({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromDOMEventEmitter=E;function A(S){return new Promise(y=>s(S)(y))}e.toPromise=A;function L(S){let y=new ke;return S.then(k=>{y.fire(k)},()=>{y.fire(void 0)}).finally(()=>{y.dispose()}),y.event}e.fromPromise=L;function B(S,y){return S(k=>y.fire(k))}e.forward=B;function K(S,y,k){return y(k),S(w=>y(w))}e.runAndSubscribe=K;class ${constructor(y,k){this._observable=y,this._counter=0,this._hasChanged=!1;let w={onWillAddFirstListener:()=>{y.addObserver(this)},onDidRemoveLastListener:()=>{y.removeObserver(this)}};k||t(w),this.emitter=new ke(w),k&&k.add(this.emitter)}beginUpdate(y){this._counter++}handlePossibleChange(y){}handleChange(y,k){this._hasChanged=!0}endUpdate(y){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function P(S,y){return new $(S,y).emitter.event}e.fromObservable=P;function Rt(S){return(y,k,w)=>{let C=0,x=!1,M={beginUpdate(){C++},endUpdate(){C--,C===0&&(S.reportChanges(),x&&(x=!1,y.call(k)))},handlePossibleChange(){},handleChange(){x=!0}};S.addObserver(M),S.reportChanges();let N={dispose(){S.removeObserver(M)}};return w instanceof Ko?w.add(N):Array.isArray(w)&&w.push(N),N}}e.fromObservableLight=Rt})(Ys||={});var Rm=class Lm{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Lm._idPool++}`,Lm.all.add(this)}start(t){this._stopWatch=new yM,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Rm.all=new Set,Rm._idPool=0;var SM=Rm,fk=-1,rx=class nx{constructor(t,i,s=(nx._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=s,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,i){let s=this.threshold;if(s<=0||i<s)return;this._stacks||(this._stacks=new Map);let r=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let[n,o]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${o}):`;console.warn(a),console.warn(n);let l=new xM(a,n);this._errorHandler(l)}return()=>{let n=this._stacks.get(t.value)||0;this._stacks.set(t.value,n-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[s,r]of this._stacks)(!t||i<r)&&(t=[s,r],i=r);return t}};rx._idPool=1;var kM=rx,Dm=class ox{constructor(t){this.value=t}static create(){let t=new Error;return new ox(t.stack??"")}print(){console.warn(this.value.split(`
|
|
92
|
+
`),{leaks:s,details:o}}};KA.idx=0;function WA(e){Wo=e}if($A){let e="__is_disposable_tracked__";WA(new class{trackDisposable(t){let i=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(i)},3e3)}setParent(t,i){if(t&&t!==wi.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==wi.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function wu(e){return Wo?.trackDisposable(e),e}function Su(e){Wo?.markAsDisposed(e)}function Ml(e,t){Wo?.setParent(e,t)}function VA(e,t){if(Wo)for(let i of e)Wo.setParent(i,t)}function Kk(e){if(Fk.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Wk(...e){let t=Mt(()=>Kk(e));return VA(e,t),t}function Mt(e){let t=wu({dispose:FA(()=>{Su(t),e()})});return t}var Vk=class jk{constructor(){this._toDispose=new Set,this._isDisposed=!1,wu(this)}dispose(){this._isDisposed||(Su(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Kk(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Ml(t,this),this._isDisposed?jk.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Ml(t,null))}};Vk.DISABLE_DISPOSED_WARNING=!1;var Ko=Vk,wi=class{constructor(){this._store=new Ko,wu(this),Ml(this._store,this)}dispose(){Su(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};wi.None=Object.freeze({dispose(){}});var kl=class{constructor(){this._isDisposed=!1,wu(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Ml(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,Su(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Ml(e,null),e}},Hm=typeof process<"u"&&"title"in process,Ll=Hm?"node":navigator.userAgent,Um=Hm?"node":navigator.platform,jA=Ll.includes("Firefox"),GA=Ll.includes("Edge"),Gk=/^((?!chrome|android).)*safari/i.test(Ll);function YA(){if(!Gk)return 0;let e=Ll.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var FD=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Um),$D=["Windows","Win16","Win32","WinCE"].includes(Um),KD=Um.indexOf("Linux")>=0,WD=/\bCrOS\b/.test(Ll),XA="",gt=0,mt=0,_t=0,Ie=0,zi={css:"#00000000",rgba:0},Vt;(e=>{function t(r,n,o,a){return a!==void 0?`#${Mn(r)}${Mn(n)}${Mn(o)}${Mn(a)}`:`#${Mn(r)}${Mn(n)}${Mn(o)}`}e.toCss=t;function i(r,n,o,a=255){return(r<<24|n<<16|o<<8|a)>>>0}e.toRgba=i;function s(r,n,o,a){return{css:e.toCss(r,n,o,a),rgba:e.toRgba(r,n,o,a)}}e.toColor=s})(Vt||={});var Al;(e=>{function t(l,c){if(Ie=(c.rgba&255)/255,Ie===1)return{css:c.css,rgba:c.rgba};let h=c.rgba>>24&255,u=c.rgba>>16&255,d=c.rgba>>8&255,f=l.rgba>>24&255,g=l.rgba>>16&255,b=l.rgba>>8&255;gt=f+Math.round((h-f)*Ie),mt=g+Math.round((u-g)*Ie),_t=b+Math.round((d-b)*Ie);let T=Vt.toCss(gt,mt,_t),_=Vt.toRgba(gt,mt,_t);return{css:T,rgba:_}}e.blend=t;function i(l){return(l.rgba&255)===255}e.isOpaque=i;function s(l,c,h){let u=Rn.ensureContrastRatio(l.rgba,c.rgba,h);if(u)return Vt.toColor(u>>24&255,u>>16&255,u>>8&255)}e.ensureContrastRatio=s;function r(l){let c=(l.rgba|255)>>>0;return[gt,mt,_t]=Rn.toChannels(c),{css:Vt.toCss(gt,mt,_t),rgba:c}}e.opaque=r;function n(l,c){return Ie=Math.round(c*255),[gt,mt,_t]=Rn.toChannels(l.rgba),{css:Vt.toCss(gt,mt,_t,Ie),rgba:Vt.toRgba(gt,mt,_t,Ie)}}e.opacity=n;function o(l,c){return Ie=l.rgba&255,n(l,Ie*c/255)}e.multiplyOpacity=o;function a(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}e.toColorRGB=a})(Al||={});var ZA;(e=>{let t,i;try{let r=document.createElement("canvas");r.width=1,r.height=1;let n=r.getContext("2d",{willReadFrequently:!0});n&&(t=n,t.globalCompositeOperation="copy",i=t.createLinearGradient(0,0,1,1))}catch{}function s(r){if(r.match(/#[\da-f]{3,8}/i))switch(r.length){case 4:return gt=parseInt(r.slice(1,2).repeat(2),16),mt=parseInt(r.slice(2,3).repeat(2),16),_t=parseInt(r.slice(3,4).repeat(2),16),Vt.toColor(gt,mt,_t);case 5:return gt=parseInt(r.slice(1,2).repeat(2),16),mt=parseInt(r.slice(2,3).repeat(2),16),_t=parseInt(r.slice(3,4).repeat(2),16),Ie=parseInt(r.slice(4,5).repeat(2),16),Vt.toColor(gt,mt,_t,Ie);case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}let n=r.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(n)return gt=parseInt(n[1]),mt=parseInt(n[2]),_t=parseInt(n[3]),Ie=Math.round((n[5]===void 0?1:parseFloat(n[5]))*255),Vt.toColor(gt,mt,_t,Ie);if(!t||!i)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=i,t.fillStyle=r,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[gt,mt,_t,Ie]=t.getImageData(0,0,1,1).data,Ie!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Vt.toRgba(gt,mt,_t,Ie),css:r}}e.toColor=s})(ZA||={});var Wt;(e=>{function t(s){return i(s>>16&255,s>>8&255,s&255)}e.relativeLuminance=t;function i(s,r,n){let o=s/255,a=r/255,l=n/255,c=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),h=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),u=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return c*.2126+h*.7152+u*.0722}e.relativeLuminance2=i})(Wt||={});var Rn;(e=>{function t(o,a){if(Ie=(a&255)/255,Ie===1)return a;let l=a>>24&255,c=a>>16&255,h=a>>8&255,u=o>>24&255,d=o>>16&255,f=o>>8&255;return gt=u+Math.round((l-u)*Ie),mt=d+Math.round((c-d)*Ie),_t=f+Math.round((h-f)*Ie),Vt.toRgba(gt,mt,_t)}e.blend=t;function i(o,a,l){let c=Wt.relativeLuminance(o>>8),h=Wt.relativeLuminance(a>>8);if(Ks(c,h)<l){if(h<c){let f=s(o,a,l),g=Ks(c,Wt.relativeLuminance(f>>8));if(g<l){let b=r(o,a,l),T=Ks(c,Wt.relativeLuminance(b>>8));return g>T?f:b}return f}let u=r(o,a,l),d=Ks(c,Wt.relativeLuminance(u>>8));if(d<l){let f=s(o,a,l),g=Ks(c,Wt.relativeLuminance(f>>8));return d>g?u:f}return u}}e.ensureContrastRatio=i;function s(o,a,l){let c=o>>24&255,h=o>>16&255,u=o>>8&255,d=a>>24&255,f=a>>16&255,g=a>>8&255,b=Ks(Wt.relativeLuminance2(d,f,g),Wt.relativeLuminance2(c,h,u));for(;b<l&&(d>0||f>0||g>0);)d-=Math.max(0,Math.ceil(d*.1)),f-=Math.max(0,Math.ceil(f*.1)),g-=Math.max(0,Math.ceil(g*.1)),b=Ks(Wt.relativeLuminance2(d,f,g),Wt.relativeLuminance2(c,h,u));return(d<<24|f<<16|g<<8|255)>>>0}e.reduceLuminance=s;function r(o,a,l){let c=o>>24&255,h=o>>16&255,u=o>>8&255,d=a>>24&255,f=a>>16&255,g=a>>8&255,b=Ks(Wt.relativeLuminance2(d,f,g),Wt.relativeLuminance2(c,h,u));for(;b<l&&(d<255||f<255||g<255);)d=Math.min(255,d+Math.ceil((255-d)*.1)),f=Math.min(255,f+Math.ceil((255-f)*.1)),g=Math.min(255,g+Math.ceil((255-g)*.1)),b=Ks(Wt.relativeLuminance2(d,f,g),Wt.relativeLuminance2(c,h,u));return(d<<24|f<<16|g<<8|255)>>>0}e.increaseLuminance=r;function n(o){return[o>>24&255,o>>16&255,o>>8&255,o&255]}e.toChannels=n})(Rn||={});function Mn(e){let t=e.toString(16);return t.length<2?"0"+t:t}function Ks(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}function Ze(e){if(!e)throw new Error("value must not be falsy");return e}function Pm(e){return 57508<=e&&e<=57558}function QA(e){return 57520<=e&&e<=57527}function JA(e){return 57344<=e&&e<=63743}function eM(e){return 9472<=e&&e<=9631}function tM(e){return e>=128512&&e<=128591||e>=127744&&e<=128511||e>=128640&&e<=128767||e>=9728&&e<=9983||e>=9984&&e<=10175||e>=65024&&e<=65039||e>=129280&&e<=129535||e>=127462&&e<=127487}function iM(e,t,i,s){return t===1&&i>Math.ceil(s*1.5)&&e!==void 0&&e>255&&!tM(e)&&!Pm(e)&&!JA(e)}function Yk(e){return Pm(e)||eM(e)}function sM(){return{css:{canvas:au(),cell:au()},device:{canvas:au(),cell:au(),char:{width:0,height:0,left:0,top:0}}}}function au(){return{width:0,height:0}}function rM(e,t,i=0){return(e-(Math.round(t)*2-i))%(Math.round(t)*2)}var At=0,pt=0,ms=!1,Ws=!1,lu=!1,ii,dm=0,nM=class{constructor(e,t,i,s,r,n){this._terminal=e,this._optionService=t,this._selectionRenderModel=i,this._decorationService=s,this._coreBrowserService=r,this._themeService=n,this.result={fg:0,bg:0,ext:0}}resolve(e,t,i,s){if(this.result.bg=e.bg,this.result.fg=e.fg,this.result.ext=e.bg&268435456?e.extended.ext:0,pt=0,At=0,Ws=!1,ms=!1,lu=!1,ii=this._themeService.colors,dm=0,e.getCode()!==0&&e.extended.underlineStyle===4){let r=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));dm=t*s%(Math.round(r)*2)}if(this._decorationService.forEachDecorationAtCell(t,i,"bottom",r=>{r.backgroundColorRGB&&(pt=r.backgroundColorRGB.rgba>>8&16777215,Ws=!0),r.foregroundColorRGB&&(At=r.foregroundColorRGB.rgba>>8&16777215,ms=!0)}),lu=this._selectionRenderModel.isCellSelected(this._terminal,t,i),lu){if(this.result.fg&67108864||(this.result.bg&50331648)!==0){if(this.result.fg&67108864)switch(this.result.fg&50331648){case 16777216:case 33554432:pt=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:pt=(this.result.fg&16777215)<<8|255;break;default:pt=this._themeService.colors.foreground.rgba}else switch(this.result.bg&50331648){case 16777216:case 33554432:pt=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:pt=(this.result.bg&16777215)<<8|255;break}pt=Rn.blend(pt,(this._coreBrowserService.isFocused?ii.selectionBackgroundOpaque:ii.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}else pt=(this._coreBrowserService.isFocused?ii.selectionBackgroundOpaque:ii.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(Ws=!0,ii.selectionForeground&&(At=ii.selectionForeground.rgba>>8&16777215,ms=!0),Yk(e.getCode())){if(this.result.fg&67108864&&(this.result.bg&50331648)===0)At=(this._coreBrowserService.isFocused?ii.selectionBackgroundOpaque:ii.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(this.result.fg&67108864)switch(this.result.bg&50331648){case 16777216:case 33554432:At=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:At=(this.result.bg&16777215)<<8|255;break}else switch(this.result.fg&50331648){case 16777216:case 33554432:At=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:At=(this.result.fg&16777215)<<8|255;break;default:At=this._themeService.colors.foreground.rgba}At=Rn.blend(At,(this._coreBrowserService.isFocused?ii.selectionBackgroundOpaque:ii.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}ms=!0}}this._decorationService.forEachDecorationAtCell(t,i,"top",r=>{r.backgroundColorRGB&&(pt=r.backgroundColorRGB.rgba>>8&16777215,Ws=!0),r.foregroundColorRGB&&(At=r.foregroundColorRGB.rgba>>8&16777215,ms=!0)}),Ws&&(lu?pt=e.bg&-16777216&-134217729|pt|50331648:pt=e.bg&-16777216|pt|50331648),ms&&(At=e.fg&-16777216&-67108865|At|50331648),this.result.fg&67108864&&(Ws&&!ms&&((this.result.bg&50331648)===0?At=this.result.fg&-134217728|ii.background.rgba>>8&16777215&16777215|50331648:At=this.result.fg&-134217728|this.result.bg&67108863,ms=!0),!Ws&&ms&&((this.result.fg&50331648)===0?pt=this.result.bg&-67108864|ii.foreground.rgba>>8&16777215&16777215|50331648:pt=this.result.bg&-67108864|this.result.fg&67108863,Ws=!0)),ii=void 0,this.result.bg=Ws?pt:this.result.bg,this.result.fg=ms?At:this.result.fg,this.result.ext&=536870911,this.result.ext|=dm<<29&3758096384}},oM=.5,Xk=jA||GA?"bottom":"ideographic",aM={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]},lM={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]},cM={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"║":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╒":{1:(e,t)=>`M.5,1 L.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╓":{1:(e,t)=>`M${.5-e},1 L${.5-e},.5 L1,.5 M${.5+e},.5 L${.5+e},1`},"╔":{1:(e,t)=>`M1,${.5-t} L${.5-e},${.5-t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1`},"╕":{1:(e,t)=>`M0,${.5-t} L.5,${.5-t} L.5,1 M0,${.5+t} L.5,${.5+t}`},"╖":{1:(e,t)=>`M${.5+e},1 L${.5+e},.5 L0,.5 M${.5-e},.5 L${.5-e},1`},"╗":{1:(e,t)=>`M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M0,${.5-t} L${.5+e},${.5-t} L${.5+e},1`},"╘":{1:(e,t)=>`M.5,0 L.5,${.5+t} L1,${.5+t} M.5,${.5-t} L1,${.5-t}`},"╙":{1:(e,t)=>`M1,.5 L${.5-e},.5 L${.5-e},0 M${.5+e},.5 L${.5+e},0`},"╚":{1:(e,t)=>`M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0 M1,${.5+t} L${.5-e},${.5+t} L${.5-e},0`},"╛":{1:(e,t)=>`M0,${.5+t} L.5,${.5+t} L.5,0 M0,${.5-t} L.5,${.5-t}`},"╜":{1:(e,t)=>`M0,.5 L${.5+e},.5 L${.5+e},0 M${.5-e},.5 L${.5-e},0`},"╝":{1:(e,t)=>`M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M0,${.5+t} L${.5+e},${.5+t} L${.5+e},0`},"╞":{1:(e,t)=>`M.5,0 L.5,1 M.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╟":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1 M${.5+e},.5 L1,.5`},"╠":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╡":{1:(e,t)=>`M.5,0 L.5,1 M0,${.5-t} L.5,${.5-t} M0,${.5+t} L.5,${.5+t}`},"╢":{1:(e,t)=>`M0,.5 L${.5-e},.5 M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╣":{1:(e,t)=>`M${.5+e},0 L${.5+e},1 M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0`},"╤":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t} M.5,${.5+t} L.5,1`},"╥":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},.5 L${.5-e},1 M${.5+e},.5 L${.5+e},1`},"╦":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1`},"╧":{1:(e,t)=>`M.5,0 L.5,${.5-t} M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╨":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},.5 L${.5-e},0 M${.5+e},.5 L${.5+e},0`},"╩":{1:(e,t)=>`M0,${.5+t} L1,${.5+t} M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╪":{1:(e,t)=>`M.5,0 L.5,1 M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╫":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╬":{1:(e,t)=>`M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1 M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`},"╮":{1:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`},"╯":{1:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`},"╰":{1:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`}},Rl={"":{d:"M.3,1 L.03,1 L.03,.88 C.03,.82,.06,.78,.11,.73 C.15,.7,.2,.68,.28,.65 L.43,.6 C.49,.58,.53,.56,.56,.53 C.59,.5,.6,.47,.6,.43 L.6,.27 L.4,.27 L.69,.1 L.98,.27 L.78,.27 L.78,.46 C.78,.52,.76,.56,.72,.61 C.68,.66,.63,.67,.56,.7 L.48,.72 C.42,.74,.38,.76,.35,.78 C.32,.8,.31,.84,.31,.88 L.31,1 M.3,.5 L.03,.59 L.03,.09 L.3,.09 L.3,.655",type:0},"":{d:"M.7,.4 L.7,.47 L.2,.47 L.2,.03 L.355,.03 L.355,.4 L.705,.4 M.7,.5 L.86,.5 L.86,.95 L.69,.95 L.44,.66 L.46,.86 L.46,.95 L.3,.95 L.3,.49 L.46,.49 L.71,.78 L.69,.565 L.69,.5",type:0},"":{d:"M.25,.94 C.16,.94,.11,.92,.11,.87 L.11,.53 C.11,.48,.15,.455,.23,.45 L.23,.3 C.23,.25,.26,.22,.31,.19 C.36,.16,.43,.15,.51,.15 C.59,.15,.66,.16,.71,.19 C.77,.22,.79,.26,.79,.3 L.79,.45 C.87,.45,.91,.48,.91,.53 L.91,.87 C.91,.92,.86,.94,.77,.94 L.24,.94 M.53,.2 C.49,.2,.45,.21,.42,.23 C.39,.25,.38,.27,.38,.3 L.38,.45 L.68,.45 L.68,.3 C.68,.27,.67,.25,.64,.23 C.61,.21,.58,.2,.53,.2 M.58,.82 L.58,.66 C.63,.65,.65,.63,.65,.6 C.65,.58,.64,.57,.61,.56 C.58,.55,.56,.54,.52,.54 C.48,.54,.46,.55,.43,.56 C.4,.57,.39,.59,.39,.6 C.39,.63,.41,.64,.46,.66 L.46,.82 L.57,.82",type:0},"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}};Rl[""]=Rl[""];Rl[""]=Rl[""];function hM(e,t,i,s,r,n,o,a){let l=aM[t];if(l)return uM(e,l,i,s,r,n),!0;let c=lM[t];if(c)return dM(e,c,i,s,r,n),!0;let h=cM[t];if(h)return fM(e,h,i,s,r,n,a),!0;let u=Rl[t];return u?(pM(e,u,i,s,r,n,o,a),!0):!1}function uM(e,t,i,s,r,n){for(let o=0;o<t.length;o++){let a=t[o],l=r/8,c=n/8;e.fillRect(i+a.x*l,s+a.y*c,a.w*l,a.h*c)}}var ak=new Map;function dM(e,t,i,s,r,n){let o=ak.get(t);o||(o=new Map,ak.set(t,o));let a=e.fillStyle;if(typeof a!="string")throw new Error(`Unexpected fillStyle type "${a}"`);let l=o.get(a);if(!l){let c=t[0].length,h=t.length,u=e.canvas.ownerDocument.createElement("canvas");u.width=c,u.height=h;let d=Ze(u.getContext("2d")),f=new ImageData(c,h),g,b,T,_;if(a.startsWith("#"))g=parseInt(a.slice(1,3),16),b=parseInt(a.slice(3,5),16),T=parseInt(a.slice(5,7),16),_=a.length>7&&parseInt(a.slice(7,9),16)||1;else if(a.startsWith("rgba"))[g,b,T,_]=a.substring(5,a.length-1).split(",").map(m=>parseFloat(m));else throw new Error(`Unexpected fillStyle color format "${a}" when drawing pattern glyph`);for(let m=0;m<h;m++)for(let v=0;v<c;v++)f.data[(m*c+v)*4]=g,f.data[(m*c+v)*4+1]=b,f.data[(m*c+v)*4+2]=T,f.data[(m*c+v)*4+3]=t[m][v]*(_*255);d.putImageData(f,0,0),l=Ze(e.createPattern(u,null)),o.set(a,l)}e.fillStyle=l,e.fillRect(i,s,r,n)}function fM(e,t,i,s,r,n,o){e.strokeStyle=e.fillStyle;for(let[a,l]of Object.entries(t)){e.beginPath(),e.lineWidth=o*Number.parseInt(a);let c;if(typeof l=="function"){let h=.15/n*r;c=l(.15,h)}else c=l;for(let h of c.split(" ")){let u=h[0],d=Zk[u];if(!d){console.error(`Could not find drawing instructions for "${u}"`);continue}let f=h.substring(1).split(",");!f[0]||!f[1]||d(e,Qk(f,r,n,i,s,!0,o))}e.stroke(),e.closePath()}}function pM(e,t,i,s,r,n,o,a){let l=new Path2D;l.rect(i,s,r,n),e.clip(l),e.beginPath();let c=o/12;e.lineWidth=a*c;for(let h of t.d.split(" ")){let u=h[0],d=Zk[u];if(!d){console.error(`Could not find drawing instructions for "${u}"`);continue}let f=h.substring(1).split(",");!f[0]||!f[1]||d(e,Qk(f,r,n,i,s,!1,a,(t.leftPadding??0)*(c/2),(t.rightPadding??0)*(c/2)))}t.type===1?(e.strokeStyle=e.fillStyle,e.stroke()):e.fill(),e.closePath()}function lk(e,t,i=0){return Math.max(Math.min(e,t),i)}var Zk={C:(e,t)=>e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]),L:(e,t)=>e.lineTo(t[0],t[1]),M:(e,t)=>e.moveTo(t[0],t[1])};function Qk(e,t,i,s,r,n,o,a=0,l=0){let c=e.map(h=>parseFloat(h)||parseInt(h));if(c.length<2)throw new Error("Too few arguments for instruction");for(let h=0;h<c.length;h+=2)c[h]*=t-a*o-l*o,n&&c[h]!==0&&(c[h]=lk(Math.round(c[h]+.5)-.5,t,0)),c[h]+=s+a*o;for(let h=1;h<c.length;h+=2)c[h]*=i,n&&c[h]!==0&&(c[h]=lk(Math.round(c[h]+.5)-.5,i,0)),c[h]+=r;return c}var ck=class{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},hk=class{constructor(){this._data=new ck}set(e,t,i,s,r){this._data.get(e,t)||this._data.set(e,t,new ck),this._data.get(e,t).set(i,s,r)}get(e,t,i,s){return this._data.get(e,t)?.get(i,s)}clear(){this._data.clear()}},Jk=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,i=0,s=e.timeRemaining(),r=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),i=Math.max(t,i),r=e.timeRemaining(),i*1.5>r){s-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),this._start();return}s=r}this.clear()}},gM=class extends Jk{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},mM=class extends Jk{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},_M=!Hm&&"requestIdleCallback"in window?mM:gM,Fo=class ex{constructor(){this.fg=0,this.bg=0,this.extended=new tx}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new ex;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},tx=class ix{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new ix(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},uk=class Mm{constructor(t){this.element=t,this.next=Mm.Undefined,this.prev=Mm.Undefined}};uk.Undefined=new uk(void 0);var vM=globalThis.performance&&typeof globalThis.performance.now=="function",yM=class sx{static create(t){return new sx(t)}constructor(t){this._now=vM&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},bM=!1,dk=!1,wM=!1,Ys;(e=>{e.None=()=>wi.None;function t(S){if(wM){let{onDidAddListener:y}=S,k=Dm.create(),w=0;S.onDidAddListener=()=>{++w===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),k.print()),y?.()}}}function i(S,y){return d(S,()=>{},0,void 0,!0,void 0,y)}e.defer=i;function s(S){return(y,k=null,w)=>{let C=!1,x;return x=S(M=>{if(!C)return x?x.dispose():C=!0,y.call(k,M)},null,w),C&&x.dispose(),x}}e.once=s;function r(S,y,k){return h((w,C=null,x)=>S(M=>w.call(C,y(M)),null,x),k)}e.map=r;function n(S,y,k){return h((w,C=null,x)=>S(M=>{y(M),w.call(C,M)},null,x),k)}e.forEach=n;function o(S,y,k){return h((w,C=null,x)=>S(M=>y(M)&&w.call(C,M),null,x),k)}e.filter=o;function a(S){return S}e.signal=a;function l(...S){return(y,k=null,w)=>{let C=Wk(...S.map(x=>x(M=>y.call(k,M))));return u(C,w)}}e.any=l;function c(S,y,k,w){let C=k;return r(S,x=>(C=y(C,x),C),w)}e.reduce=c;function h(S,y){let k,w={onWillAddFirstListener(){k=S(C.fire,C)},onDidRemoveLastListener(){k?.dispose()}};y||t(w);let C=new ke(w);return y?.add(C),C.event}function u(S,y){return y instanceof Array?y.push(S):y&&y.add(S),S}function d(S,y,k=100,w=!1,C=!1,x,M){let N,I,ie,Z=0,se,We={leakWarningThreshold:x,onWillAddFirstListener(){N=S(Re=>{Z++,I=y(I,Re),w&&!ie&&(ne.fire(I),I=void 0),se=()=>{let he=I;I=void 0,ie=void 0,(!w||Z>1)&&ne.fire(he),Z=0},typeof k=="number"?(clearTimeout(ie),ie=setTimeout(se,k)):ie===void 0&&(ie=0,queueMicrotask(se))})},onWillRemoveListener(){C&&Z>0&&se?.()},onDidRemoveLastListener(){se=void 0,N.dispose()}};M||t(We);let ne=new ke(We);return M?.add(ne),ne.event}e.debounce=d;function f(S,y=0,k){return e.debounce(S,(w,C)=>w?(w.push(C),w):[C],y,void 0,!0,void 0,k)}e.accumulate=f;function g(S,y=(w,C)=>w===C,k){let w=!0,C;return o(S,x=>{let M=w||!y(x,C);return w=!1,C=x,M},k)}e.latch=g;function b(S,y,k){return[e.filter(S,y,k),e.filter(S,w=>!y(w),k)]}e.split=b;function T(S,y=!1,k=[],w){let C=k.slice(),x=S(I=>{C?C.push(I):N.fire(I)});w&&w.add(x);let M=()=>{C?.forEach(I=>N.fire(I)),C=null},N=new ke({onWillAddFirstListener(){x||(x=S(I=>N.fire(I)),w&&w.add(x))},onDidAddFirstListener(){C&&(y?setTimeout(M):M())},onDidRemoveLastListener(){x&&x.dispose(),x=null}});return w&&w.add(N),N.event}e.buffer=T;function _(S,y){return(k,w,C)=>{let x=y(new v);return S(function(M){let N=x.evaluate(M);N!==m&&k.call(w,N)},void 0,C)}}e.chain=_;let m=Symbol("HaltChainable");class v{constructor(){this.steps=[]}map(y){return this.steps.push(y),this}forEach(y){return this.steps.push(k=>(y(k),k)),this}filter(y){return this.steps.push(k=>y(k)?k:m),this}reduce(y,k){let w=k;return this.steps.push(C=>(w=y(w,C),w)),this}latch(y=(k,w)=>k===w){let k=!0,w;return this.steps.push(C=>{let x=k||!y(C,w);return k=!1,w=C,x?C:m}),this}evaluate(y){for(let k of this.steps)if(y=k(y),y===m)break;return y}}function p(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.on(y,w),x=()=>S.removeListener(y,w),M=new ke({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromNodeEventEmitter=p;function E(S,y,k=w=>w){let w=(...N)=>M.fire(k(...N)),C=()=>S.addEventListener(y,w),x=()=>S.removeEventListener(y,w),M=new ke({onWillAddFirstListener:C,onDidRemoveLastListener:x});return M.event}e.fromDOMEventEmitter=E;function A(S){return new Promise(y=>s(S)(y))}e.toPromise=A;function L(S){let y=new ke;return S.then(k=>{y.fire(k)},()=>{y.fire(void 0)}).finally(()=>{y.dispose()}),y.event}e.fromPromise=L;function B(S,y){return S(k=>y.fire(k))}e.forward=B;function W(S,y,k){return y(k),S(w=>y(w))}e.runAndSubscribe=W;class ${constructor(y,k){this._observable=y,this._counter=0,this._hasChanged=!1;let w={onWillAddFirstListener:()=>{y.addObserver(this)},onDidRemoveLastListener:()=>{y.removeObserver(this)}};k||t(w),this.emitter=new ke(w),k&&k.add(this.emitter)}beginUpdate(y){this._counter++}handlePossibleChange(y){}handleChange(y,k){this._hasChanged=!0}endUpdate(y){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function P(S,y){return new $(S,y).emitter.event}e.fromObservable=P;function Rt(S){return(y,k,w)=>{let C=0,x=!1,M={beginUpdate(){C++},endUpdate(){C--,C===0&&(S.reportChanges(),x&&(x=!1,y.call(k)))},handlePossibleChange(){},handleChange(){x=!0}};S.addObserver(M),S.reportChanges();let N={dispose(){S.removeObserver(M)}};return w instanceof Ko?w.add(N):Array.isArray(w)&&w.push(N),N}}e.fromObservableLight=Rt})(Ys||={});var Rm=class Lm{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Lm._idPool++}`,Lm.all.add(this)}start(t){this._stopWatch=new yM,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Rm.all=new Set,Rm._idPool=0;var SM=Rm,fk=-1,rx=class nx{constructor(t,i,s=(nx._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=s,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,i){let s=this.threshold;if(s<=0||i<s)return;this._stacks||(this._stacks=new Map);let r=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let[n,o]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${o}):`;console.warn(a),console.warn(n);let l=new xM(a,n);this._errorHandler(l)}return()=>{let n=this._stacks.get(t.value)||0;this._stacks.set(t.value,n-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[s,r]of this._stacks)(!t||i<r)&&(t=[s,r],i=r);return t}};rx._idPool=1;var kM=rx,Dm=class ox{constructor(t){this.value=t}static create(){let t=new Error;return new ox(t.stack??"")}print(){console.warn(this.value.split(`
|
|
93
93
|
`).slice(2).join(`
|
|
94
94
|
`))}},xM=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},CM=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},EM=0,du=class{constructor(e){this.value=e,this.id=EM++}},TM=2,AM=(e,t)=>{if(e instanceof du)t(e);else for(let i=0;i<e.length;i++){let s=e[i];s&&t(s)}},fu;if(bM){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
|
|
95
95
|
`)),e.length=0)},3e3),fu=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var ke=class{constructor(e){this._size=0,this._options=e,this._leakageMon=fk>0||this._options?.leakWarningThreshold?new kM(e?.onListenerError??uu,this._options?.leakWarningThreshold??fk):void 0,this._perfMon=this._options?._profName?new SM(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(dk){let e=this._listeners;queueMicrotask(()=>{AM(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new CM(`${a}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||uu)(c),wi.None}if(this._disposed)return wi.None;t&&(e=e.bind(t));let s=new du(e),r,n;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=Dm.create(),r=this._leakageMon.check(s.stack,this._size+1)),dk&&(s.stack=n??Dm.create()),this._listeners?this._listeners instanceof du?(this._deliveryQueue??=new MM,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;let o=Mt(()=>{fu?.unregister(o),r?.(),this._removeListener(s)});if(i instanceof Ko?i.add(o):Array.isArray(i)&&i.push(o),fu){let a=new Error().stack.split(`
|
|
96
96
|
`).slice(2,3).join(`
|
|
97
|
-
`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(a);fu.register(o,l?.[2]??a,o)}return o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let s=this._deliveryQueue.current===this;if(this._size*TM<=t.length){let r=0;for(let n=0;n<t.length;n++)t[n]?t[r++]=t[n]:s&&(this._deliveryQueue.end--,r<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=r}}_deliver(e,t){if(!e)return;let i=this._options?.onListenerError||uu;if(!i){e.value(t);return}try{e.value(t)}catch(s){i(s)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof du)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},MM=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},pk={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}},xl=2,Cl,$r=class Io{constructor(t,i,s){this._document=t,this._config=i,this._unicodeService=s,this._didWarmUp=!1,this._cacheMap=new hk,this._cacheMapCombined=new hk,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new Fo,this._textureSize=512,this._onAddTextureAtlasCanvas=new ke,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new ke,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=ax(t,this._config.deviceCellWidth*4+xl*2,this._config.deviceCellHeight+xl*2),this._tmpCtx=Ze(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){this._tmpCanvas.remove();for(let t of this.pages)t.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){let t=new _M;for(let i=33;i<126;i++)t.enqueue(()=>{if(!this._cacheMap.get(i,0,0,0)){let s=this._drawToCache(i,0,0,0,!1,void 0);this._cacheMap.set(i,0,0,0,s)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(!(this._pages[0].currentRow.x===0&&this._pages[0].currentRow.y===0)){for(let t of this._pages)t.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(Io.maxAtlasPages&&this._pages.length>=Math.max(4,Io.maxAtlasPages)){let i=this._pages.filter(c=>c.canvas.width*2<=(Io.maxTextureSize||4096)).sort((c,h)=>h.canvas.width!==c.canvas.width?h.canvas.width-c.canvas.width:h.percentageUsed-c.percentageUsed),s=-1,r=0;for(let c=0;c<i.length;c++)if(i[c].canvas.width!==r)s=c,r=i[c].canvas.width;else if(c-s===3)break;let n=i.slice(s,s+4),o=n.map(c=>c.glyphs[0].texturePage).sort((c,h)=>c>h?1:-1),a=this.pages.length-n.length,l=this._mergePages(n,a);l.version++;for(let c=o.length-1;c>=0;c--)this._deletePage(o[c]);this.pages.push(l),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(l.canvas)}let t=new fm(this._document,this._textureSize);return this._pages.push(t),this._activePages.push(t),this._onAddTextureAtlasCanvas.fire(t.canvas),t}_mergePages(t,i){let s=t[0].canvas.width*2,r=new fm(this._document,s,t);for(let[n,o]of t.entries()){let a=n*o.canvas.width%s,l=Math.floor(n/2)*o.canvas.height;r.ctx.drawImage(o.canvas,a,l);for(let h of o.glyphs)h.texturePage=i,h.sizeClipSpace.x=h.size.x/s,h.sizeClipSpace.y=h.size.y/s,h.texturePosition.x+=a,h.texturePosition.y+=l,h.texturePositionClipSpace.x=h.texturePosition.x/s,h.texturePositionClipSpace.y=h.texturePosition.y/s;this._onRemoveTextureAtlasCanvas.fire(o.canvas);let c=this._activePages.indexOf(o);c!==-1&&this._activePages.splice(c,1)}return r}_deletePage(t){this._pages.splice(t,1);for(let i=t;i<this._pages.length;i++){let s=this._pages[i];for(let r of s.glyphs)r.texturePage--;s.version++}}getRasterizedGlyphCombinedChar(t,i,s,r,n,o){return this._getFromCacheMap(this._cacheMapCombined,t,i,s,r,n,o)}getRasterizedGlyph(t,i,s,r,n,o){return this._getFromCacheMap(this._cacheMap,t,i,s,r,n,o)}_getFromCacheMap(t,i,s,r,n,o,a){return Cl=t.get(i,s,r,n),Cl||(Cl=this._drawToCache(i,s,r,n,o,a),t.set(i,s,r,n,Cl)),Cl}_getColorFromAnsiIndex(t){if(t>=this._config.colors.ansi.length)throw new Error("No color found for idx "+t);return this._config.colors.ansi[t]}_getBackgroundColor(t,i,s,r){if(this._config.allowTransparency)return zi;let n;switch(t){case 16777216:case 33554432:n=this._getColorFromAnsiIndex(i);break;case 50331648:let o=Fo.toColorRGB(i);n=Vt.toColor(o[0],o[1],o[2]);break;default:s?n=Al.opaque(this._config.colors.foreground):n=this._config.colors.background;break}return this._config.allowTransparency||(n=Al.opaque(n)),n}_getForegroundColor(t,i,s,r,n,o,a,l,c,h){let u=this._getMinimumContrastColor(t,i,s,r,n,o,a,c,l,h);if(u)return u;let d;switch(n){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&c&&o<8&&(o+=8),d=this._getColorFromAnsiIndex(o);break;case 50331648:let f=Fo.toColorRGB(o);d=Vt.toColor(f[0],f[1],f[2]);break;default:a?d=this._config.colors.background:d=this._config.colors.foreground}return this._config.allowTransparency&&(d=Al.opaque(d)),l&&(d=Al.multiplyOpacity(d,oM)),d}_resolveBackgroundRgba(t,i,s){switch(t){case 16777216:case 33554432:return this._getColorFromAnsiIndex(i).rgba;case 50331648:return i<<8;default:return s?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(t,i,s,r){switch(t){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&r&&i<8&&(i+=8),this._getColorFromAnsiIndex(i).rgba;case 50331648:return i<<8;default:return s?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(t,i,s,r,n,o,a,l,c,h){if(this._config.minimumContrastRatio===1||h)return;let u=this._getContrastCache(c),d=u.getColor(t,r);if(d!==void 0)return d||void 0;let f=this._resolveBackgroundRgba(i,s,a),g=this._resolveForegroundRgba(n,o,a,l),b=Rn.ensureContrastRatio(f,g,this._config.minimumContrastRatio/(c?2:1));if(!b){u.setColor(t,r,null);return}let T=Vt.toColor(b>>24&255,b>>16&255,b>>8&255);return u.setColor(t,r,T),T}_getContrastCache(t){return t?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(t,i,s,r,n,o){let a=typeof t=="number"?String.fromCharCode(t):t;o&&this._tmpCanvas.parentElement!==o&&(this._tmpCanvas.style.display="none",o.append(this._tmpCanvas));let l=Math.min(this._config.deviceCellWidth*Math.max(a.length,2)+xl*2,this._config.deviceMaxTextureSize);this._tmpCanvas.width<l&&(this._tmpCanvas.width=l);let c=Math.min(this._config.deviceCellHeight+xl*4,this._textureSize);if(this._tmpCanvas.height<c&&(this._tmpCanvas.height=c),this._tmpCtx.save(),this._workAttributeData.fg=s,this._workAttributeData.bg=i,this._workAttributeData.extended.ext=r,!!this._workAttributeData.isInvisible())return pk;let h=!!this._workAttributeData.isBold(),u=!!this._workAttributeData.isInverse(),d=!!this._workAttributeData.isDim(),f=!!this._workAttributeData.isItalic(),g=!!this._workAttributeData.isUnderline(),b=!!this._workAttributeData.isStrikethrough(),T=!!this._workAttributeData.isOverline(),_=this._workAttributeData.getFgColor(),m=this._workAttributeData.getFgColorMode(),v=this._workAttributeData.getBgColor(),p=this._workAttributeData.getBgColorMode();if(u){let N=_;_=v,v=N;let I=m;m=p,p=I}let E=this._getBackgroundColor(p,v,u,d);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";let A=h?this._config.fontWeightBold:this._config.fontWeight,L=f?"italic":"";this._tmpCtx.font=`${L} ${A} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=Xk;let B=a.length===1&&Pm(a.charCodeAt(0)),K=a.length===1&&QA(a.charCodeAt(0)),$=this._getForegroundColor(i,p,v,s,m,_,u,d,h,Yk(a.charCodeAt(0)));this._tmpCtx.fillStyle=$.css;let P=K?0:xl*2,Rt=!1;this._config.customGlyphs!==!1&&(Rt=hM(this._tmpCtx,a,P,P,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let S=!B,y;if(typeof t=="number"?y=this._unicodeService.wcwidth(t):y=this._unicodeService.getStringCellWidth(t),g){this._tmpCtx.save();let N=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),I=N%2===1?.5:0;if(this._tmpCtx.lineWidth=N,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())S=!1,this._tmpCtx.strokeStyle=`rgb(${Fo.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{S=!1;let Re=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Re<8&&(Re+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Re).css}this._tmpCtx.beginPath();let ie=P,Z=Math.ceil(P+this._config.deviceCharHeight)-I-(n?N*2:0),se=Z+N,We=Z+N*2,ne=this._workAttributeData.getUnderlineVariantOffset();for(let Re=0;Re<y;Re++){this._tmpCtx.save();let he=ie+Re*this._config.deviceCellWidth,Oe=ie+(Re+1)*this._config.deviceCellWidth,er=he+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(he,Z),this._tmpCtx.lineTo(Oe,Z),this._tmpCtx.moveTo(he,We),this._tmpCtx.lineTo(Oe,We);break;case 3:let Gi=N<=1?We:Math.ceil(P+this._config.deviceCharHeight-N/2)-I,si=N<=1?Z:Math.ceil(P+this._config.deviceCharHeight+N/2)-I,oe=new Path2D;oe.rect(he,Z,this._config.deviceCellWidth,We-Z),this._tmpCtx.clip(oe),this._tmpCtx.moveTo(he-this._config.deviceCellWidth/2,se),this._tmpCtx.bezierCurveTo(he-this._config.deviceCellWidth/2,si,he,si,he,se),this._tmpCtx.bezierCurveTo(he,Gi,er,Gi,er,se),this._tmpCtx.bezierCurveTo(er,si,Oe,si,Oe,se),this._tmpCtx.bezierCurveTo(Oe,Gi,Oe+this._config.deviceCellWidth/2,Gi,Oe+this._config.deviceCellWidth/2,se);break;case 4:let tr=ne===0?0:ne>=N?N*2-ne:N-ne;ne>=N||tr===0?(this._tmpCtx.setLineDash([Math.round(N),Math.round(N)]),this._tmpCtx.moveTo(he+tr,Z),this._tmpCtx.lineTo(Oe,Z)):(this._tmpCtx.setLineDash([Math.round(N),Math.round(N)]),this._tmpCtx.moveTo(he,Z),this._tmpCtx.lineTo(he+tr,Z),this._tmpCtx.moveTo(he+tr+N,Z),this._tmpCtx.lineTo(Oe,Z)),ne=rM(Oe-he,N,ne);break;case 5:let R2=.6,L2=.3,Ou=Oe-he,c_=Math.floor(R2*Ou),h_=Math.floor(L2*Ou),D2=Ou-c_-h_;this._tmpCtx.setLineDash([c_,h_,D2]),this._tmpCtx.moveTo(he,Z),this._tmpCtx.lineTo(Oe,Z);break;default:this._tmpCtx.moveTo(he,Z),this._tmpCtx.lineTo(Oe,Z);break}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Rt&&this._config.fontSize>=12&&!this._config.allowTransparency&&a!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";let Re=this._tmpCtx.measureText(a);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Re&&Re.actualBoundingBoxDescent>0){this._tmpCtx.save();let he=new Path2D;he.rect(ie,Z-Math.ceil(N/2),this._config.deviceCellWidth*y,We-Z+Math.ceil(N/2)),this._tmpCtx.clip(he),this._tmpCtx.lineWidth=this._config.devicePixelRatio*3,this._tmpCtx.strokeStyle=E.css,this._tmpCtx.strokeText(a,P,P+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(T){let N=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),I=N%2===1?.5:0;this._tmpCtx.lineWidth=N,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+I),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*y,P+I),this._tmpCtx.stroke()}if(Rt||this._tmpCtx.fillText(a,P,P+this._config.deviceCharHeight),a==="_"&&!this._config.allowTransparency){let N=pm(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),E,$,S);if(N)for(let I=1;I<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(a,P,P+this._config.deviceCharHeight-I),N=pm(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),E,$,S),!!N);I++);}if(b){let N=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),I=this._tmpCtx.lineWidth%2===1?.5:0;this._tmpCtx.lineWidth=N,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+Math.floor(this._config.deviceCharHeight/2)-I),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*y,P+Math.floor(this._config.deviceCharHeight/2)-I),this._tmpCtx.stroke()}this._tmpCtx.restore();let k=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height),w;if(this._config.allowTransparency?w=RM(k):w=pm(k,E,$,S),w)return pk;let C=this._findGlyphBoundingBox(k,this._workBoundingBox,l,K,Rt,P),x,M;for(;;){if(this._activePages.length===0){let N=this._createNewPage();x=N,M=N.currentRow,M.height=C.size.y;break}x=this._activePages[this._activePages.length-1],M=x.currentRow;for(let N of this._activePages)C.size.y<=N.currentRow.height&&(x=N,M=N.currentRow);for(let N=this._activePages.length-1;N>=0;N--)for(let I of this._activePages[N].fixedRows)I.height<=M.height&&C.size.y<=I.height&&(x=this._activePages[N],M=I);if(C.size.x>this._textureSize){this._overflowSizePage||(this._overflowSizePage=new fm(this._document,this._config.deviceMaxTextureSize),this.pages.push(this._overflowSizePage),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(this._overflowSizePage.canvas)),x=this._overflowSizePage,M=this._overflowSizePage.currentRow,M.x+C.size.x>=x.canvas.width&&(M.x=0,M.y+=M.height,M.height=0);break}if(M.y+C.size.y>=x.canvas.height||M.height>C.size.y+2){let N=!1;if(x.currentRow.y+x.currentRow.height+C.size.y>=x.canvas.height){let I;for(let ie of this._activePages)if(ie.currentRow.y+ie.currentRow.height+C.size.y<ie.canvas.height){I=ie;break}if(I)x=I;else if(Io.maxAtlasPages&&this._pages.length>=Io.maxAtlasPages&&M.y+C.size.y<=x.canvas.height&&M.height>=C.size.y&&M.x+C.size.x<=x.canvas.width)N=!0;else{let ie=this._createNewPage();x=ie,M=ie.currentRow,M.height=C.size.y,N=!0}}N||(x.currentRow.height>0&&x.fixedRows.push(x.currentRow),M={x:0,y:x.currentRow.y+x.currentRow.height,height:C.size.y},x.fixedRows.push(M),x.currentRow={x:0,y:M.y+M.height,height:0})}if(M.x+C.size.x<=x.canvas.width)break;M===x.currentRow?(M.x=0,M.y+=M.height,M.height=0):x.fixedRows.splice(x.fixedRows.indexOf(M),1)}return C.texturePage=this._pages.indexOf(x),C.texturePosition.x=M.x,C.texturePosition.y=M.y,C.texturePositionClipSpace.x=M.x/x.canvas.width,C.texturePositionClipSpace.y=M.y/x.canvas.height,C.sizeClipSpace.x/=x.canvas.width,C.sizeClipSpace.y/=x.canvas.height,M.height=Math.max(M.height,C.size.y),M.x+=C.size.x,x.ctx.putImageData(k,C.texturePosition.x-this._workBoundingBox.left,C.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,C.size.x,C.size.y),x.addGlyph(C),x.version++,C}_findGlyphBoundingBox(t,i,s,r,n,o){i.top=0;let a=r?this._config.deviceCellHeight:this._tmpCanvas.height,l=r?this._config.deviceCellWidth:s,c=!1;for(let h=0;h<a;h++){for(let u=0;u<l;u++){let d=h*this._tmpCanvas.width*4+u*4+3;if(t.data[d]!==0){i.top=h,c=!0;break}}if(c)break}i.left=0,c=!1;for(let h=0;h<o+l;h++){for(let u=0;u<a;u++){let d=u*this._tmpCanvas.width*4+h*4+3;if(t.data[d]!==0){i.left=h,c=!0;break}}if(c)break}i.right=l,c=!1;for(let h=o+l-1;h>=o;h--){for(let u=0;u<a;u++){let d=u*this._tmpCanvas.width*4+h*4+3;if(t.data[d]!==0){i.right=h,c=!0;break}}if(c)break}i.bottom=a,c=!1;for(let h=a-1;h>=0;h--){for(let u=0;u<l;u++){let d=h*this._tmpCanvas.width*4+u*4+3;if(t.data[d]!==0){i.bottom=h,c=!0;break}}if(c)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:i.right-i.left+1,y:i.bottom-i.top+1},sizeClipSpace:{x:i.right-i.left+1,y:i.bottom-i.top+1},offset:{x:-i.left+o+(r||n?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-i.top+o+(r||n?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}},fm=class{constructor(e,t,i){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],i)for(let s of i)this._glyphs.push(...s.glyphs),this._usedPixels+=s._usedPixels;this.canvas=ax(e,t,t),this.ctx=Ze(this.canvas.getContext("2d",{alpha:!0}))}get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(e){this._glyphs.push(e),this._usedPixels+=e.size.x*e.size.y}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}};function pm(e,t,i,s){let r=t.rgba>>>24,n=t.rgba>>>16&255,o=t.rgba>>>8&255,a=i.rgba>>>24,l=i.rgba>>>16&255,c=i.rgba>>>8&255,h=Math.floor((Math.abs(r-a)+Math.abs(n-l)+Math.abs(o-c))/12),u=!0;for(let d=0;d<e.data.length;d+=4)e.data[d]===r&&e.data[d+1]===n&&e.data[d+2]===o||s&&Math.abs(e.data[d]-r)+Math.abs(e.data[d+1]-n)+Math.abs(e.data[d+2]-o)<h?e.data[d+3]=0:u=!1;return u}function RM(e){for(let t=0;t<e.data.length;t+=4)if(e.data[t+3]>0)return!1;return!0}function ax(e,t,i){let s=e.createElement("canvas");return s.width=t,s.height=i,s}function LM(e,t,i,s,r,n,o,a){let l={foreground:n.foreground,background:n.background,cursor:zi,cursorAccent:zi,selectionForeground:zi,selectionBackgroundTransparent:zi,selectionBackgroundOpaque:zi,selectionInactiveBackgroundTransparent:zi,selectionInactiveBackgroundOpaque:zi,overviewRulerBorder:zi,scrollbarSliderBackground:zi,scrollbarSliderHoverBackground:zi,scrollbarSliderActiveBackground:zi,ansi:n.ansi.slice(),contrastCache:n.contrastCache,halfContrastCache:n.halfContrastCache};return{customGlyphs:r.customGlyphs,devicePixelRatio:o,deviceMaxTextureSize:a,letterSpacing:r.letterSpacing,lineHeight:r.lineHeight,deviceCellWidth:e,deviceCellHeight:t,deviceCharWidth:i,deviceCharHeight:s,fontFamily:r.fontFamily,fontSize:r.fontSize,fontWeight:r.fontWeight,fontWeightBold:r.fontWeightBold,allowTransparency:r.allowTransparency,drawBoldTextInBrightColors:r.drawBoldTextInBrightColors,minimumContrastRatio:r.minimumContrastRatio,colors:l}}function gk(e,t){for(let i=0;i<e.colors.ansi.length;i++)if(e.colors.ansi[i].rgba!==t.colors.ansi[i].rgba)return!1;return e.devicePixelRatio===t.devicePixelRatio&&e.customGlyphs===t.customGlyphs&&e.lineHeight===t.lineHeight&&e.letterSpacing===t.letterSpacing&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontWeight===t.fontWeight&&e.fontWeightBold===t.fontWeightBold&&e.allowTransparency===t.allowTransparency&&e.deviceCharWidth===t.deviceCharWidth&&e.deviceCharHeight===t.deviceCharHeight&&e.drawBoldTextInBrightColors===t.drawBoldTextInBrightColors&&e.minimumContrastRatio===t.minimumContrastRatio&&e.colors.foreground.rgba===t.colors.foreground.rgba&&e.colors.background.rgba===t.colors.background.rgba}function DM(e){return(e&50331648)===16777216||(e&50331648)===33554432}var Ui=[];function lx(e,t,i,s,r,n,o,a,l){let c=LM(s,r,n,o,t,i,a,l);for(let d=0;d<Ui.length;d++){let f=Ui[d],g=f.ownedBy.indexOf(e);if(g>=0){if(gk(f.config,c))return f.atlas;f.ownedBy.length===1?(f.atlas.dispose(),Ui.splice(d,1)):f.ownedBy.splice(g,1);break}}for(let d=0;d<Ui.length;d++){let f=Ui[d];if(gk(f.config,c))return f.ownedBy.push(e),f.atlas}let h=e._core,u={atlas:new $r(document,c,h.unicodeService),config:c,ownedBy:[e]};return Ui.push(u),u.atlas}function mk(e){for(let t=0;t<Ui.length;t++){let i=Ui[t].ownedBy.indexOf(e);if(i!==-1){Ui[t].ownedBy.length===1?(Ui[t].atlas.dispose(),Ui.splice(t,1)):Ui[t].ownedBy.splice(i,1);break}}}var cu=600,NM=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(e=cu){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){let t=cu-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,t>0){this._restartInterval(t);return}}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){let t=cu-(Date.now()-this._animationTimeRestarted);this._animationTimeRestarted=void 0,this._restartInterval(t);return}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},cu)},e)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}};function _k(e,t,i){let s=new t.ResizeObserver(r=>{let n=r.find(l=>l.target===e);if(!n)return;if(!("devicePixelContentBoxSize"in n)){s?.disconnect(),s=void 0;return}let o=n.devicePixelContentBoxSize[0].inlineSize,a=n.devicePixelContentBoxSize[0].blockSize;o>0&&a>0&&i(o,a)});try{s.observe(e,{box:["device-pixel-content-box"]})}catch{s.disconnect(),s=void 0}return Mt(()=>s?.disconnect())}function BM(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}var vk=class cx extends Fo{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new tx,this.combinedData=""}static fromCharData(t){let i=new cx;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?BM(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let r=t[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(s-55296)*1024+r-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},hx=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]);function ux(e,t,i){let s=Ze(e.createProgram());if(e.attachShader(s,Ze(yk(e,e.VERTEX_SHADER,t))),e.attachShader(s,Ze(yk(e,e.FRAGMENT_SHADER,i))),e.linkProgram(s),e.getProgramParameter(s,e.LINK_STATUS))return s;console.error(e.getProgramInfoLog(s)),e.deleteProgram(s)}function yk(e,t,i){let s=Ze(e.createShader(t));if(e.shaderSource(s,i),e.compileShader(s),e.getShaderParameter(s,e.COMPILE_STATUS))return s;console.error(e.getShaderInfoLog(s)),e.deleteShader(s)}function OM(e,t){let i=Math.min(e.length*2,t),s=new Float32Array(i);for(let r=0;r<e.length;r++)s[r]=e[r];return s}var zM=class{constructor(e){this.texture=e,this.version=-1}},HM=`#version 300 es
|
|
97
|
+
`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(a);fu.register(o,l?.[2]??a,o)}return o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let s=this._deliveryQueue.current===this;if(this._size*TM<=t.length){let r=0;for(let n=0;n<t.length;n++)t[n]?t[r++]=t[n]:s&&(this._deliveryQueue.end--,r<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=r}}_deliver(e,t){if(!e)return;let i=this._options?.onListenerError||uu;if(!i){e.value(t);return}try{e.value(t)}catch(s){i(s)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof du)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},MM=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},pk={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}},xl=2,Cl,$r=class Io{constructor(t,i,s){this._document=t,this._config=i,this._unicodeService=s,this._didWarmUp=!1,this._cacheMap=new hk,this._cacheMapCombined=new hk,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new Fo,this._textureSize=512,this._onAddTextureAtlasCanvas=new ke,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new ke,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=ax(t,this._config.deviceCellWidth*4+xl*2,this._config.deviceCellHeight+xl*2),this._tmpCtx=Ze(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){this._tmpCanvas.remove();for(let t of this.pages)t.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){let t=new _M;for(let i=33;i<126;i++)t.enqueue(()=>{if(!this._cacheMap.get(i,0,0,0)){let s=this._drawToCache(i,0,0,0,!1,void 0);this._cacheMap.set(i,0,0,0,s)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(!(this._pages[0].currentRow.x===0&&this._pages[0].currentRow.y===0)){for(let t of this._pages)t.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(Io.maxAtlasPages&&this._pages.length>=Math.max(4,Io.maxAtlasPages)){let i=this._pages.filter(c=>c.canvas.width*2<=(Io.maxTextureSize||4096)).sort((c,h)=>h.canvas.width!==c.canvas.width?h.canvas.width-c.canvas.width:h.percentageUsed-c.percentageUsed),s=-1,r=0;for(let c=0;c<i.length;c++)if(i[c].canvas.width!==r)s=c,r=i[c].canvas.width;else if(c-s===3)break;let n=i.slice(s,s+4),o=n.map(c=>c.glyphs[0].texturePage).sort((c,h)=>c>h?1:-1),a=this.pages.length-n.length,l=this._mergePages(n,a);l.version++;for(let c=o.length-1;c>=0;c--)this._deletePage(o[c]);this.pages.push(l),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(l.canvas)}let t=new fm(this._document,this._textureSize);return this._pages.push(t),this._activePages.push(t),this._onAddTextureAtlasCanvas.fire(t.canvas),t}_mergePages(t,i){let s=t[0].canvas.width*2,r=new fm(this._document,s,t);for(let[n,o]of t.entries()){let a=n*o.canvas.width%s,l=Math.floor(n/2)*o.canvas.height;r.ctx.drawImage(o.canvas,a,l);for(let h of o.glyphs)h.texturePage=i,h.sizeClipSpace.x=h.size.x/s,h.sizeClipSpace.y=h.size.y/s,h.texturePosition.x+=a,h.texturePosition.y+=l,h.texturePositionClipSpace.x=h.texturePosition.x/s,h.texturePositionClipSpace.y=h.texturePosition.y/s;this._onRemoveTextureAtlasCanvas.fire(o.canvas);let c=this._activePages.indexOf(o);c!==-1&&this._activePages.splice(c,1)}return r}_deletePage(t){this._pages.splice(t,1);for(let i=t;i<this._pages.length;i++){let s=this._pages[i];for(let r of s.glyphs)r.texturePage--;s.version++}}getRasterizedGlyphCombinedChar(t,i,s,r,n,o){return this._getFromCacheMap(this._cacheMapCombined,t,i,s,r,n,o)}getRasterizedGlyph(t,i,s,r,n,o){return this._getFromCacheMap(this._cacheMap,t,i,s,r,n,o)}_getFromCacheMap(t,i,s,r,n,o,a){return Cl=t.get(i,s,r,n),Cl||(Cl=this._drawToCache(i,s,r,n,o,a),t.set(i,s,r,n,Cl)),Cl}_getColorFromAnsiIndex(t){if(t>=this._config.colors.ansi.length)throw new Error("No color found for idx "+t);return this._config.colors.ansi[t]}_getBackgroundColor(t,i,s,r){if(this._config.allowTransparency)return zi;let n;switch(t){case 16777216:case 33554432:n=this._getColorFromAnsiIndex(i);break;case 50331648:let o=Fo.toColorRGB(i);n=Vt.toColor(o[0],o[1],o[2]);break;default:s?n=Al.opaque(this._config.colors.foreground):n=this._config.colors.background;break}return this._config.allowTransparency||(n=Al.opaque(n)),n}_getForegroundColor(t,i,s,r,n,o,a,l,c,h){let u=this._getMinimumContrastColor(t,i,s,r,n,o,a,c,l,h);if(u)return u;let d;switch(n){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&c&&o<8&&(o+=8),d=this._getColorFromAnsiIndex(o);break;case 50331648:let f=Fo.toColorRGB(o);d=Vt.toColor(f[0],f[1],f[2]);break;default:a?d=this._config.colors.background:d=this._config.colors.foreground}return this._config.allowTransparency&&(d=Al.opaque(d)),l&&(d=Al.multiplyOpacity(d,oM)),d}_resolveBackgroundRgba(t,i,s){switch(t){case 16777216:case 33554432:return this._getColorFromAnsiIndex(i).rgba;case 50331648:return i<<8;default:return s?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(t,i,s,r){switch(t){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&r&&i<8&&(i+=8),this._getColorFromAnsiIndex(i).rgba;case 50331648:return i<<8;default:return s?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(t,i,s,r,n,o,a,l,c,h){if(this._config.minimumContrastRatio===1||h)return;let u=this._getContrastCache(c),d=u.getColor(t,r);if(d!==void 0)return d||void 0;let f=this._resolveBackgroundRgba(i,s,a),g=this._resolveForegroundRgba(n,o,a,l),b=Rn.ensureContrastRatio(f,g,this._config.minimumContrastRatio/(c?2:1));if(!b){u.setColor(t,r,null);return}let T=Vt.toColor(b>>24&255,b>>16&255,b>>8&255);return u.setColor(t,r,T),T}_getContrastCache(t){return t?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(t,i,s,r,n,o){let a=typeof t=="number"?String.fromCharCode(t):t;o&&this._tmpCanvas.parentElement!==o&&(this._tmpCanvas.style.display="none",o.append(this._tmpCanvas));let l=Math.min(this._config.deviceCellWidth*Math.max(a.length,2)+xl*2,this._config.deviceMaxTextureSize);this._tmpCanvas.width<l&&(this._tmpCanvas.width=l);let c=Math.min(this._config.deviceCellHeight+xl*4,this._textureSize);if(this._tmpCanvas.height<c&&(this._tmpCanvas.height=c),this._tmpCtx.save(),this._workAttributeData.fg=s,this._workAttributeData.bg=i,this._workAttributeData.extended.ext=r,!!this._workAttributeData.isInvisible())return pk;let h=!!this._workAttributeData.isBold(),u=!!this._workAttributeData.isInverse(),d=!!this._workAttributeData.isDim(),f=!!this._workAttributeData.isItalic(),g=!!this._workAttributeData.isUnderline(),b=!!this._workAttributeData.isStrikethrough(),T=!!this._workAttributeData.isOverline(),_=this._workAttributeData.getFgColor(),m=this._workAttributeData.getFgColorMode(),v=this._workAttributeData.getBgColor(),p=this._workAttributeData.getBgColorMode();if(u){let N=_;_=v,v=N;let I=m;m=p,p=I}let E=this._getBackgroundColor(p,v,u,d);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";let A=h?this._config.fontWeightBold:this._config.fontWeight,L=f?"italic":"";this._tmpCtx.font=`${L} ${A} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=Xk;let B=a.length===1&&Pm(a.charCodeAt(0)),W=a.length===1&&QA(a.charCodeAt(0)),$=this._getForegroundColor(i,p,v,s,m,_,u,d,h,Yk(a.charCodeAt(0)));this._tmpCtx.fillStyle=$.css;let P=W?0:xl*2,Rt=!1;this._config.customGlyphs!==!1&&(Rt=hM(this._tmpCtx,a,P,P,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let S=!B,y;if(typeof t=="number"?y=this._unicodeService.wcwidth(t):y=this._unicodeService.getStringCellWidth(t),g){this._tmpCtx.save();let N=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),I=N%2===1?.5:0;if(this._tmpCtx.lineWidth=N,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())S=!1,this._tmpCtx.strokeStyle=`rgb(${Fo.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{S=!1;let Re=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Re<8&&(Re+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Re).css}this._tmpCtx.beginPath();let ie=P,Z=Math.ceil(P+this._config.deviceCharHeight)-I-(n?N*2:0),se=Z+N,We=Z+N*2,ne=this._workAttributeData.getUnderlineVariantOffset();for(let Re=0;Re<y;Re++){this._tmpCtx.save();let he=ie+Re*this._config.deviceCellWidth,Oe=ie+(Re+1)*this._config.deviceCellWidth,er=he+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(he,Z),this._tmpCtx.lineTo(Oe,Z),this._tmpCtx.moveTo(he,We),this._tmpCtx.lineTo(Oe,We);break;case 3:let Gi=N<=1?We:Math.ceil(P+this._config.deviceCharHeight-N/2)-I,si=N<=1?Z:Math.ceil(P+this._config.deviceCharHeight+N/2)-I,oe=new Path2D;oe.rect(he,Z,this._config.deviceCellWidth,We-Z),this._tmpCtx.clip(oe),this._tmpCtx.moveTo(he-this._config.deviceCellWidth/2,se),this._tmpCtx.bezierCurveTo(he-this._config.deviceCellWidth/2,si,he,si,he,se),this._tmpCtx.bezierCurveTo(he,Gi,er,Gi,er,se),this._tmpCtx.bezierCurveTo(er,si,Oe,si,Oe,se),this._tmpCtx.bezierCurveTo(Oe,Gi,Oe+this._config.deviceCellWidth/2,Gi,Oe+this._config.deviceCellWidth/2,se);break;case 4:let tr=ne===0?0:ne>=N?N*2-ne:N-ne;ne>=N||tr===0?(this._tmpCtx.setLineDash([Math.round(N),Math.round(N)]),this._tmpCtx.moveTo(he+tr,Z),this._tmpCtx.lineTo(Oe,Z)):(this._tmpCtx.setLineDash([Math.round(N),Math.round(N)]),this._tmpCtx.moveTo(he,Z),this._tmpCtx.lineTo(he+tr,Z),this._tmpCtx.moveTo(he+tr+N,Z),this._tmpCtx.lineTo(Oe,Z)),ne=rM(Oe-he,N,ne);break;case 5:let R2=.6,L2=.3,Ou=Oe-he,c_=Math.floor(R2*Ou),h_=Math.floor(L2*Ou),D2=Ou-c_-h_;this._tmpCtx.setLineDash([c_,h_,D2]),this._tmpCtx.moveTo(he,Z),this._tmpCtx.lineTo(Oe,Z);break;default:this._tmpCtx.moveTo(he,Z),this._tmpCtx.lineTo(Oe,Z);break}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Rt&&this._config.fontSize>=12&&!this._config.allowTransparency&&a!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";let Re=this._tmpCtx.measureText(a);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Re&&Re.actualBoundingBoxDescent>0){this._tmpCtx.save();let he=new Path2D;he.rect(ie,Z-Math.ceil(N/2),this._config.deviceCellWidth*y,We-Z+Math.ceil(N/2)),this._tmpCtx.clip(he),this._tmpCtx.lineWidth=this._config.devicePixelRatio*3,this._tmpCtx.strokeStyle=E.css,this._tmpCtx.strokeText(a,P,P+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(T){let N=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),I=N%2===1?.5:0;this._tmpCtx.lineWidth=N,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+I),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*y,P+I),this._tmpCtx.stroke()}if(Rt||this._tmpCtx.fillText(a,P,P+this._config.deviceCharHeight),a==="_"&&!this._config.allowTransparency){let N=pm(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),E,$,S);if(N)for(let I=1;I<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(a,P,P+this._config.deviceCharHeight-I),N=pm(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),E,$,S),!!N);I++);}if(b){let N=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),I=this._tmpCtx.lineWidth%2===1?.5:0;this._tmpCtx.lineWidth=N,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+Math.floor(this._config.deviceCharHeight/2)-I),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*y,P+Math.floor(this._config.deviceCharHeight/2)-I),this._tmpCtx.stroke()}this._tmpCtx.restore();let k=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height),w;if(this._config.allowTransparency?w=RM(k):w=pm(k,E,$,S),w)return pk;let C=this._findGlyphBoundingBox(k,this._workBoundingBox,l,W,Rt,P),x,M;for(;;){if(this._activePages.length===0){let N=this._createNewPage();x=N,M=N.currentRow,M.height=C.size.y;break}x=this._activePages[this._activePages.length-1],M=x.currentRow;for(let N of this._activePages)C.size.y<=N.currentRow.height&&(x=N,M=N.currentRow);for(let N=this._activePages.length-1;N>=0;N--)for(let I of this._activePages[N].fixedRows)I.height<=M.height&&C.size.y<=I.height&&(x=this._activePages[N],M=I);if(C.size.x>this._textureSize){this._overflowSizePage||(this._overflowSizePage=new fm(this._document,this._config.deviceMaxTextureSize),this.pages.push(this._overflowSizePage),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(this._overflowSizePage.canvas)),x=this._overflowSizePage,M=this._overflowSizePage.currentRow,M.x+C.size.x>=x.canvas.width&&(M.x=0,M.y+=M.height,M.height=0);break}if(M.y+C.size.y>=x.canvas.height||M.height>C.size.y+2){let N=!1;if(x.currentRow.y+x.currentRow.height+C.size.y>=x.canvas.height){let I;for(let ie of this._activePages)if(ie.currentRow.y+ie.currentRow.height+C.size.y<ie.canvas.height){I=ie;break}if(I)x=I;else if(Io.maxAtlasPages&&this._pages.length>=Io.maxAtlasPages&&M.y+C.size.y<=x.canvas.height&&M.height>=C.size.y&&M.x+C.size.x<=x.canvas.width)N=!0;else{let ie=this._createNewPage();x=ie,M=ie.currentRow,M.height=C.size.y,N=!0}}N||(x.currentRow.height>0&&x.fixedRows.push(x.currentRow),M={x:0,y:x.currentRow.y+x.currentRow.height,height:C.size.y},x.fixedRows.push(M),x.currentRow={x:0,y:M.y+M.height,height:0})}if(M.x+C.size.x<=x.canvas.width)break;M===x.currentRow?(M.x=0,M.y+=M.height,M.height=0):x.fixedRows.splice(x.fixedRows.indexOf(M),1)}return C.texturePage=this._pages.indexOf(x),C.texturePosition.x=M.x,C.texturePosition.y=M.y,C.texturePositionClipSpace.x=M.x/x.canvas.width,C.texturePositionClipSpace.y=M.y/x.canvas.height,C.sizeClipSpace.x/=x.canvas.width,C.sizeClipSpace.y/=x.canvas.height,M.height=Math.max(M.height,C.size.y),M.x+=C.size.x,x.ctx.putImageData(k,C.texturePosition.x-this._workBoundingBox.left,C.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,C.size.x,C.size.y),x.addGlyph(C),x.version++,C}_findGlyphBoundingBox(t,i,s,r,n,o){i.top=0;let a=r?this._config.deviceCellHeight:this._tmpCanvas.height,l=r?this._config.deviceCellWidth:s,c=!1;for(let h=0;h<a;h++){for(let u=0;u<l;u++){let d=h*this._tmpCanvas.width*4+u*4+3;if(t.data[d]!==0){i.top=h,c=!0;break}}if(c)break}i.left=0,c=!1;for(let h=0;h<o+l;h++){for(let u=0;u<a;u++){let d=u*this._tmpCanvas.width*4+h*4+3;if(t.data[d]!==0){i.left=h,c=!0;break}}if(c)break}i.right=l,c=!1;for(let h=o+l-1;h>=o;h--){for(let u=0;u<a;u++){let d=u*this._tmpCanvas.width*4+h*4+3;if(t.data[d]!==0){i.right=h,c=!0;break}}if(c)break}i.bottom=a,c=!1;for(let h=a-1;h>=0;h--){for(let u=0;u<l;u++){let d=h*this._tmpCanvas.width*4+u*4+3;if(t.data[d]!==0){i.bottom=h,c=!0;break}}if(c)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:i.right-i.left+1,y:i.bottom-i.top+1},sizeClipSpace:{x:i.right-i.left+1,y:i.bottom-i.top+1},offset:{x:-i.left+o+(r||n?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-i.top+o+(r||n?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}},fm=class{constructor(e,t,i){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],i)for(let s of i)this._glyphs.push(...s.glyphs),this._usedPixels+=s._usedPixels;this.canvas=ax(e,t,t),this.ctx=Ze(this.canvas.getContext("2d",{alpha:!0}))}get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(e){this._glyphs.push(e),this._usedPixels+=e.size.x*e.size.y}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}};function pm(e,t,i,s){let r=t.rgba>>>24,n=t.rgba>>>16&255,o=t.rgba>>>8&255,a=i.rgba>>>24,l=i.rgba>>>16&255,c=i.rgba>>>8&255,h=Math.floor((Math.abs(r-a)+Math.abs(n-l)+Math.abs(o-c))/12),u=!0;for(let d=0;d<e.data.length;d+=4)e.data[d]===r&&e.data[d+1]===n&&e.data[d+2]===o||s&&Math.abs(e.data[d]-r)+Math.abs(e.data[d+1]-n)+Math.abs(e.data[d+2]-o)<h?e.data[d+3]=0:u=!1;return u}function RM(e){for(let t=0;t<e.data.length;t+=4)if(e.data[t+3]>0)return!1;return!0}function ax(e,t,i){let s=e.createElement("canvas");return s.width=t,s.height=i,s}function LM(e,t,i,s,r,n,o,a){let l={foreground:n.foreground,background:n.background,cursor:zi,cursorAccent:zi,selectionForeground:zi,selectionBackgroundTransparent:zi,selectionBackgroundOpaque:zi,selectionInactiveBackgroundTransparent:zi,selectionInactiveBackgroundOpaque:zi,overviewRulerBorder:zi,scrollbarSliderBackground:zi,scrollbarSliderHoverBackground:zi,scrollbarSliderActiveBackground:zi,ansi:n.ansi.slice(),contrastCache:n.contrastCache,halfContrastCache:n.halfContrastCache};return{customGlyphs:r.customGlyphs,devicePixelRatio:o,deviceMaxTextureSize:a,letterSpacing:r.letterSpacing,lineHeight:r.lineHeight,deviceCellWidth:e,deviceCellHeight:t,deviceCharWidth:i,deviceCharHeight:s,fontFamily:r.fontFamily,fontSize:r.fontSize,fontWeight:r.fontWeight,fontWeightBold:r.fontWeightBold,allowTransparency:r.allowTransparency,drawBoldTextInBrightColors:r.drawBoldTextInBrightColors,minimumContrastRatio:r.minimumContrastRatio,colors:l}}function gk(e,t){for(let i=0;i<e.colors.ansi.length;i++)if(e.colors.ansi[i].rgba!==t.colors.ansi[i].rgba)return!1;return e.devicePixelRatio===t.devicePixelRatio&&e.customGlyphs===t.customGlyphs&&e.lineHeight===t.lineHeight&&e.letterSpacing===t.letterSpacing&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontWeight===t.fontWeight&&e.fontWeightBold===t.fontWeightBold&&e.allowTransparency===t.allowTransparency&&e.deviceCharWidth===t.deviceCharWidth&&e.deviceCharHeight===t.deviceCharHeight&&e.drawBoldTextInBrightColors===t.drawBoldTextInBrightColors&&e.minimumContrastRatio===t.minimumContrastRatio&&e.colors.foreground.rgba===t.colors.foreground.rgba&&e.colors.background.rgba===t.colors.background.rgba}function DM(e){return(e&50331648)===16777216||(e&50331648)===33554432}var Ui=[];function lx(e,t,i,s,r,n,o,a,l){let c=LM(s,r,n,o,t,i,a,l);for(let d=0;d<Ui.length;d++){let f=Ui[d],g=f.ownedBy.indexOf(e);if(g>=0){if(gk(f.config,c))return f.atlas;f.ownedBy.length===1?(f.atlas.dispose(),Ui.splice(d,1)):f.ownedBy.splice(g,1);break}}for(let d=0;d<Ui.length;d++){let f=Ui[d];if(gk(f.config,c))return f.ownedBy.push(e),f.atlas}let h=e._core,u={atlas:new $r(document,c,h.unicodeService),config:c,ownedBy:[e]};return Ui.push(u),u.atlas}function mk(e){for(let t=0;t<Ui.length;t++){let i=Ui[t].ownedBy.indexOf(e);if(i!==-1){Ui[t].ownedBy.length===1?(Ui[t].atlas.dispose(),Ui.splice(t,1)):Ui[t].ownedBy.splice(i,1);break}}}var cu=600,NM=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(e=cu){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){let t=cu-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,t>0){this._restartInterval(t);return}}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){let t=cu-(Date.now()-this._animationTimeRestarted);this._animationTimeRestarted=void 0,this._restartInterval(t);return}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},cu)},e)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}};function _k(e,t,i){let s=new t.ResizeObserver(r=>{let n=r.find(l=>l.target===e);if(!n)return;if(!("devicePixelContentBoxSize"in n)){s?.disconnect(),s=void 0;return}let o=n.devicePixelContentBoxSize[0].inlineSize,a=n.devicePixelContentBoxSize[0].blockSize;o>0&&a>0&&i(o,a)});try{s.observe(e,{box:["device-pixel-content-box"]})}catch{s.disconnect(),s=void 0}return Mt(()=>s?.disconnect())}function BM(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}var vk=class cx extends Fo{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new tx,this.combinedData=""}static fromCharData(t){let i=new cx;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?BM(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let r=t[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(s-55296)*1024+r-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},hx=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]);function ux(e,t,i){let s=Ze(e.createProgram());if(e.attachShader(s,Ze(yk(e,e.VERTEX_SHADER,t))),e.attachShader(s,Ze(yk(e,e.FRAGMENT_SHADER,i))),e.linkProgram(s),e.getProgramParameter(s,e.LINK_STATUS))return s;console.error(e.getProgramInfoLog(s)),e.deleteProgram(s)}function yk(e,t,i){let s=Ze(e.createShader(t));if(e.shaderSource(s,i),e.compileShader(s),e.getShaderParameter(s,e.COMPILE_STATUS))return s;console.error(e.getShaderInfoLog(s)),e.deleteShader(s)}function OM(e,t){let i=Math.min(e.length*2,t),s=new Float32Array(i);for(let r=0;r<e.length;r++)s[r]=e[r];return s}var zM=class{constructor(e){this.texture=e,this.version=-1}},HM=`#version 300 es
|
|
98
98
|
layout (location = 0) in vec2 a_unitquad;
|
|
99
99
|
layout (location = 1) in vec2 a_cellpos;
|
|
100
100
|
layout (location = 2) in vec2 a_offset;
|
|
@@ -151,10 +151,10 @@ out vec4 outColor;
|
|
|
151
151
|
|
|
152
152
|
void main() {
|
|
153
153
|
outColor = v_color;
|
|
154
|
-
}`,Gs=8,_m=Gs*Float32Array.BYTES_PER_ELEMENT,jM=20*Gs,bk=class{constructor(){this.attributes=new Float32Array(jM),this.count=0}},Vs=0,wk=0,Sk=0,kk=0,xk=0,Ck=0,Ek=0,GM=class extends wi{constructor(e,t,i,s){super(),this._terminal=e,this._gl=t,this._dimensions=i,this._themeService=s,this._vertices=new bk,this._verticesCursor=new bk;let r=this._gl;this._program=Ze(ux(r,WM,VM)),this._register(Mt(()=>r.deleteProgram(this._program))),this._projectionLocation=Ze(r.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=r.createVertexArray(),r.bindVertexArray(this._vertexArrayObject);let n=new Float32Array([0,0,1,0,0,1,1,1]),o=r.createBuffer();this._register(Mt(()=>r.deleteBuffer(o))),r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,n,r.STATIC_DRAW),r.enableVertexAttribArray(3),r.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let a=new Uint8Array([0,1,2,3]),l=r.createBuffer();this._register(Mt(()=>r.deleteBuffer(l))),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,l),r.bufferData(r.ELEMENT_ARRAY_BUFFER,a,r.STATIC_DRAW),this._attributesBuffer=Ze(r.createBuffer()),this._register(Mt(()=>r.deleteBuffer(this._attributesBuffer))),r.bindBuffer(r.ARRAY_BUFFER,this._attributesBuffer),r.enableVertexAttribArray(0),r.vertexAttribPointer(0,2,r.FLOAT,!1,_m,0),r.vertexAttribDivisor(0,1),r.enableVertexAttribArray(1),r.vertexAttribPointer(1,2,r.FLOAT,!1,_m,2*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(1,1),r.enableVertexAttribArray(2),r.vertexAttribPointer(2,4,r.FLOAT,!1,_m,4*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(2,1),this._updateCachedColors(s.colors),this._register(this._themeService.onChangeColors(c=>{this._updateCachedColors(c),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,hx),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,i=this._vertices,s=1,r,n,o,a,l,c,h,u,d,f,g;for(r=0;r<t.rows;r++){for(o=-1,a=0,l=0,c=!1,n=0;n<t.cols;n++)h=(r*t.cols+n)*bu,u=e.cells[h+pu],d=e.cells[h+gu],f=!!(d&67108864),(u!==a||d!==l&&(c||f))&&((a!==0||c&&l!==0)&&(g=s++*Gs,this._updateRectangle(i,g,l,a,o,n,r)),o=n,a=u,l=d,c=f);(a!==0||c&&l!==0)&&(g=s++*Gs,this._updateRectangle(i,g,l,a,o,t.cols,r))}i.count=s}updateCursor(e){let t=this._verticesCursor,i=e.cursor;if(!i||i.style==="block"){t.count=0;return}let s,r=0;(i.style==="bar"||i.style==="outline")&&(s=r++*Gs,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.style==="bar"?i.dpr*i.cursorWidth:i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(i.style==="underline"||i.style==="outline")&&(s=r++*Gs,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,(i.y+1)*this._dimensions.device.cell.height-i.dpr,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat)),i.style==="outline"&&(s=r++*Gs,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat),s=r++*Gs,this._addRectangleFloat(t.attributes,s,(i.x+i.width)*this._dimensions.device.cell.width-i.dpr,i.y*this._dimensions.device.cell.height,i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=r}_updateRectangle(e,t,i,s,r,n,o){if(i&67108864)switch(i&50331648){case 16777216:case 33554432:Vs=this._themeService.colors.ansi[i&255].rgba;break;case 50331648:Vs=(i&16777215)<<8;break;default:Vs=this._themeService.colors.foreground.rgba}else switch(s&50331648){case 16777216:case 33554432:Vs=this._themeService.colors.ansi[s&255].rgba;break;case 50331648:Vs=(s&16777215)<<8;break;default:Vs=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=OM(e.attributes,this._terminal.rows*this._terminal.cols*Gs)),wk=r*this._dimensions.device.cell.width,Sk=o*this._dimensions.device.cell.height,kk=(Vs>>24&255)/255,xk=(Vs>>16&255)/255,Ck=(Vs>>8&255)/255,Ek=1,this._addRectangle(e.attributes,t,wk,Sk,(n-r)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,kk,xk,Ck,Ek)}_addRectangle(e,t,i,s,r,n,o,a,l,c){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=a,e[t+6]=l,e[t+7]=c}_addRectangleFloat(e,t,i,s,r,n,o){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(e.rgba&255)/255])}},YM=class extends wi{constructor(e,t,i,s,r,n,o,a){super(),this._container=t,this._alpha=r,this._coreBrowserService=n,this._optionsService=o,this._themeService=a,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${i}-layer`),this._canvas.style.zIndex=s.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(l=>{this._refreshCharAtlas(e,l),this.reset(e)})),this._register(Mt(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=Ze(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,i){}handleSelectionChanged(e,t,i,s=!1){}_setTransparency(e,t){if(t===this._alpha)return;let i=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=lx(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,i=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,i*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,i,s){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight))}_fillCharTrueColor(e,t,i,s){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=Xk,this._clipCell(i,s,t.getWidth()),this._ctx.fillText(t.getChars(),i*this._deviceCellWidth+this._deviceCharLeft,s*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,i){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,i){let s=t?e.options.fontWeightBold:e.options.fontWeight;return`${i?"italic":""} ${s} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},XM=class extends YM{constructor(e,t,i,s,r,n,o){super(i,e,"link",t,!0,r,n,o),this._register(s.onShowLinkUnderline(a=>this._handleShowLinkUnderline(a))),this._register(s.onHideLinkUnderline(a=>this._handleHideLinkUnderline(a)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){if(e.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:e.fg!==void 0&&DM(e.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},Vi=typeof window=="object"?window:globalThis,Nm=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new ke,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new ke,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,i){if(this.getZoomLevel(i)===t)return;let s=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(s,t),this._onDidChangeZoomLevel.fire(s)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),t)}setFullscreen(t,i){if(this.isFullscreen(i)===t)return;let s=this.getWindowId(i);this.mapWindowIdToFullScreen.set(s,t),this._onDidChangeFullscreen.fire(s)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};Nm.INSTANCE=new Nm;var dx=Nm;function ZM(e,t,i){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",i)}var jD=dx.INSTANCE.onDidChangeZoomLevel,GD=dx.INSTANCE.onDidChangeFullscreen,Vo=typeof navigator=="object"?navigator.userAgent:"",YD=Vo.indexOf("Firefox")>=0,vm=Vo.indexOf("AppleWebKit")>=0,QM=Vo.indexOf("Chrome")>=0,JM=!QM&&Vo.indexOf("Safari")>=0,XD=Vo.indexOf("Electron/")>=0,ZD=Vo.indexOf("Android")>=0,mu=!1;if(typeof Vi.matchMedia=="function"){let e=Vi.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=Vi.matchMedia("(display-mode: fullscreen)");mu=e.matches,ZM(Vi,e,({matches:i})=>{mu&&t.matches||(mu=i)})}function eR(){return mu}var $o="en",Bm=!1,Om=!1,_u=!1,tR=!1,fx=!1,px=!1,iR=!1,sR=!1,rR=!1,nR=!1,hu,vu=$o,Tk=$o,oR,js,Zs=globalThis,bi;typeof Zs.vscode<"u"&&typeof Zs.vscode.process<"u"?bi=Zs.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(bi=process);var gx=typeof bi?.versions?.electron=="string",aR=gx&&bi?.type==="renderer";if(typeof bi=="object"){Bm=bi.platform==="win32",Om=bi.platform==="darwin",_u=bi.platform==="linux",tR=_u&&!!bi.env.SNAP&&!!bi.env.SNAP_REVISION,iR=gx,rR=!!bi.env.CI||!!bi.env.BUILD_ARTIFACTSTAGINGDIRECTORY,hu=$o,vu=$o;let e=bi.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);hu=t.userLocale,Tk=t.osLocale,vu=t.resolvedLanguage||$o,oR=t.languagePack?.translationsConfigFile}catch{}fx=!0}else typeof navigator=="object"&&!aR?(js=navigator.userAgent,Bm=js.indexOf("Windows")>=0,Om=js.indexOf("Macintosh")>=0,sR=(js.indexOf("Macintosh")>=0||js.indexOf("iPad")>=0||js.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_u=js.indexOf("Linux")>=0,nR=js?.indexOf("Mobi")>=0,px=!0,vu=globalThis._VSCODE_NLS_LANGUAGE||$o,hu=navigator.language.toLowerCase(),Tk=hu):console.error("Unable to resolve platform.");var ym=0;Om?ym=1:Bm?ym=3:_u&&(ym=2);var bm=fx,lR=px&&typeof Zs.importScripts=="function",QD=lR?Zs.origin:void 0,_s=js,Ir=vu,cR;(e=>{function t(){return Ir}e.value=t;function i(){return Ir.length===2?Ir==="en":Ir.length>=3?Ir[0]==="e"&&Ir[1]==="n"&&Ir[2]==="-":!1}e.isDefaultVariant=i;function s(){return Ir==="en"}e.isDefault=s})(cR||={});var hR=typeof Zs.postMessage=="function"&&!Zs.importScripts,uR=(()=>{if(hR){let e=[];Zs.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let s=0,r=e.length;s<r;s++){let n=e[s];if(n.id===i.data.vscodeScheduleAsyncWork){e.splice(s,1),n.callback();return}}});let t=0;return i=>{let s=++t;e.push({id:s,callback:i}),Zs.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})(),dR=!!(_s&&_s.indexOf("Chrome")>=0),JD=!!(_s&&_s.indexOf("Firefox")>=0),eN=!!(!dR&&_s&&_s.indexOf("Safari")>=0),tN=!!(_s&&_s.indexOf("Edg/")>=0),iN=!!(_s&&_s.indexOf("Android")>=0),Fr=typeof navigator=="object"?navigator:{},sN={clipboard:{writeText:bm||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(Fr&&Fr.clipboard&&Fr.clipboard.writeText),readText:bm||!!(Fr&&Fr.clipboard&&Fr.clipboard.readText)},keyboard:bm||eR()?0:Fr.keyboard||JM?1:2,touch:"ontouchstart"in Vi||Fr.maxTouchPoints>0,pointerEvents:Vi.PointerEvent&&("ontouchstart"in Vi||navigator.maxTouchPoints>0)},qm=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},wm=new qm,Ak=new qm,Mk=new qm,rN=new Array(230),fR;(e=>{function t(a){return wm.keyCodeToStr(a)}e.toString=t;function i(a){return wm.strToKeyCode(a)}e.fromString=i;function s(a){return Ak.keyCodeToStr(a)}e.toUserSettingsUS=s;function r(a){return Mk.keyCodeToStr(a)}e.toUserSettingsGeneral=r;function n(a){return Ak.strToKeyCode(a)||Mk.strToKeyCode(a)}e.fromUserSettings=n;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return wm.keyCodeToStr(a)}e.toElectronAccelerator=o})(fR||={});var mx=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}),pR;(e=>{function t(i){return i===e.None||i===e.Cancelled||i instanceof gR?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ys.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:mx})})(pR||={});var gR=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?mx:(this._emitter||(this._emitter=new ke),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var mR,Sm;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?Sm=(e,t)=>{uR(()=>{if(i)return;let s=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:Sm=(e,t,i)=>{let s=e.requestIdleCallback(t,typeof i=="number"?{timeout:i}:void 0),r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(s))}}},mR=e=>Sm(globalThis,e)})();var _R;(e=>{async function t(s){let r,n=await Promise.all(s.map(o=>o.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return n}e.settled=t;function i(s){return new Promise(async(r,n)=>{try{await s(r,n)}catch(o){n(o)}})}e.withAsyncBody=i})(_R||={});var Rk=class Hi{static fromArray(t){return new Hi(i=>{i.emitMany(t)})}static fromPromise(t){return new Hi(async i=>{i.emitMany(await t)})}static fromPromises(t){return new Hi(async i=>{await Promise.all(t.map(async s=>i.emitOne(await s)))})}static merge(t){return new Hi(async i=>{await Promise.all(t.map(async s=>{for await(let r of s)i.emitOne(r)}))})}constructor(t,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new ke,queueMicrotask(async()=>{let s={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(t(s)),this.resolve()}catch(r){this.reject(r)}finally{s.emitOne=void 0,s.emitMany=void 0,s.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Ys.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new Hi(async s=>{for await(let r of t)s.emitOne(i(r))})}map(t){return Hi.map(this,t)}static filter(t,i){return new Hi(async s=>{for await(let r of t)i(r)&&s.emitOne(r)})}filter(t){return Hi.filter(this,t)}static coalesce(t){return Hi.filter(t,i=>!!i)}coalesce(){return Hi.coalesce(this)}static async toPromise(t){let i=[];for await(let s of t)i.push(s);return i}toPromise(){return Hi.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};Rk.EMPTY=Rk.fromArray([]);function vR(e){return 55296<=e&&e<=56319}function Lk(e){return 56320<=e&&e<=57343}function yR(e,t){return(e-55296<<10)+(t-56320)+65536}function bR(e){return Im(e,0)}function Im(e,t){switch(typeof e){case"object":return e===null?Xs(349,t):Array.isArray(e)?SR(e,t):kR(e,t);case"string":return _x(e,t);case"boolean":return wR(e,t);case"number":return Xs(e,t);case"undefined":return Xs(937,t);default:return Xs(617,t)}}function Xs(e,t){return(t<<5)-t+e|0}function wR(e,t){return Xs(e?433:863,t)}function _x(e,t){t=Xs(149417,t);for(let i=0,s=e.length;i<s;i++)t=Xs(e.charCodeAt(i),t);return t}function SR(e,t){return t=Xs(104579,t),e.reduce((i,s)=>Im(s,i),t)}function kR(e,t){return t=Xs(181387,t),Object.keys(e).sort().reduce((i,s)=>(i=_x(s,i),Im(e[s],i)),t)}function km(e,t,i=32){let s=i-t,r=~((1<<s)-1);return(e<<t|(r&e)>>>s)>>>0}function Dk(e,t=0,i=e.byteLength,s=0){for(let r=0;r<i;r++)e[t+r]=s}function xR(e,t,i="0"){for(;e.length<t;)e=i+e;return e}function Tl(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(i=>i.toString(16).padStart(2,"0")).join(""):xR((e>>>0).toString(16),t/4)}var CR=class vx{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let i=t.length;if(i===0)return;let s=this._buff,r=this._buffLen,n=this._leftoverHighSurrogate,o,a;for(n!==0?(o=n,a=-1,n=0):(o=t.charCodeAt(0),a=0);;){let l=o;if(vR(o))if(a+1<i){let c=t.charCodeAt(a+1);Lk(c)?(a++,l=yR(o,c)):l=65533}else{n=o;break}else Lk(o)&&(l=65533);if(r=this._push(s,r,l),a++,a<i)o=t.charCodeAt(a);else break}this._buffLen=r,this._leftoverHighSurrogate=n}_push(t,i,s){return s<128?t[i++]=s:s<2048?(t[i++]=192|(s&1984)>>>6,t[i++]=128|(s&63)>>>0):s<65536?(t[i++]=224|(s&61440)>>>12,t[i++]=128|(s&4032)>>>6,t[i++]=128|(s&63)>>>0):(t[i++]=240|(s&1835008)>>>18,t[i++]=128|(s&258048)>>>12,t[i++]=128|(s&4032)>>>6,t[i++]=128|(s&63)>>>0),i>=64&&(this._step(),i-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),i}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Tl(this._h0)+Tl(this._h1)+Tl(this._h2)+Tl(this._h3)+Tl(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Dk(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Dk(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=vx._bigBlock32,i=this._buffDV;for(let u=0;u<64;u+=4)t.setUint32(u,i.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)t.setUint32(u,km(t.getUint32(u-12,!1)^t.getUint32(u-32,!1)^t.getUint32(u-56,!1)^t.getUint32(u-64,!1),1),!1);let s=this._h0,r=this._h1,n=this._h2,o=this._h3,a=this._h4,l,c,h;for(let u=0;u<80;u++)u<20?(l=r&n|~r&o,c=1518500249):u<40?(l=r^n^o,c=1859775393):u<60?(l=r&n|r&o|n&o,c=2400959708):(l=r^n^o,c=3395469782),h=km(s,5)+l+a+c+t.getUint32(u*4,!1)&4294967295,a=o,o=n,n=km(r,30),r=s,s=h;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+n&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}};CR._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:nN,getWindow:ER,getDocument:oN,getWindows:aN,getWindowsCount:lN,getWindowId:Nk,getWindowById:cN,hasWindow:hN,onDidRegisterWindow:uN,onWillUnregisterWindow:dN,onDidUnregisterWindow:fN}=(function(){let e=new Map,t={window:Vi,disposables:new Ko};e.set(Vi.vscodeWindowId,t);let i=new ke,s=new ke,r=new ke;function n(o,a){return(typeof o=="number"?e.get(o):void 0)??(a?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:r.event,onDidUnregisterWindow:s.event,registerWindow(o){if(e.has(o.vscodeWindowId))return wi.None;let a=new Ko,l={window:o,disposables:a.add(new Ko)};return e.set(o.vscodeWindowId,l),a.add(Mt(()=>{e.delete(o.vscodeWindowId),s.fire(o)})),a.add(zm(o,MR.BEFORE_UNLOAD,()=>{r.fire(o)})),i.fire(l),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(o){return o.vscodeWindowId},hasWindow(o){return e.has(o)},getWindowById:n,getWindow(o){let a=o;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let l=o;return l?.view?l.view.window:Vi},getDocument(o){return ER(o).document}}})(),TR=class{constructor(e,t,i,s){this._node=e,this._type=t,this._handler=i,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function zm(e,t,i,s){return new TR(e,t,i,s)}var AR,Bk,xm=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){uu(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,i=new Map,s=new Map,r=n=>{i.set(n,!1);let o=e.get(n)??[];for(t.set(n,o),e.set(n,[]),s.set(n,!0);o.length>0;)o.sort(xm.sort),o.shift().execute();s.set(n,!1)};Bk=(n,o,a=0)=>{let l=Nk(n),c=new xm(o,a),h=e.get(l);return h||(h=[],e.set(l,h)),h.push(c),i.get(l)||(i.set(l,!0),n.requestAnimationFrame(()=>r(l))),c},AR=(n,o,a)=>{let l=Nk(n);if(s.get(l)){let c=new xm(o,a),h=t.get(l);return h||(h=[],t.set(l,h)),h.push(c),c}else return Bk(n,o,a)}})();var Ok=class yu{constructor(t,i){this.width=t,this.height=i}with(t=this.width,i=this.height){return t!==this.width||i!==this.height?new yu(t,i):this}static is(t){return typeof t=="object"&&typeof t.height=="number"&&typeof t.width=="number"}static lift(t){return t instanceof yu?t:new yu(t.width,t.height)}static equals(t,i){return t===i?!0:!t||!i?!1:t.width===i.width&&t.height===i.height}};Ok.None=new Ok(0,0);var pN=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let s=this.mutationObservers.get(e);s||(s=new Map,this.mutationObservers.set(e,s));let r=bR(i),n=s.get(r);if(n)n.users+=1;else{let o=new ke,a=new MutationObserver(c=>o.fire(c));a.observe(e,i);let l=n={users:1,observer:a,onDidMutate:o.event};t.add(Mt(()=>{l.users-=1,l.users===0&&(o.dispose(),a.disconnect(),s?.delete(r),s?.size===0&&this.mutationObservers.delete(e))})),s.set(r,n)}return n.onDidMutate}},MR={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:vm?"webkitAnimationStart":"animationstart",ANIMATION_END:vm?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:vm?"webkitAnimationIteration":"animationiteration"},RR=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function yx(e,t,i,...s){let r=RR.exec(t);if(!r)throw new Error("Bad use of emmet");let n=r[1]||"div",o;return e!=="http://www.w3.org/1999/xhtml"?o=document.createElementNS(e,n):o=document.createElement(n),r[3]&&(o.id=r[3]),r[4]&&(o.className=r[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?o[a]=l:a==="selected"?l&&o.setAttribute(a,"true"):o.setAttribute(a,l))}),o.append(...s),o}function LR(e,t,...i){return yx("http://www.w3.org/1999/xhtml",e,t,...i)}LR.SVG=function(e,t,...i){return yx("http://www.w3.org/2000/svg",e,t,...i)};var DR=class extends wi{constructor(e,t,i,s,r,n,o,a,l){super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=i,this._coreBrowserService=s,this._coreService=r,this._decorationService=n,this._optionsService=o,this._themeService=a,this._cursorBlinkStateManager=new kl,this._charAtlasDisposable=this._register(new kl),this._observerDisposable=this._register(new kl),this._model=new KM,this._workCell=new vk,this._workCell2=new vk,this._rectangleRenderer=this._register(new kl),this._glyphRenderer=this._register(new kl),this._onChangeTextureAtlas=this._register(new ke),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new ke),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new ke),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new ke),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new ke),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");let c={antialias:!1,depth:!1,preserveDrawingBuffer:l};if(this._gl=this._canvas.getContext("webgl2",c),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new nM(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new XM(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions=sM(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(zm(this._canvas,"webglcontextlost",h=>{console.log("webglcontextlost event received"),h.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(h)},3e3)})),this._register(zm(this._canvas,"webglcontextrestored",h=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,mk(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=_k(this._canvas,this._coreBrowserService.window,(h,u)=>this._setCanvasDevicePixelDimensions(h,u)),this._register(this._coreBrowserService.onWindowChange(h=>{this._observerDisposable.value=_k(this._canvas,h,(u,d)=>this._setCanvasDevicePixelDimensions(u,d))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(Mt(()=>{for(let h of this._renderLayers)h.dispose();this._canvas.parentElement?.removeChild(this._canvas),mk(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let i of this._renderLayers)i.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,i){for(let s of this._renderLayers)s.handleSelectionChanged(this._terminal,e,t,i);this._model.selection.update(this._core,e,t,i),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new GM(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new qM(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=lx(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=Wk(Ys.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),Ys.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let e of this._renderLayers)e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached)if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return;for(let i of this._renderLayers)i.handleGridChanged(this._terminal,e,t);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new NM(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let i=this._core,s=this._workCell,r,n,o,a,l,c,h=0,u=!0,d,f,g,b,T,_,m,v,p;e=zk(e,i.rows-1,0),t=zk(t,i.rows-1,0);let E=this._coreService.decPrivateModes.cursorStyle??i.options.cursorStyle??"block",A=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,L=A-i.buffer.ydisp,B=Math.min(this._terminal.buffer.active.cursorX,i.cols-1),K=-1,$=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let P=!1;for(n=e;n<=t;n++)for(o=n+i.buffer.ydisp,a=i.buffer.lines.get(o),this._model.lineLengths[n]=0,g=A===o,h=0,l=this._characterJoinerService.getJoinedCharacters(o),v=0;v<i.cols;v++){if(r=this._cellColorResolver.result.bg,a.loadCell(v,s),v===0&&(r=this._cellColorResolver.result.bg),c=!1,u=v>=h,d=v,l.length>0&&v===l[0][0]&&u){f=l.shift();let Rt=this._model.selection.isCellSelected(this._terminal,f[0],o);for(m=f[0]+1;m<f[1];m++)u&&=Rt===this._model.selection.isCellSelected(this._terminal,m,o);u&&=!g||B<f[0]||B>=f[1],u?(c=!0,s=new NR(s,a.translateToString(!0,f[0],f[1]),f[1]-f[0]),d=f[1]-1):h=f[1]}if(b=s.getChars(),T=s.getCode(),m=(n*i.cols+v)*bu,this._cellColorResolver.resolve(s,v,o,this.dimensions.device.cell.width),$&&o===A&&(v===B&&(this._model.cursor={x:B,y:L,width:s.getWidth(),style:this._coreBrowserService.isFocused?E:i.options.cursorInactiveStyle,cursorWidth:i.options.cursorWidth,dpr:this._devicePixelRatio},K=B+s.getWidth()-1),v>=B&&v<=K&&(this._coreBrowserService.isFocused&&E==="block"||this._coreBrowserService.isFocused===!1&&i.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),T!==0&&(this._model.lineLengths[n]=v+1),!(this._model.cells[m]===T&&this._model.cells[m+pu]===this._cellColorResolver.result.bg&&this._model.cells[m+gu]===this._cellColorResolver.result.fg&&this._model.cells[m+mm]===this._cellColorResolver.result.ext)&&(P=!0,b.length>1&&(T|=$M),this._model.cells[m]=T,this._model.cells[m+pu]=this._cellColorResolver.result.bg,this._model.cells[m+gu]=this._cellColorResolver.result.fg,this._model.cells[m+mm]=this._cellColorResolver.result.ext,_=s.getWidth(),this._glyphRenderer.value.updateCell(v,n,T,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,b,_,r),c)){for(s=this._workCell,v++;v<=d;v++)p=(n*i.cols+v)*bu,this._glyphRenderer.value.updateCell(v,n,0,0,0,0,XA,0,0),this._model.cells[p]=0,this._model.cells[p+pu]=this._cellColorResolver.result.bg,this._model.cells[p+gu]=this._cellColorResolver.result.fg,this._model.cells[p+mm]=this._cellColorResolver.result.ext;v--}}P&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){!this._charSizeService.width||!this._charSizeService.height||(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},NR=class extends Fo{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function zk(e,t,i=0){return Math.max(Math.min(e,t),i)}var Hk="di$target",Uk="di$dependencies",Cm=new Map;function vs(e){if(Cm.has(e))return Cm.get(e);let t=function(i,s,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");BR(t,i,r)};return t._id=e,Cm.set(e,t),t}function BR(e,t,i){t[Hk]===t?t[Uk].push({id:e,index:i}):(t[Uk]=[{id:e,index:i}],t[Hk]=t)}var gN=vs("BufferService"),mN=vs("CoreMouseService"),_N=vs("CoreService"),vN=vs("CharsetService"),yN=vs("InstantiationService"),bN=vs("LogService"),OR=vs("OptionsService"),wN=vs("OscLinkService"),SN=vs("UnicodeService"),kN=vs("DecorationService"),zR={trace:0,debug:1,info:2,warn:3,error:4,off:5},HR="xterm.js: ",Pk=class extends wi{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),bx=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=zR[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":HR)+t,...i)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};Pk=RA([LA(0,OR)],Pk);var bx;function UR(e){bx=e}var wx=class extends wi{constructor(e){if(Gk&&YA()<16){let t={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",t))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new ke),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new ke),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new ke),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new ke),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element){this._register(t.onWillOpen(()=>this.activate(e)));return}this._terminal=e;let i=t.coreService,s=t.optionsService,r=t,n=r._renderService,o=r._characterJoinerService,a=r._charSizeService,l=r._coreBrowserService,c=r._decorationService,h=r._logService,u=r._themeService;UR(h),this._renderer=this._register(new DR(e,o,a,l,i,c,s,u,this._preserveDrawingBuffer)),this._register(Ys.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(Ys.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(Ys.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(Ys.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),n.setRenderer(this._renderer),this._register(Mt(()=>{if(this._terminal._core._store._isDisposed)return;let d=this._terminal._core._renderService;d.setRenderer(this._terminal._core._createRenderer()),d.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}};var xx=Symbol("html"),Dl=class{#e;constructor(t,i){if(t!==xx)throw new TypeError("Html is made by html`…`");this.#e=i}static markupOf(t){return t.#e}toString(){if(Sx)throw new Error("Html coerced to a string: interpolate it with html`…` or hand it to a sink");return this.#e}toJSON(){if(Sx)throw new Error("Html serialized as JSON: convert it with htmlString() first");return this.#e}},Sx=typeof process<"u"&&process.env.VITEST!==void 0,PR=e=>new Dl(xx,e);var qR={"&":"&","<":"<",">":">",'"':""","'":"'"},IR=e=>e.replace(/[&<>"']/g,t=>qR[t]);function Cx(e){if(e==null||typeof e=="boolean")return"";if(e instanceof Dl)return Dl.markupOf(e);if(Array.isArray(e))return e.map(Cx).join("");if(typeof e=="string")return IR(e);if(typeof e=="number"||typeof e=="bigint")return String(e);throw new TypeError(`html: cannot interpolate ${typeof e}`)}var kx=new WeakSet,FR=/<form\b[^>]*\bmethod\s*=\s*["']?post\b/i,$R=/\bname\s*=\s*["']?csrf\b/i;function KR(e){if(kx.has(e))return;let t=e.join("\0");if(FR.test(t))throw new Error("html: write POST forms with postForm, which adds the CSRF field");if($R.test(t))throw new Error("html: postForm adds the CSRF field; don't write one");kx.add(e)}function jo(e,...t){KR(e);let i=e[0];for(let s=0;s<t.length;s++)i+=Cx(t[s])+e[s+1];return PR(i)}var G=(e,t,i)=>({never:e,pattern:new RegExp(`(?<![\\w-])(?:${t})(?![\\w-])`,"i"),say:i}),Ex=[G("scope","scopes?|scoped","plan"),G("contract","contracts?","plan"),G("signs","signs|signed(?!\\s+(?:in|out|into)\\b)","Approved by …"),G("sealed","seal|seals|sealed|sealing","approved"),G("binds","binds?","approved"),G("digest","digests?","(the plan version, in Details)"),G("worker","workers?","builder"),G("runner","runners?","builder"),G("daemon","daemons?","builder"),G("background service","background service","builder"),G("operator","operators?|instance operator","approver, or owner"),G("coordinator","coordinators?","your lead"),G("mate","mate","your lead"),G("scout","scouts?|scouting|scouted","research"),G("criterion","criterion|criteria","requirement"),G("evidence","evidence","requirement, or the saved files"),G("proof","proofs?","requirement"),G("verdict","verdicts?","requirement"),G("caveat","caveats?","requirement"),G("mark complete","mark(?:ed|s|ing)?\\s+(?:it\\s+|this\\s+|that\\s+|them\\s+|the\\s+result\\s+)?complete","Accept"),G("Accept and finish","accept\\s+and\\s+finish","Accept"),G("Revise","revise","Send back, or Request changes"),G("re-file","re-?file[ds]?|re-?filing","Send back, or Request changes"),G("Draft a repair task","draft\\s+a\\s+repair\\s+task","Send back"),G("put away","put(?:s|ting)?\\s+(?:it\\s+|them\\s+|tasks\\s+|old\\s+tasks\\s+)?away","Archive"),G("tidy","tidy|tidied|tidying","Archive"),G("run #N","(?:run|attempt|result)\\s+#?\\d+","build #N"),G("reconcile","reconcile[ds]?|reconciling|reconciliation","Waiting: Toolroll is …"),G("requeue","requeue[ds]?|requeuing","Waiting: Toolroll is …"),G("claim","claim|claimed","Waiting: Toolroll is …"),G("lease","leases?|leased","Waiting: Toolroll is …"),G("custody","custody","Waiting: Toolroll is …"),G("incident","incidents?","Waiting: Toolroll is …"),G("plane","plane","Toolroll"),G("fence","fences?|fenced","Waiting: Toolroll is …"),G("attested","attest|attested|attestation","Waiting: Toolroll is …"),G("receipt","receipts?","Waiting: Toolroll is …"),G("regate","regate[ds]?","Run checks"),G("carried","carried|carry|carries","Waiting: Toolroll is …"),G("incarnation","incarnations?","Waiting: Toolroll is …"),G("admission","admission","Waiting: Toolroll is …"),G("quiescence","quiescen(?:ce|t)","Waiting: Toolroll is …"),G("witness","witness(?:es|ed)?","Waiting: Toolroll is …"),G("unproven","unproven","Waiting: Toolroll is …"),G("version hex","(?=[0-9a-f]*\\d)(?=[0-9a-f]*[a-f])[0-9a-f]{12,64}","(the plan version, in Details)")],WR=Ex.map(e=>e.never);var Tx={queued:{stage:"queued"},ready:{stage:"queued"},"provider-quota":{stage:"queued"},running:{stage:"building"},reviewing:{stage:"reviewing"},"review-pending":{stage:"building"},"checks-running":{stage:"checking"},"ready-to-check":{stage:"finished",act:"open-result"},"ready-to-review":{stage:"finished"},"report-ready":{stage:"finished"},"no-change":{stage:"finished"},"pr-opened":{stage:"finished"},"merge-observed":{stage:"finished"},"pr-closed":{stage:"finished"},"agent-attested":{stage:"finished"},"accepted-exception":{stage:"finished"},complete:{stage:"complete",act:"open-result"},cancelled:{stage:"stopped",act:"inspect-task"},paused:{stage:"stopped"},stopped:{stage:"stopped",act:"resume-run"},failed:{stage:"failed",act:"retry-task"},"checks-failed":{stage:"failed"},"waiting-incident":{stage:"failed",act:"retry-task"},stopping:{stage:"waiting",wait:"build-stopping"},"build-stopping":{stage:"waiting",wait:"build-stopping"},"other-computer":{stage:"waiting",wait:"other-computer"},"planning-ready":{stage:"waiting",wait:"plan-next"},"scouting-ready":{stage:"waiting",wait:"research-next"},"worker-at-capacity":{stage:"waiting",wait:"builders-busy"},"retry-scheduled":{stage:"waiting",wait:"retry-later"},updating:{stage:"waiting",wait:"app-update"},"waiting-dependency":{stage:"waiting",wait:"other-task"},"history-problem":{stage:"needs-you",need:"history",act:"inspect-task"},"earlier-active":{stage:"needs-you",need:"earlier-version",act:"inspect-task"},"waiting-decision":{stage:"needs-you",need:"answer",act:"answer-decision"},"finding-held":{stage:"needs-you",need:"finding",act:"inspect-findings"},"decision-queue":{stage:"needs-you",need:"questions",act:"inspect-decisions"},"result-needs-attention":{stage:"needs-you",need:"other",act:"inspect-run"},"process-needs-attention":{stage:"needs-you",need:"stop-unproven",act:"inspect-run"},"vanished-run":{stage:"needs-you",need:"vanished",act:"reconcile-run"},held:{stage:"needs-you",need:"hold",act:"inspect-hold"},"storage-blocked":{stage:"needs-you",need:"storage",act:"unhold"},"terminal-dependency":{stage:"needs-you",need:"fix-dependency",act:"repair-dependency"},"needs-project":{stage:"needs-you",need:"choose-project",act:"place-task"},"needs-scope":{stage:"needs-you",need:"define-task",act:"write-scope"},"invalid-scope":{stage:"needs-you",need:"define-task",act:"write-scope"},"planner-source":{stage:"needs-you",need:"fix-request",act:"write-scope"},"needs-agent-profile":{stage:"needs-you",need:"choose-agent",act:"select-agent"},"needs-approval":{stage:"needs-you",need:"approval",act:"approve-scope"},"missing-requirement":{stage:"needs-you",need:"add-requirement",act:"repair-capability"},"no-worker-registered":{stage:"needs-you",need:"connect-builder",act:"start-worker"},"no-worker-online":{stage:"needs-you",need:"start-builder",act:"start-worker"},"signed-out":{stage:"needs-you",need:"sign-in",act:"sign-in"},"needs-verification":{stage:"needs-you",need:"review-result"},"proof-refuted":{stage:"needs-you",need:"review-result"},"no-build-record":{stage:"needs-you",need:"review-result"},"verification-needed":{stage:"needs-you",need:"review-result"},"evidence-mismatch":{stage:"needs-you",need:"review-result"},"record-incomplete":{stage:"needs-you",need:"review-result"},"evidence-damaged":{stage:"needs-you",need:"review-result"}};var SB=Object.fromEntries(Object.entries(Tx).flatMap(([e,t])=>t.need===void 0?[]:[[e,t.need]]));var jR="The check result couldn't be read.",BB=`${jR} Run checks on it, or open the result to see why.`;var OB={ok:jo`<path d="M20 6 9 17l-5-5"/>`,running:jo`<circle cx="12" cy="12" r="4"/>`,none:jo`<circle cx="12" cy="12" r="3"/>`,note:jo`<path d="M12 8v5"/><path d="M12 16.5h.01"/><path d="M10.3 3.9 2.4 18a2 2 0 0 0 1.7 3h15.8a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"/>`,failed:jo`<path d="M18 6 6 18M6 6l12 12"/>`};function Fm(e,t){return e==="way-in"?"password":t.automatic===!0?"automatic":e==="none"||t.passwordless||e==="standard"&&t.remembered?"click":"password"}function Ax(e,t){let i=Fm(e,t);return i==="password"?"password":i==="automatic"?"automatic":e==="none"?"none":t.passwordless?"passwordless":"remembered"}function Nl(e,t){return e==="way-in"?t.passwordless?"Passwordless is on, but this creates a new way in, so it still asks for your password.":t.remembered?"A remembered password doesn’t count here: this creates a new way in.":"This creates a new way in, so it always asks for your password.":t.automatic===!0?"Approved automatically by your rule.":e==="none"?"":t.passwordless?"No password needed: Passwordless is on for your account.":e==="standard"&&t.remembered?t.rememberedUntil?`No password needed: remembered on this computer until ${t.rememberedUntil}.`:"No password needed: remembered on this computer.":"Asks for your password."}var O=e=>["path",{d:e}],Wr=(e,t,i)=>["circle",{cx:e,cy:t,r:i}],ku={home:[O("m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"),O("M9 22V12h6v10")],tasks:[O("m3 17 2 2 4-4"),O("m3 7 2 2 4-4"),O("M13 6h8"),O("M13 12h8"),O("M13 18h8")],flows:[["rect",{x:3,y:3,width:8,height:8,rx:2}],O("M7 11v4a2 2 0 0 0 2 2h4"),["rect",{x:13,y:13,width:8,height:8,rx:2}]],agents:[O("M12 8V4H8"),["rect",{x:4,y:8,width:16,height:12,rx:2}],O("M2 14h2"),O("M20 14h2"),O("M15 13v2"),O("M9 13v2")],projects:[O("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")],settings:[O("M21 4h-7"),O("M10 4H3"),O("M21 12h-9"),O("M8 12H3"),O("M21 20h-5"),O("M12 20H3"),O("M14 2v4"),O("M8 10v4"),O("M16 18v4")],pen:[O("M21.17 6.81a1 1 0 0 0-3.99-3.99L3.84 16.17a2 2 0 0 0-.5.83l-1.32 4.35a.5.5 0 0 0 .62.62l4.35-1.32a2 2 0 0 0 .83-.5z")],arrow:[O("M5 12h14"),O("m12 5 7 7-7 7")],plus:[O("M12 5v14"),O("M5 12h14")],send:[O("M12 19V5"),O("m5 12 7-7 7 7")],stop:[["rect",{x:6,y:6,width:12,height:12,rx:2}]],x:[O("M18 6 6 18"),O("m6 6 12 12")],back:[O("m15 18-6-6 6-6")],menu:[O("M4 6h16"),O("M4 12h16"),O("M4 18h16")],search:[Wr(11,11,7),O("m20 20-3.5-3.5")],chevron:[O("m6 9 6 6 6-6")],check:[O("M20 6 9 17l-5-5")],alert:[Wr(12,12,9),O("M12 8v4"),O("M12 16h.01")],more:[Wr(5,12,1),Wr(12,12,1),Wr(19,12,1)],file:[O("M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"),O("M14 3v5h5")],minus:[O("M5 12h14")],fit:[O("M15 3h6v6"),O("M9 21H3v-6"),O("M21 3l-7 7"),O("M3 21l7-7")],bolt:[O("M13 2 4 14h7l-1 8 9-12h-7z")],code:[O("m16 18 6-6-6-6"),O("m8 6-6 6 6 6")],sun:[Wr(12,12,4),O("M12 2v2"),O("M12 20v2"),O("m4.93 4.93 1.41 1.41"),O("m17.66 17.66 1.41 1.41"),O("M2 12h2"),O("M20 12h2"),O("m6.34 17.66-1.41 1.41"),O("m19.07 4.93-1.41 1.41")],cpu:[["rect",{x:4,y:4,width:16,height:16,rx:2}],["rect",{x:9,y:9,width:6,height:6,rx:1}],O("M15 2v2"),O("M15 20v2"),O("M2 15h2"),O("M2 9h2"),O("M20 15h2"),O("M20 9h2"),O("M9 2v2"),O("M9 20v2")],bell:[O("M10.27 21a2 2 0 0 0 3.46 0"),O("M3.26 15.33A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.67C19.41 13.96 18 12.5 18 8A6 6 0 0 0 6 8c0 4.5-1.41 5.96-2.74 7.33")],shield:[O("M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z")],folder:[O("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")],people:[O("M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"),Wr(9,7,4),O("M22 21v-2a4 4 0 0 0-3-3.87"),O("M16 3.13a4 4 0 0 1 0 7.75")],coin:[Wr(12,12,10),O("M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8"),O("M12 18V6")],monitor:[["rect",{x:2,y:3,width:20,height:14,rx:2}],O("M8 21h8"),O("M12 17v4")],list:[O("M8 6h13"),O("M8 12h13"),O("M8 18h13"),O("M3 6h.01"),O("M3 12h.01"),O("M3 18h.01")],board:[["rect",{x:3,y:3,width:18,height:18,rx:2}],O("M9 3v18"),O("M15 3v18")],panel:[["rect",{x:3,y:3,width:18,height:18,rx:2}],O("M15 3v18")]};var Dx=H(ri(),1);var Te=(...e)=>e.filter(Boolean).join(" ");var Nx=H(F(),1);function Ot({name:e,small:t=!1}){return(0,Nx.jsx)("svg",{className:Te("k-i",t&&"k-i-sm"),viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:ku[e].map((i,s)=>(0,Dx.createElement)(i[0],{key:s,...i[1]}))})}var jt=H(F(),1);function vt({variant:e="outline",sm:t,iconOnly:i,lead:s,label:r,docked:n,busy:o,className:a,type:l="button",...c}){return(0,jt.jsx)("button",{type:l,className:Te("k-btn",`k-btn-${e}`,t&&"k-btn-sm",i&&"k-btn-icon",n&&"k-docked",o&&"busy",a),"aria-label":i?r:void 0,title:i?r:void 0,"aria-busy":o?!0:void 0,...c,children:i?(0,jt.jsx)(Ot,{name:i}):(0,jt.jsx)("span",{className:"k-face",children:o?(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsx)("span",{className:"k-spin","aria-hidden":"true"}),o]}):(0,jt.jsxs)(jt.Fragment,{children:[s&&(0,jt.jsx)(Ot,{name:s,small:!0}),r]})})})}function $m({variant:e="outline",sm:t,label:i,lead:s,className:r,...n}){return(0,jt.jsx)("a",{className:Te("k-btn",`k-btn-${e}`,t&&"k-btn-sm",r),...n,children:(0,jt.jsxs)("span",{className:"k-face",children:[s&&(0,jt.jsx)(Ot,{name:s,small:!0}),i]})})}var Bx=H(F(),1);function Cu({word:e,tone:t="",dot:i=!0}){return(0,Bx.jsx)("span",{className:Te("k-chip",t,!i&&"nodot"),children:e})}var XR=H(F(),1);var Ox=H(F(),1);var zx=H(F(),1);var Hx=H(ri(),1);var Ln=H(F(),1);function Ux({label:e,hint:t,error:i,children:s}){let r=(0,Hx.useId)(),n=Te(t&&`${r}-hint`,`${r}-err`);return(0,Ln.jsxs)("div",{className:"k-field",children:[(0,Ln.jsx)("label",{className:"k-label",htmlFor:r,children:e}),s({id:r,describedBy:n,invalid:!!i}),t&&(0,Ln.jsx)("p",{className:"k-hint",id:`${r}-hint`,children:t}),(0,Ln.jsx)("span",{className:"k-err",id:`${r}-err`,role:"alert",children:i??""})]})}var Px=({className:e,...t})=>(0,Ln.jsx)("input",{className:Te("k-input",e),...t});var Eu=H(F(),1);function qx({items:e,sm:t,wide:i,className:s,...r}){return(0,Eu.jsx)("span",{className:Te("k-selw",t&&"sm",i&&"wide",s),children:(0,Eu.jsx)("select",{className:"k-sel",...r,children:e.map(n=>{let[o,a]=typeof n=="string"?[n,n]:n;return(0,Eu.jsx)("option",{value:o,children:a},o)})})})}var Ix=H(F(),1);var Fx=H(F(),1);var Qs=H(F(),1);function $x({name:e,legend:t,current:i,items:s,onChange:r}){return(0,Qs.jsxs)("fieldset",{className:"k-radios",children:[(0,Qs.jsx)("legend",{className:"k-sr",children:t}),s.map(n=>(0,Qs.jsxs)("label",{className:"k-opt",children:[(0,Qs.jsx)("input",{type:"radio",name:e,value:n.value,checked:n.value===i,onChange:()=>r(n.value)}),(0,Qs.jsxs)("span",{children:[(0,Qs.jsx)("b",{children:n.label}),n.text&&(0,Qs.jsx)("span",{children:n.text})]}),n.tag]},n.value))]})}var Kx=H(F(),1),Go=({children:e})=>(0,Kx.jsx)("div",{className:"k-acts",children:e});var ZR=H(ri(),1),Wx=H(F(),1);var Yo=H(F(),1),Km=({children:e})=>(0,Yo.jsxs)("p",{className:"k-notice",role:"alert",children:[(0,Yo.jsx)(Ot,{name:"alert",small:!0}),(0,Yo.jsx)("span",{children:e})]});var Bl=({children:e})=>(0,Yo.jsx)("p",{className:"k-note",children:e});var Ol=H(F(),1);function Tu({title:e,text:t,action:i}){return(0,Ol.jsxs)("div",{className:"k-empty",children:[(0,Ol.jsx)("p",{className:"k-empty-t",children:e}),t&&(0,Ol.jsx)("p",{className:"k-empty-x",children:t}),i]})}var Vx=H(F(),1);var Wm=H(F(),1);var Vm=H(F(),1);var jm=H(F(),1);var jr=H(ri(),1),g2=H(Zu(),1);var QR="toolroll.key",JR="x-toolroll-key",e8=/^[0-9a-f]{64}$/;function jx(){try{let e=globalThis.localStorage?.getItem(QR)??null;if(e===null)return null;let t=JSON.parse(e),i=typeof t=="object"&&t!==null?t.key:null;return typeof i=="string"&&e8.test(i)?i:null}catch{return null}}function Au(e){let t=jx();return t===null?e:{...e,[JR]:t}}function Gx(){let e=jx();return e===null?["toolroll"]:["toolroll",`toolroll.key.${e}`]}var ys="form.k-sform",Hl=e=>HTMLFormElement.prototype.getAttribute.call(e,"id")??"",t8=e=>Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements").get.call(e),Yx="http://www.w3.org/2000/svg",Js=e=>e.querySelector("[data-k-proof]"),bs=e=>e.querySelector("[data-k-save]"),e2=e=>new Set(Array.from(Js(e)?.querySelectorAll("input[name]")??[]).map(t=>t.name));function Ru(e,t=null){let i=e2(e),s;try{s=t?new FormData(e,t):new FormData(e)}catch{s=new FormData(e)}let r=[];return s.forEach((n,o)=>{!i.has(o)&&typeof n=="string"&&r.push([o,n])}),r}function Jm(e){let t=new Map;for(let[i,s]of e)t.set(i,[...t.get(i)??[],s]);return t}function t2(e){let t=e2(e),i=[];for(let s of Array.from(t8(e)))!s.name||s.type==="hidden"||s.type==="submit"||s.type==="button"||t.has(s.name)||i.includes(s.name)||i.push(s.name);return i}var ji=e=>(e??"").replace(/\s+/g," ").trim();function i2(e,t){return e.querySelector(`[name="${CSS.escape(t)}"]`)}function i8(e,t){let i=i2(e,t);if(i===null)return t;let s=i.getAttribute("aria-label");if(s)return ji(s);if(i.type==="radio"||i.type==="checkbox"&&i.getAttribute("role")!=="switch"){let o=i.closest("fieldset")?.querySelector("legend");if(o)return ji(o.textContent)}let r=i.closest(".k-frow")?.querySelector(".k-frow-t");if(r)return ji(r.textContent);let n=i.labels?.[0];return n?ji(n.querySelector(".k-sl-t, b")?.textContent??n.textContent):t}function s8(e,t,i){let s=i2(e,t);if(s instanceof HTMLSelectElement)return ji(Array.from(s.options).find(o=>o.value===i[0])?.textContent??i[0]);if(s?.type==="radio"||s?.type==="checkbox"){let o=Array.from(e.querySelectorAll(`[name="${CSS.escape(t)}"]`));if(s.type==="checkbox"&&s.getAttribute("role")==="switch")return i.length>0?"On":"Off";let a=o.filter(l=>i.includes(l.value)).map(l=>ji(l.labels?.[0]?.querySelector("b")?.textContent??l.labels?.[0]?.textContent??l.value));return a.length===0?"none":a.join(", ")}let r=i[0]??"";if(s?.type==="password")return r===""?"unchanged":"a new value";let n=r.split(`
|
|
154
|
+
}`,Gs=8,_m=Gs*Float32Array.BYTES_PER_ELEMENT,jM=20*Gs,bk=class{constructor(){this.attributes=new Float32Array(jM),this.count=0}},Vs=0,wk=0,Sk=0,kk=0,xk=0,Ck=0,Ek=0,GM=class extends wi{constructor(e,t,i,s){super(),this._terminal=e,this._gl=t,this._dimensions=i,this._themeService=s,this._vertices=new bk,this._verticesCursor=new bk;let r=this._gl;this._program=Ze(ux(r,WM,VM)),this._register(Mt(()=>r.deleteProgram(this._program))),this._projectionLocation=Ze(r.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=r.createVertexArray(),r.bindVertexArray(this._vertexArrayObject);let n=new Float32Array([0,0,1,0,0,1,1,1]),o=r.createBuffer();this._register(Mt(()=>r.deleteBuffer(o))),r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,n,r.STATIC_DRAW),r.enableVertexAttribArray(3),r.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let a=new Uint8Array([0,1,2,3]),l=r.createBuffer();this._register(Mt(()=>r.deleteBuffer(l))),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,l),r.bufferData(r.ELEMENT_ARRAY_BUFFER,a,r.STATIC_DRAW),this._attributesBuffer=Ze(r.createBuffer()),this._register(Mt(()=>r.deleteBuffer(this._attributesBuffer))),r.bindBuffer(r.ARRAY_BUFFER,this._attributesBuffer),r.enableVertexAttribArray(0),r.vertexAttribPointer(0,2,r.FLOAT,!1,_m,0),r.vertexAttribDivisor(0,1),r.enableVertexAttribArray(1),r.vertexAttribPointer(1,2,r.FLOAT,!1,_m,2*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(1,1),r.enableVertexAttribArray(2),r.vertexAttribPointer(2,4,r.FLOAT,!1,_m,4*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(2,1),this._updateCachedColors(s.colors),this._register(this._themeService.onChangeColors(c=>{this._updateCachedColors(c),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,hx),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,i=this._vertices,s=1,r,n,o,a,l,c,h,u,d,f,g;for(r=0;r<t.rows;r++){for(o=-1,a=0,l=0,c=!1,n=0;n<t.cols;n++)h=(r*t.cols+n)*bu,u=e.cells[h+pu],d=e.cells[h+gu],f=!!(d&67108864),(u!==a||d!==l&&(c||f))&&((a!==0||c&&l!==0)&&(g=s++*Gs,this._updateRectangle(i,g,l,a,o,n,r)),o=n,a=u,l=d,c=f);(a!==0||c&&l!==0)&&(g=s++*Gs,this._updateRectangle(i,g,l,a,o,t.cols,r))}i.count=s}updateCursor(e){let t=this._verticesCursor,i=e.cursor;if(!i||i.style==="block"){t.count=0;return}let s,r=0;(i.style==="bar"||i.style==="outline")&&(s=r++*Gs,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.style==="bar"?i.dpr*i.cursorWidth:i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(i.style==="underline"||i.style==="outline")&&(s=r++*Gs,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,(i.y+1)*this._dimensions.device.cell.height-i.dpr,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat)),i.style==="outline"&&(s=r++*Gs,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat),s=r++*Gs,this._addRectangleFloat(t.attributes,s,(i.x+i.width)*this._dimensions.device.cell.width-i.dpr,i.y*this._dimensions.device.cell.height,i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=r}_updateRectangle(e,t,i,s,r,n,o){if(i&67108864)switch(i&50331648){case 16777216:case 33554432:Vs=this._themeService.colors.ansi[i&255].rgba;break;case 50331648:Vs=(i&16777215)<<8;break;default:Vs=this._themeService.colors.foreground.rgba}else switch(s&50331648){case 16777216:case 33554432:Vs=this._themeService.colors.ansi[s&255].rgba;break;case 50331648:Vs=(s&16777215)<<8;break;default:Vs=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=OM(e.attributes,this._terminal.rows*this._terminal.cols*Gs)),wk=r*this._dimensions.device.cell.width,Sk=o*this._dimensions.device.cell.height,kk=(Vs>>24&255)/255,xk=(Vs>>16&255)/255,Ck=(Vs>>8&255)/255,Ek=1,this._addRectangle(e.attributes,t,wk,Sk,(n-r)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,kk,xk,Ck,Ek)}_addRectangle(e,t,i,s,r,n,o,a,l,c){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=a,e[t+6]=l,e[t+7]=c}_addRectangleFloat(e,t,i,s,r,n,o){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(e.rgba&255)/255])}},YM=class extends wi{constructor(e,t,i,s,r,n,o,a){super(),this._container=t,this._alpha=r,this._coreBrowserService=n,this._optionsService=o,this._themeService=a,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${i}-layer`),this._canvas.style.zIndex=s.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(l=>{this._refreshCharAtlas(e,l),this.reset(e)})),this._register(Mt(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=Ze(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,i){}handleSelectionChanged(e,t,i,s=!1){}_setTransparency(e,t){if(t===this._alpha)return;let i=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=lx(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,i=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,i*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,i,s){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight))}_fillCharTrueColor(e,t,i,s){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=Xk,this._clipCell(i,s,t.getWidth()),this._ctx.fillText(t.getChars(),i*this._deviceCellWidth+this._deviceCharLeft,s*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,i){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,i){let s=t?e.options.fontWeightBold:e.options.fontWeight;return`${i?"italic":""} ${s} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},XM=class extends YM{constructor(e,t,i,s,r,n,o){super(i,e,"link",t,!0,r,n,o),this._register(s.onShowLinkUnderline(a=>this._handleShowLinkUnderline(a))),this._register(s.onHideLinkUnderline(a=>this._handleHideLinkUnderline(a)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){if(e.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:e.fg!==void 0&&DM(e.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},Vi=typeof window=="object"?window:globalThis,Nm=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new ke,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new ke,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,i){if(this.getZoomLevel(i)===t)return;let s=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(s,t),this._onDidChangeZoomLevel.fire(s)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),t)}setFullscreen(t,i){if(this.isFullscreen(i)===t)return;let s=this.getWindowId(i);this.mapWindowIdToFullScreen.set(s,t),this._onDidChangeFullscreen.fire(s)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};Nm.INSTANCE=new Nm;var dx=Nm;function ZM(e,t,i){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",i)}var jD=dx.INSTANCE.onDidChangeZoomLevel,GD=dx.INSTANCE.onDidChangeFullscreen,Vo=typeof navigator=="object"?navigator.userAgent:"",YD=Vo.indexOf("Firefox")>=0,vm=Vo.indexOf("AppleWebKit")>=0,QM=Vo.indexOf("Chrome")>=0,JM=!QM&&Vo.indexOf("Safari")>=0,XD=Vo.indexOf("Electron/")>=0,ZD=Vo.indexOf("Android")>=0,mu=!1;if(typeof Vi.matchMedia=="function"){let e=Vi.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=Vi.matchMedia("(display-mode: fullscreen)");mu=e.matches,ZM(Vi,e,({matches:i})=>{mu&&t.matches||(mu=i)})}function eR(){return mu}var $o="en",Bm=!1,Om=!1,_u=!1,tR=!1,fx=!1,px=!1,iR=!1,sR=!1,rR=!1,nR=!1,hu,vu=$o,Tk=$o,oR,js,Zs=globalThis,bi;typeof Zs.vscode<"u"&&typeof Zs.vscode.process<"u"?bi=Zs.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(bi=process);var gx=typeof bi?.versions?.electron=="string",aR=gx&&bi?.type==="renderer";if(typeof bi=="object"){Bm=bi.platform==="win32",Om=bi.platform==="darwin",_u=bi.platform==="linux",tR=_u&&!!bi.env.SNAP&&!!bi.env.SNAP_REVISION,iR=gx,rR=!!bi.env.CI||!!bi.env.BUILD_ARTIFACTSTAGINGDIRECTORY,hu=$o,vu=$o;let e=bi.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);hu=t.userLocale,Tk=t.osLocale,vu=t.resolvedLanguage||$o,oR=t.languagePack?.translationsConfigFile}catch{}fx=!0}else typeof navigator=="object"&&!aR?(js=navigator.userAgent,Bm=js.indexOf("Windows")>=0,Om=js.indexOf("Macintosh")>=0,sR=(js.indexOf("Macintosh")>=0||js.indexOf("iPad")>=0||js.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_u=js.indexOf("Linux")>=0,nR=js?.indexOf("Mobi")>=0,px=!0,vu=globalThis._VSCODE_NLS_LANGUAGE||$o,hu=navigator.language.toLowerCase(),Tk=hu):console.error("Unable to resolve platform.");var ym=0;Om?ym=1:Bm?ym=3:_u&&(ym=2);var bm=fx,lR=px&&typeof Zs.importScripts=="function",QD=lR?Zs.origin:void 0,_s=js,Ir=vu,cR;(e=>{function t(){return Ir}e.value=t;function i(){return Ir.length===2?Ir==="en":Ir.length>=3?Ir[0]==="e"&&Ir[1]==="n"&&Ir[2]==="-":!1}e.isDefaultVariant=i;function s(){return Ir==="en"}e.isDefault=s})(cR||={});var hR=typeof Zs.postMessage=="function"&&!Zs.importScripts,uR=(()=>{if(hR){let e=[];Zs.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let s=0,r=e.length;s<r;s++){let n=e[s];if(n.id===i.data.vscodeScheduleAsyncWork){e.splice(s,1),n.callback();return}}});let t=0;return i=>{let s=++t;e.push({id:s,callback:i}),Zs.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})(),dR=!!(_s&&_s.indexOf("Chrome")>=0),JD=!!(_s&&_s.indexOf("Firefox")>=0),eN=!!(!dR&&_s&&_s.indexOf("Safari")>=0),tN=!!(_s&&_s.indexOf("Edg/")>=0),iN=!!(_s&&_s.indexOf("Android")>=0),Fr=typeof navigator=="object"?navigator:{},sN={clipboard:{writeText:bm||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(Fr&&Fr.clipboard&&Fr.clipboard.writeText),readText:bm||!!(Fr&&Fr.clipboard&&Fr.clipboard.readText)},keyboard:bm||eR()?0:Fr.keyboard||JM?1:2,touch:"ontouchstart"in Vi||Fr.maxTouchPoints>0,pointerEvents:Vi.PointerEvent&&("ontouchstart"in Vi||navigator.maxTouchPoints>0)},qm=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},wm=new qm,Ak=new qm,Mk=new qm,rN=new Array(230),fR;(e=>{function t(a){return wm.keyCodeToStr(a)}e.toString=t;function i(a){return wm.strToKeyCode(a)}e.fromString=i;function s(a){return Ak.keyCodeToStr(a)}e.toUserSettingsUS=s;function r(a){return Mk.keyCodeToStr(a)}e.toUserSettingsGeneral=r;function n(a){return Ak.strToKeyCode(a)||Mk.strToKeyCode(a)}e.fromUserSettings=n;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return wm.keyCodeToStr(a)}e.toElectronAccelerator=o})(fR||={});var mx=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}),pR;(e=>{function t(i){return i===e.None||i===e.Cancelled||i instanceof gR?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ys.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:mx})})(pR||={});var gR=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?mx:(this._emitter||(this._emitter=new ke),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var mR,Sm;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?Sm=(e,t)=>{uR(()=>{if(i)return;let s=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:Sm=(e,t,i)=>{let s=e.requestIdleCallback(t,typeof i=="number"?{timeout:i}:void 0),r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(s))}}},mR=e=>Sm(globalThis,e)})();var _R;(e=>{async function t(s){let r,n=await Promise.all(s.map(o=>o.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return n}e.settled=t;function i(s){return new Promise(async(r,n)=>{try{await s(r,n)}catch(o){n(o)}})}e.withAsyncBody=i})(_R||={});var Rk=class Hi{static fromArray(t){return new Hi(i=>{i.emitMany(t)})}static fromPromise(t){return new Hi(async i=>{i.emitMany(await t)})}static fromPromises(t){return new Hi(async i=>{await Promise.all(t.map(async s=>i.emitOne(await s)))})}static merge(t){return new Hi(async i=>{await Promise.all(t.map(async s=>{for await(let r of s)i.emitOne(r)}))})}constructor(t,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new ke,queueMicrotask(async()=>{let s={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(t(s)),this.resolve()}catch(r){this.reject(r)}finally{s.emitOne=void 0,s.emitMany=void 0,s.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Ys.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new Hi(async s=>{for await(let r of t)s.emitOne(i(r))})}map(t){return Hi.map(this,t)}static filter(t,i){return new Hi(async s=>{for await(let r of t)i(r)&&s.emitOne(r)})}filter(t){return Hi.filter(this,t)}static coalesce(t){return Hi.filter(t,i=>!!i)}coalesce(){return Hi.coalesce(this)}static async toPromise(t){let i=[];for await(let s of t)i.push(s);return i}toPromise(){return Hi.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};Rk.EMPTY=Rk.fromArray([]);function vR(e){return 55296<=e&&e<=56319}function Lk(e){return 56320<=e&&e<=57343}function yR(e,t){return(e-55296<<10)+(t-56320)+65536}function bR(e){return Im(e,0)}function Im(e,t){switch(typeof e){case"object":return e===null?Xs(349,t):Array.isArray(e)?SR(e,t):kR(e,t);case"string":return _x(e,t);case"boolean":return wR(e,t);case"number":return Xs(e,t);case"undefined":return Xs(937,t);default:return Xs(617,t)}}function Xs(e,t){return(t<<5)-t+e|0}function wR(e,t){return Xs(e?433:863,t)}function _x(e,t){t=Xs(149417,t);for(let i=0,s=e.length;i<s;i++)t=Xs(e.charCodeAt(i),t);return t}function SR(e,t){return t=Xs(104579,t),e.reduce((i,s)=>Im(s,i),t)}function kR(e,t){return t=Xs(181387,t),Object.keys(e).sort().reduce((i,s)=>(i=_x(s,i),Im(e[s],i)),t)}function km(e,t,i=32){let s=i-t,r=~((1<<s)-1);return(e<<t|(r&e)>>>s)>>>0}function Dk(e,t=0,i=e.byteLength,s=0){for(let r=0;r<i;r++)e[t+r]=s}function xR(e,t,i="0"){for(;e.length<t;)e=i+e;return e}function Tl(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(i=>i.toString(16).padStart(2,"0")).join(""):xR((e>>>0).toString(16),t/4)}var CR=class vx{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let i=t.length;if(i===0)return;let s=this._buff,r=this._buffLen,n=this._leftoverHighSurrogate,o,a;for(n!==0?(o=n,a=-1,n=0):(o=t.charCodeAt(0),a=0);;){let l=o;if(vR(o))if(a+1<i){let c=t.charCodeAt(a+1);Lk(c)?(a++,l=yR(o,c)):l=65533}else{n=o;break}else Lk(o)&&(l=65533);if(r=this._push(s,r,l),a++,a<i)o=t.charCodeAt(a);else break}this._buffLen=r,this._leftoverHighSurrogate=n}_push(t,i,s){return s<128?t[i++]=s:s<2048?(t[i++]=192|(s&1984)>>>6,t[i++]=128|(s&63)>>>0):s<65536?(t[i++]=224|(s&61440)>>>12,t[i++]=128|(s&4032)>>>6,t[i++]=128|(s&63)>>>0):(t[i++]=240|(s&1835008)>>>18,t[i++]=128|(s&258048)>>>12,t[i++]=128|(s&4032)>>>6,t[i++]=128|(s&63)>>>0),i>=64&&(this._step(),i-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),i}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Tl(this._h0)+Tl(this._h1)+Tl(this._h2)+Tl(this._h3)+Tl(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Dk(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Dk(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=vx._bigBlock32,i=this._buffDV;for(let u=0;u<64;u+=4)t.setUint32(u,i.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)t.setUint32(u,km(t.getUint32(u-12,!1)^t.getUint32(u-32,!1)^t.getUint32(u-56,!1)^t.getUint32(u-64,!1),1),!1);let s=this._h0,r=this._h1,n=this._h2,o=this._h3,a=this._h4,l,c,h;for(let u=0;u<80;u++)u<20?(l=r&n|~r&o,c=1518500249):u<40?(l=r^n^o,c=1859775393):u<60?(l=r&n|r&o|n&o,c=2400959708):(l=r^n^o,c=3395469782),h=km(s,5)+l+a+c+t.getUint32(u*4,!1)&4294967295,a=o,o=n,n=km(r,30),r=s,s=h;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+n&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}};CR._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:nN,getWindow:ER,getDocument:oN,getWindows:aN,getWindowsCount:lN,getWindowId:Nk,getWindowById:cN,hasWindow:hN,onDidRegisterWindow:uN,onWillUnregisterWindow:dN,onDidUnregisterWindow:fN}=(function(){let e=new Map,t={window:Vi,disposables:new Ko};e.set(Vi.vscodeWindowId,t);let i=new ke,s=new ke,r=new ke;function n(o,a){return(typeof o=="number"?e.get(o):void 0)??(a?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:r.event,onDidUnregisterWindow:s.event,registerWindow(o){if(e.has(o.vscodeWindowId))return wi.None;let a=new Ko,l={window:o,disposables:a.add(new Ko)};return e.set(o.vscodeWindowId,l),a.add(Mt(()=>{e.delete(o.vscodeWindowId),s.fire(o)})),a.add(zm(o,MR.BEFORE_UNLOAD,()=>{r.fire(o)})),i.fire(l),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(o){return o.vscodeWindowId},hasWindow(o){return e.has(o)},getWindowById:n,getWindow(o){let a=o;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let l=o;return l?.view?l.view.window:Vi},getDocument(o){return ER(o).document}}})(),TR=class{constructor(e,t,i,s){this._node=e,this._type=t,this._handler=i,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function zm(e,t,i,s){return new TR(e,t,i,s)}var AR,Bk,xm=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){uu(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,i=new Map,s=new Map,r=n=>{i.set(n,!1);let o=e.get(n)??[];for(t.set(n,o),e.set(n,[]),s.set(n,!0);o.length>0;)o.sort(xm.sort),o.shift().execute();s.set(n,!1)};Bk=(n,o,a=0)=>{let l=Nk(n),c=new xm(o,a),h=e.get(l);return h||(h=[],e.set(l,h)),h.push(c),i.get(l)||(i.set(l,!0),n.requestAnimationFrame(()=>r(l))),c},AR=(n,o,a)=>{let l=Nk(n);if(s.get(l)){let c=new xm(o,a),h=t.get(l);return h||(h=[],t.set(l,h)),h.push(c),c}else return Bk(n,o,a)}})();var Ok=class yu{constructor(t,i){this.width=t,this.height=i}with(t=this.width,i=this.height){return t!==this.width||i!==this.height?new yu(t,i):this}static is(t){return typeof t=="object"&&typeof t.height=="number"&&typeof t.width=="number"}static lift(t){return t instanceof yu?t:new yu(t.width,t.height)}static equals(t,i){return t===i?!0:!t||!i?!1:t.width===i.width&&t.height===i.height}};Ok.None=new Ok(0,0);var pN=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let s=this.mutationObservers.get(e);s||(s=new Map,this.mutationObservers.set(e,s));let r=bR(i),n=s.get(r);if(n)n.users+=1;else{let o=new ke,a=new MutationObserver(c=>o.fire(c));a.observe(e,i);let l=n={users:1,observer:a,onDidMutate:o.event};t.add(Mt(()=>{l.users-=1,l.users===0&&(o.dispose(),a.disconnect(),s?.delete(r),s?.size===0&&this.mutationObservers.delete(e))})),s.set(r,n)}return n.onDidMutate}},MR={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:vm?"webkitAnimationStart":"animationstart",ANIMATION_END:vm?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:vm?"webkitAnimationIteration":"animationiteration"},RR=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function yx(e,t,i,...s){let r=RR.exec(t);if(!r)throw new Error("Bad use of emmet");let n=r[1]||"div",o;return e!=="http://www.w3.org/1999/xhtml"?o=document.createElementNS(e,n):o=document.createElement(n),r[3]&&(o.id=r[3]),r[4]&&(o.className=r[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?o[a]=l:a==="selected"?l&&o.setAttribute(a,"true"):o.setAttribute(a,l))}),o.append(...s),o}function LR(e,t,...i){return yx("http://www.w3.org/1999/xhtml",e,t,...i)}LR.SVG=function(e,t,...i){return yx("http://www.w3.org/2000/svg",e,t,...i)};var DR=class extends wi{constructor(e,t,i,s,r,n,o,a,l){super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=i,this._coreBrowserService=s,this._coreService=r,this._decorationService=n,this._optionsService=o,this._themeService=a,this._cursorBlinkStateManager=new kl,this._charAtlasDisposable=this._register(new kl),this._observerDisposable=this._register(new kl),this._model=new KM,this._workCell=new vk,this._workCell2=new vk,this._rectangleRenderer=this._register(new kl),this._glyphRenderer=this._register(new kl),this._onChangeTextureAtlas=this._register(new ke),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new ke),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new ke),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new ke),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new ke),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");let c={antialias:!1,depth:!1,preserveDrawingBuffer:l};if(this._gl=this._canvas.getContext("webgl2",c),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new nM(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new XM(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions=sM(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(zm(this._canvas,"webglcontextlost",h=>{console.log("webglcontextlost event received"),h.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(h)},3e3)})),this._register(zm(this._canvas,"webglcontextrestored",h=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,mk(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=_k(this._canvas,this._coreBrowserService.window,(h,u)=>this._setCanvasDevicePixelDimensions(h,u)),this._register(this._coreBrowserService.onWindowChange(h=>{this._observerDisposable.value=_k(this._canvas,h,(u,d)=>this._setCanvasDevicePixelDimensions(u,d))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(Mt(()=>{for(let h of this._renderLayers)h.dispose();this._canvas.parentElement?.removeChild(this._canvas),mk(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let i of this._renderLayers)i.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,i){for(let s of this._renderLayers)s.handleSelectionChanged(this._terminal,e,t,i);this._model.selection.update(this._core,e,t,i),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new GM(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new qM(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=lx(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=Wk(Ys.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),Ys.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let e of this._renderLayers)e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached)if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return;for(let i of this._renderLayers)i.handleGridChanged(this._terminal,e,t);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new NM(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let i=this._core,s=this._workCell,r,n,o,a,l,c,h=0,u=!0,d,f,g,b,T,_,m,v,p;e=zk(e,i.rows-1,0),t=zk(t,i.rows-1,0);let E=this._coreService.decPrivateModes.cursorStyle??i.options.cursorStyle??"block",A=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,L=A-i.buffer.ydisp,B=Math.min(this._terminal.buffer.active.cursorX,i.cols-1),W=-1,$=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let P=!1;for(n=e;n<=t;n++)for(o=n+i.buffer.ydisp,a=i.buffer.lines.get(o),this._model.lineLengths[n]=0,g=A===o,h=0,l=this._characterJoinerService.getJoinedCharacters(o),v=0;v<i.cols;v++){if(r=this._cellColorResolver.result.bg,a.loadCell(v,s),v===0&&(r=this._cellColorResolver.result.bg),c=!1,u=v>=h,d=v,l.length>0&&v===l[0][0]&&u){f=l.shift();let Rt=this._model.selection.isCellSelected(this._terminal,f[0],o);for(m=f[0]+1;m<f[1];m++)u&&=Rt===this._model.selection.isCellSelected(this._terminal,m,o);u&&=!g||B<f[0]||B>=f[1],u?(c=!0,s=new NR(s,a.translateToString(!0,f[0],f[1]),f[1]-f[0]),d=f[1]-1):h=f[1]}if(b=s.getChars(),T=s.getCode(),m=(n*i.cols+v)*bu,this._cellColorResolver.resolve(s,v,o,this.dimensions.device.cell.width),$&&o===A&&(v===B&&(this._model.cursor={x:B,y:L,width:s.getWidth(),style:this._coreBrowserService.isFocused?E:i.options.cursorInactiveStyle,cursorWidth:i.options.cursorWidth,dpr:this._devicePixelRatio},W=B+s.getWidth()-1),v>=B&&v<=W&&(this._coreBrowserService.isFocused&&E==="block"||this._coreBrowserService.isFocused===!1&&i.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),T!==0&&(this._model.lineLengths[n]=v+1),!(this._model.cells[m]===T&&this._model.cells[m+pu]===this._cellColorResolver.result.bg&&this._model.cells[m+gu]===this._cellColorResolver.result.fg&&this._model.cells[m+mm]===this._cellColorResolver.result.ext)&&(P=!0,b.length>1&&(T|=$M),this._model.cells[m]=T,this._model.cells[m+pu]=this._cellColorResolver.result.bg,this._model.cells[m+gu]=this._cellColorResolver.result.fg,this._model.cells[m+mm]=this._cellColorResolver.result.ext,_=s.getWidth(),this._glyphRenderer.value.updateCell(v,n,T,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,b,_,r),c)){for(s=this._workCell,v++;v<=d;v++)p=(n*i.cols+v)*bu,this._glyphRenderer.value.updateCell(v,n,0,0,0,0,XA,0,0),this._model.cells[p]=0,this._model.cells[p+pu]=this._cellColorResolver.result.bg,this._model.cells[p+gu]=this._cellColorResolver.result.fg,this._model.cells[p+mm]=this._cellColorResolver.result.ext;v--}}P&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){!this._charSizeService.width||!this._charSizeService.height||(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},NR=class extends Fo{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function zk(e,t,i=0){return Math.max(Math.min(e,t),i)}var Hk="di$target",Uk="di$dependencies",Cm=new Map;function vs(e){if(Cm.has(e))return Cm.get(e);let t=function(i,s,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");BR(t,i,r)};return t._id=e,Cm.set(e,t),t}function BR(e,t,i){t[Hk]===t?t[Uk].push({id:e,index:i}):(t[Uk]=[{id:e,index:i}],t[Hk]=t)}var gN=vs("BufferService"),mN=vs("CoreMouseService"),_N=vs("CoreService"),vN=vs("CharsetService"),yN=vs("InstantiationService"),bN=vs("LogService"),OR=vs("OptionsService"),wN=vs("OscLinkService"),SN=vs("UnicodeService"),kN=vs("DecorationService"),zR={trace:0,debug:1,info:2,warn:3,error:4,off:5},HR="xterm.js: ",Pk=class extends wi{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),bx=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=zR[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":HR)+t,...i)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};Pk=RA([LA(0,OR)],Pk);var bx;function UR(e){bx=e}var wx=class extends wi{constructor(e){if(Gk&&YA()<16){let t={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",t))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new ke),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new ke),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new ke),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new ke),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element){this._register(t.onWillOpen(()=>this.activate(e)));return}this._terminal=e;let i=t.coreService,s=t.optionsService,r=t,n=r._renderService,o=r._characterJoinerService,a=r._charSizeService,l=r._coreBrowserService,c=r._decorationService,h=r._logService,u=r._themeService;UR(h),this._renderer=this._register(new DR(e,o,a,l,i,c,s,u,this._preserveDrawingBuffer)),this._register(Ys.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(Ys.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(Ys.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(Ys.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),n.setRenderer(this._renderer),this._register(Mt(()=>{if(this._terminal._core._store._isDisposed)return;let d=this._terminal._core._renderService;d.setRenderer(this._terminal._core._createRenderer()),d.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}};var xx=Symbol("html"),Dl=class{#e;constructor(t,i){if(t!==xx)throw new TypeError("Html is made by html`…`");this.#e=i}static markupOf(t){return t.#e}toString(){if(Sx)throw new Error("Html coerced to a string: interpolate it with html`…` or hand it to a sink");return this.#e}toJSON(){if(Sx)throw new Error("Html serialized as JSON: convert it with htmlString() first");return this.#e}},Sx=typeof process<"u"&&process.env.VITEST!==void 0,PR=e=>new Dl(xx,e);var qR={"&":"&","<":"<",">":">",'"':""","'":"'"},IR=e=>e.replace(/[&<>"']/g,t=>qR[t]);function Cx(e){if(e==null||typeof e=="boolean")return"";if(e instanceof Dl)return Dl.markupOf(e);if(Array.isArray(e))return e.map(Cx).join("");if(typeof e=="string")return IR(e);if(typeof e=="number"||typeof e=="bigint")return String(e);throw new TypeError(`html: cannot interpolate ${typeof e}`)}var kx=new WeakSet,FR=/<form\b[^>]*\bmethod\s*=\s*["']?post\b/i,$R=/\bname\s*=\s*["']?csrf\b/i;function KR(e){if(kx.has(e))return;let t=e.join("\0");if(FR.test(t))throw new Error("html: write POST forms with postForm, which adds the CSRF field");if($R.test(t))throw new Error("html: postForm adds the CSRF field; don't write one");kx.add(e)}function jo(e,...t){KR(e);let i=e[0];for(let s=0;s<t.length;s++)i+=Cx(t[s])+e[s+1];return PR(i)}var K=(e,t,i)=>({never:e,pattern:new RegExp(`(?<![\\w-])(?:${t})(?![\\w-])`,"i"),say:i}),Ex=[K("scope","scopes?|scoped","plan"),K("contract","contracts?","plan"),K("signs","signs|signed(?!\\s+(?:in|out|into)\\b)","Approved by …"),K("sealed","seal|seals|sealed|sealing","approved"),K("binds","binds?","approved"),K("digest","digests?","(the plan version, in Details)"),K("worker","workers?","builder"),K("runner","runners?","builder"),K("daemon","daemons?","builder"),K("background service","background service","builder"),K("operator","operators?|instance operator","approver, or owner"),K("coordinator","coordinators?","your lead"),K("mate","mate","your lead"),K("scout","scouts?|scouting|scouted","research"),K("criterion","criterion|criteria","requirement"),K("evidence","evidence","requirement, or the saved files"),K("proof","proofs?","requirement"),K("verdict","verdicts?","requirement"),K("caveat","caveats?","requirement"),K("mark complete","mark(?:ed|s|ing)?\\s+(?:it\\s+|this\\s+|that\\s+|them\\s+|the\\s+result\\s+)?complete","Accept"),K("Accept and finish","accept\\s+and\\s+finish","Accept"),K("Revise","revise","Send back, or Request changes"),K("re-file","re-?file[ds]?|re-?filing","Send back, or Request changes"),K("Draft a repair task","draft\\s+a\\s+repair\\s+task","Send back"),K("put away","put(?:s|ting)?\\s+(?:it\\s+|them\\s+|tasks\\s+|old\\s+tasks\\s+)?away","Archive"),K("tidy","tidy|tidied|tidying","Archive"),K("run #N","(?:run|attempt|result)\\s+#?\\d+","build #N"),K("reconcile","reconcile[ds]?|reconciling|reconciliation","Waiting: Toolroll is …"),K("requeue","requeue[ds]?|requeuing","Waiting: Toolroll is …"),K("claim","claim|claimed","Waiting: Toolroll is …"),K("lease","leases?|leased","Waiting: Toolroll is …"),K("custody","custody","Waiting: Toolroll is …"),K("incident","incidents?","Waiting: Toolroll is …"),K("plane","plane","Toolroll"),K("fence","fences?|fenced","Waiting: Toolroll is …"),K("attested","attest|attested|attestation","Waiting: Toolroll is …"),K("receipt","receipts?","Waiting: Toolroll is …"),K("regate","regate[ds]?","Run checks"),K("carried","carried|carry|carries","Waiting: Toolroll is …"),K("incarnation","incarnations?","Waiting: Toolroll is …"),K("admission","admission","Waiting: Toolroll is …"),K("quiescence","quiescen(?:ce|t)","Waiting: Toolroll is …"),K("witness","witness(?:es|ed)?","Waiting: Toolroll is …"),K("unproven","unproven","Waiting: Toolroll is …"),K("version hex","(?=[0-9a-f]*\\d)(?=[0-9a-f]*[a-f])[0-9a-f]{12,64}","(the plan version, in Details)")],WR=Ex.map(e=>e.never);var yB=[K("lead","lead","Toolroll, or Chat"),K("crew","crew","Toolroll"),K("scope","scopes?|scoped","plan"),K("mode","modes?","(Settings)"),K("flow","flows?","(Settings)"),K("fleet","fleet","(Settings)"),K("fallback","fallbacks?","(Settings)"),K("routing","routing|routed","(Settings)"),K("spend","spend|spends|spending|spent","cost"),K("MCP","mcp","(Settings)"),K("password","passwords?|passwordless","(only where one is asked for)"),K("token","tokens?","(Settings)"),K("builder","builders?","taking work")];var Tx={queued:{stage:"queued"},ready:{stage:"queued"},"provider-quota":{stage:"queued"},running:{stage:"building"},reviewing:{stage:"reviewing"},"review-pending":{stage:"building"},"checks-running":{stage:"checking"},"ready-to-check":{stage:"finished",act:"open-result"},"ready-to-review":{stage:"finished"},"report-ready":{stage:"finished"},"no-change":{stage:"finished"},"pr-opened":{stage:"finished"},"merge-observed":{stage:"finished"},"pr-closed":{stage:"finished"},"agent-attested":{stage:"finished"},"accepted-exception":{stage:"finished"},complete:{stage:"complete",act:"open-result"},cancelled:{stage:"stopped",act:"inspect-task"},paused:{stage:"stopped"},stopped:{stage:"stopped",act:"resume-run"},failed:{stage:"failed",act:"retry-task"},"checks-failed":{stage:"failed"},"waiting-incident":{stage:"failed",act:"retry-task"},stopping:{stage:"waiting",wait:"build-stopping"},"build-stopping":{stage:"waiting",wait:"build-stopping"},"other-computer":{stage:"waiting",wait:"other-computer"},"planning-ready":{stage:"waiting",wait:"plan-next"},"scouting-ready":{stage:"waiting",wait:"research-next"},"worker-at-capacity":{stage:"waiting",wait:"builders-busy"},"retry-scheduled":{stage:"waiting",wait:"retry-later"},updating:{stage:"waiting",wait:"app-update"},"waiting-dependency":{stage:"waiting",wait:"other-task"},"history-problem":{stage:"needs-you",need:"history",act:"inspect-task"},"earlier-active":{stage:"needs-you",need:"earlier-version",act:"inspect-task"},"waiting-decision":{stage:"needs-you",need:"answer",act:"answer-decision"},"finding-held":{stage:"needs-you",need:"finding",act:"inspect-findings"},"decision-queue":{stage:"needs-you",need:"questions",act:"inspect-decisions"},"result-needs-attention":{stage:"needs-you",need:"other",act:"inspect-run"},"process-needs-attention":{stage:"needs-you",need:"stop-unproven",act:"inspect-run"},"vanished-run":{stage:"needs-you",need:"vanished",act:"reconcile-run"},held:{stage:"needs-you",need:"hold",act:"inspect-hold"},"storage-blocked":{stage:"needs-you",need:"storage",act:"unhold"},"terminal-dependency":{stage:"needs-you",need:"fix-dependency",act:"repair-dependency"},"needs-project":{stage:"needs-you",need:"choose-project",act:"place-task"},"needs-scope":{stage:"needs-you",need:"define-task",act:"write-scope"},"invalid-scope":{stage:"needs-you",need:"define-task",act:"write-scope"},"planner-source":{stage:"needs-you",need:"fix-request",act:"write-scope"},"needs-agent-profile":{stage:"needs-you",need:"choose-agent",act:"select-agent"},"needs-approval":{stage:"needs-you",need:"approval",act:"approve-scope"},"missing-requirement":{stage:"needs-you",need:"add-requirement",act:"repair-capability"},"no-worker-registered":{stage:"needs-you",need:"connect-builder",act:"start-worker"},"no-worker-online":{stage:"needs-you",need:"start-builder",act:"start-worker"},"signed-out":{stage:"needs-you",need:"sign-in",act:"sign-in"},"needs-verification":{stage:"needs-you",need:"review-result"},"proof-refuted":{stage:"needs-you",need:"review-result"},"no-build-record":{stage:"needs-you",need:"review-result"},"verification-needed":{stage:"needs-you",need:"review-result"},"evidence-mismatch":{stage:"needs-you",need:"review-result"},"record-incomplete":{stage:"needs-you",need:"review-result"},"evidence-damaged":{stage:"needs-you",need:"review-result"}};var kB=Object.fromEntries(Object.entries(Tx).flatMap(([e,t])=>t.need===void 0?[]:[[e,t.need]]));var jR="The check result couldn't be read.",OB=`${jR} Run checks on it, or open the result to see why.`;var zB={ok:jo`<path d="M20 6 9 17l-5-5"/>`,running:jo`<circle cx="12" cy="12" r="4"/>`,none:jo`<circle cx="12" cy="12" r="3"/>`,note:jo`<path d="M12 8v5"/><path d="M12 16.5h.01"/><path d="M10.3 3.9 2.4 18a2 2 0 0 0 1.7 3h15.8a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"/>`,failed:jo`<path d="M18 6 6 18M6 6l12 12"/>`};function Fm(e,t){return e==="way-in"?"password":t.automatic===!0?"automatic":e==="none"||t.passwordless||e==="standard"&&t.remembered?"click":"password"}function Ax(e,t){let i=Fm(e,t);return i==="password"?"password":i==="automatic"?"automatic":e==="none"?"none":t.passwordless?"passwordless":"remembered"}function Nl(e,t){return e==="way-in"?t.passwordless?"Passwordless is on, but this creates a new way in, so it still asks for your password.":t.remembered?"A remembered password doesn’t count here: this creates a new way in.":"This creates a new way in, so it always asks for your password.":t.automatic===!0?"Approved automatically by your rule.":e==="none"?"":t.passwordless?"No password needed: Passwordless is on for your account.":e==="standard"&&t.remembered?t.rememberedUntil?`No password needed: remembered on this computer until ${t.rememberedUntil}.`:"No password needed: remembered on this computer.":"Asks for your password."}var O=e=>["path",{d:e}],Wr=(e,t,i)=>["circle",{cx:e,cy:t,r:i}],ku={home:[O("m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"),O("M9 22V12h6v10")],tasks:[O("m3 17 2 2 4-4"),O("m3 7 2 2 4-4"),O("M13 6h8"),O("M13 12h8"),O("M13 18h8")],flows:[["rect",{x:3,y:3,width:8,height:8,rx:2}],O("M7 11v4a2 2 0 0 0 2 2h4"),["rect",{x:13,y:13,width:8,height:8,rx:2}]],agents:[O("M12 8V4H8"),["rect",{x:4,y:8,width:16,height:12,rx:2}],O("M2 14h2"),O("M20 14h2"),O("M15 13v2"),O("M9 13v2")],projects:[O("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")],settings:[O("M21 4h-7"),O("M10 4H3"),O("M21 12h-9"),O("M8 12H3"),O("M21 20h-5"),O("M12 20H3"),O("M14 2v4"),O("M8 10v4"),O("M16 18v4")],pen:[O("M21.17 6.81a1 1 0 0 0-3.99-3.99L3.84 16.17a2 2 0 0 0-.5.83l-1.32 4.35a.5.5 0 0 0 .62.62l4.35-1.32a2 2 0 0 0 .83-.5z")],arrow:[O("M5 12h14"),O("m12 5 7 7-7 7")],plus:[O("M12 5v14"),O("M5 12h14")],send:[O("M12 19V5"),O("m5 12 7-7 7 7")],stop:[["rect",{x:6,y:6,width:12,height:12,rx:2}]],x:[O("M18 6 6 18"),O("m6 6 12 12")],back:[O("m15 18-6-6 6-6")],menu:[O("M4 6h16"),O("M4 12h16"),O("M4 18h16")],search:[Wr(11,11,7),O("m20 20-3.5-3.5")],chevron:[O("m6 9 6 6 6-6")],check:[O("M20 6 9 17l-5-5")],alert:[Wr(12,12,9),O("M12 8v4"),O("M12 16h.01")],more:[Wr(5,12,1),Wr(12,12,1),Wr(19,12,1)],file:[O("M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"),O("M14 3v5h5")],minus:[O("M5 12h14")],fit:[O("M15 3h6v6"),O("M9 21H3v-6"),O("M21 3l-7 7"),O("M3 21l7-7")],bolt:[O("M13 2 4 14h7l-1 8 9-12h-7z")],code:[O("m16 18 6-6-6-6"),O("m8 6-6 6 6 6")],sun:[Wr(12,12,4),O("M12 2v2"),O("M12 20v2"),O("m4.93 4.93 1.41 1.41"),O("m17.66 17.66 1.41 1.41"),O("M2 12h2"),O("M20 12h2"),O("m6.34 17.66-1.41 1.41"),O("m19.07 4.93-1.41 1.41")],cpu:[["rect",{x:4,y:4,width:16,height:16,rx:2}],["rect",{x:9,y:9,width:6,height:6,rx:1}],O("M15 2v2"),O("M15 20v2"),O("M2 15h2"),O("M2 9h2"),O("M20 15h2"),O("M20 9h2"),O("M9 2v2"),O("M9 20v2")],bell:[O("M10.27 21a2 2 0 0 0 3.46 0"),O("M3.26 15.33A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.67C19.41 13.96 18 12.5 18 8A6 6 0 0 0 6 8c0 4.5-1.41 5.96-2.74 7.33")],shield:[O("M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z")],folder:[O("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")],people:[O("M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"),Wr(9,7,4),O("M22 21v-2a4 4 0 0 0-3-3.87"),O("M16 3.13a4 4 0 0 1 0 7.75")],coin:[Wr(12,12,10),O("M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8"),O("M12 18V6")],monitor:[["rect",{x:2,y:3,width:20,height:14,rx:2}],O("M8 21h8"),O("M12 17v4")],list:[O("M8 6h13"),O("M8 12h13"),O("M8 18h13"),O("M3 6h.01"),O("M3 12h.01"),O("M3 18h.01")],board:[["rect",{x:3,y:3,width:18,height:18,rx:2}],O("M9 3v18"),O("M15 3v18")],panel:[["rect",{x:3,y:3,width:18,height:18,rx:2}],O("M15 3v18")]};var Dx=H(ri(),1);var Te=(...e)=>e.filter(Boolean).join(" ");var Nx=H(F(),1);function Ot({name:e,small:t=!1}){return(0,Nx.jsx)("svg",{className:Te("k-i",t&&"k-i-sm"),viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:ku[e].map((i,s)=>(0,Dx.createElement)(i[0],{key:s,...i[1]}))})}var jt=H(F(),1);function vt({variant:e="outline",sm:t,iconOnly:i,lead:s,label:r,docked:n,busy:o,className:a,type:l="button",...c}){return(0,jt.jsx)("button",{type:l,className:Te("k-btn",`k-btn-${e}`,t&&"k-btn-sm",i&&"k-btn-icon",n&&"k-docked",o&&"busy",a),"aria-label":i?r:void 0,title:i?r:void 0,"aria-busy":o?!0:void 0,...c,children:i?(0,jt.jsx)(Ot,{name:i}):(0,jt.jsx)("span",{className:"k-face",children:o?(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsx)("span",{className:"k-spin","aria-hidden":"true"}),o]}):(0,jt.jsxs)(jt.Fragment,{children:[s&&(0,jt.jsx)(Ot,{name:s,small:!0}),r]})})})}function $m({variant:e="outline",sm:t,label:i,lead:s,className:r,...n}){return(0,jt.jsx)("a",{className:Te("k-btn",`k-btn-${e}`,t&&"k-btn-sm",r),...n,children:(0,jt.jsxs)("span",{className:"k-face",children:[s&&(0,jt.jsx)(Ot,{name:s,small:!0}),i]})})}var Bx=H(F(),1);function Cu({word:e,tone:t="",dot:i=!0}){return(0,Bx.jsx)("span",{className:Te("k-chip",t,!i&&"nodot"),children:e})}var XR=H(F(),1);var Ox=H(F(),1);var zx=H(F(),1);var Hx=H(ri(),1);var Ln=H(F(),1);function Ux({label:e,hint:t,error:i,children:s}){let r=(0,Hx.useId)(),n=Te(t&&`${r}-hint`,`${r}-err`);return(0,Ln.jsxs)("div",{className:"k-field",children:[(0,Ln.jsx)("label",{className:"k-label",htmlFor:r,children:e}),s({id:r,describedBy:n,invalid:!!i}),t&&(0,Ln.jsx)("p",{className:"k-hint",id:`${r}-hint`,children:t}),(0,Ln.jsx)("span",{className:"k-err",id:`${r}-err`,role:"alert",children:i??""})]})}var Px=({className:e,...t})=>(0,Ln.jsx)("input",{className:Te("k-input",e),...t});var Eu=H(F(),1);function qx({items:e,sm:t,wide:i,className:s,...r}){return(0,Eu.jsx)("span",{className:Te("k-selw",t&&"sm",i&&"wide",s),children:(0,Eu.jsx)("select",{className:"k-sel",...r,children:e.map(n=>{let[o,a]=typeof n=="string"?[n,n]:n;return(0,Eu.jsx)("option",{value:o,children:a},o)})})})}var Ix=H(F(),1);var Fx=H(F(),1);var Qs=H(F(),1);function $x({name:e,legend:t,current:i,items:s,onChange:r}){return(0,Qs.jsxs)("fieldset",{className:"k-radios",children:[(0,Qs.jsx)("legend",{className:"k-sr",children:t}),s.map(n=>(0,Qs.jsxs)("label",{className:"k-opt",children:[(0,Qs.jsx)("input",{type:"radio",name:e,value:n.value,checked:n.value===i,onChange:()=>r(n.value)}),(0,Qs.jsxs)("span",{children:[(0,Qs.jsx)("b",{children:n.label}),n.text&&(0,Qs.jsx)("span",{children:n.text})]}),n.tag]},n.value))]})}var Kx=H(F(),1),Go=({children:e})=>(0,Kx.jsx)("div",{className:"k-acts",children:e});var ZR=H(ri(),1),Wx=H(F(),1);var Yo=H(F(),1),Km=({children:e})=>(0,Yo.jsxs)("p",{className:"k-notice",role:"alert",children:[(0,Yo.jsx)(Ot,{name:"alert",small:!0}),(0,Yo.jsx)("span",{children:e})]});var Bl=({children:e})=>(0,Yo.jsx)("p",{className:"k-note",children:e});var Ol=H(F(),1);function Tu({title:e,text:t,action:i}){return(0,Ol.jsxs)("div",{className:"k-empty",children:[(0,Ol.jsx)("p",{className:"k-empty-t",children:e}),t&&(0,Ol.jsx)("p",{className:"k-empty-x",children:t}),i]})}var Vx=H(F(),1);var Wm=H(F(),1);var Vm=H(F(),1);var jm=H(F(),1);var jr=H(ri(),1),g2=H(Zu(),1);var QR="toolroll.key",JR="x-toolroll-key",e8=/^[0-9a-f]{64}$/;function jx(){try{let e=globalThis.localStorage?.getItem(QR)??null;if(e===null)return null;let t=JSON.parse(e),i=typeof t=="object"&&t!==null?t.key:null;return typeof i=="string"&&e8.test(i)?i:null}catch{return null}}function Au(e){let t=jx();return t===null?e:{...e,[JR]:t}}function Gx(){let e=jx();return e===null?["toolroll"]:["toolroll",`toolroll.key.${e}`]}var ys="form.k-sform",Hl=e=>HTMLFormElement.prototype.getAttribute.call(e,"id")??"",t8=e=>Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements").get.call(e),Yx="http://www.w3.org/2000/svg",Js=e=>e.querySelector("[data-k-proof]"),bs=e=>e.querySelector("[data-k-save]"),e2=e=>new Set(Array.from(Js(e)?.querySelectorAll("input[name]")??[]).map(t=>t.name));function Ru(e,t=null){let i=e2(e),s;try{s=t?new FormData(e,t):new FormData(e)}catch{s=new FormData(e)}let r=[];return s.forEach((n,o)=>{!i.has(o)&&typeof n=="string"&&r.push([o,n])}),r}function Jm(e){let t=new Map;for(let[i,s]of e)t.set(i,[...t.get(i)??[],s]);return t}function t2(e){let t=e2(e),i=[];for(let s of Array.from(t8(e)))!s.name||s.type==="hidden"||s.type==="submit"||s.type==="button"||t.has(s.name)||i.includes(s.name)||i.push(s.name);return i}var ji=e=>(e??"").replace(/\s+/g," ").trim();function i2(e,t){return e.querySelector(`[name="${CSS.escape(t)}"]`)}function i8(e,t){let i=i2(e,t);if(i===null)return t;let s=i.getAttribute("aria-label");if(s)return ji(s);if(i.type==="radio"||i.type==="checkbox"&&i.getAttribute("role")!=="switch"){let o=i.closest("fieldset")?.querySelector("legend");if(o)return ji(o.textContent)}let r=i.closest(".k-frow")?.querySelector(".k-frow-t");if(r)return ji(r.textContent);let n=i.labels?.[0];return n?ji(n.querySelector(".k-sl-t, b")?.textContent??n.textContent):t}function s8(e,t,i){let s=i2(e,t);if(s instanceof HTMLSelectElement)return ji(Array.from(s.options).find(o=>o.value===i[0])?.textContent??i[0]);if(s?.type==="radio"||s?.type==="checkbox"){let o=Array.from(e.querySelectorAll(`[name="${CSS.escape(t)}"]`));if(s.type==="checkbox"&&s.getAttribute("role")==="switch")return i.length>0?"On":"Off";let a=o.filter(l=>i.includes(l.value)).map(l=>ji(l.labels?.[0]?.querySelector("b")?.textContent??l.labels?.[0]?.textContent??l.value));return a.length===0?"none":a.join(", ")}let r=i[0]??"";if(s?.type==="password")return r===""?"unchanged":"a new value";let n=r.split(`
|
|
155
155
|
`)[0].trim();return n===""?"empty":n.length>40?`${n.slice(0,39)}…`:`${n}${r.includes(`
|
|
156
156
|
`)?"…":""}`}var r8=(e,t)=>JSON.stringify(e??[])===JSON.stringify(t??[]);function e_(e){let t=Jm(Ru(e));return t2(e).filter(i=>!r8(e.kInit?.get(i),t.get(i)))}function s2(e,t){let i=Jm(t),s=e.hasAttribute("data-k-gate")?e_(e):t2(e);return s.length>3?`${s.length} changes`:s.map(r=>`${i8(e,r)}: ${s8(e,r,i.get(r)??[])}`).join(" · ")}function r2(e,t){let i=e.dataset.kProofIf;if(!i)return!0;let s=i.indexOf("=");return t.some(([r,n])=>r===i.slice(0,s)&&n===i.slice(s+1))}var Ym=e=>e!==null&&e.querySelector('input[type="password"], a.sso-step-up')!==null;function Mu(e){if(e.kPrepped)return;e.kPrepped=!0,e.kInit=Jm(Ru(e));for(let i of Array.from(Js(e)?.querySelectorAll("input[required]")??[]))i.removeAttribute("required"),i.dataset.kRequired="";let t=bs(e);t&&(t.dataset.kVariant=t.classList.contains("k-btn-danger")?"danger":t.classList.contains("k-btn-outline")?"outline":"primary")}function Xx(){for(let e of Array.from(document.querySelectorAll(ys)))Mu(e)}function n8(e,t){e.classList.remove("k-btn-primary","k-btn-outline","k-btn-danger"),e.classList.add(`k-btn-${t}`)}function o8(e){for(let t of Array.from(document.querySelectorAll(`${ys}[data-k-gate]`))){let i=bs(t);!i||i.dataset.kVariant!=="primary"||n8(i,t===e||e===null?"primary":"outline")}}function a8(e,t){if(!e.hasAttribute("data-k-gate"))return;let i=e_(e),s=e.querySelector(".k-ssave-said");if(e.toggleAttribute("data-dirty",i.length>0),s)if(s.dataset.kIdle===void 0&&(s.dataset.kIdle=s.textContent??""),i.length===0)s.textContent=s.dataset.kIdle??"";else{let r=Ru(e),n=Js(e)!==null&&Ym(Js(e))&&r2(e,r)?" · Asks for your password.":"";s.textContent=`${s2(e,r)}${n}`}t&&o8(i.length>0?e:document.querySelector(`${ys}[data-k-gate][data-dirty]`))}function n2(e){let t=document.createElementNS(Yx,"svg");t.setAttribute("class","k-i"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("aria-hidden","true");for(let i of ku[e]){let s=document.createElementNS(Yx,i[0]);for(let[r,n]of Object.entries(i[1]))s.setAttribute(r,String(n));t.append(s)}return t}function zl(e,t,i){let s=document.createElement("button");s.type="button",s.className=`k-btn k-btn-${t}`;for(let[n,o]of Object.entries(i))s.setAttribute(n,o);let r=document.createElement("span");return r.className="k-face",r.textContent=e,s.append(r),s}function Ul(e,t){let i=bs(e);if(!i)return;let s=i.querySelector(".k-face");if(s&&i.dataset.kLabel===void 0&&(i.dataset.kLabel=s.textContent??""),i.classList.toggle("busy",t),i.toggleAttribute("aria-busy",t),s)if(s.replaceChildren(),t){let r=document.createElement("span");r.className="k-spin",r.setAttribute("aria-hidden","true"),s.append(r,i.dataset.kBusy??"Saving…")}else s.textContent=i.dataset.kLabel??"Save"}function o2(e){let t=e.querySelector(".k-ssave-err");t&&t.childElementCount>0&&t.replaceChildren(),bs(e)?.removeAttribute("aria-describedby")}function Xm(e,t){e.kPending=!1,e.kSent=!1,Ul(e,!1);for(let s of Array.from(Js(e)?.querySelectorAll('input[type="password"]')??[]))s.value="";let i=e.querySelector(".k-ssave-err");if(i){let s=document.createElement("p");s.className="k-notice",s.setAttribute("role","alert"),s.append(n2("alert"));let r=document.createElement("span");r.textContent=t,s.append(r),i.replaceChildren(s),i.id||(i.id=`${Hl(e)||"k-sform"}-err`),bs(e)?.setAttribute("aria-describedby",i.id),(e.querySelector(".k-ssave")??i).scrollIntoView({block:"center",behavior:"instant"})}bs(e)?.focus({preventScroll:!0})}var a2=e=>{let t=ji(e);return t===""?t:`${t.charAt(0).toUpperCase()}${t.slice(1)}${/[.!?]$/.test(t)?"":"."}`},Zm=e=>`${a2(e)} Your edits are still here.`;function l8(e){try{let i=new DOMParser().parseFromString(e,"text/html").querySelector(".k-notice[role=alert] span, .problem, .k-notice[role=alert], [role=alert]"),s=ji(i?.textContent);return s===""?null:s.slice(0,400)}catch{return null}}var Xo=!1,c8=e=>ji(e.closest("section")?.querySelector("h3")?.childNodes[0]?.textContent??e.closest("section")?.querySelector("h3")?.textContent)||"a section",h8=e=>Array.from(document.querySelectorAll(`${ys}[data-k-gate][data-dirty]`)).filter(t=>t!==e);function u8(e){let t=new URL(window.location.href);for(let s of["said","problem","unconfirmed"])t.searchParams.delete(s);t.searchParams.set("unconfirmed",Hl(e));let i=e.closest("section[id]")?.id;return`${t.pathname}${t.search}${i?`#${i}`:""}`}var d8=(e,t)=>t instanceof HTMLButtonElement&&t.form===e&&t.hasAttribute("formaction")?t.formAction:new URL(HTMLFormElement.prototype.getAttribute.call(e,"action")??"",window.location.href).href;function Gm(e){Xo=!0,window.location.assign(Hl(e)?u8(e):window.location.href)}async function f8(e,t,i,s){Ul(e,!0);let r=new URLSearchParams;for(let[d,f]of[...t,...i])r.append(d,f);let n=d8(e,s),o;try{o=await fetch(n,{method:"POST",body:r,credentials:"same-origin",redirect:"follow",headers:Au({accept:"text/html"})})}catch{Gm(e);return}let a=new URL(o.url||n,window.location.href);if(a.origin!==window.location.origin||a.pathname==="/login"){Gm(e);return}let l=a.searchParams.get("problem");if(l){Xm(e,Zm(l));return}if(!o.redirected&&o.status>=400&&o.status<500){let d=l8(await o.text().catch(()=>""));Xm(e,Zm(d??`Toolroll refused this (${o.status}). Nothing changed`));return}if(!o.ok){Gm(e);return}let c=a.pathname===window.location.pathname,h=e.closest("section[id]")?.id;Xo=!0;let u=`${a.pathname}${a.search}${c&&h?`#${h}`:""}`;o.redirected&&`${a.pathname}${a.search}`!=`${window.location.pathname}${window.location.search}`?window.location.assign(u):(o.redirected&&window.history.replaceState(window.history.state,"",u),window.location.reload())}function Zx(e,t){let i=e.hasAttribute("data-k-download");i||(Xo=!0),e.kGo=!0;try{t instanceof HTMLButtonElement&&t.form===e?e.requestSubmit(t):e.requestSubmit()}finally{e.kGo=!1}if(i){Xo=!1,e.kPending=!1,e.kSent=!1,Ul(e,!1);for(let s of Array.from(Js(e)?.querySelectorAll('input[type="password"]')??[]))s.value=""}}function Qm(e,t,i,s){if(e.kPending=!0,e.hasAttribute("data-k-native")){if(e.hasAttribute("data-k-download")||Ul(e,!0),e.hasAttribute("data-k-prepare")){let r=!1,n=o=>{r||(r=!0,o===null?Zx(e,s):Xm(e,Zm(o)))};e.dispatchEvent(new CustomEvent("k-prepare",{detail:{done:n}}));return}Zx(e,s);return}f8(e,t,i,s)}var l2=e=>Array.from(e?.querySelectorAll("input[name]")??[]).map(t=>[t.name,t.value]);function p8(e,t,i){let s=Js(e),r=s.nextElementSibling,n=`${Hl(e)||"k-sform"}-pop`,o=document.createElement("div");o.className="k-pop",o.id=n,o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-labelledby",`${n}-h`),o.tabIndex=-1;let a=document.createElement("div");a.className="k-pop-h";let l=document.createElement("h3");l.id=`${n}-h`,l.textContent="Confirm with your password";let c=zl("","ghost",{"data-k-close":"","aria-label":"Close",title:"Close"});c.classList.add("k-btn-sm","k-btn-icon"),c.replaceChildren(n2("x")),a.append(l,c);let h=document.createElement("p");h.className="k-pop-terms",h.textContent=s2(e,t)||ji(e.dataset.kConfirm);let u=document.createElement("p");u.textContent=[e.dataset.kConfirm,e.dataset.kNote].filter(Boolean).map(g=>a2(g)).join(" ");let d=document.createElement("div");d.className="k-acts";let f=ji(bs(e)?.dataset.kLabel??bs(e)?.textContent)||"Save";d.append(zl(f,"primary",{"data-k-sconfirm":""}),zl("Cancel","ghost",{"data-k-close":""})),o.append(a,h,u,s,d),e.append(o),e.kSnapshot=t,e.kSubmitter=i,e.kPending=!0,e.kSent=!1,e.kClose=Vr(o,i??bs(e),{onClose:()=>{if(r&&r.parentElement===e?r.before(s):e.insertBefore(s,e.querySelector(".k-ssave")),o.remove(),e.kClose=null,!e.kSent){e.kPending=!1;for(let g of Array.from(s.querySelectorAll('input[type="password"]')))g.value="",g.setCustomValidity("")}}})}function Qx(e){let t=Js(e),i=Array.from(t?.querySelectorAll('input[type="password"]')??[]).find(r=>r.value==="");if(i){i.setCustomValidity("Enter your password."),i.reportValidity(),i.focus();return}let s=l2(t);e.kSent=!0,e.kClose?.(),Qm(e,e.kSnapshot??[],s,e.kSubmitter??null)}function g8(e,t){if(e.kPending||(Mu(e),e.hasAttribute("data-k-gate")&&e_(e).length===0&&!(t instanceof HTMLButtonElement&&t.hasAttribute("formaction"))))return;let i=e.hasAttribute("data-k-download")?[]:h8(e);if(i.length>0){m8(e,i,t);return}c2(e,t)}function m8(e,t,i){let s=[...new Set(t.map(c8))],r=`${Hl(e)||"k-sform"}-discard`,n=document.createElement("div");n.className="k-pop",n.id=r,n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-labelledby",`${r}-h`),n.tabIndex=-1;let o=document.createElement("div");o.className="k-pop-h";let a=document.createElement("h3");a.id=`${r}-h`,a.textContent="Unsaved changes",o.append(a);let l=document.createElement("p");l.textContent=`You have unsaved changes in ${s.length>1?`${s.slice(0,-1).join(", ")} and ${s.at(-1)}`:s[0]}. Saving this will discard them.`;let c=document.createElement("div");c.className="k-acts";let h=zl("Save this anyway","primary",{"data-k-discard":""});c.append(h,zl("Cancel","ghost",{"data-k-close":""})),n.append(o,l,c),e.append(n),e.kPending=!0;let u=!1,d=Vr(n,i??bs(e),{onClose:()=>{n.remove(),e.kPending=!1,u&&c2(e,i)}});h.addEventListener("click",f=>{f.preventDefault(),u=!0,d()}),h.focus()}function c2(e,t){o2(e);let i=Ru(e,t);if(t instanceof HTMLButtonElement&&t.hasAttribute("formaction")){Qm(e,i,[],t);return}let s=Js(e);if(s!==null&&r2(e,i)&&Ym(s)){p8(e,i,t);return}Qm(e,i,s!==null&&!Ym(s)?l2(s):[],t)}var Jx=!1;function h2(){if(Jx||typeof document>"u")return;Jx=!0,document.documentElement.classList.add("k-js");let e=i=>{let s=i.target?.closest?.(ys);s&&Mu(s)};document.addEventListener("focusin",e,!0),document.addEventListener("pointerdown",e,!0);let t=i=>{let s=i.target,r=s?.form;if(!r||!r.matches(ys)||s.closest("[data-k-proof], .k-pop")){s?.type==="password"&&s.setCustomValidity("");return}Mu(r),o2(r),a8(r,!0)};document.addEventListener("input",t),document.addEventListener("change",t),document.addEventListener("submit",i=>{let s=i.target;if(!(s instanceof HTMLFormElement)||!s.matches(ys))return;let r=s;if(!r.kGo){if(i.preventDefault(),i.stopImmediatePropagation(),r.kClose){Qx(r);return}g8(r,i.submitter??null)}},!0),document.addEventListener("click",i=>{let s=i.target?.closest?.("[data-k-sconfirm]");if(!s)return;let r=s.closest(ys);r&&(i.preventDefault(),Qx(r))}),window.addEventListener("pageshow",()=>{Xo=!1;for(let i of Array.from(document.querySelectorAll(ys)))i.kPending=!1,i.kSent=!1,Ul(i,!1)}),window.addEventListener("standing-orders:workspace-rendered",Xx),window.addEventListener("beforeunload",i=>{Xo||document.querySelector(`${ys}[data-k-gate][data-dirty]`)===null||i.preventDefault()}),Xx()}var _8="(max-width: 760px)",v8='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',t_=()=>typeof window<"u"&&window.matchMedia(_8).matches,y8=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches;function Pl(e){let t=e.closest(".k-composer");if(t===null)return;let i=getComputedStyle(e),s=parseFloat(i.lineHeight)||21,r=(parseFloat(i.paddingTop)||0)+(parseFloat(i.paddingBottom)||0),n=s*(Number(e.dataset.max)||8)+r,o=s*(Number(e.dataset.min)||1)+r;e.style.height="auto",e.style.height=`${Math.max(o,Math.min(e.scrollHeight,n))}px`,e.style.overflowY=e.scrollHeight>n+1?"auto":"hidden";let a=e.value.trim()!=="";t.classList.toggle("has-text",a);for(let l of t.querySelectorAll(".k-send[data-gate]:not(:disabled)"))l.setAttribute("aria-disabled",String(!a))}function u2(){let e=window.visualViewport;if(!e)return;let t=Math.max(0,Math.round(window.innerHeight-e.height-e.offsetTop));document.documentElement.style.setProperty("--kb",`${t}px`),document.documentElement.classList.toggle("kb-open",t>80)}var zt=[];function b8(e,t){if(t===null||!t.isConnected)return;let i=t.getBoundingClientRect(),s=e.offsetWidth||336,r=e.offsetHeight||200,n=Math.min(Math.max(8,i.right-s),window.innerWidth-s-8),o=i.bottom+6,a=o+r>window.innerHeight-8?Math.max(8,i.top-r-6):o;e.style.left=`${Math.round(n)}px`,e.style.top=`${Math.round(a)}px`,e.style.setProperty("--origin",`${i.right-n}px ${a>=o?0:r}px`)}function Vr(e,t,i={}){zt.length>0&&!e.classList.contains("k-pop")&&p2("close");let r=e.classList.contains("k-pop"),n=t_();e.isConnected||document.body.append(e);let o=document.createElement("div");o.className=`k-scrim${i.dim??(!r||n)?" dim":""}${zt.length>0?" stacked":""}`,e.before(o),e.hidden=!1,e.setAttribute("role",e.getAttribute("role")??"dialog"),e.setAttribute("aria-modal","true"),e.hasAttribute("tabindex")||(e.tabIndex=-1),e.classList.toggle("stacked",zt.length>0),e.classList.toggle("as-sheet",r&&n),r&&!n&&b8(e,t),y8()||(e.classList.remove("k-grow-in"),e.offsetWidth,e.classList.add("k-grow-in"));let a=[];for(let h=e;h&&h!==document.body;h=h.parentElement)h.inert&&(h.inert=!1,a.push(h));let l=[];for(let h=e;h!==document.body&&h.parentElement;h=h.parentElement)for(let u of Array.from(h.parentElement.children))u===h||u===o||u.inert||(u.inert=!0,l.push(u));let c={panel:e,scrim:o,trigger:t,inerted:l,released:a,onClose:i.onClose};return w8(),zt.push(c),o.addEventListener("click",()=>Nn(c,"scrim")),(e.querySelector("[autofocus]")??e.querySelector('input:not([type="hidden"]), textarea, select')??e).focus(),()=>Nn(c,"close")}function Nn(e,t){let i=zt.indexOf(e);if(!(i<0)){for(let s of zt.slice(i+1).reverse())Nn(s,"removed");zt.splice(i,1),zt.length===0&&(Dn?.disconnect(),Dn=null);for(let s of e.inerted)s.inert=!1;for(let s of e.released)s.isConnected&&(s.inert=!0);e.scrim.remove(),e.panel.hidden=!0,e.panel.classList.remove("k-grow-in","as-sheet","stacked"),S8(e.trigger),e.onClose?.(t)}}function i_(){for(let e of zt.slice().reverse())e.panel.isConnected||Nn(e,"removed");zt.length===0&&(Dn?.disconnect(),Dn=null)}var Dn=null;function w8(){Dn!==null||typeof MutationObserver>"u"||(Dn=new MutationObserver(()=>{zt.some(e=>!e.panel.isConnected)&&i_()}),Dn.observe(document.body,{childList:!0,subtree:!0}))}function p2(e="removed"){for(let t of zt.slice().reverse())Nn(t,e)}function Lu(e){return e!=null&&e.isConnected&&e.getClientRects().length>0}function S8(e){let t=e?.getAttribute("data-k-open");if(Lu(e)){e.focus();return}((t?Array.from(document.querySelectorAll(`[data-k-open="${CSS.escape(t)}"]`)).find(Lu):void 0)??Array.from(document.querySelectorAll(".k-dock .k-btn")).find(Lu))?.focus()}function k8(e){let t=zt[zt.length-1];if(!t)return;if(e.key==="Escape"){e.preventDefault(),Nn(t,"escape");return}if(e.key!=="Tab")return;let i=Array.from(t.panel.querySelectorAll(v8)).filter(Lu);if(i.length===0){e.preventDefault(),t.panel.focus();return}let s=i[0],r=i[i.length-1];e.shiftKey&&(document.activeElement===s||document.activeElement===t.panel)?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),s.focus())}function ql(e,t,i){let s=t_(),r=document.createElement("div"),n=`k-menu-${Math.random().toString(36).slice(2,8)}`;r.className=s?"k-sheet":"k-pop k-pop-menu",r.setAttribute("role","dialog"),r.setAttribute("aria-labelledby",n);let o=document.createElement("div");o.className=s?"k-sheet-h":"k-pop-h";let a=document.createElement(s?"h2":"h3");a.id=n,a.textContent=t;let l=document.createElement("button");l.type="button",l.className="k-btn k-btn-ghost k-btn-sm k-btn-icon",l.setAttribute("aria-label","Close"),l.setAttribute("data-k-close",""),l.textContent="×",o.append(a,l);let c=document.createElement("div");c.className="k-menu";let h=()=>{};for(let u of i){let d=document.createElement("button");d.type="button",d.textContent=u.current?`${u.label} · current`:u.label,u.current&&d.setAttribute("aria-current","true"),d.addEventListener("click",()=>{h(),u.act()}),c.append(d)}return r.append(o,c),h=Vr(r,e,{onClose:()=>r.remove()}),h}function x8(e){let t=e.target,i=t?.closest("[data-k-composer-project]"),s=t?.closest("[data-k-composer-plus]"),r=i?.dataset.kComposerProject??s?.dataset.kComposerPlus;if(r===void 0)return!1;e.preventDefault();let n=document.getElementById(`${r}-project`),o=c=>{if(!n)return;let h=[];try{let u=JSON.parse(n.dataset.items??"[]");Array.isArray(u)&&(h=u.filter(d=>typeof d=="string"))}catch{h=[]}ql(c,"Project",h.map(u=>({label:u,current:u===n.value,act:()=>{n.value=u;let d=document.querySelector(`[data-k-composer-project="${CSS.escape(r)}"] [data-k-project-name]`);d&&(d.textContent=u),document.querySelector(`[data-k-composer-project="${CSS.escape(r)}"]`)?.setAttribute("aria-label",`Project: ${u}. Change`),n.dispatchEvent(new Event("change",{bubbles:!0}))}})))};if(i)return o(i),!0;let a=document.querySelector(`input[type="file"][data-k-attach="${CSS.escape(r)}"]`),l=[];return a&&l.push({label:"Attach a file",act:()=>a.click()}),n&&l.push({label:"Choose project",act:()=>o(document.querySelector(`[data-k-composer-project="${CSS.escape(r)}"]`)??s)}),l.length>0&&ql(s,"Add to your message",l),!0}function C8(e,t){let i=e.closest("[data-k-draft]");if(i===null)return!1;let s=document.getElementById(`${i.dataset.kInto??""}-text`);if(!(s instanceof HTMLTextAreaElement)||s.disabled)return!0;t.preventDefault();let r=i.dataset.kDraft??"",n=s.value;return s.value=n.trim()===""?r:n.includes(r)?n:`${n.trimEnd()}
|
|
157
|
-
${r}`,Pl(s),s.focus(),!0}var d2=!1,f2=new WeakMap;function E8(){let e=document.documentElement;e.classList.add("k-js"),document.addEventListener("keydown",t=>{(t.key==="Tab"||t.key==="F6")&&e.classList.add("k-kbd")},!0),document.addEventListener("pointerdown",()=>{e.classList.remove("k-kbd")},!0)}function Du(){if(d2||typeof document>"u")return;d2=!0,document.addEventListener("input",t=>{let i=t.target;i instanceof HTMLTextAreaElement&&i.classList.contains("k-composer-ta")&&Pl(i)}),document.addEventListener("click",t=>{let i=t.target;if(i===null)return;if(i.closest('.k-send[data-gate][aria-disabled="true"]')){t.preventDefault();return}if(C8(i,t)||x8(t))return;let r=i.closest("[data-k-open]");if(r){let o=document.getElementById(r.dataset.kOpen??"");o&&(t.preventDefault(),Vr(o,r));return}if(i.closest("[data-k-close]")){let o=zt[zt.length-1];o&&o.panel.contains(i)&&(t.preventDefault(),Nn(o,"close"));return}let n=i.closest("button.k-switch[role=switch][data-k-switch]");if(n){let o=n.getAttribute("aria-checked")!=="true";n.setAttribute("aria-checked",String(o));let[a,l]=(n.dataset.kSwitch||"On|Off").split("|"),c=n.querySelector("[data-k-words]");c&&(c.textContent=(o?a:l)??""),n.dispatchEvent(new CustomEvent("k-switch",{bubbles:!0,detail:{on:o}}));return}i.closest("[data-k-print]")&&(t.preventDefault(),window.print())}),document.addEventListener("submit",t=>{let i=t.target;if(!(i instanceof HTMLFormElement)||t.defaultPrevented)return;let s=(t.submitter instanceof HTMLButtonElement?t.submitter:null)??i.querySelector("button[type=submit][data-k-busy]"),r=s?.dataset.kBusy;if(s==null||r===void 0)return;if(i.getAttribute("aria-busy")==="true"){t.preventDefault();return}i.setAttribute("aria-busy","true");let n=s.querySelector(".k-face");n!==null&&(f2.set(s,Array.from(n.childNodes)),n.replaceChildren(Object.assign(document.createElement("span"),{className:"k-spin"}),document.createTextNode(r)),n.firstElementChild?.setAttribute("aria-hidden","true")),s.classList.add("busy")}),window.addEventListener("pageshow",()=>{for(let t of document.querySelectorAll("form[aria-busy=true]")){t.removeAttribute("aria-busy");for(let i of Array.from(Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements").get.call(t))){if(!(i instanceof HTMLButtonElement)||!i.classList.contains("busy")||i.dataset.kBusy===void 0)continue;i.classList.remove("busy");let s=i.querySelector(".k-face"),r=f2.get(i);s!==null&&r!==void 0&&s.replaceChildren(...r)}}}),document.addEventListener("keydown",k8,!0),E8();let e=()=>{i_();for(let t of document.querySelectorAll(".k-composer-ta"))Pl(t)};window.addEventListener("standing-orders:workspace-rendered",e),window.visualViewport?.addEventListener("resize",u2),window.visualViewport?.addEventListener("scroll",u2),h2(),e()}var Fe=H(F(),1);function Nu({kind:e,title:t,sub:i,trigger:s,onClose:r,children:n}){let o=(0,jr.useRef)(null),a=(0,jr.useRef)(r);a.current=r;let l=(0,jr.useId)();(0,jr.useLayoutEffect)(()=>{let f=o.current;if(!f)return;let g=!1,b=Vr(f,s,{onClose:T=>{g=!0,a.current(T)}});return()=>{g||b()}},[s]);let c=(0,Fe.jsx)(vt,{variant:"ghost",iconOnly:"x",label:"Close",sm:e==="popover"||e==="menu","data-k-close":""}),h=e==="menu"?(0,Fe.jsx)("div",{className:"k-menu",children:n}):n,u=e==="drawer"?(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("header",{className:"k-drawer-h",children:[(0,Fe.jsx)("h2",{id:l,children:t}),c]}),(0,Fe.jsx)("div",{className:"k-drawer-b",children:h})]}):e==="sheet"?(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("div",{className:"k-sheet-h",children:[(0,Fe.jsxs)("div",{className:"k-sheet-ht",children:[(0,Fe.jsx)("h2",{id:l,children:t}),i&&(0,Fe.jsx)(Bl,{children:i})]}),c]}),(0,Fe.jsx)("div",{className:"k-sheet-b",children:h})]}):(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("div",{className:"k-pop-h",children:[(0,Fe.jsx)("h3",{id:l,children:t}),c]}),h]}),d=e==="drawer"?"k-drawer":e==="sheet"?"k-sheet":Te("k-pop",e==="menu"&&"k-pop-menu");return(0,g2.createPortal)((0,Fe.jsx)("div",{ref:o,className:d,role:"dialog","aria-modal":"true","aria-labelledby":l,tabIndex:-1,children:u}),document.body)}var m2=H(F(),1);var Gr=H(ri(),1);var yt=H(F(),1);function _2({kind:e,facts:t,label:i,terms:s,text:r,primary:n=!0,docked:o,busy:a="Starting…",onApprove:l,check:c}){let h=Fm(e,t),[u,d]=(0,Gr.useState)(null),[f,g]=(0,Gr.useState)(!1),[b,T]=(0,Gr.useState)(null),_=(0,Gr.useRef)(!1),m=(0,Gr.useId)(),v=async E=>{if(!_.current){_.current=!0,g(!0),T(null);try{let A=await l(E,Ax(e,t));T(A),A===null&&d(null)}finally{_.current=!1,g(!1)}}};if(h==="automatic")return null;let p=E=>{E.preventDefault();let A=new FormData(E.currentTarget).get("token");v(typeof A=="string"?A:"")};return(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)(vt,{variant:n?"primary":"outline",label:i,docked:o===!0,busy:f&&u===null?a:!1,"aria-haspopup":h==="password"?"dialog":void 0,...n?{"data-ink-approve":""}:{},onClick:E=>{!T8(E)||_.current||c!==void 0&&!c()||(h==="password"?d(E.currentTarget):v(null))}}),h==="click"&&b&&(0,yt.jsx)(Km,{children:b}),u&&(0,yt.jsxs)(Nu,{kind:"popover",title:"Confirm with your password",trigger:u,onClose:()=>{d(null),T(null)},children:[r&&(0,yt.jsx)("p",{children:r}),(0,yt.jsx)("p",{className:"k-pop-terms",children:s}),(0,yt.jsxs)("form",{className:"k-field",onSubmit:p,children:[(0,yt.jsx)("label",{className:"k-label",htmlFor:m,children:"Your password"}),(0,yt.jsx)(Px,{id:m,type:"password",name:"token",autoComplete:"current-password",required:!0,autoFocus:!0,"aria-describedby":`${m}-err`,"aria-invalid":b?!0:void 0}),(0,yt.jsx)("span",{className:"k-err",id:`${m}-err`,role:"alert",children:b??""}),(0,yt.jsxs)(Go,{children:[(0,yt.jsx)(vt,{type:"submit",variant:"primary",label:i,busy:f?a:!1}),(0,yt.jsx)(vt,{variant:"ghost",label:"Cancel","data-k-close":""})]})]}),(0,yt.jsx)("p",{className:"k-pop-foot k-note",children:Nl(e,{...t,remembered:!1,passwordless:!1})==="Asks for your password."&&e==="standard"?"After this, standard approvals on this computer need no password for 15 minutes.":Nl(e,t)})]})]})}function T8(e){return e.nativeEvent.isTrusted!==!1}var v2=H(F(),1);var M8=H(ri(),1);var y2=H(F(),1);var b2=H(F(),1);var s_=H(F(),1);var R8=H(ri(),1);var w2=H(F(),1);var S2=H(F(),1);var r_=H(F(),1);var n_=H(F(),1);var k2=H(F(),1);var o_=H(ri(),1);var x2=H(F(),1);var Bu=H(ri(),1);var a_=H(F(),1);var U=H(F(),1),Zo={claude:"Claude Code",codex:"Codex",shell:"Shell"},D8={claude:"An agent you drive by hand",codex:"An agent you drive by hand",shell:"A plain terminal"},N8={connecting:"Connecting…",live:"Live",ended:"Ended",behind:"Catching up…","signed-out":"Signed out. Sign in again to keep typing",gone:"This terminal is gone",offline:"Reconnecting…",busy:"Not reading input. What you type waits"},l_=document.getElementById("so-term-boot"),B8=l_?.dataset.csrf??"",C2=l_?.dataset.session||null,O8=l_?.dataset.passwordless==="1",E2={passwordless:O8,remembered:!1},z8=()=>window.matchMedia("(max-width: 760px)").matches;async function H8(){let e=await fetch("/term/state",{headers:{accept:"application/json"},credentials:"same-origin"});return e.status===401?(location.href=`/login?next=${encodeURIComponent(location.pathname)}`,null):e.ok?await e.json():null}async function M2(e,t){try{return await(await fetch(e,{method:"POST",headers:Au({accept:"application/json"}),credentials:"same-origin",body:new URLSearchParams({csrf:B8,...t})})).json()}catch{return{ok:!1,error:"The console didn't answer. Nothing changed; try again."}}}function T2(){let e=r=>getComputedStyle(document.documentElement).getPropertyValue(r).trim(),t=e("--so-ink"),i=e("--so-code-bg")||e("--so-paper"),s=e("--so-muted");return{background:i,foreground:t,cursor:t,cursorAccent:i,selectionBackground:e("--so-selection")||e("--so-soft"),black:t,brightBlack:s,white:s,brightWhite:t,blue:e("--so-info"),brightBlue:e("--so-info"),green:e("--so-success"),brightGreen:e("--so-success"),red:e("--so-danger"),brightRed:e("--so-danger"),yellow:e("--so-warning"),brightYellow:e("--so-warning"),cyan:e("--so-info"),brightCyan:e("--so-info"),magenta:e("--so-accent-text"),brightMagenta:e("--so-accent-text")}}function U8({session:e,onLink:t,keys:i}){let s=(0,Be.useRef)(null);return(0,Be.useEffect)(()=>{let r=new BS({fontFamily:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace',fontSize:z8()?12:13,cursorBlink:!0,allowProposedApi:!0,scrollback:5e3,macOptionIsMeta:!0,theme:T2()}),n=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>{r.options.theme=T2()};n.addEventListener("change",o);let a=new OS;r.loadAddon(a);let l=new ik;r.loadAddon(l),r.unicode.activeVersion="11",r.open(s.current);let c=null;try{c=new wx,c.onContextLoss(()=>{c?.dispose(),c=null}),r.loadAddon(c)}catch{c=null}let h=null,u=!1,d=!1,f=0,g,b,T=L=>{h?.readyState===WebSocket.OPEN&&h.send(JSON.stringify(L))},_=L=>T({t:"in",d:L});i(_);let m=()=>{try{a.fit()}catch{return}T({t:"resize",cols:r.cols,rows:r.rows})},v=()=>{t(f===0?"connecting":"offline");let L=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/term/${e.id}/socket`,B=new WebSocket(L,Gx());h=B,B.binaryType="arraybuffer";let K=!0;B.onmessage=$=>{if(K&&(r.reset(),K=!1),typeof $.data!="string"){r.write(new Uint8Array($.data));return}let P;try{P=JSON.parse($.data)}catch{return}P.t==="hello"?(f=0,d=P.ended===!0,t(d?"ended":"live"),d||m()):P.t==="exit"?(d=!0,t("ended")):P.t==="input-full"&&(t("busy"),window.clearTimeout(b),b=window.setTimeout(()=>{d||t("live")},2500))},B.onclose=$=>{if(h===B&&(h=null),!u){if($.code===4401)return t("signed-out");if($.code===4404)return t("gone");if(d)return t("ended");t($.code===4008?"behind":"offline"),f+=1,g=window.setTimeout(v,Math.min(8e3,250*2**Math.min(f,5)))}}},p=r.onData(_),E=new ResizeObserver(()=>m());E.observe(s.current);let A=window.visualViewport;return A?.addEventListener("resize",m),v(),r.focus(),()=>{u=!0,window.clearTimeout(g),window.clearTimeout(b),n.removeEventListener("change",o),E.disconnect(),A?.removeEventListener("resize",m),p.dispose(),h?.close(1e3),r.dispose()}},[e.id]),(0,U.jsx)("div",{className:"term-screen",ref:s})}function P8({sendRef:e}){let[t,i]=(0,Be.useState)(!1),s=(n,o)=>(0,U.jsx)(vt,{sm:!0,className:"term-key",label:n,onPointerDown:a=>{a.preventDefault(),e.current?.(o)}},n),r=n=>{e.current?.(String.fromCharCode(n.toUpperCase().charCodeAt(0)-64)),i(!1)};return(0,U.jsxs)("div",{className:"term-keys",role:"toolbar","aria-label":"Terminal keys",children:[s("Esc","\x1B"),s("Tab"," "),(0,U.jsx)(vt,{sm:!0,className:"term-key",label:"Ctrl","aria-pressed":t,onPointerDown:n=>{n.preventDefault(),i(o=>!o)}}),t?(0,U.jsx)(U.Fragment,{children:["c","d","r","l","z"].map(n=>(0,U.jsx)(vt,{sm:!0,className:"term-key",label:`^${n.toUpperCase()}`,onPointerDown:o=>{o.preventDefault(),r(n)}},n))}):(0,U.jsxs)(U.Fragment,{children:[s("↑","\x1B[A"),s("↓","\x1B[B"),s("←","\x1B[D"),s("→","\x1B[C"),s("/","/"),s("⏎","\r")]})]})}function q8({state:e,onStarted:t,onCancel:i}){let[s,r]=(0,Be.useState)(e.projects[0]?.path??""),[n,o]=(0,Be.useState)(e.programs[0]??"claude");if(e.projects.length===0)return(0,U.jsx)("div",{className:"term-form",children:(0,U.jsx)(Tu,{title:"No projects yet.",text:"Add a project in the console first, then start a terminal in it.",action:(0,U.jsx)($m,{sm:!0,href:"/projects",label:"Open Projects"})})});let a=e.projects.find(c=>c.path===s)?.name??"",l=async c=>{let h=await M2("/term/start",{repo:s,program:n,password:c??""});return h.ok&&h.id!==void 0?(t(h.id),null):h.error??"The terminal didn't start. Nothing changed."};return(0,U.jsxs)("section",{className:"term-form","aria-labelledby":"term-new-title","data-term-new":!0,children:[(0,U.jsx)("h2",{id:"term-new-title",className:"k-sr",children:"New terminal"}),(0,U.jsx)(Ux,{label:"Project",children:c=>(0,U.jsx)(qx,{id:c.id,wide:!0,value:s,onChange:h=>r(h.target.value),items:e.projects.map(h=>[h.path,h.name])})}),(0,U.jsxs)("div",{className:"k-field term-radios",children:[(0,U.jsx)("span",{className:"k-label",children:"Program"}),(0,U.jsx)($x,{name:"program",legend:"Program",current:n,onChange:c=>o(c),items:e.programs.map(c=>({value:c,label:Zo[c],text:D8[c]}))})]}),(0,U.jsxs)("p",{className:"term-terms",children:[Zo[n]," · ",a," · a fresh worktree on its own branch"]}),(0,U.jsxs)(Go,{children:[(0,U.jsx)(_2,{kind:"step-up",facts:E2,label:"Start terminal",terms:`${Zo[n]} in ${a}, a fresh worktree on its own branch.`,onApprove:l}),i!==null&&(0,U.jsx)(vt,{variant:"ghost",label:"Cancel",onClick:i})]}),(0,U.jsx)(Bl,{children:`${Nl("step-up",E2)} A terminal can do anything you can on this computer. Your default branch is never touched.`})]})}function I8({session:e,onDone:t}){let[i,s]=(0,Be.useState)(null),[r,n]=(0,Be.useState)(!1),[o,a]=(0,Be.useState)(null),l=e.endedAt===null,c=l?"close":"remove",h=async()=>{n(!0),a(null);let u=await M2(`/term/${e.id}/${c}`,{});if(n(!1),!u.ok){a(u.error??"That didn't work. Nothing changed.");return}s(null),await t()};return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(vt,{variant:"ghost",sm:!0,label:l?"Close":"Remove","aria-haspopup":"dialog",onClick:u=>s(u.currentTarget),"data-term-end":c}),i!==null&&(0,U.jsxs)(Nu,{kind:"popover",title:l?"Close this terminal?":"Remove this terminal?",trigger:i,onClose:()=>{s(null),a(null)},children:[(0,U.jsx)("p",{className:"k-pop-terms",children:l?"Everything running in it stops. Its branch stays.":"Its worktree is removed. Its branch stays."}),o!==null&&(0,U.jsxs)("p",{className:"k-notice",role:"alert",children:[(0,U.jsx)(Ot,{name:"alert",small:!0}),(0,U.jsx)("span",{children:o})]}),(0,U.jsxs)(Go,{children:[(0,U.jsx)(vt,{variant:"danger",label:l?"Close terminal":"Remove terminal",busy:r?l?"Closing…":"Removing…":!1,onClick:()=>{h()}}),(0,U.jsx)(vt,{variant:"ghost",label:"Cancel","data-k-close":""})]})]})]})}function F8(){let[e,t]=(0,Be.useState)(null),[i,s]=(0,Be.useState)(C2),[r,n]=(0,Be.useState)(!1),[o,a]=(0,Be.useState)(C2===null),[l,c]=(0,Be.useState)("connecting"),h=(0,Be.useRef)(null),u=(0,Be.useCallback)(async()=>{let p=await H8();p!==null&&t(p)},[]);if((0,Be.useEffect)(()=>{u();let p=window.setInterval(()=>{u()},5e3);return()=>window.clearInterval(p)},[u]),(0,Be.useEffect)(()=>{e!==null&&(i!==null&&!e.sessions.some(p=>p.id===i)&&s(e.sessions[0]?.id??null),i===null&&e.sessions.length>0&&!r&&s(e.sessions[0].id))},[e,i,r]),(0,Be.useEffect)(()=>{let p=i===null?"/term":`/term/${i}`;location.pathname!==p&&history.replaceState(null,"",p)},[i]),(0,Be.useEffect)(()=>{l==="ended"&&u()},[l,u]),e===null)return(0,U.jsx)("div",{className:"term-app term-app--loading",children:(0,U.jsx)("p",{className:"k-note",children:"Loading…"})});let d=e.sessions.find(p=>p.id===i)??null,f=e.sessions.filter(p=>p.endedAt===null).length,g=p=>{s(p),n(!1),a(!1)},b=()=>{n(!0),a(!1)},T=r||!o&&d!==null,_=(0,U.jsxs)("nav",{className:"term-list","aria-label":"Terminals",children:[e.sessions.length===0?(0,U.jsx)("p",{className:"term-none",children:"No terminals yet."}):null,e.sessions.map(p=>(0,U.jsxs)("a",{href:`/term/${p.id}`,className:"term-item","aria-current":p.id===i&&!r?"true":void 0,onClick:E=>{E.preventDefault(),g(p.id)},children:[(0,U.jsxs)("span",{className:"term-item-t",children:[Zo[p.program]," · ",p.project]}),(0,U.jsxs)("span",{className:"term-item-m",children:[p.endedAt===null?(0,U.jsx)(Cu,{word:"Live",tone:"live"}):(0,U.jsx)(Cu,{word:"Ended"}),(0,U.jsx)("span",{className:"k-mono",children:p.branch})]})]},p.id))]}),m=(0,U.jsxs)("header",{className:"term-tb",children:[T?(0,U.jsx)(vt,{className:"k-phone-only",variant:"ghost",iconOnly:"back",label:"All terminals",onClick:()=>{n(!1),a(!0)}}):(0,U.jsx)("a",{className:"k-btn k-btn-ghost k-btn-icon k-phone-only",href:"/agents","aria-label":"Agents",title:"Agents",children:(0,U.jsx)(Ot,{name:"back"})}),(0,U.jsxs)("a",{className:"term-back k-desk-only",href:"/agents",children:[(0,U.jsx)(Ot,{name:"back",small:!0}),"Agents"]}),(0,U.jsx)("h1",{children:"Terminals"}),(0,U.jsxs)("span",{className:"term-ctx",children:[f," running · up to 8"]}),(0,U.jsx)("span",{className:"k-grow"}),e.available&&!r&&(0,U.jsx)(vt,{variant:"primary",sm:!0,lead:"plus",label:"New terminal",onClick:b})]}),v;return e.available?r||d===null?v=(0,U.jsx)(q8,{state:e,onCancel:d===null&&e.sessions.length===0?null:()=>n(!1),onStarted:p=>{n(!1),s(p),a(!1),u()}}):v=(0,U.jsxs)("section",{className:"term-pane","aria-label":`${Zo[d.program]} terminal`,children:[(0,U.jsxs)("header",{className:"term-ph",children:[(0,U.jsxs)("div",{children:[(0,U.jsxs)("b",{children:[Zo[d.program]," · ",d.project]}),(0,U.jsxs)("span",{className:"term-ph-m",children:[(0,U.jsx)("span",{className:"k-mono",children:d.branch})," · started ",new Date(d.startedAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]}),(0,U.jsx)("span",{className:`term-link term-link--${l}`,role:"status",children:N8[l]}),(0,U.jsx)(I8,{session:d,onDone:u},d.id)]}),(0,U.jsx)(U8,{session:d,onLink:c,keys:p=>{h.current=p}},d.id),d.endedAt===null?(0,U.jsx)(P8,{sendRef:h}):(0,U.jsx)(Bl,{children:"Ended. Its branch stays; Remove takes it off this list."})]}):v=(0,U.jsx)("div",{className:"term-form",children:(0,U.jsx)(Tu,{title:"Terminals aren't available.",text:e.problem??"This install can't run terminals."})}),(0,U.jsxs)("div",{className:`term-app${T?" term-app--pane":""}`,"data-kit-page":!0,children:[m,(0,U.jsxs)("div",{className:"term-grid",children:[(0,U.jsx)("aside",{className:"term-side",children:_}),(0,U.jsx)("main",{className:"term-main",children:v})]})]})}Du();(0,A2.createRoot)(document.getElementById("so-term")).render((0,U.jsx)(F8,{}));
|
|
157
|
+
${r}`,Pl(s),s.focus(),!0}var d2=!1,f2=new WeakMap;function E8(){let e=document.documentElement;e.classList.add("k-js"),document.addEventListener("keydown",t=>{(t.key==="Tab"||t.key==="F6")&&e.classList.add("k-kbd")},!0),document.addEventListener("pointerdown",()=>{e.classList.remove("k-kbd")},!0)}function Du(){if(d2||typeof document>"u")return;d2=!0,document.addEventListener("input",t=>{let i=t.target;i instanceof HTMLTextAreaElement&&i.classList.contains("k-composer-ta")&&Pl(i)}),document.addEventListener("click",t=>{let i=t.target;if(i===null)return;if(i.closest('.k-send[data-gate][aria-disabled="true"]')){t.preventDefault();return}if(C8(i,t)||x8(t))return;let r=i.closest("[data-k-open]");if(r){let o=document.getElementById(r.dataset.kOpen??"");o&&(t.preventDefault(),Vr(o,r));return}if(i.closest("[data-k-close]")){let o=zt[zt.length-1];o&&o.panel.contains(i)&&(t.preventDefault(),Nn(o,"close"));return}let n=i.closest("button.k-switch[role=switch][data-k-switch]");if(n){let o=n.getAttribute("aria-checked")!=="true";n.setAttribute("aria-checked",String(o));let[a,l]=(n.dataset.kSwitch||"On|Off").split("|"),c=n.querySelector("[data-k-words]");c&&(c.textContent=(o?a:l)??""),n.dispatchEvent(new CustomEvent("k-switch",{bubbles:!0,detail:{on:o}}));return}i.closest("[data-k-print]")&&(t.preventDefault(),window.print())}),document.addEventListener("submit",t=>{let i=t.target;if(!(i instanceof HTMLFormElement)||t.defaultPrevented)return;let s=(t.submitter instanceof HTMLButtonElement?t.submitter:null)??i.querySelector("button[type=submit][data-k-busy]"),r=s?.dataset.kBusy;if(s==null||r===void 0)return;if(i.getAttribute("aria-busy")==="true"){t.preventDefault();return}i.setAttribute("aria-busy","true");let n=s.querySelector(".k-face");n!==null&&(f2.set(s,Array.from(n.childNodes)),n.replaceChildren(Object.assign(document.createElement("span"),{className:"k-spin"}),document.createTextNode(r)),n.firstElementChild?.setAttribute("aria-hidden","true")),s.classList.add("busy")}),window.addEventListener("pageshow",()=>{for(let t of document.querySelectorAll("form[aria-busy=true]")){t.removeAttribute("aria-busy");for(let i of Array.from(Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements").get.call(t))){if(!(i instanceof HTMLButtonElement)||!i.classList.contains("busy")||i.dataset.kBusy===void 0)continue;i.classList.remove("busy");let s=i.querySelector(".k-face"),r=f2.get(i);s!==null&&r!==void 0&&s.replaceChildren(...r)}}}),document.addEventListener("keydown",k8,!0),E8();let e=()=>{i_();for(let t of document.querySelectorAll(".k-composer-ta"))Pl(t)};window.addEventListener("standing-orders:workspace-rendered",e),window.visualViewport?.addEventListener("resize",u2),window.visualViewport?.addEventListener("scroll",u2),h2(),e()}var Fe=H(F(),1);function Nu({kind:e,title:t,sub:i,trigger:s,onClose:r,children:n}){let o=(0,jr.useRef)(null),a=(0,jr.useRef)(r);a.current=r;let l=(0,jr.useId)();(0,jr.useLayoutEffect)(()=>{let f=o.current;if(!f)return;let g=!1,b=Vr(f,s,{onClose:T=>{g=!0,a.current(T)}});return()=>{g||b()}},[s]);let c=(0,Fe.jsx)(vt,{variant:"ghost",iconOnly:"x",label:"Close",sm:e==="popover"||e==="menu","data-k-close":""}),h=e==="menu"?(0,Fe.jsx)("div",{className:"k-menu",children:n}):n,u=e==="drawer"?(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("header",{className:"k-drawer-h",children:[(0,Fe.jsx)("h2",{id:l,children:t}),c]}),(0,Fe.jsx)("div",{className:"k-drawer-b",children:h})]}):e==="sheet"?(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("div",{className:"k-sheet-h",children:[(0,Fe.jsxs)("div",{className:"k-sheet-ht",children:[(0,Fe.jsx)("h2",{id:l,children:t}),i&&(0,Fe.jsx)(Bl,{children:i})]}),c]}),(0,Fe.jsx)("div",{className:"k-sheet-b",children:h})]}):(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("div",{className:"k-pop-h",children:[(0,Fe.jsx)("h3",{id:l,children:t}),c]}),h]}),d=e==="drawer"?"k-drawer":e==="sheet"?"k-sheet":Te("k-pop",e==="menu"&&"k-pop-menu");return(0,g2.createPortal)((0,Fe.jsx)("div",{ref:o,className:d,role:"dialog","aria-modal":"true","aria-labelledby":l,tabIndex:-1,children:u}),document.body)}var m2=H(F(),1);var Gr=H(ri(),1);var yt=H(F(),1);function _2({kind:e,facts:t,label:i,terms:s,text:r,primary:n=!0,docked:o,busy:a="Starting…",onApprove:l,check:c}){let h=Fm(e,t),[u,d]=(0,Gr.useState)(null),[f,g]=(0,Gr.useState)(!1),[b,T]=(0,Gr.useState)(null),_=(0,Gr.useRef)(!1),m=(0,Gr.useId)(),v=async E=>{if(!_.current){_.current=!0,g(!0),T(null);try{let A=await l(E,Ax(e,t));T(A),A===null&&d(null)}finally{_.current=!1,g(!1)}}};if(h==="automatic")return null;let p=E=>{E.preventDefault();let A=new FormData(E.currentTarget).get("token");v(typeof A=="string"?A:"")};return(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)(vt,{variant:n?"primary":"outline",label:i,docked:o===!0,busy:f&&u===null?a:!1,"aria-haspopup":h==="password"?"dialog":void 0,...n?{"data-ink-approve":""}:{},onClick:E=>{!T8(E)||_.current||c!==void 0&&!c()||(h==="password"?d(E.currentTarget):v(null))}}),h==="click"&&b&&(0,yt.jsx)(Km,{children:b}),u&&(0,yt.jsxs)(Nu,{kind:"popover",title:"Confirm with your password",trigger:u,onClose:()=>{d(null),T(null)},children:[r&&(0,yt.jsx)("p",{children:r}),(0,yt.jsx)("p",{className:"k-pop-terms",children:s}),(0,yt.jsxs)("form",{className:"k-field",onSubmit:p,children:[(0,yt.jsx)("label",{className:"k-label",htmlFor:m,children:"Your password"}),(0,yt.jsx)(Px,{id:m,type:"password",name:"token",autoComplete:"current-password",required:!0,autoFocus:!0,"aria-describedby":`${m}-err`,"aria-invalid":b?!0:void 0}),(0,yt.jsx)("span",{className:"k-err",id:`${m}-err`,role:"alert",children:b??""}),(0,yt.jsxs)(Go,{children:[(0,yt.jsx)(vt,{type:"submit",variant:"primary",label:i,busy:f?a:!1}),(0,yt.jsx)(vt,{variant:"ghost",label:"Cancel","data-k-close":""})]})]}),(0,yt.jsx)("p",{className:"k-pop-foot k-note",children:Nl(e,{...t,remembered:!1,passwordless:!1})==="Asks for your password."&&e==="standard"?"After this, standard approvals on this computer need no password for 15 minutes.":Nl(e,t)})]})]})}function T8(e){return e.nativeEvent.isTrusted!==!1}var v2=H(F(),1);var M8=H(ri(),1);var y2=H(F(),1);var b2=H(F(),1);var s_=H(F(),1);var R8=H(ri(),1);var w2=H(F(),1);var S2=H(F(),1);var r_=H(F(),1);var n_=H(F(),1);var k2=H(F(),1);var o_=H(ri(),1);var x2=H(F(),1);var Bu=H(ri(),1);var a_=H(F(),1);var U=H(F(),1),Zo={claude:"Claude Code",codex:"Codex",shell:"Shell"},D8={claude:"An agent you drive by hand",codex:"An agent you drive by hand",shell:"A plain terminal"},N8={connecting:"Connecting…",live:"Live",ended:"Ended",behind:"Catching up…","signed-out":"Signed out. Sign in again to keep typing",gone:"This terminal is gone",offline:"Reconnecting…",busy:"Not reading input. What you type waits"},l_=document.getElementById("so-term-boot"),B8=l_?.dataset.csrf??"",C2=l_?.dataset.session||null,O8=l_?.dataset.passwordless==="1",E2={passwordless:O8,remembered:!1},z8=()=>window.matchMedia("(max-width: 760px)").matches;async function H8(){let e=await fetch("/term/state",{headers:{accept:"application/json"},credentials:"same-origin"});return e.status===401?(location.href=`/login?next=${encodeURIComponent(location.pathname)}`,null):e.ok?await e.json():null}async function M2(e,t){try{return await(await fetch(e,{method:"POST",headers:Au({accept:"application/json"}),credentials:"same-origin",body:new URLSearchParams({csrf:B8,...t})})).json()}catch{return{ok:!1,error:"The console didn't answer. Nothing changed; try again."}}}function T2(){let e=r=>getComputedStyle(document.documentElement).getPropertyValue(r).trim(),t=e("--so-ink"),i=e("--so-code-bg")||e("--so-paper"),s=e("--so-muted");return{background:i,foreground:t,cursor:t,cursorAccent:i,selectionBackground:e("--so-selection")||e("--so-soft"),black:t,brightBlack:s,white:s,brightWhite:t,blue:e("--so-info"),brightBlue:e("--so-info"),green:e("--so-success"),brightGreen:e("--so-success"),red:e("--so-danger"),brightRed:e("--so-danger"),yellow:e("--so-warning"),brightYellow:e("--so-warning"),cyan:e("--so-info"),brightCyan:e("--so-info"),magenta:e("--so-accent-text"),brightMagenta:e("--so-accent-text")}}function U8({session:e,onLink:t,keys:i}){let s=(0,Be.useRef)(null);return(0,Be.useEffect)(()=>{let r=new BS({fontFamily:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace',fontSize:z8()?12:13,cursorBlink:!0,allowProposedApi:!0,scrollback:5e3,macOptionIsMeta:!0,theme:T2()}),n=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>{r.options.theme=T2()};n.addEventListener("change",o);let a=new OS;r.loadAddon(a);let l=new ik;r.loadAddon(l),r.unicode.activeVersion="11",r.open(s.current);let c=null;try{c=new wx,c.onContextLoss(()=>{c?.dispose(),c=null}),r.loadAddon(c)}catch{c=null}let h=null,u=!1,d=!1,f=0,g,b,T=L=>{h?.readyState===WebSocket.OPEN&&h.send(JSON.stringify(L))},_=L=>T({t:"in",d:L});i(_);let m=()=>{try{a.fit()}catch{return}T({t:"resize",cols:r.cols,rows:r.rows})},v=()=>{t(f===0?"connecting":"offline");let L=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/term/${e.id}/socket`,B=new WebSocket(L,Gx());h=B,B.binaryType="arraybuffer";let W=!0;B.onmessage=$=>{if(W&&(r.reset(),W=!1),typeof $.data!="string"){r.write(new Uint8Array($.data));return}let P;try{P=JSON.parse($.data)}catch{return}P.t==="hello"?(f=0,d=P.ended===!0,t(d?"ended":"live"),d||m()):P.t==="exit"?(d=!0,t("ended")):P.t==="input-full"&&(t("busy"),window.clearTimeout(b),b=window.setTimeout(()=>{d||t("live")},2500))},B.onclose=$=>{if(h===B&&(h=null),!u){if($.code===4401)return t("signed-out");if($.code===4404)return t("gone");if(d)return t("ended");t($.code===4008?"behind":"offline"),f+=1,g=window.setTimeout(v,Math.min(8e3,250*2**Math.min(f,5)))}}},p=r.onData(_),E=new ResizeObserver(()=>m());E.observe(s.current);let A=window.visualViewport;return A?.addEventListener("resize",m),v(),r.focus(),()=>{u=!0,window.clearTimeout(g),window.clearTimeout(b),n.removeEventListener("change",o),E.disconnect(),A?.removeEventListener("resize",m),p.dispose(),h?.close(1e3),r.dispose()}},[e.id]),(0,U.jsx)("div",{className:"term-screen",ref:s})}function P8({sendRef:e}){let[t,i]=(0,Be.useState)(!1),s=(n,o)=>(0,U.jsx)(vt,{sm:!0,className:"term-key",label:n,onPointerDown:a=>{a.preventDefault(),e.current?.(o)}},n),r=n=>{e.current?.(String.fromCharCode(n.toUpperCase().charCodeAt(0)-64)),i(!1)};return(0,U.jsxs)("div",{className:"term-keys",role:"toolbar","aria-label":"Terminal keys",children:[s("Esc","\x1B"),s("Tab"," "),(0,U.jsx)(vt,{sm:!0,className:"term-key",label:"Ctrl","aria-pressed":t,onPointerDown:n=>{n.preventDefault(),i(o=>!o)}}),t?(0,U.jsx)(U.Fragment,{children:["c","d","r","l","z"].map(n=>(0,U.jsx)(vt,{sm:!0,className:"term-key",label:`^${n.toUpperCase()}`,onPointerDown:o=>{o.preventDefault(),r(n)}},n))}):(0,U.jsxs)(U.Fragment,{children:[s("↑","\x1B[A"),s("↓","\x1B[B"),s("←","\x1B[D"),s("→","\x1B[C"),s("/","/"),s("⏎","\r")]})]})}function q8({state:e,onStarted:t,onCancel:i}){let[s,r]=(0,Be.useState)(e.projects[0]?.path??""),[n,o]=(0,Be.useState)(e.programs[0]??"claude");if(e.projects.length===0)return(0,U.jsx)("div",{className:"term-form",children:(0,U.jsx)(Tu,{title:"No projects yet.",text:"Add a project in the console first, then start a terminal in it.",action:(0,U.jsx)($m,{sm:!0,href:"/projects",label:"Open Projects"})})});let a=e.projects.find(c=>c.path===s)?.name??"",l=async c=>{let h=await M2("/term/start",{repo:s,program:n,password:c??""});return h.ok&&h.id!==void 0?(t(h.id),null):h.error??"The terminal didn't start. Nothing changed."};return(0,U.jsxs)("section",{className:"term-form","aria-labelledby":"term-new-title","data-term-new":!0,children:[(0,U.jsx)("h2",{id:"term-new-title",className:"k-sr",children:"New terminal"}),(0,U.jsx)(Ux,{label:"Project",children:c=>(0,U.jsx)(qx,{id:c.id,wide:!0,value:s,onChange:h=>r(h.target.value),items:e.projects.map(h=>[h.path,h.name])})}),(0,U.jsxs)("div",{className:"k-field term-radios",children:[(0,U.jsx)("span",{className:"k-label",children:"Program"}),(0,U.jsx)($x,{name:"program",legend:"Program",current:n,onChange:c=>o(c),items:e.programs.map(c=>({value:c,label:Zo[c],text:D8[c]}))})]}),(0,U.jsxs)("p",{className:"term-terms",children:[Zo[n]," · ",a," · a fresh worktree on its own branch"]}),(0,U.jsxs)(Go,{children:[(0,U.jsx)(_2,{kind:"step-up",facts:E2,label:"Start terminal",terms:`${Zo[n]} in ${a}, a fresh worktree on its own branch.`,onApprove:l}),i!==null&&(0,U.jsx)(vt,{variant:"ghost",label:"Cancel",onClick:i})]}),(0,U.jsx)(Bl,{children:`${Nl("step-up",E2)} A terminal can do anything you can on this computer. Your default branch is never touched.`})]})}function I8({session:e,onDone:t}){let[i,s]=(0,Be.useState)(null),[r,n]=(0,Be.useState)(!1),[o,a]=(0,Be.useState)(null),l=e.endedAt===null,c=l?"close":"remove",h=async()=>{n(!0),a(null);let u=await M2(`/term/${e.id}/${c}`,{});if(n(!1),!u.ok){a(u.error??"That didn't work. Nothing changed.");return}s(null),await t()};return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(vt,{variant:"ghost",sm:!0,label:l?"Close":"Remove","aria-haspopup":"dialog",onClick:u=>s(u.currentTarget),"data-term-end":c}),i!==null&&(0,U.jsxs)(Nu,{kind:"popover",title:l?"Close this terminal?":"Remove this terminal?",trigger:i,onClose:()=>{s(null),a(null)},children:[(0,U.jsx)("p",{className:"k-pop-terms",children:l?"Everything running in it stops. Its branch stays.":"Its worktree is removed. Its branch stays."}),o!==null&&(0,U.jsxs)("p",{className:"k-notice",role:"alert",children:[(0,U.jsx)(Ot,{name:"alert",small:!0}),(0,U.jsx)("span",{children:o})]}),(0,U.jsxs)(Go,{children:[(0,U.jsx)(vt,{variant:"danger",label:l?"Close terminal":"Remove terminal",busy:r?l?"Closing…":"Removing…":!1,onClick:()=>{h()}}),(0,U.jsx)(vt,{variant:"ghost",label:"Cancel","data-k-close":""})]})]})]})}function F8(){let[e,t]=(0,Be.useState)(null),[i,s]=(0,Be.useState)(C2),[r,n]=(0,Be.useState)(!1),[o,a]=(0,Be.useState)(C2===null),[l,c]=(0,Be.useState)("connecting"),h=(0,Be.useRef)(null),u=(0,Be.useCallback)(async()=>{let p=await H8();p!==null&&t(p)},[]);if((0,Be.useEffect)(()=>{u();let p=window.setInterval(()=>{u()},5e3);return()=>window.clearInterval(p)},[u]),(0,Be.useEffect)(()=>{e!==null&&(i!==null&&!e.sessions.some(p=>p.id===i)&&s(e.sessions[0]?.id??null),i===null&&e.sessions.length>0&&!r&&s(e.sessions[0].id))},[e,i,r]),(0,Be.useEffect)(()=>{let p=i===null?"/term":`/term/${i}`;location.pathname!==p&&history.replaceState(null,"",p)},[i]),(0,Be.useEffect)(()=>{l==="ended"&&u()},[l,u]),e===null)return(0,U.jsx)("div",{className:"term-app term-app--loading",children:(0,U.jsx)("p",{className:"k-note",children:"Loading…"})});let d=e.sessions.find(p=>p.id===i)??null,f=e.sessions.filter(p=>p.endedAt===null).length,g=p=>{s(p),n(!1),a(!1)},b=()=>{n(!0),a(!1)},T=r||!o&&d!==null,_=(0,U.jsxs)("nav",{className:"term-list","aria-label":"Terminals",children:[e.sessions.length===0?(0,U.jsx)("p",{className:"term-none",children:"No terminals yet."}):null,e.sessions.map(p=>(0,U.jsxs)("a",{href:`/term/${p.id}`,className:"term-item","aria-current":p.id===i&&!r?"true":void 0,onClick:E=>{E.preventDefault(),g(p.id)},children:[(0,U.jsxs)("span",{className:"term-item-t",children:[Zo[p.program]," · ",p.project]}),(0,U.jsxs)("span",{className:"term-item-m",children:[p.endedAt===null?(0,U.jsx)(Cu,{word:"Live",tone:"live"}):(0,U.jsx)(Cu,{word:"Ended"}),(0,U.jsx)("span",{className:"k-mono",children:p.branch})]})]},p.id))]}),m=(0,U.jsxs)("header",{className:"term-tb",children:[T?(0,U.jsx)(vt,{className:"k-phone-only",variant:"ghost",iconOnly:"back",label:"All terminals",onClick:()=>{n(!1),a(!0)}}):(0,U.jsx)("a",{className:"k-btn k-btn-ghost k-btn-icon k-phone-only",href:"/agents","aria-label":"Agents",title:"Agents",children:(0,U.jsx)(Ot,{name:"back"})}),(0,U.jsxs)("a",{className:"term-back k-desk-only",href:"/agents",children:[(0,U.jsx)(Ot,{name:"back",small:!0}),"Agents"]}),(0,U.jsx)("h1",{children:"Terminals"}),(0,U.jsxs)("span",{className:"term-ctx",children:[f," running · up to 8"]}),(0,U.jsx)("span",{className:"k-grow"}),e.available&&!r&&(0,U.jsx)(vt,{variant:"primary",sm:!0,lead:"plus",label:"New terminal",onClick:b})]}),v;return e.available?r||d===null?v=(0,U.jsx)(q8,{state:e,onCancel:d===null&&e.sessions.length===0?null:()=>n(!1),onStarted:p=>{n(!1),s(p),a(!1),u()}}):v=(0,U.jsxs)("section",{className:"term-pane","aria-label":`${Zo[d.program]} terminal`,children:[(0,U.jsxs)("header",{className:"term-ph",children:[(0,U.jsxs)("div",{children:[(0,U.jsxs)("b",{children:[Zo[d.program]," · ",d.project]}),(0,U.jsxs)("span",{className:"term-ph-m",children:[(0,U.jsx)("span",{className:"k-mono",children:d.branch})," · started ",new Date(d.startedAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]}),(0,U.jsx)("span",{className:`term-link term-link--${l}`,role:"status",children:N8[l]}),(0,U.jsx)(I8,{session:d,onDone:u},d.id)]}),(0,U.jsx)(U8,{session:d,onLink:c,keys:p=>{h.current=p}},d.id),d.endedAt===null?(0,U.jsx)(P8,{sendRef:h}):(0,U.jsx)(Bl,{children:"Ended. Its branch stays; Remove takes it off this list."})]}):v=(0,U.jsx)("div",{className:"term-form",children:(0,U.jsx)(Tu,{title:"Terminals aren't available.",text:e.problem??"This install can't run terminals."})}),(0,U.jsxs)("div",{className:`term-app${T?" term-app--pane":""}`,"data-kit-page":!0,children:[m,(0,U.jsxs)("div",{className:"term-grid",children:[(0,U.jsx)("aside",{className:"term-side",children:_}),(0,U.jsx)("main",{className:"term-main",children:v})]})]})}Du();(0,A2.createRoot)(document.getElementById("so-term")).render((0,U.jsx)(F8,{}));
|
|
158
158
|
/*! Bundled license information:
|
|
159
159
|
|
|
160
160
|
react/cjs/react.production.js:
|