@jinn-network/client 0.1.2 → 0.1.3-canary.262e5cda
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 +20 -0
- package/CONTRIBUTING.md +8 -2
- package/README.md +38 -14
- package/deployments/deployment-jinn-mvi-l1-sepolia-fast.json +36 -0
- package/deployments/deployment-jinn-mvi-l1-sepolia.json +36 -0
- package/deployments/deployment-jinn-mvi-l2-baseSepolia.json +12 -0
- package/deployments/deployment-phase1b-mech-baseSepolia-fast.json +3 -3
- package/deployments/deployment-stolas-l2-baseSepolia-fast.json +1 -1
- package/dist/adapters/adapter.d.ts +2 -2
- package/dist/adapters/claim-registry/client.d.ts +9 -0
- package/dist/adapters/claim-registry/client.js +22 -2
- package/dist/adapters/claim-registry/client.js.map +1 -1
- package/dist/adapters/local/adapter.d.ts +2 -2
- package/dist/adapters/local/adapter.js +8 -8
- package/dist/adapters/local/adapter.js.map +1 -1
- package/dist/adapters/mech/adapter.d.ts +3 -4
- package/dist/adapters/mech/adapter.js +86 -50
- package/dist/adapters/mech/adapter.js.map +1 -1
- package/dist/adapters/mech/contracts.d.ts +6 -4
- package/dist/adapters/mech/contracts.js +118 -14
- package/dist/adapters/mech/contracts.js.map +1 -1
- package/dist/adapters/mech/ipfs.d.ts +61 -6
- package/dist/adapters/mech/ipfs.js +159 -26
- package/dist/adapters/mech/ipfs.js.map +1 -1
- package/dist/adapters/mech/safe-revert.d.ts +39 -0
- package/dist/adapters/mech/safe-revert.js +130 -0
- package/dist/adapters/mech/safe-revert.js.map +1 -0
- package/dist/adapters/mech/safe.js +47 -21
- package/dist/adapters/mech/safe.js.map +1 -1
- package/dist/adapters/mech/types.d.ts +8 -0
- package/dist/adapters/mech/types.js.map +1 -1
- package/dist/agent/agent-ws.d.ts +55 -0
- package/dist/agent/agent-ws.js +288 -0
- package/dist/agent/agent-ws.js.map +1 -0
- package/dist/agent/auto-mode-detect.d.ts +6 -0
- package/dist/agent/auto-mode-detect.js +44 -0
- package/dist/agent/auto-mode-detect.js.map +1 -0
- package/dist/agent/operator-claude.d.ts +22 -0
- package/dist/agent/operator-claude.js +130 -0
- package/dist/agent/operator-claude.js.map +1 -0
- package/dist/api/admin-endpoint.d.ts +12 -0
- package/dist/api/admin-endpoint.js +71 -0
- package/dist/api/admin-endpoint.js.map +1 -0
- package/dist/api/bootstrap-endpoint.d.ts +16 -0
- package/dist/api/bootstrap-endpoint.js +78 -0
- package/dist/api/bootstrap-endpoint.js.map +1 -0
- package/dist/api/events-endpoint.d.ts +9 -0
- package/dist/api/events-endpoint.js +46 -0
- package/dist/api/events-endpoint.js.map +1 -0
- package/dist/api/fleet-build.d.ts +1 -1
- package/dist/api/fleet-build.js +17 -8
- package/dist/api/fleet-build.js.map +1 -1
- package/dist/api/gather-status.js +5 -1
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/handshake.d.ts +17 -0
- package/dist/api/handshake.js +28 -0
- package/dist/api/handshake.js.map +1 -0
- package/dist/api/peers.js +20 -5
- package/dist/api/peers.js.map +1 -1
- package/dist/api/portfolio-v0-build.d.ts +6 -0
- package/dist/api/portfolio-v0-build.js +6 -1
- package/dist/api/portfolio-v0-build.js.map +1 -1
- package/dist/api/rewards-build.js +3 -8
- package/dist/api/rewards-build.js.map +1 -1
- package/dist/api/server.d.ts +54 -0
- package/dist/api/server.js +239 -13
- package/dist/api/server.js.map +1 -1
- package/dist/api/setup-endpoints.d.ts +34 -0
- package/dist/api/setup-endpoints.js +188 -0
- package/dist/api/setup-endpoints.js.map +1 -0
- package/dist/api/status-build.d.ts +9 -1
- package/dist/api/status-build.js +44 -9
- package/dist/api/status-build.js.map +1 -1
- package/dist/api/status-rollup-build.d.ts +46 -1
- package/dist/api/status-rollup-build.js +168 -5
- package/dist/api/status-rollup-build.js.map +1 -1
- package/dist/api/ui-token.d.ts +5 -0
- package/dist/api/ui-token.js +36 -0
- package/dist/api/ui-token.js.map +1 -0
- package/dist/build-info.d.ts +32 -0
- package/dist/build-info.js +69 -0
- package/dist/build-info.js.map +1 -0
- package/dist/build-info.json +6 -0
- package/dist/build-meta.json +1 -1
- package/dist/cli/command.d.ts +9 -0
- package/dist/cli/commands/balance.d.ts +7 -0
- package/dist/cli/commands/balance.js +38 -32
- package/dist/cli/commands/balance.js.map +1 -1
- package/dist/cli/commands/bootstrap.d.ts +13 -1
- package/dist/cli/commands/bootstrap.js +150 -132
- package/dist/cli/commands/bootstrap.js.map +1 -1
- package/dist/cli/commands/claim-rewards.js +14 -2
- package/dist/cli/commands/claim-rewards.js.map +1 -1
- package/dist/cli/commands/conformance.d.ts +12 -0
- package/dist/cli/commands/conformance.js +140 -0
- package/dist/cli/commands/conformance.js.map +1 -0
- package/dist/cli/commands/create.d.ts +36 -0
- package/dist/cli/commands/create.js +374 -0
- package/dist/cli/commands/create.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +34 -1
- package/dist/cli/commands/doctor.js +136 -121
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/fleet-scale.d.ts +19 -1
- package/dist/cli/commands/fleet-scale.js +379 -361
- package/dist/cli/commands/fleet-scale.js.map +1 -1
- package/dist/cli/commands/fleet.d.ts +7 -0
- package/dist/cli/commands/fleet.js +39 -33
- package/dist/cli/commands/fleet.js.map +1 -1
- package/dist/cli/commands/fund-requirements.d.ts +14 -1
- package/dist/cli/commands/fund-requirements.js +183 -174
- package/dist/cli/commands/fund-requirements.js.map +1 -1
- package/dist/cli/commands/history.d.ts +10 -1
- package/dist/cli/commands/history.js +66 -57
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/impls.d.ts +18 -0
- package/dist/cli/commands/impls.js +208 -0
- package/dist/cli/commands/impls.js.map +1 -0
- package/dist/cli/commands/init.js +4 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/intents.js +13 -9
- package/dist/cli/commands/intents.js.map +1 -1
- package/dist/cli/commands/logs.d.ts +6 -1
- package/dist/cli/commands/logs.js +77 -70
- package/dist/cli/commands/logs.js.map +1 -1
- package/dist/cli/commands/migrate-agent-id.d.ts +26 -0
- package/dist/cli/commands/migrate-agent-id.js +165 -0
- package/dist/cli/commands/migrate-agent-id.js.map +1 -0
- package/dist/cli/commands/plug-ins.d.ts +34 -0
- package/dist/cli/commands/plug-ins.js +282 -0
- package/dist/cli/commands/plug-ins.js.map +1 -0
- package/dist/cli/commands/plugin-install.d.ts +10 -0
- package/dist/cli/commands/plugin-install.js +226 -14
- package/dist/cli/commands/plugin-install.js.map +1 -1
- package/dist/cli/commands/rewards.d.ts +7 -0
- package/dist/cli/commands/rewards.js +46 -40
- package/dist/cli/commands/rewards.js.map +1 -1
- package/dist/cli/commands/run.d.ts +14 -1
- package/dist/cli/commands/run.js +232 -90
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/status.d.ts +10 -0
- package/dist/cli/commands/status.js +97 -34
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/submit-intent.js +33 -6
- package/dist/cli/commands/submit-intent.js.map +1 -1
- package/dist/cli/commands/ui.js +45 -0
- package/dist/cli/commands/ui.js.map +1 -0
- package/dist/cli/commands/update.d.ts +5 -0
- package/dist/cli/commands/update.js +102 -97
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/version.js +3 -1
- package/dist/cli/commands/version.js.map +1 -1
- package/dist/cli/commands/withdraw.d.ts +21 -1
- package/dist/cli/commands/withdraw.js +175 -159
- package/dist/cli/commands/withdraw.js.map +1 -1
- package/dist/cli/execution-context.d.ts +1 -1
- package/dist/cli/execution-context.js +2 -1
- package/dist/cli/execution-context.js.map +1 -1
- package/dist/cli/help.js +7 -0
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.js +18 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/intent-registry-access.d.ts +33 -1
- package/dist/cli/intent-registry-access.js +40 -2
- package/dist/cli/intent-registry-access.js.map +1 -1
- package/dist/cli/open-browser.d.ts +1 -0
- package/dist/cli/open-browser.js +18 -0
- package/dist/cli/open-browser.js.map +1 -0
- package/dist/cli/password.d.ts +3 -3
- package/dist/cli/password.js +5 -5
- package/dist/cli/password.js.map +1 -1
- package/dist/config.d.ts +883 -11
- package/dist/config.js +435 -4
- package/dist/config.js.map +1 -1
- package/dist/conformance/checks/artifacts.d.ts +37 -0
- package/dist/conformance/checks/artifacts.js +110 -0
- package/dist/conformance/checks/artifacts.js.map +1 -0
- package/dist/conformance/checks/envelope-schema.d.ts +17 -0
- package/dist/conformance/checks/envelope-schema.js +36 -0
- package/dist/conformance/checks/envelope-schema.js.map +1 -0
- package/dist/conformance/checks/hash-signature.d.ts +26 -0
- package/dist/conformance/checks/hash-signature.js +70 -0
- package/dist/conformance/checks/hash-signature.js.map +1 -0
- package/dist/conformance/checks/payload.d.ts +19 -0
- package/dist/conformance/checks/payload.js +52 -0
- package/dist/conformance/checks/payload.js.map +1 -0
- package/dist/conformance/checks/secret-scrub.d.ts +33 -0
- package/dist/conformance/checks/secret-scrub.js +118 -0
- package/dist/conformance/checks/secret-scrub.js.map +1 -0
- package/dist/conformance/checks/source-runtime.d.ts +43 -0
- package/dist/conformance/checks/source-runtime.js +68 -0
- package/dist/conformance/checks/source-runtime.js.map +1 -0
- package/dist/conformance/checks/source-static.d.ts +61 -0
- package/dist/conformance/checks/source-static.js +311 -0
- package/dist/conformance/checks/source-static.js.map +1 -0
- package/dist/conformance/checks/trajectory-chain.d.ts +18 -0
- package/dist/conformance/checks/trajectory-chain.js +51 -0
- package/dist/conformance/checks/trajectory-chain.js.map +1 -0
- package/dist/conformance/checks/trajectory-profile.d.ts +17 -0
- package/dist/conformance/checks/trajectory-profile.js +51 -0
- package/dist/conformance/checks/trajectory-profile.js.map +1 -0
- package/dist/conformance/checks/trajectory-schema.d.ts +20 -0
- package/dist/conformance/checks/trajectory-schema.js +40 -0
- package/dist/conformance/checks/trajectory-schema.js.map +1 -0
- package/dist/conformance/checks/verdict.d.ts +44 -0
- package/dist/conformance/checks/verdict.js +122 -0
- package/dist/conformance/checks/verdict.js.map +1 -0
- package/dist/conformance/harness.d.ts +32 -0
- package/dist/conformance/harness.js +228 -0
- package/dist/conformance/harness.js.map +1 -0
- package/dist/conformance/types.d.ts +88 -0
- package/dist/conformance/types.js +31 -0
- package/dist/conformance/types.js.map +1 -0
- package/dist/corpus/acquire.d.ts +37 -0
- package/dist/corpus/acquire.js +155 -0
- package/dist/corpus/acquire.js.map +1 -0
- package/dist/corpus/cache.d.ts +14 -0
- package/dist/corpus/cache.js +18 -0
- package/dist/corpus/cache.js.map +1 -0
- package/dist/corpus/fetch.d.ts +9 -0
- package/dist/corpus/fetch.js +24 -0
- package/dist/corpus/fetch.js.map +1 -0
- package/dist/corpus/index.d.ts +16 -0
- package/dist/corpus/index.js +78 -0
- package/dist/corpus/index.js.map +1 -0
- package/dist/corpus/query.d.ts +17 -0
- package/dist/corpus/query.js +108 -0
- package/dist/corpus/query.js.map +1 -0
- package/dist/corpus/route-resolver.d.ts +16 -0
- package/dist/corpus/route-resolver.js +20 -0
- package/dist/corpus/route-resolver.js.map +1 -0
- package/dist/corpus/types.d.ts +107 -0
- package/dist/corpus/types.js +50 -0
- package/dist/corpus/types.js.map +1 -0
- package/dist/daemon/balance-topup-loop.js +2 -1
- package/dist/daemon/balance-topup-loop.js.map +1 -1
- package/dist/daemon/creator.d.ts +2 -2
- package/dist/daemon/creator.js +2 -2
- package/dist/daemon/creator.js.map +1 -1
- package/dist/daemon/daemon.d.ts +70 -15
- package/dist/daemon/daemon.js +159 -41
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/delivery-watcher.js +31 -1
- package/dist/daemon/delivery-watcher.js.map +1 -1
- package/dist/daemon/jinn-claim-loop-canonical.d.ts +207 -0
- package/dist/daemon/jinn-claim-loop-canonical.js +296 -0
- package/dist/daemon/jinn-claim-loop-canonical.js.map +1 -0
- package/dist/daemon/jinn-claim-loop-mock.d.ts +61 -0
- package/dist/daemon/jinn-claim-loop-mock.js +122 -0
- package/dist/daemon/jinn-claim-loop-mock.js.map +1 -0
- package/dist/daemon/jinn-claim-loop.d.ts +123 -0
- package/dist/daemon/jinn-claim-loop.js +256 -0
- package/dist/daemon/jinn-claim-loop.js.map +1 -0
- package/dist/daemon/reward-claim-loop.d.ts +2 -0
- package/dist/daemon/reward-claim-loop.js +32 -27
- package/dist/daemon/reward-claim-loop.js.map +1 -1
- package/dist/dashboard/assets/index-Bxlk5qpa.js +68 -0
- package/dist/dashboard/assets/index-DQ3u_vP5.css +32 -0
- package/dist/dashboard/index.html +18 -74
- package/dist/earning/agent-wallet-binding.d.ts +133 -0
- package/dist/earning/agent-wallet-binding.js +202 -0
- package/dist/earning/agent-wallet-binding.js.map +1 -0
- package/dist/earning/bootstrap.d.ts +64 -0
- package/dist/earning/bootstrap.js +325 -32
- package/dist/earning/bootstrap.js.map +1 -1
- package/dist/earning/contracts.d.ts +323 -0
- package/dist/earning/contracts.js +276 -0
- package/dist/earning/contracts.js.map +1 -1
- package/dist/earning/funding-plan.d.ts +90 -0
- package/dist/earning/funding-plan.js +203 -0
- package/dist/earning/funding-plan.js.map +1 -0
- package/dist/earning/migrate-agent-id.d.ts +130 -0
- package/dist/earning/migrate-agent-id.js +257 -0
- package/dist/earning/migrate-agent-id.js.map +1 -0
- package/dist/earning/orphan-sweep.d.ts +14 -0
- package/dist/earning/orphan-sweep.js +63 -2
- package/dist/earning/orphan-sweep.js.map +1 -1
- package/dist/earning/reconcile.d.ts +2 -0
- package/dist/earning/reconcile.js +30 -0
- package/dist/earning/reconcile.js.map +1 -1
- package/dist/earning/stolas-claim.d.ts +86 -6
- package/dist/earning/stolas-claim.js +123 -9
- package/dist/earning/stolas-claim.js.map +1 -1
- package/dist/earning/store.d.ts +39 -0
- package/dist/earning/store.js +72 -1
- package/dist/earning/store.js.map +1 -1
- package/dist/earning/testnet-setup-migration.d.ts +32 -0
- package/dist/earning/testnet-setup-migration.js +214 -0
- package/dist/earning/testnet-setup-migration.js.map +1 -0
- package/dist/earning/types.d.ts +53 -9
- package/dist/earning/types.js +51 -2
- package/dist/earning/types.js.map +1 -1
- package/dist/earning/viem-clients.d.ts +20 -0
- package/dist/earning/viem-clients.js +32 -1
- package/dist/earning/viem-clients.js.map +1 -1
- package/dist/erc8004/abis.d.ts +381 -0
- package/dist/erc8004/abis.js +238 -0
- package/dist/erc8004/abis.js.map +1 -0
- package/dist/erc8004/addresses.d.ts +40 -0
- package/dist/erc8004/addresses.js +64 -0
- package/dist/erc8004/addresses.js.map +1 -0
- package/dist/erc8004/identity.d.ts +202 -0
- package/dist/erc8004/identity.js +305 -0
- package/dist/erc8004/identity.js.map +1 -0
- package/dist/erc8004/index.d.ts +13 -0
- package/dist/erc8004/index.js +20 -0
- package/dist/erc8004/index.js.map +1 -0
- package/dist/erc8004/reputation.d.ts +349 -0
- package/dist/erc8004/reputation.js +464 -0
- package/dist/erc8004/reputation.js.map +1 -0
- package/dist/erc8004/subgraph.d.ts +46 -0
- package/dist/erc8004/subgraph.js +37 -0
- package/dist/erc8004/subgraph.js.map +1 -0
- package/dist/erc8004/validation.d.ts +145 -0
- package/dist/erc8004/validation.js +219 -0
- package/dist/erc8004/validation.js.map +1 -0
- package/dist/errors/persisted-bootstrap-error.d.ts +4 -0
- package/dist/errors/persisted-bootstrap-error.js +50 -0
- package/dist/errors/persisted-bootstrap-error.js.map +1 -0
- package/dist/events/emitter.d.ts +12 -0
- package/dist/events/emitter.js +23 -0
- package/dist/events/emitter.js.map +1 -0
- package/dist/events/ring-buffer.d.ts +25 -0
- package/dist/events/ring-buffer.js +46 -0
- package/dist/events/ring-buffer.js.map +1 -0
- package/dist/events/types.d.ts +42 -0
- package/dist/events/types.js +28 -0
- package/dist/events/types.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/intents/kinds/index.d.ts +10 -0
- package/dist/intents/kinds/index.js +7 -0
- package/dist/intents/kinds/index.js.map +1 -1
- package/dist/intents/kinds/learner-loop-test.d.ts +2 -0
- package/dist/intents/kinds/learner-loop-test.js +39 -0
- package/dist/intents/kinds/learner-loop-test.js.map +1 -0
- package/dist/intents/kinds/prediction-apy-v0.js +5 -1
- package/dist/intents/kinds/prediction-apy-v0.js.map +1 -1
- package/dist/intents/kinds/prediction-v0.js +5 -0
- package/dist/intents/kinds/prediction-v0.js.map +1 -1
- package/dist/intents/kinds/spec-kind.d.ts +18 -1
- package/dist/intents/posting-service.d.ts +3 -5
- package/dist/intents/posting-service.js +16 -50
- package/dist/intents/posting-service.js.map +1 -1
- package/dist/intents/prediction-apy-v0-auto.d.ts +12 -2
- package/dist/intents/prediction-apy-v0-auto.js +27 -2
- package/dist/intents/prediction-apy-v0-auto.js.map +1 -1
- package/dist/intents/prediction-v0-auto.d.ts +14 -4
- package/dist/intents/prediction-v0-auto.js +29 -5
- package/dist/intents/prediction-v0-auto.js.map +1 -1
- package/dist/intents/signing.d.ts +13 -0
- package/dist/intents/signing.js +27 -0
- package/dist/intents/signing.js.map +1 -0
- package/dist/intents/sources.d.ts +12 -5
- package/dist/intents/sources.js +11 -11
- package/dist/intents/sources.js.map +1 -1
- package/dist/main.d.ts +5 -2
- package/dist/main.js +792 -66
- package/dist/main.js.map +1 -1
- package/dist/mcp/acquire-artifact.d.ts +39 -0
- package/dist/mcp/acquire-artifact.js +163 -0
- package/dist/mcp/acquire-artifact.js.map +1 -0
- package/dist/mcp/operator-server.d.ts +20 -3
- package/dist/mcp/operator-server.js +500 -25
- package/dist/mcp/operator-server.js.map +1 -1
- package/dist/mcp/search-artifacts.d.ts +31 -0
- package/dist/mcp/search-artifacts.js +40 -0
- package/dist/mcp/search-artifacts.js.map +1 -0
- package/dist/mcp/server.js +103 -58
- package/dist/mcp/server.js.map +1 -1
- package/dist/observability/emit-event.d.ts +1 -1
- package/dist/observability/emit-event.js.map +1 -1
- package/dist/operator-errors.js +4 -5
- package/dist/operator-errors.js.map +1 -1
- package/dist/preflight/claude-auth.d.ts +11 -11
- package/dist/preflight/claude-auth.js +18 -32
- package/dist/preflight/claude-auth.js.map +1 -1
- package/dist/restorer/capability/index.d.ts +82 -0
- package/dist/restorer/capability/index.js +12 -0
- package/dist/restorer/capability/index.js.map +1 -0
- package/dist/restorer/capability/scoped-rpc.d.ts +12 -0
- package/dist/restorer/capability/scoped-rpc.js +34 -0
- package/dist/restorer/capability/scoped-rpc.js.map +1 -0
- package/dist/restorer/capability/scoped-secrets.d.ts +8 -0
- package/dist/restorer/capability/scoped-secrets.js +10 -0
- package/dist/restorer/capability/scoped-secrets.js.map +1 -0
- package/dist/restorer/capability/scoped-signer.d.ts +46 -0
- package/dist/restorer/capability/scoped-signer.js +73 -0
- package/dist/restorer/capability/scoped-signer.js.map +1 -0
- package/dist/restorer/engine/canonical-json.d.ts +0 -17
- package/dist/restorer/engine/canonical-json.js +56 -49
- package/dist/restorer/engine/canonical-json.js.map +1 -1
- package/dist/restorer/engine/claim.js +8 -1
- package/dist/restorer/engine/claim.js.map +1 -1
- package/dist/restorer/engine/delivery.d.ts +2 -0
- package/dist/restorer/engine/delivery.js +2 -2
- package/dist/restorer/engine/delivery.js.map +1 -1
- package/dist/restorer/engine/engine.d.ts +143 -26
- package/dist/restorer/engine/engine.js +485 -104
- package/dist/restorer/engine/engine.js.map +1 -1
- package/dist/restorer/engine/envelope-assembly.d.ts +65 -0
- package/dist/restorer/engine/envelope-assembly.js +60 -0
- package/dist/restorer/engine/envelope-assembly.js.map +1 -0
- package/dist/restorer/engine/packaging.d.ts +30 -30
- package/dist/restorer/engine/packaging.js +73 -47
- package/dist/restorer/engine/packaging.js.map +1 -1
- package/dist/restorer/engine/persistence.d.ts +7 -7
- package/dist/restorer/engine/persistence.js +4 -4
- package/dist/restorer/engine/persistence.js.map +1 -1
- package/dist/restorer/engine/registry.d.ts +24 -13
- package/dist/restorer/engine/registry.js +16 -13
- package/dist/restorer/engine/registry.js.map +1 -1
- package/dist/restorer/engine/validate-manifest.d.ts +23 -0
- package/dist/restorer/engine/validate-manifest.js +49 -0
- package/dist/restorer/engine/validate-manifest.js.map +1 -0
- package/dist/restorer/engine/verification-stub.d.ts +18 -0
- package/dist/restorer/engine/verification-stub.js +18 -0
- package/dist/restorer/engine/verification-stub.js.map +1 -0
- package/dist/restorer/external-impls/index.d.ts +3 -0
- package/dist/restorer/external-impls/index.js +2 -0
- package/dist/restorer/external-impls/index.js.map +1 -0
- package/dist/restorer/external-impls/loader.d.ts +49 -0
- package/dist/restorer/external-impls/loader.js +138 -0
- package/dist/restorer/external-impls/loader.js.map +1 -0
- package/dist/restorer/external-impls/package-hash.d.ts +26 -0
- package/dist/restorer/external-impls/package-hash.js +102 -0
- package/dist/restorer/external-impls/package-hash.js.map +1 -0
- package/dist/restorer/external-impls/types.d.ts +42 -0
- package/dist/restorer/external-impls/types.js +10 -0
- package/dist/restorer/external-impls/types.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/adapters/claude-code.d.ts +38 -0
- package/dist/restorer/impls/claude-code-learner/adapters/claude-code.js +200 -0
- package/dist/restorer/impls/claude-code-learner/adapters/claude-code.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/harvest.d.ts +19 -0
- package/dist/restorer/impls/claude-code-learner/harvest.js +146 -0
- package/dist/restorer/impls/claude-code-learner/harvest.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/index.d.ts +15 -0
- package/dist/restorer/impls/claude-code-learner/index.js +14 -0
- package/dist/restorer/impls/claude-code-learner/index.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/mcp-config.d.ts +48 -0
- package/dist/restorer/impls/claude-code-learner/mcp-config.js +52 -0
- package/dist/restorer/impls/claude-code-learner/mcp-config.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/plugin-path.d.ts +14 -0
- package/dist/restorer/impls/claude-code-learner/plugin-path.js +30 -0
- package/dist/restorer/impls/claude-code-learner/plugin-path.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/restorer.d.ts +38 -0
- package/dist/restorer/impls/claude-code-learner/restorer.js +73 -0
- package/dist/restorer/impls/claude-code-learner/restorer.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/fake-plugin-outputs.d.ts +19 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/fake-plugin-outputs.js +111 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/fake-plugin-outputs.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/noop-adapter.d.ts +22 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/noop-adapter.js +35 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/noop-adapter.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/synthetic-session.d.ts +20 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/synthetic-session.js +34 -0
- package/dist/restorer/impls/claude-code-learner/test-utils/synthetic-session.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/types.d.ts +99 -0
- package/dist/restorer/impls/claude-code-learner/types.js +2 -0
- package/dist/restorer/impls/claude-code-learner/types.js.map +1 -0
- package/dist/restorer/impls/claude-code-learner/wrapper.d.ts +49 -0
- package/dist/restorer/impls/claude-code-learner/wrapper.js +144 -0
- package/dist/restorer/impls/claude-code-learner/wrapper.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/index.d.ts +2 -2
- package/dist/restorer/impls/claude-mcp-hyperliquid/index.js +2 -2
- package/dist/restorer/impls/claude-mcp-hyperliquid/index.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.d.ts +7 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.js +38 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-prediction/index.d.ts +2 -2
- package/dist/restorer/impls/claude-mcp-prediction/index.js +12 -2
- package/dist/restorer/impls/claude-mcp-prediction/index.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.d.ts +9 -2
- package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.js +9 -125
- package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-prediction-apy/index.d.ts +2 -2
- package/dist/restorer/impls/claude-mcp-prediction-apy/index.js +9 -2
- package/dist/restorer/impls/claude-mcp-prediction-apy/index.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.d.ts +10 -0
- package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.js +10 -119
- package/dist/restorer/impls/claude-mcp-prediction-apy/session-orchestrator.js.map +1 -1
- package/dist/restorer/impls/claude-mcp-shared/single-session-orchestrator.d.ts +84 -0
- package/dist/restorer/impls/claude-mcp-shared/single-session-orchestrator.js +206 -0
- package/dist/restorer/impls/claude-mcp-shared/single-session-orchestrator.js.map +1 -0
- package/dist/restorer/impls/evaluation-context.d.ts +11 -4
- package/dist/restorer/impls/evaluation-context.js +9 -2
- package/dist/restorer/impls/evaluation-context.js.map +1 -1
- package/dist/restorer/impls/index.d.ts +46 -1
- package/dist/restorer/impls/index.js +38 -0
- package/dist/restorer/impls/index.js.map +1 -1
- package/dist/restorer/impls/legacy-claude/index.d.ts +13 -1
- package/dist/restorer/impls/legacy-claude/index.js +2 -0
- package/dist/restorer/impls/legacy-claude/index.js.map +1 -1
- package/dist/restorer/impls/portfolio-v0-evaluator/index.d.ts +4 -4
- package/dist/restorer/impls/portfolio-v0-evaluator/index.js +184 -55
- package/dist/restorer/impls/portfolio-v0-evaluator/index.js.map +1 -1
- package/dist/restorer/impls/prediction-apy-v0-baseline/index.d.ts +1 -1
- package/dist/restorer/impls/prediction-apy-v0-baseline/index.js +8 -1
- package/dist/restorer/impls/prediction-apy-v0-baseline/index.js.map +1 -1
- package/dist/restorer/impls/prediction-apy-v0-evaluator/index.d.ts +3 -3
- package/dist/restorer/impls/prediction-apy-v0-evaluator/index.js +153 -15
- package/dist/restorer/impls/prediction-apy-v0-evaluator/index.js.map +1 -1
- package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.d.ts +14 -5
- package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.js +16 -23
- package/dist/restorer/impls/prediction-apy-v0-evaluator/parse-submission.js.map +1 -1
- package/dist/restorer/impls/prediction-v0-baseline/index.d.ts +1 -1
- package/dist/restorer/impls/prediction-v0-baseline/index.js +16 -7
- package/dist/restorer/impls/prediction-v0-baseline/index.js.map +1 -1
- package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.d.ts +5 -3
- package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.js.map +1 -1
- package/dist/restorer/impls/prediction-v0-evaluator/index.d.ts +2 -2
- package/dist/restorer/impls/prediction-v0-evaluator/index.js +175 -67
- package/dist/restorer/impls/prediction-v0-evaluator/index.js.map +1 -1
- package/dist/restorer/manifest/index.d.ts +3 -0
- package/dist/restorer/manifest/index.js +3 -0
- package/dist/restorer/manifest/index.js.map +1 -0
- package/dist/restorer/manifest/load.d.ts +7 -0
- package/dist/restorer/manifest/load.js +49 -0
- package/dist/restorer/manifest/load.js.map +1 -0
- package/dist/restorer/manifest/types.d.ts +75 -0
- package/dist/restorer/manifest/types.js +8 -0
- package/dist/restorer/manifest/types.js.map +1 -0
- package/dist/restorer/manifest/verify.d.ts +15 -0
- package/dist/restorer/manifest/verify.js +53 -0
- package/dist/restorer/manifest/verify.js.map +1 -0
- package/dist/restorer/plug-ins/index.d.ts +14 -0
- package/dist/restorer/plug-ins/index.js +11 -0
- package/dist/restorer/plug-ins/index.js.map +1 -0
- package/dist/restorer/plug-ins/loader.d.ts +27 -0
- package/dist/restorer/plug-ins/loader.js +101 -0
- package/dist/restorer/plug-ins/loader.js.map +1 -0
- package/dist/restorer/plug-ins/manifest.d.ts +7 -0
- package/dist/restorer/plug-ins/manifest.js +97 -0
- package/dist/restorer/plug-ins/manifest.js.map +1 -0
- package/dist/restorer/plug-ins/registry.d.ts +24 -0
- package/dist/restorer/plug-ins/registry.js +17 -0
- package/dist/restorer/plug-ins/registry.js.map +1 -0
- package/dist/restorer/plug-ins/serialise.d.ts +29 -0
- package/dist/restorer/plug-ins/serialise.js +29 -0
- package/dist/restorer/plug-ins/serialise.js.map +1 -0
- package/dist/restorer/plug-ins/types.d.ts +77 -0
- package/dist/restorer/plug-ins/types.js +10 -0
- package/dist/restorer/plug-ins/types.js.map +1 -0
- package/dist/restorer/types.d.ts +66 -11
- package/dist/restorer/types.js.map +1 -1
- package/dist/runner/claude.d.ts +3 -3
- package/dist/runner/claude.js +57 -21
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/runner.d.ts +29 -2
- package/dist/runner/simple.d.ts +2 -2
- package/dist/runner/simple.js +2 -2
- package/dist/runner/simple.js.map +1 -1
- package/dist/scripts/fix-node-pty.mjs +62 -0
- package/dist/setup-mode.d.ts +34 -0
- package/dist/setup-mode.js +49 -0
- package/dist/setup-mode.js.map +1 -0
- package/dist/store/store.d.ts +79 -3
- package/dist/store/store.js +189 -6
- package/dist/store/store.js.map +1 -1
- package/dist/templates/plug-in/hook/README.md.tmpl +24 -0
- package/dist/templates/plug-in/hook/gitignore.tmpl +3 -0
- package/dist/templates/plug-in/hook/hooks/event.sh.tmpl +15 -0
- package/dist/templates/plug-in/hook/jinn-plugin.json.tmpl +16 -0
- package/dist/templates/plug-in/hook/package.json.tmpl +14 -0
- package/dist/templates/plug-in/hook/test/manifest.test.ts.tmpl +21 -0
- package/dist/templates/plug-in/mcp-tool/README.md.tmpl +26 -0
- package/dist/templates/plug-in/mcp-tool/gitignore.tmpl +4 -0
- package/dist/templates/plug-in/mcp-tool/jinn-plugin.json.tmpl +16 -0
- package/dist/templates/plug-in/mcp-tool/package.json.tmpl +19 -0
- package/dist/templates/plug-in/mcp-tool/src/server.ts.tmpl +17 -0
- package/dist/templates/plug-in/mcp-tool/test/server.test.ts.tmpl +18 -0
- package/dist/templates/plug-in/memory-backend/README.md.tmpl +33 -0
- package/dist/templates/plug-in/memory-backend/gitignore.tmpl +4 -0
- package/dist/templates/plug-in/memory-backend/jinn-plugin.json.tmpl +16 -0
- package/dist/templates/plug-in/memory-backend/package.json.tmpl +19 -0
- package/dist/templates/plug-in/memory-backend/src/server.ts.tmpl +23 -0
- package/dist/templates/plug-in/memory-backend/test/server.test.ts.tmpl +17 -0
- package/dist/templates/plug-in/phase-agent-override/README.md.tmpl +30 -0
- package/dist/templates/plug-in/phase-agent-override/agents/agent.md.tmpl +26 -0
- package/dist/templates/plug-in/phase-agent-override/gitignore.tmpl +3 -0
- package/dist/templates/plug-in/phase-agent-override/jinn-plugin.json.tmpl +17 -0
- package/dist/templates/plug-in/phase-agent-override/package.json.tmpl +14 -0
- package/dist/templates/plug-in/phase-agent-override/test/manifest.test.ts.tmpl +24 -0
- package/dist/templates/plug-in/skill-bundle/.claude-plugin/plugin.json.tmpl +5 -0
- package/dist/templates/plug-in/skill-bundle/README.md.tmpl +28 -0
- package/dist/templates/plug-in/skill-bundle/gitignore.tmpl +3 -0
- package/dist/templates/plug-in/skill-bundle/jinn-plugin.json.tmpl +15 -0
- package/dist/templates/plug-in/skill-bundle/package.json.tmpl +14 -0
- package/dist/templates/plug-in/skill-bundle/skills/example/SKILL.md.tmpl +14 -0
- package/dist/templates/plug-in/skill-bundle/test/manifest.test.ts.tmpl +21 -0
- package/dist/templates/plug-in/topic-explorer/README.md.tmpl +24 -0
- package/dist/templates/plug-in/topic-explorer/agents/explorer.md.tmpl +26 -0
- package/dist/templates/plug-in/topic-explorer/gitignore.tmpl +3 -0
- package/dist/templates/plug-in/topic-explorer/jinn-plugin.json.tmpl +17 -0
- package/dist/templates/plug-in/topic-explorer/package.json.tmpl +14 -0
- package/dist/templates/plug-in/topic-explorer/test/manifest.test.ts.tmpl +22 -0
- package/dist/templates/restorer/alternative-harness/README.md.tmpl +44 -0
- package/dist/templates/restorer/alternative-harness/gitignore.tmpl +3 -0
- package/dist/templates/restorer/alternative-harness/jinn.manifest.json.tmpl +22 -0
- package/dist/templates/restorer/alternative-harness/package.json.tmpl +26 -0
- package/dist/templates/restorer/alternative-harness/src/coordinator.ts.tmpl +50 -0
- package/dist/templates/restorer/alternative-harness/src/harness.ts.tmpl +31 -0
- package/dist/templates/restorer/alternative-harness/src/index.ts.tmpl +44 -0
- package/dist/templates/restorer/alternative-harness/src/mock-harness.ts.tmpl +41 -0
- package/dist/templates/restorer/alternative-harness/src/phases/debrief.ts.tmpl +28 -0
- package/dist/templates/restorer/alternative-harness/src/phases/execute.ts.tmpl +33 -0
- package/dist/templates/restorer/alternative-harness/src/phases/improve.ts.tmpl +31 -0
- package/dist/templates/restorer/alternative-harness/src/phases/memory.ts.tmpl +31 -0
- package/dist/templates/restorer/alternative-harness/src/phases/orient.ts.tmpl +21 -0
- package/dist/templates/restorer/alternative-harness/src/phases/plan.ts.tmpl +25 -0
- package/dist/templates/restorer/alternative-harness/src/phases/strategize.ts.tmpl +29 -0
- package/dist/templates/restorer/alternative-harness/test/coordinator.test.ts.tmpl +52 -0
- package/dist/templates/restorer/alternative-harness/test/unit.test.ts.tmpl +54 -0
- package/dist/templates/restorer/alternative-harness/tsconfig.json.tmpl +16 -0
- package/dist/templates/restorer/evaluator/README.md.tmpl +36 -0
- package/dist/templates/restorer/evaluator/gitignore.tmpl +3 -0
- package/dist/templates/restorer/evaluator/jinn.manifest.json.tmpl +22 -0
- package/dist/templates/restorer/evaluator/package.json.tmpl +26 -0
- package/dist/templates/restorer/evaluator/src/index.ts.tmpl +35 -0
- package/dist/templates/restorer/evaluator/test/unit.test.ts.tmpl +48 -0
- package/dist/templates/restorer/evaluator/tsconfig.json.tmpl +16 -0
- package/dist/templates/restorer/forecaster/README.md.tmpl +25 -0
- package/dist/templates/restorer/forecaster/gitignore.tmpl +5 -0
- package/dist/templates/restorer/forecaster/jinn.manifest.json.tmpl +22 -0
- package/dist/templates/restorer/forecaster/package.json.tmpl +26 -0
- package/dist/templates/restorer/forecaster/src/index.ts.tmpl +33 -0
- package/dist/templates/restorer/forecaster/test/unit.test.ts.tmpl +41 -0
- package/dist/templates/restorer/forecaster/tsconfig.json.tmpl +16 -0
- package/dist/trajectory/collector.d.ts +49 -0
- package/dist/trajectory/collector.js +86 -0
- package/dist/trajectory/collector.js.map +1 -0
- package/dist/trajectory/emit.d.ts +27 -0
- package/dist/trajectory/emit.js +40 -0
- package/dist/trajectory/emit.js.map +1 -0
- package/dist/trajectory/hash-chain.d.ts +18 -0
- package/dist/trajectory/hash-chain.js +23 -0
- package/dist/trajectory/hash-chain.js.map +1 -0
- package/dist/trajectory/index.d.ts +22 -0
- package/dist/trajectory/index.js +23 -0
- package/dist/trajectory/index.js.map +1 -0
- package/dist/trajectory/schema.d.ts +14 -14
- package/dist/trajectory/secret-scrub.d.ts +32 -0
- package/dist/trajectory/secret-scrub.js +51 -0
- package/dist/trajectory/secret-scrub.js.map +1 -0
- package/dist/trajectory/span-profile.d.ts +27 -0
- package/dist/trajectory/span-profile.js +51 -0
- package/dist/trajectory/span-profile.js.map +1 -0
- package/dist/trajectory/wrappers/http.d.ts +37 -0
- package/dist/trajectory/wrappers/http.js +85 -0
- package/dist/trajectory/wrappers/http.js.map +1 -0
- package/dist/trajectory/wrappers/mcp.d.ts +17 -0
- package/dist/trajectory/wrappers/mcp.js +58 -0
- package/dist/trajectory/wrappers/mcp.js.map +1 -0
- package/dist/trajectory/wrappers/subprocess.d.ts +32 -0
- package/dist/trajectory/wrappers/subprocess.js +70 -0
- package/dist/trajectory/wrappers/subprocess.js.map +1 -0
- package/dist/tx-retry.js +23 -9
- package/dist/tx-retry.js.map +1 -1
- package/dist/types/desired-state.d.ts +211 -21
- package/dist/types/desired-state.js +26 -15
- package/dist/types/desired-state.js.map +1 -1
- package/dist/types/envelope.d.ts +1473 -0
- package/dist/types/envelope.js +114 -0
- package/dist/types/envelope.js.map +1 -0
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.js +4 -4
- package/dist/types/index.js.map +1 -1
- package/dist/types/intent.d.ts +276 -0
- package/dist/types/intent.js +74 -0
- package/dist/types/intent.js.map +1 -0
- package/dist/types/payloads/index.d.ts +11 -0
- package/dist/types/payloads/index.js +46 -0
- package/dist/types/payloads/index.js.map +1 -0
- package/dist/types/payloads/portfolio-v0.d.ts +481 -0
- package/dist/types/payloads/portfolio-v0.js +94 -0
- package/dist/types/payloads/portfolio-v0.js.map +1 -0
- package/dist/types/payloads/prediction-apy-v0.d.ts +231 -0
- package/dist/types/payloads/prediction-apy-v0.js +63 -0
- package/dist/types/payloads/prediction-apy-v0.js.map +1 -0
- package/dist/types/payloads/prediction-v0.d.ts +262 -0
- package/dist/types/payloads/prediction-v0.js +73 -0
- package/dist/types/payloads/prediction-v0.js.map +1 -0
- package/dist/types/portfolio.d.ts +23 -685
- package/dist/types/portfolio.js +16 -106
- package/dist/types/portfolio.js.map +1 -1
- package/dist/types/prediction-apy.d.ts +9 -344
- package/dist/types/prediction-apy.js +9 -65
- package/dist/types/prediction-apy.js.map +1 -1
- package/dist/types/prediction.d.ts +25 -396
- package/dist/types/prediction.js +5 -79
- package/dist/types/prediction.js.map +1 -1
- package/dist/types/window.d.ts +12 -0
- package/dist/types/window.js +6 -0
- package/dist/types/window.js.map +1 -0
- package/dist/util/path-safety.d.ts +22 -0
- package/dist/util/path-safety.js +29 -0
- package/dist/util/path-safety.js.map +1 -0
- package/dist/util/redact-rpc-urls.d.ts +5 -0
- package/dist/util/redact-rpc-urls.js +9 -0
- package/dist/util/redact-rpc-urls.js.map +1 -0
- package/dist/x402/acquire.d.ts +14 -3
- package/dist/x402/acquire.js +28 -11
- package/dist/x402/acquire.js.map +1 -1
- package/dist/x402/handler.d.ts +15 -3
- package/dist/x402/handler.js +67 -24
- package/dist/x402/handler.js.map +1 -1
- package/package.json +36 -11
- package/plugins/claude-code-learner/.claude-plugin/plugin.json +9 -0
- package/plugins/claude-code-learner/AGENTS.md +30 -0
- package/plugins/claude-code-learner/CLAUDE.md +31 -0
- package/plugins/claude-code-learner/README.md +58 -0
- package/plugins/claude-code-learner/agents/analyst.md +69 -0
- package/plugins/claude-code-learner/agents/consolidator.md +95 -0
- package/plugins/claude-code-learner/agents/explorer.md +54 -0
- package/plugins/claude-code-learner/agents/planner.md +88 -0
- package/plugins/claude-code-learner/agents/promoter.md +114 -0
- package/plugins/claude-code-learner/agents/step-worker.md +48 -0
- package/plugins/claude-code-learner/agents/strategist.md +86 -0
- package/plugins/claude-code-learner/hooks/hooks.json +16 -0
- package/plugins/claude-code-learner/hooks/session-start +49 -0
- package/plugins/claude-code-learner/skills/coordinator/SKILL.md +131 -0
- package/plugins/claude-code-learner/skills/debrief/SKILL.md +71 -0
- package/plugins/claude-code-learner/skills/execute/SKILL.md +91 -0
- package/plugins/claude-code-learner/skills/improve/SKILL.md +57 -0
- package/plugins/claude-code-learner/skills/memory-consolidation/SKILL.md +57 -0
- package/plugins/claude-code-learner/skills/orient/SKILL.md +82 -0
- package/plugins/claude-code-learner/skills/plan/SKILL.md +54 -0
- package/plugins/claude-code-learner/skills/strategize/SKILL.md +63 -0
- package/skills/jinn-operator/SKILL.md +84 -35
- package/templates/plug-in/hook/README.md.tmpl +24 -0
- package/templates/plug-in/hook/gitignore.tmpl +3 -0
- package/templates/plug-in/hook/hooks/event.sh.tmpl +15 -0
- package/templates/plug-in/hook/jinn-plugin.json.tmpl +16 -0
- package/templates/plug-in/hook/package.json.tmpl +14 -0
- package/templates/plug-in/hook/test/manifest.test.ts.tmpl +21 -0
- package/templates/plug-in/mcp-tool/README.md.tmpl +26 -0
- package/templates/plug-in/mcp-tool/gitignore.tmpl +4 -0
- package/templates/plug-in/mcp-tool/jinn-plugin.json.tmpl +16 -0
- package/templates/plug-in/mcp-tool/package.json.tmpl +19 -0
- package/templates/plug-in/mcp-tool/src/server.ts.tmpl +17 -0
- package/templates/plug-in/mcp-tool/test/server.test.ts.tmpl +18 -0
- package/templates/plug-in/memory-backend/README.md.tmpl +33 -0
- package/templates/plug-in/memory-backend/gitignore.tmpl +4 -0
- package/templates/plug-in/memory-backend/jinn-plugin.json.tmpl +16 -0
- package/templates/plug-in/memory-backend/package.json.tmpl +19 -0
- package/templates/plug-in/memory-backend/src/server.ts.tmpl +23 -0
- package/templates/plug-in/memory-backend/test/server.test.ts.tmpl +17 -0
- package/templates/plug-in/phase-agent-override/README.md.tmpl +30 -0
- package/templates/plug-in/phase-agent-override/agents/agent.md.tmpl +26 -0
- package/templates/plug-in/phase-agent-override/gitignore.tmpl +3 -0
- package/templates/plug-in/phase-agent-override/jinn-plugin.json.tmpl +17 -0
- package/templates/plug-in/phase-agent-override/package.json.tmpl +14 -0
- package/templates/plug-in/phase-agent-override/test/manifest.test.ts.tmpl +24 -0
- package/templates/plug-in/skill-bundle/.claude-plugin/plugin.json.tmpl +5 -0
- package/templates/plug-in/skill-bundle/README.md.tmpl +28 -0
- package/templates/plug-in/skill-bundle/gitignore.tmpl +3 -0
- package/templates/plug-in/skill-bundle/jinn-plugin.json.tmpl +15 -0
- package/templates/plug-in/skill-bundle/package.json.tmpl +14 -0
- package/templates/plug-in/skill-bundle/skills/example/SKILL.md.tmpl +14 -0
- package/templates/plug-in/skill-bundle/test/manifest.test.ts.tmpl +21 -0
- package/templates/plug-in/topic-explorer/README.md.tmpl +24 -0
- package/templates/plug-in/topic-explorer/agents/explorer.md.tmpl +26 -0
- package/templates/plug-in/topic-explorer/gitignore.tmpl +3 -0
- package/templates/plug-in/topic-explorer/jinn-plugin.json.tmpl +17 -0
- package/templates/plug-in/topic-explorer/package.json.tmpl +14 -0
- package/templates/plug-in/topic-explorer/test/manifest.test.ts.tmpl +22 -0
- package/templates/restorer/alternative-harness/README.md.tmpl +44 -0
- package/templates/restorer/alternative-harness/gitignore.tmpl +3 -0
- package/templates/restorer/alternative-harness/jinn.manifest.json.tmpl +22 -0
- package/templates/restorer/alternative-harness/package.json.tmpl +26 -0
- package/templates/restorer/alternative-harness/src/coordinator.ts.tmpl +50 -0
- package/templates/restorer/alternative-harness/src/harness.ts.tmpl +31 -0
- package/templates/restorer/alternative-harness/src/index.ts.tmpl +44 -0
- package/templates/restorer/alternative-harness/src/mock-harness.ts.tmpl +41 -0
- package/templates/restorer/alternative-harness/src/phases/debrief.ts.tmpl +28 -0
- package/templates/restorer/alternative-harness/src/phases/execute.ts.tmpl +33 -0
- package/templates/restorer/alternative-harness/src/phases/improve.ts.tmpl +31 -0
- package/templates/restorer/alternative-harness/src/phases/memory.ts.tmpl +31 -0
- package/templates/restorer/alternative-harness/src/phases/orient.ts.tmpl +21 -0
- package/templates/restorer/alternative-harness/src/phases/plan.ts.tmpl +25 -0
- package/templates/restorer/alternative-harness/src/phases/strategize.ts.tmpl +29 -0
- package/templates/restorer/alternative-harness/test/coordinator.test.ts.tmpl +52 -0
- package/templates/restorer/alternative-harness/test/unit.test.ts.tmpl +54 -0
- package/templates/restorer/alternative-harness/tsconfig.json.tmpl +16 -0
- package/templates/restorer/evaluator/README.md.tmpl +36 -0
- package/templates/restorer/evaluator/gitignore.tmpl +3 -0
- package/templates/restorer/evaluator/jinn.manifest.json.tmpl +22 -0
- package/templates/restorer/evaluator/package.json.tmpl +26 -0
- package/templates/restorer/evaluator/src/index.ts.tmpl +35 -0
- package/templates/restorer/evaluator/test/unit.test.ts.tmpl +48 -0
- package/templates/restorer/evaluator/tsconfig.json.tmpl +16 -0
- package/templates/restorer/forecaster/README.md.tmpl +25 -0
- package/templates/restorer/forecaster/gitignore.tmpl +5 -0
- package/templates/restorer/forecaster/jinn.manifest.json.tmpl +22 -0
- package/templates/restorer/forecaster/package.json.tmpl +26 -0
- package/templates/restorer/forecaster/src/index.ts.tmpl +33 -0
- package/templates/restorer/forecaster/test/unit.test.ts.tmpl +41 -0
- package/templates/restorer/forecaster/tsconfig.json.tmpl +16 -0
- package/dist/bin/jinn-mcp.d.ts +0 -2
- package/dist/bin/jinn-mcp.js +0 -10
- package/dist/bin/jinn-mcp.js.map +0 -1
- package/dist/cli/commands/quickstart.js +0 -330
- package/dist/cli/commands/quickstart.js.map +0 -1
- package/dist/discovery/registry.d.ts +0 -97
- package/dist/discovery/registry.js +0 -177
- package/dist/discovery/registry.js.map +0 -1
- package/dist/discovery/subgraph.d.ts +0 -37
- package/dist/discovery/subgraph.js +0 -87
- package/dist/discovery/subgraph.js.map +0 -1
- package/dist/restorer/engine/manifest-assembly.d.ts +0 -67
- package/dist/restorer/engine/manifest-assembly.js +0 -79
- package/dist/restorer/engine/manifest-assembly.js.map +0 -1
- /package/dist/cli/commands/{quickstart.d.ts → ui.d.ts} +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var Ql=e=>{throw TypeError(e)};var fo=(e,t,r)=>t.has(e)||Ql("Cannot "+r);var I=(e,t,r)=>(fo(e,t,"read from private field"),r?r.call(e):t.get(e)),J=(e,t,r)=>t.has(e)?Ql("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),q=(e,t,r,i)=>(fo(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r),ie=(e,t,r)=>(fo(e,t,"access private method"),r);var Hs=(e,t,r,i)=>({set _(o){q(e,t,o,r)},get _(){return I(e,t,i)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const h of o)if(h.type==="childList")for(const v of h.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&i(v)}).observe(document,{childList:!0,subtree:!0});function r(o){const h={};return o.integrity&&(h.integrity=o.integrity),o.referrerPolicy&&(h.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?h.credentials="include":o.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function i(o){if(o.ep)return;o.ep=!0;const h=r(o);fetch(o.href,h)}})();function nf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bu={exports:{}},Kn={},ku={exports:{}},re={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ms=Symbol.for("react.element"),of=Symbol.for("react.portal"),af=Symbol.for("react.fragment"),lf=Symbol.for("react.strict_mode"),cf=Symbol.for("react.profiler"),uf=Symbol.for("react.provider"),hf=Symbol.for("react.context"),df=Symbol.for("react.forward_ref"),ff=Symbol.for("react.suspense"),pf=Symbol.for("react.memo"),_f=Symbol.for("react.lazy"),Gl=Symbol.iterator;function vf(e){return e===null||typeof e!="object"?null:(e=Gl&&e[Gl]||e["@@iterator"],typeof e=="function"?e:null)}var Eu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ru=Object.assign,Lu={};function Mi(e,t,r){this.props=e,this.context=t,this.refs=Lu,this.updater=r||Eu}Mi.prototype.isReactComponent={};Mi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Mi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Du(){}Du.prototype=Mi.prototype;function Xa(e,t,r){this.props=e,this.context=t,this.refs=Lu,this.updater=r||Eu}var Ya=Xa.prototype=new Du;Ya.constructor=Xa;Ru(Ya,Mi.prototype);Ya.isPureReactComponent=!0;var Xl=Array.isArray,Tu=Object.prototype.hasOwnProperty,Ja={current:null},Pu={key:!0,ref:!0,__self:!0,__source:!0};function Au(e,t,r){var i,o={},h=null,v=null;if(t!=null)for(i in t.ref!==void 0&&(v=t.ref),t.key!==void 0&&(h=""+t.key),t)Tu.call(t,i)&&!Pu.hasOwnProperty(i)&&(o[i]=t[i]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var u=Array(s),f=0;f<s;f++)u[f]=arguments[f+2];o.children=u}if(e&&e.defaultProps)for(i in s=e.defaultProps,s)o[i]===void 0&&(o[i]=s[i]);return{$$typeof:Ms,type:e,key:h,ref:v,props:o,_owner:Ja.current}}function gf(e,t){return{$$typeof:Ms,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Za(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ms}function mf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Yl=/\/+/g;function po(e,t){return typeof e=="object"&&e!==null&&e.key!=null?mf(""+e.key):t.toString(36)}function an(e,t,r,i,o){var h=typeof e;(h==="undefined"||h==="boolean")&&(e=null);var v=!1;if(e===null)v=!0;else switch(h){case"string":case"number":v=!0;break;case"object":switch(e.$$typeof){case Ms:case of:v=!0}}if(v)return v=e,o=o(v),e=i===""?"."+po(v,0):i,Xl(o)?(r="",e!=null&&(r=e.replace(Yl,"$&/")+"/"),an(o,t,r,"",function(f){return f})):o!=null&&(Za(o)&&(o=gf(o,r+(!o.key||v&&v.key===o.key?"":(""+o.key).replace(Yl,"$&/")+"/")+e)),t.push(o)),1;if(v=0,i=i===""?".":i+":",Xl(e))for(var s=0;s<e.length;s++){h=e[s];var u=i+po(h,s);v+=an(h,t,r,u,o)}else if(u=vf(e),typeof u=="function")for(e=u.call(e),s=0;!(h=e.next()).done;)h=h.value,u=i+po(h,s++),v+=an(h,t,r,u,o);else if(h==="object")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 v}function zs(e,t,r){if(e==null)return e;var i=[],o=0;return an(e,i,"","",function(h){return t.call(r,h,o++)}),i}function yf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var He={current:null},ln={transition:null},Sf={ReactCurrentDispatcher:He,ReactCurrentBatchConfig:ln,ReactCurrentOwner:Ja};function Mu(){throw Error("act(...) is not supported in production builds of React.")}re.Children={map:zs,forEach:function(e,t,r){zs(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return zs(e,function(){t++}),t},toArray:function(e){return zs(e,function(t){return t})||[]},only:function(e){if(!Za(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=Mi;re.Fragment=af;re.Profiler=cf;re.PureComponent=Xa;re.StrictMode=lf;re.Suspense=ff;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sf;re.act=Mu;re.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=Ru({},e.props),o=e.key,h=e.ref,v=e._owner;if(t!=null){if(t.ref!==void 0&&(h=t.ref,v=Ja.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)Tu.call(t,u)&&!Pu.hasOwnProperty(u)&&(i[u]=t[u]===void 0&&s!==void 0?s[u]:t[u])}var u=arguments.length-2;if(u===1)i.children=r;else if(1<u){s=Array(u);for(var f=0;f<u;f++)s[f]=arguments[f+2];i.children=s}return{$$typeof:Ms,type:e.type,key:o,ref:h,props:i,_owner:v}};re.createContext=function(e){return e={$$typeof:hf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:uf,_context:e},e.Consumer=e};re.createElement=Au;re.createFactory=function(e){var t=Au.bind(null,e);return t.type=e,t};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:df,render:e}};re.isValidElement=Za;re.lazy=function(e){return{$$typeof:_f,_payload:{_status:-1,_result:e},_init:yf}};re.memo=function(e,t){return{$$typeof:pf,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=ln.transition;ln.transition={};try{e()}finally{ln.transition=t}};re.unstable_act=Mu;re.useCallback=function(e,t){return He.current.useCallback(e,t)};re.useContext=function(e){return He.current.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e){return He.current.useDeferredValue(e)};re.useEffect=function(e,t){return He.current.useEffect(e,t)};re.useId=function(){return He.current.useId()};re.useImperativeHandle=function(e,t,r){return He.current.useImperativeHandle(e,t,r)};re.useInsertionEffect=function(e,t){return He.current.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return He.current.useLayoutEffect(e,t)};re.useMemo=function(e,t){return He.current.useMemo(e,t)};re.useReducer=function(e,t,r){return He.current.useReducer(e,t,r)};re.useRef=function(e){return He.current.useRef(e)};re.useState=function(e){return He.current.useState(e)};re.useSyncExternalStore=function(e,t,r){return He.current.useSyncExternalStore(e,t,r)};re.useTransition=function(){return He.current.useTransition()};re.version="18.3.1";ku.exports=re;var Z=ku.exports;const Cf=nf(Z);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var wf=Z,xf=Symbol.for("react.element"),bf=Symbol.for("react.fragment"),kf=Object.prototype.hasOwnProperty,Ef=wf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Rf={key:!0,ref:!0,__self:!0,__source:!0};function Ou(e,t,r){var i,o={},h=null,v=null;r!==void 0&&(h=""+r),t.key!==void 0&&(h=""+t.key),t.ref!==void 0&&(v=t.ref);for(i in t)kf.call(t,i)&&!Rf.hasOwnProperty(i)&&(o[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)o[i]===void 0&&(o[i]=t[i]);return{$$typeof:xf,type:e,key:h,ref:v,props:o,_owner:Ef.current}}Kn.Fragment=bf;Kn.jsx=Ou;Kn.jsxs=Ou;bu.exports=Kn;var A=bu.exports,Uo={},Bu={exports:{}},rt={},Iu={exports:{}},ju={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(E,L){var T=E.length;E.push(L);e:for(;0<T;){var O=T-1>>>1,H=E[O];if(0<o(H,L))E[O]=L,E[T]=H,T=O;else break e}}function r(E){return E.length===0?null:E[0]}function i(E){if(E.length===0)return null;var L=E[0],T=E.pop();if(T!==L){E[0]=T;e:for(var O=0,H=E.length,V=H>>>1;O<V;){var X=2*(O+1)-1,Y=E[X],oe=X+1,R=E[oe];if(0>o(Y,T))oe<H&&0>o(R,Y)?(E[O]=R,E[oe]=T,O=oe):(E[O]=Y,E[X]=T,O=X);else if(oe<H&&0>o(R,T))E[O]=R,E[oe]=T,O=oe;else break e}}return L}function o(E,L){var T=E.sortIndex-L.sortIndex;return T!==0?T:E.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;e.unstable_now=function(){return h.now()}}else{var v=Date,s=v.now();e.unstable_now=function(){return v.now()-s}}var u=[],f=[],m=1,d=null,_=3,C=!1,w=!1,S=!1,c=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,n=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function l(E){for(var L=r(f);L!==null;){if(L.callback===null)i(f);else if(L.startTime<=E)i(f),L.sortIndex=L.expirationTime,t(u,L);else break;L=r(f)}}function p(E){if(S=!1,l(E),!w)if(r(u)!==null)w=!0,$(y);else{var L=r(f);L!==null&&W(p,L.startTime-E)}}function y(E,L){w=!1,S&&(S=!1,a(g),g=-1),C=!0;var T=_;try{for(l(L),d=r(u);d!==null&&(!(d.expirationTime>L)||E&&!M());){var O=d.callback;if(typeof O=="function"){d.callback=null,_=d.priorityLevel;var H=O(d.expirationTime<=L);L=e.unstable_now(),typeof H=="function"?d.callback=H:d===r(u)&&i(u),l(L)}else i(u);d=r(u)}if(d!==null)var V=!0;else{var X=r(f);X!==null&&W(p,X.startTime-L),V=!1}return V}finally{d=null,_=T,C=!1}}var x=!1,k=null,g=-1,b=5,D=-1;function M(){return!(e.unstable_now()-D<b)}function P(){if(k!==null){var E=e.unstable_now();D=E;var L=!0;try{L=k(!0,E)}finally{L?B():(x=!1,k=null)}}else x=!1}var B;if(typeof n=="function")B=function(){n(P)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,F=N.port2;N.port1.onmessage=P,B=function(){F.postMessage(null)}}else B=function(){c(P,0)};function $(E){k=E,x||(x=!0,B())}function W(E,L){g=c(function(){E(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(E){E.callback=null},e.unstable_continueExecution=function(){w||C||(w=!0,$(y))},e.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"):b=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(E){switch(_){case 1:case 2:case 3:var L=3;break;default:L=_}var T=_;_=L;try{return E()}finally{_=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,L){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var T=_;_=E;try{return L()}finally{_=T}},e.unstable_scheduleCallback=function(E,L,T){var O=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?O+T:O):T=O,E){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=T+H,E={id:m++,callback:L,priorityLevel:E,startTime:T,expirationTime:H,sortIndex:-1},T>O?(E.sortIndex=T,t(f,E),r(u)===null&&E===r(f)&&(S?(a(g),g=-1):S=!0,W(p,T-O))):(E.sortIndex=H,t(u,E),w||C||(w=!0,$(y))),E},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(E){var L=_;return function(){var T=_;_=L;try{return E.apply(this,arguments)}finally{_=T}}}})(ju);Iu.exports=ju;var Lf=Iu.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Df=Z,tt=Lf;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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."}var Nu=new Set,ls={};function Kr(e,t){Ei(e,t),Ei(e+"Capture",t)}function Ei(e,t){for(ls[e]=t,e=0;e<t.length;e++)Nu.add(t[e])}var Ft=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wo=Object.prototype.hasOwnProperty,Tf=/^[: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]*$/,Jl={},Zl={};function Pf(e){return Wo.call(Zl,e)?!0:Wo.call(Jl,e)?!1:Tf.test(e)?Zl[e]=!0:(Jl[e]=!0,!1)}function Af(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Mf(e,t,r,i){if(t===null||typeof t>"u"||Af(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ze(e,t,r,i,o,h,v){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=h,this.removeEmptyString=v}var Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new ze(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new ze(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new ze(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new ze(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Pe[e]=new ze(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new ze(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new ze(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new ze(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new ze(e,5,!1,e.toLowerCase(),null,!1,!1)});var el=/[\-:]([a-z])/g;function tl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(el,tl);Pe[t]=new ze(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(el,tl);Pe[t]=new ze(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(el,tl);Pe[t]=new ze(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new ze(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new ze(e,1,!1,e.toLowerCase(),null,!0,!0)});function rl(e,t,r,i){var o=Pe.hasOwnProperty(t)?Pe[t]:null;(o!==null?o.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Mf(t,r,o,i)&&(r=null),i||o===null?Pf(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,i=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var Wt=Df.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Us=Symbol.for("react.element"),Gr=Symbol.for("react.portal"),Xr=Symbol.for("react.fragment"),il=Symbol.for("react.strict_mode"),$o=Symbol.for("react.profiler"),Fu=Symbol.for("react.provider"),Hu=Symbol.for("react.context"),sl=Symbol.for("react.forward_ref"),Ko=Symbol.for("react.suspense"),Vo=Symbol.for("react.suspense_list"),nl=Symbol.for("react.memo"),Gt=Symbol.for("react.lazy"),zu=Symbol.for("react.offscreen"),ec=Symbol.iterator;function Hi(e){return e===null||typeof e!="object"?null:(e=ec&&e[ec]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Object.assign,_o;function Qi(e){if(_o===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);_o=t&&t[1]||""}return`
|
|
34
|
+
`+_o+e}var vo=!1;function go(e,t){if(!e||vo)return"";vo=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var i=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){i=f}e.call(t.prototype)}else{try{throw Error()}catch(f){i=f}e()}}catch(f){if(f&&i&&typeof f.stack=="string"){for(var o=f.stack.split(`
|
|
35
|
+
`),h=i.stack.split(`
|
|
36
|
+
`),v=o.length-1,s=h.length-1;1<=v&&0<=s&&o[v]!==h[s];)s--;for(;1<=v&&0<=s;v--,s--)if(o[v]!==h[s]){if(v!==1||s!==1)do if(v--,s--,0>s||o[v]!==h[s]){var u=`
|
|
37
|
+
`+o[v].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=v&&0<=s);break}}}finally{vo=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Qi(e):""}function Of(e){switch(e.tag){case 5:return Qi(e.type);case 16:return Qi("Lazy");case 13:return Qi("Suspense");case 19:return Qi("SuspenseList");case 0:case 2:case 15:return e=go(e.type,!1),e;case 11:return e=go(e.type.render,!1),e;case 1:return e=go(e.type,!0),e;default:return""}}function qo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xr:return"Fragment";case Gr:return"Portal";case $o:return"Profiler";case il:return"StrictMode";case Ko:return"Suspense";case Vo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Hu:return(e.displayName||"Context")+".Consumer";case Fu:return(e._context.displayName||"Context")+".Provider";case sl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nl:return t=e.displayName||null,t!==null?t:qo(e.type)||"Memo";case Gt:t=e._payload,e=e._init;try{return qo(e(t))}catch{}}return null}function Bf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return qo(t);case 8:return t===il?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function mr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Uu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function If(e){var t=Uu(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,h=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(v){i=""+v,h.call(this,v)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ws(e){e._valueTracker||(e._valueTracker=If(e))}function Wu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Uu(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function yn(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 Qo(e,t){var r=t.checked;return ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function tc(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=mr(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $u(e,t){t=t.checked,t!=null&&rl(e,"checked",t,!1)}function Go(e,t){$u(e,t);var r=mr(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Xo(e,t.type,r):t.hasOwnProperty("defaultValue")&&Xo(e,t.type,mr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rc(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Xo(e,t,r){(t!=="number"||yn(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Gi=Array.isArray;function ai(e,t,r,i){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&i&&(e[r].defaultSelected=!0)}else{for(r=""+mr(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,i&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Yo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(K(91));return ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ic(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(K(92));if(Gi(r)){if(1<r.length)throw Error(K(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:mr(r)}}function Ku(e,t){var r=mr(t.value),i=mr(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function sc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Vu(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Jo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Vu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var $s,qu=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for($s=$s||document.createElement("div"),$s.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=$s.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function cs(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Zi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},jf=["Webkit","ms","Moz","O"];Object.keys(Zi).forEach(function(e){jf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zi[t]=Zi[e]})});function Qu(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Zi.hasOwnProperty(e)&&Zi[e]?(""+t).trim():t+"px"}function Gu(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,o=Qu(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,o):e[r]=o}}var Nf=ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zo(e,t){if(t){if(Nf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function ea(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 ta=null;function ol(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ra=null,li=null,ci=null;function nc(e){if(e=Is(e)){if(typeof ra!="function")throw Error(K(280));var t=e.stateNode;t&&(t=Xn(t),ra(e.stateNode,e.type,t))}}function Xu(e){li?ci?ci.push(e):ci=[e]:li=e}function Yu(){if(li){var e=li,t=ci;if(ci=li=null,nc(e),t)for(e=0;e<t.length;e++)nc(t[e])}}function Ju(e,t){return e(t)}function Zu(){}var mo=!1;function eh(e,t,r){if(mo)return e(t,r);mo=!0;try{return Ju(e,t,r)}finally{mo=!1,(li!==null||ci!==null)&&(Zu(),Yu())}}function us(e,t){var r=e.stateNode;if(r===null)return null;var i=Xn(r);if(i===null)return null;r=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(K(231,t,typeof r));return r}var ia=!1;if(Ft)try{var zi={};Object.defineProperty(zi,"passive",{get:function(){ia=!0}}),window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{ia=!1}function Ff(e,t,r,i,o,h,v,s,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(r,f)}catch(m){this.onError(m)}}var es=!1,Sn=null,Cn=!1,sa=null,Hf={onError:function(e){es=!0,Sn=e}};function zf(e,t,r,i,o,h,v,s,u){es=!1,Sn=null,Ff.apply(Hf,arguments)}function Uf(e,t,r,i,o,h,v,s,u){if(zf.apply(this,arguments),es){if(es){var f=Sn;es=!1,Sn=null}else throw Error(K(198));Cn||(Cn=!0,sa=f)}}function Vr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function th(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 oc(e){if(Vr(e)!==e)throw Error(K(188))}function Wf(e){var t=e.alternate;if(!t){if(t=Vr(e),t===null)throw Error(K(188));return t!==e?null:e}for(var r=e,i=t;;){var o=r.return;if(o===null)break;var h=o.alternate;if(h===null){if(i=o.return,i!==null){r=i;continue}break}if(o.child===h.child){for(h=o.child;h;){if(h===r)return oc(o),e;if(h===i)return oc(o),t;h=h.sibling}throw Error(K(188))}if(r.return!==i.return)r=o,i=h;else{for(var v=!1,s=o.child;s;){if(s===r){v=!0,r=o,i=h;break}if(s===i){v=!0,i=o,r=h;break}s=s.sibling}if(!v){for(s=h.child;s;){if(s===r){v=!0,r=h,i=o;break}if(s===i){v=!0,i=h,r=o;break}s=s.sibling}if(!v)throw Error(K(189))}}if(r.alternate!==i)throw Error(K(190))}if(r.tag!==3)throw Error(K(188));return r.stateNode.current===r?e:t}function rh(e){return e=Wf(e),e!==null?ih(e):null}function ih(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ih(e);if(t!==null)return t;e=e.sibling}return null}var sh=tt.unstable_scheduleCallback,ac=tt.unstable_cancelCallback,$f=tt.unstable_shouldYield,Kf=tt.unstable_requestPaint,Se=tt.unstable_now,Vf=tt.unstable_getCurrentPriorityLevel,al=tt.unstable_ImmediatePriority,nh=tt.unstable_UserBlockingPriority,wn=tt.unstable_NormalPriority,qf=tt.unstable_LowPriority,oh=tt.unstable_IdlePriority,Vn=null,Rt=null;function Qf(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(Vn,e,void 0,(e.current.flags&128)===128)}catch{}}var gt=Math.clz32?Math.clz32:Yf,Gf=Math.log,Xf=Math.LN2;function Yf(e){return e>>>=0,e===0?32:31-(Gf(e)/Xf|0)|0}var Ks=64,Vs=4194304;function Xi(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function xn(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,o=e.suspendedLanes,h=e.pingedLanes,v=r&268435455;if(v!==0){var s=v&~o;s!==0?i=Xi(s):(h&=v,h!==0&&(i=Xi(h)))}else v=r&~o,v!==0?i=Xi(v):h!==0&&(i=Xi(h));if(i===0)return 0;if(t!==0&&t!==i&&!(t&o)&&(o=i&-i,h=t&-t,o>=h||o===16&&(h&4194240)!==0))return t;if(i&4&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-gt(t),o=1<<r,i|=e[r],t&=~o;return i}function Jf(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Zf(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,h=e.pendingLanes;0<h;){var v=31-gt(h),s=1<<v,u=o[v];u===-1?(!(s&r)||s&i)&&(o[v]=Jf(s,t)):u<=t&&(e.expiredLanes|=s),h&=~s}}function na(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ah(){var e=Ks;return Ks<<=1,!(Ks&4194240)&&(Ks=64),e}function yo(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Os(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gt(t),e[t]=r}function ep(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-gt(r),h=1<<o;t[o]=0,i[o]=-1,e[o]=-1,r&=~h}}function ll(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-gt(r),o=1<<i;o&t|e[i]&t&&(e[i]|=t),r&=~o}}var ce=0;function lh(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ch,cl,uh,hh,dh,oa=!1,qs=[],cr=null,ur=null,hr=null,hs=new Map,ds=new Map,Yt=[],tp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function lc(e,t){switch(e){case"focusin":case"focusout":cr=null;break;case"dragenter":case"dragleave":ur=null;break;case"mouseover":case"mouseout":hr=null;break;case"pointerover":case"pointerout":hs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ds.delete(t.pointerId)}}function Ui(e,t,r,i,o,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:h,targetContainers:[o]},t!==null&&(t=Is(t),t!==null&&cl(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function rp(e,t,r,i,o){switch(t){case"focusin":return cr=Ui(cr,e,t,r,i,o),!0;case"dragenter":return ur=Ui(ur,e,t,r,i,o),!0;case"mouseover":return hr=Ui(hr,e,t,r,i,o),!0;case"pointerover":var h=o.pointerId;return hs.set(h,Ui(hs.get(h)||null,e,t,r,i,o)),!0;case"gotpointercapture":return h=o.pointerId,ds.set(h,Ui(ds.get(h)||null,e,t,r,i,o)),!0}return!1}function fh(e){var t=kr(e.target);if(t!==null){var r=Vr(t);if(r!==null){if(t=r.tag,t===13){if(t=th(r),t!==null){e.blockedOn=t,dh(e.priority,function(){uh(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=aa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);ta=i,r.target.dispatchEvent(i),ta=null}else return t=Is(r),t!==null&&cl(t),e.blockedOn=r,!1;t.shift()}return!0}function cc(e,t,r){cn(e)&&r.delete(t)}function ip(){oa=!1,cr!==null&&cn(cr)&&(cr=null),ur!==null&&cn(ur)&&(ur=null),hr!==null&&cn(hr)&&(hr=null),hs.forEach(cc),ds.forEach(cc)}function Wi(e,t){e.blockedOn===t&&(e.blockedOn=null,oa||(oa=!0,tt.unstable_scheduleCallback(tt.unstable_NormalPriority,ip)))}function fs(e){function t(o){return Wi(o,e)}if(0<qs.length){Wi(qs[0],e);for(var r=1;r<qs.length;r++){var i=qs[r];i.blockedOn===e&&(i.blockedOn=null)}}for(cr!==null&&Wi(cr,e),ur!==null&&Wi(ur,e),hr!==null&&Wi(hr,e),hs.forEach(t),ds.forEach(t),r=0;r<Yt.length;r++)i=Yt[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<Yt.length&&(r=Yt[0],r.blockedOn===null);)fh(r),r.blockedOn===null&&Yt.shift()}var ui=Wt.ReactCurrentBatchConfig,bn=!0;function sp(e,t,r,i){var o=ce,h=ui.transition;ui.transition=null;try{ce=1,ul(e,t,r,i)}finally{ce=o,ui.transition=h}}function np(e,t,r,i){var o=ce,h=ui.transition;ui.transition=null;try{ce=4,ul(e,t,r,i)}finally{ce=o,ui.transition=h}}function ul(e,t,r,i){if(bn){var o=aa(e,t,r,i);if(o===null)Do(e,t,i,kn,r),lc(e,i);else if(rp(o,e,t,r,i))i.stopPropagation();else if(lc(e,i),t&4&&-1<tp.indexOf(e)){for(;o!==null;){var h=Is(o);if(h!==null&&ch(h),h=aa(e,t,r,i),h===null&&Do(e,t,i,kn,r),h===o)break;o=h}o!==null&&i.stopPropagation()}else Do(e,t,i,null,r)}}var kn=null;function aa(e,t,r,i){if(kn=null,e=ol(i),e=kr(e),e!==null)if(t=Vr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=th(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return kn=e,null}function ph(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Vf()){case al:return 1;case nh:return 4;case wn:case qf:return 16;case oh:return 536870912;default:return 16}default:return 16}}var ar=null,hl=null,un=null;function _h(){if(un)return un;var e,t=hl,r=t.length,i,o="value"in ar?ar.value:ar.textContent,h=o.length;for(e=0;e<r&&t[e]===o[e];e++);var v=r-e;for(i=1;i<=v&&t[r-i]===o[h-i];i++);return un=o.slice(e,1<i?1-i:void 0)}function hn(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 Qs(){return!0}function uc(){return!1}function it(e){function t(r,i,o,h,v){this._reactName=r,this._targetInst=o,this.type=i,this.nativeEvent=h,this.target=v,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(h):h[s]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Qs:uc,this.isPropagationStopped=uc,this}return ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Qs)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Qs)},persist:function(){},isPersistent:Qs}),t}var Oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dl=it(Oi),Bs=ge({},Oi,{view:0,detail:0}),op=it(Bs),So,Co,$i,qn=ge({},Bs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fl,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!==$i&&($i&&e.type==="mousemove"?(So=e.screenX-$i.screenX,Co=e.screenY-$i.screenY):Co=So=0,$i=e),So)},movementY:function(e){return"movementY"in e?e.movementY:Co}}),hc=it(qn),ap=ge({},qn,{dataTransfer:0}),lp=it(ap),cp=ge({},Bs,{relatedTarget:0}),wo=it(cp),up=ge({},Oi,{animationName:0,elapsedTime:0,pseudoElement:0}),hp=it(up),dp=ge({},Oi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fp=it(dp),pp=ge({},Oi,{data:0}),dc=it(pp),_p={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vp={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"},gp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gp[e])?!!t[e]:!1}function fl(){return mp}var yp=ge({},Bs,{key:function(e){if(e.key){var t=_p[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=hn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fl,charCode:function(e){return e.type==="keypress"?hn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Sp=it(yp),Cp=ge({},qn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fc=it(Cp),wp=ge({},Bs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fl}),xp=it(wp),bp=ge({},Oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),kp=it(bp),Ep=ge({},qn,{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}),Rp=it(Ep),Lp=[9,13,27,32],pl=Ft&&"CompositionEvent"in window,ts=null;Ft&&"documentMode"in document&&(ts=document.documentMode);var Dp=Ft&&"TextEvent"in window&&!ts,vh=Ft&&(!pl||ts&&8<ts&&11>=ts),pc=" ",_c=!1;function gh(e,t){switch(e){case"keyup":return Lp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yr=!1;function Tp(e,t){switch(e){case"compositionend":return mh(t);case"keypress":return t.which!==32?null:(_c=!0,pc);case"textInput":return e=t.data,e===pc&&_c?null:e;default:return null}}function Pp(e,t){if(Yr)return e==="compositionend"||!pl&&gh(e,t)?(e=_h(),un=hl=ar=null,Yr=!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 vh&&t.locale!=="ko"?null:t.data;default:return null}}var Ap={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 vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ap[e.type]:t==="textarea"}function yh(e,t,r,i){Xu(i),t=En(t,"onChange"),0<t.length&&(r=new dl("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var rs=null,ps=null;function Mp(e){Th(e,0)}function Qn(e){var t=ei(e);if(Wu(t))return e}function Op(e,t){if(e==="change")return t}var Sh=!1;if(Ft){var xo;if(Ft){var bo="oninput"in document;if(!bo){var gc=document.createElement("div");gc.setAttribute("oninput","return;"),bo=typeof gc.oninput=="function"}xo=bo}else xo=!1;Sh=xo&&(!document.documentMode||9<document.documentMode)}function mc(){rs&&(rs.detachEvent("onpropertychange",Ch),ps=rs=null)}function Ch(e){if(e.propertyName==="value"&&Qn(ps)){var t=[];yh(t,ps,e,ol(e)),eh(Mp,t)}}function Bp(e,t,r){e==="focusin"?(mc(),rs=t,ps=r,rs.attachEvent("onpropertychange",Ch)):e==="focusout"&&mc()}function Ip(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qn(ps)}function jp(e,t){if(e==="click")return Qn(t)}function Np(e,t){if(e==="input"||e==="change")return Qn(t)}function Fp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:Fp;function _s(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var o=r[i];if(!Wo.call(t,o)||!yt(e[o],t[o]))return!1}return!0}function yc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sc(e,t){var r=yc(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=yc(r)}}function wh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xh(){for(var e=window,t=yn();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=yn(e.document)}return t}function _l(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")}function Hp(e){var t=xh(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&wh(r.ownerDocument.documentElement,r)){if(i!==null&&_l(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,h=Math.min(i.start,o);i=i.end===void 0?h:Math.min(i.end,o),!e.extend&&h>i&&(o=i,i=h,h=o),o=Sc(r,h);var v=Sc(r,i);o&&v&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==v.node||e.focusOffset!==v.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),h>i?(e.addRange(t),e.extend(v.node,v.offset)):(t.setEnd(v.node,v.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zp=Ft&&"documentMode"in document&&11>=document.documentMode,Jr=null,la=null,is=null,ca=!1;function Cc(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ca||Jr==null||Jr!==yn(i)||(i=Jr,"selectionStart"in i&&_l(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),is&&_s(is,i)||(is=i,i=En(la,"onSelect"),0<i.length&&(t=new dl("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=Jr)))}function Gs(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Zr={animationend:Gs("Animation","AnimationEnd"),animationiteration:Gs("Animation","AnimationIteration"),animationstart:Gs("Animation","AnimationStart"),transitionend:Gs("Transition","TransitionEnd")},ko={},bh={};Ft&&(bh=document.createElement("div").style,"AnimationEvent"in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),"TransitionEvent"in window||delete Zr.transitionend.transition);function Gn(e){if(ko[e])return ko[e];if(!Zr[e])return e;var t=Zr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in bh)return ko[e]=t[r];return e}var kh=Gn("animationend"),Eh=Gn("animationiteration"),Rh=Gn("animationstart"),Lh=Gn("transitionend"),Dh=new Map,wc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Sr(e,t){Dh.set(e,t),Kr(t,[e])}for(var Eo=0;Eo<wc.length;Eo++){var Ro=wc[Eo],Up=Ro.toLowerCase(),Wp=Ro[0].toUpperCase()+Ro.slice(1);Sr(Up,"on"+Wp)}Sr(kh,"onAnimationEnd");Sr(Eh,"onAnimationIteration");Sr(Rh,"onAnimationStart");Sr("dblclick","onDoubleClick");Sr("focusin","onFocus");Sr("focusout","onBlur");Sr(Lh,"onTransitionEnd");Ei("onMouseEnter",["mouseout","mouseover"]);Ei("onMouseLeave",["mouseout","mouseover"]);Ei("onPointerEnter",["pointerout","pointerover"]);Ei("onPointerLeave",["pointerout","pointerover"]);Kr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Kr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Kr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Kr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Kr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Kr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yi="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(" "),$p=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yi));function xc(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,Uf(i,t,void 0,e),e.currentTarget=null}function Th(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],o=i.event;i=i.listeners;e:{var h=void 0;if(t)for(var v=i.length-1;0<=v;v--){var s=i[v],u=s.instance,f=s.currentTarget;if(s=s.listener,u!==h&&o.isPropagationStopped())break e;xc(o,s,f),h=u}else for(v=0;v<i.length;v++){if(s=i[v],u=s.instance,f=s.currentTarget,s=s.listener,u!==h&&o.isPropagationStopped())break e;xc(o,s,f),h=u}}}if(Cn)throw e=sa,Cn=!1,sa=null,e}function he(e,t){var r=t[pa];r===void 0&&(r=t[pa]=new Set);var i=e+"__bubble";r.has(i)||(Ph(t,e,2,!1),r.add(i))}function Lo(e,t,r){var i=0;t&&(i|=4),Ph(r,e,i,t)}var Xs="_reactListening"+Math.random().toString(36).slice(2);function vs(e){if(!e[Xs]){e[Xs]=!0,Nu.forEach(function(r){r!=="selectionchange"&&($p.has(r)||Lo(r,!1,e),Lo(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xs]||(t[Xs]=!0,Lo("selectionchange",!1,t))}}function Ph(e,t,r,i){switch(ph(t)){case 1:var o=sp;break;case 4:o=np;break;default:o=ul}r=o.bind(null,t,r,e),o=void 0,!ia||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),i?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function Do(e,t,r,i,o){var h=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var v=i.tag;if(v===3||v===4){var s=i.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(v===4)for(v=i.return;v!==null;){var u=v.tag;if((u===3||u===4)&&(u=v.stateNode.containerInfo,u===o||u.nodeType===8&&u.parentNode===o))return;v=v.return}for(;s!==null;){if(v=kr(s),v===null)return;if(u=v.tag,u===5||u===6){i=h=v;continue e}s=s.parentNode}}i=i.return}eh(function(){var f=h,m=ol(r),d=[];e:{var _=Dh.get(e);if(_!==void 0){var C=dl,w=e;switch(e){case"keypress":if(hn(r)===0)break e;case"keydown":case"keyup":C=Sp;break;case"focusin":w="focus",C=wo;break;case"focusout":w="blur",C=wo;break;case"beforeblur":case"afterblur":C=wo;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":C=hc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":C=lp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":C=xp;break;case kh:case Eh:case Rh:C=hp;break;case Lh:C=kp;break;case"scroll":C=op;break;case"wheel":C=Rp;break;case"copy":case"cut":case"paste":C=fp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":C=fc}var S=(t&4)!==0,c=!S&&e==="scroll",a=S?_!==null?_+"Capture":null:_;S=[];for(var n=f,l;n!==null;){l=n;var p=l.stateNode;if(l.tag===5&&p!==null&&(l=p,a!==null&&(p=us(n,a),p!=null&&S.push(gs(n,p,l)))),c)break;n=n.return}0<S.length&&(_=new C(_,w,null,r,m),d.push({event:_,listeners:S}))}}if(!(t&7)){e:{if(_=e==="mouseover"||e==="pointerover",C=e==="mouseout"||e==="pointerout",_&&r!==ta&&(w=r.relatedTarget||r.fromElement)&&(kr(w)||w[Ht]))break e;if((C||_)&&(_=m.window===m?m:(_=m.ownerDocument)?_.defaultView||_.parentWindow:window,C?(w=r.relatedTarget||r.toElement,C=f,w=w?kr(w):null,w!==null&&(c=Vr(w),w!==c||w.tag!==5&&w.tag!==6)&&(w=null)):(C=null,w=f),C!==w)){if(S=hc,p="onMouseLeave",a="onMouseEnter",n="mouse",(e==="pointerout"||e==="pointerover")&&(S=fc,p="onPointerLeave",a="onPointerEnter",n="pointer"),c=C==null?_:ei(C),l=w==null?_:ei(w),_=new S(p,n+"leave",C,r,m),_.target=c,_.relatedTarget=l,p=null,kr(m)===f&&(S=new S(a,n+"enter",w,r,m),S.target=l,S.relatedTarget=c,p=S),c=p,C&&w)t:{for(S=C,a=w,n=0,l=S;l;l=Qr(l))n++;for(l=0,p=a;p;p=Qr(p))l++;for(;0<n-l;)S=Qr(S),n--;for(;0<l-n;)a=Qr(a),l--;for(;n--;){if(S===a||a!==null&&S===a.alternate)break t;S=Qr(S),a=Qr(a)}S=null}else S=null;C!==null&&bc(d,_,C,S,!1),w!==null&&c!==null&&bc(d,c,w,S,!0)}}e:{if(_=f?ei(f):window,C=_.nodeName&&_.nodeName.toLowerCase(),C==="select"||C==="input"&&_.type==="file")var y=Op;else if(vc(_))if(Sh)y=Np;else{y=Ip;var x=Bp}else(C=_.nodeName)&&C.toLowerCase()==="input"&&(_.type==="checkbox"||_.type==="radio")&&(y=jp);if(y&&(y=y(e,f))){yh(d,y,r,m);break e}x&&x(e,_,f),e==="focusout"&&(x=_._wrapperState)&&x.controlled&&_.type==="number"&&Xo(_,"number",_.value)}switch(x=f?ei(f):window,e){case"focusin":(vc(x)||x.contentEditable==="true")&&(Jr=x,la=f,is=null);break;case"focusout":is=la=Jr=null;break;case"mousedown":ca=!0;break;case"contextmenu":case"mouseup":case"dragend":ca=!1,Cc(d,r,m);break;case"selectionchange":if(zp)break;case"keydown":case"keyup":Cc(d,r,m)}var k;if(pl)e:{switch(e){case"compositionstart":var g="onCompositionStart";break e;case"compositionend":g="onCompositionEnd";break e;case"compositionupdate":g="onCompositionUpdate";break e}g=void 0}else Yr?gh(e,r)&&(g="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(g="onCompositionStart");g&&(vh&&r.locale!=="ko"&&(Yr||g!=="onCompositionStart"?g==="onCompositionEnd"&&Yr&&(k=_h()):(ar=m,hl="value"in ar?ar.value:ar.textContent,Yr=!0)),x=En(f,g),0<x.length&&(g=new dc(g,e,null,r,m),d.push({event:g,listeners:x}),k?g.data=k:(k=mh(r),k!==null&&(g.data=k)))),(k=Dp?Tp(e,r):Pp(e,r))&&(f=En(f,"onBeforeInput"),0<f.length&&(m=new dc("onBeforeInput","beforeinput",null,r,m),d.push({event:m,listeners:f}),m.data=k))}Th(d,t)})}function gs(e,t,r){return{instance:e,listener:t,currentTarget:r}}function En(e,t){for(var r=t+"Capture",i=[];e!==null;){var o=e,h=o.stateNode;o.tag===5&&h!==null&&(o=h,h=us(e,r),h!=null&&i.unshift(gs(e,h,o)),h=us(e,t),h!=null&&i.push(gs(e,h,o))),e=e.return}return i}function Qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bc(e,t,r,i,o){for(var h=t._reactName,v=[];r!==null&&r!==i;){var s=r,u=s.alternate,f=s.stateNode;if(u!==null&&u===i)break;s.tag===5&&f!==null&&(s=f,o?(u=us(r,h),u!=null&&v.unshift(gs(r,u,s))):o||(u=us(r,h),u!=null&&v.push(gs(r,u,s)))),r=r.return}v.length!==0&&e.push({event:t,listeners:v})}var Kp=/\r\n?/g,Vp=/\u0000|\uFFFD/g;function kc(e){return(typeof e=="string"?e:""+e).replace(Kp,`
|
|
38
|
+
`).replace(Vp,"")}function Ys(e,t,r){if(t=kc(t),kc(e)!==t&&r)throw Error(K(425))}function Rn(){}var ua=null,ha=null;function da(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fa=typeof setTimeout=="function"?setTimeout:void 0,qp=typeof clearTimeout=="function"?clearTimeout:void 0,Ec=typeof Promise=="function"?Promise:void 0,Qp=typeof queueMicrotask=="function"?queueMicrotask:typeof Ec<"u"?function(e){return Ec.resolve(null).then(e).catch(Gp)}:fa;function Gp(e){setTimeout(function(){throw e})}function To(e,t){var r=t,i=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(i===0){e.removeChild(o),fs(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=o}while(r);fs(t)}function dr(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==="$?")break;if(t==="/$")return null}}return e}function Rc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Bi=Math.random().toString(36).slice(2),Et="__reactFiber$"+Bi,ms="__reactProps$"+Bi,Ht="__reactContainer$"+Bi,pa="__reactEvents$"+Bi,Xp="__reactListeners$"+Bi,Yp="__reactHandles$"+Bi;function kr(e){var t=e[Et];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ht]||r[Et]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Rc(e);e!==null;){if(r=e[Et])return r;e=Rc(e)}return t}e=r,r=e.parentNode}return null}function Is(e){return e=e[Et]||e[Ht],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ei(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(K(33))}function Xn(e){return e[ms]||null}var _a=[],ti=-1;function Cr(e){return{current:e}}function de(e){0>ti||(e.current=_a[ti],_a[ti]=null,ti--)}function ue(e,t){ti++,_a[ti]=e.current,e.current=t}var yr={},Ie=Cr(yr),qe=Cr(!1),Hr=yr;function Ri(e,t){var r=e.type.contextTypes;if(!r)return yr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var o={},h;for(h in r)o[h]=t[h];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Qe(e){return e=e.childContextTypes,e!=null}function Ln(){de(qe),de(Ie)}function Lc(e,t,r){if(Ie.current!==yr)throw Error(K(168));ue(Ie,t),ue(qe,r)}function Ah(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var o in i)if(!(o in t))throw Error(K(108,Bf(e)||"Unknown",o));return ge({},r,i)}function Dn(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yr,Hr=Ie.current,ue(Ie,e),ue(qe,qe.current),!0}function Dc(e,t,r){var i=e.stateNode;if(!i)throw Error(K(169));r?(e=Ah(e,t,Hr),i.__reactInternalMemoizedMergedChildContext=e,de(qe),de(Ie),ue(Ie,e)):de(qe),ue(qe,r)}var Mt=null,Yn=!1,Po=!1;function Mh(e){Mt===null?Mt=[e]:Mt.push(e)}function Jp(e){Yn=!0,Mh(e)}function wr(){if(!Po&&Mt!==null){Po=!0;var e=0,t=ce;try{var r=Mt;for(ce=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}Mt=null,Yn=!1}catch(o){throw Mt!==null&&(Mt=Mt.slice(e+1)),sh(al,wr),o}finally{ce=t,Po=!1}}return null}var ri=[],ii=0,Tn=null,Pn=0,ot=[],at=0,zr=null,It=1,jt="";function xr(e,t){ri[ii++]=Pn,ri[ii++]=Tn,Tn=e,Pn=t}function Oh(e,t,r){ot[at++]=It,ot[at++]=jt,ot[at++]=zr,zr=e;var i=It;e=jt;var o=32-gt(i)-1;i&=~(1<<o),r+=1;var h=32-gt(t)+o;if(30<h){var v=o-o%5;h=(i&(1<<v)-1).toString(32),i>>=v,o-=v,It=1<<32-gt(t)+o|r<<o|i,jt=h+e}else It=1<<h|r<<o|i,jt=e}function vl(e){e.return!==null&&(xr(e,1),Oh(e,1,0))}function gl(e){for(;e===Tn;)Tn=ri[--ii],ri[ii]=null,Pn=ri[--ii],ri[ii]=null;for(;e===zr;)zr=ot[--at],ot[at]=null,jt=ot[--at],ot[at]=null,It=ot[--at],ot[at]=null}var et=null,Ze=null,fe=!1,vt=null;function Bh(e,t){var r=lt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Tc(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,et=e,Ze=dr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,et=e,Ze=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=zr!==null?{id:It,overflow:jt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=lt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,et=e,Ze=null,!0):!1;default:return!1}}function va(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ga(e){if(fe){var t=Ze;if(t){var r=t;if(!Tc(e,t)){if(va(e))throw Error(K(418));t=dr(r.nextSibling);var i=et;t&&Tc(e,t)?Bh(i,r):(e.flags=e.flags&-4097|2,fe=!1,et=e)}}else{if(va(e))throw Error(K(418));e.flags=e.flags&-4097|2,fe=!1,et=e}}}function Pc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;et=e}function Js(e){if(e!==et)return!1;if(!fe)return Pc(e),fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!da(e.type,e.memoizedProps)),t&&(t=Ze)){if(va(e))throw Ih(),Error(K(418));for(;t;)Bh(e,t),t=dr(t.nextSibling)}if(Pc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(K(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Ze=dr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Ze=null}}else Ze=et?dr(e.stateNode.nextSibling):null;return!0}function Ih(){for(var e=Ze;e;)e=dr(e.nextSibling)}function Li(){Ze=et=null,fe=!1}function ml(e){vt===null?vt=[e]:vt.push(e)}var Zp=Wt.ReactCurrentBatchConfig;function Ki(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(K(309));var i=r.stateNode}if(!i)throw Error(K(147,e));var o=i,h=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===h?t.ref:(t=function(v){var s=o.refs;v===null?delete s[h]:s[h]=v},t._stringRef=h,t)}if(typeof e!="string")throw Error(K(284));if(!r._owner)throw Error(K(290,e))}return e}function Zs(e,t){throw e=Object.prototype.toString.call(t),Error(K(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ac(e){var t=e._init;return t(e._payload)}function jh(e){function t(a,n){if(e){var l=a.deletions;l===null?(a.deletions=[n],a.flags|=16):l.push(n)}}function r(a,n){if(!e)return null;for(;n!==null;)t(a,n),n=n.sibling;return null}function i(a,n){for(a=new Map;n!==null;)n.key!==null?a.set(n.key,n):a.set(n.index,n),n=n.sibling;return a}function o(a,n){return a=vr(a,n),a.index=0,a.sibling=null,a}function h(a,n,l){return a.index=l,e?(l=a.alternate,l!==null?(l=l.index,l<n?(a.flags|=2,n):l):(a.flags|=2,n)):(a.flags|=1048576,n)}function v(a){return e&&a.alternate===null&&(a.flags|=2),a}function s(a,n,l,p){return n===null||n.tag!==6?(n=No(l,a.mode,p),n.return=a,n):(n=o(n,l),n.return=a,n)}function u(a,n,l,p){var y=l.type;return y===Xr?m(a,n,l.props.children,p,l.key):n!==null&&(n.elementType===y||typeof y=="object"&&y!==null&&y.$$typeof===Gt&&Ac(y)===n.type)?(p=o(n,l.props),p.ref=Ki(a,n,l),p.return=a,p):(p=mn(l.type,l.key,l.props,null,a.mode,p),p.ref=Ki(a,n,l),p.return=a,p)}function f(a,n,l,p){return n===null||n.tag!==4||n.stateNode.containerInfo!==l.containerInfo||n.stateNode.implementation!==l.implementation?(n=Fo(l,a.mode,p),n.return=a,n):(n=o(n,l.children||[]),n.return=a,n)}function m(a,n,l,p,y){return n===null||n.tag!==7?(n=Fr(l,a.mode,p,y),n.return=a,n):(n=o(n,l),n.return=a,n)}function d(a,n,l){if(typeof n=="string"&&n!==""||typeof n=="number")return n=No(""+n,a.mode,l),n.return=a,n;if(typeof n=="object"&&n!==null){switch(n.$$typeof){case Us:return l=mn(n.type,n.key,n.props,null,a.mode,l),l.ref=Ki(a,null,n),l.return=a,l;case Gr:return n=Fo(n,a.mode,l),n.return=a,n;case Gt:var p=n._init;return d(a,p(n._payload),l)}if(Gi(n)||Hi(n))return n=Fr(n,a.mode,l,null),n.return=a,n;Zs(a,n)}return null}function _(a,n,l,p){var y=n!==null?n.key:null;if(typeof l=="string"&&l!==""||typeof l=="number")return y!==null?null:s(a,n,""+l,p);if(typeof l=="object"&&l!==null){switch(l.$$typeof){case Us:return l.key===y?u(a,n,l,p):null;case Gr:return l.key===y?f(a,n,l,p):null;case Gt:return y=l._init,_(a,n,y(l._payload),p)}if(Gi(l)||Hi(l))return y!==null?null:m(a,n,l,p,null);Zs(a,l)}return null}function C(a,n,l,p,y){if(typeof p=="string"&&p!==""||typeof p=="number")return a=a.get(l)||null,s(n,a,""+p,y);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Us:return a=a.get(p.key===null?l:p.key)||null,u(n,a,p,y);case Gr:return a=a.get(p.key===null?l:p.key)||null,f(n,a,p,y);case Gt:var x=p._init;return C(a,n,l,x(p._payload),y)}if(Gi(p)||Hi(p))return a=a.get(l)||null,m(n,a,p,y,null);Zs(n,p)}return null}function w(a,n,l,p){for(var y=null,x=null,k=n,g=n=0,b=null;k!==null&&g<l.length;g++){k.index>g?(b=k,k=null):b=k.sibling;var D=_(a,k,l[g],p);if(D===null){k===null&&(k=b);break}e&&k&&D.alternate===null&&t(a,k),n=h(D,n,g),x===null?y=D:x.sibling=D,x=D,k=b}if(g===l.length)return r(a,k),fe&&xr(a,g),y;if(k===null){for(;g<l.length;g++)k=d(a,l[g],p),k!==null&&(n=h(k,n,g),x===null?y=k:x.sibling=k,x=k);return fe&&xr(a,g),y}for(k=i(a,k);g<l.length;g++)b=C(k,a,g,l[g],p),b!==null&&(e&&b.alternate!==null&&k.delete(b.key===null?g:b.key),n=h(b,n,g),x===null?y=b:x.sibling=b,x=b);return e&&k.forEach(function(M){return t(a,M)}),fe&&xr(a,g),y}function S(a,n,l,p){var y=Hi(l);if(typeof y!="function")throw Error(K(150));if(l=y.call(l),l==null)throw Error(K(151));for(var x=y=null,k=n,g=n=0,b=null,D=l.next();k!==null&&!D.done;g++,D=l.next()){k.index>g?(b=k,k=null):b=k.sibling;var M=_(a,k,D.value,p);if(M===null){k===null&&(k=b);break}e&&k&&M.alternate===null&&t(a,k),n=h(M,n,g),x===null?y=M:x.sibling=M,x=M,k=b}if(D.done)return r(a,k),fe&&xr(a,g),y;if(k===null){for(;!D.done;g++,D=l.next())D=d(a,D.value,p),D!==null&&(n=h(D,n,g),x===null?y=D:x.sibling=D,x=D);return fe&&xr(a,g),y}for(k=i(a,k);!D.done;g++,D=l.next())D=C(k,a,g,D.value,p),D!==null&&(e&&D.alternate!==null&&k.delete(D.key===null?g:D.key),n=h(D,n,g),x===null?y=D:x.sibling=D,x=D);return e&&k.forEach(function(P){return t(a,P)}),fe&&xr(a,g),y}function c(a,n,l,p){if(typeof l=="object"&&l!==null&&l.type===Xr&&l.key===null&&(l=l.props.children),typeof l=="object"&&l!==null){switch(l.$$typeof){case Us:e:{for(var y=l.key,x=n;x!==null;){if(x.key===y){if(y=l.type,y===Xr){if(x.tag===7){r(a,x.sibling),n=o(x,l.props.children),n.return=a,a=n;break e}}else if(x.elementType===y||typeof y=="object"&&y!==null&&y.$$typeof===Gt&&Ac(y)===x.type){r(a,x.sibling),n=o(x,l.props),n.ref=Ki(a,x,l),n.return=a,a=n;break e}r(a,x);break}else t(a,x);x=x.sibling}l.type===Xr?(n=Fr(l.props.children,a.mode,p,l.key),n.return=a,a=n):(p=mn(l.type,l.key,l.props,null,a.mode,p),p.ref=Ki(a,n,l),p.return=a,a=p)}return v(a);case Gr:e:{for(x=l.key;n!==null;){if(n.key===x)if(n.tag===4&&n.stateNode.containerInfo===l.containerInfo&&n.stateNode.implementation===l.implementation){r(a,n.sibling),n=o(n,l.children||[]),n.return=a,a=n;break e}else{r(a,n);break}else t(a,n);n=n.sibling}n=Fo(l,a.mode,p),n.return=a,a=n}return v(a);case Gt:return x=l._init,c(a,n,x(l._payload),p)}if(Gi(l))return w(a,n,l,p);if(Hi(l))return S(a,n,l,p);Zs(a,l)}return typeof l=="string"&&l!==""||typeof l=="number"?(l=""+l,n!==null&&n.tag===6?(r(a,n.sibling),n=o(n,l),n.return=a,a=n):(r(a,n),n=No(l,a.mode,p),n.return=a,a=n),v(a)):r(a,n)}return c}var Di=jh(!0),Nh=jh(!1),An=Cr(null),Mn=null,si=null,yl=null;function Sl(){yl=si=Mn=null}function Cl(e){var t=An.current;de(An),e._currentValue=t}function ma(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function hi(e,t){Mn=e,yl=si=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ve=!0),e.firstContext=null)}function ut(e){var t=e._currentValue;if(yl!==e)if(e={context:e,memoizedValue:t,next:null},si===null){if(Mn===null)throw Error(K(308));si=e,Mn.dependencies={lanes:0,firstContext:e}}else si=si.next=e;return t}var Er=null;function wl(e){Er===null?Er=[e]:Er.push(e)}function Fh(e,t,r,i){var o=t.interleaved;return o===null?(r.next=r,wl(t)):(r.next=o.next,o.next=r),t.interleaved=r,zt(e,i)}function zt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Xt=!1;function xl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Hh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Nt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fr(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,ne&2){var o=i.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),i.pending=t,zt(e,r)}return o=i.interleaved,o===null?(t.next=t,wl(i)):(t.next=o.next,o.next=t),i.interleaved=t,zt(e,r)}function dn(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,ll(e,r)}}function Mc(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var o=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var v={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};h===null?o=h=v:h=h.next=v,r=r.next}while(r!==null);h===null?o=h=t:h=h.next=t}else o=h=t;r={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:h,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function On(e,t,r,i){var o=e.updateQueue;Xt=!1;var h=o.firstBaseUpdate,v=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var u=s,f=u.next;u.next=null,v===null?h=f:v.next=f,v=u;var m=e.alternate;m!==null&&(m=m.updateQueue,s=m.lastBaseUpdate,s!==v&&(s===null?m.firstBaseUpdate=f:s.next=f,m.lastBaseUpdate=u))}if(h!==null){var d=o.baseState;v=0,m=f=u=null,s=h;do{var _=s.lane,C=s.eventTime;if((i&_)===_){m!==null&&(m=m.next={eventTime:C,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var w=e,S=s;switch(_=t,C=r,S.tag){case 1:if(w=S.payload,typeof w=="function"){d=w.call(C,d,_);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,_=typeof w=="function"?w.call(C,d,_):w,_==null)break e;d=ge({},d,_);break e;case 2:Xt=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,_=o.effects,_===null?o.effects=[s]:_.push(s))}else C={eventTime:C,lane:_,tag:s.tag,payload:s.payload,callback:s.callback,next:null},m===null?(f=m=C,u=d):m=m.next=C,v|=_;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;_=s,s=_.next,_.next=null,o.lastBaseUpdate=_,o.shared.pending=null}}while(!0);if(m===null&&(u=d),o.baseState=u,o.firstBaseUpdate=f,o.lastBaseUpdate=m,t=o.shared.interleaved,t!==null){o=t;do v|=o.lane,o=o.next;while(o!==t)}else h===null&&(o.shared.lanes=0);Wr|=v,e.lanes=v,e.memoizedState=d}}function Oc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],o=i.callback;if(o!==null){if(i.callback=null,i=r,typeof o!="function")throw Error(K(191,o));o.call(i)}}}var js={},Lt=Cr(js),ys=Cr(js),Ss=Cr(js);function Rr(e){if(e===js)throw Error(K(174));return e}function bl(e,t){switch(ue(Ss,t),ue(ys,e),ue(Lt,js),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Jo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Jo(t,e)}de(Lt),ue(Lt,t)}function Ti(){de(Lt),de(ys),de(Ss)}function zh(e){Rr(Ss.current);var t=Rr(Lt.current),r=Jo(t,e.type);t!==r&&(ue(ys,e),ue(Lt,r))}function kl(e){ys.current===e&&(de(Lt),de(ys))}var _e=Cr(0);function Bn(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Ao=[];function El(){for(var e=0;e<Ao.length;e++)Ao[e]._workInProgressVersionPrimary=null;Ao.length=0}var fn=Wt.ReactCurrentDispatcher,Mo=Wt.ReactCurrentBatchConfig,Ur=0,ve=null,we=null,ke=null,In=!1,ss=!1,Cs=0,e_=0;function Ae(){throw Error(K(321))}function Rl(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!yt(e[r],t[r]))return!1;return!0}function Ll(e,t,r,i,o,h){if(Ur=h,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fn.current=e===null||e.memoizedState===null?s_:n_,e=r(i,o),ss){h=0;do{if(ss=!1,Cs=0,25<=h)throw Error(K(301));h+=1,ke=we=null,t.updateQueue=null,fn.current=o_,e=r(i,o)}while(ss)}if(fn.current=jn,t=we!==null&&we.next!==null,Ur=0,ke=we=ve=null,In=!1,t)throw Error(K(300));return e}function Dl(){var e=Cs!==0;return Cs=0,e}function wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ke===null?ve.memoizedState=ke=e:ke=ke.next=e,ke}function ht(){if(we===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=we.next;var t=ke===null?ve.memoizedState:ke.next;if(t!==null)ke=t,we=e;else{if(e===null)throw Error(K(310));we=e,e={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},ke===null?ve.memoizedState=ke=e:ke=ke.next=e}return ke}function ws(e,t){return typeof t=="function"?t(e):t}function Oo(e){var t=ht(),r=t.queue;if(r===null)throw Error(K(311));r.lastRenderedReducer=e;var i=we,o=i.baseQueue,h=r.pending;if(h!==null){if(o!==null){var v=o.next;o.next=h.next,h.next=v}i.baseQueue=o=h,r.pending=null}if(o!==null){h=o.next,i=i.baseState;var s=v=null,u=null,f=h;do{var m=f.lane;if((Ur&m)===m)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),i=f.hasEagerState?f.eagerState:e(i,f.action);else{var d={lane:m,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(s=u=d,v=i):u=u.next=d,ve.lanes|=m,Wr|=m}f=f.next}while(f!==null&&f!==h);u===null?v=i:u.next=s,yt(i,t.memoizedState)||(Ve=!0),t.memoizedState=i,t.baseState=v,t.baseQueue=u,r.lastRenderedState=i}if(e=r.interleaved,e!==null){o=e;do h=o.lane,ve.lanes|=h,Wr|=h,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Bo(e){var t=ht(),r=t.queue;if(r===null)throw Error(K(311));r.lastRenderedReducer=e;var i=r.dispatch,o=r.pending,h=t.memoizedState;if(o!==null){r.pending=null;var v=o=o.next;do h=e(h,v.action),v=v.next;while(v!==o);yt(h,t.memoizedState)||(Ve=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),r.lastRenderedState=h}return[h,i]}function Uh(){}function Wh(e,t){var r=ve,i=ht(),o=t(),h=!yt(i.memoizedState,o);if(h&&(i.memoizedState=o,Ve=!0),i=i.queue,Tl(Vh.bind(null,r,i,e),[e]),i.getSnapshot!==t||h||ke!==null&&ke.memoizedState.tag&1){if(r.flags|=2048,xs(9,Kh.bind(null,r,i,o,t),void 0,null),Ee===null)throw Error(K(349));Ur&30||$h(r,t,o)}return o}function $h(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Kh(e,t,r,i){t.value=r,t.getSnapshot=i,qh(t)&&Qh(e)}function Vh(e,t,r){return r(function(){qh(t)&&Qh(e)})}function qh(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!yt(e,r)}catch{return!0}}function Qh(e){var t=zt(e,1);t!==null&&mt(t,e,1,-1)}function Bc(e){var t=wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:e},t.queue=e,e=e.dispatch=i_.bind(null,ve,e),[t.memoizedState,e]}function xs(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function Gh(){return ht().memoizedState}function pn(e,t,r,i){var o=wt();ve.flags|=e,o.memoizedState=xs(1|t,r,void 0,i===void 0?null:i)}function Jn(e,t,r,i){var o=ht();i=i===void 0?null:i;var h=void 0;if(we!==null){var v=we.memoizedState;if(h=v.destroy,i!==null&&Rl(i,v.deps)){o.memoizedState=xs(t,r,h,i);return}}ve.flags|=e,o.memoizedState=xs(1|t,r,h,i)}function Ic(e,t){return pn(8390656,8,e,t)}function Tl(e,t){return Jn(2048,8,e,t)}function Xh(e,t){return Jn(4,2,e,t)}function Yh(e,t){return Jn(4,4,e,t)}function Jh(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Zh(e,t,r){return r=r!=null?r.concat([e]):null,Jn(4,4,Jh.bind(null,t,e),r)}function Pl(){}function ed(e,t){var r=ht();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Rl(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function td(e,t){var r=ht();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Rl(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function rd(e,t,r){return Ur&21?(yt(r,t)||(r=ah(),ve.lanes|=r,Wr|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ve=!0),e.memoizedState=r)}function t_(e,t){var r=ce;ce=r!==0&&4>r?r:4,e(!0);var i=Mo.transition;Mo.transition={};try{e(!1),t()}finally{ce=r,Mo.transition=i}}function id(){return ht().memoizedState}function r_(e,t,r){var i=_r(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},sd(e))nd(t,r);else if(r=Fh(e,t,r,i),r!==null){var o=Fe();mt(r,e,i,o),od(r,t,i)}}function i_(e,t,r){var i=_r(e),o={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(sd(e))nd(t,o);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var v=t.lastRenderedState,s=h(v,r);if(o.hasEagerState=!0,o.eagerState=s,yt(s,v)){var u=t.interleaved;u===null?(o.next=o,wl(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}r=Fh(e,t,o,i),r!==null&&(o=Fe(),mt(r,e,i,o),od(r,t,i))}}function sd(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function nd(e,t){ss=In=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function od(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,ll(e,r)}}var jn={readContext:ut,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useInsertionEffect:Ae,useLayoutEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useMutableSource:Ae,useSyncExternalStore:Ae,useId:Ae,unstable_isNewReconciler:!1},s_={readContext:ut,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:Ic,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,pn(4194308,4,Jh.bind(null,t,e),r)},useLayoutEffect:function(e,t){return pn(4194308,4,e,t)},useInsertionEffect:function(e,t){return pn(4,2,e,t)},useMemo:function(e,t){var r=wt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=wt();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=r_.bind(null,ve,e),[i.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:Bc,useDebugValue:Pl,useDeferredValue:function(e){return wt().memoizedState=e},useTransition:function(){var e=Bc(!1),t=e[0];return e=t_.bind(null,e[1]),wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ve,o=wt();if(fe){if(r===void 0)throw Error(K(407));r=r()}else{if(r=t(),Ee===null)throw Error(K(349));Ur&30||$h(i,t,r)}o.memoizedState=r;var h={value:r,getSnapshot:t};return o.queue=h,Ic(Vh.bind(null,i,h,e),[e]),i.flags|=2048,xs(9,Kh.bind(null,i,h,r,t),void 0,null),r},useId:function(){var e=wt(),t=Ee.identifierPrefix;if(fe){var r=jt,i=It;r=(i&~(1<<32-gt(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Cs++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=e_++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},n_={readContext:ut,useCallback:ed,useContext:ut,useEffect:Tl,useImperativeHandle:Zh,useInsertionEffect:Xh,useLayoutEffect:Yh,useMemo:td,useReducer:Oo,useRef:Gh,useState:function(){return Oo(ws)},useDebugValue:Pl,useDeferredValue:function(e){var t=ht();return rd(t,we.memoizedState,e)},useTransition:function(){var e=Oo(ws)[0],t=ht().memoizedState;return[e,t]},useMutableSource:Uh,useSyncExternalStore:Wh,useId:id,unstable_isNewReconciler:!1},o_={readContext:ut,useCallback:ed,useContext:ut,useEffect:Tl,useImperativeHandle:Zh,useInsertionEffect:Xh,useLayoutEffect:Yh,useMemo:td,useReducer:Bo,useRef:Gh,useState:function(){return Bo(ws)},useDebugValue:Pl,useDeferredValue:function(e){var t=ht();return we===null?t.memoizedState=e:rd(t,we.memoizedState,e)},useTransition:function(){var e=Bo(ws)[0],t=ht().memoizedState;return[e,t]},useMutableSource:Uh,useSyncExternalStore:Wh,useId:id,unstable_isNewReconciler:!1};function ft(e,t){if(e&&e.defaultProps){t=ge({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function ya(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:ge({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Zn={isMounted:function(e){return(e=e._reactInternals)?Vr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Fe(),o=_r(e),h=Nt(i,o);h.payload=t,r!=null&&(h.callback=r),t=fr(e,h,o),t!==null&&(mt(t,e,o,i),dn(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Fe(),o=_r(e),h=Nt(i,o);h.tag=1,h.payload=t,r!=null&&(h.callback=r),t=fr(e,h,o),t!==null&&(mt(t,e,o,i),dn(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Fe(),i=_r(e),o=Nt(r,i);o.tag=2,t!=null&&(o.callback=t),t=fr(e,o,i),t!==null&&(mt(t,e,i,r),dn(t,e,i))}};function jc(e,t,r,i,o,h,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,h,v):t.prototype&&t.prototype.isPureReactComponent?!_s(r,i)||!_s(o,h):!0}function ad(e,t,r){var i=!1,o=yr,h=t.contextType;return typeof h=="object"&&h!==null?h=ut(h):(o=Qe(t)?Hr:Ie.current,i=t.contextTypes,h=(i=i!=null)?Ri(e,o):yr),t=new t(r,h),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zn,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=h),t}function Nc(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&Zn.enqueueReplaceState(t,t.state,null)}function Sa(e,t,r,i){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},xl(e);var h=t.contextType;typeof h=="object"&&h!==null?o.context=ut(h):(h=Qe(t)?Hr:Ie.current,o.context=Ri(e,h)),o.state=e.memoizedState,h=t.getDerivedStateFromProps,typeof h=="function"&&(ya(e,t,h,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Zn.enqueueReplaceState(o,o.state,null),On(e,r,o,i),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Pi(e,t){try{var r="",i=t;do r+=Of(i),i=i.return;while(i);var o=r}catch(h){o=`
|
|
39
|
+
Error generating stack: `+h.message+`
|
|
40
|
+
`+h.stack}return{value:e,source:t,stack:o,digest:null}}function Io(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Ca(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var a_=typeof WeakMap=="function"?WeakMap:Map;function ld(e,t,r){r=Nt(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Fn||(Fn=!0,Pa=i),Ca(e,t)},r}function cd(e,t,r){r=Nt(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var o=t.value;r.payload=function(){return i(o)},r.callback=function(){Ca(e,t)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(r.callback=function(){Ca(e,t),typeof i!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var v=t.stack;this.componentDidCatch(t.value,{componentStack:v!==null?v:""})}),r}function Fc(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new a_;var o=new Set;i.set(t,o)}else o=i.get(t),o===void 0&&(o=new Set,i.set(t,o));o.has(r)||(o.add(r),e=C_.bind(null,e,t,r),t.then(e,e))}function Hc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function zc(e,t,r,i,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Nt(-1,1),t.tag=2,fr(r,t,1))),r.lanes|=1),e)}var l_=Wt.ReactCurrentOwner,Ve=!1;function Ne(e,t,r,i){t.child=e===null?Nh(t,null,r,i):Di(t,e.child,r,i)}function Uc(e,t,r,i,o){r=r.render;var h=t.ref;return hi(t,o),i=Ll(e,t,r,i,h,o),r=Dl(),e!==null&&!Ve?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ut(e,t,o)):(fe&&r&&vl(t),t.flags|=1,Ne(e,t,i,o),t.child)}function Wc(e,t,r,i,o){if(e===null){var h=r.type;return typeof h=="function"&&!Fl(h)&&h.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=h,ud(e,t,h,i,o)):(e=mn(r.type,null,i,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!(e.lanes&o)){var v=h.memoizedProps;if(r=r.compare,r=r!==null?r:_s,r(v,i)&&e.ref===t.ref)return Ut(e,t,o)}return t.flags|=1,e=vr(h,i),e.ref=t.ref,e.return=t,t.child=e}function ud(e,t,r,i,o){if(e!==null){var h=e.memoizedProps;if(_s(h,i)&&e.ref===t.ref)if(Ve=!1,t.pendingProps=i=h,(e.lanes&o)!==0)e.flags&131072&&(Ve=!0);else return t.lanes=e.lanes,Ut(e,t,o)}return wa(e,t,r,i,o)}function hd(e,t,r){var i=t.pendingProps,o=i.children,h=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue(oi,Xe),Xe|=r;else{if(!(r&1073741824))return e=h!==null?h.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ue(oi,Xe),Xe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=h!==null?h.baseLanes:r,ue(oi,Xe),Xe|=i}else h!==null?(i=h.baseLanes|r,t.memoizedState=null):i=r,ue(oi,Xe),Xe|=i;return Ne(e,t,o,r),t.child}function dd(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function wa(e,t,r,i,o){var h=Qe(r)?Hr:Ie.current;return h=Ri(t,h),hi(t,o),r=Ll(e,t,r,i,h,o),i=Dl(),e!==null&&!Ve?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ut(e,t,o)):(fe&&i&&vl(t),t.flags|=1,Ne(e,t,r,o),t.child)}function $c(e,t,r,i,o){if(Qe(r)){var h=!0;Dn(t)}else h=!1;if(hi(t,o),t.stateNode===null)_n(e,t),ad(t,r,i),Sa(t,r,i,o),i=!0;else if(e===null){var v=t.stateNode,s=t.memoizedProps;v.props=s;var u=v.context,f=r.contextType;typeof f=="object"&&f!==null?f=ut(f):(f=Qe(r)?Hr:Ie.current,f=Ri(t,f));var m=r.getDerivedStateFromProps,d=typeof m=="function"||typeof v.getSnapshotBeforeUpdate=="function";d||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(s!==i||u!==f)&&Nc(t,v,i,f),Xt=!1;var _=t.memoizedState;v.state=_,On(t,i,v,o),u=t.memoizedState,s!==i||_!==u||qe.current||Xt?(typeof m=="function"&&(ya(t,r,m,i),u=t.memoizedState),(s=Xt||jc(t,r,s,i,_,u,f))?(d||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(t.flags|=4194308)):(typeof v.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=u),v.props=i,v.state=u,v.context=f,i=s):(typeof v.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{v=t.stateNode,Hh(e,t),s=t.memoizedProps,f=t.type===t.elementType?s:ft(t.type,s),v.props=f,d=t.pendingProps,_=v.context,u=r.contextType,typeof u=="object"&&u!==null?u=ut(u):(u=Qe(r)?Hr:Ie.current,u=Ri(t,u));var C=r.getDerivedStateFromProps;(m=typeof C=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(s!==d||_!==u)&&Nc(t,v,i,u),Xt=!1,_=t.memoizedState,v.state=_,On(t,i,v,o);var w=t.memoizedState;s!==d||_!==w||qe.current||Xt?(typeof C=="function"&&(ya(t,r,C,i),w=t.memoizedState),(f=Xt||jc(t,r,f,i,_,w,u)||!1)?(m||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(i,w,u),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(i,w,u)),typeof v.componentDidUpdate=="function"&&(t.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof v.componentDidUpdate!="function"||s===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=w),v.props=i,v.state=w,v.context=u,i=f):(typeof v.componentDidUpdate!="function"||s===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),i=!1)}return xa(e,t,r,i,h,o)}function xa(e,t,r,i,o,h){dd(e,t);var v=(t.flags&128)!==0;if(!i&&!v)return o&&Dc(t,r,!1),Ut(e,t,h);i=t.stateNode,l_.current=t;var s=v&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&v?(t.child=Di(t,e.child,null,h),t.child=Di(t,null,s,h)):Ne(e,t,s,h),t.memoizedState=i.state,o&&Dc(t,r,!0),t.child}function fd(e){var t=e.stateNode;t.pendingContext?Lc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Lc(e,t.context,!1),bl(e,t.containerInfo)}function Kc(e,t,r,i,o){return Li(),ml(o),t.flags|=256,Ne(e,t,r,i),t.child}var ba={dehydrated:null,treeContext:null,retryLane:0};function ka(e){return{baseLanes:e,cachePool:null,transitions:null}}function pd(e,t,r){var i=t.pendingProps,o=_e.current,h=!1,v=(t.flags&128)!==0,s;if((s=v)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(h=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ue(_e,o&1),e===null)return ga(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(v=i.children,e=i.fallback,h?(i=t.mode,h=t.child,v={mode:"hidden",children:v},!(i&1)&&h!==null?(h.childLanes=0,h.pendingProps=v):h=ro(v,i,0,null),e=Fr(e,i,r,null),h.return=t,e.return=t,h.sibling=e,t.child=h,t.child.memoizedState=ka(r),t.memoizedState=ba,e):Al(t,v));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return c_(e,t,v,i,s,o,r);if(h){h=i.fallback,v=t.mode,o=e.child,s=o.sibling;var u={mode:"hidden",children:i.children};return!(v&1)&&t.child!==o?(i=t.child,i.childLanes=0,i.pendingProps=u,t.deletions=null):(i=vr(o,u),i.subtreeFlags=o.subtreeFlags&14680064),s!==null?h=vr(s,h):(h=Fr(h,v,r,null),h.flags|=2),h.return=t,i.return=t,i.sibling=h,t.child=i,i=h,h=t.child,v=e.child.memoizedState,v=v===null?ka(r):{baseLanes:v.baseLanes|r,cachePool:null,transitions:v.transitions},h.memoizedState=v,h.childLanes=e.childLanes&~r,t.memoizedState=ba,i}return h=e.child,e=h.sibling,i=vr(h,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Al(e,t){return t=ro({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function en(e,t,r,i){return i!==null&&ml(i),Di(t,e.child,null,r),e=Al(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function c_(e,t,r,i,o,h,v){if(r)return t.flags&256?(t.flags&=-257,i=Io(Error(K(422))),en(e,t,v,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(h=i.fallback,o=t.mode,i=ro({mode:"visible",children:i.children},o,0,null),h=Fr(h,o,v,null),h.flags|=2,i.return=t,h.return=t,i.sibling=h,t.child=i,t.mode&1&&Di(t,e.child,null,v),t.child.memoizedState=ka(v),t.memoizedState=ba,h);if(!(t.mode&1))return en(e,t,v,null);if(o.data==="$!"){if(i=o.nextSibling&&o.nextSibling.dataset,i)var s=i.dgst;return i=s,h=Error(K(419)),i=Io(h,i,void 0),en(e,t,v,i)}if(s=(v&e.childLanes)!==0,Ve||s){if(i=Ee,i!==null){switch(v&-v){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(i.suspendedLanes|v)?0:o,o!==0&&o!==h.retryLane&&(h.retryLane=o,zt(e,o),mt(i,e,o,-1))}return Nl(),i=Io(Error(K(421))),en(e,t,v,i)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=w_.bind(null,e),o._reactRetry=t,null):(e=h.treeContext,Ze=dr(o.nextSibling),et=t,fe=!0,vt=null,e!==null&&(ot[at++]=It,ot[at++]=jt,ot[at++]=zr,It=e.id,jt=e.overflow,zr=t),t=Al(t,i.children),t.flags|=4096,t)}function Vc(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),ma(e.return,t,r)}function jo(e,t,r,i,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=i,h.tail=r,h.tailMode=o)}function _d(e,t,r){var i=t.pendingProps,o=i.revealOrder,h=i.tail;if(Ne(e,t,i.children,r),i=_e.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Vc(e,r,t);else if(e.tag===19)Vc(e,r,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}i&=1}if(ue(_e,i),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&Bn(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),jo(t,!1,o,r,h);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Bn(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}jo(t,!0,r,null,h);break;case"together":jo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _n(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ut(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Wr|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(K(153));if(t.child!==null){for(e=t.child,r=vr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=vr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function u_(e,t,r){switch(t.tag){case 3:fd(t),Li();break;case 5:zh(t);break;case 1:Qe(t.type)&&Dn(t);break;case 4:bl(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,o=t.memoizedProps.value;ue(An,i._currentValue),i._currentValue=o;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ue(_e,_e.current&1),t.flags|=128,null):r&t.child.childLanes?pd(e,t,r):(ue(_e,_e.current&1),e=Ut(e,t,r),e!==null?e.sibling:null);ue(_e,_e.current&1);break;case 19:if(i=(r&t.childLanes)!==0,e.flags&128){if(i)return _d(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ue(_e,_e.current),i)break;return null;case 22:case 23:return t.lanes=0,hd(e,t,r)}return Ut(e,t,r)}var vd,Ea,gd,md;vd=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Ea=function(){};gd=function(e,t,r,i){var o=e.memoizedProps;if(o!==i){e=t.stateNode,Rr(Lt.current);var h=null;switch(r){case"input":o=Qo(e,o),i=Qo(e,i),h=[];break;case"select":o=ge({},o,{value:void 0}),i=ge({},i,{value:void 0}),h=[];break;case"textarea":o=Yo(e,o),i=Yo(e,i),h=[];break;default:typeof o.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Rn)}Zo(r,i);var v;r=null;for(f in o)if(!i.hasOwnProperty(f)&&o.hasOwnProperty(f)&&o[f]!=null)if(f==="style"){var s=o[f];for(v in s)s.hasOwnProperty(v)&&(r||(r={}),r[v]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(ls.hasOwnProperty(f)?h||(h=[]):(h=h||[]).push(f,null));for(f in i){var u=i[f];if(s=o!=null?o[f]:void 0,i.hasOwnProperty(f)&&u!==s&&(u!=null||s!=null))if(f==="style")if(s){for(v in s)!s.hasOwnProperty(v)||u&&u.hasOwnProperty(v)||(r||(r={}),r[v]="");for(v in u)u.hasOwnProperty(v)&&s[v]!==u[v]&&(r||(r={}),r[v]=u[v])}else r||(h||(h=[]),h.push(f,r)),r=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(h=h||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(h=h||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(ls.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&he("scroll",e),h||s===u||(h=[])):(h=h||[]).push(f,u))}r&&(h=h||[]).push("style",r);var f=h;(t.updateQueue=f)&&(t.flags|=4)}};md=function(e,t,r,i){r!==i&&(t.flags|=4)};function Vi(e,t){if(!fe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,i|=o.subtreeFlags&14680064,i|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,i|=o.subtreeFlags,i|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function h_(e,t,r){var i=t.pendingProps;switch(gl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Qe(t.type)&&Ln(),Me(t),null;case 3:return i=t.stateNode,Ti(),de(qe),de(Ie),El(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Js(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,vt!==null&&(Oa(vt),vt=null))),Ea(e,t),Me(t),null;case 5:kl(t);var o=Rr(Ss.current);if(r=t.type,e!==null&&t.stateNode!=null)gd(e,t,r,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(K(166));return Me(t),null}if(e=Rr(Lt.current),Js(t)){i=t.stateNode,r=t.type;var h=t.memoizedProps;switch(i[Et]=t,i[ms]=h,e=(t.mode&1)!==0,r){case"dialog":he("cancel",i),he("close",i);break;case"iframe":case"object":case"embed":he("load",i);break;case"video":case"audio":for(o=0;o<Yi.length;o++)he(Yi[o],i);break;case"source":he("error",i);break;case"img":case"image":case"link":he("error",i),he("load",i);break;case"details":he("toggle",i);break;case"input":tc(i,h),he("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!h.multiple},he("invalid",i);break;case"textarea":ic(i,h),he("invalid",i)}Zo(r,h),o=null;for(var v in h)if(h.hasOwnProperty(v)){var s=h[v];v==="children"?typeof s=="string"?i.textContent!==s&&(h.suppressHydrationWarning!==!0&&Ys(i.textContent,s,e),o=["children",s]):typeof s=="number"&&i.textContent!==""+s&&(h.suppressHydrationWarning!==!0&&Ys(i.textContent,s,e),o=["children",""+s]):ls.hasOwnProperty(v)&&s!=null&&v==="onScroll"&&he("scroll",i)}switch(r){case"input":Ws(i),rc(i,h,!0);break;case"textarea":Ws(i),sc(i);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(i.onclick=Rn)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{v=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Vu(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=v.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=v.createElement(r,{is:i.is}):(e=v.createElement(r),r==="select"&&(v=e,i.multiple?v.multiple=!0:i.size&&(v.size=i.size))):e=v.createElementNS(e,r),e[Et]=t,e[ms]=i,vd(e,t,!1,!1),t.stateNode=e;e:{switch(v=ea(r,i),r){case"dialog":he("cancel",e),he("close",e),o=i;break;case"iframe":case"object":case"embed":he("load",e),o=i;break;case"video":case"audio":for(o=0;o<Yi.length;o++)he(Yi[o],e);o=i;break;case"source":he("error",e),o=i;break;case"img":case"image":case"link":he("error",e),he("load",e),o=i;break;case"details":he("toggle",e),o=i;break;case"input":tc(e,i),o=Qo(e,i),he("invalid",e);break;case"option":o=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},o=ge({},i,{value:void 0}),he("invalid",e);break;case"textarea":ic(e,i),o=Yo(e,i),he("invalid",e);break;default:o=i}Zo(r,o),s=o;for(h in s)if(s.hasOwnProperty(h)){var u=s[h];h==="style"?Gu(e,u):h==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&qu(e,u)):h==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&cs(e,u):typeof u=="number"&&cs(e,""+u):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(ls.hasOwnProperty(h)?u!=null&&h==="onScroll"&&he("scroll",e):u!=null&&rl(e,h,u,v))}switch(r){case"input":Ws(e),rc(e,i,!1);break;case"textarea":Ws(e),sc(e);break;case"option":i.value!=null&&e.setAttribute("value",""+mr(i.value));break;case"select":e.multiple=!!i.multiple,h=i.value,h!=null?ai(e,!!i.multiple,h,!1):i.defaultValue!=null&&ai(e,!!i.multiple,i.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Rn)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Me(t),null;case 6:if(e&&t.stateNode!=null)md(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(K(166));if(r=Rr(Ss.current),Rr(Lt.current),Js(t)){if(i=t.stateNode,r=t.memoizedProps,i[Et]=t,(h=i.nodeValue!==r)&&(e=et,e!==null))switch(e.tag){case 3:Ys(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ys(i.nodeValue,r,(e.mode&1)!==0)}h&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[Et]=t,t.stateNode=i}return Me(t),null;case 13:if(de(_e),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(fe&&Ze!==null&&t.mode&1&&!(t.flags&128))Ih(),Li(),t.flags|=98560,h=!1;else if(h=Js(t),i!==null&&i.dehydrated!==null){if(e===null){if(!h)throw Error(K(318));if(h=t.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(K(317));h[Et]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Me(t),h=!1}else vt!==null&&(Oa(vt),vt=null),h=!0;if(!h)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||_e.current&1?xe===0&&(xe=3):Nl())),t.updateQueue!==null&&(t.flags|=4),Me(t),null);case 4:return Ti(),Ea(e,t),e===null&&vs(t.stateNode.containerInfo),Me(t),null;case 10:return Cl(t.type._context),Me(t),null;case 17:return Qe(t.type)&&Ln(),Me(t),null;case 19:if(de(_e),h=t.memoizedState,h===null)return Me(t),null;if(i=(t.flags&128)!==0,v=h.rendering,v===null)if(i)Vi(h,!1);else{if(xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(v=Bn(e),v!==null){for(t.flags|=128,Vi(h,!1),i=v.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)h=r,e=i,h.flags&=14680066,v=h.alternate,v===null?(h.childLanes=0,h.lanes=e,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=v.childLanes,h.lanes=v.lanes,h.child=v.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=v.memoizedProps,h.memoizedState=v.memoizedState,h.updateQueue=v.updateQueue,h.type=v.type,e=v.dependencies,h.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ue(_e,_e.current&1|2),t.child}e=e.sibling}h.tail!==null&&Se()>Ai&&(t.flags|=128,i=!0,Vi(h,!1),t.lanes=4194304)}else{if(!i)if(e=Bn(v),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Vi(h,!0),h.tail===null&&h.tailMode==="hidden"&&!v.alternate&&!fe)return Me(t),null}else 2*Se()-h.renderingStartTime>Ai&&r!==1073741824&&(t.flags|=128,i=!0,Vi(h,!1),t.lanes=4194304);h.isBackwards?(v.sibling=t.child,t.child=v):(r=h.last,r!==null?r.sibling=v:t.child=v,h.last=v)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=Se(),t.sibling=null,r=_e.current,ue(_e,i?r&1|2:r&1),t):(Me(t),null);case 22:case 23:return jl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Xe&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function d_(e,t){switch(gl(t),t.tag){case 1:return Qe(t.type)&&Ln(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ti(),de(qe),de(Ie),El(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return kl(t),null;case 13:if(de(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(_e),null;case 4:return Ti(),null;case 10:return Cl(t.type._context),null;case 22:case 23:return jl(),null;case 24:return null;default:return null}}var tn=!1,Be=!1,f_=typeof WeakSet=="function"?WeakSet:Set,G=null;function ni(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){ye(e,t,i)}else r.current=null}function Ra(e,t,r){try{r()}catch(i){ye(e,t,i)}}var qc=!1;function p_(e,t){if(ua=bn,e=xh(),_l(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var o=i.anchorOffset,h=i.focusNode;i=i.focusOffset;try{r.nodeType,h.nodeType}catch{r=null;break e}var v=0,s=-1,u=-1,f=0,m=0,d=e,_=null;t:for(;;){for(var C;d!==r||o!==0&&d.nodeType!==3||(s=v+o),d!==h||i!==0&&d.nodeType!==3||(u=v+i),d.nodeType===3&&(v+=d.nodeValue.length),(C=d.firstChild)!==null;)_=d,d=C;for(;;){if(d===e)break t;if(_===r&&++f===o&&(s=v),_===h&&++m===i&&(u=v),(C=d.nextSibling)!==null)break;d=_,_=d.parentNode}d=C}r=s===-1||u===-1?null:{start:s,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(ha={focusedElem:e,selectionRange:r},bn=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,c=w.memoizedState,a=t.stateNode,n=a.getSnapshotBeforeUpdate(t.elementType===t.type?S:ft(t.type,S),c);a.__reactInternalSnapshotBeforeUpdate=n}break;case 3:var l=t.stateNode.containerInfo;l.nodeType===1?l.textContent="":l.nodeType===9&&l.documentElement&&l.removeChild(l.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(p){ye(t,t.return,p)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return w=qc,qc=!1,w}function ns(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var o=i=i.next;do{if((o.tag&e)===e){var h=o.destroy;o.destroy=void 0,h!==void 0&&Ra(t,r,h)}o=o.next}while(o!==i)}}function eo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function La(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function yd(e){var t=e.alternate;t!==null&&(e.alternate=null,yd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Et],delete t[ms],delete t[pa],delete t[Xp],delete t[Yp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Sd(e){return e.tag===5||e.tag===3||e.tag===4}function Qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sd(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.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 Da(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Rn));else if(i!==4&&(e=e.child,e!==null))for(Da(e,t,r),e=e.sibling;e!==null;)Da(e,t,r),e=e.sibling}function Ta(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Ta(e,t,r),e=e.sibling;e!==null;)Ta(e,t,r),e=e.sibling}var Le=null,_t=!1;function Vt(e,t,r){for(r=r.child;r!==null;)Cd(e,t,r),r=r.sibling}function Cd(e,t,r){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Vn,r)}catch{}switch(r.tag){case 5:Be||ni(r,t);case 6:var i=Le,o=_t;Le=null,Vt(e,t,r),Le=i,_t=o,Le!==null&&(_t?(e=Le,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Le.removeChild(r.stateNode));break;case 18:Le!==null&&(_t?(e=Le,r=r.stateNode,e.nodeType===8?To(e.parentNode,r):e.nodeType===1&&To(e,r),fs(e)):To(Le,r.stateNode));break;case 4:i=Le,o=_t,Le=r.stateNode.containerInfo,_t=!0,Vt(e,t,r),Le=i,_t=o;break;case 0:case 11:case 14:case 15:if(!Be&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){o=i=i.next;do{var h=o,v=h.destroy;h=h.tag,v!==void 0&&(h&2||h&4)&&Ra(r,t,v),o=o.next}while(o!==i)}Vt(e,t,r);break;case 1:if(!Be&&(ni(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(s){ye(r,t,s)}Vt(e,t,r);break;case 21:Vt(e,t,r);break;case 22:r.mode&1?(Be=(i=Be)||r.memoizedState!==null,Vt(e,t,r),Be=i):Vt(e,t,r);break;default:Vt(e,t,r)}}function Gc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new f_),t.forEach(function(i){var o=x_.bind(null,e,i);r.has(i)||(r.add(i),i.then(o,o))})}}function dt(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];try{var h=e,v=t,s=v;e:for(;s!==null;){switch(s.tag){case 5:Le=s.stateNode,_t=!1;break e;case 3:Le=s.stateNode.containerInfo,_t=!0;break e;case 4:Le=s.stateNode.containerInfo,_t=!0;break e}s=s.return}if(Le===null)throw Error(K(160));Cd(h,v,o),Le=null,_t=!1;var u=o.alternate;u!==null&&(u.return=null),o.return=null}catch(f){ye(o,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)wd(t,e),t=t.sibling}function wd(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dt(t,e),Ct(e),i&4){try{ns(3,e,e.return),eo(3,e)}catch(S){ye(e,e.return,S)}try{ns(5,e,e.return)}catch(S){ye(e,e.return,S)}}break;case 1:dt(t,e),Ct(e),i&512&&r!==null&&ni(r,r.return);break;case 5:if(dt(t,e),Ct(e),i&512&&r!==null&&ni(r,r.return),e.flags&32){var o=e.stateNode;try{cs(o,"")}catch(S){ye(e,e.return,S)}}if(i&4&&(o=e.stateNode,o!=null)){var h=e.memoizedProps,v=r!==null?r.memoizedProps:h,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&h.type==="radio"&&h.name!=null&&$u(o,h),ea(s,v);var f=ea(s,h);for(v=0;v<u.length;v+=2){var m=u[v],d=u[v+1];m==="style"?Gu(o,d):m==="dangerouslySetInnerHTML"?qu(o,d):m==="children"?cs(o,d):rl(o,m,d,f)}switch(s){case"input":Go(o,h);break;case"textarea":Ku(o,h);break;case"select":var _=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!h.multiple;var C=h.value;C!=null?ai(o,!!h.multiple,C,!1):_!==!!h.multiple&&(h.defaultValue!=null?ai(o,!!h.multiple,h.defaultValue,!0):ai(o,!!h.multiple,h.multiple?[]:"",!1))}o[ms]=h}catch(S){ye(e,e.return,S)}}break;case 6:if(dt(t,e),Ct(e),i&4){if(e.stateNode===null)throw Error(K(162));o=e.stateNode,h=e.memoizedProps;try{o.nodeValue=h}catch(S){ye(e,e.return,S)}}break;case 3:if(dt(t,e),Ct(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{fs(t.containerInfo)}catch(S){ye(e,e.return,S)}break;case 4:dt(t,e),Ct(e);break;case 13:dt(t,e),Ct(e),o=e.child,o.flags&8192&&(h=o.memoizedState!==null,o.stateNode.isHidden=h,!h||o.alternate!==null&&o.alternate.memoizedState!==null||(Bl=Se())),i&4&&Gc(e);break;case 22:if(m=r!==null&&r.memoizedState!==null,e.mode&1?(Be=(f=Be)||m,dt(t,e),Be=f):dt(t,e),Ct(e),i&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!m&&e.mode&1)for(G=e,m=e.child;m!==null;){for(d=G=m;G!==null;){switch(_=G,C=_.child,_.tag){case 0:case 11:case 14:case 15:ns(4,_,_.return);break;case 1:ni(_,_.return);var w=_.stateNode;if(typeof w.componentWillUnmount=="function"){i=_,r=_.return;try{t=i,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(S){ye(i,r,S)}}break;case 5:ni(_,_.return);break;case 22:if(_.memoizedState!==null){Yc(d);continue}}C!==null?(C.return=_,G=C):Yc(d)}m=m.sibling}e:for(m=null,d=e;;){if(d.tag===5){if(m===null){m=d;try{o=d.stateNode,f?(h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(s=d.stateNode,u=d.memoizedProps.style,v=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Qu("display",v))}catch(S){ye(e,e.return,S)}}}else if(d.tag===6){if(m===null)try{d.stateNode.nodeValue=f?"":d.memoizedProps}catch(S){ye(e,e.return,S)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;m===d&&(m=null),d=d.return}m===d&&(m=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:dt(t,e),Ct(e),i&4&&Gc(e);break;case 21:break;default:dt(t,e),Ct(e)}}function Ct(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Sd(r)){var i=r;break e}r=r.return}throw Error(K(160))}switch(i.tag){case 5:var o=i.stateNode;i.flags&32&&(cs(o,""),i.flags&=-33);var h=Qc(e);Ta(e,h,o);break;case 3:case 4:var v=i.stateNode.containerInfo,s=Qc(e);Da(e,s,v);break;default:throw Error(K(161))}}catch(u){ye(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function __(e,t,r){G=e,xd(e)}function xd(e,t,r){for(var i=(e.mode&1)!==0;G!==null;){var o=G,h=o.child;if(o.tag===22&&i){var v=o.memoizedState!==null||tn;if(!v){var s=o.alternate,u=s!==null&&s.memoizedState!==null||Be;s=tn;var f=Be;if(tn=v,(Be=u)&&!f)for(G=o;G!==null;)v=G,u=v.child,v.tag===22&&v.memoizedState!==null?Jc(o):u!==null?(u.return=v,G=u):Jc(o);for(;h!==null;)G=h,xd(h),h=h.sibling;G=o,tn=s,Be=f}Xc(e)}else o.subtreeFlags&8772&&h!==null?(h.return=o,G=h):Xc(e)}}function Xc(e){for(;G!==null;){var t=G;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Be||eo(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Be)if(r===null)i.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:ft(t.type,r.memoizedProps);i.componentDidUpdate(o,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var h=t.updateQueue;h!==null&&Oc(t,h,i);break;case 3:var v=t.updateQueue;if(v!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Oc(t,v,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var m=f.memoizedState;if(m!==null){var d=m.dehydrated;d!==null&&fs(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(K(163))}Be||t.flags&512&&La(t)}catch(_){ye(t,t.return,_)}}if(t===e){G=null;break}if(r=t.sibling,r!==null){r.return=t.return,G=r;break}G=t.return}}function Yc(e){for(;G!==null;){var t=G;if(t===e){G=null;break}var r=t.sibling;if(r!==null){r.return=t.return,G=r;break}G=t.return}}function Jc(e){for(;G!==null;){var t=G;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{eo(4,t)}catch(u){ye(t,r,u)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var o=t.return;try{i.componentDidMount()}catch(u){ye(t,o,u)}}var h=t.return;try{La(t)}catch(u){ye(t,h,u)}break;case 5:var v=t.return;try{La(t)}catch(u){ye(t,v,u)}}}catch(u){ye(t,t.return,u)}if(t===e){G=null;break}var s=t.sibling;if(s!==null){s.return=t.return,G=s;break}G=t.return}}var v_=Math.ceil,Nn=Wt.ReactCurrentDispatcher,Ml=Wt.ReactCurrentOwner,ct=Wt.ReactCurrentBatchConfig,ne=0,Ee=null,Ce=null,Te=0,Xe=0,oi=Cr(0),xe=0,bs=null,Wr=0,to=0,Ol=0,os=null,Ke=null,Bl=0,Ai=1/0,At=null,Fn=!1,Pa=null,pr=null,rn=!1,lr=null,Hn=0,as=0,Aa=null,vn=-1,gn=0;function Fe(){return ne&6?Se():vn!==-1?vn:vn=Se()}function _r(e){return e.mode&1?ne&2&&Te!==0?Te&-Te:Zp.transition!==null?(gn===0&&(gn=ah()),gn):(e=ce,e!==0||(e=window.event,e=e===void 0?16:ph(e.type)),e):1}function mt(e,t,r,i){if(50<as)throw as=0,Aa=null,Error(K(185));Os(e,r,i),(!(ne&2)||e!==Ee)&&(e===Ee&&(!(ne&2)&&(to|=r),xe===4&&Jt(e,Te)),Ge(e,i),r===1&&ne===0&&!(t.mode&1)&&(Ai=Se()+500,Yn&&wr()))}function Ge(e,t){var r=e.callbackNode;Zf(e,t);var i=xn(e,e===Ee?Te:0);if(i===0)r!==null&&ac(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&ac(r),t===1)e.tag===0?Jp(Zc.bind(null,e)):Mh(Zc.bind(null,e)),Qp(function(){!(ne&6)&&wr()}),r=null;else{switch(lh(i)){case 1:r=al;break;case 4:r=nh;break;case 16:r=wn;break;case 536870912:r=oh;break;default:r=wn}r=Pd(r,bd.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function bd(e,t){if(vn=-1,gn=0,ne&6)throw Error(K(327));var r=e.callbackNode;if(di()&&e.callbackNode!==r)return null;var i=xn(e,e===Ee?Te:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=zn(e,i);else{t=i;var o=ne;ne|=2;var h=Ed();(Ee!==e||Te!==t)&&(At=null,Ai=Se()+500,Nr(e,t));do try{y_();break}catch(s){kd(e,s)}while(!0);Sl(),Nn.current=h,ne=o,Ce!==null?t=0:(Ee=null,Te=0,t=xe)}if(t!==0){if(t===2&&(o=na(e),o!==0&&(i=o,t=Ma(e,o))),t===1)throw r=bs,Nr(e,0),Jt(e,i),Ge(e,Se()),r;if(t===6)Jt(e,i);else{if(o=e.current.alternate,!(i&30)&&!g_(o)&&(t=zn(e,i),t===2&&(h=na(e),h!==0&&(i=h,t=Ma(e,h))),t===1))throw r=bs,Nr(e,0),Jt(e,i),Ge(e,Se()),r;switch(e.finishedWork=o,e.finishedLanes=i,t){case 0:case 1:throw Error(K(345));case 2:br(e,Ke,At);break;case 3:if(Jt(e,i),(i&130023424)===i&&(t=Bl+500-Se(),10<t)){if(xn(e,0)!==0)break;if(o=e.suspendedLanes,(o&i)!==i){Fe(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=fa(br.bind(null,e,Ke,At),t);break}br(e,Ke,At);break;case 4:if(Jt(e,i),(i&4194240)===i)break;for(t=e.eventTimes,o=-1;0<i;){var v=31-gt(i);h=1<<v,v=t[v],v>o&&(o=v),i&=~h}if(i=o,i=Se()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*v_(i/1960))-i,10<i){e.timeoutHandle=fa(br.bind(null,e,Ke,At),i);break}br(e,Ke,At);break;case 5:br(e,Ke,At);break;default:throw Error(K(329))}}}return Ge(e,Se()),e.callbackNode===r?bd.bind(null,e):null}function Ma(e,t){var r=os;return e.current.memoizedState.isDehydrated&&(Nr(e,t).flags|=256),e=zn(e,t),e!==2&&(t=Ke,Ke=r,t!==null&&Oa(t)),e}function Oa(e){Ke===null?Ke=e:Ke.push.apply(Ke,e)}function g_(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var o=r[i],h=o.getSnapshot;o=o.value;try{if(!yt(h(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Jt(e,t){for(t&=~Ol,t&=~to,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-gt(t),i=1<<r;e[r]=-1,t&=~i}}function Zc(e){if(ne&6)throw Error(K(327));di();var t=xn(e,0);if(!(t&1))return Ge(e,Se()),null;var r=zn(e,t);if(e.tag!==0&&r===2){var i=na(e);i!==0&&(t=i,r=Ma(e,i))}if(r===1)throw r=bs,Nr(e,0),Jt(e,t),Ge(e,Se()),r;if(r===6)throw Error(K(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,br(e,Ke,At),Ge(e,Se()),null}function Il(e,t){var r=ne;ne|=1;try{return e(t)}finally{ne=r,ne===0&&(Ai=Se()+500,Yn&&wr())}}function $r(e){lr!==null&&lr.tag===0&&!(ne&6)&&di();var t=ne;ne|=1;var r=ct.transition,i=ce;try{if(ct.transition=null,ce=1,e)return e()}finally{ce=i,ct.transition=r,ne=t,!(ne&6)&&wr()}}function jl(){Xe=oi.current,de(oi)}function Nr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,qp(r)),Ce!==null)for(r=Ce.return;r!==null;){var i=r;switch(gl(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Ln();break;case 3:Ti(),de(qe),de(Ie),El();break;case 5:kl(i);break;case 4:Ti();break;case 13:de(_e);break;case 19:de(_e);break;case 10:Cl(i.type._context);break;case 22:case 23:jl()}r=r.return}if(Ee=e,Ce=e=vr(e.current,null),Te=Xe=t,xe=0,bs=null,Ol=to=Wr=0,Ke=os=null,Er!==null){for(t=0;t<Er.length;t++)if(r=Er[t],i=r.interleaved,i!==null){r.interleaved=null;var o=i.next,h=r.pending;if(h!==null){var v=h.next;h.next=o,i.next=v}r.pending=i}Er=null}return e}function kd(e,t){do{var r=Ce;try{if(Sl(),fn.current=jn,In){for(var i=ve.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}In=!1}if(Ur=0,ke=we=ve=null,ss=!1,Cs=0,Ml.current=null,r===null||r.return===null){xe=1,bs=t,Ce=null;break}e:{var h=e,v=r.return,s=r,u=t;if(t=Te,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,m=s,d=m.tag;if(!(m.mode&1)&&(d===0||d===11||d===15)){var _=m.alternate;_?(m.updateQueue=_.updateQueue,m.memoizedState=_.memoizedState,m.lanes=_.lanes):(m.updateQueue=null,m.memoizedState=null)}var C=Hc(v);if(C!==null){C.flags&=-257,zc(C,v,s,h,t),C.mode&1&&Fc(h,f,t),t=C,u=f;var w=t.updateQueue;if(w===null){var S=new Set;S.add(u),t.updateQueue=S}else w.add(u);break e}else{if(!(t&1)){Fc(h,f,t),Nl();break e}u=Error(K(426))}}else if(fe&&s.mode&1){var c=Hc(v);if(c!==null){!(c.flags&65536)&&(c.flags|=256),zc(c,v,s,h,t),ml(Pi(u,s));break e}}h=u=Pi(u,s),xe!==4&&(xe=2),os===null?os=[h]:os.push(h),h=v;do{switch(h.tag){case 3:h.flags|=65536,t&=-t,h.lanes|=t;var a=ld(h,u,t);Mc(h,a);break e;case 1:s=u;var n=h.type,l=h.stateNode;if(!(h.flags&128)&&(typeof n.getDerivedStateFromError=="function"||l!==null&&typeof l.componentDidCatch=="function"&&(pr===null||!pr.has(l)))){h.flags|=65536,t&=-t,h.lanes|=t;var p=cd(h,s,t);Mc(h,p);break e}}h=h.return}while(h!==null)}Ld(r)}catch(y){t=y,Ce===r&&r!==null&&(Ce=r=r.return);continue}break}while(!0)}function Ed(){var e=Nn.current;return Nn.current=jn,e===null?jn:e}function Nl(){(xe===0||xe===3||xe===2)&&(xe=4),Ee===null||!(Wr&268435455)&&!(to&268435455)||Jt(Ee,Te)}function zn(e,t){var r=ne;ne|=2;var i=Ed();(Ee!==e||Te!==t)&&(At=null,Nr(e,t));do try{m_();break}catch(o){kd(e,o)}while(!0);if(Sl(),ne=r,Nn.current=i,Ce!==null)throw Error(K(261));return Ee=null,Te=0,xe}function m_(){for(;Ce!==null;)Rd(Ce)}function y_(){for(;Ce!==null&&!$f();)Rd(Ce)}function Rd(e){var t=Td(e.alternate,e,Xe);e.memoizedProps=e.pendingProps,t===null?Ld(e):Ce=t,Ml.current=null}function Ld(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=d_(r,t),r!==null){r.flags&=32767,Ce=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{xe=6,Ce=null;return}}else if(r=h_(r,t,Xe),r!==null){Ce=r;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);xe===0&&(xe=5)}function br(e,t,r){var i=ce,o=ct.transition;try{ct.transition=null,ce=1,S_(e,t,r,i)}finally{ct.transition=o,ce=i}return null}function S_(e,t,r,i){do di();while(lr!==null);if(ne&6)throw Error(K(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(K(177));e.callbackNode=null,e.callbackPriority=0;var h=r.lanes|r.childLanes;if(ep(e,h),e===Ee&&(Ce=Ee=null,Te=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||rn||(rn=!0,Pd(wn,function(){return di(),null})),h=(r.flags&15990)!==0,r.subtreeFlags&15990||h){h=ct.transition,ct.transition=null;var v=ce;ce=1;var s=ne;ne|=4,Ml.current=null,p_(e,r),wd(r,e),Hp(ha),bn=!!ua,ha=ua=null,e.current=r,__(r),Kf(),ne=s,ce=v,ct.transition=h}else e.current=r;if(rn&&(rn=!1,lr=e,Hn=o),h=e.pendingLanes,h===0&&(pr=null),Qf(r.stateNode),Ge(e,Se()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],i(o.value,{componentStack:o.stack,digest:o.digest});if(Fn)throw Fn=!1,e=Pa,Pa=null,e;return Hn&1&&e.tag!==0&&di(),h=e.pendingLanes,h&1?e===Aa?as++:(as=0,Aa=e):as=0,wr(),null}function di(){if(lr!==null){var e=lh(Hn),t=ct.transition,r=ce;try{if(ct.transition=null,ce=16>e?16:e,lr===null)var i=!1;else{if(e=lr,lr=null,Hn=0,ne&6)throw Error(K(331));var o=ne;for(ne|=4,G=e.current;G!==null;){var h=G,v=h.child;if(G.flags&16){var s=h.deletions;if(s!==null){for(var u=0;u<s.length;u++){var f=s[u];for(G=f;G!==null;){var m=G;switch(m.tag){case 0:case 11:case 15:ns(8,m,h)}var d=m.child;if(d!==null)d.return=m,G=d;else for(;G!==null;){m=G;var _=m.sibling,C=m.return;if(yd(m),m===f){G=null;break}if(_!==null){_.return=C,G=_;break}G=C}}}var w=h.alternate;if(w!==null){var S=w.child;if(S!==null){w.child=null;do{var c=S.sibling;S.sibling=null,S=c}while(S!==null)}}G=h}}if(h.subtreeFlags&2064&&v!==null)v.return=h,G=v;else e:for(;G!==null;){if(h=G,h.flags&2048)switch(h.tag){case 0:case 11:case 15:ns(9,h,h.return)}var a=h.sibling;if(a!==null){a.return=h.return,G=a;break e}G=h.return}}var n=e.current;for(G=n;G!==null;){v=G;var l=v.child;if(v.subtreeFlags&2064&&l!==null)l.return=v,G=l;else e:for(v=n;G!==null;){if(s=G,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:eo(9,s)}}catch(y){ye(s,s.return,y)}if(s===v){G=null;break e}var p=s.sibling;if(p!==null){p.return=s.return,G=p;break e}G=s.return}}if(ne=o,wr(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Vn,e)}catch{}i=!0}return i}finally{ce=r,ct.transition=t}}return!1}function eu(e,t,r){t=Pi(r,t),t=ld(e,t,1),e=fr(e,t,1),t=Fe(),e!==null&&(Os(e,1,t),Ge(e,t))}function ye(e,t,r){if(e.tag===3)eu(e,e,r);else for(;t!==null;){if(t.tag===3){eu(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(pr===null||!pr.has(i))){e=Pi(r,e),e=cd(t,e,1),t=fr(t,e,1),e=Fe(),t!==null&&(Os(t,1,e),Ge(t,e));break}}t=t.return}}function C_(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&r,Ee===e&&(Te&r)===r&&(xe===4||xe===3&&(Te&130023424)===Te&&500>Se()-Bl?Nr(e,0):Ol|=r),Ge(e,t)}function Dd(e,t){t===0&&(e.mode&1?(t=Vs,Vs<<=1,!(Vs&130023424)&&(Vs=4194304)):t=1);var r=Fe();e=zt(e,t),e!==null&&(Os(e,t,r),Ge(e,r))}function w_(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Dd(e,r)}function x_(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(K(314))}i!==null&&i.delete(t),Dd(e,r)}var Td;Td=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Ve=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ve=!1,u_(e,t,r);Ve=!!(e.flags&131072)}else Ve=!1,fe&&t.flags&1048576&&Oh(t,Pn,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;_n(e,t),e=t.pendingProps;var o=Ri(t,Ie.current);hi(t,r),o=Ll(null,t,i,e,o,r);var h=Dl();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qe(i)?(h=!0,Dn(t)):h=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,xl(t),o.updater=Zn,t.stateNode=o,o._reactInternals=t,Sa(t,i,e,r),t=xa(null,t,i,!0,h,r)):(t.tag=0,fe&&h&&vl(t),Ne(null,t,o,r),t=t.child),t;case 16:i=t.elementType;e:{switch(_n(e,t),e=t.pendingProps,o=i._init,i=o(i._payload),t.type=i,o=t.tag=k_(i),e=ft(i,e),o){case 0:t=wa(null,t,i,e,r);break e;case 1:t=$c(null,t,i,e,r);break e;case 11:t=Uc(null,t,i,e,r);break e;case 14:t=Wc(null,t,i,ft(i.type,e),r);break e}throw Error(K(306,i,""))}return t;case 0:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:ft(i,o),wa(e,t,i,o,r);case 1:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:ft(i,o),$c(e,t,i,o,r);case 3:e:{if(fd(t),e===null)throw Error(K(387));i=t.pendingProps,h=t.memoizedState,o=h.element,Hh(e,t),On(t,i,null,r);var v=t.memoizedState;if(i=v.element,h.isDehydrated)if(h={element:i,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){o=Pi(Error(K(423)),t),t=Kc(e,t,i,r,o);break e}else if(i!==o){o=Pi(Error(K(424)),t),t=Kc(e,t,i,r,o);break e}else for(Ze=dr(t.stateNode.containerInfo.firstChild),et=t,fe=!0,vt=null,r=Nh(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Li(),i===o){t=Ut(e,t,r);break e}Ne(e,t,i,r)}t=t.child}return t;case 5:return zh(t),e===null&&ga(t),i=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,v=o.children,da(i,o)?v=null:h!==null&&da(i,h)&&(t.flags|=32),dd(e,t),Ne(e,t,v,r),t.child;case 6:return e===null&&ga(t),null;case 13:return pd(e,t,r);case 4:return bl(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Di(t,null,i,r):Ne(e,t,i,r),t.child;case 11:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:ft(i,o),Uc(e,t,i,o,r);case 7:return Ne(e,t,t.pendingProps,r),t.child;case 8:return Ne(e,t,t.pendingProps.children,r),t.child;case 12:return Ne(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,h=t.memoizedProps,v=o.value,ue(An,i._currentValue),i._currentValue=v,h!==null)if(yt(h.value,v)){if(h.children===o.children&&!qe.current){t=Ut(e,t,r);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var s=h.dependencies;if(s!==null){v=h.child;for(var u=s.firstContext;u!==null;){if(u.context===i){if(h.tag===1){u=Nt(-1,r&-r),u.tag=2;var f=h.updateQueue;if(f!==null){f=f.shared;var m=f.pending;m===null?u.next=u:(u.next=m.next,m.next=u),f.pending=u}}h.lanes|=r,u=h.alternate,u!==null&&(u.lanes|=r),ma(h.return,r,t),s.lanes|=r;break}u=u.next}}else if(h.tag===10)v=h.type===t.type?null:h.child;else if(h.tag===18){if(v=h.return,v===null)throw Error(K(341));v.lanes|=r,s=v.alternate,s!==null&&(s.lanes|=r),ma(v,r,t),v=h.sibling}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===t){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}Ne(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps.children,hi(t,r),o=ut(o),i=i(o),t.flags|=1,Ne(e,t,i,r),t.child;case 14:return i=t.type,o=ft(i,t.pendingProps),o=ft(i.type,o),Wc(e,t,i,o,r);case 15:return ud(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:ft(i,o),_n(e,t),t.tag=1,Qe(i)?(e=!0,Dn(t)):e=!1,hi(t,r),ad(t,i,o),Sa(t,i,o,r),xa(null,t,i,!0,e,r);case 19:return _d(e,t,r);case 22:return hd(e,t,r)}throw Error(K(156,t.tag))};function Pd(e,t){return sh(e,t)}function b_(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lt(e,t,r,i){return new b_(e,t,r,i)}function Fl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function k_(e){if(typeof e=="function")return Fl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===sl)return 11;if(e===nl)return 14}return 2}function vr(e,t){var r=e.alternate;return r===null?(r=lt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function mn(e,t,r,i,o,h){var v=2;if(i=e,typeof e=="function")Fl(e)&&(v=1);else if(typeof e=="string")v=5;else e:switch(e){case Xr:return Fr(r.children,o,h,t);case il:v=8,o|=8;break;case $o:return e=lt(12,r,t,o|2),e.elementType=$o,e.lanes=h,e;case Ko:return e=lt(13,r,t,o),e.elementType=Ko,e.lanes=h,e;case Vo:return e=lt(19,r,t,o),e.elementType=Vo,e.lanes=h,e;case zu:return ro(r,o,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fu:v=10;break e;case Hu:v=9;break e;case sl:v=11;break e;case nl:v=14;break e;case Gt:v=16,i=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=lt(v,r,t,o),t.elementType=e,t.type=i,t.lanes=h,t}function Fr(e,t,r,i){return e=lt(7,e,i,t),e.lanes=r,e}function ro(e,t,r,i){return e=lt(22,e,i,t),e.elementType=zu,e.lanes=r,e.stateNode={isHidden:!1},e}function No(e,t,r){return e=lt(6,e,null,t),e.lanes=r,e}function Fo(e,t,r){return t=lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function E_(e,t,r,i,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yo(0),this.expirationTimes=yo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yo(0),this.identifierPrefix=i,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hl(e,t,r,i,o,h,v,s,u){return e=new E_(e,t,r,s,u),t===1?(t=1,h===!0&&(t|=8)):t=0,h=lt(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},xl(h),e}function R_(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Gr,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function Ad(e){if(!e)return yr;e=e._reactInternals;e:{if(Vr(e)!==e||e.tag!==1)throw Error(K(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Qe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(K(171))}if(e.tag===1){var r=e.type;if(Qe(r))return Ah(e,r,t)}return t}function Md(e,t,r,i,o,h,v,s,u){return e=Hl(r,i,!0,e,o,h,v,s,u),e.context=Ad(null),r=e.current,i=Fe(),o=_r(r),h=Nt(i,o),h.callback=t??null,fr(r,h,o),e.current.lanes=o,Os(e,o,i),Ge(e,i),e}function io(e,t,r,i){var o=t.current,h=Fe(),v=_r(o);return r=Ad(r),t.context===null?t.context=r:t.pendingContext=r,t=Nt(h,v),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=fr(o,t,v),e!==null&&(mt(e,o,v,h),dn(e,o,v)),v}function Un(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function tu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function zl(e,t){tu(e,t),(e=e.alternate)&&tu(e,t)}function L_(){return null}var Od=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ul(e){this._internalRoot=e}so.prototype.render=Ul.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(K(409));io(e,t,null,null)};so.prototype.unmount=Ul.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$r(function(){io(null,e,null,null)}),t[Ht]=null}};function so(e){this._internalRoot=e}so.prototype.unstable_scheduleHydration=function(e){if(e){var t=hh();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Yt.length&&t!==0&&t<Yt[r].priority;r++);Yt.splice(r,0,e),r===0&&fh(e)}};function Wl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function no(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ru(){}function D_(e,t,r,i,o){if(o){if(typeof i=="function"){var h=i;i=function(){var f=Un(v);h.call(f)}}var v=Md(t,i,e,0,null,!1,!1,"",ru);return e._reactRootContainer=v,e[Ht]=v.current,vs(e.nodeType===8?e.parentNode:e),$r(),v}for(;o=e.lastChild;)e.removeChild(o);if(typeof i=="function"){var s=i;i=function(){var f=Un(u);s.call(f)}}var u=Hl(e,0,!1,null,null,!1,!1,"",ru);return e._reactRootContainer=u,e[Ht]=u.current,vs(e.nodeType===8?e.parentNode:e),$r(function(){io(t,u,r,i)}),u}function oo(e,t,r,i,o){var h=r._reactRootContainer;if(h){var v=h;if(typeof o=="function"){var s=o;o=function(){var u=Un(v);s.call(u)}}io(t,v,e,o)}else v=D_(r,t,e,o,i);return Un(v)}ch=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Xi(t.pendingLanes);r!==0&&(ll(t,r|1),Ge(t,Se()),!(ne&6)&&(Ai=Se()+500,wr()))}break;case 13:$r(function(){var i=zt(e,1);if(i!==null){var o=Fe();mt(i,e,1,o)}}),zl(e,1)}};cl=function(e){if(e.tag===13){var t=zt(e,134217728);if(t!==null){var r=Fe();mt(t,e,134217728,r)}zl(e,134217728)}};uh=function(e){if(e.tag===13){var t=_r(e),r=zt(e,t);if(r!==null){var i=Fe();mt(r,e,t,i)}zl(e,t)}};hh=function(){return ce};dh=function(e,t){var r=ce;try{return ce=e,t()}finally{ce=r}};ra=function(e,t,r){switch(t){case"input":if(Go(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var o=Xn(i);if(!o)throw Error(K(90));Wu(i),Go(i,o)}}}break;case"textarea":Ku(e,r);break;case"select":t=r.value,t!=null&&ai(e,!!r.multiple,t,!1)}};Ju=Il;Zu=$r;var T_={usingClientEntryPoint:!1,Events:[Is,ei,Xn,Xu,Yu,Il]},qi={findFiberByHostInstance:kr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},P_={bundleType:qi.bundleType,version:qi.version,rendererPackageName:qi.rendererPackageName,rendererConfig:qi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=rh(e),e===null?null:e.stateNode},findFiberByHostInstance:qi.findFiberByHostInstance||L_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sn.isDisabled&&sn.supportsFiber)try{Vn=sn.inject(P_),Rt=sn}catch{}}rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T_;rt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wl(t))throw Error(K(200));return R_(e,t,null,r)};rt.createRoot=function(e,t){if(!Wl(e))throw Error(K(299));var r=!1,i="",o=Od;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Hl(e,1,!1,null,null,r,!1,i,o),e[Ht]=t.current,vs(e.nodeType===8?e.parentNode:e),new Ul(t)};rt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(K(188)):(e=Object.keys(e).join(","),Error(K(268,e)));return e=rh(t),e=e===null?null:e.stateNode,e};rt.flushSync=function(e){return $r(e)};rt.hydrate=function(e,t,r){if(!no(t))throw Error(K(200));return oo(null,e,t,!0,r)};rt.hydrateRoot=function(e,t,r){if(!Wl(e))throw Error(K(405));var i=r!=null&&r.hydratedSources||null,o=!1,h="",v=Od;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(h=r.identifierPrefix),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),t=Md(t,null,e,1,r??null,o,!1,h,v),e[Ht]=t.current,vs(e),i)for(e=0;e<i.length;e++)r=i[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new so(t)};rt.render=function(e,t,r){if(!no(t))throw Error(K(200));return oo(null,e,t,!1,r)};rt.unmountComponentAtNode=function(e){if(!no(e))throw Error(K(40));return e._reactRootContainer?($r(function(){oo(null,null,e,!1,function(){e._reactRootContainer=null,e[Ht]=null})}),!0):!1};rt.unstable_batchedUpdates=Il;rt.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!no(r))throw Error(K(200));if(e==null||e._reactInternals===void 0)throw Error(K(38));return oo(e,t,r,!1,i)};rt.version="18.3.1-next-f1338f8080-20240426";function Bd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bd)}catch(e){console.error(e)}}Bd(),Bu.exports=rt;var A_=Bu.exports,iu=A_;Uo.createRoot=iu.createRoot,Uo.hydrateRoot=iu.hydrateRoot;var Ns=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Dr,Zt,fi,pu,M_=(pu=class extends Ns{constructor(){super();J(this,Dr);J(this,Zt);J(this,fi);q(this,fi,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){I(this,Zt)||this.setEventListener(I(this,fi))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,Zt))==null||t.call(this),q(this,Zt,void 0))}setEventListener(t){var r;q(this,fi,t),(r=I(this,Zt))==null||r.call(this),q(this,Zt,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){I(this,Dr)!==t&&(q(this,Dr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof I(this,Dr)=="boolean"?I(this,Dr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Dr=new WeakMap,Zt=new WeakMap,fi=new WeakMap,pu),$l=new M_,O_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},er,Ga,_u,B_=(_u=class{constructor(){J(this,er,O_);J(this,Ga,!1)}setTimeoutProvider(e){q(this,er,e)}setTimeout(e,t){return I(this,er).setTimeout(e,t)}clearTimeout(e){I(this,er).clearTimeout(e)}setInterval(e,t){return I(this,er).setInterval(e,t)}clearInterval(e){I(this,er).clearInterval(e)}},er=new WeakMap,Ga=new WeakMap,_u),Lr=new B_;function I_(e){setTimeout(e,0)}var j_=typeof window>"u"||"Deno"in globalThis;function $e(){}function N_(e,t){return typeof e=="function"?e(t):e}function Ba(e){return typeof e=="number"&&e>=0&&e!==1/0}function Id(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gr(e,t){return typeof e=="function"?e(t):e}function Je(e,t){return typeof e=="function"?e(t):e}function su(e,t){const{type:r="all",exact:i,fetchStatus:o,predicate:h,queryKey:v,stale:s}=e;if(v){if(i){if(t.queryHash!==Kl(v,t.options))return!1}else if(!Es(t.queryKey,v))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||h&&!h(t))}function nu(e,t){const{exact:r,status:i,predicate:o,mutationKey:h}=e;if(h){if(!t.options.mutationKey)return!1;if(r){if(ks(t.options.mutationKey)!==ks(h))return!1}else if(!Es(t.options.mutationKey,h))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function Kl(e,t){return((t==null?void 0:t.queryKeyHashFn)||ks)(e)}function ks(e){return JSON.stringify(e,(t,r)=>ja(r)?Object.keys(r).sort().reduce((i,o)=>(i[o]=r[o],i),{}):r)}function Es(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Es(e[r],t[r])):!1}var F_=Object.prototype.hasOwnProperty;function jd(e,t,r=0){if(e===t)return e;if(r>500)return t;const i=ou(e)&&ou(t);if(!i&&!(ja(e)&&ja(t)))return t;const h=(i?e:Object.keys(e)).length,v=i?t:Object.keys(t),s=v.length,u=i?new Array(s):{};let f=0;for(let m=0;m<s;m++){const d=i?m:v[m],_=e[d],C=t[d];if(_===C){u[d]=_,(i?m<h:F_.call(e,d))&&f++;continue}if(_===null||C===null||typeof _!="object"||typeof C!="object"){u[d]=C;continue}const w=jd(_,C,r+1);u[d]=w,w===_&&f++}return h===s&&f===h?e:u}function Ia(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ou(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ja(e){if(!au(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!au(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function au(e){return Object.prototype.toString.call(e)==="[object Object]"}function H_(e){return new Promise(t=>{Lr.setTimeout(t,e)})}function Na(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?jd(e,t):t}function z_(e,t,r=0){const i=[...e,t];return r&&i.length>r?i.slice(1):i}function U_(e,t,r=0){const i=[t,...e];return r&&i.length>r?i.slice(0,-1):i}var Vl=Symbol();function Nd(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Vl?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Fd(e,t){return typeof e=="function"?e(...t):!!e}function W_(e,t,r){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),i||(i=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var Rs=(()=>{let e=()=>j_;return{isServer(){return e()},setIsServer(t){e=t}}})();function Fa(){let e,t;const r=new Promise((o,h)=>{e=o,t=h});r.status="pending",r.catch(()=>{});function i(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{i({status:"fulfilled",value:o}),e(o)},r.reject=o=>{i({status:"rejected",reason:o}),t(o)},r}var $_=I_;function K_(){let e=[],t=0,r=s=>{s()},i=s=>{s()},o=$_;const h=s=>{t?e.push(s):o(()=>{r(s)})},v=()=>{const s=e;e=[],s.length&&o(()=>{i(()=>{s.forEach(u=>{r(u)})})})};return{batch:s=>{let u;t++;try{u=s()}finally{t--,t||v()}return u},batchCalls:s=>(...u)=>{h(()=>{s(...u)})},schedule:h,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{i=s},setScheduler:s=>{o=s}}}var De=K_(),pi,tr,_i,vu,V_=(vu=class extends Ns{constructor(){super();J(this,pi,!0);J(this,tr);J(this,_i);q(this,_i,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",i)}}})}onSubscribe(){I(this,tr)||this.setEventListener(I(this,_i))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,tr))==null||t.call(this),q(this,tr,void 0))}setEventListener(t){var r;q(this,_i,t),(r=I(this,tr))==null||r.call(this),q(this,tr,t(this.setOnline.bind(this)))}setOnline(t){I(this,pi)!==t&&(q(this,pi,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return I(this,pi)}},pi=new WeakMap,tr=new WeakMap,_i=new WeakMap,vu),Wn=new V_;function q_(e){return Math.min(1e3*2**e,3e4)}function Hd(e){return(e??"online")==="online"?Wn.isOnline():!0}var Ha=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function zd(e){let t=!1,r=0,i;const o=Fa(),h=()=>o.status!=="pending",v=S=>{var c;if(!h()){const a=new Ha(S);_(a),(c=e.onCancel)==null||c.call(e,a)}},s=()=>{t=!0},u=()=>{t=!1},f=()=>$l.isFocused()&&(e.networkMode==="always"||Wn.isOnline())&&e.canRun(),m=()=>Hd(e.networkMode)&&e.canRun(),d=S=>{h()||(i==null||i(),o.resolve(S))},_=S=>{h()||(i==null||i(),o.reject(S))},C=()=>new Promise(S=>{var c;i=a=>{(h()||f())&&S(a)},(c=e.onPause)==null||c.call(e)}).then(()=>{var S;i=void 0,h()||(S=e.onContinue)==null||S.call(e)}),w=()=>{if(h())return;let S;const c=r===0?e.initialPromise:void 0;try{S=c??e.fn()}catch(a){S=Promise.reject(a)}Promise.resolve(S).then(d).catch(a=>{var x;if(h())return;const n=e.retry??(Rs.isServer()?0:3),l=e.retryDelay??q_,p=typeof l=="function"?l(r,a):l,y=n===!0||typeof n=="number"&&r<n||typeof n=="function"&&n(r,a);if(t||!y){_(a);return}r++,(x=e.onFail)==null||x.call(e,r,a),H_(p).then(()=>f()?void 0:C()).then(()=>{t?_(a):w()})})};return{promise:o,status:()=>o.status,cancel:v,continue:()=>(i==null||i(),o),cancelRetry:s,continueRetry:u,canStart:m,start:()=>(m()?w():C().then(w),o)}}var Tr,gu,Ud=(gu=class{constructor(){J(this,Tr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ba(this.gcTime)&&q(this,Tr,Lr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rs.isServer()?1/0:5*60*1e3))}clearGcTimeout(){I(this,Tr)!==void 0&&(Lr.clearTimeout(I(this,Tr)),q(this,Tr,void 0))}},Tr=new WeakMap,gu);function Q_(e){return{onFetch:(t,r)=>{var m,d,_,C,w;const i=t.options,o=(_=(d=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:d.fetchMore)==null?void 0:_.direction,h=((C=t.state.data)==null?void 0:C.pages)||[],v=((w=t.state.data)==null?void 0:w.pageParams)||[];let s={pages:[],pageParams:[]},u=0;const f=async()=>{let S=!1;const c=l=>{W_(l,()=>t.signal,()=>S=!0)},a=Nd(t.options,t.fetchOptions),n=async(l,p,y)=>{if(S)return Promise.reject(t.signal.reason);if(p==null&&l.pages.length)return Promise.resolve(l);const k=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:p,direction:y?"backward":"forward",meta:t.options.meta};return c(M),M})(),g=await a(k),{maxPages:b}=t.options,D=y?U_:z_;return{pages:D(l.pages,g,b),pageParams:D(l.pageParams,p,b)}};if(o&&h.length){const l=o==="backward",p=l?G_:lu,y={pages:h,pageParams:v},x=p(i,y);s=await n(y,x,l)}else{const l=e??h.length;do{const p=u===0?v[0]??i.initialPageParam:lu(i,s);if(u>0&&p==null)break;s=await n(s,p),u++}while(u<l)}return s};t.options.persister?t.fetchFn=()=>{var S,c;return(c=(S=t.options).persister)==null?void 0:c.call(S,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function lu(e,{pages:t,pageParams:r}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,r[i],r):void 0}function G_(e,{pages:t,pageParams:r}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,r[0],r):void 0}var vi,Pr,gi,nt,Ar,be,Ls,Mr,Ye,Wd,Pt,mu,X_=(mu=class extends Ud{constructor(t){super();J(this,Ye);J(this,vi);J(this,Pr);J(this,gi);J(this,nt);J(this,Ar);J(this,be);J(this,Ls);J(this,Mr);q(this,Mr,!1),q(this,Ls,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,Ar,t.client),q(this,nt,I(this,Ar).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,Pr,uu(this.options)),this.state=t.state??I(this,Pr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return I(this,vi)}get promise(){var t;return(t=I(this,be))==null?void 0:t.promise}setOptions(t){if(this.options={...I(this,Ls),...t},t!=null&&t._type&&q(this,vi,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=uu(this.options);r.data!==void 0&&(this.setState(cu(r.data,r.dataUpdatedAt)),q(this,Pr,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&I(this,nt).remove(this)}setData(t,r){const i=Na(this.state.data,t,this.options);return ie(this,Ye,Pt).call(this,{data:i,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),i}setState(t){ie(this,Ye,Pt).call(this,{type:"setState",state:t})}cancel(t){var i,o;const r=(i=I(this,be))==null?void 0:i.promise;return(o=I(this,be))==null||o.cancel(t),r?r.then($e).catch($e):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return I(this,Pr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Je(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vl||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>gr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Id(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=I(this,be))==null||r.continue()}onOnline(){var r;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=I(this,be))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),I(this,nt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(I(this,be)&&(I(this,Mr)||ie(this,Ye,Wd).call(this)?I(this,be).cancel({revert:!0}):I(this,be).cancelRetry()),this.scheduleGc()),I(this,nt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ie(this,Ye,Pt).call(this,{type:"invalidate"})}async fetch(t,r){var f,m,d,_,C,w,S,c,a,n,l;if(this.state.fetchStatus!=="idle"&&((f=I(this,be))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(I(this,be))return I(this,be).continueRetry(),I(this,be).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(y=>y.options.queryFn);p&&this.setOptions(p.options)}const i=new AbortController,o=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(q(this,Mr,!0),i.signal)})},h=()=>{const p=Nd(this.options,r),x=(()=>{const k={client:I(this,Ar),queryKey:this.queryKey,meta:this.meta};return o(k),k})();return q(this,Mr,!1),this.options.persister?this.options.persister(p,x,this):p(x)},s=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:I(this,Ar),state:this.state,fetchFn:h};return o(p),p})(),u=I(this,vi)==="infinite"?Q_(this.options.pages):this.options.behavior;u==null||u.onFetch(s,this),q(this,gi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=s.fetchOptions)==null?void 0:m.meta))&&ie(this,Ye,Pt).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta}),q(this,be,zd({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,onCancel:p=>{p instanceof Ha&&p.revert&&this.setState({...I(this,gi),fetchStatus:"idle"}),i.abort()},onFail:(p,y)=>{ie(this,Ye,Pt).call(this,{type:"failed",failureCount:p,error:y})},onPause:()=>{ie(this,Ye,Pt).call(this,{type:"pause"})},onContinue:()=>{ie(this,Ye,Pt).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const p=await I(this,be).start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),(C=(_=I(this,nt).config).onSuccess)==null||C.call(_,p,this),(S=(w=I(this,nt).config).onSettled)==null||S.call(w,p,this.state.error,this),p}catch(p){if(p instanceof Ha){if(p.silent)return I(this,be).promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw ie(this,Ye,Pt).call(this,{type:"error",error:p}),(a=(c=I(this,nt).config).onError)==null||a.call(c,p,this),(l=(n=I(this,nt).config).onSettled)==null||l.call(n,this.state.data,p,this),p}finally{this.scheduleGc()}}},vi=new WeakMap,Pr=new WeakMap,gi=new WeakMap,nt=new WeakMap,Ar=new WeakMap,be=new WeakMap,Ls=new WeakMap,Mr=new WeakMap,Ye=new WeakSet,Wd=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Pt=function(t){const r=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...$d(i.data,this.options),fetchMeta:t.meta??null};case"success":const o={...i,...cu(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return q(this,gi,t.manual?o:void 0),o;case"error":const h=t.error;return{...i,error:h,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:h,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=r(this.state),De.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),I(this,nt).notify({query:this,type:"updated",action:t})})},mu);function $d(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Hd(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cu(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function uu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var We,se,Ds,je,Or,mi,Ot,rr,Ts,yi,Si,Br,Ir,ir,Ci,ae,Ji,za,Ua,Wa,$a,Ka,Va,qa,Kd,yu,Y_=(yu=class extends Ns{constructor(t,r){super();J(this,ae);J(this,We);J(this,se);J(this,Ds);J(this,je);J(this,Or);J(this,mi);J(this,Ot);J(this,rr);J(this,Ts);J(this,yi);J(this,Si);J(this,Br);J(this,Ir);J(this,ir);J(this,Ci,new Set);this.options=r,q(this,We,t),q(this,rr,null),q(this,Ot,Fa()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(I(this,se).addObserver(this),hu(I(this,se),this.options)?ie(this,ae,Ji).call(this):this.updateResult(),ie(this,ae,$a).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qa(I(this,se),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qa(I(this,se),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ie(this,ae,Ka).call(this),ie(this,ae,Va).call(this),I(this,se).removeObserver(this)}setOptions(t){const r=this.options,i=I(this,se);if(this.options=I(this,We).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Je(this.options.enabled,I(this,se))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ie(this,ae,qa).call(this),I(this,se).setOptions(this.options),r._defaulted&&!Ia(this.options,r)&&I(this,We).getQueryCache().notify({type:"observerOptionsUpdated",query:I(this,se),observer:this});const o=this.hasListeners();o&&du(I(this,se),i,this.options,r)&&ie(this,ae,Ji).call(this),this.updateResult(),o&&(I(this,se)!==i||Je(this.options.enabled,I(this,se))!==Je(r.enabled,I(this,se))||gr(this.options.staleTime,I(this,se))!==gr(r.staleTime,I(this,se)))&&ie(this,ae,za).call(this);const h=ie(this,ae,Ua).call(this);o&&(I(this,se)!==i||Je(this.options.enabled,I(this,se))!==Je(r.enabled,I(this,se))||h!==I(this,ir))&&ie(this,ae,Wa).call(this,h)}getOptimisticResult(t){const r=I(this,We).getQueryCache().build(I(this,We),t),i=this.createResult(r,t);return Z_(this,i)&&(q(this,je,i),q(this,mi,this.options),q(this,Or,I(this,se).state)),i}getCurrentResult(){return I(this,je)}trackResult(t,r){return new Proxy(t,{get:(i,o)=>(this.trackProp(o),r==null||r(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&I(this,Ot).status==="pending"&&I(this,Ot).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,o))})}trackProp(t){I(this,Ci).add(t)}getCurrentQuery(){return I(this,se)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=I(this,We).defaultQueryOptions(t),i=I(this,We).getQueryCache().build(I(this,We),r);return i.fetch().then(()=>this.createResult(i,r))}fetch(t){return ie(this,ae,Ji).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),I(this,je)))}createResult(t,r){var b;const i=I(this,se),o=this.options,h=I(this,je),v=I(this,Or),s=I(this,mi),f=t!==i?t.state:I(this,Ds),{state:m}=t;let d={...m},_=!1,C;if(r._optimisticResults){const D=this.hasListeners(),M=!D&&hu(t,r),P=D&&du(t,i,r,o);(M||P)&&(d={...d,...$d(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:w,errorUpdatedAt:S,status:c}=d;C=d.data;let a=!1;if(r.placeholderData!==void 0&&C===void 0&&c==="pending"){let D;h!=null&&h.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(D=h.data,a=!0):D=typeof r.placeholderData=="function"?r.placeholderData((b=I(this,Si))==null?void 0:b.state.data,I(this,Si)):r.placeholderData,D!==void 0&&(c="success",C=Na(h==null?void 0:h.data,D,r),_=!0)}if(r.select&&C!==void 0&&!a)if(h&&C===(v==null?void 0:v.data)&&r.select===I(this,Ts))C=I(this,yi);else try{q(this,Ts,r.select),C=r.select(C),C=Na(h==null?void 0:h.data,C,r),q(this,yi,C),q(this,rr,null)}catch(D){q(this,rr,D)}I(this,rr)&&(w=I(this,rr),C=I(this,yi),S=Date.now(),c="error");const n=d.fetchStatus==="fetching",l=c==="pending",p=c==="error",y=l&&n,x=C!==void 0,g={status:c,fetchStatus:d.fetchStatus,isPending:l,isSuccess:c==="success",isError:p,isInitialLoading:y,isLoading:y,data:C,dataUpdatedAt:d.dataUpdatedAt,error:w,errorUpdatedAt:S,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>f.dataUpdateCount||d.errorUpdateCount>f.errorUpdateCount,isFetching:n,isRefetching:n&&!l,isLoadingError:p&&!x,isPaused:d.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:p&&x,isStale:ql(t,r),refetch:this.refetch,promise:I(this,Ot),isEnabled:Je(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=g.data!==void 0,M=g.status==="error"&&!D,P=F=>{M?F.reject(g.error):D&&F.resolve(g.data)},B=()=>{const F=q(this,Ot,g.promise=Fa());P(F)},N=I(this,Ot);switch(N.status){case"pending":t.queryHash===i.queryHash&&P(N);break;case"fulfilled":(M||g.data!==N.value)&&B();break;case"rejected":(!M||g.error!==N.reason)&&B();break}}return g}updateResult(){const t=I(this,je),r=this.createResult(I(this,se),this.options);if(q(this,Or,I(this,se).state),q(this,mi,this.options),I(this,Or).data!==void 0&&q(this,Si,I(this,se)),Ia(r,t))return;q(this,je,r);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,h=typeof o=="function"?o():o;if(h==="all"||!h&&!I(this,Ci).size)return!0;const v=new Set(h??I(this,Ci));return this.options.throwOnError&&v.add("error"),Object.keys(I(this,je)).some(s=>{const u=s;return I(this,je)[u]!==t[u]&&v.has(u)})};ie(this,ae,Kd).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ie(this,ae,$a).call(this)}},We=new WeakMap,se=new WeakMap,Ds=new WeakMap,je=new WeakMap,Or=new WeakMap,mi=new WeakMap,Ot=new WeakMap,rr=new WeakMap,Ts=new WeakMap,yi=new WeakMap,Si=new WeakMap,Br=new WeakMap,Ir=new WeakMap,ir=new WeakMap,Ci=new WeakMap,ae=new WeakSet,Ji=function(t){ie(this,ae,qa).call(this);let r=I(this,se).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch($e)),r},za=function(){ie(this,ae,Ka).call(this);const t=gr(this.options.staleTime,I(this,se));if(Rs.isServer()||I(this,je).isStale||!Ba(t))return;const i=Id(I(this,je).dataUpdatedAt,t)+1;q(this,Br,Lr.setTimeout(()=>{I(this,je).isStale||this.updateResult()},i))},Ua=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(I(this,se)):this.options.refetchInterval)??!1},Wa=function(t){ie(this,ae,Va).call(this),q(this,ir,t),!(Rs.isServer()||Je(this.options.enabled,I(this,se))===!1||!Ba(I(this,ir))||I(this,ir)===0)&&q(this,Ir,Lr.setInterval(()=>{(this.options.refetchIntervalInBackground||$l.isFocused())&&ie(this,ae,Ji).call(this)},I(this,ir)))},$a=function(){ie(this,ae,za).call(this),ie(this,ae,Wa).call(this,ie(this,ae,Ua).call(this))},Ka=function(){I(this,Br)!==void 0&&(Lr.clearTimeout(I(this,Br)),q(this,Br,void 0))},Va=function(){I(this,Ir)!==void 0&&(Lr.clearInterval(I(this,Ir)),q(this,Ir,void 0))},qa=function(){const t=I(this,We).getQueryCache().build(I(this,We),this.options);if(t===I(this,se))return;const r=I(this,se);q(this,se,t),q(this,Ds,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Kd=function(t){De.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(I(this,je))}),I(this,We).getQueryCache().notify({query:I(this,se),type:"observerResultsUpdated"})})},yu);function J_(e,t){return Je(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Je(t.retryOnMount,e)===!1)}function hu(e,t){return J_(e,t)||e.state.data!==void 0&&Qa(e,t,t.refetchOnMount)}function Qa(e,t,r){if(Je(t.enabled,e)!==!1&&gr(t.staleTime,e)!=="static"){const i=typeof r=="function"?r(e):r;return i==="always"||i!==!1&&ql(e,t)}return!1}function du(e,t,r,i){return(e!==t||Je(i.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&ql(e,r)}function ql(e,t){return Je(t.enabled,e)!==!1&&e.isStaleByTime(gr(t.staleTime,e))}function Z_(e,t){return!Ia(e.getCurrentResult(),t)}var Ps,xt,Oe,jr,bt,qt,Su,ev=(Su=class extends Ud{constructor(t){super();J(this,bt);J(this,Ps);J(this,xt);J(this,Oe);J(this,jr);q(this,Ps,t.client),this.mutationId=t.mutationId,q(this,Oe,t.mutationCache),q(this,xt,[]),this.state=t.state||tv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){I(this,xt).includes(t)||(I(this,xt).push(t),this.clearGcTimeout(),I(this,Oe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,xt,I(this,xt).filter(r=>r!==t)),this.scheduleGc(),I(this,Oe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){I(this,xt).length||(this.state.status==="pending"?this.scheduleGc():I(this,Oe).remove(this))}continue(){var t;return((t=I(this,jr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var v,s,u,f,m,d,_,C,w,S,c,a,n,l,p,y,x,k;const r=()=>{ie(this,bt,qt).call(this,{type:"continue"})},i={client:I(this,Ps),meta:this.options.meta,mutationKey:this.options.mutationKey};q(this,jr,zd({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(g,b)=>{ie(this,bt,qt).call(this,{type:"failed",failureCount:g,error:b})},onPause:()=>{ie(this,bt,qt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(this,Oe).canRun(this)}));const o=this.state.status==="pending",h=!I(this,jr).canStart();try{if(o)r();else{ie(this,bt,qt).call(this,{type:"pending",variables:t,isPaused:h}),I(this,Oe).config.onMutate&&await I(this,Oe).config.onMutate(t,this,i);const b=await((s=(v=this.options).onMutate)==null?void 0:s.call(v,t,i));b!==this.state.context&&ie(this,bt,qt).call(this,{type:"pending",context:b,variables:t,isPaused:h})}const g=await I(this,jr).start();return await((f=(u=I(this,Oe).config).onSuccess)==null?void 0:f.call(u,g,t,this.state.context,this,i)),await((d=(m=this.options).onSuccess)==null?void 0:d.call(m,g,t,this.state.context,i)),await((C=(_=I(this,Oe).config).onSettled)==null?void 0:C.call(_,g,null,this.state.variables,this.state.context,this,i)),await((S=(w=this.options).onSettled)==null?void 0:S.call(w,g,null,t,this.state.context,i)),ie(this,bt,qt).call(this,{type:"success",data:g}),g}catch(g){try{await((a=(c=I(this,Oe).config).onError)==null?void 0:a.call(c,g,t,this.state.context,this,i))}catch(b){Promise.reject(b)}try{await((l=(n=this.options).onError)==null?void 0:l.call(n,g,t,this.state.context,i))}catch(b){Promise.reject(b)}try{await((y=(p=I(this,Oe).config).onSettled)==null?void 0:y.call(p,void 0,g,this.state.variables,this.state.context,this,i))}catch(b){Promise.reject(b)}try{await((k=(x=this.options).onSettled)==null?void 0:k.call(x,void 0,g,t,this.state.context,i))}catch(b){Promise.reject(b)}throw ie(this,bt,qt).call(this,{type:"error",error:g}),g}finally{I(this,Oe).runNext(this)}}},Ps=new WeakMap,xt=new WeakMap,Oe=new WeakMap,jr=new WeakMap,bt=new WeakSet,qt=function(t){const r=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),De.batch(()=>{I(this,xt).forEach(i=>{i.onMutationUpdate(t)}),I(this,Oe).notify({mutation:this,type:"updated",action:t})})},Su);function tv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bt,pt,As,Cu,rv=(Cu=class extends Ns{constructor(t={}){super();J(this,Bt);J(this,pt);J(this,As);this.config=t,q(this,Bt,new Set),q(this,pt,new Map),q(this,As,0)}build(t,r,i){const o=new ev({client:t,mutationCache:this,mutationId:++Hs(this,As)._,options:t.defaultMutationOptions(r),state:i});return this.add(o),o}add(t){I(this,Bt).add(t);const r=nn(t);if(typeof r=="string"){const i=I(this,pt).get(r);i?i.push(t):I(this,pt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(I(this,Bt).delete(t)){const r=nn(t);if(typeof r=="string"){const i=I(this,pt).get(r);if(i)if(i.length>1){const o=i.indexOf(t);o!==-1&&i.splice(o,1)}else i[0]===t&&I(this,pt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=nn(t);if(typeof r=="string"){const i=I(this,pt).get(r),o=i==null?void 0:i.find(h=>h.state.status==="pending");return!o||o===t}else return!0}runNext(t){var i;const r=nn(t);if(typeof r=="string"){const o=(i=I(this,pt).get(r))==null?void 0:i.find(h=>h!==t&&h.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){De.batch(()=>{I(this,Bt).forEach(t=>{this.notify({type:"removed",mutation:t})}),I(this,Bt).clear(),I(this,pt).clear()})}getAll(){return Array.from(I(this,Bt))}find(t){const r={exact:!0,...t};return this.getAll().find(i=>nu(r,i))}findAll(t={}){return this.getAll().filter(r=>nu(t,r))}notify(t){De.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return De.batch(()=>Promise.all(t.map(r=>r.continue().catch($e))))}},Bt=new WeakMap,pt=new WeakMap,As=new WeakMap,Cu);function nn(e){var t;return(t=e.options.scope)==null?void 0:t.id}var kt,wu,iv=(wu=class extends Ns{constructor(t={}){super();J(this,kt);this.config=t,q(this,kt,new Map)}build(t,r,i){const o=r.queryKey,h=r.queryHash??Kl(o,r);let v=this.get(h);return v||(v=new X_({client:t,queryKey:o,queryHash:h,options:t.defaultQueryOptions(r),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(v)),v}add(t){I(this,kt).has(t.queryHash)||(I(this,kt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=I(this,kt).get(t.queryHash);r&&(t.destroy(),r===t&&I(this,kt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){De.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return I(this,kt).get(t)}getAll(){return[...I(this,kt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(i=>su(r,i))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(i=>su(t,i)):r}notify(t){De.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){De.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){De.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},kt=new WeakMap,wu),me,sr,nr,wi,xi,or,bi,ki,xu,sv=(xu=class{constructor(e={}){J(this,me);J(this,sr);J(this,nr);J(this,wi);J(this,xi);J(this,or);J(this,bi);J(this,ki);q(this,me,e.queryCache||new iv),q(this,sr,e.mutationCache||new rv),q(this,nr,e.defaultOptions||{}),q(this,wi,new Map),q(this,xi,new Map),q(this,or,0)}mount(){Hs(this,or)._++,I(this,or)===1&&(q(this,bi,$l.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,me).onFocus())})),q(this,ki,Wn.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,me).onOnline())})))}unmount(){var e,t;Hs(this,or)._--,I(this,or)===0&&((e=I(this,bi))==null||e.call(this),q(this,bi,void 0),(t=I(this,ki))==null||t.call(this),q(this,ki,void 0))}isFetching(e){return I(this,me).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return I(this,sr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=I(this,me).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=I(this,me).build(this,t),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(gr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return I(this,me).findAll(e).map(({queryKey:t,state:r})=>{const i=r.data;return[t,i]})}setQueryData(e,t,r){const i=this.defaultQueryOptions({queryKey:e}),o=I(this,me).get(i.queryHash),h=o==null?void 0:o.state.data,v=N_(t,h);if(v!==void 0)return I(this,me).build(this,i).setData(v,{...r,manual:!0})}setQueriesData(e,t,r){return De.batch(()=>I(this,me).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=I(this,me).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=I(this,me);De.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=I(this,me);return De.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},i=De.batch(()=>I(this,me).findAll(e).map(o=>o.cancel(r)));return Promise.all(i).then($e).catch($e)}invalidateQueries(e,t={}){return De.batch(()=>(I(this,me).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},i=De.batch(()=>I(this,me).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let h=o.fetch(void 0,r);return r.throwOnError||(h=h.catch($e)),o.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(i).then($e)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=I(this,me).build(this,t);return r.isStaleByTime(gr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($e).catch($e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($e).catch($e)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Wn.isOnline()?I(this,sr).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(this,me)}getMutationCache(){return I(this,sr)}getDefaultOptions(){return I(this,nr)}setDefaultOptions(e){q(this,nr,e)}setQueryDefaults(e,t){I(this,wi).set(ks(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...I(this,wi).values()],r={};return t.forEach(i=>{Es(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,t){I(this,xi).set(ks(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...I(this,xi).values()],r={};return t.forEach(i=>{Es(e,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...I(this,nr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Kl(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Vl&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...I(this,nr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){I(this,me).clear(),I(this,sr).clear()}},me=new WeakMap,sr=new WeakMap,nr=new WeakMap,wi=new WeakMap,xi=new WeakMap,or=new WeakMap,bi=new WeakMap,ki=new WeakMap,xu),Vd=Z.createContext(void 0),nv=e=>{const t=Z.useContext(Vd);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ov=({client:e,children:t})=>(Z.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),A.jsx(Vd.Provider,{value:e,children:t})),qd=Z.createContext(!1),av=()=>Z.useContext(qd);qd.Provider;function lv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var cv=Z.createContext(lv()),uv=()=>Z.useContext(cv),hv=(e,t,r)=>{const i=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Fd(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},dv=e=>{Z.useEffect(()=>{e.clearReset()},[e])},fv=({result:e,errorResetBoundary:t,throwOnError:r,query:i,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(o&&e.data===void 0||Fd(r,[e.error,i])),pv=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...o)=>r(i(...o)):r(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},_v=(e,t)=>e.isLoading&&e.isFetching&&!t,vv=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,fu=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function gv(e,t,r){var _,C,w,S;const i=av(),o=uv(),h=nv(),v=h.defaultQueryOptions(e);(C=(_=h.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||C.call(_,v);const s=h.getQueryCache().get(v.queryHash);v._optimisticResults=i?"isRestoring":"optimistic",pv(v),hv(v,o,s),dv(o);const u=!h.getQueryCache().get(v.queryHash),[f]=Z.useState(()=>new t(h,v)),m=f.getOptimisticResult(v),d=!i&&e.subscribed!==!1;if(Z.useSyncExternalStore(Z.useCallback(c=>{const a=d?f.subscribe(De.batchCalls(c)):$e;return f.updateResult(),a},[f,d]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),Z.useEffect(()=>{f.setOptions(v)},[v,f]),vv(v,m))throw fu(v,f,o);if(fv({result:m,errorResetBoundary:o,throwOnError:v.throwOnError,query:s,suspense:v.suspense}))throw m.error;if((S=(w=h.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||S.call(w,v,m),v.experimental_prefetchInRender&&!Rs.isServer()&&_v(m,i)){const c=u?fu(v,f,o):s==null?void 0:s.promise;c==null||c.catch($e).finally(()=>{f.updateResult()})}return v.notifyOnChangeProps?m:f.trackResult(m)}function $n(e,t){return gv(e,Y_)}async function Tt(e,t){const r=await fetch(e,{credentials:"same-origin",headers:{Accept:"application/json",...(t==null?void 0:t.headers)??{}},...t});if(!r.ok)throw new Error(`${r.status} ${r.statusText} on ${e}`);return r.json()}const Dt={getStatus:()=>Tt("/v1/status"),getBootstrap:()=>Tt("/v1/bootstrap"),getRecentEvents:(e,t=100)=>{const r=new URLSearchParams;return e&&e.length>0&&r.set("kinds",e.join(",")),r.set("limit",String(t)),Tt(`/v1/events/recent?${r.toString()}`)},getClaudeAuth:()=>Tt("/v1/auth/claude"),signInClaude:()=>Tt("/v1/auth/claude/spawn",{method:"POST"}),triggerDrip:()=>Tt("/v1/setup/drip",{method:"POST"}),changeKeystorePassword:(e,t)=>Tt("/v1/setup/change-password",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({current:e,next:t})}),claimRewards:()=>Tt("/api/admin/claim-rewards",{method:"POST"}),restartDaemon:()=>Tt("/api/admin/restart",{method:"POST"})};async function mv(){const e=new URL(window.location.href),t=e.searchParams.get("k");if(t){try{await fetch(`/auth/handshake?k=${encodeURIComponent(t)}`,{credentials:"same-origin"})}catch{}e.searchParams.delete("k"),window.history.replaceState({},"",e.toString())}}function Qd(e){const[t,r]=Z.useState([]),[i,o]=Z.useState(!1);return Z.useEffect(()=>{const h=e&&e.length>0?`?kinds=${e.join(",")}`:"",v=new EventSource(`/v1/events${h}`,{withCredentials:!0});return v.onopen=()=>o(!0),v.onerror=()=>o(!1),v.onmessage=s=>{try{const u=JSON.parse(s.data);r(f=>[...f.slice(-499),u])}catch{}},()=>{v.close()}},[e==null?void 0:e.join(",")]),{events:t,connected:i}}function yv({headline:e}){const[t,r]=Z.useState(!1),{events:i}=Qd(),o=i.length>0?i[i.length-1]:null;return A.jsx("div",{className:"min-h-screen flex items-center justify-center px-10 py-16",style:{background:"var(--bg)",color:"var(--fg)"},children:A.jsxs("div",{className:"max-w-xl w-full flex flex-col gap-6",children:[A.jsx("span",{className:"j-label",style:{color:"var(--accent-gold)"},children:"Jinn · starting up"}),A.jsxs("h1",{className:"j-display",style:{fontSize:"64px",lineHeight:1.05},children:[e,"."]}),A.jsx("p",{className:"j-mono text-sm",style:{color:"var(--fg-muted)",minHeight:"1.5em"},children:o?Sv(o):"The daemon is booting. This usually takes a second."}),A.jsx("button",{type:"button",onClick:()=>r(h=>!h),className:"j-label hover:opacity-80 self-start",style:{color:"var(--fg-dim)"},children:t?"Hide details":"Show details"}),t&&A.jsxs("div",{className:"j-mono text-xs max-h-64 overflow-y-auto px-3 py-2",style:{background:"var(--bg-elevated)",border:"1px solid var(--border)",borderRadius:"var(--radius-2)"},children:[i.length===0&&A.jsx("div",{style:{color:"var(--fg-dim)"},children:"no events yet"}),i.slice().reverse().map(h=>A.jsxs("div",{className:"grid grid-cols-[68px_84px_1fr] gap-3 py-0.5",children:[A.jsx("span",{style:{color:"var(--fg-dim)"},children:h.ts.slice(11,19)}),A.jsx("span",{style:{color:h.kind==="error"?"var(--break-red)":h.kind==="system"?"var(--accent-sky)":"var(--fg-dim)"},children:h.kind}),A.jsx("span",{style:{color:"var(--fg)"},children:h.message})]},h.id))]})]})})}function Sv(e){return e.kind==="error"?`Error: ${e.message}`:e.message}function Cv({address:e,minimumWei:t,chainExplorerBase:r}){var a;const[i,o]=Z.useState(!1),[h,v]=Z.useState(null),[s,u]=Z.useState(0),[f,m]=Z.useState({state:"idle"});Z.useEffect(()=>{if(h===null)return;u(Math.max(0,Math.floor((Date.now()-h)/1e3)));const n=window.setInterval(()=>{u(Math.max(0,Math.floor((Date.now()-h)/1e3)))},1e3);return()=>window.clearInterval(n)},[h]);const d=async()=>{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),1500)},_=async()=>{var n;v(Date.now()),u(0),m({state:"requesting"});try{const l=await Dt.triggerDrip();v(null),l.ok?m({state:"sent",txHash:l.txHash??((n=l.txHashes)==null?void 0:n.at(-1)),txHashes:l.txHashes,attempts:l.attempts,balanceWei:l.balanceWei,targetWei:l.targetWei}):l.rateLimited||l.reason&&/rate|claimed|429/i.test(l.reason)?m({state:"rate_limited",reason:l.reason??"faucet rate-limited"}):m({state:"failed",reason:l.reason??"faucet funding failed"})}catch(l){v(null),m({state:"failed",reason:l instanceof Error?l.message:"drip failed"})}},C=n=>{if(!n)return"unknown";try{const l=Number(BigInt(n))/1e18;return`${l.toFixed(l<.001?4:3)} ETH`}catch{return`${n} wei`}},w=C(t),S=Z.useMemo(()=>f.state!=="requesting"?0:Math.min(92,Math.max(8,Math.round(s/60*92))),[f.state,s]),c=f.state==="sent"?((a=f.txHashes)==null?void 0:a.length)??f.attempts??(f.txHash?1:0):0;return A.jsxs("div",{className:"px-6 py-5 flex flex-col gap-4",style:{border:"1px solid var(--accent-gold)",background:"rgba(220, 184, 102, 0.04)",borderRadius:"var(--radius-2)"},children:[A.jsxs("div",{className:"flex items-baseline justify-between",children:[A.jsx("span",{className:"j-label",style:{color:"var(--accent-gold)"},children:"Action needed · fund the master EOA"}),A.jsx("span",{className:"j-mono text-[10px]",style:{color:"var(--fg-dim)"},children:"auto-detected on chain"})]}),A.jsxs("div",{className:"flex flex-col gap-1",children:[A.jsx("span",{className:"j-mono text-xs break-all",style:{color:"var(--fg)"},children:e}),A.jsxs("span",{className:"j-mono text-xs",style:{color:"var(--fg-muted)"},children:["send at least ",w," so the daemon can pay gas for setup, or use the testnet faucet."]})]}),A.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[A.jsx("button",{onClick:_,type:"button",disabled:f.state==="requesting"||f.state==="sent",className:"px-3 py-1.5 j-label hover:opacity-90 disabled:opacity-50",style:{background:"var(--accent-gold)",color:"var(--bg)",borderRadius:"var(--radius-1)"},children:f.state==="requesting"?"Funding...":f.state==="sent"?"Faucet funded":"Fund from faucet"}),A.jsx("button",{onClick:d,type:"button",className:"px-3 py-1.5 j-label hover:opacity-90",style:{border:"1px solid var(--border-strong)",color:"var(--fg)",borderRadius:"var(--radius-1)",background:"transparent"},children:i?"Copied":"Copy address"}),A.jsx("a",{href:`${r}/address/${e}`,target:"_blank",rel:"noopener noreferrer",className:"px-3 py-1.5 j-label hover:opacity-90",style:{border:"1px solid var(--border)",color:"var(--fg-muted)",borderRadius:"var(--radius-1)"},children:"View on explorer"})]}),f.state==="sent"&&A.jsxs("p",{className:"j-mono text-[11px]",style:{color:"var(--vow-green)"},children:["Faucet funding complete",c>0?` (${c} drip${c===1?"":"s"})`:"",".",f.balanceWei&&f.targetWei?` Balance ${C(f.balanceWei)} / target ${C(f.targetWei)}.`:"",f.txHash&&A.jsxs(A.Fragment,{children:[" ",A.jsx("a",{href:`${r}/tx/${f.txHash}`,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{color:"var(--accent-sky)"},children:"view latest tx"})]})]}),f.state==="requesting"&&A.jsxs("div",{className:"flex flex-col gap-2",children:[A.jsx("div",{className:"h-1.5 overflow-hidden",style:{background:"var(--bg-sunken)",borderRadius:"999px"},children:A.jsx("div",{className:"h-full transition-all",style:{width:`${S}%`,background:"var(--accent-gold)",borderRadius:"999px"}})}),A.jsxs("p",{className:"j-mono text-[11px]",style:{color:"var(--fg-muted)"},children:["Requesting faucet drips for ",wv(e),". Elapsed ",s,"s; this can take about a minute on a fresh wallet."]})]}),f.state==="rate_limited"&&A.jsx("p",{className:"j-mono text-[11px]",style:{color:"var(--wane)"},children:"Faucet rate-limited. Send manually or wait before trying again."}),f.state==="failed"&&A.jsx("p",{className:"j-mono text-[11px]",style:{color:"var(--break-red)"},children:f.reason})]})}const wv=e=>`${e.slice(0,6)}…${e.slice(-4)}`;var Gd={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={4567:function(v,s,u){var f=this&&this.__decorate||function(l,p,y,x){var k,g=arguments.length,b=g<3?p:x===null?x=Object.getOwnPropertyDescriptor(p,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,p,y,x);else for(var D=l.length-1;D>=0;D--)(k=l[D])&&(b=(g<3?k(b):g>3?k(p,y,b):k(p,y))||b);return g>3&&b&&Object.defineProperty(p,y,b),b},m=this&&this.__param||function(l,p){return function(y,x){p(y,x,l)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const d=u(9042),_=u(6114),C=u(9924),w=u(844),S=u(5596),c=u(4725),a=u(3656);let n=s.AccessibilityManager=class extends w.Disposable{constructor(l,p){super(),this._terminal=l,this._renderService=p,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let y=0;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);if(this._topBoundaryFocusListener=y=>this._handleBoundaryFocus(y,0),this._bottomBoundaryFocusListener=y=>this._handleBoundaryFocus(y,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new C.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(y=>this._handleResize(y.rows))),this.register(this._terminal.onRender(y=>this._refreshRows(y.start,y.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(y=>this._handleChar(y))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
41
|
+
`))),this.register(this._terminal.onA11yTab(y=>this._handleTab(y))),this.register(this._terminal.onKey(y=>this._handleKey(y.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new S.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,a.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,w.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(l){for(let p=0;p<l;p++)this._handleChar(" ")}_handleChar(l){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==l&&(this._charsToAnnounce+=l):this._charsToAnnounce+=l,l===`
|
|
42
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),_.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,_.isMac&&this._liveRegion.remove()}_handleKey(l){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(l)||this._charsToConsume.push(l)}_refreshRows(l,p){this._liveRegionDebouncer.refresh(l,p,this._terminal.rows)}_renderRows(l,p){const y=this._terminal.buffer,x=y.lines.length.toString();for(let k=l;k<=p;k++){const g=y.translateBufferLineToString(y.ydisp+k,!0),b=(y.ydisp+k+1).toString(),D=this._rowElements[k];D&&(g.length===0?D.innerText=" ":D.textContent=g,D.setAttribute("aria-posinset",b),D.setAttribute("aria-setsize",x))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(l,p){const y=l.target,x=this._rowElements[p===0?1:this._rowElements.length-2];if(y.getAttribute("aria-posinset")===(p===0?"1":`${this._terminal.buffer.lines.length}`)||l.relatedTarget!==x)return;let k,g;if(p===0?(k=y,g=this._rowElements.pop(),this._rowContainer.removeChild(g)):(k=this._rowElements.shift(),g=y,this._rowContainer.removeChild(k)),k.removeEventListener("focus",this._topBoundaryFocusListener),g.removeEventListener("focus",this._bottomBoundaryFocusListener),p===0){const b=this._createAccessibilityTreeNode();this._rowElements.unshift(b),this._rowContainer.insertAdjacentElement("afterbegin",b)}else{const b=this._createAccessibilityTreeNode();this._rowElements.push(b),this._rowContainer.appendChild(b)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(p===0?-1:1),this._rowElements[p===0?1:this._rowElements.length-2].focus(),l.preventDefault(),l.stopImmediatePropagation()}_handleResize(l){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let p=this._rowContainer.children.length;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);for(;this._rowElements.length>l;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const l=document.createElement("div");return l.setAttribute("role","listitem"),l.tabIndex=-1,this._refreshRowDimensions(l),l}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let l=0;l<this._terminal.rows;l++)this._refreshRowDimensions(this._rowElements[l])}}_refreshRowDimensions(l){l.style.height=`${this._renderService.dimensions.css.cell.height}px`}};s.AccessibilityManager=n=f([m(1,c.IRenderService)],n)},3614:(v,s)=>{function u(_){return _.replace(/\r?\n/g,"\r")}function f(_,C){return C?"\x1B[200~"+_+"\x1B[201~":_}function m(_,C,w,S){_=f(_=u(_),w.decPrivateModes.bracketedPasteMode&&S.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(_,!0),C.value=""}function d(_,C,w){const S=w.getBoundingClientRect(),c=_.clientX-S.left-10,a=_.clientY-S.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${c}px`,C.style.top=`${a}px`,C.style.zIndex="1000",C.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=u,s.bracketTextForPaste=f,s.copyHandler=function(_,C){_.clipboardData&&_.clipboardData.setData("text/plain",C.selectionText),_.preventDefault()},s.handlePasteEvent=function(_,C,w,S){_.stopPropagation(),_.clipboardData&&m(_.clipboardData.getData("text/plain"),C,w,S)},s.paste=m,s.moveTextAreaUnderMouseCursor=d,s.rightClickHandler=function(_,C,w,S,c){d(_,C,w),c&&S.rightClickSelect(_),C.value=S.selectionText,C.select()}},7239:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const f=u(1505);s.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(m,d,_){this._css.set(m,d,_)}getCss(m,d){return this._css.get(m,d)}setColor(m,d,_){this._color.set(m,d,_)}getColor(m,d){return this._color.get(m,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(u,f,m,d){u.addEventListener(f,m,d);let _=!1;return{dispose:()=>{_||(_=!0,u.removeEventListener(f,m,d))}}}},6465:function(v,s,u){var f=this&&this.__decorate||function(c,a,n,l){var p,y=arguments.length,x=y<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,a,n,l);else for(var k=c.length-1;k>=0;k--)(p=c[k])&&(x=(y<3?p(x):y>3?p(a,n,x):p(a,n))||x);return y>3&&x&&Object.defineProperty(a,n,x),x},m=this&&this.__param||function(c,a){return function(n,l){a(n,l,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier2=void 0;const d=u(3656),_=u(8460),C=u(844),w=u(2585);let S=s.Linkifier2=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(c){super(),this._bufferService=c,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(c){return this._linkProviders.push(c),{dispose:()=>{const a=this._linkProviders.indexOf(c);a!==-1&&this._linkProviders.splice(a,1)}}}attachToDom(c,a,n){this._element=c,this._mouseService=a,this._renderService=n,this.register((0,d.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,d.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){if(this._lastMouseEvent=c,!this._element||!this._mouseService)return;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!a)return;this._isMouseOut=!1;const n=c.composedPath();for(let l=0;l<n.length;l++){const p=n[l];if(p.classList.contains("xterm"))break;if(p.classList.contains("xterm-hover"))return}this._lastBufferCell&&a.x===this._lastBufferCell.x&&a.y===this._lastBufferCell.y||(this._handleHover(a),this._lastBufferCell=a)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,a){var n,l;this._activeProviderReplies&&a||((n=this._activeProviderReplies)===null||n===void 0||n.forEach(y=>{y==null||y.forEach(x=>{x.link.dispose&&x.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=c.y);let p=!1;for(const[y,x]of this._linkProviders.entries())a?!((l=this._activeProviderReplies)===null||l===void 0)&&l.get(y)&&(p=this._checkLinkProviderResult(y,c,p)):x.provideLinks(c.y,k=>{var g,b;if(this._isMouseOut)return;const D=k==null?void 0:k.map(M=>({link:M}));(g=this._activeProviderReplies)===null||g===void 0||g.set(y,D),p=this._checkLinkProviderResult(y,c,p),((b=this._activeProviderReplies)===null||b===void 0?void 0:b.size)===this._linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)})}_removeIntersectingLinks(c,a){const n=new Set;for(let l=0;l<a.size;l++){const p=a.get(l);if(p)for(let y=0;y<p.length;y++){const x=p[y],k=x.link.range.start.y<c?0:x.link.range.start.x,g=x.link.range.end.y>c?this._bufferService.cols:x.link.range.end.x;for(let b=k;b<=g;b++){if(n.has(b)){p.splice(y--,1);break}n.add(b)}}}}_checkLinkProviderResult(c,a,n){var l;if(!this._activeProviderReplies)return n;const p=this._activeProviderReplies.get(c);let y=!1;for(let x=0;x<c;x++)this._activeProviderReplies.has(x)&&!this._activeProviderReplies.get(x)||(y=!0);if(!y&&p){const x=p.find(k=>this._linkAtPosition(k.link,a));x&&(n=!0,this._handleNewLink(x))}if(this._activeProviderReplies.size===this._linkProviders.length&&!n)for(let x=0;x<this._activeProviderReplies.size;x++){const k=(l=this._activeProviderReplies.get(x))===null||l===void 0?void 0:l.find(g=>this._linkAtPosition(g.link,a));if(k){n=!0,this._handleNewLink(k);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._element||!this._mouseService||!this._currentLink)return;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);a&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,a)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,a){this._element&&this._currentLink&&this._lastMouseEvent&&(!c||!a||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=a)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(c.link,a)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>{var n,l;return(l=(n=this._currentLink)===null||n===void 0?void 0:n.state)===null||l===void 0?void 0:l.decorations.pointerCursor},set:n=>{var l,p;!((l=this._currentLink)===null||l===void 0)&&l.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&((p=this._element)===null||p===void 0||p.classList.toggle("xterm-cursor-pointer",n)))}},underline:{get:()=>{var n,l;return(l=(n=this._currentLink)===null||n===void 0?void 0:n.state)===null||l===void 0?void 0:l.decorations.underline},set:n=>{var l,p,y;!((l=this._currentLink)===null||l===void 0)&&l.state&&((y=(p=this._currentLink)===null||p===void 0?void 0:p.state)===null||y===void 0?void 0:y.decorations.underline)!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,n))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(n=>{if(!this._currentLink)return;const l=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,p=this._bufferService.buffer.ydisp+1+n.end;if(this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=p&&(this._clearCurrentLink(l,p),this._lastMouseEvent&&this._element)){const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._askForLink(y,!1)}})))}_linkHover(c,a,n){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),a.hover&&a.hover(n,a.text)}_fireUnderlineEvent(c,a){const n=c.range,l=this._bufferService.buffer.ydisp,p=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-l-1,n.end.x,n.end.y-l-1,void 0);(a?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(p)}_linkLeave(c,a,n){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),a.leave&&a.leave(n,a.text)}_linkAtPosition(c,a){const n=c.range.start.y*this._bufferService.cols+c.range.start.x,l=c.range.end.y*this._bufferService.cols+c.range.end.x,p=a.y*this._bufferService.cols+a.x;return n<=p&&p<=l}_positionFromMouseEvent(c,a,n){const l=n.getCoords(c,a,this._bufferService.cols,this._bufferService.rows);if(l)return{x:l[0],y:l[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,a,n,l,p){return{x1:c,y1:a,x2:n,y2:l,cols:this._bufferService.cols,fg:p}}};s.Linkifier2=S=f([m(0,w.IBufferService)],S)},9042:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(v,s,u){var f=this&&this.__decorate||function(S,c,a,n){var l,p=arguments.length,y=p<3?c:n===null?n=Object.getOwnPropertyDescriptor(c,a):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(S,c,a,n);else for(var x=S.length-1;x>=0;x--)(l=S[x])&&(y=(p<3?l(y):p>3?l(c,a,y):l(c,a))||y);return p>3&&y&&Object.defineProperty(c,a,y),y},m=this&&this.__param||function(S,c){return function(a,n){c(a,n,S)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const d=u(511),_=u(2585);let C=s.OscLinkProvider=class{constructor(S,c,a){this._bufferService=S,this._optionsService=c,this._oscLinkService=a}provideLinks(S,c){var a;const n=this._bufferService.buffer.lines.get(S-1);if(!n)return void c(void 0);const l=[],p=this._optionsService.rawOptions.linkHandler,y=new d.CellData,x=n.getTrimmedLength();let k=-1,g=-1,b=!1;for(let D=0;D<x;D++)if(g!==-1||n.hasContent(D)){if(n.loadCell(D,y),y.hasExtendedAttrs()&&y.extended.urlId){if(g===-1){g=D,k=y.extended.urlId;continue}b=y.extended.urlId!==k}else g!==-1&&(b=!0);if(b||g!==-1&&D===x-1){const M=(a=this._oscLinkService.getLinkData(k))===null||a===void 0?void 0:a.uri;if(M){const P={start:{x:g+1,y:S},end:{x:D+(b||D!==x-1?0:1),y:S}};let B=!1;if(!(p!=null&&p.allowNonHttpProtocols))try{const N=new URL(M);["http:","https:"].includes(N.protocol)||(B=!0)}catch{B=!0}B||l.push({text:M,range:P,activate:(N,F)=>p?p.activate(N,F,P):w(0,F),hover:(N,F)=>{var $;return($=p==null?void 0:p.hover)===null||$===void 0?void 0:$.call(p,N,F,P)},leave:(N,F)=>{var $;return($=p==null?void 0:p.leave)===null||$===void 0?void 0:$.call(p,N,F,P)}})}b=!1,y.hasExtendedAttrs()&&y.extended.urlId?(g=D,k=y.extended.urlId):(g=-1,k=-1)}}c(l)}};function w(S,c){if(confirm(`Do you want to navigate to ${c}?
|
|
43
|
+
|
|
44
|
+
WARNING: This link could potentially be dangerous`)){const a=window.open();if(a){try{a.opener=null}catch{}a.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}}s.OscLinkProvider=C=f([m(0,_.IBufferService),m(1,_.IOptionsService),m(2,_.IOscLinkService)],C)},6193:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.RenderDebouncer=void 0,s.RenderDebouncer=class{constructor(u,f){this._parentWindow=u,this._renderCallback=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(u,f,m){this._rowCount=m,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},5596:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ScreenDprMonitor=void 0;const f=u(844);class m extends f.Disposable{constructor(_){super(),this._parentWindow=_,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,f.toDisposable)(()=>{this.clearListener()}))}setListener(_){this._listener&&this.clearListener(),this._listener=_,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var _;this._outerListener&&((_=this._resolutionMediaMatchList)===null||_===void 0||_.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._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}s.ScreenDprMonitor=m},3236:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Terminal=void 0;const f=u(3614),m=u(3656),d=u(6465),_=u(9042),C=u(3730),w=u(1680),S=u(3107),c=u(5744),a=u(2950),n=u(1296),l=u(428),p=u(4269),y=u(5114),x=u(8934),k=u(3230),g=u(9312),b=u(4725),D=u(6731),M=u(8055),P=u(8969),B=u(8460),N=u(844),F=u(6114),$=u(8437),W=u(2584),E=u(7399),L=u(5941),T=u(9074),O=u(2585),H=u(5435),V=u(4567),X=typeof window<"u"?window.document:null;class Y extends P.CoreTerminal{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}constructor(R={}){super(R),this.browser=F,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new N.MutableDisposable),this._onCursorMove=this.register(new B.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new B.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new B.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new B.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new B.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new B.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new B.EventEmitter),this._onBlur=this.register(new B.EventEmitter),this._onA11yCharEmitter=this.register(new B.EventEmitter),this._onA11yTabEmitter=this.register(new B.EventEmitter),this._onWillOpen=this.register(new B.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(d.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(C.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(T.DecorationService),this._instantiationService.setService(O.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((j,U)=>this.refresh(j,U))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(j=>this._reportWindowsOptions(j))),this.register(this._inputHandler.onColor(j=>this._handleColorEvent(j))),this.register((0,B.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,B.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(j=>this._afterResize(j.cols,j.rows))),this.register((0,N.toDisposable)(()=>{var j,U;this._customKeyEventHandler=void 0,(U=(j=this.element)===null||j===void 0?void 0:j.parentNode)===null||U===void 0||U.removeChild(this.element)}))}_handleColorEvent(R){if(this._themeService)for(const j of R){let U,z="";switch(j.index){case 256:U="foreground",z="10";break;case 257:U="background",z="11";break;case 258:U="cursor",z="12";break;default:U="ansi",z="4;"+j.index}switch(j.type){case 0:const ee=M.color.toColorRGB(U==="ansi"?this._themeService.colors.ansi[j.index]:this._themeService.colors[U]);this.coreService.triggerDataEvent(`${W.C0.ESC}]${z};${(0,L.toRgbString)(ee)}${W.C1_ESCAPED.ST}`);break;case 1:if(U==="ansi")this._themeService.modifyColors(Q=>Q.ansi[j.index]=M.rgba.toColor(...j.color));else{const Q=U;this._themeService.modifyColors(le=>le[Q]=M.rgba.toColor(...j.color))}break;case 2:this._themeService.restoreColor(j.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(R){R?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(R){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(W.C0.ESC+"[I"),this.updateCursorStyle(R),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var R;return(R=this.textarea)===null||R===void 0?void 0:R.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(W.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const R=this.buffer.ybase+this.buffer.y,j=this.buffer.lines.get(R);if(!j)return;const U=Math.min(this.buffer.x,this.cols-1),z=this._renderService.dimensions.css.cell.height,ee=j.getWidth(U),Q=this._renderService.dimensions.css.cell.width*ee,le=this.buffer.y*this._renderService.dimensions.css.cell.height,Re=U*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Re+"px",this.textarea.style.top=le+"px",this.textarea.style.width=Q+"px",this.textarea.style.height=z+"px",this.textarea.style.lineHeight=z+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",j=>{this.hasSelection()&&(0,f.copyHandler)(j,this._selectionService)}));const R=j=>(0,f.handlePasteEvent)(j,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",R)),this.register((0,m.addDisposableDomListener)(this.element,"paste",R)),F.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",j=>{j.button===2&&(0,f.rightClickHandler)(j,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",j=>{(0,f.rightClickHandler)(j,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),F.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",j=>{j.button===1&&(0,f.moveTextAreaUnderMouseCursor)(j,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",R=>this._keyUp(R),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",R=>this._keyDown(R),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",R=>this._keyPress(R),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",R=>this._compositionHelper.compositionupdate(R))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,m.addDisposableDomListener)(this.textarea,"input",R=>this._inputEvent(R),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(R){var j;if(!R)throw new Error("Terminal requires a parent element.");R.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=R.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),R.appendChild(this.element);const U=X.createDocumentFragment();this._viewportElement=X.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),U.appendChild(this._viewportElement),this._viewportScrollArea=X.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=X.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=X.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),U.appendChild(this.screenElement),this.textarea=X.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",_.promptLabel),F.isChromeOS||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._coreBrowserService=this._instantiationService.createInstance(y.CoreBrowserService,this.textarea,(j=this._document.defaultView)!==null&&j!==void 0?j:window),this._instantiationService.setService(b.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",z=>this._handleTextAreaFocus(z))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(b.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(D.ThemeService),this._instantiationService.setService(b.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(p.CharacterJoinerService),this._instantiationService.setService(b.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(b.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(z=>this._onRender.fire(z))),this.onResize(z=>this._renderService.resize(z.cols,z.rows)),this._compositionView=X.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(a.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(U);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(x.MouseService),this._instantiationService.setService(b.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(w.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(z=>this.scrollLines(z.amount,z.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),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.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(g.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(b.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(z=>this.scrollLines(z.amount,z.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(z=>this._renderService.handleSelectionChanged(z.start,z.end,z.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(z=>{this.textarea.value=z,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(z=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(S.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",z=>this._selectionService.handleMouseDown(z))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",z=>this._handleScreenReaderModeOptionChange(z))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",z=>{!this._overviewRulerRenderer&&z&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(n.DomRenderer,this.element,this.screenElement,this._viewportElement,this.linkifier2)}bindMouse(){const R=this,j=this.element;function U(Q){const le=R._mouseService.getMouseReportCoords(Q,R.screenElement);if(!le)return!1;let Re,Ue;switch(Q.overrideType||Q.type){case"mousemove":Ue=32,Q.buttons===void 0?(Re=3,Q.button!==void 0&&(Re=Q.button<3?Q.button:3)):Re=1&Q.buttons?0:4&Q.buttons?1:2&Q.buttons?2:3;break;case"mouseup":Ue=0,Re=Q.button<3?Q.button:3;break;case"mousedown":Ue=1,Re=Q.button<3?Q.button:3;break;case"wheel":if(R.viewport.getLinesScrolled(Q)===0)return!1;Ue=Q.deltaY<0?0:1,Re=4;break;default:return!1}return!(Ue===void 0||Re===void 0||Re>4)&&R.coreMouseService.triggerMouseEvent({col:le.col,row:le.row,x:le.x,y:le.y,button:Re,action:Ue,ctrl:Q.ctrlKey,alt:Q.altKey,shift:Q.shiftKey})}const z={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ee={mouseup:Q=>(U(Q),Q.buttons||(this._document.removeEventListener("mouseup",z.mouseup),z.mousedrag&&this._document.removeEventListener("mousemove",z.mousedrag)),this.cancel(Q)),wheel:Q=>(U(Q),this.cancel(Q,!0)),mousedrag:Q=>{Q.buttons&&U(Q)},mousemove:Q=>{Q.buttons||U(Q)}};this.register(this.coreMouseService.onProtocolChange(Q=>{Q?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Q)),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()),8&Q?z.mousemove||(j.addEventListener("mousemove",ee.mousemove),z.mousemove=ee.mousemove):(j.removeEventListener("mousemove",z.mousemove),z.mousemove=null),16&Q?z.wheel||(j.addEventListener("wheel",ee.wheel,{passive:!1}),z.wheel=ee.wheel):(j.removeEventListener("wheel",z.wheel),z.wheel=null),2&Q?z.mouseup||(j.addEventListener("mouseup",ee.mouseup),z.mouseup=ee.mouseup):(this._document.removeEventListener("mouseup",z.mouseup),j.removeEventListener("mouseup",z.mouseup),z.mouseup=null),4&Q?z.mousedrag||(z.mousedrag=ee.mousedrag):(this._document.removeEventListener("mousemove",z.mousedrag),z.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(j,"mousedown",Q=>{if(Q.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Q))return U(Q),z.mouseup&&this._document.addEventListener("mouseup",z.mouseup),z.mousedrag&&this._document.addEventListener("mousemove",z.mousedrag),this.cancel(Q)})),this.register((0,m.addDisposableDomListener)(j,"wheel",Q=>{if(!z.wheel){if(!this.buffer.hasScrollback){const le=this.viewport.getLinesScrolled(Q);if(le===0)return;const Re=W.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Q.deltaY<0?"A":"B");let Ue="";for(let qr=0;qr<Math.abs(le);qr++)Ue+=Re;return this.coreService.triggerDataEvent(Ue,!0),this.cancel(Q,!0)}return this.viewport.handleWheel(Q)?this.cancel(Q):void 0}},{passive:!1})),this.register((0,m.addDisposableDomListener)(j,"touchstart",Q=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Q),this.cancel(Q)},{passive:!0})),this.register((0,m.addDisposableDomListener)(j,"touchmove",Q=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Q)?void 0:this.cancel(Q)},{passive:!1}))}refresh(R,j){var U;(U=this._renderService)===null||U===void 0||U.refreshRows(R,j)}updateCursorStyle(R){var j;!((j=this._selectionService)===null||j===void 0)&&j.shouldColumnSelect(R)?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(R,j,U=0){var z;U===1?(super.scrollLines(R,j,U),this.refresh(0,this.rows-1)):(z=this.viewport)===null||z===void 0||z.scrollLines(R)}paste(R){(0,f.paste)(R,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(R){this._customKeyEventHandler=R}registerLinkProvider(R){return this.linkifier2.registerLinkProvider(R)}registerCharacterJoiner(R){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const j=this._characterJoinerService.register(R);return this.refresh(0,this.rows-1),j}deregisterCharacterJoiner(R){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(R)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(R){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+R)}registerDecoration(R){return this._decorationService.registerDecoration(R)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(R,j,U){this._selectionService.setSelection(R,j,U)}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(){var R;(R=this._selectionService)===null||R===void 0||R.clearSelection()}selectAll(){var R;(R=this._selectionService)===null||R===void 0||R.selectAll()}selectLines(R,j){var U;(U=this._selectionService)===null||U===void 0||U.selectLines(R,j)}_keyDown(R){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(R)===!1)return!1;const j=this.browser.isMac&&this.options.macOptionIsMeta&&R.altKey;if(!j&&!this._compositionHelper.keydown(R))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;j||R.key!=="Dead"&&R.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const U=(0,E.evaluateKeyboardEvent)(R,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(R),U.type===3||U.type===2){const z=this.rows-1;return this.scrollLines(U.type===2?-z:z),this.cancel(R,!0)}return U.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,R)||(U.cancel&&this.cancel(R,!0),!U.key||!!(R.key&&!R.ctrlKey&&!R.altKey&&!R.metaKey&&R.key.length===1&&R.key.charCodeAt(0)>=65&&R.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(U.key!==W.C0.ETX&&U.key!==W.C0.CR||(this.textarea.value=""),this._onKey.fire({key:U.key,domEvent:R}),this._showCursor(),this.coreService.triggerDataEvent(U.key,!0),!this.optionsService.rawOptions.screenReaderMode||R.altKey||R.ctrlKey?this.cancel(R,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(R,j){const U=R.isMac&&!this.options.macOptionIsMeta&&j.altKey&&!j.ctrlKey&&!j.metaKey||R.isWindows&&j.altKey&&j.ctrlKey&&!j.metaKey||R.isWindows&&j.getModifierState("AltGraph");return j.type==="keypress"?U:U&&(!j.keyCode||j.keyCode>47)}_keyUp(R){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(R)===!1||(function(j){return j.keyCode===16||j.keyCode===17||j.keyCode===18}(R)||this.focus(),this.updateCursorStyle(R),this._keyPressHandled=!1)}_keyPress(R){let j;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(R)===!1)return!1;if(this.cancel(R),R.charCode)j=R.charCode;else if(R.which===null||R.which===void 0)j=R.keyCode;else{if(R.which===0||R.charCode===0)return!1;j=R.which}return!(!j||(R.altKey||R.ctrlKey||R.metaKey)&&!this._isThirdLevelShift(this.browser,R)||(j=String.fromCharCode(j),this._onKey.fire({key:j,domEvent:R}),this._showCursor(),this.coreService.triggerDataEvent(j,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(R){if(R.data&&R.inputType==="insertText"&&(!R.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const j=R.data;return this.coreService.triggerDataEvent(j,!0),this.cancel(R),!0}return!1}resize(R,j){R!==this.cols||j!==this.rows?super.resize(R,j):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(R,j){var U,z;(U=this._charSizeService)===null||U===void 0||U.measure(),(z=this.viewport)===null||z===void 0||z.syncScrollArea(!0)}clear(){var R;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 j=1;j<this.rows;j++)this.buffer.lines.push(this.buffer.getBlankLine($.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(R=this.viewport)===null||R===void 0||R.reset(),this.refresh(0,this.rows-1)}}reset(){var R,j;this.options.rows=this.rows,this.options.cols=this.cols;const U=this._customKeyEventHandler;this._setup(),super.reset(),(R=this._selectionService)===null||R===void 0||R.reset(),this._decorationService.reset(),(j=this.viewport)===null||j===void 0||j.reset(),this._customKeyEventHandler=U,this.refresh(0,this.rows-1)}clearTextureAtlas(){var R;(R=this._renderService)===null||R===void 0||R.clearTextureAtlas()}_reportFocus(){var R;!((R=this.element)===null||R===void 0)&&R.classList.contains("focus")?this.coreService.triggerDataEvent(W.C0.ESC+"[I"):this.coreService.triggerDataEvent(W.C0.ESC+"[O")}_reportWindowsOptions(R){if(this._renderService)switch(R){case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const j=this._renderService.dimensions.css.canvas.width.toFixed(0),U=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${W.C0.ESC}[4;${U};${j}t`);break;case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const z=this._renderService.dimensions.css.cell.width.toFixed(0),ee=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${W.C0.ESC}[6;${ee};${z}t`)}}cancel(R,j){if(this.options.cancelEvents||j)return R.preventDefault(),R.stopPropagation(),!1}}s.Terminal=Y},9924:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.TimeBasedDebouncer=void 0,s.TimeBasedDebouncer=class{constructor(u,f=1e3){this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,f,m){this._rowCount=m,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const d=Date.now();if(d-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=d,this._innerRefresh();else if(!this._additionalRefreshRequested){const _=d-this._lastRefreshMs,C=this._debounceThresholdMS-_;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},C)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}}},1680:function(v,s,u){var f=this&&this.__decorate||function(a,n,l,p){var y,x=arguments.length,k=x<3?n:p===null?p=Object.getOwnPropertyDescriptor(n,l):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(a,n,l,p);else for(var g=a.length-1;g>=0;g--)(y=a[g])&&(k=(x<3?y(k):x>3?y(n,l,k):y(n,l))||k);return x>3&&k&&Object.defineProperty(n,l,k),k},m=this&&this.__param||function(a,n){return function(l,p){n(l,p,a)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Viewport=void 0;const d=u(3656),_=u(4725),C=u(8460),w=u(844),S=u(2585);let c=s.Viewport=class extends w.Disposable{constructor(a,n,l,p,y,x,k,g){super(),this._viewportElement=a,this._scrollArea=n,this._bufferService=l,this._optionsService=p,this._charSizeService=y,this._renderService=x,this._coreBrowserService=k,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new C.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(b=>this._activeBuffer=b.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(b=>this._renderDimensions=b)),this._handleThemeChange(g.colors),this.register(g.onChangeColors(b=>this._handleThemeChange(b))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(a){this._viewportElement.style.backgroundColor=a.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(a){if(a)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderService.dimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const n=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.css.canvas.height);this._lastRecordedBufferHeight!==n&&(this._lastRecordedBufferHeight=n,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const a=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==a&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=a),this._refreshAnimationFrame=null}syncScrollArea(a=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(a);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(a)}_handleScroll(a){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const n=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:n,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const a=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(a*(this._smoothScrollState.target-this._smoothScrollState.origin)),a<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(a,n){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(n<0&&this._viewportElement.scrollTop!==0||n>0&&l<this._lastRecordedBufferHeight)||(a.cancelable&&a.preventDefault(),!1)}handleWheel(a){const n=this._getPixelsScrolled(a);return n!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+n:this._smoothScrollState.target+=n,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=n,this._bubbleScroll(a,n))}scrollLines(a){if(a!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const n=a*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+n,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:a,suppressScrollEvent:!1})}_getPixelsScrolled(a){if(a.deltaY===0||a.shiftKey)return 0;let n=this._applyScrollModifier(a.deltaY,a);return a.deltaMode===WheelEvent.DOM_DELTA_LINE?n*=this._currentRowHeight:a.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._currentRowHeight*this._bufferService.rows),n}getBufferElements(a,n){var l;let p,y="";const x=[],k=n??this._bufferService.buffer.lines.length,g=this._bufferService.buffer.lines;for(let b=a;b<k;b++){const D=g.get(b);if(!D)continue;const M=(l=g.get(b+1))===null||l===void 0?void 0:l.isWrapped;if(y+=D.translateToString(!M),!M||b===g.length-1){const P=document.createElement("div");P.textContent=y,x.push(P),y.length>0&&(p=P),y=""}}return{bufferElements:x,cursorElement:p}}getLinesScrolled(a){if(a.deltaY===0||a.shiftKey)return 0;let n=this._applyScrollModifier(a.deltaY,a);return a.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(n/=this._currentRowHeight+0,this._wheelPartialScroll+=n,n=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):a.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._bufferService.rows),n}_applyScrollModifier(a,n){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&n.altKey||l==="ctrl"&&n.ctrlKey||l==="shift"&&n.shiftKey?a*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:a*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(a){this._lastTouchY=a.touches[0].pageY}handleTouchMove(a){const n=this._lastTouchY-a.touches[0].pageY;return this._lastTouchY=a.touches[0].pageY,n!==0&&(this._viewportElement.scrollTop+=n,this._bubbleScroll(a,n))}};s.Viewport=c=f([m(2,S.IBufferService),m(3,S.IOptionsService),m(4,_.ICharSizeService),m(5,_.IRenderService),m(6,_.ICoreBrowserService),m(7,_.IThemeService)],c)},3107:function(v,s,u){var f=this&&this.__decorate||function(c,a,n,l){var p,y=arguments.length,x=y<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,a,n,l);else for(var k=c.length-1;k>=0;k--)(p=c[k])&&(x=(y<3?p(x):y>3?p(a,n,x):p(a,n))||x);return y>3&&x&&Object.defineProperty(a,n,x),x},m=this&&this.__param||function(c,a){return function(n,l){a(n,l,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.BufferDecorationRenderer=void 0;const d=u(3656),_=u(4725),C=u(844),w=u(2585);let S=s.BufferDecorationRenderer=class extends C.Disposable{constructor(c,a,n,l){super(),this._screenElement=c,this._bufferService=a,this._decorationService=n,this._renderService=l,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((0,d.addDisposableDomListener)(window,"resize",()=>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(p=>this._removeDecoration(p))),this.register((0,C.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const c of this._decorationService.decorations)this._renderDecoration(c);this._dimensionsChanged=!1}_renderDecoration(c){this._refreshStyle(c),this._dimensionsChanged&&this._refreshXPosition(c)}_createElement(c){var a,n;const l=document.createElement("div");l.classList.add("xterm-decoration"),l.classList.toggle("xterm-decoration-top-layer",((a=c==null?void 0:c.options)===null||a===void 0?void 0:a.layer)==="top"),l.style.width=`${Math.round((c.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,l.style.height=(c.options.height||1)*this._renderService.dimensions.css.cell.height+"px",l.style.top=(c.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",l.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const p=(n=c.options.x)!==null&&n!==void 0?n:0;return p&&p>this._bufferService.cols&&(l.style.display="none"),this._refreshXPosition(c,l),l}_refreshStyle(c){const a=c.marker.line-this._bufferService.buffers.active.ydisp;if(a<0||a>=this._bufferService.rows)c.element&&(c.element.style.display="none",c.onRenderEmitter.fire(c.element));else{let n=this._decorationElements.get(c);n||(n=this._createElement(c),c.element=n,this._decorationElements.set(c,n),this._container.appendChild(n),c.onDispose(()=>{this._decorationElements.delete(c),n.remove()})),n.style.top=a*this._renderService.dimensions.css.cell.height+"px",n.style.display=this._altBufferIsActive?"none":"block",c.onRenderEmitter.fire(n)}}_refreshXPosition(c,a=c.element){var n;if(!a)return;const l=(n=c.options.x)!==null&&n!==void 0?n:0;(c.options.anchor||"left")==="right"?a.style.right=l?l*this._renderService.dimensions.css.cell.width+"px":"":a.style.left=l?l*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(c){var a;(a=this._decorationElements.get(c))===null||a===void 0||a.remove(),this._decorationElements.delete(c),c.dispose()}};s.BufferDecorationRenderer=S=f([m(1,w.IBufferService),m(2,w.IDecorationService),m(3,_.IRenderService)],S)},5871:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorZoneStore=void 0,s.ColorZoneStore=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(u){if(u.options.overviewRulerOptions){for(const f of this._zones)if(f.color===u.options.overviewRulerOptions.color&&f.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,u.marker.line))return;if(this._lineAdjacentToZone(f,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(f,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,f){return f>=u.startBufferLine&&f<=u.endBufferLine}_lineAdjacentToZone(u,f,m){return f>=u.startBufferLine-this._linePadding[m||"full"]&&f<=u.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(u,f){u.startBufferLine=Math.min(u.startBufferLine,f),u.endBufferLine=Math.max(u.endBufferLine,f)}}},5744:function(v,s,u){var f=this&&this.__decorate||function(p,y,x,k){var g,b=arguments.length,D=b<3?y:k===null?k=Object.getOwnPropertyDescriptor(y,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(p,y,x,k);else for(var M=p.length-1;M>=0;M--)(g=p[M])&&(D=(b<3?g(D):b>3?g(y,x,D):g(y,x))||D);return b>3&&D&&Object.defineProperty(y,x,D),D},m=this&&this.__param||function(p,y){return function(x,k){y(x,k,p)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OverviewRulerRenderer=void 0;const d=u(5871),_=u(3656),C=u(4725),w=u(844),S=u(2585),c={full:0,left:0,center:0,right:0},a={full:0,left:0,center:0,right:0},n={full:0,left:0,center:0,right:0};let l=s.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(p,y,x,k,g,b,D){var M;super(),this._viewportElement=p,this._screenElement=y,this._bufferService=x,this._decorationService=k,this._renderService=g,this._optionsService=b,this._coreBrowseService=D,this._colorZoneStore=new d.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(M=this._viewportElement.parentElement)===null||M===void 0||M.insertBefore(this._canvas,this._viewportElement);const P=this._canvas.getContext("2d");if(!P)throw new Error("Ctx cannot be null");this._ctx=P,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)(()=>{var B;(B=this._canvas)===null||B===void 0||B.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){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())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register((0,_.addDisposableDomListener)(this._coreBrowseService.window,"resize",()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){const p=Math.floor(this._canvas.width/3),y=Math.ceil(this._canvas.width/3);a.full=this._canvas.width,a.left=p,a.center=y,a.right=p,this._refreshDrawHeightConstants(),n.full=0,n.left=0,n.center=a.left,n.right=a.left+a.center}_refreshDrawHeightConstants(){c.full=Math.round(2*this._coreBrowseService.dpr);const p=this._canvas.height/this._bufferService.buffer.lines.length,y=Math.round(Math.max(Math.min(p,12),6)*this._coreBrowseService.dpr);c.left=y,c.center=y,c.right=y}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.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._coreBrowseService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowseService.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(const y of this._decorationService.decorations)this._colorZoneStore.addDecoration(y);this._ctx.lineWidth=1;const p=this._colorZoneStore.zones;for(const y of p)y.position!=="full"&&this._renderColorZone(y);for(const y of p)y.position==="full"&&this._renderColorZone(y);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(p){this._ctx.fillStyle=p.color,this._ctx.fillRect(n[p.position||"full"],Math.round((this._canvas.height-1)*(p.startBufferLine/this._bufferService.buffers.active.lines.length)-c[p.position||"full"]/2),a[p.position||"full"],Math.round((this._canvas.height-1)*((p.endBufferLine-p.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[p.position||"full"]))}_queueRefresh(p,y){this._shouldUpdateDimensions=p||this._shouldUpdateDimensions,this._shouldUpdateAnchor=y||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};s.OverviewRulerRenderer=l=f([m(2,S.IBufferService),m(3,S.IDecorationService),m(4,C.IRenderService),m(5,S.IOptionsService),m(6,C.ICoreBrowserService)],l)},2950:function(v,s,u){var f=this&&this.__decorate||function(S,c,a,n){var l,p=arguments.length,y=p<3?c:n===null?n=Object.getOwnPropertyDescriptor(c,a):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(S,c,a,n);else for(var x=S.length-1;x>=0;x--)(l=S[x])&&(y=(p<3?l(y):p>3?l(c,a,y):l(c,a))||y);return p>3&&y&&Object.defineProperty(c,a,y),y},m=this&&this.__param||function(S,c){return function(a,n){c(a,n,S)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CompositionHelper=void 0;const d=u(4725),_=u(2585),C=u(2584);let w=s.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(S,c,a,n,l,p){this._textarea=S,this._compositionView=c,this._bufferService=a,this._optionsService=n,this._coreService=l,this._renderService=p,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(S){this._compositionView.textContent=S.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(S){if(this._isComposing||this._isSendingComposition){if(S.keyCode===229||S.keyCode===16||S.keyCode===17||S.keyCode===18)return!1;this._finalizeComposition(!1)}return S.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(S){if(this._compositionView.classList.remove("active"),this._isComposing=!1,S){const c={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let a;this._isSendingComposition=!1,c.start+=this._dataAlreadySent.length,a=this._isComposing?this._textarea.value.substring(c.start,c.end):this._textarea.value.substring(c.start),a.length>0&&this._coreService.triggerDataEvent(a,!0)}},0)}else{this._isSendingComposition=!1;const c=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(c,!0)}}_handleAnyTextareaChanges(){const S=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const c=this._textarea.value,a=c.replace(S,"");this._dataAlreadySent=a,c.length>S.length?this._coreService.triggerDataEvent(a,!0):c.length<S.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):c.length===S.length&&c!==S&&this._coreService.triggerDataEvent(c,!0)}},0)}updateCompositionElements(S){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const c=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),a=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=c*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=a+"px",this._compositionView.style.lineHeight=a+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const p=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(p.width,1)+"px",this._textarea.style.height=Math.max(p.height,1)+"px",this._textarea.style.lineHeight=p.height+"px"}S||setTimeout(()=>this.updateCompositionElements(!0),0)}}};s.CompositionHelper=w=f([m(2,_.IBufferService),m(3,_.IOptionsService),m(4,_.ICoreService),m(5,d.IRenderService)],w)},9806:(v,s)=>{function u(f,m,d){const _=d.getBoundingClientRect(),C=f.getComputedStyle(d),w=parseInt(C.getPropertyValue("padding-left")),S=parseInt(C.getPropertyValue("padding-top"));return[m.clientX-_.left-w,m.clientY-_.top-S]}Object.defineProperty(s,"__esModule",{value:!0}),s.getCoords=s.getCoordsRelativeToElement=void 0,s.getCoordsRelativeToElement=u,s.getCoords=function(f,m,d,_,C,w,S,c,a){if(!w)return;const n=u(f,m,d);return n?(n[0]=Math.ceil((n[0]+(a?S/2:0))/S),n[1]=Math.ceil(n[1]/c),n[0]=Math.min(Math.max(n[0],1),_+(a?1:0)),n[1]=Math.min(Math.max(n[1],1),C),n):void 0}},9504:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.moveToCellSequence=void 0;const f=u(2584);function m(c,a,n,l){const p=c-d(c,n),y=a-d(a,n),x=Math.abs(p-y)-function(k,g,b){let D=0;const M=k-d(k,b),P=g-d(g,b);for(let B=0;B<Math.abs(M-P);B++){const N=_(k,g)==="A"?-1:1,F=b.buffer.lines.get(M+N*B);F!=null&&F.isWrapped&&D++}return D}(c,a,n);return S(x,w(_(c,a),l))}function d(c,a){let n=0,l=a.buffer.lines.get(c),p=l==null?void 0:l.isWrapped;for(;p&&c>=0&&c<a.rows;)n++,l=a.buffer.lines.get(--c),p=l==null?void 0:l.isWrapped;return n}function _(c,a){return c>a?"A":"B"}function C(c,a,n,l,p,y){let x=c,k=a,g="";for(;x!==n||k!==l;)x+=p?1:-1,p&&x>y.cols-1?(g+=y.buffer.translateBufferLineToString(k,!1,c,x),x=0,c=0,k++):!p&&x<0&&(g+=y.buffer.translateBufferLineToString(k,!1,0,c+1),x=y.cols-1,c=x,k--);return g+y.buffer.translateBufferLineToString(k,!1,c,x)}function w(c,a){const n=a?"O":"[";return f.C0.ESC+n+c}function S(c,a){c=Math.floor(c);let n="";for(let l=0;l<c;l++)n+=a;return n}s.moveToCellSequence=function(c,a,n,l){const p=n.buffer.x,y=n.buffer.y;if(!n.buffer.hasScrollback)return function(g,b,D,M,P,B){return m(b,M,P,B).length===0?"":S(C(g,b,g,b-d(b,P),!1,P).length,w("D",B))}(p,y,0,a,n,l)+m(y,a,n,l)+function(g,b,D,M,P,B){let N;N=m(b,M,P,B).length>0?M-d(M,P):b;const F=M,$=function(W,E,L,T,O,H){let V;return V=m(L,T,O,H).length>0?T-d(T,O):E,W<L&&V<=T||W>=L&&V<T?"C":"D"}(g,b,D,M,P,B);return S(C(g,N,D,F,$==="C",P).length,w($,B))}(p,y,c,a,n,l);let x;if(y===a)return x=p>c?"D":"C",S(Math.abs(p-c),w(x,l));x=y>a?"D":"C";const k=Math.abs(y-a);return S(function(g,b){return b.cols-g}(y>a?c:p,n)+(k-1)*n.cols+1+((y>a?p:c)-1),w(x,l))}},1296:function(v,s,u){var f=this&&this.__decorate||function(P,B,N,F){var $,W=arguments.length,E=W<3?B:F===null?F=Object.getOwnPropertyDescriptor(B,N):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(P,B,N,F);else for(var L=P.length-1;L>=0;L--)($=P[L])&&(E=(W<3?$(E):W>3?$(B,N,E):$(B,N))||E);return W>3&&E&&Object.defineProperty(B,N,E),E},m=this&&this.__param||function(P,B){return function(N,F){B(N,F,P)}};Object.defineProperty(s,"__esModule",{value:!0}),s.DomRenderer=void 0;const d=u(3787),_=u(2550),C=u(2223),w=u(6171),S=u(4725),c=u(8055),a=u(8460),n=u(844),l=u(2585),p="xterm-dom-renderer-owner-",y="xterm-rows",x="xterm-fg-",k="xterm-bg-",g="xterm-focus",b="xterm-selection";let D=1,M=s.DomRenderer=class extends n.Disposable{constructor(P,B,N,F,$,W,E,L,T,O){super(),this._element=P,this._screenElement=B,this._viewportElement=N,this._linkifier2=F,this._charSizeService=W,this._optionsService=E,this._bufferService=L,this._coreBrowserService=T,this._themeService=O,this._terminalClass=D++,this._rowElements=[],this.onRequestRedraw=this.register(new a.EventEmitter).event,this._rowContainer=document.createElement("div"),this._rowContainer.classList.add(y),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=document.createElement("div"),this._selectionContainer.classList.add(b),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,w.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(H=>this._injectCss(H))),this._injectCss(this._themeService.colors),this._rowFactory=$.createInstance(d.DomRendererRowFactory,document),this._element.classList.add(p+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(H=>this._handleLinkHover(H))),this.register(this._linkifier2.onHideLinkUnderline(H=>this._handleLinkLeave(H))),this.register((0,n.toDisposable)(()=>{this._element.classList.remove(p+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new _.WidthCache(document),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const P=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*P,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*P),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/P),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/P),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(const N of this._rowElements)N.style.width=`${this.dimensions.css.canvas.width}px`,N.style.height=`${this.dimensions.css.cell.height}px`,N.style.lineHeight=`${this.dimensions.css.cell.height}px`,N.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const B=`${this._terminalSelector} .${y} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=B,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(P){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let B=`${this._terminalSelector} .${y} { color: ${P.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;B+=`${this._terminalSelector} .${y} .xterm-dim { color: ${c.color.multiplyOpacity(P.foreground,.5).css};}`,B+=`${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;}`,B+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",B+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${P.cursor.css}; color: ${P.cursorAccent.css}; } 50% { background-color: inherit; color: ${P.cursor.css}; }}`,B+=`${this._terminalSelector} .${y}.${g} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${y}.${g} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block { background-color: ${P.cursor.css}; color: ${P.cursorAccent.css};}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${P.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${P.cursor.css} inset;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${P.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,B+=`${this._terminalSelector} .${b} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${b} div { position: absolute; background-color: ${P.selectionBackgroundOpaque.css};}${this._terminalSelector} .${b} div { position: absolute; background-color: ${P.selectionInactiveBackgroundOpaque.css};}`;for(const[N,F]of P.ansi.entries())B+=`${this._terminalSelector} .${x}${N} { color: ${F.css}; }${this._terminalSelector} .${x}${N}.xterm-dim { color: ${c.color.multiplyOpacity(F,.5).css}; }${this._terminalSelector} .${k}${N} { background-color: ${F.css}; }`;B+=`${this._terminalSelector} .${x}${C.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(P.background).css}; }${this._terminalSelector} .${x}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(P.background),.5).css}; }${this._terminalSelector} .${k}${C.INVERTED_DEFAULT_COLOR} { background-color: ${P.foreground.css}; }`,this._themeStyleElement.textContent=B}_setDefaultSpacing(){const P=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${P}px`,this._rowFactory.defaultSpacing=P}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(P,B){for(let N=this._rowElements.length;N<=B;N++){const F=document.createElement("div");this._rowContainer.appendChild(F),this._rowElements.push(F)}for(;this._rowElements.length>B;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(P,B){this._refreshRowElements(P,B),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(g)}handleFocus(){this._rowContainer.classList.add(g),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(P,B,N){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(P,B,N),this.renderRows(0,this._bufferService.rows-1),!P||!B)return;const F=P[1]-this._bufferService.buffer.ydisp,$=B[1]-this._bufferService.buffer.ydisp,W=Math.max(F,0),E=Math.min($,this._bufferService.rows-1);if(W>=this._bufferService.rows||E<0)return;const L=document.createDocumentFragment();if(N){const T=P[0]>B[0];L.appendChild(this._createSelectionElement(W,T?B[0]:P[0],T?P[0]:B[0],E-W+1))}else{const T=F===W?P[0]:0,O=W===$?B[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(W,T,O));const H=E-W-1;if(L.appendChild(this._createSelectionElement(W+1,0,this._bufferService.cols,H)),W!==E){const V=$===E?B[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(E,0,V))}}this._selectionContainer.appendChild(L)}_createSelectionElement(P,B,N,F=1){const $=document.createElement("div");return $.style.height=F*this.dimensions.css.cell.height+"px",$.style.top=P*this.dimensions.css.cell.height+"px",$.style.left=B*this.dimensions.css.cell.width+"px",$.style.width=this.dimensions.css.cell.width*(N-B)+"px",$}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(const P of this._rowElements)P.replaceChildren()}renderRows(P,B){const N=this._bufferService.buffer,F=N.ybase+N.y,$=Math.min(N.x,this._bufferService.cols-1),W=this._optionsService.rawOptions.cursorBlink,E=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let T=P;T<=B;T++){const O=T+N.ydisp,H=this._rowElements[T],V=N.lines.get(O);if(!H||!V)break;H.replaceChildren(...this._rowFactory.createRow(V,O,O===F,E,L,$,W,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${p}${this._terminalClass}`}_handleLinkHover(P){this._setCellUnderline(P.x1,P.x2,P.y1,P.y2,P.cols,!0)}_handleLinkLeave(P){this._setCellUnderline(P.x1,P.x2,P.y1,P.y2,P.cols,!1)}_setCellUnderline(P,B,N,F,$,W){N<0&&(P=0),F<0&&(B=0);const E=this._bufferService.rows-1;N=Math.max(Math.min(N,E),0),F=Math.max(Math.min(F,E),0),$=Math.min($,this._bufferService.cols);const L=this._bufferService.buffer,T=L.ybase+L.y,O=Math.min(L.x,$-1),H=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,X=this._optionsService.rawOptions.cursorInactiveStyle;for(let Y=N;Y<=F;++Y){const oe=Y+L.ydisp,R=this._rowElements[Y],j=L.lines.get(oe);if(!R||!j)break;R.replaceChildren(...this._rowFactory.createRow(j,oe,oe===T,V,X,O,H,this.dimensions.css.cell.width,this._widthCache,W?Y===N?P:0:-1,W?(Y===F?B:$)-1:-1))}}};s.DomRenderer=M=f([m(4,l.IInstantiationService),m(5,S.ICharSizeService),m(6,l.IOptionsService),m(7,l.IBufferService),m(8,S.ICoreBrowserService),m(9,S.IThemeService)],M)},3787:function(v,s,u){var f=this&&this.__decorate||function(x,k,g,b){var D,M=arguments.length,P=M<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(x,k,g,b);else for(var B=x.length-1;B>=0;B--)(D=x[B])&&(P=(M<3?D(P):M>3?D(k,g,P):D(k,g))||P);return M>3&&P&&Object.defineProperty(k,g,P),P},m=this&&this.__param||function(x,k){return function(g,b){k(g,b,x)}};Object.defineProperty(s,"__esModule",{value:!0}),s.DomRendererRowFactory=void 0;const d=u(2223),_=u(643),C=u(511),w=u(2585),S=u(8055),c=u(4725),a=u(4269),n=u(6171),l=u(3734);let p=s.DomRendererRowFactory=class{constructor(x,k,g,b,D,M,P){this._document=x,this._characterJoinerService=k,this._optionsService=g,this._coreBrowserService=b,this._coreService=D,this._decorationService=M,this._themeService=P,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(x,k,g){this._selectionStart=x,this._selectionEnd=k,this._columnSelectMode=g}createRow(x,k,g,b,D,M,P,B,N,F,$){const W=[],E=this._characterJoinerService.getJoinedCharacters(k),L=this._themeService.colors;let T,O=x.getNoBgTrimmedLength();g&&O<M+1&&(O=M+1);let H=0,V="",X=0,Y=0,oe=0,R=!1,j=0,U=!1,z=0;const ee=[],Q=F!==-1&&$!==-1;for(let le=0;le<O;le++){x.loadCell(le,this._workCell);let Re=this._workCell.getWidth();if(Re===0)continue;let Ue=!1,qr=le,te=this._workCell;if(E.length>0&&le===E[0][0]){Ue=!0;const pe=E.shift();te=new a.JoinedCellData(this._workCell,x.translateToString(!0,pe[0],pe[1]),pe[1]-pe[0]),qr=pe[1]-1,Re=te.getWidth()}const Ii=this._isCellInSelection(le,k),ao=g&&le===M,lo=Q&&le>=F&&le<=$;let co=!1;this._decorationService.forEachDecorationAtCell(le,k,void 0,pe=>{co=!0});let Fs=te.getChars()||_.WHITESPACE_CELL_CHAR;if(Fs===" "&&(te.isUnderline()||te.isOverline())&&(Fs=" "),z=Re*B-N.get(Fs,te.isBold(),te.isItalic()),T){if(H&&(Ii&&U||!Ii&&!U&&te.bg===X)&&(Ii&&U&&L.selectionForeground||te.fg===Y)&&te.extended.ext===oe&&lo===R&&z===j&&!ao&&!Ue&&!co){V+=Fs,H++;continue}H&&(T.textContent=V),T=this._document.createElement("span"),H=0,V=""}else T=this._document.createElement("span");if(X=te.bg,Y=te.fg,oe=te.extended.ext,R=lo,j=z,U=Ii,Ue&&M>=le&&M<=qr&&(M=le),!this._coreService.isCursorHidden&&ao){if(ee.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&ee.push("xterm-cursor-blink"),ee.push(b==="bar"?"xterm-cursor-bar":b==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(D)switch(D){case"outline":ee.push("xterm-cursor-outline");break;case"block":ee.push("xterm-cursor-block");break;case"bar":ee.push("xterm-cursor-bar");break;case"underline":ee.push("xterm-cursor-underline")}}if(te.isBold()&&ee.push("xterm-bold"),te.isItalic()&&ee.push("xterm-italic"),te.isDim()&&ee.push("xterm-dim"),V=te.isInvisible()?_.WHITESPACE_CELL_CHAR:te.getChars()||_.WHITESPACE_CELL_CHAR,te.isUnderline()&&(ee.push(`xterm-underline-${te.extended.underlineStyle}`),V===" "&&(V=" "),!te.isUnderlineColorDefault()))if(te.isUnderlineColorRGB())T.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(te.getUnderlineColor()).join(",")})`;else{let pe=te.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&te.isBold()&&pe<8&&(pe+=8),T.style.textDecorationColor=L.ansi[pe].css}te.isOverline()&&(ee.push("xterm-overline"),V===" "&&(V=" ")),te.isStrikethrough()&&ee.push("xterm-strikethrough"),lo&&(T.style.textDecoration="underline");let st=te.getFgColor(),ji=te.getFgColorMode(),St=te.getBgColor(),Ni=te.getBgColorMode();const uo=!!te.isInverse();if(uo){const pe=st;st=St,St=pe;const sf=ji;ji=Ni,Ni=sf}let $t,ho,Kt,Fi=!1;switch(this._decorationService.forEachDecorationAtCell(le,k,void 0,pe=>{pe.options.layer!=="top"&&Fi||(pe.backgroundColorRGB&&(Ni=50331648,St=pe.backgroundColorRGB.rgba>>8&16777215,$t=pe.backgroundColorRGB),pe.foregroundColorRGB&&(ji=50331648,st=pe.foregroundColorRGB.rgba>>8&16777215,ho=pe.foregroundColorRGB),Fi=pe.options.layer==="top")}),!Fi&&Ii&&($t=this._coreBrowserService.isFocused?L.selectionBackgroundOpaque:L.selectionInactiveBackgroundOpaque,St=$t.rgba>>8&16777215,Ni=50331648,Fi=!0,L.selectionForeground&&(ji=50331648,st=L.selectionForeground.rgba>>8&16777215,ho=L.selectionForeground)),Fi&&ee.push("xterm-decoration-top"),Ni){case 16777216:case 33554432:Kt=L.ansi[St],ee.push(`xterm-bg-${St}`);break;case 50331648:Kt=S.rgba.toColor(St>>16,St>>8&255,255&St),this._addStyle(T,`background-color:#${y((St>>>0).toString(16),"0",6)}`);break;default:uo?(Kt=L.foreground,ee.push(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)):Kt=L.background}switch($t||te.isDim()&&($t=S.color.multiplyOpacity(Kt,.5)),ji){case 16777216:case 33554432:te.isBold()&&st<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(st+=8),this._applyMinimumContrast(T,Kt,L.ansi[st],te,$t,void 0)||ee.push(`xterm-fg-${st}`);break;case 50331648:const pe=S.rgba.toColor(st>>16&255,st>>8&255,255&st);this._applyMinimumContrast(T,Kt,pe,te,$t,ho)||this._addStyle(T,`color:#${y(st.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(T,Kt,L.foreground,te,$t,void 0)||uo&&ee.push(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`)}ee.length&&(T.className=ee.join(" "),ee.length=0),ao||Ue||co?T.textContent=V:H++,z!==this.defaultSpacing&&(T.style.letterSpacing=`${z}px`),W.push(T),le=qr}return T&&H&&(T.textContent=V),W}_applyMinimumContrast(x,k,g,b,D,M){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,n.excludeFromContrastRatioDemands)(b.getCode()))return!1;const P=this._getContrastCache(b);let B;if(D||M||(B=P.getColor(k.rgba,g.rgba)),B===void 0){const N=this._optionsService.rawOptions.minimumContrastRatio/(b.isDim()?2:1);B=S.color.ensureContrastRatio(D||k,M||g,N),P.setColor((D||k).rgba,(M||g).rgba,B??null)}return!!B&&(this._addStyle(x,`color:${B.css}`),!0)}_getContrastCache(x){return x.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(x,k){x.setAttribute("style",`${x.getAttribute("style")||""}${k};`)}_isCellInSelection(x,k){const g=this._selectionStart,b=this._selectionEnd;return!(!g||!b)&&(this._columnSelectMode?g[0]<=b[0]?x>=g[0]&&k>=g[1]&&x<b[0]&&k<=b[1]:x<g[0]&&k>=g[1]&&x>=b[0]&&k<=b[1]:k>g[1]&&k<b[1]||g[1]===b[1]&&k===g[1]&&x>=g[0]&&x<b[0]||g[1]<b[1]&&k===b[1]&&x<b[0]||g[1]<b[1]&&k===g[1]&&x>=g[0])}};function y(x,k,g){for(;x.length<g;)x=k+x;return x}s.DomRendererRowFactory=p=f([m(1,c.ICharacterJoinerService),m(2,w.IOptionsService),m(3,c.ICoreBrowserService),m(4,w.ICoreService),m(5,w.IDecorationService),m(6,c.IThemeService)],p)},2550:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.WidthCache=void 0,s.WidthCache=class{constructor(u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.style.position="absolute",this._container.style.top="-50000px",this._container.style.width="50000px",this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const f=u.createElement("span"),m=u.createElement("span");m.style.fontWeight="bold";const d=u.createElement("span");d.style.fontStyle="italic";const _=u.createElement("span");_.style.fontWeight="bold",_.style.fontStyle="italic",this._measureElements=[f,m,d,_],this._container.appendChild(f),this._container.appendChild(m),this._container.appendChild(d),this._container.appendChild(_),u.body.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(u,f,m,d){u===this._font&&f===this._fontSize&&m===this._weight&&d===this._weightBold||(this._font=u,this._fontSize=f,this._weight=m,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(u,f,m){let d=0;if(!f&&!m&&u.length===1&&(d=u.charCodeAt(0))<256)return this._flat[d]!==-9999?this._flat[d]:this._flat[d]=this._measure(u,0);let _=u;f&&(_+="B"),m&&(_+="I");let C=this._holey.get(_);if(C===void 0){let w=0;f&&(w|=1),m&&(w|=2),C=this._measure(u,w),this._holey.set(_,C)}return C}_measure(u,f){const m=this._measureElements[f];return m.textContent=u.repeat(32),m.offsetWidth/32}}},2223:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.TEXT_BASELINE=s.DIM_OPACITY=s.INVERTED_DEFAULT_COLOR=void 0;const f=u(6114);s.INVERTED_DEFAULT_COLOR=257,s.DIM_OPACITY=.5,s.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(v,s)=>{function u(f){return 57508<=f&&f<=57558}Object.defineProperty(s,"__esModule",{value:!0}),s.createRenderDimensions=s.excludeFromContrastRatioDemands=s.isRestrictedPowerlineGlyph=s.isPowerlineGlyph=s.throwIfFalsy=void 0,s.throwIfFalsy=function(f){if(!f)throw new Error("value must not be falsy");return f},s.isPowerlineGlyph=u,s.isRestrictedPowerlineGlyph=function(f){return 57520<=f&&f<=57527},s.excludeFromContrastRatioDemands=function(f){return u(f)||function(m){return 9472<=m&&m<=9631}(f)},s.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}}},456:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.SelectionModel=void 0,s.SelectionModel=class{constructor(u){this._bufferService=u,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.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()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(v,s,u){var f=this&&this.__decorate||function(c,a,n,l){var p,y=arguments.length,x=y<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,a,n,l);else for(var k=c.length-1;k>=0;k--)(p=c[k])&&(x=(y<3?p(x):y>3?p(a,n,x):p(a,n))||x);return y>3&&x&&Object.defineProperty(a,n,x),x},m=this&&this.__param||function(c,a){return function(n,l){a(n,l,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CharSizeService=void 0;const d=u(2585),_=u(8460),C=u(844);let w=s.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(c,a,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this.register(new _.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new S(c,a,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const c=this._measureStrategy.measure();c.width===this.width&&c.height===this.height||(this.width=c.width,this.height=c.height,this._onCharSizeChange.fire())}};s.CharSizeService=w=f([m(2,d.IOptionsService)],w);class S{constructor(a,n,l){this._document=a,this._parentElement=n,this._optionsService=l,this._result={width:0,height:0},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(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const a={height:Number(this._measureElement.offsetHeight),width:Number(this._measureElement.offsetWidth)};return a.width!==0&&a.height!==0&&(this._result.width=a.width/32,this._result.height=Math.ceil(a.height)),this._result}}},4269:function(v,s,u){var f=this&&this.__decorate||function(a,n,l,p){var y,x=arguments.length,k=x<3?n:p===null?p=Object.getOwnPropertyDescriptor(n,l):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(a,n,l,p);else for(var g=a.length-1;g>=0;g--)(y=a[g])&&(k=(x<3?y(k):x>3?y(n,l,k):y(n,l))||k);return x>3&&k&&Object.defineProperty(n,l,k),k},m=this&&this.__param||function(a,n){return function(l,p){n(l,p,a)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CharacterJoinerService=s.JoinedCellData=void 0;const d=u(3734),_=u(643),C=u(511),w=u(2585);class S extends d.AttributeData{constructor(n,l,p){super(),this.content=0,this.combinedData="",this.fg=n.fg,this.bg=n.bg,this.combinedData=l,this._width=p}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(n){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}s.JoinedCellData=S;let c=s.CharacterJoinerService=class Xd{constructor(n){this._bufferService=n,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(n){const l={id:this._nextCharacterJoinerId++,handler:n};return this._characterJoiners.push(l),l.id}deregister(n){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===n)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(n){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(n);if(!l||l.length===0)return[];const p=[],y=l.translateToString(!0);let x=0,k=0,g=0,b=l.getFg(0),D=l.getBg(0);for(let M=0;M<l.getTrimmedLength();M++)if(l.loadCell(M,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==b||this._workCell.bg!==D){if(M-x>1){const P=this._getJoinedRanges(y,g,k,l,x);for(let B=0;B<P.length;B++)p.push(P[B])}x=M,g=k,b=this._workCell.fg,D=this._workCell.bg}k+=this._workCell.getChars().length||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-x>1){const M=this._getJoinedRanges(y,g,k,l,x);for(let P=0;P<M.length;P++)p.push(M[P])}return p}_getJoinedRanges(n,l,p,y,x){const k=n.substring(l,p);let g=[];try{g=this._characterJoiners[0].handler(k)}catch(b){console.error(b)}for(let b=1;b<this._characterJoiners.length;b++)try{const D=this._characterJoiners[b].handler(k);for(let M=0;M<D.length;M++)Xd._mergeRanges(g,D[M])}catch(D){console.error(D)}return this._stringRangesToCellRanges(g,y,x),g}_stringRangesToCellRanges(n,l,p){let y=0,x=!1,k=0,g=n[y];if(g){for(let b=p;b<this._bufferService.cols;b++){const D=l.getWidth(b),M=l.getString(b).length||_.WHITESPACE_CELL_CHAR.length;if(D!==0){if(!x&&g[0]<=k&&(g[0]=b,x=!0),g[1]<=k){if(g[1]=b,g=n[++y],!g)break;g[0]<=k?(g[0]=b,x=!0):x=!1}k+=M}}g&&(g[1]=this._bufferService.cols)}}static _mergeRanges(n,l){let p=!1;for(let y=0;y<n.length;y++){const x=n[y];if(p){if(l[1]<=x[0])return n[y-1][1]=l[1],n;if(l[1]<=x[1])return n[y-1][1]=Math.max(l[1],x[1]),n.splice(y,1),n;n.splice(y,1),y--}else{if(l[1]<=x[0])return n.splice(y,0,l),n;if(l[1]<=x[1])return x[0]=Math.min(l[0],x[0]),n;l[0]<x[1]&&(x[0]=Math.min(l[0],x[0]),p=!0)}}return p?n[n.length-1][1]=l[1]:n.push(l),n}};s.CharacterJoinerService=c=f([m(0,w.IBufferService)],c)},5114:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CoreBrowserService=void 0,s.CoreBrowserService=class{constructor(u,f){this._textarea=u,this.window=f,this._isFocused=!1,this._cachedIsFocused=void 0,this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}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}}},8934:function(v,s,u){var f=this&&this.__decorate||function(w,S,c,a){var n,l=arguments.length,p=l<3?S:a===null?a=Object.getOwnPropertyDescriptor(S,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(w,S,c,a);else for(var y=w.length-1;y>=0;y--)(n=w[y])&&(p=(l<3?n(p):l>3?n(S,c,p):n(S,c))||p);return l>3&&p&&Object.defineProperty(S,c,p),p},m=this&&this.__param||function(w,S){return function(c,a){S(c,a,w)}};Object.defineProperty(s,"__esModule",{value:!0}),s.MouseService=void 0;const d=u(4725),_=u(9806);let C=s.MouseService=class{constructor(w,S){this._renderService=w,this._charSizeService=S}getCoords(w,S,c,a,n){return(0,_.getCoords)(window,w,S,c,a,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,n)}getMouseReportCoords(w,S){const c=(0,_.getCoordsRelativeToElement)(window,w,S);if(this._charSizeService.hasValidSize)return c[0]=Math.min(Math.max(c[0],0),this._renderService.dimensions.css.canvas.width-1),c[1]=Math.min(Math.max(c[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(c[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(c[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(c[0]),y:Math.floor(c[1])}}};s.MouseService=C=f([m(0,d.IRenderService),m(1,d.ICharSizeService)],C)},3230:function(v,s,u){var f=this&&this.__decorate||function(p,y,x,k){var g,b=arguments.length,D=b<3?y:k===null?k=Object.getOwnPropertyDescriptor(y,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(p,y,x,k);else for(var M=p.length-1;M>=0;M--)(g=p[M])&&(D=(b<3?g(D):b>3?g(y,x,D):g(y,x))||D);return b>3&&D&&Object.defineProperty(y,x,D),D},m=this&&this.__param||function(p,y){return function(x,k){y(x,k,p)}};Object.defineProperty(s,"__esModule",{value:!0}),s.RenderService=void 0;const d=u(3656),_=u(6193),C=u(5596),w=u(4725),S=u(8460),c=u(844),a=u(7226),n=u(2585);let l=s.RenderService=class extends c.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(p,y,x,k,g,b,D,M){if(super(),this._rowCount=p,this._charSizeService=k,this._renderer=this.register(new c.MutableDisposable),this._pausedResizeTask=new a.DebouncedIdleTask,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 S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new _.RenderDebouncer(D.window,(P,B)=>this._renderRows(P,B)),this.register(this._renderDebouncer),this._screenDprMonitor=new C.ScreenDprMonitor(D.window),this._screenDprMonitor.setListener(()=>this.handleDevicePixelRatioChange()),this.register(this._screenDprMonitor),this.register(b.onResize(()=>this._fullRefresh())),this.register(b.buffers.onBufferActivate(()=>{var P;return(P=this._renderer.value)===null||P===void 0?void 0:P.clear()})),this.register(x.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(g.onDecorationRegistered(()=>this._fullRefresh())),this.register(g.onDecorationRemoved(()=>this._fullRefresh())),this.register(x.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],()=>{this.clear(),this.handleResize(b.cols,b.rows),this._fullRefresh()})),this.register(x.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(b.buffer.y,b.buffer.y,!0))),this.register((0,d.addDisposableDomListener)(D.window,"resize",()=>this.handleDevicePixelRatioChange())),this.register(M.onChangeColors(()=>this._fullRefresh())),"IntersectionObserver"in D.window){const P=new D.window.IntersectionObserver(B=>this._handleIntersectionChange(B[B.length-1]),{threshold:0});P.observe(y),this.register({dispose:()=>P.disconnect()})}}_handleIntersectionChange(p){this._isPaused=p.isIntersecting===void 0?p.intersectionRatio===0:!p.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(p,y,x=!1){this._isPaused?this._needsFullRefresh=!0:(x||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(p,y,this._rowCount))}_renderRows(p,y){this._renderer.value&&(p=Math.min(p,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(p,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:p,end:y}),this._onRender.fire({start:p,end:y}),this._isNextRenderRedrawOnly=!0)}resize(p,y){this._rowCount=y,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(p){this._renderer.value=p,this._renderer.value.onRequestRedraw(y=>this.refreshRows(y.start,y.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh()}addRefreshCallback(p){return this._renderDebouncer.addRefreshCallback(p)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var p,y;this._renderer.value&&((y=(p=this._renderer.value).clearTextureAtlas)===null||y===void 0||y.call(p),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(p,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value.handleResize(p,y)):this._renderer.value.handleResize(p,y),this._fullRefresh())}handleCharSizeChanged(){var p;(p=this._renderer.value)===null||p===void 0||p.handleCharSizeChanged()}handleBlur(){var p;(p=this._renderer.value)===null||p===void 0||p.handleBlur()}handleFocus(){var p;(p=this._renderer.value)===null||p===void 0||p.handleFocus()}handleSelectionChanged(p,y,x){var k;this._selectionState.start=p,this._selectionState.end=y,this._selectionState.columnSelectMode=x,(k=this._renderer.value)===null||k===void 0||k.handleSelectionChanged(p,y,x)}handleCursorMove(){var p;(p=this._renderer.value)===null||p===void 0||p.handleCursorMove()}clear(){var p;(p=this._renderer.value)===null||p===void 0||p.clear()}};s.RenderService=l=f([m(2,n.IOptionsService),m(3,w.ICharSizeService),m(4,n.IDecorationService),m(5,n.IBufferService),m(6,w.ICoreBrowserService),m(7,w.IThemeService)],l)},9312:function(v,s,u){var f=this&&this.__decorate||function(g,b,D,M){var P,B=arguments.length,N=B<3?b:M===null?M=Object.getOwnPropertyDescriptor(b,D):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(g,b,D,M);else for(var F=g.length-1;F>=0;F--)(P=g[F])&&(N=(B<3?P(N):B>3?P(b,D,N):P(b,D))||N);return B>3&&N&&Object.defineProperty(b,D,N),N},m=this&&this.__param||function(g,b){return function(D,M){b(D,M,g)}};Object.defineProperty(s,"__esModule",{value:!0}),s.SelectionService=void 0;const d=u(9806),_=u(9504),C=u(456),w=u(4725),S=u(8460),c=u(844),a=u(6114),n=u(4841),l=u(511),p=u(2585),y=" ",x=new RegExp(y,"g");let k=s.SelectionService=class extends c.Disposable{constructor(g,b,D,M,P,B,N,F,$){super(),this._element=g,this._screenElement=b,this._linkifier=D,this._bufferService=M,this._coreService=P,this._mouseService=B,this._optionsService=N,this._renderService=F,this._coreBrowserService=$,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new S.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new S.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new S.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=W=>this._handleMouseMove(W),this._mouseUpListener=W=>this._handleMouseUp(W),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(W=>this._handleTrim(W)),this.register(this._bufferService.buffers.onBufferActivate(W=>this._handleBufferActivate(W))),this.enable(),this._model=new C.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,c.toDisposable)(()=>{this._removeMouseDownListeners()}))}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(){const g=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;return!(!g||!b||g[0]===b[0]&&g[1]===b[1])}get selectionText(){const g=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;if(!g||!b)return"";const D=this._bufferService.buffer,M=[];if(this._activeSelectionMode===3){if(g[0]===b[0])return"";const P=g[0]<b[0]?g[0]:b[0],B=g[0]<b[0]?b[0]:g[0];for(let N=g[1];N<=b[1];N++){const F=D.translateBufferLineToString(N,!0,P,B);M.push(F)}}else{const P=g[1]===b[1]?b[0]:void 0;M.push(D.translateBufferLineToString(g[1],!0,g[0],P));for(let B=g[1]+1;B<=b[1]-1;B++){const N=D.lines.get(B),F=D.translateBufferLineToString(B,!0);N!=null&&N.isWrapped?M[M.length-1]+=F:M.push(F)}if(g[1]!==b[1]){const B=D.lines.get(b[1]),N=D.translateBufferLineToString(b[1],!0,0,b[0]);B&&B.isWrapped?M[M.length-1]+=N:M.push(N)}}return M.map(P=>P.replace(x," ")).join(a.isWindows?`\r
|
|
45
|
+
`:`
|
|
46
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(g){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),a.isLinux&&g&&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(g){const b=this._getMouseBufferCoords(g),D=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!!(D&&M&&b)&&this._areCoordsInSelection(b,D,M)}isCellInSelection(g,b){const D=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!D||!M)&&this._areCoordsInSelection([g,b],D,M)}_areCoordsInSelection(g,b,D){return g[1]>b[1]&&g[1]<D[1]||b[1]===D[1]&&g[1]===b[1]&&g[0]>=b[0]&&g[0]<D[0]||b[1]<D[1]&&g[1]===D[1]&&g[0]<D[0]||b[1]<D[1]&&g[1]===b[1]&&g[0]>=b[0]}_selectWordAtCursor(g,b){var D,M;const P=(M=(D=this._linkifier.currentLink)===null||D===void 0?void 0:D.link)===null||M===void 0?void 0:M.range;if(P)return this._model.selectionStart=[P.start.x-1,P.start.y-1],this._model.selectionStartLength=(0,n.getRangeLength)(P,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const B=this._getMouseBufferCoords(g);return!!B&&(this._selectWordAt(B,b),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(g,b){this._model.clearSelection(),g=Math.max(g,0),b=Math.min(b,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,g],this._model.selectionEnd=[this._bufferService.cols,b],this.refresh(),this._onSelectionChange.fire()}_handleTrim(g){this._model.handleTrim(g)&&this.refresh()}_getMouseBufferCoords(g){const b=this._mouseService.getCoords(g,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(b)return b[0]--,b[1]--,b[1]+=this._bufferService.buffer.ydisp,b}_getMouseEventScrollAmount(g){let b=(0,d.getCoordsRelativeToElement)(this._coreBrowserService.window,g,this._screenElement)[1];const D=this._renderService.dimensions.css.canvas.height;return b>=0&&b<=D?0:(b>D&&(b-=D),b=Math.min(Math.max(b,-50),50),b/=50,b/Math.abs(b)+Math.round(14*b))}shouldForceSelection(g){return a.isMac?g.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:g.shiftKey}handleMouseDown(g){if(this._mouseDownTimeStamp=g.timeStamp,(g.button!==2||!this.hasSelection)&&g.button===0){if(!this._enabled){if(!this.shouldForceSelection(g))return;g.stopPropagation()}g.preventDefault(),this._dragScrollAmount=0,this._enabled&&g.shiftKey?this._handleIncrementalClick(g):g.detail===1?this._handleSingleClick(g):g.detail===2?this._handleDoubleClick(g):g.detail===3&&this._handleTripleClick(g),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(),50)}_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(g){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(g))}_handleSingleClick(g){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(g)?3:0,this._model.selectionStart=this._getMouseBufferCoords(g),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const b=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);b&&b.length!==this._model.selectionStart[0]&&b.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(g){this._selectWordAtCursor(g,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(g){const b=this._getMouseBufferCoords(g);b&&(this._activeSelectionMode=2,this._selectLineAt(b[1]))}shouldColumnSelect(g){return g.altKey&&!(a.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(g){if(g.stopImmediatePropagation(),!this._model.selectionStart)return;const b=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(g),!this._model.selectionEnd)return void this.refresh(!0);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(g),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const D=this._bufferService.buffer;if(this._model.selectionEnd[1]<D.lines.length){const M=D.lines.get(this._model.selectionEnd[1]);M&&M.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}b&&b[0]===this._model.selectionEnd[0]&&b[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});const g=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(g.ydisp+this._bufferService.rows,g.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=g.ydisp),this.refresh()}}_handleMouseUp(g){const b=g.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&b<500&&g.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(g,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const M=(0,_.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(M,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const g=this._model.finalSelectionStart,b=this._model.finalSelectionEnd,D=!(!g||!b||g[0]===b[0]&&g[1]===b[1]);D?g&&b&&(this._oldSelectionStart&&this._oldSelectionEnd&&g[0]===this._oldSelectionStart[0]&&g[1]===this._oldSelectionStart[1]&&b[0]===this._oldSelectionEnd[0]&&b[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(g,b,D)):this._oldHasSelection&&this._fireOnSelectionChange(g,b,D)}_fireOnSelectionChange(g,b,D){this._oldSelectionStart=g,this._oldSelectionEnd=b,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(g){this.clearSelection(),this._trimListener.dispose(),this._trimListener=g.activeBuffer.lines.onTrim(b=>this._handleTrim(b))}_convertViewportColToCharacterIndex(g,b){let D=b;for(let M=0;b>=M;M++){const P=g.loadCell(M,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:P>1&&b!==M&&(D+=P-1)}return D}setSelection(g,b,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[g,b],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(g){this._isClickInSelection(g)||(this._selectWordAtCursor(g,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(g,b,D=!0,M=!0){if(g[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,B=P.lines.get(g[1]);if(!B)return;const N=P.translateBufferLineToString(g[1],!1);let F=this._convertViewportColToCharacterIndex(B,g[0]),$=F;const W=g[0]-F;let E=0,L=0,T=0,O=0;if(N.charAt(F)===" "){for(;F>0&&N.charAt(F-1)===" ";)F--;for(;$<N.length&&N.charAt($+1)===" ";)$++}else{let X=g[0],Y=g[0];B.getWidth(X)===0&&(E++,X--),B.getWidth(Y)===2&&(L++,Y++);const oe=B.getString(Y).length;for(oe>1&&(O+=oe-1,$+=oe-1);X>0&&F>0&&!this._isCharWordSeparator(B.loadCell(X-1,this._workCell));){B.loadCell(X-1,this._workCell);const R=this._workCell.getChars().length;this._workCell.getWidth()===0?(E++,X--):R>1&&(T+=R-1,F-=R-1),F--,X--}for(;Y<B.length&&$+1<N.length&&!this._isCharWordSeparator(B.loadCell(Y+1,this._workCell));){B.loadCell(Y+1,this._workCell);const R=this._workCell.getChars().length;this._workCell.getWidth()===2?(L++,Y++):R>1&&(O+=R-1,$+=R-1),$++,Y++}}$++;let H=F+W-E+T,V=Math.min(this._bufferService.cols,$-F+E+L-T-O);if(b||N.slice(F,$).trim()!==""){if(D&&H===0&&B.getCodePoint(0)!==32){const X=P.lines.get(g[1]-1);if(X&&B.isWrapped&&X.getCodePoint(this._bufferService.cols-1)!==32){const Y=this._getWordAt([this._bufferService.cols-1,g[1]-1],!1,!0,!1);if(Y){const oe=this._bufferService.cols-Y.start;H-=oe,V+=oe}}}if(M&&H+V===this._bufferService.cols&&B.getCodePoint(this._bufferService.cols-1)!==32){const X=P.lines.get(g[1]+1);if(X!=null&&X.isWrapped&&X.getCodePoint(0)!==32){const Y=this._getWordAt([0,g[1]+1],!1,!1,!0);Y&&(V+=Y.length)}}return{start:H,length:V}}}_selectWordAt(g,b){const D=this._getWordAt(g,b);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,g[1]--;this._model.selectionStart=[D.start,g[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(g){const b=this._getWordAt(g,!0);if(b){let D=g[1];for(;b.start<0;)b.start+=this._bufferService.cols,D--;if(!this._model.areSelectionValuesReversed())for(;b.start+b.length>this._bufferService.cols;)b.length-=this._bufferService.cols,D++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?b.start:b.start+b.length,D]}}_isCharWordSeparator(g){return g.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(g.getChars())>=0}_selectLineAt(g){const b=this._bufferService.buffer.getWrappedRangeForLine(g),D={start:{x:0,y:b.first},end:{x:this._bufferService.cols-1,y:b.last}};this._model.selectionStart=[0,b.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,n.getRangeLength)(D,this._bufferService.cols)}};s.SelectionService=k=f([m(3,p.IBufferService),m(4,p.ICoreService),m(5,w.IMouseService),m(6,p.IOptionsService),m(7,w.IRenderService),m(8,w.ICoreBrowserService)],k)},4725:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.IThemeService=s.ICharacterJoinerService=s.ISelectionService=s.IRenderService=s.IMouseService=s.ICoreBrowserService=s.ICharSizeService=void 0;const f=u(8343);s.ICharSizeService=(0,f.createDecorator)("CharSizeService"),s.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),s.IMouseService=(0,f.createDecorator)("MouseService"),s.IRenderService=(0,f.createDecorator)("RenderService"),s.ISelectionService=(0,f.createDecorator)("SelectionService"),s.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),s.IThemeService=(0,f.createDecorator)("ThemeService")},6731:function(v,s,u){var f=this&&this.__decorate||function(k,g,b,D){var M,P=arguments.length,B=P<3?g:D===null?D=Object.getOwnPropertyDescriptor(g,b):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(k,g,b,D);else for(var N=k.length-1;N>=0;N--)(M=k[N])&&(B=(P<3?M(B):P>3?M(g,b,B):M(g,b))||B);return P>3&&B&&Object.defineProperty(g,b,B),B},m=this&&this.__param||function(k,g){return function(b,D){g(b,D,k)}};Object.defineProperty(s,"__esModule",{value:!0}),s.ThemeService=s.DEFAULT_ANSI_COLORS=void 0;const d=u(7239),_=u(8055),C=u(8460),w=u(844),S=u(2585),c=_.css.toColor("#ffffff"),a=_.css.toColor("#000000"),n=_.css.toColor("#ffffff"),l=_.css.toColor("#000000"),p={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};s.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const k=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.css.toColor("#eeeeec")],g=[0,95,135,175,215,255];for(let b=0;b<216;b++){const D=g[b/36%6|0],M=g[b/6%6|0],P=g[b%6];k.push({css:_.channels.toCss(D,M,P),rgba:_.channels.toRgba(D,M,P)})}for(let b=0;b<24;b++){const D=8+10*b;k.push({css:_.channels.toCss(D,D,D),rgba:_.channels.toRgba(D,D,D)})}return k})());let y=s.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(k){super(),this._optionsService=k,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new C.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:c,background:a,cursor:n,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:p,selectionBackgroundOpaque:_.color.blend(a,p),selectionInactiveBackgroundTransparent:p,selectionInactiveBackgroundOpaque:_.color.blend(a,p),ansi:s.DEFAULT_ANSI_COLORS.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)))}_setTheme(k={}){const g=this._colors;if(g.foreground=x(k.foreground,c),g.background=x(k.background,a),g.cursor=x(k.cursor,n),g.cursorAccent=x(k.cursorAccent,l),g.selectionBackgroundTransparent=x(k.selectionBackground,p),g.selectionBackgroundOpaque=_.color.blend(g.background,g.selectionBackgroundTransparent),g.selectionInactiveBackgroundTransparent=x(k.selectionInactiveBackground,g.selectionBackgroundTransparent),g.selectionInactiveBackgroundOpaque=_.color.blend(g.background,g.selectionInactiveBackgroundTransparent),g.selectionForeground=k.selectionForeground?x(k.selectionForeground,_.NULL_COLOR):void 0,g.selectionForeground===_.NULL_COLOR&&(g.selectionForeground=void 0),_.color.isOpaque(g.selectionBackgroundTransparent)&&(g.selectionBackgroundTransparent=_.color.opacity(g.selectionBackgroundTransparent,.3)),_.color.isOpaque(g.selectionInactiveBackgroundTransparent)&&(g.selectionInactiveBackgroundTransparent=_.color.opacity(g.selectionInactiveBackgroundTransparent,.3)),g.ansi=s.DEFAULT_ANSI_COLORS.slice(),g.ansi[0]=x(k.black,s.DEFAULT_ANSI_COLORS[0]),g.ansi[1]=x(k.red,s.DEFAULT_ANSI_COLORS[1]),g.ansi[2]=x(k.green,s.DEFAULT_ANSI_COLORS[2]),g.ansi[3]=x(k.yellow,s.DEFAULT_ANSI_COLORS[3]),g.ansi[4]=x(k.blue,s.DEFAULT_ANSI_COLORS[4]),g.ansi[5]=x(k.magenta,s.DEFAULT_ANSI_COLORS[5]),g.ansi[6]=x(k.cyan,s.DEFAULT_ANSI_COLORS[6]),g.ansi[7]=x(k.white,s.DEFAULT_ANSI_COLORS[7]),g.ansi[8]=x(k.brightBlack,s.DEFAULT_ANSI_COLORS[8]),g.ansi[9]=x(k.brightRed,s.DEFAULT_ANSI_COLORS[9]),g.ansi[10]=x(k.brightGreen,s.DEFAULT_ANSI_COLORS[10]),g.ansi[11]=x(k.brightYellow,s.DEFAULT_ANSI_COLORS[11]),g.ansi[12]=x(k.brightBlue,s.DEFAULT_ANSI_COLORS[12]),g.ansi[13]=x(k.brightMagenta,s.DEFAULT_ANSI_COLORS[13]),g.ansi[14]=x(k.brightCyan,s.DEFAULT_ANSI_COLORS[14]),g.ansi[15]=x(k.brightWhite,s.DEFAULT_ANSI_COLORS[15]),k.extendedAnsi){const b=Math.min(g.ansi.length-16,k.extendedAnsi.length);for(let D=0;D<b;D++)g.ansi[D+16]=x(k.extendedAnsi[D],s.DEFAULT_ANSI_COLORS[D+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(k){this._restoreColor(k),this._onChangeColors.fire(this.colors)}_restoreColor(k){if(k!==void 0)switch(k){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[k]=this._restoreColors.ansi[k]}else for(let g=0;g<this._restoreColors.ansi.length;++g)this._colors.ansi[g]=this._restoreColors.ansi[g]}modifyColors(k){k(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()}}};function x(k,g){if(k!==void 0)try{return _.css.toColor(k)}catch{}return g}s.ThemeService=y=f([m(0,S.IOptionsService)],y)},6349:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CircularList=void 0;const f=u(8460),m=u(844);class d extends m.Disposable{constructor(C){super(),this._maxLength=C,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(C){if(this._maxLength===C)return;const w=new Array(C);for(let S=0;S<Math.min(C,this.length);S++)w[S]=this._array[this._getCyclicIndex(S)];this._array=w,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let w=this._length;w<C;w++)this._array[w]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,w){this._array[this._getCyclicIndex(C)]=w}push(C){this._array[this._getCyclicIndex(this._length)]=C,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(C,w,...S){if(w){for(let c=C;c<this._length-w;c++)this._array[this._getCyclicIndex(c)]=this._array[this._getCyclicIndex(c+w)];this._length-=w,this.onDeleteEmitter.fire({index:C,amount:w})}for(let c=this._length-1;c>=C;c--)this._array[this._getCyclicIndex(c+S.length)]=this._array[this._getCyclicIndex(c)];for(let c=0;c<S.length;c++)this._array[this._getCyclicIndex(C+c)]=S[c];if(S.length&&this.onInsertEmitter.fire({index:C,amount:S.length}),this._length+S.length>this._maxLength){const c=this._length+S.length-this._maxLength;this._startIndex+=c,this._length=this._maxLength,this.onTrimEmitter.fire(c)}else this._length+=S.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,w,S){if(!(w<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+S<0)throw new Error("Cannot shift elements in list beyond index 0");if(S>0){for(let a=w-1;a>=0;a--)this.set(C+a+S,this.get(C+a));const c=C+w+S-this._length;if(c>0)for(this._length+=c;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let c=0;c<w;c++)this.set(C+c+S,this.get(C+c))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}s.CircularList=d},1439:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.clone=void 0,s.clone=function u(f,m=5){if(typeof f!="object")return f;const d=Array.isArray(f)?[]:{};for(const _ in f)d[_]=m<=1?f[_]:f[_]&&u(f[_],m-1);return d}},8055:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.contrastRatio=s.toPaddedHex=s.rgba=s.rgb=s.css=s.color=s.channels=s.NULL_COLOR=void 0;const f=u(6114);let m=0,d=0,_=0,C=0;var w,S,c,a,n;function l(y){const x=y.toString(16);return x.length<2?"0"+x:x}function p(y,x){return y<x?(x+.05)/(y+.05):(y+.05)/(x+.05)}s.NULL_COLOR={css:"#00000000",rgba:0},function(y){y.toCss=function(x,k,g,b){return b!==void 0?`#${l(x)}${l(k)}${l(g)}${l(b)}`:`#${l(x)}${l(k)}${l(g)}`},y.toRgba=function(x,k,g,b=255){return(x<<24|k<<16|g<<8|b)>>>0}}(w||(s.channels=w={})),function(y){function x(k,g){return C=Math.round(255*g),[m,d,_]=n.toChannels(k.rgba),{css:w.toCss(m,d,_,C),rgba:w.toRgba(m,d,_,C)}}y.blend=function(k,g){if(C=(255&g.rgba)/255,C===1)return{css:g.css,rgba:g.rgba};const b=g.rgba>>24&255,D=g.rgba>>16&255,M=g.rgba>>8&255,P=k.rgba>>24&255,B=k.rgba>>16&255,N=k.rgba>>8&255;return m=P+Math.round((b-P)*C),d=B+Math.round((D-B)*C),_=N+Math.round((M-N)*C),{css:w.toCss(m,d,_),rgba:w.toRgba(m,d,_)}},y.isOpaque=function(k){return(255&k.rgba)==255},y.ensureContrastRatio=function(k,g,b){const D=n.ensureContrastRatio(k.rgba,g.rgba,b);if(D)return n.toColor(D>>24&255,D>>16&255,D>>8&255)},y.opaque=function(k){const g=(255|k.rgba)>>>0;return[m,d,_]=n.toChannels(g),{css:w.toCss(m,d,_),rgba:g}},y.opacity=x,y.multiplyOpacity=function(k,g){return C=255&k.rgba,x(k,C*g/255)},y.toColorRGB=function(k){return[k.rgba>>24&255,k.rgba>>16&255,k.rgba>>8&255]}}(S||(s.color=S={})),function(y){let x,k;if(!f.isNode){const g=document.createElement("canvas");g.width=1,g.height=1;const b=g.getContext("2d",{willReadFrequently:!0});b&&(x=b,x.globalCompositeOperation="copy",k=x.createLinearGradient(0,0,1,1))}y.toColor=function(g){if(g.match(/#[\da-f]{3,8}/i))switch(g.length){case 4:return m=parseInt(g.slice(1,2).repeat(2),16),d=parseInt(g.slice(2,3).repeat(2),16),_=parseInt(g.slice(3,4).repeat(2),16),n.toColor(m,d,_);case 5:return m=parseInt(g.slice(1,2).repeat(2),16),d=parseInt(g.slice(2,3).repeat(2),16),_=parseInt(g.slice(3,4).repeat(2),16),C=parseInt(g.slice(4,5).repeat(2),16),n.toColor(m,d,_,C);case 7:return{css:g,rgba:(parseInt(g.slice(1),16)<<8|255)>>>0};case 9:return{css:g,rgba:parseInt(g.slice(1),16)>>>0}}const b=g.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(b)return m=parseInt(b[1]),d=parseInt(b[2]),_=parseInt(b[3]),C=Math.round(255*(b[5]===void 0?1:parseFloat(b[5]))),n.toColor(m,d,_,C);if(!x||!k)throw new Error("css.toColor: Unsupported css format");if(x.fillStyle=k,x.fillStyle=g,typeof x.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(x.fillRect(0,0,1,1),[m,d,_,C]=x.getImageData(0,0,1,1).data,C!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:w.toRgba(m,d,_,C),css:g}}}(c||(s.css=c={})),function(y){function x(k,g,b){const D=k/255,M=g/255,P=b/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*(P<=.03928?P/12.92:Math.pow((P+.055)/1.055,2.4))}y.relativeLuminance=function(k){return x(k>>16&255,k>>8&255,255&k)},y.relativeLuminance2=x}(a||(s.rgb=a={})),function(y){function x(g,b,D){const M=g>>24&255,P=g>>16&255,B=g>>8&255;let N=b>>24&255,F=b>>16&255,$=b>>8&255,W=p(a.relativeLuminance2(N,F,$),a.relativeLuminance2(M,P,B));for(;W<D&&(N>0||F>0||$>0);)N-=Math.max(0,Math.ceil(.1*N)),F-=Math.max(0,Math.ceil(.1*F)),$-=Math.max(0,Math.ceil(.1*$)),W=p(a.relativeLuminance2(N,F,$),a.relativeLuminance2(M,P,B));return(N<<24|F<<16|$<<8|255)>>>0}function k(g,b,D){const M=g>>24&255,P=g>>16&255,B=g>>8&255;let N=b>>24&255,F=b>>16&255,$=b>>8&255,W=p(a.relativeLuminance2(N,F,$),a.relativeLuminance2(M,P,B));for(;W<D&&(N<255||F<255||$<255);)N=Math.min(255,N+Math.ceil(.1*(255-N))),F=Math.min(255,F+Math.ceil(.1*(255-F))),$=Math.min(255,$+Math.ceil(.1*(255-$))),W=p(a.relativeLuminance2(N,F,$),a.relativeLuminance2(M,P,B));return(N<<24|F<<16|$<<8|255)>>>0}y.ensureContrastRatio=function(g,b,D){const M=a.relativeLuminance(g>>8),P=a.relativeLuminance(b>>8);if(p(M,P)<D){if(P<M){const F=x(g,b,D),$=p(M,a.relativeLuminance(F>>8));if($<D){const W=k(g,b,D);return $>p(M,a.relativeLuminance(W>>8))?F:W}return F}const B=k(g,b,D),N=p(M,a.relativeLuminance(B>>8));if(N<D){const F=x(g,b,D);return N>p(M,a.relativeLuminance(F>>8))?B:F}return B}},y.reduceLuminance=x,y.increaseLuminance=k,y.toChannels=function(g){return[g>>24&255,g>>16&255,g>>8&255,255&g]},y.toColor=function(g,b,D,M){return{css:w.toCss(g,b,D,M),rgba:w.toRgba(g,b,D,M)}}}(n||(s.rgba=n={})),s.toPaddedHex=l,s.contrastRatio=p},8969:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CoreTerminal=void 0;const f=u(844),m=u(2585),d=u(4348),_=u(7866),C=u(744),w=u(7302),S=u(6975),c=u(8460),a=u(1753),n=u(1480),l=u(7994),p=u(9282),y=u(5435),x=u(5981),k=u(2660);let g=!1;class b extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new c.EventEmitter),this._onScroll.event(M=>{var P;(P=this._onScrollApi)===null||P===void 0||P.fire(M.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(M){for(const P in M)this.optionsService.options[P]=M[P]}constructor(M){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new c.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new c.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new c.EventEmitter),this._instantiationService=new d.InstantiationService,this.optionsService=this.register(new w.OptionsService(M)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(_.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(S.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(a.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(n.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(k.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new y.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,c.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,c.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,c.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,c.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(P=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(P=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new x.WriteBuffer((P,B)=>this._inputHandler.parse(P,B))),this.register((0,c.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(M,P){this._writeBuffer.write(M,P)}writeSync(M,P){this._logService.logLevel<=m.LogLevelEnum.WARN&&!g&&(this._logService.warn("writeSync is unreliable and will be removed soon."),g=!0),this._writeBuffer.writeSync(M,P)}resize(M,P){isNaN(M)||isNaN(P)||(M=Math.max(M,C.MINIMUM_COLS),P=Math.max(P,C.MINIMUM_ROWS),this._bufferService.resize(M,P))}scroll(M,P=!1){this._bufferService.scroll(M,P)}scrollLines(M,P,B){this._bufferService.scrollLines(M,P,B)}scrollPages(M){this.scrollLines(M*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(M){const P=M-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(M,P){return this._inputHandler.registerEscHandler(M,P)}registerDcsHandler(M,P){return this._inputHandler.registerDcsHandler(M,P)}registerCsiHandler(M,P){return this._inputHandler.registerCsiHandler(M,P)}registerOscHandler(M,P){return this._inputHandler.registerOscHandler(M,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let M=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?M=P.backend==="conpty"&&P.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(M=!0),M?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const M=[];M.push(this.onLineFeed(p.updateWindowsModeWrappedState.bind(null,this._bufferService))),M.push(this.registerCsiHandler({final:"H"},()=>((0,p.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)(()=>{for(const P of M)P.dispose()})}}}s.CoreTerminal=b},8460:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.forwardEvent=s.EventEmitter=void 0,s.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const m=[];for(let d=0;d<this._listeners.length;d++)m.push(this._listeners[d]);for(let d=0;d<m.length;d++)m[d].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},s.forwardEvent=function(u,f){return u(m=>f.fire(m))}},5435:function(v,s,u){var f=this&&this.__decorate||function(W,E,L,T){var O,H=arguments.length,V=H<3?E:T===null?T=Object.getOwnPropertyDescriptor(E,L):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(W,E,L,T);else for(var X=W.length-1;X>=0;X--)(O=W[X])&&(V=(H<3?O(V):H>3?O(E,L,V):O(E,L))||V);return H>3&&V&&Object.defineProperty(E,L,V),V},m=this&&this.__param||function(W,E){return function(L,T){E(L,T,W)}};Object.defineProperty(s,"__esModule",{value:!0}),s.InputHandler=s.WindowsOptionsReportType=void 0;const d=u(2584),_=u(7116),C=u(2015),w=u(844),S=u(482),c=u(8437),a=u(8460),n=u(643),l=u(511),p=u(3734),y=u(2585),x=u(6242),k=u(6351),g=u(5941),b={"(":0,")":1,"*":2,"+":3,"-":1,".":2},D=131072;function M(W,E){if(W>24)return E.setWinLines||!1;switch(W){case 1:return!!E.restoreWin;case 2:return!!E.minimizeWin;case 3:return!!E.setWinPosition;case 4:return!!E.setWinSizePixels;case 5:return!!E.raiseWin;case 6:return!!E.lowerWin;case 7:return!!E.refreshWin;case 8:return!!E.setWinSizeChars;case 9:return!!E.maximizeWin;case 10:return!!E.fullscreenWin;case 11:return!!E.getWinState;case 13:return!!E.getWinPosition;case 14:return!!E.getWinSizePixels;case 15:return!!E.getScreenSizePixels;case 16:return!!E.getCellSizePixels;case 18:return!!E.getWinSizeChars;case 19:return!!E.getScreenSizeChars;case 20:return!!E.getIconTitle;case 21:return!!E.getWinTitle;case 22:return!!E.pushTitle;case 23:return!!E.popTitle;case 24:return!!E.setWinLines}return!1}var P;(function(W){W[W.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",W[W.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(P||(s.WindowsOptionsReportType=P={}));let B=0;class N extends w.Disposable{getAttrData(){return this._curAttrData}constructor(E,L,T,O,H,V,X,Y,oe=new C.EscapeSequenceParser){super(),this._bufferService=E,this._charsetService=L,this._coreService=T,this._logService=O,this._optionsService=H,this._oscLinkService=V,this._coreMouseService=X,this._unicodeService=Y,this._parser=oe,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new S.StringToUtf32,this._utf8Decoder=new S.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new a.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new a.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new a.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new a.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new a.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new a.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new a.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new a.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new a.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new a.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new a.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new a.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new a.EventEmitter),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 F(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(R=>this._activeBuffer=R.activeBuffer)),this._parser.setCsiHandlerFallback((R,j)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(R),params:j.toArray()})}),this._parser.setEscHandlerFallback(R=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(R)})}),this._parser.setExecuteHandlerFallback(R=>{this._logService.debug("Unknown EXECUTE code: ",{code:R})}),this._parser.setOscHandlerFallback((R,j,U)=>{this._logService.debug("Unknown OSC code: ",{identifier:R,action:j,data:U})}),this._parser.setDcsHandlerFallback((R,j,U)=>{j==="HOOK"&&(U=U.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(R),action:j,payload:U})}),this._parser.setPrintHandler((R,j,U)=>this.print(R,j,U)),this._parser.registerCsiHandler({final:"@"},R=>this.insertChars(R)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},R=>this.scrollLeft(R)),this._parser.registerCsiHandler({final:"A"},R=>this.cursorUp(R)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},R=>this.scrollRight(R)),this._parser.registerCsiHandler({final:"B"},R=>this.cursorDown(R)),this._parser.registerCsiHandler({final:"C"},R=>this.cursorForward(R)),this._parser.registerCsiHandler({final:"D"},R=>this.cursorBackward(R)),this._parser.registerCsiHandler({final:"E"},R=>this.cursorNextLine(R)),this._parser.registerCsiHandler({final:"F"},R=>this.cursorPrecedingLine(R)),this._parser.registerCsiHandler({final:"G"},R=>this.cursorCharAbsolute(R)),this._parser.registerCsiHandler({final:"H"},R=>this.cursorPosition(R)),this._parser.registerCsiHandler({final:"I"},R=>this.cursorForwardTab(R)),this._parser.registerCsiHandler({final:"J"},R=>this.eraseInDisplay(R,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},R=>this.eraseInDisplay(R,!0)),this._parser.registerCsiHandler({final:"K"},R=>this.eraseInLine(R,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},R=>this.eraseInLine(R,!0)),this._parser.registerCsiHandler({final:"L"},R=>this.insertLines(R)),this._parser.registerCsiHandler({final:"M"},R=>this.deleteLines(R)),this._parser.registerCsiHandler({final:"P"},R=>this.deleteChars(R)),this._parser.registerCsiHandler({final:"S"},R=>this.scrollUp(R)),this._parser.registerCsiHandler({final:"T"},R=>this.scrollDown(R)),this._parser.registerCsiHandler({final:"X"},R=>this.eraseChars(R)),this._parser.registerCsiHandler({final:"Z"},R=>this.cursorBackwardTab(R)),this._parser.registerCsiHandler({final:"`"},R=>this.charPosAbsolute(R)),this._parser.registerCsiHandler({final:"a"},R=>this.hPositionRelative(R)),this._parser.registerCsiHandler({final:"b"},R=>this.repeatPrecedingCharacter(R)),this._parser.registerCsiHandler({final:"c"},R=>this.sendDeviceAttributesPrimary(R)),this._parser.registerCsiHandler({prefix:">",final:"c"},R=>this.sendDeviceAttributesSecondary(R)),this._parser.registerCsiHandler({final:"d"},R=>this.linePosAbsolute(R)),this._parser.registerCsiHandler({final:"e"},R=>this.vPositionRelative(R)),this._parser.registerCsiHandler({final:"f"},R=>this.hVPosition(R)),this._parser.registerCsiHandler({final:"g"},R=>this.tabClear(R)),this._parser.registerCsiHandler({final:"h"},R=>this.setMode(R)),this._parser.registerCsiHandler({prefix:"?",final:"h"},R=>this.setModePrivate(R)),this._parser.registerCsiHandler({final:"l"},R=>this.resetMode(R)),this._parser.registerCsiHandler({prefix:"?",final:"l"},R=>this.resetModePrivate(R)),this._parser.registerCsiHandler({final:"m"},R=>this.charAttributes(R)),this._parser.registerCsiHandler({final:"n"},R=>this.deviceStatus(R)),this._parser.registerCsiHandler({prefix:"?",final:"n"},R=>this.deviceStatusPrivate(R)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},R=>this.softReset(R)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},R=>this.setCursorStyle(R)),this._parser.registerCsiHandler({final:"r"},R=>this.setScrollRegion(R)),this._parser.registerCsiHandler({final:"s"},R=>this.saveCursor(R)),this._parser.registerCsiHandler({final:"t"},R=>this.windowOptions(R)),this._parser.registerCsiHandler({final:"u"},R=>this.restoreCursor(R)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},R=>this.insertColumns(R)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},R=>this.deleteColumns(R)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},R=>this.selectProtected(R)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},R=>this.requestMode(R,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},R=>this.requestMode(R,!1)),this._parser.setExecuteHandler(d.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(d.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(d.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(d.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(d.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(d.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(d.C1.IND,()=>this.index()),this._parser.setExecuteHandler(d.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(d.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new x.OscHandler(R=>(this.setTitle(R),this.setIconName(R),!0))),this._parser.registerOscHandler(1,new x.OscHandler(R=>this.setIconName(R))),this._parser.registerOscHandler(2,new x.OscHandler(R=>this.setTitle(R))),this._parser.registerOscHandler(4,new x.OscHandler(R=>this.setOrReportIndexedColor(R))),this._parser.registerOscHandler(8,new x.OscHandler(R=>this.setHyperlink(R))),this._parser.registerOscHandler(10,new x.OscHandler(R=>this.setOrReportFgColor(R))),this._parser.registerOscHandler(11,new x.OscHandler(R=>this.setOrReportBgColor(R))),this._parser.registerOscHandler(12,new x.OscHandler(R=>this.setOrReportCursorColor(R))),this._parser.registerOscHandler(104,new x.OscHandler(R=>this.restoreIndexedColor(R))),this._parser.registerOscHandler(110,new x.OscHandler(R=>this.restoreFgColor(R))),this._parser.registerOscHandler(111,new x.OscHandler(R=>this.restoreBgColor(R))),this._parser.registerOscHandler(112,new x.OscHandler(R=>this.restoreCursorColor(R))),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(const R in _.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:R},()=>this.selectCharset("("+R)),this._parser.registerEscHandler({intermediates:")",final:R},()=>this.selectCharset(")"+R)),this._parser.registerEscHandler({intermediates:"*",final:R},()=>this.selectCharset("*"+R)),this._parser.registerEscHandler({intermediates:"+",final:R},()=>this.selectCharset("+"+R)),this._parser.registerEscHandler({intermediates:"-",final:R},()=>this.selectCharset("-"+R)),this._parser.registerEscHandler({intermediates:".",final:R},()=>this.selectCharset("."+R)),this._parser.registerEscHandler({intermediates:"/",final:R},()=>this.selectCharset("/"+R));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(R=>(this._logService.error("Parsing error: ",R),R)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new k.DcsHandler((R,j)=>this.requestStatusString(R,j)))}_preserveStack(E,L,T,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=E,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=T,this._parseStack.position=O}_logSlowResolvingAsync(E){this._logService.logLevel<=y.LogLevelEnum.WARN&&Promise.race([E,new Promise((L,T)=>setTimeout(()=>T("#SLOW_TIMEOUT"),5e3))]).catch(L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(E,L){let T,O=this._activeBuffer.x,H=this._activeBuffer.y,V=0;const X=this._parseStack.paused;if(X){if(T=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(T),T;O=this._parseStack.cursorStartX,H=this._parseStack.cursorStartY,this._parseStack.paused=!1,E.length>D&&(V=this._parseStack.position+D)}if(this._logService.logLevel<=y.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof E=="string"?` "${E}"`:` "${Array.prototype.map.call(E,Y=>String.fromCharCode(Y)).join("")}"`),typeof E=="string"?E.split("").map(Y=>Y.charCodeAt(0)):E),this._parseBuffer.length<E.length&&this._parseBuffer.length<D&&(this._parseBuffer=new Uint32Array(Math.min(E.length,D))),X||this._dirtyRowTracker.clearRange(),E.length>D)for(let Y=V;Y<E.length;Y+=D){const oe=Y+D<E.length?Y+D:E.length,R=typeof E=="string"?this._stringDecoder.decode(E.substring(Y,oe),this._parseBuffer):this._utf8Decoder.decode(E.subarray(Y,oe),this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,R))return this._preserveStack(O,H,R,Y),this._logSlowResolvingAsync(T),T}else if(!X){const Y=typeof E=="string"?this._stringDecoder.decode(E,this._parseBuffer):this._utf8Decoder.decode(E,this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,Y))return this._preserveStack(O,H,Y,0),this._logSlowResolvingAsync(T),T}this._activeBuffer.x===O&&this._activeBuffer.y===H||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(E,L,T){let O,H;const V=this._charsetService.charset,X=this._optionsService.rawOptions.screenReaderMode,Y=this._bufferService.cols,oe=this._coreService.decPrivateModes.wraparound,R=this._coreService.modes.insertMode,j=this._curAttrData;let U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&T-L>0&&U.getWidth(this._activeBuffer.x-1)===2&&U.setCellFromCodePoint(this._activeBuffer.x-1,0,1,j.fg,j.bg,j.extended);for(let z=L;z<T;++z){if(O=E[z],H=this._unicodeService.wcwidth(O),O<127&&V){const ee=V[String.fromCharCode(O)];ee&&(O=ee.charCodeAt(0))}if(X&&this._onA11yChar.fire((0,S.stringFromCodePoint)(O)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),H||!this._activeBuffer.x){if(this._activeBuffer.x+H-1>=Y){if(oe){for(;this._activeBuffer.x<Y;)U.setCellFromCodePoint(this._activeBuffer.x++,0,1,j.fg,j.bg,j.extended);this._activeBuffer.x=0,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)}else if(this._activeBuffer.x=Y-1,H===2)continue}if(R&&(U.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(j),j),U.getWidth(Y-1)===2&&U.setCellFromCodePoint(Y-1,n.NULL_CELL_CODE,n.NULL_CELL_WIDTH,j.fg,j.bg,j.extended)),U.setCellFromCodePoint(this._activeBuffer.x++,O,H,j.fg,j.bg,j.extended),H>0)for(;--H;)U.setCellFromCodePoint(this._activeBuffer.x++,0,0,j.fg,j.bg,j.extended)}else U.getWidth(this._activeBuffer.x-1)?U.addCodepointToCell(this._activeBuffer.x-1,O):U.addCodepointToCell(this._activeBuffer.x-2,O)}T-L>0&&(U.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<Y&&T-L>0&&U.getWidth(this._activeBuffer.x)===0&&!U.hasContent(this._activeBuffer.x)&&U.setCellFromCodePoint(this._activeBuffer.x,0,1,j.fg,j.bg,j.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(E,L){return E.final!=="t"||E.prefix||E.intermediates?this._parser.registerCsiHandler(E,L):this._parser.registerCsiHandler(E,T=>!M(T.params[0],this._optionsService.rawOptions.windowOptions)||L(T))}registerDcsHandler(E,L){return this._parser.registerDcsHandler(E,new k.DcsHandler(L))}registerEscHandler(E,L){return this._parser.registerEscHandler(E,L)}registerOscHandler(E,L){return this._parser.registerOscHandler(E,new x.OscHandler(L))}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(){var E;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&&(!((E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||E===void 0)&&E.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const 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,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=E,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=E,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(E,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+E,this._activeBuffer.y+L)}cursorUp(E){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,E.params[0]||1)):this._moveCursor(0,-(E.params[0]||1)),!0}cursorDown(E){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,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){const L=E.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=E.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=E.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(E){const L=E.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(E,L,T,O=!1,H=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);V.replaceCells(L,T,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),H),O&&(V.isWrapped=!1)}_resetBufferLine(E,L=!1){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);T&&(T.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+E),T.isWrapped=!1)}eraseInDisplay(E,L=!1){let T;switch(this._restrictCursor(this._bufferService.cols),E.params[0]){case 0:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);T<this._bufferService.rows;T++)this._resetBufferLine(T,L);this._dirtyRowTracker.markDirty(T);break;case 1:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T,0,this._activeBuffer.x+1,!0,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(T+1).isWrapped=!1);T--;)this._resetBufferLine(T,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(T=this._bufferService.rows,this._dirtyRowTracker.markDirty(T-1);T--;)this._resetBufferLine(T,L);this._dirtyRowTracker.markDirty(0);break;case 3:const O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,0),this._onScroll.fire(0))}return!0}eraseInLine(E,L=!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,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(E){this._restrictCursor();let L=E.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;for(;L--;)this._activeBuffer.lines.splice(H-1,1),this._activeBuffer.lines.splice(T,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 L=E.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y;let O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;L--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(O,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();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(E){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(E){let L=E.params[0]||1;for(;L--;)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 L=E.params[0]||1;for(;L--;)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(c.DEFAULT_ATTR_DATA));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;const L=E.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);O.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.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;const L=E.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);O.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.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;const L=E.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);O.insertCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.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;const L=E.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);O.deleteCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(E){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(E.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(E){if(!this._parser.precedingCodepoint)return!0;const L=E.params[0]||1,T=new Uint32Array(L);for(let O=0;O<L;++O)T[O]=this._parser.precedingCodepoint;return this.print(T,0,T.length),!0}sendDeviceAttributesPrimary(E){return E.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(E){return E.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(E.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0}_is(E){return(this._optionsService.rawOptions.termName+"").indexOf(E)===0}setMode(E){for(let L=0;L<E.length;L++)switch(E.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(E){for(let L=0;L<E.length;L++)switch(E.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),this._charsetService.setgCharset(1,_.DEFAULT_CHARSET),this._charsetService.setgCharset(2,_.DEFAULT_CHARSET),this._charsetService.setgCharset(3,_.DEFAULT_CHARSET);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(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(E){for(let L=0;L<E.length;L++)switch(E.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(E){for(let L=0;L<E.length;L++)switch(E.params[L]){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:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");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[L]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(E,L){const T=this._coreService.decPrivateModes,{activeProtocol:O,activeEncoding:H}=this._coreMouseService,V=this._coreService,{buffers:X,cols:Y}=this._bufferService,{active:oe,alt:R}=X,j=this._optionsService.rawOptions,U=le=>le?1:2,z=E.params[0];return ee=z,Q=L?z===2?4:z===4?U(V.modes.insertMode):z===12?3:z===20?U(j.convertEol):0:z===1?U(T.applicationCursorKeys):z===3?j.windowOptions.setWinLines?Y===80?2:Y===132?1:0:0:z===6?U(T.origin):z===7?U(T.wraparound):z===8?3:z===9?U(O==="X10"):z===12?U(j.cursorBlink):z===25?U(!V.isCursorHidden):z===45?U(T.reverseWraparound):z===66?U(T.applicationKeypad):z===67?4:z===1e3?U(O==="VT200"):z===1002?U(O==="DRAG"):z===1003?U(O==="ANY"):z===1004?U(T.sendFocus):z===1005?4:z===1006?U(H==="SGR"):z===1015?4:z===1016?U(H==="SGR_PIXELS"):z===1048?1:z===47||z===1047||z===1049?U(oe===R):z===2004?U(T.bracketedPasteMode):0,V.triggerDataEvent(`${d.C0.ESC}[${L?"":"?"}${ee};${Q}$y`),!0;var ee,Q}_updateAttrColor(E,L,T,O,H){return L===2?(E|=50331648,E&=-16777216,E|=p.AttributeData.fromColorRGB([T,O,H])):L===5&&(E&=-50331904,E|=33554432|255&T),E}_extractColor(E,L,T){const O=[0,0,-1,0,0,0];let H=0,V=0;do{if(O[V+H]=E.params[L+V],E.hasSubParams(L+V)){const X=E.getSubParams(L+V);let Y=0;do O[1]===5&&(H=1),O[V+Y+1+H]=X[Y];while(++Y<X.length&&Y+V+1+H<O.length);break}if(O[1]===5&&V+H>=2||O[1]===2&&V+H>=5)break;O[1]&&(H=1)}while(++V+L<E.length&&V+H<O.length);for(let X=2;X<O.length;++X)O[X]===-1&&(O[X]=0);switch(O[0]){case 38:T.fg=this._updateAttrColor(T.fg,O[1],O[3],O[4],O[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,O[1],O[3],O[4],O[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,O[1],O[3],O[4],O[5])}return V}_processUnderline(E,L){L.extended=L.extended.clone(),(!~E||E>5)&&(E=1),L.extended.underlineStyle=E,L.fg|=268435456,E===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(E){E.fg=c.DEFAULT_ATTR_DATA.fg,E.bg=c.DEFAULT_ATTR_DATA.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;const L=E.length;let T;const O=this._curAttrData;for(let H=0;H<L;H++)T=E.params[H],T>=30&&T<=37?(O.fg&=-50331904,O.fg|=16777216|T-30):T>=40&&T<=47?(O.bg&=-50331904,O.bg|=16777216|T-40):T>=90&&T<=97?(O.fg&=-50331904,O.fg|=16777224|T-90):T>=100&&T<=107?(O.bg&=-50331904,O.bg|=16777224|T-100):T===0?this._processSGR0(O):T===1?O.fg|=134217728:T===3?O.bg|=67108864:T===4?(O.fg|=268435456,this._processUnderline(E.hasSubParams(H)?E.getSubParams(H)[0]:1,O)):T===5?O.fg|=536870912:T===7?O.fg|=67108864:T===8?O.fg|=1073741824:T===9?O.fg|=2147483648:T===2?O.bg|=134217728:T===21?this._processUnderline(2,O):T===22?(O.fg&=-134217729,O.bg&=-134217729):T===23?O.bg&=-67108865:T===24?(O.fg&=-268435457,this._processUnderline(0,O)):T===25?O.fg&=-536870913:T===27?O.fg&=-67108865:T===28?O.fg&=-1073741825:T===29?O.fg&=2147483647:T===39?(O.fg&=-67108864,O.fg|=16777215&c.DEFAULT_ATTR_DATA.fg):T===49?(O.bg&=-67108864,O.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):T===38||T===48||T===58?H+=this._extractColor(E,H,O):T===53?O.bg|=1073741824:T===55?O.bg&=-1073741825:T===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):T===100?(O.fg&=-67108864,O.fg|=16777215&c.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",T);return!0}deviceStatus(E){switch(E.params[0]){case 5:this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[${L};${T}R`)}return!0}deviceStatusPrivate(E){if(E.params[0]===6){const L=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[?${L};${T}R`)}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=c.DEFAULT_ATTR_DATA.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){const L=E.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const T=L%2==1;return this._optionsService.options.cursorBlink=T,!0}setScrollRegion(E){const L=E.params[0]||1;let T;return(E.length<2||(T=E.params[1])>this._bufferService.rows||T===0)&&(T=this._bufferService.rows),T>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=T-1,this._setCursor(0,0)),!0}windowOptions(E){if(!M(E.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=E.length>1?E.params[1]:0;switch(E.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(P.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(P.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${d.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}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){const L=[],T=E.split(";");for(;T.length>1;){const O=T.shift(),H=T.shift();if(/^\d+$/.exec(O)){const V=parseInt(O);if($(V))if(H==="?")L.push({type:0,index:V});else{const X=(0,g.parseColor)(H);X&&L.push({type:1,index:V,color:X})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(E){const L=E.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(E,L){this._getCurrentLinkId()&&this._finishHyperlink();const T=E.split(":");let O;const H=T.findIndex(V=>V.startsWith("id="));return H!==-1&&(O=T[H].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(E,L){const T=E.split(";");for(let O=0;O<T.length&&!(L>=this._specialColors.length);++O,++L)if(T[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const H=(0,g.parseColor)(T[O]);H&&this._onColor.fire([{type:1,index:this._specialColors[L],color:H}])}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;const L=[],T=E.split(";");for(let O=0;O<T.length;++O)if(/^\d+$/.exec(T[O])){const H=parseInt(T[O]);$(H)&&L.push({type:2,index:H})}return L.length&&this._onColor.fire(L),!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,_.DEFAULT_CHARSET),!0}selectCharset(E){return E.length!==2?(this.selectDefaultCharset(),!0):(E[0]==="/"||this._charsetService.setgCharset(b[E[0]],_.CHARSETS[E[1]]||_.DEFAULT_CHARSET),!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){const 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=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(E){return this._charsetService.setgLevel(E),!0}screenAlignmentPattern(){const E=new l.CellData;E.content=4194373,E.fg=this._curAttrData.fg,E.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const T=this._activeBuffer.ybase+this._activeBuffer.y+L,O=this._activeBuffer.lines.get(T);O&&(O.fill(E),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(E,L){const T=this._bufferService.buffer,O=this._optionsService.rawOptions;return(H=>(this._coreService.triggerDataEvent(`${d.C0.ESC}${H}${d.C0.ESC}\\`),!0))(E==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:E==='"p'?'P1$r61;1"p':E==="r"?`P1$r${T.scrollTop+1};${T.scrollBottom+1}r`:E==="m"?"P1$r0m":E===" q"?`P1$r${{block:2,underline:4,bar:6}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(E,L){this._dirtyRowTracker.markRangeDirty(E,L)}}s.InputHandler=N;let F=class{constructor(W){this._bufferService=W,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(W){W<this.start?this.start=W:W>this.end&&(this.end=W)}markRangeDirty(W,E){W>E&&(B=W,W=E,E=B),W<this.start&&(this.start=W),E>this.end&&(this.end=E)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function $(W){return 0<=W&&W<256}F=f([m(0,y.IBufferService)],F)},844:(v,s)=>{function u(f){for(const m of f)m.dispose();f.length=0}Object.defineProperty(s,"__esModule",{value:!0}),s.getDisposeArrayDisposable=s.disposeArray=s.toDisposable=s.MutableDisposable=s.Disposable=void 0,s.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const m=this._disposables.indexOf(f);m!==-1&&this._disposables.splice(m,1)}},s.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var m;this._isDisposed||f===this._value||((m=this._value)===null||m===void 0||m.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)===null||f===void 0||f.dispose(),this._value=void 0}},s.toDisposable=function(f){return{dispose:f}},s.disposeArray=u,s.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},1505:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.FourKeyMap=s.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(m,d,_){this._data[m]||(this._data[m]={}),this._data[m][d]=_}get(m,d){return this._data[m]?this._data[m][d]:void 0}clear(){this._data={}}}s.TwoKeyMap=u,s.FourKeyMap=class{constructor(){this._data=new u}set(f,m,d,_,C){this._data.get(f,m)||this._data.set(f,m,new u),this._data.get(f,m).set(d,_,C)}get(f,m,d,_){var C;return(C=this._data.get(f,m))===null||C===void 0?void 0:C.get(d,_)}clear(){this._data.clear()}}},6114:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.isChromeOS=s.isLinux=s.isWindows=s.isIphone=s.isIpad=s.isMac=s.getSafariVersion=s.isSafari=s.isLegacyEdge=s.isFirefox=s.isNode=void 0,s.isNode=typeof navigator>"u";const u=s.isNode?"node":navigator.userAgent,f=s.isNode?"node":navigator.platform;s.isFirefox=u.includes("Firefox"),s.isLegacyEdge=u.includes("Edge"),s.isSafari=/^((?!chrome|android).)*safari/i.test(u),s.getSafariVersion=function(){if(!s.isSafari)return 0;const m=u.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},s.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),s.isIpad=f==="iPad",s.isIphone=f==="iPhone",s.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),s.isLinux=f.indexOf("Linux")>=0,s.isChromeOS=/\bCrOS\b/.test(u)},6106:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.SortedList=void 0;let u=0;s.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(u=this._search(this._getKey(f)),this._array.splice(u,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const m=this._getKey(f);if(m===void 0||(u=this._search(m),u===-1)||this._getKey(this._array[u])!==m)return!1;do if(this._array[u]===f)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===m);return!1}*getKeyIterator(f){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===f)}forEachByKey(f,m){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do m(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===f)}values(){return[...this._array].values()}_search(f){let m=0,d=this._array.length-1;for(;d>=m;){let _=m+d>>1;const C=this._getKey(this._array[_]);if(C>f)d=_-1;else{if(!(C<f)){for(;_>0&&this._getKey(this._array[_-1])===f;)_--;return _}m=_+1}}return m}}},7226:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DebouncedIdleTask=s.IdleTaskQueue=s.PriorityTaskQueue=void 0;const f=u(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),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(C){this._idleCallback=void 0;let w=0,S=0,c=C.timeRemaining(),a=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),S=Math.max(w,S),a=C.timeRemaining(),1.5*S>a)return c-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(c-w))}ms`),void this._start();c=a}this.clear()}}class d extends m{_requestCallback(C){return setTimeout(()=>C(this._createDeadline(16)))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const w=Date.now()+C;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}s.PriorityTaskQueue=d,s.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:d,s.DebouncedIdleTask=class{constructor(){this._queue=new s.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},9282:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.updateWindowsModeWrappedState=void 0;const f=u(643);s.updateWindowsModeWrappedState=function(m){const d=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),_=d==null?void 0:d.get(m.cols-1),C=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);C&&_&&(C.isWrapped=_[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&_[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ExtendedAttrs=s.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new u;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}s.AttributeData=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}constructor(d=0,_=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=_}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}s.ExtendedAttrs=f},9092:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Buffer=s.MAX_BUFFER_SIZE=void 0;const f=u(6349),m=u(7226),d=u(3734),_=u(8437),C=u(4634),w=u(511),S=u(643),c=u(4863),a=u(7116);s.MAX_BUFFER_SIZE=4294967295,s.Buffer=class{constructor(n,l,p){this._hasScrollback=n,this._optionsService=l,this._bufferService=p,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=_.DEFAULT_ATTR_DATA.clone(),this.savedCharset=a.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,S.NULL_CELL_CHAR,S.NULL_CELL_WIDTH,S.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,S.WHITESPACE_CELL_CHAR,S.WHITESPACE_CELL_WIDTH,S.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(n){return n?(this._nullCell.fg=n.fg,this._nullCell.bg=n.bg,this._nullCell.extended=n.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new d.ExtendedAttrs),this._nullCell}getWhitespaceCell(n){return n?(this._whitespaceCell.fg=n.fg,this._whitespaceCell.bg=n.bg,this._whitespaceCell.extended=n.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new d.ExtendedAttrs),this._whitespaceCell}getBlankLine(n,l){return new _.BufferLine(this._bufferService.cols,this.getNullCell(n),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const n=this.ybase+this.y-this.ydisp;return n>=0&&n<this._rows}_getCorrectBufferLength(n){if(!this._hasScrollback)return n;const l=n+this._optionsService.rawOptions.scrollback;return l>s.MAX_BUFFER_SIZE?s.MAX_BUFFER_SIZE:l}fillViewportRows(n){if(this.lines.length===0){n===void 0&&(n=_.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(n))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(n,l){const p=this.getNullCell(_.DEFAULT_ATTR_DATA);let y=0;const x=this._getCorrectBufferLength(l);if(x>this.lines.maxLength&&(this.lines.maxLength=x),this.lines.length>0){if(this._cols<n)for(let g=0;g<this.lines.length;g++)y+=+this.lines.get(g).resize(n,p);let k=0;if(this._rows<l)for(let g=this._rows;g<l;g++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new _.BufferLine(n,p)):this.ybase>0&&this.lines.length<=this.ybase+this.y+k+1?(this.ybase--,k++,this.ydisp>0&&this.ydisp--):this.lines.push(new _.BufferLine(n,p)));else for(let g=this._rows;g>l;g--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(x<this.lines.maxLength){const g=this.lines.length-x;g>0&&(this.lines.trimStart(g),this.ybase=Math.max(this.ybase-g,0),this.ydisp=Math.max(this.ydisp-g,0),this.savedY=Math.max(this.savedY-g,0)),this.lines.maxLength=x}this.x=Math.min(this.x,n-1),this.y=Math.min(this.y,l-1),k&&(this.y+=k),this.savedX=Math.min(this.savedX,n-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(n,l),this._cols>n))for(let k=0;k<this.lines.length;k++)y+=+this.lines.get(k).resize(n,p);this._cols=n,this._rows=l,this._memoryCleanupQueue.clear(),y>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let n=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,n=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return n}get _isReflowEnabled(){const n=this._optionsService.rawOptions.windowsPty;return n&&n.buildNumber?this._hasScrollback&&n.backend==="conpty"&&n.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(n,l){this._cols!==n&&(n>this._cols?this._reflowLarger(n,l):this._reflowSmaller(n,l))}_reflowLarger(n,l){const p=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,n,this.ybase+this.y,this.getNullCell(_.DEFAULT_ATTR_DATA));if(p.length>0){const y=(0,C.reflowLargerCreateNewLayout)(this.lines,p);(0,C.reflowLargerApplyNewLayout)(this.lines,y.layout),this._reflowLargerAdjustViewport(n,l,y.countRemoved)}}_reflowLargerAdjustViewport(n,l,p){const y=this.getNullCell(_.DEFAULT_ATTR_DATA);let x=p;for(;x-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new _.BufferLine(n,y))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-p,0)}_reflowSmaller(n,l){const p=this.getNullCell(_.DEFAULT_ATTR_DATA),y=[];let x=0;for(let k=this.lines.length-1;k>=0;k--){let g=this.lines.get(k);if(!g||!g.isWrapped&&g.getTrimmedLength()<=n)continue;const b=[g];for(;g.isWrapped&&k>0;)g=this.lines.get(--k),b.unshift(g);const D=this.ybase+this.y;if(D>=k&&D<k+b.length)continue;const M=b[b.length-1].getTrimmedLength(),P=(0,C.reflowSmallerGetNewLineLengths)(b,this._cols,n),B=P.length-b.length;let N;N=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+B):Math.max(0,this.lines.length-this.lines.maxLength+B);const F=[];for(let O=0;O<B;O++){const H=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);F.push(H)}F.length>0&&(y.push({start:k+b.length+x,newLines:F}),x+=F.length),b.push(...F);let $=P.length-1,W=P[$];W===0&&($--,W=P[$]);let E=b.length-B-1,L=M;for(;E>=0;){const O=Math.min(L,W);if(b[$]===void 0)break;if(b[$].copyCellsFrom(b[E],L-O,W-O,O,!0),W-=O,W===0&&($--,W=P[$]),L-=O,L===0){E--;const H=Math.max(E,0);L=(0,C.getWrappedLineTrimmedLength)(b,H,this._cols)}}for(let O=0;O<b.length;O++)P[O]<n&&b[O].setCell(P[O],p);let T=B-N;for(;T-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+x)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+B,this.ybase+l-1)}if(y.length>0){const k=[],g=[];for(let $=0;$<this.lines.length;$++)g.push(this.lines.get($));const b=this.lines.length;let D=b-1,M=0,P=y[M];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+x);let B=0;for(let $=Math.min(this.lines.maxLength-1,b+x-1);$>=0;$--)if(P&&P.start>D+B){for(let W=P.newLines.length-1;W>=0;W--)this.lines.set($--,P.newLines[W]);$++,k.push({index:D+1,amount:P.newLines.length}),B+=P.newLines.length,P=y[++M]}else this.lines.set($,g[D--]);let N=0;for(let $=k.length-1;$>=0;$--)k[$].index+=N,this.lines.onInsertEmitter.fire(k[$]),N+=k[$].amount;const F=Math.max(0,b+x-this.lines.maxLength);F>0&&this.lines.onTrimEmitter.fire(F)}}translateBufferLineToString(n,l,p=0,y){const x=this.lines.get(n);return x?x.translateToString(l,p,y):""}getWrappedRangeForLine(n){let l=n,p=n;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;p+1<this.lines.length&&this.lines.get(p+1).isWrapped;)p++;return{first:l,last:p}}setupTabStops(n){for(n!=null?this.tabs[n]||(n=this.prevStop(n)):(this.tabs={},n=0);n<this._cols;n+=this._optionsService.rawOptions.tabStopWidth)this.tabs[n]=!0}prevStop(n){for(n==null&&(n=this.x);!this.tabs[--n]&&n>0;);return n>=this._cols?this._cols-1:n<0?0:n}nextStop(n){for(n==null&&(n=this.x);!this.tabs[++n]&&n<this._cols;);return n>=this._cols?this._cols-1:n<0?0:n}clearMarkers(n){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===n&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let n=0;n<this.markers.length;n++)this.markers[n].dispose(),this.markers.splice(n--,1);this._isClearing=!1}addMarker(n){const l=new c.Marker(n);return this.markers.push(l),l.register(this.lines.onTrim(p=>{l.line-=p,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(p=>{l.line>=p.index&&(l.line+=p.amount)})),l.register(this.lines.onDelete(p=>{l.line>=p.index&&l.line<p.index+p.amount&&l.dispose(),l.line>p.index&&(l.line-=p.amount)})),l.register(l.onDispose(()=>this._removeMarker(l))),l}_removeMarker(n){this._isClearing||this.markers.splice(this.markers.indexOf(n),1)}}},8437:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferLine=s.DEFAULT_ATTR_DATA=void 0;const f=u(3734),m=u(511),d=u(643),_=u(482);s.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let C=0;class w{constructor(c,a,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*c);const l=a||m.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]);for(let p=0;p<c;++p)this.setCell(p,l);this.length=c}get(c){const a=this._data[3*c+0],n=2097151&a;return[this._data[3*c+1],2097152&a?this._combined[c]:n?(0,_.stringFromCodePoint)(n):"",a>>22,2097152&a?this._combined[c].charCodeAt(this._combined[c].length-1):n]}set(c,a){this._data[3*c+1]=a[d.CHAR_DATA_ATTR_INDEX],a[d.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[c]=a[1],this._data[3*c+0]=2097152|c|a[d.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*c+0]=a[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|a[d.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(c){return this._data[3*c+0]>>22}hasWidth(c){return 12582912&this._data[3*c+0]}getFg(c){return this._data[3*c+1]}getBg(c){return this._data[3*c+2]}hasContent(c){return 4194303&this._data[3*c+0]}getCodePoint(c){const a=this._data[3*c+0];return 2097152&a?this._combined[c].charCodeAt(this._combined[c].length-1):2097151&a}isCombined(c){return 2097152&this._data[3*c+0]}getString(c){const a=this._data[3*c+0];return 2097152&a?this._combined[c]:2097151&a?(0,_.stringFromCodePoint)(2097151&a):""}isProtected(c){return 536870912&this._data[3*c+2]}loadCell(c,a){return C=3*c,a.content=this._data[C+0],a.fg=this._data[C+1],a.bg=this._data[C+2],2097152&a.content&&(a.combinedData=this._combined[c]),268435456&a.bg&&(a.extended=this._extendedAttrs[c]),a}setCell(c,a){2097152&a.content&&(this._combined[c]=a.combinedData),268435456&a.bg&&(this._extendedAttrs[c]=a.extended),this._data[3*c+0]=a.content,this._data[3*c+1]=a.fg,this._data[3*c+2]=a.bg}setCellFromCodePoint(c,a,n,l,p,y){268435456&p&&(this._extendedAttrs[c]=y),this._data[3*c+0]=a|n<<22,this._data[3*c+1]=l,this._data[3*c+2]=p}addCodepointToCell(c,a){let n=this._data[3*c+0];2097152&n?this._combined[c]+=(0,_.stringFromCodePoint)(a):(2097151&n?(this._combined[c]=(0,_.stringFromCodePoint)(2097151&n)+(0,_.stringFromCodePoint)(a),n&=-2097152,n|=2097152):n=a|4194304,this._data[3*c+0]=n)}insertCells(c,a,n,l){if((c%=this.length)&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c-1,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs),a<this.length-c){const p=new m.CellData;for(let y=this.length-c-a-1;y>=0;--y)this.setCell(c+a+y,this.loadCell(c+y,p));for(let y=0;y<a;++y)this.setCell(c+y,n)}else for(let p=c;p<this.length;++p)this.setCell(p,n);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs)}deleteCells(c,a,n,l){if(c%=this.length,a<this.length-c){const p=new m.CellData;for(let y=0;y<this.length-c-a;++y)this.setCell(c+y,this.loadCell(c+a+y,p));for(let y=this.length-a;y<this.length;++y)this.setCell(y,n)}else for(let p=c;p<this.length;++p)this.setCell(p,n);c&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c-1,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs),this.getWidth(c)!==0||this.hasContent(c)||this.setCellFromCodePoint(c,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs)}replaceCells(c,a,n,l,p=!1){if(p)for(c&&this.getWidth(c-1)===2&&!this.isProtected(c-1)&&this.setCellFromCodePoint(c-1,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs),a<this.length&&this.getWidth(a-1)===2&&!this.isProtected(a)&&this.setCellFromCodePoint(a,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs);c<a&&c<this.length;)this.isProtected(c)||this.setCell(c,n),c++;else for(c&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c-1,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs),a<this.length&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs);c<a&&c<this.length;)this.setCell(c++,n)}resize(c,a){if(c===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const n=3*c;if(c>this.length){if(this._data.buffer.byteLength>=4*n)this._data=new Uint32Array(this._data.buffer,0,n);else{const l=new Uint32Array(n);l.set(this._data),this._data=l}for(let l=this.length;l<c;++l)this.setCell(l,a)}else{this._data=this._data.subarray(0,n);const l=Object.keys(this._combined);for(let y=0;y<l.length;y++){const x=parseInt(l[y],10);x>=c&&delete this._combined[x]}const p=Object.keys(this._extendedAttrs);for(let y=0;y<p.length;y++){const x=parseInt(p[y],10);x>=c&&delete this._extendedAttrs[x]}}return this.length=c,4*n*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const c=new Uint32Array(this._data.length);return c.set(this._data),this._data=c,1}return 0}fill(c,a=!1){if(a)for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,c);else{this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,c)}}copyFrom(c){this.length!==c.length?this._data=new Uint32Array(c._data):this._data.set(c._data),this.length=c.length,this._combined={};for(const a in c._combined)this._combined[a]=c._combined[a];this._extendedAttrs={};for(const a in c._extendedAttrs)this._extendedAttrs[a]=c._extendedAttrs[a];this.isWrapped=c.isWrapped}clone(){const c=new w(0);c._data=new Uint32Array(this._data),c.length=this.length;for(const a in this._combined)c._combined[a]=this._combined[a];for(const a in this._extendedAttrs)c._extendedAttrs[a]=this._extendedAttrs[a];return c.isWrapped=this.isWrapped,c}getTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0])return c+(this._data[3*c+0]>>22);return 0}getNoBgTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0]||50331648&this._data[3*c+2])return c+(this._data[3*c+0]>>22);return 0}copyCellsFrom(c,a,n,l,p){const y=c._data;if(p)for(let k=l-1;k>=0;k--){for(let g=0;g<3;g++)this._data[3*(n+k)+g]=y[3*(a+k)+g];268435456&y[3*(a+k)+2]&&(this._extendedAttrs[n+k]=c._extendedAttrs[a+k])}else for(let k=0;k<l;k++){for(let g=0;g<3;g++)this._data[3*(n+k)+g]=y[3*(a+k)+g];268435456&y[3*(a+k)+2]&&(this._extendedAttrs[n+k]=c._extendedAttrs[a+k])}const x=Object.keys(c._combined);for(let k=0;k<x.length;k++){const g=parseInt(x[k],10);g>=a&&(this._combined[g-a+n]=c._combined[g])}}translateToString(c=!1,a=0,n=this.length){c&&(n=Math.min(n,this.getTrimmedLength()));let l="";for(;a<n;){const p=this._data[3*a+0],y=2097151&p;l+=2097152&p?this._combined[a]:y?(0,_.stringFromCodePoint)(y):d.WHITESPACE_CELL_CHAR,a+=p>>22||1}return l}}s.BufferLine=w},4841:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getRangeLength=void 0,s.getRangeLength=function(u,f){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return f*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(v,s)=>{function u(f,m,d){if(m===f.length-1)return f[m].getTrimmedLength();const _=!f[m].hasContent(d-1)&&f[m].getWidth(d-1)===1,C=f[m+1].getWidth(0)===2;return _&&C?d-1:d}Object.defineProperty(s,"__esModule",{value:!0}),s.getWrappedLineTrimmedLength=s.reflowSmallerGetNewLineLengths=s.reflowLargerApplyNewLayout=s.reflowLargerCreateNewLayout=s.reflowLargerGetLinesToRemove=void 0,s.reflowLargerGetLinesToRemove=function(f,m,d,_,C){const w=[];for(let S=0;S<f.length-1;S++){let c=S,a=f.get(++c);if(!a.isWrapped)continue;const n=[f.get(S)];for(;c<f.length&&a.isWrapped;)n.push(a),a=f.get(++c);if(_>=S&&_<c){S+=n.length-1;continue}let l=0,p=u(n,l,m),y=1,x=0;for(;y<n.length;){const g=u(n,y,m),b=g-x,D=d-p,M=Math.min(b,D);n[l].copyCellsFrom(n[y],x,p,M,!1),p+=M,p===d&&(l++,p=0),x+=M,x===g&&(y++,x=0),p===0&&l!==0&&n[l-1].getWidth(d-1)===2&&(n[l].copyCellsFrom(n[l-1],d-1,p++,1,!1),n[l-1].setCell(d-1,C))}n[l].replaceCells(p,d,C);let k=0;for(let g=n.length-1;g>0&&(g>l||n[g].getTrimmedLength()===0);g--)k++;k>0&&(w.push(S+n.length-k),w.push(k)),S+=n.length-1}return w},s.reflowLargerCreateNewLayout=function(f,m){const d=[];let _=0,C=m[_],w=0;for(let S=0;S<f.length;S++)if(C===S){const c=m[++_];f.onDeleteEmitter.fire({index:S-w,amount:c}),S+=c-1,w+=c,C=m[++_]}else d.push(S);return{layout:d,countRemoved:w}},s.reflowLargerApplyNewLayout=function(f,m){const d=[];for(let _=0;_<m.length;_++)d.push(f.get(m[_]));for(let _=0;_<d.length;_++)f.set(_,d[_]);f.length=m.length},s.reflowSmallerGetNewLineLengths=function(f,m,d){const _=[],C=f.map((a,n)=>u(f,n,m)).reduce((a,n)=>a+n);let w=0,S=0,c=0;for(;c<C;){if(C-c<d){_.push(C-c);break}w+=d;const a=u(f,S,m);w>a&&(w-=a,S++);const n=f[S].getWidth(w-1)===2;n&&w--;const l=n?d-1:d;_.push(l),c+=l}return _},s.getWrappedLineTrimmedLength=u},5295:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferSet=void 0;const f=u(8460),m=u(844),d=u(9092);class _ extends m.Disposable{constructor(w,S){super(),this._optionsService=w,this._bufferService=S,this._onBufferActivate=this.register(new f.EventEmitter),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 d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.Buffer(!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(w){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(w),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(w,S){this._normal.resize(w,S),this._alt.resize(w,S),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}s.BufferSet=_},511:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CellData=void 0;const f=u(482),m=u(643),d=u(3734);class _ extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const S=new _;return S.setFromCharData(w),S}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let S=!1;if(w[m.CHAR_DATA_CHAR_INDEX].length>2)S=!0;else if(w[m.CHAR_DATA_CHAR_INDEX].length===2){const c=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){const a=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=a&&a<=57343?this.content=1024*(c-55296)+a-56320+65536|w[m.CHAR_DATA_WIDTH_INDEX]<<22:S=!0}else S=!0}else this.content=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[m.CHAR_DATA_WIDTH_INDEX]<<22;S&&(this.combinedData=w[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}s.CellData=_},643:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.WHITESPACE_CELL_CODE=s.WHITESPACE_CELL_WIDTH=s.WHITESPACE_CELL_CHAR=s.NULL_CELL_CODE=s.NULL_CELL_WIDTH=s.NULL_CELL_CHAR=s.CHAR_DATA_CODE_INDEX=s.CHAR_DATA_WIDTH_INDEX=s.CHAR_DATA_CHAR_INDEX=s.CHAR_DATA_ATTR_INDEX=s.DEFAULT_EXT=s.DEFAULT_ATTR=s.DEFAULT_COLOR=void 0,s.DEFAULT_COLOR=0,s.DEFAULT_ATTR=256|s.DEFAULT_COLOR<<9,s.DEFAULT_EXT=0,s.CHAR_DATA_ATTR_INDEX=0,s.CHAR_DATA_CHAR_INDEX=1,s.CHAR_DATA_WIDTH_INDEX=2,s.CHAR_DATA_CODE_INDEX=3,s.NULL_CELL_CHAR="",s.NULL_CELL_WIDTH=1,s.NULL_CELL_CODE=0,s.WHITESPACE_CELL_CHAR=" ",s.WHITESPACE_CELL_WIDTH=1,s.WHITESPACE_CELL_CODE=32},4863:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Marker=void 0;const f=u(8460),m=u(844);class d{get id(){return this._id}constructor(C){this.line=C,this.isDisposed=!1,this._disposables=[],this._id=d._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(C){return this._disposables.push(C),C}}s.Marker=d,d._nextId=1},7116:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DEFAULT_CHARSET=s.CHARSETS=void 0,s.CHARSETS={},s.DEFAULT_CHARSET=s.CHARSETS.B,s.CHARSETS[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:"≥","{":"π","|":"≠","}":"£","~":"·"},s.CHARSETS.A={"#":"£"},s.CHARSETS.B=void 0,s.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},s.CHARSETS.C=s.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},s.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},s.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},s.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},s.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},s.CHARSETS.E=s.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},s.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},s.CHARSETS.H=s.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},s.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(v,s)=>{var u,f,m;Object.defineProperty(s,"__esModule",{value:!0}),s.C1_ESCAPED=s.C1=s.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
|
|
47
|
+
`,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""}(u||(s.C0=u={})),function(d){d.PAD="",d.HOP="",d.BPH="",d.NBH="",d.IND="",d.NEL="
",d.SSA="",d.ESA="",d.HTS="",d.HTJ="",d.VTS="",d.PLD="",d.PLU="",d.RI="",d.SS2="",d.SS3="",d.DCS="",d.PU1="",d.PU2="",d.STS="",d.CCH="",d.MW="",d.SPA="",d.EPA="",d.SOS="",d.SGCI="",d.SCI="",d.CSI="",d.ST="",d.OSC="",d.PM="",d.APC=""}(f||(s.C1=f={})),function(d){d.ST=`${u.ESC}\\`}(m||(s.C1_ESCAPED=m={}))},7399:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.evaluateKeyboardEvent=void 0;const f=u(2584),m={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:["'",'"']};s.evaluateKeyboardEvent=function(d,_,C,w){const S={type:0,cancel:!1,key:void 0},c=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?S.key=_?f.C0.ESC+"OA":f.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?S.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?S.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(S.key=_?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:if(d.altKey){S.key=f.C0.ESC+f.C0.DEL;break}S.key=f.C0.DEL;break;case 9:if(d.shiftKey){S.key=f.C0.ESC+"[Z";break}S.key=f.C0.HT,S.cancel=!0;break;case 13:S.key=d.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,S.cancel=!0;break;case 27:S.key=f.C0.ESC,d.altKey&&(S.key=f.C0.ESC+f.C0.ESC),S.cancel=!0;break;case 37:if(d.metaKey)break;c?(S.key=f.C0.ESC+"[1;"+(c+1)+"D",S.key===f.C0.ESC+"[1;3D"&&(S.key=f.C0.ESC+(C?"b":"[1;5D"))):S.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(d.metaKey)break;c?(S.key=f.C0.ESC+"[1;"+(c+1)+"C",S.key===f.C0.ESC+"[1;3C"&&(S.key=f.C0.ESC+(C?"f":"[1;5C"))):S.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(d.metaKey)break;c?(S.key=f.C0.ESC+"[1;"+(c+1)+"A",C||S.key!==f.C0.ESC+"[1;3A"||(S.key=f.C0.ESC+"[1;5A")):S.key=_?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(d.metaKey)break;c?(S.key=f.C0.ESC+"[1;"+(c+1)+"B",C||S.key!==f.C0.ESC+"[1;3B"||(S.key=f.C0.ESC+"[1;5B")):S.key=_?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(S.key=f.C0.ESC+"[2~");break;case 46:S.key=c?f.C0.ESC+"[3;"+(c+1)+"~":f.C0.ESC+"[3~";break;case 36:S.key=c?f.C0.ESC+"[1;"+(c+1)+"H":_?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:S.key=c?f.C0.ESC+"[1;"+(c+1)+"F":_?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:d.shiftKey?S.type=2:d.ctrlKey?S.key=f.C0.ESC+"[5;"+(c+1)+"~":S.key=f.C0.ESC+"[5~";break;case 34:d.shiftKey?S.type=3:d.ctrlKey?S.key=f.C0.ESC+"[6;"+(c+1)+"~":S.key=f.C0.ESC+"[6~";break;case 112:S.key=c?f.C0.ESC+"[1;"+(c+1)+"P":f.C0.ESC+"OP";break;case 113:S.key=c?f.C0.ESC+"[1;"+(c+1)+"Q":f.C0.ESC+"OQ";break;case 114:S.key=c?f.C0.ESC+"[1;"+(c+1)+"R":f.C0.ESC+"OR";break;case 115:S.key=c?f.C0.ESC+"[1;"+(c+1)+"S":f.C0.ESC+"OS";break;case 116:S.key=c?f.C0.ESC+"[15;"+(c+1)+"~":f.C0.ESC+"[15~";break;case 117:S.key=c?f.C0.ESC+"[17;"+(c+1)+"~":f.C0.ESC+"[17~";break;case 118:S.key=c?f.C0.ESC+"[18;"+(c+1)+"~":f.C0.ESC+"[18~";break;case 119:S.key=c?f.C0.ESC+"[19;"+(c+1)+"~":f.C0.ESC+"[19~";break;case 120:S.key=c?f.C0.ESC+"[20;"+(c+1)+"~":f.C0.ESC+"[20~";break;case 121:S.key=c?f.C0.ESC+"[21;"+(c+1)+"~":f.C0.ESC+"[21~";break;case 122:S.key=c?f.C0.ESC+"[23;"+(c+1)+"~":f.C0.ESC+"[23~";break;case 123:S.key=c?f.C0.ESC+"[24;"+(c+1)+"~":f.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(C&&!w||!d.altKey||d.metaKey)!C||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?S.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(S.key=f.C0.US),d.key==="@"&&(S.key=f.C0.NUL)):d.keyCode===65&&(S.type=1);else{const a=m[d.keyCode],n=a==null?void 0:a[d.shiftKey?1:0];if(n)S.key=f.C0.ESC+n;else if(d.keyCode>=65&&d.keyCode<=90){const l=d.ctrlKey?d.keyCode-64:d.keyCode+32;let p=String.fromCharCode(l);d.shiftKey&&(p=p.toUpperCase()),S.key=f.C0.ESC+p}else if(d.keyCode===32)S.key=f.C0.ESC+(d.ctrlKey?f.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let l=d.code.slice(3,4);d.shiftKey||(l=l.toLowerCase()),S.key=f.C0.ESC+l,S.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?S.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?S.key=f.C0.NUL:d.keyCode>=51&&d.keyCode<=55?S.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?S.key=f.C0.DEL:d.keyCode===219?S.key=f.C0.ESC:d.keyCode===220?S.key=f.C0.FS:d.keyCode===221&&(S.key=f.C0.GS)}return S}},482:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Utf8ToUtf32=s.StringToUtf32=s.utf32ToString=s.stringFromCodePoint=void 0,s.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},s.utf32ToString=function(u,f=0,m=u.length){let d="";for(let _=f;_<m;++_){let C=u[_];C>65535?(C-=65536,d+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):d+=String.fromCharCode(C)}return d},s.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const m=u.length;if(!m)return 0;let d=0,_=0;if(this._interim){const C=u.charCodeAt(_++);56320<=C&&C<=57343?f[d++]=1024*(this._interim-55296)+C-56320+65536:(f[d++]=this._interim,f[d++]=C),this._interim=0}for(let C=_;C<m;++C){const w=u.charCodeAt(C);if(55296<=w&&w<=56319){if(++C>=m)return this._interim=w,d;const S=u.charCodeAt(C);56320<=S&&S<=57343?f[d++]=1024*(w-55296)+S-56320+65536:(f[d++]=w,f[d++]=S)}else w!==65279&&(f[d++]=w)}return d}},s.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const m=u.length;if(!m)return 0;let d,_,C,w,S=0,c=0,a=0;if(this.interim[0]){let p=!1,y=this.interim[0];y&=(224&y)==192?31:(240&y)==224?15:7;let x,k=0;for(;(x=63&this.interim[++k])&&k<4;)y<<=6,y|=x;const g=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,b=g-k;for(;a<b;){if(a>=m)return 0;if(x=u[a++],(192&x)!=128){a--,p=!0;break}this.interim[k++]=x,y<<=6,y|=63&x}p||(g===2?y<128?a--:f[S++]=y:g===3?y<2048||y>=55296&&y<=57343||y===65279||(f[S++]=y):y<65536||y>1114111||(f[S++]=y)),this.interim.fill(0)}const n=m-4;let l=a;for(;l<m;){for(;!(!(l<n)||128&(d=u[l])||128&(_=u[l+1])||128&(C=u[l+2])||128&(w=u[l+3]));)f[S++]=d,f[S++]=_,f[S++]=C,f[S++]=w,l+=4;if(d=u[l++],d<128)f[S++]=d;else if((224&d)==192){if(l>=m)return this.interim[0]=d,S;if(_=u[l++],(192&_)!=128){l--;continue}if(c=(31&d)<<6|63&_,c<128){l--;continue}f[S++]=c}else if((240&d)==224){if(l>=m)return this.interim[0]=d,S;if(_=u[l++],(192&_)!=128){l--;continue}if(l>=m)return this.interim[0]=d,this.interim[1]=_,S;if(C=u[l++],(192&C)!=128){l--;continue}if(c=(15&d)<<12|(63&_)<<6|63&C,c<2048||c>=55296&&c<=57343||c===65279)continue;f[S++]=c}else if((248&d)==240){if(l>=m)return this.interim[0]=d,S;if(_=u[l++],(192&_)!=128){l--;continue}if(l>=m)return this.interim[0]=d,this.interim[1]=_,S;if(C=u[l++],(192&C)!=128){l--;continue}if(l>=m)return this.interim[0]=d,this.interim[1]=_,this.interim[2]=C,S;if(w=u[l++],(192&w)!=128){l--;continue}if(c=(7&d)<<18|(63&_)<<12|(63&C)<<6|63&w,c<65536||c>1114111)continue;f[S++]=c}}return S}}},225:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeV6=void 0;const u=[[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]],f=[[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]];let m;s.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let d=0;d<u.length;++d)m.fill(0,u[d][0],u[d][1]+1)}}wcwidth(d){return d<32?0:d<127?1:d<65536?m[d]:function(_,C){let w,S=0,c=C.length-1;if(_<C[0][0]||_>C[c][1])return!1;for(;c>=S;)if(w=S+c>>1,_>C[w][1])S=w+1;else{if(!(_<C[w][0]))return!0;c=w-1}return!1}(d,f)?0:d>=131072&&d<=196605||d>=196608&&d<=262141?2:1}}},5981:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.WriteBuffer=void 0;const f=u(8460),m=u(844);class d extends m.Disposable{constructor(C){super(),this._action=C,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(C,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let S;for(this._isSyncWriting=!0;S=this._writeBuffer.shift();){this._action(S);const c=this._callbacks.shift();c&&c()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,w){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(w),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(w)}_innerWrite(C=0,w=!0){const S=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const c=this._writeBuffer[this._bufferOffset],a=this._action(c,w);if(a){const l=p=>Date.now()-S>=12?setTimeout(()=>this._innerWrite(0,p)):this._innerWrite(S,p);return void a.catch(p=>(queueMicrotask(()=>{throw p}),Promise.resolve(!1))).then(l)}const n=this._callbacks[this._bufferOffset];if(n&&n(),this._bufferOffset++,this._pendingData-=c.length,Date.now()-S>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(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()}}s.WriteBuffer=d},5941:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.toRgbString=s.parseColor=void 0;const u=/^([\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})$/,f=/^[\da-f]+$/;function m(d,_){const C=d.toString(16),w=C.length<2?"0"+C:C;switch(_){case 4:return C[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}s.parseColor=function(d){if(!d)return;let _=d.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const C=u.exec(_);if(C){const w=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/w*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/w*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/w*255)]}}else if(_.indexOf("#")===0&&(_=_.slice(1),f.exec(_)&&[3,6,9,12].includes(_.length))){const C=_.length/3,w=[0,0,0];for(let S=0;S<3;++S){const c=parseInt(_.slice(C*S,C*S+C),16);w[S]=C===1?c<<4:C===2?c:C===3?c>>4:c>>8}return w}},s.toRgbString=function(d,_=16){const[C,w,S]=d;return`rgb:${m(C,_)}/${m(w,_)}/${m(S,_)}`}},5770:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.PAYLOAD_LIMIT=void 0,s.PAYLOAD_LIMIT=1e7},6351:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DcsHandler=s.DcsParser=void 0;const f=u(482),m=u(8742),d=u(5770),_=[];s.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}registerHandler(w,S){this._handlers[w]===void 0&&(this._handlers[w]=[]);const c=this._handlers[w];return c.push(S),{dispose:()=>{const a=c.indexOf(S);a!==-1&&c.splice(a,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}reset(){if(this._active.length)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].unhook(!1);this._stack.paused=!1,this._active=_,this._ident=0}hook(w,S){if(this.reset(),this._ident=w,this._active=this._handlers[w]||_,this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].hook(S);else this._handlerFb(this._ident,"HOOK",S)}put(w,S,c){if(this._active.length)for(let a=this._active.length-1;a>=0;a--)this._active[a].put(w,S,c);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(w,S,c))}unhook(w,S=!0){if(this._active.length){let c=!1,a=this._active.length-1,n=!1;if(this._stack.paused&&(a=this._stack.loopPosition-1,c=S,n=this._stack.fallThrough,this._stack.paused=!1),!n&&c===!1){for(;a>=0&&(c=this._active[a].unhook(w),c!==!0);a--)if(c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=a,this._stack.fallThrough=!1,c;a--}for(;a>=0;a--)if(c=this._active[a].unhook(!1),c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=a,this._stack.fallThrough=!0,c}else this._handlerFb(this._ident,"UNHOOK",w);this._active=_,this._ident=0}};const C=new m.Params;C.addParam(0),s.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=C,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():C,this._data="",this._hitLimit=!1}put(w,S,c){this._hitLimit||(this._data+=(0,f.utf32ToString)(w,S,c),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let S=!1;if(this._hitLimit)S=!1;else if(w&&(S=this._handler(this._data,this._params),S instanceof Promise))return S.then(c=>(this._params=C,this._data="",this._hitLimit=!1,c));return this._params=C,this._data="",this._hitLimit=!1,S}}},2015:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.EscapeSequenceParser=s.VT500_TRANSITION_TABLE=s.TransitionTable=void 0;const f=u(844),m=u(8742),d=u(6242),_=u(6351);class C{constructor(a){this.table=new Uint8Array(a)}setDefault(a,n){this.table.fill(a<<4|n)}add(a,n,l,p){this.table[n<<8|a]=l<<4|p}addMany(a,n,l,p){for(let y=0;y<a.length;y++)this.table[n<<8|a[y]]=l<<4|p}}s.TransitionTable=C;const w=160;s.VT500_TRANSITION_TABLE=function(){const c=new C(4095),a=Array.apply(null,Array(256)).map((k,g)=>g),n=(k,g)=>a.slice(k,g),l=n(32,127),p=n(0,24);p.push(25),p.push.apply(p,n(28,32));const y=n(0,14);let x;for(x in c.setDefault(1,0),c.addMany(l,0,2,0),y)c.addMany([24,26,153,154],x,3,0),c.addMany(n(128,144),x,3,0),c.addMany(n(144,152),x,3,0),c.add(156,x,0,0),c.add(27,x,11,1),c.add(157,x,4,8),c.addMany([152,158,159],x,0,7),c.add(155,x,11,3),c.add(144,x,11,9);return c.addMany(p,0,3,0),c.addMany(p,1,3,1),c.add(127,1,0,1),c.addMany(p,8,0,8),c.addMany(p,3,3,3),c.add(127,3,0,3),c.addMany(p,4,3,4),c.add(127,4,0,4),c.addMany(p,6,3,6),c.addMany(p,5,3,5),c.add(127,5,0,5),c.addMany(p,2,3,2),c.add(127,2,0,2),c.add(93,1,4,8),c.addMany(l,8,5,8),c.add(127,8,5,8),c.addMany([156,27,24,26,7],8,6,0),c.addMany(n(28,32),8,0,8),c.addMany([88,94,95],1,0,7),c.addMany(l,7,0,7),c.addMany(p,7,0,7),c.add(156,7,0,0),c.add(127,7,0,7),c.add(91,1,11,3),c.addMany(n(64,127),3,7,0),c.addMany(n(48,60),3,8,4),c.addMany([60,61,62,63],3,9,4),c.addMany(n(48,60),4,8,4),c.addMany(n(64,127),4,7,0),c.addMany([60,61,62,63],4,0,6),c.addMany(n(32,64),6,0,6),c.add(127,6,0,6),c.addMany(n(64,127),6,0,0),c.addMany(n(32,48),3,9,5),c.addMany(n(32,48),5,9,5),c.addMany(n(48,64),5,0,6),c.addMany(n(64,127),5,7,0),c.addMany(n(32,48),4,9,5),c.addMany(n(32,48),1,9,2),c.addMany(n(32,48),2,9,2),c.addMany(n(48,127),2,10,0),c.addMany(n(48,80),1,10,0),c.addMany(n(81,88),1,10,0),c.addMany([89,90,92],1,10,0),c.addMany(n(96,127),1,10,0),c.add(80,1,11,9),c.addMany(p,9,0,9),c.add(127,9,0,9),c.addMany(n(28,32),9,0,9),c.addMany(n(32,48),9,9,12),c.addMany(n(48,60),9,8,10),c.addMany([60,61,62,63],9,9,10),c.addMany(p,11,0,11),c.addMany(n(32,128),11,0,11),c.addMany(n(28,32),11,0,11),c.addMany(p,10,0,10),c.add(127,10,0,10),c.addMany(n(28,32),10,0,10),c.addMany(n(48,60),10,8,10),c.addMany([60,61,62,63],10,0,11),c.addMany(n(32,48),10,9,12),c.addMany(p,12,0,12),c.add(127,12,0,12),c.addMany(n(28,32),12,0,12),c.addMany(n(32,48),12,9,12),c.addMany(n(48,64),12,0,11),c.addMany(n(64,127),12,12,13),c.addMany(n(64,127),10,12,13),c.addMany(n(64,127),9,12,13),c.addMany(p,13,13,13),c.addMany(l,13,13,13),c.add(127,13,0,13),c.addMany([27,156,24,26],13,14,0),c.add(w,0,2,0),c.add(w,8,5,8),c.add(w,6,0,6),c.add(w,11,0,11),c.add(w,13,13,13),c}();class S extends f.Disposable{constructor(a=s.VT500_TRANSITION_TABLE){super(),this._transitions=a,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(n,l,p)=>{},this._executeHandlerFb=n=>{},this._csiHandlerFb=(n,l)=>{},this._escHandlerFb=n=>{},this._errorHandlerFb=n=>n,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new d.OscParser),this._dcsParser=this.register(new _.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(a,n=[64,126]){let l=0;if(a.prefix){if(a.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=a.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(a.intermediates){if(a.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let y=0;y<a.intermediates.length;++y){const x=a.intermediates.charCodeAt(y);if(32>x||x>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=x}}if(a.final.length!==1)throw new Error("final must be a single byte");const p=a.final.charCodeAt(0);if(n[0]>p||p>n[1])throw new Error(`final must be in range ${n[0]} .. ${n[1]}`);return l<<=8,l|=p,l}identToString(a){const n=[];for(;a;)n.push(String.fromCharCode(255&a)),a>>=8;return n.reverse().join("")}setPrintHandler(a){this._printHandler=a}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(a,n){const l=this._identifier(a,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const p=this._escHandlers[l];return p.push(n),{dispose:()=>{const y=p.indexOf(n);y!==-1&&p.splice(y,1)}}}clearEscHandler(a){this._escHandlers[this._identifier(a,[48,126])]&&delete this._escHandlers[this._identifier(a,[48,126])]}setEscHandlerFallback(a){this._escHandlerFb=a}setExecuteHandler(a,n){this._executeHandlers[a.charCodeAt(0)]=n}clearExecuteHandler(a){this._executeHandlers[a.charCodeAt(0)]&&delete this._executeHandlers[a.charCodeAt(0)]}setExecuteHandlerFallback(a){this._executeHandlerFb=a}registerCsiHandler(a,n){const l=this._identifier(a);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const p=this._csiHandlers[l];return p.push(n),{dispose:()=>{const y=p.indexOf(n);y!==-1&&p.splice(y,1)}}}clearCsiHandler(a){this._csiHandlers[this._identifier(a)]&&delete this._csiHandlers[this._identifier(a)]}setCsiHandlerFallback(a){this._csiHandlerFb=a}registerDcsHandler(a,n){return this._dcsParser.registerHandler(this._identifier(a),n)}clearDcsHandler(a){this._dcsParser.clearHandler(this._identifier(a))}setDcsHandlerFallback(a){this._dcsParser.setHandlerFallback(a)}registerOscHandler(a,n){return this._oscParser.registerHandler(a,n)}clearOscHandler(a){this._oscParser.clearHandler(a)}setOscHandlerFallback(a){this._oscParser.setHandlerFallback(a)}setErrorHandler(a){this._errorHandler=a}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.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(a,n,l,p,y){this._parseStack.state=a,this._parseStack.handlers=n,this._parseStack.handlerPos=l,this._parseStack.transition=p,this._parseStack.chunkPos=y}parse(a,n,l){let p,y=0,x=0,k=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,k=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const g=this._parseStack.handlers;let b=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&b>-1){for(;b>=0&&(p=g[b](this._params),p!==!0);b--)if(p instanceof Promise)return this._parseStack.handlerPos=b,p}this._parseStack.handlers=[];break;case 4:if(l===!1&&b>-1){for(;b>=0&&(p=g[b](),p!==!0);b--)if(p instanceof Promise)return this._parseStack.handlerPos=b,p}this._parseStack.handlers=[];break;case 6:if(y=a[this._parseStack.chunkPos],p=this._dcsParser.unhook(y!==24&&y!==26,l),p)return p;y===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(y=a[this._parseStack.chunkPos],p=this._oscParser.end(y!==24&&y!==26,l),p)return p;y===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,k=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let g=k;g<n;++g){switch(y=a[g],x=this._transitions.table[this.currentState<<8|(y<160?y:w)],x>>4){case 2:for(let B=g+1;;++B){if(B>=n||(y=a[B])<32||y>126&&y<w){this._printHandler(a,g,B),g=B-1;break}if(++B>=n||(y=a[B])<32||y>126&&y<w){this._printHandler(a,g,B),g=B-1;break}if(++B>=n||(y=a[B])<32||y>126&&y<w){this._printHandler(a,g,B),g=B-1;break}if(++B>=n||(y=a[B])<32||y>126&&y<w){this._printHandler(a,g,B),g=B-1;break}}break;case 3:this._executeHandlers[y]?this._executeHandlers[y]():this._executeHandlerFb(y),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:g,code:y,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const b=this._csiHandlers[this._collect<<8|y];let D=b?b.length-1:-1;for(;D>=0&&(p=b[D](this._params),p!==!0);D--)if(p instanceof Promise)return this._preserveStack(3,b,D,x,g),p;D<0&&this._csiHandlerFb(this._collect<<8|y,this._params),this.precedingCodepoint=0;break;case 8:do switch(y){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(y-48)}while(++g<n&&(y=a[g])>47&&y<60);g--;break;case 9:this._collect<<=8,this._collect|=y;break;case 10:const M=this._escHandlers[this._collect<<8|y];let P=M?M.length-1:-1;for(;P>=0&&(p=M[P](),p!==!0);P--)if(p instanceof Promise)return this._preserveStack(4,M,P,x,g),p;P<0&&this._escHandlerFb(this._collect<<8|y),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|y,this._params);break;case 13:for(let B=g+1;;++B)if(B>=n||(y=a[B])===24||y===26||y===27||y>127&&y<w){this._dcsParser.put(a,g,B),g=B-1;break}break;case 14:if(p=this._dcsParser.unhook(y!==24&&y!==26),p)return this._preserveStack(6,[],0,x,g),p;y===27&&(x|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let B=g+1;;B++)if(B>=n||(y=a[B])<32||y>127&&y<w){this._oscParser.put(a,g,B),g=B-1;break}break;case 6:if(p=this._oscParser.end(y!==24&&y!==26),p)return this._preserveStack(5,[],0,x,g),p;y===27&&(x|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&x}}}s.EscapeSequenceParser=S},6242:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.OscHandler=s.OscParser=void 0;const f=u(5770),m=u(482),d=[];s.OscParser=class{constructor(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(_,C){this._handlers[_]===void 0&&(this._handlers[_]=[]);const w=this._handlers[_];return w.push(C),{dispose:()=>{const S=w.indexOf(C);S!==-1&&w.splice(S,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}reset(){if(this._state===2)for(let _=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;_>=0;--_)this._active[_].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||d,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,C,w){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(_,C,w);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(_,C,w))}start(){this.reset(),this._state=1}put(_,C,w){if(this._state!==3){if(this._state===1)for(;C<w;){const S=_[C++];if(S===59){this._state=2,this._start();break}if(S<48||57<S)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+S-48}this._state===2&&w-C>0&&this._put(_,C,w)}}end(_,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,S=this._active.length-1,c=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,w=C,c=this._stack.fallThrough,this._stack.paused=!1),!c&&w===!1){for(;S>=0&&(w=this._active[S].end(_),w!==!0);S--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,w;S--}for(;S>=0;S--)if(w=this._active[S].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",_);this._active=d,this._id=-1,this._state=0}}},s.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,C,w){this._hitLimit||(this._data+=(0,m.utf32ToString)(_,C,w),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let C=!1;if(this._hitLimit)C=!1;else if(_&&(C=this._handler(this._data),C instanceof Promise))return C.then(w=>(this._data="",this._hitLimit=!1,w));return this._data="",this._hitLimit=!1,C}}},8742:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Params=void 0;const u=2147483647;class f{static fromArray(d){const _=new f;if(!d.length)return _;for(let C=Array.isArray(d[0])?1:0;C<d.length;++C){const w=d[C];if(Array.isArray(w))for(let S=0;S<w.length;++S)_.addSubParam(w[S]);else _.addParam(w)}return _}constructor(d=32,_=32){if(this.maxLength=d,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const d=new f(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d}toArray(){const d=[];for(let _=0;_<this.length;++_){d.push(this.params[_]);const C=this._subParamsIdx[_]>>8,w=255&this._subParamsIdx[_];w-C>0&&d.push(Array.prototype.slice.call(this._subParams,C,w))}return d}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>u?u:d}}addSubParam(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>u?u:d,this._subParamsIdx[this.length-1]++}}hasSubParams(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0}getSubParams(d){const _=this._subParamsIdx[d]>>8,C=255&this._subParamsIdx[d];return C-_>0?this._subParams.subarray(_,C):null}getSubParamsAll(){const d={};for(let _=0;_<this.length;++_){const C=this._subParamsIdx[_]>>8,w=255&this._subParamsIdx[_];w-C>0&&(d[_]=this._subParams.slice(C,w))}return d}addDigit(d){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,w=C[_-1];C[_-1]=~w?Math.min(10*w+d,u):d}}s.Params=f},5741:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.AddonManager=void 0,s.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,f){const m={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(m),f.dispose=()=>this._wrappedAddonDispose(m),f.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let f=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===u){f=m;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}}},8771:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferApiView=void 0;const f=u(3785),m=u(511);s.BufferApiView=class{constructor(d,_){this._buffer=d,this.type=_}init(d){return this._buffer=d,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(d){const _=this._buffer.lines.get(d);if(_)return new f.BufferLineApiView(_)}getNullCell(){return new m.CellData}}},3785:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferLineApiView=void 0;const f=u(511);s.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,d){if(!(m<0||m>=this._line.length))return d?(this._line.loadCell(m,d),d):this._line.loadCell(m,new f.CellData)}translateToString(m,d,_){return this._line.translateToString(m,d,_)}}},8285:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferNamespaceApi=void 0;const f=u(8771),m=u(8460),d=u(844);class _ extends d.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(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)}}s.BufferNamespaceApi=_},7975:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ParserApi=void 0,s.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,f){return this._core.registerCsiHandler(u,m=>f(m.toArray()))}addCsiHandler(u,f){return this.registerCsiHandler(u,f)}registerDcsHandler(u,f){return this._core.registerDcsHandler(u,(m,d)=>f(m,d.toArray()))}addDcsHandler(u,f){return this.registerDcsHandler(u,f)}registerEscHandler(u,f){return this._core.registerEscHandler(u,f)}addEscHandler(u,f){return this.registerEscHandler(u,f)}registerOscHandler(u,f){return this._core.registerOscHandler(u,f)}addOscHandler(u,f){return this.registerOscHandler(u,f)}}},7090:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeApi=void 0,s.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(v,s,u){var f=this&&this.__decorate||function(c,a,n,l){var p,y=arguments.length,x=y<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,a,n,l);else for(var k=c.length-1;k>=0;k--)(p=c[k])&&(x=(y<3?p(x):y>3?p(a,n,x):p(a,n))||x);return y>3&&x&&Object.defineProperty(a,n,x),x},m=this&&this.__param||function(c,a){return function(n,l){a(n,l,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.BufferService=s.MINIMUM_ROWS=s.MINIMUM_COLS=void 0;const d=u(8460),_=u(844),C=u(5295),w=u(2585);s.MINIMUM_COLS=2,s.MINIMUM_ROWS=1;let S=s.BufferService=class extends _.Disposable{get buffer(){return this.buffers.active}constructor(c){super(),this.isUserScrolling=!1,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(c.rawOptions.cols||0,s.MINIMUM_COLS),this.rows=Math.max(c.rawOptions.rows||0,s.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(c,this))}resize(c,a){this.cols=c,this.rows=a,this.buffers.resize(c,a),this._onResize.fire({cols:c,rows:a})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(c,a=!1){const n=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===c.fg&&l.getBg(0)===c.bg||(l=n.getBlankLine(c,a),this._cachedBlankLine=l),l.isWrapped=a;const p=n.ybase+n.scrollTop,y=n.ybase+n.scrollBottom;if(n.scrollTop===0){const x=n.lines.isFull;y===n.lines.length-1?x?n.lines.recycle().copyFrom(l):n.lines.push(l.clone()):n.lines.splice(y+1,0,l.clone()),x?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{const x=y-p+1;n.lines.shiftElements(p+1,x-1,-1),n.lines.set(y,l.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(c,a,n){const l=this.buffer;if(c<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else c+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const p=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+c,l.ybase),0),p!==l.ydisp&&(a||this._onScroll.fire(l.ydisp))}};s.BufferService=S=f([m(0,w.IOptionsService)],S)},7994:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CharsetService=void 0,s.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)}}},1753:function(v,s,u){var f=this&&this.__decorate||function(l,p,y,x){var k,g=arguments.length,b=g<3?p:x===null?x=Object.getOwnPropertyDescriptor(p,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,p,y,x);else for(var D=l.length-1;D>=0;D--)(k=l[D])&&(b=(g<3?k(b):g>3?k(p,y,b):k(p,y))||b);return g>3&&b&&Object.defineProperty(p,y,b),b},m=this&&this.__param||function(l,p){return function(y,x){p(y,x,l)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CoreMouseService=void 0;const d=u(2585),_=u(8460),C=u(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function S(l,p){let y=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(y|=64,y|=l.action):(y|=3&l.button,4&l.button&&(y|=64),8&l.button&&(y|=128),l.action===32?y|=32:l.action!==0||p||(y|=3)),y}const c=String.fromCharCode,a={DEFAULT:l=>{const p=[S(l,!1)+32,l.col+32,l.row+32];return p[0]>255||p[1]>255||p[2]>255?"":`\x1B[M${c(p[0])}${c(p[1])}${c(p[2])}`},SGR:l=>{const p=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${S(l,!0)};${l.col};${l.row}${p}`},SGR_PIXELS:l=>{const p=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${S(l,!0)};${l.x};${l.y}${p}`}};let n=s.CoreMouseService=class extends C.Disposable{constructor(l,p){super(),this._bufferService=l,this._coreService=p,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new _.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const y of Object.keys(w))this.addProtocol(y,w[y]);for(const y of Object.keys(a))this.addEncoding(y,a[y]);this.reset()}addProtocol(l,p){this._protocols[l]=p}addEncoding(l,p){this._encodings[l]=p}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const p=this._encodings[this._activeEncoding](l);return p&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(p):this._coreService.triggerDataEvent(p,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,p,y){if(y){if(l.x!==p.x||l.y!==p.y)return!1}else if(l.col!==p.col||l.row!==p.row)return!1;return l.button===p.button&&l.action===p.action&&l.ctrl===p.ctrl&&l.alt===p.alt&&l.shift===p.shift}};s.CoreMouseService=n=f([m(0,d.IBufferService),m(1,d.ICoreService)],n)},6975:function(v,s,u){var f=this&&this.__decorate||function(n,l,p,y){var x,k=arguments.length,g=k<3?l:y===null?y=Object.getOwnPropertyDescriptor(l,p):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,l,p,y);else for(var b=n.length-1;b>=0;b--)(x=n[b])&&(g=(k<3?x(g):k>3?x(l,p,g):x(l,p))||g);return k>3&&g&&Object.defineProperty(l,p,g),g},m=this&&this.__param||function(n,l){return function(p,y){l(p,y,n)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CoreService=void 0;const d=u(1439),_=u(8460),C=u(844),w=u(2585),S=Object.freeze({insertMode:!1}),c=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let a=s.CoreService=class extends C.Disposable{constructor(n,l,p){super(),this._bufferService=n,this._logService=l,this._optionsService=p,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new _.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new _.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,d.clone)(S),this.decPrivateModes=(0,d.clone)(c)}reset(){this.modes=(0,d.clone)(S),this.decPrivateModes=(0,d.clone)(c)}triggerDataEvent(n,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const p=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&p.ybase!==p.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${n}"`,()=>n.split("").map(y=>y.charCodeAt(0))),this._onData.fire(n)}triggerBinaryEvent(n){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${n}"`,()=>n.split("").map(l=>l.charCodeAt(0))),this._onBinary.fire(n))}};s.CoreService=a=f([m(0,w.IBufferService),m(1,w.ILogService),m(2,w.IOptionsService)],a)},9074:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DecorationService=void 0;const f=u(8055),m=u(8460),d=u(844),_=u(6106);let C=0,w=0;class S extends d.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new _.SortedList(n=>n==null?void 0:n.marker.line),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,d.toDisposable)(()=>this.reset()))}registerDecoration(n){if(n.marker.isDisposed)return;const l=new c(n);if(l){const p=l.marker.onDispose(()=>l.dispose());l.onDispose(()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),p.dispose())}),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const n of this._decorations.values())n.dispose();this._decorations.clear()}*getDecorationsAtCell(n,l,p){var y,x,k;let g=0,b=0;for(const D of this._decorations.getKeyIterator(l))g=(y=D.options.x)!==null&&y!==void 0?y:0,b=g+((x=D.options.width)!==null&&x!==void 0?x:1),n>=g&&n<b&&(!p||((k=D.options.layer)!==null&&k!==void 0?k:"bottom")===p)&&(yield D)}forEachDecorationAtCell(n,l,p,y){this._decorations.forEachByKey(l,x=>{var k,g,b;C=(k=x.options.x)!==null&&k!==void 0?k:0,w=C+((g=x.options.width)!==null&&g!==void 0?g:1),n>=C&&n<w&&(!p||((b=x.options.layer)!==null&&b!==void 0?b:"bottom")===p)&&y(x)})}}s.DecorationService=S;class c extends d.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(n){super(),this.options=n,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=n.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.InstantiationService=s.ServiceCollection=void 0;const f=u(2585),m=u(8343);class d{constructor(...C){this._entries=new Map;for(const[w,S]of C)this.set(w,S)}set(C,w){const S=this._entries.get(C);return this._entries.set(C,w),S}forEach(C){for(const[w,S]of this._entries.entries())C(w,S)}has(C){return this._entries.has(C)}get(C){return this._entries.get(C)}}s.ServiceCollection=d,s.InstantiationService=class{constructor(){this._services=new d,this._services.set(f.IInstantiationService,this)}setService(_,C){this._services.set(_,C)}getService(_){return this._services.get(_)}createInstance(_,...C){const w=(0,m.getServiceDependencies)(_).sort((a,n)=>a.index-n.index),S=[];for(const a of w){const n=this._services.get(a.id);if(!n)throw new Error(`[createInstance] ${_.name} depends on UNKNOWN service ${a.id}.`);S.push(n)}const c=w.length>0?w[0].index:C.length;if(C.length!==c)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${c+1} conflicts with ${C.length} static arguments`);return new _(...C,...S)}}},7866:function(v,s,u){var f=this&&this.__decorate||function(c,a,n,l){var p,y=arguments.length,x=y<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,a,n,l);else for(var k=c.length-1;k>=0;k--)(p=c[k])&&(x=(y<3?p(x):y>3?p(a,n,x):p(a,n))||x);return y>3&&x&&Object.defineProperty(a,n,x),x},m=this&&this.__param||function(c,a){return function(n,l){a(n,l,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.traceCall=s.setTraceLogger=s.LogService=void 0;const d=u(844),_=u(2585),C={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let w,S=s.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(c){super(),this._optionsService=c,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),w=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(c){for(let a=0;a<c.length;a++)typeof c[a]=="function"&&(c[a]=c[a]())}_log(c,a,n){this._evalLazyOptionalParams(n),c.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+a,...n)}trace(c,...a){var n,l;this._logLevel<=_.LogLevelEnum.TRACE&&this._log((l=(n=this._optionsService.options.logger)===null||n===void 0?void 0:n.trace.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.log,c,a)}debug(c,...a){var n,l;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log((l=(n=this._optionsService.options.logger)===null||n===void 0?void 0:n.debug.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.log,c,a)}info(c,...a){var n,l;this._logLevel<=_.LogLevelEnum.INFO&&this._log((l=(n=this._optionsService.options.logger)===null||n===void 0?void 0:n.info.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.info,c,a)}warn(c,...a){var n,l;this._logLevel<=_.LogLevelEnum.WARN&&this._log((l=(n=this._optionsService.options.logger)===null||n===void 0?void 0:n.warn.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.warn,c,a)}error(c,...a){var n,l;this._logLevel<=_.LogLevelEnum.ERROR&&this._log((l=(n=this._optionsService.options.logger)===null||n===void 0?void 0:n.error.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.error,c,a)}};s.LogService=S=f([m(0,_.IOptionsService)],S),s.setTraceLogger=function(c){w=c},s.traceCall=function(c,a,n){if(typeof n.value!="function")throw new Error("not supported");const l=n.value;n.value=function(...p){if(w.logLevel!==_.LogLevelEnum.TRACE)return l.apply(this,p);w.trace(`GlyphRenderer#${l.name}(${p.map(x=>JSON.stringify(x)).join(", ")})`);const y=l.apply(this,p);return w.trace(`GlyphRenderer#${l.name} return`,y),y}}},7302:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.OptionsService=s.DEFAULT_OPTIONS=void 0;const f=u(8460),m=u(844),d=u(6114);s.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:d.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const _=["normal","bold","100","200","300","400","500","600","700","800","900"];class C extends m.Disposable{constructor(S){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const c=Object.assign({},s.DEFAULT_OPTIONS);for(const a in S)if(a in c)try{const n=S[a];c[a]=this._sanitizeAndValidateOption(a,n)}catch(n){console.error(n)}this.rawOptions=c,this.options=Object.assign({},c),this._setupOptions()}onSpecificOptionChange(S,c){return this.onOptionChange(a=>{a===S&&c(this.rawOptions[S])})}onMultipleOptionChange(S,c){return this.onOptionChange(a=>{S.indexOf(a)!==-1&&c()})}_setupOptions(){const S=a=>{if(!(a in s.DEFAULT_OPTIONS))throw new Error(`No option with key "${a}"`);return this.rawOptions[a]},c=(a,n)=>{if(!(a in s.DEFAULT_OPTIONS))throw new Error(`No option with key "${a}"`);n=this._sanitizeAndValidateOption(a,n),this.rawOptions[a]!==n&&(this.rawOptions[a]=n,this._onOptionChange.fire(a))};for(const a in this.rawOptions){const n={get:S.bind(this,a),set:c.bind(this,a)};Object.defineProperty(this.options,a,n)}}_sanitizeAndValidateOption(S,c){switch(S){case"cursorStyle":if(c||(c=s.DEFAULT_OPTIONS[S]),!function(a){return a==="block"||a==="underline"||a==="bar"}(c))throw new Error(`"${c}" is not a valid value for ${S}`);break;case"wordSeparator":c||(c=s.DEFAULT_OPTIONS[S]);break;case"fontWeight":case"fontWeightBold":if(typeof c=="number"&&1<=c&&c<=1e3)break;c=_.includes(c)?c:s.DEFAULT_OPTIONS[S];break;case"cursorWidth":c=Math.floor(c);case"lineHeight":case"tabStopWidth":if(c<1)throw new Error(`${S} cannot be less than 1, value: ${c}`);break;case"minimumContrastRatio":c=Math.max(1,Math.min(21,Math.round(10*c)/10));break;case"scrollback":if((c=Math.min(c,4294967295))<0)throw new Error(`${S} cannot be less than 0, value: ${c}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(c<=0)throw new Error(`${S} cannot be less than or equal to 0, value: ${c}`);break;case"rows":case"cols":if(!c&&c!==0)throw new Error(`${S} must be numeric, value: ${c}`);break;case"windowsPty":c=c??{}}return c}}s.OptionsService=C},2660:function(v,s,u){var f=this&&this.__decorate||function(C,w,S,c){var a,n=arguments.length,l=n<3?w:c===null?c=Object.getOwnPropertyDescriptor(w,S):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(C,w,S,c);else for(var p=C.length-1;p>=0;p--)(a=C[p])&&(l=(n<3?a(l):n>3?a(w,S,l):a(w,S))||l);return n>3&&l&&Object.defineProperty(w,S,l),l},m=this&&this.__param||function(C,w){return function(S,c){w(S,c,C)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkService=void 0;const d=u(2585);let _=s.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const w=this._bufferService.buffer;if(C.id===void 0){const p=w.addMarker(w.ybase+w.y),y={data:C,id:this._nextId++,lines:[p]};return p.onDispose(()=>this._removeMarkerFromLink(y,p)),this._dataByLinkId.set(y.id,y),y.id}const S=C,c=this._getEntryIdKey(S),a=this._entriesWithId.get(c);if(a)return this.addLineToLink(a.id,w.ybase+w.y),a.id;const n=w.addMarker(w.ybase+w.y),l={id:this._nextId++,key:this._getEntryIdKey(S),data:S,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(l,n)),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(C,w){const S=this._dataByLinkId.get(C);if(S&&S.lines.every(c=>c.line!==w)){const c=this._bufferService.buffer.addMarker(w);S.lines.push(c),c.onDispose(()=>this._removeMarkerFromLink(S,c))}}getLinkData(C){var w;return(w=this._dataByLinkId.get(C))===null||w===void 0?void 0:w.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,w){const S=C.lines.indexOf(w);S!==-1&&(C.lines.splice(S,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};s.OscLinkService=_=f([m(0,d.IBufferService)],_)},8343:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.createDecorator=s.getServiceDependencies=s.serviceRegistry=void 0;const u="di$target",f="di$dependencies";s.serviceRegistry=new Map,s.getServiceDependencies=function(m){return m[f]||[]},s.createDecorator=function(m){if(s.serviceRegistry.has(m))return s.serviceRegistry.get(m);const d=function(_,C,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(S,c,a){c[u]===c?c[f].push({id:S,index:a}):(c[f]=[{id:S,index:a}],c[u]=c)})(d,_,w)};return d.toString=()=>m,s.serviceRegistry.set(m,d),d}},2585:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.IDecorationService=s.IUnicodeService=s.IOscLinkService=s.IOptionsService=s.ILogService=s.LogLevelEnum=s.IInstantiationService=s.ICharsetService=s.ICoreService=s.ICoreMouseService=s.IBufferService=void 0;const f=u(8343);var m;s.IBufferService=(0,f.createDecorator)("BufferService"),s.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),s.ICoreService=(0,f.createDecorator)("CoreService"),s.ICharsetService=(0,f.createDecorator)("CharsetService"),s.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(m||(s.LogLevelEnum=m={})),s.ILogService=(0,f.createDecorator)("LogService"),s.IOptionsService=(0,f.createDecorator)("OptionsService"),s.IOscLinkService=(0,f.createDecorator)("OscLinkService"),s.IUnicodeService=(0,f.createDecorator)("UnicodeService"),s.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(v,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeService=void 0;const f=u(8460),m=u(225);s.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const d=new m.UnicodeV6;this.register(d),this._active=d.version,this._activeProvider=d}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(d){if(!this._providers[d])throw new Error(`unknown Unicode version "${d}"`);this._active=d,this._activeProvider=this._providers[d],this._onChange.fire(d)}register(d){this._providers[d.version]=d}wcwidth(d){return this._activeProvider.wcwidth(d)}getStringCellWidth(d){let _=0;const C=d.length;for(let w=0;w<C;++w){let S=d.charCodeAt(w);if(55296<=S&&S<=56319){if(++w>=C)return _+this.wcwidth(S);const c=d.charCodeAt(w);56320<=c&&c<=57343?S=1024*(S-55296)+c-56320+65536:_+=this.wcwidth(c)}_+=this.wcwidth(S)}return _}}}},i={};function o(v){var s=i[v];if(s!==void 0)return s.exports;var u=i[v]={exports:{}};return r[v].call(u.exports,u,u.exports,o),u.exports}var h={};return(()=>{var v=h;Object.defineProperty(v,"__esModule",{value:!0}),v.Terminal=void 0;const s=o(9042),u=o(3236),f=o(844),m=o(5741),d=o(8285),_=o(7975),C=o(7090),w=["cols","rows"];class S extends f.Disposable{constructor(a){super(),this._core=this.register(new u.Terminal(a)),this._addonManager=this.register(new m.AddonManager),this._publicOptions=Object.assign({},this._core.options);const n=p=>this._core.options[p],l=(p,y)=>{this._checkReadonlyOptions(p),this._core.options[p]=y};for(const p in this._core.options){const y={get:n.bind(this,p),set:l.bind(this,p)};Object.defineProperty(this._publicOptions,p,y)}}_checkReadonlyOptions(a){if(w.includes(a))throw new Error(`Option "${a}" 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 _.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new C.UnicodeApi(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 d.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const a=this._core.coreService.decPrivateModes;let n="none";switch(this._core.coreMouseService.activeProtocol){case"X10":n="x10";break;case"VT200":n="vt200";break;case"DRAG":n="drag";break;case"ANY":n="any"}return{applicationCursorKeysMode:a.applicationCursorKeys,applicationKeypadMode:a.applicationKeypad,bracketedPasteMode:a.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:n,originMode:a.origin,reverseWraparoundMode:a.reverseWraparound,sendFocusMode:a.sendFocus,wraparoundMode:a.wraparound}}get options(){return this._publicOptions}set options(a){for(const n in a)this._publicOptions[n]=a[n]}blur(){this._core.blur()}focus(){this._core.focus()}resize(a,n){this._verifyIntegers(a,n),this._core.resize(a,n)}open(a){this._core.open(a)}attachCustomKeyEventHandler(a){this._core.attachCustomKeyEventHandler(a)}registerLinkProvider(a){return this._core.registerLinkProvider(a)}registerCharacterJoiner(a){return this._checkProposedApi(),this._core.registerCharacterJoiner(a)}deregisterCharacterJoiner(a){this._checkProposedApi(),this._core.deregisterCharacterJoiner(a)}registerMarker(a=0){return this._verifyIntegers(a),this._core.registerMarker(a)}registerDecoration(a){var n,l,p;return this._checkProposedApi(),this._verifyPositiveIntegers((n=a.x)!==null&&n!==void 0?n:0,(l=a.width)!==null&&l!==void 0?l:0,(p=a.height)!==null&&p!==void 0?p:0),this._core.registerDecoration(a)}hasSelection(){return this._core.hasSelection()}select(a,n,l){this._verifyIntegers(a,n,l),this._core.select(a,n,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(a,n){this._verifyIntegers(a,n),this._core.selectLines(a,n)}dispose(){super.dispose()}scrollLines(a){this._verifyIntegers(a),this._core.scrollLines(a)}scrollPages(a){this._verifyIntegers(a),this._core.scrollPages(a)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(a){this._verifyIntegers(a),this._core.scrollToLine(a)}clear(){this._core.clear()}write(a,n){this._core.write(a,n)}writeln(a,n){this._core.write(a),this._core.write(`\r
|
|
48
|
+
`,n)}paste(a){this._core.paste(a)}refresh(a,n){this._verifyIntegers(a,n),this._core.refresh(a,n)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(a){this._addonManager.loadAddon(this,a)}static get strings(){return s}_verifyIntegers(...a){for(const n of a)if(n===1/0||isNaN(n)||n%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...a){for(const n of a)if(n&&(n===1/0||isNaN(n)||n%1!=0||n<0))throw new Error("This API only accepts positive integers")}}v.Terminal=S})(),h})())})(Gd);var xv=Gd.exports,Yd={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(o){this._terminal=o}dispose(){}fit(){const o=this.proposeDimensions();if(!o||!this._terminal||isNaN(o.cols)||isNaN(o.rows))return;const h=this._terminal._core;this._terminal.rows===o.rows&&this._terminal.cols===o.cols||(h._renderService.clear(),this._terminal.resize(o.cols,o.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const o=this._terminal._core,h=o._renderService.dimensions;if(h.css.cell.width===0||h.css.cell.height===0)return;const v=this._terminal.options.scrollback===0?0:o.viewport.scrollBarWidth,s=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(s.getPropertyValue("height")),f=Math.max(0,parseInt(s.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),d=u-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),_=f-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-v;return{cols:Math.max(2,Math.floor(_/h.css.cell.width)),rows:Math.max(1,Math.floor(d/h.css.cell.height))}}}})(),r})())})(Yd);var bv=Yd.exports,Jd={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={6:(v,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.LinkComputer=s.WebLinkProvider=void 0,s.WebLinkProvider=class{constructor(f,m,d,_={}){this._terminal=f,this._regex=m,this._handler=d,this._options=_}provideLinks(f,m){const d=u.computeLink(f,this._regex,this._terminal,this._handler);m(this._addCallbacks(d))}_addCallbacks(f){return f.map(m=>(m.leave=this._options.leave,m.hover=(d,_)=>{if(this._options.hover){const{range:C}=m;this._options.hover(d,_,C)}},m))}};class u{static computeLink(m,d,_,C){const w=new RegExp(d.source,(d.flags||"")+"g"),[S,c]=u._getWindowedLineStrings(m-1,_),a=S.join("");let n;const l=[];for(;n=w.exec(a);){const p=n[0];try{const D=new URL(p),M=decodeURI(D.toString());if(p!==M&&p+"/"!==M)continue}catch{continue}const[y,x]=u._mapStrIdx(_,c,0,n.index),[k,g]=u._mapStrIdx(_,y,x,p.length);if(y===-1||x===-1||k===-1||g===-1)continue;const b={start:{x:x+1,y:y+1},end:{x:g,y:k+1}};l.push({range:b,text:p,activate:C})}return l}static _getWindowedLineStrings(m,d){let _,C=m,w=m,S=0,c="";const a=[];if(_=d.buffer.active.getLine(m)){const n=_.translateToString(!0);if(_.isWrapped&&n[0]!==" "){for(S=0;(_=d.buffer.active.getLine(--C))&&S<2048&&(c=_.translateToString(!0),S+=c.length,a.push(c),_.isWrapped&&c.indexOf(" ")===-1););a.reverse()}for(a.push(n),S=0;(_=d.buffer.active.getLine(++w))&&_.isWrapped&&S<2048&&(c=_.translateToString(!0),S+=c.length,a.push(c),c.indexOf(" ")===-1););}return[a,C]}static _mapStrIdx(m,d,_,C){const w=m.buffer.active,S=w.getNullCell();let c=_;for(;C;){const a=w.getLine(d);if(!a)return[-1,-1];for(let n=c;n<a.length;++n){a.getCell(n,S);const l=S.getChars();if(S.getWidth()&&(C-=l.length||1,n===a.length-1&&l==="")){const p=w.getLine(d+1);p&&p.isWrapped&&(p.getCell(0,S),S.getWidth()===2&&(C+=1))}if(C<0)return[d,n]}d++,c=0}return[d,c]}}s.LinkComputer=u}},i={};function o(v){var s=i[v];if(s!==void 0)return s.exports;var u=i[v]={exports:{}};return r[v](u,u.exports,o),u.exports}var h={};return(()=>{var v=h;Object.defineProperty(v,"__esModule",{value:!0}),v.WebLinksAddon=void 0;const s=o(6),u=/https?:[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function f(m,d){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=d}else console.warn("Opening link blocked as opener could not be cleared")}v.WebLinksAddon=class{constructor(m=f,d={}){this._handler=m,this._options=d}activate(m){this._terminal=m;const d=this._options,_=d.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new s.WebLinkProvider(this._terminal,_,this._handler,d))}dispose(){var m;(m=this._linkProvider)===null||m===void 0||m.dispose()}}})(),h})())})(Jd);var kv=Jd.exports;function Zd({agentGated:e=!1}={}){const t=Z.useRef(null),[r,i]=Z.useState(null),[o,h]=Z.useState(!1),[v,s]=Z.useState(!1),[u,f]=Z.useState(null);return Z.useEffect(()=>{if(!t.current)return;const m=new xv.Terminal({fontFamily:'"JetBrains Mono", ui-monospace, Menlo, monospace',fontSize:13,lineHeight:1.3,letterSpacing:0,theme:{background:"#070d18",foreground:"#f2f7fc",cursor:"#dcb866",selectionBackground:"#1f3a66",black:"#0c1628",red:"#a85a5a",green:"#6a9b8f",yellow:"#dcb866",blue:"#7aa7dc",magenta:"#7a6db0",cyan:"#a8c8ea",white:"#a4b0c2",brightBlack:"#33394a",brightRed:"#c87a7a",brightGreen:"#8abbaf",brightYellow:"#ead08e",brightBlue:"#a8c8ea",brightMagenta:"#9a8dd0",brightCyan:"#cbdef3",brightWhite:"#f2f7fc"},convertEol:!0,scrollback:5e3,allowProposedApi:!0}),d=new bv.FitAddon;m.loadAddon(d),m.loadAddon(new kv.WebLinksAddon),m.open(t.current),d.fit();const _=new ResizeObserver(()=>{try{d.fit()}catch{}});_.observe(t.current);const C=window.location.protocol==="https:"?"wss":"ws",w=new WebSocket(`${C}://${window.location.host}/api/agent/ws`);w.onopen=()=>h(!0),w.onclose=()=>h(!1),w.onerror=()=>h(!1);const S=new Set;return w.onmessage=c=>{try{const a=JSON.parse(c.data);if(a.kind==="data"&&typeof a.data=="string")m.write(a.data);else if(a.kind==="meta")i({active:!!a.autoMode,reason:a.reason??""}),typeof a.agentReady=="boolean"&&s(a.agentReady);else if(a.kind==="auth_url"&&typeof a.url=="string"){if(!S.has(a.url)){S.add(a.url);try{window.open(a.url,"_blank","noopener,noreferrer")}catch{}}}else a.kind==="error"?a.recoverable&&a.remediation?f({message:a.message??"agent failed to start",remediation:a.remediation}):m.write(`\r
|
|
49
|
+
\x1B[31m[error] ${a.message??"unknown error"}\x1B[0m\r
|
|
50
|
+
`):a.kind==="exit"&&m.write(`\r
|
|
51
|
+
\x1B[33m[claude session exited]\x1B[0m\r
|
|
52
|
+
`)}catch{}},m.onData(c=>{w.readyState===WebSocket.OPEN&&w.send(JSON.stringify({kind:"input",data:c}))}),m.onResize(({cols:c,rows:a})=>{w.readyState===WebSocket.OPEN&&w.send(JSON.stringify({kind:"resize",cols:c,rows:a}))}),()=>{w.close(),_.disconnect(),m.dispose()}},[]),A.jsxs("div",{className:"h-full w-full flex flex-col",style:{background:"var(--bg-sunken)"},children:[A.jsxs("div",{className:"px-4 py-2 flex items-center justify-between",style:{borderBottom:"1px solid var(--border)",background:"var(--bg-elevated)"},children:[A.jsx("span",{className:"j-mono text-[11px]",style:{color:o?"var(--vow-green)":"var(--fg-dim)",letterSpacing:"0.05em"},children:o?"● connected":"○ disconnected"}),r&&A.jsx("span",{className:"j-label",style:{color:r.active?"var(--accent-gold)":"var(--fg-dim)",fontSize:"10px"},title:r.active?"Claude Code Auto Mode is active":r.reason,children:r.active?"Auto Mode":"Default permissions"})]}),u&&A.jsxs("div",{className:"px-5 py-4 m-3 flex flex-col gap-2",style:{border:"1px solid var(--break-red)",background:"rgba(168, 90, 90, 0.06)",borderRadius:"var(--radius-2)"},children:[A.jsx("span",{className:"j-label",style:{color:"var(--break-red)"},children:"Agent panel unavailable"}),A.jsx("p",{className:"j-mono text-xs",style:{color:"var(--fg-muted)"},children:u.message}),u.remediation&&A.jsxs("p",{className:"j-mono text-xs",style:{color:"var(--fg-dim)"},children:[A.jsx("span",{style:{color:"var(--fg-muted)"},children:"Fix · "}),u.remediation]})]}),A.jsx("div",{ref:t,className:"flex-1 w-full",style:{background:"var(--bg-sunken)",padding:"12px",minHeight:"400px",visibility:e&&!v?"hidden":"visible",display:e&&!v?"none":"block"}}),e&&!v&&!u&&A.jsx(Ev,{})]})}function Ev(){return A.jsx("div",{className:"flex-1 w-full flex items-center justify-center px-6",style:{background:"var(--bg-sunken)"},children:A.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-[34ch] text-center",children:[A.jsx("span",{"aria-hidden":"true",style:{width:"8px",height:"8px",borderRadius:"50%",background:"var(--seer-violet)",boxShadow:"0 0 0 0 rgba(122, 109, 176, 0.6)",animation:"jinnPulse 1.6s ease-out infinite"}}),A.jsx("p",{className:"j-mono text-xs",style:{color:"var(--fg-muted)"},children:"The agent will come online once you sign in to Claude (Phase 1 on the left)."})]})})}const Rv={wallet:{phase:2,subState:null},safe_predicted:{phase:2,subState:null},awaiting_funding:{phase:3,subState:null},safe_deployed:{phase:4,subState:"Deploying"},service_created:{phase:4,subState:"Deploying"},service_activated:{phase:4,subState:"Deploying"},agents_registered:{phase:4,subState:"Deploying"},service_deployed:{phase:4,subState:"Deploying"},service_staked:{phase:4,subState:"Deploying"},staked:{phase:4,subState:"Deploying"},mech_deployed:{phase:4,subState:"Joining the network"},agent_registered:{phase:4,subState:"Joining the network"},safe_binding_pending:{phase:4,subState:"Binding identity"}},Lv={1:"Sign in to Claude",2:"Provisioning your wallet",3:"Fund your wallet",4:"Joining Jinn"};function Dv(e){return Rv[e]??{phase:2,subState:null}}function Tv(e,t){return e<t?"done":e===t?"active":"queued"}function Pv(){const{data:e,isLoading:t}=$n({queryKey:["bootstrap"],queryFn:()=>Dt.getBootstrap(),refetchInterval:2e3}),{data:r}=$n({queryKey:["claude-auth"],queryFn:()=>Dt.getClaudeAuth(),refetchInterval:4e3});if(t||!e)return A.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{background:"var(--bg)"},children:A.jsx("span",{className:"j-label",children:"Connecting…"})});const i=e.chain==="base"?"https://basescan.org":"https://sepolia.basescan.org",o=e.master_address??"",{phase:h,subState:v}=Dv(e.currentStep),s=e.error,u=(r==null?void 0:r.authenticated)===!0,f=u?h:1;return A.jsxs("div",{className:"min-h-screen w-full",style:{background:"var(--bg)",color:"var(--fg)"},children:[A.jsx("style",{children:zv}),A.jsxs("div",{className:"max-w-[1280px] mx-auto px-10 py-10 grid grid-cols-12 gap-10",children:[A.jsxs("section",{className:"col-span-12 lg:col-span-7 flex flex-col gap-8",children:[A.jsxs("header",{className:"flex items-baseline justify-between",children:[A.jsx("span",{className:"j-label",style:{color:"var(--accent-gold)"},children:"Jinn · Onboarding"}),A.jsx(Av,{chain:e.chain})]}),A.jsx("h1",{className:"j-display",style:{fontSize:"76px",color:"var(--fg)",lineHeight:1.05},children:"Welcome to Jinn."}),A.jsx("ol",{className:"flex flex-col",children:[1,2,3,4].map(m=>{const d=Tv(m,f),_=s&&m===f&&m!==1;return A.jsxs(Ov,{phase:m,status:_?"error":d,children:[_&&A.jsx(jv,{envelope:s}),!_&&m===1&&d==="active"&&A.jsx(Mv,{context:(r==null?void 0:r.context)??"bare"}),!_&&m===3&&d==="active"&&o&&A.jsx(Cv,{address:o,minimumWei:"10000000000000000",chainExplorerBase:i}),!_&&m===4&&d==="active"&&A.jsx(Hv,{label:v??"Working"})]},m)})})]}),A.jsxs("aside",{className:"col-span-12 lg:col-span-5 flex flex-col gap-3",children:[A.jsx("span",{className:"j-label",children:"Ask Claude"}),A.jsx("div",{className:"j-card overflow-hidden",style:{height:"calc(100vh - 220px)",minHeight:"520px"},children:A.jsx(Zd,{agentGated:!u})})]})]})]})}function Av({chain:e}){const t=e==="base";return A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx("span",{className:"j-label",style:{color:t?"var(--fg-dim)":"var(--accent-sky)",padding:"4px 10px",border:t?"1px solid var(--border)":"1px solid var(--accent-sky)",borderRadius:"var(--radius-1)"},children:"Testnet"}),A.jsx("span",{className:"j-label",style:{color:"var(--fg-dim)",padding:"4px 10px",border:"1px dashed var(--border)",borderRadius:"var(--radius-1)",opacity:.6},title:"Mainnet support is coming. v1 supports testnet only.",children:"Mainnet · soon"})]})}function Mv({context:e}){const[t,r]=Z.useState(!1),[i,o]=Z.useState(null),h=e!=="bare",v=async()=>{o(null),r(!0);try{const s=await Dt.signInClaude();s.ok||o(s.reason??"Failed to start sign-in")}catch(s){o(s instanceof Error?s.message:"Failed to start sign-in")}finally{r(!1)}};return A.jsxs("div",{className:"px-5 py-4 flex flex-col gap-3",style:{border:"1px solid var(--seer-violet)",background:"rgba(122, 109, 176, 0.05)",borderRadius:"var(--radius-2)"},children:[A.jsx("p",{className:"j-mono text-xs",style:{color:"var(--fg-muted)"},children:"Claude runs the agent panel and the daemon's restorations. One sign-in covers both — this is the only auth step you'll take."}),A.jsx("button",{type:"button",onClick:v,disabled:t,className:"self-start px-4 py-2 j-label hover:opacity-90 disabled:opacity-50",style:{background:"var(--seer-violet)",color:"var(--fg)",borderRadius:"var(--radius-1)"},children:t?"Opening…":"Sign in with Claude →"}),h&&A.jsx("p",{className:"j-mono text-[11px]",style:{color:"var(--fg-dim)"},children:"Container mode: after you sign in, copy the OAuth code from the auth page and paste it into the agent terminal where claude is waiting at 'Paste code here'."}),i&&A.jsx("p",{className:"j-mono text-xs",style:{color:"var(--break-red)"},children:i})]})}function Ov({phase:e,status:t,children:r}){const i=t==="active",o=t==="error",h=t==="done",v=i||o,s=o?"var(--break-red)":i?"var(--accent-gold)":h?"var(--accent-sky)":"var(--fg-dim)",u=o||i?"var(--fg)":h?"var(--fg-muted)":"var(--fg-dim)";return A.jsxs("li",{className:"phase-row","data-status":t,style:{borderTop:"1px solid var(--border)"},children:[A.jsxs("div",{className:"grid grid-cols-[3rem_1fr_auto] items-baseline gap-4 py-4",children:[A.jsx("span",{className:"j-mono text-xs tabular-nums",style:{color:s,letterSpacing:"0.05em",transition:"color 240ms ease"},children:String(e).padStart(2,"0")}),A.jsx("span",{className:v?"j-display":"j-mono",style:{fontSize:v?"28px":"14px",color:u,lineHeight:1.2,transition:"color 240ms ease"},children:Lv[e]}),A.jsx(Bv,{status:t})]}),v&&r&&A.jsx("div",{className:"ml-12 pb-5 pr-2",style:{animation:"jinnFadeSlide 320ms ease-out both"},children:r})]})}function Bv({status:e}){return e==="done"?A.jsx("span",{className:"j-label",style:{color:"var(--vow-green)",fontSize:"10px"},children:"✓ Done"}):e==="error"?A.jsx("span",{className:"j-label",style:{color:"var(--break-red)",fontSize:"10px"},children:"! Failed"}):e==="active"?A.jsxs("span",{className:"j-label flex items-center gap-2",style:{color:"var(--accent-gold)",fontSize:"10px"},children:[A.jsx(Iv,{}),"Active"]}):A.jsx("span",{className:"j-label",style:{color:"var(--fg-dim)",fontSize:"10px"},children:"Queued"})}function Iv(){return A.jsx("span",{"aria-hidden":"true",style:{width:"6px",height:"6px",borderRadius:"50%",background:"var(--accent-gold)",boxShadow:"0 0 0 0 rgba(220, 184, 102, 0.6)",animation:"jinnPulse 1.6s ease-out infinite"}})}function jv({envelope:e}){const t=Nv(e),r=Fv(e.generatedAt);return A.jsxs("div",{className:"px-5 py-4 flex flex-col gap-3",style:{border:"1px solid var(--break-red)",background:"rgba(168, 90, 90, 0.06)",borderRadius:"var(--radius-2)"},children:[A.jsxs("div",{className:"flex items-baseline justify-between",children:[A.jsxs("span",{className:"j-label",style:{color:"var(--break-red)"},children:["Bootstrap halted · ",e.code]}),r&&A.jsx("span",{className:"j-mono text-[10px]",style:{color:"var(--fg-dim)"},children:r})]}),A.jsx("p",{className:"j-mono text-xs break-words",style:{color:"var(--fg)"},children:e.message}),e.hint&&A.jsxs("p",{className:"j-mono text-xs",style:{color:"var(--fg-muted)"},children:[A.jsx("span",{style:{color:"var(--fg-dim)"},children:"Fix · "}),e.hint]}),t&&A.jsx("a",{href:`https://sepolia.basescan.org/tx/${t}`,target:"_blank",rel:"noopener noreferrer",className:"j-mono text-[11px] hover:underline self-start",style:{color:"var(--accent-sky)"},children:"view failed tx ↗"}),A.jsxs("p",{className:"j-mono text-[11px]",style:{color:"var(--fg-dim)"},children:["The daemon exited; once you've addressed the cause, run"," ",A.jsx("code",{style:{color:"var(--fg-muted)"},children:"jinn run"})," again to retry from this step."]})]})}function Nv(e){var r,i;const t=[(r=e.details)==null?void 0:r.txHash,(i=e.details)==null?void 0:i.cause,e.message];for(const o of t){if(typeof o!="string")continue;const h=/(0x[a-fA-F0-9]{64})/.exec(o);if(h)return h[1]}return null}function Fv(e){try{const t=Date.now()-Date.parse(e);if(!Number.isFinite(t)||t<0)return null;const r=Math.round(t/1e3);if(r<60)return`${r}s ago`;const i=Math.round(r/60);return i<60?`${i}m ago`:`${Math.round(i/60)}h ago`}catch{return null}}function Hv({label:e}){return A.jsxs("div",{className:"px-4 py-3 flex items-center gap-3",style:{border:"1px solid var(--border)",borderRadius:"var(--radius-2)",background:"var(--bg-elevated)"},children:[A.jsx("span",{"aria-hidden":"true",style:{width:"6px",height:"6px",borderRadius:"50%",background:"var(--accent-sky)",boxShadow:"0 0 0 0 rgba(122, 167, 220, 0.6)",animation:"jinnPulse 1.6s ease-out infinite"}}),A.jsx("span",{className:"j-mono text-sm",style:{color:"var(--fg)"},children:e}),A.jsx("span",{className:"j-mono text-[10px] ml-auto",style:{color:"var(--fg-dim)"},children:"a few minutes · no action needed"})]})}const zv=`
|
|
53
|
+
@keyframes jinnPulse {
|
|
54
|
+
0% { box-shadow: 0 0 0 0 rgba(220, 184, 102, 0.55); }
|
|
55
|
+
70% { box-shadow: 0 0 0 10px rgba(220, 184, 102, 0); }
|
|
56
|
+
100% { box-shadow: 0 0 0 0 rgba(220, 184, 102, 0); }
|
|
57
|
+
}
|
|
58
|
+
@keyframes jinnFadeSlide {
|
|
59
|
+
0% { opacity: 0; transform: translateY(-4px); }
|
|
60
|
+
100% { opacity: 1; transform: translateY(0); }
|
|
61
|
+
}
|
|
62
|
+
/* Smooth title scaling when a row activates */
|
|
63
|
+
.phase-row[data-status="active"] {
|
|
64
|
+
background:
|
|
65
|
+
linear-gradient(90deg, rgba(220, 184, 102, 0.04) 0%, transparent 60%);
|
|
66
|
+
transition: background 320ms ease;
|
|
67
|
+
}
|
|
68
|
+
`;function Uv(){const[e,t]=Z.useState(""),[r,i]=Z.useState(""),[o,h]=Z.useState(""),[v,s]=Z.useState(!1),[u,f]=Z.useState(null),[m,d]=Z.useState(!1),_=r.length>0&&r===o,C=e.length>0&&r.length>=8&&_&&!v,w=async c=>{if(c.preventDefault(),!!C){s(!0),f(null),d(!1);try{await Dt.changeKeystorePassword(e,r),d(!0),t(""),i(""),h("")}catch(a){const n=a instanceof Error?a.message:"Change failed";let l=n;n.startsWith("401")?l="Current password is incorrect.":n.startsWith("400")?l="New password must be at least 8 characters.":n.startsWith("404")&&(l="No keystore found on this daemon."),f(l)}finally{s(!1)}}},S={background:"var(--bg-sunken)",border:"1px solid var(--border)",borderRadius:"var(--radius-1)",color:"var(--fg)",fontFamily:"var(--mono)",fontSize:"13px"};return A.jsxs("div",{className:"px-5 py-4 flex flex-col gap-3",style:{border:"1px solid var(--border)",borderRadius:"var(--radius-2)",background:"var(--bg-elevated)"},children:[A.jsx("span",{className:"j-label",children:"Change keystore password"}),A.jsxs("form",{onSubmit:w,className:"flex flex-col gap-2",children:[A.jsx("input",{type:"password",autoComplete:"current-password",placeholder:"Current password",value:e,onChange:c=>t(c.target.value),className:"w-full px-3 py-2",style:S,disabled:v}),A.jsx("input",{type:"password",autoComplete:"new-password",placeholder:"New password (8+ chars)",value:r,onChange:c=>i(c.target.value),className:"w-full px-3 py-2",style:S,disabled:v}),A.jsx("input",{type:"password",autoComplete:"new-password",placeholder:"Confirm new password",value:o,onChange:c=>h(c.target.value),className:"w-full px-3 py-2",style:S,disabled:v}),o.length>0&&!_&&A.jsx("span",{className:"j-mono text-xs",style:{color:"var(--wane)"},children:"Passwords don't match."}),u&&A.jsx("span",{className:"j-mono text-xs",style:{color:"var(--break-red)"},children:u}),m&&A.jsx("span",{className:"j-mono text-xs",style:{color:"var(--vow-green)"},children:"Password updated."}),A.jsx("button",{type:"submit",disabled:!C,className:"self-start px-3 py-1.5 j-label disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"var(--accent-sky)",color:"var(--bg)",borderRadius:"var(--radius-1)"},children:v?"Updating…":"Change password"})]})]})}const ef=e=>e?e.length<14?e:`${e.slice(0,6)}…${e.slice(-4)}`:"—",Qt=e=>{if(!e||e==="0")return"0";try{const t=BigInt(e),r=Number(t)/1e18;return r<1e-4?r.toExponential(2):r.toFixed(4)}catch{return e}},tf=e=>e==="base"?"https://basescan.org":"https://sepolia.basescan.org",Wv=e=>(e??"unknown").replaceAll("_"," "),$v=e=>{switch(e){case"complete":return"ready";case"safe_binding_pending":return"identity syncing";default:return Wv(e)}},rf=e=>{try{return e.reduce((t,r)=>t+BigInt(r??"0"),0n).toString()}catch{return e.find(Boolean)??"0"}};function Kv(){var f,m,d,_,C,w,S,c,a,n,l,p,y,x;const{data:e,refetch:t}=$n({queryKey:["status"],queryFn:()=>Dt.getStatus(),refetchInterval:5e3}),r=((f=e==null?void 0:e.fleet)==null?void 0:f.chain)==="base"?"mainnet":"testnet",i=((m=e==null?void 0:e.rpc)==null?void 0:m.ok)??!1,o=((_=(d=e==null?void 0:e.portfolioV0)==null?void 0:d.totals)==null?void 0:_.delivered)??((w=(C=e==null?void 0:e.portfolioV0)==null?void 0:C.recentVerdicts)==null?void 0:w.filter(k=>k.state==="COMPLETE").length)??0,h=((S=e==null?void 0:e.rewards)==null?void 0:S.pendingStakingRewardsWei)??"0",v=((c=e==null?void 0:e.rewards)==null?void 0:c.totalStakingRewardsWei)??rf([(a=e==null?void 0:e.rewards)==null?void 0:a.claimedStakingRewardsWei,h]),s=((n=e==null?void 0:e.masterGas)==null?void 0:n.runwayDaysExcess)??"—",u=i&&(((l=e==null?void 0:e.fleet)==null?void 0:l.completeCount)??0)>0?"Running":"Needs attention";return A.jsxs("div",{className:"min-h-screen",style:{background:"var(--bg)",color:"var(--fg)"},children:[A.jsx(Vv,{network:r,rpcOk:i,version:(p=e==null?void 0:e.daemon)==null?void 0:p.version}),A.jsxs("main",{className:"max-w-[1440px] mx-auto px-10 py-8 grid grid-cols-12 gap-8",children:[A.jsxs("section",{className:"col-span-12 lg:col-span-7 flex flex-col gap-10",children:[A.jsx(qv,{deliveredTasks:o,totalRewardsWei:v,runwayDays:s,nodeStatus:u,masterAddress:((y=e==null?void 0:e.masterGas)==null?void 0:y.address)??void 0,chain:(x=e==null?void 0:e.fleet)==null?void 0:x.chain}),A.jsx(Qv,{status:e,onRefresh:()=>{t()}}),A.jsx(Gv,{status:e}),A.jsx(Xv,{})]}),A.jsxs("aside",{className:"col-span-12 lg:col-span-5 flex flex-col gap-3",children:[A.jsx("div",{className:"flex items-center justify-between",children:A.jsx("span",{className:"j-label",children:"Claude"})}),A.jsx("div",{className:"j-card overflow-hidden",style:{minHeight:"720px",height:"calc(100vh - 200px)"},children:A.jsx(Zd,{})})]})]})]})}function Vv({network:e,rpcOk:t,version:r}){return A.jsx("header",{className:"border-b",style:{borderColor:"var(--border)",background:"var(--bg-sunken)"},children:A.jsxs("div",{className:"max-w-[1440px] mx-auto px-10 py-5 flex items-baseline justify-between",children:[A.jsxs("div",{className:"flex items-baseline gap-6",children:[A.jsx("span",{className:"j-display",style:{fontSize:"32px",letterSpacing:"0.02em"},children:"jinn operator"}),A.jsxs("div",{className:"flex items-baseline gap-3",children:[A.jsx("span",{className:"j-label",style:{color:"var(--accent-sky)",padding:"4px 10px",border:"1px solid var(--accent-sky)",borderRadius:"var(--radius-1)"},children:"Testnet"}),A.jsx("span",{className:"j-label",style:{color:"var(--fg-dim)",padding:"4px 10px",border:"1px dashed var(--border)",borderRadius:"var(--radius-1)",opacity:.6},title:"Mainnet support is coming. v1 supports testnet only.",children:"Mainnet · soon"})]}),A.jsx("span",{className:"j-label",style:{color:e==="mainnet"?"var(--accent-gold)":"var(--fg-dim)",display:"none"},children:e})]}),A.jsxs("div",{className:"flex items-baseline gap-4",children:[A.jsxs("span",{className:"j-mono text-xs",style:{color:t?"var(--vow-green)":"var(--break-red)"},children:["● ",t?"rpc healthy":"rpc error"]}),A.jsx("span",{className:"j-mono text-[10px]",style:{color:"var(--fg-dim)"},children:r??"unknown"})]})]})})}function qv({deliveredTasks:e,totalRewardsWei:t,runwayDays:r,nodeStatus:i,masterAddress:o,chain:h}){const v=h==="base"?"https://basescan.org":"https://sepolia.basescan.org";return A.jsxs("section",{children:[A.jsxs("div",{className:"grid grid-cols-2 xl:grid-cols-4 gap-px",style:{background:"var(--border)"},children:[A.jsx(on,{label:"tasks delivered",value:String(e),tone:"default"}),A.jsx(on,{label:"total JINN earned",value:Qt(t),unit:"JINN",tone:"gold"}),A.jsx(on,{label:"gas runway",value:r,unit:"days",tone:"sky"}),A.jsx(on,{label:"node status",value:i,tone:i==="Running"?"green":"default",compact:!0})]}),o&&A.jsxs("div",{className:"mt-3 flex items-center gap-3 text-xs",children:[A.jsx("span",{className:"j-label",children:"gas wallet"}),A.jsx("a",{href:`${v}/address/${o}`,target:"_blank",rel:"noopener noreferrer",className:"j-mono hover:underline",style:{color:"var(--accent-sky)"},children:ef(o)})]})]})}function on({label:e,value:t,unit:r,tone:i,compact:o}){const h=i==="gold"?"var(--accent-gold)":i==="sky"?"var(--accent-sky)":i==="green"?"var(--vow-green)":"var(--fg)";return A.jsxs("div",{className:"px-6 py-5 flex flex-col gap-3",style:{background:"var(--bg-elevated)"},children:[A.jsx("span",{className:"j-label",children:e}),A.jsxs("div",{className:"flex items-baseline gap-2",children:[A.jsx("span",{className:"j-display tabular-nums",style:{fontSize:o?"30px":"44px",color:h,lineHeight:1},children:t}),r&&A.jsx("span",{className:"j-mono text-xs",style:{color:"var(--fg-dim)"},children:r})]})]})}function Qv({status:e,onRefresh:t}){var M,P,B,N,F,$,W;const[r,i]=Z.useState(!1),[o,h]=Z.useState(!1),[v,s]=Z.useState(null),[u,f]=Z.useState(null),[m,d]=Z.useState(null),[_,C]=Z.useState(null),[w,S]=Z.useState(null),[c,a]=Z.useState(0),n=((M=e==null?void 0:e.masterGas)==null?void 0:M.address)??((P=e==null?void 0:e.fleet)==null?void 0:P.masterAddress)??null,l=(B=e==null?void 0:e.fleet)==null?void 0:B.chain,p=l!=="base",y=((N=e==null?void 0:e.rewards)==null?void 0:N.pendingStakingRewardsWei)??"0";Z.useEffect(()=>{if(w===null)return;a(Math.max(0,Math.floor((Date.now()-w)/1e3)));const E=window.setInterval(()=>{a(Math.max(0,Math.floor((Date.now()-w)/1e3)))},1e3);return()=>window.clearInterval(E)},[w]);const x=Z.useMemo(()=>_!=="topup"?0:Math.min(92,Math.max(8,Math.round(c/60*92))),[_,c]),k=async()=>{C("claim"),s(null);try{const L=(await Dt.claimRewards()).result,T=(L==null?void 0:L.submitted)??0,O=(L==null?void 0:L.attempted)??0,H=((L==null?void 0:L.failedRecoverable)??0)+((L==null?void 0:L.failedPermanent)??0),V=L!=null&&L.claims&&L.claims.length>0?rf(L.claims.map(X=>X.amountWei)):y;s(H>0?`Claim finished with ${H} failure${H===1?"":"s"}.`:T>0?`Claimed ${Qt(V)} JINN.`:`No JINN available to claim${O>0?` across ${O} service${O===1?"":"s"}`:""}.`),t()}catch(E){s(E instanceof Error?E.message:"Claim failed")}finally{C(null)}},g=async()=>{n&&(await navigator.clipboard.writeText(n),f("Master EOA copied."))},b=async()=>{var E;C("topup"),f(null),S(Date.now()),a(0);try{const L=await Dt.triggerDrip();if(L.ok){const T=((E=L.txHashes)==null?void 0:E.length)??L.attempts??(L.txHash?1:0),O=L.balanceWei&&L.targetWei?` Balance ${Qt(L.balanceWei)} / target ${Qt(L.targetWei)} ETH.`:"";f(`Faucet funding complete${T>0?` (${T} drip${T===1?"":"s"})`:""}.${O}`),t()}else f(L.reason??"Faucet funding failed.")}catch(L){f(L instanceof Error?L.message:"Faucet funding failed.")}finally{S(null),C(null)}},D=async()=>{C("restart"),d(null);try{await Dt.restartDaemon(),d("Restart scheduled.")}catch(E){d(E instanceof Error?E.message:"Restart failed.")}finally{C(null)}};return A.jsxs("section",{className:"flex flex-col gap-3",children:[A.jsx("span",{className:"j-label",children:"Quick actions"}),A.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[A.jsx(Ho,{label:"Claim JINN rewards",description:v??`${Qt(y)} JINN claimable.`,onClick:k,disabled:_!==null,rightHint:_==="claim"?"Running":"Claim"}),A.jsx(Ho,{label:"Top up gas",description:u??`${Qt((F=e==null?void 0:e.masterGas)==null?void 0:F.balanceWei)} ETH in gas wallet.`,onClick:()=>h(E=>!E),disabled:_!==null,rightHint:o?"Close":"Open"}),A.jsxs("button",{type:"button",onClick:()=>i(E=>!E),className:"text-left px-5 py-4 flex flex-col gap-1 transition-colors",style:{background:r?"var(--bg-elevated)":"transparent",border:"1px solid var(--border)",borderRadius:"var(--radius-2)",color:"var(--fg)"},children:[A.jsxs("span",{className:"j-label",style:{color:"var(--accent-gold)"},children:["Manage wallet ",r?"-":"+"]}),A.jsx("span",{className:"j-mono text-xs",style:{color:"var(--fg-muted)"},children:"Change keystore password."})]}),A.jsx(Ho,{label:"Restart node",description:m??"Gracefully stop this node so the launcher can restart it.",onClick:D,disabled:_!==null,rightHint:_==="restart"?"Scheduling":"Restart"})]}),o&&A.jsxs("div",{className:"j-card-bare px-5 py-4 flex flex-col gap-3",children:[A.jsxs("div",{className:"flex flex-col gap-1",children:[A.jsx("span",{className:"j-label",children:"Gas wallet"}),A.jsx("span",{className:"j-mono text-xs break-all",style:{color:"var(--fg)"},children:n??"No master EOA in fleet state."}),A.jsxs("span",{className:"j-mono text-xs",style:{color:"var(--fg-muted)"},children:["Balance ",Qt(($=e==null?void 0:e.masterGas)==null?void 0:$.balanceWei)," ETH",(W=e==null?void 0:e.masterGas)!=null&&W.minEthWei?` / target ${Qt(e.masterGas.minEthWei)} ETH`:""]})]}),A.jsxs("div",{className:"flex flex-wrap gap-2",children:[A.jsx("button",{type:"button",onClick:g,disabled:!n,className:"px-3 py-1.5 j-label disabled:opacity-50",style:{border:"1px solid var(--border-strong)",borderRadius:"var(--radius-1)",color:"var(--fg)"},children:"Copy address"}),p&&A.jsx("button",{type:"button",onClick:b,disabled:_!==null||!n,className:"px-3 py-1.5 j-label disabled:opacity-50",style:{background:"var(--accent-gold)",borderRadius:"var(--radius-1)",color:"var(--bg)"},children:_==="topup"?"Funding...":"Fund from faucet"}),n&&A.jsx("a",{href:`${tf(l)}/address/${n}`,target:"_blank",rel:"noopener noreferrer",className:"px-3 py-1.5 j-label",style:{border:"1px solid var(--border)",borderRadius:"var(--radius-1)",color:"var(--accent-sky)"},children:"View on explorer"})]}),_==="topup"&&A.jsxs("div",{className:"flex flex-col gap-2",children:[A.jsx("div",{className:"h-1.5 overflow-hidden",style:{background:"var(--bg-sunken)",borderRadius:"999px"},children:A.jsx("div",{className:"h-full transition-all",style:{width:`${x}%`,background:"var(--accent-gold)",borderRadius:"999px"}})}),A.jsxs("span",{className:"j-mono text-[11px]",style:{color:"var(--fg-muted)"},children:["Requesting faucet drips. Elapsed ",c,"s; this can take about a minute."]})]})]}),r&&A.jsx("div",{className:"mt-2",children:A.jsx(Uv,{})})]})}function Ho({label:e,description:t,onClick:r,disabled:i,rightHint:o}){return A.jsxs("button",{type:"button",onClick:r,disabled:i,className:"text-left px-5 py-4 flex flex-col gap-1 transition-colors disabled:cursor-default",style:{border:"1px solid var(--border)",borderRadius:"var(--radius-2)",color:"var(--fg)",opacity:i?.72:1},children:[A.jsxs("div",{className:"flex items-baseline justify-between",children:[A.jsx("span",{className:"j-label",style:{color:"var(--accent-sky)"},children:e}),o&&A.jsx("span",{className:"j-mono text-[10px]",style:{color:"var(--fg-dim)"},children:o})]}),A.jsx("span",{className:"j-mono text-xs",style:{color:"var(--fg-muted)"},children:t})]})}function Gv({status:e}){var d,_,C,w,S,c,a,n,l;const[t,r]=Z.useState(!1),i=(d=e==null?void 0:e.fleet)==null?void 0:d.chain,o=tf(i),h=((_=e==null?void 0:e.fleet)==null?void 0:_.services)??[],v=((C=e==null?void 0:e.masterGas)==null?void 0:C.address)??((w=e==null?void 0:e.fleet)==null?void 0:w.masterAddress)??null,s=h[0],u=(s==null?void 0:s.identityBindingStatus)??(s!=null&&s.safeBoundToAgent?"bound":s!=null&&s.agentId?"pending":"not_applicable"),f=u==="bound"?"Active":u==="pending"?"Syncing":"Not set",m=u==="bound"?"var(--vow-green)":u==="pending"?"var(--wane)":"var(--fg-dim)";return A.jsxs("section",{className:"flex flex-col gap-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"j-label",children:"Operator"}),A.jsx("span",{className:"j-mono text-[10px]",style:{color:"var(--fg-dim)"},children:i==="base"?"Base":"Base Sepolia"})]}),A.jsxs("div",{className:"j-card-bare overflow-hidden",style:{background:"var(--bg-elevated)"},children:[A.jsxs("div",{className:"px-5 py-4 grid grid-cols-1 md:grid-cols-[140px_1fr_auto] gap-3 md:gap-4 items-baseline",style:{borderBottom:"1px solid var(--border)"},children:[A.jsx("span",{className:"j-label",children:"Identity"}),A.jsxs("div",{className:"flex flex-col gap-1",children:[A.jsx("span",{className:"j-mono text-xs",style:{color:m},children:f}),(s==null?void 0:s.agentId)&&s.identityRegistryAddress&&A.jsxs("a",{href:`${o}/token/${s.identityRegistryAddress}?a=${s.agentId}`,target:"_blank",rel:"noopener noreferrer",className:"j-mono text-xs hover:underline",style:{color:"var(--accent-sky)"},children:["Agent #",s.agentId]})]}),A.jsx("span",{className:"j-mono text-[10px]",style:{color:"var(--fg-dim)"},children:h.length>0?"Ready":"Setting up"})]}),A.jsxs("div",{className:"px-5 py-4 grid grid-cols-1 md:grid-cols-[140px_1fr_auto] gap-3 md:gap-4 items-baseline",style:{borderBottom:"1px solid var(--border)"},children:[A.jsx("span",{className:"j-label",children:"Gas wallet"}),A.jsx("span",{className:"j-mono text-xs break-all",style:{color:"var(--fg)"},children:v??"Not available"}),v?A.jsx("a",{href:`${o}/address/${v}`,target:"_blank",rel:"noopener noreferrer",className:"j-label hover:opacity-80",style:{color:"var(--accent-sky)"},children:"Explorer"}):A.jsx("span",{})]}),A.jsxs("div",{className:"px-5 py-3 grid grid-cols-3 gap-4 j-mono text-xs",style:{borderBottom:"1px solid var(--border)",color:"var(--fg-muted)"},children:[A.jsxs("span",{children:["network ",i==="base"?"mainnet":"testnet"]}),A.jsxs("span",{children:["node ",(S=e==null?void 0:e.fleet)!=null&&S.completeCount?"ready":"setting up"]}),A.jsxs("span",{children:["tasks ",((a=(c=e==null?void 0:e.portfolioV0)==null?void 0:c.totals)==null?void 0:a.active)??((l=(n=e==null?void 0:e.portfolioV0)==null?void 0:n.inFlight)==null?void 0:l.length)??0," active"]})]}),A.jsxs("button",{type:"button",onClick:()=>r(p=>!p),className:"w-full px-5 py-3 flex items-center justify-between text-left",style:{color:"var(--fg-muted)"},children:[A.jsx("span",{className:"j-label",children:"Advanced details"}),A.jsx("span",{className:"j-mono text-[10px]",children:t?"Hide":"Show"})]}),t&&h.length===0&&A.jsx("div",{className:"px-5 py-5 j-mono text-xs",style:{color:"var(--fg-dim)"},children:"No local service rows yet."}),t&&h.length>0&&A.jsx("div",{className:"overflow-x-auto",children:A.jsxs("table",{className:"w-full text-left j-mono text-xs",children:[A.jsx("thead",{children:A.jsxs("tr",{style:{color:"var(--fg-dim)"},children:[A.jsx("th",{className:"px-5 py-3 font-normal",children:"local"}),A.jsx("th",{className:"px-5 py-3 font-normal",children:"network id"}),A.jsx("th",{className:"px-5 py-3 font-normal",children:"state"}),A.jsx("th",{className:"px-5 py-3 font-normal",children:"safe"}),A.jsx("th",{className:"px-5 py-3 font-normal",children:"mech"}),A.jsx("th",{className:"px-5 py-3 font-normal",children:"staking"})]})}),A.jsx("tbody",{children:h.map(p=>A.jsxs("tr",{style:{borderTop:"1px solid var(--border)"},children:[A.jsxs("td",{className:"px-5 py-3",style:{color:"var(--fg)"},children:["#",p.index]}),A.jsx("td",{className:"px-5 py-3",style:{color:"var(--fg)"},children:p.serviceId??"-"}),A.jsx("td",{className:"px-5 py-3",style:{color:"var(--accent-gold)"},children:$v(p.step)}),A.jsx(zo,{address:p.safeAddress,explorer:o}),A.jsx(zo,{address:p.mechAddress,explorer:o}),A.jsx(zo,{address:p.stakingAddress,explorer:o})]},p.index))})]})})]})]})}function zo({address:e,explorer:t}){return A.jsx("td",{className:"px-5 py-3",children:e?A.jsx("a",{href:`${t}/address/${e}`,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{color:"var(--accent-sky)"},children:ef(e)}):A.jsx("span",{style:{color:"var(--fg-dim)"},children:"-"})})}function Xv(){const[e,t]=Z.useState(!1),[r,i]=Z.useState(!1),o=r?["intent","reward","fleet","system","error","log"]:["intent","reward","fleet","error"],{events:h,connected:v}=Qd(o),s=e?h.slice(-200):h.slice(-5);return A.jsxs("section",{className:"flex flex-col gap-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"j-label",children:"Recent activity"}),A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx("span",{className:"j-mono text-[10px]",style:{color:v?"var(--vow-green)":"var(--wane)"},children:v?"● live":"○ reconnecting"}),A.jsx("button",{type:"button",onClick:()=>i(u=>!u),className:"j-label hover:opacity-80",style:{color:"var(--fg-dim)",fontSize:"10px"},children:r?"hide logs":"show logs"}),A.jsx("button",{type:"button",onClick:()=>t(u=>!u),className:"j-label hover:opacity-80",style:{color:"var(--accent-sky)",fontSize:"10px"},children:e?"collapse":"view all"})]})]}),A.jsx("div",{className:"j-card-bare overflow-hidden",style:{background:"var(--bg-elevated)"},children:s.length===0?A.jsx("div",{className:"j-mono text-xs px-5 py-6",style:{color:"var(--fg-dim)"},children:"Quiet. The daemon is running; nothing has happened recently."}):A.jsx("ul",{children:s.slice().reverse().map((u,f)=>A.jsxs("li",{className:"px-5 py-3 grid grid-cols-[68px_84px_1fr_auto] gap-4 items-baseline j-mono text-xs",style:{borderTop:f===0?"none":"1px solid var(--border)",color:"var(--fg-muted)"},children:[A.jsx("span",{style:{color:"var(--fg-dim)"},children:u.ts.slice(11,19)}),A.jsx("span",{style:{color:u.kind==="error"?"var(--break-red)":u.kind==="reward"?"var(--accent-gold)":u.kind==="intent"?"var(--accent-sky)":"var(--fg-dim)"},children:u.kind}),A.jsx("span",{style:{color:"var(--fg)"},children:u.message}),u.txHash&&A.jsx("a",{href:`https://basescan.org/tx/${u.txHash}`,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{color:"var(--accent-sky)"},children:"tx ↗"})]},u.id))})})]})}function Yv(){const{data:e,isLoading:t}=$n({queryKey:["bootstrap"],queryFn:()=>Dt.getBootstrap(),refetchInterval:1500});if(t||!e||e.mode==="uninitialized"){const r=e?e.mode==="uninitialized"?"Setting up your wallet":"Loading":"Starting jinn";return A.jsx(yv,{headline:r})}return e.mode!=="running"?A.jsx(Pv,{}):A.jsx(Kv,{})}const Jv=new sv({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:1e3}}});mv().finally(()=>{Uo.createRoot(document.getElementById("root")).render(A.jsx(Cf.StrictMode,{children:A.jsx(ov,{client:Jv,children:A.jsx(Yv,{})})}))});
|