diff --git a/PLAN.md b/PLAN.md index 6d7cdedd2..27cb52dd9 100644 --- a/PLAN.md +++ b/PLAN.md @@ -58,7 +58,7 @@ Variables use `{variable_name}` syntax (Python format strings). ### Common Variables (all events): - `{timestamp}` - Current date/time -- `{app_name}` - "BambuTrack" +- `{app_name}` - "Bambuddy" --- @@ -104,7 +104,7 @@ maintenance_due: body: "{printer}:\n{items}" test: - title: "BambuTrack Test" + title: "Bambuddy Test" body: "This is a test notification. If you see this, notifications are working!" ``` diff --git a/README.md b/README.md index 8f05d5055..24e230ca3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ TESTERS NEEDED!!! Since I only have X1C and H2D devices, I'm not able to test the application with other Bambu Lab models. Collaborate today and help the project to support the whole Bambu Lab printer family!

- Bambusy Logo + Bambuddy Logo

@@ -188,7 +188,7 @@ Since I only have X1C and H2D devices, I'm not able to test the application with ### Network Requirements - Bambu Lab printer with **LAN Mode** enabled -- Printer and Bambusy server must be on the same local network +- Printer and Bambuddy server must be on the same local network - Ports used: 8883 (MQTT/TLS), 990 (FTPS) ### Supported Printers @@ -203,8 +203,8 @@ Since I only have X1C and H2D devices, I'm not able to test the application with ```bash # Clone the repository -git clone https://github.com/maziggy/bambusy.git -cd bambusy +git clone https://github.com/maziggy/bambuddy.git +cd bambuddy # Create and activate virtual environment python3 -m venv venv @@ -246,8 +246,8 @@ sudo apt install python3 python3-venv python3-pip nodejs npm git #### Step 2: Clone the Repository ```bash -git clone https://github.com/maziggy/bambusy.git -cd bambusy +git clone https://github.com/maziggy/bambuddy.git +cd bambuddy ``` #### Step 3: Set Up Python Environment @@ -300,22 +300,22 @@ Open http://localhost:8000 in your browser. Create a systemd service for automatic startup: ```bash -sudo nano /etc/systemd/system/bambusy.service +sudo nano /etc/systemd/system/bambuddy.service ``` Add the following content (adjust paths as needed): ```ini [Unit] -Description=Bambusy Print Archive +Description=Bambuddy Print Archive After=network.target [Service] Type=simple User=YOUR_USERNAME -WorkingDirectory=/home/YOUR_USERNAME/bambusy -Environment="PATH=/home/YOUR_USERNAME/bambusy/venv/bin" -ExecStart=/home/YOUR_USERNAME/bambusy/venv/bin/uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 +WorkingDirectory=/home/YOUR_USERNAME/bambuddy +Environment="PATH=/home/YOUR_USERNAME/bambuddy/venv/bin" +ExecStart=/home/YOUR_USERNAME/bambuddy/venv/bin/uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 Restart=always RestartSec=10 @@ -327,31 +327,31 @@ Enable and start the service: ```bash sudo systemctl daemon-reload -sudo systemctl enable bambusy -sudo systemctl start bambusy +sudo systemctl enable bambuddy +sudo systemctl start bambuddy # Check status -sudo systemctl status bambusy +sudo systemctl status bambuddy # View logs -sudo journalctl -u bambusy -f +sudo journalctl -u bambuddy -f ``` ### Running with Docker (Coming Soon) ```bash docker run -d \ - --name bambusy \ + --name bambuddy \ -p 8000:8000 \ - -v bambusy_data:/app/data \ - -v bambusy_archive:/app/archive \ - maziggy/bambusy:latest + -v bambuddy_data:/app/data \ + -v bambuddy_archive:/app/archive \ + maziggy/bambuddy:latest ``` -### Updating Bambusy +### Updating Bambuddy ```bash -cd bambusy +cd bambuddy git pull origin main # Activate virtual environment @@ -374,7 +374,7 @@ cd .. ### Enabling LAN Mode on Your Printer -To connect Bambusy to your printer, you need to enable LAN Mode: +To connect Bambuddy to your printer, you need to enable LAN Mode: 1. On your printer, go to **Settings** > **Network** > **LAN Mode** 2. Enable **LAN Mode** (this requires Developer Mode to be enabled first) @@ -382,7 +382,7 @@ To connect Bambusy to your printer, you need to enable LAN Mode: 4. Find your printer's **IP Address** in network settings 5. Find your printer's **Serial Number** in device info -### Adding a Printer in Bambusy +### Adding a Printer in Bambuddy 1. Go to the **Printers** page 2. Click **Add Printer** @@ -397,7 +397,7 @@ The printer should connect automatically and show real-time status. ### Environment Variables -Bambusy can be configured using environment variables or a `.env` file in the project root. Copy `.env.example` to `.env` and adjust as needed: +Bambuddy can be configured using environment variables or a `.env` file in the project root. Copy `.env.example` to `.env` and adjust as needed: ```bash cp .env.example .env @@ -407,12 +407,12 @@ cp .env.example .env |----------|---------|-------------| | `DEBUG` | `false` | Enable debug mode (verbose logging, SQL queries) | | `LOG_LEVEL` | `INFO` | Log level when DEBUG=false (`DEBUG`, `INFO`, `WARNING`, `ERROR`) | -| `LOG_TO_FILE` | `true` | Write logs to `logs/bambutrack.log` | +| `LOG_TO_FILE` | `true` | Write logs to `logs/bambuddy.log` | **Production (default):** - INFO level logging - SQLAlchemy and HTTP library noise suppressed -- Logs written to `logs/bambutrack.log` (5MB rotating, 3 backups) +- Logs written to `logs/bambuddy.log` (5MB rotating, 3 backups) **Development (`DEBUG=true`):** - DEBUG level logging (verbose) @@ -499,7 +499,7 @@ When a scheduled print is ready to start: ### K-Profiles (Pressure Advance) -K-profiles store pressure advance (Linear Advance) settings for different filament and nozzle combinations. Bambusy lets you view and manage these settings directly on your printers. +K-profiles store pressure advance (Linear Advance) settings for different filament and nozzle combinations. Bambuddy lets you view and manage these settings directly on your printers. #### Viewing K-Profiles @@ -513,7 +513,7 @@ K-profiles store pressure advance (Linear Advance) settings for different filame #### Dual-Nozzle Printers (H2 Series) -For dual-nozzle printers (H2D, H2C, H2S), Bambusy automatically detects the nozzle configuration and displays: +For dual-nozzle printers (H2D, H2C, H2S), Bambuddy automatically detects the nozzle configuration and displays: - **Left/Right columns** showing profiles for each extruder - **Extruder filter** to show profiles for one extruder only - **Extruder selector** when adding new profiles @@ -535,7 +535,7 @@ The nozzle count is auto-detected from MQTT temperature data when the printer co 4. For dual-nozzle printers, select Left or Right extruder 5. Enter the K-value and click **Save** -**Note:** Filaments must first be calibrated in Bambu Studio to appear in the dropdown. Bambusy reads the filament list from existing K-profiles on the printer. +**Note:** Filaments must first be calibrated in Bambu Studio to appear in the dropdown. Bambuddy reads the filament list from existing K-profiles on the printer. #### Filtering and Search @@ -545,7 +545,7 @@ The nozzle count is auto-detected from MQTT temperature data when the printer co ### Smart Plug Integration -Bambusy supports Tasmota-based smart plugs for automated power control. This is useful for: +Bambuddy supports Tasmota-based smart plugs for automated power control. This is useful for: - Automatically turning on your printer when a print starts - Safely turning off the printer after it cools down - Energy savings by powering off idle printers @@ -597,7 +597,7 @@ Use cases: #### Power Monitoring & Alerts -For Tasmota plugs with energy monitoring (e.g., Sonoff S31), Bambusy can alert you when power consumption exceeds a threshold: +For Tasmota plugs with energy monitoring (e.g., Sonoff S31), Bambuddy can alert you when power consumption exceeds a threshold: 1. Enable **Power Alert** in the plug settings 2. Set the **Power Threshold** in watts (e.g., 200W) @@ -618,7 +618,7 @@ Each plug card shows: ### Push Notifications -Bambusy can send push notifications when print events occur. Notifications are useful for monitoring prints remotely without checking the app constantly. +Bambuddy can send push notifications when print events occur. Notifications are useful for monitoring prints remotely without checking the app constantly. #### Supported Providers @@ -713,7 +713,7 @@ Common variables available for all events: `{timestamp}`, `{app_name}` ### Spoolman Integration -Bambusy integrates with [Spoolman](https://github.com/Donkie/Spoolman) for filament inventory management. When enabled, AMS filament data syncs with your Spoolman server, allowing you to track remaining filament across all your spools. +Bambuddy integrates with [Spoolman](https://github.com/Donkie/Spoolman) for filament inventory management. When enabled, AMS filament data syncs with your Spoolman server, allowing you to track remaining filament across all your spools. #### Prerequisites @@ -745,7 +745,7 @@ When connected: #### How Syncing Works -Bambusy matches AMS spools to Spoolman spools using the **tray UUID** - a unique 32-character identifier that Bambu Lab assigns to each original spool. This ensures consistent matching across different printer models. +Bambuddy matches AMS spools to Spoolman spools using the **tray UUID** - a unique 32-character identifier that Bambu Lab assigns to each original spool. This ensures consistent matching across different printer models. **What gets synced:** - Remaining filament weight (from AMS sensor) @@ -768,7 +768,7 @@ Bambusy matches AMS spools to Spoolman spools using the **tray UUID** - a unique - This is normal behavior - they don't have Bambu Lab tray UUIDs **Connection issues:** -- Verify the Spoolman URL is accessible from your Bambusy server +- Verify the Spoolman URL is accessible from your Bambuddy server - Check that no firewall is blocking port 7912 (or your custom port) - Ensure Spoolman is running and healthy @@ -778,22 +778,22 @@ Bambusy matches AMS spools to Spoolman spools using the **tray UUID** - a unique 1. Add CallMeBot to your contacts: +34 644 51 95 23 2. Send "I allow callmebot to send me messages" via WhatsApp 3. You'll receive an API key -4. Enter your phone number (with country code) and API key in Bambusy +4. Enter your phone number (with country code) and API key in Bambuddy **ntfy:** 1. Choose a unique topic name (e.g., `my-printer-alerts-xyz123`) 2. Subscribe to it on your phone using the ntfy app or web interface -3. Enter the topic name in Bambusy (server defaults to ntfy.sh) +3. Enter the topic name in Bambuddy (server defaults to ntfy.sh) **Pushover:** 1. Create an account at [pushover.net](https://pushover.net/) 2. Create an application to get an API token -3. Enter your user key and app token in Bambusy +3. Enter your user key and app token in Bambuddy **Telegram:** 1. Message @BotFather on Telegram to create a bot 2. Get your chat ID by messaging @userinfobot -3. Enter the bot token and chat ID in Bambusy +3. Enter the bot token and chat ID in Bambuddy **Email:** 1. Configure your SMTP server settings @@ -805,12 +805,12 @@ Bambusy matches AMS spools to Spoolman spools using the **tray UUID** - a unique 1. In your Discord server, go to channel settings > Integrations > Webhooks 2. Click "New Webhook" and customize the name/avatar if desired 3. Copy the webhook URL -4. Paste the webhook URL in Bambusy +4. Paste the webhook URL in Bambuddy **Webhook (Generic):** 1. Enter any URL that accepts POST requests 2. Optionally add custom headers (e.g., Authorization tokens) -3. Bambusy sends JSON payloads with event details +3. Bambuddy sends JSON payloads with event details 4. Useful for integrating with custom systems, Home Assistant, IFTTT, etc. ## Tech Stack @@ -824,7 +824,7 @@ Bambusy matches AMS spools to Spoolman spools using the **tray UUID** - a unique ## Project Structure ``` -bambusy/ +bambuddy/ ├── backend/ │ └── app/ │ ├── api/routes/ # API endpoints @@ -835,7 +835,7 @@ bambusy/ ├── frontend/ # React application ├── static/ # Built frontend + images ├── archive/ # Stored 3MF files -└── bambusy.db # SQLite database +└── bambuddy.db # SQLite database ``` ## API Documentation @@ -884,27 +884,27 @@ Contributions are welcome! Please feel free to submit a Pull Request. ### Database errors -The SQLite database (`bambusy.db`) is created automatically. If you encounter issues: +The SQLite database (`bambuddy.db`) is created automatically. If you encounter issues: ```bash # Backup and reset database -mv bambusy.db bambusy.db.backup +mv bambuddy.db bambuddy.db.backup # Restart the application - a new database will be created ``` ### View server logs -Bambusy writes logs to `bambutrack.log` in the application directory (rotating, max 5MB × 3 files). +Bambuddy writes logs to `bambuddy.log` in the application directory (rotating, max 5MB × 3 files). ```bash # View live log file -tail -f bambutrack.log +tail -f bambuddy.log # If running directly with verbose output uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 --log-level debug # If running as systemd service -sudo journalctl -u bambusy -f +sudo journalctl -u bambuddy -f ``` ### Smart plug not responding @@ -913,13 +913,13 @@ sudo journalctl -u bambusy -f 2. **Test via browser** - Visit `http:///cm?cmnd=Power` to test directly 3. **Check Tasmota web interface** - Access `http://` to verify Tasmota is running 4. **Authentication** - If Tasmota has a password set, configure it in the plug settings -5. **Firewall** - Ensure port 80 is accessible between Bambusy server and the plug +5. **Firewall** - Ensure port 80 is accessible between Bambuddy server and the plug ### Auto power-off not working 1. **Check plug is linked** - The plug must be linked to a printer for automation 2. **Verify automation is enabled** - Check the Enabled, Auto On, and Auto Off toggles -3. **Temperature mode issues** - If using temperature mode, ensure the printer is still connected so Bambusy can read the nozzle temperature +3. **Temperature mode issues** - If using temperature mode, ensure the printer is still connected so Bambuddy can read the nozzle temperature ### Scheduled print not starting @@ -927,7 +927,7 @@ sudo journalctl -u bambusy -f 2. **Verify smart plug** - If using auto power-on, ensure the smart plug is configured and working 3. **Check queue status** - Look at the queue page for error messages 4. **Time zone issues** - Scheduled times are in your local time zone; ensure your system clock is correct -5. **View logs** - Check `bambutrack.log` for detailed error messages +5. **View logs** - Check `bambuddy.log` for detailed error messages ### Print queue shows "Failed to start" @@ -939,7 +939,7 @@ Common causes: ### Timelapse not attaching automatically **The Problem:** -When printers run in **LAN-only mode** (disconnected from Bambu Cloud), they cannot sync time via NTP. This causes the printer's internal clock to drift significantly (sometimes days or weeks off). Bambusy matches timelapses by comparing the print completion time with the timelapse file's modification time - when the printer's clock is wrong, this matching fails. +When printers run in **LAN-only mode** (disconnected from Bambu Cloud), they cannot sync time via NTP. This causes the printer's internal clock to drift significantly (sometimes days or weeks off). Bambuddy matches timelapses by comparing the print completion time with the timelapse file's modification time - when the printer's clock is wrong, this matching fails. **Symptoms:** - "Scan for Timelapse" shows "No matching timelapse found" @@ -947,7 +947,7 @@ When printers run in **LAN-only mode** (disconnected from Bambu Cloud), they can - Printer shows incorrect date/time in its settings **Workaround - Manual Selection:** -When automatic matching fails, Bambusy now offers manual timelapse selection: +When automatic matching fails, Bambuddy now offers manual timelapse selection: 1. Right-click the archive and select **"Scan for Timelapse"** 2. If no match is found, a dialog appears showing all available timelapse files on the printer diff --git a/backend/app/api/routes/settings.py b/backend/app/api/routes/settings.py index 691fefbda..359cf716b 100644 --- a/backend/app/api/routes/settings.py +++ b/backend/app/api/routes/settings.py @@ -408,7 +408,7 @@ async def export_backup( pass # Skip files that can't be read zip_buffer.seek(0) - filename = f"bambusy-backup-{datetime.now().strftime('%Y%m%d-%H%M%S')}.zip" + filename = f"bambuddy-backup-{datetime.now().strftime('%Y%m%d-%H%M%S')}.zip" return StreamingResponse( zip_buffer, media_type="application/zip", @@ -419,7 +419,7 @@ async def export_backup( return JSONResponse( content=backup, headers={ - "Content-Disposition": f"attachment; filename=bambusy-backup-{datetime.now().strftime('%Y%m%d-%H%M%S')}.json" + "Content-Disposition": f"attachment; filename=bambuddy-backup-{datetime.now().strftime('%Y%m%d-%H%M%S')}.json" } ) diff --git a/backend/app/core/config.py b/backend/app/core/config.py index c6f77633c..2fc9f9578 100644 --- a/backend/app/core/config.py +++ b/backend/app/core/config.py @@ -1,21 +1,49 @@ from pathlib import Path from pydantic_settings import BaseSettings +import logging # Application version - single source of truth APP_VERSION = "0.1.5b" -GITHUB_REPO = "maziggy/bambusy" +GITHUB_REPO = "maziggy/bambuddy" + +# Base directory for path calculations +_base_dir = Path(__file__).resolve().parent.parent.parent.parent + + +def _migrate_database() -> Path: + """Migrate database from old name to new name if needed.""" + old_db = _base_dir / "bambutrack.db" + new_db = _base_dir / "bambuddy.db" + + # If old database exists and new one doesn't, rename it + if old_db.exists() and not new_db.exists(): + try: + old_db.rename(new_db) + logging.info(f"Migrated database: {old_db} -> {new_db}") + except Exception as e: + logging.warning(f"Could not migrate database: {e}. Using old location.") + return old_db + + # If old database exists (and new one now exists too), it was migrated + # If only new exists, use new + # If neither exists, use new (will be created) + return new_db if new_db.exists() or not old_db.exists() else old_db + + +# Determine database path (handles migration) +_db_path = _migrate_database() class Settings(BaseSettings): - app_name: str = "BambuTrack" + app_name: str = "Bambuddy" debug: bool = False # Default to production mode # Paths - base_dir: Path = Path(__file__).resolve().parent.parent.parent.parent + base_dir: Path = _base_dir archive_dir: Path = base_dir / "archive" static_dir: Path = base_dir / "static" log_dir: Path = base_dir / "logs" - database_url: str = f"sqlite+aiosqlite:///{base_dir}/bambutrack.db" + database_url: str = f"sqlite+aiosqlite:///{_db_path}" # Logging log_level: str = "INFO" # Override with LOG_LEVEL env var or DEBUG=true diff --git a/backend/app/i18n/__init__.py b/backend/app/i18n/__init__.py index 580662a72..454536897 100644 --- a/backend/app/i18n/__init__.py +++ b/backend/app/i18n/__init__.py @@ -33,8 +33,8 @@ EN = { "soon": "Soon", # Test notification - "test_title": "BambuTrack Test", - "test_message": "This is a test notification from BambuTrack. If you see this, notifications are working correctly!", + "test_title": "Bambuddy Test", + "test_message": "This is a test notification from Bambuddy. If you see this, notifications are working correctly!", } } @@ -69,8 +69,8 @@ DE = { "soon": "Bald", # Test notification - "test_title": "BambuTrack Test", - "test_message": "Dies ist eine Testbenachrichtigung von BambuTrack. Wenn Sie dies sehen, funktionieren die Benachrichtigungen!", + "test_title": "Bambuddy Test", + "test_message": "Dies ist eine Testbenachrichtigung von Bambuddy. Wenn Sie dies sehen, funktionieren die Benachrichtigungen!", } } diff --git a/backend/app/main.py b/backend/app/main.py index f2379b14b..fcedabc79 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -29,7 +29,7 @@ root_logger.addHandler(console_handler) # File handler - only in production or if explicitly enabled if app_settings.log_to_file: - log_file = app_settings.log_dir / "bambutrack.log" + log_file = app_settings.log_dir / "bambuddy.log" file_handler = RotatingFileHandler( log_file, maxBytes=5*1024*1024, # 5MB @@ -47,7 +47,7 @@ if not app_settings.debug: logging.getLogger("httpcore").setLevel(logging.WARNING) logging.getLogger("httpx").setLevel(logging.WARNING) -logging.info(f"BambuTrack starting - debug={app_settings.debug}, log_level={log_level_str}") +logging.info(f"Bambuddy starting - debug={app_settings.debug}, log_level={log_level_str}") from fastapi.staticfiles import StaticFiles from fastapi.responses import FileResponse @@ -1062,7 +1062,7 @@ async def serve_frontend(): if index_file.exists(): return FileResponse(index_file) return { - "message": "BambuTrack API", + "message": "Bambuddy API", "docs": "/docs", "frontend": "Build and place React app in /static directory", } diff --git a/backend/app/models/notification_template.py b/backend/app/models/notification_template.py index f485ee4d0..27543715f 100644 --- a/backend/app/models/notification_template.py +++ b/backend/app/models/notification_template.py @@ -84,7 +84,7 @@ DEFAULT_TEMPLATES = [ { "event_type": "test", "name": "Test Notification", - "title_template": "BambuTrack Test", + "title_template": "Bambuddy Test", "body_template": "This is a test notification. If you see this, notifications are working!", }, ] diff --git a/backend/app/schemas/notification_template.py b/backend/app/schemas/notification_template.py index 52af8bf67..cd6c5b3a3 100644 --- a/backend/app/schemas/notification_template.py +++ b/backend/app/schemas/notification_template.py @@ -42,7 +42,7 @@ SAMPLE_DATA: dict[str, dict[str, str]] = { "filename": "Benchy.3mf", "estimated_time": "1h 23m", "timestamp": "2024-01-15 14:30", - "app_name": "BambuTrack", + "app_name": "Bambuddy", }, "print_complete": { "printer": "Bambu X1C", @@ -50,7 +50,7 @@ SAMPLE_DATA: dict[str, dict[str, str]] = { "duration": "1h 18m", "filament_grams": "15.2", "timestamp": "2024-01-15 15:48", - "app_name": "BambuTrack", + "app_name": "Bambuddy", }, "print_failed": { "printer": "Bambu X1C", @@ -58,14 +58,14 @@ SAMPLE_DATA: dict[str, dict[str, str]] = { "duration": "0h 45m", "reason": "Filament runout", "timestamp": "2024-01-15 15:15", - "app_name": "BambuTrack", + "app_name": "Bambuddy", }, "print_stopped": { "printer": "Bambu X1C", "filename": "Benchy.3mf", "duration": "0h 30m", "timestamp": "2024-01-15 15:00", - "app_name": "BambuTrack", + "app_name": "Bambuddy", }, "print_progress": { "printer": "Bambu X1C", @@ -73,19 +73,19 @@ SAMPLE_DATA: dict[str, dict[str, str]] = { "progress": "50", "remaining_time": "0h 41m", "timestamp": "2024-01-15 15:00", - "app_name": "BambuTrack", + "app_name": "Bambuddy", }, "printer_offline": { "printer": "Bambu X1C", "timestamp": "2024-01-15 14:30", - "app_name": "BambuTrack", + "app_name": "Bambuddy", }, "printer_error": { "printer": "Bambu X1C", "error_type": "AMS Error", "error_detail": "Filament slot 1 jammed", "timestamp": "2024-01-15 14:30", - "app_name": "BambuTrack", + "app_name": "Bambuddy", }, "filament_low": { "printer": "Bambu X1C", @@ -93,16 +93,16 @@ SAMPLE_DATA: dict[str, dict[str, str]] = { "remaining_percent": "15", "color": "Black PLA", "timestamp": "2024-01-15 14:30", - "app_name": "BambuTrack", + "app_name": "Bambuddy", }, "maintenance_due": { "printer": "Bambu X1C", "items": "• Nozzle cleaning (OVERDUE)\n• Carbon rod lubrication (Soon)", "timestamp": "2024-01-15 14:30", - "app_name": "BambuTrack", + "app_name": "Bambuddy", }, "test": { - "app_name": "BambuTrack", + "app_name": "Bambuddy", "timestamp": "2024-01-15 14:30", }, } diff --git a/backend/app/services/bambu_cloud.py b/backend/app/services/bambu_cloud.py index b6f383ed9..cf9911ba3 100644 --- a/backend/app/services/bambu_cloud.py +++ b/backend/app/services/bambu_cloud.py @@ -50,7 +50,7 @@ class BambuCloudService: """Get headers for authenticated requests.""" headers = { "Content-Type": "application/json", - "User-Agent": "BambuTrack/1.0", + "User-Agent": "Bambuddy/1.0", } if self.access_token: headers["Authorization"] = f"Bearer {self.access_token}" diff --git a/backend/app/services/bambu_mqtt.py b/backend/app/services/bambu_mqtt.py index f4cc68dbb..309610546 100644 --- a/backend/app/services/bambu_mqtt.py +++ b/backend/app/services/bambu_mqtt.py @@ -1502,7 +1502,7 @@ class BambuMQTTClient: self._loop = loop self._client = mqtt.Client( callback_api_version=mqtt.CallbackAPIVersion.VERSION2, - client_id=f"bambutrack_{self.serial_number}", + client_id=f"bambuddy_{self.serial_number}", protocol=mqtt.MQTTv311, ) diff --git a/backend/app/services/notification_service.py b/backend/app/services/notification_service.py index 6d0cf2fd4..87eedd88c 100644 --- a/backend/app/services/notification_service.py +++ b/backend/app/services/notification_service.py @@ -119,7 +119,7 @@ class NotificationService: """Build notification title and body from template.""" # Add common variables variables["timestamp"] = datetime.now().strftime("%Y-%m-%d %H:%M") - variables["app_name"] = "BambuTrack" + variables["app_name"] = "Bambuddy" template = await self._get_template(db, event_type) if not template: @@ -139,7 +139,7 @@ class NotificationService: if db: title, message = await self._build_message_from_template(db, "test", {}) else: - title = "BambuTrack Test" + title = "Bambuddy Test" message = "This is a test notification. If you see this, notifications are working!" try: @@ -287,7 +287,7 @@ class NotificationService: msg = MIMEMultipart() msg["From"] = from_email msg["To"] = to_email - msg["Subject"] = f"[BambuTrack] {subject}" + msg["Subject"] = f"[Bambuddy] {subject}" msg.attach(MIMEText(body, "plain")) if security == "ssl": @@ -357,7 +357,7 @@ class NotificationService: custom_field_title: title, custom_field_message: message, "timestamp": datetime.now().isoformat(), - "source": "BambuTrack", + "source": "Bambuddy", } headers = {"Content-Type": "application/json"} diff --git a/frontend/index.html b/frontend/index.html index 7f4bed61f..8727e069a 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,7 +3,7 @@ - Bambusy + Bambuddy diff --git a/frontend/public/img/android-chrome-192x192.png b/frontend/public/img/android-chrome-192x192.png index a394aed35..b0a45c6c0 100644 Binary files a/frontend/public/img/android-chrome-192x192.png and b/frontend/public/img/android-chrome-192x192.png differ diff --git a/frontend/public/img/android-chrome-512x512.png b/frontend/public/img/android-chrome-512x512.png index 1f3509f6d..5f871b422 100644 Binary files a/frontend/public/img/android-chrome-512x512.png and b/frontend/public/img/android-chrome-512x512.png differ diff --git a/frontend/public/img/apple-touch-icon.png b/frontend/public/img/apple-touch-icon.png index 69e136c42..63cb2e2f6 100644 Binary files a/frontend/public/img/apple-touch-icon.png and b/frontend/public/img/apple-touch-icon.png differ diff --git a/frontend/public/img/bambuddy_logo_dark.png b/frontend/public/img/bambuddy_logo_dark.png new file mode 100644 index 000000000..125103460 Binary files /dev/null and b/frontend/public/img/bambuddy_logo_dark.png differ diff --git a/frontend/public/img/bambuddy_logo_light.png b/frontend/public/img/bambuddy_logo_light.png new file mode 100644 index 000000000..a123aa63d Binary files /dev/null and b/frontend/public/img/bambuddy_logo_light.png differ diff --git a/frontend/public/img/bambusy_logo_dark.png b/frontend/public/img/bambusy_logo_dark.png deleted file mode 100644 index d026dd6ff..000000000 Binary files a/frontend/public/img/bambusy_logo_dark.png and /dev/null differ diff --git a/frontend/public/img/bambusy_logo_light.png b/frontend/public/img/bambusy_logo_light.png deleted file mode 100644 index 13311f9e0..000000000 Binary files a/frontend/public/img/bambusy_logo_light.png and /dev/null differ diff --git a/frontend/public/img/favicon-16x16.png b/frontend/public/img/favicon-16x16.png index df56b4740..1b016c05b 100644 Binary files a/frontend/public/img/favicon-16x16.png and b/frontend/public/img/favicon-16x16.png differ diff --git a/frontend/public/img/favicon-32x32.png b/frontend/public/img/favicon-32x32.png index a727e0122..daf516eae 100644 Binary files a/frontend/public/img/favicon-32x32.png and b/frontend/public/img/favicon-32x32.png differ diff --git a/frontend/public/img/favicon.png b/frontend/public/img/favicon.png index 1f3509f6d..5a513bcaf 100644 Binary files a/frontend/public/img/favicon.png and b/frontend/public/img/favicon.png differ diff --git a/frontend/src/api/client.ts b/frontend/src/api/client.ts index e081476db..dc80dcc90 100644 --- a/frontend/src/api/client.ts +++ b/frontend/src/api/client.ts @@ -1166,7 +1166,7 @@ export const api = { // Get filename from Content-Disposition header const contentDisposition = response.headers.get('Content-Disposition'); - let filename = 'bambusy-backup.json'; + let filename = 'bambuddy-backup.json'; if (contentDisposition) { const match = contentDisposition.match(/filename=([^;]+)/); if (match) filename = match[1].trim(); diff --git a/frontend/src/components/AddNotificationModal.tsx b/frontend/src/components/AddNotificationModal.tsx index 22a0a8028..401ddc848 100644 --- a/frontend/src/components/AddNotificationModal.tsx +++ b/frontend/src/components/AddNotificationModal.tsx @@ -167,7 +167,7 @@ export function AddNotificationModal({ provider, onClose }: AddNotificationModal case 'ntfy': return [ { key: 'server', label: 'Server URL', placeholder: 'https://ntfy.sh', type: 'text', required: false }, - { key: 'topic', label: 'Topic', placeholder: 'my-bambutrack', type: 'text', required: true }, + { key: 'topic', label: 'Topic', placeholder: 'my-bambuddy', type: 'text', required: true }, { key: 'auth_token', label: 'Auth Token', placeholder: 'Optional authentication', type: 'password', required: false }, ]; case 'pushover': diff --git a/frontend/src/components/KProfilesView.tsx b/frontend/src/components/KProfilesView.tsx index 8e1842f49..2b99e6449 100644 --- a/frontend/src/components/KProfilesView.tsx +++ b/frontend/src/components/KProfilesView.tsx @@ -580,7 +580,7 @@ function KProfileModal({ className="w-full px-3 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:border-bambu-green focus:outline-none resize-none" />

