ATlast — you'll never need to find your favorites on another platform again. Find your favs in the ATmosphere.
atproto

add deciduous tracking

byarielm.fyi 794e5fd8 f3c536d1

verified
+71
.claude/agents.toml
··· 1 + # Project Subagents Configuration 2 + # Domain-specific agents for working on different parts of the codebase. 3 + # 4 + # When working on a specific domain, spawn a Task with subagent_type="Explore" or 5 + # "general-purpose" and include the relevant agent's context in the prompt. 6 + # 7 + # Customize this file for YOUR project's structure. The domains below are examples. 8 + 9 + # Example: Backend/Core agent 10 + # [agents.backend] 11 + # name = "Backend Agent" 12 + # description = "API routes, database models, business logic" 13 + # file_patterns = [ 14 + # "src/**/*.rs", 15 + # "src/**/*.py", 16 + # "app/**/*.py" 17 + # ] 18 + # focus_areas = [ 19 + # "Database operations", 20 + # "API endpoints", 21 + # "Business logic" 22 + # ] 23 + # instructions = """ 24 + # When working on backend: 25 + # - Run tests before and after changes 26 + # - Follow existing patterns for new endpoints 27 + # - Maintain backwards compatibility 28 + # """ 29 + 30 + # Example: Frontend agent 31 + # [agents.frontend] 32 + # name = "Frontend Agent" 33 + # description = "UI components, state management, styling" 34 + # file_patterns = [ 35 + # "web/src/**/*.ts", 36 + # "web/src/**/*.tsx", 37 + # "src/components/**" 38 + # ] 39 + # focus_areas = [ 40 + # "React components", 41 + # "State management", 42 + # "Styling and layout" 43 + # ] 44 + # instructions = """ 45 + # When working on frontend: 46 + # - Test in browser after changes 47 + # - Follow component patterns 48 + # - Keep accessibility in mind 49 + # """ 50 + 51 + # Example: Infrastructure agent 52 + # [agents.infra] 53 + # name = "Infrastructure Agent" 54 + # description = "CI/CD, deployment, configuration" 55 + # file_patterns = [ 56 + # ".github/workflows/**", 57 + # "Dockerfile", 58 + # "docker-compose.yml", 59 + # "scripts/**" 60 + # ] 61 + # focus_areas = [ 62 + # "GitHub Actions", 63 + # "Docker configuration", 64 + # "Deployment scripts" 65 + # ] 66 + # instructions = """ 67 + # When working on infrastructure: 68 + # - Test workflows locally when possible 69 + # - Keep builds fast with caching 70 + # - Document any manual steps 71 + # """
+274
.claude/commands/deciduous.decision.md
··· 1 + --- 2 + description: Manage decision graph - track algorithm choices and reasoning 3 + allowed-tools: Bash(deciduous:*) 4 + argument-hint: <action> [args...] 5 + --- 6 + 7 + # Decision Graph Management 8 + 9 + **Log decisions IN REAL-TIME as you work, not retroactively.** 10 + 11 + ## When to Use This 12 + 13 + | You're doing this... | Log this type | Command | 14 + |---------------------|---------------|---------| 15 + | Starting a new feature | `goal` **with -p** | `/decision add goal "Add user auth" -p "user request"` | 16 + | Choosing between approaches | `decision` | `/decision add decision "Choose auth method"` | 17 + | Considering an option | `option` | `/decision add option "JWT tokens"` | 18 + | About to write code | `action` | `/decision add action "Implementing JWT"` | 19 + | Noticing something | `observation` | `/decision add obs "Found existing auth code"` | 20 + | Finished something | `outcome` | `/decision add outcome "JWT working"` | 21 + 22 + ## Quick Commands 23 + 24 + Based on $ARGUMENTS: 25 + 26 + ### View Commands 27 + - `nodes` or `list` -> `deciduous nodes` 28 + - `edges` -> `deciduous edges` 29 + - `graph` -> `deciduous graph` 30 + - `commands` -> `deciduous commands` 31 + 32 + ### Create Nodes (with optional metadata) 33 + - `add goal <title>` -> `deciduous add goal "<title>" -c 90` 34 + - `add decision <title>` -> `deciduous add decision "<title>" -c 75` 35 + - `add option <title>` -> `deciduous add option "<title>" -c 70` 36 + - `add action <title>` -> `deciduous add action "<title>" -c 85` 37 + - `add obs <title>` -> `deciduous add observation "<title>" -c 80` 38 + - `add outcome <title>` -> `deciduous add outcome "<title>" -c 90` 39 + 40 + ### Optional Flags for Nodes 41 + - `-c, --confidence <0-100>` - Confidence level 42 + - `-p, --prompt "..."` - Store the user prompt that triggered this node 43 + - `-f, --files "src/main.py,lib/utils.js"` - Associate files with this node 44 + - `-b, --branch <name>` - Git branch (auto-detected by default) 45 + - `--no-branch` - Skip branch auto-detection 46 + - `--commit <hash|HEAD>` - Link to a git commit (use HEAD for current commit) 47 + 48 + ### ⚠️ CRITICAL: Link Commits to Actions/Outcomes 49 + 50 + **After every git commit, link it to the decision graph!** 51 + 52 + ```bash 53 + git commit -m "feat: add auth" 54 + deciduous add action "Implemented auth" -c 90 --commit HEAD 55 + deciduous link <goal_id> <action_id> -r "Implementation" 56 + ``` 57 + 58 + ## CRITICAL: Capture VERBATIM User Prompts 59 + 60 + **Prompts must be the EXACT user message, not a summary.** When a user request triggers new work, capture their full message word-for-word. 61 + 62 + **BAD - summaries are useless for context recovery:** 63 + ```bash 64 + # DON'T DO THIS - this is a summary, not a prompt 65 + deciduous add goal "Add auth" -p "User asked: add login to the app" 66 + ``` 67 + 68 + **GOOD - verbatim prompts enable full context recovery:** 69 + ```bash 70 + # Use --prompt-stdin for multi-line prompts 71 + deciduous add goal "Add auth" -c 90 --prompt-stdin << 'EOF' 72 + I need to add user authentication to the app. Users should be able to sign up 73 + with email/password, and we need OAuth support for Google and GitHub. The auth 74 + should use JWT tokens with refresh token rotation. 75 + EOF 76 + 77 + # Or use the prompt command to update existing nodes 78 + deciduous prompt 42 << 'EOF' 79 + The full verbatim user message goes here... 80 + EOF 81 + ``` 82 + 83 + **When to capture prompts:** 84 + - Root `goal` nodes: YES - the FULL original request 85 + - Major direction changes: YES - when user redirects the work 86 + - Routine downstream nodes: NO - they inherit context via edges 87 + 88 + **Updating prompts on existing nodes:** 89 + ```bash 90 + deciduous prompt <node_id> "full verbatim prompt here" 91 + cat prompt.txt | deciduous prompt <node_id> # Multi-line from stdin 92 + ``` 93 + 94 + Prompts are viewable in the TUI detail panel (`deciduous tui`) and web viewer. 95 + 96 + ## Branch-Based Grouping 97 + 98 + **Nodes are automatically tagged with the current git branch.** This enables filtering by feature/PR. 99 + 100 + ### How It Works 101 + - When you create a node, the current git branch is stored in `metadata_json` 102 + - Configure which branches are "main" in `.deciduous/config.toml`: 103 + ```toml 104 + [branch] 105 + main_branches = ["main", "master"] # Branches not treated as "feature branches" 106 + auto_detect = true # Auto-detect branch on node creation 107 + ``` 108 + - Nodes on feature branches (anything not in `main_branches`) can be grouped/filtered 109 + 110 + ### CLI Filtering 111 + ```bash 112 + # Show only nodes from specific branch 113 + deciduous nodes --branch main 114 + deciduous nodes --branch feature-auth 115 + deciduous nodes -b my-feature 116 + 117 + # Override auto-detection when creating nodes 118 + deciduous add goal "Feature work" -b feature-x # Force specific branch 119 + deciduous add goal "Universal note" --no-branch # No branch tag 120 + ``` 121 + 122 + ### Web UI Branch Filter 123 + The graph viewer shows a branch dropdown in the stats bar: 124 + - "All branches" shows everything 125 + - Select a specific branch to filter all views (Chains, Timeline, Graph, DAG) 126 + 127 + ### When to Use Branch Grouping 128 + - **Feature work**: Nodes created on `feature-auth` branch auto-grouped 129 + - **PR context**: Filter to see only decisions for a specific PR 130 + - **Cross-cutting concerns**: Use `--no-branch` for universal notes 131 + - **Retrospectives**: Filter by branch to see decision history per feature 132 + 133 + ### Create Edges 134 + - `link <from> <to> [reason]` -> `deciduous link <from> <to> -r "<reason>"` 135 + 136 + ### Sync Graph 137 + - `sync` -> `deciduous sync` 138 + 139 + ### Multi-User Sync (Diff/Patch) 140 + - `diff export -o <file>` -> `deciduous diff export -o <file>` (export nodes as patch) 141 + - `diff export --nodes 1-10 -o <file>` -> export specific nodes 142 + - `diff export --branch feature-x -o <file>` -> export nodes from branch 143 + - `diff apply <file>` -> `deciduous diff apply <file>` (apply patch, idempotent) 144 + - `diff apply --dry-run <file>` -> preview without applying 145 + - `diff status` -> `deciduous diff status` (list patches in .deciduous/patches/) 146 + - `migrate` -> `deciduous migrate` (add change_id columns for sync) 147 + 148 + ### Export & Visualization 149 + - `dot` -> `deciduous dot` (output DOT to stdout) 150 + - `dot --png` -> `deciduous dot --png -o graph.dot` (generate PNG) 151 + - `dot --nodes 1-11` -> `deciduous dot --nodes 1-11` (filter nodes) 152 + - `writeup` -> `deciduous writeup` (generate PR writeup) 153 + - `writeup -t "Title" --nodes 1-11` -> filtered writeup 154 + 155 + ## Node Types 156 + 157 + | Type | Purpose | Example | 158 + |------|---------|---------| 159 + | `goal` | High-level objective | "Add user authentication" | 160 + | `decision` | Choice point with options | "Choose auth method" | 161 + | `option` | Possible approach | "Use JWT tokens" | 162 + | `action` | Something implemented | "Added JWT middleware" | 163 + | `outcome` | Result of action | "JWT auth working" | 164 + | `observation` | Finding or data point | "Existing code uses sessions" | 165 + 166 + ## Edge Types 167 + 168 + | Type | Meaning | 169 + |------|---------| 170 + | `leads_to` | Natural progression | 171 + | `chosen` | Selected option | 172 + | `rejected` | Not selected (include reason!) | 173 + | `requires` | Dependency | 174 + | `blocks` | Preventing progress | 175 + | `enables` | Makes something possible | 176 + 177 + ## Graph Integrity - CRITICAL 178 + 179 + **Every node MUST be logically connected.** Floating nodes break the graph's value. 180 + 181 + ### Connection Rules 182 + | Node Type | MUST connect to | Example | 183 + |-----------|----------------|---------| 184 + | `outcome` | The action/goal it resolves | "JWT working" → links FROM "Implementing JWT" | 185 + | `action` | The decision/goal that spawned it | "Implementing JWT" → links FROM "Add auth" | 186 + | `option` | Its parent decision | "Use JWT" → links FROM "Choose auth method" | 187 + | `observation` | Related goal/action/decision | "Found existing code" → links TO relevant node | 188 + | `decision` | Parent goal (if any) | "Choose auth" → links FROM "Add auth feature" | 189 + | `goal` | Can be a root (no parent needed) | Root goals are valid orphans | 190 + 191 + ### Audit Checklist 192 + Ask yourself after creating nodes: 193 + 1. Does every **outcome** link back to what caused it? 194 + 2. Does every **action** link to why you did it? 195 + 3. Does every **option** link to its decision? 196 + 4. Are there **dangling outcomes** with no parent action/goal? 197 + 198 + ### Find Disconnected Nodes 199 + ```bash 200 + # List nodes with no incoming edges (potential orphans) 201 + deciduous edges | cut -d'>' -f2 | cut -d' ' -f2 | sort -u > /tmp/has_parent.txt 202 + deciduous nodes | tail -n+3 | awk '{print $1}' | while read id; do 203 + grep -q "^$id$" /tmp/has_parent.txt || echo "CHECK: $id" 204 + done 205 + ``` 206 + Note: Root goals are VALID orphans. Outcomes/actions/options usually are NOT. 207 + 208 + ### Fix Missing Connections 209 + ```bash 210 + deciduous link <parent_id> <child_id> -r "Retroactive connection - <why>" 211 + ``` 212 + 213 + ### When to Audit 214 + - Before every `deciduous sync` 215 + - After creating multiple nodes quickly 216 + - At session end 217 + - When the web UI graph looks disconnected 218 + 219 + ## Multi-User Sync 220 + 221 + **Problem**: Multiple users work on the same codebase, each with a local `.deciduous/deciduous.db` (gitignored). How to share decisions? 222 + 223 + **Solution**: jj-inspired dual-ID model. Each node has: 224 + - `id` (integer): Local database primary key, different per machine 225 + - `change_id` (UUID): Globally unique, stable across all databases 226 + 227 + ### Export Workflow 228 + ```bash 229 + # Export nodes from your branch as a patch file 230 + deciduous diff export --branch feature-x -o .deciduous/patches/alice-feature.json 231 + 232 + # Or export specific node IDs 233 + deciduous diff export --nodes 172-188 -o .deciduous/patches/alice-feature.json --author alice 234 + ``` 235 + 236 + ### Apply Workflow 237 + ```bash 238 + # Apply patches from teammates (idempotent - safe to re-apply) 239 + deciduous diff apply .deciduous/patches/*.json 240 + 241 + # Preview what would change 242 + deciduous diff apply --dry-run .deciduous/patches/bob-refactor.json 243 + ``` 244 + 245 + ### PR Workflow 246 + 1. Create nodes locally while working 247 + 2. Export: `deciduous diff export --branch my-feature -o .deciduous/patches/my-feature.json` 248 + 3. Commit the patch file (NOT the database) 249 + 4. Open PR with patch file included 250 + 5. Teammates pull and apply: `deciduous diff apply .deciduous/patches/my-feature.json` 251 + 6. **Idempotent**: Same patch applied twice = no duplicates 252 + 253 + ### Patch Format (JSON) 254 + ```json 255 + { 256 + "version": "1.0", 257 + "author": "alice", 258 + "branch": "feature/auth", 259 + "nodes": [{ "change_id": "uuid...", "title": "...", ... }], 260 + "edges": [{ "from_change_id": "uuid1", "to_change_id": "uuid2", ... }] 261 + } 262 + ``` 263 + 264 + ## The Rule 265 + 266 + ``` 267 + LOG BEFORE YOU CODE, NOT AFTER. 268 + CONNECT EVERY NODE TO ITS PARENT. 269 + AUDIT FOR ORPHANS REGULARLY. 270 + SYNC BEFORE YOU PUSH. 271 + EXPORT PATCHES FOR YOUR TEAMMATES. 272 + ``` 273 + 274 + **Live graph**: https://notactuallytreyanastasio.github.io/deciduous/
+192
.claude/commands/deciduous.recover.md
··· 1 + --- 2 + description: Recover context from decision graph and recent activity - USE THIS ON SESSION START 3 + allowed-tools: Bash(deciduous:*, git:*, cat:*, tail:*) 4 + argument-hint: [focus-area] 5 + --- 6 + 7 + # Context Recovery 8 + 9 + **RUN THIS AT SESSION START.** The decision graph is your persistent memory. 10 + 11 + ## Step 1: Query the Graph 12 + 13 + ```bash 14 + # See all decisions (look for recent ones and pending status) 15 + deciduous nodes 16 + 17 + # Filter by current branch (useful for feature work) 18 + deciduous nodes --branch $(git rev-parse --abbrev-ref HEAD) 19 + 20 + # See how decisions connect 21 + deciduous edges 22 + 23 + # What commands were recently run? 24 + deciduous commands 25 + ``` 26 + 27 + **Branch-scoped context**: If working on a feature branch, filter nodes to see only decisions relevant to this branch. Main branch nodes are tagged with `[branch: main]`. 28 + 29 + ## Step 1.5: Audit Graph Integrity 30 + 31 + **CRITICAL: Check that all nodes are logically connected.** 32 + 33 + ```bash 34 + # Find nodes with no incoming edges (potential missing connections) 35 + deciduous edges | cut -d'>' -f2 | cut -d' ' -f2 | sort -u > /tmp/has_parent.txt 36 + deciduous nodes | tail -n+3 | awk '{print $1}' | while read id; do 37 + grep -q "^$id$" /tmp/has_parent.txt || echo "CHECK: $id" 38 + done 39 + ``` 40 + 41 + **Review each flagged node:** 42 + - Root `goal` nodes are VALID without parents 43 + - `outcome` nodes MUST link back to their action/goal 44 + - `action` nodes MUST link to their parent goal/decision 45 + - `option` nodes MUST link to their parent decision 46 + 47 + **Fix missing connections:** 48 + ```bash 49 + deciduous link <parent_id> <child_id> -r "Retroactive connection - <reason>" 50 + ``` 51 + 52 + ## Step 2: Check Git State 53 + 54 + ```bash 55 + git status 56 + git log --oneline -10 57 + git diff --stat 58 + ``` 59 + 60 + ## Step 3: Check Session Log 61 + 62 + ```bash 63 + cat git.log | tail -30 64 + ``` 65 + 66 + ## After Gathering Context, Report: 67 + 68 + 1. **Current branch** and pending changes 69 + 2. **Branch-specific decisions** (filter by branch if on feature branch) 70 + 3. **Recent decisions** (especially pending/active ones) 71 + 4. **Last actions** from git log and command log 72 + 5. **Open questions** or unresolved observations 73 + 6. **Suggested next steps** 74 + 75 + ### Branch Configuration 76 + 77 + Check `.deciduous/config.toml` for branch settings: 78 + ```toml 79 + [branch] 80 + main_branches = ["main", "master"] # Which branches are "main" 81 + auto_detect = true # Auto-detect branch on node creation 82 + ``` 83 + 84 + --- 85 + 86 + ## REMEMBER: Real-Time Logging Required 87 + 88 + After recovering context, you MUST follow the logging workflow: 89 + 90 + ``` 91 + EVERY USER REQUEST → Log goal/decision first 92 + BEFORE CODE CHANGES → Log action 93 + AFTER CHANGES → Log outcome, link nodes 94 + BEFORE GIT PUSH → deciduous sync 95 + ``` 96 + 97 + **The user is watching the graph live.** Log as you go, not after. 98 + 99 + ### Quick Logging Commands 100 + 101 + ```bash 102 + # Root goal with user prompt (capture what the user asked for) 103 + deciduous add goal "What we're trying to do" -c 90 -p "User asked: <their request>" 104 + 105 + deciduous add action "What I'm about to implement" -c 85 106 + deciduous add outcome "What happened" -c 95 107 + deciduous link FROM TO -r "Connection reason" 108 + 109 + # Capture prompt when user redirects mid-stream 110 + deciduous add action "Switching approach" -c 85 -p "User said: use X instead" 111 + 112 + deciduous sync # Do this frequently! 113 + ``` 114 + 115 + **When to use `--prompt`:** On root goals (always) and when user gives new direction mid-stream. Downstream nodes inherit context via edges. 116 + 117 + --- 118 + 119 + ## Focus Areas 120 + 121 + If $ARGUMENTS specifies a focus, prioritize context for: 122 + 123 + - **auth**: Authentication-related decisions 124 + - **ui** / **graph**: UI and graph viewer state 125 + - **cli**: Command-line interface changes 126 + - **api**: API endpoints and data structures 127 + 128 + --- 129 + 130 + ## The Memory Loop 131 + 132 + ``` 133 + SESSION START 134 + 135 + Run /recover → See past decisions 136 + 137 + AUDIT → Fix any orphan nodes first! 138 + 139 + DO WORK → Log BEFORE each action 140 + 141 + CONNECT → Link new nodes immediately 142 + 143 + AFTER CHANGES → Log outcomes, observations 144 + 145 + AUDIT AGAIN → Any new orphans? 146 + 147 + BEFORE PUSH → deciduous sync 148 + 149 + PUSH → Live graph updates 150 + 151 + SESSION END → Final audit 152 + 153 + (repeat) 154 + ``` 155 + 156 + **Live graph**: https://notactuallytreyanastasio.github.io/deciduous/ 157 + 158 + --- 159 + 160 + ## Multi-User Sync 161 + 162 + If working in a team, check for and apply patches from teammates: 163 + 164 + ```bash 165 + # Check for unapplied patches 166 + deciduous diff status 167 + 168 + # Apply all patches (idempotent - safe to run multiple times) 169 + deciduous diff apply .deciduous/patches/*.json 170 + 171 + # Preview before applying 172 + deciduous diff apply --dry-run .deciduous/patches/teammate-feature.json 173 + ``` 174 + 175 + Before pushing your branch, export your decisions for teammates: 176 + 177 + ```bash 178 + # Export your branch's decisions as a patch 179 + deciduous diff export --branch $(git rev-parse --abbrev-ref HEAD) \ 180 + -o .deciduous/patches/$(whoami)-$(git rev-parse --abbrev-ref HEAD).json 181 + 182 + # Commit the patch file 183 + git add .deciduous/patches/ 184 + ``` 185 + 186 + ## Why This Matters 187 + 188 + - Context loss during compaction loses your reasoning 189 + - The graph survives - query it early, query it often 190 + - Retroactive logging misses details - log in the moment 191 + - The user sees the graph live - show your work 192 + - Patches share reasoning with teammates
+78
.claude/skills/deciduous/SKILL.md
··· 1 + --- 2 + name: deciduous 3 + description: Plan, implement, track, and reflect on your work goals and decisions. 4 + --- 5 + 6 + # Planning & Decision Graph Logging 7 + 8 + Track every goal, decision, and outcome in the decision graph. This creates persistent memory that survives context loss. 9 + 10 + - ALWAYS LOG BEFORE YOU CODE, NOT AFTER. 11 + - Log at the granularity of TODOs or task items. 12 + - When drafting a plan create the GOAL node. 13 + - User Decisions should be tracked 14 + 15 + ## When to Log (Automatic Triggers) 16 + 17 + | Situation | Node Type | Example | 18 + |-----------|-----------|---------| 19 + | In plan mode | `goal` | "Add user authentication" | 20 + | TODO / Task Item | `action` | "Implementing JWT auth middleware" | 21 + | User requests new feature | `goal` | "Add user authentication" | 22 + | Choosing between approaches | `decision` | "Choose between JWT vs sessions" | 23 + | Considering an option | `option` | "Use JWT with refresh tokens" | 24 + | About to write/edit code | `action` | "Implementing JWT auth middleware" | 25 + | Work completed or failed | `outcome` | "JWT auth working" or "JWT approach failed" | 26 + | Important observation | `observation` | "Existing code uses cookie-based sessions" | 27 + 28 + ## Commands 29 + 30 + ```bash 31 + # Create nodes (always include confidence -c) 32 + deciduous add goal "Title" -c 90 -p "User's exact request" 33 + deciduous add decision "Title" -c 75 34 + deciduous add action "Title" -c 85 35 + deciduous add outcome "Title" -c 90 36 + deciduous add observation "Title" -c 80 37 + 38 + # CRITICAL: Link nodes immediately after creation 39 + deciduous link <parent_id> <child_id> -r "Reason for connection" 40 + 41 + # After git commits, link to the graph 42 + deciduous add action "Committed feature X" -c 90 --commit HEAD 43 + 44 + # View the graph 45 + deciduous nodes 46 + deciduous edges 47 + ``` 48 + 49 + ## Rules 50 + 51 + 1. **Log BEFORE acting** - Create the action node before writing code 52 + 2. **Link IMMEDIATELY** - Every node except root goals must have a parent 53 + 3. **Capture verbatim prompts** - Use `-p` with the user's exact words for goals 54 + 4. **Include confidence** - Always use `-c` flag (0-100) 55 + 5. **Log outcomes** - Both successes AND failures get logged 56 + 57 + ## Confidence Guidelines 58 + 59 + - 90-100: Certain, verified, tested 60 + - 75-89: High confidence, likely correct 61 + - 50-74: Moderate confidence, some uncertainty 62 + - Below 50: Experimental, speculative 63 + 64 + ## The Memory Loop 65 + 66 + ``` 67 + User Request → Log goal with -p 68 + 69 + Choose Approach → Log decision + options 70 + 71 + Start Coding → Log action FIRST 72 + 73 + Complete Work → Log outcome, link to parent 74 + 75 + Git Commit → Log with --commit HEAD 76 + ``` 77 + 78 + **Remember**: The decision graph is your persistent memory. Log as you work, not after.
+79
.github/workflows/cleanup-decision-graphs.yml
··· 1 + name: Cleanup Decision Graph PNGs 2 + 3 + on: 4 + pull_request: 5 + types: [closed] 6 + 7 + jobs: 8 + cleanup: 9 + # Only run if PR was merged (not just closed) 10 + if: github.event.pull_request.merged == true 11 + runs-on: ubuntu-latest 12 + 13 + steps: 14 + - name: Checkout 15 + uses: actions/checkout@v4 16 + with: 17 + fetch-depth: 0 18 + token: ${{ secrets.GITHUB_TOKEN }} 19 + 20 + - name: Find and remove decision graph PNGs 21 + id: find-pngs 22 + run: | 23 + # Find decision graph PNGs (in docs/ or root) 24 + PNGS=$(find . -name "decision-graph*.png" -o -name "deciduous-graph*.png" 2>/dev/null | grep -v node_modules || true) 25 + 26 + if [ -z "$PNGS" ]; then 27 + echo "No decision graph PNGs found" 28 + echo "found=false" >> $GITHUB_OUTPUT 29 + else 30 + echo "Found PNGs to clean up:" 31 + echo "$PNGS" 32 + echo "found=true" >> $GITHUB_OUTPUT 33 + 34 + # Remove the files 35 + echo "$PNGS" | xargs rm -f 36 + 37 + # Also remove corresponding .dot files 38 + for png in $PNGS; do 39 + dot_file="${png%.png}.dot" 40 + if [ -f "$dot_file" ]; then 41 + rm -f "$dot_file" 42 + echo "Also removed: $dot_file" 43 + fi 44 + done 45 + fi 46 + 47 + - name: Create cleanup PR 48 + if: steps.find-pngs.outputs.found == 'true' 49 + run: | 50 + # Check if there are changes to commit 51 + if git diff --quiet && git diff --staged --quiet; then 52 + echo "No changes to commit" 53 + exit 0 54 + fi 55 + 56 + # Configure git 57 + git config user.name "github-actions[bot]" 58 + git config user.email "github-actions[bot]@users.noreply.github.com" 59 + 60 + # Create branch and commit 61 + BRANCH="cleanup/decision-graphs-pr-${{ github.event.pull_request.number }}" 62 + git checkout -b "$BRANCH" 63 + git add -A 64 + git commit -m "chore: cleanup decision graph assets from PR #${{ github.event.pull_request.number }}" 65 + git push origin "$BRANCH" 66 + 67 + # Create and auto-merge PR 68 + gh pr create \ 69 + --title "chore: cleanup decision graph assets from PR #${{ github.event.pull_request.number }}" \ 70 + --body "Automated cleanup of decision graph PNG/DOT files that were used in PR #${{ github.event.pull_request.number }}. 71 + 72 + These files served their purpose for PR review and are no longer needed." \ 73 + --head "$BRANCH" \ 74 + --base main 75 + 76 + # Auto-merge (requires auto-merge enabled on repo) 77 + gh pr merge "$BRANCH" --auto --squash --delete-branch || echo "Auto-merge not enabled, PR created for manual merge" 78 + env: 79 + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+25
.github/workflows/deploy-pages.yml
··· 1 + name: Deploy Decision Graph to Pages 2 + 3 + on: 4 + push: 5 + branches: [main] 6 + paths: 7 + - 'docs/**' 8 + workflow_dispatch: 9 + 10 + permissions: 11 + contents: write 12 + 13 + jobs: 14 + deploy: 15 + runs-on: ubuntu-latest 16 + steps: 17 + - uses: actions/checkout@v4 18 + 19 + - name: Deploy to gh-pages branch 20 + uses: peaceiris/actions-gh-pages@v4 21 + with: 22 + github_token: ${{ secrets.GITHUB_TOKEN }} 23 + publish_dir: ./docs 24 + publish_branch: gh-pages 25 + force_orphan: true
+3
.gitignore
··· 7 7 private-key.pem 8 8 public-jwk.json 9 9 test-data/ 10 + 11 + # Deciduous database (local) 12 + .deciduous/
+197
CLAUDE.md
··· 1 + # Project Instructions 2 + 3 + ## Decision Graph Workflow 4 + 5 + **THIS IS MANDATORY. Log decisions IN REAL-TIME, not retroactively.** 6 + 7 + ### The Core Rule 8 + 9 + ``` 10 + BEFORE you do something -> Log what you're ABOUT to do 11 + AFTER it succeeds/fails -> Log the outcome 12 + CONNECT immediately -> Link every node to its parent 13 + AUDIT regularly -> Check for missing connections 14 + ``` 15 + 16 + ### Behavioral Triggers - MUST LOG WHEN: 17 + 18 + | Trigger | Log Type | Example | 19 + |---------|----------|---------| 20 + | User asks for a new feature | `goal` **with -p** | "Add dark mode" | 21 + | Choosing between approaches | `decision` | "Choose state management" | 22 + | About to write/edit code | `action` | "Implementing Redux store" | 23 + | Something worked or failed | `outcome` | "Redux integration successful" | 24 + | Notice something interesting | `observation` | "Existing code uses hooks" | 25 + 26 + ### CRITICAL: Capture VERBATIM User Prompts 27 + 28 + **Prompts must be the EXACT user message, not a summary.** When a user request triggers new work, capture their full message word-for-word. 29 + 30 + **BAD - summaries are useless for context recovery:** 31 + ```bash 32 + # DON'T DO THIS - this is a summary, not a prompt 33 + deciduous add goal "Add auth" -p "User asked: add login to the app" 34 + ``` 35 + 36 + **GOOD - verbatim prompts enable full context recovery:** 37 + ```bash 38 + # Use --prompt-stdin for multi-line prompts 39 + deciduous add goal "Add auth" -c 90 --prompt-stdin << 'EOF' 40 + I need to add user authentication to the app. Users should be able to sign up 41 + with email/password, and we need OAuth support for Google and GitHub. The auth 42 + should use JWT tokens with refresh token rotation. 43 + EOF 44 + 45 + # Or use the prompt command to update existing nodes 46 + deciduous prompt 42 << 'EOF' 47 + The full verbatim user message goes here... 48 + EOF 49 + ``` 50 + 51 + **When to capture prompts:** 52 + - Root `goal` nodes: YES - the FULL original request 53 + - Major direction changes: YES - when user redirects the work 54 + - Routine downstream nodes: NO - they inherit context via edges 55 + 56 + **Updating prompts on existing nodes:** 57 + ```bash 58 + deciduous prompt <node_id> "full verbatim prompt here" 59 + cat prompt.txt | deciduous prompt <node_id> # Multi-line from stdin 60 + ``` 61 + 62 + Prompts are viewable in the TUI detail panel (`deciduous tui`) and web viewer. 63 + 64 + ### ⚠️ CRITICAL: Maintain Connections 65 + 66 + **The graph's value is in its CONNECTIONS, not just nodes.** 67 + 68 + | When you create... | IMMEDIATELY link to... | 69 + |-------------------|------------------------| 70 + | `outcome` | The action/goal it resolves | 71 + | `action` | The goal/decision that spawned it | 72 + | `option` | Its parent decision | 73 + | `observation` | Related goal/action | 74 + 75 + **Root `goal` nodes are the ONLY valid orphans.** 76 + 77 + ### Quick Commands 78 + 79 + ```bash 80 + deciduous add goal "Title" -c 90 -p "User's original request" 81 + deciduous add action "Title" -c 85 82 + deciduous link FROM TO -r "reason" # DO THIS IMMEDIATELY! 83 + deciduous serve # View live (auto-refreshes every 30s) 84 + deciduous sync # Export for static hosting 85 + 86 + # Metadata flags 87 + # -c, --confidence 0-100 Confidence level 88 + # -p, --prompt "..." Store the user prompt (use when semantically meaningful) 89 + # -f, --files "a.rs,b.rs" Associate files 90 + # -b, --branch <name> Git branch (auto-detected) 91 + # --commit <hash|HEAD> Link to git commit (use HEAD for current commit) 92 + 93 + # Branch filtering 94 + deciduous nodes --branch main 95 + deciduous nodes -b feature-auth 96 + ``` 97 + 98 + ### ⚠️ CRITICAL: Link Commits to Actions/Outcomes 99 + 100 + **After every git commit, link it to the decision graph!** 101 + 102 + ```bash 103 + git commit -m "feat: add auth" 104 + deciduous add action "Implemented auth" -c 90 --commit HEAD 105 + deciduous link <goal_id> <action_id> -r "Implementation" 106 + ``` 107 + 108 + The `--commit HEAD` flag captures the commit hash and links it to the node. The web viewer will show commit messages, authors, and dates. 109 + 110 + ### Git History & Deployment 111 + 112 + ```bash 113 + # Export graph AND git history for web viewer 114 + deciduous sync 115 + 116 + # This creates: 117 + # - docs/graph-data.json (decision graph) 118 + # - docs/git-history.json (commit info for linked nodes) 119 + ``` 120 + 121 + To deploy to GitHub Pages: 122 + 1. `deciduous sync` to export 123 + 2. Push to GitHub 124 + 3. Settings > Pages > Deploy from branch > /docs folder 125 + 126 + Your graph will be live at `https://<user>.github.io/<repo>/` 127 + 128 + ### Branch-Based Grouping 129 + 130 + Nodes are auto-tagged with the current git branch. Configure in `.deciduous/config.toml`: 131 + ```toml 132 + [branch] 133 + main_branches = ["main", "master"] 134 + auto_detect = true 135 + ``` 136 + 137 + ### Audit Checklist (Before Every Sync) 138 + 139 + 1. Does every **outcome** link back to what caused it? 140 + 2. Does every **action** link to why you did it? 141 + 3. Any **dangling outcomes** without parents? 142 + 143 + ### Session Start Checklist 144 + 145 + ```bash 146 + deciduous nodes # What decisions exist? 147 + deciduous edges # How are they connected? Any gaps? 148 + git status # Current state 149 + ``` 150 + 151 + ### Multi-User Sync 152 + 153 + Share decisions across teammates: 154 + 155 + ```bash 156 + # Export your branch's decisions 157 + deciduous diff export --branch feature-x -o .deciduous/patches/my-feature.json 158 + 159 + # Apply patches from teammates (idempotent) 160 + deciduous diff apply .deciduous/patches/*.json 161 + 162 + # Preview before applying 163 + deciduous diff apply --dry-run .deciduous/patches/teammate.json 164 + ``` 165 + 166 + PR workflow: Export patch → commit patch file → PR → teammates apply. 167 + 168 + ### API Trace Capture 169 + 170 + Capture Claude API traffic to correlate decisions with actual API work: 171 + 172 + ```bash 173 + # Run Claude through the deciduous proxy 174 + deciduous proxy -- claude 175 + 176 + # View traces in TUI (press 't' for Trace view) 177 + deciduous tui 178 + 179 + # View traces in web viewer (click "Traces" tab) 180 + deciduous serve 181 + ``` 182 + 183 + **Auto-linking**: When running through `deciduous proxy`, any `deciduous add` commands automatically link to the active API span. You'll see output like: 184 + 185 + ``` 186 + Created action #42 "Implementing auth" [traced: span #7] 187 + ``` 188 + 189 + This lets you see exactly which API calls produced which decisions - perfect for "vibe coding" visibility. 190 + 191 + **Trace commands:** 192 + ```bash 193 + deciduous trace sessions # List all sessions 194 + deciduous trace spans <session_id> # List spans in a session 195 + deciduous trace link <session_id> <node_id> # Manual linking 196 + deciduous trace prune --days 30 # Cleanup old traces 197 + ```
docs/.nojekyll

This is a binary file and will not be displayed.

+1
docs/graph-data.json
··· 1 + {"nodes":[],"edges":[]}
+82
docs/index.html
··· 1 + <!DOCTYPE html> 2 + <html lang="en"> 3 + <head> 4 + <meta charset="UTF-8" /> 5 + <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> 6 + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 7 + <meta name="description" content="Deciduous - Decision Graph Viewer" /> 8 + <title>Deciduous - Decision Graph</title> 9 + <script type="module" crossorigin>function dk(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var So=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $x={exports:{}},Va={},Bx={exports:{}},G={};/** 10 + * @license React 11 + * react.production.min.js 12 + * 13 + * Copyright (c) Facebook, Inc. and its affiliates. 14 + * 15 + * This source code is licensed under the MIT license found in the 16 + * LICENSE file in the root directory of this source tree. 17 + */var ro=Symbol.for("react.element"),hk=Symbol.for("react.portal"),pk=Symbol.for("react.fragment"),vk=Symbol.for("react.strict_mode"),gk=Symbol.for("react.profiler"),mk=Symbol.for("react.provider"),yk=Symbol.for("react.context"),_k=Symbol.for("react.forward_ref"),xk=Symbol.for("react.suspense"),wk=Symbol.for("react.memo"),Sk=Symbol.for("react.lazy"),Wv=Symbol.iterator;function Ek(e){return e===null||typeof e!="object"?null:(e=Wv&&e[Wv]||e["@@iterator"],typeof e=="function"?e:null)}var Ux={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Hx=Object.assign,Vx={};function Vr(e,t,n){this.props=e,this.context=t,this.refs=Vx,this.updater=n||Ux}Vr.prototype.isReactComponent={};Vr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Vr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gx(){}Gx.prototype=Vr.prototype;function dp(e,t,n){this.props=e,this.context=t,this.refs=Vx,this.updater=n||Ux}var hp=dp.prototype=new Gx;hp.constructor=dp;Hx(hp,Vr.prototype);hp.isPureReactComponent=!0;var Kv=Array.isArray,Wx=Object.prototype.hasOwnProperty,pp={current:null},Kx={key:!0,ref:!0,__self:!0,__source:!0};function Yx(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Wx.call(t,r)&&!Kx.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var u=Array(s),l=0;l<s;l++)u[l]=arguments[l+2];i.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:ro,type:e,key:o,ref:a,props:i,_owner:pp.current}}function Ck(e,t){return{$$typeof:ro,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function vp(e){return typeof e=="object"&&e!==null&&e.$$typeof===ro}function kk(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Yv=/\/+/g;function Ps(e,t){return typeof e=="object"&&e!==null&&e.key!=null?kk(""+e.key):t.toString(36)}function Wo(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ro:case hk:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+Ps(a,0):r,Kv(i)?(n="",e!=null&&(n=e.replace(Yv,"$&/")+"/"),Wo(i,t,n,"",function(l){return l})):i!=null&&(vp(i)&&(i=Ck(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Yv,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",Kv(e))for(var s=0;s<e.length;s++){o=e[s];var u=r+Ps(o,s);a+=Wo(o,t,n,u,i)}else if(u=Ek(e),typeof u=="function")for(e=u.call(e),s=0;!(o=e.next()).done;)o=o.value,u=r+Ps(o,s++),a+=Wo(o,t,n,u,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Eo(e,t,n){if(e==null)return e;var r=[],i=0;return Wo(e,r,"","",function(o){return t.call(n,o,i++)}),r}function bk(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Me={current:null},Ko={transition:null},Tk={ReactCurrentDispatcher:Me,ReactCurrentBatchConfig:Ko,ReactCurrentOwner:pp};function Qx(){throw Error("act(...) is not supported in production builds of React.")}G.Children={map:Eo,forEach:function(e,t,n){Eo(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Eo(e,function(){t++}),t},toArray:function(e){return Eo(e,function(t){return t})||[]},only:function(e){if(!vp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};G.Component=Vr;G.Fragment=pk;G.Profiler=gk;G.PureComponent=dp;G.StrictMode=vk;G.Suspense=xk;G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Tk;G.act=Qx;G.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Hx({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=pp.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)Wx.call(t,u)&&!Kx.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&s!==void 0?s[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){s=Array(u);for(var l=0;l<u;l++)s[l]=arguments[l+2];r.children=s}return{$$typeof:ro,type:e.type,key:i,ref:o,props:r,_owner:a}};G.createContext=function(e){return e={$$typeof:yk,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:mk,_context:e},e.Consumer=e};G.createElement=Yx;G.createFactory=function(e){var t=Yx.bind(null,e);return t.type=e,t};G.createRef=function(){return{current:null}};G.forwardRef=function(e){return{$$typeof:_k,render:e}};G.isValidElement=vp;G.lazy=function(e){return{$$typeof:Sk,_payload:{_status:-1,_result:e},_init:bk}};G.memo=function(e,t){return{$$typeof:wk,type:e,compare:t===void 0?null:t}};G.startTransition=function(e){var t=Ko.transition;Ko.transition={};try{e()}finally{Ko.transition=t}};G.unstable_act=Qx;G.useCallback=function(e,t){return Me.current.useCallback(e,t)};G.useContext=function(e){return Me.current.useContext(e)};G.useDebugValue=function(){};G.useDeferredValue=function(e){return Me.current.useDeferredValue(e)};G.useEffect=function(e,t){return Me.current.useEffect(e,t)};G.useId=function(){return Me.current.useId()};G.useImperativeHandle=function(e,t,n){return Me.current.useImperativeHandle(e,t,n)};G.useInsertionEffect=function(e,t){return Me.current.useInsertionEffect(e,t)};G.useLayoutEffect=function(e,t){return Me.current.useLayoutEffect(e,t)};G.useMemo=function(e,t){return Me.current.useMemo(e,t)};G.useReducer=function(e,t,n){return Me.current.useReducer(e,t,n)};G.useRef=function(e){return Me.current.useRef(e)};G.useState=function(e){return Me.current.useState(e)};G.useSyncExternalStore=function(e,t,n){return Me.current.useSyncExternalStore(e,t,n)};G.useTransition=function(){return Me.current.useTransition()};G.version="18.3.1";Bx.exports=G;var N=Bx.exports;const gp=Dx(N),Rk=dk({__proto__:null,default:gp},[N]);/** 18 + * @license React 19 + * react-jsx-runtime.production.min.js 20 + * 21 + * Copyright (c) Facebook, Inc. and its affiliates. 22 + * 23 + * This source code is licensed under the MIT license found in the 24 + * LICENSE file in the root directory of this source tree. 25 + */var Nk=N,Ik=Symbol.for("react.element"),Pk=Symbol.for("react.fragment"),jk=Object.prototype.hasOwnProperty,qk=Nk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ak={key:!0,ref:!0,__self:!0,__source:!0};function Xx(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)jk.call(t,r)&&!Ak.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Ik,type:e,key:o,ref:a,props:i,_owner:qk.current}}Va.Fragment=Pk;Va.jsx=Xx;Va.jsxs=Xx;$x.exports=Va;var w=$x.exports,rh={},Zx={exports:{}},et={},Jx={exports:{}},ew={};/** 26 + * @license React 27 + * scheduler.production.min.js 28 + * 29 + * Copyright (c) Facebook, Inc. and its affiliates. 30 + * 31 + * This source code is licensed under the MIT license found in the 32 + * LICENSE file in the root directory of this source tree. 33 + */(function(e){function t(I,A){var L=I.length;I.push(A);e:for(;0<L;){var F=L-1>>>1,U=I[F];if(0<i(U,A))I[F]=A,I[L]=U,L=F;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var A=I[0],L=I.pop();if(L!==A){I[0]=L;e:for(var F=0,U=I.length,Ee=U>>>1;F<Ee;){var J=2*(F+1)-1,Ce=I[J],me=J+1,xe=I[me];if(0>i(Ce,L))me<U&&0>i(xe,Ce)?(I[F]=xe,I[me]=L,F=me):(I[F]=Ce,I[J]=L,F=J);else if(me<U&&0>i(xe,L))I[F]=xe,I[me]=L,F=me;else break e}}return A}function i(I,A){var L=I.sortIndex-A.sortIndex;return L!==0?L:I.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var u=[],l=[],c=1,f=null,d=3,h=!1,g=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(I){for(var A=n(l);A!==null;){if(A.callback===null)r(l);else if(A.startTime<=I)r(l),A.sortIndex=A.expirationTime,t(u,A);else break;A=n(l)}}function x(I){if(v=!1,_(I),!g)if(n(u)!==null)g=!0,R(S);else{var A=n(l);A!==null&&O(x,A.startTime-I)}}function S(I,A){g=!1,v&&(v=!1,p(T),T=-1),h=!0;var L=d;try{for(_(A),f=n(u);f!==null&&(!(f.expirationTime>A)||I&&!j());){var F=f.callback;if(typeof F=="function"){f.callback=null,d=f.priorityLevel;var U=F(f.expirationTime<=A);A=e.unstable_now(),typeof U=="function"?f.callback=U:f===n(u)&&r(u),_(A)}else r(u);f=n(u)}if(f!==null)var Ee=!0;else{var J=n(l);J!==null&&O(x,J.startTime-A),Ee=!1}return Ee}finally{f=null,d=L,h=!1}}var E=!1,C=null,T=-1,M=5,k=-1;function j(){return!(e.unstable_now()-k<M)}function B(){if(C!==null){var I=e.unstable_now();k=I;var A=!0;try{A=C(!0,I)}finally{A?H():(E=!1,C=null)}}else E=!1}var H;if(typeof m=="function")H=function(){m(B)};else if(typeof MessageChannel<"u"){var b=new MessageChannel,P=b.port2;b.port1.onmessage=B,H=function(){P.postMessage(null)}}else H=function(){y(B,0)};function R(I){C=I,E||(E=!0,H())}function O(I,A){T=y(function(){I(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){g||h||(g=!0,R(S))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(I){switch(d){case 1:case 2:case 3:var A=3;break;default:A=d}var L=d;d=A;try{return I()}finally{d=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,A){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var L=d;d=I;try{return A()}finally{d=L}},e.unstable_scheduleCallback=function(I,A,L){var F=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?F+L:F):L=F,I){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=L+U,I={id:c++,callback:A,priorityLevel:I,startTime:L,expirationTime:U,sortIndex:-1},L>F?(I.sortIndex=L,t(l,I),n(u)===null&&I===n(l)&&(v?(p(T),T=-1):v=!0,O(x,L-F))):(I.sortIndex=U,t(u,I),g||h||(g=!0,R(S))),I},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(I){var A=d;return function(){var L=d;d=A;try{return I.apply(this,arguments)}finally{d=L}}}})(ew);Jx.exports=ew;var Mk=Jx.exports;/** 34 + * @license React 35 + * react-dom.production.min.js 36 + * 37 + * Copyright (c) Facebook, Inc. and its affiliates. 38 + * 39 + * This source code is licensed under the MIT license found in the 40 + * LICENSE file in the root directory of this source tree. 41 + */var Lk=N,Ze=Mk;function q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var tw=new Set,qi={};function Jn(e,t){Ar(e,t),Ar(e+"Capture",t)}function Ar(e,t){for(qi[e]=t,e=0;e<t.length;e++)tw.add(t[e])}var Ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ih=Object.prototype.hasOwnProperty,Ok=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Qv={},Xv={};function zk(e){return ih.call(Xv,e)?!0:ih.call(Qv,e)?!1:Ok.test(e)?Xv[e]=!0:(Qv[e]=!0,!1)}function Fk(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Dk(e,t,n,r){if(t===null||typeof t>"u"||Fk(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Le(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Te[e]=new Le(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Te[t]=new Le(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Te[e]=new Le(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Te[e]=new Le(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Te[e]=new Le(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Te[e]=new Le(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Te[e]=new Le(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Te[e]=new Le(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Te[e]=new Le(e,5,!1,e.toLowerCase(),null,!1,!1)});var mp=/[\-:]([a-z])/g;function yp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(mp,yp);Te[t]=new Le(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(mp,yp);Te[t]=new Le(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(mp,yp);Te[t]=new Le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Te[e]=new Le(e,1,!1,e.toLowerCase(),null,!1,!1)});Te.xlinkHref=new Le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Te[e]=new Le(e,1,!1,e.toLowerCase(),null,!0,!0)});function _p(e,t,n,r){var i=Te.hasOwnProperty(t)?Te[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Dk(t,n,i,r)&&(n=null),r||i===null?zk(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Qt=Lk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Co=Symbol.for("react.element"),pr=Symbol.for("react.portal"),vr=Symbol.for("react.fragment"),xp=Symbol.for("react.strict_mode"),oh=Symbol.for("react.profiler"),nw=Symbol.for("react.provider"),rw=Symbol.for("react.context"),wp=Symbol.for("react.forward_ref"),ah=Symbol.for("react.suspense"),sh=Symbol.for("react.suspense_list"),Sp=Symbol.for("react.memo"),rn=Symbol.for("react.lazy"),iw=Symbol.for("react.offscreen"),Zv=Symbol.iterator;function ni(e){return e===null||typeof e!="object"?null:(e=Zv&&e[Zv]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Object.assign,js;function di(e){if(js===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);js=t&&t[1]||""}return` 42 + `+js+e}var qs=!1;function As(e,t){if(!e||qs)return"";qs=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&typeof l.stack=="string"){for(var i=l.stack.split(` 43 + `),o=r.stack.split(` 44 + `),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var u=` 45 + `+i[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=s);break}}}finally{qs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?di(e):""}function $k(e){switch(e.tag){case 5:return di(e.type);case 16:return di("Lazy");case 13:return di("Suspense");case 19:return di("SuspenseList");case 0:case 2:case 15:return e=As(e.type,!1),e;case 11:return e=As(e.type.render,!1),e;case 1:return e=As(e.type,!0),e;default:return""}}function uh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case vr:return"Fragment";case pr:return"Portal";case oh:return"Profiler";case xp:return"StrictMode";case ah:return"Suspense";case sh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rw:return(e.displayName||"Context")+".Consumer";case nw:return(e._context.displayName||"Context")+".Provider";case wp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Sp:return t=e.displayName||null,t!==null?t:uh(e.type)||"Memo";case rn:t=e._payload,e=e._init;try{return uh(e(t))}catch{}}return null}function Bk(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return uh(t);case 8:return t===xp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Cn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ow(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Uk(e){var t=ow(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ko(e){e._valueTracker||(e._valueTracker=Uk(e))}function aw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ow(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function la(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function lh(e,t){var n=t.checked;return fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Cn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function sw(e,t){t=t.checked,t!=null&&_p(e,"checked",t,!1)}function ch(e,t){sw(e,t);var n=Cn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?fh(e,t.type,n):t.hasOwnProperty("defaultValue")&&fh(e,t.type,Cn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function eg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function fh(e,t,n){(t!=="number"||la(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hi=Array.isArray;function br(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Cn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function dh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(q(92));if(hi(n)){if(1<n.length)throw Error(q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Cn(n)}}function uw(e,t){var n=Cn(t.value),r=Cn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ng(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function lw(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function hh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?lw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var bo,cw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(bo=bo||document.createElement("div"),bo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=bo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ai(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ci={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Hk=["Webkit","ms","Moz","O"];Object.keys(Ci).forEach(function(e){Hk.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ci[t]=Ci[e]})});function fw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ci.hasOwnProperty(e)&&Ci[e]?(""+t).trim():t+"px"}function dw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=fw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Vk=fe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ph(e,t){if(t){if(Vk[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function vh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gh=null;function Ep(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mh=null,Tr=null,Rr=null;function rg(e){if(e=ao(e)){if(typeof mh!="function")throw Error(q(280));var t=e.stateNode;t&&(t=Qa(t),mh(e.stateNode,e.type,t))}}function hw(e){Tr?Rr?Rr.push(e):Rr=[e]:Tr=e}function pw(){if(Tr){var e=Tr,t=Rr;if(Rr=Tr=null,rg(e),t)for(e=0;e<t.length;e++)rg(t[e])}}function vw(e,t){return e(t)}function gw(){}var Ms=!1;function mw(e,t,n){if(Ms)return e(t,n);Ms=!0;try{return vw(e,t,n)}finally{Ms=!1,(Tr!==null||Rr!==null)&&(gw(),pw())}}function Mi(e,t){var n=e.stateNode;if(n===null)return null;var r=Qa(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(q(231,t,typeof n));return n}var yh=!1;if(Ht)try{var ri={};Object.defineProperty(ri,"passive",{get:function(){yh=!0}}),window.addEventListener("test",ri,ri),window.removeEventListener("test",ri,ri)}catch{yh=!1}function Gk(e,t,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var ki=!1,ca=null,fa=!1,_h=null,Wk={onError:function(e){ki=!0,ca=e}};function Kk(e,t,n,r,i,o,a,s,u){ki=!1,ca=null,Gk.apply(Wk,arguments)}function Yk(e,t,n,r,i,o,a,s,u){if(Kk.apply(this,arguments),ki){if(ki){var l=ca;ki=!1,ca=null}else throw Error(q(198));fa||(fa=!0,_h=l)}}function er(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function yw(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ig(e){if(er(e)!==e)throw Error(q(188))}function Qk(e){var t=e.alternate;if(!t){if(t=er(e),t===null)throw Error(q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ig(i),e;if(o===r)return ig(i),t;o=o.sibling}throw Error(q(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(q(189))}}if(n.alternate!==r)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?e:t}function _w(e){return e=Qk(e),e!==null?xw(e):null}function xw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=xw(e);if(t!==null)return t;e=e.sibling}return null}var ww=Ze.unstable_scheduleCallback,og=Ze.unstable_cancelCallback,Xk=Ze.unstable_shouldYield,Zk=Ze.unstable_requestPaint,he=Ze.unstable_now,Jk=Ze.unstable_getCurrentPriorityLevel,Cp=Ze.unstable_ImmediatePriority,Sw=Ze.unstable_UserBlockingPriority,da=Ze.unstable_NormalPriority,e2=Ze.unstable_LowPriority,Ew=Ze.unstable_IdlePriority,Ga=null,Tt=null;function t2(e){if(Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(Ga,e,void 0,(e.current.flags&128)===128)}catch{}}var mt=Math.clz32?Math.clz32:i2,n2=Math.log,r2=Math.LN2;function i2(e){return e>>>=0,e===0?32:31-(n2(e)/r2|0)|0}var To=64,Ro=4194304;function pi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ha(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=pi(s):(o&=a,o!==0&&(r=pi(o)))}else a=n&~i,a!==0?r=pi(a):o!==0&&(r=pi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-mt(t),i=1<<n,r|=e[n],t&=~i;return r}function o2(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function a2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-mt(o),s=1<<a,u=i[a];u===-1?(!(s&n)||s&r)&&(i[a]=o2(s,t)):u<=t&&(e.expiredLanes|=s),o&=~s}}function xh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Cw(){var e=To;return To<<=1,!(To&4194240)&&(To=64),e}function Ls(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function io(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mt(t),e[t]=n}function s2(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-mt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function kp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-mt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var X=0;function kw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var bw,bp,Tw,Rw,Nw,wh=!1,No=[],pn=null,vn=null,gn=null,Li=new Map,Oi=new Map,sn=[],u2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ag(e,t){switch(e){case"focusin":case"focusout":pn=null;break;case"dragenter":case"dragleave":vn=null;break;case"mouseover":case"mouseout":gn=null;break;case"pointerover":case"pointerout":Li.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oi.delete(t.pointerId)}}function ii(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=ao(t),t!==null&&bp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function l2(e,t,n,r,i){switch(t){case"focusin":return pn=ii(pn,e,t,n,r,i),!0;case"dragenter":return vn=ii(vn,e,t,n,r,i),!0;case"mouseover":return gn=ii(gn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Li.set(o,ii(Li.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Oi.set(o,ii(Oi.get(o)||null,e,t,n,r,i)),!0}return!1}function Iw(e){var t=zn(e.target);if(t!==null){var n=er(t);if(n!==null){if(t=n.tag,t===13){if(t=yw(n),t!==null){e.blockedOn=t,Nw(e.priority,function(){Tw(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);gh=r,n.target.dispatchEvent(r),gh=null}else return t=ao(n),t!==null&&bp(t),e.blockedOn=n,!1;t.shift()}return!0}function sg(e,t,n){Yo(e)&&n.delete(t)}function c2(){wh=!1,pn!==null&&Yo(pn)&&(pn=null),vn!==null&&Yo(vn)&&(vn=null),gn!==null&&Yo(gn)&&(gn=null),Li.forEach(sg),Oi.forEach(sg)}function oi(e,t){e.blockedOn===t&&(e.blockedOn=null,wh||(wh=!0,Ze.unstable_scheduleCallback(Ze.unstable_NormalPriority,c2)))}function zi(e){function t(i){return oi(i,e)}if(0<No.length){oi(No[0],e);for(var n=1;n<No.length;n++){var r=No[n];r.blockedOn===e&&(r.blockedOn=null)}}for(pn!==null&&oi(pn,e),vn!==null&&oi(vn,e),gn!==null&&oi(gn,e),Li.forEach(t),Oi.forEach(t),n=0;n<sn.length;n++)r=sn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<sn.length&&(n=sn[0],n.blockedOn===null);)Iw(n),n.blockedOn===null&&sn.shift()}var Nr=Qt.ReactCurrentBatchConfig,pa=!0;function f2(e,t,n,r){var i=X,o=Nr.transition;Nr.transition=null;try{X=1,Tp(e,t,n,r)}finally{X=i,Nr.transition=o}}function d2(e,t,n,r){var i=X,o=Nr.transition;Nr.transition=null;try{X=4,Tp(e,t,n,r)}finally{X=i,Nr.transition=o}}function Tp(e,t,n,r){if(pa){var i=Sh(e,t,n,r);if(i===null)Gs(e,t,r,va,n),ag(e,r);else if(l2(i,e,t,n,r))r.stopPropagation();else if(ag(e,r),t&4&&-1<u2.indexOf(e)){for(;i!==null;){var o=ao(i);if(o!==null&&bw(o),o=Sh(e,t,n,r),o===null&&Gs(e,t,r,va,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Gs(e,t,r,null,n)}}var va=null;function Sh(e,t,n,r){if(va=null,e=Ep(r),e=zn(e),e!==null)if(t=er(e),t===null)e=null;else if(n=t.tag,n===13){if(e=yw(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return va=e,null}function Pw(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Jk()){case Cp:return 1;case Sw:return 4;case da:case e2:return 16;case Ew:return 536870912;default:return 16}default:return 16}}var cn=null,Rp=null,Qo=null;function jw(){if(Qo)return Qo;var e,t=Rp,n=t.length,r,i="value"in cn?cn.value:cn.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return Qo=i.slice(e,1<r?1-r:void 0)}function Xo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Io(){return!0}function ug(){return!1}function tt(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Io:ug,this.isPropagationStopped=ug,this}return fe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Io)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Io)},persist:function(){},isPersistent:Io}),t}var Gr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Np=tt(Gr),oo=fe({},Gr,{view:0,detail:0}),h2=tt(oo),Os,zs,ai,Wa=fe({},oo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ip,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ai&&(ai&&e.type==="mousemove"?(Os=e.screenX-ai.screenX,zs=e.screenY-ai.screenY):zs=Os=0,ai=e),Os)},movementY:function(e){return"movementY"in e?e.movementY:zs}}),lg=tt(Wa),p2=fe({},Wa,{dataTransfer:0}),v2=tt(p2),g2=fe({},oo,{relatedTarget:0}),Fs=tt(g2),m2=fe({},Gr,{animationName:0,elapsedTime:0,pseudoElement:0}),y2=tt(m2),_2=fe({},Gr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),x2=tt(_2),w2=fe({},Gr,{data:0}),cg=tt(w2),S2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},E2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},C2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function k2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=C2[e])?!!t[e]:!1}function Ip(){return k2}var b2=fe({},oo,{key:function(e){if(e.key){var t=S2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Xo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?E2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ip,charCode:function(e){return e.type==="keypress"?Xo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),T2=tt(b2),R2=fe({},Wa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fg=tt(R2),N2=fe({},oo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ip}),I2=tt(N2),P2=fe({},Gr,{propertyName:0,elapsedTime:0,pseudoElement:0}),j2=tt(P2),q2=fe({},Wa,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),A2=tt(q2),M2=[9,13,27,32],Pp=Ht&&"CompositionEvent"in window,bi=null;Ht&&"documentMode"in document&&(bi=document.documentMode);var L2=Ht&&"TextEvent"in window&&!bi,qw=Ht&&(!Pp||bi&&8<bi&&11>=bi),dg=" ",hg=!1;function Aw(e,t){switch(e){case"keyup":return M2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gr=!1;function O2(e,t){switch(e){case"compositionend":return Mw(t);case"keypress":return t.which!==32?null:(hg=!0,dg);case"textInput":return e=t.data,e===dg&&hg?null:e;default:return null}}function z2(e,t){if(gr)return e==="compositionend"||!Pp&&Aw(e,t)?(e=jw(),Qo=Rp=cn=null,gr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return qw&&t.locale!=="ko"?null:t.data;default:return null}}var F2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!F2[e.type]:t==="textarea"}function Lw(e,t,n,r){hw(r),t=ga(t,"onChange"),0<t.length&&(n=new Np("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ti=null,Fi=null;function D2(e){Ww(e,0)}function Ka(e){var t=_r(e);if(aw(t))return e}function $2(e,t){if(e==="change")return t}var Ow=!1;if(Ht){var Ds;if(Ht){var $s="oninput"in document;if(!$s){var vg=document.createElement("div");vg.setAttribute("oninput","return;"),$s=typeof vg.oninput=="function"}Ds=$s}else Ds=!1;Ow=Ds&&(!document.documentMode||9<document.documentMode)}function gg(){Ti&&(Ti.detachEvent("onpropertychange",zw),Fi=Ti=null)}function zw(e){if(e.propertyName==="value"&&Ka(Fi)){var t=[];Lw(t,Fi,e,Ep(e)),mw(D2,t)}}function B2(e,t,n){e==="focusin"?(gg(),Ti=t,Fi=n,Ti.attachEvent("onpropertychange",zw)):e==="focusout"&&gg()}function U2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ka(Fi)}function H2(e,t){if(e==="click")return Ka(t)}function V2(e,t){if(e==="input"||e==="change")return Ka(t)}function G2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _t=typeof Object.is=="function"?Object.is:G2;function Di(e,t){if(_t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ih.call(t,i)||!_t(e[i],t[i]))return!1}return!0}function mg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yg(e,t){var n=mg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=mg(n)}}function Fw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dw(){for(var e=window,t=la();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=la(e.document)}return t}function jp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function W2(e){var t=Dw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Fw(n.ownerDocument.documentElement,n)){if(r!==null&&jp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=yg(n,o);var a=yg(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var K2=Ht&&"documentMode"in document&&11>=document.documentMode,mr=null,Eh=null,Ri=null,Ch=!1;function _g(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ch||mr==null||mr!==la(r)||(r=mr,"selectionStart"in r&&jp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ri&&Di(Ri,r)||(Ri=r,r=ga(Eh,"onSelect"),0<r.length&&(t=new Np("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function Po(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var yr={animationend:Po("Animation","AnimationEnd"),animationiteration:Po("Animation","AnimationIteration"),animationstart:Po("Animation","AnimationStart"),transitionend:Po("Transition","TransitionEnd")},Bs={},$w={};Ht&&($w=document.createElement("div").style,"AnimationEvent"in window||(delete yr.animationend.animation,delete yr.animationiteration.animation,delete yr.animationstart.animation),"TransitionEvent"in window||delete yr.transitionend.transition);function Ya(e){if(Bs[e])return Bs[e];if(!yr[e])return e;var t=yr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $w)return Bs[e]=t[n];return e}var Bw=Ya("animationend"),Uw=Ya("animationiteration"),Hw=Ya("animationstart"),Vw=Ya("transitionend"),Gw=new Map,xg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rn(e,t){Gw.set(e,t),Jn(t,[e])}for(var Us=0;Us<xg.length;Us++){var Hs=xg[Us],Y2=Hs.toLowerCase(),Q2=Hs[0].toUpperCase()+Hs.slice(1);Rn(Y2,"on"+Q2)}Rn(Bw,"onAnimationEnd");Rn(Uw,"onAnimationIteration");Rn(Hw,"onAnimationStart");Rn("dblclick","onDoubleClick");Rn("focusin","onFocus");Rn("focusout","onBlur");Rn(Vw,"onTransitionEnd");Ar("onMouseEnter",["mouseout","mouseover"]);Ar("onMouseLeave",["mouseout","mouseover"]);Ar("onPointerEnter",["pointerout","pointerover"]);Ar("onPointerLeave",["pointerout","pointerover"]);Jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Jn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Jn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),X2=new Set("cancel close invalid load scroll toggle".split(" ").concat(vi));function wg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Yk(r,t,void 0,e),e.currentTarget=null}function Ww(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break e;wg(i,s,l),o=u}else for(a=0;a<r.length;a++){if(s=r[a],u=s.instance,l=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break e;wg(i,s,l),o=u}}}if(fa)throw e=_h,fa=!1,_h=null,e}function oe(e,t){var n=t[Nh];n===void 0&&(n=t[Nh]=new Set);var r=e+"__bubble";n.has(r)||(Kw(t,e,2,!1),n.add(r))}function Vs(e,t,n){var r=0;t&&(r|=4),Kw(n,e,r,t)}var jo="_reactListening"+Math.random().toString(36).slice(2);function $i(e){if(!e[jo]){e[jo]=!0,tw.forEach(function(n){n!=="selectionchange"&&(X2.has(n)||Vs(n,!1,e),Vs(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jo]||(t[jo]=!0,Vs("selectionchange",!1,t))}}function Kw(e,t,n,r){switch(Pw(t)){case 1:var i=f2;break;case 4:i=d2;break;default:i=Tp}n=i.bind(null,t,n,e),i=void 0,!yh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Gs(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;a=a.return}for(;s!==null;){if(a=zn(s),a===null)return;if(u=a.tag,u===5||u===6){r=o=a;continue e}s=s.parentNode}}r=r.return}mw(function(){var l=o,c=Ep(n),f=[];e:{var d=Gw.get(e);if(d!==void 0){var h=Np,g=e;switch(e){case"keypress":if(Xo(n)===0)break e;case"keydown":case"keyup":h=T2;break;case"focusin":g="focus",h=Fs;break;case"focusout":g="blur",h=Fs;break;case"beforeblur":case"afterblur":h=Fs;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=lg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=v2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=I2;break;case Bw:case Uw:case Hw:h=y2;break;case Vw:h=j2;break;case"scroll":h=h2;break;case"wheel":h=A2;break;case"copy":case"cut":case"paste":h=x2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=fg}var v=(t&4)!==0,y=!v&&e==="scroll",p=v?d!==null?d+"Capture":null:d;v=[];for(var m=l,_;m!==null;){_=m;var x=_.stateNode;if(_.tag===5&&x!==null&&(_=x,p!==null&&(x=Mi(m,p),x!=null&&v.push(Bi(m,x,_)))),y)break;m=m.return}0<v.length&&(d=new h(d,g,null,n,c),f.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==gh&&(g=n.relatedTarget||n.fromElement)&&(zn(g)||g[Vt]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=l,g=g?zn(g):null,g!==null&&(y=er(g),g!==y||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=l),h!==g)){if(v=lg,x="onMouseLeave",p="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=fg,x="onPointerLeave",p="onPointerEnter",m="pointer"),y=h==null?d:_r(h),_=g==null?d:_r(g),d=new v(x,m+"leave",h,n,c),d.target=y,d.relatedTarget=_,x=null,zn(c)===l&&(v=new v(p,m+"enter",g,n,c),v.target=_,v.relatedTarget=y,x=v),y=x,h&&g)t:{for(v=h,p=g,m=0,_=v;_;_=cr(_))m++;for(_=0,x=p;x;x=cr(x))_++;for(;0<m-_;)v=cr(v),m--;for(;0<_-m;)p=cr(p),_--;for(;m--;){if(v===p||p!==null&&v===p.alternate)break t;v=cr(v),p=cr(p)}v=null}else v=null;h!==null&&Sg(f,d,h,v,!1),g!==null&&y!==null&&Sg(f,y,g,v,!0)}}e:{if(d=l?_r(l):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=$2;else if(pg(d))if(Ow)S=V2;else{S=U2;var E=B2}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=H2);if(S&&(S=S(e,l))){Lw(f,S,n,c);break e}E&&E(e,d,l),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&fh(d,"number",d.value)}switch(E=l?_r(l):window,e){case"focusin":(pg(E)||E.contentEditable==="true")&&(mr=E,Eh=l,Ri=null);break;case"focusout":Ri=Eh=mr=null;break;case"mousedown":Ch=!0;break;case"contextmenu":case"mouseup":case"dragend":Ch=!1,_g(f,n,c);break;case"selectionchange":if(K2)break;case"keydown":case"keyup":_g(f,n,c)}var C;if(Pp)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else gr?Aw(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(qw&&n.locale!=="ko"&&(gr||T!=="onCompositionStart"?T==="onCompositionEnd"&&gr&&(C=jw()):(cn=c,Rp="value"in cn?cn.value:cn.textContent,gr=!0)),E=ga(l,T),0<E.length&&(T=new cg(T,e,null,n,c),f.push({event:T,listeners:E}),C?T.data=C:(C=Mw(n),C!==null&&(T.data=C)))),(C=L2?O2(e,n):z2(e,n))&&(l=ga(l,"onBeforeInput"),0<l.length&&(c=new cg("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:l}),c.data=C))}Ww(f,t)})}function Bi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ga(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Mi(e,n),o!=null&&r.unshift(Bi(e,o,i)),o=Mi(e,t),o!=null&&r.push(Bi(e,o,i))),e=e.return}return r}function cr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Sg(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(u!==null&&u===r)break;s.tag===5&&l!==null&&(s=l,i?(u=Mi(n,o),u!=null&&a.unshift(Bi(n,u,s))):i||(u=Mi(n,o),u!=null&&a.push(Bi(n,u,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Z2=/\r\n?/g,J2=/\u0000|\uFFFD/g;function Eg(e){return(typeof e=="string"?e:""+e).replace(Z2,` 46 + `).replace(J2,"")}function qo(e,t,n){if(t=Eg(t),Eg(e)!==t&&n)throw Error(q(425))}function ma(){}var kh=null,bh=null;function Th(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Rh=typeof setTimeout=="function"?setTimeout:void 0,eb=typeof clearTimeout=="function"?clearTimeout:void 0,Cg=typeof Promise=="function"?Promise:void 0,tb=typeof queueMicrotask=="function"?queueMicrotask:typeof Cg<"u"?function(e){return Cg.resolve(null).then(e).catch(nb)}:Rh;function nb(e){setTimeout(function(){throw e})}function Ws(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),zi(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);zi(t)}function mn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function kg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Wr=Math.random().toString(36).slice(2),kt="__reactFiber$"+Wr,Ui="__reactProps$"+Wr,Vt="__reactContainer$"+Wr,Nh="__reactEvents$"+Wr,rb="__reactListeners$"+Wr,ib="__reactHandles$"+Wr;function zn(e){var t=e[kt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vt]||n[kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=kg(e);e!==null;){if(n=e[kt])return n;e=kg(e)}return t}e=n,n=e.parentNode}return null}function ao(e){return e=e[kt]||e[Vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function _r(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function Qa(e){return e[Ui]||null}var Ih=[],xr=-1;function Nn(e){return{current:e}}function ae(e){0>xr||(e.current=Ih[xr],Ih[xr]=null,xr--)}function re(e,t){xr++,Ih[xr]=e.current,e.current=t}var kn={},Pe=Nn(kn),Ue=Nn(!1),Wn=kn;function Mr(e,t){var n=e.type.contextTypes;if(!n)return kn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function He(e){return e=e.childContextTypes,e!=null}function ya(){ae(Ue),ae(Pe)}function bg(e,t,n){if(Pe.current!==kn)throw Error(q(168));re(Pe,t),re(Ue,n)}function Yw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(q(108,Bk(e)||"Unknown",i));return fe({},n,r)}function _a(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kn,Wn=Pe.current,re(Pe,e),re(Ue,Ue.current),!0}function Tg(e,t,n){var r=e.stateNode;if(!r)throw Error(q(169));n?(e=Yw(e,t,Wn),r.__reactInternalMemoizedMergedChildContext=e,ae(Ue),ae(Pe),re(Pe,e)):ae(Ue),re(Ue,n)}var Ot=null,Xa=!1,Ks=!1;function Qw(e){Ot===null?Ot=[e]:Ot.push(e)}function ob(e){Xa=!0,Qw(e)}function In(){if(!Ks&&Ot!==null){Ks=!0;var e=0,t=X;try{var n=Ot;for(X=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ot=null,Xa=!1}catch(i){throw Ot!==null&&(Ot=Ot.slice(e+1)),ww(Cp,In),i}finally{X=t,Ks=!1}}return null}var wr=[],Sr=0,xa=null,wa=0,nt=[],rt=0,Kn=null,zt=1,Ft="";function Mn(e,t){wr[Sr++]=wa,wr[Sr++]=xa,xa=e,wa=t}function Xw(e,t,n){nt[rt++]=zt,nt[rt++]=Ft,nt[rt++]=Kn,Kn=e;var r=zt;e=Ft;var i=32-mt(r)-1;r&=~(1<<i),n+=1;var o=32-mt(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,zt=1<<32-mt(t)+i|n<<i|r,Ft=o+e}else zt=1<<o|n<<i|r,Ft=e}function qp(e){e.return!==null&&(Mn(e,1),Xw(e,1,0))}function Ap(e){for(;e===xa;)xa=wr[--Sr],wr[Sr]=null,wa=wr[--Sr],wr[Sr]=null;for(;e===Kn;)Kn=nt[--rt],nt[rt]=null,Ft=nt[--rt],nt[rt]=null,zt=nt[--rt],nt[rt]=null}var Xe=null,Qe=null,se=!1,vt=null;function Zw(e,t){var n=it(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Rg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Xe=e,Qe=mn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Xe=e,Qe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Kn!==null?{id:zt,overflow:Ft}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=it(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Xe=e,Qe=null,!0):!1;default:return!1}}function Ph(e){return(e.mode&1)!==0&&(e.flags&128)===0}function jh(e){if(se){var t=Qe;if(t){var n=t;if(!Rg(e,t)){if(Ph(e))throw Error(q(418));t=mn(n.nextSibling);var r=Xe;t&&Rg(e,t)?Zw(r,n):(e.flags=e.flags&-4097|2,se=!1,Xe=e)}}else{if(Ph(e))throw Error(q(418));e.flags=e.flags&-4097|2,se=!1,Xe=e}}}function Ng(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Xe=e}function Ao(e){if(e!==Xe)return!1;if(!se)return Ng(e),se=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Th(e.type,e.memoizedProps)),t&&(t=Qe)){if(Ph(e))throw Jw(),Error(q(418));for(;t;)Zw(e,t),t=mn(t.nextSibling)}if(Ng(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qe=mn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qe=null}}else Qe=Xe?mn(e.stateNode.nextSibling):null;return!0}function Jw(){for(var e=Qe;e;)e=mn(e.nextSibling)}function Lr(){Qe=Xe=null,se=!1}function Mp(e){vt===null?vt=[e]:vt.push(e)}var ab=Qt.ReactCurrentBatchConfig;function si(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(q(309));var r=n.stateNode}if(!r)throw Error(q(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(q(284));if(!n._owner)throw Error(q(290,e))}return e}function Mo(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ig(e){var t=e._init;return t(e._payload)}function eS(e){function t(p,m){if(e){var _=p.deletions;_===null?(p.deletions=[m],p.flags|=16):_.push(m)}}function n(p,m){if(!e)return null;for(;m!==null;)t(p,m),m=m.sibling;return null}function r(p,m){for(p=new Map;m!==null;)m.key!==null?p.set(m.key,m):p.set(m.index,m),m=m.sibling;return p}function i(p,m){return p=wn(p,m),p.index=0,p.sibling=null,p}function o(p,m,_){return p.index=_,e?(_=p.alternate,_!==null?(_=_.index,_<m?(p.flags|=2,m):_):(p.flags|=2,m)):(p.flags|=1048576,m)}function a(p){return e&&p.alternate===null&&(p.flags|=2),p}function s(p,m,_,x){return m===null||m.tag!==6?(m=tu(_,p.mode,x),m.return=p,m):(m=i(m,_),m.return=p,m)}function u(p,m,_,x){var S=_.type;return S===vr?c(p,m,_.props.children,x,_.key):m!==null&&(m.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===rn&&Ig(S)===m.type)?(x=i(m,_.props),x.ref=si(p,m,_),x.return=p,x):(x=ia(_.type,_.key,_.props,null,p.mode,x),x.ref=si(p,m,_),x.return=p,x)}function l(p,m,_,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==_.containerInfo||m.stateNode.implementation!==_.implementation?(m=nu(_,p.mode,x),m.return=p,m):(m=i(m,_.children||[]),m.return=p,m)}function c(p,m,_,x,S){return m===null||m.tag!==7?(m=Hn(_,p.mode,x,S),m.return=p,m):(m=i(m,_),m.return=p,m)}function f(p,m,_){if(typeof m=="string"&&m!==""||typeof m=="number")return m=tu(""+m,p.mode,_),m.return=p,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Co:return _=ia(m.type,m.key,m.props,null,p.mode,_),_.ref=si(p,null,m),_.return=p,_;case pr:return m=nu(m,p.mode,_),m.return=p,m;case rn:var x=m._init;return f(p,x(m._payload),_)}if(hi(m)||ni(m))return m=Hn(m,p.mode,_,null),m.return=p,m;Mo(p,m)}return null}function d(p,m,_,x){var S=m!==null?m.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return S!==null?null:s(p,m,""+_,x);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Co:return _.key===S?u(p,m,_,x):null;case pr:return _.key===S?l(p,m,_,x):null;case rn:return S=_._init,d(p,m,S(_._payload),x)}if(hi(_)||ni(_))return S!==null?null:c(p,m,_,x,null);Mo(p,_)}return null}function h(p,m,_,x,S){if(typeof x=="string"&&x!==""||typeof x=="number")return p=p.get(_)||null,s(m,p,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Co:return p=p.get(x.key===null?_:x.key)||null,u(m,p,x,S);case pr:return p=p.get(x.key===null?_:x.key)||null,l(m,p,x,S);case rn:var E=x._init;return h(p,m,_,E(x._payload),S)}if(hi(x)||ni(x))return p=p.get(_)||null,c(m,p,x,S,null);Mo(m,x)}return null}function g(p,m,_,x){for(var S=null,E=null,C=m,T=m=0,M=null;C!==null&&T<_.length;T++){C.index>T?(M=C,C=null):M=C.sibling;var k=d(p,C,_[T],x);if(k===null){C===null&&(C=M);break}e&&C&&k.alternate===null&&t(p,C),m=o(k,m,T),E===null?S=k:E.sibling=k,E=k,C=M}if(T===_.length)return n(p,C),se&&Mn(p,T),S;if(C===null){for(;T<_.length;T++)C=f(p,_[T],x),C!==null&&(m=o(C,m,T),E===null?S=C:E.sibling=C,E=C);return se&&Mn(p,T),S}for(C=r(p,C);T<_.length;T++)M=h(C,p,T,_[T],x),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?T:M.key),m=o(M,m,T),E===null?S=M:E.sibling=M,E=M);return e&&C.forEach(function(j){return t(p,j)}),se&&Mn(p,T),S}function v(p,m,_,x){var S=ni(_);if(typeof S!="function")throw Error(q(150));if(_=S.call(_),_==null)throw Error(q(151));for(var E=S=null,C=m,T=m=0,M=null,k=_.next();C!==null&&!k.done;T++,k=_.next()){C.index>T?(M=C,C=null):M=C.sibling;var j=d(p,C,k.value,x);if(j===null){C===null&&(C=M);break}e&&C&&j.alternate===null&&t(p,C),m=o(j,m,T),E===null?S=j:E.sibling=j,E=j,C=M}if(k.done)return n(p,C),se&&Mn(p,T),S;if(C===null){for(;!k.done;T++,k=_.next())k=f(p,k.value,x),k!==null&&(m=o(k,m,T),E===null?S=k:E.sibling=k,E=k);return se&&Mn(p,T),S}for(C=r(p,C);!k.done;T++,k=_.next())k=h(C,p,T,k.value,x),k!==null&&(e&&k.alternate!==null&&C.delete(k.key===null?T:k.key),m=o(k,m,T),E===null?S=k:E.sibling=k,E=k);return e&&C.forEach(function(B){return t(p,B)}),se&&Mn(p,T),S}function y(p,m,_,x){if(typeof _=="object"&&_!==null&&_.type===vr&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Co:e:{for(var S=_.key,E=m;E!==null;){if(E.key===S){if(S=_.type,S===vr){if(E.tag===7){n(p,E.sibling),m=i(E,_.props.children),m.return=p,p=m;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===rn&&Ig(S)===E.type){n(p,E.sibling),m=i(E,_.props),m.ref=si(p,E,_),m.return=p,p=m;break e}n(p,E);break}else t(p,E);E=E.sibling}_.type===vr?(m=Hn(_.props.children,p.mode,x,_.key),m.return=p,p=m):(x=ia(_.type,_.key,_.props,null,p.mode,x),x.ref=si(p,m,_),x.return=p,p=x)}return a(p);case pr:e:{for(E=_.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===_.containerInfo&&m.stateNode.implementation===_.implementation){n(p,m.sibling),m=i(m,_.children||[]),m.return=p,p=m;break e}else{n(p,m);break}else t(p,m);m=m.sibling}m=nu(_,p.mode,x),m.return=p,p=m}return a(p);case rn:return E=_._init,y(p,m,E(_._payload),x)}if(hi(_))return g(p,m,_,x);if(ni(_))return v(p,m,_,x);Mo(p,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,m!==null&&m.tag===6?(n(p,m.sibling),m=i(m,_),m.return=p,p=m):(n(p,m),m=tu(_,p.mode,x),m.return=p,p=m),a(p)):n(p,m)}return y}var Or=eS(!0),tS=eS(!1),Sa=Nn(null),Ea=null,Er=null,Lp=null;function Op(){Lp=Er=Ea=null}function zp(e){var t=Sa.current;ae(Sa),e._currentValue=t}function qh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ir(e,t){Ea=e,Lp=Er=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&($e=!0),e.firstContext=null)}function at(e){var t=e._currentValue;if(Lp!==e)if(e={context:e,memoizedValue:t,next:null},Er===null){if(Ea===null)throw Error(q(308));Er=e,Ea.dependencies={lanes:0,firstContext:e}}else Er=Er.next=e;return t}var Fn=null;function Fp(e){Fn===null?Fn=[e]:Fn.push(e)}function nS(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Fp(t)):(n.next=i.next,i.next=n),t.interleaved=n,Gt(e,r)}function Gt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var on=!1;function Dp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ut(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Gt(e,n)}return i=r.interleaved,i===null?(t.next=t,Fp(r)):(t.next=i.next,i.next=t),r.interleaved=t,Gt(e,n)}function Zo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kp(e,n)}}function Pg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ca(e,t,n,r){var i=e.updateQueue;on=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,l=u.next;u.next=null,a===null?o=l:a.next=l,a=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u))}if(o!==null){var f=i.baseState;a=0,c=l=u=null,s=o;do{var d=s.lane,h=s.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,v=s;switch(d=t,h=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){f=g.call(h,f,d);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,d=typeof g=="function"?g.call(h,f,d):g,d==null)break e;f=fe({},f,d);break e;case 2:on=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(l=c=h,u=f):c=c.next=h,a|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Qn|=a,e.lanes=a,e.memoizedState=f}}function jg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(q(191,i));i.call(r)}}}var so={},Rt=Nn(so),Hi=Nn(so),Vi=Nn(so);function Dn(e){if(e===so)throw Error(q(174));return e}function $p(e,t){switch(re(Vi,t),re(Hi,e),re(Rt,so),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:hh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=hh(t,e)}ae(Rt),re(Rt,t)}function zr(){ae(Rt),ae(Hi),ae(Vi)}function iS(e){Dn(Vi.current);var t=Dn(Rt.current),n=hh(t,e.type);t!==n&&(re(Hi,e),re(Rt,n))}function Bp(e){Hi.current===e&&(ae(Rt),ae(Hi))}var le=Nn(0);function ka(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ys=[];function Up(){for(var e=0;e<Ys.length;e++)Ys[e]._workInProgressVersionPrimary=null;Ys.length=0}var Jo=Qt.ReactCurrentDispatcher,Qs=Qt.ReactCurrentBatchConfig,Yn=0,ce=null,ye=null,we=null,ba=!1,Ni=!1,Gi=0,sb=0;function Re(){throw Error(q(321))}function Hp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_t(e[n],t[n]))return!1;return!0}function Vp(e,t,n,r,i,o){if(Yn=o,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Jo.current=e===null||e.memoizedState===null?fb:db,e=n(r,i),Ni){o=0;do{if(Ni=!1,Gi=0,25<=o)throw Error(q(301));o+=1,we=ye=null,t.updateQueue=null,Jo.current=hb,e=n(r,i)}while(Ni)}if(Jo.current=Ta,t=ye!==null&&ye.next!==null,Yn=0,we=ye=ce=null,ba=!1,t)throw Error(q(300));return e}function Gp(){var e=Gi!==0;return Gi=0,e}function Ct(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return we===null?ce.memoizedState=we=e:we=we.next=e,we}function st(){if(ye===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=ye.next;var t=we===null?ce.memoizedState:we.next;if(t!==null)we=t,ye=e;else{if(e===null)throw Error(q(310));ye=e,e={memoizedState:ye.memoizedState,baseState:ye.baseState,baseQueue:ye.baseQueue,queue:ye.queue,next:null},we===null?ce.memoizedState=we=e:we=we.next=e}return we}function Wi(e,t){return typeof t=="function"?t(e):t}function Xs(e){var t=st(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=ye,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,u=null,l=o;do{var c=l.lane;if((Yn&c)===c)u!==null&&(u=u.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var f={lane:c,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};u===null?(s=u=f,a=r):u=u.next=f,ce.lanes|=c,Qn|=c}l=l.next}while(l!==null&&l!==o);u===null?a=r:u.next=s,_t(r,t.memoizedState)||($e=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,ce.lanes|=o,Qn|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Zs(e){var t=st(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);_t(o,t.memoizedState)||($e=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function oS(){}function aS(e,t){var n=ce,r=st(),i=t(),o=!_t(r.memoizedState,i);if(o&&(r.memoizedState=i,$e=!0),r=r.queue,Wp(lS.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||we!==null&&we.memoizedState.tag&1){if(n.flags|=2048,Ki(9,uS.bind(null,n,r,i,t),void 0,null),Se===null)throw Error(q(349));Yn&30||sS(n,t,i)}return i}function sS(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ce.updateQueue,t===null?(t={lastEffect:null,stores:null},ce.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function uS(e,t,n,r){t.value=n,t.getSnapshot=r,cS(t)&&fS(e)}function lS(e,t,n){return n(function(){cS(t)&&fS(e)})}function cS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_t(e,n)}catch{return!0}}function fS(e){var t=Gt(e,1);t!==null&&yt(t,e,1,-1)}function qg(e){var t=Ct();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:e},t.queue=e,e=e.dispatch=cb.bind(null,ce,e),[t.memoizedState,e]}function Ki(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ce.updateQueue,t===null?(t={lastEffect:null,stores:null},ce.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function dS(){return st().memoizedState}function ea(e,t,n,r){var i=Ct();ce.flags|=e,i.memoizedState=Ki(1|t,n,void 0,r===void 0?null:r)}function Za(e,t,n,r){var i=st();r=r===void 0?null:r;var o=void 0;if(ye!==null){var a=ye.memoizedState;if(o=a.destroy,r!==null&&Hp(r,a.deps)){i.memoizedState=Ki(t,n,o,r);return}}ce.flags|=e,i.memoizedState=Ki(1|t,n,o,r)}function Ag(e,t){return ea(8390656,8,e,t)}function Wp(e,t){return Za(2048,8,e,t)}function hS(e,t){return Za(4,2,e,t)}function pS(e,t){return Za(4,4,e,t)}function vS(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gS(e,t,n){return n=n!=null?n.concat([e]):null,Za(4,4,vS.bind(null,t,e),n)}function Kp(){}function mS(e,t){var n=st();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Hp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function yS(e,t){var n=st();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Hp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function _S(e,t,n){return Yn&21?(_t(n,t)||(n=Cw(),ce.lanes|=n,Qn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,$e=!0),e.memoizedState=n)}function ub(e,t){var n=X;X=n!==0&&4>n?n:4,e(!0);var r=Qs.transition;Qs.transition={};try{e(!1),t()}finally{X=n,Qs.transition=r}}function xS(){return st().memoizedState}function lb(e,t,n){var r=xn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},wS(e))SS(t,n);else if(n=nS(e,t,n,r),n!==null){var i=Ae();yt(n,e,r,i),ES(n,t,r)}}function cb(e,t,n){var r=xn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(wS(e))SS(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,_t(s,a)){var u=t.interleaved;u===null?(i.next=i,Fp(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=nS(e,t,i,r),n!==null&&(i=Ae(),yt(n,e,r,i),ES(n,t,r))}}function wS(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function SS(e,t){Ni=ba=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ES(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kp(e,n)}}var Ta={readContext:at,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useInsertionEffect:Re,useLayoutEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useMutableSource:Re,useSyncExternalStore:Re,useId:Re,unstable_isNewReconciler:!1},fb={readContext:at,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:Ag,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ea(4194308,4,vS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ea(4194308,4,e,t)},useInsertionEffect:function(e,t){return ea(4,2,e,t)},useMemo:function(e,t){var n=Ct();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ct();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=lb.bind(null,ce,e),[r.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:qg,useDebugValue:Kp,useDeferredValue:function(e){return Ct().memoizedState=e},useTransition:function(){var e=qg(!1),t=e[0];return e=ub.bind(null,e[1]),Ct().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ce,i=Ct();if(se){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),Se===null)throw Error(q(349));Yn&30||sS(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ag(lS.bind(null,r,o,e),[e]),r.flags|=2048,Ki(9,uS.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ct(),t=Se.identifierPrefix;if(se){var n=Ft,r=zt;n=(r&~(1<<32-mt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Gi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=sb++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},db={readContext:at,useCallback:mS,useContext:at,useEffect:Wp,useImperativeHandle:gS,useInsertionEffect:hS,useLayoutEffect:pS,useMemo:yS,useReducer:Xs,useRef:dS,useState:function(){return Xs(Wi)},useDebugValue:Kp,useDeferredValue:function(e){var t=st();return _S(t,ye.memoizedState,e)},useTransition:function(){var e=Xs(Wi)[0],t=st().memoizedState;return[e,t]},useMutableSource:oS,useSyncExternalStore:aS,useId:xS,unstable_isNewReconciler:!1},hb={readContext:at,useCallback:mS,useContext:at,useEffect:Wp,useImperativeHandle:gS,useInsertionEffect:hS,useLayoutEffect:pS,useMemo:yS,useReducer:Zs,useRef:dS,useState:function(){return Zs(Wi)},useDebugValue:Kp,useDeferredValue:function(e){var t=st();return ye===null?t.memoizedState=e:_S(t,ye.memoizedState,e)},useTransition:function(){var e=Zs(Wi)[0],t=st().memoizedState;return[e,t]},useMutableSource:oS,useSyncExternalStore:aS,useId:xS,unstable_isNewReconciler:!1};function ht(e,t){if(e&&e.defaultProps){t=fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ah(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ja={isMounted:function(e){return(e=e._reactInternals)?er(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ae(),i=xn(e),o=Ut(r,i);o.payload=t,n!=null&&(o.callback=n),t=yn(e,o,i),t!==null&&(yt(t,e,i,r),Zo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ae(),i=xn(e),o=Ut(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=yn(e,o,i),t!==null&&(yt(t,e,i,r),Zo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ae(),r=xn(e),i=Ut(n,r);i.tag=2,t!=null&&(i.callback=t),t=yn(e,i,r),t!==null&&(yt(t,e,r,n),Zo(t,e,r))}};function Mg(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Di(n,r)||!Di(i,o):!0}function CS(e,t,n){var r=!1,i=kn,o=t.contextType;return typeof o=="object"&&o!==null?o=at(o):(i=He(t)?Wn:Pe.current,r=t.contextTypes,o=(r=r!=null)?Mr(e,i):kn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ja,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Lg(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ja.enqueueReplaceState(t,t.state,null)}function Mh(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Dp(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=at(o):(o=He(t)?Wn:Pe.current,i.context=Mr(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Ah(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ja.enqueueReplaceState(i,i.state,null),Ca(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Fr(e,t){try{var n="",r=t;do n+=$k(r),r=r.return;while(r);var i=n}catch(o){i=` 47 + Error generating stack: `+o.message+` 48 + `+o.stack}return{value:e,source:t,stack:i,digest:null}}function Js(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Lh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var pb=typeof WeakMap=="function"?WeakMap:Map;function kS(e,t,n){n=Ut(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Na||(Na=!0,Gh=r),Lh(e,t)},n}function bS(e,t,n){n=Ut(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Lh(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Lh(e,t),typeof r!="function"&&(_n===null?_n=new Set([this]):_n.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Og(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new pb;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Rb.bind(null,e,t,n),t.then(e,e))}function zg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Fg(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ut(-1,1),t.tag=2,yn(n,t,1))),n.lanes|=1),e)}var vb=Qt.ReactCurrentOwner,$e=!1;function je(e,t,n,r){t.child=e===null?tS(t,null,n,r):Or(t,e.child,n,r)}function Dg(e,t,n,r,i){n=n.render;var o=t.ref;return Ir(t,i),r=Vp(e,t,n,r,o,i),n=Gp(),e!==null&&!$e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wt(e,t,i)):(se&&n&&qp(t),t.flags|=1,je(e,t,r,i),t.child)}function $g(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!nv(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,TS(e,t,o,r,i)):(e=ia(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Di,n(a,r)&&e.ref===t.ref)return Wt(e,t,i)}return t.flags|=1,e=wn(o,r),e.ref=t.ref,e.return=t,t.child=e}function TS(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Di(o,r)&&e.ref===t.ref)if($e=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&($e=!0);else return t.lanes=e.lanes,Wt(e,t,i)}return Oh(e,t,n,r,i)}function RS(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},re(kr,Ke),Ke|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,re(kr,Ke),Ke|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,re(kr,Ke),Ke|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,re(kr,Ke),Ke|=r;return je(e,t,i,n),t.child}function NS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Oh(e,t,n,r,i){var o=He(n)?Wn:Pe.current;return o=Mr(t,o),Ir(t,i),n=Vp(e,t,n,r,o,i),r=Gp(),e!==null&&!$e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wt(e,t,i)):(se&&r&&qp(t),t.flags|=1,je(e,t,n,i),t.child)}function Bg(e,t,n,r,i){if(He(n)){var o=!0;_a(t)}else o=!1;if(Ir(t,i),t.stateNode===null)ta(e,t),CS(t,n,r),Mh(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;typeof l=="object"&&l!==null?l=at(l):(l=He(n)?Wn:Pe.current,l=Mr(t,l));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||u!==l)&&Lg(t,a,r,l),on=!1;var d=t.memoizedState;a.state=d,Ca(t,r,a,i),u=t.memoizedState,s!==r||d!==u||Ue.current||on?(typeof c=="function"&&(Ah(t,n,c,r),u=t.memoizedState),(s=on||Mg(t,n,s,r,d,u,l))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,rS(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:ht(t.type,s),a.props=l,f=t.pendingProps,d=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=at(u):(u=He(n)?Wn:Pe.current,u=Mr(t,u));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==f||d!==u)&&Lg(t,a,r,u),on=!1,d=t.memoizedState,a.state=d,Ca(t,r,a,i);var g=t.memoizedState;s!==f||d!==g||Ue.current||on?(typeof h=="function"&&(Ah(t,n,h,r),g=t.memoizedState),(l=on||Mg(t,n,l,r,d,g,u)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=u,r=l):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return zh(e,t,n,r,o,i)}function zh(e,t,n,r,i,o){NS(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Tg(t,n,!1),Wt(e,t,o);r=t.stateNode,vb.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Or(t,e.child,null,o),t.child=Or(t,null,s,o)):je(e,t,s,o),t.memoizedState=r.state,i&&Tg(t,n,!0),t.child}function IS(e){var t=e.stateNode;t.pendingContext?bg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&bg(e,t.context,!1),$p(e,t.containerInfo)}function Ug(e,t,n,r,i){return Lr(),Mp(i),t.flags|=256,je(e,t,n,r),t.child}var Fh={dehydrated:null,treeContext:null,retryLane:0};function Dh(e){return{baseLanes:e,cachePool:null,transitions:null}}function PS(e,t,n){var r=t.pendingProps,i=le.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),re(le,i&1),e===null)return jh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=ns(a,r,0,null),e=Hn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Dh(n),t.memoizedState=Fh,e):Yp(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return gb(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=wn(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=wn(s,o):(o=Hn(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?Dh(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=Fh,r}return o=e.child,e=o.sibling,r=wn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Yp(e,t){return t=ns({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lo(e,t,n,r){return r!==null&&Mp(r),Or(t,e.child,null,n),e=Yp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gb(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Js(Error(q(422))),Lo(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=ns({mode:"visible",children:r.children},i,0,null),o=Hn(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Or(t,e.child,null,a),t.child.memoizedState=Dh(a),t.memoizedState=Fh,o);if(!(t.mode&1))return Lo(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(q(419)),r=Js(o,r,void 0),Lo(e,t,a,r)}if(s=(a&e.childLanes)!==0,$e||s){if(r=Se,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Gt(e,i),yt(r,e,i,-1))}return tv(),r=Js(Error(q(421))),Lo(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Nb.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Qe=mn(i.nextSibling),Xe=t,se=!0,vt=null,e!==null&&(nt[rt++]=zt,nt[rt++]=Ft,nt[rt++]=Kn,zt=e.id,Ft=e.overflow,Kn=t),t=Yp(t,r.children),t.flags|=4096,t)}function Hg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qh(e.return,t,n)}function eu(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function jS(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(je(e,t,r.children,n),r=le.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hg(e,n,t);else if(e.tag===19)Hg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(re(le,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ka(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),eu(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ka(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}eu(t,!0,n,null,o);break;case"together":eu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ta(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,n=wn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mb(e,t,n){switch(t.tag){case 3:IS(t),Lr();break;case 5:iS(t);break;case 1:He(t.type)&&_a(t);break;case 4:$p(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;re(Sa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(re(le,le.current&1),t.flags|=128,null):n&t.child.childLanes?PS(e,t,n):(re(le,le.current&1),e=Wt(e,t,n),e!==null?e.sibling:null);re(le,le.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return jS(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),re(le,le.current),r)break;return null;case 22:case 23:return t.lanes=0,RS(e,t,n)}return Wt(e,t,n)}var qS,$h,AS,MS;qS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};$h=function(){};AS=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Dn(Rt.current);var o=null;switch(n){case"input":i=lh(e,i),r=lh(e,r),o=[];break;case"select":i=fe({},i,{value:void 0}),r=fe({},r,{value:void 0}),o=[];break;case"textarea":i=dh(e,i),r=dh(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ma)}ph(n,r);var a;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(qi.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var u=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(qi.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&oe("scroll",e),o||s===u||(o=[])):(o=o||[]).push(l,u))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}};MS=function(e,t,n,r){n!==r&&(t.flags|=4)};function ui(e,t){if(!se)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ne(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yb(e,t,n){var r=t.pendingProps;switch(Ap(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ne(t),null;case 1:return He(t.type)&&ya(),Ne(t),null;case 3:return r=t.stateNode,zr(),ae(Ue),ae(Pe),Up(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ao(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,vt!==null&&(Yh(vt),vt=null))),$h(e,t),Ne(t),null;case 5:Bp(t);var i=Dn(Vi.current);if(n=t.type,e!==null&&t.stateNode!=null)AS(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(q(166));return Ne(t),null}if(e=Dn(Rt.current),Ao(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[kt]=t,r[Ui]=o,e=(t.mode&1)!==0,n){case"dialog":oe("cancel",r),oe("close",r);break;case"iframe":case"object":case"embed":oe("load",r);break;case"video":case"audio":for(i=0;i<vi.length;i++)oe(vi[i],r);break;case"source":oe("error",r);break;case"img":case"image":case"link":oe("error",r),oe("load",r);break;case"details":oe("toggle",r);break;case"input":Jv(r,o),oe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},oe("invalid",r);break;case"textarea":tg(r,o),oe("invalid",r)}ph(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&qo(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&qo(r.textContent,s,e),i=["children",""+s]):qi.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&oe("scroll",r)}switch(n){case"input":ko(r),eg(r,o,!0);break;case"textarea":ko(r),ng(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=ma)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=lw(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[kt]=t,e[Ui]=r,qS(e,t,!1,!1),t.stateNode=e;e:{switch(a=vh(n,r),n){case"dialog":oe("cancel",e),oe("close",e),i=r;break;case"iframe":case"object":case"embed":oe("load",e),i=r;break;case"video":case"audio":for(i=0;i<vi.length;i++)oe(vi[i],e);i=r;break;case"source":oe("error",e),i=r;break;case"img":case"image":case"link":oe("error",e),oe("load",e),i=r;break;case"details":oe("toggle",e),i=r;break;case"input":Jv(e,r),i=lh(e,r),oe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=fe({},r,{value:void 0}),oe("invalid",e);break;case"textarea":tg(e,r),i=dh(e,r),oe("invalid",e);break;default:i=r}ph(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var u=s[o];o==="style"?dw(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&cw(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Ai(e,u):typeof u=="number"&&Ai(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(qi.hasOwnProperty(o)?u!=null&&o==="onScroll"&&oe("scroll",e):u!=null&&_p(e,o,u,a))}switch(n){case"input":ko(e),eg(e,r,!1);break;case"textarea":ko(e),ng(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Cn(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?br(e,!!r.multiple,o,!1):r.defaultValue!=null&&br(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ma)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ne(t),null;case 6:if(e&&t.stateNode!=null)MS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(n=Dn(Vi.current),Dn(Rt.current),Ao(t)){if(r=t.stateNode,n=t.memoizedProps,r[kt]=t,(o=r.nodeValue!==n)&&(e=Xe,e!==null))switch(e.tag){case 3:qo(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qo(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kt]=t,t.stateNode=r}return Ne(t),null;case 13:if(ae(le),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(se&&Qe!==null&&t.mode&1&&!(t.flags&128))Jw(),Lr(),t.flags|=98560,o=!1;else if(o=Ao(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(q(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(q(317));o[kt]=t}else Lr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ne(t),o=!1}else vt!==null&&(Yh(vt),vt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||le.current&1?_e===0&&(_e=3):tv())),t.updateQueue!==null&&(t.flags|=4),Ne(t),null);case 4:return zr(),$h(e,t),e===null&&$i(t.stateNode.containerInfo),Ne(t),null;case 10:return zp(t.type._context),Ne(t),null;case 17:return He(t.type)&&ya(),Ne(t),null;case 19:if(ae(le),o=t.memoizedState,o===null)return Ne(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)ui(o,!1);else{if(_e!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ka(e),a!==null){for(t.flags|=128,ui(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return re(le,le.current&1|2),t.child}e=e.sibling}o.tail!==null&&he()>Dr&&(t.flags|=128,r=!0,ui(o,!1),t.lanes=4194304)}else{if(!r)if(e=ka(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ui(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!se)return Ne(t),null}else 2*he()-o.renderingStartTime>Dr&&n!==1073741824&&(t.flags|=128,r=!0,ui(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=he(),t.sibling=null,n=le.current,re(le,r?n&1|2:n&1),t):(Ne(t),null);case 22:case 23:return ev(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ke&1073741824&&(Ne(t),t.subtreeFlags&6&&(t.flags|=8192)):Ne(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function _b(e,t){switch(Ap(t),t.tag){case 1:return He(t.type)&&ya(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zr(),ae(Ue),ae(Pe),Up(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Bp(t),null;case 13:if(ae(le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Lr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(le),null;case 4:return zr(),null;case 10:return zp(t.type._context),null;case 22:case 23:return ev(),null;case 24:return null;default:return null}}var Oo=!1,Ie=!1,xb=typeof WeakSet=="function"?WeakSet:Set,z=null;function Cr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){de(e,t,r)}else n.current=null}function Bh(e,t,n){try{n()}catch(r){de(e,t,r)}}var Vg=!1;function wb(e,t){if(kh=pa,e=Dw(),jp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,l=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(s=a+i),f!==o||r!==0&&f.nodeType!==3||(u=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++l===i&&(s=a),d===o&&++c===r&&(u=a),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(bh={focusedElem:e,selectionRange:n},pa=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,y=g.memoizedState,p=t.stateNode,m=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:ht(t.type,v),y);p.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(x){de(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return g=Vg,Vg=!1,g}function Ii(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Bh(t,n,o)}i=i.next}while(i!==r)}}function es(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Uh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function LS(e){var t=e.alternate;t!==null&&(e.alternate=null,LS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kt],delete t[Ui],delete t[Nh],delete t[rb],delete t[ib])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function OS(e){return e.tag===5||e.tag===3||e.tag===4}function Gg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||OS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ma));else if(r!==4&&(e=e.child,e!==null))for(Hh(e,t,n),e=e.sibling;e!==null;)Hh(e,t,n),e=e.sibling}function Vh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Vh(e,t,n),e=e.sibling;e!==null;)Vh(e,t,n),e=e.sibling}var ke=null,pt=!1;function tn(e,t,n){for(n=n.child;n!==null;)zS(e,t,n),n=n.sibling}function zS(e,t,n){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(Ga,n)}catch{}switch(n.tag){case 5:Ie||Cr(n,t);case 6:var r=ke,i=pt;ke=null,tn(e,t,n),ke=r,pt=i,ke!==null&&(pt?(e=ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ke.removeChild(n.stateNode));break;case 18:ke!==null&&(pt?(e=ke,n=n.stateNode,e.nodeType===8?Ws(e.parentNode,n):e.nodeType===1&&Ws(e,n),zi(e)):Ws(ke,n.stateNode));break;case 4:r=ke,i=pt,ke=n.stateNode.containerInfo,pt=!0,tn(e,t,n),ke=r,pt=i;break;case 0:case 11:case 14:case 15:if(!Ie&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Bh(n,t,a),i=i.next}while(i!==r)}tn(e,t,n);break;case 1:if(!Ie&&(Cr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){de(n,t,s)}tn(e,t,n);break;case 21:tn(e,t,n);break;case 22:n.mode&1?(Ie=(r=Ie)||n.memoizedState!==null,tn(e,t,n),Ie=r):tn(e,t,n);break;default:tn(e,t,n)}}function Wg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new xb),t.forEach(function(r){var i=Ib.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function dt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:ke=s.stateNode,pt=!1;break e;case 3:ke=s.stateNode.containerInfo,pt=!0;break e;case 4:ke=s.stateNode.containerInfo,pt=!0;break e}s=s.return}if(ke===null)throw Error(q(160));zS(o,a,i),ke=null,pt=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){de(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)FS(t,e),t=t.sibling}function FS(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dt(t,e),Et(e),r&4){try{Ii(3,e,e.return),es(3,e)}catch(v){de(e,e.return,v)}try{Ii(5,e,e.return)}catch(v){de(e,e.return,v)}}break;case 1:dt(t,e),Et(e),r&512&&n!==null&&Cr(n,n.return);break;case 5:if(dt(t,e),Et(e),r&512&&n!==null&&Cr(n,n.return),e.flags&32){var i=e.stateNode;try{Ai(i,"")}catch(v){de(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&sw(i,o),vh(s,a);var l=vh(s,o);for(a=0;a<u.length;a+=2){var c=u[a],f=u[a+1];c==="style"?dw(i,f):c==="dangerouslySetInnerHTML"?cw(i,f):c==="children"?Ai(i,f):_p(i,c,f,l)}switch(s){case"input":ch(i,o);break;case"textarea":uw(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?br(i,!!o.multiple,h,!1):d!==!!o.multiple&&(o.defaultValue!=null?br(i,!!o.multiple,o.defaultValue,!0):br(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ui]=o}catch(v){de(e,e.return,v)}}break;case 6:if(dt(t,e),Et(e),r&4){if(e.stateNode===null)throw Error(q(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){de(e,e.return,v)}}break;case 3:if(dt(t,e),Et(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zi(t.containerInfo)}catch(v){de(e,e.return,v)}break;case 4:dt(t,e),Et(e);break;case 13:dt(t,e),Et(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Zp=he())),r&4&&Wg(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Ie=(l=Ie)||c,dt(t,e),Ie=l):dt(t,e),Et(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!c&&e.mode&1)for(z=e,c=e.child;c!==null;){for(f=z=c;z!==null;){switch(d=z,h=d.child,d.tag){case 0:case 11:case 14:case 15:Ii(4,d,d.return);break;case 1:Cr(d,d.return);var g=d.stateNode;if(typeof g.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(v){de(r,n,v)}}break;case 5:Cr(d,d.return);break;case 22:if(d.memoizedState!==null){Yg(f);continue}}h!==null?(h.return=d,z=h):Yg(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,l?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=f.stateNode,u=f.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=fw("display",a))}catch(v){de(e,e.return,v)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=l?"":f.memoizedProps}catch(v){de(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:dt(t,e),Et(e),r&4&&Wg(e);break;case 21:break;default:dt(t,e),Et(e)}}function Et(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(OS(n)){var r=n;break e}n=n.return}throw Error(q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ai(i,""),r.flags&=-33);var o=Gg(e);Vh(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=Gg(e);Hh(e,s,a);break;default:throw Error(q(161))}}catch(u){de(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sb(e,t,n){z=e,DS(e)}function DS(e,t,n){for(var r=(e.mode&1)!==0;z!==null;){var i=z,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||Oo;if(!a){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Ie;s=Oo;var l=Ie;if(Oo=a,(Ie=u)&&!l)for(z=i;z!==null;)a=z,u=a.child,a.tag===22&&a.memoizedState!==null?Qg(i):u!==null?(u.return=a,z=u):Qg(i);for(;o!==null;)z=o,DS(o),o=o.sibling;z=i,Oo=s,Ie=l}Kg(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,z=o):Kg(e)}}function Kg(e){for(;z!==null;){var t=z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ie||es(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ie)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ht(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&jg(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}jg(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var c=l.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&zi(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}Ie||t.flags&512&&Uh(t)}catch(d){de(t,t.return,d)}}if(t===e){z=null;break}if(n=t.sibling,n!==null){n.return=t.return,z=n;break}z=t.return}}function Yg(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,z=n;break}z=t.return}}function Qg(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{es(4,t)}catch(u){de(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){de(t,i,u)}}var o=t.return;try{Uh(t)}catch(u){de(t,o,u)}break;case 5:var a=t.return;try{Uh(t)}catch(u){de(t,a,u)}}}catch(u){de(t,t.return,u)}if(t===e){z=null;break}var s=t.sibling;if(s!==null){s.return=t.return,z=s;break}z=t.return}}var Eb=Math.ceil,Ra=Qt.ReactCurrentDispatcher,Qp=Qt.ReactCurrentOwner,ot=Qt.ReactCurrentBatchConfig,W=0,Se=null,ve=null,be=0,Ke=0,kr=Nn(0),_e=0,Yi=null,Qn=0,ts=0,Xp=0,Pi=null,Fe=null,Zp=0,Dr=1/0,Mt=null,Na=!1,Gh=null,_n=null,zo=!1,fn=null,Ia=0,ji=0,Wh=null,na=-1,ra=0;function Ae(){return W&6?he():na!==-1?na:na=he()}function xn(e){return e.mode&1?W&2&&be!==0?be&-be:ab.transition!==null?(ra===0&&(ra=Cw()),ra):(e=X,e!==0||(e=window.event,e=e===void 0?16:Pw(e.type)),e):1}function yt(e,t,n,r){if(50<ji)throw ji=0,Wh=null,Error(q(185));io(e,n,r),(!(W&2)||e!==Se)&&(e===Se&&(!(W&2)&&(ts|=n),_e===4&&un(e,be)),Ve(e,r),n===1&&W===0&&!(t.mode&1)&&(Dr=he()+500,Xa&&In()))}function Ve(e,t){var n=e.callbackNode;a2(e,t);var r=ha(e,e===Se?be:0);if(r===0)n!==null&&og(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&og(n),t===1)e.tag===0?ob(Xg.bind(null,e)):Qw(Xg.bind(null,e)),tb(function(){!(W&6)&&In()}),n=null;else{switch(kw(r)){case 1:n=Cp;break;case 4:n=Sw;break;case 16:n=da;break;case 536870912:n=Ew;break;default:n=da}n=KS(n,$S.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function $S(e,t){if(na=-1,ra=0,W&6)throw Error(q(327));var n=e.callbackNode;if(Pr()&&e.callbackNode!==n)return null;var r=ha(e,e===Se?be:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Pa(e,r);else{t=r;var i=W;W|=2;var o=US();(Se!==e||be!==t)&&(Mt=null,Dr=he()+500,Un(e,t));do try{bb();break}catch(s){BS(e,s)}while(!0);Op(),Ra.current=o,W=i,ve!==null?t=0:(Se=null,be=0,t=_e)}if(t!==0){if(t===2&&(i=xh(e),i!==0&&(r=i,t=Kh(e,i))),t===1)throw n=Yi,Un(e,0),un(e,r),Ve(e,he()),n;if(t===6)un(e,r);else{if(i=e.current.alternate,!(r&30)&&!Cb(i)&&(t=Pa(e,r),t===2&&(o=xh(e),o!==0&&(r=o,t=Kh(e,o))),t===1))throw n=Yi,Un(e,0),un(e,r),Ve(e,he()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(q(345));case 2:Ln(e,Fe,Mt);break;case 3:if(un(e,r),(r&130023424)===r&&(t=Zp+500-he(),10<t)){if(ha(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ae(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Rh(Ln.bind(null,e,Fe,Mt),t);break}Ln(e,Fe,Mt);break;case 4:if(un(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-mt(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=he()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Eb(r/1960))-r,10<r){e.timeoutHandle=Rh(Ln.bind(null,e,Fe,Mt),r);break}Ln(e,Fe,Mt);break;case 5:Ln(e,Fe,Mt);break;default:throw Error(q(329))}}}return Ve(e,he()),e.callbackNode===n?$S.bind(null,e):null}function Kh(e,t){var n=Pi;return e.current.memoizedState.isDehydrated&&(Un(e,t).flags|=256),e=Pa(e,t),e!==2&&(t=Fe,Fe=n,t!==null&&Yh(t)),e}function Yh(e){Fe===null?Fe=e:Fe.push.apply(Fe,e)}function Cb(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!_t(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function un(e,t){for(t&=~Xp,t&=~ts,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mt(t),r=1<<n;e[n]=-1,t&=~r}}function Xg(e){if(W&6)throw Error(q(327));Pr();var t=ha(e,0);if(!(t&1))return Ve(e,he()),null;var n=Pa(e,t);if(e.tag!==0&&n===2){var r=xh(e);r!==0&&(t=r,n=Kh(e,r))}if(n===1)throw n=Yi,Un(e,0),un(e,t),Ve(e,he()),n;if(n===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ln(e,Fe,Mt),Ve(e,he()),null}function Jp(e,t){var n=W;W|=1;try{return e(t)}finally{W=n,W===0&&(Dr=he()+500,Xa&&In())}}function Xn(e){fn!==null&&fn.tag===0&&!(W&6)&&Pr();var t=W;W|=1;var n=ot.transition,r=X;try{if(ot.transition=null,X=1,e)return e()}finally{X=r,ot.transition=n,W=t,!(W&6)&&In()}}function ev(){Ke=kr.current,ae(kr)}function Un(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,eb(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(Ap(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ya();break;case 3:zr(),ae(Ue),ae(Pe),Up();break;case 5:Bp(r);break;case 4:zr();break;case 13:ae(le);break;case 19:ae(le);break;case 10:zp(r.type._context);break;case 22:case 23:ev()}n=n.return}if(Se=e,ve=e=wn(e.current,null),be=Ke=t,_e=0,Yi=null,Xp=ts=Qn=0,Fe=Pi=null,Fn!==null){for(t=0;t<Fn.length;t++)if(n=Fn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}Fn=null}return e}function BS(e,t){do{var n=ve;try{if(Op(),Jo.current=Ta,ba){for(var r=ce.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ba=!1}if(Yn=0,we=ye=ce=null,Ni=!1,Gi=0,Qp.current=null,n===null||n.return===null){_e=1,Yi=t,ve=null;break}e:{var o=e,a=n.return,s=n,u=t;if(t=be,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,c=s,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=zg(a);if(h!==null){h.flags&=-257,Fg(h,a,s,o,t),h.mode&1&&Og(o,l,t),t=h,u=l;var g=t.updateQueue;if(g===null){var v=new Set;v.add(u),t.updateQueue=v}else g.add(u);break e}else{if(!(t&1)){Og(o,l,t),tv();break e}u=Error(q(426))}}else if(se&&s.mode&1){var y=zg(a);if(y!==null){!(y.flags&65536)&&(y.flags|=256),Fg(y,a,s,o,t),Mp(Fr(u,s));break e}}o=u=Fr(u,s),_e!==4&&(_e=2),Pi===null?Pi=[o]:Pi.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=kS(o,u,t);Pg(o,p);break e;case 1:s=u;var m=o.type,_=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(_n===null||!_n.has(_)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=bS(o,s,t);Pg(o,x);break e}}o=o.return}while(o!==null)}VS(n)}catch(S){t=S,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(!0)}function US(){var e=Ra.current;return Ra.current=Ta,e===null?Ta:e}function tv(){(_e===0||_e===3||_e===2)&&(_e=4),Se===null||!(Qn&268435455)&&!(ts&268435455)||un(Se,be)}function Pa(e,t){var n=W;W|=2;var r=US();(Se!==e||be!==t)&&(Mt=null,Un(e,t));do try{kb();break}catch(i){BS(e,i)}while(!0);if(Op(),W=n,Ra.current=r,ve!==null)throw Error(q(261));return Se=null,be=0,_e}function kb(){for(;ve!==null;)HS(ve)}function bb(){for(;ve!==null&&!Xk();)HS(ve)}function HS(e){var t=WS(e.alternate,e,Ke);e.memoizedProps=e.pendingProps,t===null?VS(e):ve=t,Qp.current=null}function VS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_b(n,t),n!==null){n.flags&=32767,ve=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{_e=6,ve=null;return}}else if(n=yb(n,t,Ke),n!==null){ve=n;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);_e===0&&(_e=5)}function Ln(e,t,n){var r=X,i=ot.transition;try{ot.transition=null,X=1,Tb(e,t,n,r)}finally{ot.transition=i,X=r}return null}function Tb(e,t,n,r){do Pr();while(fn!==null);if(W&6)throw Error(q(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(s2(e,o),e===Se&&(ve=Se=null,be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||zo||(zo=!0,KS(da,function(){return Pr(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=ot.transition,ot.transition=null;var a=X;X=1;var s=W;W|=4,Qp.current=null,wb(e,n),FS(n,e),W2(bh),pa=!!kh,bh=kh=null,e.current=n,Sb(n),Zk(),W=s,X=a,ot.transition=o}else e.current=n;if(zo&&(zo=!1,fn=e,Ia=i),o=e.pendingLanes,o===0&&(_n=null),t2(n.stateNode),Ve(e,he()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Na)throw Na=!1,e=Gh,Gh=null,e;return Ia&1&&e.tag!==0&&Pr(),o=e.pendingLanes,o&1?e===Wh?ji++:(ji=0,Wh=e):ji=0,In(),null}function Pr(){if(fn!==null){var e=kw(Ia),t=ot.transition,n=X;try{if(ot.transition=null,X=16>e?16:e,fn===null)var r=!1;else{if(e=fn,fn=null,Ia=0,W&6)throw Error(q(331));var i=W;for(W|=4,z=e.current;z!==null;){var o=z,a=o.child;if(z.flags&16){var s=o.deletions;if(s!==null){for(var u=0;u<s.length;u++){var l=s[u];for(z=l;z!==null;){var c=z;switch(c.tag){case 0:case 11:case 15:Ii(8,c,o)}var f=c.child;if(f!==null)f.return=c,z=f;else for(;z!==null;){c=z;var d=c.sibling,h=c.return;if(LS(c),c===l){z=null;break}if(d!==null){d.return=h,z=d;break}z=h}}}var g=o.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var y=v.sibling;v.sibling=null,v=y}while(v!==null)}}z=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,z=a;else e:for(;z!==null;){if(o=z,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ii(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,z=p;break e}z=o.return}}var m=e.current;for(z=m;z!==null;){a=z;var _=a.child;if(a.subtreeFlags&2064&&_!==null)_.return=a,z=_;else e:for(a=m;z!==null;){if(s=z,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:es(9,s)}}catch(S){de(s,s.return,S)}if(s===a){z=null;break e}var x=s.sibling;if(x!==null){x.return=s.return,z=x;break e}z=s.return}}if(W=i,In(),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(Ga,e)}catch{}r=!0}return r}finally{X=n,ot.transition=t}}return!1}function Zg(e,t,n){t=Fr(n,t),t=kS(e,t,1),e=yn(e,t,1),t=Ae(),e!==null&&(io(e,1,t),Ve(e,t))}function de(e,t,n){if(e.tag===3)Zg(e,e,n);else for(;t!==null;){if(t.tag===3){Zg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(_n===null||!_n.has(r))){e=Fr(n,e),e=bS(t,e,1),t=yn(t,e,1),e=Ae(),t!==null&&(io(t,1,e),Ve(t,e));break}}t=t.return}}function Rb(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ae(),e.pingedLanes|=e.suspendedLanes&n,Se===e&&(be&n)===n&&(_e===4||_e===3&&(be&130023424)===be&&500>he()-Zp?Un(e,0):Xp|=n),Ve(e,t)}function GS(e,t){t===0&&(e.mode&1?(t=Ro,Ro<<=1,!(Ro&130023424)&&(Ro=4194304)):t=1);var n=Ae();e=Gt(e,t),e!==null&&(io(e,t,n),Ve(e,n))}function Nb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),GS(e,n)}function Ib(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(q(314))}r!==null&&r.delete(t),GS(e,n)}var WS;WS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ue.current)$e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return $e=!1,mb(e,t,n);$e=!!(e.flags&131072)}else $e=!1,se&&t.flags&1048576&&Xw(t,wa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ta(e,t),e=t.pendingProps;var i=Mr(t,Pe.current);Ir(t,n),i=Vp(null,t,r,e,i,n);var o=Gp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,He(r)?(o=!0,_a(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Dp(t),i.updater=Ja,t.stateNode=i,i._reactInternals=t,Mh(t,r,e,n),t=zh(null,t,r,!0,o,n)):(t.tag=0,se&&o&&qp(t),je(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ta(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=jb(r),e=ht(r,e),i){case 0:t=Oh(null,t,r,e,n);break e;case 1:t=Bg(null,t,r,e,n);break e;case 11:t=Dg(null,t,r,e,n);break e;case 14:t=$g(null,t,r,ht(r.type,e),n);break e}throw Error(q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),Oh(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),Bg(e,t,r,i,n);case 3:e:{if(IS(t),e===null)throw Error(q(387));r=t.pendingProps,o=t.memoizedState,i=o.element,rS(e,t),Ca(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Fr(Error(q(423)),t),t=Ug(e,t,r,n,i);break e}else if(r!==i){i=Fr(Error(q(424)),t),t=Ug(e,t,r,n,i);break e}else for(Qe=mn(t.stateNode.containerInfo.firstChild),Xe=t,se=!0,vt=null,n=tS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Lr(),r===i){t=Wt(e,t,n);break e}je(e,t,r,n)}t=t.child}return t;case 5:return iS(t),e===null&&jh(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Th(r,i)?a=null:o!==null&&Th(r,o)&&(t.flags|=32),NS(e,t),je(e,t,a,n),t.child;case 6:return e===null&&jh(t),null;case 13:return PS(e,t,n);case 4:return $p(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Or(t,null,r,n):je(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),Dg(e,t,r,i,n);case 7:return je(e,t,t.pendingProps,n),t.child;case 8:return je(e,t,t.pendingProps.children,n),t.child;case 12:return je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,re(Sa,r._currentValue),r._currentValue=a,o!==null)if(_t(o.value,a)){if(o.children===i.children&&!Ue.current){t=Wt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Ut(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),qh(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(q(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),qh(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}je(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ir(t,n),i=at(i),r=r(i),t.flags|=1,je(e,t,r,n),t.child;case 14:return r=t.type,i=ht(r,t.pendingProps),i=ht(r.type,i),$g(e,t,r,i,n);case 15:return TS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),ta(e,t),t.tag=1,He(r)?(e=!0,_a(t)):e=!1,Ir(t,n),CS(t,r,i),Mh(t,r,i,n),zh(null,t,r,!0,e,n);case 19:return jS(e,t,n);case 22:return RS(e,t,n)}throw Error(q(156,t.tag))};function KS(e,t){return ww(e,t)}function Pb(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function it(e,t,n,r){return new Pb(e,t,n,r)}function nv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jb(e){if(typeof e=="function")return nv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wp)return 11;if(e===Sp)return 14}return 2}function wn(e,t){var n=e.alternate;return n===null?(n=it(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ia(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")nv(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case vr:return Hn(n.children,i,o,t);case xp:a=8,i|=8;break;case oh:return e=it(12,n,t,i|2),e.elementType=oh,e.lanes=o,e;case ah:return e=it(13,n,t,i),e.elementType=ah,e.lanes=o,e;case sh:return e=it(19,n,t,i),e.elementType=sh,e.lanes=o,e;case iw:return ns(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nw:a=10;break e;case rw:a=9;break e;case wp:a=11;break e;case Sp:a=14;break e;case rn:a=16,r=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=it(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Hn(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function ns(e,t,n,r){return e=it(22,e,r,t),e.elementType=iw,e.lanes=n,e.stateNode={isHidden:!1},e}function tu(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function nu(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qb(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ls(0),this.expirationTimes=Ls(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ls(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function rv(e,t,n,r,i,o,a,s,u){return e=new qb(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=it(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dp(o),e}function Ab(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function YS(e){if(!e)return kn;e=e._reactInternals;e:{if(er(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(He(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var n=e.type;if(He(n))return Yw(e,n,t)}return t}function QS(e,t,n,r,i,o,a,s,u){return e=rv(n,r,!0,e,i,o,a,s,u),e.context=YS(null),n=e.current,r=Ae(),i=xn(n),o=Ut(r,i),o.callback=t??null,yn(n,o,i),e.current.lanes=i,io(e,i,r),Ve(e,r),e}function rs(e,t,n,r){var i=t.current,o=Ae(),a=xn(i);return n=YS(n),t.context===null?t.context=n:t.pendingContext=n,t=Ut(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=yn(i,t,a),e!==null&&(yt(e,i,a,o),Zo(e,i,a)),a}function ja(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Jg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function iv(e,t){Jg(e,t),(e=e.alternate)&&Jg(e,t)}function Mb(){return null}var XS=typeof reportError=="function"?reportError:function(e){console.error(e)};function ov(e){this._internalRoot=e}is.prototype.render=ov.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));rs(e,t,null,null)};is.prototype.unmount=ov.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xn(function(){rs(null,e,null,null)}),t[Vt]=null}};function is(e){this._internalRoot=e}is.prototype.unstable_scheduleHydration=function(e){if(e){var t=Rw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<sn.length&&t!==0&&t<sn[n].priority;n++);sn.splice(n,0,e),n===0&&Iw(e)}};function av(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function os(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function em(){}function Lb(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var l=ja(a);o.call(l)}}var a=QS(t,r,e,0,null,!1,!1,"",em);return e._reactRootContainer=a,e[Vt]=a.current,$i(e.nodeType===8?e.parentNode:e),Xn(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=ja(u);s.call(l)}}var u=rv(e,0,!1,null,null,!1,!1,"",em);return e._reactRootContainer=u,e[Vt]=u.current,$i(e.nodeType===8?e.parentNode:e),Xn(function(){rs(t,u,n,r)}),u}function as(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var u=ja(a);s.call(u)}}rs(t,a,e,i)}else a=Lb(n,t,e,i,r);return ja(a)}bw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=pi(t.pendingLanes);n!==0&&(kp(t,n|1),Ve(t,he()),!(W&6)&&(Dr=he()+500,In()))}break;case 13:Xn(function(){var r=Gt(e,1);if(r!==null){var i=Ae();yt(r,e,1,i)}}),iv(e,1)}};bp=function(e){if(e.tag===13){var t=Gt(e,134217728);if(t!==null){var n=Ae();yt(t,e,134217728,n)}iv(e,134217728)}};Tw=function(e){if(e.tag===13){var t=xn(e),n=Gt(e,t);if(n!==null){var r=Ae();yt(n,e,t,r)}iv(e,t)}};Rw=function(){return X};Nw=function(e,t){var n=X;try{return X=e,t()}finally{X=n}};mh=function(e,t,n){switch(t){case"input":if(ch(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Qa(r);if(!i)throw Error(q(90));aw(r),ch(r,i)}}}break;case"textarea":uw(e,n);break;case"select":t=n.value,t!=null&&br(e,!!n.multiple,t,!1)}};vw=Jp;gw=Xn;var Ob={usingClientEntryPoint:!1,Events:[ao,_r,Qa,hw,pw,Jp]},li={findFiberByHostInstance:zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zb={bundleType:li.bundleType,version:li.version,rendererPackageName:li.rendererPackageName,rendererConfig:li.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Qt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_w(e),e===null?null:e.stateNode},findFiberByHostInstance:li.findFiberByHostInstance||Mb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fo.isDisabled&&Fo.supportsFiber)try{Ga=Fo.inject(zb),Tt=Fo}catch{}}et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ob;et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!av(t))throw Error(q(200));return Ab(e,t,null,n)};et.createRoot=function(e,t){if(!av(e))throw Error(q(299));var n=!1,r="",i=XS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=rv(e,1,!1,null,null,n,!1,r,i),e[Vt]=t.current,$i(e.nodeType===8?e.parentNode:e),new ov(t)};et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=_w(t),e=e===null?null:e.stateNode,e};et.flushSync=function(e){return Xn(e)};et.hydrate=function(e,t,n){if(!os(t))throw Error(q(200));return as(null,e,t,!0,n)};et.hydrateRoot=function(e,t,n){if(!av(e))throw Error(q(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=XS;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=QS(t,null,e,1,n??null,i,!1,o,a),e[Vt]=t.current,$i(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new is(t)};et.render=function(e,t,n){if(!os(t))throw Error(q(200));return as(null,e,t,!1,n)};et.unmountComponentAtNode=function(e){if(!os(e))throw Error(q(40));return e._reactRootContainer?(Xn(function(){as(null,null,e,!1,function(){e._reactRootContainer=null,e[Vt]=null})}),!0):!1};et.unstable_batchedUpdates=Jp;et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!os(n))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return as(e,t,n,!1,r)};et.version="18.3.1-next-f1338f8080-20240426";function ZS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ZS)}catch(e){console.error(e)}}ZS(),Zx.exports=et;var Fb=Zx.exports,tm=Fb;rh.createRoot=tm.createRoot,rh.hydrateRoot=tm.hydrateRoot;/** 49 + * @remix-run/router v1.23.1 50 + * 51 + * Copyright (c) Remix Software Inc. 52 + * 53 + * This source code is licensed under the MIT license found in the 54 + * LICENSE.md file in the root directory of this source tree. 55 + * 56 + * @license MIT 57 + */function Qi(){return Qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qi.apply(this,arguments)}var dn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(dn||(dn={}));const nm="popstate";function Db(e){e===void 0&&(e={});function t(i,o){let{pathname:a="/",search:s="",hash:u=""}=tr(i.location.hash.substr(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),Qh("",{pathname:a,search:s,hash:u},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){let a=i.document.querySelector("base"),s="";if(a&&a.getAttribute("href")){let u=i.location.href,l=u.indexOf("#");s=l===-1?u:u.slice(0,l)}return s+"#"+(typeof o=="string"?o:qa(o))}function r(i,o){ss(i.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return Bb(t,n,r,e)}function pe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ss(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $b(){return Math.random().toString(36).substr(2,8)}function rm(e,t){return{usr:e.state,key:e.key,idx:t}}function Qh(e,t,n,r){return n===void 0&&(n=null),Qi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?tr(t):t,{state:n,key:t&&t.key||r||$b()})}function qa(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function tr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Bb(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=dn.Pop,u=null,l=c();l==null&&(l=0,a.replaceState(Qi({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function f(){s=dn.Pop;let y=c(),p=y==null?null:y-l;l=y,u&&u({action:s,location:v.location,delta:p})}function d(y,p){s=dn.Push;let m=Qh(v.location,y,p);n&&n(m,y),l=c()+1;let _=rm(m,l),x=v.createHref(m);try{a.pushState(_,"",x)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(x)}o&&u&&u({action:s,location:v.location,delta:1})}function h(y,p){s=dn.Replace;let m=Qh(v.location,y,p);n&&n(m,y),l=c();let _=rm(m,l),x=v.createHref(m);a.replaceState(_,"",x),o&&u&&u({action:s,location:v.location,delta:0})}function g(y){let p=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof y=="string"?y:qa(y);return m=m.replace(/ $/,"%20"),pe(p,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,p)}let v={get action(){return s},get location(){return e(i,a)},listen(y){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(nm,f),u=y,()=>{i.removeEventListener(nm,f),u=null}},createHref(y){return t(i,y)},createURL:g,encodeLocation(y){let p=g(y);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:h,go(y){return a.go(y)}};return v}var im;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(im||(im={}));function Ub(e,t,n){return n===void 0&&(n="/"),Hb(e,t,n)}function Hb(e,t,n,r){let i=typeof t=="string"?tr(t):t,o=sv(i.pathname||"/",n);if(o==null)return null;let a=JS(e);Vb(a);let s=null;for(let u=0;s==null&&u<a.length;++u){let l=rT(o);s=eT(a[u],l)}return s}function JS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,a,s)=>{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};u.relativePath.startsWith("/")&&(pe(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let l=Sn([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(pe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),JS(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Zb(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let u of eE(o.path))i(o,a,u)}),t}function eE(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=eE(r.join("/")),s=[];return s.push(...a.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...a),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Vb(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Jb(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Gb=/^:[\w-]+$/,Wb=3,Kb=2,Yb=1,Qb=10,Xb=-2,om=e=>e==="*";function Zb(e,t){let n=e.split("/"),r=n.length;return n.some(om)&&(r+=Xb),t&&(r+=Kb),n.filter(i=>!om(i)).reduce((i,o)=>i+(Gb.test(o)?Wb:o===""?Yb:Qb),r)}function Jb(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function eT(e,t,n){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let u=r[s],l=s===r.length-1,c=o==="/"?t:t.slice(o.length)||"/",f=tT({path:u.relativePath,caseSensitive:u.caseSensitive,end:l},c),d=u.route;if(!f)return null;Object.assign(i,f.params),a.push({params:i,pathname:Sn([o,f.pathname]),pathnameBase:uT(Sn([o,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(o=Sn([o,f.pathnameBase]))}return a}function tT(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=nT(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((l,c,f)=>{let{paramName:d,isOptional:h}=c;if(d==="*"){let v=s[f]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const g=s[f];return h&&!g?l[d]=void 0:l[d]=(g||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function nT(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ss(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function rT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ss(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function sv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const iT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oT=e=>iT.test(e);function aT(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?tr(e):e,o;if(n)if(oT(n))o=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),ss(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?o=am(n.substring(1),"/"):o=am(n,t)}else o=t;return{pathname:o,search:lT(r),hash:cT(i)}}function am(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function ru(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function sT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function uv(e,t){let n=sT(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function lv(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=tr(e):(i=Qi({},e),pe(!i.pathname||!i.pathname.includes("?"),ru("?","pathname","search",i)),pe(!i.pathname||!i.pathname.includes("#"),ru("#","pathname","hash",i)),pe(!i.search||!i.search.includes("#"),ru("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}s=f>=0?t[f]:"/"}let u=aT(i,s),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}const Sn=e=>e.join("/").replace(/\/\/+/g,"/"),uT=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function fT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const tE=["post","put","patch","delete"];new Set(tE);const dT=["get",...tE];new Set(dT);/** 58 + * React Router v6.30.2 59 + * 60 + * Copyright (c) Remix Software Inc. 61 + * 62 + * This source code is licensed under the MIT license found in the 63 + * LICENSE.md file in the root directory of this source tree. 64 + * 65 + * @license MIT 66 + */function Xi(){return Xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xi.apply(this,arguments)}const cv=N.createContext(null),hT=N.createContext(null),Pn=N.createContext(null),us=N.createContext(null),jn=N.createContext({outlet:null,matches:[],isDataRoute:!1}),nE=N.createContext(null);function pT(e,t){let{relative:n}=t===void 0?{}:t;Kr()||pe(!1);let{basename:r,navigator:i}=N.useContext(Pn),{hash:o,pathname:a,search:s}=oE(e,{relative:n}),u=a;return r!=="/"&&(u=a==="/"?r:Sn([r,a])),i.createHref({pathname:u,search:s,hash:o})}function Kr(){return N.useContext(us)!=null}function Yr(){return Kr()||pe(!1),N.useContext(us).location}function rE(e){N.useContext(Pn).static||N.useLayoutEffect(e)}function iE(){let{isDataRoute:e}=N.useContext(jn);return e?TT():vT()}function vT(){Kr()||pe(!1);let e=N.useContext(cv),{basename:t,future:n,navigator:r}=N.useContext(Pn),{matches:i}=N.useContext(jn),{pathname:o}=Yr(),a=JSON.stringify(uv(i,n.v7_relativeSplatPath)),s=N.useRef(!1);return rE(()=>{s.current=!0}),N.useCallback(function(l,c){if(c===void 0&&(c={}),!s.current)return;if(typeof l=="number"){r.go(l);return}let f=lv(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Sn([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,a,o,e])}function oE(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=N.useContext(Pn),{matches:i}=N.useContext(jn),{pathname:o}=Yr(),a=JSON.stringify(uv(i,r.v7_relativeSplatPath));return N.useMemo(()=>lv(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function gT(e,t){return mT(e,t)}function mT(e,t,n,r){Kr()||pe(!1);let{navigator:i}=N.useContext(Pn),{matches:o}=N.useContext(jn),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let l=Yr(),c;if(t){var f;let y=typeof t=="string"?tr(t):t;u==="/"||(f=y.pathname)!=null&&f.startsWith(u)||pe(!1),c=y}else c=l;let d=c.pathname||"/",h=d;if(u!=="/"){let y=u.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=Ub(e,{pathname:h}),v=ST(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Sn([u,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:Sn([u,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n,r);return t&&v?N.createElement(us.Provider,{value:{location:Xi({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:dn.Pop}},v):v}function yT(){let e=bT(),t=fT(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),n?N.createElement("pre",{style:i},n):null,null)}const _T=N.createElement(yT,null);class xT extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?N.createElement(jn.Provider,{value:this.props.routeContext},N.createElement(nE.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function wT(e){let{routeContext:t,match:n,children:r}=e,i=N.useContext(cv);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(jn.Provider,{value:t},r)}function ST(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let c=a.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||pe(!1),a=a.slice(0,Math.min(a.length,c+1))}let u=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<a.length;c++){let f=a[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=c),f.route.id){let{loaderData:d,errors:h}=n,g=f.route.loader&&d[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||g){u=!0,l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,f,d)=>{let h,g=!1,v=null,y=null;n&&(h=s&&f.route.id?s[f.route.id]:void 0,v=f.route.errorElement||_T,u&&(l<0&&d===0?(RT("route-fallback"),g=!0,y=null):l===d&&(g=!0,y=f.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,d+1)),m=()=>{let _;return h?_=v:g?_=y:f.route.Component?_=N.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=c,N.createElement(wT,{match:f,routeContext:{outlet:c,matches:p,isDataRoute:n!=null},children:_})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?N.createElement(xT,{location:n.location,revalidation:n.revalidation,component:v,error:h,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var aE=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(aE||{}),sE=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(sE||{});function ET(e){let t=N.useContext(cv);return t||pe(!1),t}function CT(e){let t=N.useContext(hT);return t||pe(!1),t}function kT(e){let t=N.useContext(jn);return t||pe(!1),t}function uE(e){let t=kT(),n=t.matches[t.matches.length-1];return n.route.id||pe(!1),n.route.id}function bT(){var e;let t=N.useContext(nE),n=CT(),r=uE();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function TT(){let{router:e}=ET(aE.UseNavigateStable),t=uE(sE.UseNavigateStable),n=N.useRef(!1);return rE(()=>{n.current=!0}),N.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Xi({fromRouteId:t},o)))},[e,t])}const sm={};function RT(e,t,n){sm[e]||(sm[e]=!0)}function NT(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function IT(e){let{to:t,replace:n,state:r,relative:i}=e;Kr()||pe(!1);let{future:o,static:a}=N.useContext(Pn),{matches:s}=N.useContext(jn),{pathname:u}=Yr(),l=iE(),c=lv(t,uv(s,o.v7_relativeSplatPath),u,i==="path"),f=JSON.stringify(c);return N.useEffect(()=>l(JSON.parse(f),{replace:n,state:r,relative:i}),[l,f,i,n,r]),null}function hr(e){pe(!1)}function PT(e){let{basename:t="/",children:n=null,location:r,navigationType:i=dn.Pop,navigator:o,static:a=!1,future:s}=e;Kr()&&pe(!1);let u=t.replace(/^\/*/,"/"),l=N.useMemo(()=>({basename:u,navigator:o,static:a,future:Xi({v7_relativeSplatPath:!1},s)}),[u,s,o,a]);typeof r=="string"&&(r=tr(r));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:g="default"}=r,v=N.useMemo(()=>{let y=sv(c,u);return y==null?null:{location:{pathname:y,search:f,hash:d,state:h,key:g},navigationType:i}},[u,c,f,d,h,g,i]);return v==null?null:N.createElement(Pn.Provider,{value:l},N.createElement(us.Provider,{children:n,value:v}))}function jT(e){let{children:t,location:n}=e;return gT(Xh(t),n)}new Promise(()=>{});function Xh(e,t){t===void 0&&(t=[]);let n=[];return N.Children.forEach(e,(r,i)=>{if(!N.isValidElement(r))return;let o=[...t,i];if(r.type===N.Fragment){n.push.apply(n,Xh(r.props.children,o));return}r.type!==hr&&pe(!1),!r.props.index||!r.props.children||pe(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=Xh(r.props.children,o)),n.push(a)}),n}/** 67 + * React Router DOM v6.30.2 68 + * 69 + * Copyright (c) Remix Software Inc. 70 + * 71 + * This source code is licensed under the MIT license found in the 72 + * LICENSE.md file in the root directory of this source tree. 73 + * 74 + * @license MIT 75 + */function Zh(){return Zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zh.apply(this,arguments)}function qT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function AT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function MT(e,t){return e.button===0&&(!t||t==="_self")&&!AT(e)}const LT=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],OT="6";try{window.__reactRouterVersion=OT}catch{}const zT="startTransition",um=Rk[zT];function FT(e){let{basename:t,children:n,future:r,window:i}=e,o=N.useRef();o.current==null&&(o.current=Db({window:i,v5Compat:!0}));let a=o.current,[s,u]=N.useState({action:a.action,location:a.location}),{v7_startTransition:l}=r||{},c=N.useCallback(f=>{l&&um?um(()=>u(f)):u(f)},[u,l]);return N.useLayoutEffect(()=>a.listen(c),[a,c]),N.useEffect(()=>NT(r),[r]),N.createElement(PT,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const DT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$T=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,BT=N.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:u,to:l,preventScrollReset:c,viewTransition:f}=t,d=qT(t,LT),{basename:h}=N.useContext(Pn),g,v=!1;if(typeof l=="string"&&$T.test(l)&&(g=l,DT))try{let _=new URL(window.location.href),x=l.startsWith("//")?new URL(_.protocol+l):new URL(l),S=sv(x.pathname,h);x.origin===_.origin&&S!=null?l=S+x.search+x.hash:v=!0}catch{}let y=pT(l,{relative:i}),p=UT(l,{replace:a,state:s,target:u,preventScrollReset:c,relative:i,viewTransition:f});function m(_){r&&r(_),_.defaultPrevented||p(_)}return N.createElement("a",Zh({},d,{href:g||y,onClick:v||o?r:m,ref:n,target:u}))});var lm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lm||(lm={}));var cm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(cm||(cm={}));function UT(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:s}=t===void 0?{}:t,u=iE(),l=Yr(),c=oE(e,{relative:a});return N.useCallback(f=>{if(MT(f,n)){f.preventDefault();let d=r!==void 0?r:qa(l)===qa(c);u(e,{replace:d,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[l,u,c,r,i,n,e,o,a,s])}function HT(e={}){const{graphUrl:t=VT(),gitHistoryUrl:n,enableSSE:r=!1,sseUrl:i="/api/events",pollInterval:o=0}=e,[a,s]=N.useState(null),[u,l]=N.useState([]),[c,f]=N.useState(!0),[d,h]=N.useState(null),[g,v]=N.useState(null),y=N.useCallback(async()=>{try{const _=await fetch(t);if(!_.ok)throw new Error(`Failed to fetch graph: ${_.status} ${_.statusText}`);const x=await _.json(),S=x.data??x;if(x.ok===!1&&x.error)throw new Error(x.error);s(S),v(new Date),h(null)}catch(_){const x=_ instanceof Error?_.message:"Failed to load graph data";h(x),console.error("Graph fetch error:",_)}},[t]),p=N.useCallback(async()=>{if(n)try{const _=await fetch(n);if(_.ok){const x=await _.json();l(x)}}catch(_){console.warn("Could not load git history:",_)}},[n]),m=N.useCallback(async()=>{f(!0),await Promise.all([y(),p()]),f(!1)},[y,p]);return N.useEffect(()=>{let _=!0;return(async()=>{f(!0),await Promise.all([y(),p()]),_&&f(!1)})(),()=>{_=!1}},[y,p]),N.useEffect(()=>{if(!r)return;let _=null,x=null;const S=()=>{try{_=new EventSource(i),_.onmessage=E=>{(E.data==="refresh"||E.data==="update")&&y()},_.onerror=()=>{_==null||_.close(),x=setTimeout(S,5e3)},_.onopen=()=>{console.log("SSE connected for live updates")}}catch(E){console.warn("SSE not available:",E)}};return S(),()=>{_==null||_.close(),x&&clearTimeout(x)}},[r,i,y]),N.useEffect(()=>{if(o<=0)return;const _=setInterval(()=>{y()},o);return()=>clearInterval(_)},[o,y]),{graphData:a,gitHistory:u,loading:c,error:d,lastUpdated:g,refresh:m}}function VT(){return"./graph-data.json"}const fm=["goal","decision","option","action","outcome","observation"];function fv(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function $r(e){const t=fv(e.metadata_json);return(t==null?void 0:t.confidence)??null}function bn(e){const t=fv(e.metadata_json);return(t==null?void 0:t.commit)??null}function lE(e){const t=fv(e.metadata_json);return(t==null?void 0:t.branch)??null}function GT(e){const t=new Set;for(const n of e){const r=lE(n);r&&t.add(r)}return Array.from(t).sort()}function WT(e){return e?e.slice(0,7):null}function KT(e){return e===null?null:e>=70?"high":e>=40?"med":"low"}function YT(e,t="notactuallytreyanastasio/losselot"){return`https://github.com/${t}/commit/${e}`}function ut(e,t){return e?e.length>t?e.substring(0,t)+"...":e:""}function QT(e,t){const n=new Date(t).getTime()-new Date(e).getTime(),r=Math.floor(n/6e4);if(r<60)return`${r}m`;const i=Math.floor(r/60);return i<24?`${i}h ${r%60}m`:`${Math.floor(i/24)}d ${i%24}h`}const dm=4*60*60*1e3;function cE(e,t){const n=new Map,r=new Map;return e.forEach(i=>{n.set(i.id,[]),r.set(i.id,[])}),t.forEach(i=>{var o,a;(o=n.get(i.from_node_id))==null||o.push({to:i.to_node_id,edge:i}),(a=r.get(i.to_node_id))==null||a.push({from:i.from_node_id,edge:i})}),{outgoing:n,incoming:r}}function XT(e){const{nodes:t,edges:n}=e,{outgoing:r,incoming:i}=cE(t,n),o=new Set,a=[],s=t.filter(l=>{var c;return l.node_type==="goal"||(((c=i.get(l.id))==null?void 0:c.length)??0)===0}).sort((l,c)=>l.node_type==="goal"&&c.node_type!=="goal"?-1:c.node_type==="goal"&&l.node_type!=="goal"?1:new Date(l.created_at).getTime()-new Date(c.created_at).getTime());function u(l){var d;if(o.has(l))return null;const c={root:null,nodes:[],edges:[]},f=[l];for(;f.length>0;){const h=f.shift();if(o.has(h))continue;o.add(h);const g=t.find(v=>v.id===h);g&&(c.nodes.push(g),c.root||(c.root=g)),(d=r.get(h))==null||d.forEach(({to:v,edge:y})=>{o.has(v)||(f.push(v),c.edges.push(y))})}return c.nodes.sort((h,g)=>new Date(h.created_at).getTime()-new Date(g.created_at).getTime()),c.nodes.length>0?c:null}return s.forEach(l=>{const c=u(l.id);c&&a.push(c)}),t.forEach(l=>{if(!o.has(l.id)){const c=u(l.id);c&&a.push(c)}}),a.sort((l,c)=>new Date(c.nodes[0].created_at).getTime()-new Date(l.nodes[0].created_at).getTime()),a}function ZT(e,t){const n=[...e].sort((o,a)=>new Date(o.created_at).getTime()-new Date(a.created_at).getTime()),r=[];let i=null;return n.forEach(o=>{const a=new Date(o.created_at).getTime();!i||a-i.endTime>dm?(i={startTime:a,endTime:a,nodes:[o],chains:[]},r.push(i)):(i.endTime=a,i.nodes.push(o))}),t.forEach(o=>{const a=new Date(o.nodes[0].created_at).getTime(),s=r.find(u=>a>=u.startTime&&a<=u.endTime+dm);s&&s.chains.push(o)}),r.reverse(),r}function JT(e,t){const{nodes:n,edges:r}=t,i=[],o=new Set;let a=e;for(;a!==null&&!o.has(a);){o.add(a);const s=n.find(l=>l.id===a);s&&i.unshift(s);const u=r.find(l=>l.to_node_id===a);a=u?u.from_node_id:null}return i}function eR(e,t){var s;const{nodes:n,edges:r}=t,{outgoing:i}=cE(n,r),o=new Set,a=[e];for(;a.length>0;){const u=a.shift();o.has(u)||(o.add(u),(s=i.get(u))==null||s.forEach(({to:l})=>{o.has(l)||a.push(l)}))}return o}function tR(e,t){const n=[],r=new Map(t.map(o=>[o.hash,o])),i=new Map(t.map(o=>[o.short_hash,o]));return e.forEach(o=>{const a=bn(o),s=[];if(a){const u=r.get(a)||i.get(a.slice(0,7));u&&s.push(u)}n.push({type:"node",timestamp:new Date(o.created_at),node:o,linkedCommits:s})}),t.forEach(o=>{const a=e.filter(s=>{const u=bn(s);return u===o.hash||(u==null?void 0:u.slice(0,7))===o.short_hash});n.push({type:"commit",timestamp:new Date(o.date),commit:o,linkedNodes:a})}),n.sort((o,a)=>a.timestamp.getTime()-o.timestamp.getTime()),n}function nR(e,t,n){const r={};let i=0;return e.nodes.forEach(o=>{r[o.node_type]=(r[o.node_type]||0)+1,bn(o)&&i++}),{nodeCount:e.nodes.length,edgeCount:e.edges.length,chainCount:t.length,sessionCount:n.length,linkedCommitCount:i,nodesByType:r}}function rR(e){return N.useMemo(()=>{if(!e)return{chains:[],sessions:[],stats:{nodeCount:0,edgeCount:0,chainCount:0,sessionCount:0,linkedCommitCount:0,nodesByType:{}}};const t=XT(e),n=ZT(e.nodes,t),r=nR(e,t,n);return{chains:t,sessions:n,stats:r}},[e])}const iR=[{id:"chains",label:"Chains",path:"/"},{id:"timeline",label:"Timeline",path:"/timeline"},{id:"graph",label:"Graph",path:"/graph"},{id:"dag",label:"DAG",path:"/dag"}],oR=({children:e,stats:t,lastUpdated:n,branches:r,selectedBranch:i,onBranchChange:o})=>{const a=Yr(),u=(()=>{const l=a.pathname;return l==="/timeline"?"timeline":l==="/graph"?"graph":l==="/dag"?"dag":"chains"})();return w.jsxs("div",{style:K.container,children:[w.jsx("header",{style:K.header,children:w.jsxs("div",{style:K.headerContent,children:[w.jsxs("div",{children:[w.jsx("h1",{style:K.title,children:"Deciduous"}),w.jsx("p",{style:K.subtitle,children:"Decision Graph Viewer"})]}),w.jsx("nav",{style:K.nav,children:iR.map(l=>w.jsx(BT,{to:l.path,style:{...K.tab,...u===l.id?K.tabActive:{}},children:l.label},l.id))}),w.jsx("div",{style:K.navLinks,children:w.jsx("a",{href:"https://github.com/notactuallytreyanastasio/losselot",target:"_blank",rel:"noopener noreferrer",style:K.link,children:"GitHub"})})]})}),t&&w.jsxs("div",{style:K.statsBar,children:[w.jsxs("div",{style:K.stat,children:[w.jsx("div",{style:K.statNum,children:t.nodeCount}),w.jsx("div",{style:K.statLabel,children:"Nodes"})]}),w.jsxs("div",{style:K.stat,children:[w.jsx("div",{style:K.statNum,children:t.edgeCount}),w.jsx("div",{style:K.statLabel,children:"Edges"})]}),w.jsxs("div",{style:K.stat,children:[w.jsx("div",{style:K.statNum,children:t.chainCount}),w.jsx("div",{style:K.statLabel,children:"Chains"})]}),w.jsxs("div",{style:K.stat,children:[w.jsx("div",{style:K.statNum,children:t.sessionCount}),w.jsx("div",{style:K.statLabel,children:"Sessions"})]}),t.linkedCommitCount>0&&w.jsxs("div",{style:K.stat,children:[w.jsx("div",{style:K.statNum,children:t.linkedCommitCount}),w.jsx("div",{style:K.statLabel,children:"Commits"})]}),r&&r.length>0&&w.jsx("div",{style:{...K.stat,marginLeft:"auto"},children:w.jsxs("select",{value:i||"",onChange:l=>o==null?void 0:o(l.target.value||null),style:K.branchSelect,children:[w.jsx("option",{value:"",children:"All branches"}),r.map(l=>w.jsx("option",{value:l,children:l},l))]})}),n&&w.jsx("div",{style:{...K.stat,marginLeft:r!=null&&r.length?"10px":"auto"},children:w.jsxs("div",{style:{...K.statLabel,fontSize:"10px"},children:["Updated ",n.toLocaleTimeString()]})})]}),w.jsx("main",{style:K.main,children:e})]})},K={container:{minHeight:"100vh",backgroundColor:"#1a1a2e",color:"#eee",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},header:{backgroundColor:"#16213e",borderBottom:"1px solid #0f3460",padding:"0 20px"},headerContent:{display:"flex",alignItems:"center",gap:"30px",maxWidth:"1800px",margin:"0 auto",padding:"15px 0"},title:{fontSize:"20px",margin:0,color:"#00d9ff"},subtitle:{fontSize:"12px",color:"#888",margin:"4px 0 0 0"},nav:{display:"flex",gap:"4px",flex:1},tab:{padding:"10px 20px",fontSize:"13px",color:"#888",textDecoration:"none",borderRadius:"6px 6px 0 0",backgroundColor:"transparent",transition:"all 0.2s"},tabActive:{backgroundColor:"#1a1a2e",color:"#00d9ff"},navLinks:{display:"flex",gap:"15px"},link:{color:"#888",textDecoration:"none",fontSize:"13px"},statsBar:{display:"flex",gap:"20px",padding:"12px 20px",backgroundColor:"#16213e",margin:"15px",borderRadius:"8px",maxWidth:"1800px",marginLeft:"auto",marginRight:"auto"},stat:{textAlign:"center",minWidth:"60px"},statNum:{fontSize:"20px",fontWeight:"bold",color:"#00d9ff"},statLabel:{fontSize:"10px",color:"#888",textTransform:"uppercase"},branchSelect:{backgroundColor:"#1a1a2e",color:"#00d9ff",border:"1px solid #0f3460",borderRadius:"4px",padding:"6px 10px",fontSize:"12px",cursor:"pointer",minWidth:"120px"},main:{height:"calc(100vh - 140px)",maxWidth:"1800px",margin:"0 auto",padding:"0 15px"}},dv={goal:"#22c55e",decision:"#eab308",option:"#06b6d4",action:"#ef4444",outcome:"#a855f7",observation:"#6b7280"};function It(e){return dv[e]||"#6b7280"}const aR={leads_to:"#3b82f6",requires:"#8b5cf6",chosen:"#22c55e",rejected:"#ef4444",blocks:"#f97316",enables:"#06b6d4"};function sR(e){return aR[e]||"#6b7280"}const uR={high:{bg:"#22c55e33",text:"#4ade80"},med:{bg:"#eab30833",text:"#fbbf24"},low:{bg:"#ef444433",text:"#f87171"}};function lR(e){return e?uR[e]:null}const Ge=({type:e,size:t="md"})=>{const n=It(e),r=["goal","decision","option"].includes(e),i={fontSize:t==="sm"?"9px":"10px",textTransform:"uppercase",padding:t==="sm"?"2px 5px":"2px 6px",borderRadius:"3px",display:"inline-block",backgroundColor:n,color:r?"#000":"#fff",fontWeight:500};return w.jsx("span",{style:i,children:e})},uo=({confidence:e})=>{if(e==null)return null;const t=KT(e),n=lR(t);if(!n)return null;const r={fontSize:"10px",padding:"2px 6px",borderRadius:"10px",fontWeight:600,backgroundColor:n.bg,color:n.text};return w.jsxs("span",{style:r,children:[e,"%"]})},Br=({commit:e,repo:t="notactuallytreyanastasio/losselot"})=>{if(!e)return null;const n=WT(e),r=YT(e,t),i={fontSize:"10px",padding:"2px 6px",borderRadius:"4px",fontWeight:500,fontFamily:"monospace",backgroundColor:"#3b82f633",color:"#60a5fa",textDecoration:"none",transition:"all 0.2s"};return w.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",style:i,title:`View commit ${n}`,onMouseOver:o=>{o.currentTarget.style.backgroundColor="#3b82f655",o.currentTarget.style.color="#93c5fd"},onMouseOut:o=>{o.currentTarget.style.backgroundColor="#3b82f633",o.currentTarget.style.color="#60a5fa"},children:n})},Aa=({type:e})=>{const t=e==="chosen",r={fontSize:"10px",padding:"2px 6px",borderRadius:"3px",backgroundColor:t?"#22c55e":e==="rejected"?"#ef4444":"#333",color:t?"#000":"#fff"};return w.jsx("span",{style:r,children:e})},cR=({node:e,repo:t})=>{const n=$r(e),r=bn(e);return w.jsxs("span",{style:{display:"inline-flex",gap:"6px",alignItems:"center"},children:[w.jsx(Ge,{type:e.node_type}),w.jsx(uo,{confidence:n}),w.jsx(Br,{commit:r,repo:t})]})},fR=({status:e})=>{const t={pending:{bg:"#6b728033",text:"#9ca3af"},active:{bg:"#3b82f633",text:"#60a5fa"},completed:{bg:"#22c55e33",text:"#4ade80"},rejected:{bg:"#ef444433",text:"#f87171"}},n=t[e]||t.pending,r={fontSize:"10px",padding:"2px 6px",borderRadius:"10px",backgroundColor:n.bg,color:n.text};return w.jsx("span",{style:r,children:e})},fE=({node:e,graphData:t,onSelectNode:n,onClose:r,repo:i="notactuallytreyanastasio/losselot"})=>{if(!e)return w.jsx("div",{style:ie.panel,children:w.jsxs("div",{style:ie.empty,children:[w.jsxs("svg",{width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",style:{opacity:.3},children:[w.jsx("circle",{cx:"12",cy:"12",r:"10"}),w.jsx("path",{d:"M12 6v6l4 2"})]}),w.jsx("p",{style:{marginTop:"20px"},children:"Select a node to see details"})]})});const o=t.edges.filter(u=>u.to_node_id===e.id),a=t.edges.filter(u=>u.from_node_id===e.id),s=u=>{const l=t.nodes.find(c=>c.id===u);return(l==null?void 0:l.title)||"Unknown"};return w.jsxs("div",{style:ie.panel,children:[r&&w.jsx("button",{onClick:r,style:ie.closeButton,children:"×"}),w.jsxs("div",{style:ie.header,children:[w.jsx(cR,{node:e,repo:i}),w.jsx("h2",{style:ie.title,children:e.title}),w.jsxs("div",{style:ie.meta,children:[w.jsxs("span",{children:["ID: ",e.id]}),w.jsx("span",{children:w.jsx(fR,{status:e.status})}),w.jsxs("span",{children:["Created: ",new Date(e.created_at).toLocaleDateString()]})]})]}),e.description&&w.jsx("div",{style:ie.description,children:e.description}),o.length>0&&w.jsxs("div",{style:ie.section,children:[w.jsxs("h3",{style:ie.sectionTitle,children:["Incoming (",o.length,")"]}),o.map(u=>w.jsxs("div",{style:ie.connection,onClick:()=>n(u.from_node_id),children:[w.jsxs("div",{style:ie.connectionHeader,children:[w.jsx(Aa,{type:u.edge_type}),w.jsx("span",{style:ie.arrow,children:"←"}),w.jsx("span",{style:ie.connectionTitle,children:s(u.from_node_id)})]}),u.rationale&&w.jsx("div",{style:ie.connectionRationale,children:u.rationale})]},u.id))]}),a.length>0&&w.jsxs("div",{style:ie.section,children:[w.jsxs("h3",{style:ie.sectionTitle,children:["Outgoing (",a.length,")"]}),a.map(u=>w.jsxs("div",{style:ie.connection,onClick:()=>n(u.to_node_id),children:[w.jsxs("div",{style:ie.connectionHeader,children:[w.jsx(Aa,{type:u.edge_type}),w.jsx("span",{style:ie.arrow,children:"→"}),w.jsx("span",{style:ie.connectionTitle,children:s(u.to_node_id)})]}),u.rationale&&w.jsx("div",{style:ie.connectionRationale,children:u.rationale})]},u.id))]}),w.jsxs("div",{style:ie.navLinks,children:[w.jsx("a",{href:"../decision-graph",style:ie.link,children:"Learn about the graph →"}),w.jsx("a",{href:"../claude-tooling",style:ie.link,children:"See the tooling →"})]})]})},ie={panel:{padding:"25px",height:"100%",overflowY:"auto",backgroundColor:"#1a1a2e",position:"relative"},empty:{textAlign:"center",color:"#666",paddingTop:"80px"},closeButton:{position:"absolute",top:"15px",right:"15px",width:"30px",height:"30px",border:"none",background:"#333",color:"#fff",borderRadius:"4px",fontSize:"20px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},header:{marginBottom:"20px"},title:{fontSize:"24px",margin:"12px 0 8px 0",color:"#eee"},meta:{display:"flex",gap:"20px",fontSize:"14px",color:"#888",flexWrap:"wrap"},description:{backgroundColor:"#16213e",padding:"20px",borderRadius:"8px",marginBottom:"20px",lineHeight:1.6,color:"#ddd"},section:{marginTop:"20px"},sectionTitle:{fontSize:"16px",marginBottom:"12px",color:"#888"},connection:{padding:"12px",backgroundColor:"#16213e",borderRadius:"6px",marginBottom:"8px",cursor:"pointer",transition:"background-color 0.2s"},connectionHeader:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},connectionTitle:{color:"#eee",fontSize:"13px",flex:1,minWidth:0},connectionRationale:{color:"#888",fontSize:"12px",marginTop:"8px",paddingTop:"8px",borderTop:"1px solid #0f3460",lineHeight:1.4},arrow:{color:"#666",flexShrink:0},navLinks:{marginTop:"20px",paddingTop:"20px",borderTop:"1px solid #333"},link:{color:"#00d9ff",textDecoration:"none",marginRight:"20px",fontSize:"13px"}},dR=({graphData:e,chains:t,sessions:n})=>{const[r,i]=N.useState("chains"),[o,a]=N.useState(null),[s,u]=N.useState(null),l=o!==null?t[o]:null,c=N.useMemo(()=>{if(!l)return new Map;const g=new Map;return l.edges.forEach(v=>g.set(v.to_node_id,v)),g},[l]),f=g=>{a(g),u(null)},d=g=>{const v=e.nodes.find(y=>y.id===g);v&&(u(v),a(null))},h=g=>{const v=e.nodes.find(y=>y.id===g);v&&u(v)};return w.jsxs("div",{style:D.container,children:[w.jsxs("div",{style:D.sidebar,children:[w.jsx("div",{style:D.viewToggle,children:["chains","sessions","all"].map(g=>w.jsx("button",{onClick:()=>i(g),style:{...D.viewBtn,...r===g?D.viewBtnActive:{}},children:g==="all"?"All Nodes":g.charAt(0).toUpperCase()+g.slice(1)},g))}),w.jsxs("div",{style:D.sidebarContent,children:[r==="chains"&&w.jsx(hR,{chains:t,selectedIndex:o,onSelect:f}),r==="sessions"&&w.jsx(pR,{sessions:n,chains:t,selectedChainIndex:o,onSelectChain:f}),r==="all"&&w.jsx(vR,{nodes:e.nodes,selectedNode:s,onSelect:d})]})]}),w.jsx("div",{style:D.detailPanel,children:l&&!s?w.jsx(gR,{chain:l,edgeMap:c,selectedNode:s,onSelectNode:h}):w.jsx(fE,{node:s,graphData:e,onSelectNode:d})})]})},hR=({chains:e,selectedIndex:t,onSelect:n})=>w.jsx("div",{style:D.nodeList,children:e.map((r,i)=>{const o=[...new Set(r.nodes.map(s=>s.node_type))],a=t===i;return w.jsxs("div",{onClick:()=>n(i),style:{...D.chainItem,...a?D.chainItemSelected:{}},children:[w.jsxs("div",{style:D.chainSummary,children:[w.jsx(Ge,{type:r.root.node_type,size:"sm"}),w.jsx("span",{style:D.chainTitle,children:ut(r.root.title,40)})]}),w.jsxs("div",{style:D.chainStats,children:[r.nodes.length," nodes · ",r.edges.length," edges"]}),w.jsx("div",{style:D.chainTypes,children:o.map(s=>w.jsx("span",{style:{...D.chainTypeDot,backgroundColor:It(s)},title:s},s))})]},i)})}),pR=({sessions:e,chains:t,selectedChainIndex:n,onSelectChain:r})=>{const[i,o]=N.useState(new Set),a=s=>{o(u=>{const l=new Set(u);return l.has(s)?l.delete(s):l.add(s),l})};return w.jsx("div",{children:e.map((s,u)=>{const l=new Date(s.startTime),c=l.toLocaleDateString("en-US",{month:"short",day:"numeric"}),f=l.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}),d=i.has(u);return w.jsxs("div",{style:D.sessionGroup,children:[w.jsxs("div",{onClick:()=>a(u),style:{...D.sessionHeader,...d?D.sessionHeaderExpanded:{}},children:[w.jsx("span",{style:{...D.sessionToggle,transform:d?"rotate(90deg)":"none"},children:"▶"}),w.jsxs("span",{style:D.sessionTitle,children:[c," @ ",f]}),w.jsxs("span",{style:D.sessionCount,children:[s.nodes.length," nodes"]})]}),d&&w.jsx("div",{style:D.chainList,children:s.chains.length>0?s.chains.map(h=>{const g=t.indexOf(h),v=[...new Set(h.nodes.map(y=>y.node_type))];return w.jsxs("div",{onClick:()=>r(g),style:{...D.chainItem,...n===g?D.chainItemSelected:{}},children:[w.jsxs("div",{style:D.chainSummary,children:[w.jsx(Ge,{type:h.root.node_type,size:"sm"}),w.jsx("span",{style:D.chainTitle,children:ut(h.root.title,35)})]}),w.jsxs("div",{style:D.chainStats,children:[h.nodes.length," nodes · ",h.edges.length," edges"]}),w.jsx("div",{style:D.chainTypes,children:v.map(y=>w.jsx("span",{style:{...D.chainTypeDot,backgroundColor:It(y)},title:y},y))})]},g)}):w.jsx("div",{style:{color:"#666",fontSize:"12px",padding:"10px"},children:"No complete chains in this session"})})]},u)})})},vR=({nodes:e,selectedNode:t,onSelect:n})=>w.jsx("div",{style:D.nodeList,children:e.map(r=>w.jsxs("div",{onClick:()=>n(r.id),style:{...D.nodeItem,...(t==null?void 0:t.id)===r.id?D.nodeItemSelected:{}},children:[w.jsx(Ge,{type:r.node_type}),w.jsx("div",{style:D.nodeTitle,children:r.title})]},r.id))}),gR=({chain:e,edgeMap:t,selectedNode:n,onSelectNode:r})=>{const i=QT(e.nodes[0].created_at,e.nodes[e.nodes.length-1].created_at);return w.jsxs("div",{style:D.chainFlow,children:[w.jsxs("div",{style:D.chainFlowHeader,children:[w.jsx(Ge,{type:e.root.node_type}),w.jsx("h2",{style:D.chainFlowTitle,children:e.root.title}),w.jsxs("div",{style:D.chainFlowMeta,children:[e.nodes.length," nodes · ",e.edges.length," connections · ",i]})]}),w.jsx("div",{style:D.flowTimeline,children:e.nodes.map(o=>{const a=t.get(o.id),s=(n==null?void 0:n.id)===o.id,u=new Date(o.created_at).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}),l=$r(o),c=bn(o);return w.jsxs(gp.Fragment,{children:[(a==null?void 0:a.rationale)&&w.jsxs("div",{style:D.flowEdgeLabel,children:["↳ ",a.rationale]}),w.jsxs("div",{onClick:()=>r(o.id),style:{...D.flowNode,borderColor:s?"#00d9ff":"#0f3460",backgroundColor:s?"#1c2844":"#16213e"},children:[w.jsx("div",{style:{...D.flowNodeMarker,backgroundColor:It(o.node_type),borderColor:It(o.node_type)}}),w.jsxs("div",{style:D.flowNodeHeader,children:[w.jsx(Ge,{type:o.node_type,size:"sm"}),w.jsx(uo,{confidence:l}),w.jsx(Br,{commit:c}),w.jsx("span",{style:D.flowNodeTitle,children:o.title}),w.jsx("span",{style:D.flowNodeTime,children:u})]}),o.description&&w.jsx("div",{style:D.flowNodeDesc,children:o.description})]})]},o.id)})}),w.jsxs("div",{style:D.navLinks,children:[w.jsx("a",{href:"../decision-graph",style:D.link,children:"Learn about the graph →"}),w.jsx("a",{href:"../claude-tooling",style:D.link,children:"See the tooling →"})]})]})},D={container:{display:"flex",height:"100%",gap:"0"},sidebar:{width:"380px",backgroundColor:"#16213e",borderRight:"1px solid #0f3460",display:"flex",flexDirection:"column",flexShrink:0},viewToggle:{display:"flex",padding:"10px",gap:"5px",borderBottom:"1px solid #0f3460"},viewBtn:{flex:1,padding:"8px",border:"none",backgroundColor:"#1a1a2e",color:"#888",borderRadius:"4px",cursor:"pointer",fontSize:"12px"},viewBtnActive:{backgroundColor:"#0f3460",color:"#00d9ff"},sidebarContent:{flex:1,overflowY:"auto"},nodeList:{padding:"10px"},chainItem:{padding:"10px 12px",margin:"4px 0",backgroundColor:"#252547",borderRadius:"6px",cursor:"pointer",borderLeft:"3px solid transparent"},chainItemSelected:{borderLeftColor:"#00d9ff",backgroundColor:"#2d2d5a"},chainSummary:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px"},chainTitle:{fontSize:"13px",flex:1},chainStats:{fontSize:"10px",color:"#666"},chainTypes:{display:"flex",gap:"3px",marginTop:"6px"},chainTypeDot:{width:"8px",height:"8px",borderRadius:"50%"},sessionGroup:{borderBottom:"1px solid #0f3460"},sessionHeader:{padding:"12px 15px",backgroundColor:"#1a1a2e",cursor:"pointer",display:"flex",alignItems:"center",gap:"10px"},sessionHeaderExpanded:{},sessionToggle:{width:"16px",height:"16px",display:"flex",alignItems:"center",justifyContent:"center",color:"#666",transition:"transform 0.2s"},sessionTitle:{flex:1,fontSize:"13px",fontWeight:600},sessionCount:{fontSize:"11px",color:"#666",backgroundColor:"#0f3460",padding:"2px 8px",borderRadius:"10px"},chainList:{padding:"5px 10px 10px"},nodeItem:{padding:"12px",marginBottom:"8px",backgroundColor:"#1a1a2e",borderRadius:"6px",cursor:"pointer",borderLeft:"4px solid transparent"},nodeItemSelected:{borderLeftColor:"#00d9ff",backgroundColor:"#252547"},nodeTitle:{fontSize:"14px",lineHeight:1.4,marginTop:"6px"},detailPanel:{flex:1,overflowY:"auto",backgroundColor:"#1a1a2e"},chainFlow:{maxWidth:"700px",padding:"25px"},chainFlowHeader:{marginBottom:"25px"},chainFlowTitle:{fontSize:"20px",marginTop:"8px",marginBottom:"8px"},chainFlowMeta:{fontSize:"12px",color:"#666"},flowTimeline:{position:"relative",paddingLeft:"30px"},flowEdgeLabel:{fontSize:"11px",color:"#4ade80",margin:"-10px 0 10px 0",paddingLeft:"5px",fontWeight:500},flowNode:{position:"relative",marginBottom:"20px",padding:"15px",backgroundColor:"#16213e",borderRadius:"8px",border:"1px solid #0f3460",cursor:"pointer",transition:"all 0.2s"},flowNodeMarker:{position:"absolute",left:"-26px",top:"20px",width:"12px",height:"12px",borderRadius:"50%",border:"2px solid"},flowNodeHeader:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"8px",flexWrap:"wrap"},flowNodeTitle:{fontSize:"14px",fontWeight:500,flex:1,color:"#eee"},flowNodeTime:{fontSize:"10px",color:"#888"},flowNodeDesc:{fontSize:"12px",color:"#aaa",lineHeight:1.5},navLinks:{marginTop:"20px",paddingTop:"20px",borderTop:"1px solid #333"},link:{color:"#00d9ff",textDecoration:"none",marginRight:"20px",fontSize:"13px"}},mR=({graphData:e,gitHistory:t=[]})=>{const[n,r]=N.useState("all"),[i,o]=N.useState(""),[a,s]=N.useState(null),u=N.useMemo(()=>tR(e.nodes,t),[e.nodes,t]),l=N.useMemo(()=>{let f=u;if(n==="nodes"?f=f.filter(d=>d.type==="node"):n==="commits"?f=f.filter(d=>d.type==="commit"):n==="linked"&&(f=f.filter(d=>d.type==="node"&&d.linkedCommits&&d.linkedCommits.length>0||d.type==="commit"&&d.linkedNodes&&d.linkedNodes.length>0)),i){const d=i.toLowerCase();f=f.filter(h=>{var g;return h.type==="node"?h.node.title.toLowerCase().includes(d)||(((g=h.node.description)==null?void 0:g.toLowerCase().includes(d))??!1):h.commit.message.toLowerCase().includes(d)})}return f},[u,n,i]),c=f=>{const d=e.nodes.find(h=>h.id===f);d&&s(d)};return w.jsxs("div",{style:Z.container,children:[w.jsxs("div",{style:Z.controls,children:[w.jsx("h2",{style:Z.title,children:"Timeline"}),w.jsx("div",{style:Z.filterButtons,children:["all","nodes","commits","linked"].map(f=>w.jsx("button",{onClick:()=>r(f),style:{...Z.filterBtn,...n===f?Z.filterBtnActive:{}},children:f==="all"?"All":f.charAt(0).toUpperCase()+f.slice(1)},f))}),w.jsx("input",{type:"text",placeholder:"Search...",value:i,onChange:f=>o(f.target.value),style:Z.search})]}),w.jsx("div",{style:Z.timelineContainer,children:w.jsxs("div",{style:Z.timeline,children:[l.map((f,d)=>w.jsx(yR,{item:f,onSelectNode:c},d)),l.length===0&&w.jsx("div",{style:Z.empty,children:"No items match your filters"})]})}),w.jsx("div",{style:Z.detailPanel,children:w.jsx(fE,{node:a,graphData:e,onSelectNode:c,onClose:()=>s(null)})})]})},yR=({item:e,onSelectNode:t})=>{const n=e.timestamp.toLocaleDateString("en-US",{month:"short",day:"numeric"}),r=e.timestamp.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});if(e.type==="node"&&e.node){const i=e.node,o=$r(i),a=bn(i);return w.jsxs("div",{style:Z.timelineItem,onClick:()=>t(i.id),children:[w.jsx("div",{style:{...Z.marker,backgroundColor:It(i.node_type)}}),w.jsxs("div",{style:Z.itemContent,children:[w.jsxs("div",{style:Z.itemHeader,children:[w.jsx(Ge,{type:i.node_type,size:"sm"}),w.jsx(uo,{confidence:o}),a&&w.jsx(Br,{commit:a}),w.jsxs("span",{style:Z.itemTime,children:[n," ",r]})]}),w.jsx("div",{style:Z.itemTitle,children:i.title}),i.description&&w.jsx("div",{style:Z.itemDesc,children:ut(i.description,100)}),e.linkedCommits&&e.linkedCommits.length>0&&w.jsxs("div",{style:Z.linked,children:["Linked to ",e.linkedCommits.length," commit(s)"]})]})]})}if(e.type==="commit"&&e.commit){const i=e.commit;return w.jsxs("div",{style:Z.timelineItem,children:[w.jsx("div",{style:{...Z.marker,backgroundColor:"#3b82f6"}}),w.jsxs("div",{style:Z.itemContent,children:[w.jsxs("div",{style:Z.itemHeader,children:[w.jsx("span",{style:Z.commitBadgeSmall,children:"commit"}),w.jsx(Br,{commit:i.hash}),w.jsxs("span",{style:Z.itemTime,children:[n," ",r]})]}),w.jsx("div",{style:Z.itemTitle,children:ut(i.message,60)}),w.jsxs("div",{style:Z.itemMeta,children:["by ",i.author,i.files_changed&&` · ${i.files_changed} files`]}),e.linkedNodes&&e.linkedNodes.length>0&&w.jsxs("div",{style:Z.linked,children:["Linked to ",e.linkedNodes.length," decision(s)"]})]})]})}return null},Z={container:{height:"100%",display:"flex",gap:"0"},controls:{width:"200px",padding:"20px",backgroundColor:"#16213e",borderRight:"1px solid #0f3460",flexShrink:0},title:{fontSize:"16px",margin:"0 0 15px 0",color:"#eee"},filterButtons:{display:"flex",flexDirection:"column",gap:"4px"},filterBtn:{padding:"8px 12px",fontSize:"12px",border:"none",backgroundColor:"#1a1a2e",color:"#888",borderRadius:"4px",cursor:"pointer",textAlign:"left"},filterBtnActive:{backgroundColor:"#0f3460",color:"#00d9ff"},search:{width:"100%",padding:"8px",marginTop:"15px",backgroundColor:"#1a1a2e",border:"1px solid #333",borderRadius:"4px",color:"#eee",fontSize:"12px"},timelineContainer:{flex:2,overflowY:"auto",padding:"20px"},timeline:{maxWidth:"700px",position:"relative",paddingLeft:"30px"},timelineItem:{position:"relative",marginBottom:"15px",padding:"15px",backgroundColor:"#16213e",borderRadius:"8px",border:"1px solid #0f3460",cursor:"pointer",transition:"border-color 0.2s"},marker:{position:"absolute",left:"-24px",top:"20px",width:"12px",height:"12px",borderRadius:"50%",border:"2px solid #1a1a2e"},itemContent:{},itemHeader:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"6px",flexWrap:"wrap"},itemTime:{fontSize:"11px",color:"#666",marginLeft:"auto"},itemTitle:{fontSize:"14px",color:"#eee",marginBottom:"4px"},itemDesc:{fontSize:"12px",color:"#888",lineHeight:1.4},itemMeta:{fontSize:"11px",color:"#666"},linked:{fontSize:"11px",color:"#4ade80",marginTop:"8px"},commitBadgeSmall:{fontSize:"9px",padding:"2px 6px",backgroundColor:"#3b82f633",color:"#60a5fa",borderRadius:"3px",textTransform:"uppercase"},detailPanel:{flex:1,minWidth:"350px",borderLeft:"1px solid #0f3460"},empty:{textAlign:"center",color:"#666",padding:"40px"}};var _R={value:()=>{}};function lo(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new oa(n)}function oa(e){this._=e}function xR(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}oa.prototype=lo.prototype={constructor:oa,on:function(e,t){var n=this._,r=xR(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=wR(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=hm(n[i],e.name,t);else if(t==null)for(i in n)n[i]=hm(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new oa(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function wR(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function hm(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=_R,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Jh="http://www.w3.org/1999/xhtml";const pm={svg:"http://www.w3.org/2000/svg",xhtml:Jh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ls(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),pm.hasOwnProperty(t)?{space:pm[t],local:e}:e}function SR(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Jh&&t.documentElement.namespaceURI===Jh?t.createElement(e):t.createElementNS(n,e)}}function ER(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function dE(e){var t=ls(e);return(t.local?ER:SR)(t)}function CR(){}function hv(e){return e==null?CR:function(){return this.querySelector(e)}}function kR(e){typeof e!="function"&&(e=hv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=new Array(a),u,l,c=0;c<a;++c)(u=o[c])&&(l=e.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new Je(r,this._parents)}function bR(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function TR(){return[]}function hE(e){return e==null?TR:function(){return this.querySelectorAll(e)}}function RR(e){return function(){return bR(e.apply(this,arguments))}}function NR(e){typeof e=="function"?e=RR(e):e=hE(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],s=a.length,u,l=0;l<s;++l)(u=a[l])&&(r.push(e.call(u,u.__data__,l,a)),i.push(u));return new Je(r,i)}function pE(e){return function(){return this.matches(e)}}function vE(e){return function(t){return t.matches(e)}}var IR=Array.prototype.find;function PR(e){return function(){return IR.call(this.children,e)}}function jR(){return this.firstElementChild}function qR(e){return this.select(e==null?jR:PR(typeof e=="function"?e:vE(e)))}var AR=Array.prototype.filter;function MR(){return Array.from(this.children)}function LR(e){return function(){return AR.call(this.children,e)}}function OR(e){return this.selectAll(e==null?MR:LR(typeof e=="function"?e:vE(e)))}function zR(e){typeof e!="function"&&(e=pE(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],u,l=0;l<a;++l)(u=o[l])&&e.call(u,u.__data__,l,o)&&s.push(u);return new Je(r,this._parents)}function gE(e){return new Array(e.length)}function FR(){return new Je(this._enter||this._groups.map(gE),this._parents)}function Ma(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ma.prototype={constructor:Ma,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function DR(e){return function(){return e}}function $R(e,t,n,r,i,o){for(var a=0,s,u=t.length,l=o.length;a<l;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ma(e,o[a]);for(;a<u;++a)(s=t[a])&&(i[a]=s)}function BR(e,t,n,r,i,o,a){var s,u,l=new Map,c=t.length,f=o.length,d=new Array(c),h;for(s=0;s<c;++s)(u=t[s])&&(d[s]=h=a.call(u,u.__data__,s,t)+"",l.has(h)?i[s]=u:l.set(h,u));for(s=0;s<f;++s)h=a.call(e,o[s],s,o)+"",(u=l.get(h))?(r[s]=u,u.__data__=o[s],l.delete(h)):n[s]=new Ma(e,o[s]);for(s=0;s<c;++s)(u=t[s])&&l.get(d[s])===u&&(i[s]=u)}function UR(e){return e.__data__}function HR(e,t){if(!arguments.length)return Array.from(this,UR);var n=t?BR:$R,r=this._parents,i=this._groups;typeof e!="function"&&(e=DR(e));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],f=i[l],d=f.length,h=VR(e.call(c,c&&c.__data__,l,r)),g=h.length,v=s[l]=new Array(g),y=a[l]=new Array(g),p=u[l]=new Array(d);n(c,f,v,y,p,h,t);for(var m=0,_=0,x,S;m<g;++m)if(x=v[m]){for(m>=_&&(_=m+1);!(S=y[_])&&++_<g;);x._next=S||null}}return a=new Je(a,r),a._enter=s,a._exit=u,a}function VR(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function GR(){return new Je(this._exit||this._groups.map(gE),this._parents)}function WR(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function KR(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l=n[u],c=r[u],f=l.length,d=s[u]=new Array(f),h,g=0;g<f;++g)(h=l[g]||c[g])&&(d[g]=h);for(;u<i;++u)s[u]=n[u];return new Je(s,this._parents)}function YR(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function QR(e){e||(e=XR);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(t)}return new Je(i,this._parents).order()}function XR(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ZR(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function JR(){return Array.from(this)}function eN(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function tN(){let e=0;for(const t of this)++e;return e}function nN(){return!this.node()}function rN(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function iN(e){return function(){this.removeAttribute(e)}}function oN(e){return function(){this.removeAttributeNS(e.space,e.local)}}function aN(e,t){return function(){this.setAttribute(e,t)}}function sN(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function uN(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function lN(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function cN(e,t){var n=ls(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?oN:iN:typeof t=="function"?n.local?lN:uN:n.local?sN:aN)(n,t))}function mE(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function fN(e){return function(){this.style.removeProperty(e)}}function dN(e,t,n){return function(){this.style.setProperty(e,t,n)}}function hN(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function pN(e,t,n){return arguments.length>1?this.each((t==null?fN:typeof t=="function"?hN:dN)(e,t,n??"")):Ur(this.node(),e)}function Ur(e,t){return e.style.getPropertyValue(t)||mE(e).getComputedStyle(e,null).getPropertyValue(t)}function vN(e){return function(){delete this[e]}}function gN(e,t){return function(){this[e]=t}}function mN(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function yN(e,t){return arguments.length>1?this.each((t==null?vN:typeof t=="function"?mN:gN)(e,t)):this.node()[e]}function yE(e){return e.trim().split(/^|\s+/)}function pv(e){return e.classList||new _E(e)}function _E(e){this._node=e,this._names=yE(e.getAttribute("class")||"")}_E.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function xE(e,t){for(var n=pv(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function wE(e,t){for(var n=pv(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function _N(e){return function(){xE(this,e)}}function xN(e){return function(){wE(this,e)}}function wN(e,t){return function(){(t.apply(this,arguments)?xE:wE)(this,e)}}function SN(e,t){var n=yE(e+"");if(arguments.length<2){for(var r=pv(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?wN:t?_N:xN)(n,t))}function EN(){this.textContent=""}function CN(e){return function(){this.textContent=e}}function kN(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function bN(e){return arguments.length?this.each(e==null?EN:(typeof e=="function"?kN:CN)(e)):this.node().textContent}function TN(){this.innerHTML=""}function RN(e){return function(){this.innerHTML=e}}function NN(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function IN(e){return arguments.length?this.each(e==null?TN:(typeof e=="function"?NN:RN)(e)):this.node().innerHTML}function PN(){this.nextSibling&&this.parentNode.appendChild(this)}function jN(){return this.each(PN)}function qN(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function AN(){return this.each(qN)}function MN(e){var t=typeof e=="function"?e:dE(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function LN(){return null}function ON(e,t){var n=typeof e=="function"?e:dE(e),r=t==null?LN:typeof t=="function"?t:hv(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function zN(){var e=this.parentNode;e&&e.removeChild(this)}function FN(){return this.each(zN)}function DN(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $N(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function BN(e){return this.select(e?$N:DN)}function UN(e){return arguments.length?this.property("__data__",e):this.node().__data__}function HN(e){return function(t){e.call(this,t,this.__data__)}}function VN(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function GN(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function WN(e,t,n){return function(){var r=this.__on,i,o=HN(t);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function KN(e,t,n){var r=VN(e+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?WN:GN,i=0;i<o;++i)this.each(s(r[i],t,n));return this}function SE(e,t,n){var r=mE(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function YN(e,t){return function(){return SE(this,e,t)}}function QN(e,t){return function(){return SE(this,e,t.apply(this,arguments))}}function XN(e,t){return this.each((typeof t=="function"?QN:YN)(e,t))}function*ZN(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var EE=[null];function Je(e,t){this._groups=e,this._parents=t}function co(){return new Je([[document.documentElement]],EE)}function JN(){return this}Je.prototype=co.prototype={constructor:Je,select:kR,selectAll:NR,selectChild:qR,selectChildren:OR,filter:zR,data:HR,enter:FR,exit:GR,join:WR,merge:KR,selection:JN,order:YR,sort:QR,call:ZR,nodes:JR,node:eN,size:tN,empty:nN,each:rN,attr:cN,style:pN,property:yN,classed:SN,text:bN,html:IN,raise:jN,lower:AN,append:MN,insert:ON,remove:FN,clone:BN,datum:UN,on:KN,dispatch:XN,[Symbol.iterator]:ZN};function De(e){return typeof e=="string"?new Je([[document.querySelector(e)]],[document.documentElement]):new Je([[e]],EE)}function eI(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Lt(e,t){if(e=eI(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const tI={passive:!1},Zi={capture:!0,passive:!1};function iu(e){e.stopImmediatePropagation()}function jr(e){e.preventDefault(),e.stopImmediatePropagation()}function CE(e){var t=e.document.documentElement,n=De(e).on("dragstart.drag",jr,Zi);"onselectstart"in t?n.on("selectstart.drag",jr,Zi):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function kE(e,t){var n=e.document.documentElement,r=De(e).on("dragstart.drag",null);t&&(r.on("click.drag",jr,Zi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Do=e=>()=>e;function ep(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}ep.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function nI(e){return!e.ctrlKey&&!e.button}function rI(){return this.parentNode}function iI(e,t){return t??{x:e.x,y:e.y}}function oI(){return navigator.maxTouchPoints||"ontouchstart"in this}function aI(){var e=nI,t=rI,n=iI,r=oI,i={},o=lo("start","drag","end"),a=0,s,u,l,c,f=0;function d(x){x.on("mousedown.drag",h).filter(r).on("touchstart.drag",y).on("touchmove.drag",p,tI).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,S){if(!(c||!e.call(this,x,S))){var E=_(this,t.call(this,x,S),x,S,"mouse");E&&(De(x.view).on("mousemove.drag",g,Zi).on("mouseup.drag",v,Zi),CE(x.view),iu(x),l=!1,s=x.clientX,u=x.clientY,E("start",x))}}function g(x){if(jr(x),!l){var S=x.clientX-s,E=x.clientY-u;l=S*S+E*E>f}i.mouse("drag",x)}function v(x){De(x.view).on("mousemove.drag mouseup.drag",null),kE(x.view,l),jr(x),i.mouse("end",x)}function y(x,S){if(e.call(this,x,S)){var E=x.changedTouches,C=t.call(this,x,S),T=E.length,M,k;for(M=0;M<T;++M)(k=_(this,C,x,S,E[M].identifier,E[M]))&&(iu(x),k("start",x,E[M]))}}function p(x){var S=x.changedTouches,E=S.length,C,T;for(C=0;C<E;++C)(T=i[S[C].identifier])&&(jr(x),T("drag",x,S[C]))}function m(x){var S=x.changedTouches,E=S.length,C,T;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),C=0;C<E;++C)(T=i[S[C].identifier])&&(iu(x),T("end",x,S[C]))}function _(x,S,E,C,T,M){var k=o.copy(),j=Lt(M||E,S),B,H,b;if((b=n.call(x,new ep("beforestart",{sourceEvent:E,target:d,identifier:T,active:a,x:j[0],y:j[1],dx:0,dy:0,dispatch:k}),C))!=null)return B=b.x-j[0]||0,H=b.y-j[1]||0,function P(R,O,I){var A=j,L;switch(R){case"start":i[T]=P,L=a++;break;case"end":delete i[T],--a;case"drag":j=Lt(I||O,S),L=a;break}k.call(R,x,new ep(R,{sourceEvent:O,subject:b,target:d,identifier:T,active:L,x:j[0]+B,y:j[1]+H,dx:j[0]-A[0],dy:j[1]-A[1],dispatch:k}),C)}}return d.filter=function(x){return arguments.length?(e=typeof x=="function"?x:Do(!!x),d):e},d.container=function(x){return arguments.length?(t=typeof x=="function"?x:Do(x),d):t},d.subject=function(x){return arguments.length?(n=typeof x=="function"?x:Do(x),d):n},d.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:Do(!!x),d):r},d.on=function(){var x=o.on.apply(o,arguments);return x===o?d:x},d.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,d):Math.sqrt(f)},d}function vv(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bE(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fo(){}var Ji=.7,La=1/Ji,qr="\\s*([+-]?\\d+)\\s*",eo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sI=/^#([0-9a-f]{3,8})$/,uI=new RegExp(`^rgb\\(${qr},${qr},${qr}\\)$`),lI=new RegExp(`^rgb\\(${Nt},${Nt},${Nt}\\)$`),cI=new RegExp(`^rgba\\(${qr},${qr},${qr},${eo}\\)$`),fI=new RegExp(`^rgba\\(${Nt},${Nt},${Nt},${eo}\\)$`),dI=new RegExp(`^hsl\\(${eo},${Nt},${Nt}\\)$`),hI=new RegExp(`^hsla\\(${eo},${Nt},${Nt},${eo}\\)$`),vm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};vv(fo,to,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gm,formatHex:gm,formatHex8:pI,formatHsl:vI,formatRgb:mm,toString:mm});function gm(){return this.rgb().formatHex()}function pI(){return this.rgb().formatHex8()}function vI(){return TE(this).formatHsl()}function mm(){return this.rgb().formatRgb()}function to(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=sI.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ym(t):n===3?new Be(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?$o(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?$o(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=uI.exec(e))?new Be(t[1],t[2],t[3],1):(t=lI.exec(e))?new Be(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=cI.exec(e))?$o(t[1],t[2],t[3],t[4]):(t=fI.exec(e))?$o(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=dI.exec(e))?wm(t[1],t[2]/100,t[3]/100,1):(t=hI.exec(e))?wm(t[1],t[2]/100,t[3]/100,t[4]):vm.hasOwnProperty(e)?ym(vm[e]):e==="transparent"?new Be(NaN,NaN,NaN,0):null}function ym(e){return new Be(e>>16&255,e>>8&255,e&255,1)}function $o(e,t,n,r){return r<=0&&(e=t=n=NaN),new Be(e,t,n,r)}function gI(e){return e instanceof fo||(e=to(e)),e?(e=e.rgb(),new Be(e.r,e.g,e.b,e.opacity)):new Be}function tp(e,t,n,r){return arguments.length===1?gI(e):new Be(e,t,n,r??1)}function Be(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}vv(Be,tp,bE(fo,{brighter(e){return e=e==null?La:Math.pow(La,e),new Be(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ji:Math.pow(Ji,e),new Be(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Be(Vn(this.r),Vn(this.g),Vn(this.b),Oa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_m,formatHex:_m,formatHex8:mI,formatRgb:xm,toString:xm}));function _m(){return`#${$n(this.r)}${$n(this.g)}${$n(this.b)}`}function mI(){return`#${$n(this.r)}${$n(this.g)}${$n(this.b)}${$n((isNaN(this.opacity)?1:this.opacity)*255)}`}function xm(){const e=Oa(this.opacity);return`${e===1?"rgb(":"rgba("}${Vn(this.r)}, ${Vn(this.g)}, ${Vn(this.b)}${e===1?")":`, ${e})`}`}function Oa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function $n(e){return e=Vn(e),(e<16?"0":"")+e.toString(16)}function wm(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gt(e,t,n,r)}function TE(e){if(e instanceof gt)return new gt(e.h,e.s,e.l,e.opacity);if(e instanceof fo||(e=to(e)),!e)return new gt;if(e instanceof gt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new gt(a,s,u,e.opacity)}function yI(e,t,n,r){return arguments.length===1?TE(e):new gt(e,t,n,r??1)}function gt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}vv(gt,yI,bE(fo,{brighter(e){return e=e==null?La:Math.pow(La,e),new gt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ji:Math.pow(Ji,e),new gt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Be(ou(e>=240?e-240:e+120,i,r),ou(e,i,r),ou(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new gt(Sm(this.h),Bo(this.s),Bo(this.l),Oa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Oa(this.opacity);return`${e===1?"hsl(":"hsla("}${Sm(this.h)}, ${Bo(this.s)*100}%, ${Bo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Sm(e){return e=(e||0)%360,e<0?e+360:e}function Bo(e){return Math.max(0,Math.min(1,e||0))}function ou(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const RE=e=>()=>e;function _I(e,t){return function(n){return e+n*t}}function xI(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function wI(e){return(e=+e)==1?NE:function(t,n){return n-t?xI(t,n,e):RE(isNaN(t)?n:t)}}function NE(e,t){var n=t-e;return n?_I(e,n):RE(isNaN(e)?t:e)}const Em=function e(t){var n=wI(t);function r(i,o){var a=n((i=tp(i)).r,(o=tp(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=NE(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function an(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var np=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,au=new RegExp(np.source,"g");function SI(e){return function(){return e}}function EI(e){return function(t){return e(t)+""}}function CI(e,t){var n=np.lastIndex=au.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(e=e+"",t=t+"";(r=np.exec(e))&&(i=au.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:an(r,i)})),n=au.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?EI(u[0].x):SI(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}var Cm=180/Math.PI,rp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function IE(e,t,n,r,i,o){var a,s,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),e*r<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Cm,skewX:Math.atan(u)*Cm,scaleX:a,scaleY:s}}var Uo;function kI(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?rp:IE(t.a,t.b,t.c,t.d,t.e,t.f)}function bI(e){return e==null||(Uo||(Uo=document.createElementNS("http://www.w3.org/2000/svg","g")),Uo.setAttribute("transform",e),!(e=Uo.transform.baseVal.consolidate()))?rp:(e=e.matrix,IE(e.a,e.b,e.c,e.d,e.e,e.f))}function PE(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,d,h,g){if(l!==f||c!==d){var v=h.push("translate(",null,t,null,n);g.push({i:v-4,x:an(l,f)},{i:v-2,x:an(c,d)})}else(f||d)&&h.push("translate("+f+t+d+n)}function a(l,c,f,d){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),d.push({i:f.push(i(f)+"rotate(",null,r)-2,x:an(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(l,c,f,d){l!==c?d.push({i:f.push(i(f)+"skewX(",null,r)-2,x:an(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,d,h,g){if(l!==f||c!==d){var v=h.push(i(h)+"scale(",null,",",null,")");g.push({i:v-4,x:an(l,f)},{i:v-2,x:an(c,d)})}else(f!==1||d!==1)&&h.push(i(h)+"scale("+f+","+d+")")}return function(l,c){var f=[],d=[];return l=e(l),c=e(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,d),a(l.rotate,c.rotate,f,d),s(l.skewX,c.skewX,f,d),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,d),l=c=null,function(h){for(var g=-1,v=d.length,y;++g<v;)f[(y=d[g]).i]=y.x(h);return f.join("")}}}var TI=PE(kI,"px, ","px)","deg)"),RI=PE(bI,", ",")",")"),NI=1e-12;function km(e){return((e=Math.exp(e))+1/e)/2}function II(e){return((e=Math.exp(e))-1/e)/2}function PI(e){return((e=Math.exp(2*e))-1)/(e+1)}const jI=function e(t,n,r){function i(o,a){var s=o[0],u=o[1],l=o[2],c=a[0],f=a[1],d=a[2],h=c-s,g=f-u,v=h*h+g*g,y,p;if(v<NI)p=Math.log(d/l)/t,y=function(C){return[s+C*h,u+C*g,l*Math.exp(t*C*p)]};else{var m=Math.sqrt(v),_=(d*d-l*l+r*v)/(2*l*n*m),x=(d*d-l*l-r*v)/(2*d*n*m),S=Math.log(Math.sqrt(_*_+1)-_),E=Math.log(Math.sqrt(x*x+1)-x);p=(E-S)/t,y=function(C){var T=C*p,M=km(S),k=l/(n*m)*(M*PI(t*T+S)-II(S));return[s+k*h,u+k*g,l*M/km(t*T+S)]}}return y.duration=p*1e3*t/Math.SQRT2,y}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return e(a,s,u)},i}(Math.SQRT2,2,4);var Hr=0,gi=0,ci=0,jE=1e3,za,mi,Fa=0,Zn=0,cs=0,no=typeof performance=="object"&&performance.now?performance:Date,qE=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function gv(){return Zn||(qE(qI),Zn=no.now()+cs)}function qI(){Zn=0}function Da(){this._call=this._time=this._next=null}Da.prototype=mv.prototype={constructor:Da,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?gv():+n)+(t==null?0:+t),!this._next&&mi!==this&&(mi?mi._next=this:za=this,mi=this),this._call=e,this._time=n,ip()},stop:function(){this._call&&(this._call=null,this._time=1/0,ip())}};function mv(e,t,n){var r=new Da;return r.restart(e,t,n),r}function AI(){gv(),++Hr;for(var e=za,t;e;)(t=Zn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Hr}function bm(){Zn=(Fa=no.now())+cs,Hr=gi=0;try{AI()}finally{Hr=0,LI(),Zn=0}}function MI(){var e=no.now(),t=e-Fa;t>jE&&(cs-=t,Fa=e)}function LI(){for(var e,t=za,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:za=n);mi=e,ip(r)}function ip(e){if(!Hr){gi&&(gi=clearTimeout(gi));var t=e-Zn;t>24?(e<1/0&&(gi=setTimeout(bm,e-no.now()-cs)),ci&&(ci=clearInterval(ci))):(ci||(Fa=no.now(),ci=setInterval(MI,jE)),Hr=1,qE(bm))}}function Tm(e,t,n){var r=new Da;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var OI=lo("start","end","cancel","interrupt"),zI=[],AE=0,Rm=1,op=2,aa=3,Nm=4,ap=5,sa=6;function fs(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;FI(e,n,{name:t,index:r,group:i,on:OI,tween:zI,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:AE})}function yv(e,t){var n=xt(e,t);if(n.state>AE)throw new Error("too late; already scheduled");return n}function Pt(e,t){var n=xt(e,t);if(n.state>aa)throw new Error("too late; already running");return n}function xt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function FI(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=mv(o,0,n.time);function o(l){n.state=Rm,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,f,d,h;if(n.state!==Rm)return u();for(c in r)if(h=r[c],h.name===n.name){if(h.state===aa)return Tm(a);h.state===Nm?(h.state=sa,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=sa,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(Tm(function(){n.state===aa&&(n.state=Nm,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=op,n.on.call("start",e,e.__data__,n.index,n.group),n.state===op){for(n.state=aa,i=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=h);i.length=f+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=ap,1),f=-1,d=i.length;++f<d;)i[f].call(e,c);n.state===ap&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=sa,n.timer.stop(),delete r[t];for(var l in r)return;delete e.__transition}}function ua(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>op&&r.state<ap,r.state=sa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function DI(e){return this.each(function(){ua(this,e)})}function $I(e,t){var n,r;return function(){var i=Pt(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function BI(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Pt(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===t){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function UI(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=xt(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?$I:BI)(n,e,t))}function _v(e,t,n){var r=e._id;return e.each(function(){var i=Pt(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return xt(i,r).value[t]}}function ME(e,t){var n;return(typeof t=="number"?an:t instanceof to?Em:(n=to(t))?(t=n,Em):CI)(e,t)}function HI(e){return function(){this.removeAttribute(e)}}function VI(e){return function(){this.removeAttributeNS(e.space,e.local)}}function GI(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function WI(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function KI(e,t,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=t(r=a,s)))}}function YI(e,t,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=t(r=a,s)))}}function QI(e,t){var n=ls(e),r=n==="transform"?RI:ME;return this.attrTween(e,typeof t=="function"?(n.local?YI:KI)(n,r,_v(this,"attr."+e,t)):t==null?(n.local?VI:HI)(n):(n.local?WI:GI)(n,r,t))}function XI(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ZI(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function JI(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&ZI(e,o)),n}return i._value=t,i}function eP(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&XI(e,o)),n}return i._value=t,i}function tP(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=ls(e);return this.tween(n,(r.local?JI:eP)(r,t))}function nP(e,t){return function(){yv(this,e).delay=+t.apply(this,arguments)}}function rP(e,t){return t=+t,function(){yv(this,e).delay=t}}function iP(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?nP:rP)(t,e)):xt(this.node(),t).delay}function oP(e,t){return function(){Pt(this,e).duration=+t.apply(this,arguments)}}function aP(e,t){return t=+t,function(){Pt(this,e).duration=t}}function sP(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?oP:aP)(t,e)):xt(this.node(),t).duration}function uP(e,t){if(typeof t!="function")throw new Error;return function(){Pt(this,e).ease=t}}function lP(e){var t=this._id;return arguments.length?this.each(uP(t,e)):xt(this.node(),t).ease}function cP(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Pt(this,e).ease=n}}function fP(e){if(typeof e!="function")throw new Error;return this.each(cP(this._id,e))}function dP(e){typeof e!="function"&&(e=pE(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],u,l=0;l<a;++l)(u=o[l])&&e.call(u,u.__data__,l,o)&&s.push(u);return new Kt(r,this._parents,this._name,this._id)}function hP(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=t[s],l=n[s],c=u.length,f=a[s]=new Array(c),d,h=0;h<c;++h)(d=u[h]||l[h])&&(f[h]=d);for(;s<r;++s)a[s]=t[s];return new Kt(a,this._parents,this._name,this._id)}function pP(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function vP(e,t,n){var r,i,o=pP(t)?yv:Pt;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function gP(e,t){var n=this._id;return arguments.length<2?xt(this.node(),n).on.on(e):this.each(vP(n,e,t))}function mP(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function yP(){return this.on("end.remove",mP(this._id))}function _P(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hv(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,l=o[a]=new Array(u),c,f,d=0;d<u;++d)(c=s[d])&&(f=e.call(c,c.__data__,d,s))&&("__data__"in c&&(f.__data__=c.__data__),l[d]=f,fs(l[d],t,n,d,l,xt(c,n)));return new Kt(o,this._parents,t,n)}function xP(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hE(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,c,f=0;f<l;++f)if(c=u[f]){for(var d=e.call(c,c.__data__,f,u),h,g=xt(c,n),v=0,y=d.length;v<y;++v)(h=d[v])&&fs(h,t,n,v,d,g);o.push(d),a.push(c)}return new Kt(o,a,t,n)}var wP=co.prototype.constructor;function SP(){return new wP(this._groups,this._parents)}function EP(e,t){var n,r,i;return function(){var o=Ur(this,e),a=(this.style.removeProperty(e),Ur(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function LE(e){return function(){this.style.removeProperty(e)}}function CP(e,t,n){var r,i=n+"",o;return function(){var a=Ur(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function kP(e,t,n){var r,i,o;return function(){var a=Ur(this,e),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(e),Ur(this,e))),a===u?null:a===r&&u===i?o:(i=u,o=t(r=a,s))}}function bP(e,t){var n,r,i,o="style."+t,a="end."+o,s;return function(){var u=Pt(this,e),l=u.on,c=u.value[o]==null?s||(s=LE(t)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function TP(e,t,n){var r=(e+="")=="transform"?TI:ME;return t==null?this.styleTween(e,EP(e,r)).on("end.style."+e,LE(e)):typeof t=="function"?this.styleTween(e,kP(e,r,_v(this,"style."+e,t))).each(bP(this._id,e)):this.styleTween(e,CP(e,r,t),n).on("end.style."+e,null)}function RP(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function NP(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&RP(e,a,n)),r}return o._value=t,o}function IP(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,NP(e,t,n??""))}function PP(e){return function(){this.textContent=e}}function jP(e){return function(){var t=e(this);this.textContent=t??""}}function qP(e){return this.tween("text",typeof e=="function"?jP(_v(this,"text",e)):PP(e==null?"":e+""))}function AP(e){return function(t){this.textContent=e.call(this,t)}}function MP(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&AP(i)),t}return r._value=e,r}function LP(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,MP(e))}function OP(){for(var e=this._name,t=this._id,n=OE(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var c=xt(u,t);fs(u,e,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Kt(r,this._parents,e,n)}function zP(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var l=Pt(this,r),c=l.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(u)),l.on=t}),i===0&&o()})}var FP=0;function Kt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function OE(){return++FP}var qt=co.prototype;Kt.prototype={constructor:Kt,select:_P,selectAll:xP,selectChild:qt.selectChild,selectChildren:qt.selectChildren,filter:dP,merge:hP,selection:SP,transition:OP,call:qt.call,nodes:qt.nodes,node:qt.node,size:qt.size,empty:qt.empty,each:qt.each,on:gP,attr:QI,attrTween:tP,style:TP,styleTween:IP,text:qP,textTween:LP,remove:yP,tween:UI,delay:iP,duration:sP,ease:lP,easeVarying:fP,end:zP,[Symbol.iterator]:qt[Symbol.iterator]};function DP(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var $P={time:null,delay:0,duration:250,ease:DP};function BP(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function UP(e){var t,n;e instanceof Kt?(t=e._id,e=e._name):(t=OE(),(n=$P).time=gv(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)(u=a[l])&&fs(u,e,t,l,a,n||BP(u,t));return new Kt(r,this._parents,e,t)}co.prototype.interrupt=DI;co.prototype.transition=UP;const sp=Math.PI,up=2*sp,On=1e-6,HP=up-On;function zE(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function VP(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return zE;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class GP{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?zE:VP(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-t,l=i-n,c=a-t,f=s-n,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>On)if(!(Math.abs(f*u-l*c)>On)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-a,g=i-s,v=u*u+l*l,y=h*h+g*g,p=Math.sqrt(v),m=Math.sqrt(d),_=o*Math.tan((sp-Math.acos((v+d-y)/(2*p*m)))/2),x=_/m,S=_/p;Math.abs(x-1)>On&&this._append`L${t+x*c},${n+x*f}`,this._append`A${o},${o},0,0,${+(f*h>c*g)},${this._x1=t+S*u},${this._y1=n+S*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),l=t+s,c=n+u,f=1^a,d=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>On||Math.abs(this._y1-c)>On)&&this._append`L${l},${c}`,r&&(d<0&&(d=d%up+up),d>HP?this._append`A${r},${r},0,1,${f},${t-s},${n-u}A${r},${r},0,1,${f},${this._x1=l},${this._y1=c}`:d>On&&this._append`A${r},${r},0,${+(d>=sp)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function WP(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var o,a=n.length,s,u=0,l=0;for(o=0;o<a;++o)s=n[o],u+=s.x,l+=s.y;for(u=(u/a-e)*r,l=(l/a-t)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=l}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(e=+o,i):e},i.y=function(o){return arguments.length?(t=+o,i):t},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function KP(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return FE(this.cover(t,n),t,n,e)}function FE(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,u=e._y0,l=e._x1,c=e._y1,f,d,h,g,v,y,p,m;if(!o)return e._root=a,e;for(;o.length;)if((v=t>=(f=(s+l)/2))?s=f:l=f,(y=n>=(d=(u+c)/2))?u=d:c=d,i=o,!(o=o[p=y<<1|v]))return i[p]=a,e;if(h=+e._x.call(null,o.data),g=+e._y.call(null,o.data),t===h&&n===g)return a.next=o,i?i[p]=a:e._root=a,e;do i=i?i[p]=new Array(4):e._root=new Array(4),(v=t>=(f=(s+l)/2))?s=f:l=f,(y=n>=(d=(u+c)/2))?u=d:c=d;while((p=y<<1|v)===(m=(g>=d)<<1|h>=f));return i[m]=o,i[p]=a,e}function YP(e){var t,n,r=e.length,i,o,a=new Array(r),s=new Array(r),u=1/0,l=1/0,c=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=i,s[n]=o,i<u&&(u=i),i>c&&(c=i),o<l&&(l=o),o>f&&(f=o));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),n=0;n<r;++n)FE(this,a[n],s[n],e[n]);return this}function QP(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a=i-n||1,s=this._root,u,l;n>e||e>=i||r>t||t>=o;)switch(l=(t<r)<<1|e<n,u=new Array(4),u[l]=s,s=u,a*=2,l){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function XP(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function ZP(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qe(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function JP(e,t,n){var r,i=this._x0,o=this._y0,a,s,u,l,c=this._x1,f=this._y1,d=[],h=this._root,g,v;for(h&&d.push(new qe(h,i,o,c,f)),n==null?n=1/0:(i=e-n,o=t-n,c=e+n,f=t+n,n*=n);g=d.pop();)if(!(!(h=g.node)||(a=g.x0)>c||(s=g.y0)>f||(u=g.x1)<i||(l=g.y1)<o))if(h.length){var y=(a+u)/2,p=(s+l)/2;d.push(new qe(h[3],y,p,u,l),new qe(h[2],a,p,y,l),new qe(h[1],y,s,u,p),new qe(h[0],a,s,y,p)),(v=(t>=p)<<1|e>=y)&&(g=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=g)}else{var m=e-+this._x.call(null,h.data),_=t-+this._y.call(null,h.data),x=m*m+_*_;if(x<n){var S=Math.sqrt(n=x);i=e-S,o=t-S,c=e+S,f=t+S,r=h.data}}return r}function ej(e){if(isNaN(c=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,l=this._y1,c,f,d,h,g,v,y,p;if(!n)return this;if(n.length)for(;;){if((g=c>=(d=(a+u)/2))?a=d:u=d,(v=f>=(h=(s+l)/2))?s=h:l=h,t=n,!(n=n[y=v<<1|g]))return this;if(!n.length)break;(t[y+1&3]||t[y+2&3]||t[y+3&3])&&(r=t,p=y)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[y]=o:delete t[y],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[p]=n:this._root=n),this):(this._root=o,this)}function tj(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function nj(){return this._root}function rj(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function ij(e){var t=[],n,r=this._root,i,o,a,s,u;for(r&&t.push(new qe(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,a=n.y0,s=n.x1,u=n.y1)&&r.length){var l=(o+s)/2,c=(a+u)/2;(i=r[3])&&t.push(new qe(i,l,c,s,u)),(i=r[2])&&t.push(new qe(i,o,c,l,u)),(i=r[1])&&t.push(new qe(i,l,a,s,c)),(i=r[0])&&t.push(new qe(i,o,a,l,c))}return this}function oj(e){var t=[],n=[],r;for(this._root&&t.push(new qe(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,u=r.x1,l=r.y1,c=(a+u)/2,f=(s+l)/2;(o=i[0])&&t.push(new qe(o,a,s,c,f)),(o=i[1])&&t.push(new qe(o,c,s,u,f)),(o=i[2])&&t.push(new qe(o,a,f,c,l)),(o=i[3])&&t.push(new qe(o,c,f,u,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function aj(e){return e[0]}function sj(e){return arguments.length?(this._x=e,this):this._x}function uj(e){return e[1]}function lj(e){return arguments.length?(this._y=e,this):this._y}function xv(e,t,n){var r=new wv(t??aj,n??uj,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function wv(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Im(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Oe=xv.prototype=wv.prototype;Oe.copy=function(){var e=new wv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=Im(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=Im(r));return e};Oe.add=KP;Oe.addAll=YP;Oe.cover=QP;Oe.data=XP;Oe.extent=ZP;Oe.find=JP;Oe.remove=ej;Oe.removeAll=tj;Oe.root=nj;Oe.size=rj;Oe.visit=ij;Oe.visitAfter=oj;Oe.x=sj;Oe.y=lj;function Gn(e){return function(){return e}}function hn(e){return(e()-.5)*1e-6}function cj(e){return e.x+e.vx}function fj(e){return e.y+e.vy}function dj(e){var t,n,r,i=1,o=1;typeof e!="function"&&(e=Gn(e==null?1:+e));function a(){for(var l,c=t.length,f,d,h,g,v,y,p=0;p<o;++p)for(f=xv(t,cj,fj).visitAfter(s),l=0;l<c;++l)d=t[l],v=n[d.index],y=v*v,h=d.x+d.vx,g=d.y+d.vy,f.visit(m);function m(_,x,S,E,C){var T=_.data,M=_.r,k=v+M;if(T){if(T.index>d.index){var j=h-T.x-T.vx,B=g-T.y-T.vy,H=j*j+B*B;H<k*k&&(j===0&&(j=hn(r),H+=j*j),B===0&&(B=hn(r),H+=B*B),H=(k-(H=Math.sqrt(H)))/H*i,d.vx+=(j*=H)*(k=(M*=M)/(y+M)),d.vy+=(B*=H)*k,T.vx-=j*(k=1-k),T.vy-=B*k)}return}return x>h+k||E<h-k||S>g+k||C<g-k}}function s(l){if(l.data)return l.r=n[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function u(){if(t){var l,c=t.length,f;for(n=new Array(c),l=0;l<c;++l)f=t[l],n[f.index]=+e(f,l,t)}}return a.initialize=function(l,c){t=l,r=c,u()},a.iterations=function(l){return arguments.length?(o=+l,a):o},a.strength=function(l){return arguments.length?(i=+l,a):i},a.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Gn(+l),u(),a):e},a}function hj(e){return e.index}function Pm(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function pj(e){var t=hj,n=f,r,i=Gn(30),o,a,s,u,l,c=1;e==null&&(e=[]);function f(y){return 1/Math.min(s[y.source.index],s[y.target.index])}function d(y){for(var p=0,m=e.length;p<c;++p)for(var _=0,x,S,E,C,T,M,k;_<m;++_)x=e[_],S=x.source,E=x.target,C=E.x+E.vx-S.x-S.vx||hn(l),T=E.y+E.vy-S.y-S.vy||hn(l),M=Math.sqrt(C*C+T*T),M=(M-o[_])/M*y*r[_],C*=M,T*=M,E.vx-=C*(k=u[_]),E.vy-=T*k,S.vx+=C*(k=1-k),S.vy+=T*k}function h(){if(a){var y,p=a.length,m=e.length,_=new Map(a.map((S,E)=>[t(S,E,a),S])),x;for(y=0,s=new Array(p);y<m;++y)x=e[y],x.index=y,typeof x.source!="object"&&(x.source=Pm(_,x.source)),typeof x.target!="object"&&(x.target=Pm(_,x.target)),s[x.source.index]=(s[x.source.index]||0)+1,s[x.target.index]=(s[x.target.index]||0)+1;for(y=0,u=new Array(m);y<m;++y)x=e[y],u[y]=s[x.source.index]/(s[x.source.index]+s[x.target.index]);r=new Array(m),g(),o=new Array(m),v()}}function g(){if(a)for(var y=0,p=e.length;y<p;++y)r[y]=+n(e[y],y,e)}function v(){if(a)for(var y=0,p=e.length;y<p;++y)o[y]=+i(e[y],y,e)}return d.initialize=function(y,p){a=y,l=p,h()},d.links=function(y){return arguments.length?(e=y,h(),d):e},d.id=function(y){return arguments.length?(t=y,d):t},d.iterations=function(y){return arguments.length?(c=+y,d):c},d.strength=function(y){return arguments.length?(n=typeof y=="function"?y:Gn(+y),g(),d):n},d.distance=function(y){return arguments.length?(i=typeof y=="function"?y:Gn(+y),v(),d):i},d}const vj=1664525,gj=1013904223,jm=4294967296;function mj(){let e=1;return()=>(e=(vj*e+gj)%jm)/jm}function yj(e){return e.x}function _j(e){return e.y}var xj=10,wj=Math.PI*(3-Math.sqrt(5));function Sj(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=mv(f),l=lo("tick","end"),c=mj();e==null&&(e=[]);function f(){d(),l.call("tick",t),n<r&&(u.stop(),l.call("end",t))}function d(v){var y,p=e.length,m;v===void 0&&(v=1);for(var _=0;_<v;++_)for(n+=(o-n)*i,s.forEach(function(x){x(n)}),y=0;y<p;++y)m=e[y],m.fx==null?m.x+=m.vx*=a:(m.x=m.fx,m.vx=0),m.fy==null?m.y+=m.vy*=a:(m.y=m.fy,m.vy=0);return t}function h(){for(var v=0,y=e.length,p;v<y;++v){if(p=e[v],p.index=v,p.fx!=null&&(p.x=p.fx),p.fy!=null&&(p.y=p.fy),isNaN(p.x)||isNaN(p.y)){var m=xj*Math.sqrt(.5+v),_=v*wj;p.x=m*Math.cos(_),p.y=m*Math.sin(_)}(isNaN(p.vx)||isNaN(p.vy))&&(p.vx=p.vy=0)}}function g(v){return v.initialize&&v.initialize(e,c),v}return h(),t={tick:d,restart:function(){return u.restart(f),t},stop:function(){return u.stop(),t},nodes:function(v){return arguments.length?(e=v,h(),s.forEach(g),t):e},alpha:function(v){return arguments.length?(n=+v,t):n},alphaMin:function(v){return arguments.length?(r=+v,t):r},alphaDecay:function(v){return arguments.length?(i=+v,t):+i},alphaTarget:function(v){return arguments.length?(o=+v,t):o},velocityDecay:function(v){return arguments.length?(a=1-v,t):1-a},randomSource:function(v){return arguments.length?(c=v,s.forEach(g),t):c},force:function(v,y){return arguments.length>1?(y==null?s.delete(v):s.set(v,g(y)),t):s.get(v)},find:function(v,y,p){var m=0,_=e.length,x,S,E,C,T;for(p==null?p=1/0:p*=p,m=0;m<_;++m)C=e[m],x=v-C.x,S=y-C.y,E=x*x+S*S,E<p&&(T=C,p=E);return T},on:function(v,y){return arguments.length>1?(l.on(v,y),t):l.on(v)}}}function Ej(){var e,t,n,r,i=Gn(-30),o,a=1,s=1/0,u=.81;function l(h){var g,v=e.length,y=xv(e,yj,_j).visitAfter(f);for(r=h,g=0;g<v;++g)t=e[g],y.visit(d)}function c(){if(e){var h,g=e.length,v;for(o=new Array(g),h=0;h<g;++h)v=e[h],o[v.index]=+i(v,h,e)}}function f(h){var g=0,v,y,p=0,m,_,x;if(h.length){for(m=_=x=0;x<4;++x)(v=h[x])&&(y=Math.abs(v.value))&&(g+=v.value,p+=y,m+=y*v.x,_+=y*v.y);h.x=m/p,h.y=_/p}else{v=h,v.x=v.data.x,v.y=v.data.y;do g+=o[v.data.index];while(v=v.next)}h.value=g}function d(h,g,v,y){if(!h.value)return!0;var p=h.x-t.x,m=h.y-t.y,_=y-g,x=p*p+m*m;if(_*_/u<x)return x<s&&(p===0&&(p=hn(n),x+=p*p),m===0&&(m=hn(n),x+=m*m),x<a&&(x=Math.sqrt(a*x)),t.vx+=p*h.value*r/x,t.vy+=m*h.value*r/x),!0;if(h.length||x>=s)return;(h.data!==t||h.next)&&(p===0&&(p=hn(n),x+=p*p),m===0&&(m=hn(n),x+=m*m),x<a&&(x=Math.sqrt(a*x)));do h.data!==t&&(_=o[h.data.index]*r/x,t.vx+=p*_,t.vy+=m*_);while(h=h.next)}return l.initialize=function(h,g){e=h,n=g,c()},l.strength=function(h){return arguments.length?(i=typeof h=="function"?h:Gn(+h),c(),l):i},l.distanceMin=function(h){return arguments.length?(a=h*h,l):Math.sqrt(a)},l.distanceMax=function(h){return arguments.length?(s=h*h,l):Math.sqrt(s)},l.theta=function(h){return arguments.length?(u=h*h,l):Math.sqrt(u)},l}function fr(e){return function(){return e}}function Cj(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new GP(t)}function kj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function DE(e){this._context=e}DE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function bj(e){return new DE(e)}function Tj(e){return e[0]}function Rj(e){return e[1]}function Nj(e,t){var n=fr(!0),r=null,i=bj,o=null,a=Cj(s);e=typeof e=="function"?e:e===void 0?Tj:fr(e),t=typeof t=="function"?t:t===void 0?Rj:fr(t);function s(u){var l,c=(u=kj(u)).length,f,d=!1,h;for(r==null&&(o=i(h=a())),l=0;l<=c;++l)!(l<c&&n(f=u[l],l,u))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(f,l,u),+t(f,l,u));if(h)return o=null,h+""||null}return s.x=function(u){return arguments.length?(e=typeof u=="function"?u:fr(+u),s):e},s.y=function(u){return arguments.length?(t=typeof u=="function"?u:fr(+u),s):t},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:fr(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}function qm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function $E(e){this._context=e}$E.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:qm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:qm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ij(e){return new $E(e)}const Ho=e=>()=>e;function Pj(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Dt(e,t,n){this.k=e,this.x=t,this.y=n}Dt.prototype={constructor:Dt,scale:function(e){return e===1?this:new Dt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Dt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Sv=new Dt(1,0,0);Dt.prototype;function su(e){e.stopImmediatePropagation()}function fi(e){e.preventDefault(),e.stopImmediatePropagation()}function jj(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function qj(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Am(){return this.__zoom||Sv}function Aj(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Mj(){return navigator.maxTouchPoints||"ontouchstart"in this}function Lj(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function BE(){var e=jj,t=qj,n=Lj,r=Aj,i=Mj,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=jI,l=lo("start","zoom","end"),c,f,d,h=500,g=150,v=0,y=10;function p(b){b.property("__zoom",Am).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",k).filter(i).on("touchstart.zoom",j).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(b,P,R,O){var I=b.selection?b.selection():b;I.property("__zoom",Am),b!==I?S(b,P,R,O):I.interrupt().each(function(){E(this,arguments).event(O).start().zoom(null,typeof P=="function"?P.apply(this,arguments):P).end()})},p.scaleBy=function(b,P,R,O){p.scaleTo(b,function(){var I=this.__zoom.k,A=typeof P=="function"?P.apply(this,arguments):P;return I*A},R,O)},p.scaleTo=function(b,P,R,O){p.transform(b,function(){var I=t.apply(this,arguments),A=this.__zoom,L=R==null?x(I):typeof R=="function"?R.apply(this,arguments):R,F=A.invert(L),U=typeof P=="function"?P.apply(this,arguments):P;return n(_(m(A,U),L,F),I,a)},R,O)},p.translateBy=function(b,P,R,O){p.transform(b,function(){return n(this.__zoom.translate(typeof P=="function"?P.apply(this,arguments):P,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),a)},null,O)},p.translateTo=function(b,P,R,O,I){p.transform(b,function(){var A=t.apply(this,arguments),L=this.__zoom,F=O==null?x(A):typeof O=="function"?O.apply(this,arguments):O;return n(Sv.translate(F[0],F[1]).scale(L.k).translate(typeof P=="function"?-P.apply(this,arguments):-P,typeof R=="function"?-R.apply(this,arguments):-R),A,a)},O,I)};function m(b,P){return P=Math.max(o[0],Math.min(o[1],P)),P===b.k?b:new Dt(P,b.x,b.y)}function _(b,P,R){var O=P[0]-R[0]*b.k,I=P[1]-R[1]*b.k;return O===b.x&&I===b.y?b:new Dt(b.k,O,I)}function x(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function S(b,P,R,O){b.on("start.zoom",function(){E(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(O).end()}).tween("zoom",function(){var I=this,A=arguments,L=E(I,A).event(O),F=t.apply(I,A),U=R==null?x(F):typeof R=="function"?R.apply(I,A):R,Ee=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),J=I.__zoom,Ce=typeof P=="function"?P.apply(I,A):P,me=u(J.invert(U).concat(Ee/J.k),Ce.invert(U).concat(Ee/Ce.k));return function(xe){if(xe===1)xe=Ce;else{var ft=me(xe),ti=Ee/ft[2];xe=new Dt(ti,U[0]-ft[0]*ti,U[1]-ft[1]*ti)}L.zoom(null,xe)}})}function E(b,P,R){return!R&&b.__zooming||new C(b,P)}function C(b,P){this.that=b,this.args=P,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,P),this.taps=0}C.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,P){return this.mouse&&b!=="mouse"&&(this.mouse[1]=P.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=P.invert(this.touch0[0])),this.touch1&&b!=="touch"&&(this.touch1[1]=P.invert(this.touch1[0])),this.that.__zoom=P,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(b){var P=De(this.that).datum();l.call(b,this.that,new Pj(b,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:l}),P)}};function T(b,...P){if(!e.apply(this,arguments))return;var R=E(this,P).event(b),O=this.__zoom,I=Math.max(o[0],Math.min(o[1],O.k*Math.pow(2,r.apply(this,arguments)))),A=Lt(b);if(R.wheel)(R.mouse[0][0]!==A[0]||R.mouse[0][1]!==A[1])&&(R.mouse[1]=O.invert(R.mouse[0]=A)),clearTimeout(R.wheel);else{if(O.k===I)return;R.mouse=[A,O.invert(A)],ua(this),R.start()}fi(b),R.wheel=setTimeout(L,g),R.zoom("mouse",n(_(m(O,I),R.mouse[0],R.mouse[1]),R.extent,a));function L(){R.wheel=null,R.end()}}function M(b,...P){if(d||!e.apply(this,arguments))return;var R=b.currentTarget,O=E(this,P,!0).event(b),I=De(b.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",Ee,!0),A=Lt(b,R),L=b.clientX,F=b.clientY;CE(b.view),su(b),O.mouse=[A,this.__zoom.invert(A)],ua(this),O.start();function U(J){if(fi(J),!O.moved){var Ce=J.clientX-L,me=J.clientY-F;O.moved=Ce*Ce+me*me>v}O.event(J).zoom("mouse",n(_(O.that.__zoom,O.mouse[0]=Lt(J,R),O.mouse[1]),O.extent,a))}function Ee(J){I.on("mousemove.zoom mouseup.zoom",null),kE(J.view,O.moved),fi(J),O.event(J).end()}}function k(b,...P){if(e.apply(this,arguments)){var R=this.__zoom,O=Lt(b.changedTouches?b.changedTouches[0]:b,this),I=R.invert(O),A=R.k*(b.shiftKey?.5:2),L=n(_(m(R,A),O,I),t.apply(this,P),a);fi(b),s>0?De(this).transition().duration(s).call(S,L,O,b):De(this).call(p.transform,L,O,b)}}function j(b,...P){if(e.apply(this,arguments)){var R=b.touches,O=R.length,I=E(this,P,b.changedTouches.length===O).event(b),A,L,F,U;for(su(b),L=0;L<O;++L)F=R[L],U=Lt(F,this),U=[U,this.__zoom.invert(U),F.identifier],I.touch0?!I.touch1&&I.touch0[2]!==U[2]&&(I.touch1=U,I.taps=0):(I.touch0=U,A=!0,I.taps=1+!!c);c&&(c=clearTimeout(c)),A&&(I.taps<2&&(f=U[0],c=setTimeout(function(){c=null},h)),ua(this),I.start())}}function B(b,...P){if(this.__zooming){var R=E(this,P).event(b),O=b.changedTouches,I=O.length,A,L,F,U;for(fi(b),A=0;A<I;++A)L=O[A],F=Lt(L,this),R.touch0&&R.touch0[2]===L.identifier?R.touch0[0]=F:R.touch1&&R.touch1[2]===L.identifier&&(R.touch1[0]=F);if(L=R.that.__zoom,R.touch1){var Ee=R.touch0[0],J=R.touch0[1],Ce=R.touch1[0],me=R.touch1[1],xe=(xe=Ce[0]-Ee[0])*xe+(xe=Ce[1]-Ee[1])*xe,ft=(ft=me[0]-J[0])*ft+(ft=me[1]-J[1])*ft;L=m(L,Math.sqrt(xe/ft)),F=[(Ee[0]+Ce[0])/2,(Ee[1]+Ce[1])/2],U=[(J[0]+me[0])/2,(J[1]+me[1])/2]}else if(R.touch0)F=R.touch0[0],U=R.touch0[1];else return;R.zoom("touch",n(_(L,F,U),R.extent,a))}}function H(b,...P){if(this.__zooming){var R=E(this,P).event(b),O=b.changedTouches,I=O.length,A,L;for(su(b),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),A=0;A<I;++A)L=O[A],R.touch0&&R.touch0[2]===L.identifier?delete R.touch0:R.touch1&&R.touch1[2]===L.identifier&&delete R.touch1;if(R.touch1&&!R.touch0&&(R.touch0=R.touch1,delete R.touch1),R.touch0)R.touch0[1]=this.__zoom.invert(R.touch0[0]);else if(R.end(),R.taps===2&&(L=Lt(L,this),Math.hypot(f[0]-L[0],f[1]-L[1])<y)){var F=De(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return p.wheelDelta=function(b){return arguments.length?(r=typeof b=="function"?b:Ho(+b),p):r},p.filter=function(b){return arguments.length?(e=typeof b=="function"?b:Ho(!!b),p):e},p.touchable=function(b){return arguments.length?(i=typeof b=="function"?b:Ho(!!b),p):i},p.extent=function(b){return arguments.length?(t=typeof b=="function"?b:Ho([[+b[0][0],+b[0][1]],[+b[1][0],+b[1][1]]]),p):t},p.scaleExtent=function(b){return arguments.length?(o[0]=+b[0],o[1]=+b[1],p):[o[0],o[1]]},p.translateExtent=function(b){return arguments.length?(a[0][0]=+b[0][0],a[1][0]=+b[1][0],a[0][1]=+b[0][1],a[1][1]=+b[1][1],p):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},p.constrain=function(b){return arguments.length?(n=b,p):n},p.duration=function(b){return arguments.length?(s=+b,p):s},p.interpolate=function(b){return arguments.length?(u=b,p):u},p.on=function(){var b=l.on.apply(l,arguments);return b===l?p:b},p.clickDistance=function(b){return arguments.length?(v=(b=+b)*b,p):Math.sqrt(v)},p.tapDistance=function(b){return arguments.length?(y=+b,p):y},p}const Oj=({value:e,onChange:t,showAll:n=!0})=>{const r=n?["all",...fm]:[...fm];return w.jsx("div",{style:uu.container,children:r.map(i=>w.jsx("button",{onClick:()=>t(i),style:{...uu.button,...e===i?uu.buttonActive:{},...i!=="all"?{borderLeftColor:It(i)}:{}},children:i==="all"?"All":i.charAt(0).toUpperCase()+i.slice(1)},i))})},uu={container:{display:"flex",gap:"4px",flexWrap:"wrap"},button:{padding:"6px 12px",fontSize:"11px",border:"none",borderLeft:"3px solid transparent",backgroundColor:"#1a1a2e",color:"#888",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s"},buttonActive:{backgroundColor:"#0f3460",color:"#00d9ff"}},zj=({graphData:e})=>{const t=N.useRef(null),n=N.useRef(null),[r,i]=N.useState(null),[o,a]=N.useState("all"),[s,u]=N.useState(""),l=N.useRef(null),c=N.useCallback(g=>{i(g)},[]),f=N.useCallback(g=>{const v=e.nodes.find(y=>y.id===g);v&&i(v)},[e.nodes]),d=N.useCallback(()=>{i(null)},[]);N.useEffect(()=>{if(!t.current||!n.current)return;const g=De(t.current),v=n.current,y=v.clientWidth,p=v.clientHeight;g.selectAll("*").remove();const m=g.append("g"),_=BE().scaleExtent([.1,4]).on("zoom",k=>m.attr("transform",k.transform));g.call(_);const x=e.nodes.map(k=>({...k})),S=new Map(x.map(k=>[k.id,k])),E=e.edges.map(k=>({source:S.get(k.from_node_id),target:S.get(k.to_node_id),type:k.edge_type,rationale:k.rationale})).filter(k=>k.source&&k.target),C=Sj(x).force("link",pj(E).id(k=>k.id).distance(80)).force("charge",Ej().strength(-200)).force("center",WP(y/2,p/2)).force("collision",dj().radius(30));l.current=C;const T=m.append("g").selectAll("line").data(E).join("line").attr("class","link").attr("stroke",k=>k.type==="chosen"?"#22c55e":k.type==="rejected"?"#ef4444":"#3b82f6").attr("stroke-width",1.5).attr("stroke-opacity",.6).attr("stroke-dasharray",k=>k.type==="rejected"?"5,5":null),M=m.append("g").selectAll(".node").data(x).join("g").attr("class","node").style("cursor","pointer").call(aI().on("start",(k,j)=>{k.active||C.alphaTarget(.3).restart(),j.fx=j.x,j.fy=j.y}).on("drag",(k,j)=>{j.fx=k.x,j.fy=k.y}).on("end",(k,j)=>{k.active||C.alphaTarget(0),j.fx=null,j.fy=null}));return M.append("circle").attr("r",k=>k.node_type==="goal"?18:k.node_type==="decision"?15:12).attr("fill",k=>It(k.node_type)).attr("stroke","#fff").attr("stroke-width",2),M.filter(k=>k.node_type==="goal"||k.node_type==="decision").append("text").attr("dy",30).attr("text-anchor","middle").attr("fill","#888").attr("font-size","10px").text(k=>ut(k.title,20)),M.on("click",(k,j)=>{c(j)}),M.append("title").text(k=>{const j=$r(k);return`${k.title} 76 + ${k.node_type}${j!==null?` · ${j}%`:""}`}),C.on("tick",()=>{T.attr("x1",k=>k.source.x).attr("y1",k=>k.source.y).attr("x2",k=>k.target.x).attr("y2",k=>k.target.y),M.attr("transform",k=>`translate(${k.x},${k.y})`)}),()=>{C.stop()}},[e,c]),N.useEffect(()=>{if(!t.current)return;const g=De(t.current),v=s.toLowerCase();g.selectAll(".node").style("opacity",y=>{var p;return s&&!(y.title.toLowerCase().includes(v)||(((p=y.description)==null?void 0:p.toLowerCase().includes(v))??!1))||o!=="all"&&y.node_type!==o?.15:1})},[o,s]),N.useEffect(()=>{if(!t.current)return;const g=De(t.current);g.selectAll(".node").classed("selected",v=>v.id===(r==null?void 0:r.id)),g.selectAll(".link").attr("stroke-width",v=>v.source.id===(r==null?void 0:r.id)||v.target.id===(r==null?void 0:r.id)?3:1.5).attr("stroke-opacity",v=>v.source.id===(r==null?void 0:r.id)||v.target.id===(r==null?void 0:r.id)?1:.6)},[r]);const h=r?JT(r.id,e):[];return w.jsxs("div",{style:ee.container,children:[w.jsxs("div",{style:ee.controls,children:[w.jsx("h2",{style:ee.title,children:"Graph Explorer"}),w.jsx(Oj,{value:o,onChange:a}),w.jsx("input",{type:"text",placeholder:"Search nodes...",value:s,onChange:g=>u(g.target.value),style:ee.search}),w.jsx("div",{style:ee.legend,children:Object.entries(dv).map(([g,v])=>w.jsxs("div",{style:ee.legendItem,children:[w.jsx("div",{style:{...ee.legendDot,backgroundColor:v}}),w.jsx("span",{children:g.charAt(0).toUpperCase()+g.slice(1)})]},g))})]}),w.jsx("div",{ref:n,style:ee.svgContainer,children:w.jsx("svg",{ref:t,style:ee.svg})}),r&&w.jsxs("div",{style:ee.detailPanel,children:[w.jsx("button",{onClick:d,style:ee.closeBtn,children:"×"}),w.jsxs("div",{style:ee.detailHeader,children:[w.jsx(Ge,{type:r.node_type}),w.jsx(uo,{confidence:$r(r)}),w.jsx(Br,{commit:bn(r)})]}),w.jsx("h3",{style:ee.detailTitle,children:r.title}),w.jsxs("p",{style:ee.detailMeta,children:["Node #",r.id," · ",new Date(r.created_at).toLocaleString()]}),r.description&&w.jsxs("div",{style:ee.detailSection,children:[w.jsx("h4",{style:ee.sectionTitle,children:"Description"}),w.jsx("p",{style:ee.description,children:r.description})]}),h.length>1&&w.jsxs("div",{style:ee.detailSection,children:[w.jsx("h4",{style:ee.sectionTitle,children:"Path to Root"}),h.map(g=>w.jsxs("div",{onClick:()=>f(g.id),style:ee.pathNode,children:[w.jsx(Ge,{type:g.node_type,size:"sm"}),w.jsx("span",{children:ut(g.title,35)})]},g.id))]}),w.jsx(Fj,{node:r,graphData:e,onSelectNode:f})]})]})},Fj=({node:e,graphData:t,onSelectNode:n})=>{const r=t.edges.filter(a=>a.to_node_id===e.id),i=t.edges.filter(a=>a.from_node_id===e.id),o=a=>t.nodes.find(s=>s.id===a);return w.jsxs(w.Fragment,{children:[r.length>0&&w.jsxs("div",{style:ee.detailSection,children:[w.jsxs("h4",{style:ee.sectionTitle,children:["Incoming (",r.length,")"]}),r.map(a=>{const s=o(a.from_node_id);return w.jsxs("div",{onClick:()=>n(a.from_node_id),style:ee.connection,children:[w.jsx(Ge,{type:(s==null?void 0:s.node_type)||"observation",size:"sm"}),w.jsx("span",{children:ut((s==null?void 0:s.title)||"Unknown",30)})]},a.id)})]}),i.length>0&&w.jsxs("div",{style:ee.detailSection,children:[w.jsxs("h4",{style:ee.sectionTitle,children:["Outgoing (",i.length,")"]}),i.map(a=>{const s=o(a.to_node_id);return w.jsxs("div",{onClick:()=>n(a.to_node_id),style:ee.connection,children:[w.jsx(Aa,{type:a.edge_type}),w.jsx(Ge,{type:(s==null?void 0:s.node_type)||"observation",size:"sm"}),w.jsx("span",{children:ut((s==null?void 0:s.title)||"Unknown",25)}),a.rationale&&w.jsx("span",{style:ee.rationale,children:a.rationale})]},a.id)})]})]})},ee={container:{height:"100%",display:"flex",position:"relative",backgroundColor:"#0d1117"},controls:{position:"absolute",top:"20px",left:"20px",backgroundColor:"#16213e",padding:"15px",borderRadius:"8px",zIndex:10,maxWidth:"250px"},title:{fontSize:"16px",margin:"0 0 12px 0",color:"#eee"},search:{width:"100%",padding:"8px 12px",marginTop:"12px",backgroundColor:"#1a1a2e",border:"1px solid #333",borderRadius:"4px",color:"#eee",fontSize:"13px"},legend:{marginTop:"15px",display:"flex",flexDirection:"column",gap:"6px"},legendItem:{display:"flex",alignItems:"center",gap:"8px",fontSize:"11px",color:"#888"},legendDot:{width:"10px",height:"10px",borderRadius:"50%"},svgContainer:{flex:1,height:"100%"},svg:{width:"100%",height:"100%"},detailPanel:{position:"absolute",top:"20px",right:"20px",bottom:"20px",width:"350px",backgroundColor:"#16213e",borderRadius:"8px",padding:"20px",overflowY:"auto",zIndex:10},closeBtn:{position:"absolute",top:"10px",right:"10px",width:"28px",height:"28px",border:"none",background:"#333",color:"#fff",borderRadius:"4px",fontSize:"18px",cursor:"pointer"},detailHeader:{display:"flex",gap:"8px",marginBottom:"10px",flexWrap:"wrap"},detailTitle:{fontSize:"16px",margin:"0 0 8px 0",color:"#eee"},detailMeta:{fontSize:"12px",color:"#888",margin:0},detailSection:{marginTop:"20px"},sectionTitle:{fontSize:"12px",color:"#888",margin:"0 0 10px 0",textTransform:"uppercase"},description:{fontSize:"13px",color:"#ccc",lineHeight:1.5,margin:0},pathNode:{display:"flex",alignItems:"center",gap:"8px",padding:"8px",backgroundColor:"#1a1a2e",borderRadius:"4px",marginBottom:"6px",cursor:"pointer",fontSize:"12px"},connection:{display:"flex",alignItems:"center",gap:"8px",padding:"8px",backgroundColor:"#1a1a2e",borderRadius:"4px",marginBottom:"6px",cursor:"pointer",fontSize:"12px"},rationale:{color:"#666",fontSize:"11px",marginLeft:"auto"}};function Ev(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var lu,Mm;function Dj(){if(Mm)return lu;Mm=1;function e(){this.__data__=[],this.size=0}return lu=e,lu}var cu,Lm;function Qr(){if(Lm)return cu;Lm=1;function e(t,n){return t===n||t!==t&&n!==n}return cu=e,cu}var fu,Om;function ds(){if(Om)return fu;Om=1;var e=Qr();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return fu=t,fu}var du,zm;function $j(){if(zm)return du;zm=1;var e=ds(),t=Array.prototype,n=t.splice;function r(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var s=o.length-1;return a==s?o.pop():n.call(o,a,1),--this.size,!0}return du=r,du}var hu,Fm;function Bj(){if(Fm)return hu;Fm=1;var e=ds();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return hu=t,hu}var pu,Dm;function Uj(){if(Dm)return pu;Dm=1;var e=ds();function t(n){return e(this.__data__,n)>-1}return pu=t,pu}var vu,$m;function Hj(){if($m)return vu;$m=1;var e=ds();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return vu=t,vu}var gu,Bm;function hs(){if(Bm)return gu;Bm=1;var e=Dj(),t=$j(),n=Bj(),r=Uj(),i=Hj();function o(a){var s=-1,u=a==null?0:a.length;for(this.clear();++s<u;){var l=a[s];this.set(l[0],l[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,gu=o,gu}var mu,Um;function Vj(){if(Um)return mu;Um=1;var e=hs();function t(){this.__data__=new e,this.size=0}return mu=t,mu}var yu,Hm;function Gj(){if(Hm)return yu;Hm=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return yu=e,yu}var _u,Vm;function Wj(){if(Vm)return _u;Vm=1;function e(t){return this.__data__.get(t)}return _u=e,_u}var xu,Gm;function Kj(){if(Gm)return xu;Gm=1;function e(t){return this.__data__.has(t)}return xu=e,xu}var wu,Wm;function UE(){if(Wm)return wu;Wm=1;var e=typeof So=="object"&&So&&So.Object===Object&&So;return wu=e,wu}var Su,Km;function wt(){if(Km)return Su;Km=1;var e=UE(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Su=n,Su}var Eu,Ym;function Xr(){if(Ym)return Eu;Ym=1;var e=wt(),t=e.Symbol;return Eu=t,Eu}var Cu,Qm;function Yj(){if(Qm)return Cu;Qm=1;var e=Xr(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(a){var s=n.call(a,i),u=a[i];try{a[i]=void 0;var l=!0}catch{}var c=r.call(a);return l&&(s?a[i]=u:delete a[i]),c}return Cu=o,Cu}var ku,Xm;function Qj(){if(Xm)return ku;Xm=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return ku=n,ku}var bu,Zm;function nr(){if(Zm)return bu;Zm=1;var e=Xr(),t=Yj(),n=Qj(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?i:r:o&&o in Object(s)?t(s):n(s)}return bu=a,bu}var Tu,Jm;function lt(){if(Jm)return Tu;Jm=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Tu=e,Tu}var Ru,ey;function ho(){if(ey)return Ru;ey=1;var e=nr(),t=lt(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(s){if(!t(s))return!1;var u=e(s);return u==r||u==i||u==n||u==o}return Ru=a,Ru}var Nu,ty;function Xj(){if(ty)return Nu;ty=1;var e=wt(),t=e["__core-js_shared__"];return Nu=t,Nu}var Iu,ny;function Zj(){if(ny)return Iu;ny=1;var e=Xj(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return Iu=n,Iu}var Pu,ry;function HE(){if(ry)return Pu;ry=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Pu=n,Pu}var ju,iy;function Jj(){if(iy)return ju;iy=1;var e=ho(),t=Zj(),n=lt(),r=HE(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,u=a.toString,l=s.hasOwnProperty,c=RegExp("^"+u.call(l).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(d){if(!n(d)||t(d))return!1;var h=e(d)?c:o;return h.test(r(d))}return ju=f,ju}var qu,oy;function e3(){if(oy)return qu;oy=1;function e(t,n){return t==null?void 0:t[n]}return qu=e,qu}var Au,ay;function rr(){if(ay)return Au;ay=1;var e=Jj(),t=e3();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return Au=n,Au}var Mu,sy;function Cv(){if(sy)return Mu;sy=1;var e=rr(),t=wt(),n=e(t,"Map");return Mu=n,Mu}var Lu,uy;function ps(){if(uy)return Lu;uy=1;var e=rr(),t=e(Object,"create");return Lu=t,Lu}var Ou,ly;function t3(){if(ly)return Ou;ly=1;var e=ps();function t(){this.__data__=e?e(null):{},this.size=0}return Ou=t,Ou}var zu,cy;function n3(){if(cy)return zu;cy=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return zu=e,zu}var Fu,fy;function r3(){if(fy)return Fu;fy=1;var e=ps(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var a=this.__data__;if(e){var s=a[o];return s===t?void 0:s}return r.call(a,o)?a[o]:void 0}return Fu=i,Fu}var Du,dy;function i3(){if(dy)return Du;dy=1;var e=ps(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return Du=r,Du}var $u,hy;function o3(){if(hy)return $u;hy=1;var e=ps(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return $u=n,$u}var Bu,py;function a3(){if(py)return Bu;py=1;var e=t3(),t=n3(),n=r3(),r=i3(),i=o3();function o(a){var s=-1,u=a==null?0:a.length;for(this.clear();++s<u;){var l=a[s];this.set(l[0],l[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Bu=o,Bu}var Uu,vy;function s3(){if(vy)return Uu;vy=1;var e=a3(),t=hs(),n=Cv();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Uu=r,Uu}var Hu,gy;function u3(){if(gy)return Hu;gy=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Hu=e,Hu}var Vu,my;function vs(){if(my)return Vu;my=1;var e=u3();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Vu=t,Vu}var Gu,yy;function l3(){if(yy)return Gu;yy=1;var e=vs();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Gu=t,Gu}var Wu,_y;function c3(){if(_y)return Wu;_y=1;var e=vs();function t(n){return e(this,n).get(n)}return Wu=t,Wu}var Ku,xy;function f3(){if(xy)return Ku;xy=1;var e=vs();function t(n){return e(this,n).has(n)}return Ku=t,Ku}var Yu,wy;function d3(){if(wy)return Yu;wy=1;var e=vs();function t(n,r){var i=e(this,n),o=i.size;return i.set(n,r),this.size+=i.size==o?0:1,this}return Yu=t,Yu}var Qu,Sy;function kv(){if(Sy)return Qu;Sy=1;var e=s3(),t=l3(),n=c3(),r=f3(),i=d3();function o(a){var s=-1,u=a==null?0:a.length;for(this.clear();++s<u;){var l=a[s];this.set(l[0],l[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Qu=o,Qu}var Xu,Ey;function h3(){if(Ey)return Xu;Ey=1;var e=hs(),t=Cv(),n=kv(),r=200;function i(o,a){var s=this.__data__;if(s instanceof e){var u=s.__data__;if(!t||u.length<r-1)return u.push([o,a]),this.size=++s.size,this;s=this.__data__=new n(u)}return s.set(o,a),this.size=s.size,this}return Xu=i,Xu}var Zu,Cy;function gs(){if(Cy)return Zu;Cy=1;var e=hs(),t=Vj(),n=Gj(),r=Wj(),i=Kj(),o=h3();function a(s){var u=this.__data__=new e(s);this.size=u.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=i,a.prototype.set=o,Zu=a,Zu}var Ju,ky;function bv(){if(ky)return Ju;ky=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return Ju=e,Ju}var el,by;function VE(){if(by)return el;by=1;var e=rr(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return el=t,el}var tl,Ty;function ms(){if(Ty)return tl;Ty=1;var e=VE();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return tl=t,tl}var nl,Ry;function ys(){if(Ry)return nl;Ry=1;var e=ms(),t=Qr(),n=Object.prototype,r=n.hasOwnProperty;function i(o,a,s){var u=o[a];(!(r.call(o,a)&&t(u,s))||s===void 0&&!(a in o))&&e(o,a,s)}return nl=i,nl}var rl,Ny;function po(){if(Ny)return rl;Ny=1;var e=ys(),t=ms();function n(r,i,o,a){var s=!o;o||(o={});for(var u=-1,l=i.length;++u<l;){var c=i[u],f=a?a(o[c],r[c],c,o,r):void 0;f===void 0&&(f=r[c]),s?t(o,c,f):e(o,c,f)}return o}return rl=n,rl}var il,Iy;function p3(){if(Iy)return il;Iy=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return il=e,il}var ol,Py;function jt(){if(Py)return ol;Py=1;function e(t){return t!=null&&typeof t=="object"}return ol=e,ol}var al,jy;function v3(){if(jy)return al;jy=1;var e=nr(),t=jt(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return al=r,al}var sl,qy;function vo(){if(qy)return sl;qy=1;var e=v3(),t=jt(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e(function(){return arguments}())?e:function(a){return t(a)&&r.call(a,"callee")&&!i.call(a,"callee")};return sl=o,sl}var ul,Ay;function ge(){if(Ay)return ul;Ay=1;var e=Array.isArray;return ul=e,ul}var yi={exports:{}},ll,My;function g3(){if(My)return ll;My=1;function e(){return!1}return ll=e,ll}yi.exports;var Ly;function Zr(){return Ly||(Ly=1,function(e,t){var n=wt(),r=g3(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?n.Buffer:void 0,u=s?s.isBuffer:void 0,l=u||r;e.exports=l}(yi,yi.exports)),yi.exports}var cl,Oy;function _s(){if(Oy)return cl;Oy=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var o=typeof r;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return cl=n,cl}var fl,zy;function Tv(){if(zy)return fl;zy=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return fl=t,fl}var dl,Fy;function m3(){if(Fy)return dl;Fy=1;var e=nr(),t=Tv(),n=jt(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",s="[object Error]",u="[object Function]",l="[object Map]",c="[object Number]",f="[object Object]",d="[object RegExp]",h="[object Set]",g="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",p="[object DataView]",m="[object Float32Array]",_="[object Float64Array]",x="[object Int8Array]",S="[object Int16Array]",E="[object Int32Array]",C="[object Uint8Array]",T="[object Uint8ClampedArray]",M="[object Uint16Array]",k="[object Uint32Array]",j={};j[m]=j[_]=j[x]=j[S]=j[E]=j[C]=j[T]=j[M]=j[k]=!0,j[r]=j[i]=j[y]=j[o]=j[p]=j[a]=j[s]=j[u]=j[l]=j[c]=j[f]=j[d]=j[h]=j[g]=j[v]=!1;function B(H){return n(H)&&t(H.length)&&!!j[e(H)]}return dl=B,dl}var hl,Dy;function xs(){if(Dy)return hl;Dy=1;function e(t){return function(n){return t(n)}}return hl=e,hl}var _i={exports:{}};_i.exports;var $y;function Rv(){return $y||($y=1,function(e,t){var n=UE(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s}(_i,_i.exports)),_i.exports}var pl,By;function go(){if(By)return pl;By=1;var e=m3(),t=xs(),n=Rv(),r=n&&n.isTypedArray,i=r?t(r):e;return pl=i,pl}var vl,Uy;function GE(){if(Uy)return vl;Uy=1;var e=p3(),t=vo(),n=ge(),r=Zr(),i=_s(),o=go(),a=Object.prototype,s=a.hasOwnProperty;function u(l,c){var f=n(l),d=!f&&t(l),h=!f&&!d&&r(l),g=!f&&!d&&!h&&o(l),v=f||d||h||g,y=v?e(l.length,String):[],p=y.length;for(var m in l)(c||s.call(l,m))&&!(v&&(m=="length"||h&&(m=="offset"||m=="parent")||g&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||i(m,p)))&&y.push(m);return y}return vl=u,vl}var gl,Hy;function ws(){if(Hy)return gl;Hy=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return gl=t,gl}var ml,Vy;function WE(){if(Vy)return ml;Vy=1;function e(t,n){return function(r){return t(n(r))}}return ml=e,ml}var yl,Gy;function y3(){if(Gy)return yl;Gy=1;var e=WE(),t=e(Object.keys,Object);return yl=t,yl}var _l,Wy;function Nv(){if(Wy)return _l;Wy=1;var e=ws(),t=y3(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var s in Object(o))r.call(o,s)&&s!="constructor"&&a.push(s);return a}return _l=i,_l}var xl,Ky;function Xt(){if(Ky)return xl;Ky=1;var e=ho(),t=Tv();function n(r){return r!=null&&t(r.length)&&!e(r)}return xl=n,xl}var wl,Yy;function qn(){if(Yy)return wl;Yy=1;var e=GE(),t=Nv(),n=Xt();function r(i){return n(i)?e(i):t(i)}return wl=r,wl}var Sl,Qy;function _3(){if(Qy)return Sl;Qy=1;var e=po(),t=qn();function n(r,i){return r&&e(i,t(i),r)}return Sl=n,Sl}var El,Xy;function x3(){if(Xy)return El;Xy=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return El=e,El}var Cl,Zy;function w3(){if(Zy)return Cl;Zy=1;var e=lt(),t=ws(),n=x3(),r=Object.prototype,i=r.hasOwnProperty;function o(a){if(!e(a))return n(a);var s=t(a),u=[];for(var l in a)l=="constructor"&&(s||!i.call(a,l))||u.push(l);return u}return Cl=o,Cl}var kl,Jy;function ir(){if(Jy)return kl;Jy=1;var e=GE(),t=w3(),n=Xt();function r(i){return n(i)?e(i,!0):t(i)}return kl=r,kl}var bl,e0;function S3(){if(e0)return bl;e0=1;var e=po(),t=ir();function n(r,i){return r&&e(i,t(i),r)}return bl=n,bl}var xi={exports:{}};xi.exports;var t0;function KE(){return t0||(t0=1,function(e,t){var n=wt(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;function u(l,c){if(c)return l.slice();var f=l.length,d=s?s(f):new l.constructor(f);return l.copy(d),d}e.exports=u}(xi,xi.exports)),xi.exports}var Tl,n0;function YE(){if(n0)return Tl;n0=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return Tl=e,Tl}var Rl,r0;function QE(){if(r0)return Rl;r0=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var s=t[r];n(s,r,t)&&(a[o++]=s)}return a}return Rl=e,Rl}var Nl,i0;function XE(){if(i0)return Nl;i0=1;function e(){return[]}return Nl=e,Nl}var Il,o0;function Iv(){if(o0)return Il;o0=1;var e=QE(),t=XE(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(s){return r.call(a,s)}))}:t;return Il=o,Il}var Pl,a0;function E3(){if(a0)return Pl;a0=1;var e=po(),t=Iv();function n(r,i){return e(r,t(r),i)}return Pl=n,Pl}var jl,s0;function Pv(){if(s0)return jl;s0=1;function e(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}return jl=e,jl}var ql,u0;function Ss(){if(u0)return ql;u0=1;var e=WE(),t=e(Object.getPrototypeOf,Object);return ql=t,ql}var Al,l0;function ZE(){if(l0)return Al;l0=1;var e=Pv(),t=Ss(),n=Iv(),r=XE(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,n(a)),a=t(a);return s}:r;return Al=o,Al}var Ml,c0;function C3(){if(c0)return Ml;c0=1;var e=po(),t=ZE();function n(r,i){return e(r,t(r),i)}return Ml=n,Ml}var Ll,f0;function JE(){if(f0)return Ll;f0=1;var e=Pv(),t=ge();function n(r,i,o){var a=i(r);return t(r)?a:e(a,o(r))}return Ll=n,Ll}var Ol,d0;function eC(){if(d0)return Ol;d0=1;var e=JE(),t=Iv(),n=qn();function r(i){return e(i,n,t)}return Ol=r,Ol}var zl,h0;function k3(){if(h0)return zl;h0=1;var e=JE(),t=ZE(),n=ir();function r(i){return e(i,n,t)}return zl=r,zl}var Fl,p0;function b3(){if(p0)return Fl;p0=1;var e=rr(),t=wt(),n=e(t,"DataView");return Fl=n,Fl}var Dl,v0;function T3(){if(v0)return Dl;v0=1;var e=rr(),t=wt(),n=e(t,"Promise");return Dl=n,Dl}var $l,g0;function tC(){if(g0)return $l;g0=1;var e=rr(),t=wt(),n=e(t,"Set");return $l=n,$l}var Bl,m0;function R3(){if(m0)return Bl;m0=1;var e=rr(),t=wt(),n=e(t,"WeakMap");return Bl=n,Bl}var Ul,y0;function Jr(){if(y0)return Ul;y0=1;var e=b3(),t=Cv(),n=T3(),r=tC(),i=R3(),o=nr(),a=HE(),s="[object Map]",u="[object Object]",l="[object Promise]",c="[object Set]",f="[object WeakMap]",d="[object DataView]",h=a(e),g=a(t),v=a(n),y=a(r),p=a(i),m=o;return(e&&m(new e(new ArrayBuffer(1)))!=d||t&&m(new t)!=s||n&&m(n.resolve())!=l||r&&m(new r)!=c||i&&m(new i)!=f)&&(m=function(_){var x=o(_),S=x==u?_.constructor:void 0,E=S?a(S):"";if(E)switch(E){case h:return d;case g:return s;case v:return l;case y:return c;case p:return f}return x}),Ul=m,Ul}var Hl,_0;function N3(){if(_0)return Hl;_0=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,o=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(o.index=r.index,o.input=r.input),o}return Hl=n,Hl}var Vl,x0;function nC(){if(x0)return Vl;x0=1;var e=wt(),t=e.Uint8Array;return Vl=t,Vl}var Gl,w0;function jv(){if(w0)return Gl;w0=1;var e=nC();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return Gl=t,Gl}var Wl,S0;function I3(){if(S0)return Wl;S0=1;var e=jv();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return Wl=t,Wl}var Kl,E0;function P3(){if(E0)return Kl;E0=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return Kl=t,Kl}var Yl,C0;function j3(){if(C0)return Yl;C0=1;var e=Xr(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return Yl=r,Yl}var Ql,k0;function rC(){if(k0)return Ql;k0=1;var e=jv();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return Ql=t,Ql}var Xl,b0;function q3(){if(b0)return Xl;b0=1;var e=jv(),t=I3(),n=P3(),r=j3(),i=rC(),o="[object Boolean]",a="[object Date]",s="[object Map]",u="[object Number]",l="[object RegExp]",c="[object Set]",f="[object String]",d="[object Symbol]",h="[object ArrayBuffer]",g="[object DataView]",v="[object Float32Array]",y="[object Float64Array]",p="[object Int8Array]",m="[object Int16Array]",_="[object Int32Array]",x="[object Uint8Array]",S="[object Uint8ClampedArray]",E="[object Uint16Array]",C="[object Uint32Array]";function T(M,k,j){var B=M.constructor;switch(k){case h:return e(M);case o:case a:return new B(+M);case g:return t(M,j);case v:case y:case p:case m:case _:case x:case S:case E:case C:return i(M,j);case s:return new B;case u:case f:return new B(M);case l:return n(M);case c:return new B;case d:return r(M)}}return Xl=T,Xl}var Zl,T0;function iC(){if(T0)return Zl;T0=1;var e=lt(),t=Object.create,n=function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var o=new r;return r.prototype=void 0,o}}();return Zl=n,Zl}var Jl,R0;function oC(){if(R0)return Jl;R0=1;var e=iC(),t=Ss(),n=ws();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return Jl=r,Jl}var ec,N0;function A3(){if(N0)return ec;N0=1;var e=Jr(),t=jt(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return ec=r,ec}var tc,I0;function M3(){if(I0)return tc;I0=1;var e=A3(),t=xs(),n=Rv(),r=n&&n.isMap,i=r?t(r):e;return tc=i,tc}var nc,P0;function L3(){if(P0)return nc;P0=1;var e=Jr(),t=jt(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return nc=r,nc}var rc,j0;function O3(){if(j0)return rc;j0=1;var e=L3(),t=xs(),n=Rv(),r=n&&n.isSet,i=r?t(r):e;return rc=i,rc}var ic,q0;function aC(){if(q0)return ic;q0=1;var e=gs(),t=bv(),n=ys(),r=_3(),i=S3(),o=KE(),a=YE(),s=E3(),u=C3(),l=eC(),c=k3(),f=Jr(),d=N3(),h=q3(),g=oC(),v=ge(),y=Zr(),p=M3(),m=lt(),_=O3(),x=qn(),S=ir(),E=1,C=2,T=4,M="[object Arguments]",k="[object Array]",j="[object Boolean]",B="[object Date]",H="[object Error]",b="[object Function]",P="[object GeneratorFunction]",R="[object Map]",O="[object Number]",I="[object Object]",A="[object RegExp]",L="[object Set]",F="[object String]",U="[object Symbol]",Ee="[object WeakMap]",J="[object ArrayBuffer]",Ce="[object DataView]",me="[object Float32Array]",xe="[object Float64Array]",ft="[object Int8Array]",ti="[object Int16Array]",ik="[object Int32Array]",ok="[object Uint8Array]",ak="[object Uint8ClampedArray]",sk="[object Uint16Array]",uk="[object Uint32Array]",te={};te[M]=te[k]=te[J]=te[Ce]=te[j]=te[B]=te[me]=te[xe]=te[ft]=te[ti]=te[ik]=te[R]=te[O]=te[I]=te[A]=te[L]=te[F]=te[U]=te[ok]=te[ak]=te[sk]=te[uk]=!0,te[H]=te[b]=te[Ee]=!1;function yo(Q,sr,ur,lk,_o,Jt){var ze,xo=sr&E,wo=sr&C,ck=sr&T;if(ur&&(ze=_o?ur(Q,lk,_o,Jt):ur(Q)),ze!==void 0)return ze;if(!m(Q))return Q;var Uv=v(Q);if(Uv){if(ze=d(Q),!xo)return a(Q,ze)}else{var lr=f(Q),Hv=lr==b||lr==P;if(y(Q))return o(Q,xo);if(lr==I||lr==M||Hv&&!_o){if(ze=wo||Hv?{}:g(Q),!xo)return wo?u(Q,i(ze,Q)):s(Q,r(ze,Q))}else{if(!te[lr])return _o?Q:{};ze=h(Q,lr,xo)}}Jt||(Jt=new e);var Vv=Jt.get(Q);if(Vv)return Vv;Jt.set(Q,ze),_(Q)?Q.forEach(function(en){ze.add(yo(en,sr,ur,en,Q,Jt))}):p(Q)&&Q.forEach(function(en,An){ze.set(An,yo(en,sr,ur,An,Q,Jt))});var fk=ck?wo?c:l:wo?S:x,Gv=Uv?void 0:fk(Q);return t(Gv||Q,function(en,An){Gv&&(An=en,en=Q[An]),n(ze,An,yo(en,sr,ur,An,Q,Jt))}),ze}return ic=yo,ic}var oc,A0;function z3(){if(A0)return oc;A0=1;var e=aC(),t=4;function n(r){return e(r,t)}return oc=n,oc}var ac,M0;function qv(){if(M0)return ac;M0=1;function e(t){return function(){return t}}return ac=e,ac}var sc,L0;function F3(){if(L0)return sc;L0=1;function e(t){return function(n,r,i){for(var o=-1,a=Object(n),s=i(n),u=s.length;u--;){var l=s[t?u:++o];if(r(a[l],l,a)===!1)break}return n}}return sc=e,sc}var uc,O0;function Av(){if(O0)return uc;O0=1;var e=F3(),t=e();return uc=t,uc}var lc,z0;function Mv(){if(z0)return lc;z0=1;var e=Av(),t=qn();function n(r,i){return r&&e(r,i,t)}return lc=n,lc}var cc,F0;function D3(){if(F0)return cc;F0=1;var e=Xt();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var a=i.length,s=r?a:-1,u=Object(i);(r?s--:++s<a)&&o(u[s],s,u)!==!1;);return i}}return cc=t,cc}var fc,D0;function Es(){if(D0)return fc;D0=1;var e=Mv(),t=D3(),n=t(e);return fc=n,fc}var dc,$0;function or(){if($0)return dc;$0=1;function e(t){return t}return dc=e,dc}var hc,B0;function sC(){if(B0)return hc;B0=1;var e=or();function t(n){return typeof n=="function"?n:e}return hc=t,hc}var pc,U0;function uC(){if(U0)return pc;U0=1;var e=bv(),t=Es(),n=sC(),r=ge();function i(o,a){var s=r(o)?e:t;return s(o,n(a))}return pc=i,pc}var vc,H0;function lC(){return H0||(H0=1,vc=uC()),vc}var gc,V0;function $3(){if(V0)return gc;V0=1;var e=Es();function t(n,r){var i=[];return e(n,function(o,a,s){r(o,a,s)&&i.push(o)}),i}return gc=t,gc}var mc,G0;function B3(){if(G0)return mc;G0=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return mc=t,mc}var yc,W0;function U3(){if(W0)return yc;W0=1;function e(t){return this.__data__.has(t)}return yc=e,yc}var _c,K0;function cC(){if(K0)return _c;K0=1;var e=kv(),t=B3(),n=U3();function r(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,_c=r,_c}var xc,Y0;function H3(){if(Y0)return xc;Y0=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return xc=e,xc}var wc,Q0;function fC(){if(Q0)return wc;Q0=1;function e(t,n){return t.has(n)}return wc=e,wc}var Sc,X0;function dC(){if(X0)return Sc;X0=1;var e=cC(),t=H3(),n=fC(),r=1,i=2;function o(a,s,u,l,c,f){var d=u&r,h=a.length,g=s.length;if(h!=g&&!(d&&g>h))return!1;var v=f.get(a),y=f.get(s);if(v&&y)return v==s&&y==a;var p=-1,m=!0,_=u&i?new e:void 0;for(f.set(a,s),f.set(s,a);++p<h;){var x=a[p],S=s[p];if(l)var E=d?l(S,x,p,s,a,f):l(x,S,p,a,s,f);if(E!==void 0){if(E)continue;m=!1;break}if(_){if(!t(s,function(C,T){if(!n(_,T)&&(x===C||c(x,C,u,l,f)))return _.push(T)})){m=!1;break}}else if(!(x===S||c(x,S,u,l,f))){m=!1;break}}return f.delete(a),f.delete(s),m}return Sc=o,Sc}var Ec,Z0;function V3(){if(Z0)return Ec;Z0=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return Ec=e,Ec}var Cc,J0;function Lv(){if(J0)return Cc;J0=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Cc=e,Cc}var kc,e1;function G3(){if(e1)return kc;e1=1;var e=Xr(),t=nC(),n=Qr(),r=dC(),i=V3(),o=Lv(),a=1,s=2,u="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Map]",d="[object Number]",h="[object RegExp]",g="[object Set]",v="[object String]",y="[object Symbol]",p="[object ArrayBuffer]",m="[object DataView]",_=e?e.prototype:void 0,x=_?_.valueOf:void 0;function S(E,C,T,M,k,j,B){switch(T){case m:if(E.byteLength!=C.byteLength||E.byteOffset!=C.byteOffset)return!1;E=E.buffer,C=C.buffer;case p:return!(E.byteLength!=C.byteLength||!j(new t(E),new t(C)));case u:case l:case d:return n(+E,+C);case c:return E.name==C.name&&E.message==C.message;case h:case v:return E==C+"";case f:var H=i;case g:var b=M&a;if(H||(H=o),E.size!=C.size&&!b)return!1;var P=B.get(E);if(P)return P==C;M|=s,B.set(E,C);var R=r(H(E),H(C),M,k,j,B);return B.delete(E),R;case y:if(x)return x.call(E)==x.call(C)}return!1}return kc=S,kc}var bc,t1;function W3(){if(t1)return bc;t1=1;var e=eC(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,a,s,u,l,c){var f=s&t,d=e(o),h=d.length,g=e(a),v=g.length;if(h!=v&&!f)return!1;for(var y=h;y--;){var p=d[y];if(!(f?p in a:r.call(a,p)))return!1}var m=c.get(o),_=c.get(a);if(m&&_)return m==a&&_==o;var x=!0;c.set(o,a),c.set(a,o);for(var S=f;++y<h;){p=d[y];var E=o[p],C=a[p];if(u)var T=f?u(C,E,p,a,o,c):u(E,C,p,o,a,c);if(!(T===void 0?E===C||l(E,C,s,u,c):T)){x=!1;break}S||(S=p=="constructor")}if(x&&!S){var M=o.constructor,k=a.constructor;M!=k&&"constructor"in o&&"constructor"in a&&!(typeof M=="function"&&M instanceof M&&typeof k=="function"&&k instanceof k)&&(x=!1)}return c.delete(o),c.delete(a),x}return bc=i,bc}var Tc,n1;function K3(){if(n1)return Tc;n1=1;var e=gs(),t=dC(),n=G3(),r=W3(),i=Jr(),o=ge(),a=Zr(),s=go(),u=1,l="[object Arguments]",c="[object Array]",f="[object Object]",d=Object.prototype,h=d.hasOwnProperty;function g(v,y,p,m,_,x){var S=o(v),E=o(y),C=S?c:i(v),T=E?c:i(y);C=C==l?f:C,T=T==l?f:T;var M=C==f,k=T==f,j=C==T;if(j&&a(v)){if(!a(y))return!1;S=!0,M=!1}if(j&&!M)return x||(x=new e),S||s(v)?t(v,y,p,m,_,x):n(v,y,C,p,m,_,x);if(!(p&u)){var B=M&&h.call(v,"__wrapped__"),H=k&&h.call(y,"__wrapped__");if(B||H){var b=B?v.value():v,P=H?y.value():y;return x||(x=new e),_(b,P,p,m,x)}}return j?(x||(x=new e),r(v,y,p,m,_,x)):!1}return Tc=g,Tc}var Rc,r1;function hC(){if(r1)return Rc;r1=1;var e=K3(),t=jt();function n(r,i,o,a,s){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,o,a,n,s)}return Rc=n,Rc}var Nc,i1;function Y3(){if(i1)return Nc;i1=1;var e=gs(),t=hC(),n=1,r=2;function i(o,a,s,u){var l=s.length,c=l,f=!u;if(o==null)return!c;for(o=Object(o);l--;){var d=s[l];if(f&&d[2]?d[1]!==o[d[0]]:!(d[0]in o))return!1}for(;++l<c;){d=s[l];var h=d[0],g=o[h],v=d[1];if(f&&d[2]){if(g===void 0&&!(h in o))return!1}else{var y=new e;if(u)var p=u(g,v,h,o,a,y);if(!(p===void 0?t(v,g,n|r,u,y):p))return!1}}return!0}return Nc=i,Nc}var Ic,o1;function pC(){if(o1)return Ic;o1=1;var e=lt();function t(n){return n===n&&!e(n)}return Ic=t,Ic}var Pc,a1;function Q3(){if(a1)return Pc;a1=1;var e=pC(),t=qn();function n(r){for(var i=t(r),o=i.length;o--;){var a=i[o],s=r[a];i[o]=[a,s,e(s)]}return i}return Pc=n,Pc}var jc,s1;function vC(){if(s1)return jc;s1=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return jc=e,jc}var qc,u1;function X3(){if(u1)return qc;u1=1;var e=Y3(),t=Q3(),n=vC();function r(i){var o=t(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return qc=r,qc}var Ac,l1;function ei(){if(l1)return Ac;l1=1;var e=nr(),t=jt(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Ac=r,Ac}var Mc,c1;function Ov(){if(c1)return Mc;c1=1;var e=ge(),t=ei(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,a){if(e(o))return!1;var s=typeof o;return s=="number"||s=="symbol"||s=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||a!=null&&o in Object(a)}return Mc=i,Mc}var Lc,f1;function Z3(){if(f1)return Lc;f1=1;var e=kv(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,s=i?i.apply(this,a):a[0],u=o.cache;if(u.has(s))return u.get(s);var l=r.apply(this,a);return o.cache=u.set(s,l)||u,l};return o.cache=new(n.Cache||e),o}return n.Cache=e,Lc=n,Lc}var Oc,d1;function J3(){if(d1)return Oc;d1=1;var e=Z3(),t=500;function n(r){var i=e(r,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return Oc=n,Oc}var zc,h1;function eq(){if(h1)return zc;h1=1;var e=J3(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,s,u,l){o.push(u?l.replace(n,"$1"):s||a)}),o});return zc=r,zc}var Fc,p1;function Cs(){if(p1)return Fc;p1=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r<i;)o[r]=n(t[r],r,t);return o}return Fc=e,Fc}var Dc,v1;function tq(){if(v1)return Dc;v1=1;var e=Xr(),t=Cs(),n=ge(),r=ei(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(s){if(typeof s=="string")return s;if(n(s))return t(s,a)+"";if(r(s))return o?o.call(s):"";var u=s+"";return u=="0"&&1/s==-1/0?"-0":u}return Dc=a,Dc}var $c,g1;function gC(){if(g1)return $c;g1=1;var e=tq();function t(n){return n==null?"":e(n)}return $c=t,$c}var Bc,m1;function ks(){if(m1)return Bc;m1=1;var e=ge(),t=Ov(),n=eq(),r=gC();function i(o,a){return e(o)?o:t(o,a)?[o]:n(r(o))}return Bc=i,Bc}var Uc,y1;function mo(){if(y1)return Uc;y1=1;var e=ei();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Uc=t,Uc}var Hc,_1;function bs(){if(_1)return Hc;_1=1;var e=ks(),t=mo();function n(r,i){i=e(i,r);for(var o=0,a=i.length;r!=null&&o<a;)r=r[t(i[o++])];return o&&o==a?r:void 0}return Hc=n,Hc}var Vc,x1;function nq(){if(x1)return Vc;x1=1;var e=bs();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return Vc=t,Vc}var Gc,w1;function rq(){if(w1)return Gc;w1=1;function e(t,n){return t!=null&&n in Object(t)}return Gc=e,Gc}var Wc,S1;function mC(){if(S1)return Wc;S1=1;var e=ks(),t=vo(),n=ge(),r=_s(),i=Tv(),o=mo();function a(s,u,l){u=e(u,s);for(var c=-1,f=u.length,d=!1;++c<f;){var h=o(u[c]);if(!(d=s!=null&&l(s,h)))break;s=s[h]}return d||++c!=f?d:(f=s==null?0:s.length,!!f&&i(f)&&r(h,f)&&(n(s)||t(s)))}return Wc=a,Wc}var Kc,E1;function yC(){if(E1)return Kc;E1=1;var e=rq(),t=mC();function n(r,i){return r!=null&&t(r,i,e)}return Kc=n,Kc}var Yc,C1;function iq(){if(C1)return Yc;C1=1;var e=hC(),t=nq(),n=yC(),r=Ov(),i=pC(),o=vC(),a=mo(),s=1,u=2;function l(c,f){return r(c)&&i(f)?o(a(c),f):function(d){var h=t(d,c);return h===void 0&&h===f?n(d,c):e(f,h,s|u)}}return Yc=l,Yc}var Qc,k1;function _C(){if(k1)return Qc;k1=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Qc=e,Qc}var Xc,b1;function oq(){if(b1)return Xc;b1=1;var e=bs();function t(n){return function(r){return e(r,n)}}return Xc=t,Xc}var Zc,T1;function aq(){if(T1)return Zc;T1=1;var e=_C(),t=oq(),n=Ov(),r=mo();function i(o){return n(o)?e(r(o)):t(o)}return Zc=i,Zc}var Jc,R1;function Zt(){if(R1)return Jc;R1=1;var e=X3(),t=iq(),n=or(),r=ge(),i=aq();function o(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?t(a[0],a[1]):e(a):i(a)}return Jc=o,Jc}var ef,N1;function xC(){if(N1)return ef;N1=1;var e=QE(),t=$3(),n=Zt(),r=ge();function i(o,a){var s=r(o)?e:t;return s(o,n(a,3))}return ef=i,ef}var tf,I1;function sq(){if(I1)return tf;I1=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return tf=n,tf}var nf,P1;function wC(){if(P1)return nf;P1=1;var e=sq(),t=mC();function n(r,i){return r!=null&&t(r,i,e)}return nf=n,nf}var rf,j1;function uq(){if(j1)return rf;j1=1;var e=Nv(),t=Jr(),n=vo(),r=ge(),i=Xt(),o=Zr(),a=ws(),s=go(),u="[object Map]",l="[object Set]",c=Object.prototype,f=c.hasOwnProperty;function d(h){if(h==null)return!0;if(i(h)&&(r(h)||typeof h=="string"||typeof h.splice=="function"||o(h)||s(h)||n(h)))return!h.length;var g=t(h);if(g==u||g==l)return!h.size;if(a(h))return!e(h).length;for(var v in h)if(f.call(h,v))return!1;return!0}return rf=d,rf}var of,q1;function SC(){if(q1)return of;q1=1;function e(t){return t===void 0}return of=e,of}var af,A1;function EC(){if(A1)return af;A1=1;var e=Es(),t=Xt();function n(r,i){var o=-1,a=t(r)?Array(r.length):[];return e(r,function(s,u,l){a[++o]=i(s,u,l)}),a}return af=n,af}var sf,M1;function CC(){if(M1)return sf;M1=1;var e=Cs(),t=Zt(),n=EC(),r=ge();function i(o,a){var s=r(o)?e:n;return s(o,t(a,3))}return sf=i,sf}var uf,L1;function lq(){if(L1)return uf;L1=1;function e(t,n,r,i){var o=-1,a=t==null?0:t.length;for(i&&a&&(r=t[++o]);++o<a;)r=n(r,t[o],o,t);return r}return uf=e,uf}var lf,O1;function cq(){if(O1)return lf;O1=1;function e(t,n,r,i,o){return o(t,function(a,s,u){r=i?(i=!1,a):n(r,a,s,u)}),r}return lf=e,lf}var cf,z1;function kC(){if(z1)return cf;z1=1;var e=lq(),t=Es(),n=Zt(),r=cq(),i=ge();function o(a,s,u){var l=i(a)?e:r,c=arguments.length<3;return l(a,n(s,4),u,c,t)}return cf=o,cf}var ff,F1;function fq(){if(F1)return ff;F1=1;var e=nr(),t=ge(),n=jt(),r="[object String]";function i(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return ff=i,ff}var df,D1;function dq(){if(D1)return df;D1=1;var e=_C(),t=e("length");return df=t,df}var hf,$1;function hq(){if($1)return hf;$1=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+i+o+"]");function u(l){return s.test(l)}return hf=u,hf}var pf,B1;function pq(){if(B1)return pf;B1=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",a="["+e+"]",s="["+i+"]",u="\\ud83c[\\udffb-\\udfff]",l="(?:"+s+"|"+u+")",c="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",g=l+"?",v="["+o+"]?",y="(?:"+h+"(?:"+[c,f,d].join("|")+")"+v+g+")*",p=v+g+y,m="(?:"+[c+s+"?",s,f,d,a].join("|")+")",_=RegExp(u+"(?="+u+")|"+m+p,"g");function x(S){for(var E=_.lastIndex=0;_.test(S);)++E;return E}return pf=x,pf}var vf,U1;function vq(){if(U1)return vf;U1=1;var e=dq(),t=hq(),n=pq();function r(i){return t(i)?n(i):e(i)}return vf=r,vf}var gf,H1;function gq(){if(H1)return gf;H1=1;var e=Nv(),t=Jr(),n=Xt(),r=fq(),i=vq(),o="[object Map]",a="[object Set]";function s(u){if(u==null)return 0;if(n(u))return r(u)?i(u):u.length;var l=t(u);return l==o||l==a?u.size:e(u).length}return gf=s,gf}var mf,V1;function mq(){if(V1)return mf;V1=1;var e=bv(),t=iC(),n=Mv(),r=Zt(),i=Ss(),o=ge(),a=Zr(),s=ho(),u=lt(),l=go();function c(f,d,h){var g=o(f),v=g||a(f)||l(f);if(d=r(d,4),h==null){var y=f&&f.constructor;v?h=g?new y:[]:u(f)?h=s(y)?t(i(f)):{}:h={}}return(v?e:n)(f,function(p,m,_){return d(h,p,m,_)}),h}return mf=c,mf}var yf,G1;function yq(){if(G1)return yf;G1=1;var e=Xr(),t=vo(),n=ge(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return yf=i,yf}var _f,W1;function zv(){if(W1)return _f;W1=1;var e=Pv(),t=yq();function n(r,i,o,a,s){var u=-1,l=r.length;for(o||(o=t),s||(s=[]);++u<l;){var c=r[u];i>0&&o(c)?i>1?n(c,i-1,o,a,s):e(s,c):a||(s[s.length]=c)}return s}return _f=n,_f}var xf,K1;function _q(){if(K1)return xf;K1=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return xf=e,xf}var wf,Y1;function bC(){if(Y1)return wf;Y1=1;var e=_q(),t=Math.max;function n(r,i,o){return i=t(i===void 0?r.length-1:i,0),function(){for(var a=arguments,s=-1,u=t(a.length-i,0),l=Array(u);++s<u;)l[s]=a[i+s];s=-1;for(var c=Array(i+1);++s<i;)c[s]=a[s];return c[i]=o(l),e(r,this,c)}}return wf=n,wf}var Sf,Q1;function xq(){if(Q1)return Sf;Q1=1;var e=qv(),t=VE(),n=or(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return Sf=r,Sf}var Ef,X1;function wq(){if(X1)return Ef;X1=1;var e=800,t=16,n=Date.now;function r(i){var o=0,a=0;return function(){var s=n(),u=t-(s-a);if(a=s,u>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return Ef=r,Ef}var Cf,Z1;function TC(){if(Z1)return Cf;Z1=1;var e=xq(),t=wq(),n=t(e);return Cf=n,Cf}var kf,J1;function Ts(){if(J1)return kf;J1=1;var e=or(),t=bC(),n=TC();function r(i,o){return n(t(i,o,e),i+"")}return kf=r,kf}var bf,e_;function RC(){if(e_)return bf;e_=1;function e(t,n,r,i){for(var o=t.length,a=r+(i?1:-1);i?a--:++a<o;)if(n(t[a],a,t))return a;return-1}return bf=e,bf}var Tf,t_;function Sq(){if(t_)return Tf;t_=1;function e(t){return t!==t}return Tf=e,Tf}var Rf,n_;function Eq(){if(n_)return Rf;n_=1;function e(t,n,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===n)return i;return-1}return Rf=e,Rf}var Nf,r_;function Cq(){if(r_)return Nf;r_=1;var e=RC(),t=Sq(),n=Eq();function r(i,o,a){return o===o?n(i,o,a):e(i,t,a)}return Nf=r,Nf}var If,i_;function kq(){if(i_)return If;i_=1;var e=Cq();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return If=t,If}var Pf,o_;function bq(){if(o_)return Pf;o_=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)if(r(n,t[i]))return!0;return!1}return Pf=e,Pf}var jf,a_;function Tq(){if(a_)return jf;a_=1;function e(){}return jf=e,jf}var qf,s_;function Rq(){if(s_)return qf;s_=1;var e=tC(),t=Tq(),n=Lv(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return qf=i,qf}var Af,u_;function Nq(){if(u_)return Af;u_=1;var e=cC(),t=kq(),n=bq(),r=fC(),i=Rq(),o=Lv(),a=200;function s(u,l,c){var f=-1,d=t,h=u.length,g=!0,v=[],y=v;if(c)g=!1,d=n;else if(h>=a){var p=l?null:i(u);if(p)return o(p);g=!1,d=r,y=new e}else y=l?[]:v;e:for(;++f<h;){var m=u[f],_=l?l(m):m;if(m=c||m!==0?m:0,g&&_===_){for(var x=y.length;x--;)if(y[x]===_)continue e;l&&y.push(_),v.push(m)}else d(y,_,c)||(y!==v&&y.push(_),v.push(m))}return v}return Af=s,Af}var Mf,l_;function NC(){if(l_)return Mf;l_=1;var e=Xt(),t=jt();function n(r){return t(r)&&e(r)}return Mf=n,Mf}var Lf,c_;function Iq(){if(c_)return Lf;c_=1;var e=zv(),t=Ts(),n=Nq(),r=NC(),i=t(function(o){return n(e(o,1,r,!0))});return Lf=i,Lf}var Of,f_;function Pq(){if(f_)return Of;f_=1;var e=Cs();function t(n,r){return e(r,function(i){return n[i]})}return Of=t,Of}var zf,d_;function IC(){if(d_)return zf;d_=1;var e=Pq(),t=qn();function n(r){return r==null?[]:e(r,t(r))}return zf=n,zf}var Ff,h_;function ct(){if(h_)return Ff;h_=1;var e;if(typeof Ev=="function")try{e={clone:z3(),constant:qv(),each:lC(),filter:xC(),has:wC(),isArray:ge(),isEmpty:uq(),isFunction:ho(),isUndefined:SC(),keys:qn(),map:CC(),reduce:kC(),size:gq(),transform:mq(),union:Iq(),values:IC()}}catch{}return e||(e=window._),Ff=e,Ff}var Df,p_;function Fv(){if(p_)return Df;p_=1;var e=ct();Df=i;var t="\0",n="\0",r="";function i(c){this._isDirected=e.has(c,"directed")?c.directed:!0,this._isMultigraph=e.has(c,"multigraph")?c.multigraph:!1,this._isCompound=e.has(c,"compound")?c.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(c){return this._label=c,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(c){return e.isFunction(c)||(c=e.constant(c)),this._defaultNodeLabelFn=c,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var c=this;return e.filter(this.nodes(),function(f){return e.isEmpty(c._in[f])})},i.prototype.sinks=function(){var c=this;return e.filter(this.nodes(),function(f){return e.isEmpty(c._out[f])})},i.prototype.setNodes=function(c,f){var d=arguments,h=this;return e.each(c,function(g){d.length>1?h.setNode(g,f):h.setNode(g)}),this},i.prototype.setNode=function(c,f){return e.has(this._nodes,c)?(arguments.length>1&&(this._nodes[c]=f),this):(this._nodes[c]=arguments.length>1?f:this._defaultNodeLabelFn(c),this._isCompound&&(this._parent[c]=n,this._children[c]={},this._children[n][c]=!0),this._in[c]={},this._preds[c]={},this._out[c]={},this._sucs[c]={},++this._nodeCount,this)},i.prototype.node=function(c){return this._nodes[c]},i.prototype.hasNode=function(c){return e.has(this._nodes,c)},i.prototype.removeNode=function(c){var f=this;if(e.has(this._nodes,c)){var d=function(h){f.removeEdge(f._edgeObjs[h])};delete this._nodes[c],this._isCompound&&(this._removeFromParentsChildList(c),delete this._parent[c],e.each(this.children(c),function(h){f.setParent(h)}),delete this._children[c]),e.each(e.keys(this._in[c]),d),delete this._in[c],delete this._preds[c],e.each(e.keys(this._out[c]),d),delete this._out[c],delete this._sucs[c],--this._nodeCount}return this},i.prototype.setParent=function(c,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(f))f=n;else{f+="";for(var d=f;!e.isUndefined(d);d=this.parent(d))if(d===c)throw new Error("Setting "+f+" as parent of "+c+" would create a cycle");this.setNode(f)}return this.setNode(c),this._removeFromParentsChildList(c),this._parent[c]=f,this._children[f][c]=!0,this},i.prototype._removeFromParentsChildList=function(c){delete this._children[this._parent[c]][c]},i.prototype.parent=function(c){if(this._isCompound){var f=this._parent[c];if(f!==n)return f}},i.prototype.children=function(c){if(e.isUndefined(c)&&(c=n),this._isCompound){var f=this._children[c];if(f)return e.keys(f)}else{if(c===n)return this.nodes();if(this.hasNode(c))return[]}},i.prototype.predecessors=function(c){var f=this._preds[c];if(f)return e.keys(f)},i.prototype.successors=function(c){var f=this._sucs[c];if(f)return e.keys(f)},i.prototype.neighbors=function(c){var f=this.predecessors(c);if(f)return e.union(f,this.successors(c))},i.prototype.isLeaf=function(c){var f;return this.isDirected()?f=this.successors(c):f=this.neighbors(c),f.length===0},i.prototype.filterNodes=function(c){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var d=this;e.each(this._nodes,function(v,y){c(y)&&f.setNode(y,v)}),e.each(this._edgeObjs,function(v){f.hasNode(v.v)&&f.hasNode(v.w)&&f.setEdge(v,d.edge(v))});var h={};function g(v){var y=d.parent(v);return y===void 0||f.hasNode(y)?(h[v]=y,y):y in h?h[y]:g(y)}return this._isCompound&&e.each(f.nodes(),function(v){f.setParent(v,g(v))}),f},i.prototype.setDefaultEdgeLabel=function(c){return e.isFunction(c)||(c=e.constant(c)),this._defaultEdgeLabelFn=c,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(c,f){var d=this,h=arguments;return e.reduce(c,function(g,v){return h.length>1?d.setEdge(g,v,f):d.setEdge(g,v),v}),this},i.prototype.setEdge=function(){var c,f,d,h,g=!1,v=arguments[0];typeof v=="object"&&v!==null&&"v"in v?(c=v.v,f=v.w,d=v.name,arguments.length===2&&(h=arguments[1],g=!0)):(c=v,f=arguments[1],d=arguments[3],arguments.length>2&&(h=arguments[2],g=!0)),c=""+c,f=""+f,e.isUndefined(d)||(d=""+d);var y=s(this._isDirected,c,f,d);if(e.has(this._edgeLabels,y))return g&&(this._edgeLabels[y]=h),this;if(!e.isUndefined(d)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(c),this.setNode(f),this._edgeLabels[y]=g?h:this._defaultEdgeLabelFn(c,f,d);var p=u(this._isDirected,c,f,d);return c=p.v,f=p.w,Object.freeze(p),this._edgeObjs[y]=p,o(this._preds[f],c),o(this._sucs[c],f),this._in[f][y]=p,this._out[c][y]=p,this._edgeCount++,this},i.prototype.edge=function(c,f,d){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,d);return this._edgeLabels[h]},i.prototype.hasEdge=function(c,f,d){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,d);return e.has(this._edgeLabels,h)},i.prototype.removeEdge=function(c,f,d){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,d),g=this._edgeObjs[h];return g&&(c=g.v,f=g.w,delete this._edgeLabels[h],delete this._edgeObjs[h],a(this._preds[f],c),a(this._sucs[c],f),delete this._in[f][h],delete this._out[c][h],this._edgeCount--),this},i.prototype.inEdges=function(c,f){var d=this._in[c];if(d){var h=e.values(d);return f?e.filter(h,function(g){return g.v===f}):h}},i.prototype.outEdges=function(c,f){var d=this._out[c];if(d){var h=e.values(d);return f?e.filter(h,function(g){return g.w===f}):h}},i.prototype.nodeEdges=function(c,f){var d=this.inEdges(c,f);if(d)return d.concat(this.outEdges(c,f))};function o(c,f){c[f]?c[f]++:c[f]=1}function a(c,f){--c[f]||delete c[f]}function s(c,f,d,h){var g=""+f,v=""+d;if(!c&&g>v){var y=g;g=v,v=y}return g+r+v+r+(e.isUndefined(h)?t:h)}function u(c,f,d,h){var g=""+f,v=""+d;if(!c&&g>v){var y=g;g=v,v=y}var p={v:g,w:v};return h&&(p.name=h),p}function l(c,f){return s(c,f.v,f.w,f.name)}return Df}var $f,v_;function jq(){return v_||(v_=1,$f="2.1.8"),$f}var Bf,g_;function qq(){return g_||(g_=1,Bf={Graph:Fv(),version:jq()}),Bf}var Uf,m_;function Aq(){if(m_)return Uf;m_=1;var e=ct(),t=Fv();Uf={write:n,read:o};function n(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:r(a),edges:i(a)};return e.isUndefined(a.graph())||(s.value=e.clone(a.graph())),s}function r(a){return e.map(a.nodes(),function(s){var u=a.node(s),l=a.parent(s),c={v:s};return e.isUndefined(u)||(c.value=u),e.isUndefined(l)||(c.parent=l),c})}function i(a){return e.map(a.edges(),function(s){var u=a.edge(s),l={v:s.v,w:s.w};return e.isUndefined(s.name)||(l.name=s.name),e.isUndefined(u)||(l.value=u),l})}function o(a){var s=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(u){s.setNode(u.v,u.value),u.parent&&s.setParent(u.v,u.parent)}),e.each(a.edges,function(u){s.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),s}return Uf}var Hf,y_;function Mq(){if(y_)return Hf;y_=1;var e=ct();Hf=t;function t(n){var r={},i=[],o;function a(s){e.has(r,s)||(r[s]=!0,o.push(s),e.each(n.successors(s),a),e.each(n.predecessors(s),a))}return e.each(n.nodes(),function(s){o=[],a(s),o.length&&i.push(o)}),i}return Hf}var Vf,__;function PC(){if(__)return Vf;__=1;var e=ct();Vf=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var o=this._arr,a=o.length;return i[n]=a,o.push({key:n,priority:r}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)},t.prototype._heapify=function(n){var r=this._arr,i=2*n,o=i+1,a=n;i<r.length&&(a=r[i].priority<r[a].priority?i:a,o<r.length&&(a=r[o].priority<r[a].priority?o:a),a!==n&&(this._swap(n,a),this._heapify(a)))},t.prototype._decrease=function(n){for(var r=this._arr,i=r[n].priority,o;n!==0&&(o=n>>1,!(r[o].priority<i));)this._swap(n,o),n=o},t.prototype._swap=function(n,r){var i=this._arr,o=this._keyIndices,a=i[n],s=i[r];i[n]=s,i[r]=a,o[s.key]=n,o[a.key]=r},Vf}var Gf,x_;function jC(){if(x_)return Gf;x_=1;var e=ct(),t=PC();Gf=r;var n=e.constant(1);function r(o,a,s,u){return i(o,String(a),s||n,u||function(l){return o.outEdges(l)})}function i(o,a,s,u){var l={},c=new t,f,d,h=function(g){var v=g.v!==f?g.v:g.w,y=l[v],p=s(g),m=d.distance+p;if(p<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+g+" Weight: "+p);m<y.distance&&(y.distance=m,y.predecessor=f,c.decrease(v,m))};for(o.nodes().forEach(function(g){var v=g===a?0:Number.POSITIVE_INFINITY;l[g]={distance:v},c.add(g,v)});c.size()>0&&(f=c.removeMin(),d=l[f],d.distance!==Number.POSITIVE_INFINITY);)u(f).forEach(h);return l}return Gf}var Wf,w_;function Lq(){if(w_)return Wf;w_=1;var e=jC(),t=ct();Wf=n;function n(r,i,o){return t.transform(r.nodes(),function(a,s){a[s]=e(r,s,i,o)},{})}return Wf}var Kf,S_;function qC(){if(S_)return Kf;S_=1;var e=ct();Kf=t;function t(n){var r=0,i=[],o={},a=[];function s(u){var l=o[u]={onStack:!0,lowlink:r,index:r++};if(i.push(u),n.successors(u).forEach(function(d){e.has(o,d)?o[d].onStack&&(l.lowlink=Math.min(l.lowlink,o[d].index)):(s(d),l.lowlink=Math.min(l.lowlink,o[d].lowlink))}),l.lowlink===l.index){var c=[],f;do f=i.pop(),o[f].onStack=!1,c.push(f);while(u!==f);a.push(c)}}return n.nodes().forEach(function(u){e.has(o,u)||s(u)}),a}return Kf}var Yf,E_;function Oq(){if(E_)return Yf;E_=1;var e=ct(),t=qC();Yf=n;function n(r){return e.filter(t(r),function(i){return i.length>1||i.length===1&&r.hasEdge(i[0],i[0])})}return Yf}var Qf,C_;function zq(){if(C_)return Qf;C_=1;var e=ct();Qf=n;var t=e.constant(1);function n(i,o,a){return r(i,o||t,a||function(s){return i.outEdges(s)})}function r(i,o,a){var s={},u=i.nodes();return u.forEach(function(l){s[l]={},s[l][l]={distance:0},u.forEach(function(c){l!==c&&(s[l][c]={distance:Number.POSITIVE_INFINITY})}),a(l).forEach(function(c){var f=c.v===l?c.w:c.v,d=o(c);s[l][f]={distance:d,predecessor:l}})}),u.forEach(function(l){var c=s[l];u.forEach(function(f){var d=s[f];u.forEach(function(h){var g=d[l],v=c[h],y=d[h],p=g.distance+v.distance;p<y.distance&&(y.distance=p,y.predecessor=v.predecessor)})})}),s}return Qf}var Xf,k_;function AC(){if(k_)return Xf;k_=1;var e=ct();Xf=t,t.CycleException=n;function t(r){var i={},o={},a=[];function s(u){if(e.has(o,u))throw new n;e.has(i,u)||(o[u]=!0,i[u]=!0,e.each(r.predecessors(u),s),delete o[u],a.push(u))}if(e.each(r.sinks(),s),e.size(i)!==r.nodeCount())throw new n;return a}function n(){}return n.prototype=new Error,Xf}var Zf,b_;function Fq(){if(b_)return Zf;b_=1;var e=AC();Zf=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return Zf}var Jf,T_;function MC(){if(T_)return Jf;T_=1;var e=ct();Jf=t;function t(r,i,o){e.isArray(i)||(i=[i]);var a=(r.isDirected()?r.successors:r.neighbors).bind(r),s=[],u={};return e.each(i,function(l){if(!r.hasNode(l))throw new Error("Graph does not have node: "+l);n(r,l,o==="post",u,a,s)}),s}function n(r,i,o,a,s,u){e.has(a,i)||(a[i]=!0,o||u.push(i),e.each(s(i),function(l){n(r,l,o,a,s,u)}),o&&u.push(i))}return Jf}var ed,R_;function Dq(){if(R_)return ed;R_=1;var e=MC();ed=t;function t(n,r){return e(n,r,"post")}return ed}var td,N_;function $q(){if(N_)return td;N_=1;var e=MC();td=t;function t(n,r){return e(n,r,"pre")}return td}var nd,I_;function Bq(){if(I_)return nd;I_=1;var e=ct(),t=Fv(),n=PC();nd=r;function r(i,o){var a=new t,s={},u=new n,l;function c(d){var h=d.v===l?d.w:d.v,g=u.priority(h);if(g!==void 0){var v=o(d);v<g&&(s[h]=l,u.decrease(h,v))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(d){u.add(d,Number.POSITIVE_INFINITY),a.setNode(d)}),u.decrease(i.nodes()[0],0);for(var f=!1;u.size()>0;){if(l=u.removeMin(),e.has(s,l))a.setEdge(l,s[l]);else{if(f)throw new Error("Input graph is not connected: "+i);f=!0}i.nodeEdges(l).forEach(c)}return a}return nd}var rd,P_;function Uq(){return P_||(P_=1,rd={components:Mq(),dijkstra:jC(),dijkstraAll:Lq(),findCycles:Oq(),floydWarshall:zq(),isAcyclic:Fq(),postorder:Dq(),preorder:$q(),prim:Bq(),tarjan:qC(),topsort:AC()}),rd}var id,j_;function Hq(){if(j_)return id;j_=1;var e=qq();return id={Graph:e.Graph,json:Aq(),alg:Uq(),version:e.version},id}var $a;if(typeof Ev=="function")try{$a=Hq()}catch{}$a||($a=window.graphlib);var St=$a,od,q_;function Vq(){if(q_)return od;q_=1;var e=aC(),t=1,n=4;function r(i){return e(i,t|n)}return od=r,od}var ad,A_;function Rs(){if(A_)return ad;A_=1;var e=Qr(),t=Xt(),n=_s(),r=lt();function i(o,a,s){if(!r(s))return!1;var u=typeof a;return(u=="number"?t(s)&&n(a,s.length):u=="string"&&a in s)?e(s[a],o):!1}return ad=i,ad}var sd,M_;function Gq(){if(M_)return sd;M_=1;var e=Ts(),t=Qr(),n=Rs(),r=ir(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(s,u){s=Object(s);var l=-1,c=u.length,f=c>2?u[2]:void 0;for(f&&n(u[0],u[1],f)&&(c=1);++l<c;)for(var d=u[l],h=r(d),g=-1,v=h.length;++g<v;){var y=h[g],p=s[y];(p===void 0||t(p,i[y])&&!o.call(s,y))&&(s[y]=d[y])}return s});return sd=a,sd}var ud,L_;function Wq(){if(L_)return ud;L_=1;var e=Zt(),t=Xt(),n=qn();function r(i){return function(o,a,s){var u=Object(o);if(!t(o)){var l=e(a,3);o=n(o),a=function(f){return l(u[f],f,u)}}var c=i(o,a,s);return c>-1?u[l?o[c]:c]:void 0}}return ud=r,ud}var ld,O_;function Kq(){if(O_)return ld;O_=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return ld=t,ld}var cd,z_;function Yq(){if(z_)return cd;z_=1;var e=Kq(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return cd=n,cd}var fd,F_;function Qq(){if(F_)return fd;F_=1;var e=Yq(),t=lt(),n=ei(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function u(l){if(typeof l=="number")return l;if(n(l))return r;if(t(l)){var c=typeof l.valueOf=="function"?l.valueOf():l;l=t(c)?c+"":c}if(typeof l!="string")return l===0?l:+l;l=e(l);var f=o.test(l);return f||a.test(l)?s(l.slice(2),f?2:8):i.test(l)?r:+l}return fd=u,fd}var dd,D_;function LC(){if(D_)return dd;D_=1;var e=Qq(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*n}return i===i?i:0}return dd=r,dd}var hd,$_;function Xq(){if($_)return hd;$_=1;var e=LC();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return hd=t,hd}var pd,B_;function Zq(){if(B_)return pd;B_=1;var e=RC(),t=Zt(),n=Xq(),r=Math.max;function i(o,a,s){var u=o==null?0:o.length;if(!u)return-1;var l=s==null?0:n(s);return l<0&&(l=r(u+l,0)),e(o,t(a,3),l)}return pd=i,pd}var vd,U_;function Jq(){if(U_)return vd;U_=1;var e=Wq(),t=Zq(),n=e(t);return vd=n,vd}var gd,H_;function OC(){if(H_)return gd;H_=1;var e=zv();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return gd=t,gd}var md,V_;function eA(){if(V_)return md;V_=1;var e=Av(),t=sC(),n=ir();function r(i,o){return i==null?i:e(i,t(o),n)}return md=r,md}var yd,G_;function tA(){if(G_)return yd;G_=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return yd=e,yd}var _d,W_;function nA(){if(W_)return _d;W_=1;var e=ms(),t=Mv(),n=Zt();function r(i,o){var a={};return o=n(o,3),t(i,function(s,u,l){e(a,u,o(s,u,l))}),a}return _d=r,_d}var xd,K_;function Dv(){if(K_)return xd;K_=1;var e=ei();function t(n,r,i){for(var o=-1,a=n.length;++o<a;){var s=n[o],u=r(s);if(u!=null&&(l===void 0?u===u&&!e(u):i(u,l)))var l=u,c=s}return c}return xd=t,xd}var wd,Y_;function rA(){if(Y_)return wd;Y_=1;function e(t,n){return t>n}return wd=e,wd}var Sd,Q_;function iA(){if(Q_)return Sd;Q_=1;var e=Dv(),t=rA(),n=or();function r(i){return i&&i.length?e(i,n,t):void 0}return Sd=r,Sd}var Ed,X_;function zC(){if(X_)return Ed;X_=1;var e=ms(),t=Qr();function n(r,i,o){(o!==void 0&&!t(r[i],o)||o===void 0&&!(i in r))&&e(r,i,o)}return Ed=n,Ed}var Cd,Z_;function oA(){if(Z_)return Cd;Z_=1;var e=nr(),t=Ss(),n=jt(),r="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,s=o.hasOwnProperty,u=a.call(Object);function l(c){if(!n(c)||e(c)!=r)return!1;var f=t(c);if(f===null)return!0;var d=s.call(f,"constructor")&&f.constructor;return typeof d=="function"&&d instanceof d&&a.call(d)==u}return Cd=l,Cd}var kd,J_;function FC(){if(J_)return kd;J_=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return kd=e,kd}var bd,ex;function aA(){if(ex)return bd;ex=1;var e=po(),t=ir();function n(r){return e(r,t(r))}return bd=n,bd}var Td,tx;function sA(){if(tx)return Td;tx=1;var e=zC(),t=KE(),n=rC(),r=YE(),i=oC(),o=vo(),a=ge(),s=NC(),u=Zr(),l=ho(),c=lt(),f=oA(),d=go(),h=FC(),g=aA();function v(y,p,m,_,x,S,E){var C=h(y,m),T=h(p,m),M=E.get(T);if(M){e(y,m,M);return}var k=S?S(C,T,m+"",y,p,E):void 0,j=k===void 0;if(j){var B=a(T),H=!B&&u(T),b=!B&&!H&&d(T);k=T,B||H||b?a(C)?k=C:s(C)?k=r(C):H?(j=!1,k=t(T,!0)):b?(j=!1,k=n(T,!0)):k=[]:f(T)||o(T)?(k=C,o(C)?k=g(C):(!c(C)||l(C))&&(k=i(T))):j=!1}j&&(E.set(T,k),x(k,T,_,S,E),E.delete(T)),e(y,m,k)}return Td=v,Td}var Rd,nx;function uA(){if(nx)return Rd;nx=1;var e=gs(),t=zC(),n=Av(),r=sA(),i=lt(),o=ir(),a=FC();function s(u,l,c,f,d){u!==l&&n(l,function(h,g){if(d||(d=new e),i(h))r(u,l,g,c,s,f,d);else{var v=f?f(a(u,g),h,g+"",u,l,d):void 0;v===void 0&&(v=h),t(u,g,v)}},o)}return Rd=s,Rd}var Nd,rx;function lA(){if(rx)return Nd;rx=1;var e=Ts(),t=Rs();function n(r){return e(function(i,o){var a=-1,s=o.length,u=s>1?o[s-1]:void 0,l=s>2?o[2]:void 0;for(u=r.length>3&&typeof u=="function"?(s--,u):void 0,l&&t(o[0],o[1],l)&&(u=s<3?void 0:u,s=1),i=Object(i);++a<s;){var c=o[a];c&&r(i,c,a,u)}return i})}return Nd=n,Nd}var Id,ix;function cA(){if(ix)return Id;ix=1;var e=uA(),t=lA(),n=t(function(r,i,o){e(r,i,o)});return Id=n,Id}var Pd,ox;function DC(){if(ox)return Pd;ox=1;function e(t,n){return t<n}return Pd=e,Pd}var jd,ax;function fA(){if(ax)return jd;ax=1;var e=Dv(),t=DC(),n=or();function r(i){return i&&i.length?e(i,n,t):void 0}return jd=r,jd}var qd,sx;function dA(){if(sx)return qd;sx=1;var e=Dv(),t=Zt(),n=DC();function r(i,o){return i&&i.length?e(i,t(o,2),n):void 0}return qd=r,qd}var Ad,ux;function hA(){if(ux)return Ad;ux=1;var e=wt(),t=function(){return e.Date.now()};return Ad=t,Ad}var Md,lx;function pA(){if(lx)return Md;lx=1;var e=ys(),t=ks(),n=_s(),r=lt(),i=mo();function o(a,s,u,l){if(!r(a))return a;s=t(s,a);for(var c=-1,f=s.length,d=f-1,h=a;h!=null&&++c<f;){var g=i(s[c]),v=u;if(g==="__proto__"||g==="constructor"||g==="prototype")return a;if(c!=d){var y=h[g];v=l?l(y,g,h):void 0,v===void 0&&(v=r(y)?y:n(s[c+1])?[]:{})}e(h,g,v),h=h[g]}return a}return Md=o,Md}var Ld,cx;function vA(){if(cx)return Ld;cx=1;var e=bs(),t=pA(),n=ks();function r(i,o,a){for(var s=-1,u=o.length,l={};++s<u;){var c=o[s],f=e(i,c);a(f,c)&&t(l,n(c,i),f)}return l}return Ld=r,Ld}var Od,fx;function gA(){if(fx)return Od;fx=1;var e=vA(),t=yC();function n(r,i){return e(r,i,function(o,a){return t(r,a)})}return Od=n,Od}var zd,dx;function mA(){if(dx)return zd;dx=1;var e=OC(),t=bC(),n=TC();function r(i){return n(t(i,void 0,e),i+"")}return zd=r,zd}var Fd,hx;function yA(){if(hx)return Fd;hx=1;var e=gA(),t=mA(),n=t(function(r,i){return r==null?{}:e(r,i)});return Fd=n,Fd}var Dd,px;function _A(){if(px)return Dd;px=1;var e=Math.ceil,t=Math.max;function n(r,i,o,a){for(var s=-1,u=t(e((i-r)/(o||1)),0),l=Array(u);u--;)l[a?u:++s]=r,r+=o;return l}return Dd=n,Dd}var $d,vx;function xA(){if(vx)return $d;vx=1;var e=_A(),t=Rs(),n=LC();function r(i){return function(o,a,s){return s&&typeof s!="number"&&t(o,a,s)&&(a=s=void 0),o=n(o),a===void 0?(a=o,o=0):a=n(a),s=s===void 0?o<a?1:-1:n(s),e(o,a,s,i)}}return $d=r,$d}var Bd,gx;function wA(){if(gx)return Bd;gx=1;var e=xA(),t=e();return Bd=t,Bd}var Ud,mx;function SA(){if(mx)return Ud;mx=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Ud=e,Ud}var Hd,yx;function EA(){if(yx)return Hd;yx=1;var e=ei();function t(n,r){if(n!==r){var i=n!==void 0,o=n===null,a=n===n,s=e(n),u=r!==void 0,l=r===null,c=r===r,f=e(r);if(!l&&!f&&!s&&n>r||s&&u&&c&&!l&&!f||o&&u&&c||!i&&c||!a)return 1;if(!o&&!s&&!f&&n<r||f&&i&&a&&!o&&!s||l&&i&&a||!u&&a||!c)return-1}return 0}return Hd=t,Hd}var Vd,_x;function CA(){if(_x)return Vd;_x=1;var e=EA();function t(n,r,i){for(var o=-1,a=n.criteria,s=r.criteria,u=a.length,l=i.length;++o<u;){var c=e(a[o],s[o]);if(c){if(o>=l)return c;var f=i[o];return c*(f=="desc"?-1:1)}}return n.index-r.index}return Vd=t,Vd}var Gd,xx;function kA(){if(xx)return Gd;xx=1;var e=Cs(),t=bs(),n=Zt(),r=EC(),i=SA(),o=xs(),a=CA(),s=or(),u=ge();function l(c,f,d){f.length?f=e(f,function(v){return u(v)?function(y){return t(y,v.length===1?v[0]:v)}:v}):f=[s];var h=-1;f=e(f,o(n));var g=r(c,function(v,y,p){var m=e(f,function(_){return _(v)});return{criteria:m,index:++h,value:v}});return i(g,function(v,y){return a(v,y,d)})}return Gd=l,Gd}var Wd,wx;function bA(){if(wx)return Wd;wx=1;var e=zv(),t=kA(),n=Ts(),r=Rs(),i=n(function(o,a){if(o==null)return[];var s=a.length;return s>1&&r(o,a[0],a[1])?a=[]:s>2&&r(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return Wd=i,Wd}var Kd,Sx;function TA(){if(Sx)return Kd;Sx=1;var e=gC(),t=0;function n(r){var i=++t;return e(r)+i}return Kd=n,Kd}var Yd,Ex;function RA(){if(Ex)return Yd;Ex=1;function e(t,n,r){for(var i=-1,o=t.length,a=n.length,s={};++i<o;){var u=i<a?n[i]:void 0;r(s,t[i],u)}return s}return Yd=e,Yd}var Qd,Cx;function NA(){if(Cx)return Qd;Cx=1;var e=ys(),t=RA();function n(r,i){return t(r||[],i||[],e)}return Qd=n,Qd}var Ba;if(typeof Ev=="function")try{Ba={cloneDeep:Vq(),constant:qv(),defaults:Gq(),each:lC(),filter:xC(),find:Jq(),flatten:OC(),forEach:uC(),forIn:eA(),has:wC(),isUndefined:SC(),last:tA(),map:CC(),mapValues:nA(),max:iA(),merge:cA(),min:fA(),minBy:dA(),now:hA(),pick:yA(),range:wA(),reduce:kC(),sortBy:bA(),uniqueId:TA(),values:IC(),zipObject:NA()}}catch{}Ba||(Ba=window._);var ue=Ba,IA=Ns;function Ns(){var e={};e._next=e._prev=e,this._sentinel=e}Ns.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return $C(t),t};Ns.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&$C(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};Ns.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,PA)),n=n._prev;return"["+e.join(", ")+"]"};function $C(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function PA(e,t){if(e!=="_next"&&e!=="_prev")return t}var $t=ue,jA=St.Graph,qA=IA,AA=LA,MA=$t.constant(1);function LA(e,t){if(e.nodeCount()<=1)return[];var n=zA(e,t||MA),r=OA(n.graph,n.buckets,n.zeroIdx);return $t.flatten($t.map(r,function(i){return e.outEdges(i.v,i.w)}),!0)}function OA(e,t,n){for(var r=[],i=t[t.length-1],o=t[0],a;e.nodeCount();){for(;a=o.dequeue();)Xd(e,t,n,a);for(;a=i.dequeue();)Xd(e,t,n,a);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(a=t[s].dequeue(),a){r=r.concat(Xd(e,t,n,a,!0));break}}}return r}function Xd(e,t,n,r,i){var o=i?[]:void 0;return $t.forEach(e.inEdges(r.v),function(a){var s=e.edge(a),u=e.node(a.v);i&&o.push({v:a.v,w:a.w}),u.out-=s,lp(t,n,u)}),$t.forEach(e.outEdges(r.v),function(a){var s=e.edge(a),u=a.w,l=e.node(u);l.in-=s,lp(t,n,l)}),e.removeNode(r.v),o}function zA(e,t){var n=new jA,r=0,i=0;$t.forEach(e.nodes(),function(s){n.setNode(s,{v:s,in:0,out:0})}),$t.forEach(e.edges(),function(s){var u=n.edge(s.v,s.w)||0,l=t(s),c=u+l;n.setEdge(s.v,s.w,c),i=Math.max(i,n.node(s.v).out+=l),r=Math.max(r,n.node(s.w).in+=l)});var o=$t.range(i+r+3).map(function(){return new qA}),a=r+1;return $t.forEach(n.nodes(),function(s){lp(o,a,n.node(s))}),{graph:n,buckets:o,zeroIdx:a}}function lp(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var Bn=ue,FA=AA,DA={run:$A,undo:UA};function $A(e){var t=e.graph().acyclicer==="greedy"?FA(e,n(e)):BA(e);Bn.forEach(t,function(r){var i=e.edge(r);e.removeEdge(r),i.forwardName=r.name,i.reversed=!0,e.setEdge(r.w,r.v,i,Bn.uniqueId("rev"))});function n(r){return function(i){return r.edge(i).weight}}}function BA(e){var t=[],n={},r={};function i(o){Bn.has(r,o)||(r[o]=!0,n[o]=!0,Bn.forEach(e.outEdges(o),function(a){Bn.has(n,a.w)?t.push(a):i(a.w)}),delete n[o])}return Bn.forEach(e.nodes(),i),t}function UA(e){Bn.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}var Y=ue,BC=St.Graph,We={addDummyNode:UC,simplify:HA,asNonCompoundGraph:VA,successorWeights:GA,predecessorWeights:WA,intersectRect:KA,buildLayerMatrix:YA,normalizeRanks:QA,removeEmptyRanks:XA,addBorderNode:ZA,maxRank:HC,partition:JA,time:eM,notime:tM};function UC(e,t,n,r){var i;do i=Y.uniqueId(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function HA(e){var t=new BC().setGraph(e.graph());return Y.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),Y.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function VA(e){var t=new BC({multigraph:e.isMultigraph()}).setGraph(e.graph());return Y.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),Y.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function GA(e){var t=Y.map(e.nodes(),function(n){var r={};return Y.forEach(e.outEdges(n),function(i){r[i.w]=(r[i.w]||0)+e.edge(i).weight}),r});return Y.zipObject(e.nodes(),t)}function WA(e){var t=Y.map(e.nodes(),function(n){var r={};return Y.forEach(e.inEdges(n),function(i){r[i.v]=(r[i.v]||0)+e.edge(i).weight}),r});return Y.zipObject(e.nodes(),t)}function KA(e,t){var n=e.x,r=e.y,i=t.x-n,o=t.y-r,a=e.width/2,s=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var u,l;return Math.abs(o)*a>Math.abs(i)*s?(o<0&&(s=-s),u=s*i/o,l=s):(i<0&&(a=-a),u=a,l=a*o/i),{x:n+u,y:r+l}}function YA(e){var t=Y.map(Y.range(HC(e)+1),function(){return[]});return Y.forEach(e.nodes(),function(n){var r=e.node(n),i=r.rank;Y.isUndefined(i)||(t[i][r.order]=n)}),t}function QA(e){var t=Y.min(Y.map(e.nodes(),function(n){return e.node(n).rank}));Y.forEach(e.nodes(),function(n){var r=e.node(n);Y.has(r,"rank")&&(r.rank-=t)})}function XA(e){var t=Y.min(Y.map(e.nodes(),function(o){return e.node(o).rank})),n=[];Y.forEach(e.nodes(),function(o){var a=e.node(o).rank-t;n[a]||(n[a]=[]),n[a].push(o)});var r=0,i=e.graph().nodeRankFactor;Y.forEach(n,function(o,a){Y.isUndefined(o)&&a%i!==0?--r:r&&Y.forEach(o,function(s){e.node(s).rank+=r})})}function ZA(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),UC(e,"border",i,t)}function HC(e){return Y.max(Y.map(e.nodes(),function(t){var n=e.node(t).rank;if(!Y.isUndefined(n))return n}))}function JA(e,t){var n={lhs:[],rhs:[]};return Y.forEach(e,function(r){t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function eM(e,t){var n=Y.now();try{return t()}finally{console.log(e+" time: "+(Y.now()-n)+"ms")}}function tM(e,t){return t()}var VC=ue,nM=We,rM={run:iM,undo:aM};function iM(e){e.graph().dummyChains=[],VC.forEach(e.edges(),function(t){oM(e,t)})}function oM(e,t){var n=t.v,r=e.node(n).rank,i=t.w,o=e.node(i).rank,a=t.name,s=e.edge(t),u=s.labelRank;if(o!==r+1){e.removeEdge(t);var l,c,f;for(f=0,++r;r<o;++f,++r)s.points=[],c={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=nM.addDummyNode(e,"edge",c,"_d"),r===u&&(c.width=s.width,c.height=s.height,c.dummy="edge-label",c.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},a),f===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},a)}}function aM(e){VC.forEach(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}var Vo=ue,Is={longestPath:sM,slack:uM};function sM(e){var t={};function n(r){var i=e.node(r);if(Vo.has(t,r))return i.rank;t[r]=!0;var o=Vo.min(Vo.map(e.outEdges(r),function(a){return n(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}Vo.forEach(e.sources(),n)}function uM(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Ua=ue,lM=St.Graph,Ha=Is.slack,GC=cM;function cM(e){var t=new lM({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,o;fM(t,e)<r;)i=dM(t,e),o=t.hasNode(i.v)?Ha(e,i):-Ha(e,i),hM(t,e,o);return t}function fM(e,t){function n(r){Ua.forEach(t.nodeEdges(r),function(i){var o=i.v,a=r===o?i.w:o;!e.hasNode(a)&&!Ha(t,i)&&(e.setNode(a,{}),e.setEdge(r,a,{}),n(a))})}return Ua.forEach(e.nodes(),n),e.nodeCount()}function dM(e,t){return Ua.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return Ha(t,n)})}function hM(e,t,n){Ua.forEach(e.nodes(),function(r){t.node(r).rank+=n})}var Yt=ue,pM=GC,vM=Is.slack,gM=Is.longestPath,mM=St.alg.preorder,yM=St.alg.postorder,_M=We.simplify,xM=ar;ar.initLowLimValues=Bv;ar.initCutValues=$v;ar.calcCutValue=WC;ar.leaveEdge=YC;ar.enterEdge=QC;ar.exchangeEdges=XC;function ar(e){e=_M(e),gM(e);var t=pM(e);Bv(t),$v(t,e);for(var n,r;n=YC(t);)r=QC(t,e,n),XC(t,e,n,r)}function $v(e,t){var n=yM(e,e.nodes());n=n.slice(0,n.length-1),Yt.forEach(n,function(r){wM(e,t,r)})}function wM(e,t,n){var r=e.node(n),i=r.parent;e.edge(n,i).cutvalue=WC(e,t,n)}function WC(e,t,n){var r=e.node(n),i=r.parent,o=!0,a=t.edge(n,i),s=0;return a||(o=!1,a=t.edge(i,n)),s=a.weight,Yt.forEach(t.nodeEdges(n),function(u){var l=u.v===n,c=l?u.w:u.v;if(c!==i){var f=l===o,d=t.edge(u).weight;if(s+=f?d:-d,EM(e,n,c)){var h=e.edge(n,c).cutvalue;s+=f?-h:h}}}),s}function Bv(e,t){arguments.length<2&&(t=e.nodes()[0]),KC(e,{},1,t)}function KC(e,t,n,r,i){var o=n,a=e.node(r);return t[r]=!0,Yt.forEach(e.neighbors(r),function(s){Yt.has(t,s)||(n=KC(e,t,n,s,r))}),a.low=o,a.lim=n++,i?a.parent=i:delete a.parent,n}function YC(e){return Yt.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function QC(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var o=e.node(r),a=e.node(i),s=o,u=!1;o.lim>a.lim&&(s=a,u=!0);var l=Yt.filter(t.edges(),function(c){return u===kx(e,e.node(c.v),s)&&u!==kx(e,e.node(c.w),s)});return Yt.minBy(l,function(c){return vM(t,c)})}function XC(e,t,n,r){var i=n.v,o=n.w;e.removeEdge(i,o),e.setEdge(r.v,r.w,{}),Bv(e),$v(e,t),SM(e,t)}function SM(e,t){var n=Yt.find(e.nodes(),function(i){return!t.node(i).parent}),r=mM(e,n);r=r.slice(1),Yt.forEach(r,function(i){var o=e.node(i).parent,a=t.edge(i,o),s=!1;a||(a=t.edge(o,i),s=!0),t.node(i).rank=t.node(o).rank+(s?a.minlen:-a.minlen)})}function EM(e,t,n){return e.hasEdge(t,n)}function kx(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var CM=Is,ZC=CM.longestPath,kM=GC,bM=xM,TM=RM;function RM(e){switch(e.graph().ranker){case"network-simplex":bx(e);break;case"tight-tree":IM(e);break;case"longest-path":NM(e);break;default:bx(e)}}var NM=ZC;function IM(e){ZC(e),kM(e)}function bx(e){bM(e)}var cp=ue,PM=jM;function jM(e){var t=AM(e);cp.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,o=qM(e,t,i.v,i.w),a=o.path,s=o.lca,u=0,l=a[u],c=!0;n!==i.w;){if(r=e.node(n),c){for(;(l=a[u])!==s&&e.node(l).maxRank<r.rank;)u++;l===s&&(c=!1)}if(!c){for(;u<a.length-1&&e.node(l=a[u+1]).minRank<=r.rank;)u++;l=a[u]}e.setParent(n,l),n=e.successors(n)[0]}})}function qM(e,t,n,r){var i=[],o=[],a=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),u,l;u=n;do u=e.parent(u),i.push(u);while(u&&(t[u].low>a||s>t[u].lim));for(l=u,u=r;(u=e.parent(u))!==l;)o.push(u);return{path:i.concat(o.reverse()),lca:l}}function AM(e){var t={},n=0;function r(i){var o=n;cp.forEach(e.children(i),r),t[i]={low:o,lim:n++}}return cp.forEach(e.children(),r),t}var Bt=ue,fp=We,MM={run:LM,cleanup:FM};function LM(e){var t=fp.addDummyNode(e,"root",{},"_root"),n=OM(e),r=Bt.max(Bt.values(n))-1,i=2*r+1;e.graph().nestingRoot=t,Bt.forEach(e.edges(),function(a){e.edge(a).minlen*=i});var o=zM(e)+1;Bt.forEach(e.children(),function(a){JC(e,t,i,o,r,n,a)}),e.graph().nodeRankFactor=i}function JC(e,t,n,r,i,o,a){var s=e.children(a);if(!s.length){a!==t&&e.setEdge(t,a,{weight:0,minlen:n});return}var u=fp.addBorderNode(e,"_bt"),l=fp.addBorderNode(e,"_bb"),c=e.node(a);e.setParent(u,a),c.borderTop=u,e.setParent(l,a),c.borderBottom=l,Bt.forEach(s,function(f){JC(e,t,n,r,i,o,f);var d=e.node(f),h=d.borderTop?d.borderTop:f,g=d.borderBottom?d.borderBottom:f,v=d.borderTop?r:2*r,y=h!==g?1:i-o[a]+1;e.setEdge(u,h,{weight:v,minlen:y,nestingEdge:!0}),e.setEdge(g,l,{weight:v,minlen:y,nestingEdge:!0})}),e.parent(a)||e.setEdge(t,u,{weight:0,minlen:i+o[a]})}function OM(e){var t={};function n(r,i){var o=e.children(r);o&&o.length&&Bt.forEach(o,function(a){n(a,i+1)}),t[r]=i}return Bt.forEach(e.children(),function(r){n(r,1)}),t}function zM(e){return Bt.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function FM(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Bt.forEach(e.edges(),function(n){var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}var Zd=ue,DM=We,$M=BM;function BM(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&Zd.forEach(r,t),Zd.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)Tx(e,"borderLeft","_bl",n,i,o),Tx(e,"borderRight","_br",n,i,o)}}Zd.forEach(e.children(),t)}function Tx(e,t,n,r,i,o){var a={width:0,height:0,rank:o,borderType:t},s=i[t][o-1],u=DM.addDummyNode(e,"border",a,n);i[t][o]=u,e.setParent(u,r),s&&e.setEdge(s,u,{weight:1})}var bt=ue,UM={adjust:HM,undo:VM};function HM(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&ek(e)}function VM(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&GM(e),(t==="lr"||t==="rl")&&(WM(e),ek(e))}function ek(e){bt.forEach(e.nodes(),function(t){Rx(e.node(t))}),bt.forEach(e.edges(),function(t){Rx(e.edge(t))})}function Rx(e){var t=e.width;e.width=e.height,e.height=t}function GM(e){bt.forEach(e.nodes(),function(t){Jd(e.node(t))}),bt.forEach(e.edges(),function(t){var n=e.edge(t);bt.forEach(n.points,Jd),bt.has(n,"y")&&Jd(n)})}function Jd(e){e.y=-e.y}function WM(e){bt.forEach(e.nodes(),function(t){eh(e.node(t))}),bt.forEach(e.edges(),function(t){var n=e.edge(t);bt.forEach(n.points,eh),bt.has(n,"x")&&eh(n)})}function eh(e){var t=e.x;e.x=e.y,e.y=t}var At=ue,KM=YM;function YM(e){var t={},n=At.filter(e.nodes(),function(s){return!e.children(s).length}),r=At.max(At.map(n,function(s){return e.node(s).rank})),i=At.map(At.range(r+1),function(){return[]});function o(s){if(!At.has(t,s)){t[s]=!0;var u=e.node(s);i[u.rank].push(s),At.forEach(e.successors(s),o)}}var a=At.sortBy(n,function(s){return e.node(s).rank});return At.forEach(a,o),i}var nn=ue,QM=XM;function XM(e,t){for(var n=0,r=1;r<t.length;++r)n+=ZM(e,t[r-1],t[r]);return n}function ZM(e,t,n){for(var r=nn.zipObject(n,nn.map(n,function(l,c){return c})),i=nn.flatten(nn.map(t,function(l){return nn.sortBy(nn.map(e.outEdges(l),function(c){return{pos:r[c.w],weight:e.edge(c).weight}}),"pos")}),!0),o=1;o<n.length;)o<<=1;var a=2*o-1;o-=1;var s=nn.map(new Array(a),function(){return 0}),u=0;return nn.forEach(i.forEach(function(l){var c=l.pos+o;s[c]+=l.weight;for(var f=0;c>0;)c%2&&(f+=s[c+1]),c=c-1>>1,s[c]+=l.weight;u+=l.weight*f})),u}var Nx=ue,JM=eL;function eL(e,t){return Nx.map(t,function(n){var r=e.inEdges(n);if(r.length){var i=Nx.reduce(r,function(o,a){var s=e.edge(a),u=e.node(a.v);return{sum:o.sum+s.weight*u.order,weight:o.weight+s.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}var Ye=ue,tL=nL;function nL(e,t){var n={};Ye.forEach(e,function(i,o){var a=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};Ye.isUndefined(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),Ye.forEach(t.edges(),function(i){var o=n[i.v],a=n[i.w];!Ye.isUndefined(o)&&!Ye.isUndefined(a)&&(a.indegree++,o.out.push(n[i.w]))});var r=Ye.filter(n,function(i){return!i.indegree});return rL(r)}function rL(e){var t=[];function n(o){return function(a){a.merged||(Ye.isUndefined(a.barycenter)||Ye.isUndefined(o.barycenter)||a.barycenter>=o.barycenter)&&iL(o,a)}}function r(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();t.push(i),Ye.forEach(i.in.reverse(),n(i)),Ye.forEach(i.out,r(i))}return Ye.map(Ye.filter(t,function(o){return!o.merged}),function(o){return Ye.pick(o,["vs","i","barycenter","weight"])})}function iL(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}var wi=ue,oL=We,aL=sL;function sL(e,t){var n=oL.partition(e,function(c){return wi.has(c,"barycenter")}),r=n.lhs,i=wi.sortBy(n.rhs,function(c){return-c.i}),o=[],a=0,s=0,u=0;r.sort(uL(!!t)),u=Ix(o,i,u),wi.forEach(r,function(c){u+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,s+=c.weight,u=Ix(o,i,u)});var l={vs:wi.flatten(o,!0)};return s&&(l.barycenter=a/s,l.weight=s),l}function Ix(e,t,n){for(var r;t.length&&(r=wi.last(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function uL(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var ln=ue,lL=JM,cL=tL,fL=aL,dL=tk;function tk(e,t,n,r){var i=e.children(t),o=e.node(t),a=o?o.borderLeft:void 0,s=o?o.borderRight:void 0,u={};a&&(i=ln.filter(i,function(g){return g!==a&&g!==s}));var l=lL(e,i);ln.forEach(l,function(g){if(e.children(g.v).length){var v=tk(e,g.v,n,r);u[g.v]=v,ln.has(v,"barycenter")&&pL(g,v)}});var c=cL(l,n);hL(c,u);var f=fL(c,r);if(a&&(f.vs=ln.flatten([a,f.vs,s],!0),e.predecessors(a).length)){var d=e.node(e.predecessors(a)[0]),h=e.node(e.predecessors(s)[0]);ln.has(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+h.order)/(f.weight+2),f.weight+=2}return f}function hL(e,t){ln.forEach(e,function(n){n.vs=ln.flatten(n.vs.map(function(r){return t[r]?t[r].vs:r}),!0)})}function pL(e,t){ln.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var Si=ue,vL=St.Graph,gL=mL;function mL(e,t,n){var r=yL(e),i=new vL({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(o){return e.node(o)});return Si.forEach(e.nodes(),function(o){var a=e.node(o),s=e.parent(o);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(i.setNode(o),i.setParent(o,s||r),Si.forEach(e[n](o),function(u){var l=u.v===o?u.w:u.v,c=i.edge(l,o),f=Si.isUndefined(c)?0:c.weight;i.setEdge(l,o,{weight:e.edge(u).weight+f})}),Si.has(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),i}function yL(e){for(var t;e.hasNode(t=Si.uniqueId("_root")););return t}var _L=ue,xL=wL;function wL(e,t,n){var r={},i;_L.forEach(n,function(o){for(var a=e.parent(o),s,u;a;){if(s=e.parent(a),s?(u=r[s],r[s]=a):(u=i,i=a),u&&u!==a){t.setEdge(u,a);return}a=s}})}var En=ue,SL=KM,EL=QM,CL=dL,kL=gL,bL=xL,TL=St.Graph,Px=We,RL=NL;function NL(e){var t=Px.maxRank(e),n=jx(e,En.range(1,t+1),"inEdges"),r=jx(e,En.range(t-1,-1,-1),"outEdges"),i=SL(e);qx(e,i);for(var o=Number.POSITIVE_INFINITY,a,s=0,u=0;u<4;++s,++u){IL(s%2?n:r,s%4>=2),i=Px.buildLayerMatrix(e);var l=EL(e,i);l<o&&(u=0,a=En.cloneDeep(i),o=l)}qx(e,a)}function jx(e,t,n){return En.map(t,function(r){return kL(e,r,n)})}function IL(e,t){var n=new TL;En.forEach(e,function(r){var i=r.graph().root,o=CL(r,i,n,t);En.forEach(o.vs,function(a,s){r.node(a).order=s}),bL(r,n,o.vs)})}function qx(e,t){En.forEach(t,function(n){En.forEach(n,function(r,i){e.node(r).order=i})})}var $=ue,PL=St.Graph,jL=We,qL={positionX:HL};function AL(e,t){var n={};function r(i,o){var a=0,s=0,u=i.length,l=$.last(o);return $.forEach(o,function(c,f){var d=LL(e,c),h=d?e.node(d).order:u;(d||c===l)&&($.forEach(o.slice(s,f+1),function(g){$.forEach(e.predecessors(g),function(v){var y=e.node(v),p=y.order;(p<a||h<p)&&!(y.dummy&&e.node(g).dummy)&&nk(n,v,g)})}),s=f+1,a=h)}),o}return $.reduce(t,r),n}function ML(e,t){var n={};function r(o,a,s,u,l){var c;$.forEach($.range(a,s),function(f){c=o[f],e.node(c).dummy&&$.forEach(e.predecessors(c),function(d){var h=e.node(d);h.dummy&&(h.order<u||h.order>l)&&nk(n,d,c)})})}function i(o,a){var s=-1,u,l=0;return $.forEach(a,function(c,f){if(e.node(c).dummy==="border"){var d=e.predecessors(c);d.length&&(u=e.node(d[0]).order,r(a,l,f,s,u),l=f,s=u)}r(a,l,a.length,u,o.length)}),a}return $.reduce(t,i),n}function LL(e,t){if(e.node(t).dummy)return $.find(e.predecessors(t),function(n){return e.node(n).dummy})}function nk(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function OL(e,t,n){if(t>n){var r=t;t=n,n=r}return $.has(e[t],n)}function zL(e,t,n,r){var i={},o={},a={};return $.forEach(t,function(s){$.forEach(s,function(u,l){i[u]=u,o[u]=u,a[u]=l})}),$.forEach(t,function(s){var u=-1;$.forEach(s,function(l){var c=r(l);if(c.length){c=$.sortBy(c,function(v){return a[v]});for(var f=(c.length-1)/2,d=Math.floor(f),h=Math.ceil(f);d<=h;++d){var g=c[d];o[l]===l&&u<a[g]&&!OL(n,l,g)&&(o[g]=l,o[l]=i[l]=i[g],u=a[g])}}})}),{root:i,align:o}}function FL(e,t,n,r,i){var o={},a=DL(e,t,n,i),s=i?"borderLeft":"borderRight";function u(f,d){for(var h=a.nodes(),g=h.pop(),v={};g;)v[g]?f(g):(v[g]=!0,h.push(g),h=h.concat(d(g))),g=h.pop()}function l(f){o[f]=a.inEdges(f).reduce(function(d,h){return Math.max(d,o[h.v]+a.edge(h))},0)}function c(f){var d=a.outEdges(f).reduce(function(g,v){return Math.min(g,o[v.w]-a.edge(v))},Number.POSITIVE_INFINITY),h=e.node(f);d!==Number.POSITIVE_INFINITY&&h.borderType!==s&&(o[f]=Math.max(o[f],d))}return u(l,a.predecessors.bind(a)),u(c,a.successors.bind(a)),$.forEach(r,function(f){o[f]=o[n[f]]}),o}function DL(e,t,n,r){var i=new PL,o=e.graph(),a=VL(o.nodesep,o.edgesep,r);return $.forEach(t,function(s){var u;$.forEach(s,function(l){var c=n[l];if(i.setNode(c),u){var f=n[u],d=i.edge(f,c);i.setEdge(f,c,Math.max(a(e,l,u),d||0))}u=l})}),i}function $L(e,t){return $.minBy($.values(t),function(n){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return $.forIn(n,function(o,a){var s=GL(e,a)/2;r=Math.max(o+s,r),i=Math.min(o-s,i)}),r-i})}function BL(e,t){var n=$.values(t),r=$.min(n),i=$.max(n);$.forEach(["u","d"],function(o){$.forEach(["l","r"],function(a){var s=o+a,u=e[s],l;if(u!==t){var c=$.values(u);l=a==="l"?r-$.min(c):i-$.max(c),l&&(e[s]=$.mapValues(u,function(f){return f+l}))}})})}function UL(e,t){return $.mapValues(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=$.sortBy($.map(e,r));return(i[1]+i[2])/2})}function HL(e){var t=jL.buildLayerMatrix(e),n=$.merge(AL(e,t),ML(e,t)),r={},i;$.forEach(["u","d"],function(a){i=a==="u"?t:$.values(t).reverse(),$.forEach(["l","r"],function(s){s==="r"&&(i=$.map(i,function(f){return $.values(f).reverse()}));var u=(a==="u"?e.predecessors:e.successors).bind(e),l=zL(e,i,n,u),c=FL(e,i,l.root,l.align,s==="r");s==="r"&&(c=$.mapValues(c,function(f){return-f})),r[a+s]=c})});var o=$L(e,r);return BL(r,o),UL(r,e.graph().align)}function VL(e,t,n){return function(r,i,o){var a=r.node(i),s=r.node(o),u=0,l;if(u+=a.width/2,$.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":l=-a.width/2;break;case"r":l=a.width/2;break}if(l&&(u+=n?l:-l),l=0,u+=(a.dummy?t:e)/2,u+=(s.dummy?t:e)/2,u+=s.width/2,$.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":l=s.width/2;break;case"r":l=-s.width/2;break}return l&&(u+=n?l:-l),l=0,u}}function GL(e,t){return e.node(t).width}var Ei=ue,rk=We,WL=qL.positionX,KL=YL;function YL(e){e=rk.asNonCompoundGraph(e),QL(e),Ei.forEach(WL(e),function(t,n){e.node(n).x=t})}function QL(e){var t=rk.buildLayerMatrix(e),n=e.graph().ranksep,r=0;Ei.forEach(t,function(i){var o=Ei.max(Ei.map(i,function(a){return e.node(a).height}));Ei.forEach(i,function(a){e.node(a).y=r+o/2}),r+=o+n})}var V=ue,Ax=DA,Mx=rM,XL=TM,ZL=We.normalizeRanks,JL=PM,eO=We.removeEmptyRanks,Lx=MM,tO=$M,Ox=UM,nO=RL,rO=KL,Tn=We,iO=St.Graph,oO=aO;function aO(e,t){var n=t&&t.debugTiming?Tn.time:Tn.notime;n("layout",function(){var r=n(" buildLayoutGraph",function(){return mO(e)});n(" runLayout",function(){sO(r,n)}),n(" updateInputGraph",function(){uO(e,r)})})}function sO(e,t){t(" makeSpaceForEdgeLabels",function(){yO(e)}),t(" removeSelfEdges",function(){TO(e)}),t(" acyclic",function(){Ax.run(e)}),t(" nestingGraph.run",function(){Lx.run(e)}),t(" rank",function(){XL(Tn.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){_O(e)}),t(" removeEmptyRanks",function(){eO(e)}),t(" nestingGraph.cleanup",function(){Lx.cleanup(e)}),t(" normalizeRanks",function(){ZL(e)}),t(" assignRankMinMax",function(){xO(e)}),t(" removeEdgeLabelProxies",function(){wO(e)}),t(" normalize.run",function(){Mx.run(e)}),t(" parentDummyChains",function(){JL(e)}),t(" addBorderSegments",function(){tO(e)}),t(" order",function(){nO(e)}),t(" insertSelfEdges",function(){RO(e)}),t(" adjustCoordinateSystem",function(){Ox.adjust(e)}),t(" position",function(){rO(e)}),t(" positionSelfEdges",function(){NO(e)}),t(" removeBorderNodes",function(){bO(e)}),t(" normalize.undo",function(){Mx.undo(e)}),t(" fixupEdgeLabelCoords",function(){CO(e)}),t(" undoCoordinateSystem",function(){Ox.undo(e)}),t(" translateGraph",function(){SO(e)}),t(" assignNodeIntersects",function(){EO(e)}),t(" reversePoints",function(){kO(e)}),t(" acyclic.undo",function(){Ax.undo(e)})}function uO(e,t){V.forEach(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),V.forEach(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,V.has(i,"x")&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var lO=["nodesep","edgesep","ranksep","marginx","marginy"],cO={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},fO=["acyclicer","ranker","rankdir","align"],dO=["width","height"],hO={width:0,height:0},pO=["minlen","weight","width","height","labeloffset"],vO={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},gO=["labelpos"];function mO(e){var t=new iO({multigraph:!0,compound:!0}),n=nh(e.graph());return t.setGraph(V.merge({},cO,th(n,lO),V.pick(n,fO))),V.forEach(e.nodes(),function(r){var i=nh(e.node(r));t.setNode(r,V.defaults(th(i,dO),hO)),t.setParent(r,e.parent(r))}),V.forEach(e.edges(),function(r){var i=nh(e.edge(r));t.setEdge(r,V.merge({},vO,th(i,pO),V.pick(i,gO)))}),t}function yO(e){var t=e.graph();t.ranksep/=2,V.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function _O(e){V.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i=e.node(t.w),o={rank:(i.rank-r.rank)/2+r.rank,e:t};Tn.addDummyNode(e,"edge-proxy",o,"_ep")}})}function xO(e){var t=0;V.forEach(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=V.max(t,r.maxRank))}),e.graph().maxRank=t}function wO(e){V.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function SO(e){var t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,s=o.marginy||0;function u(l){var c=l.x,f=l.y,d=l.width,h=l.height;t=Math.min(t,c-d/2),n=Math.max(n,c+d/2),r=Math.min(r,f-h/2),i=Math.max(i,f+h/2)}V.forEach(e.nodes(),function(l){u(e.node(l))}),V.forEach(e.edges(),function(l){var c=e.edge(l);V.has(c,"x")&&u(c)}),t-=a,r-=s,V.forEach(e.nodes(),function(l){var c=e.node(l);c.x-=t,c.y-=r}),V.forEach(e.edges(),function(l){var c=e.edge(l);V.forEach(c.points,function(f){f.x-=t,f.y-=r}),V.has(c,"x")&&(c.x-=t),V.has(c,"y")&&(c.y-=r)}),o.width=n-t+a,o.height=i-r+s}function EO(e){V.forEach(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),o,a;n.points?(o=n.points[0],a=n.points[n.points.length-1]):(n.points=[],o=i,a=r),n.points.unshift(Tn.intersectRect(r,o)),n.points.push(Tn.intersectRect(i,a))})}function CO(e){V.forEach(e.edges(),function(t){var n=e.edge(t);if(V.has(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function kO(e){V.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function bO(e){V.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),o=e.node(V.last(n.borderLeft)),a=e.node(V.last(n.borderRight));n.width=Math.abs(a.x-o.x),n.height=Math.abs(i.y-r.y),n.x=o.x+n.width/2,n.y=r.y+n.height/2}}),V.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function TO(e){V.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function RO(e){var t=Tn.buildLayerMatrix(e);V.forEach(t,function(n){var r=0;V.forEach(n,function(i,o){var a=e.node(i);a.order=o+r,V.forEach(a.selfEdges,function(s){Tn.addDummyNode(e,"selfedge",{width:s.label.width,height:s.label.height,rank:a.rank,order:o+ ++r,e:s.e,label:s.label},"_se")}),delete a.selfEdges})})}function NO(e){V.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}})}function th(e,t){return V.mapValues(V.pick(e,t),Number)}function nh(e){var t={};return V.forEach(e,function(n,r){t[r.toLowerCase()]=n}),t}var Go=ue,IO=We,PO=St.Graph,jO={debugOrdering:qO};function qO(e){var t=IO.buildLayerMatrix(e),n=new PO({compound:!0,multigraph:!0}).setGraph({});return Go.forEach(e.nodes(),function(r){n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),Go.forEach(e.edges(),function(r){n.setEdge(r.v,r.w,{},r.name)}),Go.forEach(t,function(r,i){var o="layer"+i;n.setNode(o,{rank:"same"}),Go.reduce(r,function(a,s){return n.setEdge(a,s,{style:"invis"}),s})}),n}var AO="0.8.5",MO={graphlib:St,layout:oO,debug:jO,util:{time:We.time,notime:We.notime},version:AO};const zx=Dx(MO),LO=({graphData:e,chains:t})=>{const n=N.useRef(null),r=N.useRef(null),[i,o]=N.useState(null),[a,s]=N.useState(null),[u,l]=N.useState(1),c=N.useMemo(()=>{if(a===null)return null;const g=t[a];return g?eR(g.root.id,e):null},[a,t,e]),f=N.useCallback(g=>{o(g)},[]),d=N.useCallback(g=>{const v=e.nodes.find(y=>y.id===g);v&&o(v)},[e.nodes]);N.useEffect(()=>{if(!n.current||!r.current)return;const g=De(n.current),v=r.current,y=v.clientWidth,p=v.clientHeight;g.selectAll("*").remove();const m=c?e.nodes.filter(P=>c.has(P.id)):e.nodes,_=new Set(m.map(P=>P.id)),x=e.edges.filter(P=>_.has(P.from_node_id)&&_.has(P.to_node_id));if(m.length===0)return;const S=new zx.graphlib.Graph;S.setGraph({rankdir:"TB",nodesep:80,ranksep:100,marginx:50,marginy:50}),S.setDefaultEdgeLabel(()=>({})),m.forEach(P=>{S.setNode(String(P.id),{width:150,height:60,node:P})}),x.forEach(P=>{S.setEdge(String(P.from_node_id),String(P.to_node_id),{edge:P})}),zx.layout(S);const E=S.graph().width||y,C=S.graph().height||p,T=g.append("g"),M=BE().scaleExtent([.1,3]).on("zoom",P=>{T.attr("transform",P.transform),l(P.transform.k)});g.call(M);const k=Math.min((y-100)/E,(p-100)/C,1),j=(y-E*k)/2,B=(p-C*k)/2;g.call(M.transform,Sv.translate(j,B).scale(k)),T.append("g").selectAll(".edge").data(S.edges()).join("g").attr("class","edge").each(function(P){const R=S.edge(P),O=R.edge,I=Nj().x(A=>A.x).y(A=>A.y).curve(Ij);De(this).append("path").attr("d",I(R.points)).attr("fill","none").attr("stroke",sR(O.edge_type)).attr("stroke-width",2).attr("stroke-opacity",.6).attr("stroke-dasharray",O.edge_type==="rejected"?"5,5":null).attr("marker-end","url(#arrowhead)")}),g.append("defs").append("marker").attr("id","arrowhead").attr("viewBox","-5 -5 10 10").attr("refX",8).attr("refY",0).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M-5,-5L5,0L-5,5Z").attr("fill","#666");const b=T.append("g").selectAll(".node").data(S.nodes()).join("g").attr("class","node").attr("transform",P=>{const R=S.node(P);return`translate(${R.x-R.width/2},${R.y-R.height/2})`}).style("cursor","pointer").on("click",(P,R)=>{const O=S.node(R).node;f(O)});return b.append("rect").attr("width",P=>S.node(P).width).attr("height",P=>S.node(P).height).attr("rx",8).attr("fill",P=>{const R=S.node(P).node;return It(R.node_type)}).attr("fill-opacity",.2).attr("stroke",P=>{const R=S.node(P).node;return It(R.node_type)}).attr("stroke-width",2),b.append("text").attr("x",10).attr("y",18).attr("fill","#666").attr("font-size","10px").text(P=>`#${P}`),b.append("text").attr("x",P=>S.node(P).width/2).attr("y",38).attr("text-anchor","middle").attr("fill","#eee").attr("font-size","12px").text(P=>{const R=S.node(P).node;return ut(R.title,20)}),()=>{g.on(".zoom",null)}},[e,c,f]);const h=t.filter(g=>g.root.node_type==="goal");return w.jsxs("div",{style:ne.container,children:[w.jsxs("div",{style:ne.controls,children:[w.jsx("h2",{style:ne.title,children:"DAG View"}),w.jsxs("div",{style:ne.section,children:[w.jsx("label",{style:ne.label,children:"Focus Chain"}),w.jsxs("select",{value:a??"",onChange:g=>s(g.target.value?Number(g.target.value):null),style:ne.select,children:[w.jsx("option",{value:"",children:"All Nodes"}),h.map((g,v)=>w.jsx("option",{value:t.indexOf(g),children:ut(g.root.title,30)},v))]})]}),w.jsxs("div",{style:ne.legend,children:[w.jsx("div",{style:ne.legendTitle,children:"Node Types"}),Object.entries(dv).map(([g,v])=>w.jsxs("div",{style:ne.legendItem,children:[w.jsx("div",{style:{...ne.legendDot,backgroundColor:v}}),w.jsx("span",{children:g})]},g))]}),w.jsxs("div",{style:ne.zoomInfo,children:["Zoom: ",Math.round(u*100),"%"]})]}),w.jsx("div",{ref:r,style:ne.svgContainer,children:w.jsx("svg",{ref:n,style:ne.svg})}),i&&w.jsxs("div",{style:ne.detailPanel,children:[w.jsx("button",{onClick:()=>o(null),style:ne.closeBtn,children:"×"}),w.jsxs("div",{style:ne.detailHeader,children:[w.jsx(Ge,{type:i.node_type}),w.jsx(uo,{confidence:$r(i)}),w.jsx(Br,{commit:bn(i)})]}),w.jsx("h3",{style:ne.detailTitle,children:i.title}),w.jsxs("p",{style:ne.detailMeta,children:["Node #",i.id," · ",new Date(i.created_at).toLocaleString()]}),i.description&&w.jsx("div",{style:ne.detailSection,children:w.jsx("p",{style:ne.description,children:i.description})}),w.jsx(OO,{node:i,graphData:e,onSelectNode:d})]})]})},OO=({node:e,graphData:t,onSelectNode:n})=>{const r=t.edges.filter(a=>a.to_node_id===e.id),i=t.edges.filter(a=>a.from_node_id===e.id),o=a=>t.nodes.find(s=>s.id===a);return w.jsxs(w.Fragment,{children:[r.length>0&&w.jsxs("div",{style:ne.detailSection,children:[w.jsxs("h4",{style:ne.sectionTitle,children:["Incoming (",r.length,")"]}),r.map(a=>{const s=o(a.from_node_id);return w.jsxs("div",{onClick:()=>n(a.from_node_id),style:ne.connection,children:[w.jsx(Ge,{type:(s==null?void 0:s.node_type)||"observation",size:"sm"}),w.jsx("span",{children:ut((s==null?void 0:s.title)||"Unknown",25)})]},a.id)})]}),i.length>0&&w.jsxs("div",{style:ne.detailSection,children:[w.jsxs("h4",{style:ne.sectionTitle,children:["Outgoing (",i.length,")"]}),i.map(a=>{const s=o(a.to_node_id);return w.jsxs("div",{onClick:()=>n(a.to_node_id),style:ne.connection,children:[w.jsx(Aa,{type:a.edge_type}),w.jsx(Ge,{type:(s==null?void 0:s.node_type)||"observation",size:"sm"}),w.jsx("span",{children:ut((s==null?void 0:s.title)||"Unknown",20)})]},a.id)})]})]})},ne={container:{height:"100%",display:"flex",position:"relative",backgroundColor:"#0d1117"},controls:{position:"absolute",top:"20px",left:"20px",backgroundColor:"#16213e",padding:"15px",borderRadius:"8px",zIndex:10,width:"220px"},title:{fontSize:"16px",margin:"0 0 15px 0",color:"#eee"},section:{marginBottom:"15px"},label:{display:"block",fontSize:"11px",color:"#888",marginBottom:"6px",textTransform:"uppercase"},select:{width:"100%",padding:"8px",backgroundColor:"#1a1a2e",border:"1px solid #333",borderRadius:"4px",color:"#eee",fontSize:"12px"},legend:{marginTop:"20px"},legendTitle:{fontSize:"11px",color:"#888",marginBottom:"8px",textTransform:"uppercase"},legendItem:{display:"flex",alignItems:"center",gap:"8px",fontSize:"11px",color:"#aaa",marginBottom:"4px"},legendDot:{width:"10px",height:"10px",borderRadius:"50%"},zoomInfo:{marginTop:"15px",fontSize:"11px",color:"#666"},svgContainer:{flex:1,height:"100%"},svg:{width:"100%",height:"100%"},detailPanel:{position:"absolute",top:"20px",right:"20px",bottom:"20px",width:"300px",backgroundColor:"#16213e",borderRadius:"8px",padding:"20px",overflowY:"auto",zIndex:10},closeBtn:{position:"absolute",top:"10px",right:"10px",width:"28px",height:"28px",border:"none",background:"#333",color:"#fff",borderRadius:"4px",fontSize:"18px",cursor:"pointer"},detailHeader:{display:"flex",gap:"8px",marginBottom:"10px",flexWrap:"wrap"},detailTitle:{fontSize:"16px",margin:"0 0 8px 0",color:"#eee"},detailMeta:{fontSize:"12px",color:"#888",margin:0},detailSection:{marginTop:"15px"},sectionTitle:{fontSize:"11px",color:"#888",margin:"0 0 8px 0",textTransform:"uppercase"},description:{fontSize:"13px",color:"#ccc",lineHeight:1.5,margin:0},connection:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 8px",backgroundColor:"#1a1a2e",borderRadius:"4px",marginBottom:"4px",cursor:"pointer",fontSize:"11px"}},Fx=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),zO=()=>{const{graphData:e,gitHistory:t,loading:n,error:r,lastUpdated:i}=HT({graphUrl:Fx?"/api/graph":"./graph-data.json",gitHistoryUrl:"./git-history.json",enableSSE:!1,pollInterval:Fx?3e4:0}),[o,a]=N.useState(null),s=N.useMemo(()=>e?GT(e.nodes):[],[e]),u=N.useMemo(()=>{if(!e)return null;if(!o)return e;const d=e.nodes.filter(v=>lE(v)===o),h=new Set(d.map(v=>v.id)),g=e.edges.filter(v=>h.has(v.from_node_id)&&h.has(v.to_node_id));return{nodes:d,edges:g}},[e,o]),{chains:l,sessions:c,stats:f}=rR(u);return n?w.jsxs("div",{style:dr.loading,children:[w.jsx("div",{style:dr.spinner}),w.jsx("p",{children:"Loading decision graph..."})]}):r?w.jsxs("div",{style:dr.error,children:[w.jsx("h2",{children:"Error Loading Graph"}),w.jsx("p",{children:r}),w.jsxs("p",{style:dr.hint,children:["Make sure graph-data.json exists, or run ",w.jsx("code",{children:"deciduous serve"})," for live data."]})]}):!e||e.nodes.length===0?w.jsxs("div",{style:dr.empty,children:[w.jsx("h2",{children:"No Decision Data"}),w.jsx("p",{children:"The graph is empty. Start adding decisions!"}),w.jsx("pre",{style:dr.code,children:'deciduous add goal "My first goal" -c 90'})]}):w.jsx(FT,{children:w.jsx(oR,{stats:f,lastUpdated:i,branches:s,selectedBranch:o,onBranchChange:a,children:w.jsxs(jT,{children:[w.jsx(hr,{path:"/",element:w.jsx(dR,{graphData:u,chains:l,sessions:c})}),w.jsx(hr,{path:"/timeline",element:w.jsx(mR,{graphData:u,gitHistory:t})}),w.jsx(hr,{path:"/graph",element:w.jsx(zj,{graphData:u})}),w.jsx(hr,{path:"/dag",element:w.jsx(LO,{graphData:u,chains:l})}),w.jsx(hr,{path:"*",element:w.jsx(IT,{to:"/",replace:!0})})]})})})},dr={loading:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundColor:"#1a1a2e",color:"#888"},spinner:{width:"40px",height:"40px",border:"3px solid #333",borderTopColor:"#00d9ff",borderRadius:"50%",animation:"spin 1s linear infinite",marginBottom:"20px"},error:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundColor:"#1a1a2e",color:"#eee",textAlign:"center",padding:"20px"},hint:{color:"#888",fontSize:"14px"},empty:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundColor:"#1a1a2e",color:"#eee",textAlign:"center",padding:"20px"},code:{backgroundColor:"#16213e",padding:"15px 20px",borderRadius:"8px",fontFamily:"monospace",fontSize:"14px",color:"#00d9ff",marginTop:"10px"}};rh.createRoot(document.getElementById("root")).render(w.jsx(gp.StrictMode,{children:w.jsx(zO,{})}));</script> 77 + <style rel="stylesheet" crossorigin>*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;width:100%}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background-color:#1a1a2e;color:#eee;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#1a1a2e}::-webkit-scrollbar-thumb{background:#333;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#444}a{color:#00d9ff;text-decoration:none}a:hover{text-decoration:underline}:focus-visible{outline:2px solid #00d9ff;outline-offset:2px}::selection{background:#00d9ff33}</style> 78 + </head> 79 + <body> 80 + <div id="root"></div> 81 + </body> 82 + </html>