From a23dbbedc091b72ae217a9b0dbc8aa59f39f847d Mon Sep 17 00:00:00 2001 From: snider Date: Tue, 30 Dec 2025 03:12:31 +0000 Subject: [PATCH] feat: Add Playwright Trace Viewer with initial HTML, CSS, and JavaScript files --- .claude/multi-node.md | 2 +- site-docs/about/changelog.md | 112 ++++++++ site-docs/architecture/backend.md | 192 +++++++++++++ site-docs/architecture/frontend.md | 165 +++++++++++ site-docs/architecture/overview.md | 116 ++++++++ site-docs/cli/examples.md | 215 ++++++++++++++ site-docs/development/building.md | 222 +++++++++++++++ site-docs/development/contributing.md | 122 ++++++++ ui/playwright-report/index.html | 2 +- .../trace/assets/codeMirrorModule-Bucv2d7q.js | 25 ++ .../assets/defaultSettingsView-BEpdCv1S.js | 266 ++++++++++++++++++ .../trace/codeMirrorModule.C3UTv-Ge.css | 1 + .../trace/codicon.DCmgc-ay.ttf | Bin 0 -> 80340 bytes .../trace/defaultSettingsView.ConWv5KN.css | 1 + ui/playwright-report/trace/index.BxQ34UMZ.js | 2 + ui/playwright-report/trace/index.C4Y3Aw8n.css | 1 + ui/playwright-report/trace/index.html | 43 +++ .../trace/manifest.webmanifest | 16 ++ .../trace/playwright-logo.svg | 9 + ui/playwright-report/trace/snapshot.html | 21 ++ ui/playwright-report/trace/sw.bundle.js | 3 + ui/playwright-report/trace/uiMode.BWTwXl41.js | 5 + .../trace/uiMode.Btcz36p_.css | 1 + ui/playwright-report/trace/uiMode.html | 17 ++ .../trace/xtermModule.DYP7pi_n.css | 32 +++ 25 files changed, 1589 insertions(+), 2 deletions(-) create mode 100644 site-docs/about/changelog.md create mode 100644 site-docs/architecture/backend.md create mode 100644 site-docs/architecture/frontend.md create mode 100644 site-docs/architecture/overview.md create mode 100644 site-docs/cli/examples.md create mode 100644 site-docs/development/building.md create mode 100644 site-docs/development/contributing.md create mode 100644 ui/playwright-report/trace/assets/codeMirrorModule-Bucv2d7q.js create mode 100644 ui/playwright-report/trace/assets/defaultSettingsView-BEpdCv1S.js create mode 100644 ui/playwright-report/trace/codeMirrorModule.C3UTv-Ge.css create mode 100644 ui/playwright-report/trace/codicon.DCmgc-ay.ttf create mode 100644 ui/playwright-report/trace/defaultSettingsView.ConWv5KN.css create mode 100644 ui/playwright-report/trace/index.BxQ34UMZ.js create mode 100644 ui/playwright-report/trace/index.C4Y3Aw8n.css create mode 100644 ui/playwright-report/trace/index.html create mode 100644 ui/playwright-report/trace/manifest.webmanifest create mode 100644 ui/playwright-report/trace/playwright-logo.svg create mode 100644 ui/playwright-report/trace/snapshot.html create mode 100644 ui/playwright-report/trace/sw.bundle.js create mode 100644 ui/playwright-report/trace/uiMode.BWTwXl41.js create mode 100644 ui/playwright-report/trace/uiMode.Btcz36p_.css create mode 100644 ui/playwright-report/trace/uiMode.html create mode 100644 ui/playwright-report/trace/xtermModule.DYP7pi_n.css diff --git a/.claude/multi-node.md b/.claude/multi-node.md index 9b4003a..cedf445 100644 --- a/.claude/multi-node.md +++ b/.claude/multi-node.md @@ -546,7 +546,7 @@ Security Considerations Design Decisions Summary | Decision | Choice | Rationale | - |----------------|--------------------------|------------------------------------------------------------------------| +|----------------|--------------------------|------------------------------------------------------------------------| | Discovery | Manual only | Simpler, more secure - explicit peer registration | | Transport | WebSocket + SMSG | Better firewall traversal, built-in framing, browser-friendly | | Node Mode | Dual (default) | Maximum flexibility - each node controls remotes AND runs local miners | diff --git a/site-docs/about/changelog.md b/site-docs/about/changelog.md new file mode 100644 index 0000000..1310c1e --- /dev/null +++ b/site-docs/about/changelog.md @@ -0,0 +1,112 @@ +# Changelog + +All notable changes to this project. + +## [Unreleased] + +### Added +- MkDocs documentation site with Material theme +- Screenshots of all UI pages +- Comprehensive API and CLI documentation + +--- + +## [0.3.0] - 2024 + +### Added +- **Multi-Node P2P System** + - Node identity with X25519 keypairs + - Peer registry and management + - WebSocket transport layer + - Remote miner control (start/stop/stats/logs) + - CLI commands: `node`, `peer`, `remote` + - REST API endpoints for P2P operations + +- **SQLite Persistence** + - Hashrate history storage (30-day retention) + - Historical data API endpoints + - Time-range queries + +- **Dashboard Enhancements** + - Stats bar with all key metrics + - Time range selector for charts + - Worker dropdown for multi-miner support + - Avg difficulty per share display + +- **Console Improvements** + - Stdin command support (h, p, r, s, c) + - ANSI color rendering + - Auto-scroll toggle + +### Changed +- Refactored miner interface for better extensibility +- Improved stats collection with background goroutines +- Enhanced error handling throughout + +--- + +## [0.2.0] - 2024 + +### Added +- **TT-Miner Support** + - GPU mining with NVIDIA CUDA + - Automatic installation from GitHub + - Stats parsing from stdout + +- **Profile Management** + - Create, edit, delete mining profiles + - Start miners from saved profiles + - Autostart configuration + +- **Console View** + - Live miner output streaming + - Base64-encoded log retrieval + - Clear and auto-scroll controls + +### Changed +- Improved XMRig stats collection +- Better process lifecycle management +- Enhanced UI responsiveness + +--- + +## [0.1.0] - 2024 + +### Added +- **Initial Release** +- XMRig miner support + - Automatic installation + - Config generation + - Stats via HTTP API +- REST API with Gin framework +- Angular dashboard + - Real-time hashrate display + - Miner control (start/stop) + - System information +- CLI with Cobra + - `serve` command + - `start`, `stop`, `status` + - `install`, `uninstall` + - `doctor` health check +- Swagger API documentation + +--- + +## Version History + +| Version | Date | Highlights | +|---------|------|------------| +| 0.3.0 | 2024 | P2P multi-node, SQLite, enhanced dashboard | +| 0.2.0 | 2024 | TT-Miner, profiles, console | +| 0.1.0 | 2024 | Initial release with XMRig | + +## Roadmap + +Future planned features: + +- [ ] Automatic peer discovery +- [ ] Fleet-wide statistics aggregation +- [ ] Mobile-responsive improvements +- [ ] Notification system (email, webhooks) +- [ ] Mining pool profit comparison +- [ ] Additional miner support (GMiner, lolMiner) diff --git a/site-docs/architecture/backend.md b/site-docs/architecture/backend.md new file mode 100644 index 0000000..ed00f66 --- /dev/null +++ b/site-docs/architecture/backend.md @@ -0,0 +1,192 @@ +# Backend Architecture + +The Go backend provides miner management, REST API, and P2P networking. + +## Package Structure + +``` +pkg/ +├── mining/ # Core mining functionality +│ ├── mining.go # Interfaces and types +│ ├── miner.go # BaseMiner shared logic +│ ├── manager.go # Miner lifecycle management +│ ├── service.go # REST API endpoints +│ ├── xmrig*.go # XMRig implementation +│ ├── ttminer*.go # TT-Miner implementation +│ ├── profile_manager.go +│ └── config_manager.go +├── node/ # P2P networking +│ ├── identity.go # Node identity (X25519) +│ ├── peer.go # Peer registry +│ ├── transport.go # WebSocket transport +│ ├── message.go # Protocol messages +│ ├── controller.go # Remote operations +│ └── worker.go # Message handlers +└── database/ # Persistence + └── sqlite.go # SQLite operations +``` + +## Core Interfaces + +### Miner Interface + +```go +type Miner interface { + Install() error + Uninstall() error + Start(cfg *Config) error + Stop() error + GetStats() (*PerformanceMetrics, error) + GetConfig() *Config + GetBinaryPath() string + GetDataPath() string + GetVersion() (string, error) + IsInstalled() bool + IsRunning() bool + GetMinerType() string + GetName() string +} +``` + +### Manager Interface + +```go +type ManagerInterface interface { + StartMiner(minerType string, cfg *Config) (string, error) + StopMiner(name string) error + GetMinerStats(name string) (*PerformanceMetrics, error) + ListMiners() []MinerStatus + InstallMiner(minerType string) error + UninstallMiner(minerType string) error +} +``` + +## REST API Routes + +```go +// System +GET /info # System information + +// Miners +GET /miners # List running miners +GET /miners/available # List installable miners +DELETE /miners/:name # Stop miner +GET /miners/:name/stats # Get miner stats +GET /miners/:name/logs # Get miner logs +POST /miners/:name/stdin # Send stdin command +GET /miners/:name/hashrate-history + +// Installation +POST /miners/:type/install +DELETE /miners/:type/uninstall + +// Profiles +GET /profiles +POST /profiles +PUT /profiles/:id +DELETE /profiles/:id +POST /profiles/:id/start + +// History +GET /history/miners +GET /history/miners/:name +GET /history/miners/:name/hashrate + +// P2P +GET /node/info +GET /peers +POST /peers +DELETE /peers/:id +POST /peers/:id/ping + +// Remote +GET /remote/stats +GET /remote/:peerId/stats +POST /remote/:peerId/start +POST /remote/:peerId/stop +``` + +## Miner Implementations + +### XMRig + +- Downloads from GitHub releases +- Generates `config.json` for each run +- Polls HTTP API (port 8080) for stats +- Parses stdout for hashrate if API unavailable + +### TT-Miner + +- Downloads from GitHub releases +- Uses command-line arguments +- Parses stdout for stats (no HTTP API) +- Supports CUDA/OpenCL GPU mining + +## Stats Collection + +```go +// Every 10 seconds +func (m *Manager) collectStats() { + for _, miner := range m.miners { + stats, err := miner.GetStats() + if err != nil { + continue + } + + // Store in memory (high-res, 5 min) + m.hashrateHistory[name].AddPoint(stats.Hashrate) + + // Store in SQLite (low-res, 30 days) + m.db.InsertHashrate(name, stats.Hashrate, time.Now()) + } +} +``` + +## P2P Architecture + +### Node Identity + +```go +type NodeIdentity struct { + ID string // Derived from public key + Name string // Human-friendly name + PublicKey string // X25519 base64 + Role NodeRole // controller|worker|dual +} +``` + +### Message Protocol + +```go +type Message struct { + ID string // UUID + Type MessageType // handshake, ping, get_stats, etc. + From string // Sender node ID + To string // Recipient node ID + Timestamp time.Time + Payload json.RawMessage +} +``` + +### WebSocket Transport + +- Listens on port 9091 by default +- Binary frames with JSON messages +- Automatic reconnection handling +- Ping/pong keepalive + +## Error Handling + +All API endpoints return consistent error format: + +```json +{ + "error": "Error message here" +} +``` + +HTTP status codes: +- `200` - Success +- `400` - Bad request +- `404` - Not found +- `500` - Server error diff --git a/site-docs/architecture/frontend.md b/site-docs/architecture/frontend.md new file mode 100644 index 0000000..7998f61 --- /dev/null +++ b/site-docs/architecture/frontend.md @@ -0,0 +1,165 @@ +# Frontend Architecture + +The Angular frontend provides a modern, responsive dashboard for miner management. + +## Technology Stack + +- **Angular 20+** - Standalone components +- **Tailwind CSS** - Utility-first styling +- **Chart.js** - Hashrate visualization +- **xterm.js** - Terminal emulation for console + +## Component Structure + +``` +ui/src/app/ +├── app.ts # Root component +├── app.routes.ts # Route definitions +├── app.config.ts # App configuration +├── miner.service.ts # API communication +├── node.service.ts # P2P node service +│ +├── components/ +│ └── sidebar/ # Navigation sidebar +│ +├── layouts/ +│ └── main-layout/ # Page layout wrapper +│ +├── pages/ +│ ├── dashboard/ # Main monitoring view +│ ├── profiles/ # Profile management +│ ├── console/ # Terminal output +│ ├── workers/ # Running miners +│ ├── miners/ # Installation +│ ├── nodes/ # P2P management +│ └── pools/ # Pool information +│ +├── dashboard.component.* # Stats and charts +├── chart.component.* # Hashrate chart +├── profile-*.component.* # Profile CRUD +├── console.component.* # Terminal +└── setup-wizard.component.* # Initial setup +``` + +## Key Components + +### Dashboard Component + +Displays real-time mining statistics: + +- **Stats Bar**: Hashrate, shares, uptime, pool, difficulty, workers +- **Chart**: Time-series hashrate visualization +- **Quick Stats**: Peak rate, efficiency, share time +- **Worker Selector**: Switch between multiple miners + +### Chart Component + +Chart.js-based hashrate visualization: + +- Time range selector (5m, 15m, 1h, 6h, 24h) +- Real-time updates every 10 seconds +- Historical data from SQLite + +### Console Component + +Terminal emulator with: + +- ANSI color support via ansi_up +- Auto-scroll toggle +- Stdin command input +- Worker selection dropdown + +### Profile Components + +- **List**: Card-based profile display with actions +- **Create**: Form for new profiles +- **Edit**: Modify existing profiles + +## Services + +### MinerService + +Handles all API communication: + +```typescript +@Injectable({ providedIn: 'root' }) +export class MinerService { + getMiners(): Observable + getSystemInfo(): Observable + startMiner(profileId: string): Observable + stopMiner(name: string): Observable + getMinerStats(name: string): Observable + getMinerLogs(name: string): Observable + sendStdin(name: string, input: string): Observable + getHashrateHistory(name: string, range: string): Observable + // ... profiles, installation, etc. +} +``` + +### NodeService + +P2P node management: + +```typescript +@Injectable({ providedIn: 'root' }) +export class NodeService { + getNodeInfo(): Observable + getPeers(): Observable + addPeer(peer: PeerAdd): Observable + removePeer(id: string): Observable + pingPeer(id: string): Observable +} +``` + +## Routing + +```typescript +export const routes: Routes = [ + { path: '', component: DashboardComponent }, + { path: 'profiles', component: ProfileListComponent }, + { path: 'profiles/new', component: ProfileCreateComponent }, + { path: 'profiles/:id/edit', component: ProfileEditComponent }, + { path: 'console', component: ConsoleComponent }, + { path: 'workers', component: WorkersComponent }, + { path: 'miners', component: MinersComponent }, + { path: 'nodes', component: NodesComponent }, + { path: 'pools', component: PoolsComponent }, + { path: 'admin', component: AdminComponent }, +]; +``` + +## Styling + +### Design System + +| Element | Style | +|---------|-------| +| Background | Dark slate (#0a0a12) | +| Cards | Slightly lighter slate | +| Accent | Cyan and lime | +| Text | White and gray variants | +| Success | Green | +| Error | Red | +| Warning | Yellow | + +### Responsive Design + +- Mobile-first approach +- Sidebar collapses on small screens +- Grid layouts adapt to viewport + +## Build Output + +The UI builds to a web component: + +```bash +ng build +# Outputs: ui/dist/mbe-mining-dashboard.js +``` + +Can be embedded in any HTML page: + +```html + + +``` diff --git a/site-docs/architecture/overview.md b/site-docs/architecture/overview.md new file mode 100644 index 0000000..bc1f90f --- /dev/null +++ b/site-docs/architecture/overview.md @@ -0,0 +1,116 @@ +# Architecture Overview + +The Mining Dashboard follows a modular architecture with clear separation of concerns. + +## High-Level Architecture + +``` +┌─────────────────────────────────────────────────────────────┐ +│ Web Browser │ +│ Angular UI (4200) │ +└─────────────────────┬───────────────────────────────────────┘ + │ HTTP/REST +┌─────────────────────▼───────────────────────────────────────┐ +│ Go Backend (9090) │ +│ ┌──────────────────────────────────────────────────────┐ │ +│ │ REST API (Gin) │ │ +│ │ /api/v1/mining/* │ │ +│ └──────────────────────────────────────────────────────┘ │ +│ │ │ +│ ┌──────────────────────▼──────────────────────────────┐ │ +│ │ Mining Manager │ │ +│ │ - Process lifecycle - Stats collection │ │ +│ │ - Profile management - Hashrate history │ │ +│ └──────────────────────────────────────────────────────┘ │ +│ │ │ +│ ┌───────────┬───────────┴────────────┬────────────────┐ │ +│ │ XMRig │ TT-Miner │ Future... │ │ +│ │ Adapter │ Adapter │ Miners │ │ +│ └───────────┴────────────────────────┴────────────────┘ │ +└─────────────────────────────────────────────────────────────┘ + │ + ┌───────────────┼───────────────┐ + ▼ ▼ ▼ + ┌─────────┐ ┌─────────┐ ┌─────────┐ + │ XMRig │ │TT-Miner │ │ SQLite │ + │ Process │ │ Process │ │ DB │ + └─────────┘ └─────────┘ └─────────┘ +``` + +## Component Responsibilities + +### Frontend (Angular) + +| Component | Purpose | +|-----------|---------| +| Dashboard | Real-time hashrate display, stats bar | +| Profiles | CRUD for mining configurations | +| Console | Live miner output with ANSI colors | +| Workers | Running miner instances | +| Nodes | P2P peer management | + +### Backend (Go) + +| Package | Purpose | +|---------|---------| +| `pkg/mining` | Core miner management, API service | +| `pkg/node` | P2P networking, identity, transport | +| `pkg/database` | SQLite persistence layer | +| `cmd/mining` | CLI commands via Cobra | + +## Data Flow + +### Starting a Miner + +``` +1. UI: POST /api/v1/mining/profiles/{id}/start +2. Service: Validates profile, calls Manager.StartMiner() +3. Manager: Creates miner instance (XMRig/TT-Miner) +4. Miner: Generates config, spawns process +5. Manager: Starts stats collection goroutine +6. Response: Returns miner name to UI +``` + +### Stats Collection + +``` +Every 10 seconds: +1. Manager iterates running miners +2. Each miner adapter polls stats (HTTP API or stdout parsing) +3. Stats stored in memory + SQLite +4. UI polls /api/v1/mining/miners for updates +``` + +## Storage + +### Configuration Files + +``` +~/.config/lethean-desktop/ +├── mining_profiles.json # Saved profiles +├── miners.json # Autostart config +├── node.json # P2P identity +└── peers.json # Known peers +``` + +### Data Files + +``` +~/.local/share/lethean-desktop/ +├── miners/ # Installed miner binaries +│ ├── xmrig/ +│ └── tt-miner/ +├── node/ +│ └── private.key # X25519 private key +└── mining.db # SQLite database +``` + +## Key Design Decisions + +| Decision | Rationale | +|----------|-----------| +| Interface-based miners | Easy to add new miner types | +| Gorilla WebSocket | P2P transport with good browser support | +| SQLite | Zero-config persistence, embedded | +| Gin framework | Fast, widely used Go HTTP framework | +| Angular standalone | Modern, tree-shakable components | diff --git a/site-docs/cli/examples.md b/site-docs/cli/examples.md new file mode 100644 index 0000000..1e0c6b1 --- /dev/null +++ b/site-docs/cli/examples.md @@ -0,0 +1,215 @@ +# CLI Examples + +Practical examples for common tasks. + +## Quick Start + +### Start Mining with XMRig + +```bash +# Install XMRig +miner-cli install xmrig + +# Start mining with a profile +miner-cli start --profile "My Profile" + +# Or with direct parameters +miner-cli start xmrig --pool pool.example.com:3333 --wallet 4xxx... +``` + +### Monitor Mining Status + +```bash +# Check status of all miners +miner-cli status + +# Watch status continuously +watch -n 5 miner-cli status +``` + +--- + +## Profile Management + +### Create and Use Profiles + +```bash +# List existing profiles +miner-cli profile list + +# Start a miner from profile +miner-cli start --profile "Monero Mining" +``` + +--- + +## Multi-Node Operations + +### Set Up a Controller Node + +```bash +# Initialize as controller +miner-cli node init --name "control-center" --role controller + +# Start the P2P server +miner-cli node serve --listen :9091 +``` + +### Set Up a Worker Node + +```bash +# Initialize as worker +miner-cli node init --name "rig-alpha" --role worker + +# Start accepting connections +miner-cli node serve --listen :9091 +``` + +### Connect and Manage Peers + +```bash +# On controller: add a worker +miner-cli peer add --address 192.168.1.100:9091 --name "rig-alpha" + +# List all peers +miner-cli peer list + +# Ping a peer +miner-cli peer ping abc123 +``` + +### Remote Mining Commands + +```bash +# Get stats from all remote miners +miner-cli remote status + +# Start miner on remote peer +miner-cli remote start abc123 --profile "My Profile" + +# Stop miner on remote peer +miner-cli remote stop abc123 xmrig-456 + +# Get logs from remote miner +miner-cli remote logs abc123 xmrig-456 --lines 50 +``` + +--- + +## Server Operations + +### Run the Dashboard + +```bash +# Start with defaults (port 9090) +miner-cli serve + +# Custom port +miner-cli serve --port 8080 + +# Disable autostart +miner-cli serve --no-autostart +``` + +### System Health Check + +```bash +# Run diagnostics +miner-cli doctor +``` + +Output: +``` +System Check +============ +Platform: linux +CPU: AMD Ryzen 9 5950X +Cores: 32 +Memory: 64 GB + +Miner Status +============ +✓ xmrig v6.25.0 installed +✗ tt-miner not installed + +Recommendations +=============== +- Enable huge pages for better performance +``` + +--- + +## Scripting Examples + +### Bash Script: Auto-restart on Failure + +```bash +#!/bin/bash +PROFILE="My Profile" + +while true; do + miner-cli start --profile "$PROFILE" + sleep 10 + + # Check if still running + if ! miner-cli status | grep -q "running"; then + echo "Miner stopped, restarting..." + continue + fi + + sleep 60 +done +``` + +### Monitor Hashrate via API + +```bash +#!/bin/bash +while true; do + curl -s http://localhost:9090/api/v1/mining/miners | \ + jq -r '.[] | "\(.name): \(.full_stats.hashrate.total[0] // 0) H/s"' + sleep 10 +done +``` + +--- + +## Docker Examples + +### Run with Docker Compose + +```yaml +# docker-compose.yml +version: '3.8' +services: + mining-dashboard: + image: mining-cli:latest + command: serve --port 9090 + ports: + - "9090:9090" + volumes: + - mining-data:/root/.local/share/lethean-desktop + - mining-config:/root/.config/lethean-desktop + +volumes: + mining-data: + mining-config: +``` + +```bash +docker-compose up -d +``` + +### Multi-Node Docker Setup + +```bash +# Start controller +docker run -d --name controller \ + -p 9090:9090 -p 9091:9091 \ + mining-cli node serve + +# Start workers +docker run -d --name worker1 \ + -p 9092:9091 \ + mining-cli node serve +``` diff --git a/site-docs/development/building.md b/site-docs/development/building.md new file mode 100644 index 0000000..8e6de3c --- /dev/null +++ b/site-docs/development/building.md @@ -0,0 +1,222 @@ +# Building from Source + +Complete guide to building the Mining Dashboard from source. + +## Prerequisites + +### Required + +| Tool | Version | Purpose | +|------|---------|---------| +| Go | 1.21+ | Backend compilation | +| Node.js | 20+ | Frontend build | +| npm | 10+ | Package management | +| Make | any | Build automation | + +### Optional + +| Tool | Purpose | +|------|---------| +| golangci-lint | Code linting | +| swag | Swagger doc generation | +| Docker | Containerized builds | + +## Quick Build + +```bash +# Clone repository +git clone https://github.com/Snider/Mining.git +cd Mining + +# Build everything +make build + +# Output: ./miner-cli +``` + +## Backend Build + +### Standard Build + +```bash +make build +# or +go build -o miner-cli ./cmd/mining +``` + +### With Version Info + +```bash +VERSION=1.0.0 +go build -ldflags "-X main.version=$VERSION" -o miner-cli ./cmd/mining +``` + +### Cross-Platform Builds + +```bash +# Build for all platforms +make build-all + +# Or manually: +GOOS=linux GOARCH=amd64 go build -o dist/miner-cli-linux-amd64 ./cmd/mining +GOOS=darwin GOARCH=amd64 go build -o dist/miner-cli-darwin-amd64 ./cmd/mining +GOOS=windows GOARCH=amd64 go build -o dist/miner-cli-windows-amd64.exe ./cmd/mining +``` + +## Frontend Build + +```bash +cd ui + +# Install dependencies +npm install + +# Development build +ng build + +# Production build +ng build --configuration production + +# Output: ui/dist/ +``` + +## Generate Documentation + +### Swagger Docs + +```bash +# Install swag +go install github.com/swaggo/swag/cmd/swag@latest + +# Generate +make docs +# or +swag init -g ./cmd/mining/main.go +``` + +### MkDocs Site + +```bash +# Create virtual environment +python3 -m venv .venv +source .venv/bin/activate + +# Install MkDocs +pip install mkdocs-material mkdocs-glightbox + +# Serve locally +mkdocs serve + +# Build static site +mkdocs build +``` + +## Running Tests + +### Unit Tests + +```bash +# All tests with coverage +make test + +# Specific package +go test -v ./pkg/mining/... + +# With race detection +go test -race ./... +``` + +### E2E Tests + +```bash +cd ui + +# Install Playwright +npx playwright install + +# Run all E2E tests +npm run e2e + +# API tests only (faster) +npm run e2e:api + +# Interactive UI mode +npm run e2e:ui +``` + +## Development Server + +```bash +# Start backend + frontend +make dev + +# Or separately: +# Terminal 1: Backend +./miner-cli serve + +# Terminal 2: Frontend +cd ui && ng serve +``` + +Access: +- Frontend: http://localhost:4200 +- Backend API: http://localhost:9090/api/v1/mining +- Swagger UI: http://localhost:9090/api/v1/mining/swagger/index.html + +## Docker Build + +### Single Binary + +```bash +docker build -t mining-cli . +docker run -p 9090:9090 mining-cli serve +``` + +### Multi-Node Setup + +```bash +docker-compose -f docker-compose.p2p.yml up +``` + +## Release Build + +```bash +# Using GoReleaser +make package + +# Creates: +# - dist/miner-cli_linux_amd64.tar.gz +# - dist/miner-cli_darwin_amd64.tar.gz +# - dist/miner-cli_windows_amd64.zip +``` + +## Troubleshooting + +### CGO Issues + +SQLite requires CGO. If you get errors: + +```bash +# Enable CGO +CGO_ENABLED=1 go build ./cmd/mining +``` + +### Node Modules + +If frontend build fails: + +```bash +cd ui +rm -rf node_modules package-lock.json +npm install +``` + +### Swagger Generation + +If swagger fails: + +```bash +go install github.com/swaggo/swag/cmd/swag@latest +export PATH=$PATH:$(go env GOPATH)/bin +swag init -g ./cmd/mining/main.go +``` diff --git a/site-docs/development/contributing.md b/site-docs/development/contributing.md new file mode 100644 index 0000000..99e4b0a --- /dev/null +++ b/site-docs/development/contributing.md @@ -0,0 +1,122 @@ +# Contributing + +Contributions are welcome! Here's how to get involved. + +## Getting Started + +1. Fork the repository +2. Clone your fork +3. Create a feature branch +4. Make your changes +5. Submit a pull request + +## Development Setup + +### Prerequisites + +- Go 1.21+ +- Node.js 20+ +- Make + +### Clone and Build + +```bash +git clone https://github.com/yourusername/Mining.git +cd Mining + +# Build backend +make build + +# Build frontend +cd ui && npm install && ng build +``` + +## Code Style + +### Go + +- Run `make lint` before committing +- Follow standard Go conventions +- Use meaningful variable names +- Add comments for exported functions + +### TypeScript/Angular + +- Use standalone components +- Follow Angular style guide +- Use TypeScript strict mode + +## Testing + +### Backend Tests + +```bash +make test # All tests +go test -v ./pkg/mining/... # Specific package +go test -run TestName ./... # Single test +``` + +### E2E Tests + +```bash +cd ui +npm run e2e # All E2E tests +npm run e2e:api # API tests only +npm run e2e:ui # Interactive mode +``` + +## Pull Request Guidelines + +1. **One feature per PR** - Keep changes focused +2. **Write tests** - Add tests for new functionality +3. **Update docs** - Update relevant documentation +4. **Describe changes** - Clear PR description +5. **Pass CI** - All tests must pass + +## Adding a New Miner + +To add support for a new miner: + +1. Create `pkg/mining/newminer.go` +2. Implement the `Miner` interface +3. Register in `manager.go` +4. Add UI support if needed +5. Write tests +6. Document the miner + +Example structure: + +```go +type NewMiner struct { + *BaseMiner + // miner-specific fields +} + +func NewNewMiner() *NewMiner { + return &NewMiner{ + BaseMiner: NewBaseMiner("newminer", "newminer"), + } +} + +func (m *NewMiner) Start(cfg *Config) error { + // Implementation +} + +func (m *NewMiner) GetStats() (*PerformanceMetrics, error) { + // Implementation +} +``` + +## Reporting Issues + +When reporting bugs: + +1. Check existing issues first +2. Include system information +3. Provide steps to reproduce +4. Include relevant logs +5. Attach screenshots if UI-related + +## License + +By contributing, you agree that your contributions will be licensed under the project's license. diff --git a/ui/playwright-report/index.html b/ui/playwright-report/index.html index 41f218e..26aeb74 100644 --- a/ui/playwright-report/index.html +++ b/ui/playwright-report/index.html @@ -82,4 +82,4 @@ Error generating stack: `+n.message+`
- \ No newline at end of file + \ No newline at end of file diff --git a/ui/playwright-report/trace/assets/codeMirrorModule-Bucv2d7q.js b/ui/playwright-report/trace/assets/codeMirrorModule-Bucv2d7q.js new file mode 100644 index 0000000..59afb05 --- /dev/null +++ b/ui/playwright-report/trace/assets/codeMirrorModule-Bucv2d7q.js @@ -0,0 +1,25 @@ +import{q as _u}from"./defaultSettingsView-BEpdCv1S.js";var vi={exports:{}},Ru=vi.exports,ha;function Nt(){return ha||(ha=1,(function(At,Ot){(function(C,De){At.exports=De()})(Ru,(function(){var C=navigator.userAgent,De=navigator.platform,P=/gecko\/\d/i.test(C),fe=/MSIE \d/.test(C),Se=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),le=/Edge\/(\d+)/.exec(C),b=fe||Se||le,W=b&&(fe?document.documentMode||6:+(le||Se)[1]),j=!le&&/WebKit\//.test(C),oe=j&&/Qt\/\d+\.\d+/.test(C),w=!le&&/Chrome\/(\d+)/.exec(C),B=w&&+w[1],A=/Opera\//.test(C),K=/Apple Computer/.test(navigator.vendor),ae=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),F=/PhantomJS/.test(C),N=K&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),R=/Android/.test(C),_=N||R||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),Y=N||/Mac/.test(De),ce=/\bCrOS\b/.test(C),$=/win/i.test(De),ee=A&&C.match(/Version\/(\d*\.\d*)/);ee&&(ee=Number(ee[1])),ee&&ee>=15&&(A=!1,j=!0);var Ae=Y&&(oe||A&&(ee==null||ee<12.11)),se=P||b&&W>=9;function q(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Fe=function(e,t){var n=e.className,r=q(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function G(e,t){return M(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var we=function(){this.id=null,this.f=null,this.time=0,this.handler=pe(this.onTimeout,this)};we.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},we.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(xe(Ue)+" ");return Ue[e]}function xe(e){return e[e.length-1]}function Ie(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||ze.test(e))}function Le(e,t){return t?t.source.indexOf("\\w")>-1&&he(e)?!0:t.test(e):he(e)}function ve(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ee(e){return e.charCodeAt(0)>=768&&Be.test(e)}function Tt(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function or(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var br=null;function lr(e,t,n){var r;br=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:br=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:br=i)}return r??br}var mi=(function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,v){this.level=u,this.from=h,this.to=v}return function(u,h){var v=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var k=u.length,y=[],E=0;E-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ye(e,t){var n=Qt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Bt(e){e.prototype.on=function(t,n){ye(this,t,n)},e.prototype.off=function(t,n){dt(this,t,n)}}function ht(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Nr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ar(e){ht(e),Nr(e)}function ln(e){return e.target||e.srcElement}function Wt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),Y&&e.ctrlKey&&t==1&&(t=3),t}var xi=(function(){if(b&&W<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e})(),Or;function Wn(e){if(Or==null){var t=d("span","​");G(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&W<8))}var n=Or?d("span","​"):d("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var an;function sr(e){if(an!=null)return an;var t=G(e,document.createTextNode("AخA")),n=L(t,0,1).getBoundingClientRect(),r=L(t,1,2).getBoundingClientRect();return M(e),!n||n.left==n.right?!1:an=r.right-n.right<3}var zt=` + +b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(` +`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Hn=(function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")})(),Ht=null;function yi(e){if(Ht!=null)return Ht;var t=G(e,d("span","x")),n=t.getBoundingClientRect(),r=L(t,0,1).getBoundingClientRect();return Ht=Math.abs(n.left-r.left)>1}var Pr={},_t={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){_t[e]=t}function Ir(e){if(typeof e=="string"&&_t.hasOwnProperty(e))e=_t[e];else if(e&&typeof e.name=="string"&&_t.hasOwnProperty(e.name)){var t=_t[e.name];typeof t=="string"&&(t={name:t}),e=O(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Te(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Wr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.post},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ge(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?D(n,ge(e,n).text.length):Ra(t,ge(e,t.line).text.length)}function Ra(e,t){var n=e.ch;return n==null||n>t?D(e.line,t):n<0?D(e.line,0):e}function go(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Xt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Xt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xt.fromSaved=function(e,t,n){return t instanceof _n?new Xt(e,Gt(e.mode,t.state),n,t.lookAhead):new Xt(e,Gt(e.mode,t),n)},Xt.prototype.save=function(e){var t=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new _n(t,this.maxLookAhead):t};function vo(e,t,n,r){var i=[e.state.modeGen],o={};wo(e,t.text,e.doc.mode,n,function(u,h){return i.push(u,h)},o,r);for(var l=n.state,a=function(u){n.baseTokens=i;var h=e.state.overlays[u],v=1,k=0;n.state=!0,wo(e,t.text,h.mode,n,function(y,E){for(var H=v;ky&&i.splice(v,1,y,i[v+1],Z),v+=2,k=Math.min(y,Z)}if(E)if(h.opaque)i.splice(H,v-H,y,"overlay "+E),v=H+2;else for(;He.options.maxHighlightLength&&Gt(e.doc.mode,r.state),o=vo(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function fn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Xt(r,!0,t);var o=qa(e,t,n),l=o>r.first&&ge(r,o-1).stateAfter,a=l?Xt.fromSaved(r,l,o):new Xt(r,Wr(r.mode),o);return r.iter(o,t,function(s){bi(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&ut.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var yo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function bo(e,t,n,r){var i=e.doc,o=i.mode,l;t=Me(i,t);var a=ge(i,t.line),s=fn(e,t.line,n),u=new Je(a.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||u.pose.options.maxHighlightLength?(a=!1,l&&bi(e,t,r,h.pos),h.pos=t.length,v=null):v=ko(ki(n,h,r.state,k),o),k){var y=k[0].name;y&&(v="m-"+(v?y+" "+v:y))}if(!a||u!=v){for(;sl;--a){if(a<=o.first)return o.first;var s=ge(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof _n?u.lookAhead:0)<=o.modeFrontier))return a;var h=Ce(s.text,null,e.options.tabSize);(i==null||r>h)&&(i=a-1,r=h)}return i}function ja(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=ge(e,r).stateAfter;if(i&&(!(i instanceof _n)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new Rn(l,o.from,s?null:o.to))}}return r}function Za(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var ue=0;ue0)){var h=[s,1],v=re(u.from,a.from),k=re(u.to,a.to);(v<0||!l.inclusiveLeft&&!v)&&h.push({from:u.from,to:a.from}),(k>0||!l.inclusiveRight&&!k)&&h.push({from:a.to,to:u.to}),i.splice.apply(i,h),s+=h.length-3}}return i}function To(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!r||Si(r,o.marker)<0)&&(r=o.marker)}return r}function Ao(e,t,n,r,i){var o=ge(e,t),l=$t&&o.markedSpans;if(l)for(var a=0;a=0&&v<=0||h<=0&&v>=0)&&(h<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?re(u.to,n)>=0:re(u.to,n)>0)||h>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?re(u.from,r)<=0:re(u.from,r)<0)))return!0}}}function qt(e){for(var t;t=Mo(e);)e=t.find(-1,!0).line;return e}function Va(e){for(var t;t=Kn(e);)e=t.find(1,!0).line;return e}function $a(e){for(var t,n;t=Kn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Li(e,t){var n=ge(e,t),r=qt(n);return n==r?t:f(r)}function Fo(e,t){if(t>e.lastLine())return t;var n=ge(e,t),r;if(!cr(e,n))return t;for(;r=Kn(n);)n=r.find(1,!0).line;return f(n)+1}function cr(e,t){var n=$t&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var _r=function(e,t,n){this.text=e,Co(this,t),this.height=n?n(this):1};_r.prototype.lineNo=function(){return f(this)},Bt(_r);function es(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),To(e),Co(e,n);var i=r?r(e):1;i!=e.height&&Ft(e,i)}function ts(e){e.parent=null,To(e)}var rs={},ns={};function Eo(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ns:rs;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function No(e,t){var n=S("span",null,null,j?"padding-right: .1px":null),r={pre:S("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=os,sr(e.display.measure)&&(l=We(o,e.doc.direction))&&(r.addToken=as(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);ss(o,r,mo(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=ne(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=ne(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Wn(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(j){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=ne(r.pre.className,r.textClass||"")),r}function is(e){var t=d("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function os(e,t,n,r,i,o,l){if(t){var a=e.splitSpaces?ls(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),b&&W<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var v=0;;){s.lastIndex=v;var k=s.exec(t),y=k?k.index-v:t.length-v;if(y){var E=document.createTextNode(a.slice(v,v+y));b&&W<9?h.appendChild(d("span",[E])):h.appendChild(E),e.map.push(e.pos,e.pos+y,E),e.col+=y,e.pos+=y}if(!k)break;v+=y+1;var H=void 0;if(k[0]==" "){var Z=e.cm.options.tabSize,Q=Z-e.col%Z;H=h.appendChild(d("span",et(Q),"cm-tab")),H.setAttribute("role","presentation"),H.setAttribute("cm-text"," "),e.col+=Q}else k[0]=="\r"||k[0]==` +`?(H=h.appendChild(d("span",k[0]=="\r"?"␍":"␤","cm-invalidchar")),H.setAttribute("cm-text",k[0]),e.col+=1):(H=e.cm.options.specialCharPlaceholder(k[0]),H.setAttribute("cm-text",k[0]),b&&W<9?h.appendChild(d("span",[H])):h.appendChild(H),e.col+=1);e.map.push(e.pos,e.pos+1,H),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var ie=n||"";r&&(ie+=r),i&&(ie+=i);var V=d("span",[h],ie,o);if(l)for(var ue in l)l.hasOwnProperty(ue)&&ue!="style"&&ue!="class"&&V.setAttribute(ue,l[ue]);return e.content.appendChild(V)}e.content.appendChild(h)}}function ls(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&v.from<=u));k++);if(v.to>=h)return e(n,r,i,o,l,a,s);e(n,r.slice(0,v.to-u),i,o,null,a,s),o=null,r=r.slice(v.to-u),u=v.to}}}function Oo(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function ss(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;ls||Ne.collapsed&&me.to==s&&me.from==s)){if(me.to!=null&&me.to!=s&&y>me.to&&(y=me.to,H=""),Ne.className&&(E+=" "+Ne.className),Ne.css&&(k=(k?k+";":"")+Ne.css),Ne.startStyle&&me.from==s&&(Z+=" "+Ne.startStyle),Ne.endStyle&&me.to==y&&(ue||(ue=[])).push(Ne.endStyle,me.to),Ne.title&&((ie||(ie={})).title=Ne.title),Ne.attributes)for(var Ke in Ne.attributes)(ie||(ie={}))[Ke]=Ne.attributes[Ke];Ne.collapsed&&(!Q||Si(Q.marker,Ne)<0)&&(Q=me)}else me.from>s&&y>me.from&&(y=me.from)}if(ue)for(var st=0;st=a)break;for(var Mt=Math.min(a,y);;){if(h){var wt=s+h.length;if(!Q){var tt=wt>Mt?h.slice(0,Mt-s):h;t.addToken(t,tt,v?v+E:E,Z,s+tt.length==y?H:"",k,ie)}if(wt>=Mt){h=h.slice(Mt-s),s=Mt;break}s=wt,Z=""}h=i.slice(o,o=n[u++]),v=Eo(n[u++],t.cm.options)}}}function Po(e,t,n){this.line=t,this.rest=$a(t),this.size=this.rest?f(xe(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cr(e,t)}function Gn(e,t,n){for(var r=[],i,o=t;o2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ro(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function ys(e,t){t=qt(t);var n=f(t),r=e.display.externalMeasured=new Po(e.doc,t,n);r.lineN=n;var i=r.built=No(e,r);return r.text=i.pre,G(e.display.lineMeasure,i.pre),r}function qo(e,t,n,r){return Zt(e,qr(e,t),n,r)}function Fi(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=s-a,i=o-1,t>=s&&(l="right")),i!=null){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],l="left";if(n=="right"&&i==s-a)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function ks(e,t,n,r){var i=Ko(t.map,n,r),o=i.node,l=i.start,a=i.end,s=i.collapse,u;if(o.nodeType==3){for(var h=0;h<4;h++){for(;l&&Ee(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+a0&&(s=r="right");var v;e.options.lineWrapping&&(v=o.getClientRects()).length>1?u=v[r=="right"?v.length-1:0]:u=o.getBoundingClientRect()}if(b&&W<9&&!l&&(!u||!u.left&&!u.right)){var k=o.parentNode.getClientRects()[0];k?u={left:k.left,right:k.left+Kr(e.display),top:k.top,bottom:k.bottom}:u=jo}for(var y=u.top-t.rect.top,E=u.bottom-t.rect.top,H=(y+E)/2,Z=t.view.measure.heights,Q=0;Q=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l(u=="before"?s-1:s,u=="before");function h(E,H,Z){var Q=a[H],ie=Q.level==1;return l(Z?E-1:E,ie!=Z)}var v=lr(a,s,u),k=br,y=h(s,v,u=="before");return k!=null&&(y.other=h(s,k,u!="before")),y}function Jo(e,t){var n=0;t=Me(e.doc,t),e.options.lineWrapping||(n=Kr(e.display)*t.ch);var r=ge(e.doc,t.line),i=er(r)+Xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ni(e,t,n,r,i){var o=D(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Oi(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ni(r.first,0,null,-1,-1);var i=g(r,n),o=r.first+r.size-1;if(i>o)return Ni(r.first+r.size-1,ge(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=ge(r,i);;){var a=Ss(e,l,i,t,n),s=Qa(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=ge(r,i=u.line)}}function Qo(e,t,n,r){r-=Ei(t);var i=t.text.length,o=Pt(function(l){return Zt(e,n,l-1).bottom<=r},i,0);return i=Pt(function(l){return Zt(e,n,l).top>r},o,i),{begin:o,end:i}}function Vo(e,t,n,r){n||(n=qr(e,t));var i=Yn(e,t,Zt(e,n,r),"line").top;return Qo(e,t,n,i)}function Pi(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Ss(e,t,n,r,i){i-=er(t);var o=qr(e,t),l=Ei(t),a=0,s=t.text.length,u=!0,h=We(t,e.doc.direction);if(h){var v=(e.options.lineWrapping?Ts:Ls)(e,t,n,o,h,r,i);u=v.level!=1,a=u?v.from:v.to-1,s=u?v.to:v.from-1}var k=null,y=null,E=Pt(function(be){var me=Zt(e,o,be);return me.top+=l,me.bottom+=l,Pi(me,r,i,!1)?(me.top<=i&&me.left<=r&&(k=be,y=me),!0):!1},a,s),H,Z,Q=!1;if(y){var ie=r-y.left=ue.bottom?1:0}return E=Tt(t.text,E,1),Ni(n,E,Z,Q,r-H)}function Ls(e,t,n,r,i,o,l){var a=Pt(function(v){var k=i[v],y=k.level!=1;return Pi(jt(e,D(n,y?k.to:k.from,y?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=s.level!=1,h=jt(e,D(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Pi(h,o,l,!0)&&h.top>l&&(s=i[a-1])}return s}function Ts(e,t,n,r,i,o,l){var a=Qo(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var h=null,v=null,k=0;k=u||y.to<=s)){var E=y.level!=1,H=Zt(e,r,E?Math.min(u,y.to)-1:Math.max(s,y.from)).right,Z=HZ)&&(h=y,v=Z)}}return h||(h=i[i.length-1]),h.fromu&&(h={from:h.from,to:u,level:h.level}),h}var Sr;function jr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Sr==null){Sr=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Sr.appendChild(document.createTextNode("x")),Sr.appendChild(d("br"));Sr.appendChild(document.createTextNode("x"))}G(e.measure,Sr);var n=Sr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function Kr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),n=d("pre",[t],"CodeMirror-line-like");G(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Ii(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:zi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function zi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function $o(e){var t=jr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Kr(e.display)-3);return function(i){if(cr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(u=ge(e.doc,s.line).text).length==s.ch){var h=Ce(u,u.length,e.options.tabSize)-u.length;s=D(s.line,Math.max(0,Math.round((o-_o(e.display).left)/Kr(e.display))-h))}return s}function Tr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)$t&&Li(e.doc,t)i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var o=Jn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var l=Jn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hr(e)}else{var a=Jn(e,t,t,-1),s=Jn(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Gn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):hr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Tr(e,t)];if(o.node!=null){var l=o.changes||(o.changes=[]);de(l,n)==-1&&l.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Jn(e,t,n,r){var i=Tr(e,t),o,l=e.display.view;if(!$t||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var a=e.display.viewFrom,s=0;s0){if(i==l.length-1)return null;o=a+l[i].size-t,i++}else o=a-t;t+=o,n+=o}for(;Li(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Cs(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Gn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Gn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Tr(e,n)))),r.viewTo=n}function el(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(d("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Qn(e,t){return e.top-t.top||e.left-t.left}function Ds(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=_o(e.display),a=l.left,s=Math.max(r.sizerWidth,wr(e)-r.sizer.offsetLeft)-l.right,u=i.direction=="ltr";function h(V,ue,be,me){ue<0&&(ue=0),ue=Math.round(ue),me=Math.round(me),o.appendChild(d("div",null,"CodeMirror-selected","position: absolute; left: "+V+`px; + top: `+ue+"px; width: "+(be??s-V)+`px; + height: `+(me-ue)+"px"))}function v(V,ue,be){var me=ge(i,V),Ne=me.text.length,Ke,st;function Xe(tt,St){return Zn(e,D(V,tt),"div",me,St)}function Mt(tt,St,ft){var nt=Vo(e,me,null,tt),rt=St=="ltr"==(ft=="after")?"left":"right",Qe=ft=="after"?nt.begin:nt.end-(/\s/.test(me.text.charAt(nt.end-1))?2:1);return Xe(Qe,rt)[rt]}var wt=We(me,i.direction);return or(wt,ue||0,be??Ne,function(tt,St,ft,nt){var rt=ft=="ltr",Qe=Xe(tt,rt?"left":"right"),Lt=Xe(St-1,rt?"right":"left"),nn=ue==null&&tt==0,yr=be==null&&St==Ne,gt=nt==0,Jt=!wt||nt==wt.length-1;if(Lt.top-Qe.top<=3){var ut=(u?nn:yr)&>,co=(u?yr:nn)&&Jt,ir=ut?a:(rt?Qe:Lt).left,Fr=co?s:(rt?Lt:Qe).right;h(ir,Qe.top,Fr-ir,Qe.bottom)}else{var Er,mt,on,ho;rt?(Er=u&&nn&>?a:Qe.left,mt=u?s:Mt(tt,ft,"before"),on=u?a:Mt(St,ft,"after"),ho=u&&yr&&Jt?s:Lt.right):(Er=u?Mt(tt,ft,"before"):a,mt=!u&&nn&>?s:Qe.right,on=!u&&yr&&Jt?a:Lt.left,ho=u?Mt(St,ft,"after"):s),h(Er,Qe.top,mt-Er,Qe.bottom),Qe.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Ur(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function rl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ri(e))}function _i(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ur(e))},100)}function Ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),j&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Hi(e))}function Ur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,Fe(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l.005||y<-.005)&&(ie.display.sizerWidth){var H=Math.ceil(h/Kr(e.display));H>e.display.maxLineLength&&(e.display.maxLineLength=H,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function nl(e){if(e.widgets)for(var t=0;t=l&&(o=g(t,er(ge(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function Ms(e,t){if(!Ze(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),i!=null&&!F){var l=d("div","​",null,`position: absolute; + top: `+(t.top-n.viewOffset-Xn(e.display))+`px; + height: `+(t.bottom-t.top+Yt(e)+n.barHeight)+`px; + left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function As(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?D(t.line,t.ch+1,"before"):t,t=t.ch?D(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=jt(e,t),s=!n||n==t?a:jt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=qi(e,i),h=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(xn(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),u.scrollLeft!=null&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(l=!0)),!l)break}return i}function Fs(e,t){var n=qi(e,t);n.scrollTop!=null&&xn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function qi(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Ai(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Mi(n),s=t.topa-r;if(t.topi+o){var h=Math.min(t.top,(u?a:t.bottom)-o);h!=i&&(l.scrollTop=h)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,k=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,y=wr(e)-n.gutters.offsetWidth,E=t.right-t.left>y;return E&&(t.right=t.left+y),t.left<10?l.scrollLeft=0:t.lefty+k-3&&(l.scrollLeft=t.right+(E?0:10)-y),l}function ji(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Es(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Jo(e,t.from),r=Jo(e,t.to);il(e,n,r,t.margin)}}function il(e,t,n,r){var i=qi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mn(e,i.scrollLeft,i.scrollTop)}function xn(e,t){Math.abs(e.doc.scrollTop-t)<2||(P||Ui(e,{top:t}),ol(e,t,!0),P&&Ui(e),kn(e,100))}function ol(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Cr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,fl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function yn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Mi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Dr=function(e,t,n){this.cm=n;var r=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ye(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ye(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&W<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dr.prototype.zeroWidthHack=function(){var e=Y&&!ae?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new we,this.disableVert=new we},Dr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),o=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Dr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bn=function(){};bn.prototype.update=function(){return{bottom:0,right:0}},bn.prototype.setScrollLeft=function(){},bn.prototype.setScrollTop=function(){},bn.prototype.clear=function(){};function Xr(e,t){t||(t=yn(e));var n=e.display.barWidth,r=e.display.barHeight;ll(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Vn(e),ll(e,yn(e)),n=e.display.barWidth,r=e.display.barHeight}function ll(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var al={native:Dr,null:bn};function sl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Fe(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new al[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ye(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Cr(e,t):xn(e,t)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var Ns=0;function Mr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ns,markArrays:null},us(e.curOp)}function Ar(e){var t=e.curOp;t&&cs(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ti(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Is(e){e.updatedDisplay=e.mustUpdate&&Ki(e.cm,e.update)}function zs(e){var t=e.cm,n=t.display;e.updatedDisplay&&Vn(t),e.barMeasure=yn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=qo(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Yt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-wr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Bs(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=fn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Gt(t.mode,r.state):null,s=vo(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,h=s.classes;h?o.styleClasses=h:u&&(o.styleClasses=null);for(var v=!l||l.length!=o.styles.length||u!=h&&(!u||!h||u.bgClass!=h.bgClass||u.textClass!=h.textClass),k=0;!v&&kn)return kn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Dt(e,function(){for(var o=0;o=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&el(e)==0)return!1;cl(e)&&(hr(e),t.dims=Ii(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),$t&&(o=Li(e.doc,o),l=Fo(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Cs(e,o,l),n.viewOffset=er(ge(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=el(e);if(!a&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=Rs(e);return s>4&&(n.lineDiv.style.display="none"),js(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,qs(u),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,kn(e,400)),n.updateLineNumbers=null,!0}function ul(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==wr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Mi(e.display)-Ai(e),n.top)}),t.visible=$n(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=$n(e.display,e.doc,n));if(!Ki(e,t))break;Vn(e);var i=yn(e);vn(e),Xr(e,i),Xi(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ui(e,t){var n=new ti(e,t);if(Ki(e,n)){Vn(e),ul(e,n);var r=yn(e);vn(e),Xr(e,r),Xi(e,r),n.finish()}}function js(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(E){var H=E.nextSibling;return j&&Y&&e.display.currentWheelTarget==E?E.style.display="none":E.parentNode.removeChild(E),H}for(var s=r.view,u=r.viewFrom,h=0;h-1&&(y=!1),Io(e,v,u,n)),y&&(M(v.lineNumber),v.lineNumber.appendChild(document.createTextNode(X(e.options,u)))),l=v.node.nextSibling}u+=v.size}for(;l;)l=a(l)}function Gi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ot(e,"gutterChanged",e)}function Xi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Yt(e)+"px"}function fl(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=zi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),b&&W<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!j&&!(P&&_)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Yi(r.gutters,r.lineNumbers),dl(i),n.init(i)}var ri=0,rr=null;b?rr=-.53:P?rr=15:w?rr=-.7:K&&(rr=-1/3);function hl(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function Us(e){var t=hl(e);return t.x*=rr,t.y*=rr,t}function pl(e,t){w&&B==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=hl(t),r=n.x,i=n.y,o=rr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,o=1);var l=e.display,a=l.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||i&&u){if(i&&Y&&j){e:for(var h=t.target,v=l.view;h!=a;h=h.parentNode)for(var k=0;k=0&&re(e,r.to())<=0)return n}return-1};var _e=function(e,t){this.anchor=e,this.head=t};_e.prototype.from=function(){return Hr(this.anchor,this.head)},_e.prototype.to=function(){return yt(this.anchor,this.head)},_e.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Kt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(k,y){return re(k.from(),y.from())}),n=de(t,i);for(var o=1;o0:s>=0){var u=Hr(a.from(),l.from()),h=yt(a.to(),l.to()),v=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new _e(v?h:u,v?u:h))}}return new Et(t,n)}function pr(e,t){return new Et([new _e(e,t||e)],0)}function gr(e){return e.text?D(e.from.line+e.text.length-1,xe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function gl(e,t){if(re(e,t.from)<0)return e;if(re(e,t.to)<=0)return gr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=gr(t).ch-t.to.ch),D(n,r)}function Zi(e,t){for(var n=[],r=0;r1&&e.remove(a.line+1,E-1),e.insert(a.line+1,Q)}ot(e,"change",e,t)}function vr(e,t,n){function r(i,o,l){if(i.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges)return e.done.pop(),xe(e.done)}function kl(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,l,a;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=Ys(i,i.lastOp==r)))a=xe(l.changes),re(t.from,t.to)==0&&re(t.from,a.to)==0?a.to=gr(t):l.changes.push(Vi(e,t));else{var s=xe(i.done);for((!s||!s.ranges)&&ii(e.sel,i.done),l={changes:[Vi(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ye(e,"historyAdded")}function Zs(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Js(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Zs(e,o,xe(i.done),t))?i.done[i.done.length-1]=t:ii(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&bl(i.undone)}function ii(e,t){var n=xe(t);n&&n.ranges&&n.equals(e)||t.push(e)}function wl(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=l.markedSpans),++o})}function Qs(e){if(!e)return null;for(var t,n=0;n-1&&(xe(a)[v]=u[v],delete u[v])}}return r}function $i(e,t,n,r){if(r){var i=e.anchor;if(n){var o=re(t,i)<0;o!=re(n,i)<0?(i=t,t=n):o!=re(t,n)<0&&(t=n)}return new _e(i,t)}else return new _e(n||t,t)}function oi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),pt(e,new Et([$i(e.sel.primary(),t,n,i)],0),r)}function Ll(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(Ye(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--l;continue}else break;if(!s.atomic)continue;if(n){var v=s.find(r<0?1:-1),k=void 0;if((r<0?h:u)&&(v=Fl(e,v,-r,v&&v.line==t.line?o:null)),v&&v.line==t.line&&(k=re(v,n))&&(r<0?k<0:k>0))return Zr(e,v,t,r,i)}var y=s.find(r<0?-1:1);return(r<0?u:h)&&(y=Fl(e,y,r,y.line==t.line?o:null)),y?Zr(e,y,t,r,i):null}}return t}function ai(e,t,n,r,i){var o=r||1,l=Zr(e,t,n,o,i)||!i&&Zr(e,t,n,o,!0)||Zr(e,t,n,-o,i)||!i&&Zr(e,t,n,-o,!0);return l||(e.cantEdit=!0,D(e.first,0))}function Fl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Me(e,D(t.line-1)):null:n>0&&t.ch==(r||ge(e,t.line)).text.length?t.line=0;--i)Ol(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Ol(e,t)}}function Ol(e,t){if(!(t.text.length==1&&t.text[0]==""&&re(t.from,t.to)==0)){var n=Zi(e,t);kl(e,t,n,e.cm?e.cm.curOp.id:NaN),Ln(e,t,n,wi(e,t));var r=[];vr(e,function(i,o){!o&&de(r,i.history)==-1&&(Bl(i.history,t),r.push(i.history)),Ln(i,t,null,wi(i,t))})}}function si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,o,l=e.sel,a=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u=0;--y){var E=k(y);if(E)return E.v}}}}function Pl(e,t){if(t!=0&&(e.first+=t,e.sel=new Et(Ie(e.sel.ranges,function(i){return new _e(D(i.anchor.line+t,i.anchor.ch),D(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){bt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:D(o,ge(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Vt(e,t.from,t.to),n||(n=Zi(e,t)),e.cm?eu(e.cm,t,r):Qi(e,t,r),li(e,n,Ve),e.cantEdit&&ai(e,D(e.firstLine(),0))&&(e.cantEdit=!1)}}function eu(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=f(qt(ge(r,o.line))),r.iter(s,l.line+1,function(y){if(y==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&It(e),Qi(r,t,n,$o(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(y){var E=Un(y);E>i.maxLineLength&&(i.maxLine=y,i.maxLineLength=E,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),ja(r,o.line),kn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?bt(e):o.line==l.line&&t.text.length==1&&!ml(e.doc,t)?dr(e,o.line,"text"):bt(e,o.line,l.line+1,u);var h=Ct(e,"changes"),v=Ct(e,"change");if(v||h){var k={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};v&&ot(e,"change",e,k),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(k)}e.display.selForContextMenu=null}function Qr(e,t,n,r,i){var o;r||(r=n),re(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Jr(e,{from:n,to:r,text:t,origin:i})}function Il(e,t,n,r){n1||!(this.children[0]instanceof Cn))){var a=[];this.collapse(a),this.children=[new Cn(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&bt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ml(e.doc)),e&&ot(e,"markerCleared",e,this,r,i),t&&Ar(e),this.parent&&this.parent.clear()}},mr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||l==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=S("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ao(e,t.line,t,n,o)||t.line!=n.line&&Ao(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ua()}o.addToHistory&&kl(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a=t.line,s=e.cm,u;if(e.iter(a,n.line+1,function(v){s&&o.collapsed&&!s.options.lineWrapping&&qt(v)==s.display.maxLine&&(u=!0),o.collapsed&&a!=t.line&&Ft(v,0),Xa(v,new Rn(o,a==t.line?t.ch:null,a==n.line?n.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,n.line+1,function(v){cr(e,v)&&Ft(v,0)}),o.clearOnEnter&&ye(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Ka(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Hl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)bt(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=t.line;h<=n.line;h++)dr(s,h,"text");o.atomic&&Ml(s.doc),ot(s,"markerAdded",s,o)}return o}var An=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;s--)Jr(this,r[s]);a?Cl(this,a):this.cm&&Gr(this.cm)}),undo:at(function(){si(this,"undo")}),redo:at(function(){si(this,"redo")}),undoSelection:at(function(){si(this,"undo",!0)}),redoSelection:at(function(){si(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Me(this,e),t=Me(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),Me(this,D(n,t))},indexFromPos:function(e){e=Me(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),li(t.doc,pr(n,n)),v)for(var k=0;k=0;a--)Qr(e.doc,"",r[a].from,r[a].to,"+delete");Gr(e)})}function to(e,t,n){var r=Tt(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ro(e,t,n){var r=to(e,t.ch,n);return r==null?null:new D(t.line,r,n<0?"after":"before")}function no(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=We(n,t.doc.direction);if(o){var l=i<0?xe(o):o[0],a=i<0==(l.level==1),s=a?"after":"before",u;if(l.level>0||t.doc.direction=="rtl"){var h=qr(t,n);u=i<0?n.text.length-1:0;var v=Zt(t,h,u).top;u=Pt(function(k){return Zt(t,h,k).top==v},i<0==(l.level==1)?l.from:l.to-1,u),s=="before"&&(u=to(n,u,1))}else u=i<0?l.to:l.from;return new D(r,u,s)}}return new D(r,i<0?n.text.length:0,i<0?"before":"after")}function pu(e,t,n,r){var i=We(t,e.doc.direction);if(!i)return ro(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=lr(i,n.ch,n.sticky),l=i[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&k>=h.begin)){var y=v?"before":"after";return new D(n.line,k,y)}}var E=function(Q,ie,V){for(var ue=function(Ke,st){return st?new D(n.line,a(Ke,1),"before"):new D(n.line,Ke,"after")};Q>=0&&Q0==(be.level!=1),Ne=me?V.begin:a(V.end,-1);if(be.from<=Ne&&Ne0?h.end:a(h.begin,-1);return Z!=null&&!(r>0&&Z==t.text.length)&&(H=E(r>0?0:i.length-1,r,u(Z)),H)?H:null}var Nn={selectAll:El,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ve)},killLine:function(e){return en(e,function(t){if(t.empty()){var n=ge(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new D(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),D(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ge(e.doc,i.line-1).text;l&&(i=new D(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),D(i.line-1,l.length-1),i,"+transpose"))}}n.push(new _e(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Dt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&re(t,this.pos)==0&&n==this.button};var Pn,In;function ku(e,t){var n=+new Date;return In&&In.compare(n,e,t)?(Pn=In=null,"triple"):Pn&&Pn.compare(n,e,t)?(In=new oo(n,e,t),Pn=null,"double"):(Pn=new oo(n,e,t),In=null,"single")}function ta(e){var t=this,n=t.display;if(!(Ze(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){j||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!lo(t,e)){var r=Lr(t,e),i=Wt(e),o=r?ku(r,i):"single";J(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&wu(t,i,r,o,e))&&(i==1?r?Lu(t,r,o,e):ln(e)==n.scroller&&ht(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(se?t.display.input.onContextMenu(e):_i(t)))}}}function wu(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,On(e,Gl(o,i),i,function(l){if(typeof l=="string"&&(l=Nn[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=qe}finally{e.state.suppressEdits=!1}return a})}function Su(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=ce?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=Y?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(Y?n.altKey:n.ctrlKey)),i}function Lu(e,t,n,r){b?setTimeout(pe(rl,e),0):e.curOp.focus=x(te(e));var i=Su(e,n,r),o=e.doc.sel,l;e.options.dragDrop&&xi&&!e.isReadOnly()&&n=="single"&&(l=o.contains(t))>-1&&(re((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(re(l.to(),t)>0||t.xRel<0)?Tu(e,r,t,i):Cu(e,r,t,i)}function Tu(e,t,n,r){var i=e.display,o=!1,l=lt(e,function(u){j&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:_i(e)),dt(i.wrapper.ownerDocument,"mouseup",l),dt(i.wrapper.ownerDocument,"mousemove",a),dt(i.scroller,"dragstart",s),dt(i.scroller,"drop",l),o||(ht(u),r.addNew||oi(e.doc,n,null,null,r.extend),j&&!K||b&&W==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),a=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};j&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,ye(i.wrapper.ownerDocument,"mouseup",l),ye(i.wrapper.ownerDocument,"mousemove",a),ye(i.scroller,"dragstart",s),ye(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ra(e,t,n){if(n=="char")return new _e(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new _e(D(t.line,0),Me(e.doc,D(t.line+1,0)));var r=n(e,t);return new _e(r.from,r.to)}function Cu(e,t,n,r){b&&_i(e);var i=e.display,o=e.doc;ht(t);var l,a,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(n),a>-1?l=u[a]:l=new _e(n,n)):(l=o.sel.primary(),a=o.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new _e(n,n)),n=Lr(e,t,!0,!0),a=-1;else{var h=ra(e,n,r.unit);r.extend?l=$i(l,h.anchor,h.head,r.extend):l=h}r.addNew?a==-1?(a=u.length,pt(o,Kt(e,u.concat([l]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&r.unit=="char"&&!r.extend?(pt(o,Kt(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):eo(o,a,l,ct):(a=0,pt(o,new Et([l],0),ct),s=o.sel);var v=n;function k(V){if(re(v,V)!=0)if(v=V,r.unit=="rectangle"){for(var ue=[],be=e.options.tabSize,me=Ce(ge(o,n.line).text,n.ch,be),Ne=Ce(ge(o,V.line).text,V.ch,be),Ke=Math.min(me,Ne),st=Math.max(me,Ne),Xe=Math.min(n.line,V.line),Mt=Math.min(e.lastLine(),Math.max(n.line,V.line));Xe<=Mt;Xe++){var wt=ge(o,Xe).text,tt=Re(wt,Ke,be);Ke==st?ue.push(new _e(D(Xe,tt),D(Xe,tt))):wt.length>tt&&ue.push(new _e(D(Xe,tt),D(Xe,Re(wt,st,be))))}ue.length||ue.push(new _e(n,n)),pt(o,Kt(e,s.ranges.slice(0,a).concat(ue),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(V)}else{var St=l,ft=ra(e,V,r.unit),nt=St.anchor,rt;re(ft.anchor,nt)>0?(rt=ft.head,nt=Hr(St.from(),ft.anchor)):(rt=ft.anchor,nt=yt(St.to(),ft.head));var Qe=s.ranges.slice(0);Qe[a]=Du(e,new _e(Me(o,nt),rt)),pt(o,Kt(e,Qe,a),ct)}}var y=i.wrapper.getBoundingClientRect(),E=0;function H(V){var ue=++E,be=Lr(e,V,!0,r.unit=="rectangle");if(be)if(re(be,v)!=0){e.curOp.focus=x(te(e)),k(be);var me=$n(i,o);(be.line>=me.to||be.liney.bottom?20:0;Ne&&setTimeout(lt(e,function(){E==ue&&(i.scroller.scrollTop+=Ne,H(V))}),50)}}function Z(V){e.state.selectingText=!1,E=1/0,V&&(ht(V),i.input.focus()),dt(i.wrapper.ownerDocument,"mousemove",Q),dt(i.wrapper.ownerDocument,"mouseup",ie),o.history.lastSelOrigin=null}var Q=lt(e,function(V){V.buttons===0||!Wt(V)?Z(V):H(V)}),ie=lt(e,Z);e.state.selectingText=ie,ye(i.wrapper.ownerDocument,"mousemove",Q),ye(i.wrapper.ownerDocument,"mouseup",ie)}function Du(e,t){var n=t.anchor,r=t.head,i=ge(e.doc,n.line);if(re(n,r)==0&&n.sticky==r.sticky)return t;var o=We(i);if(!o)return t;var l=lr(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s=l+(a.from==n.ch==(a.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(r.line!=n.line)u=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var h=lr(o,r.ch,r.sticky),v=h-l||(r.ch-n.ch)*(a.level==1?-1:1);h==s-1||h==s?u=v<0:u=v>0}var k=o[s+(u?-1:0)],y=u==(k.level==1),E=y?k.from:k.to,H=y?"after":"before";return n.ch==E&&n.sticky==H?t:new _e(new D(n.line,E,H),r)}function na(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ht(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ct(e,n))return xt(t);o-=a.top-l.viewOffset;for(var s=0;s=i){var h=g(e.doc,o),v=e.display.gutterSpecs[s];return Ye(e,n,e,h,v.className,t),xt(t)}}}function lo(e,t){return na(e,t,"gutterClick",!0)}function ia(e,t){tr(e.display,t)||Mu(e,t)||Ze(e,t,"contextmenu")||se||e.display.input.onContextMenu(t)}function Mu(e,t){return Ct(e,"gutterContextMenu")?na(e,t,"gutterContextMenu",!1):!1}function oa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(e)}var tn={toString:function(){return"CodeMirror.Init"}},la={},di={};function Au(e){var t=e.optionHandlers;function n(r,i,o,l){e.defaults[r]=i,o&&(t[r]=l?function(a,s,u){u!=tn&&o(a,s,u)}:o)}e.defineOption=n,e.Init=tn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Ji(r)},!0),n("indentUnit",2,Ji,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Sn(r),gn(r),bt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var o=[],l=r.doc.first;r.doc.iter(function(s){for(var u=0;;){var h=s.text.indexOf(i,u);if(h==-1)break;u=h+i.length,o.push(D(l,h))}l++});for(var a=o.length-1;a>=0;a--)Qr(r.doc,i,o[a],D(o[a].line,o[a].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,o){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=tn&&r.refresh()}),n("specialCharPlaceholder",is,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",_?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!$),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){oa(r),wn(r)},!0),n("keyMap","default",function(r,i,o){var l=fi(i),a=o!=tn&&fi(o);a&&a.detach&&a.detach(r,l),l.attach&&l.attach(r,a||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Eu,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Yi(i,r.options.lineNumbers),wn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?zi(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Xr(r)},!0),n("scrollbarStyle","native",function(r){sl(r),Xr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Yi(r.options.gutters,i),wn(r)},!0),n("firstLineNumber",1,wn,!0),n("lineNumberFormatter",function(r){return r},wn,!0),n("showCursorWhenSelecting",!1,vn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Ur(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Fu),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,vn,!0),n("singleCursorHeightPerLine",!0,vn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Sn,!0),n("addModeClass",!1,Sn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Sn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Fu(e,t,n){var r=n&&n!=tn;if(!t!=!r){var i=e.display.dragFunctions,o=t?ye:dt;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Eu(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Fe(e.display.wrapper,"CodeMirror-wrap"),Ci(e)),Bi(e),bt(e),gn(e),setTimeout(function(){return Xr(e)},100)}function Ge(e,t){var n=this;if(!(this instanceof Ge))return new Ge(e,t);this.options=t=t?Te(t):{},Te(la,t,!1);var r=t.value;typeof r=="string"?r=new kt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ge.inputStyles[t.inputStyle](this),o=this.display=new Ks(e,r,i,t);o.wrapper.CodeMirror=this,oa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),sl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new we,keySeq:null,specialChars:null},t.autofocus&&!_&&o.input.focus(),b&&W<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Nu(this),uu(),Mr(this),this.curOp.forceUpdate=!0,xl(this,r),t.autofocus&&!_||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Ri(n)},20):Ur(this);for(var l in di)di.hasOwnProperty(l)&&di[l](this,t[l],tn);cl(this),t.finishInit&&t.finishInit(this);for(var a=0;a400}ye(t.scroller,"touchstart",function(s){if(!Ze(e,s)&&!o(s)&&!lo(e,s)){t.input.ensurePolled(),clearTimeout(n);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),ye(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ye(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!tr(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var h=e.coordsChar(t.activeTouch,"page"),v;!u.prev||l(u,u.prev)?v=new _e(h,h):!u.prev.prev||l(u,u.prev.prev)?v=e.findWordAt(h):v=new _e(D(h.line,0),Me(e.doc,D(h.line+1,0))),e.setSelection(v.anchor,v.head),e.focus(),ht(s)}i()}),ye(t.scroller,"touchcancel",i),ye(t.scroller,"scroll",function(){t.scroller.clientHeight&&(xn(e,t.scroller.scrollTop),Cr(e,t.scroller.scrollLeft,!0),Ye(e,"scroll",e))}),ye(t.scroller,"mousewheel",function(s){return pl(e,s)}),ye(t.scroller,"DOMMouseScroll",function(s){return pl(e,s)}),ye(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){Ze(e,s)||ar(s)},over:function(s){Ze(e,s)||(su(e,s),ar(s))},start:function(s){return au(e,s)},drop:lt(e,lu),leave:function(s){Ze(e,s)||ql(e)}};var a=t.input.getField();ye(a,"keyup",function(s){return $l.call(e,s)}),ye(a,"keydown",lt(e,Vl)),ye(a,"keypress",lt(e,ea)),ye(a,"focus",function(s){return Ri(e,s)}),ye(a,"blur",function(s){return Ur(e,s)})}var ao=[];Ge.defineInitHook=function(e){return ao.push(e)};function zn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=fn(e,t).state:n="prev");var l=e.options.tabSize,a=ge(i,t),s=Ce(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u=a.text.match(/^\s*/)[0],h;if(!r&&!/\S/.test(a.text))h=0,n="not";else if(n=="smart"&&(h=i.mode.indent(o,a.text.slice(u.length),a.text),h==qe||h>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?h=Ce(ge(i,t-1).text,null,l):h=0:n=="add"?h=s+e.options.indentUnit:n=="subtract"?h=s-e.options.indentUnit:typeof n=="number"&&(h=s+n),h=Math.max(0,h);var v="",k=0;if(e.options.indentWithTabs)for(var y=Math.floor(h/l);y;--y)k+=l,v+=" ";if(kl,s=zt(t),u=null;if(a&&r.ranges.length>1)if(Ut&&Ut.text.join(` +`)==t){if(r.ranges.length%Ut.text.length==0){u=[];for(var h=0;h=0;k--){var y=r.ranges[k],E=y.from(),H=y.to();y.empty()&&(n&&n>0?E=D(E.line,E.ch-n):e.state.overwrite&&!a?H=D(H.line,Math.min(ge(o,H.line).text.length,H.ch+xe(s).length)):a&&Ut&&Ut.lineWise&&Ut.text.join(` +`)==s.join(` +`)&&(E=H=D(E.line,0)));var Z={from:E,to:H,text:u?u[k%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jr(e.doc,Z),ot(e,"inputRead",e,Z)}t&&!a&&sa(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function aa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Dt(t,function(){return so(t,n,0,null,"paste")}),!0}function sa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=zn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ge(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=zn(e,i.head.line,"smart"));l&&ot(e,"electricInput",e,i.head.line)}}}function ua(e){for(var t=[],n=[],r=0;ro&&(zn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=h;v0&&eo(this.doc,l,new _e(s,k[l].to()),Ve)}}}),getTokenAt:function(r,i){return bo(this,r,i)},getLineTokens:function(r,i){return bo(this,D(r),i,!0)},getTokenTypeAt:function(r){r=Me(this.doc,r);var i=mo(this,ge(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]s&&(r=s,l=!0),a=ge(this.doc,r)}else a=r;return Yn(this,a,{top:0,left:0},i||"page",o||l).top+(l?this.doc.height-er(a):0)},defaultTextHeight:function(){return jr(this.display)},defaultCharWidth:function(){return Kr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,l,a){var s=this.display;r=jt(this,Me(this.doc,r));var u=r.bottom,h=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),l=="over")u=r.top;else if(l=="above"||l=="near"){var v=Math.max(s.wrapper.clientHeight,this.doc.height),k=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>v)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=v&&(u=r.bottom),h+i.offsetWidth>k&&(h=k-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",a=="right"?(h=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(a=="left"?h=0:a=="middle"&&(h=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=h+"px"),o&&Fs(this,{left:h,top:u,right:h+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:vt(Vl),triggerOnKeyPress:vt(ea),triggerOnKeyUp:$l,triggerOnMouseDown:vt(ta),execCommand:function(r){if(Nn.hasOwnProperty(r))return Nn[r].call(null,this)},triggerElectric:vt(function(r){sa(this,r)}),findPosH:function(r,i,o,l){var a=1;i<0&&(a=-1,i=-i);for(var s=Me(this.doc,r),u=0;u0&&h(o.charAt(l-1));)--l;for(;a.5||this.options.lineWrapping)&&Bi(this),Ye(this,"refresh",this)}),swapDoc:vt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),xl(this,r),gn(this),this.display.input.reset(),mn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ot(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Bt(e),e.registerHelper=function(r,i,o){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=o},e.registerGlobalHelper=function(r,i,o,l){e.registerHelper(r,i,l),n[r]._global.push({pred:o,val:l})}}function fo(e,t,n,r,i){var o=t,l=n,a=ge(e,t.line),s=i&&e.direction=="rtl"?-n:n;function u(){var ie=t.line+s;return ie=e.first+e.size?!1:(t=new D(ie,t.ch,t.sticky),a=ge(e,ie))}function h(ie){var V;if(r=="codepoint"){var ue=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(ue))V=null;else{var be=n>0?ue>=55296&&ue<56320:ue>=56320&&ue<57343;V=new D(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(be?2:1))),-n)}}else i?V=pu(e.cm,a,t,n):V=ro(a,t,n);if(V==null)if(!ie&&u())t=no(i,e.cm,a,t.line,s);else return!1;else t=V;return!0}if(r=="char"||r=="codepoint")h();else if(r=="column")h(!0);else if(r=="word"||r=="group")for(var v=null,k=r=="group",y=e.cm&&e.cm.getHelper(t,"wordChars"),E=!0;!(n<0&&!h(!E));E=!1){var H=a.text.charAt(t.ch)||` +`,Z=Le(H,y)?"w":k&&H==` +`?"n":!k||/\s/.test(H)?null:"p";if(k&&!E&&!Z&&(Z="s"),v&&v!=Z){n<0&&(n=1,h(),t.sticky="after");break}if(Z&&(v=Z),n>0&&!h(!E))break}var Q=ai(e,t,o,l,!0);return He(o,Q)&&(Q.hitSide=!0),Q}function ca(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,J(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*jr(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Oi(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var je=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new we,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};je.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,uo(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ye(i,"paste",function(a){!o(a)||Ze(r,a)||aa(a,r)||W<=11&&setTimeout(lt(r,function(){return t.updateFromDOM()}),20)}),ye(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),ye(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),ye(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ye(i,"touchstart",function(){return n.forceCompositionEnd()}),ye(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||Ze(r,a))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ua(r);hi({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ve),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Ut.text.join(` +`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var h=fa(),v=h.firstChild;uo(v),r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),v.value=Ut.text.join(` +`);var k=x(ke(i));p(v),setTimeout(function(){r.display.lineSpace.removeChild(h),k.focus(),k==i&&n.showPrimarySelection()},50)}}ye(i,"copy",l),ye(i,"cut",l)},je.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},je.prototype.prepareSelection=function(){var e=tl(this.cm,!1);return e.focus=x(ke(this.div))==this.div,e},je.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},je.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},je.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&da(t,r)||{node:a[0].measure.map[2],offset:0},u=i.linee.firstLine()&&(r=D(r.line-1,ge(e.doc,r.line-1).length)),i.ch==ge(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Tr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Tr(e,i.line),u,h;if(s==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!a)return!1;for(var v=e.doc.splitLines(Iu(e,a,h,l,u)),k=Vt(e.doc,D(l,0),D(u,ge(e.doc,u).text.length));v.length>1&&k.length>1;)if(xe(v)==xe(k))v.pop(),k.pop(),u--;else if(v[0]==k[0])v.shift(),k.shift(),l++;else break;for(var y=0,E=0,H=v[0],Z=k[0],Q=Math.min(H.length,Z.length);yr.ch&&ie.charCodeAt(ie.length-E-1)==V.charCodeAt(V.length-E-1);)y--,E++;v[v.length-1]=ie.slice(0,ie.length-E).replace(/^\u200b+/,""),v[0]=v[0].slice(y).replace(/\u200b+$/,"");var be=D(l,y),me=D(u,k.length?xe(k).length-E:0);if(v.length>1||v[0]||re(be,me))return Qr(e.doc,v,be,me,"+input"),!0},je.prototype.ensurePolled=function(){this.forceCompositionEnd()},je.prototype.reset=function(){this.forceCompositionEnd()},je.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},je.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},je.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Dt(this.cm,function(){return bt(e.cm)})},je.prototype.setUneditable=function(e){e.contentEditable="false"},je.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||lt(this.cm,so)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},je.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},je.prototype.onContextMenu=function(){},je.prototype.resetPosition=function(){},je.prototype.needsContentAttribute=!0;function da(e,t){var n=Fi(e,t.line);if(!n||n.hidden)return null;var r=ge(e.doc,t.line),i=Ro(n,r,t.line),o=We(r,e.doc.direction),l="left";if(o){var a=lr(o,t.ch);l=a%2?"right":"left"}var s=Ko(i.map,t.ch,l);return s.offset=s.collapse=="right"?s.end:s.start,s}function Pu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function rn(e,t){return t&&(e.bad=!0),e}function Iu(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(y){return function(E){return E.id==y}}function h(){l&&(o+=a,s&&(o+=a),l=s=!1)}function v(y){y&&(h(),o+=y)}function k(y){if(y.nodeType==1){var E=y.getAttribute("cm-text");if(E){v(E);return}var H=y.getAttribute("cm-marker"),Z;if(H){var Q=e.findMarks(D(r,0),D(i+1,0),u(+H));Q.length&&(Z=Q[0].find(0))&&v(Vt(e.doc,Z.from,Z.to).join(a));return}if(y.getAttribute("contenteditable")=="false")return;var ie=/^(pre|div|p|li|table|br)$/i.test(y.nodeName);if(!/^br$/i.test(y.nodeName)&&y.textContent.length==0)return;ie&&h();for(var V=0;V=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),ye(i,"paste",function(l){Ze(r,l)||aa(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(l){if(!Ze(r,l)){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var a=ua(r);hi({lineWise:!0,text:a.text}),l.type=="cut"?r.setSelections(a.ranges,null,Ve):(n.prevInput="",i.value=a.text.join(` +`),p(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ye(i,"cut",o),ye(i,"copy",o),ye(e.scroller,"paste",function(l){if(!(tr(e,l)||Ze(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),ye(e.lineSpace,"selectstart",function(l){tr(e,l)||ht(l)}),ye(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ye(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$e.prototype.createField=function(e){this.wrapper=fa(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;uo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$e.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=tl(e);if(e.options.moveInputWithCursor){var i=jt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$e.prototype.showSelection=function(e){var t=this.cm,n=t.display;G(n.cursorDiv,e.cursors),G(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$e.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&p(this.textarea),b&&W>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&W>=9&&(this.hasSelection=null));this.resetting=!1}},$e.prototype.getField=function(){return this.textarea},$e.prototype.supportsTouch=function(){return!1},$e.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!_||x(ke(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},$e.prototype.blur=function(){this.textarea.blur()},$e.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$e.prototype.receivedFocus=function(){this.slowPoll()},$e.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$e.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},$e.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ur(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&W>=9&&this.hasSelection===i||Y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r="​"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,i.length);l1e3||i.indexOf(` +`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$e.prototype.onKeyPress=function(){b&&W>=9&&(this.hasSelection=null),this.fastPoll()},$e.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Lr(n,e),l=r.scroller.scrollTop;if(!o||A)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&<(n,pt)(n.doc,pr(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; + top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px; + z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`; + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;j&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),j&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function k(){if(i.selectionStart!=null){var H=n.somethingSelected(),Z="​"+(H?i.value:"");i.value="⇚",i.value=Z,t.prevInput=H?"":"​",i.selectionStart=1,i.selectionEnd=Z.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&W<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!b||b&&W<9)&&k();var H=0,Z=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="​"?lt(n,El)(n):H++<10?r.detectingSelectAll=setTimeout(Z,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(Z,200)}}if(b&&W>=9&&k(),se){ar(e);var E=function(){dt(window,"mouseup",E),setTimeout(y,20)};ye(window,"mouseup",E)}else setTimeout(y,50)},$e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$e.prototype.setUneditable=function(){},$e.prototype.needsContentAttribute=!1;function Bu(e,t){if(t=t?Te(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=x(ke(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ye(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(dt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function Wu(e){e.off=dt,e.on=ye,e.wheelEventPixels=Us,e.Doc=kt,e.splitLines=zt,e.countColumn=Ce,e.findColumn=Re,e.isWordChar=he,e.Pass=qe,e.signal=Ye,e.Line=_r,e.changeEnd=gr,e.scrollbarModel=al,e.Pos=D,e.cmpPos=re,e.modes=Pr,e.mimeModes=_t,e.resolveMode=Ir,e.getMode=zr,e.modeExtensions=fr,e.extendMode=Br,e.copyState=Gt,e.startState=Wr,e.innerMode=sn,e.commands=Nn,e.keyMap=nr,e.keyName=Xl,e.isModifierKey=Ul,e.lookupKey=$r,e.normalizeKeyMap=hu,e.StringStream=Je,e.SharedTextMarker=An,e.TextMarker=mr,e.LineWidget=Mn,e.e_preventDefault=ht,e.e_stopPropagation=Nr,e.e_stop=ar,e.addClass=z,e.contains=m,e.rmClass=Fe,e.keyNames=xr}Au(Ge),Ou(Ge);var Hu="iter insert remove copy getEditor constructor".split(" ");for(var gi in kt.prototype)kt.prototype.hasOwnProperty(gi)&&de(Hu,gi)<0&&(Ge.prototype[gi]=(function(e){return function(){return e.apply(this.doc,arguments)}})(kt.prototype[gi]));return Bt(kt),Ge.inputStyles={textarea:$e,contenteditable:je},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),Rt.apply(this,arguments)},Ge.defineMIME=kr,Ge.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ge.defineMIME("text/plain","null"),Ge.defineExtension=function(e,t){Ge.prototype[e]=t},Ge.defineDocExtension=function(e,t){kt.prototype[e]=t},Ge.fromTextArea=Bu,Wu(Ge),Ge.version="5.65.18",Ge}))})(vi)),vi.exports}var qu=Nt();const $u=_u(qu);var pa={exports:{}},ga;function Wa(){return ga||(ga=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.defineMode("css",function(se,q){var Fe=q.inline;q.propertyKeywords||(q=C.resolveMode("text/css"));var M=se.indentUnit,G=q.tokenHooks,d=q.documentTypes||{},S=q.mediaTypes||{},L=q.mediaFeatures||{},m=q.mediaValueKeywords||{},x=q.propertyKeywords||{},z=q.nonStandardPropertyKeywords||{},ne=q.fontProperties||{},p=q.counterDescriptors||{},c=q.colorKeywords||{},te=q.valueKeywords||{},ke=q.allowNested,J=q.lineComment,pe=q.supportsAtComponent===!0,Te=se.highlightNonStandardPropertyKeywords!==!1,Ce,we;function de(T,U){return Ce=U,T}function Oe(T,U){var O=T.next();if(G[O]){var ze=G[O](T,U);if(ze!==!1)return ze}if(O=="@")return T.eatWhile(/[\w\\\-]/),de("def",T.current());if(O=="="||(O=="~"||O=="|")&&T.eat("="))return de(null,"compare");if(O=='"'||O=="'")return U.tokenize=qe(O),U.tokenize(T,U);if(O=="#")return T.eatWhile(/[\w\\\-]/),de("atom","hash");if(O=="!")return T.match(/^\s*\w*/),de("keyword","important");if(/\d/.test(O)||O=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),de("number","unit");if(O==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),de("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?de("variable-2","variable-definition"):de("variable-2","variable");if(T.match(/^\w+-/))return de("meta","meta")}else return/[,+>*\/]/.test(O)?de(null,"select-op"):O=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?de("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(O)?de(null,O):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(U.tokenize=Ve),de("variable callee","variable")):/[\w\\\-]/.test(O)?(T.eatWhile(/[\w\\\-]/),de("property","word")):de(null,null)}function qe(T){return function(U,O){for(var ze=!1,he;(he=U.next())!=null;){if(he==T&&!ze){T==")"&&U.backUp(1);break}ze=!ze&&he=="\\"}return(he==T||!ze&&T!=")")&&(O.tokenize=null),de("string","string")}}function Ve(T,U){return T.next(),T.match(/^\s*[\"\')]/,!1)?U.tokenize=null:U.tokenize=qe(")"),de(null,"(")}function ct(T,U,O){this.type=T,this.indent=U,this.prev=O}function Pe(T,U,O,ze){return T.context=new ct(O,U.indentation()+(ze===!1?0:M),T.context),O}function Re(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function Ue(T,U,O){return Ie[O.context.type](T,U,O)}function et(T,U,O,ze){for(var he=ze||1;he>0;he--)O.context=O.context.prev;return Ue(T,U,O)}function xe(T){var U=T.current().toLowerCase();te.hasOwnProperty(U)?we="atom":c.hasOwnProperty(U)?we="keyword":we="variable"}var Ie={};return Ie.top=function(T,U,O){if(T=="{")return Pe(O,U,"block");if(T=="}"&&O.context.prev)return Re(O);if(pe&&/@component/i.test(T))return Pe(O,U,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return Pe(O,U,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return Pe(O,U,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return O.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return Pe(O,U,"at");if(T=="hash")we="builtin";else if(T=="word")we="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return Pe(O,U,"interpolation");if(T==":")return"pseudo";if(ke&&T=="(")return Pe(O,U,"parens")}return O.context.type},Ie.block=function(T,U,O){if(T=="word"){var ze=U.current().toLowerCase();return x.hasOwnProperty(ze)?(we="property","maybeprop"):z.hasOwnProperty(ze)?(we=Te?"string-2":"property","maybeprop"):ke?(we=U.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(we+=" error","maybeprop")}else return T=="meta"?"block":!ke&&(T=="hash"||T=="qualifier")?(we="error","block"):Ie.top(T,U,O)},Ie.maybeprop=function(T,U,O){return T==":"?Pe(O,U,"prop"):Ue(T,U,O)},Ie.prop=function(T,U,O){if(T==";")return Re(O);if(T=="{"&&ke)return Pe(O,U,"propBlock");if(T=="}"||T=="{")return et(T,U,O);if(T=="(")return Pe(O,U,"parens");if(T=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(U.current()))we+=" error";else if(T=="word")xe(U);else if(T=="interpolation")return Pe(O,U,"interpolation");return"prop"},Ie.propBlock=function(T,U,O){return T=="}"?Re(O):T=="word"?(we="property","maybeprop"):O.context.type},Ie.parens=function(T,U,O){return T=="{"||T=="}"?et(T,U,O):T==")"?Re(O):T=="("?Pe(O,U,"parens"):T=="interpolation"?Pe(O,U,"interpolation"):(T=="word"&&xe(U),"parens")},Ie.pseudo=function(T,U,O){return T=="meta"?"pseudo":T=="word"?(we="variable-3",O.context.type):Ue(T,U,O)},Ie.documentTypes=function(T,U,O){return T=="word"&&d.hasOwnProperty(U.current())?(we="tag",O.context.type):Ie.atBlock(T,U,O)},Ie.atBlock=function(T,U,O){if(T=="(")return Pe(O,U,"atBlock_parens");if(T=="}"||T==";")return et(T,U,O);if(T=="{")return Re(O)&&Pe(O,U,ke?"block":"top");if(T=="interpolation")return Pe(O,U,"interpolation");if(T=="word"){var ze=U.current().toLowerCase();ze=="only"||ze=="not"||ze=="and"||ze=="or"?we="keyword":S.hasOwnProperty(ze)?we="attribute":L.hasOwnProperty(ze)?we="property":m.hasOwnProperty(ze)?we="keyword":x.hasOwnProperty(ze)?we="property":z.hasOwnProperty(ze)?we=Te?"string-2":"property":te.hasOwnProperty(ze)?we="atom":c.hasOwnProperty(ze)?we="keyword":we="error"}return O.context.type},Ie.atComponentBlock=function(T,U,O){return T=="}"?et(T,U,O):T=="{"?Re(O)&&Pe(O,U,ke?"block":"top",!1):(T=="word"&&(we="error"),O.context.type)},Ie.atBlock_parens=function(T,U,O){return T==")"?Re(O):T=="{"||T=="}"?et(T,U,O,2):Ie.atBlock(T,U,O)},Ie.restricted_atBlock_before=function(T,U,O){return T=="{"?Pe(O,U,"restricted_atBlock"):T=="word"&&O.stateArg=="@counter-style"?(we="variable","restricted_atBlock_before"):Ue(T,U,O)},Ie.restricted_atBlock=function(T,U,O){return T=="}"?(O.stateArg=null,Re(O)):T=="word"?(O.stateArg=="@font-face"&&!ne.hasOwnProperty(U.current().toLowerCase())||O.stateArg=="@counter-style"&&!p.hasOwnProperty(U.current().toLowerCase())?we="error":we="property","maybeprop"):"restricted_atBlock"},Ie.keyframes=function(T,U,O){return T=="word"?(we="variable","keyframes"):T=="{"?Pe(O,U,"top"):Ue(T,U,O)},Ie.at=function(T,U,O){return T==";"?Re(O):T=="{"||T=="}"?et(T,U,O):(T=="word"?we="tag":T=="hash"&&(we="builtin"),"at")},Ie.interpolation=function(T,U,O){return T=="}"?Re(O):T=="{"||T==";"?et(T,U,O):(T=="word"?we="variable":T!="variable"&&T!="("&&T!=")"&&(we="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:Fe?"block":"top",stateArg:null,context:new ct(Fe?"block":"top",T||0,null)}},token:function(T,U){if(!U.tokenize&&T.eatSpace())return null;var O=(U.tokenize||Oe)(T,U);return O&&typeof O=="object"&&(Ce=O[1],O=O[0]),we=O,Ce!="comment"&&(U.state=Ie[U.state](Ce,T,U)),we},indent:function(T,U){var O=T.context,ze=U&&U.charAt(0),he=O.indent;return O.type=="prop"&&(ze=="}"||ze==")")&&(O=O.prev),O.prev&&(ze=="}"&&(O.type=="block"||O.type=="top"||O.type=="interpolation"||O.type=="restricted_atBlock")?(O=O.prev,he=O.indent):(ze==")"&&(O.type=="parens"||O.type=="atBlock_parens")||ze=="{"&&(O.type=="at"||O.type=="atBlock"))&&(he=Math.max(0,O.indent-M))),he},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:J,fold:"brace"}});function De(se){for(var q={},Fe=0;Fe")):null:d.match("--")?L(ae("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),L(F(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),S.tokenize=ae("meta","?>"),"meta"):(oe=d.eat("/")?"closeTag":"openTag",S.tokenize=A,"tag bracket");if(m=="&"){var x;return d.eat("#")?d.eat("x")?x=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):x=d.eatWhile(/[\d]/)&&d.eat(";"):x=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),x?"atom":"error"}else return d.eatWhile(/[^&<]/),null}B.isInText=!0;function A(d,S){var L=d.next();if(L==">"||L=="/"&&d.eat(">"))return S.tokenize=B,oe=L==">"?"endTag":"selfcloseTag","tag bracket";if(L=="=")return oe="equals",null;if(L=="<"){S.tokenize=B,S.state=ce,S.tagName=S.tagStart=null;var m=S.tokenize(d,S);return m?m+" tag error":"tag error"}else return/[\'\"]/.test(L)?(S.tokenize=K(L),S.stringStartCol=d.column(),S.tokenize(d,S)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function K(d){var S=function(L,m){for(;!L.eol();)if(L.next()==d){m.tokenize=A;break}return"string"};return S.isInAttribute=!0,S}function ae(d,S){return function(L,m){for(;!L.eol();){if(L.match(S)){m.tokenize=B;break}L.next()}return d}}function F(d){return function(S,L){for(var m;(m=S.next())!=null;){if(m=="<")return L.tokenize=F(d+1),L.tokenize(S,L);if(m==">")if(d==1){L.tokenize=B;break}else return L.tokenize=F(d-1),L.tokenize(S,L)}return"meta"}}function N(d){return d&&d.toLowerCase()}function R(d,S,L){this.prev=d.context,this.tagName=S||"",this.indent=d.indented,this.startOfLine=L,(b.doNotIndent.hasOwnProperty(S)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function _(d){d.context&&(d.context=d.context.prev)}function Y(d,S){for(var L;;){if(!d.context||(L=d.context.tagName,!b.contextGrabbers.hasOwnProperty(N(L))||!b.contextGrabbers[N(L)].hasOwnProperty(N(S))))return;_(d)}}function ce(d,S,L){return d=="openTag"?(L.tagStart=S.column(),$):d=="closeTag"?ee:ce}function $(d,S,L){return d=="word"?(L.tagName=S.current(),w="tag",q):b.allowMissingTagName&&d=="endTag"?(w="tag bracket",q(d,S,L)):(w="error",$)}function ee(d,S,L){if(d=="word"){var m=S.current();return L.context&&L.context.tagName!=m&&b.implicitlyClosed.hasOwnProperty(N(L.context.tagName))&&_(L),L.context&&L.context.tagName==m||b.matchClosing===!1?(w="tag",Ae):(w="tag error",se)}else return b.allowMissingTagName&&d=="endTag"?(w="tag bracket",Ae(d,S,L)):(w="error",se)}function Ae(d,S,L){return d!="endTag"?(w="error",Ae):(_(L),ce)}function se(d,S,L){return w="error",Ae(d,S,L)}function q(d,S,L){if(d=="word")return w="attribute",Fe;if(d=="endTag"||d=="selfcloseTag"){var m=L.tagName,x=L.tagStart;return L.tagName=L.tagStart=null,d=="selfcloseTag"||b.autoSelfClosers.hasOwnProperty(N(m))?Y(L,m):(Y(L,m),L.context=new R(L,m,x==L.indented)),ce}return w="error",q}function Fe(d,S,L){return d=="equals"?M:(b.allowMissing||(w="error"),q(d,S,L))}function M(d,S,L){return d=="string"?G:d=="word"&&b.allowUnquoted?(w="string",q):(w="error",q(d,S,L))}function G(d,S,L){return d=="string"?G:q(d,S,L)}return{startState:function(d){var S={tokenize:B,state:ce,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(S.baseIndent=d),S},token:function(d,S){if(!S.tagName&&d.sol()&&(S.indented=d.indentation()),d.eatSpace())return null;oe=null;var L=S.tokenize(d,S);return(L||oe)&&L!="comment"&&(w=null,S.state=S.state(oe||L,d,S),w&&(L=w=="error"?L+" error":w)),L},indent:function(d,S,L){var m=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+le;if(m&&m.noIndent)return C.Pass;if(d.tokenize!=A&&d.tokenize!=B)return L?L.match(/^(\s*)/)[0].length:0;if(d.tagName)return b.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+le*(b.multilineTagIndentFactor||1);if(b.alignCDATA&&/$/,blockCommentStart:"",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml",skipAttribute:function(d){d.state==M&&(d.state=q)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var S=[],L=d.context;L;L=L.prev)S.push(L.tagName);return S.reverse()}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})})})()),ma.exports}var ya={exports:{}},ba;function _a(){return ba||(ba=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.defineMode("javascript",function(De,P){var fe=De.indentUnit,Se=P.statementIndent,le=P.jsonld,b=P.json||le,W=P.trackScope!==!1,j=P.typescript,oe=P.wordCharacters||/[\w$\xa1-\uffff]/,w=(function(){function f(it){return{type:it,style:"keyword"}}var g=f("keyword a"),I=f("keyword b"),X=f("keyword c"),D=f("keyword d"),re=f("operator"),He={type:"atom",style:"atom"};return{if:f("if"),while:g,with:g,else:I,do:I,try:I,finally:I,return:D,break:D,continue:D,new:f("new"),delete:X,void:X,throw:X,debugger:f("debugger"),var:f("var"),const:f("var"),let:f("var"),function:f("function"),catch:f("catch"),for:f("for"),switch:f("switch"),case:f("case"),default:f("default"),in:re,typeof:re,instanceof:re,true:He,false:He,null:He,undefined:He,NaN:He,Infinity:He,this:f("this"),class:f("class"),super:f("atom"),yield:X,export:f("export"),import:f("import"),extends:X,await:X}})(),B=/[+\-*&%=<>!?|~^@]/,A=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function K(f){for(var g=!1,I,X=!1;(I=f.next())!=null;){if(!g){if(I=="/"&&!X)return;I=="["?X=!0:X&&I=="]"&&(X=!1)}g=!g&&I=="\\"}}var ae,F;function N(f,g,I){return ae=f,F=I,g}function R(f,g){var I=f.next();if(I=='"'||I=="'")return g.tokenize=_(I),g.tokenize(f,g);if(I=="."&&f.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return N("number","number");if(I=="."&&f.match(".."))return N("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(I))return N(I);if(I=="="&&f.eat(">"))return N("=>","operator");if(I=="0"&&f.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return N("number","number");if(/\d/.test(I))return f.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),N("number","number");if(I=="/")return f.eat("*")?(g.tokenize=Y,Y(f,g)):f.eat("/")?(f.skipToEnd(),N("comment","comment")):Ft(f,g,1)?(K(f),f.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),N("regexp","string-2")):(f.eat("="),N("operator","operator",f.current()));if(I=="`")return g.tokenize=ce,ce(f,g);if(I=="#"&&f.peek()=="!")return f.skipToEnd(),N("meta","meta");if(I=="#"&&f.eatWhile(oe))return N("variable","property");if(I=="<"&&f.match("!--")||I=="-"&&f.match("->")&&!/\S/.test(f.string.slice(0,f.start)))return f.skipToEnd(),N("comment","comment");if(B.test(I))return(I!=">"||!g.lexical||g.lexical.type!=">")&&(f.eat("=")?(I=="!"||I=="=")&&f.eat("="):/[<>*+\-|&?]/.test(I)&&(f.eat(I),I==">"&&f.eat(I))),I=="?"&&f.eat(".")?N("."):N("operator","operator",f.current());if(oe.test(I)){f.eatWhile(oe);var X=f.current();if(g.lastType!="."){if(w.propertyIsEnumerable(X)){var D=w[X];return N(D.type,D.style,X)}if(X=="async"&&f.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return N("async","keyword",X)}return N("variable","variable",X)}}function _(f){return function(g,I){var X=!1,D;if(le&&g.peek()=="@"&&g.match(A))return I.tokenize=R,N("jsonld-keyword","meta");for(;(D=g.next())!=null&&!(D==f&&!X);)X=!X&&D=="\\";return X||(I.tokenize=R),N("string","string")}}function Y(f,g){for(var I=!1,X;X=f.next();){if(X=="/"&&I){g.tokenize=R;break}I=X=="*"}return N("comment","comment")}function ce(f,g){for(var I=!1,X;(X=f.next())!=null;){if(!I&&(X=="`"||X=="$"&&f.eat("{"))){g.tokenize=R;break}I=!I&&X=="\\"}return N("quasi","string-2",f.current())}var $="([{}])";function ee(f,g){g.fatArrowAt&&(g.fatArrowAt=null);var I=f.string.indexOf("=>",f.start);if(!(I<0)){if(j){var X=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,I));X&&(I=X.index)}for(var D=0,re=!1,He=I-1;He>=0;--He){var it=f.string.charAt(He),yt=$.indexOf(it);if(yt>=0&&yt<3){if(!D){++He;break}if(--D==0){it=="("&&(re=!0);break}}else if(yt>=3&&yt<6)++D;else if(oe.test(it))re=!0;else if(/["'\/`]/.test(it))for(;;--He){if(He==0)return;var Hr=f.string.charAt(He-1);if(Hr==it&&f.string.charAt(He-2)!="\\"){He--;break}}else if(re&&!D){++He;break}}re&&!D&&(g.fatArrowAt=He)}}var Ae={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function se(f,g,I,X,D,re){this.indented=f,this.column=g,this.type=I,this.prev=D,this.info=re,X!=null&&(this.align=X)}function q(f,g){if(!W)return!1;for(var I=f.localVars;I;I=I.next)if(I.name==g)return!0;for(var X=f.context;X;X=X.prev)for(var I=X.vars;I;I=I.next)if(I.name==g)return!0}function Fe(f,g,I,X,D){var re=f.cc;for(M.state=f,M.stream=D,M.marked=null,M.cc=re,M.style=g,f.lexical.hasOwnProperty("align")||(f.lexical.align=!0);;){var He=re.length?re.pop():b?de:Ce;if(He(I,X)){for(;re.length&&re[re.length-1].lex;)re.pop()();return M.marked?M.marked:I=="variable"&&q(f,X)?"variable-2":g}}}var M={state:null,marked:null,cc:null};function G(){for(var f=arguments.length-1;f>=0;f--)M.cc.push(arguments[f])}function d(){return G.apply(null,arguments),!0}function S(f,g){for(var I=g;I;I=I.next)if(I.name==f)return!0;return!1}function L(f){var g=M.state;if(M.marked="def",!!W){if(g.context){if(g.lexical.info=="var"&&g.context&&g.context.block){var I=m(f,g.context);if(I!=null){g.context=I;return}}else if(!S(f,g.localVars)){g.localVars=new ne(f,g.localVars);return}}P.globalVars&&!S(f,g.globalVars)&&(g.globalVars=new ne(f,g.globalVars))}}function m(f,g){if(g)if(g.block){var I=m(f,g.prev);return I?I==g.prev?g:new z(I,g.vars,!0):null}else return S(f,g.vars)?g:new z(g.prev,new ne(f,g.vars),!1);else return null}function x(f){return f=="public"||f=="private"||f=="protected"||f=="abstract"||f=="readonly"}function z(f,g,I){this.prev=f,this.vars=g,this.block=I}function ne(f,g){this.name=f,this.next=g}var p=new ne("this",new ne("arguments",null));function c(){M.state.context=new z(M.state.context,M.state.localVars,!1),M.state.localVars=p}function te(){M.state.context=new z(M.state.context,M.state.localVars,!0),M.state.localVars=null}c.lex=te.lex=!0;function ke(){M.state.localVars=M.state.context.vars,M.state.context=M.state.context.prev}ke.lex=!0;function J(f,g){var I=function(){var X=M.state,D=X.indented;if(X.lexical.type=="stat")D=X.lexical.indented;else for(var re=X.lexical;re&&re.type==")"&&re.align;re=re.prev)D=re.indented;X.lexical=new se(D,M.stream.column(),f,null,X.lexical,g)};return I.lex=!0,I}function pe(){var f=M.state;f.lexical.prev&&(f.lexical.type==")"&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}pe.lex=!0;function Te(f){function g(I){return I==f?d():f==";"||I=="}"||I==")"||I=="]"?G():d(g)}return g}function Ce(f,g){return f=="var"?d(J("vardef",g),Nr,Te(";"),pe):f=="keyword a"?d(J("form"),qe,Ce,pe):f=="keyword b"?d(J("form"),Ce,pe):f=="keyword d"?M.stream.match(/^\s*$/,!1)?d():d(J("stat"),ct,Te(";"),pe):f=="debugger"?d(Te(";")):f=="{"?d(J("}"),te,Pt,pe,ke):f==";"?d():f=="if"?(M.state.lexical.info=="else"&&M.state.cc[M.state.cc.length-1]==pe&&M.state.cc.pop()(),d(J("form"),qe,Ce,pe,Or)):f=="function"?d(zt):f=="for"?d(J("form"),te,Wn,Ce,ke,pe):f=="class"||j&&g=="interface"?(M.marked="keyword",d(J("form",f=="class"?f:g),Pr,pe)):f=="variable"?j&&g=="declare"?(M.marked="keyword",d(Ce)):j&&(g=="module"||g=="enum"||g=="type")&&M.stream.match(/^\s*\w/,!1)?(M.marked="keyword",g=="enum"?d(ge):g=="type"?d(Hn,Te("operator"),We,Te(";")):d(J("form"),xt,Te("{"),J("}"),Pt,pe,pe)):j&&g=="namespace"?(M.marked="keyword",d(J("form"),de,Ce,pe)):j&&g=="abstract"?(M.marked="keyword",d(Ce)):d(J("stat"),ze):f=="switch"?d(J("form"),qe,Te("{"),J("}","switch"),te,Pt,pe,pe,ke):f=="case"?d(de,Te(":")):f=="default"?d(Te(":")):f=="catch"?d(J("form"),c,we,Ce,pe,ke):f=="export"?d(J("stat"),Ir,pe):f=="import"?d(J("stat"),fr,pe):f=="async"?d(Ce):g=="@"?d(de,Ce):G(J("stat"),de,Te(";"),pe)}function we(f){if(f=="(")return d(Ht,Te(")"))}function de(f,g){return Ve(f,g,!1)}function Oe(f,g){return Ve(f,g,!0)}function qe(f){return f!="("?G():d(J(")"),ct,Te(")"),pe)}function Ve(f,g,I){if(M.state.fatArrowAt==M.stream.start){var X=I?Ie:xe;if(f=="(")return d(c,J(")"),Ee(Ht,")"),pe,Te("=>"),X,ke);if(f=="variable")return G(c,xt,Te("=>"),X,ke)}var D=I?Re:Pe;return Ae.hasOwnProperty(f)?d(D):f=="function"?d(zt,D):f=="class"||j&&g=="interface"?(M.marked="keyword",d(J("form"),yi,pe)):f=="keyword c"||f=="async"?d(I?Oe:de):f=="("?d(J(")"),ct,Te(")"),pe,D):f=="operator"||f=="spread"?d(I?Oe:de):f=="["?d(J("]"),Je,pe,D):f=="{"?Tt(Le,"}",null,D):f=="quasi"?G(Ue,D):f=="new"?d(T(I)):d()}function ct(f){return f.match(/[;\}\)\],]/)?G():G(de)}function Pe(f,g){return f==","?d(ct):Re(f,g,!1)}function Re(f,g,I){var X=I==!1?Pe:Re,D=I==!1?de:Oe;if(f=="=>")return d(c,I?Ie:xe,ke);if(f=="operator")return/\+\+|--/.test(g)||j&&g=="!"?d(X):j&&g=="<"&&M.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?d(J(">"),Ee(We,">"),pe,X):g=="?"?d(de,Te(":"),D):d(D);if(f=="quasi")return G(Ue,X);if(f!=";"){if(f=="(")return Tt(Oe,")","call",X);if(f==".")return d(he,X);if(f=="[")return d(J("]"),ct,Te("]"),pe,X);if(j&&g=="as")return M.marked="keyword",d(We,X);if(f=="regexp")return M.state.lastType=M.marked="operator",M.stream.backUp(M.stream.pos-M.stream.start-1),d(D)}}function Ue(f,g){return f!="quasi"?G():g.slice(g.length-2)!="${"?d(Ue):d(ct,et)}function et(f){if(f=="}")return M.marked="string-2",M.state.tokenize=ce,d(Ue)}function xe(f){return ee(M.stream,M.state),G(f=="{"?Ce:de)}function Ie(f){return ee(M.stream,M.state),G(f=="{"?Ce:Oe)}function T(f){return function(g){return g=="."?d(f?O:U):g=="variable"&&j?d(Ct,f?Re:Pe):G(f?Oe:de)}}function U(f,g){if(g=="target")return M.marked="keyword",d(Pe)}function O(f,g){if(g=="target")return M.marked="keyword",d(Re)}function ze(f){return f==":"?d(pe,Ce):G(Pe,Te(";"),pe)}function he(f){if(f=="variable")return M.marked="property",d()}function Le(f,g){if(f=="async")return M.marked="property",d(Le);if(f=="variable"||M.style=="keyword"){if(M.marked="property",g=="get"||g=="set")return d(ve);var I;return j&&M.state.fatArrowAt==M.stream.start&&(I=M.stream.match(/^\s*:\s*/,!1))&&(M.state.fatArrowAt=M.stream.pos+I[0].length),d(Be)}else{if(f=="number"||f=="string")return M.marked=le?"property":M.style+" property",d(Be);if(f=="jsonld-keyword")return d(Be);if(j&&x(g))return M.marked="keyword",d(Le);if(f=="[")return d(de,or,Te("]"),Be);if(f=="spread")return d(Oe,Be);if(g=="*")return M.marked="keyword",d(Le);if(f==":")return G(Be)}}function ve(f){return f!="variable"?G(Be):(M.marked="property",d(zt))}function Be(f){if(f==":")return d(Oe);if(f=="(")return G(zt)}function Ee(f,g,I){function X(D,re){if(I?I.indexOf(D)>-1:D==","){var He=M.state.lexical;return He.info=="call"&&(He.pos=(He.pos||0)+1),d(function(it,yt){return it==g||yt==g?G():G(f)},X)}return D==g||re==g?d():I&&I.indexOf(";")>-1?G(f):d(Te(g))}return function(D,re){return D==g||re==g?d():G(f,X)}}function Tt(f,g,I){for(var X=3;X"),We);if(f=="quasi")return G(dt,It)}function Bn(f){if(f=="=>")return d(We)}function ye(f){return f.match(/[\}\)\]]/)?d():f==","||f==";"?d(ye):G(Qt,ye)}function Qt(f,g){if(f=="variable"||M.style=="keyword")return M.marked="property",d(Qt);if(g=="?"||f=="number"||f=="string")return d(Qt);if(f==":")return d(We);if(f=="[")return d(Te("variable"),br,Te("]"),Qt);if(f=="(")return G(ur,Qt);if(!f.match(/[;\}\)\],]/))return d()}function dt(f,g){return f!="quasi"?G():g.slice(g.length-2)!="${"?d(dt):d(We,Ye)}function Ye(f){if(f=="}")return M.marked="string-2",M.state.tokenize=ce,d(dt)}function Ze(f,g){return f=="variable"&&M.stream.match(/^\s*[?:]/,!1)||g=="?"?d(Ze):f==":"?d(We):f=="spread"?d(Ze):G(We)}function It(f,g){if(g=="<")return d(J(">"),Ee(We,">"),pe,It);if(g=="|"||f=="."||g=="&")return d(We);if(f=="[")return d(We,Te("]"),It);if(g=="extends"||g=="implements")return M.marked="keyword",d(We);if(g=="?")return d(We,Te(":"),We)}function Ct(f,g){if(g=="<")return d(J(">"),Ee(We,">"),pe,It)}function Bt(){return G(We,ht)}function ht(f,g){if(g=="=")return d(We)}function Nr(f,g){return g=="enum"?(M.marked="keyword",d(ge)):G(xt,or,Wt,xi)}function xt(f,g){if(j&&x(g))return M.marked="keyword",d(xt);if(f=="variable")return L(g),d();if(f=="spread")return d(xt);if(f=="[")return Tt(ln,"]");if(f=="{")return Tt(ar,"}")}function ar(f,g){return f=="variable"&&!M.stream.match(/^\s*:/,!1)?(L(g),d(Wt)):(f=="variable"&&(M.marked="property"),f=="spread"?d(xt):f=="}"?G():f=="["?d(de,Te("]"),Te(":"),ar):d(Te(":"),xt,Wt))}function ln(){return G(xt,Wt)}function Wt(f,g){if(g=="=")return d(Oe)}function xi(f){if(f==",")return d(Nr)}function Or(f,g){if(f=="keyword b"&&g=="else")return d(J("form","else"),Ce,pe)}function Wn(f,g){if(g=="await")return d(Wn);if(f=="(")return d(J(")"),an,pe)}function an(f){return f=="var"?d(Nr,sr):f=="variable"?d(sr):G(sr)}function sr(f,g){return f==")"?d():f==";"?d(sr):g=="in"||g=="of"?(M.marked="keyword",d(de,sr)):G(de,sr)}function zt(f,g){if(g=="*")return M.marked="keyword",d(zt);if(f=="variable")return L(g),d(zt);if(f=="(")return d(c,J(")"),Ee(Ht,")"),pe,lr,Ce,ke);if(j&&g=="<")return d(J(">"),Ee(Bt,">"),pe,zt)}function ur(f,g){if(g=="*")return M.marked="keyword",d(ur);if(f=="variable")return L(g),d(ur);if(f=="(")return d(c,J(")"),Ee(Ht,")"),pe,lr,ke);if(j&&g=="<")return d(J(">"),Ee(Bt,">"),pe,ur)}function Hn(f,g){if(f=="keyword"||f=="variable")return M.marked="type",d(Hn);if(g=="<")return d(J(">"),Ee(Bt,">"),pe)}function Ht(f,g){return g=="@"&&d(de,Ht),f=="spread"?d(Ht):j&&x(g)?(M.marked="keyword",d(Ht)):j&&f=="this"?d(or,Wt):G(xt,or,Wt)}function yi(f,g){return f=="variable"?Pr(f,g):_t(f,g)}function Pr(f,g){if(f=="variable")return L(g),d(_t)}function _t(f,g){if(g=="<")return d(J(">"),Ee(Bt,">"),pe,_t);if(g=="extends"||g=="implements"||j&&f==",")return g=="implements"&&(M.marked="keyword"),d(j?We:de,_t);if(f=="{")return d(J("}"),Rt,pe)}function Rt(f,g){if(f=="async"||f=="variable"&&(g=="static"||g=="get"||g=="set"||j&&x(g))&&M.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return M.marked="keyword",d(Rt);if(f=="variable"||M.style=="keyword")return M.marked="property",d(kr,Rt);if(f=="number"||f=="string")return d(kr,Rt);if(f=="[")return d(de,or,Te("]"),kr,Rt);if(g=="*")return M.marked="keyword",d(Rt);if(j&&f=="(")return G(ur,Rt);if(f==";"||f==",")return d(Rt);if(f=="}")return d();if(g=="@")return d(de,Rt)}function kr(f,g){if(g=="!"||g=="?")return d(kr);if(f==":")return d(We,Wt);if(g=="=")return d(Oe);var I=M.state.lexical.prev,X=I&&I.info=="interface";return G(X?ur:zt)}function Ir(f,g){return g=="*"?(M.marked="keyword",d(Wr,Te(";"))):g=="default"?(M.marked="keyword",d(de,Te(";"))):f=="{"?d(Ee(zr,"}"),Wr,Te(";")):G(Ce)}function zr(f,g){if(g=="as")return M.marked="keyword",d(Te("variable"));if(f=="variable")return G(Oe,zr)}function fr(f){return f=="string"?d():f=="("?G(de):f=="."?G(Pe):G(Br,Gt,Wr)}function Br(f,g){return f=="{"?Tt(Br,"}"):(f=="variable"&&L(g),g=="*"&&(M.marked="keyword"),d(sn))}function Gt(f){if(f==",")return d(Br,Gt)}function sn(f,g){if(g=="as")return M.marked="keyword",d(Br)}function Wr(f,g){if(g=="from")return M.marked="keyword",d(de)}function Je(f){return f=="]"?d():G(Ee(Oe,"]"))}function ge(){return G(J("form"),xt,Te("{"),J("}"),Ee(Vt,"}"),pe,pe)}function Vt(){return G(xt,Wt)}function un(f,g){return f.lastType=="operator"||f.lastType==","||B.test(g.charAt(0))||/[,.]/.test(g.charAt(0))}function Ft(f,g,I){return g.tokenize==R&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(g.lastType)||g.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-(I||0)))}return{startState:function(f){var g={tokenize:R,lastType:"sof",cc:[],lexical:new se((f||0)-fe,0,"block",!1),localVars:P.localVars,context:P.localVars&&new z(null,null,!1),indented:f||0};return P.globalVars&&typeof P.globalVars=="object"&&(g.globalVars=P.globalVars),g},token:function(f,g){if(f.sol()&&(g.lexical.hasOwnProperty("align")||(g.lexical.align=!1),g.indented=f.indentation(),ee(f,g)),g.tokenize!=Y&&f.eatSpace())return null;var I=g.tokenize(f,g);return ae=="comment"?I:(g.lastType=ae=="operator"&&(F=="++"||F=="--")?"incdec":ae,Fe(g,I,ae,F,f))},indent:function(f,g){if(f.tokenize==Y||f.tokenize==ce)return C.Pass;if(f.tokenize!=R)return 0;var I=g&&g.charAt(0),X=f.lexical,D;if(!/^\s*else\b/.test(g))for(var re=f.cc.length-1;re>=0;--re){var He=f.cc[re];if(He==pe)X=X.prev;else if(He!=Or&&He!=ke)break}for(;(X.type=="stat"||X.type=="form")&&(I=="}"||(D=f.cc[f.cc.length-1])&&(D==Pe||D==Re)&&!/^[,\.=+\-*:?[\(]/.test(g));)X=X.prev;Se&&X.type==")"&&X.prev.type=="stat"&&(X=X.prev);var it=X.type,yt=I==it;return it=="vardef"?X.indented+(f.lastType=="operator"||f.lastType==","?X.info.length+1:0):it=="form"&&I=="{"?X.indented:it=="form"?X.indented+fe:it=="stat"?X.indented+(un(f,g)?Se||fe:0):X.info=="switch"&&!yt&&P.doubleIndentSwitch!=!1?X.indented+(/^(?:case|default)\b/.test(g)?fe:2*fe):X.align?X.column+(yt?0:1):X.indented+(yt?0:fe)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:b?null:"/*",blockCommentEnd:b?null:"*/",blockCommentContinue:b?null:" * ",lineComment:b?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:b?"json":"javascript",jsonldMode:le,jsonMode:b,expressionAllowed:Ft,skipExpression:function(f){Fe(f,"atom","atom","true",new C.StringStream("",2,null))}}}),C.registerHelper("wordChars","javascript",/[\w$]/),C.defineMIME("text/javascript","javascript"),C.defineMIME("text/ecmascript","javascript"),C.defineMIME("application/javascript","javascript"),C.defineMIME("application/x-javascript","javascript"),C.defineMIME("application/ecmascript","javascript"),C.defineMIME("application/json",{name:"javascript",json:!0}),C.defineMIME("application/x-json",{name:"javascript",json:!0}),C.defineMIME("application/manifest+json",{name:"javascript",json:!0}),C.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),C.defineMIME("text/typescript",{name:"javascript",typescript:!0}),C.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})()),ya.exports}var ka;function ju(){return ka||(ka=1,(function(At,Ot){(function(C){C(Nt(),Ha(),_a(),Wa())})(function(C){var De={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function P(oe,w,B){var A=oe.current(),K=A.search(w);return K>-1?oe.backUp(A.length-K):A.match(/<\/?$/)&&(oe.backUp(A.length),oe.match(w,!1)||oe.match(A)),B}var fe={};function Se(oe){var w=fe[oe];return w||(fe[oe]=new RegExp("\\s+"+oe+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function le(oe,w){var B=oe.match(Se(w));return B?/^\s*(.*?)\s*$/.exec(B[2])[1]:""}function b(oe,w){return new RegExp((w?"^":"")+"","i")}function W(oe,w){for(var B in oe)for(var A=w[B]||(w[B]=[]),K=oe[B],ae=K.length-1;ae>=0;ae--)A.unshift(K[ae])}function j(oe,w){for(var B=0;B=0;F--)A.script.unshift(["type",ae[F].matches,ae[F].mode]);function N(R,_){var Y=B.token(R,_.htmlState),ce=/\btag\b/.test(Y),$;if(ce&&!/[<>\s\/]/.test(R.current())&&($=_.htmlState.tagName&&_.htmlState.tagName.toLowerCase())&&A.hasOwnProperty($))_.inTag=$+" ";else if(_.inTag&&ce&&/>$/.test(R.current())){var ee=/^([\S]+) (.*)/.exec(_.inTag);_.inTag=null;var Ae=R.current()==">"&&j(A[ee[1]],ee[2]),se=C.getMode(oe,Ae),q=b(ee[1],!0),Fe=b(ee[1],!1);_.token=function(M,G){return M.match(q,!1)?(G.token=N,G.localState=G.localMode=null,null):P(M,Fe,G.localMode.token(M,G.localState))},_.localMode=se,_.localState=C.startState(se,B.indent(_.htmlState,"",""))}else _.inTag&&(_.inTag+=R.current(),R.eol()&&(_.inTag+=" "));return Y}return{startState:function(){var R=C.startState(B);return{token:N,inTag:null,localMode:null,localState:null,htmlState:R}},copyState:function(R){var _;return R.localState&&(_=C.copyState(R.localMode,R.localState)),{token:R.token,inTag:R.inTag,localMode:R.localMode,localState:_,htmlState:C.copyState(B,R.htmlState)}},token:function(R,_){return _.token(R,_)},indent:function(R,_,Y){return!R.localMode||/^\s*<\//.test(_)?B.indent(R.htmlState,_,Y):R.localMode.indent?R.localMode.indent(R.localState,_,Y):C.Pass},innerMode:function(R){return{state:R.localState||R.htmlState,mode:R.localMode||B}}}},"xml","javascript","css"),C.defineMIME("text/html","htmlmixed")})})()),va.exports}ju();_a();var wa={exports:{}},Sa;function Ku(){return Sa||(Sa=1,(function(At,Ot){(function(C){C(Nt())})(function(C){function De(W){return new RegExp("^(("+W.join(")|(")+"))\\b")}var P=De(["and","or","not","is"]),fe=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],Se=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];C.registerHelper("hintWords","python",fe.concat(Se).concat(["exec","print"]));function le(W){return W.scopes[W.scopes.length-1]}C.defineMode("python",function(W,j){for(var oe="error",w=j.delimiters||j.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,B=[j.singleOperators,j.doubleOperators,j.doubleDelimiters,j.tripleDelimiters,j.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],A=0;Ax?q(L):z0&&M(S,L)&&(ne+=" "+oe),ne}}return ee(S,L)}function ee(S,L,m){if(S.eatSpace())return null;if(!m&&S.match(/^#.*/))return"comment";if(S.match(/^[0-9\.]/,!1)){var x=!1;if(S.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(x=!0),S.match(/^[\d_]+\.\d*/)&&(x=!0),S.match(/^\.\d+/)&&(x=!0),x)return S.eat(/J/i),"number";var z=!1;if(S.match(/^0x[0-9a-f_]+/i)&&(z=!0),S.match(/^0b[01_]+/i)&&(z=!0),S.match(/^0o[0-7_]+/i)&&(z=!0),S.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(S.eat(/J/i),z=!0),S.match(/^0(?![\dx])/i)&&(z=!0),z)return S.eat(/L/i),"number"}if(S.match(_)){var ne=S.current().toLowerCase().indexOf("f")!==-1;return ne?(L.tokenize=Ae(S.current(),L.tokenize),L.tokenize(S,L)):(L.tokenize=se(S.current(),L.tokenize),L.tokenize(S,L))}for(var p=0;p=0;)S=S.substr(1);var m=S.length==1,x="string";function z(p){return function(c,te){var ke=ee(c,te,!0);return ke=="punctuation"&&(c.current()=="{"?te.tokenize=z(p+1):c.current()=="}"&&(p>1?te.tokenize=z(p-1):te.tokenize=ne)),ke}}function ne(p,c){for(;!p.eol();)if(p.eatWhile(/[^'"\{\}\\]/),p.eat("\\")){if(p.next(),m&&p.eol())return x}else{if(p.match(S))return c.tokenize=L,x;if(p.match("{{"))return x;if(p.match("{",!1))return c.tokenize=z(0),p.current()?x:c.tokenize(p,c);if(p.match("}}"))return x;if(p.match("}"))return oe;p.eat(/['"]/)}if(m){if(j.singleLineStringErrors)return oe;c.tokenize=L}return x}return ne.isString=!0,ne}function se(S,L){for(;"rubf".indexOf(S.charAt(0).toLowerCase())>=0;)S=S.substr(1);var m=S.length==1,x="string";function z(ne,p){for(;!ne.eol();)if(ne.eatWhile(/[^'"\\]/),ne.eat("\\")){if(ne.next(),m&&ne.eol())return x}else{if(ne.match(S))return p.tokenize=L,x;ne.eat(/['"]/)}if(m){if(j.singleLineStringErrors)return oe;p.tokenize=L}return x}return z.isString=!0,z}function q(S){for(;le(S).type!="py";)S.scopes.pop();S.scopes.push({offset:le(S).offset+W.indentUnit,type:"py",align:null})}function Fe(S,L,m){var x=S.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:S.column()+1;L.scopes.push({offset:L.indent+K,type:m,align:x})}function M(S,L){for(var m=S.indentation();L.scopes.length>1&&le(L).offset>m;){if(le(L).type!="py")return!0;L.scopes.pop()}return le(L).offset!=m}function G(S,L){S.sol()&&(L.beginningOfLine=!0,L.dedent=!1);var m=L.tokenize(S,L),x=S.current();if(L.beginningOfLine&&x=="@")return S.match(R,!1)?"meta":N?"operator":oe;if(/\S/.test(x)&&(L.beginningOfLine=!1),(m=="variable"||m=="builtin")&&L.lastToken=="meta"&&(m="meta"),(x=="pass"||x=="return")&&(L.dedent=!0),x=="lambda"&&(L.lambda=!0),x==":"&&!L.lambda&&le(L).type=="py"&&S.match(/^\s*(?:#|$)/,!1)&&q(L),x.length==1&&!/string|comment/.test(m)){var z="[({".indexOf(x);if(z!=-1&&Fe(S,L,"])}".slice(z,z+1)),z="])}".indexOf(x),z!=-1)if(le(L).type==x)L.indent=L.scopes.pop().offset-K;else return oe}return L.dedent&&S.eol()&&le(L).type=="py"&&L.scopes.length>1&&L.scopes.pop(),m}var d={startState:function(S){return{tokenize:$,scopes:[{offset:S||0,type:"py",align:null}],indent:S||0,lastToken:null,lambda:!1,dedent:0}},token:function(S,L){var m=L.errorToken;m&&(L.errorToken=!1);var x=G(S,L);return x&&x!="comment"&&(L.lastToken=x=="keyword"||x=="punctuation"?S.current():x),x=="punctuation"&&(x=null),S.eol()&&L.lambda&&(L.lambda=!1),m?x+" "+oe:x},indent:function(S,L){if(S.tokenize!=$)return S.tokenize.isString?C.Pass:0;var m=le(S),x=m.type==L.charAt(0)||m.type=="py"&&!S.dedent&&/^(else:|elif |except |finally:)/.test(L);return m.align!=null?m.align-(x?1:0):m.offset-(x?K:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return d}),C.defineMIME("text/x-python","python");var b=function(W){return W.split(" ")};C.defineMIME("text/x-cython",{name:"python",extra_keywords:b("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})})()),wa.exports}Ku();var La={exports:{}},Ta;function Uu(){return Ta||(Ta=1,(function(At,Ot){(function(C){C(Nt())})(function(C){function De(m,x,z,ne,p,c){this.indented=m,this.column=x,this.type=z,this.info=ne,this.align=p,this.prev=c}function P(m,x,z,ne){var p=m.indented;return m.context&&m.context.type=="statement"&&z!="statement"&&(p=m.context.indented),m.context=new De(p,x,z,ne,null,m.context)}function fe(m){var x=m.context.type;return(x==")"||x=="]"||x=="}")&&(m.indented=m.context.indented),m.context=m.context.prev}function Se(m,x,z){if(x.prevToken=="variable"||x.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(m.string.slice(0,z))||x.typeAtEndOfLine&&m.column()==m.indentation())return!0}function le(m){for(;;){if(!m||m.type=="top")return!0;if(m.type=="}"&&m.prev.info!="namespace")return!1;m=m.prev}}C.defineMode("clike",function(m,x){var z=m.indentUnit,ne=x.statementIndentUnit||z,p=x.dontAlignCalls,c=x.keywords||{},te=x.types||{},ke=x.builtin||{},J=x.blockKeywords||{},pe=x.defKeywords||{},Te=x.atoms||{},Ce=x.hooks||{},we=x.multiLineStrings,de=x.indentStatements!==!1,Oe=x.indentSwitch!==!1,qe=x.namespaceSeparator,Ve=x.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,ct=x.numberStart||/[\d\.]/,Pe=x.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Re=x.isOperatorChar||/[+\-*&%=<>!?|\/]/,Ue=x.isIdentifierChar||/[\w\$_\xa1-\uffff]/,et=x.isReservedIdentifier||!1,xe,Ie;function T(he,Le){var ve=he.next();if(Ce[ve]){var Be=Ce[ve](he,Le);if(Be!==!1)return Be}if(ve=='"'||ve=="'")return Le.tokenize=U(ve),Le.tokenize(he,Le);if(ct.test(ve)){if(he.backUp(1),he.match(Pe))return"number";he.next()}if(Ve.test(ve))return xe=ve,null;if(ve=="/"){if(he.eat("*"))return Le.tokenize=O,O(he,Le);if(he.eat("/"))return he.skipToEnd(),"comment"}if(Re.test(ve)){for(;!he.match(/^\/[\/*]/,!1)&&he.eat(Re););return"operator"}if(he.eatWhile(Ue),qe)for(;he.match(qe);)he.eatWhile(Ue);var Ee=he.current();return W(c,Ee)?(W(J,Ee)&&(xe="newstatement"),W(pe,Ee)&&(Ie=!0),"keyword"):W(te,Ee)?"type":W(ke,Ee)||et&&et(Ee)?(W(J,Ee)&&(xe="newstatement"),"builtin"):W(Te,Ee)?"atom":"variable"}function U(he){return function(Le,ve){for(var Be=!1,Ee,Tt=!1;(Ee=Le.next())!=null;){if(Ee==he&&!Be){Tt=!0;break}Be=!Be&&Ee=="\\"}return(Tt||!(Be||we))&&(ve.tokenize=null),"string"}}function O(he,Le){for(var ve=!1,Be;Be=he.next();){if(Be=="/"&&ve){Le.tokenize=null;break}ve=Be=="*"}return"comment"}function ze(he,Le){x.typeFirstDefinitions&&he.eol()&&le(Le.context)&&(Le.typeAtEndOfLine=Se(he,Le,he.pos))}return{startState:function(he){return{tokenize:null,context:new De((he||0)-z,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(he,Le){var ve=Le.context;if(he.sol()&&(ve.align==null&&(ve.align=!1),Le.indented=he.indentation(),Le.startOfLine=!0),he.eatSpace())return ze(he,Le),null;xe=Ie=null;var Be=(Le.tokenize||T)(he,Le);if(Be=="comment"||Be=="meta")return Be;if(ve.align==null&&(ve.align=!0),xe==";"||xe==":"||xe==","&&he.match(/^\s*(?:\/\/.*)?$/,!1))for(;Le.context.type=="statement";)fe(Le);else if(xe=="{")P(Le,he.column(),"}");else if(xe=="[")P(Le,he.column(),"]");else if(xe=="(")P(Le,he.column(),")");else if(xe=="}"){for(;ve.type=="statement";)ve=fe(Le);for(ve.type=="}"&&(ve=fe(Le));ve.type=="statement";)ve=fe(Le)}else xe==ve.type?fe(Le):de&&((ve.type=="}"||ve.type=="top")&&xe!=";"||ve.type=="statement"&&xe=="newstatement")&&P(Le,he.column(),"statement",he.current());if(Be=="variable"&&(Le.prevToken=="def"||x.typeFirstDefinitions&&Se(he,Le,he.start)&&le(Le.context)&&he.match(/^\s*\(/,!1))&&(Be="def"),Ce.token){var Ee=Ce.token(he,Le,Be);Ee!==void 0&&(Be=Ee)}return Be=="def"&&x.styleDefs===!1&&(Be="variable"),Le.startOfLine=!1,Le.prevToken=Ie?"def":Be||xe,ze(he,Le),Be},indent:function(he,Le){if(he.tokenize!=T&&he.tokenize!=null||he.typeAtEndOfLine&&le(he.context))return C.Pass;var ve=he.context,Be=Le&&Le.charAt(0),Ee=Be==ve.type;if(ve.type=="statement"&&Be=="}"&&(ve=ve.prev),x.dontIndentStatements)for(;ve.type=="statement"&&x.dontIndentStatements.test(ve.info);)ve=ve.prev;if(Ce.indent){var Tt=Ce.indent(he,ve,Le,z);if(typeof Tt=="number")return Tt}var Pt=ve.prev&&ve.prev.info=="switch";if(x.allmanIndentation&&/[{(]/.test(Be)){for(;ve.type!="top"&&ve.type!="}";)ve=ve.prev;return ve.indented}return ve.type=="statement"?ve.indented+(Be=="{"?0:ne):ve.align&&(!p||ve.type!=")")?ve.column+(Ee?0:1):ve.type==")"&&!Ee?ve.indented+ne:ve.indented+(Ee?0:z)+(!Ee&&Pt&&!/^(?:case|default)\b/.test(Le)?z:0)},electricInput:Oe?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function b(m){for(var x={},z=m.split(" "),ne=0;ne!?|\/#:@]/,hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},'"':function(m,x){return m.match('""')?(x.tokenize=M,x.tokenize(m,x)):!1},"'":function(m){return m.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(m.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(m,x){var z=x.context;return z.type=="}"&&z.align&&m.eat(">")?(x.context=new De(z.indented,z.column,z.type,z.info,null,z.prev),"operator"):!1},"/":function(m,x){return m.eat("*")?(x.tokenize=G(1),x.tokenize(m,x)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function d(m){return function(x,z){for(var ne=!1,p,c=!1;!x.eol();){if(!m&&!ne&&x.match('"')){c=!0;break}if(m&&x.match('"""')){c=!0;break}p=x.next(),!ne&&p=="$"&&x.match("{")&&x.skipTo("}"),ne=!ne&&p=="\\"&&!m}return(c||!m)&&(z.tokenize=null),"string"}}Fe("text/x-kotlin",{name:"clike",keywords:b("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:b("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:b("catch class do else finally for if where try while enum"),defKeywords:b("class val var object interface fun"),atoms:b("true false null this"),hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},"*":function(m,x){return x.prevToken=="."?"variable":"operator"},'"':function(m,x){return x.tokenize=d(m.match('""')),x.tokenize(m,x)},"/":function(m,x){return m.eat("*")?(x.tokenize=G(1),x.tokenize(m,x)):!1},indent:function(m,x,z,ne){var p=z&&z.charAt(0);if((m.prevToken=="}"||m.prevToken==")")&&z=="")return m.indented;if(m.prevToken=="operator"&&z!="}"&&m.context.type!="}"||m.prevToken=="variable"&&p=="."||(m.prevToken=="}"||m.prevToken==")")&&p==".")return ne*2+x.indented;if(x.align&&x.type=="}")return x.indented+(m.context.type==(z||"").charAt(0)?0:ne)}},modeProps:{closeBrackets:{triples:'"'}}}),Fe(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:b("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:b("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:b("for while do if else struct"),builtin:b("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:b("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":_},modeProps:{fold:["brace","include"]}}),Fe("text/x-nesc",{name:"clike",keywords:b(j+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:ae,blockKeywords:b(N),atoms:b("null true false"),hooks:{"#":_},modeProps:{fold:["brace","include"]}}),Fe("text/x-objectivec",{name:"clike",keywords:b(j+" "+w),types:F,builtin:b(B),blockKeywords:b(N+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:b(R+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:b("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:ce,hooks:{"#":_,"*":Y},modeProps:{fold:["brace","include"]}}),Fe("text/x-objectivec++",{name:"clike",keywords:b(j+" "+w+" "+oe),types:F,builtin:b(B),blockKeywords:b(N+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:b(R+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:b("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:ce,hooks:{"#":_,"*":Y,u:ee,U:ee,L:ee,R:ee,0:$,1:$,2:$,3:$,4:$,5:$,6:$,7:$,8:$,9:$,token:function(m,x,z){if(z=="variable"&&m.peek()=="("&&(x.prevToken==";"||x.prevToken==null||x.prevToken=="}")&&Ae(m.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),Fe("text/x-squirrel",{name:"clike",keywords:b("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:ae,blockKeywords:b("case catch class else for foreach if switch try while"),defKeywords:b("function local class"),typeFirstDefinitions:!0,atoms:b("true false null"),hooks:{"#":_},modeProps:{fold:["brace","include"]}});var S=null;function L(m){return function(x,z){for(var ne=!1,p,c=!1;!x.eol();){if(!ne&&x.match('"')&&(m=="single"||x.match('""'))){c=!0;break}if(!ne&&x.match("``")){S=L(m),c=!0;break}p=x.next(),ne=m=="single"&&!ne&&p=="\\"}return c&&(z.tokenize=null),"string"}}Fe("text/x-ceylon",{name:"clike",keywords:b("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(m){var x=m.charAt(0);return x===x.toUpperCase()&&x!==x.toLowerCase()},blockKeywords:b("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:b("class dynamic function interface module object package value"),builtin:b("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:b("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},'"':function(m,x){return x.tokenize=L(m.match('""')?"triple":"single"),x.tokenize(m,x)},"`":function(m,x){return!S||!m.match("`")?!1:(x.tokenize=S,S=null,x.tokenize(m,x))},"'":function(m){return m.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(m,x,z){if((z=="variable"||z=="type")&&x.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})})()),La.exports}Uu();var Ca={exports:{}},Da={exports:{}},Ma;function Gu(){return Ma||(Ma=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var De=0;De-1&&fe.substring(b+1,fe.length);if(W)return C.findModeByExtension(W)},C.findModeByName=function(fe){fe=fe.toLowerCase();for(var Se=0;Se` "'(~:]+/,ae=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,F=/^\s*\[[^\]]+?\]:.*$/,N=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,R=" ";function _(p,c,te){return c.f=c.inline=te,te(p,c)}function Y(p,c,te){return c.f=c.block=te,te(p,c)}function ce(p){return!p||!/\S/.test(p.string)}function $(p){if(p.linkTitle=!1,p.linkHref=!1,p.linkText=!1,p.em=!1,p.strong=!1,p.strikethrough=!1,p.quote=0,p.indentedCode=!1,p.f==Ae){var c=Se;if(!c){var te=C.innerMode(fe,p.htmlState);c=te.mode.name=="xml"&&te.state.tagStart===null&&!te.state.context&&te.state.tokenize.isInText}c&&(p.f=M,p.block=ee,p.htmlState=null)}return p.trailingSpace=0,p.trailingSpaceNewLine=!1,p.prevLine=p.thisLine,p.thisLine={stream:null},null}function ee(p,c){var te=p.column()===c.indentation,ke=ce(c.prevLine.stream),J=c.indentedCode,pe=c.prevLine.hr,Te=c.list!==!1,Ce=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var we=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,Te)){for(c.list=null;we=4&&(J||c.prevLine.fencedCodeEnd||c.prevLine.header||ke))return p.skipToEnd(),c.indentedCode=!0,b.code;if(p.eatSpace())return null;if(te&&c.indentation<=Ce&&(qe=p.match(B))&&qe[1].length<=6)return c.quote=0,c.header=qe[1].length,c.thisLine.header=!0,P.highlightFormatting&&(c.formatting="header"),c.f=c.inline,q(c);if(c.indentation<=Ce&&p.eat(">"))return c.quote=te?1:c.quote+1,P.highlightFormatting&&(c.formatting="quote"),p.eatSpace(),q(c);if(!Oe&&!c.setext&&te&&c.indentation<=Ce&&(qe=p.match(oe))){var Ve=qe[1]?"ol":"ul";return c.indentation=we+p.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,P.taskLists&&p.match(w,!1)&&(c.taskList=!0),c.f=c.inline,P.highlightFormatting&&(c.formatting=["list","list-"+Ve]),q(c)}else{if(te&&c.indentation<=Ce&&(qe=p.match(ae,!0)))return c.quote=0,c.fencedEndRE=new RegExp(qe[1]+"+ *$"),c.localMode=P.fencedCodeBlockHighlighting&&le(qe[2]||P.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=C.startState(c.localMode)),c.f=c.block=se,P.highlightFormatting&&(c.formatting="code-block"),c.code=-1,q(c);if(c.setext||(!de||!Te)&&!c.quote&&c.list===!1&&!c.code&&!Oe&&!F.test(p.string)&&(qe=p.lookAhead(1))&&(qe=qe.match(A)))return c.setext?(c.header=c.setext,c.setext=0,p.skipToEnd(),P.highlightFormatting&&(c.formatting="header")):(c.header=qe[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,q(c);if(Oe)return p.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,b.hr;if(p.peek()==="[")return _(p,c,m)}return _(p,c,c.inline)}function Ae(p,c){var te=fe.token(p,c.htmlState);if(!Se){var ke=C.innerMode(fe,c.htmlState);(ke.mode.name=="xml"&&ke.state.tagStart===null&&!ke.state.context&&ke.state.tokenize.isInText||c.md_inside&&p.current().indexOf(">")>-1)&&(c.f=M,c.block=ee,c.htmlState=null)}return te}function se(p,c){var te=c.listStack[c.listStack.length-1]||0,ke=c.indentation=p.quote?c.push(b.formatting+"-"+p.formatting[te]+"-"+p.quote):c.push("error"))}if(p.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(p.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(p.linkHref?c.push(b.linkHref,"url"):(p.strong&&c.push(b.strong),p.em&&c.push(b.em),p.strikethrough&&c.push(b.strikethrough),p.emoji&&c.push(b.emoji),p.linkText&&c.push(b.linkText),p.code&&c.push(b.code),p.image&&c.push(b.image),p.imageAltText&&c.push(b.imageAltText,"link"),p.imageMarker&&c.push(b.imageMarker)),p.header&&c.push(b.header,b.header+"-"+p.header),p.quote&&(c.push(b.quote),!P.maxBlockquoteDepth||P.maxBlockquoteDepth>=p.quote?c.push(b.quote+"-"+p.quote):c.push(b.quote+"-"+P.maxBlockquoteDepth)),p.list!==!1){var ke=(p.listStack.length-1)%3;ke?ke===1?c.push(b.list2):c.push(b.list3):c.push(b.list1)}return p.trailingSpaceNewLine?c.push("trailing-space-new-line"):p.trailingSpace&&c.push("trailing-space-"+(p.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function Fe(p,c){if(p.match(K,!0))return q(c)}function M(p,c){var te=c.text(p,c);if(typeof te<"u")return te;if(c.list)return c.list=null,q(c);if(c.taskList){var ke=p.match(w,!0)[1]===" ";return ke?c.taskOpen=!0:c.taskClosed=!0,P.highlightFormatting&&(c.formatting="task"),c.taskList=!1,q(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&p.match(/^#+$/,!0))return P.highlightFormatting&&(c.formatting="header"),q(c);var J=p.next();if(c.linkTitle){c.linkTitle=!1;var pe=J;J==="("&&(pe=")"),pe=(pe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Te="^\\s*(?:[^"+pe+"\\\\]+|\\\\\\\\|\\\\.)"+pe;if(p.match(new RegExp(Te),!0))return b.linkHref}if(J==="`"){var Ce=c.formatting;P.highlightFormatting&&(c.formatting="code"),p.eatWhile("`");var we=p.current().length;if(c.code==0&&(!c.quote||we==1))return c.code=we,q(c);if(we==c.code){var de=q(c);return c.code=0,de}else return c.formatting=Ce,q(c)}else if(c.code)return q(c);if(J==="\\"&&(p.next(),P.highlightFormatting)){var Oe=q(c),qe=b.formatting+"-escape";return Oe?Oe+" "+qe:qe}if(J==="!"&&p.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,P.highlightFormatting&&(c.formatting="image"),q(c);if(J==="["&&c.imageMarker&&p.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,P.highlightFormatting&&(c.formatting="image"),q(c);if(J==="]"&&c.imageAltText){P.highlightFormatting&&(c.formatting="image");var Oe=q(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=d,Oe}if(J==="["&&!c.image)return c.linkText&&p.match(/^.*?\]/)||(c.linkText=!0,P.highlightFormatting&&(c.formatting="link")),q(c);if(J==="]"&&c.linkText){P.highlightFormatting&&(c.formatting="link");var Oe=q(c);return c.linkText=!1,c.inline=c.f=p.match(/\(.*?\)| ?\[.*?\]/,!1)?d:M,Oe}if(J==="<"&&p.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=G,P.highlightFormatting&&(c.formatting="link");var Oe=q(c);return Oe?Oe+=" ":Oe="",Oe+b.linkInline}if(J==="<"&&p.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=G,P.highlightFormatting&&(c.formatting="link");var Oe=q(c);return Oe?Oe+=" ":Oe="",Oe+b.linkEmail}if(P.xml&&J==="<"&&p.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ve=p.string.indexOf(">",p.pos);if(Ve!=-1){var ct=p.string.substring(p.start,Ve);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ct)&&(c.md_inside=!0)}return p.backUp(1),c.htmlState=C.startState(fe),Y(p,c,Ae)}if(P.xml&&J==="<"&&p.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(J==="*"||J==="_"){for(var Pe=1,Re=p.pos==1?" ":p.string.charAt(p.pos-2);Pe<3&&p.eat(J);)Pe++;var Ue=p.peek()||" ",et=!/\s/.test(Ue)&&(!N.test(Ue)||/\s/.test(Re)||N.test(Re)),xe=!/\s/.test(Re)&&(!N.test(Re)||/\s/.test(Ue)||N.test(Ue)),Ie=null,T=null;if(Pe%2&&(!c.em&&et&&(J==="*"||!xe||N.test(Re))?Ie=!0:c.em==J&&xe&&(J==="*"||!et||N.test(Ue))&&(Ie=!1)),Pe>1&&(!c.strong&&et&&(J==="*"||!xe||N.test(Re))?T=!0:c.strong==J&&xe&&(J==="*"||!et||N.test(Ue))&&(T=!1)),T!=null||Ie!=null){P.highlightFormatting&&(c.formatting=Ie==null?"strong":T==null?"em":"strong em"),Ie===!0&&(c.em=J),T===!0&&(c.strong=J);var de=q(c);return Ie===!1&&(c.em=!1),T===!1&&(c.strong=!1),de}}else if(J===" "&&(p.eat("*")||p.eat("_"))){if(p.peek()===" ")return q(c);p.backUp(1)}if(P.strikethrough){if(J==="~"&&p.eatWhile(J)){if(c.strikethrough){P.highlightFormatting&&(c.formatting="strikethrough");var de=q(c);return c.strikethrough=!1,de}else if(p.match(/^[^\s]/,!1))return c.strikethrough=!0,P.highlightFormatting&&(c.formatting="strikethrough"),q(c)}else if(J===" "&&p.match("~~",!0)){if(p.peek()===" ")return q(c);p.backUp(2)}}if(P.emoji&&J===":"&&p.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,P.highlightFormatting&&(c.formatting="emoji");var U=q(c);return c.emoji=!1,U}return J===" "&&(p.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),q(c)}function G(p,c){var te=p.next();if(te===">"){c.f=c.inline=M,P.highlightFormatting&&(c.formatting="link");var ke=q(c);return ke?ke+=" ":ke="",ke+b.linkInline}return p.match(/^[^>]+/,!0),b.linkInline}function d(p,c){if(p.eatSpace())return null;var te=p.next();return te==="("||te==="["?(c.f=c.inline=L(te==="("?")":"]"),P.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,q(c)):"error"}var S={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(p){return function(c,te){var ke=c.next();if(ke===p){te.f=te.inline=M,P.highlightFormatting&&(te.formatting="link-string");var J=q(te);return te.linkHref=!1,J}return c.match(S[p]),te.linkHref=!0,q(te)}}function m(p,c){return p.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=x,p.next(),P.highlightFormatting&&(c.formatting="link"),c.linkText=!0,q(c)):_(p,c,M)}function x(p,c){if(p.match("]:",!0)){c.f=c.inline=z,P.highlightFormatting&&(c.formatting="link");var te=q(c);return c.linkText=!1,te}return p.match(/^([^\]\\]|\\.)+/,!0),b.linkText}function z(p,c){return p.eatSpace()?null:(p.match(/^[^\s]+/,!0),p.peek()===void 0?c.linkTitle=!0:p.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),c.f=c.inline=M,b.linkHref+" url")}var ne={startState:function(){return{f:ee,prevLine:{stream:null},thisLine:{stream:null},block:ee,htmlState:null,indentation:0,inline:M,text:Fe,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(p){return{f:p.f,prevLine:p.prevLine,thisLine:p.thisLine,block:p.block,htmlState:p.htmlState&&C.copyState(fe,p.htmlState),indentation:p.indentation,localMode:p.localMode,localState:p.localMode?C.copyState(p.localMode,p.localState):null,inline:p.inline,text:p.text,formatting:!1,linkText:p.linkText,linkTitle:p.linkTitle,linkHref:p.linkHref,code:p.code,em:p.em,strong:p.strong,strikethrough:p.strikethrough,emoji:p.emoji,header:p.header,setext:p.setext,hr:p.hr,taskList:p.taskList,list:p.list,listStack:p.listStack.slice(0),quote:p.quote,indentedCode:p.indentedCode,trailingSpace:p.trailingSpace,trailingSpaceNewLine:p.trailingSpaceNewLine,md_inside:p.md_inside,fencedEndRE:p.fencedEndRE}},token:function(p,c){if(c.formatting=!1,p!=c.thisLine.stream){if(c.header=0,c.hr=!1,p.match(/^\s*$/,!0))return $(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:p},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=Ae)){var te=p.match(/^\s*/,!0)[0].replace(/\t/g,R).length;if(c.indentation=te,c.indentationDiff=null,te>0)return null}}return c.f(p,c)},innerMode:function(p){return p.block==Ae?{state:p.htmlState,mode:fe}:p.localState?{state:p.localState,mode:p.localMode}:{state:p,mode:ne}},indent:function(p,c,te){return p.block==Ae&&fe.indent?fe.indent(p.htmlState,c,te):p.localState&&p.localMode.indent?p.localMode.indent(p.localState,c,te):C.Pass},blankLine:$,getType:q,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ne},"xml"),C.defineMIME("text/markdown","markdown"),C.defineMIME("text/x-markdown","markdown")})})()),Ca.exports}Xu();var Fa={exports:{}},Ea;function Yu(){return Ea||(Ea=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.defineOption("placeholder","",function(W,j,oe){var w=oe&&oe!=C.Init;if(j&&!w)W.on("blur",Se),W.on("change",le),W.on("swapDoc",le),C.on(W.getInputField(),"compositionupdate",W.state.placeholderCompose=function(){fe(W)}),le(W);else if(!j&&w){W.off("blur",Se),W.off("change",le),W.off("swapDoc",le),C.off(W.getInputField(),"compositionupdate",W.state.placeholderCompose),De(W);var B=W.getWrapperElement();B.className=B.className.replace(" CodeMirror-empty","")}j&&!W.hasFocus()&&Se(W)});function De(W){W.state.placeholder&&(W.state.placeholder.parentNode.removeChild(W.state.placeholder),W.state.placeholder=null)}function P(W){De(W);var j=W.state.placeholder=document.createElement("pre");j.style.cssText="height: 0; overflow: visible",j.style.direction=W.getOption("direction"),j.className="CodeMirror-placeholder CodeMirror-line-like";var oe=W.getOption("placeholder");typeof oe=="string"&&(oe=document.createTextNode(oe)),j.appendChild(oe),W.display.lineSpace.insertBefore(j,W.display.lineSpace.firstChild)}function fe(W){setTimeout(function(){var j=!1;if(W.lineCount()==1){var oe=W.getInputField();j=oe.nodeName=="TEXTAREA"?!W.getLine(0).length:!/[^\u200b]/.test(oe.querySelector(".CodeMirror-line").textContent)}j?P(W):De(W)},20)}function Se(W){b(W)&&P(W)}function le(W){var j=W.getWrapperElement(),oe=b(W);j.className=j.className.replace(" CodeMirror-empty","")+(oe?" CodeMirror-empty":""),oe?P(W):De(W)}function b(W){return W.lineCount()===1&&W.getLine(0)===""}})})()),Fa.exports}Yu();var Na={exports:{}},Oa;function Zu(){return Oa||(Oa=1,(function(At,Ot){(function(C){C(Nt())})(function(C){C.defineSimpleMode=function(w,B){C.defineMode(w,function(A){return C.simpleMode(A,B)})},C.simpleMode=function(w,B){De(B,"start");var A={},K=B.meta||{},ae=!1;for(var F in B)if(F!=K&&B.hasOwnProperty(F))for(var N=A[F]=[],R=B[F],_=0;_2&&Y.token&&typeof Y.token!="string"){for(var ee=2;ee-1)return C.Pass;var F=A.indent.length-1,N=w[A.state];e:for(;;){for(var R=0;R",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function Se(w){return w&&w.bracketRegex||/[(){}[\]]/}function le(w,B,A){var K=w.getLineHandle(B.line),ae=B.ch-1,F=A&&A.afterCursor;F==null&&(F=/(^| )cm-fat-cursor($| )/.test(w.getWrapperElement().className));var N=Se(A),R=!F&&ae>=0&&N.test(K.text.charAt(ae))&&fe[K.text.charAt(ae)]||N.test(K.text.charAt(ae+1))&&fe[K.text.charAt(++ae)];if(!R)return null;var _=R.charAt(1)==">"?1:-1;if(A&&A.strict&&_>0!=(ae==B.ch))return null;var Y=w.getTokenTypeAt(P(B.line,ae+1)),ce=b(w,P(B.line,ae+(_>0?1:0)),_,Y,A);return ce==null?null:{from:P(B.line,ae),to:ce&&ce.pos,match:ce&&ce.ch==R.charAt(0),forward:_>0}}function b(w,B,A,K,ae){for(var F=ae&&ae.maxScanLineLength||1e4,N=ae&&ae.maxScanLines||1e3,R=[],_=Se(ae),Y=A>0?Math.min(B.line+N,w.lastLine()+1):Math.max(w.firstLine()-1,B.line-N),ce=B.line;ce!=Y;ce+=A){var $=w.getLine(ce);if($){var ee=A>0?0:$.length-1,Ae=A>0?$.length:-1;if(!($.length>F))for(ce==B.line&&(ee=B.ch-(A<0?1:0));ee!=Ae;ee+=A){var se=$.charAt(ee);if(_.test(se)&&(K===void 0||(w.getTokenTypeAt(P(ce,ee+1))||"")==(K||""))){var q=fe[se];if(q&&q.charAt(1)==">"==A>0)R.push(se);else if(R.length)R.pop();else return{pos:P(ce,ee),ch:se}}}}}return ce-A==(A>0?w.lastLine():w.firstLine())?!1:null}function W(w,B,A){for(var K=w.state.matchBrackets.maxHighlightLineLength||1e3,ae=A&&A.highlightNonMatching,F=[],N=w.listSelections(),R=0;R`,triples:"",explode:"[]{}"},P=C.Pos;C.defineOption("autoCloseBrackets",!1,function(F,N,R){R&&R!=C.Init&&(F.removeKeyMap(Se),F.state.closeBrackets=null),N&&(le(fe(N,"pairs")),F.state.closeBrackets=N,F.addKeyMap(Se))});function fe(F,N){return N=="pairs"&&typeof F=="string"?F:typeof F=="object"&&F[N]!=null?F[N]:De[N]}var Se={Backspace:j,Enter:oe};function le(F){for(var N=0;N=0;Y--){var $=_[Y].head;F.replaceRange("",P($.line,$.ch-1),P($.line,$.ch+1),"+delete")}}function oe(F){var N=W(F),R=N&&fe(N,"explode");if(!R||F.getOption("disableInput"))return C.Pass;for(var _=F.listSelections(),Y=0;Y<_.length;Y++){if(!_[Y].empty())return C.Pass;var ce=K(F,_[Y].head);if(!ce||R.indexOf(ce)%2!=0)return C.Pass}F.operation(function(){var $=F.lineSeparator()||` +`;F.replaceSelection($+$,null),w(F,-1),_=F.listSelections();for(var ee=0;ee<_.length;ee++){var Ae=_[ee].head.line;F.indentLine(Ae,null,!0),F.indentLine(Ae+1,null,!0)}})}function w(F,N){for(var R=[],_=F.listSelections(),Y=0,ce=0;ce<_.length;ce++){var $=_[ce];$.head==F.getCursor()&&(Y=ce);var ee=$.head.ch||N>0?{line:$.head.line,ch:$.head.ch+N}:{line:$.head.line-1};R.push({anchor:ee,head:ee})}F.setSelections(R,Y)}function B(F){var N=C.cmpPos(F.anchor,F.head)>0;return{anchor:new P(F.anchor.line,F.anchor.ch+(N?-1:1)),head:new P(F.head.line,F.head.ch+(N?1:-1))}}function A(F,N){var R=W(F);if(!R||F.getOption("disableInput"))return C.Pass;var _=fe(R,"pairs"),Y=_.indexOf(N);if(Y==-1)return C.Pass;for(var ce=fe(R,"closeBefore"),$=fe(R,"triples"),ee=_.charAt(Y+1)==N,Ae=F.listSelections(),se=Y%2==0,q,Fe=0;Fe=0&&F.getRange(G,P(G.line,G.ch+3))==N+N+N?d="skipThree":d="skip";else if(ee&&G.ch>1&&$.indexOf(N)>=0&&F.getRange(P(G.line,G.ch-2),G)==N+N){if(G.ch>2&&/\bstring/.test(F.getTokenTypeAt(P(G.line,G.ch-2))))return C.Pass;d="addFour"}else if(ee){var L=G.ch==0?" ":F.getRange(P(G.line,G.ch-1),G);if(!C.isWordChar(S)&&L!=N&&!C.isWordChar(L))d="both";else return C.Pass}else if(se&&(S.length===0||/\s/.test(S)||ce.indexOf(S)>-1))d="both";else return C.Pass;if(!q)q=d;else if(q!=d)return C.Pass}var m=Y%2?_.charAt(Y-1):N,x=Y%2?N:_.charAt(Y+1);F.operation(function(){if(q=="skip")w(F,1);else if(q=="skipThree")w(F,3);else if(q=="surround"){for(var z=F.getSelections(),ne=0;nei.map(i=>d[i]); +var R1=Object.defineProperty;var j1=(n,e,i)=>e in n?R1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var Te=(n,e,i)=>j1(n,typeof e!="symbol"?e+"":e,i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function L1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Yf={exports:{}},Ma={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var yy;function D1(){if(yy)return Ma;yy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(s,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:n,type:s,key:u,ref:l!==void 0?l:null,props:o}}return Ma.Fragment=e,Ma.jsx=i,Ma.jsxs=i,Ma}var by;function B1(){return by||(by=1,Yf.exports=D1()),Yf.exports}var b=B1(),Xf={exports:{}},de={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vy;function U1(){if(vy)return de;vy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function v(N){return N===null||typeof N!="object"?null:(N=y&&N[y]||N["@@iterator"],typeof N=="function"?N:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,x={};function T(N,P,W){this.props=N,this.context=P,this.refs=x,this.updater=W||S}T.prototype.isReactComponent={},T.prototype.setState=function(N,P){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,P,"setState")},T.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function C(){}C.prototype=T.prototype;function k(N,P,W){this.props=N,this.context=P,this.refs=x,this.updater=W||S}var $=k.prototype=new C;$.constructor=k,E($,T.prototype),$.isPureReactComponent=!0;var V=Array.isArray,R={H:null,A:null,T:null,S:null,V:null},G=Object.prototype.hasOwnProperty;function Z(N,P,W,J,ae,be){return W=be.ref,{$$typeof:n,type:N,key:P,ref:W!==void 0?W:null,props:be}}function q(N,P){return Z(N.type,P,void 0,void 0,void 0,N.props)}function j(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function ie(N){var P={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(W){return P[W]})}var le=/\/+/g;function I(N,P){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):P.toString(36)}function F(){}function ee(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(N.status="pending",N.then(function(P){N.status==="pending"&&(N.status="fulfilled",N.value=P)},function(P){N.status==="pending"&&(N.status="rejected",N.reason=P)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function ve(N,P,W,J,ae){var be=typeof N;(be==="undefined"||be==="boolean")&&(N=null);var te=!1;if(N===null)te=!0;else switch(be){case"bigint":case"string":case"number":te=!0;break;case"object":switch(N.$$typeof){case n:case e:te=!0;break;case m:return te=N._init,ve(te(N._payload),P,W,J,ae)}}if(te)return ae=ae(N),te=J===""?"."+I(N,0):J,V(ae)?(W="",te!=null&&(W=te.replace(le,"$&/")+"/"),ve(ae,P,W,"",function(Gt){return Gt})):ae!=null&&(j(ae)&&(ae=q(ae,W+(ae.key==null||N&&N.key===ae.key?"":(""+ae.key).replace(le,"$&/")+"/")+te)),P.push(ae)),1;te=0;var yt=J===""?".":J+":";if(V(N))for(var Ne=0;Ne{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),l}function cs(){const n=gt.useRef(null),[e]=mh(n);return[e,n]}function mh(n){const[e,i]=gt.useState(new DOMRect(0,0,10,10)),s=gt.useCallback(()=>{const l=n==null?void 0:n.current;l&&i(l.getBoundingClientRect())},[n]);return gt.useLayoutEffect(()=>{const l=n==null?void 0:n.current;if(!l)return;s();const o=new ResizeObserver(s);return o.observe(l),window.addEventListener("resize",s),()=>{o.disconnect(),window.removeEventListener("resize",s)}},[s,n]),[e,s]}function _t(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0)+"ms";const e=n/1e3;if(e<60)return e.toFixed(1)+"s";const i=e/60;if(i<60)return i.toFixed(1)+"m";const s=i/60;return s<24?s.toFixed(1)+"h":(s/24).toFixed(1)+"d"}function z1(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0);const e=n/1024;if(e<1e3)return e.toFixed(1)+"K";const i=e/1024;return i<1e3?i.toFixed(1)+"M":(i/1024).toFixed(1)+"G"}function Ab(n,e,i,s,l){let o=0,u=n.length;for(;o>1;i(e,n[f])>=0?o=f+1:u=f}return u}function wy(n){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=n,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function rn(n,e){n&&(e=es.getObject(n,e));const[i,s]=gt.useState(e),l=gt.useCallback(o=>{n?es.setObject(n,o):s(o)},[n,s]);return gt.useEffect(()=>{if(n){const o=()=>s(es.getObject(n,e));return es.onChangeEmitter.addEventListener(n,o),()=>es.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,l]}const yh=new Map,Nb=new Map;let Fo;function xi(n,e){const[i,s]=gt.useState();Nb.set(n,{setter:s,defaultValue:e});const l=gt.useCallback(o=>{const u=yh.get(Fo||"default")||{};u[n]=o,yh.set(Fo||"default",u),s(o)},[n]);return[i,l]}function H1(n){if(Fo===n)return;Fo=n;const e=yh.get(n)||{};for(const[i,s]of Nb.entries())s.setter(e[i]||s.defaultValue)}class q1{constructor(){this.onChangeEmitter=new EventTarget}getString(e,i){return localStorage[e]||i}setString(e,i){var s;localStorage[e]=i,this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}getObject(e,i){if(!localStorage[e])return i;try{return JSON.parse(localStorage[e])}catch{return i}}setObject(e,i){var s;localStorage[e]=JSON.stringify(i),this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}}const es=new q1;function Ye(...n){return n.filter(Boolean).join(" ")}function Cb(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const xy="\\u0000-\\u0020\\u007f-\\u009f",kb=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+xy+'"]{2,}[^\\s'+xy+`"')}\\],:;.!?]`,"ug");function $1(){const[n,e]=gt.useState(!1),i=gt.useCallback(()=>{const s=[];return e(l=>(s.push(setTimeout(()=>e(!1),1e3)),l?(s.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>s.forEach(clearTimeout)},[e]);return[n,i]}function t2(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",s=>{s.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",s=>{document.body.classList.add("inactive")},!1);const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";es.getString("theme",e)==="dark-mode"?document.documentElement.classList.add("dark-mode"):document.documentElement.classList.add("light-mode")}const Uh=new Set;function I1(){const n=bh(),e=n==="dark-mode"?"light-mode":"dark-mode";document.documentElement.classList.remove(n),document.documentElement.classList.add(e),es.setString("theme",e);for(const i of Uh)i(e)}function n2(n){Uh.add(n)}function i2(n){Uh.delete(n)}function bh(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":"light-mode"}function V1(){const[n,e]=gt.useState(bh()==="dark-mode");return[n,i=>{bh()==="dark-mode"!==i&&I1(),e(i)}]}var Pf={exports:{}},Oa={},Ff={exports:{}},Qf={};/** + * @license React + * scheduler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _y;function G1(){return _y||(_y=1,(function(n){function e(z,Q){var se=z.length;z.push(Q);e:for(;0>>1,N=z[we];if(0>>1;wel(J,se))ael(be,J)?(z[we]=be,z[ae]=se,we=ae):(z[we]=J,z[W]=se,we=W);else if(ael(be,se))z[we]=be,z[ae]=se,we=ae;else break e}}return Q}function l(z,Q){var se=z.sortIndex-Q.sortIndex;return se!==0?se:z.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var d=[],p=[],m=1,y=null,v=3,S=!1,E=!1,x=!1,T=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function V(z){for(var Q=i(p);Q!==null;){if(Q.callback===null)s(p);else if(Q.startTime<=z)s(p),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=i(p)}}function R(z){if(x=!1,V(z),!E)if(i(d)!==null)E=!0,G||(G=!0,I());else{var Q=i(p);Q!==null&&ve(R,Q.startTime-z)}}var G=!1,Z=-1,q=5,j=-1;function ie(){return T?!0:!(n.unstable_now()-jz&&ie());){var we=y.callback;if(typeof we=="function"){y.callback=null,v=y.priorityLevel;var N=we(y.expirationTime<=z);if(z=n.unstable_now(),typeof N=="function"){y.callback=N,V(z),Q=!0;break t}y===i(d)&&s(d),V(z)}else s(d);y=i(d)}if(y!==null)Q=!0;else{var P=i(p);P!==null&&ve(R,P.startTime-z),Q=!1}}break e}finally{y=null,v=se,S=!1}Q=void 0}}finally{Q?I():G=!1}}}var I;if(typeof $=="function")I=function(){$(le)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,ee=F.port2;F.port1.onmessage=le,I=function(){ee.postMessage(null)}}else I=function(){C(le,0)};function ve(z,Q){Z=C(function(){z(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125we?(z.sortIndex=se,e(p,z),i(d)===null&&z===i(p)&&(x?(k(Z),Z=-1):x=!0,ve(R,se-we))):(z.sortIndex=N,e(d,z),E||S||(E=!0,G||(G=!0,I()))),z},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(z){var Q=v;return function(){var se=v;v=Q;try{return z.apply(this,arguments)}finally{v=se}}}})(Qf)),Qf}var Ty;function K1(){return Ty||(Ty=1,Ff.exports=G1()),Ff.exports}var Zf={exports:{}},dt={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ey;function Y1(){if(Ey)return dt;Ey=1;var n=Bh();function e(d){var p="https://react.dev/errors/"+d;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Zf.exports=Y1(),Zf.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ny;function P1(){if(Ny)return Oa;Ny=1;var n=K1(),e=Bh(),i=X1();function s(t){var r="https://react.dev/errors/"+t;if(1N||(t.current=we[N],we[N]=null,N--)}function J(t,r){N++,we[N]=t.current,t.current=r}var ae=P(null),be=P(null),te=P(null),yt=P(null);function Ne(t,r){switch(J(te,r),J(be,t),J(ae,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Km(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Km(r),t=Ym(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}W(ae),J(ae,t)}function Gt(){W(ae),W(be),W(te)}function jr(t){t.memoizedState!==null&&J(yt,t);var r=ae.current,a=Ym(r,t.type);r!==a&&(J(be,t),J(ae,a))}function En(t){be.current===t&&(W(ae),W(be)),yt.current===t&&(W(yt),Ea._currentValue=se)}var cn=Object.prototype.hasOwnProperty,ds=n.unstable_scheduleCallback,bt=n.unstable_cancelCallback,fl=n.unstable_shouldYield,Mc=n.unstable_requestPaint,Kt=n.unstable_now,Lr=n.unstable_getCurrentPriorityLevel,ps=n.unstable_ImmediatePriority,Mi=n.unstable_UserBlockingPriority,gs=n.unstable_NormalPriority,Qn=n.unstable_LowPriority,hl=n.unstable_IdlePriority,Oc=n.log,Rc=n.unstable_setDisableYieldValue,Oi=null,ut=null;function Yt(t){if(typeof Oc=="function"&&Rc(t),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(Oi,t)}catch{}}var vt=Math.clz32?Math.clz32:Ri,jc=Math.log,Lc=Math.LN2;function Ri(t){return t>>>=0,t===0?32:31-(jc(t)/Lc|0)|0}var Zn=256,An=4194304;function Nn(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ms(t,r,a){var c=t.pendingLanes;if(c===0)return 0;var h=0,g=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var _=c&134217727;return _!==0?(c=_&~g,c!==0?h=Nn(c):(w&=_,w!==0?h=Nn(w):a||(a=_&~t,a!==0&&(h=Nn(a))))):(_=c&~g,_!==0?h=Nn(_):w!==0?h=Nn(w):a||(a=c&~t,a!==0&&(h=Nn(a)))),h===0?0:r!==0&&r!==h&&(r&g)===0&&(g=h&-h,a=r&-r,g>=a||g===32&&(a&4194048)!==0)?r:h}function ji(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function dl(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ce(){var t=Zn;return Zn<<=1,(Zn&4194048)===0&&(Zn=256),t}function Jn(){var t=An;return An<<=1,(An&62914560)===0&&(An=4194304),t}function un(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function Dr(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function SS(t,r,a,c,h,g){var w=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var _=t.entanglements,A=t.expirationTimes,D=t.hiddenUpdates;for(a=w&~a;0)":-1h||A[c]!==D[h]){var K=` +`+A[c].replace(" at new "," at ");return t.displayName&&K.includes("")&&(K=K.replace("",t.displayName)),K}while(1<=c&&0<=h);break}}}finally{qc=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?xs(a):""}function AS(t){switch(t.tag){case 26:case 27:case 5:return xs(t.type);case 16:return xs("Lazy");case 13:return xs("Suspense");case 19:return xs("SuspenseList");case 0:case 15:return $c(t.type,!1);case 11:return $c(t.type.render,!1);case 1:return $c(t.type,!0);case 31:return xs("Activity");default:return""}}function Hd(t){try{var r="";do r+=AS(t),t=t.return;while(t);return r}catch(a){return` +Error generating stack: `+a.message+` +`+a.stack}}function Xt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function qd(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function NS(t){var r=qd(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,g=a.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(w){c=""+w,g.call(this,w)}}),Object.defineProperty(t,r,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function ml(t){t._valueTracker||(t._valueTracker=NS(t))}function $d(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return t&&(c=qd(t)?t.checked?"true":"false":t.value),t=c,t!==a?(r.setValue(t),!0):!1}function yl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var CS=/[\n"\\]/g;function Pt(t){return t.replace(CS,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ic(t,r,a,c,h,g,w,_){t.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.type=w:t.removeAttribute("type"),r!=null?w==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+Xt(r)):t.value!==""+Xt(r)&&(t.value=""+Xt(r)):w!=="submit"&&w!=="reset"||t.removeAttribute("value"),r!=null?Vc(t,w,Xt(r)):a!=null?Vc(t,w,Xt(a)):c!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Xt(_):t.removeAttribute("name")}function Id(t,r,a,c,h,g,w,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),r!=null||a!=null){if(!(g!=="submit"&&g!=="reset"||r!=null))return;a=a!=null?""+Xt(a):"",r=r!=null?""+Xt(r):a,_||r===t.value||(t.value=r),t.defaultValue=r}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=_?t.checked:!!c,t.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(t.name=w)}function Vc(t,r,a){r==="number"&&yl(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function _s(t,r,a,c){if(t=t.options,r){r={};for(var h=0;h"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pc=!1;if(kn)try{var Hr={};Object.defineProperty(Hr,"passive",{get:function(){Pc=!0}}),window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{Pc=!1}var ei=null,Fc=null,vl=null;function Fd(){if(vl)return vl;var t,r=Fc,a=r.length,c,h="value"in ei?ei.value:ei.textContent,g=h.length;for(t=0;t=Ir),tp=" ",np=!1;function ip(t,r){switch(t){case"keyup":return nw.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ns=!1;function sw(t,r){switch(t){case"compositionend":return sp(r);case"keypress":return r.which!==32?null:(np=!0,tp);case"textInput":return t=r.data,t===tp&&np?null:t;default:return null}}function rw(t,r){if(Ns)return t==="compositionend"||!eu&&ip(t,r)?(t=Fd(),vl=Fc=ei=null,Ns=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:a,offset:r-t};t=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=hp(a)}}function pp(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?pp(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function gp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=yl(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=yl(t.document)}return r}function iu(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var dw=kn&&"documentMode"in document&&11>=document.documentMode,Cs=null,su=null,Yr=null,ru=!1;function mp(t,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ru||Cs==null||Cs!==yl(c)||(c=Cs,"selectionStart"in c&&iu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Yr&&Kr(Yr,c)||(Yr=c,c=co(su,"onSelect"),0>=w,h-=w,On=1<<32-vt(r)+h|a<g?g:8;var w=z.T,_={};z.T=_,Gu(t,!1,r,a);try{var A=h(),D=z.S;if(D!==null&&D(_,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var K=xw(A,c);la(t,r,K,$t(t))}else la(t,r,c,$t(t))}catch(X){la(t,r,{then:function(){},status:"rejected",reason:X},$t())}finally{Q.p=g,z.T=w}}function Nw(){}function Iu(t,r,a,c){if(t.tag!==5)throw Error(s(476));var h=yg(t).queue;mg(t,h,r,se,a===null?Nw:function(){return bg(t),a(c)})}function yg(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:se},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function bg(t){var r=yg(t).next.queue;la(t,r,{},$t())}function Vu(){return ht(Ea)}function vg(){return Fe().memoizedState}function Sg(){return Fe().memoizedState}function Cw(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=$t();t=ii(a);var c=si(r,t,a);c!==null&&(It(c,r,a),ta(c,r,a)),r={cache:vu()},t.payload=r;return}r=r.return}}function kw(t,r,a){var c=$t();a={lane:c,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Vl(t)?xg(r,a):(a=cu(t,r,a,c),a!==null&&(It(a,t,c),_g(a,r,c)))}function wg(t,r,a){var c=$t();la(t,r,a,c)}function la(t,r,a,c){var h={lane:c,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Vl(t))xg(r,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var w=r.lastRenderedState,_=g(w,a);if(h.hasEagerState=!0,h.eagerState=_,Bt(_,w))return Al(t,r,h,0),je===null&&El(),!1}catch{}finally{}if(a=cu(t,r,h,c),a!==null)return It(a,t,c),_g(a,r,c),!0}return!1}function Gu(t,r,a,c){if(c={lane:2,revertLane:_f(),action:c,hasEagerState:!1,eagerState:null,next:null},Vl(t)){if(r)throw Error(s(479))}else r=cu(t,a,c,2),r!==null&&It(r,t,2)}function Vl(t){var r=t.alternate;return t===pe||r!==null&&r===pe}function xg(t,r){zs=Ul=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function _g(t,r,a){if((a&4194048)!==0){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,Od(t,a)}}var Gl={readContext:ht,use:Hl,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve},Tg={readContext:ht,use:Hl,useCallback:function(t,r){return Nt().memoizedState=[t,r===void 0?null:r],t},useContext:ht,useEffect:lg,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,Il(4194308,4,fg.bind(null,r,t),a)},useLayoutEffect:function(t,r){return Il(4194308,4,t,r)},useInsertionEffect:function(t,r){Il(4,2,t,r)},useMemo:function(t,r){var a=Nt();r=r===void 0?null:r;var c=t();if(Yi){Yt(!0);try{t()}finally{Yt(!1)}}return a.memoizedState=[c,r],c},useReducer:function(t,r,a){var c=Nt();if(a!==void 0){var h=a(r);if(Yi){Yt(!0);try{a(r)}finally{Yt(!1)}}}else h=r;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=kw.bind(null,pe,t),[c.memoizedState,t]},useRef:function(t){var r=Nt();return t={current:t},r.memoizedState=t},useState:function(t){t=zu(t);var r=t.queue,a=wg.bind(null,pe,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:qu,useDeferredValue:function(t,r){var a=Nt();return $u(a,t,r)},useTransition:function(){var t=zu(!1);return t=mg.bind(null,pe,t.queue,!0,!1),Nt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var c=pe,h=Nt();if(_e){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),je===null)throw Error(s(349));(Se&124)!==0||Kp(c,r,a)}h.memoizedState=a;var g={value:a,getSnapshot:r};return h.queue=g,lg(Xp.bind(null,c,g,t),[t]),c.flags|=2048,qs(9,$l(),Yp.bind(null,c,g,a,r),null),a},useId:function(){var t=Nt(),r=je.identifierPrefix;if(_e){var a=Rn,c=On;a=(c&~(1<<32-vt(c)-1)).toString(32)+a,r="«"+r+"R"+a,a=zl++,0ue?(it=re,re=null):it=re.sibling;var xe=B(O,re,L[ue],Y);if(xe===null){re===null&&(re=it);break}t&&re&&xe.alternate===null&&r(O,re),M=g(xe,M,ue),ge===null?ne=xe:ge.sibling=xe,ge=xe,re=it}if(ue===L.length)return a(O,re),_e&&qi(O,ue),ne;if(re===null){for(;ueue?(it=re,re=null):it=re.sibling;var wi=B(O,re,xe.value,Y);if(wi===null){re===null&&(re=it);break}t&&re&&wi.alternate===null&&r(O,re),M=g(wi,M,ue),ge===null?ne=wi:ge.sibling=wi,ge=wi,re=it}if(xe.done)return a(O,re),_e&&qi(O,ue),ne;if(re===null){for(;!xe.done;ue++,xe=L.next())xe=X(O,xe.value,Y),xe!==null&&(M=g(xe,M,ue),ge===null?ne=xe:ge.sibling=xe,ge=xe);return _e&&qi(O,ue),ne}for(re=c(re);!xe.done;ue++,xe=L.next())xe=U(re,O,ue,xe.value,Y),xe!==null&&(t&&xe.alternate!==null&&re.delete(xe.key===null?ue:xe.key),M=g(xe,M,ue),ge===null?ne=xe:ge.sibling=xe,ge=xe);return t&&re.forEach(function(O1){return r(O,O1)}),_e&&qi(O,ue),ne}function Me(O,M,L,Y){if(typeof L=="object"&&L!==null&&L.type===E&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case v:e:{for(var ne=L.key;M!==null;){if(M.key===ne){if(ne=L.type,ne===E){if(M.tag===7){a(O,M.sibling),Y=h(M,L.props.children),Y.return=O,O=Y;break e}}else if(M.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===q&&Ag(ne)===M.type){a(O,M.sibling),Y=h(M,L.props),ca(Y,L),Y.return=O,O=Y;break e}a(O,M);break}else r(O,M);M=M.sibling}L.type===E?(Y=zi(L.props.children,O.mode,Y,L.key),Y.return=O,O=Y):(Y=Cl(L.type,L.key,L.props,null,O.mode,Y),ca(Y,L),Y.return=O,O=Y)}return w(O);case S:e:{for(ne=L.key;M!==null;){if(M.key===ne)if(M.tag===4&&M.stateNode.containerInfo===L.containerInfo&&M.stateNode.implementation===L.implementation){a(O,M.sibling),Y=h(M,L.children||[]),Y.return=O,O=Y;break e}else{a(O,M);break}else r(O,M);M=M.sibling}Y=hu(L,O.mode,Y),Y.return=O,O=Y}return w(O);case q:return ne=L._init,L=ne(L._payload),Me(O,M,L,Y)}if(ve(L))return fe(O,M,L,Y);if(I(L)){if(ne=I(L),typeof ne!="function")throw Error(s(150));return L=ne.call(L),oe(O,M,L,Y)}if(typeof L.then=="function")return Me(O,M,Kl(L),Y);if(L.$$typeof===$)return Me(O,M,Rl(O,L),Y);Yl(O,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,M!==null&&M.tag===6?(a(O,M.sibling),Y=h(M,L),Y.return=O,O=Y):(a(O,M),Y=fu(L,O.mode,Y),Y.return=O,O=Y),w(O)):a(O,M)}return function(O,M,L,Y){try{oa=0;var ne=Me(O,M,L,Y);return $s=null,ne}catch(re){if(re===Wr||re===Ll)throw re;var ge=Ut(29,re,null,O.mode);return ge.lanes=Y,ge.return=O,ge}finally{}}}var Is=Ng(!0),Cg=Ng(!1),Wt=P(null),bn=null;function ai(t){var r=t.alternate;J(Je,Je.current&1),J(Wt,t),bn===null&&(r===null||Us.current!==null||r.memoizedState!==null)&&(bn=t)}function kg(t){if(t.tag===22){if(J(Je,Je.current),J(Wt,t),bn===null){var r=t.alternate;r!==null&&r.memoizedState!==null&&(bn=t)}}else li()}function li(){J(Je,Je.current),J(Wt,Wt.current)}function Bn(t){W(Wt),bn===t&&(bn=null),W(Je)}var Je=P(0);function Xl(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Df(a)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(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 null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Ku(t,r,a,c){r=t.memoizedState,a=a(c,r),a=a==null?r:m({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Yu={enqueueSetState:function(t,r,a){t=t._reactInternals;var c=$t(),h=ii(c);h.payload=r,a!=null&&(h.callback=a),r=si(t,h,c),r!==null&&(It(r,t,c),ta(r,t,c))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var c=$t(),h=ii(c);h.tag=1,h.payload=r,a!=null&&(h.callback=a),r=si(t,h,c),r!==null&&(It(r,t,c),ta(r,t,c))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=$t(),c=ii(a);c.tag=2,r!=null&&(c.callback=r),r=si(t,c,a),r!==null&&(It(r,t,a),ta(r,t,a))}};function Mg(t,r,a,c,h,g,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,w):r.prototype&&r.prototype.isPureReactComponent?!Kr(a,c)||!Kr(h,g):!0}function Og(t,r,a,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==t&&Yu.enqueueReplaceState(r,r.state,null)}function Xi(t,r){var a=r;if("ref"in r){a={};for(var c in r)c!=="ref"&&(a[c]=r[c])}if(t=t.defaultProps){a===r&&(a=m({},a));for(var h in t)a[h]===void 0&&(a[h]=t[h])}return a}var Pl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Rg(t){Pl(t)}function jg(t){console.error(t)}function Lg(t){Pl(t)}function Fl(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function Dg(t,r,a){try{var c=t.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Xu(t,r,a){return a=ii(a),a.tag=3,a.payload={element:null},a.callback=function(){Fl(t,r)},a}function Bg(t){return t=ii(t),t.tag=3,t}function Ug(t,r,a,c){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var g=c.value;t.payload=function(){return h(g)},t.callback=function(){Dg(r,a,c)}}var w=a.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(t.callback=function(){Dg(r,a,c),typeof h!="function"&&(di===null?di=new Set([this]):di.add(this));var _=c.stack;this.componentDidCatch(c.value,{componentStack:_!==null?_:""})})}function Ow(t,r,a,c,h){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=a.alternate,r!==null&&Qr(r,a,h,!0),a=Wt.current,a!==null){switch(a.tag){case 13:return bn===null?bf():a.alternate===null&&Ie===0&&(Ie=3),a.flags&=-257,a.flags|=65536,a.lanes=h,c===xu?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([c]):r.add(c),Sf(t,c,h)),!1;case 22:return a.flags|=65536,c===xu?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([c]):a.add(c)),Sf(t,c,h)),!1}throw Error(s(435,a.tag))}return Sf(t,c,h),bf(),!1}if(_e)return r=Wt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,c!==gu&&(t=Error(s(422),{cause:c}),Fr(Ft(t,a)))):(c!==gu&&(r=Error(s(423),{cause:c}),Fr(Ft(r,a))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=Ft(c,a),h=Xu(t.stateNode,c,h),Eu(t,h),Ie!==4&&(Ie=2)),!1;var g=Error(s(520),{cause:c});if(g=Ft(g,a),ma===null?ma=[g]:ma.push(g),Ie!==4&&(Ie=2),r===null)return!0;c=Ft(c,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=h&-h,a.lanes|=t,t=Xu(a.stateNode,c,t),Eu(a,t),!1;case 1:if(r=a.type,g=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(di===null||!di.has(g))))return a.flags|=65536,h&=-h,a.lanes|=h,h=Bg(h),Ug(h,t,a,c),Eu(a,h),!1}a=a.return}while(a!==null);return!1}var zg=Error(s(461)),tt=!1;function st(t,r,a,c){r.child=t===null?Cg(r,null,a,c):Is(r,t.child,a,c)}function Hg(t,r,a,c,h){a=a.render;var g=r.ref;if("ref"in c){var w={};for(var _ in c)_!=="ref"&&(w[_]=c[_])}else w=c;return Gi(r),c=Mu(t,r,a,w,g,h),_=Ou(),t!==null&&!tt?(Ru(t,r,h),Un(t,r,h)):(_e&&_&&du(r),r.flags|=1,st(t,r,c,h),r.child)}function qg(t,r,a,c,h){if(t===null){var g=a.type;return typeof g=="function"&&!uu(g)&&g.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=g,$g(t,r,g,c,h)):(t=Cl(a.type,null,c,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,!tf(t,h)){var w=g.memoizedProps;if(a=a.compare,a=a!==null?a:Kr,a(w,c)&&t.ref===r.ref)return Un(t,r,h)}return r.flags|=1,t=Mn(g,c),t.ref=r.ref,t.return=r,r.child=t}function $g(t,r,a,c,h){if(t!==null){var g=t.memoizedProps;if(Kr(g,c)&&t.ref===r.ref)if(tt=!1,r.pendingProps=c=g,tf(t,h))(t.flags&131072)!==0&&(tt=!0);else return r.lanes=t.lanes,Un(t,r,h)}return Pu(t,r,a,c,h)}function Ig(t,r,a){var c=r.pendingProps,h=c.children,g=t!==null?t.memoizedState:null;if(c.mode==="hidden"){if((r.flags&128)!==0){if(c=g!==null?g.baseLanes|a:a,t!==null){for(h=r.child=t.child,g=0;h!==null;)g=g|h.lanes|h.childLanes,h=h.sibling;r.childLanes=g&~c}else r.childLanes=0,r.child=null;return Vg(t,r,c,a)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&jl(r,g!==null?g.cachePool:null),g!==null?$p(r,g):Nu(),kg(r);else return r.lanes=r.childLanes=536870912,Vg(t,r,g!==null?g.baseLanes|a:a,a)}else g!==null?(jl(r,g.cachePool),$p(r,g),li(),r.memoizedState=null):(t!==null&&jl(r,null),Nu(),li());return st(t,r,h,a),r.child}function Vg(t,r,a,c){var h=wu();return h=h===null?null:{parent:Ze._currentValue,pool:h},r.memoizedState={baseLanes:a,cachePool:h},t!==null&&jl(r,null),Nu(),kg(r),t!==null&&Qr(t,r,c,!0),null}function Ql(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function Pu(t,r,a,c,h){return Gi(r),a=Mu(t,r,a,c,void 0,h),c=Ou(),t!==null&&!tt?(Ru(t,r,h),Un(t,r,h)):(_e&&c&&du(r),r.flags|=1,st(t,r,a,h),r.child)}function Gg(t,r,a,c,h,g){return Gi(r),r.updateQueue=null,a=Vp(r,c,a,h),Ip(t),c=Ou(),t!==null&&!tt?(Ru(t,r,g),Un(t,r,g)):(_e&&c&&du(r),r.flags|=1,st(t,r,a,g),r.child)}function Kg(t,r,a,c,h){if(Gi(r),r.stateNode===null){var g=Rs,w=a.contextType;typeof w=="object"&&w!==null&&(g=ht(w)),g=new a(c,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Yu,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=c,g.state=r.memoizedState,g.refs={},_u(r),w=a.contextType,g.context=typeof w=="object"&&w!==null?ht(w):Rs,g.state=r.memoizedState,w=a.getDerivedStateFromProps,typeof w=="function"&&(Ku(r,a,w,c),g.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(w=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),w!==g.state&&Yu.enqueueReplaceState(g,g.state,null),ia(r,c,g,h),na(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(t===null){g=r.stateNode;var _=r.memoizedProps,A=Xi(a,_);g.props=A;var D=g.context,K=a.contextType;w=Rs,typeof K=="object"&&K!==null&&(w=ht(K));var X=a.getDerivedStateFromProps;K=typeof X=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=r.pendingProps!==_,K||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||D!==w)&&Og(r,g,c,w),ni=!1;var B=r.memoizedState;g.state=B,ia(r,c,g,h),na(),D=r.memoizedState,_||B!==D||ni?(typeof X=="function"&&(Ku(r,a,X,c),D=r.memoizedState),(A=ni||Mg(r,a,A,c,B,D,w))?(K||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=D),g.props=c,g.state=D,g.context=w,c=A):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{g=r.stateNode,Tu(t,r),w=r.memoizedProps,K=Xi(a,w),g.props=K,X=r.pendingProps,B=g.context,D=a.contextType,A=Rs,typeof D=="object"&&D!==null&&(A=ht(D)),_=a.getDerivedStateFromProps,(D=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w!==X||B!==A)&&Og(r,g,c,A),ni=!1,B=r.memoizedState,g.state=B,ia(r,c,g,h),na();var U=r.memoizedState;w!==X||B!==U||ni||t!==null&&t.dependencies!==null&&Ol(t.dependencies)?(typeof _=="function"&&(Ku(r,a,_,c),U=r.memoizedState),(K=ni||Mg(r,a,K,c,B,U,A)||t!==null&&t.dependencies!==null&&Ol(t.dependencies))?(D||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,U,A),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,U,A)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=U),g.props=c,g.state=U,g.context=A,c=K):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=1024),c=!1)}return g=c,Ql(t,r),c=(r.flags&128)!==0,g||c?(g=r.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,t!==null&&c?(r.child=Is(r,t.child,null,h),r.child=Is(r,null,a,h)):st(t,r,a,h),r.memoizedState=g.state,t=r.child):t=Un(t,r,h),t}function Yg(t,r,a,c){return Pr(),r.flags|=256,st(t,r,a,c),r.child}var Fu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qu(t){return{baseLanes:t,cachePool:jp()}}function Zu(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=en),t}function Xg(t,r,a){var c=r.pendingProps,h=!1,g=(r.flags&128)!==0,w;if((w=g)||(w=t!==null&&t.memoizedState===null?!1:(Je.current&2)!==0),w&&(h=!0,r.flags&=-129),w=(r.flags&32)!==0,r.flags&=-33,t===null){if(_e){if(h?ai(r):li(),_e){var _=$e,A;if(A=_){e:{for(A=_,_=yn;A.nodeType!==8;){if(!_){_=null;break e}if(A=dn(A.nextSibling),A===null){_=null;break e}}_=A}_!==null?(r.memoizedState={dehydrated:_,treeContext:Hi!==null?{id:On,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},A=Ut(18,null,null,0),A.stateNode=_,A.return=r,r.child=A,St=r,$e=null,A=!0):A=!1}A||Ii(r)}if(_=r.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Df(_)?r.lanes=32:r.lanes=536870912,null;Bn(r)}return _=c.children,c=c.fallback,h?(li(),h=r.mode,_=Zl({mode:"hidden",children:_},h),c=zi(c,h,a,null),_.return=r,c.return=r,_.sibling=c,r.child=_,h=r.child,h.memoizedState=Qu(a),h.childLanes=Zu(t,w,a),r.memoizedState=Fu,c):(ai(r),Ju(r,_))}if(A=t.memoizedState,A!==null&&(_=A.dehydrated,_!==null)){if(g)r.flags&256?(ai(r),r.flags&=-257,r=Wu(t,r,a)):r.memoizedState!==null?(li(),r.child=t.child,r.flags|=128,r=null):(li(),h=c.fallback,_=r.mode,c=Zl({mode:"visible",children:c.children},_),h=zi(h,_,a,null),h.flags|=2,c.return=r,h.return=r,c.sibling=h,r.child=c,Is(r,t.child,null,a),c=r.child,c.memoizedState=Qu(a),c.childLanes=Zu(t,w,a),r.memoizedState=Fu,r=h);else if(ai(r),Df(_)){if(w=_.nextSibling&&_.nextSibling.dataset,w)var D=w.dgst;w=D,c=Error(s(419)),c.stack="",c.digest=w,Fr({value:c,source:null,stack:null}),r=Wu(t,r,a)}else if(tt||Qr(t,r,a,!1),w=(a&t.childLanes)!==0,tt||w){if(w=je,w!==null&&(c=a&-a,c=(c&42)!==0?1:Dc(c),c=(c&(w.suspendedLanes|a))!==0?0:c,c!==0&&c!==A.retryLane))throw A.retryLane=c,Os(t,c),It(w,t,c),zg;_.data==="$?"||bf(),r=Wu(t,r,a)}else _.data==="$?"?(r.flags|=192,r.child=t.child,r=null):(t=A.treeContext,$e=dn(_.nextSibling),St=r,_e=!0,$i=null,yn=!1,t!==null&&(Zt[Jt++]=On,Zt[Jt++]=Rn,Zt[Jt++]=Hi,On=t.id,Rn=t.overflow,Hi=r),r=Ju(r,c.children),r.flags|=4096);return r}return h?(li(),h=c.fallback,_=r.mode,A=t.child,D=A.sibling,c=Mn(A,{mode:"hidden",children:c.children}),c.subtreeFlags=A.subtreeFlags&65011712,D!==null?h=Mn(D,h):(h=zi(h,_,a,null),h.flags|=2),h.return=r,c.return=r,c.sibling=h,r.child=c,c=h,h=r.child,_=t.child.memoizedState,_===null?_=Qu(a):(A=_.cachePool,A!==null?(D=Ze._currentValue,A=A.parent!==D?{parent:D,pool:D}:A):A=jp(),_={baseLanes:_.baseLanes|a,cachePool:A}),h.memoizedState=_,h.childLanes=Zu(t,w,a),r.memoizedState=Fu,c):(ai(r),a=t.child,t=a.sibling,a=Mn(a,{mode:"visible",children:c.children}),a.return=r,a.sibling=null,t!==null&&(w=r.deletions,w===null?(r.deletions=[t],r.flags|=16):w.push(t)),r.child=a,r.memoizedState=null,a)}function Ju(t,r){return r=Zl({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Zl(t,r){return t=Ut(22,t,null,r),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Wu(t,r,a){return Is(r,t.child,null,a),t=Ju(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Pg(t,r,a){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),yu(t.return,r,a)}function ef(t,r,a,c,h){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=a,g.tailMode=h)}function Fg(t,r,a){var c=r.pendingProps,h=c.revealOrder,g=c.tail;if(st(t,r,c.children,a),c=Je.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Pg(t,a,r);else if(t.tag===19)Pg(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}switch(J(Je,c),h){case"forwards":for(a=r.child,h=null;a!==null;)t=a.alternate,t!==null&&Xl(t)===null&&(h=a),a=a.sibling;a=h,a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null),ef(r,!1,h,a,g);break;case"backwards":for(a=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&Xl(t)===null){r.child=h;break}t=h.sibling,h.sibling=a,a=h,h=t}ef(r,!0,a,null,g);break;case"together":ef(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Un(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),hi|=r.lanes,(a&r.childLanes)===0)if(t!==null){if(Qr(t,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(s(153));if(r.child!==null){for(t=r.child,a=Mn(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=Mn(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function tf(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&Ol(t)))}function Rw(t,r,a){switch(r.tag){case 3:Ne(r,r.stateNode.containerInfo),ti(r,Ze,t.memoizedState.cache),Pr();break;case 27:case 5:jr(r);break;case 4:Ne(r,r.stateNode.containerInfo);break;case 10:ti(r,r.type,r.memoizedProps.value);break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(ai(r),r.flags|=128,null):(a&r.child.childLanes)!==0?Xg(t,r,a):(ai(r),t=Un(t,r,a),t!==null?t.sibling:null);ai(r);break;case 19:var h=(t.flags&128)!==0;if(c=(a&r.childLanes)!==0,c||(Qr(t,r,a,!1),c=(a&r.childLanes)!==0),h){if(c)return Fg(t,r,a);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),J(Je,Je.current),c)break;return null;case 22:case 23:return r.lanes=0,Ig(t,r,a);case 24:ti(r,Ze,t.memoizedState.cache)}return Un(t,r,a)}function Qg(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)tt=!0;else{if(!tf(t,a)&&(r.flags&128)===0)return tt=!1,Rw(t,r,a);tt=(t.flags&131072)!==0}else tt=!1,_e&&(r.flags&1048576)!==0&&Ap(r,Ml,r.index);switch(r.lanes=0,r.tag){case 16:e:{t=r.pendingProps;var c=r.elementType,h=c._init;if(c=h(c._payload),r.type=c,typeof c=="function")uu(c)?(t=Xi(c,t),r.tag=1,r=Kg(null,r,c,t,a)):(r.tag=0,r=Pu(null,r,c,t,a));else{if(c!=null){if(h=c.$$typeof,h===V){r.tag=11,r=Hg(null,r,c,t,a);break e}else if(h===Z){r.tag=14,r=qg(null,r,c,t,a);break e}}throw r=ee(c)||c,Error(s(306,r,""))}}return r;case 0:return Pu(t,r,r.type,r.pendingProps,a);case 1:return c=r.type,h=Xi(c,r.pendingProps),Kg(t,r,c,h,a);case 3:e:{if(Ne(r,r.stateNode.containerInfo),t===null)throw Error(s(387));c=r.pendingProps;var g=r.memoizedState;h=g.element,Tu(t,r),ia(r,c,null,a);var w=r.memoizedState;if(c=w.cache,ti(r,Ze,c),c!==g.cache&&bu(r,[Ze],a,!0),na(),c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=Yg(t,r,c,a);break e}else if(c!==h){h=Ft(Error(s(424)),r),Fr(h),r=Yg(t,r,c,a);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for($e=dn(t.firstChild),St=r,_e=!0,$i=null,yn=!0,a=Cg(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Pr(),c===h){r=Un(t,r,a);break e}st(t,r,c,a)}r=r.child}return r;case 26:return Ql(t,r),t===null?(a=ey(r.type,null,r.pendingProps,null))?r.memoizedState=a:_e||(a=r.type,t=r.pendingProps,c=fo(te.current).createElement(a),c[ft]=r,c[Et]=t,at(c,a,t),et(c),r.stateNode=c):r.memoizedState=ey(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return jr(r),t===null&&_e&&(c=r.stateNode=Zm(r.type,r.pendingProps,te.current),St=r,yn=!0,h=$e,mi(r.type)?(Bf=h,$e=dn(c.firstChild)):$e=h),st(t,r,r.pendingProps.children,a),Ql(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&_e&&((h=c=$e)&&(c=a1(c,r.type,r.pendingProps,yn),c!==null?(r.stateNode=c,St=r,$e=dn(c.firstChild),yn=!1,h=!0):h=!1),h||Ii(r)),jr(r),h=r.type,g=r.pendingProps,w=t!==null?t.memoizedProps:null,c=g.children,Rf(h,g)?c=null:w!==null&&Rf(h,w)&&(r.flags|=32),r.memoizedState!==null&&(h=Mu(t,r,Tw,null,null,a),Ea._currentValue=h),Ql(t,r),st(t,r,c,a),r.child;case 6:return t===null&&_e&&((t=a=$e)&&(a=l1(a,r.pendingProps,yn),a!==null?(r.stateNode=a,St=r,$e=null,t=!0):t=!1),t||Ii(r)),null;case 13:return Xg(t,r,a);case 4:return Ne(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=Is(r,null,c,a):st(t,r,c,a),r.child;case 11:return Hg(t,r,r.type,r.pendingProps,a);case 7:return st(t,r,r.pendingProps,a),r.child;case 8:return st(t,r,r.pendingProps.children,a),r.child;case 12:return st(t,r,r.pendingProps.children,a),r.child;case 10:return c=r.pendingProps,ti(r,r.type,c.value),st(t,r,c.children,a),r.child;case 9:return h=r.type._context,c=r.pendingProps.children,Gi(r),h=ht(h),c=c(h),r.flags|=1,st(t,r,c,a),r.child;case 14:return qg(t,r,r.type,r.pendingProps,a);case 15:return $g(t,r,r.type,r.pendingProps,a);case 19:return Fg(t,r,a);case 31:return c=r.pendingProps,a=r.mode,c={mode:c.mode,children:c.children},t===null?(a=Zl(c,a),a.ref=r.ref,r.child=a,a.return=r,r=a):(a=Mn(t.child,c),a.ref=r.ref,r.child=a,a.return=r,r=a),r;case 22:return Ig(t,r,a);case 24:return Gi(r),c=ht(Ze),t===null?(h=wu(),h===null&&(h=je,g=vu(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=a),h=g),r.memoizedState={parent:c,cache:h},_u(r),ti(r,Ze,h)):((t.lanes&a)!==0&&(Tu(t,r),ia(r,null,null,a),na()),h=t.memoizedState,g=r.memoizedState,h.parent!==c?(h={parent:c,cache:c},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),ti(r,Ze,c)):(c=g.cache,ti(r,Ze,c),c!==h.cache&&bu(r,[Ze],a,!0))),st(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function zn(t){t.flags|=4}function Zg(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ry(r)){if(r=Wt.current,r!==null&&((Se&4194048)===Se?bn!==null:(Se&62914560)!==Se&&(Se&536870912)===0||r!==bn))throw ea=xu,Lp;t.flags|=8192}}function Jl(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?Jn():536870912,t.lanes|=r,Ys|=r)}function ua(t,r){if(!_e)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Ue(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,c=0;if(r)for(var h=t.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=c,t.childLanes=a,r}function jw(t,r,a){var c=r.pendingProps;switch(pu(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(r),null;case 1:return Ue(r),null;case 3:return a=r.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),Ln(Ze),Gt(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Xr(r)?zn(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,kp())),Ue(r),null;case 26:return a=r.memoizedState,t===null?(zn(r),a!==null?(Ue(r),Zg(r,a)):(Ue(r),r.flags&=-16777217)):a?a!==t.memoizedState?(zn(r),Ue(r),Zg(r,a)):(Ue(r),r.flags&=-16777217):(t.memoizedProps!==c&&zn(r),Ue(r),r.flags&=-16777217),null;case 27:En(r),a=te.current;var h=r.type;if(t!==null&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}t=ae.current,Xr(r)?Np(r):(t=Zm(h,c,a),r.stateNode=t,zn(r))}return Ue(r),null;case 5:if(En(r),a=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}if(t=ae.current,Xr(r))Np(r);else{switch(h=fo(te.current),t){case 1:t=h.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:t=h.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":t=h.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":t=h.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":t=h.createElement("div"),t.innerHTML=" + + + + + +
+ +

The Playwright Trace Viewer must be loaded over the http:// or https:// protocols.

+

For more information, please see the docs.

+
+ + + diff --git a/ui/playwright-report/trace/manifest.webmanifest b/ui/playwright-report/trace/manifest.webmanifest new file mode 100644 index 0000000..f823692 --- /dev/null +++ b/ui/playwright-report/trace/manifest.webmanifest @@ -0,0 +1,16 @@ +{ + "theme_color": "#000", + "background_color": "#fff", + "display": "standalone", + "start_url": "index.html", + "name": "Playwright Trace Viewer", + "short_name": "Trace Viewer", + "icons": [ + { + "src": "playwright-logo.svg", + "sizes": "48x48 72x72 96x96 128x128 150x150 256x256 512x512 1024x1024", + "type": "image/svg+xml", + "purpose": "any" + } + ] +} diff --git a/ui/playwright-report/trace/playwright-logo.svg b/ui/playwright-report/trace/playwright-logo.svg new file mode 100644 index 0000000..7b3ca7d --- /dev/null +++ b/ui/playwright-report/trace/playwright-logo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ui/playwright-report/trace/snapshot.html b/ui/playwright-report/trace/snapshot.html new file mode 100644 index 0000000..6f39e79 --- /dev/null +++ b/ui/playwright-report/trace/snapshot.html @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/ui/playwright-report/trace/sw.bundle.js b/ui/playwright-report/trace/sw.bundle.js new file mode 100644 index 0000000..fef0dbd --- /dev/null +++ b/ui/playwright-report/trace/sw.bundle.js @@ -0,0 +1,3 @@ +var Qs=Object.defineProperty;var zs=(s,t,e)=>t in s?Qs(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var L=(s,t,e)=>zs(s,typeof t!="symbol"?t+"":t,e);function er(s,t){const e=new Array(t.length).fill(0);return new Array(t.length).fill(0).map((n,r)=>(i,a)=>{e[r]=i/a*t[r]*1e3,s(e.reduce((o,l)=>o+l,0),1e3)})}class tr{constructor(t,e){L(this,"_snapshotStorage");L(this,"_resourceLoader");L(this,"_snapshotIds",new Map);this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,n){const r=this._snapshot(t,e);if(!r)return new Response(null,{status:404});const i=r.render();return this._snapshotIds.set(n,r),new Response(i.html,{status:200,headers:{"Content-Type":"text/html; charset=utf-8"}})}async serveClosestScreenshot(t,e){const n=this._snapshot(t,e),r=n==null?void 0:n.closestScreenshot();return r?new Response(await this._resourceLoader(r)):new Response(null,{status:404})}serveSnapshotInfo(t,e){const n=this._snapshot(t,e);return this._respondWithJson(n?{viewport:n.viewport(),url:n.snapshot().frameUrl,timestamp:n.snapshot().timestamp,wallTime:n.snapshot().wallTime}:{error:"No snapshot found"})}_snapshot(t,e){const n=e.get("name");return this._snapshotStorage.snapshotByName(t,n)}_respondWithJson(t){return new Response(JSON.stringify(t),{status:200,headers:{"Cache-Control":"public, max-age=31536000","Content-Type":"application/json"}})}async serveResource(t,e,n){let r;const i=this._snapshotIds.get(n);for(const A of t)if(r=i==null?void 0:i.resourceByUrl(nr(A),e),r)break;if(!r)return new Response(null,{status:404});const a=r.response.content._sha1,o=a?await this._resourceLoader(a)||new Blob([]):new Blob([]);let l=r.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(l)&&!l.includes("charset")&&(l=`${l}; charset=utf-8`);const d=new Headers;l!=="x-unknown"&&d.set("Content-Type",l);for(const{name:A,value:T}of r.response.headers)d.set(A,T);d.delete("Content-Encoding"),d.delete("Access-Control-Allow-Origin"),d.set("Access-Control-Allow-Origin","*"),d.delete("Content-Length"),d.set("Content-Length",String(o.size)),d.set("Cache-Control","public, max-age=31536000");const{status:g}=r.response,b=g===101||g===204||g===205||g===304;return new Response(b?null:o,{headers:d,status:r.response.status,statusText:r.response.statusText})}}function nr(s){try{const t=new URL(s);return t.hash="",t.toString()}catch{return s}}function sr(s){const t=new Map,{files:e,stacks:n}=s;for(const r of n){const[i,a]=r;t.set(`call@${i}`,a.map(o=>({file:e[o[0]],line:o[1],column:o[2],function:o[3]})))}return t}const Hn={"&":"&","<":"<",">":">",'"':""","'":"'"};function rr(s){return s.replace(/[&<>"']/ug,t=>Hn[t])}function ir(s){return s.replace(/[&<]/ug,t=>Hn[t])}function Wt(s,t,e){return s.find((n,r)=>{if(r===s.length-1)return!0;const i=s[r+1];return Math.abs(t(n)-e)i.frameSwapWallTime,t):Wt(this._screencastFrames,i=>i.timestamp,e);return n==null?void 0:n.sha1}render(){const t=[],e=(i,a,o,l)=>{if(typeof i=="string"){o==="STYLE"||o==="style"?t.push(pr(dr(i))):t.push(ir(i));return}if(ar(i)){const _=a-i[0][0];if(_>=0&&_<=a){const d=lr(this._snapshots[_]),g=i[0][1];if(g>=0&&gy[0]===T),p=b==="SOURCE"&&o==="PICTURE"&&(l==null?void 0:l.some(y=>y[0]===T));for(const[y,O]of A){let m=y;f&&y.toLowerCase()==="src"&&(m="__playwright_src__"),u&&y===T&&(m="src"),["src","srcset"].includes(y.toLowerCase())&&(h||p)&&(m="_"+m);let E=O;c&&y.toLowerCase()==="href"?E="link://"+O:(y.toLowerCase()==="href"||y.toLowerCase()==="src"||y===T)&&(E=ft(O)),t.push(" ",m,'="',rr(E),'"')}t.push(">");for(const y of g)e(y,a,b,A);cr.has(b)||t.push("");return}else return},n=this._snapshot;return{html:this._htmlCache.getOrCompute(this,()=>{e(n.html,this._index,void 0,void 0);const a=(n.doctype?``:"")+["",` + + + + + +
+ + diff --git a/ui/playwright-report/trace/xtermModule.DYP7pi_n.css b/ui/playwright-report/trace/xtermModule.DYP7pi_n.css new file mode 100644 index 0000000..c27f4fb --- /dev/null +++ b/ui/playwright-report/trace/xtermModule.DYP7pi_n.css @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2014 The xterm.js authors. All rights reserved. + * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) + * https://github.com/chjj/term.js + * @license MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * Originally forked from (with the author's permission): + * Fabrice Bellard's javascript vt100 for jslinux: + * http://bellard.org/jslinux/ + * Copyright (c) 2011 Fabrice Bellard + * The original design remains. The terminal itself + * has been extended to include xterm CSI codes, among + * other features. + */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}