- Notes are saved in Bambusy, not on the printer + Notes are saved in Bambuddy, not on the printer

diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx index b0822fe76..81865c7c4 100644 --- a/frontend/src/components/Layout.tsx +++ b/frontend/src/components/Layout.tsx @@ -215,8 +215,8 @@ export function Layout() { {/* Logo */}
Bambusy
@@ -295,7 +295,7 @@ export function Layout() {
)} { - document.title = 'Bambusy'; + document.title = 'Bambuddy'; }; }, [printer]); diff --git a/frontend/src/pages/SettingsPage.tsx b/frontend/src/pages/SettingsPage.tsx index 91163afab..216381a45 100644 --- a/frontend/src/pages/SettingsPage.tsx +++ b/frontend/src/pages/SettingsPage.tsx @@ -313,7 +313,7 @@ export function SettingsPage() {

Settings

-

Configure Bambusy

+

Configure Bambuddy

{/* Tab Navigation */} @@ -1424,7 +1424,7 @@ export function SettingsPage() { {showClearStorageConfirm && ( { diff --git a/static/assets/index-DRtbW6PZ.js b/static/assets/index-C1C_HwA0.js similarity index 89% rename from static/assets/index-DRtbW6PZ.js rename to static/assets/index-C1C_HwA0.js index dc38882a6..6dd26f112 100644 --- a/static/assets/index-DRtbW6PZ.js +++ b/static/assets/index-C1C_HwA0.js @@ -8,7 +8,7 @@ Error generating stack: `+S.message+` `+S.stack}}var oe=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,se=t.unstable_shouldYield,U=t.unstable_requestPaint,P=t.unstable_now,J=t.unstable_getCurrentPriorityLevel,ge=t.unstable_ImmediatePriority,ve=t.unstable_UserBlockingPriority,xe=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,De=t.unstable_IdlePriority,Xe=t.log,ot=t.unstable_setDisableYieldValue,Fe=null,ce=null;function Qe(f){if(typeof Xe=="function"&&ot(f),ce&&typeof ce.setStrictMode=="function")try{ce.setStrictMode(Fe,f)}catch{}}var Be=Math.clz32?Math.clz32:de,Ke=Math.log,ut=Math.LN2;function de(f){return f>>>=0,f===0?32:31-(Ke(f)/ut|0)|0}var Je=256,be=262144,Ie=4194304;function Te(f){var p=f&42;if(p!==0)return p;switch(f&-f){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return f&261888;case 262144:case 524288:case 1048576:case 2097152:return f&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return f&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return f}}function ye(f,p,_){var S=f.pendingLanes;if(S===0)return 0;var k=0,L=f.suspendedLanes,K=f.pingedLanes;f=f.warmLanes;var le=S&134217727;return le!==0?(S=le&~L,S!==0?k=Te(S):(K&=le,K!==0?k=Te(K):_||(_=le&~f,_!==0&&(k=Te(_))))):(le=S&~L,le!==0?k=Te(le):K!==0?k=Te(K):_||(_=S&~f,_!==0&&(k=Te(_)))),k===0?0:p!==0&&p!==k&&(p&L)===0&&(L=k&-k,_=p&-p,L>=_||L===32&&(_&4194048)!==0)?p:k}function Ve(f,p){return(f.pendingLanes&~(f.suspendedLanes&~f.pingedLanes)&p)===0}function ft(f,p){switch(f){case 1:case 2:case 4:case 8:case 64:return p+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yt(){var f=Ie;return Ie<<=1,(Ie&62914560)===0&&(Ie=4194304),f}function Rt(f){for(var p=[],_=0;31>_;_++)p.push(f);return p}function cn(f,p){f.pendingLanes|=p,p!==268435456&&(f.suspendedLanes=0,f.pingedLanes=0,f.warmLanes=0)}function Lt(f,p,_,S,k,L){var K=f.pendingLanes;f.pendingLanes=_,f.suspendedLanes=0,f.pingedLanes=0,f.warmLanes=0,f.expiredLanes&=_,f.entangledLanes&=_,f.errorRecoveryDisabledLanes&=_,f.shellSuspendCounter=0;var le=f.entanglements,we=f.expirationTimes,$e=f.hiddenUpdates;for(_=K&~_;0<_;){var st=31-Be(_),dt=1<"u")return null;try{return f.activeElement||f.body}catch{return f.body}}var kr=/[\n"\\]/g;function kn(f){return f.replace(kr,function(p){return"\\"+p.charCodeAt(0).toString(16)+" "})}function io(f,p,_,S,k,L,K,le){f.name="",K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?f.type=K:f.removeAttribute("type"),p!=null?K==="number"?(p===0&&f.value===""||f.value!=p)&&(f.value=""+dn(p)):f.value!==""+dn(p)&&(f.value=""+dn(p)):K!=="submit"&&K!=="reset"||f.removeAttribute("value"),p!=null?yi(f,K,dn(p)):_!=null?yi(f,K,dn(_)):S!=null&&f.removeAttribute("value"),k==null&&L!=null&&(f.defaultChecked=!!L),k!=null&&(f.checked=k&&typeof k!="function"&&typeof k!="symbol"),le!=null&&typeof le!="function"&&typeof le!="symbol"&&typeof le!="boolean"?f.name=""+dn(le):f.removeAttribute("name")}function Pn(f,p,_,S,k,L,K,le){if(L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(f.type=L),p!=null||_!=null){if(!(L!=="submit"&&L!=="reset"||p!=null)){Yt(f);return}_=_!=null?""+dn(_):"",p=p!=null?""+dn(p):_,le||p===f.value||(f.value=p),f.defaultValue=p}S=S??k,S=typeof S!="function"&&typeof S!="symbol"&&!!S,f.checked=le?f.checked:!!S,f.defaultChecked=!!S,K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"&&(f.name=K),Yt(f)}function yi(f,p,_){p==="number"&&Sr(f.ownerDocument)===f||f.defaultValue===""+_||(f.defaultValue=""+_)}function ni(f,p,_,S){if(f=f.options,p){p={};for(var k=0;k<_.length;k++)p["$"+_[k]]=!0;for(_=0;_"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),IM=!1;if(gl)try{var eg={};Object.defineProperty(eg,"passive",{get:function(){IM=!0}}),window.addEventListener("test",eg,eg),window.removeEventListener("test",eg,eg)}catch{IM=!1}var Uc=null,UM=null,Db=null;function UL(){if(Db)return Db;var f,p=UM,_=p.length,S,k="value"in Uc?Uc.value:Uc.textContent,L=k.length;for(f=0;f<_&&p[f]===k[f];f++);var K=_-f;for(S=1;S<=K&&p[_-S]===k[L-S];S++);return Db=k.slice(f,1=rg),VL=" ",GL=!1;function WL(f,p){switch(f){case"keyup":return Vee.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qL(f){return f=f.detail,typeof f=="object"&&"data"in f?f.data:null}var sh=!1;function Wee(f,p){switch(f){case"compositionend":return qL(p);case"keypress":return p.which!==32?null:(GL=!0,VL);case"textInput":return f=p.data,f===VL&&GL?null:f;default:return null}}function qee(f,p){if(sh)return f==="compositionend"||!$M&&WL(f,p)?(f=UL(),Db=UM=Uc=null,sh=!1,f):null;switch(f){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1=p)return{node:_,offset:p-f};f=S}e:{for(;_;){if(_.nextSibling){_=_.nextSibling;break e}_=_.parentNode}_=void 0}_=tj(_)}}function rj(f,p){return f&&p?f===p?!0:f&&f.nodeType===3?!1:p&&p.nodeType===3?rj(f,p.parentNode):"contains"in f?f.contains(p):f.compareDocumentPosition?!!(f.compareDocumentPosition(p)&16):!1:!1}function ij(f){f=f!=null&&f.ownerDocument!=null&&f.ownerDocument.defaultView!=null?f.ownerDocument.defaultView:window;for(var p=Sr(f.document);p instanceof f.HTMLIFrameElement;){try{var _=typeof p.contentWindow.location.href=="string"}catch{_=!1}if(_)f=p.contentWindow;else break;p=Sr(f.document)}return p}function WM(f){var p=f&&f.nodeName&&f.nodeName.toLowerCase();return p&&(p==="input"&&(f.type==="text"||f.type==="search"||f.type==="tel"||f.type==="url"||f.type==="password")||p==="textarea"||f.contentEditable==="true")}var tte=gl&&"documentMode"in document&&11>=document.documentMode,ah=null,qM=null,og=null,XM=!1;function sj(f,p,_){var S=_.window===_?_.document:_.nodeType===9?_:_.ownerDocument;XM||ah==null||ah!==Sr(S)||(S=ah,"selectionStart"in S&&WM(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),og&&ag(og,S)||(og=S,S=Av(qM,"onSelect"),0>=K,k-=K,jo=1<<32-Be(p)+k|_<tn?(bn=Dt,Dt=null):bn=Dt.sibling;var Mn=We(Le,Dt,He[tn],lt);if(Mn===null){Dt===null&&(Dt=bn);break}f&&Dt&&Mn.alternate===null&&p(Le,Dt),Ne=L(Mn,Ne,tn),wn===null?Ft=Mn:wn.sibling=Mn,wn=Mn,Dt=bn}if(tn===He.length)return _(Le,Dt),yn&&bl(Le,tn),Ft;if(Dt===null){for(;tntn?(bn=Dt,Dt=null):bn=Dt.sibling;var au=We(Le,Dt,Mn.value,lt);if(au===null){Dt===null&&(Dt=bn);break}f&&Dt&&au.alternate===null&&p(Le,Dt),Ne=L(au,Ne,tn),wn===null?Ft=au:wn.sibling=au,wn=au,Dt=bn}if(Mn.done)return _(Le,Dt),yn&&bl(Le,tn),Ft;if(Dt===null){for(;!Mn.done;tn++,Mn=He.next())Mn=dt(Le,Mn.value,lt),Mn!==null&&(Ne=L(Mn,Ne,tn),wn===null?Ft=Mn:wn.sibling=Mn,wn=Mn);return yn&&bl(Le,tn),Ft}for(Dt=S(Dt);!Mn.done;tn++,Mn=He.next())Mn=nt(Dt,Le,tn,Mn.value,lt),Mn!==null&&(f&&Mn.alternate!==null&&Dt.delete(Mn.key===null?tn:Mn.key),Ne=L(Mn,Ne,tn),wn===null?Ft=Mn:wn.sibling=Mn,wn=Mn);return f&&Dt.forEach(function(_ne){return p(Le,_ne)}),yn&&bl(Le,tn),Ft}function Fn(Le,Ne,He,lt){if(typeof He=="object"&&He!==null&&He.type===y&&He.key===null&&(He=He.props.children),typeof He=="object"&&He!==null){switch(He.$$typeof){case m:e:{for(var Ft=He.key;Ne!==null;){if(Ne.key===Ft){if(Ft=He.type,Ft===y){if(Ne.tag===7){_(Le,Ne.sibling),lt=k(Ne,He.props.children),lt.return=Le,Le=lt;break e}}else if(Ne.elementType===Ft||typeof Ft=="object"&&Ft!==null&&Ft.$$typeof===I&&Td(Ft)===Ne.type){_(Le,Ne.sibling),lt=k(Ne,He.props),hg(lt,He),lt.return=Le,Le=lt;break e}_(Le,Ne);break}else p(Le,Ne);Ne=Ne.sibling}He.type===y?(lt=Sd(He.props.children,Le.mode,lt,He.key),lt.return=Le,Le=lt):(lt=$b(He.type,He.key,He.props,null,Le.mode,lt),hg(lt,He),lt.return=Le,Le=lt)}return K(Le);case v:e:{for(Ft=He.key;Ne!==null;){if(Ne.key===Ft)if(Ne.tag===4&&Ne.stateNode.containerInfo===He.containerInfo&&Ne.stateNode.implementation===He.implementation){_(Le,Ne.sibling),lt=k(Ne,He.children||[]),lt.return=Le,Le=lt;break e}else{_(Le,Ne);break}else p(Le,Ne);Ne=Ne.sibling}lt=tE(He,Le.mode,lt),lt.return=Le,Le=lt}return K(Le);case I:return He=Td(He),Fn(Le,Ne,He,lt)}if($(He))return kt(Le,Ne,He,lt);if(j(He)){if(Ft=j(He),typeof Ft!="function")throw Error(r(150));return He=Ft.call(He),Vt(Le,Ne,He,lt)}if(typeof He.then=="function")return Fn(Le,Ne,Yb(He),lt);if(He.$$typeof===w)return Fn(Le,Ne,Wb(Le,He),lt);Zb(Le,He)}return typeof He=="string"&&He!==""||typeof He=="number"||typeof He=="bigint"?(He=""+He,Ne!==null&&Ne.tag===6?(_(Le,Ne.sibling),lt=k(Ne,He),lt.return=Le,Le=lt):(_(Le,Ne),lt=eE(He,Le.mode,lt),lt.return=Le,Le=lt),K(Le)):_(Le,Ne)}return function(Le,Ne,He,lt){try{fg=0;var Ft=Fn(Le,Ne,He,lt);return xh=null,Ft}catch(Dt){if(Dt===gh||Dt===Xb)throw Dt;var wn=Zs(29,Dt,null,Le.mode);return wn.lanes=lt,wn.return=Le,wn}finally{}}}var Nd=Cj(!0),Nj=Cj(!1),$c=!1;function hE(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pE(f,p){f=f.updateQueue,p.updateQueue===f&&(p.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,callbacks:null})}function Vc(f){return{lane:f,tag:0,payload:null,callback:null,next:null}}function Gc(f,p,_){var S=f.updateQueue;if(S===null)return null;if(S=S.shared,(Cn&2)!==0){var k=S.pending;return k===null?p.next=p:(p.next=k.next,k.next=p),S.pending=p,p=Hb(f),fj(f,null,_),p}return Bb(f,S,p,_),Hb(f)}function pg(f,p,_){if(p=p.updateQueue,p!==null&&(p=p.shared,(_&4194048)!==0)){var S=p.lanes;S&=f.pendingLanes,_|=S,p.lanes=_,qn(f,_)}}function mE(f,p){var _=f.updateQueue,S=f.alternate;if(S!==null&&(S=S.updateQueue,_===S)){var k=null,L=null;if(_=_.firstBaseUpdate,_!==null){do{var K={lane:_.lane,tag:_.tag,payload:_.payload,callback:null,next:null};L===null?k=L=K:L=L.next=K,_=_.next}while(_!==null);L===null?k=L=p:L=L.next=p}else k=L=p;_={baseState:S.baseState,firstBaseUpdate:k,lastBaseUpdate:L,shared:S.shared,callbacks:S.callbacks},f.updateQueue=_;return}f=_.lastBaseUpdate,f===null?_.firstBaseUpdate=p:f.next=p,_.lastBaseUpdate=p}var gE=!1;function mg(){if(gE){var f=mh;if(f!==null)throw f}}function gg(f,p,_,S){gE=!1;var k=f.updateQueue;$c=!1;var L=k.firstBaseUpdate,K=k.lastBaseUpdate,le=k.shared.pending;if(le!==null){k.shared.pending=null;var we=le,$e=we.next;we.next=null,K===null?L=$e:K.next=$e,K=we;var st=f.alternate;st!==null&&(st=st.updateQueue,le=st.lastBaseUpdate,le!==K&&(le===null?st.firstBaseUpdate=$e:le.next=$e,st.lastBaseUpdate=we))}if(L!==null){var dt=k.baseState;K=0,st=$e=we=null,le=L;do{var We=le.lane&-536870913,nt=We!==le.lane;if(nt?(xn&We)===We:(S&We)===We){We!==0&&We===ph&&(gE=!0),st!==null&&(st=st.next={lane:0,tag:le.tag,payload:le.payload,callback:null,next:null});e:{var kt=f,Vt=le;We=p;var Fn=_;switch(Vt.tag){case 1:if(kt=Vt.payload,typeof kt=="function"){dt=kt.call(Fn,dt,We);break e}dt=kt;break e;case 3:kt.flags=kt.flags&-65537|128;case 0:if(kt=Vt.payload,We=typeof kt=="function"?kt.call(Fn,dt,We):kt,We==null)break e;dt=h({},dt,We);break e;case 2:$c=!0}}We=le.callback,We!==null&&(f.flags|=64,nt&&(f.flags|=8192),nt=k.callbacks,nt===null?k.callbacks=[We]:nt.push(We))}else nt={lane:We,tag:le.tag,payload:le.payload,callback:le.callback,next:null},st===null?($e=st=nt,we=dt):st=st.next=nt,K|=We;if(le=le.next,le===null){if(le=k.shared.pending,le===null)break;nt=le,le=nt.next,nt.next=null,k.lastBaseUpdate=nt,k.shared.pending=null}}while(!0);st===null&&(we=dt),k.baseState=we,k.firstBaseUpdate=$e,k.lastBaseUpdate=st,L===null&&(k.shared.lanes=0),Yc|=K,f.lanes=K,f.memoizedState=dt}}function kj(f,p){if(typeof f!="function")throw Error(r(191,f));f.call(p)}function Rj(f,p){var _=f.callbacks;if(_!==null)for(f.callbacks=null,f=0;f<_.length;f++)kj(_[f],p)}var bh=B(null),Qb=B(0);function Pj(f,p){f=Nl,ee(Qb,f),ee(bh,p),Nl=f|p.baseLanes}function xE(){ee(Qb,Nl),ee(bh,bh.current)}function bE(){Nl=Qb.current,q(bh),q(Qb)}var Qs=B(null),Ea=null;function Wc(f){var p=f.alternate;ee(Rr,Rr.current&1),ee(Qs,f),Ea===null&&(p===null||bh.current!==null||p.memoizedState!==null)&&(Ea=f)}function vE(f){ee(Rr,Rr.current),ee(Qs,f),Ea===null&&(Ea=f)}function Dj(f){f.tag===22?(ee(Rr,Rr.current),ee(Qs,f),Ea===null&&(Ea=f)):qc()}function qc(){ee(Rr,Rr.current),ee(Qs,Qs.current)}function Js(f){q(Qs),Ea===f&&(Ea=null),q(Rr)}var Rr=B(0);function Jb(f){for(var p=f;p!==null;){if(p.tag===13){var _=p.memoizedState;if(_!==null&&(_=_.dehydrated,_===null||E2(_)||A2(_)))return p}else if(p.tag===19&&(p.memoizedProps.revealOrder==="forwards"||p.memoizedProps.revealOrder==="backwards"||p.memoizedProps.revealOrder==="unstable_legacy-backwards"||p.memoizedProps.revealOrder==="together")){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var _l=0,en=null,In=null,Fr=null,ev=!1,vh=!1,kd=!1,tv=0,xg=0,yh=null,dte=0;function wr(){throw Error(r(321))}function yE(f,p){if(p===null)return!1;for(var _=0;_L?L:8;var K=X.T,le={};X.T=le,LE(f,!1,p,_);try{var we=k(),$e=X.S;if($e!==null&&$e(le,we),we!==null&&typeof we=="object"&&typeof we.then=="function"){var st=ute(we,S);vg(f,p,st,na(f))}else vg(f,p,S,na(f))}catch(dt){vg(f,p,{then:function(){},status:"rejected",reason:dt},na())}finally{V.p=L,K!==null&&le.types!==null&&(K.types=le.types),X.T=K}}function gte(){}function DE(f,p,_,S){if(f.tag!==5)throw Error(r(476));var k=cI(f).queue;lI(f,k,p,Z,_===null?gte:function(){return uI(f),_(S)})}function cI(f){var p=f.memoizedState;if(p!==null)return p;p={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:Z},next:null};var _={};return p.next={memoizedState:_,baseState:_,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:_},next:null},f.memoizedState=p,f=f.alternate,f!==null&&(f.memoizedState=p),p}function uI(f){var p=cI(f);p.next===null&&(p=f.alternate.memoizedState),vg(f,p.next.queue,{},na())}function OE(){return Ui(jg)}function dI(){return Pr().memoizedState}function fI(){return Pr().memoizedState}function xte(f){for(var p=f.return;p!==null;){switch(p.tag){case 24:case 3:var _=na();f=Vc(_);var S=Gc(p,f,_);S!==null&&(Os(S,p,_),pg(S,p,_)),p={cache:cE()},f.payload=p;return}p=p.return}}function bte(f,p,_){var S=na();_={lane:S,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null},ov(f)?pI(p,_):(_=QM(f,p,_,S),_!==null&&(Os(_,f,S),mI(_,p,S)))}function hI(f,p,_){var S=na();vg(f,p,_,S)}function vg(f,p,_,S){var k={lane:S,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null};if(ov(f))pI(p,k);else{var L=f.alternate;if(f.lanes===0&&(L===null||L.lanes===0)&&(L=p.lastRenderedReducer,L!==null))try{var K=p.lastRenderedState,le=L(K,_);if(k.hasEagerState=!0,k.eagerState=le,Ys(le,K))return Bb(f,p,k,0),Xn===null&&zb(),!1}catch{}finally{}if(_=QM(f,p,k,S),_!==null)return Os(_,f,S),mI(_,p,S),!0}return!1}function LE(f,p,_,S){if(S={lane:2,revertLane:h2(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},ov(f)){if(p)throw Error(r(479))}else p=QM(f,_,S,2),p!==null&&Os(p,f,2)}function ov(f){var p=f.alternate;return f===en||p!==null&&p===en}function pI(f,p){vh=ev=!0;var _=f.pending;_===null?p.next=p:(p.next=_.next,_.next=p),f.pending=p}function mI(f,p,_){if((_&4194048)!==0){var S=p.lanes;S&=f.pendingLanes,_|=S,p.lanes=_,qn(f,_)}}var yg={readContext:Ui,use:rv,useCallback:wr,useContext:wr,useEffect:wr,useImperativeHandle:wr,useLayoutEffect:wr,useInsertionEffect:wr,useMemo:wr,useReducer:wr,useRef:wr,useState:wr,useDebugValue:wr,useDeferredValue:wr,useTransition:wr,useSyncExternalStore:wr,useId:wr,useHostTransitionStatus:wr,useFormState:wr,useActionState:wr,useOptimistic:wr,useMemoCache:wr,useCacheRefresh:wr};yg.useEffectEvent=wr;var gI={readContext:Ui,use:rv,useCallback:function(f,p){return ps().memoizedState=[f,p===void 0?null:p],f},useContext:Ui,useEffect:Jj,useImperativeHandle:function(f,p,_){_=_!=null?_.concat([f]):null,sv(4194308,4,rI.bind(null,p,f),_)},useLayoutEffect:function(f,p){return sv(4194308,4,f,p)},useInsertionEffect:function(f,p){sv(4,2,f,p)},useMemo:function(f,p){var _=ps();p=p===void 0?null:p;var S=f();if(kd){Qe(!0);try{f()}finally{Qe(!1)}}return _.memoizedState=[S,p],S},useReducer:function(f,p,_){var S=ps();if(_!==void 0){var k=_(p);if(kd){Qe(!0);try{_(p)}finally{Qe(!1)}}}else k=p;return S.memoizedState=S.baseState=k,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:k},S.queue=f,f=f.dispatch=bte.bind(null,en,f),[S.memoizedState,f]},useRef:function(f){var p=ps();return f={current:f},p.memoizedState=f},useState:function(f){f=CE(f);var p=f.queue,_=hI.bind(null,en,p);return p.dispatch=_,[f.memoizedState,_]},useDebugValue:RE,useDeferredValue:function(f,p){var _=ps();return PE(_,f,p)},useTransition:function(){var f=CE(!1);return f=lI.bind(null,en,f.queue,!0,!1),ps().memoizedState=f,[!1,f]},useSyncExternalStore:function(f,p,_){var S=en,k=ps();if(yn){if(_===void 0)throw Error(r(407));_=_()}else{if(_=p(),Xn===null)throw Error(r(349));(xn&127)!==0||Ij(S,p,_)}k.memoizedState=_;var L={value:_,getSnapshot:p};return k.queue=L,Jj(Fj.bind(null,S,L,f),[f]),S.flags|=2048,_h(9,{destroy:void 0},Uj.bind(null,S,L,_,p),null),_},useId:function(){var f=ps(),p=Xn.identifierPrefix;if(yn){var _=Io,S=jo;_=(S&~(1<<32-Be(S)-1)).toString(32)+_,p="_"+p+"R_"+_,_=tv++,0<_&&(p+="H"+_.toString(32)),p+="_"}else _=dte++,p="_"+p+"r_"+_.toString(32)+"_";return f.memoizedState=p},useHostTransitionStatus:OE,useFormState:Xj,useActionState:Xj,useOptimistic:function(f){var p=ps();p.memoizedState=p.baseState=f;var _={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return p.queue=_,p=LE.bind(null,en,!0,_),_.dispatch=p,[f,p]},useMemoCache:EE,useCacheRefresh:function(){return ps().memoizedState=xte.bind(null,en)},useEffectEvent:function(f){var p=ps(),_={impl:f};return p.memoizedState=_,function(){if((Cn&2)!==0)throw Error(r(440));return _.impl.apply(void 0,arguments)}}},jE={readContext:Ui,use:rv,useCallback:sI,useContext:Ui,useEffect:kE,useImperativeHandle:iI,useInsertionEffect:tI,useLayoutEffect:nI,useMemo:aI,useReducer:iv,useRef:Qj,useState:function(){return iv(Sl)},useDebugValue:RE,useDeferredValue:function(f,p){var _=Pr();return oI(_,In.memoizedState,f,p)},useTransition:function(){var f=iv(Sl)[0],p=Pr().memoizedState;return[typeof f=="boolean"?f:bg(f),p]},useSyncExternalStore:jj,useId:dI,useHostTransitionStatus:OE,useFormState:Kj,useActionState:Kj,useOptimistic:function(f,p){var _=Pr();return Hj(_,In,f,p)},useMemoCache:EE,useCacheRefresh:fI};jE.useEffectEvent=eI;var xI={readContext:Ui,use:rv,useCallback:sI,useContext:Ui,useEffect:kE,useImperativeHandle:iI,useInsertionEffect:tI,useLayoutEffect:nI,useMemo:aI,useReducer:TE,useRef:Qj,useState:function(){return TE(Sl)},useDebugValue:RE,useDeferredValue:function(f,p){var _=Pr();return In===null?PE(_,f,p):oI(_,In.memoizedState,f,p)},useTransition:function(){var f=TE(Sl)[0],p=Pr().memoizedState;return[typeof f=="boolean"?f:bg(f),p]},useSyncExternalStore:jj,useId:dI,useHostTransitionStatus:OE,useFormState:Zj,useActionState:Zj,useOptimistic:function(f,p){var _=Pr();return In!==null?Hj(_,In,f,p):(_.baseState=f,[f,_.queue.dispatch])},useMemoCache:EE,useCacheRefresh:fI};xI.useEffectEvent=eI;function IE(f,p,_,S){p=f.memoizedState,_=_(S,p),_=_==null?p:h({},p,_),f.memoizedState=_,f.lanes===0&&(f.updateQueue.baseState=_)}var UE={enqueueSetState:function(f,p,_){f=f._reactInternals;var S=na(),k=Vc(S);k.payload=p,_!=null&&(k.callback=_),p=Gc(f,k,S),p!==null&&(Os(p,f,S),pg(p,f,S))},enqueueReplaceState:function(f,p,_){f=f._reactInternals;var S=na(),k=Vc(S);k.tag=1,k.payload=p,_!=null&&(k.callback=_),p=Gc(f,k,S),p!==null&&(Os(p,f,S),pg(p,f,S))},enqueueForceUpdate:function(f,p){f=f._reactInternals;var _=na(),S=Vc(_);S.tag=2,p!=null&&(S.callback=p),p=Gc(f,S,_),p!==null&&(Os(p,f,_),pg(p,f,_))}};function bI(f,p,_,S,k,L,K){return f=f.stateNode,typeof f.shouldComponentUpdate=="function"?f.shouldComponentUpdate(S,L,K):p.prototype&&p.prototype.isPureReactComponent?!ag(_,S)||!ag(k,L):!0}function vI(f,p,_,S){f=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(_,S),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(_,S),p.state!==f&&UE.enqueueReplaceState(p,p.state,null)}function Rd(f,p){var _=p;if("ref"in p){_={};for(var S in p)S!=="ref"&&(_[S]=p[S])}if(f=f.defaultProps){_===p&&(_=h({},_));for(var k in f)_[k]===void 0&&(_[k]=f[k])}return _}function yI(f){Fb(f)}function _I(f){console.error(f)}function SI(f){Fb(f)}function lv(f,p){try{var _=f.onUncaughtError;_(p.value,{componentStack:p.stack})}catch(S){setTimeout(function(){throw S})}}function wI(f,p,_){try{var S=f.onCaughtError;S(_.value,{componentStack:_.stack,errorBoundary:p.tag===1?p.stateNode:null})}catch(k){setTimeout(function(){throw k})}}function FE(f,p,_){return _=Vc(_),_.tag=3,_.payload={element:null},_.callback=function(){lv(f,p)},_}function MI(f){return f=Vc(f),f.tag=3,f}function EI(f,p,_,S){var k=_.type.getDerivedStateFromError;if(typeof k=="function"){var L=S.value;f.payload=function(){return k(L)},f.callback=function(){wI(p,_,S)}}var K=_.stateNode;K!==null&&typeof K.componentDidCatch=="function"&&(f.callback=function(){wI(p,_,S),typeof k!="function"&&(Zc===null?Zc=new Set([this]):Zc.add(this));var le=S.stack;this.componentDidCatch(S.value,{componentStack:le!==null?le:""})})}function vte(f,p,_,S,k){if(_.flags|=32768,S!==null&&typeof S=="object"&&typeof S.then=="function"){if(p=_.alternate,p!==null&&hh(p,_,k,!0),_=Qs.current,_!==null){switch(_.tag){case 31:case 13:return Ea===null?yv():_.alternate===null&&Mr===0&&(Mr=3),_.flags&=-257,_.flags|=65536,_.lanes=k,S===Kb?_.flags|=16384:(p=_.updateQueue,p===null?_.updateQueue=new Set([S]):p.add(S),u2(f,S,k)),!1;case 22:return _.flags|=65536,S===Kb?_.flags|=16384:(p=_.updateQueue,p===null?(p={transitions:null,markerInstances:null,retryQueue:new Set([S])},_.updateQueue=p):(_=p.retryQueue,_===null?p.retryQueue=new Set([S]):_.add(S)),u2(f,S,k)),!1}throw Error(r(435,_.tag))}return u2(f,S,k),yv(),!1}if(yn)return p=Qs.current,p!==null?((p.flags&65536)===0&&(p.flags|=256),p.flags|=65536,p.lanes=k,S!==iE&&(f=Error(r(422),{cause:S}),cg(_a(f,_)))):(S!==iE&&(p=Error(r(423),{cause:S}),cg(_a(p,_))),f=f.current.alternate,f.flags|=65536,k&=-k,f.lanes|=k,S=_a(S,_),k=FE(f.stateNode,S,k),mE(f,k),Mr!==4&&(Mr=2)),!1;var L=Error(r(520),{cause:S});if(L=_a(L,_),Cg===null?Cg=[L]:Cg.push(L),Mr!==4&&(Mr=2),p===null)return!0;S=_a(S,_),_=p;do{switch(_.tag){case 3:return _.flags|=65536,f=k&-k,_.lanes|=f,f=FE(_.stateNode,S,f),mE(_,f),!1;case 1:if(p=_.type,L=_.stateNode,(_.flags&128)===0&&(typeof p.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(Zc===null||!Zc.has(L))))return _.flags|=65536,k&=-k,_.lanes|=k,k=MI(k),EI(k,f,_,S),mE(_,k),!1}_=_.return}while(_!==null);return!1}var zE=Error(r(461)),zr=!1;function Fi(f,p,_,S){p.child=f===null?Nj(p,null,_,S):Nd(p,f.child,_,S)}function AI(f,p,_,S,k){_=_.render;var L=p.ref;if("ref"in S){var K={};for(var le in S)le!=="ref"&&(K[le]=S[le])}else K=S;return Ed(p),S=_E(f,p,_,K,L,k),le=SE(),f!==null&&!zr?(wE(f,p,k),wl(f,p,k)):(yn&&le&&nE(p),p.flags|=1,Fi(f,p,S,k),p.child)}function TI(f,p,_,S,k){if(f===null){var L=_.type;return typeof L=="function"&&!JM(L)&&L.defaultProps===void 0&&_.compare===null?(p.tag=15,p.type=L,CI(f,p,L,S,k)):(f=$b(_.type,null,S,p,p.mode,k),f.ref=p.ref,f.return=p,p.child=f)}if(L=f.child,!XE(f,k)){var K=L.memoizedProps;if(_=_.compare,_=_!==null?_:ag,_(K,S)&&f.ref===p.ref)return wl(f,p,k)}return p.flags|=1,f=xl(L,S),f.ref=p.ref,f.return=p,p.child=f}function CI(f,p,_,S,k){if(f!==null){var L=f.memoizedProps;if(ag(L,S)&&f.ref===p.ref)if(zr=!1,p.pendingProps=S=L,XE(f,k))(f.flags&131072)!==0&&(zr=!0);else return p.lanes=f.lanes,wl(f,p,k)}return BE(f,p,_,S,k)}function NI(f,p,_,S){var k=S.children,L=f!==null?f.memoizedState:null;if(f===null&&p.stateNode===null&&(p.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),S.mode==="hidden"){if((p.flags&128)!==0){if(L=L!==null?L.baseLanes|_:_,f!==null){for(S=p.child=f.child,k=0;S!==null;)k=k|S.lanes|S.childLanes,S=S.sibling;S=k&~L}else S=0,p.child=null;return kI(f,p,L,_,S)}if((_&536870912)!==0)p.memoizedState={baseLanes:0,cachePool:null},f!==null&&qb(p,L!==null?L.cachePool:null),L!==null?Pj(p,L):xE(),Dj(p);else return S=p.lanes=536870912,kI(f,p,L!==null?L.baseLanes|_:_,_,S)}else L!==null?(qb(p,L.cachePool),Pj(p,L),qc(),p.memoizedState=null):(f!==null&&qb(p,null),xE(),qc());return Fi(f,p,k,_),p.child}function _g(f,p){return f!==null&&f.tag===22||p.stateNode!==null||(p.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.sibling}function kI(f,p,_,S,k){var L=dE();return L=L===null?null:{parent:Ur._currentValue,pool:L},p.memoizedState={baseLanes:_,cachePool:L},f!==null&&qb(p,null),xE(),Dj(p),f!==null&&hh(f,p,S,!0),p.childLanes=k,null}function cv(f,p){return p=dv({mode:p.mode,children:p.children},f.mode),p.ref=f.ref,f.child=p,p.return=f,p}function RI(f,p,_){return Nd(p,f.child,null,_),f=cv(p,p.pendingProps),f.flags|=2,Js(p),p.memoizedState=null,f}function yte(f,p,_){var S=p.pendingProps,k=(p.flags&128)!==0;if(p.flags&=-129,f===null){if(yn){if(S.mode==="hidden")return f=cv(p,S),p.lanes=536870912,_g(null,f);if(vE(p),(f=nr)?(f=$4(f,Ma),f=f!==null&&f.data==="&"?f:null,f!==null&&(p.memoizedState={dehydrated:f,treeContext:Fc!==null?{id:jo,overflow:Io}:null,retryLane:536870912,hydrationErrors:null},_=pj(f),_.return=p,p.child=_,Ii=p,nr=null)):f=null,f===null)throw Bc(p);return p.lanes=536870912,null}return cv(p,S)}var L=f.memoizedState;if(L!==null){var K=L.dehydrated;if(vE(p),k)if(p.flags&256)p.flags&=-257,p=RI(f,p,_);else if(p.memoizedState!==null)p.child=f.child,p.flags|=128,p=null;else throw Error(r(558));else if(zr||hh(f,p,_,!1),k=(_&f.childLanes)!==0,zr||k){if(S=Xn,S!==null&&(K=bi(S,_),K!==0&&K!==L.retryLane))throw L.retryLane=K,_d(f,K),Os(S,f,K),zE;yv(),p=RI(f,p,_)}else f=L.treeContext,nr=Aa(K.nextSibling),Ii=p,yn=!0,zc=null,Ma=!1,f!==null&&xj(p,f),p=cv(p,S),p.flags|=4096;return p}return f=xl(f.child,{mode:S.mode,children:S.children}),f.ref=p.ref,p.child=f,f.return=p,f}function uv(f,p){var _=p.ref;if(_===null)f!==null&&f.ref!==null&&(p.flags|=4194816);else{if(typeof _!="function"&&typeof _!="object")throw Error(r(284));(f===null||f.ref!==_)&&(p.flags|=4194816)}}function BE(f,p,_,S,k){return Ed(p),_=_E(f,p,_,S,void 0,k),S=SE(),f!==null&&!zr?(wE(f,p,k),wl(f,p,k)):(yn&&S&&nE(p),p.flags|=1,Fi(f,p,_,k),p.child)}function PI(f,p,_,S,k,L){return Ed(p),p.updateQueue=null,_=Lj(p,S,_,k),Oj(f),S=SE(),f!==null&&!zr?(wE(f,p,L),wl(f,p,L)):(yn&&S&&nE(p),p.flags|=1,Fi(f,p,_,L),p.child)}function DI(f,p,_,S,k){if(Ed(p),p.stateNode===null){var L=ch,K=_.contextType;typeof K=="object"&&K!==null&&(L=Ui(K)),L=new _(S,L),p.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,L.updater=UE,p.stateNode=L,L._reactInternals=p,L=p.stateNode,L.props=S,L.state=p.memoizedState,L.refs={},hE(p),K=_.contextType,L.context=typeof K=="object"&&K!==null?Ui(K):ch,L.state=p.memoizedState,K=_.getDerivedStateFromProps,typeof K=="function"&&(IE(p,_,K,S),L.state=p.memoizedState),typeof _.getDerivedStateFromProps=="function"||typeof L.getSnapshotBeforeUpdate=="function"||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(K=L.state,typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount(),K!==L.state&&UE.enqueueReplaceState(L,L.state,null),gg(p,S,L,k),mg(),L.state=p.memoizedState),typeof L.componentDidMount=="function"&&(p.flags|=4194308),S=!0}else if(f===null){L=p.stateNode;var le=p.memoizedProps,we=Rd(_,le);L.props=we;var $e=L.context,st=_.contextType;K=ch,typeof st=="object"&&st!==null&&(K=Ui(st));var dt=_.getDerivedStateFromProps;st=typeof dt=="function"||typeof L.getSnapshotBeforeUpdate=="function",le=p.pendingProps!==le,st||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(le||$e!==K)&&vI(p,L,S,K),$c=!1;var We=p.memoizedState;L.state=We,gg(p,S,L,k),mg(),$e=p.memoizedState,le||We!==$e||$c?(typeof dt=="function"&&(IE(p,_,dt,S),$e=p.memoizedState),(we=$c||bI(p,_,we,S,We,$e,K))?(st||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount()),typeof L.componentDidMount=="function"&&(p.flags|=4194308)):(typeof L.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=S,p.memoizedState=$e),L.props=S,L.state=$e,L.context=K,S=we):(typeof L.componentDidMount=="function"&&(p.flags|=4194308),S=!1)}else{L=p.stateNode,pE(f,p),K=p.memoizedProps,st=Rd(_,K),L.props=st,dt=p.pendingProps,We=L.context,$e=_.contextType,we=ch,typeof $e=="object"&&$e!==null&&(we=Ui($e)),le=_.getDerivedStateFromProps,($e=typeof le=="function"||typeof L.getSnapshotBeforeUpdate=="function")||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(K!==dt||We!==we)&&vI(p,L,S,we),$c=!1,We=p.memoizedState,L.state=We,gg(p,S,L,k),mg();var nt=p.memoizedState;K!==dt||We!==nt||$c||f!==null&&f.dependencies!==null&&Gb(f.dependencies)?(typeof le=="function"&&(IE(p,_,le,S),nt=p.memoizedState),(st=$c||bI(p,_,st,S,We,nt,we)||f!==null&&f.dependencies!==null&&Gb(f.dependencies))?($e||typeof L.UNSAFE_componentWillUpdate!="function"&&typeof L.componentWillUpdate!="function"||(typeof L.componentWillUpdate=="function"&&L.componentWillUpdate(S,nt,we),typeof L.UNSAFE_componentWillUpdate=="function"&&L.UNSAFE_componentWillUpdate(S,nt,we)),typeof L.componentDidUpdate=="function"&&(p.flags|=4),typeof L.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof L.componentDidUpdate!="function"||K===f.memoizedProps&&We===f.memoizedState||(p.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||K===f.memoizedProps&&We===f.memoizedState||(p.flags|=1024),p.memoizedProps=S,p.memoizedState=nt),L.props=S,L.state=nt,L.context=we,S=st):(typeof L.componentDidUpdate!="function"||K===f.memoizedProps&&We===f.memoizedState||(p.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||K===f.memoizedProps&&We===f.memoizedState||(p.flags|=1024),S=!1)}return L=S,uv(f,p),S=(p.flags&128)!==0,L||S?(L=p.stateNode,_=S&&typeof _.getDerivedStateFromError!="function"?null:L.render(),p.flags|=1,f!==null&&S?(p.child=Nd(p,f.child,null,k),p.child=Nd(p,null,_,k)):Fi(f,p,_,k),p.memoizedState=L.state,f=p.child):f=wl(f,p,k),f}function OI(f,p,_,S){return wd(),p.flags|=256,Fi(f,p,_,S),p.child}var HE={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $E(f){return{baseLanes:f,cachePool:wj()}}function VE(f,p,_){return f=f!==null?f.childLanes&~_:0,p&&(f|=ta),f}function LI(f,p,_){var S=p.pendingProps,k=!1,L=(p.flags&128)!==0,K;if((K=L)||(K=f!==null&&f.memoizedState===null?!1:(Rr.current&2)!==0),K&&(k=!0,p.flags&=-129),K=(p.flags&32)!==0,p.flags&=-33,f===null){if(yn){if(k?Wc(p):qc(),(f=nr)?(f=$4(f,Ma),f=f!==null&&f.data!=="&"?f:null,f!==null&&(p.memoizedState={dehydrated:f,treeContext:Fc!==null?{id:jo,overflow:Io}:null,retryLane:536870912,hydrationErrors:null},_=pj(f),_.return=p,p.child=_,Ii=p,nr=null)):f=null,f===null)throw Bc(p);return A2(f)?p.lanes=32:p.lanes=536870912,null}var le=S.children;return S=S.fallback,k?(qc(),k=p.mode,le=dv({mode:"hidden",children:le},k),S=Sd(S,k,_,null),le.return=p,S.return=p,le.sibling=S,p.child=le,S=p.child,S.memoizedState=$E(_),S.childLanes=VE(f,K,_),p.memoizedState=HE,_g(null,S)):(Wc(p),GE(p,le))}var we=f.memoizedState;if(we!==null&&(le=we.dehydrated,le!==null)){if(L)p.flags&256?(Wc(p),p.flags&=-257,p=WE(f,p,_)):p.memoizedState!==null?(qc(),p.child=f.child,p.flags|=128,p=null):(qc(),le=S.fallback,k=p.mode,S=dv({mode:"visible",children:S.children},k),le=Sd(le,k,_,null),le.flags|=2,S.return=p,le.return=p,S.sibling=le,p.child=S,Nd(p,f.child,null,_),S=p.child,S.memoizedState=$E(_),S.childLanes=VE(f,K,_),p.memoizedState=HE,p=_g(null,S));else if(Wc(p),A2(le)){if(K=le.nextSibling&&le.nextSibling.dataset,K)var $e=K.dgst;K=$e,S=Error(r(419)),S.stack="",S.digest=K,cg({value:S,source:null,stack:null}),p=WE(f,p,_)}else if(zr||hh(f,p,_,!1),K=(_&f.childLanes)!==0,zr||K){if(K=Xn,K!==null&&(S=bi(K,_),S!==0&&S!==we.retryLane))throw we.retryLane=S,_d(f,S),Os(K,f,S),zE;E2(le)||yv(),p=WE(f,p,_)}else E2(le)?(p.flags|=192,p.child=f.child,p=null):(f=we.treeContext,nr=Aa(le.nextSibling),Ii=p,yn=!0,zc=null,Ma=!1,f!==null&&xj(p,f),p=GE(p,S.children),p.flags|=4096);return p}return k?(qc(),le=S.fallback,k=p.mode,we=f.child,$e=we.sibling,S=xl(we,{mode:"hidden",children:S.children}),S.subtreeFlags=we.subtreeFlags&65011712,$e!==null?le=xl($e,le):(le=Sd(le,k,_,null),le.flags|=2),le.return=p,S.return=p,S.sibling=le,p.child=S,_g(null,S),S=p.child,le=f.child.memoizedState,le===null?le=$E(_):(k=le.cachePool,k!==null?(we=Ur._currentValue,k=k.parent!==we?{parent:we,pool:we}:k):k=wj(),le={baseLanes:le.baseLanes|_,cachePool:k}),S.memoizedState=le,S.childLanes=VE(f,K,_),p.memoizedState=HE,_g(f.child,S)):(Wc(p),_=f.child,f=_.sibling,_=xl(_,{mode:"visible",children:S.children}),_.return=p,_.sibling=null,f!==null&&(K=p.deletions,K===null?(p.deletions=[f],p.flags|=16):K.push(f)),p.child=_,p.memoizedState=null,_)}function GE(f,p){return p=dv({mode:"visible",children:p},f.mode),p.return=f,f.child=p}function dv(f,p){return f=Zs(22,f,null,p),f.lanes=0,f}function WE(f,p,_){return Nd(p,f.child,null,_),f=GE(p,p.pendingProps.children),f.flags|=2,p.memoizedState=null,f}function jI(f,p,_){f.lanes|=p;var S=f.alternate;S!==null&&(S.lanes|=p),oE(f.return,p,_)}function qE(f,p,_,S,k,L){var K=f.memoizedState;K===null?f.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:S,tail:_,tailMode:k,treeForkCount:L}:(K.isBackwards=p,K.rendering=null,K.renderingStartTime=0,K.last=S,K.tail=_,K.tailMode=k,K.treeForkCount=L)}function II(f,p,_){var S=p.pendingProps,k=S.revealOrder,L=S.tail;S=S.children;var K=Rr.current,le=(K&2)!==0;if(le?(K=K&1|2,p.flags|=128):K&=1,ee(Rr,K),Fi(f,p,S,_),S=yn?lg:0,!le&&f!==null&&(f.flags&128)!==0)e:for(f=p.child;f!==null;){if(f.tag===13)f.memoizedState!==null&&jI(f,_,p);else if(f.tag===19)jI(f,_,p);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===p)break e;for(;f.sibling===null;){if(f.return===null||f.return===p)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}switch(k){case"forwards":for(_=p.child,k=null;_!==null;)f=_.alternate,f!==null&&Jb(f)===null&&(k=_),_=_.sibling;_=k,_===null?(k=p.child,p.child=null):(k=_.sibling,_.sibling=null),qE(p,!1,k,_,L,S);break;case"backwards":case"unstable_legacy-backwards":for(_=null,k=p.child,p.child=null;k!==null;){if(f=k.alternate,f!==null&&Jb(f)===null){p.child=k;break}f=k.sibling,k.sibling=_,_=k,k=f}qE(p,!0,_,null,L,S);break;case"together":qE(p,!1,null,null,void 0,S);break;default:p.memoizedState=null}return p.child}function wl(f,p,_){if(f!==null&&(p.dependencies=f.dependencies),Yc|=p.lanes,(_&p.childLanes)===0)if(f!==null){if(hh(f,p,_,!1),(_&p.childLanes)===0)return null}else return null;if(f!==null&&p.child!==f.child)throw Error(r(153));if(p.child!==null){for(f=p.child,_=xl(f,f.pendingProps),p.child=_,_.return=p;f.sibling!==null;)f=f.sibling,_=_.sibling=xl(f,f.pendingProps),_.return=p;_.sibling=null}return p.child}function XE(f,p){return(f.lanes&p)!==0?!0:(f=f.dependencies,!!(f!==null&&Gb(f)))}function _te(f,p,_){switch(p.tag){case 3:Ce(p,p.stateNode.containerInfo),Hc(p,Ur,f.memoizedState.cache),wd();break;case 27:case 5:_e(p);break;case 4:Ce(p,p.stateNode.containerInfo);break;case 10:Hc(p,p.type,p.memoizedProps.value);break;case 31:if(p.memoizedState!==null)return p.flags|=128,vE(p),null;break;case 13:var S=p.memoizedState;if(S!==null)return S.dehydrated!==null?(Wc(p),p.flags|=128,null):(_&p.child.childLanes)!==0?LI(f,p,_):(Wc(p),f=wl(f,p,_),f!==null?f.sibling:null);Wc(p);break;case 19:var k=(f.flags&128)!==0;if(S=(_&p.childLanes)!==0,S||(hh(f,p,_,!1),S=(_&p.childLanes)!==0),k){if(S)return II(f,p,_);p.flags|=128}if(k=p.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),ee(Rr,Rr.current),S)break;return null;case 22:return p.lanes=0,NI(f,p,_,p.pendingProps);case 24:Hc(p,Ur,f.memoizedState.cache)}return wl(f,p,_)}function UI(f,p,_){if(f!==null)if(f.memoizedProps!==p.pendingProps)zr=!0;else{if(!XE(f,_)&&(p.flags&128)===0)return zr=!1,_te(f,p,_);zr=(f.flags&131072)!==0}else zr=!1,yn&&(p.flags&1048576)!==0&&gj(p,lg,p.index);switch(p.lanes=0,p.tag){case 16:e:{var S=p.pendingProps;if(f=Td(p.elementType),p.type=f,typeof f=="function")JM(f)?(S=Rd(f,S),p.tag=1,p=DI(null,p,f,S,_)):(p.tag=0,p=BE(null,p,f,S,_));else{if(f!=null){var k=f.$$typeof;if(k===A){p.tag=11,p=AI(null,p,f,S,_);break e}else if(k===C){p.tag=14,p=TI(null,p,f,S,_);break e}}throw p=D(f)||f,Error(r(306,p,""))}}return p;case 0:return BE(f,p,p.type,p.pendingProps,_);case 1:return S=p.type,k=Rd(S,p.pendingProps),DI(f,p,S,k,_);case 3:e:{if(Ce(p,p.stateNode.containerInfo),f===null)throw Error(r(387));S=p.pendingProps;var L=p.memoizedState;k=L.element,pE(f,p),gg(p,S,null,_);var K=p.memoizedState;if(S=K.cache,Hc(p,Ur,S),S!==L.cache&&lE(p,[Ur],_,!0),mg(),S=K.element,L.isDehydrated)if(L={element:S,isDehydrated:!1,cache:K.cache},p.updateQueue.baseState=L,p.memoizedState=L,p.flags&256){p=OI(f,p,S,_);break e}else if(S!==k){k=_a(Error(r(424)),p),cg(k),p=OI(f,p,S,_);break e}else{switch(f=p.stateNode.containerInfo,f.nodeType){case 9:f=f.body;break;default:f=f.nodeName==="HTML"?f.ownerDocument.body:f}for(nr=Aa(f.firstChild),Ii=p,yn=!0,zc=null,Ma=!0,_=Nj(p,null,S,_),p.child=_;_;)_.flags=_.flags&-3|4096,_=_.sibling}else{if(wd(),S===k){p=wl(f,p,_);break e}Fi(f,p,S,_)}p=p.child}return p;case 26:return uv(f,p),f===null?(_=K4(p.type,null,p.pendingProps,null))?p.memoizedState=_:yn||(_=p.type,f=p.pendingProps,S=Tv(ie.current).createElement(_),S[mr]=p,S[Nr]=f,zi(S,_,f),Re(S),p.stateNode=S):p.memoizedState=K4(p.type,f.memoizedProps,p.pendingProps,f.memoizedState),null;case 27:return _e(p),f===null&&yn&&(S=p.stateNode=W4(p.type,p.pendingProps,ie.current),Ii=p,Ma=!0,k=nr,tu(p.type)?(T2=k,nr=Aa(S.firstChild)):nr=k),Fi(f,p,p.pendingProps.children,_),uv(f,p),f===null&&(p.flags|=4194304),p.child;case 5:return f===null&&yn&&((k=S=nr)&&(S=Zte(S,p.type,p.pendingProps,Ma),S!==null?(p.stateNode=S,Ii=p,nr=Aa(S.firstChild),Ma=!1,k=!0):k=!1),k||Bc(p)),_e(p),k=p.type,L=p.pendingProps,K=f!==null?f.memoizedProps:null,S=L.children,S2(k,L)?S=null:K!==null&&S2(k,K)&&(p.flags|=32),p.memoizedState!==null&&(k=_E(f,p,fte,null,null,_),jg._currentValue=k),uv(f,p),Fi(f,p,S,_),p.child;case 6:return f===null&&yn&&((f=_=nr)&&(_=Qte(_,p.pendingProps,Ma),_!==null?(p.stateNode=_,Ii=p,nr=null,f=!0):f=!1),f||Bc(p)),null;case 13:return LI(f,p,_);case 4:return Ce(p,p.stateNode.containerInfo),S=p.pendingProps,f===null?p.child=Nd(p,null,S,_):Fi(f,p,S,_),p.child;case 11:return AI(f,p,p.type,p.pendingProps,_);case 7:return Fi(f,p,p.pendingProps,_),p.child;case 8:return Fi(f,p,p.pendingProps.children,_),p.child;case 12:return Fi(f,p,p.pendingProps.children,_),p.child;case 10:return S=p.pendingProps,Hc(p,p.type,S.value),Fi(f,p,S.children,_),p.child;case 9:return k=p.type._context,S=p.pendingProps.children,Ed(p),k=Ui(k),S=S(k),p.flags|=1,Fi(f,p,S,_),p.child;case 14:return TI(f,p,p.type,p.pendingProps,_);case 15:return CI(f,p,p.type,p.pendingProps,_);case 19:return II(f,p,_);case 31:return yte(f,p,_);case 22:return NI(f,p,_,p.pendingProps);case 24:return Ed(p),S=Ui(Ur),f===null?(k=dE(),k===null&&(k=Xn,L=cE(),k.pooledCache=L,L.refCount++,L!==null&&(k.pooledCacheLanes|=_),k=L),p.memoizedState={parent:S,cache:k},hE(p),Hc(p,Ur,k)):((f.lanes&_)!==0&&(pE(f,p),gg(p,null,null,_),mg()),k=f.memoizedState,L=p.memoizedState,k.parent!==S?(k={parent:S,cache:S},p.memoizedState=k,p.lanes===0&&(p.memoizedState=p.updateQueue.baseState=k),Hc(p,Ur,S)):(S=L.cache,Hc(p,Ur,S),S!==k.cache&&lE(p,[Ur],_,!0))),Fi(f,p,p.pendingProps.children,_),p.child;case 29:throw p.pendingProps}throw Error(r(156,p.tag))}function Ml(f){f.flags|=4}function KE(f,p,_,S,k){if((p=(f.mode&32)!==0)&&(p=!1),p){if(f.flags|=16777216,(k&335544128)===k)if(f.stateNode.complete)f.flags|=8192;else if(d4())f.flags|=8192;else throw Cd=Kb,fE}else f.flags&=-16777217}function FI(f,p){if(p.type!=="stylesheet"||(p.state.loading&4)!==0)f.flags&=-16777217;else if(f.flags|=16777216,!eU(p))if(d4())f.flags|=8192;else throw Cd=Kb,fE}function fv(f,p){p!==null&&(f.flags|=4),f.flags&16384&&(p=f.tag!==22?yt():536870912,f.lanes|=p,Eh|=p)}function Sg(f,p){if(!yn)switch(f.tailMode){case"hidden":p=f.tail;for(var _=null;p!==null;)p.alternate!==null&&(_=p),p=p.sibling;_===null?f.tail=null:_.sibling=null;break;case"collapsed":_=f.tail;for(var S=null;_!==null;)_.alternate!==null&&(S=_),_=_.sibling;S===null?p||f.tail===null?f.tail=null:f.tail.sibling=null:S.sibling=null}}function rr(f){var p=f.alternate!==null&&f.alternate.child===f.child,_=0,S=0;if(p)for(var k=f.child;k!==null;)_|=k.lanes|k.childLanes,S|=k.subtreeFlags&65011712,S|=k.flags&65011712,k.return=f,k=k.sibling;else for(k=f.child;k!==null;)_|=k.lanes|k.childLanes,S|=k.subtreeFlags,S|=k.flags,k.return=f,k=k.sibling;return f.subtreeFlags|=S,f.childLanes=_,p}function Ste(f,p,_){var S=p.pendingProps;switch(rE(p),p.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rr(p),null;case 1:return rr(p),null;case 3:return _=p.stateNode,S=null,f!==null&&(S=f.memoizedState.cache),p.memoizedState.cache!==S&&(p.flags|=2048),yl(Ur),fe(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),(f===null||f.child===null)&&(fh(p)?Ml(p):f===null||f.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,sE())),rr(p),null;case 26:var k=p.type,L=p.memoizedState;return f===null?(Ml(p),L!==null?(rr(p),FI(p,L)):(rr(p),KE(p,k,null,S,_))):L?L!==f.memoizedState?(Ml(p),rr(p),FI(p,L)):(rr(p),p.flags&=-16777217):(f=f.memoizedProps,f!==S&&Ml(p),rr(p),KE(p,k,f,S,_)),null;case 27:if(Oe(p),_=ie.current,k=p.type,f!==null&&p.stateNode!=null)f.memoizedProps!==S&&Ml(p);else{if(!S){if(p.stateNode===null)throw Error(r(166));return rr(p),null}f=ae.current,fh(p)?bj(p):(f=W4(k,S,_),p.stateNode=f,Ml(p))}return rr(p),null;case 5:if(Oe(p),k=p.type,f!==null&&p.stateNode!=null)f.memoizedProps!==S&&Ml(p);else{if(!S){if(p.stateNode===null)throw Error(r(166));return rr(p),null}if(L=ae.current,fh(p))bj(p);else{var K=Tv(ie.current);switch(L){case 1:L=K.createElementNS("http://www.w3.org/2000/svg",k);break;case 2:L=K.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;default:switch(k){case"svg":L=K.createElementNS("http://www.w3.org/2000/svg",k);break;case"math":L=K.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;case"script":L=K.createElement("div"),L.innerHTML=" +