From b6af768482f3fbbb12ba5ba0c91af08ea31fe00e Mon Sep 17 00:00:00 2001 From: Martin Ziegler Date: Wed, 3 Dec 2025 13:44:03 +0100 Subject: [PATCH] Wiring up calibration modal --- backend/app/api/routes/printers.py | 63 ++ backend/app/schemas/printer.py | 4 + backend/app/services/bambu_mqtt.py | 236 ++++- frontend/src/api/client.ts | 33 + .../src/components/control/BedControls.tsx | 5 +- .../components/control/CalibrationModal.tsx | 424 +++++++++ .../components/control/ExtruderControls.tsx | 17 +- frontend/src/components/control/JogPad.tsx | 5 +- .../components/control/TemperatureColumn.tsx | 5 +- frontend/src/pages/ControlPage.tsx | 26 +- .../{index-DKrE4YAX.js => index-C4OBhD7e.js} | 812 +++++++++--------- static/assets/index-OlFdoeRK.css | 1 + static/assets/index-OvloHYxf.css | 1 - static/index.html | 4 +- 14 files changed, 1208 insertions(+), 428 deletions(-) create mode 100644 frontend/src/components/control/CalibrationModal.tsx rename static/assets/{index-DKrE4YAX.js => index-C4OBhD7e.js} (62%) create mode 100644 static/assets/index-OlFdoeRK.css delete mode 100644 static/assets/index-OvloHYxf.css diff --git a/backend/app/api/routes/printers.py b/backend/app/api/routes/printers.py index 31a87444f..c14d370c5 100644 --- a/backend/app/api/routes/printers.py +++ b/backend/app/api/routes/printers.py @@ -25,6 +25,7 @@ from backend.app.schemas.printer import ( PrintOptionsResponse, ) from backend.app.services.printer_manager import printer_manager +from backend.app.services.bambu_mqtt import get_stage_name from backend.app.services.bambu_ftp import ( download_file_try_paths_async, list_files_async, @@ -237,6 +238,9 @@ async def get_printer_status(printer_id: int, db: AsyncSession = Depends(get_db) ipcam=state.ipcam, nozzles=nozzles, print_options=print_options, + stg_cur=state.stg_cur, + stg_cur_name=get_stage_name(state.stg_cur) if state.stg_cur >= 0 else None, + stg=state.stg, ) @@ -634,3 +638,62 @@ async def set_print_option( "print_halt": print_halt, "sensitivity": sensitivity, } + + +# ============================================ +# Calibration +# ============================================ + +@router.post("/{printer_id}/calibration") +async def start_calibration( + printer_id: int, + bed_leveling: bool = False, + vibration: bool = False, + motor_noise: bool = False, + nozzle_offset: bool = False, + high_temp_heatbed: bool = False, + db: AsyncSession = Depends(get_db), +): + """Start printer calibration with selected options. + + At least one option must be selected. + + Options: + - bed_leveling: Run bed leveling calibration + - vibration: Run vibration compensation calibration + - motor_noise: Run motor noise cancellation calibration + - nozzle_offset: Run nozzle offset calibration (dual nozzle printers) + - high_temp_heatbed: Run high-temperature heatbed calibration + """ + result = await db.execute(select(Printer).where(Printer.id == printer_id)) + printer = result.scalar_one_or_none() + if not printer: + raise HTTPException(404, "Printer not found") + + client = printer_manager.get_client(printer_id) + if not client or not client.state.connected: + raise HTTPException(400, "Printer not connected") + + # Check that at least one option is selected + if not any([bed_leveling, vibration, motor_noise, nozzle_offset, high_temp_heatbed]): + raise HTTPException(400, "At least one calibration option must be selected") + + success = client.start_calibration( + bed_leveling=bed_leveling, + vibration=vibration, + motor_noise=motor_noise, + nozzle_offset=nozzle_offset, + high_temp_heatbed=high_temp_heatbed, + ) + + if not success: + raise HTTPException(500, "Failed to send calibration command to printer") + + return { + "success": True, + "bed_leveling": bed_leveling, + "vibration": vibration, + "motor_noise": motor_noise, + "nozzle_offset": nozzle_offset, + "high_temp_heatbed": high_temp_heatbed, + } diff --git a/backend/app/schemas/printer.py b/backend/app/schemas/printer.py index 61af3b024..b0f4a74a8 100644 --- a/backend/app/schemas/printer.py +++ b/backend/app/schemas/printer.py @@ -108,3 +108,7 @@ class PrinterStatus(BaseModel): ipcam: bool = False # Live view enabled nozzles: list[NozzleInfoResponse] = [] # Nozzle hardware info (index 0=left/primary, 1=right) print_options: PrintOptionsResponse | None = None # AI detection and print options + # Calibration stage tracking + stg_cur: int = -1 # Current stage number (-1 = not calibrating) + stg_cur_name: str | None = None # Human-readable current stage name + stg: list[int] = [] # List of stage numbers in calibration sequence diff --git a/backend/app/services/bambu_mqtt.py b/backend/app/services/bambu_mqtt.py index b18b50b8d..bd5e5170d 100644 --- a/backend/app/services/bambu_mqtt.py +++ b/backend/app/services/bambu_mqtt.py @@ -100,6 +100,86 @@ class PrinterState: nozzles: list = field(default_factory=lambda: [NozzleInfo(), NozzleInfo()]) # AI detection and print options print_options: PrintOptions = field(default_factory=PrintOptions) + # Calibration stage tracking (from stg_cur and stg fields) + stg_cur: int = -1 # Current stage index (-1 = not calibrating) + stg: list = field(default_factory=list) # List of stages to execute + + +# Stage name mapping from BambuStudio DeviceManager.cpp +STAGE_NAMES = { + 0: "Printing", + 1: "Auto bed leveling", + 2: "Heatbed preheating", + 3: "Vibration compensation", + 4: "Changing filament", + 5: "M400 pause", + 6: "Paused (filament ran out)", + 7: "Heating nozzle", + 8: "Calibrating dynamic flow", + 9: "Scanning bed surface", + 10: "Inspecting first layer", + 11: "Identifying build plate type", + 12: "Calibrating Micro Lidar", + 13: "Homing toolhead", + 14: "Cleaning nozzle tip", + 15: "Checking extruder temperature", + 16: "Paused by the user", + 17: "Pause (front cover fall off)", + 18: "Calibrating the micro lidar", + 19: "Calibrating flow ratio", + 20: "Pause (nozzle temperature malfunction)", + 21: "Pause (heatbed temperature malfunction)", + 22: "Filament unloading", + 23: "Pause (step loss)", + 24: "Filament loading", + 25: "Motor noise cancellation", + 26: "Pause (AMS offline)", + 27: "Pause (low speed of the heatbreak fan)", + 28: "Pause (chamber temperature control problem)", + 29: "Cooling chamber", + 30: "Pause (Gcode inserted by user)", + 31: "Motor noise showoff", + 32: "Pause (nozzle clumping)", + 33: "Pause (cutter error)", + 34: "Pause (first layer error)", + 35: "Pause (nozzle clog)", + 36: "Measuring motion precision", + 37: "Enhancing motion precision", + 38: "Measure motion accuracy", + 39: "Nozzle offset calibration", + 40: "High temperature auto bed leveling", + 41: "Auto Check: Quick Release Lever", + 42: "Auto Check: Door and Upper Cover", + 43: "Laser Calibration", + 44: "Auto Check: Platform", + 45: "Confirming BirdsEye Camera location", + 46: "Calibrating BirdsEye Camera", + 47: "Auto bed leveling - phase 1", + 48: "Auto bed leveling - phase 2", + 49: "Heating chamber", + 50: "Cooling heatbed", + 51: "Printing calibration lines", + 52: "Auto Check: Material", + 53: "Live View Camera Calibration", + 54: "Waiting for heatbed temperature", + 55: "Auto Check: Material Position", + 56: "Cutting Module Offset Calibration", + 57: "Measuring Surface", + 58: "Thermal Preconditioning", + 59: "Homing Blade Holder", + 60: "Calibrating Camera Offset", + 61: "Calibrating Blade Holder Position", + 62: "Hotend Pick and Place Test", + 63: "Waiting for Chamber temperature", + 64: "Preparing Hotend", + 65: "Calibrating nozzle clumping detection", + 66: "Purifying the chamber air", +} + + +def get_stage_name(stage: int) -> str: + """Get human-readable stage name from stage number.""" + return STAGE_NAMES.get(stage, f"Unknown stage ({stage})") class BambuMQTTClient: @@ -533,12 +613,27 @@ class BambuMQTTClient: if "total_layer_num" in data: self.state.total_layers = int(data["total_layer_num"]) + # Calibration stage tracking + if "stg_cur" in data: + new_stg = data["stg_cur"] + if new_stg != self.state.stg_cur: + logger.info( + f"[{self.serial_number}] Calibration stage changed: " + f"{self.state.stg_cur} -> {new_stg} ({get_stage_name(new_stg)})" + ) + self.state.stg_cur = new_stg + if "stg" in data: + self.state.stg = data["stg"] if isinstance(data["stg"], list) else [] + # Temperature data temps = {} - # Log all temperature-related fields for debugging (only when we have temp data) - temp_fields = {k: v for k, v in data.items() if 'temp' in k.lower() or 'nozzle' in k.lower()} - if temp_fields and not hasattr(self, '_temp_fields_logged'): - logger.info(f"[{self.serial_number}] Temperature fields in MQTT data: {temp_fields}") + # Log all fields for debugging dual-nozzle temperature discovery (only once) + if "bed_temper" in data and not hasattr(self, '_temp_fields_logged'): + temp_fields = {k: v for k, v in data.items() if 'temp' in k.lower() or 'chamber' in k.lower()} + logger.info(f"[{self.serial_number}] Temperature-related fields: {temp_fields}") + # Log ALL keys in print data for H2D temperature discovery + all_keys = sorted(data.keys()) + logger.info(f"[{self.serial_number}] ALL print data keys ({len(all_keys)}): {all_keys}") self._temp_fields_logged = True # Log nozzle hardware info fields (once) @@ -571,8 +666,57 @@ class BambuMQTTClient: temps["nozzle_target"] = float(data["left_nozzle_target_temper"]) if "chamber_temper" in data: temps["chamber"] = float(data["chamber_temper"]) + # H2D series: Chamber temp is in info.temp (directly in °C) + try: + if "info" in data and isinstance(data["info"], dict): + info_temp = data["info"].get("temp") + if info_temp is not None and "chamber" not in temps: + temps["chamber"] = float(info_temp) + # H2D series: Dual extruder temps are in device.extruder.info array + # Temperature values are encoded as fixed-point (value / 65536 = °C) + if "device" in data and isinstance(data["device"], dict): + device = data["device"] + # Parse dual extruder temperatures + extruder_data = device.get("extruder", {}) + extruder_info = extruder_data.get("info", []) + if isinstance(extruder_info, list) and len(extruder_info) >= 1: + # Log extruder info structure for debugging (once) + if not getattr(self, '_extruder_info_logged', False): + logger.debug(f"[{self.serial_number}] H2D extruder info[0]: {extruder_info[0]}") + if len(extruder_info) >= 2: + logger.debug(f"[{self.serial_number}] H2D extruder info[1]: {extruder_info[1]}") + self._extruder_info_logged = True + # Left nozzle (extruder 0) - temp is already in Celsius + if "nozzle" not in temps and "temp" in extruder_info[0]: + temp_val = extruder_info[0]["temp"] + if -50 < temp_val < 500: # Valid temp range + temps["nozzle"] = float(temp_val) + # Left nozzle target temp - star field, but 65535/65279 means "not set" + if "nozzle_target" not in temps: + star = extruder_info[0].get("star") + if star is not None and 0 <= star < 500: # Valid temp range + temps["nozzle_target"] = float(star) + # Right nozzle (extruder 1) - only for dual nozzle printers + if len(extruder_info) >= 2 and "temp" in extruder_info[1]: + temp_val = extruder_info[1]["temp"] + if -50 < temp_val < 500: # Valid temp range + temps["nozzle_2"] = float(temp_val) + # Right nozzle target temp - star field, but 65535/65279 means "not set" + if len(extruder_info) >= 2: + star = extruder_info[1].get("star") + if star is not None and 0 <= star < 500: # Valid temp range + temps["nozzle_2_target"] = float(star) + # Parse chamber temp from device.ctc.info.temp if not already set + ctc_data = device.get("ctc", {}) + ctc_info = ctc_data.get("info", {}) + if "temp" in ctc_info and "chamber" not in temps: + temps["chamber"] = float(ctc_info["temp"]) + except Exception as e: + logger.warning(f"[{self.serial_number}] Error parsing H2D temperatures: {e}") if temps: - self.state.temperatures = temps + # Merge new temps into existing, preserving valid values when new ones are filtered out + for key, value in temps.items(): + self.state.temperatures[key] = value # Parse HMS (Health Management System) errors if "hms" in data: @@ -655,6 +799,20 @@ class BambuMQTTClient: if "nozzle_diameter_2" in data: self.state.nozzles[1].nozzle_diameter = str(data["nozzle_diameter_2"]) + # H2D series: Nozzle hardware info is in device.nozzle.info array + if "device" in data and isinstance(data["device"], dict): + device = data["device"] + nozzle_data = device.get("nozzle", {}) + nozzle_info = nozzle_data.get("info", []) + if isinstance(nozzle_info, list): + for nozzle in nozzle_info: + idx = nozzle.get("id", 0) + if idx < len(self.state.nozzles): + if "type" in nozzle and nozzle["type"]: + self.state.nozzles[idx].nozzle_type = str(nozzle["type"]) + if "diameter" in nozzle: + self.state.nozzles[idx].nozzle_diameter = str(nozzle["diameter"]) + # Preserve AMS and vt_tray data when updating raw_data ams_data = self.state.raw_data.get("ams") vt_tray_data = self.state.raw_data.get("vt_tray") @@ -1029,6 +1187,74 @@ class BambuMQTTClient: return True + def start_calibration( + self, + bed_leveling: bool = False, + vibration: bool = False, + motor_noise: bool = False, + nozzle_offset: bool = False, + high_temp_heatbed: bool = False, + ) -> bool: + """Start printer calibration with selected options. + + Args: + bed_leveling: Run bed leveling calibration + vibration: Run vibration compensation calibration + motor_noise: Run motor noise cancellation calibration + nozzle_offset: Run nozzle offset calibration (dual nozzle printers) + high_temp_heatbed: Run high-temperature heatbed calibration + + Returns: + True if command was sent, False if not connected + """ + if not self._client or not self.state.connected: + return False + + # Build calibration bitmask based on OrcaSlicer DeviceManager.cpp + # Bit 0: xcam_cali (not exposed in UI) + # Bit 1: bed_leveling + # Bit 2: vibration + # Bit 3: motor_noise + # Bit 4: nozzle_cali + # Bit 5: bed_cali (high-temp heatbed) + # Bit 6: clumppos_cali (not exposed in UI) + option = 0 + if bed_leveling: + option |= 1 << 1 + if vibration: + option |= 1 << 2 + if motor_noise: + option |= 1 << 3 + if nozzle_offset: + option |= 1 << 4 + if high_temp_heatbed: + option |= 1 << 5 + + if option == 0: + logger.warning(f"[{self.serial_number}] No calibration options selected") + return False + + self._sequence_id += 1 + + command = { + "print": { + "command": "calibration", + "sequence_id": str(self._sequence_id), + "option": option, + } + } + + command_json = json.dumps(command) + self._client.publish(self.topic_publish, command_json, qos=1) + logger.info( + f"[{self.serial_number}] Starting calibration: " + f"bed_leveling={bed_leveling}, vibration={vibration}, " + f"motor_noise={motor_noise}, nozzle_offset={nozzle_offset}, " + f"high_temp_heatbed={high_temp_heatbed} (option={option})" + ) + + return True + def disconnect(self): """Disconnect from the printer.""" if self._client: diff --git a/frontend/src/api/client.ts b/frontend/src/api/client.ts index 772ae1c83..b93601a2a 100644 --- a/frontend/src/api/client.ts +++ b/frontend/src/api/client.ts @@ -111,6 +111,10 @@ export interface PrinterStatus { ipcam: boolean; // Live view enabled nozzles: NozzleInfo[]; // Nozzle hardware info (index 0=left/primary, 1=right) print_options: PrintOptions | null; // AI detection and print options + // Calibration stage tracking + stg_cur: number; // Current stage number (-1 = not calibrating) + stg_cur_name: string | null; // Human-readable current stage name + stg: number[]; // List of stage numbers in calibration sequence } export interface PrinterCreate { @@ -1235,4 +1239,33 @@ export const api = { method: 'POST', }); }, + + // Calibration + startCalibration: ( + printerId: number, + options: { + bed_leveling?: boolean; + vibration?: boolean; + motor_noise?: boolean; + nozzle_offset?: boolean; + high_temp_heatbed?: boolean; + } + ) => { + const params = new URLSearchParams(); + if (options.bed_leveling) params.append('bed_leveling', 'true'); + if (options.vibration) params.append('vibration', 'true'); + if (options.motor_noise) params.append('motor_noise', 'true'); + if (options.nozzle_offset) params.append('nozzle_offset', 'true'); + if (options.high_temp_heatbed) params.append('high_temp_heatbed', 'true'); + return request<{ + success: boolean; + bed_leveling: boolean; + vibration: boolean; + motor_noise: boolean; + nozzle_offset: boolean; + high_temp_heatbed: boolean; + }>(`/printers/${printerId}/calibration?${params}`, { + method: 'POST', + }); + }, }; diff --git a/frontend/src/components/control/BedControls.tsx b/frontend/src/components/control/BedControls.tsx index e2a215b2a..9f30da4e7 100644 --- a/frontend/src/components/control/BedControls.tsx +++ b/frontend/src/components/control/BedControls.tsx @@ -7,10 +7,11 @@ import { ConfirmModal } from '../ConfirmModal'; interface BedControlsProps { printerId: number; status: PrinterStatus | null | undefined; + disabled?: boolean; } -export function BedControls({ printerId, status }: BedControlsProps) { - const isConnected = status?.connected ?? false; +export function BedControls({ printerId, status, disabled = false }: BedControlsProps) { + const isConnected = (status?.connected ?? false) && !disabled; const [confirmModal, setConfirmModal] = useState<{ token: string; diff --git a/frontend/src/components/control/CalibrationModal.tsx b/frontend/src/components/control/CalibrationModal.tsx new file mode 100644 index 000000000..86f8e9f06 --- /dev/null +++ b/frontend/src/components/control/CalibrationModal.tsx @@ -0,0 +1,424 @@ +import { useEffect, useState } from 'react'; +import { useMutation } from '@tanstack/react-query'; +import { api } from '../../api/client'; +import type { Printer, PrinterStatus } from '../../api/client'; +import { X, Loader2, AlertTriangle, Check } from 'lucide-react'; +import { Card, CardContent } from '../Card'; + +interface CalibrationModalProps { + printer: Printer; + status: PrinterStatus | null | undefined; + onClose: () => void; +} + +// Calibration stages that indicate active calibration +const CALIBRATION_STAGES = new Set([1, 3, 13, 25, 39, 40, 47, 48, 50]); + +// Checkbox component matching Bambu Studio style +function Checkbox({ + checked, + onChange, + disabled, +}: { + checked: boolean; + onChange: (checked: boolean) => void; + disabled?: boolean; +}) { + return ( + + ); +} + +// Timeline step component - matches Bambu Studio style +function TimelineStep({ + step, + name, + isActive, + isComplete, + isLast, +}: { + step: number; + name: string; + isActive: boolean; + isComplete: boolean; + isLast: boolean; +}) { + return ( +
+ {/* Circle and line container */} +
+ {/* Number circle */} +
+ {step} +
+ {/* Vertical connecting line */} + {!isLast && ( +
+ )} +
+ {/* Step name */} + + {name} + +
+ ); +} + +export function CalibrationModal({ printer, status, onClose }: CalibrationModalProps) { + const isConnected = status?.connected ?? false; + const isDualNozzle = printer.nozzle_count === 2; + const currentStage = status?.stg_cur ?? -1; + + // Track if we've started calibration (to switch to progress view) + const [calibrationStarted, setCalibrationStarted] = useState(false); + // Track if we've seen the printer actually enter calibration mode + const [seenCalibrating, setSeenCalibrating] = useState(false); + // Track if calibration has completed + const [calibrationCompleted, setCalibrationCompleted] = useState(false); + + // Calibration options state - restore from localStorage if calibration is in progress + const storageKey = `calibration_options_${printer.id}`; + const savedOptions = typeof window !== 'undefined' ? localStorage.getItem(storageKey) : null; + const parsedOptions = savedOptions ? JSON.parse(savedOptions) : null; + + const [bedLeveling, setBedLeveling] = useState(parsedOptions?.bedLeveling ?? true); + const [vibration, setVibration] = useState(parsedOptions?.vibration ?? true); + const [motorNoise, setMotorNoise] = useState(parsedOptions?.motorNoise ?? true); + const [nozzleOffset, setNozzleOffset] = useState(parsedOptions?.nozzleOffset ?? isDualNozzle); + const [highTempHeatbed, setHighTempHeatbed] = useState(parsedOptions?.highTempHeatbed ?? false); + // Track if we've initialized based on calibration state + const [initialized, setInitialized] = useState(false); + + // Detect if printer is currently calibrating + // Check both stg_cur being a calibration stage AND state being RUNNING + // (printer may keep stg_cur at last calibration stage after completion) + const printerState = status?.state; + const isCalibrating = CALIBRATION_STAGES.has(currentStage) && printerState === 'RUNNING'; + + // If calibration is already in progress when modal opens, set tracking state + // Checkbox values are preserved from localStorage + useEffect(() => { + if (!initialized && isCalibrating) { + setSeenCalibrating(true); + setCalibrationStarted(true); + setInitialized(true); + } else if (!initialized && !isCalibrating) { + setInitialized(true); + } + }, [initialized, isCalibrating]); + + // Track when printer actually enters calibration mode + useEffect(() => { + if (isCalibrating && !seenCalibrating) { + setSeenCalibrating(true); + setCalibrationCompleted(false); + } + }, [isCalibrating, seenCalibrating]); + + // Auto-detect if calibration was started externally (e.g., from touchscreen) + useEffect(() => { + if (isCalibrating && !calibrationStarted) { + setCalibrationStarted(true); + } + }, [isCalibrating, calibrationStarted]); + + // Detect when calibration completes: + // - Must have seen calibration actually running (seenCalibrating is true) + // - Now isCalibrating is false (stg_cur left calibration stages OR state is no longer RUNNING) + useEffect(() => { + if (seenCalibrating && !isCalibrating && !calibrationCompleted) { + setCalibrationCompleted(true); + } + }, [seenCalibrating, isCalibrating, calibrationCompleted]); + + // Reset function to allow starting a new calibration + const resetCalibration = () => { + localStorage.removeItem(storageKey); + setCalibrationStarted(false); + setSeenCalibrating(false); + setCalibrationCompleted(false); + // Reset to defaults + setBedLeveling(true); + setVibration(true); + setMotorNoise(true); + setNozzleOffset(isDualNozzle); + setHighTempHeatbed(false); + }; + + // Close on Escape key + useEffect(() => { + const handleKeyDown = (e: KeyboardEvent) => { + if (e.key === 'Escape') onClose(); + }; + window.addEventListener('keydown', handleKeyDown); + return () => window.removeEventListener('keydown', handleKeyDown); + }, [onClose]); + + // Start calibration mutation + const calibrationMutation = useMutation({ + mutationFn: () => + api.startCalibration(printer.id, { + bed_leveling: bedLeveling, + vibration: vibration, + motor_noise: motorNoise, + nozzle_offset: nozzleOffset, + high_temp_heatbed: highTempHeatbed, + }), + onSuccess: () => { + // Save selected options to localStorage so they persist across modal close/open + localStorage.setItem(storageKey, JSON.stringify({ + bedLeveling, vibration, motorNoise, nozzleOffset, highTempHeatbed + })); + setCalibrationStarted(true); + }, + }); + + const hasSelection = bedLeveling || vibration || motorNoise || nozzleOffset || highTempHeatbed; + const canStart = isConnected && hasSelection && !calibrationMutation.isPending && !isCalibrating && !calibrationCompleted; + + // Build expected calibration flow based on selections + // These are in the typical order the printer performs them + const expectedFlow: { name: string; stages: number[] }[] = []; + expectedFlow.push({ name: 'Homing toolhead', stages: [13] }); + if (bedLeveling || highTempHeatbed) { + expectedFlow.push({ name: 'Cooling heatbed', stages: [50] }); + } + if (bedLeveling) { + expectedFlow.push({ name: 'Auto bed leveling - phase 1', stages: [1, 47] }); + } + if (motorNoise) { + expectedFlow.push({ name: 'Motor noise cancellation', stages: [25] }); + } + if (vibration) { + expectedFlow.push({ name: 'Vibration compensation', stages: [3] }); + } + if (bedLeveling) { + expectedFlow.push({ name: 'Auto bed leveling - phase 2', stages: [48] }); + } + if (isDualNozzle && nozzleOffset) { + expectedFlow.push({ name: 'Nozzle offset calibration', stages: [39] }); + } + if (highTempHeatbed) { + expectedFlow.push({ name: 'High-temp heatbed calibration', stages: [40] }); + } + + // Find current step index + const currentStepIndex = expectedFlow.findIndex((step) => + step.stages.includes(currentStage) + ); + + return ( +
+ e.stopPropagation()}> + + {/* Header */} +
+ Calibration + +
+ + {/* Content */} +
+ {!isConnected && ( +
+ + Printer not connected. Calibration cannot be started. +
+ )} + +
+ {/* Left column - Calibration step selection */} +
+

Calibration step selection

+
+ {/* Bed leveling */} +
+ + Bed leveling +
+ + {/* Vibration compensation */} +
+ + Vibration compensation +
+ + {/* Motor noise cancellation */} +
+ + Motor noise cancellation +
+ + {/* Nozzle offset calibration - only for dual nozzle printers */} + {isDualNozzle && ( +
+ + Nozzle offset calibration +
+ )} + + {/* High-temperature Heatbed Calibration */} +
+ + High-temperature Heatbed Calibration +
+
+ + {/* Calibration program description */} +
+

Calibration program

+

+ The calibration program detects the status of your device automatically to minimize deviation. + It keeps the device performing optimally. +

+
+
+ + {/* Right column - Calibration Flow & Start button */} +
+

+ Calibration Flow +

+ + {/* Timeline progress indicator */} +
+ {hasSelection ? ( +
+ {expectedFlow.map((step, index) => { + const isActive = calibrationStarted && !calibrationCompleted && step.stages.includes(currentStage); + const isComplete = calibrationCompleted || (calibrationStarted && currentStepIndex > index); + return ( + + ); + })} + {/* Show current stage name if it's not in expected flow */} + {currentStage >= 0 && currentStepIndex === -1 && status?.stg_cur_name && ( +
+ Current: {status.stg_cur_name} +
+ )} +
+ ) : ( +
+ Select calibration steps +
+ )} +
+ + {/* Start/Calibrating/Completed button */} + {calibrationCompleted ? ( +
+ + +
+ ) : ( + + )} + + {calibrationMutation.isError && ( +
+ {calibrationMutation.error?.message || 'Failed to start calibration'} +
+ )} +
+
+
+
+
+
+ ); +} diff --git a/frontend/src/components/control/ExtruderControls.tsx b/frontend/src/components/control/ExtruderControls.tsx index 3e5e51ea5..69146ec88 100644 --- a/frontend/src/components/control/ExtruderControls.tsx +++ b/frontend/src/components/control/ExtruderControls.tsx @@ -9,10 +9,11 @@ interface ExtruderControlsProps { printerId: number; status: PrinterStatus | null | undefined; nozzleCount: number; + disabled?: boolean; } -export function ExtruderControls({ printerId, status, nozzleCount }: ExtruderControlsProps) { - const isConnected = status?.connected ?? false; +export function ExtruderControls({ printerId, status, nozzleCount, disabled = false }: ExtruderControlsProps) { + const isConnected = (status?.connected ?? false) && !disabled; const isPrinting = status?.state === 'RUNNING' || status?.state === 'PAUSE'; const isDualNozzle = nozzleCount > 1; @@ -60,23 +61,25 @@ export function ExtruderControls({ printerId, status, nozzleCount }: ExtruderCon
{/* Left/Right Toggle - only for dual nozzle */} {isDualNozzle && ( -
+
-
@@ -212,6 +223,7 @@ export function ControlPage() { printerId={selectedPrinter.id} status={selectedStatus} nozzleCount={selectedPrinter.nozzle_count} + disabled={isCalibrating} /> {/* Movement Column */} @@ -221,10 +233,12 @@ export function ControlPage() {
@@ -233,6 +247,7 @@ export function ControlPage() { printerId={selectedPrinter.id} status={selectedStatus} nozzleCount={selectedPrinter.nozzle_count} + disabled={isCalibrating} />
@@ -275,6 +290,15 @@ export function ControlPage() { onClose={() => setShowPrintOptions(false)} /> )} + + {/* Calibration Modal */} + {showCalibration && selectedPrinter && ( + setShowCalibration(false)} + /> + )} ); } diff --git a/static/assets/index-DKrE4YAX.js b/static/assets/index-C4OBhD7e.js similarity index 62% rename from static/assets/index-DKrE4YAX.js rename to static/assets/index-C4OBhD7e.js index 44b730e0c..7c0e2f519 100644 --- a/static/assets/index-DKrE4YAX.js +++ b/static/assets/index-C4OBhD7e.js @@ -1,18 +1,18 @@ -function Vte(t,e){for(var n=0;ni[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();var wy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ys(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xA={exports:{}},Mg={};var UU;function $te(){if(UU)return Mg;UU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,a){var s=null;if(a!==void 0&&(s=""+a),r.key!==void 0&&(s=""+r.key),"key"in r){a={};for(var o in r)o!=="key"&&(a[o]=r[o])}else a=r;return r=a.ref,{$$typeof:t,type:i,key:s,ref:r!==void 0?r:null,props:a}}return Mg.Fragment=e,Mg.jsx=n,Mg.jsxs=n,Mg}var FU;function Gte(){return FU||(FU=1,xA.exports=$te()),xA.exports}var p=Gte(),vA={exports:{}},Kt={};var zU;function Wte(){if(zU)return Kt;zU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),m=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function x(B,X,ae){this.props=B,this.context=X,this.refs=v,this.updater=ae||y}x.prototype.isReactComponent={},x.prototype.setState=function(B,X){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,X,"setState")},x.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function M(){}M.prototype=x.prototype;function w(B,X,ae){this.props=B,this.context=X,this.refs=v,this.updater=ae||y}var E=w.prototype=new M;E.constructor=w,_(E,x.prototype),E.isPureReactComponent=!0;var T=Array.isArray;function P(){}var N={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function C(B,X,ae){var ce=ae.ref;return{$$typeof:t,type:B,key:X,ref:ce!==void 0?ce:null,props:ae}}function k(B,X){return C(B.type,X,B.props)}function F(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function I(B){var X={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(ae){return X[ae]})}var q=/\/+/g;function L(B,X){return typeof B=="object"&&B!==null&&B.key!=null?I(""+B.key):X.toString(36)}function H(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(P,P):(B.status="pending",B.then(function(X){B.status==="pending"&&(B.status="fulfilled",B.value=X)},function(X){B.status==="pending"&&(B.status="rejected",B.reason=X)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function V(B,X,ae,ce,xe){var ie=typeof B;(ie==="undefined"||ie==="boolean")&&(B=null);var ve=!1;if(B===null)ve=!0;else switch(ie){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(B.$$typeof){case t:case e:ve=!0;break;case u:return ve=B._init,V(ve(B._payload),X,ae,ce,xe)}}if(ve)return xe=xe(B),ve=ce===""?"."+L(B,0):ce,T(xe)?(ae="",ve!=null&&(ae=ve.replace(q,"$&/")+"/"),V(xe,X,ae,"",function(we){return we})):xe!=null&&(F(xe)&&(xe=k(xe,ae+(xe.key==null||B&&B.key===xe.key?"":(""+xe.key).replace(q,"$&/")+"/")+ve)),X.push(xe)),1;ve=0;var Pe=ce===""?".":ce+":";if(T(B))for(var pe=0;pe>>1,se=V[Z];if(0>>1;Zr(ae,K))cer(xe,ae)?(V[Z]=xe,V[ce]=K,Z=ce):(V[Z]=ae,V[X]=K,Z=X);else if(cer(xe,K))V[Z]=xe,V[ce]=K,Z=ce;else break e}}return G}function r(V,G){var K=V.sortIndex-G.sortIndex;return K!==0?K:V.id-G.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();t.unstable_now=function(){return s.now()-o}}var l=[],c=[],u=1,f=null,m=3,g=!1,y=!1,_=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function E(V){for(var G=n(c);G!==null;){if(G.callback===null)i(c);else if(G.startTime<=V)i(c),G.sortIndex=G.expirationTime,e(l,G);else break;G=n(c)}}function T(V){if(_=!1,E(V),!y)if(n(l)!==null)y=!0,P||(P=!0,I());else{var G=n(c);G!==null&&H(T,G.startTime-V)}}var P=!1,N=-1,j=5,C=-1;function k(){return v?!0:!(t.unstable_now()-CV&&k());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,m=f.priorityLevel;var se=Z(f.expirationTime<=V);if(V=t.unstable_now(),typeof se=="function"){f.callback=se,E(V),G=!0;break t}f===n(l)&&i(l),E(V)}else i(l);f=n(l)}if(f!==null)G=!0;else{var B=n(c);B!==null&&H(T,B.startTime-V),G=!1}}break e}finally{f=null,m=K,g=!1}G=void 0}}finally{G?I():P=!1}}}var I;if(typeof w=="function")I=function(){w(F)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,L=q.port2;q.port1.onmessage=F,I=function(){L.postMessage(null)}}else I=function(){x(F,0)};function H(V,G){N=x(function(){V(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_forceFrameRate=function(V){0>V||125Z?(V.sortIndex=K,e(c,V),n(l)===null&&V===n(c)&&(_?(M(N),N=-1):_=!0,H(T,K-Z))):(V.sortIndex=se,e(l,V),y||g||(y=!0,P||(P=!0,I()))),V},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(V){var G=m;return function(){var K=m;m=G;try{return V.apply(this,arguments)}finally{m=K}}}})(_A)),_A}var VU;function Kte(){return VU||(VU=1,bA.exports=Xte()),bA.exports}var SA={exports:{}},qr={};var $U;function Yte(){if($U)return qr;$U=1;var t=dm();function e(l){var c="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),SA.exports=Yte(),SA.exports}var WU;function Zte(){if(WU)return Eg;WU=1;var t=Kte(),e=dm(),n=rG();function i(d){var h="https://react.dev/errors/"+d;if(1se||(d.current=Z[se],Z[se]=null,se--)}function ae(d,h){se++,Z[se]=d.current,d.current=h}var ce=B(null),xe=B(null),ie=B(null),ve=B(null);function Pe(d,h){switch(ae(ie,h),ae(xe,d),ae(ce,null),h.nodeType){case 9:case 11:d=(d=h.documentElement)&&(d=d.namespaceURI)?oU(d):0;break;default:if(d=h.tagName,h=h.namespaceURI)h=oU(h),d=lU(h,d);else switch(d){case"svg":d=1;break;case"math":d=2;break;default:d=0}}X(ce),ae(ce,d)}function pe(){X(ce),X(xe),X(ie)}function we(d){d.memoizedState!==null&&ae(ve,d);var h=ce.current,b=lU(h,d.type);h!==b&&(ae(xe,d),ae(ce,b))}function ze(d){xe.current===d&&(X(ce),X(xe)),ve.current===d&&(X(ve),bg._currentValue=K)}var ue,ht;function z(d){if(ue===void 0)try{throw Error()}catch(b){var h=b.stack.trim().match(/\n( *(at )?)/);ue=h&&h[1]||"",ht=-1)":-1i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();var Mb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ys(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vA={exports:{}},Eg={};var FU;function Gte(){if(FU)return Eg;FU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,a){var s=null;if(a!==void 0&&(s=""+a),r.key!==void 0&&(s=""+r.key),"key"in r){a={};for(var o in r)o!=="key"&&(a[o]=r[o])}else a=r;return r=a.ref,{$$typeof:t,type:i,key:s,ref:r!==void 0?r:null,props:a}}return Eg.Fragment=e,Eg.jsx=n,Eg.jsxs=n,Eg}var zU;function Wte(){return zU||(zU=1,vA.exports=Gte()),vA.exports}var p=Wte(),bA={exports:{}},Yt={};var BU;function qte(){if(BU)return Yt;BU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),m=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function x(B,X,ae){this.props=B,this.context=X,this.refs=v,this.updater=ae||b}x.prototype.isReactComponent={},x.prototype.setState=function(B,X){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,X,"setState")},x.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function M(){}M.prototype=x.prototype;function w(B,X,ae){this.props=B,this.context=X,this.refs=v,this.updater=ae||b}var E=w.prototype=new M;E.constructor=w,y(E,x.prototype),E.isPureReactComponent=!0;var T=Array.isArray;function R(){}var N={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function C(B,X,ae){var ce=ae.ref;return{$$typeof:t,type:B,key:X,ref:ce!==void 0?ce:null,props:ae}}function k(B,X){return C(B.type,X,B.props)}function F(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function I(B){var X={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(ae){return X[ae]})}var q=/\/+/g;function O(B,X){return typeof B=="object"&&B!==null&&B.key!=null?I(""+B.key):X.toString(36)}function H(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(R,R):(B.status="pending",B.then(function(X){B.status==="pending"&&(B.status="fulfilled",B.value=X)},function(X){B.status==="pending"&&(B.status="rejected",B.reason=X)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function V(B,X,ae,ce,xe){var ie=typeof B;(ie==="undefined"||ie==="boolean")&&(B=null);var ve=!1;if(B===null)ve=!0;else switch(ie){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(B.$$typeof){case t:case e:ve=!0;break;case u:return ve=B._init,V(ve(B._payload),X,ae,ce,xe)}}if(ve)return xe=xe(B),ve=ce===""?"."+O(B,0):ce,T(xe)?(ae="",ve!=null&&(ae=ve.replace(q,"$&/")+"/"),V(xe,X,ae,"",function(we){return we})):xe!=null&&(F(xe)&&(xe=k(xe,ae+(xe.key==null||B&&B.key===xe.key?"":(""+xe.key).replace(q,"$&/")+"/")+ve)),X.push(xe)),1;ve=0;var Pe=ce===""?".":ce+":";if(T(B))for(var pe=0;pe>>1,se=V[Y];if(0>>1;Yr(ae,K))cer(xe,ae)?(V[Y]=xe,V[ce]=K,Y=ce):(V[Y]=ae,V[X]=K,Y=X);else if(cer(xe,K))V[Y]=xe,V[ce]=K,Y=ce;else break e}}return $}function r(V,$){var K=V.sortIndex-$.sortIndex;return K!==0?K:V.id-$.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();t.unstable_now=function(){return s.now()-o}}var l=[],c=[],u=1,f=null,m=3,g=!1,b=!1,y=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function E(V){for(var $=n(c);$!==null;){if($.callback===null)i(c);else if($.startTime<=V)i(c),$.sortIndex=$.expirationTime,e(l,$);else break;$=n(c)}}function T(V){if(y=!1,E(V),!b)if(n(l)!==null)b=!0,R||(R=!0,I());else{var $=n(c);$!==null&&H(T,$.startTime-V)}}var R=!1,N=-1,j=5,C=-1;function k(){return v?!0:!(t.unstable_now()-CV&&k());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,m=f.priorityLevel;var se=Y(f.expirationTime<=V);if(V=t.unstable_now(),typeof se=="function"){f.callback=se,E(V),$=!0;break t}f===n(l)&&i(l),E(V)}else i(l);f=n(l)}if(f!==null)$=!0;else{var B=n(c);B!==null&&H(T,B.startTime-V),$=!1}}break e}finally{f=null,m=K,g=!1}$=void 0}}finally{$?I():R=!1}}}var I;if(typeof w=="function")I=function(){w(F)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,O=q.port2;q.port1.onmessage=F,I=function(){O.postMessage(null)}}else I=function(){x(F,0)};function H(V,$){N=x(function(){V(t.unstable_now())},$)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_forceFrameRate=function(V){0>V||125Y?(V.sortIndex=K,e(c,V),n(l)===null&&V===n(c)&&(y?(M(N),N=-1):y=!0,H(T,K-Y))):(V.sortIndex=se,e(l,V),b||g||(b=!0,R||(R=!0,I()))),V},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(V){var $=m;return function(){var K=m;m=$;try{return V.apply(this,arguments)}finally{m=K}}}})(SA)),SA}var $U;function Yte(){return $U||($U=1,_A.exports=Kte()),_A.exports}var wA={exports:{}},qr={};var GU;function Zte(){if(GU)return qr;GU=1;var t=fm();function e(l){var c="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),wA.exports=Zte(),wA.exports}var qU;function Qte(){if(qU)return Ag;qU=1;var t=Yte(),e=fm(),n=aG();function i(d){var h="https://react.dev/errors/"+d;if(1se||(d.current=Y[se],Y[se]=null,se--)}function ae(d,h){se++,Y[se]=d.current,d.current=h}var ce=B(null),xe=B(null),ie=B(null),ve=B(null);function Pe(d,h){switch(ae(ie,h),ae(xe,d),ae(ce,null),h.nodeType){case 9:case 11:d=(d=h.documentElement)&&(d=d.namespaceURI)?lU(d):0;break;default:if(d=h.tagName,h=h.namespaceURI)h=lU(h),d=cU(h,d);else switch(d){case"svg":d=1;break;case"math":d=2;break;default:d=0}}X(ce),ae(ce,d)}function pe(){X(ce),X(xe),X(ie)}function we(d){d.memoizedState!==null&&ae(ve,d);var h=ce.current,_=cU(h,d.type);h!==_&&(ae(xe,d),ae(ce,_))}function ze(d){xe.current===d&&(X(ce),X(xe)),ve.current===d&&(X(ve),_g._currentValue=K)}var ue,ht;function z(d){if(ue===void 0)try{throw Error()}catch(_){var h=_.stack.trim().match(/\n( *(at )?)/);ue=h&&h[1]||"",ht=-1<_.stack.indexOf(` + at`)?" ()":-1<_.stack.indexOf("@")?"@unknown:0:0":""}return` +`+ue+d+ht}var W=!1;function re(d,h){if(!d||W)return"";W=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(h){var st=function(){throw Error()};if(Object.defineProperty(st.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(st,[])}catch(Ye){var Ve=Ye}Reflect.construct(d,[],st)}else{try{st.call()}catch(Ye){Ve=Ye}d.call(st.prototype)}}else{try{throw Error()}catch(Ye){Ve=Ye}(st=d())&&typeof st.catch=="function"&&st.catch(function(){})}}catch(Ye){if(Ye&&Ve&&typeof Ye.stack=="string")return[Ye.stack,Ve.stack]}return[null,null]}};S.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var P=Object.getOwnPropertyDescriptor(S.DetermineComponentFrameRoot,"name");P&&P.configurable&&Object.defineProperty(S.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var D=S.DetermineComponentFrameRoot(),G=D[0],ne=D[1];if(G&&ne){var _e=G.split(` `),Fe=ne.split(` -`);for(R=S=0;S<_e.length&&!_e[S].includes("DetermineComponentFrameRoot");)S++;for(;RR||_e[S]!==Fe[R]){var Je=` -`+_e[S].replace(" at new "," at ");return d.displayName&&Je.includes("")&&(Je=Je.replace("",d.displayName)),Je}while(1<=S&&0<=R);break}}}finally{W=!1,Error.prepareStackTrace=b}return(b=d?d.displayName||d.name:"")?z(b):""}function J(d,h){switch(d.tag){case 26:case 27:case 5:return z(d.type);case 16:return z("Lazy");case 13:return d.child!==h&&h!==null?z("Suspense Fallback"):z("Suspense");case 19:return z("SuspenseList");case 0:case 15:return re(d.type,!1);case 11:return re(d.type.render,!1);case 1:return re(d.type,!0);case 31:return z("Activity");default:return""}}function ee(d){try{var h="",b=null;do h+=J(d,b),b=d,d=d.return;while(d);return h}catch(S){return` +`);for(P=S=0;S<_e.length&&!_e[S].includes("DetermineComponentFrameRoot");)S++;for(;PP||_e[S]!==Fe[P]){var Je=` +`+_e[S].replace(" at new "," at ");return d.displayName&&Je.includes("")&&(Je=Je.replace("",d.displayName)),Je}while(1<=S&&0<=P);break}}}finally{W=!1,Error.prepareStackTrace=_}return(_=d?d.displayName||d.name:"")?z(_):""}function J(d,h){switch(d.tag){case 26:case 27:case 5:return z(d.type);case 16:return z("Lazy");case 13:return d.child!==h&&h!==null?z("Suspense Fallback"):z("Suspense");case 19:return z("SuspenseList");case 0:case 15:return re(d.type,!1);case 11:return re(d.type.render,!1);case 1:return re(d.type,!0);case 31:return z("Activity");default:return""}}function ee(d){try{var h="",_=null;do h+=J(d,_),_=d,d=d.return;while(d);return h}catch(S){return` Error generating stack: `+S.message+` -`+S.stack}}var oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,te=t.unstable_shouldYield,U=t.unstable_requestPaint,O=t.unstable_now,Y=t.unstable_getCurrentPriorityLevel,me=t.unstable_ImmediatePriority,ye=t.unstable_UserBlockingPriority,he=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Xe=t.log,at=t.unstable_setDisableYieldValue,Ie=null,Re=null;function pt(d){if(typeof Xe=="function"&&at(d),Re&&typeof Re.setStrictMode=="function")try{Re.setStrictMode(Ie,d)}catch{}}var tt=Math.clz32?Math.clz32:de,et=Math.log,ut=Math.LN2;function de(d){return d>>>=0,d===0?32:31-(et(d)/ut|0)|0}var nt=256,fe=262144,Oe=4194304;function Me(d){var h=d&42;if(h!==0)return h;switch(d&-d){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 d&261888;case 262144:case 524288:case 1048576:case 2097152:return d&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return d&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return d}}function ge(d,h,b){var S=d.pendingLanes;if(S===0)return 0;var R=0,D=d.suspendedLanes,$=d.pingedLanes;d=d.warmLanes;var ne=S&134217727;return ne!==0?(S=ne&~D,S!==0?R=Me(S):($&=ne,$!==0?R=Me($):b||(b=ne&~d,b!==0&&(R=Me(b))))):(ne=S&~D,ne!==0?R=Me(ne):$!==0?R=Me($):b||(b=S&~d,b!==0&&(R=Me(b)))),R===0?0:h!==0&&h!==R&&(h&D)===0&&(D=R&-R,b=h&-h,D>=b||D===32&&(b&4194048)!==0)?h:R}function Be(d,h){return(d.pendingLanes&~(d.suspendedLanes&~d.pingedLanes)&h)===0}function ct(d,h){switch(d){case 1:case 2:case 4:case 8:case 64:return h+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 h+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 bt(){var d=Oe;return Oe<<=1,(Oe&62914560)===0&&(Oe=4194304),d}function Rt(d){for(var h=[],b=0;31>b;b++)h.push(d);return h}function ln(d,h){d.pendingLanes|=h,h!==268435456&&(d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0)}function Dt(d,h,b,S,R,D){var $=d.pendingLanes;d.pendingLanes=b,d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0,d.expiredLanes&=b,d.entangledLanes&=b,d.errorRecoveryDisabledLanes&=b,d.shellSuspendCounter=0;var ne=d.entanglements,_e=d.expirationTimes,Fe=d.hiddenUpdates;for(b=$&~b;0"u")return null;try{return d.activeElement||d.body}catch{return d.body}}var Ti=/[\n"\\]/g;function Nn(d){return d.replace(Ti,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Js(d,h,b,S,R,D,$,ne){d.name="",$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?d.type=$:d.removeAttribute("type"),h!=null?$==="number"?(h===0&&d.value===""||d.value!=h)&&(d.value=""+un(h)):d.value!==""+un(h)&&(d.value=""+un(h)):$!=="submit"&&$!=="reset"||d.removeAttribute("value"),h!=null?gr(d,$,un(h)):b!=null?gr(d,$,un(b)):S!=null&&d.removeAttribute("value"),R==null&&D!=null&&(d.defaultChecked=!!D),R!=null&&(d.checked=R&&typeof R!="function"&&typeof R!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?d.name=""+un(ne):d.removeAttribute("name")}function Pn(d,h,b,S,R,D,$,ne){if(D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(d.type=D),h!=null||b!=null){if(!(D!=="submit"&&D!=="reset"||h!=null)){Xt(d);return}b=b!=null?""+un(b):"",h=h!=null?""+un(h):b,ne||h===d.value||(d.value=h),d.defaultValue=h}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,d.checked=ne?d.checked:!!S,d.defaultChecked=!!S,$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(d.name=$),Xt(d)}function gr(d,h,b){h==="number"&&yi(d.ownerDocument)===d||d.defaultValue===""+b||(d.defaultValue=""+b)}function Qi(d,h,b,S){if(d=d.options,h){h={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xM=!1;if(ul)try{var Um={};Object.defineProperty(Um,"passive",{get:function(){xM=!0}}),window.addEventListener("test",Um,Um),window.removeEventListener("test",Um,Um)}catch{xM=!1}var Dc=null,vM=null,mv=null;function lL(){if(mv)return mv;var d,h=vM,b=h.length,S,R="value"in Dc?Dc.value:Dc.textContent,D=R.length;for(d=0;d=Bm),pL=" ",mL=!1;function gL(d,h){switch(d){case"keyup":return dee.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xL(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var Kf=!1;function hee(d,h){switch(d){case"compositionend":return xL(h);case"keypress":return h.which!==32?null:(mL=!0,pL);case"textInput":return d=h.data,d===pL&&mL?null:d;default:return null}}function pee(d,h){if(Kf)return d==="compositionend"||!wM&&gL(d,h)?(d=lL(),mv=vM=Dc=null,Kf=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1=h)return{node:b,offset:h-d};d=S}e:{for(;b;){if(b.nextSibling){b=b.nextSibling;break e}b=b.parentNode}b=void 0}b=EL(b)}}function TL(d,h){return d&&h?d===h?!0:d&&d.nodeType===3?!1:h&&h.nodeType===3?TL(d,h.parentNode):"contains"in d?d.contains(h):d.compareDocumentPosition?!!(d.compareDocumentPosition(h)&16):!1:!1}function CL(d){d=d!=null&&d.ownerDocument!=null&&d.ownerDocument.defaultView!=null?d.ownerDocument.defaultView:window;for(var h=yi(d.document);h instanceof d.HTMLIFrameElement;){try{var b=typeof h.contentWindow.location.href=="string"}catch{b=!1}if(b)d=h.contentWindow;else break;h=yi(d.document)}return h}function AM(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h&&(h==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||h==="textarea"||d.contentEditable==="true")}var See=ul&&"documentMode"in document&&11>=document.documentMode,Yf=null,TM=null,Gm=null,CM=!1;function NL(d,h,b){var S=b.window===b?b.document:b.nodeType===9?b:b.ownerDocument;CM||Yf==null||Yf!==yi(S)||(S=Yf,"selectionStart"in S&&AM(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}),Gm&&$m(Gm,S)||(Gm=S,S=ly(TM,"onSelect"),0>=$,R-=$,To=1<<32-tt(h)+R|b<Jt?(xn=kt,kt=null):xn=kt.sibling;var Mn=Ve(De,kt,Ue[Jt],rt);if(Mn===null){kt===null&&(kt=xn);break}d&&kt&&Mn.alternate===null&&h(De,kt),Ee=D(Mn,Ee,Jt),wn===null?It=Mn:wn.sibling=Mn,wn=Mn,kt=xn}if(Jt===Ue.length)return b(De,kt),yn&&fl(De,Jt),It;if(kt===null){for(;JtJt?(xn=kt,kt=null):xn=kt.sibling;var tu=Ve(De,kt,Mn.value,rt);if(tu===null){kt===null&&(kt=xn);break}d&&kt&&tu.alternate===null&&h(De,kt),Ee=D(tu,Ee,Jt),wn===null?It=tu:wn.sibling=tu,wn=tu,kt=xn}if(Mn.done)return b(De,kt),yn&&fl(De,Jt),It;if(kt===null){for(;!Mn.done;Jt++,Mn=Ue.next())Mn=st(De,Mn.value,rt),Mn!==null&&(Ee=D(Mn,Ee,Jt),wn===null?It=Mn:wn.sibling=Mn,wn=Mn);return yn&&fl(De,Jt),It}for(kt=S(kt);!Mn.done;Jt++,Mn=Ue.next())Mn=Ye(kt,De,Jt,Mn.value,rt),Mn!==null&&(d&&Mn.alternate!==null&&kt.delete(Mn.key===null?Jt:Mn.key),Ee=D(Mn,Ee,Jt),wn===null?It=Mn:wn.sibling=Mn,wn=Mn);return d&&kt.forEach(function(Hte){return h(De,Hte)}),yn&&fl(De,Jt),It}function Un(De,Ee,Ue,rt){if(typeof Ue=="object"&&Ue!==null&&Ue.type===_&&Ue.key===null&&(Ue=Ue.props.children),typeof Ue=="object"&&Ue!==null){switch(Ue.$$typeof){case g:e:{for(var It=Ue.key;Ee!==null;){if(Ee.key===It){if(It=Ue.type,It===_){if(Ee.tag===7){b(De,Ee.sibling),rt=R(Ee,Ue.props.children),rt.return=De,De=rt;break e}}else if(Ee.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===j&&bd(It)===Ee.type){b(De,Ee.sibling),rt=R(Ee,Ue.props),Zm(rt,Ue),rt.return=De,De=rt;break e}b(De,Ee);break}else h(De,Ee);Ee=Ee.sibling}Ue.type===_?(rt=md(Ue.props.children,De.mode,rt,Ue.key),rt.return=De,De=rt):(rt=Ev(Ue.type,Ue.key,Ue.props,null,De.mode,rt),Zm(rt,Ue),rt.return=De,De=rt)}return $(De);case y:e:{for(It=Ue.key;Ee!==null;){if(Ee.key===It)if(Ee.tag===4&&Ee.stateNode.containerInfo===Ue.containerInfo&&Ee.stateNode.implementation===Ue.implementation){b(De,Ee.sibling),rt=R(Ee,Ue.children||[]),rt.return=De,De=rt;break e}else{b(De,Ee);break}else h(De,Ee);Ee=Ee.sibling}rt=LM(Ue,De.mode,rt),rt.return=De,De=rt}return $(De);case j:return Ue=bd(Ue),Un(De,Ee,Ue,rt)}if(H(Ue))return Nt(De,Ee,Ue,rt);if(I(Ue)){if(It=I(Ue),typeof It!="function")throw Error(i(150));return Ue=It.call(Ue),Bt(De,Ee,Ue,rt)}if(typeof Ue.then=="function")return Un(De,Ee,kv(Ue),rt);if(Ue.$$typeof===w)return Un(De,Ee,Cv(De,Ue),rt);Dv(De,Ue)}return typeof Ue=="string"&&Ue!==""||typeof Ue=="number"||typeof Ue=="bigint"?(Ue=""+Ue,Ee!==null&&Ee.tag===6?(b(De,Ee.sibling),rt=R(Ee,Ue),rt.return=De,De=rt):(b(De,Ee),rt=OM(Ue,De.mode,rt),rt.return=De,De=rt),$(De)):b(De,Ee)}return function(De,Ee,Ue,rt){try{Ym=0;var It=Un(De,Ee,Ue,rt);return oh=null,It}catch(kt){if(kt===sh||kt===Rv)throw kt;var wn=Wa(29,kt,null,De.mode);return wn.lanes=rt,wn.return=De,wn}finally{}}}var Sd=QL(!0),JL=QL(!1),Uc=!1;function qM(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function XM(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,callbacks:null})}function Fc(d){return{lane:d,tag:0,payload:null,callback:null,next:null}}function zc(d,h,b){var S=d.updateQueue;if(S===null)return null;if(S=S.shared,(Cn&2)!==0){var R=S.pending;return R===null?h.next=h:(h.next=R.next,R.next=h),S.pending=h,h=Mv(d),IL(d,null,b),h}return wv(d,S,h,b),Mv(d)}function Qm(d,h,b){if(h=h.updateQueue,h!==null&&(h=h.shared,(b&4194048)!==0)){var S=h.lanes;S&=d.pendingLanes,b|=S,h.lanes=b,qn(d,b)}}function KM(d,h){var b=d.updateQueue,S=d.alternate;if(S!==null&&(S=S.updateQueue,b===S)){var R=null,D=null;if(b=b.firstBaseUpdate,b!==null){do{var $={lane:b.lane,tag:b.tag,payload:b.payload,callback:null,next:null};D===null?R=D=$:D=D.next=$,b=b.next}while(b!==null);D===null?R=D=h:D=D.next=h}else R=D=h;b={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:D,shared:S.shared,callbacks:S.callbacks},d.updateQueue=b;return}d=b.lastBaseUpdate,d===null?b.firstBaseUpdate=h:d.next=h,b.lastBaseUpdate=h}var YM=!1;function Jm(){if(YM){var d=ah;if(d!==null)throw d}}function eg(d,h,b,S){YM=!1;var R=d.updateQueue;Uc=!1;var D=R.firstBaseUpdate,$=R.lastBaseUpdate,ne=R.shared.pending;if(ne!==null){R.shared.pending=null;var _e=ne,Fe=_e.next;_e.next=null,$===null?D=Fe:$.next=Fe,$=_e;var Je=d.alternate;Je!==null&&(Je=Je.updateQueue,ne=Je.lastBaseUpdate,ne!==$&&(ne===null?Je.firstBaseUpdate=Fe:ne.next=Fe,Je.lastBaseUpdate=_e))}if(D!==null){var st=R.baseState;$=0,Je=Fe=_e=null,ne=D;do{var Ve=ne.lane&-536870913,Ye=Ve!==ne.lane;if(Ye?(gn&Ve)===Ve:(S&Ve)===Ve){Ve!==0&&Ve===rh&&(YM=!0),Je!==null&&(Je=Je.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var Nt=d,Bt=ne;Ve=h;var Un=b;switch(Bt.tag){case 1:if(Nt=Bt.payload,typeof Nt=="function"){st=Nt.call(Un,st,Ve);break e}st=Nt;break e;case 3:Nt.flags=Nt.flags&-65537|128;case 0:if(Nt=Bt.payload,Ve=typeof Nt=="function"?Nt.call(Un,st,Ve):Nt,Ve==null)break e;st=f({},st,Ve);break e;case 2:Uc=!0}}Ve=ne.callback,Ve!==null&&(d.flags|=64,Ye&&(d.flags|=8192),Ye=R.callbacks,Ye===null?R.callbacks=[Ve]:Ye.push(Ve))}else Ye={lane:Ve,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Je===null?(Fe=Je=Ye,_e=st):Je=Je.next=Ye,$|=Ve;if(ne=ne.next,ne===null){if(ne=R.shared.pending,ne===null)break;Ye=ne,ne=Ye.next,Ye.next=null,R.lastBaseUpdate=Ye,R.shared.pending=null}}while(!0);Je===null&&(_e=st),R.baseState=_e,R.firstBaseUpdate=Fe,R.lastBaseUpdate=Je,D===null&&(R.shared.lanes=0),Gc|=$,d.lanes=$,d.memoizedState=st}}function eI(d,h){if(typeof d!="function")throw Error(i(191,d));d.call(h)}function tI(d,h){var b=d.callbacks;if(b!==null)for(d.callbacks=null,d=0;dD?D:8;var $=V.T,ne={};V.T=ne,mE(d,!1,h,b);try{var _e=R(),Fe=V.S;if(Fe!==null&&Fe(ne,_e),_e!==null&&typeof _e=="object"&&typeof _e.then=="function"){var Je=Pee(_e,S);ig(d,h,Je,Za(d))}else ig(d,h,S,Za(d))}catch(st){ig(d,h,{then:function(){},status:"rejected",reason:st},Za())}finally{G.p=D,$!==null&&ne.types!==null&&($.types=ne.types),V.T=$}}function jee(){}function hE(d,h,b,S){if(d.tag!==5)throw Error(i(476));var R=DI(d).queue;kI(d,R,h,K,b===null?jee:function(){return OI(d),b(S)})}function DI(d){var h=d.memoizedState;if(h!==null)return h;h={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:K},next:null};var b={};return h.next={memoizedState:b,baseState:b,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:b},next:null},d.memoizedState=h,d=d.alternate,d!==null&&(d.memoizedState=h),h}function OI(d){var h=DI(d);h.next===null&&(h=d.alternate.memoizedState),ig(d,h.next.queue,{},Za())}function pE(){return Dr(bg)}function LI(){return Ni().memoizedState}function II(){return Ni().memoizedState}function Uee(d){for(var h=d.return;h!==null;){switch(h.tag){case 24:case 3:var b=Za();d=Fc(b);var S=zc(h,d,b);S!==null&&(Na(S,h,b),Qm(S,h,b)),h={cache:VM()},d.payload=h;return}h=h.return}}function Fee(d,h,b){var S=Za();b={lane:S,revertLane:0,gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},Vv(d)?UI(h,b):(b=kM(d,h,b,S),b!==null&&(Na(b,d,S),FI(b,h,S)))}function jI(d,h,b){var S=Za();ig(d,h,b,S)}function ig(d,h,b,S){var R={lane:S,revertLane:0,gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null};if(Vv(d))UI(h,R);else{var D=d.alternate;if(d.lanes===0&&(D===null||D.lanes===0)&&(D=h.lastRenderedReducer,D!==null))try{var $=h.lastRenderedState,ne=D($,b);if(R.hasEagerState=!0,R.eagerState=ne,Ga(ne,$))return wv(d,h,R,0),Xn===null&&Sv(),!1}catch{}finally{}if(b=kM(d,h,R,S),b!==null)return Na(b,d,S),FI(b,h,S),!0}return!1}function mE(d,h,b,S){if(S={lane:2,revertLane:qE(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},Vv(d)){if(h)throw Error(i(479))}else h=kM(d,b,S,2),h!==null&&Na(h,d,2)}function Vv(d){var h=d.alternate;return d===Qt||h!==null&&h===Qt}function UI(d,h){ch=Iv=!0;var b=d.pending;b===null?h.next=h:(h.next=b.next,b.next=h),d.pending=h}function FI(d,h,b){if((b&4194048)!==0){var S=h.lanes;S&=d.pendingLanes,b|=S,h.lanes=b,qn(d,b)}}var rg={readContext:Dr,use:Fv,useCallback:bi,useContext:bi,useEffect:bi,useImperativeHandle:bi,useLayoutEffect:bi,useInsertionEffect:bi,useMemo:bi,useReducer:bi,useRef:bi,useState:bi,useDebugValue:bi,useDeferredValue:bi,useTransition:bi,useSyncExternalStore:bi,useId:bi,useHostTransitionStatus:bi,useFormState:bi,useActionState:bi,useOptimistic:bi,useMemoCache:bi,useCacheRefresh:bi};rg.useEffectEvent=bi;var zI={readContext:Dr,use:Fv,useCallback:function(d,h){return la().memoizedState=[d,h===void 0?null:h],d},useContext:Dr,useEffect:wI,useImperativeHandle:function(d,h,b){b=b!=null?b.concat([d]):null,Bv(4194308,4,TI.bind(null,h,d),b)},useLayoutEffect:function(d,h){return Bv(4194308,4,d,h)},useInsertionEffect:function(d,h){Bv(4,2,d,h)},useMemo:function(d,h){var b=la();h=h===void 0?null:h;var S=d();if(wd){pt(!0);try{d()}finally{pt(!1)}}return b.memoizedState=[S,h],S},useReducer:function(d,h,b){var S=la();if(b!==void 0){var R=b(h);if(wd){pt(!0);try{b(h)}finally{pt(!1)}}}else R=h;return S.memoizedState=S.baseState=R,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:R},S.queue=d,d=d.dispatch=Fee.bind(null,Qt,d),[S.memoizedState,d]},useRef:function(d){var h=la();return d={current:d},h.memoizedState=d},useState:function(d){d=lE(d);var h=d.queue,b=jI.bind(null,Qt,h);return h.dispatch=b,[d.memoizedState,b]},useDebugValue:dE,useDeferredValue:function(d,h){var b=la();return fE(b,d,h)},useTransition:function(){var d=lE(!1);return d=kI.bind(null,Qt,d.queue,!0,!1),la().memoizedState=d,[!1,d]},useSyncExternalStore:function(d,h,b){var S=Qt,R=la();if(yn){if(b===void 0)throw Error(i(407));b=b()}else{if(b=h(),Xn===null)throw Error(i(349));(gn&127)!==0||oI(S,h,b)}R.memoizedState=b;var D={value:b,getSnapshot:h};return R.queue=D,wI(cI.bind(null,S,D,d),[d]),S.flags|=2048,dh(9,{destroy:void 0},lI.bind(null,S,D,b,h),null),b},useId:function(){var d=la(),h=Xn.identifierPrefix;if(yn){var b=Co,S=To;b=(S&~(1<<32-tt(S)-1)).toString(32)+b,h="_"+h+"R_"+b,b=jv++,0<\/script>",D=D.removeChild(D.firstChild);break;case"select":D=typeof S.is=="string"?$.createElement("select",{is:S.is}):$.createElement("select"),S.multiple?D.multiple=!0:S.size&&(D.size=S.size);break;default:D=typeof S.is=="string"?$.createElement(R,{is:S.is}):$.createElement(R)}}D[hi]=h,D[Ai]=S;e:for($=h.child;$!==null;){if($.tag===5||$.tag===6)D.appendChild($.stateNode);else if($.tag!==4&&$.tag!==27&&$.child!==null){$.child.return=$,$=$.child;continue}if($===h)break e;for(;$.sibling===null;){if($.return===null||$.return===h)break e;$=$.return}$.sibling.return=$.return,$=$.sibling}h.stateNode=D;e:switch(Lr(D,R,S),R){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&vl(h)}}return ni(h),NE(h,h.type,d===null?null:d.memoizedProps,h.pendingProps,b),null;case 6:if(d&&h.stateNode!=null)d.memoizedProps!==S&&vl(h);else{if(typeof S!="string"&&h.stateNode===null)throw Error(i(166));if(d=ie.current,nh(h)){if(d=h.stateNode,b=h.memoizedProps,S=null,R=kr,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}d[hi]=h,d=!!(d.nodeValue===b||S!==null&&S.suppressHydrationWarning===!0||aU(d.nodeValue,b)),d||Ic(h,!0)}else d=cy(d).createTextNode(S),d[hi]=h,h.stateNode=d}return ni(h),null;case 31:if(b=h.memoizedState,d===null||d.memoizedState!==null){if(S=nh(h),b!==null){if(d===null){if(!S)throw Error(i(318));if(d=h.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(i(557));d[hi]=h}else gd(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;ni(h),d=!1}else b=FM(),d!==null&&d.memoizedState!==null&&(d.memoizedState.hydrationErrors=b),d=!0;if(!d)return h.flags&256?(Xa(h),h):(Xa(h),null);if((h.flags&128)!==0)throw Error(i(558))}return ni(h),null;case 13:if(S=h.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(R=nh(h),S!==null&&S.dehydrated!==null){if(d===null){if(!R)throw Error(i(318));if(R=h.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(i(317));R[hi]=h}else gd(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;ni(h),R=!1}else R=FM(),d!==null&&d.memoizedState!==null&&(d.memoizedState.hydrationErrors=R),R=!0;if(!R)return h.flags&256?(Xa(h),h):(Xa(h),null)}return Xa(h),(h.flags&128)!==0?(h.lanes=b,h):(b=S!==null,d=d!==null&&d.memoizedState!==null,b&&(S=h.child,R=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(R=S.alternate.memoizedState.cachePool.pool),D=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(D=S.memoizedState.cachePool.pool),D!==R&&(S.flags|=2048)),b!==d&&b&&(h.child.flags|=8192),Xv(h,h.updateQueue),ni(h),null);case 4:return pe(),d===null&&ZE(h.stateNode.containerInfo),ni(h),null;case 10:return pl(h.type),ni(h),null;case 19:if(X(Ci),S=h.memoizedState,S===null)return ni(h),null;if(R=(h.flags&128)!==0,D=S.rendering,D===null)if(R)sg(S,!1);else{if(_i!==0||d!==null&&(d.flags&128)!==0)for(d=h.child;d!==null;){if(D=Lv(d),D!==null){for(h.flags|=128,sg(S,!1),d=D.updateQueue,h.updateQueue=d,Xv(h,d),h.subtreeFlags=0,d=b,b=h.child;b!==null;)jL(b,d),b=b.sibling;return ae(Ci,Ci.current&1|2),yn&&fl(h,S.treeForkCount),h.child}d=d.sibling}S.tail!==null&&O()>Jv&&(h.flags|=128,R=!0,sg(S,!1),h.lanes=4194304)}else{if(!R)if(d=Lv(D),d!==null){if(h.flags|=128,R=!0,d=d.updateQueue,h.updateQueue=d,Xv(h,d),sg(S,!0),S.tail===null&&S.tailMode==="hidden"&&!D.alternate&&!yn)return ni(h),null}else 2*O()-S.renderingStartTime>Jv&&b!==536870912&&(h.flags|=128,R=!0,sg(S,!1),h.lanes=4194304);S.isBackwards?(D.sibling=h.child,h.child=D):(d=S.last,d!==null?d.sibling=D:h.child=D,S.last=D)}return S.tail!==null?(d=S.tail,S.rendering=d,S.tail=d.sibling,S.renderingStartTime=O(),d.sibling=null,b=Ci.current,ae(Ci,R?b&1|2:b&1),yn&&fl(h,S.treeForkCount),d):(ni(h),null);case 22:case 23:return Xa(h),QM(),S=h.memoizedState!==null,d!==null?d.memoizedState!==null!==S&&(h.flags|=8192):S&&(h.flags|=8192),S?(b&536870912)!==0&&(h.flags&128)===0&&(ni(h),h.subtreeFlags&6&&(h.flags|=8192)):ni(h),b=h.updateQueue,b!==null&&Xv(h,b.retryQueue),b=null,d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),S=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(S=h.memoizedState.cachePool.pool),S!==b&&(h.flags|=2048),d!==null&&X(yd),null;case 24:return b=null,d!==null&&(b=d.memoizedState.cache),h.memoizedState.cache!==b&&(h.flags|=2048),pl(Ii),ni(h),null;case 25:return null;case 30:return null}throw Error(i(156,h.tag))}function $ee(d,h){switch(jM(h),h.tag){case 1:return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return pl(Ii),pe(),d=h.flags,(d&65536)!==0&&(d&128)===0?(h.flags=d&-65537|128,h):null;case 26:case 27:case 5:return ze(h),null;case 31:if(h.memoizedState!==null){if(Xa(h),h.alternate===null)throw Error(i(340));gd()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 13:if(Xa(h),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(i(340));gd()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return X(Ci),null;case 4:return pe(),null;case 10:return pl(h.type),null;case 22:case 23:return Xa(h),QM(),d!==null&&X(yd),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 24:return pl(Ii),null;case 25:return null;default:return null}}function uj(d,h){switch(jM(h),h.tag){case 3:pl(Ii),pe();break;case 26:case 27:case 5:ze(h);break;case 4:pe();break;case 31:h.memoizedState!==null&&Xa(h);break;case 13:Xa(h);break;case 19:X(Ci);break;case 10:pl(h.type);break;case 22:case 23:Xa(h),QM(),d!==null&&X(yd);break;case 24:pl(Ii)}}function og(d,h){try{var b=h.updateQueue,S=b!==null?b.lastEffect:null;if(S!==null){var R=S.next;b=R;do{if((b.tag&d)===d){S=void 0;var D=b.create,$=b.inst;S=D(),$.destroy=S}b=b.next}while(b!==R)}}catch(ne){Dn(h,h.return,ne)}}function Vc(d,h,b){try{var S=h.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var D=R.next;S=D;do{if((S.tag&d)===d){var $=S.inst,ne=$.destroy;if(ne!==void 0){$.destroy=void 0,R=h;var _e=b,Fe=ne;try{Fe()}catch(Je){Dn(R,_e,Je)}}}S=S.next}while(S!==D)}}catch(Je){Dn(h,h.return,Je)}}function dj(d){var h=d.updateQueue;if(h!==null){var b=d.stateNode;try{tI(h,b)}catch(S){Dn(d,d.return,S)}}}function fj(d,h,b){b.props=Md(d.type,d.memoizedProps),b.state=d.memoizedState;try{b.componentWillUnmount()}catch(S){Dn(d,h,S)}}function lg(d,h){try{var b=d.ref;if(b!==null){switch(d.tag){case 26:case 27:case 5:var S=d.stateNode;break;case 30:S=d.stateNode;break;default:S=d.stateNode}typeof b=="function"?d.refCleanup=b(S):b.current=S}}catch(R){Dn(d,h,R)}}function No(d,h){var b=d.ref,S=d.refCleanup;if(b!==null)if(typeof S=="function")try{S()}catch(R){Dn(d,h,R)}finally{d.refCleanup=null,d=d.alternate,d!=null&&(d.refCleanup=null)}else if(typeof b=="function")try{b(null)}catch(R){Dn(d,h,R)}else b.current=null}function hj(d){var h=d.type,b=d.memoizedProps,S=d.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":b.autoFocus&&S.focus();break e;case"img":b.src?S.src=b.src:b.srcSet&&(S.srcset=b.srcSet)}}catch(R){Dn(d,d.return,R)}}function RE(d,h,b){try{var S=d.stateNode;fte(S,d.type,b,h),S[Ai]=h}catch(R){Dn(d,d.return,R)}}function pj(d){return d.tag===5||d.tag===3||d.tag===26||d.tag===27&&Yc(d.type)||d.tag===4}function PE(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||pj(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.tag===27&&Yc(d.type)||d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function kE(d,h,b){var S=d.tag;if(S===5||S===6)d=d.stateNode,h?(b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b).insertBefore(d,h):(h=b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b,h.appendChild(d),b=b._reactRootContainer,b!=null||h.onclick!==null||(h.onclick=cl));else if(S!==4&&(S===27&&Yc(d.type)&&(b=d.stateNode,h=null),d=d.child,d!==null))for(kE(d,h,b),d=d.sibling;d!==null;)kE(d,h,b),d=d.sibling}function Kv(d,h,b){var S=d.tag;if(S===5||S===6)d=d.stateNode,h?b.insertBefore(d,h):b.appendChild(d);else if(S!==4&&(S===27&&Yc(d.type)&&(b=d.stateNode),d=d.child,d!==null))for(Kv(d,h,b),d=d.sibling;d!==null;)Kv(d,h,b),d=d.sibling}function mj(d){var h=d.stateNode,b=d.memoizedProps;try{for(var S=d.type,R=h.attributes;R.length;)h.removeAttributeNode(R[0]);Lr(h,S,b),h[hi]=d,h[Ai]=b}catch(D){Dn(d,d.return,D)}}var yl=!1,Fi=!1,DE=!1,gj=typeof WeakSet=="function"?WeakSet:Set,vr=null;function Gee(d,h){if(d=d.containerInfo,eA=gy,d=CL(d),AM(d)){if("selectionStart"in d)var b={start:d.selectionStart,end:d.selectionEnd};else e:{b=(b=d.ownerDocument)&&b.defaultView||window;var S=b.getSelection&&b.getSelection();if(S&&S.rangeCount!==0){b=S.anchorNode;var R=S.anchorOffset,D=S.focusNode;S=S.focusOffset;try{b.nodeType,D.nodeType}catch{b=null;break e}var $=0,ne=-1,_e=-1,Fe=0,Je=0,st=d,Ve=null;t:for(;;){for(var Ye;st!==b||R!==0&&st.nodeType!==3||(ne=$+R),st!==D||S!==0&&st.nodeType!==3||(_e=$+S),st.nodeType===3&&($+=st.nodeValue.length),(Ye=st.firstChild)!==null;)Ve=st,st=Ye;for(;;){if(st===d)break t;if(Ve===b&&++Fe===R&&(ne=$),Ve===D&&++Je===S&&(_e=$),(Ye=st.nextSibling)!==null)break;st=Ve,Ve=st.parentNode}st=Ye}b=ne===-1||_e===-1?null:{start:ne,end:_e}}else b=null}b=b||{start:0,end:0}}else b=null;for(tA={focusedElem:d,selectionRange:b},gy=!1,vr=h;vr!==null;)if(h=vr,d=h.child,(h.subtreeFlags&1028)!==0&&d!==null)d.return=h,vr=d;else for(;vr!==null;){switch(h=vr,D=h.alternate,d=h.flags,h.tag){case 0:if((d&4)!==0&&(d=h.updateQueue,d=d!==null?d.events:null,d!==null))for(b=0;b title"))),Lr(D,S,b),D[hi]=d,Te(D),S=D;break e;case"link":var $=SU("link","href",R).get(S+(b.href||""));if($){for(var ne=0;ne<$.length;ne++)if(D=$[ne],D.getAttribute("href")===(b.href==null||b.href===""?null:b.href)&&D.getAttribute("rel")===(b.rel==null?null:b.rel)&&D.getAttribute("title")===(b.title==null?null:b.title)&&D.getAttribute("crossorigin")===(b.crossOrigin==null?null:b.crossOrigin)){$.splice(ne,1);break t}}D=R.createElement(S),Lr(D,S,b),R.head.appendChild(D);break;case"meta":if($=SU("meta","content",R).get(S+(b.content||""))){for(ne=0;ne<$.length;ne++)if(D=$[ne],D.getAttribute("content")===(b.content==null?null:""+b.content)&&D.getAttribute("name")===(b.name==null?null:b.name)&&D.getAttribute("property")===(b.property==null?null:b.property)&&D.getAttribute("http-equiv")===(b.httpEquiv==null?null:b.httpEquiv)&&D.getAttribute("charset")===(b.charSet==null?null:b.charSet)){$.splice(ne,1);break t}}D=R.createElement(S),Lr(D,S,b),R.head.appendChild(D);break;default:throw Error(i(468,S))}D[hi]=d,Te(D),S=D}d.stateNode=S}else wU(R,d.type,d.stateNode);else d.stateNode=_U(R,S,d.memoizedProps);else D!==S?(D===null?b.stateNode!==null&&(b=b.stateNode,b.parentNode.removeChild(b)):D.count--,S===null?wU(R,d.type,d.stateNode):_U(R,S,d.memoizedProps)):S===null&&d.stateNode!==null&&RE(d,d.memoizedProps,b.memoizedProps)}break;case 27:Aa(h,d),Ta(d),S&512&&(Fi||b===null||No(b,b.return)),b!==null&&S&4&&RE(d,d.memoizedProps,b.memoizedProps);break;case 5:if(Aa(h,d),Ta(d),S&512&&(Fi||b===null||No(b,b.return)),d.flags&32){R=d.stateNode;try{Ao(R,"")}catch(Nt){Dn(d,d.return,Nt)}}S&4&&d.stateNode!=null&&(R=d.memoizedProps,RE(d,R,b!==null?b.memoizedProps:R)),S&1024&&(DE=!0);break;case 6:if(Aa(h,d),Ta(d),S&4){if(d.stateNode===null)throw Error(i(162));S=d.memoizedProps,b=d.stateNode;try{b.nodeValue=S}catch(Nt){Dn(d,d.return,Nt)}}break;case 3:if(fy=null,R=to,to=uy(h.containerInfo),Aa(h,d),to=R,Ta(d),S&4&&b!==null&&b.memoizedState.isDehydrated)try{wh(h.containerInfo)}catch(Nt){Dn(d,d.return,Nt)}DE&&(DE=!1,wj(d));break;case 4:S=to,to=uy(d.stateNode.containerInfo),Aa(h,d),Ta(d),to=S;break;case 12:Aa(h,d),Ta(d);break;case 31:Aa(h,d),Ta(d),S&4&&(S=d.updateQueue,S!==null&&(d.updateQueue=null,Yv(d,S)));break;case 13:Aa(h,d),Ta(d),d.child.flags&8192&&d.memoizedState!==null!=(b!==null&&b.memoizedState!==null)&&(Qv=O()),S&4&&(S=d.updateQueue,S!==null&&(d.updateQueue=null,Yv(d,S)));break;case 22:R=d.memoizedState!==null;var _e=b!==null&&b.memoizedState!==null,Fe=yl,Je=Fi;if(yl=Fe||R,Fi=Je||_e,Aa(h,d),Fi=Je,yl=Fe,Ta(d),S&8192)e:for(h=d.stateNode,h._visibility=R?h._visibility&-2:h._visibility|1,R&&(b===null||_e||yl||Fi||Ed(d)),b=null,h=d;;){if(h.tag===5||h.tag===26){if(b===null){_e=b=h;try{if(D=_e.stateNode,R)$=D.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none";else{ne=_e.stateNode;var st=_e.memoizedProps.style,Ve=st!=null&&st.hasOwnProperty("display")?st.display:null;ne.style.display=Ve==null||typeof Ve=="boolean"?"":(""+Ve).trim()}}catch(Nt){Dn(_e,_e.return,Nt)}}}else if(h.tag===6){if(b===null){_e=h;try{_e.stateNode.nodeValue=R?"":_e.memoizedProps}catch(Nt){Dn(_e,_e.return,Nt)}}}else if(h.tag===18){if(b===null){_e=h;try{var Ye=_e.stateNode;R?fU(Ye,!0):fU(_e.stateNode,!1)}catch(Nt){Dn(_e,_e.return,Nt)}}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===d)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break e;for(;h.sibling===null;){if(h.return===null||h.return===d)break e;b===h&&(b=null),h=h.return}b===h&&(b=null),h.sibling.return=h.return,h=h.sibling}S&4&&(S=d.updateQueue,S!==null&&(b=S.retryQueue,b!==null&&(S.retryQueue=null,Yv(d,b))));break;case 19:Aa(h,d),Ta(d),S&4&&(S=d.updateQueue,S!==null&&(d.updateQueue=null,Yv(d,S)));break;case 30:break;case 21:break;default:Aa(h,d),Ta(d)}}function Ta(d){var h=d.flags;if(h&2){try{for(var b,S=d.return;S!==null;){if(pj(S)){b=S;break}S=S.return}if(b==null)throw Error(i(160));switch(b.tag){case 27:var R=b.stateNode,D=PE(d);Kv(d,D,R);break;case 5:var $=b.stateNode;b.flags&32&&(Ao($,""),b.flags&=-33);var ne=PE(d);Kv(d,ne,$);break;case 3:case 4:var _e=b.stateNode.containerInfo,Fe=PE(d);kE(d,Fe,_e);break;default:throw Error(i(161))}}catch(Je){Dn(d,d.return,Je)}d.flags&=-3}h&4096&&(d.flags&=-4097)}function wj(d){if(d.subtreeFlags&1024)for(d=d.child;d!==null;){var h=d;wj(h),h.tag===5&&h.flags&1024&&h.stateNode.reset(),d=d.sibling}}function _l(d,h){if(h.subtreeFlags&8772)for(h=h.child;h!==null;)xj(d,h.alternate,h),h=h.sibling}function Ed(d){for(d=d.child;d!==null;){var h=d;switch(h.tag){case 0:case 11:case 14:case 15:Vc(4,h,h.return),Ed(h);break;case 1:No(h,h.return);var b=h.stateNode;typeof b.componentWillUnmount=="function"&&fj(h,h.return,b),Ed(h);break;case 27:xg(h.stateNode);case 26:case 5:No(h,h.return),Ed(h);break;case 22:h.memoizedState===null&&Ed(h);break;case 30:Ed(h);break;default:Ed(h)}d=d.sibling}}function Sl(d,h,b){for(b=b&&(h.subtreeFlags&8772)!==0,h=h.child;h!==null;){var S=h.alternate,R=d,D=h,$=D.flags;switch(D.tag){case 0:case 11:case 15:Sl(R,D,b),og(4,D);break;case 1:if(Sl(R,D,b),S=D,R=S.stateNode,typeof R.componentDidMount=="function")try{R.componentDidMount()}catch(Fe){Dn(S,S.return,Fe)}if(S=D,R=S.updateQueue,R!==null){var ne=S.stateNode;try{var _e=R.shared.hiddenCallbacks;if(_e!==null)for(R.shared.hiddenCallbacks=null,R=0;R<_e.length;R++)eI(_e[R],ne)}catch(Fe){Dn(S,S.return,Fe)}}b&&$&64&&dj(D),lg(D,D.return);break;case 27:mj(D);case 26:case 5:Sl(R,D,b),b&&S===null&&$&4&&hj(D),lg(D,D.return);break;case 12:Sl(R,D,b);break;case 31:Sl(R,D,b),b&&$&4&&bj(R,D);break;case 13:Sl(R,D,b),b&&$&4&&_j(R,D);break;case 22:D.memoizedState===null&&Sl(R,D,b),lg(D,D.return);break;case 30:break;default:Sl(R,D,b)}h=h.sibling}}function OE(d,h){var b=null;d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),d=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(d=h.memoizedState.cachePool.pool),d!==b&&(d!=null&&d.refCount++,b!=null&&Xm(b))}function LE(d,h){d=null,h.alternate!==null&&(d=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==d&&(h.refCount++,d!=null&&Xm(d))}function no(d,h,b,S){if(h.subtreeFlags&10256)for(h=h.child;h!==null;)Mj(d,h,b,S),h=h.sibling}function Mj(d,h,b,S){var R=h.flags;switch(h.tag){case 0:case 11:case 15:no(d,h,b,S),R&2048&&og(9,h);break;case 1:no(d,h,b,S);break;case 3:no(d,h,b,S),R&2048&&(d=null,h.alternate!==null&&(d=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==d&&(h.refCount++,d!=null&&Xm(d)));break;case 12:if(R&2048){no(d,h,b,S),d=h.stateNode;try{var D=h.memoizedProps,$=D.id,ne=D.onPostCommit;typeof ne=="function"&&ne($,h.alternate===null?"mount":"update",d.passiveEffectDuration,-0)}catch(_e){Dn(h,h.return,_e)}}else no(d,h,b,S);break;case 31:no(d,h,b,S);break;case 13:no(d,h,b,S);break;case 23:break;case 22:D=h.stateNode,$=h.alternate,h.memoizedState!==null?D._visibility&2?no(d,h,b,S):cg(d,h):D._visibility&2?no(d,h,b,S):(D._visibility|=2,fh(d,h,b,S,(h.subtreeFlags&10256)!==0||!1)),R&2048&&OE($,h);break;case 24:no(d,h,b,S),R&2048&&LE(h.alternate,h);break;default:no(d,h,b,S)}}function fh(d,h,b,S,R){for(R=R&&((h.subtreeFlags&10256)!==0||!1),h=h.child;h!==null;){var D=d,$=h,ne=b,_e=S,Fe=$.flags;switch($.tag){case 0:case 11:case 15:fh(D,$,ne,_e,R),og(8,$);break;case 23:break;case 22:var Je=$.stateNode;$.memoizedState!==null?Je._visibility&2?fh(D,$,ne,_e,R):cg(D,$):(Je._visibility|=2,fh(D,$,ne,_e,R)),R&&Fe&2048&&OE($.alternate,$);break;case 24:fh(D,$,ne,_e,R),R&&Fe&2048&&LE($.alternate,$);break;default:fh(D,$,ne,_e,R)}h=h.sibling}}function cg(d,h){if(h.subtreeFlags&10256)for(h=h.child;h!==null;){var b=d,S=h,R=S.flags;switch(S.tag){case 22:cg(b,S),R&2048&&OE(S.alternate,S);break;case 24:cg(b,S),R&2048&&LE(S.alternate,S);break;default:cg(b,S)}h=h.sibling}}var ug=8192;function hh(d,h,b){if(d.subtreeFlags&ug)for(d=d.child;d!==null;)Ej(d,h,b),d=d.sibling}function Ej(d,h,b){switch(d.tag){case 26:hh(d,h,b),d.flags&ug&&d.memoizedState!==null&&kte(b,to,d.memoizedState,d.memoizedProps);break;case 5:hh(d,h,b);break;case 3:case 4:var S=to;to=uy(d.stateNode.containerInfo),hh(d,h,b),to=S;break;case 22:d.memoizedState===null&&(S=d.alternate,S!==null&&S.memoizedState!==null?(S=ug,ug=16777216,hh(d,h,b),ug=S):hh(d,h,b));break;default:hh(d,h,b)}}function Aj(d){var h=d.alternate;if(h!==null&&(d=h.child,d!==null)){h.child=null;do h=d.sibling,d.sibling=null,d=h;while(d!==null)}}function dg(d){var h=d.deletions;if((d.flags&16)!==0){if(h!==null)for(var b=0;bUn&&($=Un,Un=Bt,Bt=$);var De=AL(ne,Bt),Ee=AL(ne,Un);if(De&&Ee&&(Ye.rangeCount!==1||Ye.anchorNode!==De.node||Ye.anchorOffset!==De.offset||Ye.focusNode!==Ee.node||Ye.focusOffset!==Ee.offset)){var Ue=st.createRange();Ue.setStart(De.node,De.offset),Ye.removeAllRanges(),Bt>Un?(Ye.addRange(Ue),Ye.extend(Ee.node,Ee.offset)):(Ue.setEnd(Ee.node,Ee.offset),Ye.addRange(Ue))}}}}for(st=[],Ye=ne;Ye=Ye.parentNode;)Ye.nodeType===1&&st.push({element:Ye,left:Ye.scrollLeft,top:Ye.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;neb?32:b,V.T=null,b=zE,zE=null;var D=qc,$=Ml;if(Ji=0,gh=qc=null,Ml=0,(Cn&6)!==0)throw Error(i(331));var ne=Cn;if(Cn|=4,Tj(D.current),Mj(D,D.current,$,b),Cn=ne,pg(0,!1),Re&&typeof Re.onPostCommitFiberRoot=="function")try{Re.onPostCommitFiberRoot(Ie,D)}catch{}return!0}finally{G.p=R,V.T=S,Gj(d,h)}}function qj(d,h,b){h=gs(b,h),h=yE(d.stateNode,h,2),d=zc(d,h,2),d!==null&&(ln(d,2),Ro(d))}function Dn(d,h,b){if(d.tag===3)qj(d,d,b);else for(;h!==null;){if(h.tag===3){qj(h,d,b);break}else if(h.tag===1){var S=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Wc===null||!Wc.has(S))){d=gs(b,d),b=XI(2),S=zc(h,b,2),S!==null&&(KI(b,S,h,d),ln(S,2),Ro(S));break}}h=h.return}}function $E(d,h,b){var S=d.pingCache;if(S===null){S=d.pingCache=new Xee;var R=new Set;S.set(h,R)}else R=S.get(h),R===void 0&&(R=new Set,S.set(h,R));R.has(b)||(IE=!0,R.add(b),d=Jee.bind(null,d,h,b),h.then(d,d))}function Jee(d,h,b){var S=d.pingCache;S!==null&&S.delete(h),d.pingedLanes|=d.suspendedLanes&b,d.warmLanes&=~b,Xn===d&&(gn&b)===b&&(_i===4||_i===3&&(gn&62914560)===gn&&300>O()-Qv?(Cn&2)===0&&xh(d,0):jE|=b,mh===gn&&(mh=0)),Ro(d)}function Xj(d,h){h===0&&(h=bt()),d=pd(d,h),d!==null&&(ln(d,h),Ro(d))}function ete(d){var h=d.memoizedState,b=0;h!==null&&(b=h.retryLane),Xj(d,b)}function tte(d,h){var b=0;switch(d.tag){case 31:case 13:var S=d.stateNode,R=d.memoizedState;R!==null&&(b=R.retryLane);break;case 19:S=d.stateNode;break;case 22:S=d.stateNode._retryCache;break;default:throw Error(i(314))}S!==null&&S.delete(h),Xj(d,b)}function nte(d,h){return ke(d,h)}var ay=null,yh=null,GE=!1,sy=!1,WE=!1,Kc=0;function Ro(d){d!==yh&&d.next===null&&(yh===null?ay=yh=d:yh=yh.next=d),sy=!0,GE||(GE=!0,rte())}function pg(d,h){if(!WE&&sy){WE=!0;do for(var b=!1,S=ay;S!==null;){if(d!==0){var R=S.pendingLanes;if(R===0)var D=0;else{var $=S.suspendedLanes,ne=S.pingedLanes;D=(1<<31-tt(42|d)+1)-1,D&=R&~($&~ne),D=D&201326741?D&201326741|1:D?D|2:0}D!==0&&(b=!0,Qj(S,D))}else D=gn,D=ge(S,S===Xn?D:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(D&3)===0||Be(S,D)||(b=!0,Qj(S,D));S=S.next}while(b);WE=!1}}function ite(){Kj()}function Kj(){sy=GE=!1;var d=0;Kc!==0&&pte()&&(d=Kc);for(var h=O(),b=null,S=ay;S!==null;){var R=S.next,D=Yj(S,h);D===0?(S.next=null,b===null?ay=R:b.next=R,R===null&&(yh=b)):(b=S,(d!==0||(D&3)!==0)&&(sy=!0)),S=R}Ji!==0&&Ji!==5||pg(d),Kc!==0&&(Kc=0)}function Yj(d,h){for(var b=d.suspendedLanes,S=d.pingedLanes,R=d.expirationTimes,D=d.pendingLanes&-62914561;0ne)break;var Je=_e.transferSize,st=_e.initiatorType;Je&&sU(st)&&(_e=_e.responseEnd,$+=Je*(_e"u"?null:document;function vU(d,h,b){var S=bh;if(S&&typeof h=="string"&&h){var R=Nn(h);R='link[rel="'+d+'"][href="'+R+'"]',typeof b=="string"&&(R+='[crossorigin="'+b+'"]'),xU.has(R)||(xU.add(R),d={rel:d,crossOrigin:b,href:h},S.querySelector(R)===null&&(h=S.createElement("link"),Lr(h,"link",d),Te(h),S.head.appendChild(h)))}}function wte(d){El.D(d),vU("dns-prefetch",d,null)}function Mte(d,h){El.C(d,h),vU("preconnect",d,h)}function Ete(d,h,b){El.L(d,h,b);var S=bh;if(S&&d&&h){var R='link[rel="preload"][as="'+Nn(h)+'"]';h==="image"&&b&&b.imageSrcSet?(R+='[imagesrcset="'+Nn(b.imageSrcSet)+'"]',typeof b.imageSizes=="string"&&(R+='[imagesizes="'+Nn(b.imageSizes)+'"]')):R+='[href="'+Nn(d)+'"]';var D=R;switch(h){case"style":D=_h(d);break;case"script":D=Sh(d)}Ss.has(D)||(d=f({rel:"preload",href:h==="image"&&b&&b.imageSrcSet?void 0:d,as:h},b),Ss.set(D,d),S.querySelector(R)!==null||h==="style"&&S.querySelector(vg(D))||h==="script"&&S.querySelector(yg(D))||(h=S.createElement("link"),Lr(h,"link",d),Te(h),S.head.appendChild(h)))}}function Ate(d,h){El.m(d,h);var b=bh;if(b&&d){var S=h&&typeof h.as=="string"?h.as:"script",R='link[rel="modulepreload"][as="'+Nn(S)+'"][href="'+Nn(d)+'"]',D=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":D=Sh(d)}if(!Ss.has(D)&&(d=f({rel:"modulepreload",href:d},h),Ss.set(D,d),b.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(b.querySelector(yg(D)))return}S=b.createElement("link"),Lr(S,"link",d),Te(S),b.head.appendChild(S)}}}function Tte(d,h,b){El.S(d,h,b);var S=bh;if(S&&d){var R=Ce(S).hoistableStyles,D=_h(d);h=h||"default";var $=R.get(D);if(!$){var ne={loading:0,preload:null};if($=S.querySelector(vg(D)))ne.loading=5;else{d=f({rel:"stylesheet",href:d,"data-precedence":h},b),(b=Ss.get(D))&&lA(d,b);var _e=$=S.createElement("link");Te(_e),Lr(_e,"link",d),_e._p=new Promise(function(Fe,Je){_e.onload=Fe,_e.onerror=Je}),_e.addEventListener("load",function(){ne.loading|=1}),_e.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,dy($,h,S)}$={type:"stylesheet",instance:$,count:1,state:ne},R.set(D,$)}}}function Cte(d,h){El.X(d,h);var b=bh;if(b&&d){var S=Ce(b).hoistableScripts,R=Sh(d),D=S.get(R);D||(D=b.querySelector(yg(R)),D||(d=f({src:d,async:!0},h),(h=Ss.get(R))&&cA(d,h),D=b.createElement("script"),Te(D),Lr(D,"link",d),b.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},S.set(R,D))}}function Nte(d,h){El.M(d,h);var b=bh;if(b&&d){var S=Ce(b).hoistableScripts,R=Sh(d),D=S.get(R);D||(D=b.querySelector(yg(R)),D||(d=f({src:d,async:!0,type:"module"},h),(h=Ss.get(R))&&cA(d,h),D=b.createElement("script"),Te(D),Lr(D,"link",d),b.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},S.set(R,D))}}function yU(d,h,b,S){var R=(R=ie.current)?uy(R):null;if(!R)throw Error(i(446));switch(d){case"meta":case"title":return null;case"style":return typeof b.precedence=="string"&&typeof b.href=="string"?(h=_h(b.href),b=Ce(R).hoistableStyles,S=b.get(h),S||(S={type:"style",instance:null,count:0,state:null},b.set(h,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(b.rel==="stylesheet"&&typeof b.href=="string"&&typeof b.precedence=="string"){d=_h(b.href);var D=Ce(R).hoistableStyles,$=D.get(d);if($||(R=R.ownerDocument||R,$={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},D.set(d,$),(D=R.querySelector(vg(d)))&&!D._p&&($.instance=D,$.state.loading=5),Ss.has(d)||(b={rel:"preload",as:"style",href:b.href,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy},Ss.set(d,b),D||Rte(R,d,b,$.state))),h&&S===null)throw Error(i(528,""));return $}if(h&&S!==null)throw Error(i(529,""));return null;case"script":return h=b.async,b=b.src,typeof b=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=Sh(b),b=Ce(R).hoistableScripts,S=b.get(h),S||(S={type:"script",instance:null,count:0,state:null},b.set(h,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,d))}}function _h(d){return'href="'+Nn(d)+'"'}function vg(d){return'link[rel="stylesheet"]['+d+"]"}function bU(d){return f({},d,{"data-precedence":d.precedence,precedence:null})}function Rte(d,h,b,S){d.querySelector('link[rel="preload"][as="style"]['+h+"]")?S.loading=1:(h=d.createElement("link"),S.preload=h,h.addEventListener("load",function(){return S.loading|=1}),h.addEventListener("error",function(){return S.loading|=2}),Lr(h,"link",b),Te(h),d.head.appendChild(h))}function Sh(d){return'[src="'+Nn(d)+'"]'}function yg(d){return"script[async]"+d}function _U(d,h,b){if(h.count++,h.instance===null)switch(h.type){case"style":var S=d.querySelector('style[data-href~="'+Nn(b.href)+'"]');if(S)return h.instance=S,Te(S),S;var R=f({},b,{"data-href":b.href,"data-precedence":b.precedence,href:null,precedence:null});return S=(d.ownerDocument||d).createElement("style"),Te(S),Lr(S,"style",R),dy(S,b.precedence,d),h.instance=S;case"stylesheet":R=_h(b.href);var D=d.querySelector(vg(R));if(D)return h.state.loading|=4,h.instance=D,Te(D),D;S=bU(b),(R=Ss.get(R))&&lA(S,R),D=(d.ownerDocument||d).createElement("link"),Te(D);var $=D;return $._p=new Promise(function(ne,_e){$.onload=ne,$.onerror=_e}),Lr(D,"link",S),h.state.loading|=4,dy(D,b.precedence,d),h.instance=D;case"script":return D=Sh(b.src),(R=d.querySelector(yg(D)))?(h.instance=R,Te(R),R):(S=b,(R=Ss.get(D))&&(S=f({},b),cA(S,R)),d=d.ownerDocument||d,R=d.createElement("script"),Te(R),Lr(R,"link",S),d.head.appendChild(R),h.instance=R);case"void":return null;default:throw Error(i(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(S=h.instance,h.state.loading|=4,dy(S,b.precedence,d));return h.instance}function dy(d,h,b){for(var S=b.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=S.length?S[S.length-1]:null,D=R,$=0;$ title"):null)}function Pte(d,h,b){if(b===1||h.itemProp!=null)return!1;switch(d){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return d=h.disabled,typeof h.precedence=="string"&&d==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function MU(d){return!(d.type==="stylesheet"&&(d.state.loading&3)===0)}function kte(d,h,b,S){if(b.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(b.state.loading&4)===0){if(b.instance===null){var R=_h(S.href),D=h.querySelector(vg(R));if(D){h=D._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(d.count++,d=hy.bind(d),h.then(d,d)),b.state.loading|=4,b.instance=D,Te(D);return}D=h.ownerDocument||h,S=bU(S),(R=Ss.get(R))&&lA(S,R),D=D.createElement("link"),Te(D);var $=D;$._p=new Promise(function(ne,_e){$.onload=ne,$.onerror=_e}),Lr(D,"link",S),b.instance=D}d.stylesheets===null&&(d.stylesheets=new Map),d.stylesheets.set(b,h),(h=b.state.preload)&&(b.state.loading&3)===0&&(d.count++,b=hy.bind(d),h.addEventListener("load",b),h.addEventListener("error",b))}}var uA=0;function Dte(d,h){return d.stylesheets&&d.count===0&&my(d,d.stylesheets),0uA?50:800)+h);return d.unsuspend=b,function(){d.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function hy(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)my(this,this.stylesheets);else if(this.unsuspend){var d=this.unsuspend;this.unsuspend=null,d()}}}var py=null;function my(d,h){d.stylesheets=null,d.unsuspend!==null&&(d.count++,py=new Map,h.forEach(Ote,d),py=null,hy.call(d))}function Ote(d,h){if(!(h.state.loading&4)){var b=py.get(d);if(b)var S=b.get(null);else{b=new Map,py.set(d,b);for(var R=d.querySelectorAll("link[data-precedence],style[data-precedence]"),D=0;D"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),yA.exports=Zte(),yA.exports}var Jte=Qte();const Vt=t=>typeof t=="string",Ag=()=>{let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n},XU=t=>t==null?"":""+t,ene=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},tne=/###/g,KU=t=>t&&t.indexOf("###")>-1?t.replace(tne,"."):t,YU=t=>!t||Vt(t),cx=(t,e,n)=>{const i=Vt(e)?e.split("."):e;let r=0;for(;r{const{obj:i,k:r}=cx(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let a=e[e.length-1],s=e.slice(0,e.length-1),o=cx(t,s,Object);for(;o.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),o=cx(t,s,Object),o?.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=n},nne=(t,e,n,i)=>{const{obj:r,k:a}=cx(t,e,Object);r[a]=r[a]||[],r[a].push(n)},N_=(t,e)=>{const{obj:n,k:i}=cx(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,i))return n[i]},ine=(t,e,n)=>{const i=N_(t,n);return i!==void 0?i:N_(e,n)},aG=(t,e,n)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?Vt(t[i])||t[i]instanceof String||Vt(e[i])||e[i]instanceof String?n&&(t[i]=e[i]):aG(t[i],e[i],n):t[i]=e[i]);return t},Mh=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var rne={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ane=t=>Vt(t)?t.replace(/[&<>"'\/]/g,e=>rne[e]):t;class sne{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const one=[" ",",","?","!",";"],lne=new sne(20),cne=(t,e,n)=>{e=e||"",n=n||"";const i=one.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const r=lne.getRegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!r.test(t);if(!a){const s=t.indexOf(n);s>0&&!r.test(t.substring(0,s))&&(a=!0)}return a},lN=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const i=e.split(n);let r=t;for(let a=0;a-1&&lt?.replace("_","-"),une={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class R_{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||une,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(Vt(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new R_(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new R_(this.logger,e)}}var Bo=new R_;let FS=class{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([r,a])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(e,n,i,r={}){const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],i&&(Array.isArray(i)?o.push(...i):Vt(i)&&a?o.push(...i.split(a)):o.push(i)));const l=N_(this.data,o);return!l&&!n&&!i&&e.indexOf(".")>-1&&(e=o[0],n=o[1],i=o.slice(2).join(".")),l||!s||!Vt(i)?l:lN(this.data?.[e]?.[n],i,a)}addResource(e,n,i,r,a={silent:!1}){const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,n];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),r=n,n=o[1]),this.addNamespaces(n),ZU(this.data,o,r),a.silent||this.emit("added",e,n,i,r)}addResources(e,n,i,r={silent:!1}){for(const a in i)(Vt(i[a])||Array.isArray(i[a]))&&this.addResource(e,n,a,i[a],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,a,s={silent:!1,skipCopy:!1}){let o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),r=i,i=n,n=o[1]),this.addNamespaces(n);let l=N_(this.data,o)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?aG(l,i,a):l={...l,...i},ZU(this.data,o,l),s.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var sG={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(a=>{e=this.processors[a]?.process(e,n,i,r)??e}),e}};const oG=Symbol("i18next/PATH_KEY");function dne(){const t=[],e=Object.create(null);let n;return e.get=(i,r)=>(n?.revoke?.(),r===oG?t:(t.push(r),n=Proxy.revocable(i,e),n.proxy)),Proxy.revocable(Object.create(null),e).proxy}function cN(t,e){const{[oG]:n}=t(dne());return n.join(e?.keySeparator??".")}const JU={},wA=t=>!Vt(t)&&typeof t!="boolean"&&typeof t!="number";class P_ extends FS{constructor(e,n={}){super(),ene(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Bo.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const i={...n};if(e==null)return!1;const r=this.resolve(e,i);if(r?.res===void 0)return!1;const a=wA(r.res);return!(i.returnObjects===!1&&a)}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!cne(e,i,r);if(s&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:Vt(a)?[a]:a};const c=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),e=c.join(r)}return{key:e,namespaces:Vt(a)?[a]:a}}translate(e,n,i){let r=typeof n=="object"?{...n}:n;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";typeof e=="function"&&(e=cN(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const a=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],r),c=l[l.length-1];let u=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const f=r.lng||this.language,m=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return m?a?{res:`${c}${u}${o}`,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:`${c}${u}${o}`:a?{res:o,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:o;const g=this.resolve(e,r);let y=g?.res;const _=g?.usedKey||o,v=g?.exactUsedKey||o,x=["[object Number]","[object Function]","[object RegExp]"],M=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,E=r.count!==void 0&&!Vt(r.count),T=P_.hasDefaultValue(r),P=E?this.pluralResolver.getSuffix(f,r.count,r):"",N=r.ordinal&&E?this.pluralResolver.getSuffix(f,r.count,{ordinal:!1}):"",j=E&&!r.ordinal&&r.count===0,C=j&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${P}`]||r[`defaultValue${N}`]||r.defaultValue;let k=y;w&&!y&&T&&(k=C);const F=wA(k),I=Object.prototype.toString.apply(k);if(w&&k&&F&&x.indexOf(I)<0&&!(Vt(M)&&Array.isArray(k))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const q=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,k,{...r,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(g.res=q,g.usedParams=this.getUsedParamsDetails(r),g):q}if(s){const q=Array.isArray(k),L=q?[]:{},H=q?v:_;for(const V in k)if(Object.prototype.hasOwnProperty.call(k,V)){const G=`${H}${s}${V}`;T&&!y?L[V]=this.translate(G,{...r,defaultValue:wA(C)?C[V]:void 0,joinArrays:!1,ns:l}):L[V]=this.translate(G,{...r,joinArrays:!1,ns:l}),L[V]===G&&(L[V]=k[V])}y=L}}else if(w&&Vt(M)&&Array.isArray(y))y=y.join(M),y&&(y=this.extendTranslation(y,e,r,i));else{let q=!1,L=!1;!this.isValidLookup(y)&&T&&(q=!0,y=C),this.isValidLookup(y)||(L=!0,y=o);const V=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:y,G=T&&C!==y&&this.options.updateMissing;if(L||q||G){if(this.logger.log(G?"updateKey":"missingKey",f,c,o,G?C:y),s){const B=this.resolve(o,{...r,keySeparator:!1});B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let K=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let B=0;B{const ce=T&&ae!==y?ae:V;this.options.missingKeyHandler?this.options.missingKeyHandler(B,c,X,ce,G,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(B,c,X,ce,G,r),this.emit("missingKey",B,c,X,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?K.forEach(B=>{const X=this.pluralResolver.getSuffixes(B,r);j&&r[`defaultValue${this.options.pluralSeparator}zero`]&&X.indexOf(`${this.options.pluralSeparator}zero`)<0&&X.push(`${this.options.pluralSeparator}zero`),X.forEach(ae=>{se([B],o+ae,r[`defaultValue${ae}`]||C)})}):se(K,o,C))}y=this.extendTranslation(y,e,r,g,i),L&&y===o&&this.options.appendNamespaceToMissingKey&&(y=`${c}${u}${o}`),(L||q)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${o}`:o,q?y:void 0,r))}return a?(g.res=y,g.usedParams=this.getUsedParamsDetails(r),g):y}extendTranslation(e,n,i,r,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const l=Vt(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let u=i.replace&&!Vt(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,i.lng||this.language||r.usedLng,i),l){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;ca?.[0]===f[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),i)),i.interpolation&&this.interpolator.reset()}const s=i.postProcess||this.options.postProcess,o=Vt(s)?[s]:s;return e!=null&&o?.length&&i.applyPostProcessor!==!1&&(e=sG.handle(o,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,n={}){let i,r,a,s,o;return Vt(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const c=this.extractFromKey(l,n),u=c.key;r=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!Vt(n.count),g=m&&!n.ordinal&&n.count===0,y=n.context!==void 0&&(Vt(n.context)||typeof n.context=="number")&&n.context!=="",_=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(v=>{this.isValidLookup(i)||(o=v,!JU[`${_[0]}-${v}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(JU[`${_[0]}-${v}`]=!0,this.logger.warn(`key "${r}" for languages "${_.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),_.forEach(x=>{if(this.isValidLookup(i))return;s=x;const M=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(M,u,x,v,n);else{let E;m&&(E=this.pluralResolver.getSuffix(x,n.count,n));const T=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&E.indexOf(P)===0&&M.push(u+E.replace(P,this.options.pluralSeparator)),M.push(u+E),g&&M.push(u+T)),y){const N=`${u}${this.options.contextSeparator||"_"}${n.context}`;M.push(N),m&&(n.ordinal&&E.indexOf(P)===0&&M.push(N+E.replace(P,this.options.pluralSeparator)),M.push(N+E),g&&M.push(N+T))}}let w;for(;w=M.pop();)this.isValidLookup(i)||(a=w,i=this.getResource(x,v,w,n))}))})}),{res:i,usedKey:r,exactUsedKey:a,usedLng:s,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!Vt(e.replace);let r=i?e.replace:e;if(i&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const a of n)delete r[a]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}class e4{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Bo.create("languageUtils")}getScriptPartFromCode(e){if(e=kx(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=kx(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(Vt(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getScriptPartFromCode(i);if(this.isSupportedCode(r))return n=r;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(s=>{if(s===a)return s;if(!(s.indexOf("-")<0&&a.indexOf("-")<0)&&(s.indexOf("-")>0&&a.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===a||s.indexOf(a)===0&&a.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),Vt(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),r=[],a=s=>{s&&(this.isSupportedCode(s)?r.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return Vt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):Vt(e)&&a(this.formatLanguageCode(e)),i.forEach(s=>{r.indexOf(s)<0&&a(this.formatLanguageCode(s))}),r}}const t4={zero:0,one:1,two:2,few:3,many:4,other:5},n4={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class fne{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Bo.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const i=kx(e==="dev"?"en":e),r=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:i,type:r});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let s;try{s=new Intl.PluralRules(i,{type:r})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),n4;if(!e.match(/-|_/))return n4;const l=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(l,n)}return this.pluralRulesCache[a]=s,s}needsPlural(e,n={}){let i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,i={}){return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e,n={}){let i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),i?i.resolvedOptions().pluralCategories.sort((r,a)=>t4[r]-t4[a]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(e,n,i={}){const r=this.getRule(e,i);return r?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,i))}}const i4=(t,e,n,i=".",r=!0)=>{let a=ine(t,e,n);return!a&&r&&Vt(n)&&(a=lN(t,n,i),a===void 0&&(a=lN(e,n,i))),a},MA=t=>t.replace(/\$/g,"$$$$");class hne{constructor(e={}){this.logger=Bo.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:a,prefixEscaped:s,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:g,nestingSuffix:y,nestingSuffixEscaped:_,nestingOptionsSeparator:v,maxReplaces:x,alwaysFormat:M}=e.interpolation;this.escape=n!==void 0?n:ane,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=a?Mh(a):s||"{{",this.suffix=o?Mh(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=m?Mh(m):g||Mh("$t("),this.nestingSuffix=y?Mh(y):_||Mh(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=x||1e3,this.alwaysFormat=M!==void 0?M:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n?.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let a,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const x=i4(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,i,{...r,...n,interpolationkey:g}):x}const y=g.split(this.formatSeparator),_=y.shift().trim(),v=y.join(this.formatSeparator).trim();return this.format(i4(n,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),v,i,{...r,...n,interpolationkey:_})};this.resetRegExp();const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>MA(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?MA(this.escape(g)):MA(g)}].forEach(g=>{for(o=0;a=g.regex.exec(e);){const y=a[1].trim();if(s=c(y),s===void 0)if(typeof u=="function"){const v=u(e,a,r);s=Vt(v)?v:""}else if(r&&Object.prototype.hasOwnProperty.call(r,y))s="";else if(f){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),s="";else!Vt(s)&&!this.useRawValueToEscape&&(s=XU(s));const _=g.safeValue(s);if(e=e.replace(a[0],_),f?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n,i={}){let r,a,s;const o=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,s);const g=m.match(/'/g),y=m.match(/"/g);((g?.length??0)%2===0&&!y||y.length%2!==0)&&(m=m.replace(/'/g,'"'));try{s=JSON.parse(m),c&&(s={...c,...s})}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,_),`${l}${u}${m}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l};for(;r=this.nestingRegexp.exec(e);){let l=[];s={...i},s=s.replace&&!Vt(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(l=r[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),a=n(o.call(this,r[1].trim(),s),s),a&&r[0]===e&&!Vt(a))return a;Vt(a)||(a=XU(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((u,f)=>this.format(u,f,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}const pne=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(s=>{if(s){const[o,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=o.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:n}},r4=t=>{const e={};return(n,i,r)=>{let a=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(a={...a,[r.interpolationkey]:void 0});const s=i+JSON.stringify(a);let o=e[s];return o||(o=t(kx(i),r),e[s]=o),o(n)}},mne=t=>(e,n,i)=>t(kx(n),i)(e);class gne{constructor(e={}){this.logger=Bo.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const i=n.cacheInBuiltFormats?r4:mne;this.formats={number:i((r,a)=>{const s=new Intl.NumberFormat(r,{...a});return o=>s.format(o)}),currency:i((r,a)=>{const s=new Intl.NumberFormat(r,{...a,style:"currency"});return o=>s.format(o)}),datetime:i((r,a)=>{const s=new Intl.DateTimeFormat(r,{...a});return o=>s.format(o)}),relativetime:i((r,a)=>{const s=new Intl.RelativeTimeFormat(r,{...a});return o=>s.format(o,a.range||"day")}),list:i((r,a)=>{const s=new Intl.ListFormat(r,{...a});return o=>s.format(o)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=r4(n)}format(e,n,i,r={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(o=>o.indexOf(")")>-1)){const o=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,o)].join(this.formatSeparator)}return a.reduce((o,l)=>{const{formatName:c,formatOptions:u}=pne(l);if(this.formats[c]){let f=o;try{const m=r?.formatParams?.[r.interpolationkey]||{},g=m.locale||m.lng||r.locale||r.lng||i;f=this.formats[c](o,g,{...u,...r,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${c}`);return o},e)}}const xne=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class vne extends FS{constructor(e,n,i,r={}){super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=Bo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,r.backend,r)}queueLoad(e,n,i,r){const a={},s={},o={},l={};return e.forEach(c=>{let u=!0;n.forEach(f=>{const m=`${c}|${f}`;!i.reload&&this.store.hasResourceBundle(c,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?s[m]===void 0&&(s[m]=!0):(this.state[m]=1,u=!1,s[m]===void 0&&(s[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),u||(o[c]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const r=e.split("|"),a=r[0],s=r[1];n&&this.emit("failedLoading",a,s,n),!n&&i&&this.store.addResourceBundle(a,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const o={};this.queue.forEach(l=>{nne(l.loaded,[a],s),xne(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{o[c][f]===void 0&&(o[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,n,i,r=0,a=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:a,callback:s});return}this.readingCalls++;const o=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&u&&r{this.read.call(this,e,n,i,r+1,a*2,s)},a);return}s(c,u)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const c=l(e,n);c&&typeof c.then=="function"?c.then(u=>o(null,u)).catch(o):o(null,c)}catch(c){o(c)}return}return l(e,n,o)}prepareLoading(e,n,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Vt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Vt(n)&&(n=[n]);const a=this.queueLoad(e,n,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e,n=""){const i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${r} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${a} for language ${r}`,o),this.loaded(e,s,o)})}saveMissing(e,n,i,r,a,s={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${i}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const l={...s,isUpdate:a},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(e,n,i,r,l):u=c(e,n,i,r),u&&typeof u.then=="function"?u.then(f=>o(null,f)).catch(o):o(null,u)}catch(u){o(u)}else c(e,n,i,r,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}const a4=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Vt(t[1])&&(e.defaultValue=t[1]),Vt(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),s4=t=>(Vt(t.ns)&&(t.ns=[t.ns]),Vt(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Vt(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),My=()=>{},yne=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class ux extends FS{constructor(e={},n){if(super(),this.options=s4(e),this.services={},this.logger=Bo,this.modules={external:[]},yne(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(Vt(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=a4();this.options={...i,...this.options,...s4(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Bo.init(r(this.modules.logger),this.options):Bo.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=gne;const u=new e4(this.options);this.store=new QU(this.options.resources,this.options);const f=this.services;f.logger=Bo,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new fne(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=r(c),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new hne(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new vne(r(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(g,...y)=>{this.emit(g,...y)}),this.modules.languageDetector&&(f.languageDetector=r(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=r(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new P_(this.services,this.options),this.translator.on("*",(g,...y)=>{this.emit(g,...y)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=My),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const o=Ag(),l=()=>{const c=(u,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(f),n(u,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,n=My){let i=n;const r=Vt(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(c=>{c!=="cimode"&&a.indexOf(c)<0&&a.push(c)})};r?s(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload?.forEach?.(o=>s(o)),this.services.backendConnector.load(a,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,n,i){const r=Ag();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=My),this.services.backendConnector.reload(e,n,a=>{r.resolve(),i(a)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&sG.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const i=Ag();this.emit("languageChanging",e);const r=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},a=(o,l)=>{l?this.isLanguageChangingTo===e&&(r(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve((...c)=>this.t(...c)),n&&n(o,(...c)=>this.t(...c))},s=o=>{!e&&!o&&this.services.languageDetector&&(o=[]);const l=Vt(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(Vt(o)?[o]:o);c&&(this.language||r(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,u=>{a(u,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,n,i){const r=(a,s,...o)=>{let l;typeof s!="object"?l=this.options.overloadTranslationOptionHandler([a,s].concat(o)):l={...s},l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||i||r.keyPrefix);const c=this.options.keySeparator||".";let u;return l.keyPrefix&&Array.isArray(a)?u=a.map(f=>(typeof f=="function"&&(f=cN(f,{...this.options,...s})),`${l.keyPrefix}${c}${f}`)):(typeof a=="function"&&(a=cN(a,{...this.options,...s})),u=l.keyPrefix?`${l.keyPrefix}${c}${a}`:a),this.t(u,l)};return Vt(e)?r.lng=e:r.lngs=e,r.ns=n,r.keyPrefix=i,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!r||s(a,e)))}loadNamespaces(e,n){const i=Ag();return this.options.ns?(Vt(e)&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Ag();Vt(e)&&(e=[e]);const r=this.options.preload||[],a=e.filter(s=>r.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=r.concat(a),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const r=new Intl.Locale(e);if(r&&r.getTextInfo){const a=r.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services?.languageUtils||new e4(a4());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const i=new ux(e,n);return i.createInstance=ux.createInstance,i}cloneInstance(e={},n=My){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new ux(r);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,f)=>(u[f]={...l[c][f]},u),l[c]),l),{});a.store=new QU(o,r),a.services.resourceStore=a.store}return a.translator=new P_(a.services,r),a.translator.on("*",(o,...l)=>{a.emit(o,...l)}),a.init(r,n),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const wa=ux.createInstance();wa.createInstance;wa.dir;wa.init;wa.loadResources;wa.reloadResources;wa.use;wa.changeLanguage;wa.getFixedT;wa.t;wa.exists;wa.setDefaultNamespace;wa.hasLoadedNamespace;wa.loadNamespaces;wa.loadLanguages;const bne=(t,e,n,i)=>{const r=[n,{code:e,...i||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(r,"warn","react-i18next::",!0);yf(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...r):console?.warn&&console.warn(...r)},o4={},lG=(t,e,n,i)=>{yf(n)&&o4[n]||(yf(n)&&(o4[n]=new Date),bne(t,e,n,i))},cG=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},uN=(t,e,n)=>{t.loadNamespaces(e,cG(t,n))},l4=(t,e,n,i)=>{if(yf(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return uN(t,n,i);n.forEach(r=>{t.options.ns.indexOf(r)<0&&t.options.ns.push(r)}),t.loadLanguages(e,cG(t,i))},_ne=(t,e,n={})=>!e.languages||!e.languages.length?(lG(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(i,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,t))return!1}}),yf=t=>typeof t=="string",Sne=t=>typeof t=="object"&&t!==null,wne=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Mne={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Ene=t=>Mne[t],Ane=t=>t.replace(wne,Ene);let dN={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Ane};const Tne=(t={})=>{dN={...dN,...t}},Cne=()=>dN;let uG;const Nne=t=>{uG=t},Rne=()=>uG,Pne={type:"3rdParty",init(t){Tne(t.options.react),Nne(t)}},kne=A.createContext();class Dne{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var EA={exports:{}},AA={};var c4;function One(){if(c4)return AA;c4=1;var t=dm();function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:e,i=t.useState,r=t.useEffect,a=t.useLayoutEffect,s=t.useDebugValue;function o(f,m){var g=m(),y=i({inst:{value:g,getSnapshot:m}}),_=y[0].inst,v=y[1];return a(function(){_.value=g,_.getSnapshot=m,l(_)&&v({inst:_})},[f,g,m]),r(function(){return l(_)&&v({inst:_}),f(function(){l(_)&&v({inst:_})})},[f]),s(g),g}function l(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!n(f,g)}catch{return!0}}function c(f,m){return m()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;return AA.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,AA}var u4;function dG(){return u4||(u4=1,EA.exports=One()),EA.exports}var gP=dG();const Lne=(t,e)=>yf(e)?e:Sne(e)&&yf(e.defaultValue)?e.defaultValue:Array.isArray(t)?t[t.length-1]:t,Ine={t:Lne,ready:!1},jne=()=>()=>{},xP=(t,e={})=>{const{i18n:n}=e,{i18n:i,defaultNS:r}=A.useContext(kne)||{},a=n||i||Rne();a&&!a.reportNamespaces&&(a.reportNamespaces=new Dne),a||lG(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=A.useMemo(()=>({...Cne(),...a?.options?.react,...e}),[a,e]),{useSuspense:o,keyPrefix:l}=s,c=r||a?.options?.defaultNS,u=yf(c)?[c]:c||["translation"],f=A.useMemo(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(f);const m=A.useRef(0),g=A.useCallback(C=>{if(!a)return jne;const{bindI18n:k,bindI18nStore:F}=s,I=()=>{m.current+=1,C()};return k&&a.on(k,I),F&&a.store.on(F,I),()=>{k&&k.split(" ").forEach(q=>a.off(q,I)),F&&F.split(" ").forEach(q=>a.store.off(q,I))}},[a,s]),y=A.useRef(),_=A.useCallback(()=>{if(!a)return Ine;const C=!!(a.isInitialized||a.initializedStoreOnce)&&f.every(H=>_ne(H,a,s)),k=e.lng||a.language,F=m.current,I=y.current;if(I&&I.ready===C&&I.lng===k&&I.keyPrefix===l&&I.revision===F)return I;const L={t:a.getFixedT(k,s.nsMode==="fallback"?f:f[0],l),ready:C,lng:k,keyPrefix:l,revision:F};return y.current=L,L},[a,f,l,s,e.lng]),[v,x]=A.useState(0),{t:M,ready:w}=gP.useSyncExternalStore(g,_,_);A.useEffect(()=>{if(a&&!w&&!o){const C=()=>x(k=>k+1);e.lng?l4(a,e.lng,f,C):uN(a,f,C)}},[a,e.lng,f,w,o,v]);const E=a||{},T=A.useRef(null),P=A.useRef(),N=C=>{const k=Object.getOwnPropertyDescriptors(C);k.__original&&delete k.__original;const F=Object.create(Object.getPrototypeOf(C),k);if(!Object.prototype.hasOwnProperty.call(F,"__original"))try{Object.defineProperty(F,"__original",{value:C,writable:!1,enumerable:!1,configurable:!1})}catch{}return F},j=A.useMemo(()=>{const C=E,k=C?.language;let F=C;C&&(T.current&&T.current.__original===C?P.current!==k?(F=N(C),T.current=F,P.current=k):F=T.current:(F=N(C),T.current=F,P.current=k));const I=[M,F,w];return I.t=M,I.i18n=F,I.ready=w,I},[M,E,w,E.resolvedLanguage,E.language,E.languages]);if(a&&o&&!w)throw new Promise(C=>{const k=()=>C();e.lng?l4(a,e.lng,f,k):uN(a,f,k)});return j},{slice:Une,forEach:Fne}=[];function zne(t){return Fne.call(Une.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function Bne(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const d4=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Hne=function(t,e){const i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},r=encodeURIComponent(e);let a=`${t}=${r}`;if(i.maxAge>0){const s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(s)}`}if(i.domain){if(!d4.test(i.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${i.domain}`}if(i.path){if(!d4.test(i.path))throw new TypeError("option path is invalid");a+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(a+="; Partitioned"),a},f4={create(t,e,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=Hne(t,e,r)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let i=0;i-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let s=0;s0&&a[s].substring(0,o)===e&&(n=a[s].substring(o+1))}}return n}},Gne={name:"hash",lookup(t){let{lookupHash:e,lookupFromHashIndex:n}=t,i;if(typeof window<"u"){const{hash:r}=window.location;if(r&&r.length>2){const a=r.substring(1);if(e){const s=a.split("&");for(let o=0;o0&&s[o].substring(0,l)===e&&(i=s[o].substring(l+1))}}if(i)return i;if(!i&&n>-1){const s=r.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return i}};let Eh=null;const h4=()=>{if(Eh!==null)return Eh;try{if(Eh=typeof window<"u"&&window.localStorage!==null,!Eh)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Eh=!1}return Eh};var Wne={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&h4())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&h4()&&window.localStorage.setItem(n,t)}};let Ah=null;const p4=()=>{if(Ah!==null)return Ah;try{if(Ah=typeof window<"u"&&window.sessionStorage!==null,!Ah)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Ah=!1}return Ah};var qne={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&p4())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&p4()&&window.sessionStorage.setItem(n,t)}},Xne={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:i,language:r}=navigator;if(n)for(let a=0;a0?e:void 0}},Kne={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const i=e||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},Yne={name:"path",lookup(t){let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof e=="number"?e:0]?.replace("/",""):void 0}},Zne={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,i=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};let fG=!1;try{document.cookie,fG=!0}catch{}const hG=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];fG||hG.splice(1,1);const Qne=()=>({order:hG,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class pG{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=zne(n,this.options||{},Qne()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Vne),this.addDetector($ne),this.addDetector(Wne),this.addDetector(qne),this.addDetector(Xne),this.addDetector(Kne),this.addDetector(Yne),this.addDetector(Zne),this.addDetector(Gne)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(i=>{if(this.detectors[i]){let r=this.detectors[i].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(n=n.concat(r))}}),n=n.filter(i=>i!=null&&!Bne(i)).map(i=>this.options.convertDetectedLanguage(i)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(e,this.options)}))}}pG.type="languageDetector";const Jne={nav:{printers:"Printers",control:"Control",archives:"Archives",queue:"Queue",stats:"Statistics",profiles:"Profiles",maintenance:"Maintenance",settings:"Settings",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",update:"Update",updateAvailable:"Update available: v{{version}}",viewOnGithub:"View on GitHub",keyboardShortcuts:"Keyboard shortcuts (?)",switchToLight:"Switch to light mode",switchToDark:"Switch to dark mode"},common:{save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",close:"Close",confirm:"Confirm",loading:"Loading...",error:"Error",success:"Success",warning:"Warning",enabled:"Enabled",disabled:"Disabled",yes:"Yes",no:"No",on:"On",off:"Off",all:"All",none:"None",search:"Search",filter:"Filter",sort:"Sort",refresh:"Refresh",download:"Download",upload:"Upload",actions:"Actions",status:"Status",name:"Name",description:"Description",date:"Date",time:"Time",hours:"hours",minutes:"minutes",seconds:"seconds",noPrinters:"No printers configured",noData:"No data available",required:"Required",optional:"Optional"},printers:{title:"Printers",addPrinter:"Add Printer",editPrinter:"Edit Printer",deletePrinter:"Delete Printer",printerName:"Printer Name",serialNumber:"Serial Number",ipAddress:"IP Address",accessCode:"Access Code",model:"Model",nozzleCount:"Nozzle Count",autoArchive:"Auto Archive",status:{idle:"Idle",printing:"Printing",paused:"Paused",offline:"Offline",error:"Error",finished:"Finished",unknown:"Unknown"},temperatures:{nozzle:"Nozzle",bed:"Bed",chamber:"Chamber"},progress:"{{percent}}% complete",timeRemaining:"{{time}} remaining",deleteConfirm:'Are you sure you want to delete "{{name}}"?',maintenanceOk:"Maintenance OK",maintenanceWarning:"{{count}} warning",maintenanceWarning_plural:"{{count}} warnings",maintenanceDue:"{{count}} due",maintenanceDue_plural:"{{count}} due"},archives:{title:"Print Archives",searchPlaceholder:"Search archives...",filterByPrinter:"Filter by printer",filterByStatus:"Filter by status",sortBy:"Sort by",sortNewest:"Newest first",sortOldest:"Oldest first",sortName:"Name",sortDuration:"Duration",noArchives:"No archives found",printTime:"Print Time",filamentUsed:"Filament Used",cost:"Cost",reprint:"Reprint",preview:"Preview",deleteArchive:"Delete Archive",deleteConfirm:"Are you sure you want to delete this archive?",favorite:"Favorite",unfavorite:"Remove from favorites",viewDetails:"View Details",status:{completed:"Completed",failed:"Failed",stopped:"Stopped"}},queue:{title:"Print Queue",addToQueue:"Add to Queue",clearQueue:"Clear Queue",emptyQueue:"Queue is empty",position:"Position",scheduledTime:"Scheduled Time",moveUp:"Move Up",moveDown:"Move Down",remove:"Remove",startNow:"Start Now",status:{pending:"Pending",printing:"Printing",completed:"Completed",failed:"Failed",cancelled:"Cancelled"}},stats:{title:"Statistics",overview:"Overview",totalPrints:"Total Prints",successRate:"Success Rate",totalPrintTime:"Total Print Time",totalFilament:"Total Filament Used",totalCost:"Total Cost",averagePrintTime:"Average Print Time",printsPerDay:"Prints per Day",byPrinter:"By Printer",byMaterial:"By Material",byMonth:"By Month",last7Days:"Last 7 Days",last30Days:"Last 30 Days",last90Days:"Last 90 Days",allTime:"All Time"},profiles:{title:"Filament Profiles",addProfile:"Add Profile",editProfile:"Edit Profile",deleteProfile:"Delete Profile",material:"Material",brand:"Brand",color:"Color",diameter:"Diameter",density:"Density",costPerKg:"Cost per kg",spoolWeight:"Spool Weight",noProfiles:"No profiles configured",deleteConfirm:"Are you sure you want to delete this profile?"},maintenance:{title:"Maintenance",overview:"Overview",allOk:"All maintenance up to date",dueCount:"{{count}} item due",dueCount_plural:"{{count}} items due",warningCount:"{{count}} warning",warningCount_plural:"{{count}} warnings",totalPrintTime:"Total Print Time",nextMaintenance:"Next Maintenance",nothingDue:"Nothing due",tasks:"Tasks",lastPerformed:"Last performed",interval:"Interval",hoursRemaining:"{{hours}}h remaining",hoursOverdue:"{{hours}}h overdue",markDone:"Mark as Done",performMaintenance:"Perform Maintenance",history:"History",noHistory:"No maintenance history",editPrintHours:"Edit Print Hours",currentHours:"Current Hours",types:{lubricateRails:"Lubricate Linear Rails",cleanNozzle:"Clean Nozzle/Hotend",checkBelts:"Check Belt Tension",cleanBuildPlate:"Clean Build Plate",checkExtruder:"Check Extruder Gears",checkCooling:"Check Cooling Fans",generalInspection:"General Inspection"}},settings:{title:"Settings",general:"General",appearance:"Appearance",notifications:"Notifications",smartPlugs:"Smart Plugs",spoolman:"Spoolman",updates:"Updates",language:"Language",languageDescription:"Select your preferred language",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",defaultView:"Default View",defaultViewDescription:"Page to show when opening the app",checkForUpdates:"Check for Updates",autoUpdate:"Auto Update",currentVersion:"Current Version",latestVersion:"Latest Version",upToDate:"You are up to date",updateAvailable:"Update available",notificationLanguage:"Notification Language",notificationLanguageDescription:"Language for push notifications",notificationProviders:"Notification Providers",addProvider:"Add Provider",editProvider:"Edit Provider",providerType:"Provider Type",testNotification:"Test Notification",testSuccess:"Test notification sent successfully",testFailed:"Failed to send test notification",quietHours:"Quiet Hours",quietHoursDescription:"Do not disturb during these hours",quietHoursStart:"Start",quietHoursEnd:"End",events:{title:"Notification Events",printStart:"Print Started",printComplete:"Print Completed",printFailed:"Print Failed",printStopped:"Print Stopped",printProgress:"Progress Milestones",printProgressDescription:"Notify at 25%, 50%, 75%",printerOffline:"Printer Offline",printerError:"Printer Error",filamentLow:"Low Filament",maintenanceDue:"Maintenance Due",maintenanceDueDescription:"Notify when maintenance is needed"},smartPlug:{title:"Smart Plugs",add:"Add Smart Plug",edit:"Edit Smart Plug",name:"Name",ipAddress:"IP Address",linkedPrinter:"Linked Printer",autoOn:"Auto Power On",autoOnDescription:"Turn on when print starts",autoOff:"Auto Power Off",autoOffDescription:"Turn off after print completes",offDelay:"Off Delay",offDelayMinutes:"Minutes after print",offDelayTemp:"When nozzle below temperature",currentState:"Current State",turnOn:"Turn On",turnOff:"Turn Off"},spoolmanEnabled:"Enable Spoolman Integration",spoolmanUrl:"Spoolman URL",spoolmanConnected:"Connected",spoolmanDisconnected:"Disconnected"},notification:{printStarted:{title:"Print Started",body:"{{printer}}: {{filename}} has started printing"},printCompleted:{title:"Print Completed",body:"{{printer}}: {{filename}} completed successfully"},printFailed:{title:"Print Failed",body:"{{printer}}: {{filename}} has failed"},printStopped:{title:"Print Stopped",body:"{{printer}}: {{filename}} was stopped"},printProgress:{title:"Print Progress",body:"{{printer}}: {{filename}} is {{percent}}% complete"},printerOffline:{title:"Printer Offline",body:"{{printer}} is offline"},printerError:{title:"Printer Error",body:"{{printer}}: {{error}}"},filamentLow:{title:"Low Filament",body:"{{printer}}: Filament is running low"},maintenanceDue:{title:"Maintenance Due",body:"{{printer}}: {{items}} need attention"}},errors:{generic:"Something went wrong",networkError:"Network error. Please check your connection.",notFound:"Not found",unauthorized:"Unauthorized",serverError:"Server error",validationError:"Please check your input",printerConnectionFailed:"Failed to connect to printer",saveFailed:"Failed to save changes",deleteFailed:"Failed to delete",loadFailed:"Failed to load data"},confirm:{delete:"Are you sure you want to delete this?",unsavedChanges:"You have unsaved changes. Are you sure you want to leave?",clearQueue:"Are you sure you want to clear the queue?"}},eie={nav:{printers:"Drucker",control:"Steuerung",archives:"Archiv",queue:"Warteschlange",stats:"Statistiken",profiles:"Profile",maintenance:"Wartung",settings:"Einstellungen",collapseSidebar:"Seitenleiste einklappen",expandSidebar:"Seitenleiste ausklappen",update:"Update",updateAvailable:"Update verfügbar: v{{version}}",viewOnGithub:"Auf GitHub ansehen",keyboardShortcuts:"Tastaturkürzel (?)",switchToLight:"Zum hellen Modus wechseln",switchToDark:"Zum dunklen Modus wechseln"},common:{save:"Speichern",cancel:"Abbrechen",delete:"Löschen",edit:"Bearbeiten",add:"Hinzufügen",close:"Schließen",confirm:"Bestätigen",loading:"Lädt...",error:"Fehler",success:"Erfolg",warning:"Warnung",enabled:"Aktiviert",disabled:"Deaktiviert",yes:"Ja",no:"Nein",on:"An",off:"Aus",all:"Alle",none:"Keine",search:"Suchen",filter:"Filtern",sort:"Sortieren",refresh:"Aktualisieren",download:"Herunterladen",upload:"Hochladen",actions:"Aktionen",status:"Status",name:"Name",description:"Beschreibung",date:"Datum",time:"Zeit",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden",noPrinters:"Keine Drucker konfiguriert",noData:"Keine Daten verfügbar",required:"Erforderlich",optional:"Optional"},printers:{title:"Drucker",addPrinter:"Drucker hinzufügen",editPrinter:"Drucker bearbeiten",deletePrinter:"Drucker löschen",printerName:"Druckername",serialNumber:"Seriennummer",ipAddress:"IP-Adresse",accessCode:"Zugangscode",model:"Modell",nozzleCount:"Düsenanzahl",autoArchive:"Automatische Archivierung",status:{idle:"Bereit",printing:"Druckt",paused:"Pausiert",offline:"Offline",error:"Fehler",finished:"Fertig",unknown:"Unbekannt"},temperatures:{nozzle:"Düse",bed:"Druckbett",chamber:"Kammer"},progress:"{{percent}}% abgeschlossen",timeRemaining:"Noch {{time}}",deleteConfirm:'Möchten Sie "{{name}}" wirklich löschen?',maintenanceOk:"Wartung OK",maintenanceWarning:"{{count}} Warnung",maintenanceWarning_plural:"{{count}} Warnungen",maintenanceDue:"{{count}} fällig",maintenanceDue_plural:"{{count}} fällig"},archives:{title:"Druckarchiv",searchPlaceholder:"Archiv durchsuchen...",filterByPrinter:"Nach Drucker filtern",filterByStatus:"Nach Status filtern",sortBy:"Sortieren nach",sortNewest:"Neueste zuerst",sortOldest:"Älteste zuerst",sortName:"Name",sortDuration:"Dauer",noArchives:"Keine Archive gefunden",printTime:"Druckzeit",filamentUsed:"Verbrauchtes Filament",cost:"Kosten",reprint:"Erneut drucken",preview:"Vorschau",deleteArchive:"Archiv löschen",deleteConfirm:"Möchten Sie dieses Archiv wirklich löschen?",favorite:"Favorit",unfavorite:"Aus Favoriten entfernen",viewDetails:"Details anzeigen",status:{completed:"Abgeschlossen",failed:"Fehlgeschlagen",stopped:"Gestoppt"}},queue:{title:"Druckwarteschlange",addToQueue:"Zur Warteschlange hinzufügen",clearQueue:"Warteschlange leeren",emptyQueue:"Warteschlange ist leer",position:"Position",scheduledTime:"Geplante Zeit",moveUp:"Nach oben",moveDown:"Nach unten",remove:"Entfernen",startNow:"Jetzt starten",status:{pending:"Ausstehend",printing:"Druckt",completed:"Abgeschlossen",failed:"Fehlgeschlagen",cancelled:"Abgebrochen"}},stats:{title:"Statistiken",overview:"Übersicht",totalPrints:"Gesamtdrucke",successRate:"Erfolgsrate",totalPrintTime:"Gesamtdruckzeit",totalFilament:"Gesamtverbrauch Filament",totalCost:"Gesamtkosten",averagePrintTime:"Durchschnittliche Druckzeit",printsPerDay:"Drucke pro Tag",byPrinter:"Nach Drucker",byMaterial:"Nach Material",byMonth:"Nach Monat",last7Days:"Letzte 7 Tage",last30Days:"Letzte 30 Tage",last90Days:"Letzte 90 Tage",allTime:"Gesamt"},profiles:{title:"Filament-Profile",addProfile:"Profil hinzufügen",editProfile:"Profil bearbeiten",deleteProfile:"Profil löschen",material:"Material",brand:"Marke",color:"Farbe",diameter:"Durchmesser",density:"Dichte",costPerKg:"Kosten pro kg",spoolWeight:"Spulengewicht",noProfiles:"Keine Profile konfiguriert",deleteConfirm:"Möchten Sie dieses Profil wirklich löschen?"},maintenance:{title:"Wartung",overview:"Übersicht",allOk:"Alle Wartungen aktuell",dueCount:"{{count}} Aufgabe fällig",dueCount_plural:"{{count}} Aufgaben fällig",warningCount:"{{count}} Warnung",warningCount_plural:"{{count}} Warnungen",totalPrintTime:"Gesamtdruckzeit",nextMaintenance:"Nächste Wartung",nothingDue:"Nichts fällig",tasks:"Aufgaben",lastPerformed:"Zuletzt durchgeführt",interval:"Intervall",hoursRemaining:"{{hours}}h verbleibend",hoursOverdue:"{{hours}}h überfällig",markDone:"Als erledigt markieren",performMaintenance:"Wartung durchführen",history:"Verlauf",noHistory:"Kein Wartungsverlauf",editPrintHours:"Druckstunden bearbeiten",currentHours:"Aktuelle Stunden",types:{lubricateRails:"Linearschienen schmieren",cleanNozzle:"Düse/Hotend reinigen",checkBelts:"Riemenspannung prüfen",cleanBuildPlate:"Druckbett reinigen",checkExtruder:"Extruderzahnräder prüfen",checkCooling:"Kühlungslüfter prüfen",generalInspection:"Allgemeine Inspektion"}},settings:{title:"Einstellungen",general:"Allgemein",appearance:"Erscheinungsbild",notifications:"Benachrichtigungen",smartPlugs:"Smart Plugs",spoolman:"Spoolman",updates:"Updates",language:"Sprache",languageDescription:"Wählen Sie Ihre bevorzugte Sprache",theme:"Design",themeLight:"Hell",themeDark:"Dunkel",themeSystem:"System",defaultView:"Standardansicht",defaultViewDescription:"Seite, die beim Öffnen der App angezeigt wird",checkForUpdates:"Nach Updates suchen",autoUpdate:"Automatische Updates",currentVersion:"Aktuelle Version",latestVersion:"Neueste Version",upToDate:"Sie sind auf dem neuesten Stand",updateAvailable:"Update verfügbar",notificationLanguage:"Benachrichtigungssprache",notificationLanguageDescription:"Sprache für Push-Benachrichtigungen",notificationProviders:"Benachrichtigungsanbieter",addProvider:"Anbieter hinzufügen",editProvider:"Anbieter bearbeiten",providerType:"Anbietertyp",testNotification:"Testbenachrichtigung",testSuccess:"Testbenachrichtigung erfolgreich gesendet",testFailed:"Testbenachrichtigung konnte nicht gesendet werden",quietHours:"Ruhezeiten",quietHoursDescription:"Keine Störungen während dieser Zeiten",quietHoursStart:"Beginn",quietHoursEnd:"Ende",events:{title:"Benachrichtigungsereignisse",printStart:"Druck gestartet",printComplete:"Druck abgeschlossen",printFailed:"Druck fehlgeschlagen",printStopped:"Druck gestoppt",printProgress:"Fortschrittsmeldungen",printProgressDescription:"Bei 25%, 50%, 75% benachrichtigen",printerOffline:"Drucker offline",printerError:"Druckerfehler",filamentLow:"Filament niedrig",maintenanceDue:"Wartung fällig",maintenanceDueDescription:"Benachrichtigen, wenn Wartung erforderlich"},smartPlug:{title:"Smart Plugs",add:"Smart Plug hinzufügen",edit:"Smart Plug bearbeiten",name:"Name",ipAddress:"IP-Adresse",linkedPrinter:"Verknüpfter Drucker",autoOn:"Automatisch einschalten",autoOnDescription:"Einschalten beim Druckstart",autoOff:"Automatisch ausschalten",autoOffDescription:"Ausschalten nach Druckende",offDelay:"Ausschaltverzögerung",offDelayMinutes:"Minuten nach Druck",offDelayTemp:"Wenn Düse unter Temperatur",currentState:"Aktueller Status",turnOn:"Einschalten",turnOff:"Ausschalten"},spoolmanEnabled:"Spoolman-Integration aktivieren",spoolmanUrl:"Spoolman URL",spoolmanConnected:"Verbunden",spoolmanDisconnected:"Nicht verbunden"},notification:{printStarted:{title:"Druck gestartet",body:"{{printer}}: {{filename}} wird gedruckt"},printCompleted:{title:"Druck abgeschlossen",body:"{{printer}}: {{filename}} erfolgreich abgeschlossen"},printFailed:{title:"Druck fehlgeschlagen",body:"{{printer}}: {{filename}} ist fehlgeschlagen"},printStopped:{title:"Druck gestoppt",body:"{{printer}}: {{filename}} wurde gestoppt"},printProgress:{title:"Druckfortschritt",body:"{{printer}}: {{filename}} ist zu {{percent}}% abgeschlossen"},printerOffline:{title:"Drucker offline",body:"{{printer}} ist offline"},printerError:{title:"Druckerfehler",body:"{{printer}}: {{error}}"},filamentLow:{title:"Filament niedrig",body:"{{printer}}: Filament geht zur Neige"},maintenanceDue:{title:"Wartung fällig",body:"{{printer}}: {{items}} benötigen Aufmerksamkeit"}},errors:{generic:"Etwas ist schiefgelaufen",networkError:"Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung.",notFound:"Nicht gefunden",unauthorized:"Nicht autorisiert",serverError:"Serverfehler",validationError:"Bitte überprüfen Sie Ihre Eingabe",printerConnectionFailed:"Verbindung zum Drucker fehlgeschlagen",saveFailed:"Speichern fehlgeschlagen",deleteFailed:"Löschen fehlgeschlagen",loadFailed:"Laden der Daten fehlgeschlagen"},confirm:{delete:"Möchten Sie dies wirklich löschen?",unsavedChanges:"Sie haben ungespeicherte Änderungen. Möchten Sie wirklich verlassen?",clearQueue:"Möchten Sie die Warteschlange wirklich leeren?"}},tie={en:{translation:Jne},de:{translation:eie}};wa.use(pG).use(Pne).init({resources:tie,fallbackLng:"en",supportedLngs:["en","de"],detection:{order:["localStorage","navigator","htmlTag"],lookupLocalStorage:"bambutrack_language",caches:["localStorage"]},interpolation:{escapeValue:!1},react:{useSuspense:!1}});const m4=[{code:"en",name:"English",nativeName:"English"},{code:"de",name:"German",nativeName:"Deutsch"}];var g4="popstate";function nie(t={}){function e(i,r){let{pathname:a,search:s,hash:o}=i.location;return fN("",{pathname:a,search:s,hash:o},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(i,r){return typeof r=="string"?r:Dx(r)}return rie(e,n,null,t)}function mi(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Ws(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function iie(){return Math.random().toString(36).substring(2,10)}function x4(t,e){return{usr:t.state,key:t.key,idx:e}}function fN(t,e,n=null,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?fm(e):e,state:n,key:e&&e.key||i||iie()}}function Dx({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function fm(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substring(i),t=t.substring(0,i)),t&&(e.pathname=t)}return e}function rie(t,e,n,i={}){let{window:r=document.defaultView,v5Compat:a=!1}=i,s=r.history,o="POP",l=null,c=u();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function u(){return(s.state||{idx:null}).idx}function f(){o="POP";let v=u(),x=v==null?null:v-c;c=v,l&&l({action:o,location:_.location,delta:x})}function m(v,x){o="PUSH";let M=fN(_.location,v,x);c=u()+1;let w=x4(M,c),E=_.createHref(M);try{s.pushState(w,"",E)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;r.location.assign(E)}a&&l&&l({action:o,location:_.location,delta:1})}function g(v,x){o="REPLACE";let M=fN(_.location,v,x);c=u();let w=x4(M,c),E=_.createHref(M);s.replaceState(w,"",E),a&&l&&l({action:o,location:_.location,delta:0})}function y(v){return aie(v)}let _={get action(){return o},get location(){return t(r,s)},listen(v){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(g4,f),l=v,()=>{r.removeEventListener(g4,f),l=null}},createHref(v){return e(r,v)},createURL:y,encodeLocation(v){let x=y(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:g,go(v){return s.go(v)}};return _}function aie(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mi(n,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:Dx(t);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function mG(t,e,n="/"){return sie(t,e,n,!1)}function sie(t,e,n,i){let r=typeof e=="string"?fm(e):e,a=uc(r.pathname||"/",n);if(a==null)return null;let s=gG(t);oie(s);let o=null;for(let l=0;o==null&&l{let u={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(i)&&l)return;mi(u.relativePath.startsWith(i),`Absolute route path "${u.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(i.length)}let f=nc([i,u.relativePath]),m=n.concat(u);s.children&&s.children.length>0&&(mi(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),gG(s.children,e,m,f,l)),!(s.path==null&&!s.index)&&e.push({path:f,score:pie(f,s.index),routesMeta:m})};return t.forEach((s,o)=>{if(s.path===""||!s.path?.includes("?"))a(s,o);else for(let l of xG(s.path))a(s,o,!0,l)}),e}function xG(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),a=n.replace(/\?$/,"");if(i.length===0)return r?[a,""]:[a];let s=xG(i.join("/")),o=[];return o.push(...s.map(l=>l===""?a:[a,l].join("/"))),r&&o.push(...s),o.map(l=>t.startsWith("/")&&l===""?"/":l)}function oie(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:mie(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var lie=/^:[\w-]+$/,cie=3,uie=2,die=1,fie=10,hie=-2,v4=t=>t==="*";function pie(t,e){let n=t.split("/"),i=n.length;return n.some(v4)&&(i+=hie),e&&(i+=uie),n.filter(r=>!v4(r)).reduce((r,a)=>r+(lie.test(a)?cie:a===""?die:fie),i)}function mie(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function gie(t,e,n=!1){let{routesMeta:i}=t,r={},a="/",s=[];for(let o=0;o{if(u==="*"){let y=o[m]||"";s=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const g=o[m];return f&&!g?c[u]=void 0:c[u]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:s,pattern:t}}function xie(t,e=!1,n=!0){Ws(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l)=>(i.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function vie(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ws(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function uc(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}var yie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bie=t=>yie.test(t);function _ie(t,e="/"){let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?fm(t):t,a;if(n)if(bie(n))a=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),Ws(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${n}`)}n.startsWith("/")?a=y4(n.substring(1),"/"):a=y4(n,e)}else a=e;return{pathname:a,search:Mie(i),hash:Eie(r)}}function y4(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function TA(t,e,n,i){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Sie(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function vG(t){let e=Sie(t);return e.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase)}function yG(t,e,n,i=!1){let r;typeof t=="string"?r=fm(t):(r={...t},mi(!r.pathname||!r.pathname.includes("?"),TA("?","pathname","search",r)),mi(!r.pathname||!r.pathname.includes("#"),TA("#","pathname","hash",r)),mi(!r.search||!r.search.includes("#"),TA("#","search","hash",r)));let a=t===""||r.pathname==="",s=a?"/":r.pathname,o;if(s==null)o=n;else{let f=e.length-1;if(!i&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),f-=1;r.pathname=m.join("/")}o=f>=0?e[f]:"/"}let l=_ie(r,o),c=s&&s!=="/"&&s.endsWith("/"),u=(a||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var nc=t=>t.join("/").replace(/\/\/+/g,"/"),wie=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Mie=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Eie=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Aie(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var bG=["POST","PUT","PATCH","DELETE"];new Set(bG);var Tie=["GET",...bG];new Set(Tie);var hm=A.createContext(null);hm.displayName="DataRouter";var zS=A.createContext(null);zS.displayName="DataRouterState";A.createContext(!1);var _G=A.createContext({isTransitioning:!1});_G.displayName="ViewTransition";var Cie=A.createContext(new Map);Cie.displayName="Fetchers";var Nie=A.createContext(null);Nie.displayName="Await";var al=A.createContext(null);al.displayName="Navigation";var A0=A.createContext(null);A0.displayName="Location";var sl=A.createContext({outlet:null,matches:[],isDataRoute:!1});sl.displayName="Route";var vP=A.createContext(null);vP.displayName="RouteError";function Rie(t,{relative:e}={}){mi(T0(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:i}=A.useContext(al),{hash:r,pathname:a,search:s}=C0(t,{relative:e}),o=a;return n!=="/"&&(o=a==="/"?n:nc([n,a])),i.createHref({pathname:o,search:s,hash:r})}function T0(){return A.useContext(A0)!=null}function wc(){return mi(T0(),"useLocation() may be used only in the context of a component."),A.useContext(A0).location}var SG="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wG(t){A.useContext(al).static||A.useLayoutEffect(t)}function BS(){let{isDataRoute:t}=A.useContext(sl);return t?Gie():Pie()}function Pie(){mi(T0(),"useNavigate() may be used only in the context of a component.");let t=A.useContext(hm),{basename:e,navigator:n}=A.useContext(al),{matches:i}=A.useContext(sl),{pathname:r}=wc(),a=JSON.stringify(vG(i)),s=A.useRef(!1);return wG(()=>{s.current=!0}),A.useCallback((l,c={})=>{if(Ws(s.current,SG),!s.current)return;if(typeof l=="number"){n.go(l);return}let u=yG(l,JSON.parse(a),r,c.relative==="path");t==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:nc([e,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[e,n,a,r,t])}var kie=A.createContext(null);function Die(t){let e=A.useContext(sl).outlet;return A.useMemo(()=>e&&A.createElement(kie.Provider,{value:t},e),[e,t])}function C0(t,{relative:e}={}){let{matches:n}=A.useContext(sl),{pathname:i}=wc(),r=JSON.stringify(vG(n));return A.useMemo(()=>yG(t,JSON.parse(r),i,e==="path"),[t,r,i,e])}function Oie(t,e){return MG(t,e)}function MG(t,e,n,i,r){mi(T0(),"useRoutes() may be used only in the context of a component.");let{navigator:a}=A.useContext(al),{matches:s}=A.useContext(sl),o=s[s.length-1],l=o?o.params:{},c=o?o.pathname:"/",u=o?o.pathnameBase:"/",f=o&&o.route;{let M=f&&f.path||"";EG(c,!f||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. +`+S.stack}}var oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,te=t.unstable_shouldYield,U=t.unstable_requestPaint,L=t.unstable_now,Z=t.unstable_getCurrentPriorityLevel,me=t.unstable_ImmediatePriority,be=t.unstable_UserBlockingPriority,he=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Xe=t.log,at=t.unstable_setDisableYieldValue,Ie=null,Re=null;function pt(d){if(typeof Xe=="function"&&at(d),Re&&typeof Re.setStrictMode=="function")try{Re.setStrictMode(Ie,d)}catch{}}var tt=Math.clz32?Math.clz32:de,et=Math.log,ut=Math.LN2;function de(d){return d>>>=0,d===0?32:31-(et(d)/ut|0)|0}var nt=256,fe=262144,Oe=4194304;function Me(d){var h=d&42;if(h!==0)return h;switch(d&-d){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 d&261888;case 262144:case 524288:case 1048576:case 2097152:return d&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return d&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return d}}function ge(d,h,_){var S=d.pendingLanes;if(S===0)return 0;var P=0,D=d.suspendedLanes,G=d.pingedLanes;d=d.warmLanes;var ne=S&134217727;return ne!==0?(S=ne&~D,S!==0?P=Me(S):(G&=ne,G!==0?P=Me(G):_||(_=ne&~d,_!==0&&(P=Me(_))))):(ne=S&~D,ne!==0?P=Me(ne):G!==0?P=Me(G):_||(_=S&~d,_!==0&&(P=Me(_)))),P===0?0:h!==0&&h!==P&&(h&D)===0&&(D=P&-P,_=h&-h,D>=_||D===32&&(_&4194048)!==0)?h:P}function Be(d,h){return(d.pendingLanes&~(d.suspendedLanes&~d.pingedLanes)&h)===0}function ct(d,h){switch(d){case 1:case 2:case 4:case 8:case 64:return h+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 h+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 d=Oe;return Oe<<=1,(Oe&62914560)===0&&(Oe=4194304),d}function Rt(d){for(var h=[],_=0;31>_;_++)h.push(d);return h}function ln(d,h){d.pendingLanes|=h,h!==268435456&&(d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0)}function Dt(d,h,_,S,P,D){var G=d.pendingLanes;d.pendingLanes=_,d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0,d.expiredLanes&=_,d.entangledLanes&=_,d.errorRecoveryDisabledLanes&=_,d.shellSuspendCounter=0;var ne=d.entanglements,_e=d.expirationTimes,Fe=d.hiddenUpdates;for(_=G&~_;0<_;){var Je=31-tt(_),st=1<"u")return null;try{return d.activeElement||d.body}catch{return d.body}}var Ti=/[\n"\\]/g;function Nn(d){return d.replace(Ti,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Js(d,h,_,S,P,D,G,ne){d.name="",G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?d.type=G:d.removeAttribute("type"),h!=null?G==="number"?(h===0&&d.value===""||d.value!=h)&&(d.value=""+un(h)):d.value!==""+un(h)&&(d.value=""+un(h)):G!=="submit"&&G!=="reset"||d.removeAttribute("value"),h!=null?gr(d,G,un(h)):_!=null?gr(d,G,un(_)):S!=null&&d.removeAttribute("value"),P==null&&D!=null&&(d.defaultChecked=!!D),P!=null&&(d.checked=P&&typeof P!="function"&&typeof P!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?d.name=""+un(ne):d.removeAttribute("name")}function Pn(d,h,_,S,P,D,G,ne){if(D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(d.type=D),h!=null||_!=null){if(!(D!=="submit"&&D!=="reset"||h!=null)){Kt(d);return}_=_!=null?""+un(_):"",h=h!=null?""+un(h):_,ne||h===d.value||(d.value=h),d.defaultValue=h}S=S??P,S=typeof S!="function"&&typeof S!="symbol"&&!!S,d.checked=ne?d.checked:!!S,d.defaultChecked=!!S,G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"&&(d.name=G),Kt(d)}function gr(d,h,_){h==="number"&&bi(d.ownerDocument)===d||d.defaultValue===""+_||(d.defaultValue=""+_)}function Qi(d,h,_,S){if(d=d.options,h){h={};for(var P=0;P<_.length;P++)h["$"+_[P]]=!0;for(_=0;_"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vM=!1;if(ul)try{var Fm={};Object.defineProperty(Fm,"passive",{get:function(){vM=!0}}),window.addEventListener("test",Fm,Fm),window.removeEventListener("test",Fm,Fm)}catch{vM=!1}var Dc=null,bM=null,gv=null;function cL(){if(gv)return gv;var d,h=bM,_=h.length,S,P="value"in Dc?Dc.value:Dc.textContent,D=P.length;for(d=0;d<_&&h[d]===P[d];d++);var G=_-d;for(S=1;S<=G&&h[_-S]===P[D-S];S++);return gv=P.slice(d,1=Hm),mL=" ",gL=!1;function xL(d,h){switch(d){case"keyup":return fee.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vL(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var Kf=!1;function pee(d,h){switch(d){case"compositionend":return vL(h);case"keypress":return h.which!==32?null:(gL=!0,mL);case"textInput":return d=h.data,d===mL&&gL?null:d;default:return null}}function mee(d,h){if(Kf)return d==="compositionend"||!MM&&xL(d,h)?(d=cL(),gv=bM=Dc=null,Kf=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1=h)return{node:_,offset:h-d};d=S}e:{for(;_;){if(_.nextSibling){_=_.nextSibling;break e}_=_.parentNode}_=void 0}_=AL(_)}}function CL(d,h){return d&&h?d===h?!0:d&&d.nodeType===3?!1:h&&h.nodeType===3?CL(d,h.parentNode):"contains"in d?d.contains(h):d.compareDocumentPosition?!!(d.compareDocumentPosition(h)&16):!1:!1}function NL(d){d=d!=null&&d.ownerDocument!=null&&d.ownerDocument.defaultView!=null?d.ownerDocument.defaultView:window;for(var h=bi(d.document);h instanceof d.HTMLIFrameElement;){try{var _=typeof h.contentWindow.location.href=="string"}catch{_=!1}if(_)d=h.contentWindow;else break;h=bi(d.document)}return h}function TM(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h&&(h==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||h==="textarea"||d.contentEditable==="true")}var wee=ul&&"documentMode"in document&&11>=document.documentMode,Yf=null,CM=null,Wm=null,NM=!1;function RL(d,h,_){var S=_.window===_?_.document:_.nodeType===9?_:_.ownerDocument;NM||Yf==null||Yf!==bi(S)||(S=Yf,"selectionStart"in S&&TM(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}),Wm&&Gm(Wm,S)||(Wm=S,S=cb(CM,"onSelect"),0>=G,P-=G,Co=1<<32-tt(h)+P|_<Jt?(xn=kt,kt=null):xn=kt.sibling;var Mn=Ve(De,kt,Ue[Jt],rt);if(Mn===null){kt===null&&(kt=xn);break}d&&kt&&Mn.alternate===null&&h(De,kt),Ee=D(Mn,Ee,Jt),wn===null?jt=Mn:wn.sibling=Mn,wn=Mn,kt=xn}if(Jt===Ue.length)return _(De,kt),bn&&fl(De,Jt),jt;if(kt===null){for(;JtJt?(xn=kt,kt=null):xn=kt.sibling;var tu=Ve(De,kt,Mn.value,rt);if(tu===null){kt===null&&(kt=xn);break}d&&kt&&tu.alternate===null&&h(De,kt),Ee=D(tu,Ee,Jt),wn===null?jt=tu:wn.sibling=tu,wn=tu,kt=xn}if(Mn.done)return _(De,kt),bn&&fl(De,Jt),jt;if(kt===null){for(;!Mn.done;Jt++,Mn=Ue.next())Mn=st(De,Mn.value,rt),Mn!==null&&(Ee=D(Mn,Ee,Jt),wn===null?jt=Mn:wn.sibling=Mn,wn=Mn);return bn&&fl(De,Jt),jt}for(kt=S(kt);!Mn.done;Jt++,Mn=Ue.next())Mn=Ye(kt,De,Jt,Mn.value,rt),Mn!==null&&(d&&Mn.alternate!==null&&kt.delete(Mn.key===null?Jt:Mn.key),Ee=D(Mn,Ee,Jt),wn===null?jt=Mn:wn.sibling=Mn,wn=Mn);return d&&kt.forEach(function(Vte){return h(De,Vte)}),bn&&fl(De,Jt),jt}function Un(De,Ee,Ue,rt){if(typeof Ue=="object"&&Ue!==null&&Ue.type===y&&Ue.key===null&&(Ue=Ue.props.children),typeof Ue=="object"&&Ue!==null){switch(Ue.$$typeof){case g:e:{for(var jt=Ue.key;Ee!==null;){if(Ee.key===jt){if(jt=Ue.type,jt===y){if(Ee.tag===7){_(De,Ee.sibling),rt=P(Ee,Ue.props.children),rt.return=De,De=rt;break e}}else if(Ee.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===j&&yd(jt)===Ee.type){_(De,Ee.sibling),rt=P(Ee,Ue.props),Qm(rt,Ue),rt.return=De,De=rt;break e}_(De,Ee);break}else h(De,Ee);Ee=Ee.sibling}Ue.type===y?(rt=md(Ue.props.children,De.mode,rt,Ue.key),rt.return=De,De=rt):(rt=Av(Ue.type,Ue.key,Ue.props,null,De.mode,rt),Qm(rt,Ue),rt.return=De,De=rt)}return G(De);case b:e:{for(jt=Ue.key;Ee!==null;){if(Ee.key===jt)if(Ee.tag===4&&Ee.stateNode.containerInfo===Ue.containerInfo&&Ee.stateNode.implementation===Ue.implementation){_(De,Ee.sibling),rt=P(Ee,Ue.children||[]),rt.return=De,De=rt;break e}else{_(De,Ee);break}else h(De,Ee);Ee=Ee.sibling}rt=IM(Ue,De.mode,rt),rt.return=De,De=rt}return G(De);case j:return Ue=yd(Ue),Un(De,Ee,Ue,rt)}if(H(Ue))return Nt(De,Ee,Ue,rt);if(I(Ue)){if(jt=I(Ue),typeof jt!="function")throw Error(i(150));return Ue=jt.call(Ue),Bt(De,Ee,Ue,rt)}if(typeof Ue.then=="function")return Un(De,Ee,Dv(Ue),rt);if(Ue.$$typeof===w)return Un(De,Ee,Nv(De,Ue),rt);Ov(De,Ue)}return typeof Ue=="string"&&Ue!==""||typeof Ue=="number"||typeof Ue=="bigint"?(Ue=""+Ue,Ee!==null&&Ee.tag===6?(_(De,Ee.sibling),rt=P(Ee,Ue),rt.return=De,De=rt):(_(De,Ee),rt=LM(Ue,De.mode,rt),rt.return=De,De=rt),G(De)):_(De,Ee)}return function(De,Ee,Ue,rt){try{Zm=0;var jt=Un(De,Ee,Ue,rt);return oh=null,jt}catch(kt){if(kt===sh||kt===Pv)throw kt;var wn=Wa(29,kt,null,De.mode);return wn.lanes=rt,wn.return=De,wn}finally{}}}var Sd=JL(!0),eI=JL(!1),Uc=!1;function XM(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function KM(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,callbacks:null})}function Fc(d){return{lane:d,tag:0,payload:null,callback:null,next:null}}function zc(d,h,_){var S=d.updateQueue;if(S===null)return null;if(S=S.shared,(Cn&2)!==0){var P=S.pending;return P===null?h.next=h:(h.next=P.next,P.next=h),S.pending=h,h=Ev(d),jL(d,null,_),h}return Mv(d,S,h,_),Ev(d)}function Jm(d,h,_){if(h=h.updateQueue,h!==null&&(h=h.shared,(_&4194048)!==0)){var S=h.lanes;S&=d.pendingLanes,_|=S,h.lanes=_,qn(d,_)}}function YM(d,h){var _=d.updateQueue,S=d.alternate;if(S!==null&&(S=S.updateQueue,_===S)){var P=null,D=null;if(_=_.firstBaseUpdate,_!==null){do{var G={lane:_.lane,tag:_.tag,payload:_.payload,callback:null,next:null};D===null?P=D=G:D=D.next=G,_=_.next}while(_!==null);D===null?P=D=h:D=D.next=h}else P=D=h;_={baseState:S.baseState,firstBaseUpdate:P,lastBaseUpdate:D,shared:S.shared,callbacks:S.callbacks},d.updateQueue=_;return}d=_.lastBaseUpdate,d===null?_.firstBaseUpdate=h:d.next=h,_.lastBaseUpdate=h}var ZM=!1;function eg(){if(ZM){var d=ah;if(d!==null)throw d}}function tg(d,h,_,S){ZM=!1;var P=d.updateQueue;Uc=!1;var D=P.firstBaseUpdate,G=P.lastBaseUpdate,ne=P.shared.pending;if(ne!==null){P.shared.pending=null;var _e=ne,Fe=_e.next;_e.next=null,G===null?D=Fe:G.next=Fe,G=_e;var Je=d.alternate;Je!==null&&(Je=Je.updateQueue,ne=Je.lastBaseUpdate,ne!==G&&(ne===null?Je.firstBaseUpdate=Fe:ne.next=Fe,Je.lastBaseUpdate=_e))}if(D!==null){var st=P.baseState;G=0,Je=Fe=_e=null,ne=D;do{var Ve=ne.lane&-536870913,Ye=Ve!==ne.lane;if(Ye?(gn&Ve)===Ve:(S&Ve)===Ve){Ve!==0&&Ve===rh&&(ZM=!0),Je!==null&&(Je=Je.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var Nt=d,Bt=ne;Ve=h;var Un=_;switch(Bt.tag){case 1:if(Nt=Bt.payload,typeof Nt=="function"){st=Nt.call(Un,st,Ve);break e}st=Nt;break e;case 3:Nt.flags=Nt.flags&-65537|128;case 0:if(Nt=Bt.payload,Ve=typeof Nt=="function"?Nt.call(Un,st,Ve):Nt,Ve==null)break e;st=f({},st,Ve);break e;case 2:Uc=!0}}Ve=ne.callback,Ve!==null&&(d.flags|=64,Ye&&(d.flags|=8192),Ye=P.callbacks,Ye===null?P.callbacks=[Ve]:Ye.push(Ve))}else Ye={lane:Ve,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Je===null?(Fe=Je=Ye,_e=st):Je=Je.next=Ye,G|=Ve;if(ne=ne.next,ne===null){if(ne=P.shared.pending,ne===null)break;Ye=ne,ne=Ye.next,Ye.next=null,P.lastBaseUpdate=Ye,P.shared.pending=null}}while(!0);Je===null&&(_e=st),P.baseState=_e,P.firstBaseUpdate=Fe,P.lastBaseUpdate=Je,D===null&&(P.shared.lanes=0),Gc|=G,d.lanes=G,d.memoizedState=st}}function tI(d,h){if(typeof d!="function")throw Error(i(191,d));d.call(h)}function nI(d,h){var _=d.callbacks;if(_!==null)for(d.callbacks=null,d=0;d<_.length;d++)tI(_[d],h)}var lh=B(null),Lv=B(0);function iI(d,h){d=wl,ae(Lv,d),ae(lh,h),wl=d|h.baseLanes}function QM(){ae(Lv,wl),ae(lh,lh.current)}function JM(){wl=Lv.current,X(lh),X(Lv)}var qa=B(null),ys=null;function Bc(d){var h=d.alternate;ae(Ci,Ci.current&1),ae(qa,d),ys===null&&(h===null||lh.current!==null||h.memoizedState!==null)&&(ys=d)}function eE(d){ae(Ci,Ci.current),ae(qa,d),ys===null&&(ys=d)}function rI(d){d.tag===22?(ae(Ci,Ci.current),ae(qa,d),ys===null&&(ys=d)):Hc()}function Hc(){ae(Ci,Ci.current),ae(qa,qa.current)}function Xa(d){X(qa),ys===d&&(ys=null),X(Ci)}var Ci=B(0);function Iv(d){for(var h=d;h!==null;){if(h.tag===13){var _=h.memoizedState;if(_!==null&&(_=_.dehydrated,_===null||sA(_)||oA(_)))return h}else if(h.tag===19&&(h.memoizedProps.revealOrder==="forwards"||h.memoizedProps.revealOrder==="backwards"||h.memoizedProps.revealOrder==="unstable_legacy-backwards"||h.memoizedProps.revealOrder==="together")){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var ml=0,Qt=null,In=null,ji=null,jv=!1,ch=!1,wd=!1,Uv=0,ng=0,uh=null,Dee=0;function yi(){throw Error(i(321))}function tE(d,h){if(h===null)return!1;for(var _=0;_D?D:8;var G=V.T,ne={};V.T=ne,gE(d,!1,h,_);try{var _e=P(),Fe=V.S;if(Fe!==null&&Fe(ne,_e),_e!==null&&typeof _e=="object"&&typeof _e.then=="function"){var Je=kee(_e,S);rg(d,h,Je,Za(d))}else rg(d,h,S,Za(d))}catch(st){rg(d,h,{then:function(){},status:"rejected",reason:st},Za())}finally{$.p=D,G!==null&&ne.types!==null&&(G.types=ne.types),V.T=G}}function Uee(){}function pE(d,h,_,S){if(d.tag!==5)throw Error(i(476));var P=OI(d).queue;DI(d,P,h,K,_===null?Uee:function(){return LI(d),_(S)})}function OI(d){var h=d.memoizedState;if(h!==null)return h;h={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:K},next:null};var _={};return h.next={memoizedState:_,baseState:_,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:_},next:null},d.memoizedState=h,d=d.alternate,d!==null&&(d.memoizedState=h),h}function LI(d){var h=OI(d);h.next===null&&(h=d.alternate.memoizedState),rg(d,h.next.queue,{},Za())}function mE(){return Dr(_g)}function II(){return Ni().memoizedState}function jI(){return Ni().memoizedState}function Fee(d){for(var h=d.return;h!==null;){switch(h.tag){case 24:case 3:var _=Za();d=Fc(_);var S=zc(h,d,_);S!==null&&(Na(S,h,_),Jm(S,h,_)),h={cache:$M()},d.payload=h;return}h=h.return}}function zee(d,h,_){var S=Za();_={lane:S,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null},$v(d)?FI(h,_):(_=DM(d,h,_,S),_!==null&&(Na(_,d,S),zI(_,h,S)))}function UI(d,h,_){var S=Za();rg(d,h,_,S)}function rg(d,h,_,S){var P={lane:S,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null};if($v(d))FI(h,P);else{var D=d.alternate;if(d.lanes===0&&(D===null||D.lanes===0)&&(D=h.lastRenderedReducer,D!==null))try{var G=h.lastRenderedState,ne=D(G,_);if(P.hasEagerState=!0,P.eagerState=ne,Ga(ne,G))return Mv(d,h,P,0),Xn===null&&wv(),!1}catch{}finally{}if(_=DM(d,h,P,S),_!==null)return Na(_,d,S),zI(_,h,S),!0}return!1}function gE(d,h,_,S){if(S={lane:2,revertLane:XE(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},$v(d)){if(h)throw Error(i(479))}else h=DM(d,_,S,2),h!==null&&Na(h,d,2)}function $v(d){var h=d.alternate;return d===Qt||h!==null&&h===Qt}function FI(d,h){ch=jv=!0;var _=d.pending;_===null?h.next=h:(h.next=_.next,_.next=h),d.pending=h}function zI(d,h,_){if((_&4194048)!==0){var S=h.lanes;S&=d.pendingLanes,_|=S,h.lanes=_,qn(d,_)}}var ag={readContext:Dr,use:zv,useCallback:yi,useContext:yi,useEffect:yi,useImperativeHandle:yi,useLayoutEffect:yi,useInsertionEffect:yi,useMemo:yi,useReducer:yi,useRef:yi,useState:yi,useDebugValue:yi,useDeferredValue:yi,useTransition:yi,useSyncExternalStore:yi,useId:yi,useHostTransitionStatus:yi,useFormState:yi,useActionState:yi,useOptimistic:yi,useMemoCache:yi,useCacheRefresh:yi};ag.useEffectEvent=yi;var BI={readContext:Dr,use:zv,useCallback:function(d,h){return la().memoizedState=[d,h===void 0?null:h],d},useContext:Dr,useEffect:MI,useImperativeHandle:function(d,h,_){_=_!=null?_.concat([d]):null,Hv(4194308,4,CI.bind(null,h,d),_)},useLayoutEffect:function(d,h){return Hv(4194308,4,d,h)},useInsertionEffect:function(d,h){Hv(4,2,d,h)},useMemo:function(d,h){var _=la();h=h===void 0?null:h;var S=d();if(wd){pt(!0);try{d()}finally{pt(!1)}}return _.memoizedState=[S,h],S},useReducer:function(d,h,_){var S=la();if(_!==void 0){var P=_(h);if(wd){pt(!0);try{_(h)}finally{pt(!1)}}}else P=h;return S.memoizedState=S.baseState=P,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:P},S.queue=d,d=d.dispatch=zee.bind(null,Qt,d),[S.memoizedState,d]},useRef:function(d){var h=la();return d={current:d},h.memoizedState=d},useState:function(d){d=cE(d);var h=d.queue,_=UI.bind(null,Qt,h);return h.dispatch=_,[d.memoizedState,_]},useDebugValue:fE,useDeferredValue:function(d,h){var _=la();return hE(_,d,h)},useTransition:function(){var d=cE(!1);return d=DI.bind(null,Qt,d.queue,!0,!1),la().memoizedState=d,[!1,d]},useSyncExternalStore:function(d,h,_){var S=Qt,P=la();if(bn){if(_===void 0)throw Error(i(407));_=_()}else{if(_=h(),Xn===null)throw Error(i(349));(gn&127)!==0||lI(S,h,_)}P.memoizedState=_;var D={value:_,getSnapshot:h};return P.queue=D,MI(uI.bind(null,S,D,d),[d]),S.flags|=2048,dh(9,{destroy:void 0},cI.bind(null,S,D,_,h),null),_},useId:function(){var d=la(),h=Xn.identifierPrefix;if(bn){var _=No,S=Co;_=(S&~(1<<32-tt(S)-1)).toString(32)+_,h="_"+h+"R_"+_,_=Uv++,0<_&&(h+="H"+_.toString(32)),h+="_"}else _=Dee++,h="_"+h+"r_"+_.toString(32)+"_";return d.memoizedState=h},useHostTransitionStatus:mE,useFormState:bI,useActionState:bI,useOptimistic:function(d){var h=la();h.memoizedState=h.baseState=d;var _={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return h.queue=_,h=gE.bind(null,Qt,!0,_),_.dispatch=h,[d,h]},useMemoCache:sE,useCacheRefresh:function(){return la().memoizedState=Fee.bind(null,Qt)},useEffectEvent:function(d){var h=la(),_={impl:d};return h.memoizedState=_,function(){if((Cn&2)!==0)throw Error(i(440));return _.impl.apply(void 0,arguments)}}},xE={readContext:Dr,use:zv,useCallback:RI,useContext:Dr,useEffect:dE,useImperativeHandle:NI,useInsertionEffect:AI,useLayoutEffect:TI,useMemo:PI,useReducer:Bv,useRef:wI,useState:function(){return Bv(gl)},useDebugValue:fE,useDeferredValue:function(d,h){var _=Ni();return kI(_,In.memoizedState,d,h)},useTransition:function(){var d=Bv(gl)[0],h=Ni().memoizedState;return[typeof d=="boolean"?d:ig(d),h]},useSyncExternalStore:oI,useId:II,useHostTransitionStatus:mE,useFormState:yI,useActionState:yI,useOptimistic:function(d,h){var _=Ni();return hI(_,In,d,h)},useMemoCache:sE,useCacheRefresh:jI};xE.useEffectEvent=EI;var HI={readContext:Dr,use:zv,useCallback:RI,useContext:Dr,useEffect:dE,useImperativeHandle:NI,useInsertionEffect:AI,useLayoutEffect:TI,useMemo:PI,useReducer:lE,useRef:wI,useState:function(){return lE(gl)},useDebugValue:fE,useDeferredValue:function(d,h){var _=Ni();return In===null?hE(_,d,h):kI(_,In.memoizedState,d,h)},useTransition:function(){var d=lE(gl)[0],h=Ni().memoizedState;return[typeof d=="boolean"?d:ig(d),h]},useSyncExternalStore:oI,useId:II,useHostTransitionStatus:mE,useFormState:SI,useActionState:SI,useOptimistic:function(d,h){var _=Ni();return In!==null?hI(_,In,d,h):(_.baseState=d,[d,_.queue.dispatch])},useMemoCache:sE,useCacheRefresh:jI};HI.useEffectEvent=EI;function vE(d,h,_,S){h=d.memoizedState,_=_(S,h),_=_==null?h:f({},h,_),d.memoizedState=_,d.lanes===0&&(d.updateQueue.baseState=_)}var bE={enqueueSetState:function(d,h,_){d=d._reactInternals;var S=Za(),P=Fc(S);P.payload=h,_!=null&&(P.callback=_),h=zc(d,P,S),h!==null&&(Na(h,d,S),Jm(h,d,S))},enqueueReplaceState:function(d,h,_){d=d._reactInternals;var S=Za(),P=Fc(S);P.tag=1,P.payload=h,_!=null&&(P.callback=_),h=zc(d,P,S),h!==null&&(Na(h,d,S),Jm(h,d,S))},enqueueForceUpdate:function(d,h){d=d._reactInternals;var _=Za(),S=Fc(_);S.tag=2,h!=null&&(S.callback=h),h=zc(d,S,_),h!==null&&(Na(h,d,_),Jm(h,d,_))}};function VI(d,h,_,S,P,D,G){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(S,D,G):h.prototype&&h.prototype.isPureReactComponent?!Gm(_,S)||!Gm(P,D):!0}function $I(d,h,_,S){d=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(_,S),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(_,S),h.state!==d&&bE.enqueueReplaceState(h,h.state,null)}function Md(d,h){var _=h;if("ref"in h){_={};for(var S in h)S!=="ref"&&(_[S]=h[S])}if(d=d.defaultProps){_===h&&(_=f({},_));for(var P in d)_[P]===void 0&&(_[P]=d[P])}return _}function GI(d){Sv(d)}function WI(d){console.error(d)}function qI(d){Sv(d)}function Gv(d,h){try{var _=d.onUncaughtError;_(h.value,{componentStack:h.stack})}catch(S){setTimeout(function(){throw S})}}function XI(d,h,_){try{var S=d.onCaughtError;S(_.value,{componentStack:_.stack,errorBoundary:h.tag===1?h.stateNode:null})}catch(P){setTimeout(function(){throw P})}}function yE(d,h,_){return _=Fc(_),_.tag=3,_.payload={element:null},_.callback=function(){Gv(d,h)},_}function KI(d){return d=Fc(d),d.tag=3,d}function YI(d,h,_,S){var P=_.type.getDerivedStateFromError;if(typeof P=="function"){var D=S.value;d.payload=function(){return P(D)},d.callback=function(){XI(h,_,S)}}var G=_.stateNode;G!==null&&typeof G.componentDidCatch=="function"&&(d.callback=function(){XI(h,_,S),typeof P!="function"&&(Wc===null?Wc=new Set([this]):Wc.add(this));var ne=S.stack;this.componentDidCatch(S.value,{componentStack:ne!==null?ne:""})})}function Bee(d,h,_,S,P){if(_.flags|=32768,S!==null&&typeof S=="object"&&typeof S.then=="function"){if(h=_.alternate,h!==null&&ih(h,_,P,!0),_=qa.current,_!==null){switch(_.tag){case 31:case 13:return ys===null?ib():_.alternate===null&&_i===0&&(_i=3),_.flags&=-257,_.flags|=65536,_.lanes=P,S===kv?_.flags|=16384:(h=_.updateQueue,h===null?_.updateQueue=new Set([S]):h.add(S),GE(d,S,P)),!1;case 22:return _.flags|=65536,S===kv?_.flags|=16384:(h=_.updateQueue,h===null?(h={transitions:null,markerInstances:null,retryQueue:new Set([S])},_.updateQueue=h):(_=h.retryQueue,_===null?h.retryQueue=new Set([S]):_.add(S)),GE(d,S,P)),!1}throw Error(i(435,_.tag))}return GE(d,S,P),ib(),!1}if(bn)return h=qa.current,h!==null?((h.flags&65536)===0&&(h.flags|=256),h.flags|=65536,h.lanes=P,S!==FM&&(d=Error(i(422),{cause:S}),Xm(gs(d,_)))):(S!==FM&&(h=Error(i(423),{cause:S}),Xm(gs(h,_))),d=d.current.alternate,d.flags|=65536,P&=-P,d.lanes|=P,S=gs(S,_),P=yE(d.stateNode,S,P),YM(d,P),_i!==4&&(_i=2)),!1;var D=Error(i(520),{cause:S});if(D=gs(D,_),hg===null?hg=[D]:hg.push(D),_i!==4&&(_i=2),h===null)return!0;S=gs(S,_),_=h;do{switch(_.tag){case 3:return _.flags|=65536,d=P&-P,_.lanes|=d,d=yE(_.stateNode,S,d),YM(_,d),!1;case 1:if(h=_.type,D=_.stateNode,(_.flags&128)===0&&(typeof h.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(Wc===null||!Wc.has(D))))return _.flags|=65536,P&=-P,_.lanes|=P,P=KI(P),YI(P,d,_,S),YM(_,P),!1}_=_.return}while(_!==null);return!1}var _E=Error(i(461)),Ui=!1;function Or(d,h,_,S){h.child=d===null?eI(h,null,_,S):Sd(h,d.child,_,S)}function ZI(d,h,_,S,P){_=_.render;var D=h.ref;if("ref"in S){var G={};for(var ne in S)ne!=="ref"&&(G[ne]=S[ne])}else G=S;return vd(h),S=nE(d,h,_,G,D,P),ne=iE(),d!==null&&!Ui?(rE(d,h,P),xl(d,h,P)):(bn&&ne&&jM(h),h.flags|=1,Or(d,h,S,P),h.child)}function QI(d,h,_,S,P){if(d===null){var D=_.type;return typeof D=="function"&&!OM(D)&&D.defaultProps===void 0&&_.compare===null?(h.tag=15,h.type=D,JI(d,h,D,S,P)):(d=Av(_.type,null,S,h,h.mode,P),d.ref=h.ref,d.return=h,h.child=d)}if(D=d.child,!NE(d,P)){var G=D.memoizedProps;if(_=_.compare,_=_!==null?_:Gm,_(G,S)&&d.ref===h.ref)return xl(d,h,P)}return h.flags|=1,d=dl(D,S),d.ref=h.ref,d.return=h,h.child=d}function JI(d,h,_,S,P){if(d!==null){var D=d.memoizedProps;if(Gm(D,S)&&d.ref===h.ref)if(Ui=!1,h.pendingProps=S=D,NE(d,P))(d.flags&131072)!==0&&(Ui=!0);else return h.lanes=d.lanes,xl(d,h,P)}return SE(d,h,_,S,P)}function ej(d,h,_,S){var P=S.children,D=d!==null?d.memoizedState:null;if(d===null&&h.stateNode===null&&(h.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),S.mode==="hidden"){if((h.flags&128)!==0){if(D=D!==null?D.baseLanes|_:_,d!==null){for(S=h.child=d.child,P=0;S!==null;)P=P|S.lanes|S.childLanes,S=S.sibling;S=P&~D}else S=0,h.child=null;return tj(d,h,D,_,S)}if((_&536870912)!==0)h.memoizedState={baseLanes:0,cachePool:null},d!==null&&Rv(h,D!==null?D.cachePool:null),D!==null?iI(h,D):QM(),rI(h);else return S=h.lanes=536870912,tj(d,h,D!==null?D.baseLanes|_:_,_,S)}else D!==null?(Rv(h,D.cachePool),iI(h,D),Hc(),h.memoizedState=null):(d!==null&&Rv(h,null),QM(),Hc());return Or(d,h,P,_),h.child}function sg(d,h){return d!==null&&d.tag===22||h.stateNode!==null||(h.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.sibling}function tj(d,h,_,S,P){var D=WM();return D=D===null?null:{parent:Ii._currentValue,pool:D},h.memoizedState={baseLanes:_,cachePool:D},d!==null&&Rv(h,null),QM(),rI(h),d!==null&&ih(d,h,S,!0),h.childLanes=P,null}function Wv(d,h){return h=Xv({mode:h.mode,children:h.children},d.mode),h.ref=d.ref,d.child=h,h.return=d,h}function nj(d,h,_){return Sd(h,d.child,null,_),d=Wv(h,h.pendingProps),d.flags|=2,Xa(h),h.memoizedState=null,d}function Hee(d,h,_){var S=h.pendingProps,P=(h.flags&128)!==0;if(h.flags&=-129,d===null){if(bn){if(S.mode==="hidden")return d=Wv(h,S),h.lanes=536870912,sg(null,d);if(eE(h),(d=ti)?(d=pU(d,bs),d=d!==null&&d.data==="&"?d:null,d!==null&&(h.memoizedState={dehydrated:d,treeContext:Oc!==null?{id:Co,overflow:No}:null,retryLane:536870912,hydrationErrors:null},_=FL(d),_.return=h,h.child=_,kr=h,ti=null)):d=null,d===null)throw Ic(h);return h.lanes=536870912,null}return Wv(h,S)}var D=d.memoizedState;if(D!==null){var G=D.dehydrated;if(eE(h),P)if(h.flags&256)h.flags&=-257,h=nj(d,h,_);else if(h.memoizedState!==null)h.child=d.child,h.flags|=128,h=null;else throw Error(i(558));else if(Ui||ih(d,h,_,!1),P=(_&d.childLanes)!==0,Ui||P){if(S=Xn,S!==null&&(G=pr(S,_),G!==0&&G!==D.retryLane))throw D.retryLane=G,pd(d,G),Na(S,d,G),_E;ib(),h=nj(d,h,_)}else d=D.treeContext,ti=_s(G.nextSibling),kr=h,bn=!0,Lc=null,bs=!1,d!==null&&HL(h,d),h=Wv(h,S),h.flags|=4096;return h}return d=dl(d.child,{mode:S.mode,children:S.children}),d.ref=h.ref,h.child=d,d.return=h,d}function qv(d,h){var _=h.ref;if(_===null)d!==null&&d.ref!==null&&(h.flags|=4194816);else{if(typeof _!="function"&&typeof _!="object")throw Error(i(284));(d===null||d.ref!==_)&&(h.flags|=4194816)}}function SE(d,h,_,S,P){return vd(h),_=nE(d,h,_,S,void 0,P),S=iE(),d!==null&&!Ui?(rE(d,h,P),xl(d,h,P)):(bn&&S&&jM(h),h.flags|=1,Or(d,h,_,P),h.child)}function ij(d,h,_,S,P,D){return vd(h),h.updateQueue=null,_=sI(h,S,_,P),aI(d),S=iE(),d!==null&&!Ui?(rE(d,h,D),xl(d,h,D)):(bn&&S&&jM(h),h.flags|=1,Or(d,h,_,D),h.child)}function rj(d,h,_,S,P){if(vd(h),h.stateNode===null){var D=Jf,G=_.contextType;typeof G=="object"&&G!==null&&(D=Dr(G)),D=new _(S,D),h.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=bE,h.stateNode=D,D._reactInternals=h,D=h.stateNode,D.props=S,D.state=h.memoizedState,D.refs={},XM(h),G=_.contextType,D.context=typeof G=="object"&&G!==null?Dr(G):Jf,D.state=h.memoizedState,G=_.getDerivedStateFromProps,typeof G=="function"&&(vE(h,_,G,S),D.state=h.memoizedState),typeof _.getDerivedStateFromProps=="function"||typeof D.getSnapshotBeforeUpdate=="function"||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(G=D.state,typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount(),G!==D.state&&bE.enqueueReplaceState(D,D.state,null),tg(h,S,D,P),eg(),D.state=h.memoizedState),typeof D.componentDidMount=="function"&&(h.flags|=4194308),S=!0}else if(d===null){D=h.stateNode;var ne=h.memoizedProps,_e=Md(_,ne);D.props=_e;var Fe=D.context,Je=_.contextType;G=Jf,typeof Je=="object"&&Je!==null&&(G=Dr(Je));var st=_.getDerivedStateFromProps;Je=typeof st=="function"||typeof D.getSnapshotBeforeUpdate=="function",ne=h.pendingProps!==ne,Je||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(ne||Fe!==G)&&$I(h,D,S,G),Uc=!1;var Ve=h.memoizedState;D.state=Ve,tg(h,S,D,P),eg(),Fe=h.memoizedState,ne||Ve!==Fe||Uc?(typeof st=="function"&&(vE(h,_,st,S),Fe=h.memoizedState),(_e=Uc||VI(h,_,_e,S,Ve,Fe,G))?(Je||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(h.flags|=4194308)):(typeof D.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=S,h.memoizedState=Fe),D.props=S,D.state=Fe,D.context=G,S=_e):(typeof D.componentDidMount=="function"&&(h.flags|=4194308),S=!1)}else{D=h.stateNode,KM(d,h),G=h.memoizedProps,Je=Md(_,G),D.props=Je,st=h.pendingProps,Ve=D.context,Fe=_.contextType,_e=Jf,typeof Fe=="object"&&Fe!==null&&(_e=Dr(Fe)),ne=_.getDerivedStateFromProps,(Fe=typeof ne=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(G!==st||Ve!==_e)&&$I(h,D,S,_e),Uc=!1,Ve=h.memoizedState,D.state=Ve,tg(h,S,D,P),eg();var Ye=h.memoizedState;G!==st||Ve!==Ye||Uc||d!==null&&d.dependencies!==null&&Cv(d.dependencies)?(typeof ne=="function"&&(vE(h,_,ne,S),Ye=h.memoizedState),(Je=Uc||VI(h,_,Je,S,Ve,Ye,_e)||d!==null&&d.dependencies!==null&&Cv(d.dependencies))?(Fe||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(S,Ye,_e),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(S,Ye,_e)),typeof D.componentDidUpdate=="function"&&(h.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof D.componentDidUpdate!="function"||G===d.memoizedProps&&Ve===d.memoizedState||(h.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||G===d.memoizedProps&&Ve===d.memoizedState||(h.flags|=1024),h.memoizedProps=S,h.memoizedState=Ye),D.props=S,D.state=Ye,D.context=_e,S=Je):(typeof D.componentDidUpdate!="function"||G===d.memoizedProps&&Ve===d.memoizedState||(h.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||G===d.memoizedProps&&Ve===d.memoizedState||(h.flags|=1024),S=!1)}return D=S,qv(d,h),S=(h.flags&128)!==0,D||S?(D=h.stateNode,_=S&&typeof _.getDerivedStateFromError!="function"?null:D.render(),h.flags|=1,d!==null&&S?(h.child=Sd(h,d.child,null,P),h.child=Sd(h,null,_,P)):Or(d,h,_,P),h.memoizedState=D.state,d=h.child):d=xl(d,h,P),d}function aj(d,h,_,S){return gd(),h.flags|=256,Or(d,h,_,S),h.child}var wE={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ME(d){return{baseLanes:d,cachePool:XL()}}function EE(d,h,_){return d=d!==null?d.childLanes&~_:0,h&&(d|=Ya),d}function sj(d,h,_){var S=h.pendingProps,P=!1,D=(h.flags&128)!==0,G;if((G=D)||(G=d!==null&&d.memoizedState===null?!1:(Ci.current&2)!==0),G&&(P=!0,h.flags&=-129),G=(h.flags&32)!==0,h.flags&=-33,d===null){if(bn){if(P?Bc(h):Hc(),(d=ti)?(d=pU(d,bs),d=d!==null&&d.data!=="&"?d:null,d!==null&&(h.memoizedState={dehydrated:d,treeContext:Oc!==null?{id:Co,overflow:No}:null,retryLane:536870912,hydrationErrors:null},_=FL(d),_.return=h,h.child=_,kr=h,ti=null)):d=null,d===null)throw Ic(h);return oA(d)?h.lanes=32:h.lanes=536870912,null}var ne=S.children;return S=S.fallback,P?(Hc(),P=h.mode,ne=Xv({mode:"hidden",children:ne},P),S=md(S,P,_,null),ne.return=h,S.return=h,ne.sibling=S,h.child=ne,S=h.child,S.memoizedState=ME(_),S.childLanes=EE(d,G,_),h.memoizedState=wE,sg(null,S)):(Bc(h),AE(h,ne))}var _e=d.memoizedState;if(_e!==null&&(ne=_e.dehydrated,ne!==null)){if(D)h.flags&256?(Bc(h),h.flags&=-257,h=TE(d,h,_)):h.memoizedState!==null?(Hc(),h.child=d.child,h.flags|=128,h=null):(Hc(),ne=S.fallback,P=h.mode,S=Xv({mode:"visible",children:S.children},P),ne=md(ne,P,_,null),ne.flags|=2,S.return=h,ne.return=h,S.sibling=ne,h.child=S,Sd(h,d.child,null,_),S=h.child,S.memoizedState=ME(_),S.childLanes=EE(d,G,_),h.memoizedState=wE,h=sg(null,S));else if(Bc(h),oA(ne)){if(G=ne.nextSibling&&ne.nextSibling.dataset,G)var Fe=G.dgst;G=Fe,S=Error(i(419)),S.stack="",S.digest=G,Xm({value:S,source:null,stack:null}),h=TE(d,h,_)}else if(Ui||ih(d,h,_,!1),G=(_&d.childLanes)!==0,Ui||G){if(G=Xn,G!==null&&(S=pr(G,_),S!==0&&S!==_e.retryLane))throw _e.retryLane=S,pd(d,S),Na(G,d,S),_E;sA(ne)||ib(),h=TE(d,h,_)}else sA(ne)?(h.flags|=192,h.child=d.child,h=null):(d=_e.treeContext,ti=_s(ne.nextSibling),kr=h,bn=!0,Lc=null,bs=!1,d!==null&&HL(h,d),h=AE(h,S.children),h.flags|=4096);return h}return P?(Hc(),ne=S.fallback,P=h.mode,_e=d.child,Fe=_e.sibling,S=dl(_e,{mode:"hidden",children:S.children}),S.subtreeFlags=_e.subtreeFlags&65011712,Fe!==null?ne=dl(Fe,ne):(ne=md(ne,P,_,null),ne.flags|=2),ne.return=h,S.return=h,S.sibling=ne,h.child=S,sg(null,S),S=h.child,ne=d.child.memoizedState,ne===null?ne=ME(_):(P=ne.cachePool,P!==null?(_e=Ii._currentValue,P=P.parent!==_e?{parent:_e,pool:_e}:P):P=XL(),ne={baseLanes:ne.baseLanes|_,cachePool:P}),S.memoizedState=ne,S.childLanes=EE(d,G,_),h.memoizedState=wE,sg(d.child,S)):(Bc(h),_=d.child,d=_.sibling,_=dl(_,{mode:"visible",children:S.children}),_.return=h,_.sibling=null,d!==null&&(G=h.deletions,G===null?(h.deletions=[d],h.flags|=16):G.push(d)),h.child=_,h.memoizedState=null,_)}function AE(d,h){return h=Xv({mode:"visible",children:h},d.mode),h.return=d,d.child=h}function Xv(d,h){return d=Wa(22,d,null,h),d.lanes=0,d}function TE(d,h,_){return Sd(h,d.child,null,_),d=AE(h,h.pendingProps.children),d.flags|=2,h.memoizedState=null,d}function oj(d,h,_){d.lanes|=h;var S=d.alternate;S!==null&&(S.lanes|=h),HM(d.return,h,_)}function CE(d,h,_,S,P,D){var G=d.memoizedState;G===null?d.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:S,tail:_,tailMode:P,treeForkCount:D}:(G.isBackwards=h,G.rendering=null,G.renderingStartTime=0,G.last=S,G.tail=_,G.tailMode=P,G.treeForkCount=D)}function lj(d,h,_){var S=h.pendingProps,P=S.revealOrder,D=S.tail;S=S.children;var G=Ci.current,ne=(G&2)!==0;if(ne?(G=G&1|2,h.flags|=128):G&=1,ae(Ci,G),Or(d,h,S,_),S=bn?qm:0,!ne&&d!==null&&(d.flags&128)!==0)e:for(d=h.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&oj(d,_,h);else if(d.tag===19)oj(d,_,h);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===h)break e;for(;d.sibling===null;){if(d.return===null||d.return===h)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}switch(P){case"forwards":for(_=h.child,P=null;_!==null;)d=_.alternate,d!==null&&Iv(d)===null&&(P=_),_=_.sibling;_=P,_===null?(P=h.child,h.child=null):(P=_.sibling,_.sibling=null),CE(h,!1,P,_,D,S);break;case"backwards":case"unstable_legacy-backwards":for(_=null,P=h.child,h.child=null;P!==null;){if(d=P.alternate,d!==null&&Iv(d)===null){h.child=P;break}d=P.sibling,P.sibling=_,_=P,P=d}CE(h,!0,_,null,D,S);break;case"together":CE(h,!1,null,null,void 0,S);break;default:h.memoizedState=null}return h.child}function xl(d,h,_){if(d!==null&&(h.dependencies=d.dependencies),Gc|=h.lanes,(_&h.childLanes)===0)if(d!==null){if(ih(d,h,_,!1),(_&h.childLanes)===0)return null}else return null;if(d!==null&&h.child!==d.child)throw Error(i(153));if(h.child!==null){for(d=h.child,_=dl(d,d.pendingProps),h.child=_,_.return=h;d.sibling!==null;)d=d.sibling,_=_.sibling=dl(d,d.pendingProps),_.return=h;_.sibling=null}return h.child}function NE(d,h){return(d.lanes&h)!==0?!0:(d=d.dependencies,!!(d!==null&&Cv(d)))}function Vee(d,h,_){switch(h.tag){case 3:Pe(h,h.stateNode.containerInfo),jc(h,Ii,d.memoizedState.cache),gd();break;case 27:case 5:we(h);break;case 4:Pe(h,h.stateNode.containerInfo);break;case 10:jc(h,h.type,h.memoizedProps.value);break;case 31:if(h.memoizedState!==null)return h.flags|=128,eE(h),null;break;case 13:var S=h.memoizedState;if(S!==null)return S.dehydrated!==null?(Bc(h),h.flags|=128,null):(_&h.child.childLanes)!==0?sj(d,h,_):(Bc(h),d=xl(d,h,_),d!==null?d.sibling:null);Bc(h);break;case 19:var P=(d.flags&128)!==0;if(S=(_&h.childLanes)!==0,S||(ih(d,h,_,!1),S=(_&h.childLanes)!==0),P){if(S)return lj(d,h,_);h.flags|=128}if(P=h.memoizedState,P!==null&&(P.rendering=null,P.tail=null,P.lastEffect=null),ae(Ci,Ci.current),S)break;return null;case 22:return h.lanes=0,ej(d,h,_,h.pendingProps);case 24:jc(h,Ii,d.memoizedState.cache)}return xl(d,h,_)}function cj(d,h,_){if(d!==null)if(d.memoizedProps!==h.pendingProps)Ui=!0;else{if(!NE(d,_)&&(h.flags&128)===0)return Ui=!1,Vee(d,h,_);Ui=(d.flags&131072)!==0}else Ui=!1,bn&&(h.flags&1048576)!==0&&BL(h,qm,h.index);switch(h.lanes=0,h.tag){case 16:e:{var S=h.pendingProps;if(d=yd(h.elementType),h.type=d,typeof d=="function")OM(d)?(S=Md(d,S),h.tag=1,h=rj(null,h,d,S,_)):(h.tag=0,h=SE(null,h,d,S,_));else{if(d!=null){var P=d.$$typeof;if(P===E){h.tag=11,h=ZI(null,h,d,S,_);break e}else if(P===N){h.tag=14,h=QI(null,h,d,S,_);break e}}throw h=O(d)||d,Error(i(306,h,""))}}return h;case 0:return SE(d,h,h.type,h.pendingProps,_);case 1:return S=h.type,P=Md(S,h.pendingProps),rj(d,h,S,P,_);case 3:e:{if(Pe(h,h.stateNode.containerInfo),d===null)throw Error(i(387));S=h.pendingProps;var D=h.memoizedState;P=D.element,KM(d,h),tg(h,S,null,_);var G=h.memoizedState;if(S=G.cache,jc(h,Ii,S),S!==D.cache&&VM(h,[Ii],_,!0),eg(),S=G.element,D.isDehydrated)if(D={element:S,isDehydrated:!1,cache:G.cache},h.updateQueue.baseState=D,h.memoizedState=D,h.flags&256){h=aj(d,h,S,_);break e}else if(S!==P){P=gs(Error(i(424)),h),Xm(P),h=aj(d,h,S,_);break e}else{switch(d=h.stateNode.containerInfo,d.nodeType){case 9:d=d.body;break;default:d=d.nodeName==="HTML"?d.ownerDocument.body:d}for(ti=_s(d.firstChild),kr=h,bn=!0,Lc=null,bs=!0,_=eI(h,null,S,_),h.child=_;_;)_.flags=_.flags&-3|4096,_=_.sibling}else{if(gd(),S===P){h=xl(d,h,_);break e}Or(d,h,S,_)}h=h.child}return h;case 26:return qv(d,h),d===null?(_=yU(h.type,null,h.pendingProps,null))?h.memoizedState=_:bn||(_=h.type,d=h.pendingProps,S=ub(ie.current).createElement(_),S[hi]=h,S[Ai]=d,Lr(S,_,d),Te(S),h.stateNode=S):h.memoizedState=yU(h.type,d.memoizedProps,h.pendingProps,d.memoizedState),null;case 27:return we(h),d===null&&bn&&(S=h.stateNode=xU(h.type,h.pendingProps,ie.current),kr=h,bs=!0,P=ti,Yc(h.type)?(lA=P,ti=_s(S.firstChild)):ti=P),Or(d,h,h.pendingProps.children,_),qv(d,h),d===null&&(h.flags|=4194304),h.child;case 5:return d===null&&bn&&((P=S=ti)&&(S=bte(S,h.type,h.pendingProps,bs),S!==null?(h.stateNode=S,kr=h,ti=_s(S.firstChild),bs=!1,P=!0):P=!1),P||Ic(h)),we(h),P=h.type,D=h.pendingProps,G=d!==null?d.memoizedProps:null,S=D.children,iA(P,D)?S=null:G!==null&&iA(P,G)&&(h.flags|=32),h.memoizedState!==null&&(P=nE(d,h,Oee,null,null,_),_g._currentValue=P),qv(d,h),Or(d,h,S,_),h.child;case 6:return d===null&&bn&&((d=_=ti)&&(_=yte(_,h.pendingProps,bs),_!==null?(h.stateNode=_,kr=h,ti=null,d=!0):d=!1),d||Ic(h)),null;case 13:return sj(d,h,_);case 4:return Pe(h,h.stateNode.containerInfo),S=h.pendingProps,d===null?h.child=Sd(h,null,S,_):Or(d,h,S,_),h.child;case 11:return ZI(d,h,h.type,h.pendingProps,_);case 7:return Or(d,h,h.pendingProps,_),h.child;case 8:return Or(d,h,h.pendingProps.children,_),h.child;case 12:return Or(d,h,h.pendingProps.children,_),h.child;case 10:return S=h.pendingProps,jc(h,h.type,S.value),Or(d,h,S.children,_),h.child;case 9:return P=h.type._context,S=h.pendingProps.children,vd(h),P=Dr(P),S=S(P),h.flags|=1,Or(d,h,S,_),h.child;case 14:return QI(d,h,h.type,h.pendingProps,_);case 15:return JI(d,h,h.type,h.pendingProps,_);case 19:return lj(d,h,_);case 31:return Hee(d,h,_);case 22:return ej(d,h,_,h.pendingProps);case 24:return vd(h),S=Dr(Ii),d===null?(P=WM(),P===null&&(P=Xn,D=$M(),P.pooledCache=D,D.refCount++,D!==null&&(P.pooledCacheLanes|=_),P=D),h.memoizedState={parent:S,cache:P},XM(h),jc(h,Ii,P)):((d.lanes&_)!==0&&(KM(d,h),tg(h,null,null,_),eg()),P=d.memoizedState,D=h.memoizedState,P.parent!==S?(P={parent:S,cache:S},h.memoizedState=P,h.lanes===0&&(h.memoizedState=h.updateQueue.baseState=P),jc(h,Ii,S)):(S=D.cache,jc(h,Ii,S),S!==P.cache&&VM(h,[Ii],_,!0))),Or(d,h,h.pendingProps.children,_),h.child;case 29:throw h.pendingProps}throw Error(i(156,h.tag))}function vl(d){d.flags|=4}function RE(d,h,_,S,P){if((h=(d.mode&32)!==0)&&(h=!1),h){if(d.flags|=16777216,(P&335544128)===P)if(d.stateNode.complete)d.flags|=8192;else if(Ij())d.flags|=8192;else throw _d=kv,qM}else d.flags&=-16777217}function uj(d,h){if(h.type!=="stylesheet"||(h.state.loading&4)!==0)d.flags&=-16777217;else if(d.flags|=16777216,!EU(h))if(Ij())d.flags|=8192;else throw _d=kv,qM}function Kv(d,h){h!==null&&(d.flags|=4),d.flags&16384&&(h=d.tag!==22?yt():536870912,d.lanes|=h,mh|=h)}function og(d,h){if(!bn)switch(d.tailMode){case"hidden":h=d.tail;for(var _=null;h!==null;)h.alternate!==null&&(_=h),h=h.sibling;_===null?d.tail=null:_.sibling=null;break;case"collapsed":_=d.tail;for(var S=null;_!==null;)_.alternate!==null&&(S=_),_=_.sibling;S===null?h||d.tail===null?d.tail=null:d.tail.sibling=null:S.sibling=null}}function ni(d){var h=d.alternate!==null&&d.alternate.child===d.child,_=0,S=0;if(h)for(var P=d.child;P!==null;)_|=P.lanes|P.childLanes,S|=P.subtreeFlags&65011712,S|=P.flags&65011712,P.return=d,P=P.sibling;else for(P=d.child;P!==null;)_|=P.lanes|P.childLanes,S|=P.subtreeFlags,S|=P.flags,P.return=d,P=P.sibling;return d.subtreeFlags|=S,d.childLanes=_,h}function $ee(d,h,_){var S=h.pendingProps;switch(UM(h),h.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ni(h),null;case 1:return ni(h),null;case 3:return _=h.stateNode,S=null,d!==null&&(S=d.memoizedState.cache),h.memoizedState.cache!==S&&(h.flags|=2048),pl(Ii),pe(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),(d===null||d.child===null)&&(nh(h)?vl(h):d===null||d.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,zM())),ni(h),null;case 26:var P=h.type,D=h.memoizedState;return d===null?(vl(h),D!==null?(ni(h),uj(h,D)):(ni(h),RE(h,P,null,S,_))):D?D!==d.memoizedState?(vl(h),ni(h),uj(h,D)):(ni(h),h.flags&=-16777217):(d=d.memoizedProps,d!==S&&vl(h),ni(h),RE(h,P,d,S,_)),null;case 27:if(ze(h),_=ie.current,P=h.type,d!==null&&h.stateNode!=null)d.memoizedProps!==S&&vl(h);else{if(!S){if(h.stateNode===null)throw Error(i(166));return ni(h),null}d=ce.current,nh(h)?VL(h):(d=xU(P,S,_),h.stateNode=d,vl(h))}return ni(h),null;case 5:if(ze(h),P=h.type,d!==null&&h.stateNode!=null)d.memoizedProps!==S&&vl(h);else{if(!S){if(h.stateNode===null)throw Error(i(166));return ni(h),null}if(D=ce.current,nh(h))VL(h);else{var G=ub(ie.current);switch(D){case 1:D=G.createElementNS("http://www.w3.org/2000/svg",P);break;case 2:D=G.createElementNS("http://www.w3.org/1998/Math/MathML",P);break;default:switch(P){case"svg":D=G.createElementNS("http://www.w3.org/2000/svg",P);break;case"math":D=G.createElementNS("http://www.w3.org/1998/Math/MathML",P);break;case"script":D=G.createElement("div"),D.innerHTML=" - + +