From 7286c9ab44d8757378dc1001973b674b104835f8 Mon Sep 17 00:00:00 2001 From: K7ZVX Date: Wed, 13 May 2026 14:47:15 +0000 Subject: [PATCH] feat(dashboard): RF propagation visualizations + live event feed - SFI/Kp as prominent color-coded values with trend chart - R/S/G scales as colored severity badges - Tropospheric ducting condition with refractivity profile - Environmental feeds replaced with scrolling live event timeline - Unified activity log across all 9 feed adapters - Source icons, severity badges, chronological order - Real-time updates via WebSocket - SWPC adapter stores Kp/SFI history for charting - No wasted card space Co-Authored-By: Claude Opus 4.5 --- dashboard-frontend/src/hooks/useWebSocket.ts | 211 ++-- dashboard-frontend/src/lib/api.ts | 919 +++++++++--------- dashboard-frontend/src/pages/Dashboard.tsx | 777 +++++++++------ .../static/assets/index-D0mCSizv.css | 1 - .../dashboard/static/assets/index-DrKrP8CJ.js | 503 ++++++++++ .../static/assets/index-E1oMzltW.css | 1 + .../dashboard/static/assets/index-utMF5PG3.js | 430 -------- meshai/dashboard/static/index.html | 4 +- meshai/env/swpc.py | 45 +- 9 files changed, 1636 insertions(+), 1255 deletions(-) delete mode 100644 meshai/dashboard/static/assets/index-D0mCSizv.css create mode 100644 meshai/dashboard/static/assets/index-DrKrP8CJ.js create mode 100644 meshai/dashboard/static/assets/index-E1oMzltW.css delete mode 100644 meshai/dashboard/static/assets/index-utMF5PG3.js diff --git a/dashboard-frontend/src/hooks/useWebSocket.ts b/dashboard-frontend/src/hooks/useWebSocket.ts index 7df00f6..1ae63d9 100644 --- a/dashboard-frontend/src/hooks/useWebSocket.ts +++ b/dashboard-frontend/src/hooks/useWebSocket.ts @@ -1,102 +1,109 @@ -import { useEffect, useRef, useState, useCallback } from 'react' -import type { MeshHealth, Alert } from '@/lib/api' - -interface WebSocketMessage { - type: string - data: unknown -} - -interface UseWebSocketReturn { - connected: boolean - lastHealth: MeshHealth | null - lastAlert: Alert | null -} - -export function useWebSocket(): UseWebSocketReturn { - const [connected, setConnected] = useState(false) - const [lastHealth, setLastHealth] = useState(null) - const [lastAlert, setLastAlert] = useState(null) - const wsRef = useRef(null) - const reconnectTimeoutRef = useRef(null) - const reconnectDelayRef = useRef(1000) - - const connect = useCallback(() => { - if (wsRef.current?.readyState === WebSocket.OPEN) { - return - } - - const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:' - const wsUrl = `${protocol}//${window.location.host}/ws/live` - - try { - const ws = new WebSocket(wsUrl) - wsRef.current = ws - - ws.onopen = () => { - setConnected(true) - reconnectDelayRef.current = 1000 // Reset backoff on successful connection - } - - ws.onmessage = (event) => { - try { - const message: WebSocketMessage = JSON.parse(event.data) - - switch (message.type) { - case 'health_update': - setLastHealth(message.data as MeshHealth) - break - case 'alert_fired': - setLastAlert(message.data as Alert) - break - } - } catch (e) { - console.error('Failed to parse WebSocket message:', e) - } - } - - ws.onclose = () => { - setConnected(false) - wsRef.current = null - - // Schedule reconnect with exponential backoff - const delay = Math.min(reconnectDelayRef.current, 30000) - reconnectTimeoutRef.current = window.setTimeout(() => { - reconnectDelayRef.current = Math.min(delay * 2, 30000) - connect() - }, delay) - } - - ws.onerror = () => { - ws.close() - } - - // Keepalive ping every 30 seconds - const pingInterval = setInterval(() => { - if (ws.readyState === WebSocket.OPEN) { - ws.send('ping') - } - }, 30000) - - ws.addEventListener('close', () => { - clearInterval(pingInterval) - }) - } catch (e) { - console.error('Failed to create WebSocket:', e) - } - }, []) - - useEffect(() => { - connect() - - return () => { - if (reconnectTimeoutRef.current) { - clearTimeout(reconnectTimeoutRef.current) - } - if (wsRef.current) { - wsRef.current.close() - } - } - }, [connect]) - - return { connected, lastHealth, lastAlert } -} +import { useEffect, useRef, useState, useCallback } from 'react' +import type { MeshHealth, Alert, EnvEvent } from '@/lib/api' + +interface WebSocketMessage { + type: string + data?: unknown + event?: EnvEvent +} + +interface UseWebSocketReturn { + connected: boolean + lastHealth: MeshHealth | null + lastAlert: Alert | null + lastMessage: WebSocketMessage | null +} + +export function useWebSocket(): UseWebSocketReturn { + const [connected, setConnected] = useState(false) + const [lastHealth, setLastHealth] = useState(null) + const [lastAlert, setLastAlert] = useState(null) + const [lastMessage, setLastMessage] = useState(null) + const wsRef = useRef(null) + const reconnectTimeoutRef = useRef(null) + const reconnectDelayRef = useRef(1000) + + const connect = useCallback(() => { + if (wsRef.current?.readyState === WebSocket.OPEN) { + return + } + + const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:' + const wsUrl = `${protocol}//${window.location.host}/ws/live` + + try { + const ws = new WebSocket(wsUrl) + wsRef.current = ws + + ws.onopen = () => { + setConnected(true) + reconnectDelayRef.current = 1000 // Reset backoff on successful connection + } + + ws.onmessage = (event) => { + try { + const message: WebSocketMessage = JSON.parse(event.data) + + // Store all messages for generic handling + setLastMessage(message) + + switch (message.type) { + case 'health_update': + setLastHealth(message.data as MeshHealth) + break + case 'alert_fired': + setLastAlert(message.data as Alert) + break + // env_update messages are handled via lastMessage + } + } catch (e) { + console.error('Failed to parse WebSocket message:', e) + } + } + + ws.onclose = () => { + setConnected(false) + wsRef.current = null + + // Schedule reconnect with exponential backoff + const delay = Math.min(reconnectDelayRef.current, 30000) + reconnectTimeoutRef.current = window.setTimeout(() => { + reconnectDelayRef.current = Math.min(delay * 2, 30000) + connect() + }, delay) + } + + ws.onerror = () => { + ws.close() + } + + // Keepalive ping every 30 seconds + const pingInterval = setInterval(() => { + if (ws.readyState === WebSocket.OPEN) { + ws.send('ping') + } + }, 30000) + + ws.addEventListener('close', () => { + clearInterval(pingInterval) + }) + } catch (e) { + console.error('Failed to create WebSocket:', e) + } + }, []) + + useEffect(() => { + connect() + + return () => { + if (reconnectTimeoutRef.current) { + clearTimeout(reconnectTimeoutRef.current) + } + if (wsRef.current) { + wsRef.current.close() + } + } + }, [connect]) + + return { connected, lastHealth, lastAlert, lastMessage } +} diff --git a/dashboard-frontend/src/lib/api.ts b/dashboard-frontend/src/lib/api.ts index c3e08ff..b2cf8d1 100644 --- a/dashboard-frontend/src/lib/api.ts +++ b/dashboard-frontend/src/lib/api.ts @@ -1,440 +1,479 @@ -// API types matching actual backend responses - -export interface SystemStatus { - version: string - uptime_seconds: number - bot_name: string - connection_type: string - connection_target: string - connected: boolean - node_count: number - source_count: number - env_feeds_enabled: boolean - dashboard_port: number -} - -export interface MeshHealth { - score: number - tier: string - pillars: { - infrastructure: number - utilization: number - behavior: number - power: number - } - infra_online: number - infra_total: number - util_percent: number - flagged_nodes: number - battery_warnings: number - total_nodes: number - total_regions: number - unlocated_count: number - last_computed: string - recommendations: string[] -} - -export interface NodeInfo { - node_num: number - node_id_hex: string - short_name: string - long_name: string - role: string - latitude: number | null - longitude: number | null - last_heard: string | null - battery_level: number | null - voltage: number | null - snr: number | null - firmware: string - hardware: string - uptime: number | null - sources: string[] -} - -export interface EdgeInfo { - from_node: number - to_node: number - snr: number - quality: string -} - -export interface RegionInfo { - name: string - local_name: string - node_count: number - infra_count: number - infra_online: number - online_count: number - score: number - tier: string - center_lat: number - center_lon: number -} - -export interface SourceHealth { - name: string - type: string - url: string - is_loaded: boolean - last_error: string | null - consecutive_errors: number - response_time_ms: number | null - tick_count: number - node_count: number -} - -export interface Alert { - type: string - severity: string - message: string - timestamp: string - scope_type?: string - scope_value?: string -} - -export interface AlertHistoryItem { - id?: number - type: string - severity: string - message: string - timestamp: string - duration?: number - scope_type?: string - scope_value?: string - resolved_at?: string -} - -export interface AlertHistoryResponse { - items: AlertHistoryItem[] - total: number -} - -export interface Subscription { - id: number - user_id: string - sub_type: string - schedule_time?: string - schedule_day?: string - scope_type: string - scope_value?: string - enabled: boolean -} - -export interface EnvStatus { - enabled: boolean - feeds: EnvFeedHealth[] -} - -export interface EnvFeedHealth { - source: string - is_loaded: boolean - last_error: string | null - consecutive_errors: number - event_count: number - last_fetch: number -} - -export interface EnvEvent { - source: string - event_id: string - event_type: string - severity: string - headline: string - description?: string - expires?: number - fetched_at: number - [key: string]: unknown -} - -export interface SWPCStatus { - enabled: boolean - kp_current?: number - kp_timestamp?: string - sfi?: number - r_scale?: number - s_scale?: number - g_scale?: number - active_warnings?: string[] -} - -export interface DuctingStatus { - enabled: boolean - condition?: string - min_gradient?: number - duct_thickness_m?: number | null - duct_base_m?: number | null - last_update?: string -} - -export interface RFPropagation { - hf: { - kp_current?: number - sfi?: number - r_scale?: number - s_scale?: number - g_scale?: number - active_warnings?: string[] - } - uhf_ducting: { - condition?: string - min_gradient?: number - duct_thickness_m?: number | null - } -} - -// API fetch helpers - -async function fetchJson(url: string): Promise { - const response = await fetch(url) - if (!response.ok) { - throw new Error(`API error: ${response.status} ${response.statusText}`) - } - return response.json() -} - -export async function fetchStatus(): Promise { - return fetchJson('/api/status') -} - -export async function fetchHealth(): Promise { - return fetchJson('/api/health') -} - -export async function fetchNodes(): Promise { - return fetchJson('/api/nodes') -} - -export async function fetchEdges(): Promise { - return fetchJson('/api/edges') -} - -export async function fetchSources(): Promise { - return fetchJson('/api/sources') -} - -export async function fetchConfig(section?: string): Promise { - const url = section ? `/api/config/${section}` : '/api/config' - return fetchJson(url) -} - -export async function updateConfig( - section: string, - data: unknown -): Promise<{ saved: boolean; restart_required: boolean }> { - const response = await fetch(`/api/config/${section}`, { - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(data), - }) - if (!response.ok) { - throw new Error(`API error: ${response.status} ${response.statusText}`) - } - return response.json() -} - -export async function fetchAlerts(): Promise { - return fetchJson('/api/alerts/active') -} - -export async function fetchAlertHistory( - limit: number = 50, - offset: number = 0, - type?: string, - severity?: string -): Promise { - const params = new URLSearchParams() - params.set('limit', limit.toString()) - params.set('offset', offset.toString()) - if (type && type !== 'all') params.set('type', type) - if (severity && severity !== 'all') params.set('severity', severity) - return fetchJson(`/api/alerts/history?${params.toString()}`) -} - -export async function fetchSubscriptions(): Promise { - return fetchJson('/api/subscriptions') -} - -export async function fetchEnvStatus(): Promise { - return fetchJson('/api/env/status') -} - -export async function fetchEnvActive(): Promise { - return fetchJson('/api/env/active') -} - -export async function fetchRFPropagation(): Promise { - return fetchJson('/api/env/propagation') -} - -export async function fetchSWPC(): Promise { - return fetchJson('/api/env/swpc') -} - -export async function fetchDucting(): Promise { - return fetchJson('/api/env/ducting') -} - -export interface FireEvent { - source: string - event_id: string - event_type: string - severity: string - headline: string - name: string - acres: number - pct_contained: number - lat: number | null - lon: number | null - distance_km: number | null - nearest_anchor: string | null - state: string - expires: number - fetched_at: number - polygon?: number[][][] -} - -export interface AvalancheEvent { - source: string - event_id: string - event_type: string - severity: string - headline: string - zone_name: string - center: string - center_id: string - center_link: string - forecast_link: string - danger: string - danger_level: number - danger_name: string - travel_advice: string - state: string - lat: number | null - lon: number | null - expires: number - fetched_at: number -} - -export interface StreamGaugeEvent { - source: string - event_id: string - event_type: string - headline: string - severity: string - lat?: number - lon?: number - expires: number - fetched_at: number - properties: { - site_id: string - site_name: string - parameter: string - value: number - unit: string - timestamp: string - } -} - -export interface TrafficEvent { - source: string - event_id: string - event_type: string - headline: string - severity: string - lat?: number - lon?: number - expires: number - fetched_at: number - properties: { - corridor: string - currentSpeed: number - freeFlowSpeed: number - speedRatio: number - currentTravelTime: number - freeFlowTravelTime: number - confidence: number - roadClosure: boolean - } -} - -export interface RoadEvent { - source: string - event_id: string - event_type: string - headline: string - description?: string - severity: string - lat?: number - lon?: number - expires: number - fetched_at: number - properties: { - roadway: string - is_closure: boolean - last_updated?: string - } -} - -export interface HotspotEvent { - source: string - event_id: string - event_type: string - headline: string - severity: string - lat?: number - lon?: number - expires: number - fetched_at: number - properties: { - new_ignition: boolean - confidence: string - frp?: number - brightness?: number - acq_date: string - acq_time: string - near_fire?: string - distance_to_fire_km?: number - distance_km?: number - nearest_anchor?: string - } -} - -export interface HotspotsResponse { - enabled: boolean - hotspots: HotspotEvent[] - new_ignitions: number -} - -export interface AvalancheResponse { - off_season: boolean - advisories: AvalancheEvent[] -} - -export async function fetchFires(): Promise { - return fetchJson('/api/env/fires') -} - -export async function fetchAvalanche(): Promise { - return fetchJson('/api/env/avalanche') -} - -export async function fetchStreams(): Promise { - return fetchJson('/api/env/streams') -} - -export async function fetchTraffic(): Promise { - return fetchJson('/api/env/traffic') -} - -export async function fetchRoads(): Promise { - return fetchJson('/api/env/roads') -} - -export async function fetchHotspots(): Promise { - return fetchJson('/api/env/hotspots') -} - -export async function fetchRegions(): Promise { - return fetchJson('/api/regions') -} +// API types matching actual backend responses + +export interface SystemStatus { + version: string + uptime_seconds: number + bot_name: string + connection_type: string + connection_target: string + connected: boolean + node_count: number + source_count: number + env_feeds_enabled: boolean + dashboard_port: number +} + +export interface MeshHealth { + score: number + tier: string + pillars: { + infrastructure: number + utilization: number + behavior: number + power: number + } + infra_online: number + infra_total: number + util_percent: number + flagged_nodes: number + battery_warnings: number + total_nodes: number + total_regions: number + unlocated_count: number + last_computed: string + recommendations: string[] +} + +export interface NodeInfo { + node_num: number + node_id_hex: string + short_name: string + long_name: string + role: string + latitude: number | null + longitude: number | null + last_heard: string | null + battery_level: number | null + voltage: number | null + snr: number | null + firmware: string + hardware: string + uptime: number | null + sources: string[] +} + +export interface EdgeInfo { + from_node: number + to_node: number + snr: number + quality: string +} + +export interface RegionInfo { + name: string + local_name: string + node_count: number + infra_count: number + infra_online: number + online_count: number + score: number + tier: string + center_lat: number + center_lon: number +} + +export interface SourceHealth { + name: string + type: string + url: string + is_loaded: boolean + last_error: string | null + consecutive_errors: number + response_time_ms: number | null + tick_count: number + node_count: number +} + +export interface Alert { + type: string + severity: string + message: string + timestamp: string + scope_type?: string + scope_value?: string +} + +export interface AlertHistoryItem { + id?: number + type: string + severity: string + message: string + timestamp: string + duration?: number + scope_type?: string + scope_value?: string + resolved_at?: string +} + +export interface AlertHistoryResponse { + items: AlertHistoryItem[] + total: number +} + +export interface Subscription { + id: number + user_id: string + sub_type: string + schedule_time?: string + schedule_day?: string + scope_type: string + scope_value?: string + enabled: boolean +} + +export interface EnvStatus { + enabled: boolean + feeds: EnvFeedHealth[] +} + +export interface EnvFeedHealth { + source: string + is_loaded: boolean + last_error: string | null + consecutive_errors: number + event_count: number + last_fetch: number +} + +export interface EnvEvent { + source: string + event_id: string + event_type: string + severity: string + headline: string + description?: string + expires?: number + fetched_at: number + [key: string]: unknown +} + +// Kp history entry for charting +export interface KpHistoryEntry { + time: string + value: number +} + +// SFI history entry for charting +export interface SfiHistoryEntry { + time: string + value: number +} + +// Refractivity profile entry +export interface ProfileEntry { + level_hPa: number + height_m: number + N: number + M: number + T_C: number + RH: number +} + +// Gradient entry +export interface GradientEntry { + from_level: number + to_level: number + from_height_m: number + to_height_m: number + gradient: number +} + +export interface SWPCStatus { + enabled: boolean + kp_current?: number + kp_timestamp?: string + sfi?: number + r_scale?: number + s_scale?: number + g_scale?: number + active_warnings?: string[] + kp_history?: KpHistoryEntry[] + sfi_history?: SfiHistoryEntry[] +} + +export interface DuctingStatus { + enabled: boolean + condition?: string + min_gradient?: number + duct_thickness_m?: number | null + duct_base_m?: number | null + last_update?: string + profile?: ProfileEntry[] + gradients?: GradientEntry[] + assessment?: string + location?: { lat: number; lon: number } +} + +export interface RFPropagation { + hf: { + kp_current?: number + sfi?: number + r_scale?: number + s_scale?: number + g_scale?: number + active_warnings?: string[] + kp_history?: KpHistoryEntry[] + } + uhf_ducting: { + condition?: string + min_gradient?: number + duct_thickness_m?: number | null + profile?: ProfileEntry[] + } +} + +// API fetch helpers + +async function fetchJson(url: string): Promise { + const response = await fetch(url) + if (!response.ok) { + throw new Error(`API error: ${response.status} ${response.statusText}`) + } + return response.json() +} + +export async function fetchStatus(): Promise { + return fetchJson('/api/status') +} + +export async function fetchHealth(): Promise { + return fetchJson('/api/health') +} + +export async function fetchNodes(): Promise { + return fetchJson('/api/nodes') +} + +export async function fetchEdges(): Promise { + return fetchJson('/api/edges') +} + +export async function fetchSources(): Promise { + return fetchJson('/api/sources') +} + +export async function fetchConfig(section?: string): Promise { + const url = section ? `/api/config/${section}` : '/api/config' + return fetchJson(url) +} + +export async function updateConfig( + section: string, + data: unknown +): Promise<{ saved: boolean; restart_required: boolean }> { + const response = await fetch(`/api/config/${section}`, { + method: 'PUT', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(data), + }) + if (!response.ok) { + throw new Error(`API error: ${response.status} ${response.statusText}`) + } + return response.json() +} + +export async function fetchAlerts(): Promise { + return fetchJson('/api/alerts/active') +} + +export async function fetchAlertHistory( + limit: number = 50, + offset: number = 0, + type?: string, + severity?: string +): Promise { + const params = new URLSearchParams() + params.set('limit', limit.toString()) + params.set('offset', offset.toString()) + if (type && type !== 'all') params.set('type', type) + if (severity && severity !== 'all') params.set('severity', severity) + return fetchJson(`/api/alerts/history?${params.toString()}`) +} + +export async function fetchSubscriptions(): Promise { + return fetchJson('/api/subscriptions') +} + +export async function fetchEnvStatus(): Promise { + return fetchJson('/api/env/status') +} + +export async function fetchEnvActive(): Promise { + return fetchJson('/api/env/active') +} + +export async function fetchRFPropagation(): Promise { + return fetchJson('/api/env/propagation') +} + +export async function fetchSWPC(): Promise { + return fetchJson('/api/env/swpc') +} + +export async function fetchDucting(): Promise { + return fetchJson('/api/env/ducting') +} + +export interface FireEvent { + source: string + event_id: string + event_type: string + severity: string + headline: string + name: string + acres: number + pct_contained: number + lat: number | null + lon: number | null + distance_km: number | null + nearest_anchor: string | null + state: string + expires: number + fetched_at: number + polygon?: number[][][] +} + +export interface AvalancheEvent { + source: string + event_id: string + event_type: string + severity: string + headline: string + zone_name: string + center: string + center_id: string + center_link: string + forecast_link: string + danger: string + danger_level: number + danger_name: string + travel_advice: string + state: string + lat: number | null + lon: number | null + expires: number + fetched_at: number +} + +export interface StreamGaugeEvent { + source: string + event_id: string + event_type: string + headline: string + severity: string + lat?: number + lon?: number + expires: number + fetched_at: number + properties: { + site_id: string + site_name: string + parameter: string + value: number + unit: string + timestamp: string + } +} + +export interface TrafficEvent { + source: string + event_id: string + event_type: string + headline: string + severity: string + lat?: number + lon?: number + expires: number + fetched_at: number + properties: { + corridor: string + currentSpeed: number + freeFlowSpeed: number + speedRatio: number + currentTravelTime: number + freeFlowTravelTime: number + confidence: number + roadClosure: boolean + } +} + +export interface RoadEvent { + source: string + event_id: string + event_type: string + headline: string + description?: string + severity: string + lat?: number + lon?: number + expires: number + fetched_at: number + properties: { + roadway: string + is_closure: boolean + last_updated?: string + } +} + +export interface HotspotEvent { + source: string + event_id: string + event_type: string + headline: string + severity: string + lat?: number + lon?: number + expires: number + fetched_at: number + properties: { + new_ignition: boolean + confidence: string + frp?: number + brightness?: number + acq_date: string + acq_time: string + near_fire?: string + distance_to_fire_km?: number + distance_km?: number + nearest_anchor?: string + } +} + +export interface HotspotsResponse { + enabled: boolean + hotspots: HotspotEvent[] + new_ignitions: number +} + +export interface AvalancheResponse { + off_season: boolean + advisories: AvalancheEvent[] +} + +export async function fetchFires(): Promise { + return fetchJson('/api/env/fires') +} + +export async function fetchAvalanche(): Promise { + return fetchJson('/api/env/avalanche') +} + +export async function fetchStreams(): Promise { + return fetchJson('/api/env/streams') +} + +export async function fetchTraffic(): Promise { + return fetchJson('/api/env/traffic') +} + +export async function fetchRoads(): Promise { + return fetchJson('/api/env/roads') +} + +export async function fetchHotspots(): Promise { + return fetchJson('/api/env/hotspots') +} + +export async function fetchRegions(): Promise { + return fetchJson('/api/regions') +} diff --git a/dashboard-frontend/src/pages/Dashboard.tsx b/dashboard-frontend/src/pages/Dashboard.tsx index d462855..8befb97 100644 --- a/dashboard-frontend/src/pages/Dashboard.tsx +++ b/dashboard-frontend/src/pages/Dashboard.tsx @@ -1,15 +1,19 @@ -import { useEffect, useState } from 'react' +import { useEffect, useState, useMemo } from 'react' import { fetchHealth, fetchSources, fetchAlerts, fetchEnvStatus, - fetchRFPropagation, + fetchEnvActive, + fetchSWPC, + fetchDucting, type MeshHealth, type SourceHealth, type Alert, type EnvStatus, - type RFPropagation, + type EnvEvent, + type SWPCStatus, + type DuctingStatus, } from '@/lib/api' import { useWebSocket } from '@/hooks/useWebSocket' import { @@ -22,13 +26,63 @@ import { Activity, MapPin, Zap, + Cloud, + Flame, + Mountain, + Droplets, + Car, + Construction, + Satellite, + Sun, } from 'lucide-react' +import { + AreaChart, + Area, + XAxis, + YAxis, + ResponsiveContainer, + ReferenceLine, + LineChart, + Line, +} from 'recharts' + +// Extended types for history data +interface KpHistoryEntry { + time: string + value: number +} + +interface ProfileEntry { + level_hPa: number + height_m: number + N: number + M: number + T_C: number + RH: number +} + +interface ExtendedSWPCStatus extends SWPCStatus { + kp_history?: KpHistoryEntry[] + sfi_history?: { time: string; value: number }[] +} + +interface ExtendedDuctingStatus extends DuctingStatus { + profile?: ProfileEntry[] + gradients?: { + from_level: number + to_level: number + from_height_m: number + to_height_m: number + gradient: number + }[] + assessment?: string + location?: { lat: number; lon: number } +} function HealthGauge({ health }: { health: MeshHealth }) { const score = health.score const tier = health.tier - // Color based on score const getColor = (s: number) => { if (s >= 80) return '#22c55e' if (s >= 60) return '#f59e0b' @@ -42,46 +96,17 @@ function HealthGauge({ health }: { health: MeshHealth }) { return (
- {/* Background circle */} + - {/* Progress arc */} - - {/* Score text */} - + {score.toFixed(1)} - + {tier} @@ -89,13 +114,7 @@ function HealthGauge({ health }: { health: MeshHealth }) { ) } -function PillarBar({ - label, - value, -}: { - label: string - value: number -}) { +function PillarBar({ label, value }: { label: string; value: number }) { const getColor = (v: number) => { if (v >= 80) return 'bg-green-500' if (v >= 60) return 'bg-amber-500' @@ -106,14 +125,9 @@ function PillarBar({
{label}
-
-
-
- {value.toFixed(1)} +
+
{value.toFixed(1)}
) } @@ -123,26 +137,11 @@ function AlertItem({ alert }: { alert: Alert }) { switch (severity.toLowerCase()) { case 'critical': case 'emergency': - return { - bg: 'bg-red-500/10', - border: 'border-red-500', - icon: AlertCircle, - iconColor: 'text-red-500', - } + return { bg: 'bg-red-500/10', border: 'border-red-500', icon: AlertCircle, iconColor: 'text-red-500' } case 'warning': - return { - bg: 'bg-amber-500/10', - border: 'border-amber-500', - icon: AlertTriangle, - iconColor: 'text-amber-500', - } + return { bg: 'bg-amber-500/10', border: 'border-amber-500', icon: AlertTriangle, iconColor: 'text-amber-500' } default: - return { - bg: 'bg-green-500/10', - border: 'border-green-500', - icon: Info, - iconColor: 'text-green-500', - } + return { bg: 'bg-green-500/10', border: 'border-green-500', icon: Info, iconColor: 'text-green-500' } } } @@ -150,15 +149,11 @@ function AlertItem({ alert }: { alert: Alert }) { const Icon = styles.icon return ( -
+
{alert.message}
-
- {alert.timestamp || 'Just now'} -
+
{alert.timestamp || 'Just now'}
) @@ -176,25 +171,13 @@ function SourceCard({ source }: { source: SourceHealth }) {
{source.name}
-
- {source.node_count} nodes * {source.type} -
+
{source.node_count} nodes · {source.type}
) } -function StatCard({ - icon: Icon, - label, - value, - subvalue, -}: { - icon: typeof Radio - label: string - value: string | number - subvalue?: string -}) { +function StatCard({ icon: Icon, label, value, subvalue }: { icon: typeof Radio; label: string; value: string | number; subvalue?: string }) { return (
@@ -202,100 +185,362 @@ function StatCard({ {label}
{value}
- {subvalue && ( -
{subvalue}
- )} + {subvalue &&
{subvalue}
}
) } -function RFPropagationCard({ propagation }: { propagation: RFPropagation | null }) { - if (!propagation) { - return ( -
-

- RF Propagation -

-
-

Loading propagation data...

-
+// Scale badge component for R/S/G +function ScaleBadge({ label, value }: { label: string; value: number }) { + const getColor = () => { + if (value === 0) return 'bg-green-500/20 text-green-400 border-green-500/50' + if (value <= 2) return 'bg-amber-500/20 text-amber-400 border-amber-500/50' + return 'bg-red-500/20 text-red-400 border-red-500/50' + } + + return ( + + {label}{value} + + ) +} + +// Large value display for SFI/Kp +function BigValue({ label, value, unit, getColor }: { label: string; value: number | undefined; unit?: string; getColor: (v: number) => string }) { + const color = value !== undefined ? getColor(value) : 'text-slate-400' + return ( +
+
{label}
+
+ {value?.toFixed(0) ?? '—'}
+ {unit &&
{unit}
} +
+ ) +} + +// Kp trend sparkline chart +function KpTrendChart({ history }: { history: KpHistoryEntry[] }) { + const chartData = useMemo(() => { + if (!history || history.length === 0) return [] + // Take last 16 entries (48 hours of 3-hourly data) + return history.slice(-16).map((entry, i) => ({ + idx: i, + value: entry.value, + time: entry.time, + })) + }, [history]) + + if (chartData.length === 0) return null + + const maxKp = Math.max(...chartData.map(d => d.value), 5) + const currentKp = chartData[chartData.length - 1]?.value ?? 0 + + // Gradient color based on max Kp + const getGradientId = () => { + if (maxKp > 5) return 'kpGradientRed' + if (maxKp > 3) return 'kpGradientAmber' + return 'kpGradientGreen' + } + + return ( +
+ + + + + + + + + + + + + + + + + + + + + 5 ? '#ef4444' : currentKp > 3 ? '#f59e0b' : '#22c55e'} + fill={`url(#${getGradientId()})`} + strokeWidth={2} + /> + + +
+ 48h ago + now +
+
+ ) +} + +// Refractivity profile chart +function RefractivityChart({ profile }: { profile: ProfileEntry[] }) { + const chartData = useMemo(() => { + if (!profile || profile.length === 0) return [] + return [...profile].sort((a, b) => a.height_m - b.height_m).map(p => ({ + height: p.height_m, + M: p.M, + })) + }, [profile]) + + if (chartData.length === 0) return null + + return ( +
+ + + + `${(v/1000).toFixed(1)}k`} + /> + + + +
M-units vs Height (km)
+
+ ) +} + +// RF Propagation Card +function RFPropagationCard({ swpc, ducting }: { swpc: ExtendedSWPCStatus | null; ducting: ExtendedDuctingStatus | null }) { + const getSfiColor = (v: number) => { + if (v >= 120) return 'text-green-400' + if (v >= 80) return 'text-amber-400' + return 'text-red-400' + } + + const getKpColor = (v: number) => { + if (v <= 3) return 'text-green-400' + if (v <= 5) return 'text-amber-400' + return 'text-red-400' + } + + const getDuctingBadge = (condition?: string) => { + if (!condition) return null + const styles: Record = { + normal: 'bg-green-500/20 text-green-400 border-green-500/50', + super_refraction: 'bg-amber-500/20 text-amber-400 border-amber-500/50', + surface_duct: 'bg-blue-500/20 text-blue-400 border-blue-500/50', + elevated_duct: 'bg-blue-500/20 text-blue-400 border-blue-500/50', + } + const labels: Record = { + normal: 'Normal', + super_refraction: 'Super Refraction', + surface_duct: 'Surface Duct', + elevated_duct: 'Elevated Duct', + } + return ( + + {labels[condition] || condition} + ) } - const hf = propagation.hf - const ducting = propagation.uhf_ducting - - const getDuctingColor = (condition?: string) => { - if (!condition) return 'text-slate-400' - switch (condition) { - case 'normal': - return 'text-green-500' - case 'super_refraction': - return 'text-amber-500' - case 'surface_duct': - case 'elevated_duct': - return 'text-blue-400' - default: - return 'text-slate-400' - } - } - - const hasHF = hf && (hf.sfi || hf.kp_current !== undefined) - const hasDucting = ducting && ducting.condition - return ( -
+

RF Propagation

- {/* Solar/Geomagnetic Indices */} -
-
Solar/Geomagnetic
- {hasHF ? ( -
-
- SFI {hf.sfi?.toFixed(0) || '?'} / Kp {hf.kp_current?.toFixed(1) || '?'} -
-
- R{hf.r_scale ?? 0} / S{hf.s_scale ?? 0} / G{hf.g_scale ?? 0} -
- {hf.r_scale !== undefined && hf.r_scale > 0 && ( -
- R{hf.r_scale} Radio Blackout -
- )} -
- ) : ( -
No data
- )} + {/* Top row: SFI and Kp big values */} +
+ +
+
- {/* Tropospheric Ducting */} -
-
Tropospheric
- {hasDucting ? ( -
-
- {ducting.condition === 'normal' - ? 'Normal' - : ducting.condition?.replace('_', ' ').replace(/\b\w/g, l => l.toUpperCase())} -
-
- dM/dz: {ducting.min_gradient ?? '?'} M-units/km -
- {ducting.duct_thickness_m && ( -
- Duct: ~{ducting.duct_thickness_m}m thick -
- )} -
- ) : ( -
No ducting data
- )} + {/* R/S/G Scale badges */} +
+ + +
+ + {/* Kp Trend Chart */} + {swpc?.kp_history && swpc.kp_history.length > 0 && ( +
+
Kp Trend (48h)
+ +
+ )} + + {/* Divider */} +
+ + {/* Tropospheric section */} +
+ + Tropospheric + {getDuctingBadge(ducting?.condition)} +
+ + {ducting?.min_gradient !== undefined && ( +
+ dM/dz: {ducting.min_gradient.toFixed(1)} M-units/km +
+ )} + + {/* Refractivity profile chart */} + {ducting?.profile && ducting.profile.length > 0 && ( + + )} + + {/* SWPC Warnings */} + {swpc?.active_warnings && swpc.active_warnings.length > 0 && ( +
+
SWPC Alerts
+
+ {swpc.active_warnings.slice(0, 3).map((w, i) => ( + + {w.replace('Space Weather Message Code: ', '')} + + ))} +
+
+ )} +
+ ) +} + +// Source icon mapping +const SOURCE_ICONS: Record = { + nws: { icon: Cloud, color: 'text-blue-400', label: 'NWS' }, + swpc: { icon: Sun, color: 'text-yellow-400', label: 'SWPC' }, + ducting: { icon: Radio, color: 'text-cyan-400', label: 'Tropo' }, + nifc: { icon: Flame, color: 'text-orange-400', label: 'NIFC' }, + firms: { icon: Satellite, color: 'text-red-400', label: 'FIRMS' }, + avalanche: { icon: Mountain, color: 'text-slate-300', label: 'Avy' }, + usgs: { icon: Droplets, color: 'text-blue-300', label: 'USGS' }, + traffic: { icon: Car, color: 'text-purple-400', label: 'Traffic' }, + roads: { icon: Construction, color: 'text-amber-400', label: '511' }, +} + +// Severity badge colors +const SEVERITY_COLORS: Record = { + info: 'bg-blue-500/20 text-blue-400 border-blue-500/30', + advisory: 'bg-amber-500/20 text-amber-400 border-amber-500/30', + moderate: 'bg-amber-500/20 text-amber-400 border-amber-500/30', + watch: 'bg-orange-500/20 text-orange-400 border-orange-500/30', + warning: 'bg-red-500/20 text-red-400 border-red-500/30', + critical: 'bg-red-600/20 text-red-300 border-red-600/30', + emergency: 'bg-red-700/20 text-red-200 border-red-700/30', +} + +function EventFeedItem({ event }: { event: EnvEvent }) { + const sourceConfig = SOURCE_ICONS[event.source] || { icon: Info, color: 'text-slate-400', label: event.source } + const Icon = sourceConfig.icon + const severityStyle = SEVERITY_COLORS[event.severity?.toLowerCase()] || SEVERITY_COLORS.info + + // Format timestamp + const formatTime = (ts: number) => { + const date = new Date(ts * 1000) + const now = new Date() + const diffMs = now.getTime() - date.getTime() + const diffMins = Math.floor(diffMs / 60000) + + if (diffMins < 1) return 'just now' + if (diffMins < 60) return `${diffMins}m ago` + if (diffMins < 1440) return `${Math.floor(diffMins / 60)}h ago` + return date.toLocaleDateString(undefined, { month: 'short', day: 'numeric' }) + } + + return ( +
+ +
+
+ + {event.severity || 'info'} + + {sourceConfig.label} + {formatTime(event.fetched_at)} +
+
{event.headline}
+
+
+ ) +} + +// Live Event Feed Card +function LiveEventFeed({ events, envStatus }: { events: EnvEvent[]; envStatus: EnvStatus | null }) { + const sortedEvents = useMemo(() => { + return [...events].sort((a, b) => (b.fetched_at || 0) - (a.fetched_at || 0)) + }, [events]) + + // Calculate feed health summary + const feedSummary = useMemo(() => { + if (!envStatus?.feeds) return null + const total = envStatus.feeds.length + const active = envStatus.feeds.filter(f => f.is_loaded && !f.last_error).length + const errors = envStatus.feeds.filter(f => f.last_error).map(f => f.source) + const lastFetch = Math.max(...envStatus.feeds.map(f => f.last_fetch || 0)) + const secAgo = lastFetch ? Math.floor((Date.now() / 1000) - lastFetch) : null + + return { total, active, errors, secAgo } + }, [envStatus]) + + return ( +
+

+ + Live Event Feed +

+ + {sortedEvents.length > 0 ? ( +
+ {sortedEvents.map((event, i) => ( + + ))} +
+ ) : ( +
+
+ +
No active events
+
All clear
+
+
+ )} + + {/* Feed health summary */} + {feedSummary && ( +
0 ? 'text-amber-400' : 'text-slate-500'}`}> + {feedSummary.active} of {feedSummary.total} feeds active + {feedSummary.secAgo !== null && ` · Last update ${feedSummary.secAgo}s ago`} + {feedSummary.errors.length > 0 && ( + · {feedSummary.errors.join(', ')}: error + )} +
+ )}
) } @@ -305,11 +550,13 @@ export default function Dashboard() { const [sources, setSources] = useState([]) const [alerts, setAlerts] = useState([]) const [envStatus, setEnvStatus] = useState(null) - const [rfProp, setRFProp] = useState(null) + const [envEvents, setEnvEvents] = useState([]) + const [swpc, setSwpc] = useState(null) + const [ducting, setDucting] = useState(null) const [loading, setLoading] = useState(true) const [error, setError] = useState(null) - const { lastHealth } = useWebSocket() + const { lastHealth, lastMessage } = useWebSocket() useEffect(() => { Promise.all([ @@ -317,21 +564,25 @@ export default function Dashboard() { fetchSources(), fetchAlerts(), fetchEnvStatus(), - fetchRFPropagation().catch(() => null), + fetchEnvActive().catch(() => []), + fetchSWPC().catch(() => null), + fetchDucting().catch(() => null), ]) - .then(([h, src, a, e, rf]) => { + .then(([h, src, a, e, events, sw, duct]) => { setHealth(h) setSources(src) setAlerts(a) setEnvStatus(e) - setRFProp(rf) - setLoading(false) - document.title = 'Dashboard — MeshAI' + setEnvEvents(events) + setSwpc(sw as ExtendedSWPCStatus) + setDucting(duct as ExtendedDuctingStatus) + setLoading(false) + document.title = 'Dashboard — MeshAI' }) .catch((err) => { setError(err.message) - setLoading(false) - document.title = 'Dashboard — MeshAI' + setLoading(false) + document.title = 'Dashboard — MeshAI' }) }, []) @@ -342,6 +593,18 @@ export default function Dashboard() { } }, [lastHealth]) + // Handle WebSocket env_update messages + useEffect(() => { + if (lastMessage?.type === 'env_update' && lastMessage.event) { + setEnvEvents(prev => { + // Add new event, dedupe by event_id + const newEvent = lastMessage.event as EnvEvent + const filtered = prev.filter(e => e.event_id !== newEvent.event_id) + return [newEvent, ...filtered].slice(0, 100) // Keep last 100 + }) + } + }, [lastMessage]) + if (loading) { return (
@@ -359,114 +622,76 @@ export default function Dashboard() { } return ( -
- {/* Mesh Health */} -
-

Mesh Health

- {health && ( - <> - -
- - - - -
- - )} -
- - {/* Alerts + Stats */} -
- {/* Active Alerts */} +
+ {/* Top row: Health + Alerts + Stats */} +
+ {/* Mesh Health */}
-

- Active Alerts -

- {alerts.length > 0 ? ( -
- {alerts.map((alert, i) => ( - - ))} -
- ) : ( -
- - No active alerts -
+

Mesh Health

+ {health && ( + <> + +
+ + + + +
+ )}
- {/* Quick Stats */} -
- - - - + {/* Alerts + Stats */} +
+ {/* Active Alerts */} +
+

Active Alerts

+ {alerts.length > 0 ? ( +
+ {alerts.map((alert, i) => ( + + ))} +
+ ) : ( +
+ + No active alerts +
+ )} +
+ + {/* Quick Stats */} +
+ + + + +
- {/* Mesh Sources */} -
-

- Mesh Sources ({sources.length}) -

- {sources.length > 0 ? ( -
- {sources.map((source, i) => ( - - ))} -
- ) : ( -
No sources configured
- )} -
+ {/* Middle row: Sources + RF Propagation + Live Feed */} +
+ {/* Mesh Sources */} +
+

Mesh Sources ({sources.length})

+ {sources.length > 0 ? ( +
+ {sources.map((source, i) => ( + + ))} +
+ ) : ( +
No sources configured
+ )} +
- {/* Environmental Feeds */} -
-

- Environmental Feeds -

- {envStatus?.enabled ? ( -
- {envStatus.feeds.length} feeds active -
- ) : ( -
-

Environmental feeds not enabled.

-

- Enable in config.yaml -

-
- )} -
+ {/* RF Propagation */} + - {/* RF Propagation */} - + {/* Live Event Feed */} + +
) } diff --git a/meshai/dashboard/static/assets/index-D0mCSizv.css b/meshai/dashboard/static/assets/index-D0mCSizv.css deleted file mode 100644 index 8ccf895..0000000 --- a/meshai/dashboard/static/assets/index-D0mCSizv.css +++ /dev/null @@ -1 +0,0 @@ -.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.left-0\.5{left:.125rem}.left-1{left:.25rem}.left-3{left:.75rem}.left-4{left:1rem}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.top-6{top:1.5rem}.top-full{top:100%}.z-0{z-index:0}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.-my-4{margin-top:-1rem;margin-bottom:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-4{margin-left:-1rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-\[540px\]{height:540px}.h-\[60vh\]{height:60vh}.h-\[calc\(100vh-8rem\)\]{height:calc(100vh - 8rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-64{max-height:16rem}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[220px\]{width:220px}.w-\[250px\]{width:250px}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.max-w-4xl{max-width:56rem}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-4{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 42 58 / var(--tw-divide-opacity, 1))}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#1e2a3a\]{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-\[\#2a3a4a\]{--tw-border-opacity: 1;border-color:rgb(42 58 74 / var(--tw-border-opacity, 1))}.border-accent{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/20{border-color:#f59e0b33}.border-amber-500\/30{border-color:#f59e0b4d}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-border{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-500\/20{border-color:#22c55e33}.border-green-500\/30{border-color:#22c55e4d}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-red-400\/30{border-color:#f871714d}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/20{border-color:#ef444433}.border-red-500\/30{border-color:#ef44444d}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-slate-600{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-\[\#0a0e17\]{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-\[\#1a2332\]{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-\[\#1e2a3a\]{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-\[\#1e2a3a\]\/50{background-color:#1e2a3a80}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:#3b82f61a}.bg-accent\/20{background-color:#3b82f633}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-bg{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-bg-card{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-bg-card\/90{background-color:#111827e6}.bg-bg-hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-border{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-cyan-500\/20{background-color:#06b6d433}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-orange-500\/10{background-color:#f973161a}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-500\/10{background-color:#64748b1a}.bg-slate-500\/20{background-color:#64748b33}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/20{background-color:#eab30833}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-700{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.fill-slate-100{fill:#f1f5f9}.fill-slate-400{fill:#94a3b8}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-4{padding-bottom:1rem}.pl-6{padding-left:1.5rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-relaxed{line-height:1.625}.tracking-wide{letter-spacing:.025em}.text-accent{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.opacity-60{opacity:.6}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}body{background:#0a0e17;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0a0e17}::-webkit-scrollbar-thumb{background:#2d3a4d;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#3b4a5d}.font-mono{font-family:JetBrains Mono,monospace}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse-slow{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.animate-slide-in{animation:slide-in .3s ease-out}.line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hover\:border-\[\#2a3a4a\]:hover{--tw-border-opacity: 1;border-color:rgb(42 58 74 / var(--tw-border-opacity, 1))}.hover\:border-accent:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#0a0e17\]:hover{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#1e2a3a\]:hover{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#1e2a3a\]\/50:hover{background-color:#1e2a3a80}.hover\:bg-accent\/80:hover{background-color:#3b82f6cc}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-bg-hover:hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-500\/10:hover{background-color:#3b82f61a}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-slate-500\/10:hover{background-color:#64748b1a}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-slate-200:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.hover\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-accent:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-slate-700:disabled{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.group[open] .group-open\:rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width: 640px){.sm\:block{display:block}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} diff --git a/meshai/dashboard/static/assets/index-DrKrP8CJ.js b/meshai/dashboard/static/assets/index-DrKrP8CJ.js new file mode 100644 index 0000000..9f7fa47 --- /dev/null +++ b/meshai/dashboard/static/assets/index-DrKrP8CJ.js @@ -0,0 +1,503 @@ +function qae(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Xp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var PU={exports:{}},Xw={},LU={exports:{}},gt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Py=Symbol.for("react.element"),Kae=Symbol.for("react.portal"),Qae=Symbol.for("react.fragment"),Jae=Symbol.for("react.strict_mode"),eoe=Symbol.for("react.profiler"),toe=Symbol.for("react.provider"),roe=Symbol.for("react.context"),noe=Symbol.for("react.forward_ref"),ioe=Symbol.for("react.suspense"),aoe=Symbol.for("react.memo"),ooe=Symbol.for("react.lazy"),L5=Symbol.iterator;function soe(e){return e===null||typeof e!="object"?null:(e=L5&&e[L5]||e["@@iterator"],typeof e=="function"?e:null)}var kU={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},OU=Object.assign,DU={};function Jd(e,t,r){this.props=e,this.context=t,this.refs=DU,this.updater=r||kU}Jd.prototype.isReactComponent={};Jd.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Jd.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function EU(){}EU.prototype=Jd.prototype;function ID(e,t,r){this.props=e,this.context=t,this.refs=DU,this.updater=r||kU}var ND=ID.prototype=new EU;ND.constructor=ID;OU(ND,Jd.prototype);ND.isPureReactComponent=!0;var k5=Array.isArray,IU=Object.prototype.hasOwnProperty,RD={current:null},NU={key:!0,ref:!0,__self:!0,__source:!0};function RU(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)IU.call(t,n)&&!NU.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,Z=z[Y];if(0>>1;Yi(ce,H))gei(Fe,ce)?(z[Y]=Fe,z[ge]=H,Y=ge):(z[Y]=ce,z[ae]=H,Y=ae);else if(gei(Fe,H))z[Y]=Fe,z[ge]=H,Y=ge;else break e}}return U}function i(z,U){var H=z.sortIndex-U.sortIndex;return H!==0?H:z.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,h=3,d=!1,v=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(z){for(var U=r(u);U!==null;){if(U.callback===null)n(u);else if(U.startTime<=z)n(u),U.sortIndex=U.expirationTime,t(l,U);else break;U=r(u)}}function w(z){if(g=!1,x(z),!v)if(r(l)!==null)v=!0,$(S);else{var U=r(u);U!==null&&G(w,U.startTime-z)}}function S(z,U){v=!1,g&&(g=!1,y(P),P=-1),d=!0;var H=h;try{for(x(U),f=r(l);f!==null&&(!(f.expirationTime>U)||z&&!D());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,h=f.priorityLevel;var Z=Y(f.expirationTime<=U);U=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===r(l)&&n(l),x(U)}else n(l);f=r(l)}if(f!==null)var J=!0;else{var ae=r(u);ae!==null&&G(w,ae.startTime-U),J=!1}return J}finally{f=null,h=H,d=!1}}var C=!1,M=null,P=-1,k=5,O=-1;function D(){return!(e.unstable_now()-Oz||125Y?(z.sortIndex=H,t(u,z),r(l)===null&&z===r(u)&&(g?(y(P),P=-1):g=!0,G(w,H-Y))):(z.sortIndex=Z,t(l,z),v||d||(v=!0,$(S))),z},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(z){var U=h;return function(){var H=h;h=U;try{return z.apply(this,arguments)}finally{h=H}}}})(FU);$U.exports=FU;var _oe=$U.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var xoe=W,Ai=_oe;function me(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),QM=Object.prototype.hasOwnProperty,boe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,D5={},E5={};function woe(e){return QM.call(E5,e)?!0:QM.call(D5,e)?!1:boe.test(e)?E5[e]=!0:(D5[e]=!0,!1)}function Soe(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Toe(e,t,r,n){if(t===null||typeof t>"u"||Soe(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Wn(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var dn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){dn[e]=new Wn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];dn[t]=new Wn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){dn[e]=new Wn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dn[e]=new Wn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){dn[e]=new Wn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){dn[e]=new Wn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){dn[e]=new Wn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){dn[e]=new Wn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){dn[e]=new Wn(e,5,!1,e.toLowerCase(),null,!1,!1)});var BD=/[\-:]([a-z])/g;function zD(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(BD,zD);dn[t]=new Wn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(BD,zD);dn[t]=new Wn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(BD,zD);dn[t]=new Wn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){dn[e]=new Wn(e,1,!1,e.toLowerCase(),null,!1,!1)});dn.xlinkHref=new Wn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){dn[e]=new Wn(e,1,!1,e.toLowerCase(),null,!0,!0)});function $D(e,t,r,n){var i=dn.hasOwnProperty(t)?dn[t]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` +`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{wC=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?qp(e):""}function Coe(e){switch(e.tag){case 5:return qp(e.type);case 16:return qp("Lazy");case 13:return qp("Suspense");case 19:return qp("SuspenseList");case 0:case 2:case 15:return e=SC(e.type,!1),e;case 11:return e=SC(e.type.render,!1),e;case 1:return e=SC(e.type,!0),e;default:return""}}function rP(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case mh:return"Fragment";case gh:return"Portal";case JM:return"Profiler";case FD:return"StrictMode";case eP:return"Suspense";case tP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case HU:return(e.displayName||"Context")+".Consumer";case GU:return(e._context.displayName||"Context")+".Provider";case VD:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case GD:return t=e.displayName||null,t!==null?t:rP(e.type)||"Memo";case sl:t=e._payload,e=e._init;try{return rP(e(t))}catch{}}return null}function Aoe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return rP(t);case 8:return t===FD?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Wl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UU(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Moe(e){var t=UU(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function R0(e){e._valueTracker||(e._valueTracker=Moe(e))}function ZU(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=UU(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function lb(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function nP(e,t){var r=t.checked;return ar({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function N5(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Wl(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function YU(e,t){t=t.checked,t!=null&&$D(e,"checked",t,!1)}function iP(e,t){YU(e,t);var r=Wl(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?aP(e,t.type,r):t.hasOwnProperty("defaultValue")&&aP(e,t.type,Wl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function R5(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function aP(e,t,r){(t!=="number"||lb(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Kp=Array.isArray;function zh(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=j0.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ug(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var vg={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Poe=["Webkit","ms","Moz","O"];Object.keys(vg).forEach(function(e){Poe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vg[t]=vg[e]})});function QU(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||vg.hasOwnProperty(e)&&vg[e]?(""+t).trim():t+"px"}function JU(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=QU(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var Loe=ar({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function lP(e,t){if(t){if(Loe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(me(62))}}function uP(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var cP=null;function HD(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fP=null,$h=null,Fh=null;function z5(e){if(e=Oy(e)){if(typeof fP!="function")throw Error(me(280));var t=e.stateNode;t&&(t=eS(t),fP(e.stateNode,e.type,t))}}function e7(e){$h?Fh?Fh.push(e):Fh=[e]:$h=e}function t7(){if($h){var e=$h,t=Fh;if(Fh=$h=null,z5(e),t)for(e=0;e>>=0,e===0?32:31-($oe(e)/Foe|0)|0}var B0=64,z0=4194304;function Qp(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hb(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Qp(s):(a&=o,a!==0&&(n=Qp(a)))}else o=r&~i,o!==0?n=Qp(o):a!==0&&(n=Qp(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Ly(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ea(t),e[t]=r}function Woe(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=gg),Y5=" ",X5=!1;function b7(e,t){switch(e){case"keyup":return _se.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w7(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yh=!1;function bse(e,t){switch(e){case"compositionend":return w7(t);case"keypress":return t.which!==32?null:(X5=!0,Y5);case"textInput":return e=t.data,e===Y5&&X5?null:e;default:return null}}function wse(e,t){if(yh)return e==="compositionend"||!QD&&b7(e,t)?(e=_7(),Ox=XD=vl=null,yh=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=J5(r)}}function A7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?A7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function M7(){for(var e=window,t=lb();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=lb(e.document)}return t}function JD(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ose(e){var t=M7(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&A7(r.ownerDocument.documentElement,r)){if(n!==null&&JD(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=eB(r,a);var o=eB(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,_h=null,mP=null,yg=null,yP=!1;function tB(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;yP||_h==null||_h!==lb(n)||(n=_h,"selectionStart"in n&&JD(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),yg&&Qg(yg,n)||(yg=n,n=pb(mP,"onSelect"),0wh||(e.current=TP[wh],TP[wh]=null,wh--)}function Ht(e,t){wh++,TP[wh]=e.current,e.current=t}var Ul={},kn=eu(Ul),ni=eu(!1),Nc=Ul;function id(e,t){var r=e.type.contextTypes;if(!r)return Ul;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ii(e){return e=e.childContextTypes,e!=null}function mb(){Xt(ni),Xt(kn)}function lB(e,t,r){if(kn.current!==Ul)throw Error(me(168));Ht(kn,t),Ht(ni,r)}function R7(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(me(108,Aoe(e)||"Unknown",i));return ar({},r,n)}function yb(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ul,Nc=kn.current,Ht(kn,e),Ht(ni,ni.current),!0}function uB(e,t,r){var n=e.stateNode;if(!n)throw Error(me(169));r?(e=R7(e,t,Nc),n.__reactInternalMemoizedMergedChildContext=e,Xt(ni),Xt(kn),Ht(kn,e)):Xt(ni),Ht(ni,r)}var ns=null,tS=!1,jC=!1;function j7(e){ns===null?ns=[e]:ns.push(e)}function Gse(e){tS=!0,j7(e)}function tu(){if(!jC&&ns!==null){jC=!0;var e=0,t=Dt;try{var r=ns;for(Dt=1;e>=o,i-=o,as=1<<32-Ea(t)+i|r<P?(k=M,M=null):k=M.sibling;var O=h(y,M,x[P],w);if(O===null){M===null&&(M=k);break}e&&M&&O.alternate===null&&t(y,M),_=a(O,_,P),C===null?S=O:C.sibling=O,C=O,M=k}if(P===x.length)return r(y,M),qt&&Wu(y,P),S;if(M===null){for(;PP?(k=M,M=null):k=M.sibling;var D=h(y,M,O.value,w);if(D===null){M===null&&(M=k);break}e&&M&&D.alternate===null&&t(y,M),_=a(D,_,P),C===null?S=D:C.sibling=D,C=D,M=k}if(O.done)return r(y,M),qt&&Wu(y,P),S;if(M===null){for(;!O.done;P++,O=x.next())O=f(y,O.value,w),O!==null&&(_=a(O,_,P),C===null?S=O:C.sibling=O,C=O);return qt&&Wu(y,P),S}for(M=n(y,M);!O.done;P++,O=x.next())O=d(M,y,P,O.value,w),O!==null&&(e&&O.alternate!==null&&M.delete(O.key===null?P:O.key),_=a(O,_,P),C===null?S=O:C.sibling=O,C=O);return e&&M.forEach(function(I){return t(y,I)}),qt&&Wu(y,P),S}function m(y,_,x,w){if(typeof x=="object"&&x!==null&&x.type===mh&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case N0:e:{for(var S=x.key,C=_;C!==null;){if(C.key===S){if(S=x.type,S===mh){if(C.tag===7){r(y,C.sibling),_=i(C,x.props.children),_.return=y,y=_;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===sl&&hB(S)===C.type){r(y,C.sibling),_=i(C,x.props),_.ref=ip(y,C,x),_.return=y,y=_;break e}r(y,C);break}else t(y,C);C=C.sibling}x.type===mh?(_=Sc(x.props.children,y.mode,w,x.key),_.return=y,y=_):(w=zx(x.type,x.key,x.props,null,y.mode,w),w.ref=ip(y,_,x),w.return=y,y=w)}return o(y);case gh:e:{for(C=x.key;_!==null;){if(_.key===C)if(_.tag===4&&_.stateNode.containerInfo===x.containerInfo&&_.stateNode.implementation===x.implementation){r(y,_.sibling),_=i(_,x.children||[]),_.return=y,y=_;break e}else{r(y,_);break}else t(y,_);_=_.sibling}_=WC(x,y.mode,w),_.return=y,y=_}return o(y);case sl:return C=x._init,m(y,_,C(x._payload),w)}if(Kp(x))return v(y,_,x,w);if(Jv(x))return g(y,_,x,w);U0(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,_!==null&&_.tag===6?(r(y,_.sibling),_=i(_,x),_.return=y,y=_):(r(y,_),_=HC(x,y.mode,w),_.return=y,y=_),o(y)):r(y,_)}return m}var od=F7(!0),V7=F7(!1),bb=eu(null),wb=null,Ch=null,nE=null;function iE(){nE=Ch=wb=null}function aE(e){var t=bb.current;Xt(bb),e._currentValue=t}function MP(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Gh(e,t){wb=e,nE=Ch=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ti=!0),e.firstContext=null)}function na(e){var t=e._currentValue;if(nE!==e)if(e={context:e,memoizedValue:t,next:null},Ch===null){if(wb===null)throw Error(me(308));Ch=e,wb.dependencies={lanes:0,firstContext:e}}else Ch=Ch.next=e;return t}var lc=null;function oE(e){lc===null?lc=[e]:lc.push(e)}function G7(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,oE(t)):(r.next=i.next,i.next=r),t.interleaved=r,As(e,n)}function As(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ll=!1;function sE(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function H7(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function vs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function kl(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,xt&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,As(e,r)}return i=n.interleaved,i===null?(t.next=t,oE(n)):(t.next=i.next,i.next=t),n.interleaved=t,As(e,r)}function Ex(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,UD(e,r)}}function dB(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Sb(e,t,r,n){var i=e.updateQueue;ll=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var h=s.lane,d=s.eventTime;if((n&h)===h){c!==null&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,g=s;switch(h=t,d=r,g.tag){case 1:if(v=g.payload,typeof v=="function"){f=v.call(d,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,h=typeof v=="function"?v.call(d,f,h):v,h==null)break e;f=ar({},f,h);break e;case 2:ll=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else d={eventTime:d,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Bc|=o,e.lanes=o,e.memoizedState=f}}function vB(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=zC.transition;zC.transition={};try{e(!1),t()}finally{Dt=r,zC.transition=n}}function s9(){return ia().memoizedState}function Zse(e,t,r){var n=Dl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},l9(e))u9(t,r);else if(r=G7(e,t,r,n),r!==null){var i=zn();Ia(r,e,n,i),c9(r,t,n)}}function Yse(e,t,r){var n=Dl(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(l9(e))u9(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,za(s,o)){var l=t.interleaved;l===null?(i.next=i,oE(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=G7(e,t,i,n),r!==null&&(i=zn(),Ia(r,e,n,i),c9(r,t,n))}}function l9(e){var t=e.alternate;return e===rr||t!==null&&t===rr}function u9(e,t){_g=Cb=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function c9(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,UD(e,r)}}var Ab={readContext:na,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useInsertionEffect:yn,useLayoutEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useMutableSource:yn,useSyncExternalStore:yn,useId:yn,unstable_isNewReconciler:!1},Xse={readContext:na,useCallback:function(e,t){return oo().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:gB,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Nx(4194308,4,r9.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Nx(4194308,4,e,t)},useInsertionEffect:function(e,t){return Nx(4,2,e,t)},useMemo:function(e,t){var r=oo();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=oo();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Zse.bind(null,rr,e),[n.memoizedState,e]},useRef:function(e){var t=oo();return e={current:e},t.memoizedState=e},useState:pB,useDebugValue:pE,useDeferredValue:function(e){return oo().memoizedState=e},useTransition:function(){var e=pB(!1),t=e[0];return e=Use.bind(null,e[1]),oo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=rr,i=oo();if(qt){if(r===void 0)throw Error(me(407));r=r()}else{if(r=t(),Jr===null)throw Error(me(349));jc&30||Y7(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,gB(q7.bind(null,n,a,e),[e]),n.flags|=2048,om(9,X7.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=oo(),t=Jr.identifierPrefix;if(qt){var r=os,n=as;r=(n&~(1<<32-Ea(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=im++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[lo]=t,e[tm]=n,x9(e,t,!1,!1),t.stateNode=e;e:{switch(o=uP(r,n),r){case"dialog":Ut("cancel",e),Ut("close",e),i=n;break;case"iframe":case"object":case"embed":Ut("load",e),i=n;break;case"video":case"audio":for(i=0;iud&&(t.flags|=128,n=!0,ap(a,!1),t.lanes=4194304)}else{if(!n)if(e=Tb(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ap(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!qt)return _n(t),null}else 2*mr()-a.renderingStartTime>ud&&r!==1073741824&&(t.flags|=128,n=!0,ap(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=mr(),t.sibling=null,r=tr.current,Ht(tr,n?r&1|2:r&1),t):(_n(t),null);case 22:case 23:return bE(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?hi&1073741824&&(_n(t),t.subtreeFlags&6&&(t.flags|=8192)):_n(t),null;case 24:return null;case 25:return null}throw Error(me(156,t.tag))}function nle(e,t){switch(tE(t),t.tag){case 1:return ii(t.type)&&mb(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sd(),Xt(ni),Xt(kn),cE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return uE(t),null;case 13:if(Xt(tr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(me(340));ad()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xt(tr),null;case 4:return sd(),null;case 10:return aE(t.type._context),null;case 22:case 23:return bE(),null;case 24:return null;default:return null}}var Y0=!1,Cn=!1,ile=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function Ah(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){lr(e,t,n)}else r.current=null}function RP(e,t,r){try{r()}catch(n){lr(e,t,n)}}var MB=!1;function ale(e,t){if(_P=db,e=M7(),JD(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,h=null;t:for(;;){for(var d;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===e)break t;if(h===r&&++u===i&&(s=o),h===a&&++c===n&&(l=o),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(xP={focusedElem:e,selectionRange:r},db=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){t=Ie;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,m=v.memoizedState,y=t.stateNode,_=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Sa(t.type,g),m);y.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(me(163))}}catch(w){lr(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,Ie=e;break}Ie=t.return}return v=MB,MB=!1,v}function xg(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&RP(t,r,a)}i=i.next}while(i!==n)}}function iS(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function jP(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function S9(e){var t=e.alternate;t!==null&&(e.alternate=null,S9(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lo],delete t[tm],delete t[SP],delete t[Fse],delete t[Vse])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function T9(e){return e.tag===5||e.tag===3||e.tag===4}function PB(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||T9(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function BP(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=gb));else if(n!==4&&(e=e.child,e!==null))for(BP(e,t,r),e=e.sibling;e!==null;)BP(e,t,r),e=e.sibling}function zP(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(zP(e,t,r),e=e.sibling;e!==null;)zP(e,t,r),e=e.sibling}var on=null,Ca=!1;function Xs(e,t,r){for(r=r.child;r!==null;)C9(e,t,r),r=r.sibling}function C9(e,t,r){if(bo&&typeof bo.onCommitFiberUnmount=="function")try{bo.onCommitFiberUnmount(qw,r)}catch{}switch(r.tag){case 5:Cn||Ah(r,t);case 6:var n=on,i=Ca;on=null,Xs(e,t,r),on=n,Ca=i,on!==null&&(Ca?(e=on,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):on.removeChild(r.stateNode));break;case 18:on!==null&&(Ca?(e=on,r=r.stateNode,e.nodeType===8?RC(e.parentNode,r):e.nodeType===1&&RC(e,r),qg(e)):RC(on,r.stateNode));break;case 4:n=on,i=Ca,on=r.stateNode.containerInfo,Ca=!0,Xs(e,t,r),on=n,Ca=i;break;case 0:case 11:case 14:case 15:if(!Cn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&RP(r,t,o),i=i.next}while(i!==n)}Xs(e,t,r);break;case 1:if(!Cn&&(Ah(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){lr(r,t,s)}Xs(e,t,r);break;case 21:Xs(e,t,r);break;case 22:r.mode&1?(Cn=(n=Cn)||r.memoizedState!==null,Xs(e,t,r),Cn=n):Xs(e,t,r);break;default:Xs(e,t,r)}}function LB(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new ile),t.forEach(function(n){var i=vle.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function ma(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=mr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*sle(n/1960))-n,10e?16:e,pl===null)var n=!1;else{if(e=pl,pl=null,Lb=0,xt&6)throw Error(me(331));var i=xt;for(xt|=4,Ie=e.current;Ie!==null;){var a=Ie,o=a.child;if(Ie.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lmr()-_E?wc(e,0):yE|=r),ai(e,t)}function E9(e,t){t===0&&(e.mode&1?(t=z0,z0<<=1,!(z0&130023424)&&(z0=4194304)):t=1);var r=zn();e=As(e,t),e!==null&&(Ly(e,t,r),ai(e,r))}function dle(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),E9(e,r)}function vle(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(me(314))}n!==null&&n.delete(t),E9(e,r)}var I9;I9=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ni.current)ti=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ti=!1,tle(e,t,r);ti=!!(e.flags&131072)}else ti=!1,qt&&t.flags&1048576&&B7(t,xb,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Rx(e,t),e=t.pendingProps;var i=id(t,kn.current);Gh(t,r),i=hE(null,t,n,e,i,r);var a=dE();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ii(n)?(a=!0,yb(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,sE(t),i.updater=nS,t.stateNode=i,i._reactInternals=t,LP(t,n,e,r),t=DP(null,t,n,!0,a,r)):(t.tag=0,qt&&a&&eE(t),In(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Rx(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=gle(n),e=Sa(n,e),i){case 0:t=OP(null,t,n,e,r);break e;case 1:t=TB(null,t,n,e,r);break e;case 11:t=wB(null,t,n,e,r);break e;case 14:t=SB(null,t,n,Sa(n.type,e),r);break e}throw Error(me(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Sa(n,i),OP(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Sa(n,i),TB(e,t,n,i,r);case 3:e:{if(m9(t),e===null)throw Error(me(387));n=t.pendingProps,a=t.memoizedState,i=a.element,H7(e,t),Sb(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=ld(Error(me(423)),t),t=CB(e,t,n,r,i);break e}else if(n!==i){i=ld(Error(me(424)),t),t=CB(e,t,n,r,i);break e}else for(_i=Ll(t.stateNode.containerInfo.firstChild),Ti=t,qt=!0,Pa=null,r=V7(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ad(),n===i){t=Ms(e,t,r);break e}In(e,t,n,r)}t=t.child}return t;case 5:return W7(t),e===null&&AP(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,bP(n,i)?o=null:a!==null&&bP(n,a)&&(t.flags|=32),g9(e,t),In(e,t,o,r),t.child;case 6:return e===null&&AP(t),null;case 13:return y9(e,t,r);case 4:return lE(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=od(t,null,n,r):In(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Sa(n,i),wB(e,t,n,i,r);case 7:return In(e,t,t.pendingProps,r),t.child;case 8:return In(e,t,t.pendingProps.children,r),t.child;case 12:return In(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Ht(bb,n._currentValue),n._currentValue=o,a!==null)if(za(a.value,o)){if(a.children===i.children&&!ni.current){t=Ms(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=vs(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),MP(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(me(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),MP(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}In(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Gh(t,r),i=na(i),n=n(i),t.flags|=1,In(e,t,n,r),t.child;case 14:return n=t.type,i=Sa(n,t.pendingProps),i=Sa(n.type,i),SB(e,t,n,i,r);case 15:return v9(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Sa(n,i),Rx(e,t),t.tag=1,ii(n)?(e=!0,yb(t)):e=!1,Gh(t,r),f9(t,n,i),LP(t,n,i,r),DP(null,t,n,!0,e,r);case 19:return _9(e,t,r);case 22:return p9(e,t,r)}throw Error(me(156,t.tag))};function N9(e,t){return l7(e,t)}function ple(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qi(e,t,r,n){return new ple(e,t,r,n)}function SE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gle(e){if(typeof e=="function")return SE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===VD)return 11;if(e===GD)return 14}return 2}function El(e,t){var r=e.alternate;return r===null?(r=qi(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function zx(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")SE(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case mh:return Sc(r.children,i,a,t);case FD:o=8,i|=8;break;case JM:return e=qi(12,r,t,i|2),e.elementType=JM,e.lanes=a,e;case eP:return e=qi(13,r,t,i),e.elementType=eP,e.lanes=a,e;case tP:return e=qi(19,r,t,i),e.elementType=tP,e.lanes=a,e;case WU:return oS(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case GU:o=10;break e;case HU:o=9;break e;case VD:o=11;break e;case GD:o=14;break e;case sl:o=16,n=null;break e}throw Error(me(130,e==null?e:typeof e,""))}return t=qi(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Sc(e,t,r,n){return e=qi(7,e,n,t),e.lanes=r,e}function oS(e,t,r,n){return e=qi(22,e,n,t),e.elementType=WU,e.lanes=r,e.stateNode={isHidden:!1},e}function HC(e,t,r){return e=qi(6,e,null,t),e.lanes=r,e}function WC(e,t,r){return t=qi(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mle(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=CC(0),this.expirationTimes=CC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=CC(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function TE(e,t,r,n,i,a,o,s,l){return e=new mle(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=qi(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},sE(a),e}function yle(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(z9)}catch(e){console.error(e)}}z9(),zU.exports=Mi;var $9=zU.exports,jB=$9;KM.createRoot=jB.createRoot,KM.hydrateRoot=jB.hydrateRoot;/** + * @remix-run/router v1.23.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function lm(){return lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function PE(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Tle(){return Math.random().toString(36).substr(2,8)}function zB(e,t){return{usr:e.state,key:e.key,idx:t}}function HP(e,t,r,n){return r===void 0&&(r=null),lm({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?rv(t):t,{state:r,key:t&&t.key||n||Tle()})}function Db(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function rv(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Cle(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=gl.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(lm({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=gl.Pop;let m=c(),y=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:y})}function h(m,y){s=gl.Push;let _=HP(g.location,m,y);u=c()+1;let x=zB(_,u),w=g.createHref(_);try{o.pushState(x,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(w)}a&&l&&l({action:s,location:g.location,delta:1})}function d(m,y){s=gl.Replace;let _=HP(g.location,m,y);u=c();let x=zB(_,u),w=g.createHref(_);o.replaceState(x,"",w),a&&l&&l({action:s,location:g.location,delta:0})}function v(m){let y=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof m=="string"?m:Db(m);return _=_.replace(/ $/,"%20"),Mr(y,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,y)}let g={get action(){return s},get location(){return e(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(BB,f),l=m,()=>{i.removeEventListener(BB,f),l=null}},createHref(m){return t(i,m)},createURL:v,encodeLocation(m){let y=v(m);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:d,go(m){return o.go(m)}};return g}var $B;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})($B||($B={}));function Ale(e,t,r){return r===void 0&&(r="/"),Mle(e,t,r)}function Mle(e,t,r,n){let i=typeof t=="string"?rv(t):t,a=LE(i.pathname||"/",r);if(a==null)return null;let o=F9(e);Ple(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Mr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Il([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(Mr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),F9(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:Nle(u,a.index),routesMeta:c})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of V9(a.path))i(a,o,l)}),t}function V9(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=V9(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ple(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Rle(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Lle=/^:[\w-]+$/,kle=3,Ole=2,Dle=1,Ele=10,Ile=-2,FB=e=>e==="*";function Nle(e,t){let r=e.split("/"),n=r.length;return r.some(FB)&&(n+=Ile),t&&(n+=Ole),r.filter(i=>!FB(i)).reduce((i,a)=>i+(Lle.test(a)?kle:a===""?Dle:Ele),n)}function Rle(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function jle(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:h,isOptional:d}=c;if(h==="*"){let g=s[f]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const v=s[f];return d&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function zle(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),PE(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function $le(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return PE(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function LE(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const Fle=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vle=e=>Fle.test(e);function Gle(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?rv(e):e,a;if(r)if(Vle(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),PE(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=VB(r.substring(1),"/"):a=VB(r,t)}else a=t;return{pathname:a,search:Ule(n),hash:Zle(i)}}function VB(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function UC(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Hle(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function G9(e,t){let r=Hle(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function H9(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=rv(e):(i=lm({},e),Mr(!i.pathname||!i.pathname.includes("?"),UC("?","pathname","search",i)),Mr(!i.pathname||!i.pathname.includes("#"),UC("#","pathname","hash",i)),Mr(!i.search||!i.search.includes("#"),UC("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let l=Gle(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Il=e=>e.join("/").replace(/\/\/+/g,"/"),Wle=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ule=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zle=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Yle(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const W9=["post","put","patch","delete"];new Set(W9);const Xle=["get",...W9];new Set(Xle);/** + * React Router v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function um(){return um=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),W.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=H9(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Il([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,a,e])}function X9(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=W.useContext(of),{matches:i}=W.useContext(sf),{pathname:a}=Iy(),o=JSON.stringify(G9(i,n.v7_relativeSplatPath));return W.useMemo(()=>H9(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function Jle(e,t){return eue(e,t)}function eue(e,t,r,n){Ey()||Mr(!1);let{navigator:i}=W.useContext(of),{matches:a}=W.useContext(sf),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Iy(),c;if(t){var f;let m=typeof t=="string"?rv(t):t;l==="/"||(f=m.pathname)!=null&&f.startsWith(l)||Mr(!1),c=m}else c=u;let h=c.pathname||"/",d=h;if(l!=="/"){let m=l.replace(/^\//,"").split("/");d="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=Ale(e,{pathname:d}),g=aue(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:Il([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:Il([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return t&&g?W.createElement(fS.Provider,{value:{location:um({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:gl.Pop}},g):g}function tue(){let e=uue(),t=Yle(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return W.createElement(W.Fragment,null,W.createElement("h2",null,"Unexpected Application Error!"),W.createElement("h3",{style:{fontStyle:"italic"}},t),r?W.createElement("pre",{style:i},r):null,null)}const rue=W.createElement(tue,null);class nue extends W.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?W.createElement(sf.Provider,{value:this.props.routeContext},W.createElement(U9.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function iue(e){let{routeContext:t,match:r,children:n}=e,i=W.useContext(kE);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),W.createElement(sf.Provider,{value:t},n)}function aue(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||Mr(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let d,v=!1,g=null,m=null;r&&(d=s&&f.route.id?s[f.route.id]:void 0,g=f.route.errorElement||rue,l&&(u<0&&h===0?(fue("route-fallback"),v=!0,m=null):u===h&&(v=!0,m=f.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,h+1)),_=()=>{let x;return d?x=g:v?x=m:f.route.Component?x=W.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=c,W.createElement(iue,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:x})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?W.createElement(nue,{location:r.location,revalidation:r.revalidation,component:g,error:d,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):_()},null)}var q9=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(q9||{}),K9=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(K9||{});function oue(e){let t=W.useContext(kE);return t||Mr(!1),t}function sue(e){let t=W.useContext(qle);return t||Mr(!1),t}function lue(e){let t=W.useContext(sf);return t||Mr(!1),t}function Q9(e){let t=lue(),r=t.matches[t.matches.length-1];return r.route.id||Mr(!1),r.route.id}function uue(){var e;let t=W.useContext(U9),r=sue(),n=Q9();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function cue(){let{router:e}=oue(q9.UseNavigateStable),t=Q9(K9.UseNavigateStable),r=W.useRef(!1);return Z9(()=>{r.current=!0}),W.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,um({fromRouteId:t},a)))},[e,t])}const GB={};function fue(e,t,r){GB[e]||(GB[e]=!0)}function hue(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Zu(e){Mr(!1)}function due(e){let{basename:t="/",children:r=null,location:n,navigationType:i=gl.Pop,navigator:a,static:o=!1,future:s}=e;Ey()&&Mr(!1);let l=t.replace(/^\/*/,"/"),u=W.useMemo(()=>({basename:l,navigator:a,static:o,future:um({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=rv(n));let{pathname:c="/",search:f="",hash:h="",state:d=null,key:v="default"}=n,g=W.useMemo(()=>{let m=LE(c,l);return m==null?null:{location:{pathname:m,search:f,hash:h,state:d,key:v},navigationType:i}},[l,c,f,h,d,v,i]);return g==null?null:W.createElement(of.Provider,{value:u},W.createElement(fS.Provider,{children:r,value:g}))}function vue(e){let{children:t,location:r}=e;return Jle(WP(t),r)}new Promise(()=>{});function WP(e,t){t===void 0&&(t=[]);let r=[];return W.Children.forEach(e,(n,i)=>{if(!W.isValidElement(n))return;let a=[...t,i];if(n.type===W.Fragment){r.push.apply(r,WP(n.props.children,a));return}n.type!==Zu&&Mr(!1),!n.props.index||!n.props.children||Mr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=WP(n.props.children,a)),r.push(o)}),r}/** + * React Router DOM v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function UP(){return UP=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function gue(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mue(e,t){return e.button===0&&(!t||t==="_self")&&!gue(e)}const yue=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],_ue="6";try{window.__reactRouterVersion=_ue}catch{}const xue="startTransition",HB=hoe[xue];function bue(e){let{basename:t,children:r,future:n,window:i}=e,a=W.useRef();a.current==null&&(a.current=Sle({window:i,v5Compat:!0}));let o=a.current,[s,l]=W.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=W.useCallback(f=>{u&&HB?HB(()=>l(f)):l(f)},[l,u]);return W.useLayoutEffect(()=>o.listen(c),[o,c]),W.useEffect(()=>hue(n),[n]),W.createElement(due,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const wue=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Sue=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tue=W.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,h=pue(t,yue),{basename:d}=W.useContext(of),v,g=!1;if(typeof u=="string"&&Sue.test(u)&&(v=u,wue))try{let x=new URL(window.location.href),w=u.startsWith("//")?new URL(x.protocol+u):new URL(u),S=LE(w.pathname,d);w.origin===x.origin&&S!=null?u=S+w.search+w.hash:g=!0}catch{}let m=Kle(u,{relative:i}),y=Cue(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function _(x){n&&n(x),x.defaultPrevented||y(x)}return W.createElement("a",UP({},h,{href:v||m,onClick:g||a?n:_,ref:r,target:l}))});var WB;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(WB||(WB={}));var UB;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(UB||(UB={}));function Cue(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=Y9(),u=Iy(),c=X9(e,{relative:o});return W.useCallback(f=>{if(mue(f,r)){f.preventDefault();let h=n!==void 0?n:Db(u)===Db(c);l(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,e,a,o,s])}/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Aue=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),J9=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var Mue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pue=W.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>W.createElement("svg",{ref:l,...Mue,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:J9("lucide",i),...s},[...o.map(([u,c])=>W.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ge=(e,t)=>{const r=W.forwardRef(({className:n,...i},a)=>W.createElement(Pue,{ref:a,iconNode:t,className:J9(`lucide-${Aue(e)}`,n),...i}));return r.displayName=`${e}`,r};/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hS=Ge("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZC=Ge("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lue=Ge("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Eb=Ge("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kue=Ge("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Oue=Ge("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Due=Ge("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Eue=Ge("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eZ=Ge("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cd=Ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ny=Ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Iue=Ge("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cm=Ge("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nue=Ge("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ry=Ge("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wh=Ge("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fd=Ge("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $c=Ge("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rue=Ge("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jue=Ge("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tZ=Ge("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bue=Ge("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rZ=Ge("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fm=Ge("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nZ=Ge("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OE=Ge("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DE=Ge("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iZ=Ge("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hm=Ge("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zue=Ge("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aZ=Ge("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oZ=Ge("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $ue=Ge("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fue=Ge("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vue=Ge("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sZ=Ge("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Gue=Ge("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dS=Ge("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fc=Ge("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lZ=Ge("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uZ=Ge("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cZ=Ge("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fZ=Ge("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hZ=Ge("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZB=Ge("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dZ=Ge("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZP=Ge("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Hue=Ge("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wue=Ge("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EE=Ge("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ps=Ge("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Uue=Ge("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zue=Ge("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vZ=Ge("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const YB=Ge("Wind",[["path",{d:"M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2",key:"1k4u03"}],["path",{d:"M9.6 4.6A2 2 0 1 1 11 8H2",key:"b7d0fd"}],["path",{d:"M12.6 19.4A2 2 0 1 0 14 16H2",key:"1p5cb3"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jy=Ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dm=Ge("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);async function Vr(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function XB(){return Vr("/api/status")}async function Yue(){return Vr("/api/health")}async function Xue(){return Vr("/api/nodes")}async function que(){return Vr("/api/edges")}async function Kue(){return Vr("/api/sources")}async function pZ(){return Vr("/api/alerts/active")}async function qB(e=50,t=0,r,n){const i=new URLSearchParams;return i.set("limit",e.toString()),i.set("offset",t.toString()),r&&r!=="all"&&i.set("type",r),n&&n!=="all"&&i.set("severity",n),Vr(`/api/alerts/history?${i.toString()}`)}async function Que(){return Vr("/api/subscriptions")}async function gZ(){return Vr("/api/env/status")}async function mZ(){return Vr("/api/env/active")}async function yZ(){return Vr("/api/env/swpc")}async function _Z(){return Vr("/api/env/ducting")}async function Jue(){return Vr("/api/env/fires")}async function ece(){return Vr("/api/env/avalanche")}async function tce(){return Vr("/api/env/streams")}async function rce(){return Vr("/api/env/traffic")}async function nce(){return Vr("/api/env/roads")}async function ice(){return Vr("/api/env/hotspots")}async function ace(){return Vr("/api/regions")}function IE(){const[e,t]=W.useState(!1),[r,n]=W.useState(null),[i,a]=W.useState(null),[o,s]=W.useState(null),l=W.useRef(null),u=W.useRef(null),c=W.useRef(1e3),f=W.useCallback(()=>{var v;if(((v=l.current)==null?void 0:v.readyState)===WebSocket.OPEN)return;const d=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const g=new WebSocket(d);l.current=g,g.onopen=()=>{t(!0),c.current=1e3},g.onmessage=y=>{try{const _=JSON.parse(y.data);switch(s(_),_.type){case"health_update":n(_.data);break;case"alert_fired":a(_.data);break}}catch(_){console.error("Failed to parse WebSocket message:",_)}},g.onclose=()=>{t(!1),l.current=null;const y=Math.min(c.current,3e4);u.current=window.setTimeout(()=>{c.current=Math.min(y*2,3e4),f()},y)},g.onerror=()=>{g.close()};const m=setInterval(()=>{g.readyState===WebSocket.OPEN&&g.send("ping")},3e4);g.addEventListener("close",()=>{clearInterval(m)})}catch(g){console.error("Failed to create WebSocket:",g)}},[]);return W.useEffect(()=>(f(),()=>{u.current&&clearTimeout(u.current),l.current&&l.current.close()}),[f]),{connected:e,lastHealth:r,lastAlert:i,lastMessage:o}}const xZ=W.createContext(null);function oce(){const e=W.useContext(xZ);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function sce(e){switch(e==null?void 0:e.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:Ry,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:Ps,iconColor:"text-amber-500"};default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:hm,iconColor:"text-blue-500"}}}function lce({toast:e,onDismiss:t,onNavigate:r}){const n=sce(e.alert.severity),i=n.icon;return W.useEffect(()=>{const a=setTimeout(t,8e3);return()=>clearTimeout(a)},[t]),T.jsx("div",{className:`${n.bg} border ${n.border} rounded-lg shadow-lg overflow-hidden animate-slide-in cursor-pointer`,onClick:r,role:"alert",children:T.jsxs("div",{className:"flex items-start gap-3 p-4",children:[T.jsx("div",{className:`w-1 self-stretch -ml-4 -my-4 ${n.border.replace("border","bg")}`}),T.jsx(i,{size:18,className:n.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0 pr-2",children:[T.jsx("div",{className:"text-sm font-medium text-slate-200 mb-0.5",children:e.alert.type.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}),T.jsx("div",{className:"text-sm text-slate-300 line-clamp-2",children:e.alert.message})]}),T.jsx("button",{onClick:a=>{a.stopPropagation(),t()},className:"text-slate-400 hover:text-slate-200 transition-colors",children:T.jsx(jy,{size:16})})]})})}function uce({children:e}){const[t,r]=W.useState([]),n=Y9(),i=W.useCallback(s=>{const l=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r(u=>[...u,{id:l,alert:s}])},[]),a=W.useCallback(s=>{r(l=>l.filter(u=>u.id!==s))},[]),o=W.useCallback(()=>{n("/alerts")},[n]);return T.jsxs(xZ.Provider,{value:{addToast:i},children:[e,T.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:t.map(s=>T.jsx("div",{className:"pointer-events-auto",children:T.jsx(lce,{toast:s,onDismiss:()=>a(s.id),onNavigate:o})},s.id))})]})}const bZ=[{path:"/",label:"Dashboard",icon:aZ},{path:"/mesh",label:"Mesh",icon:Fc},{path:"/environment",label:"Environment",icon:$c},{path:"/config",label:"Config",icon:dZ},{path:"/alerts",label:"Alerts",icon:Eb},{path:"/notifications",label:"Notifications",icon:Lue}];function cce(e){const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60);return t>0?`${t}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function fce(e){const t=bZ.find(r=>r.path===e);return(t==null?void 0:t.label)||"Dashboard"}function hce({children:e}){var h;const t=Iy(),{connected:r,lastAlert:n}=IE(),{addToast:i}=oce(),[a,o]=W.useState(null),[s,l]=W.useState(null);W.useEffect(()=>{if(n){const d=`${n.type}-${n.message}-${n.timestamp}`;d!==s&&(l(d),i(n))}},[n,s,i]);const[u,c]=W.useState(new Date);W.useEffect(()=>{XB().then(o).catch(console.error);const d=setInterval(()=>{XB().then(o).catch(console.error)},3e4);return()=>clearInterval(d)},[]),W.useEffect(()=>{const d=setInterval(()=>c(new Date),1e3);return()=>clearInterval(d)},[]);const f=u.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return T.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[T.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[T.jsx("div",{className:"p-5 border-b border-border",children:T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),T.jsxs("div",{children:[T.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),T.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(a==null?void 0:a.version)||"..."]})]})]})}),T.jsx("nav",{className:"flex-1 py-4",children:bZ.map(d=>{const v=t.pathname===d.path,g=d.icon;return T.jsxs(Tue,{to:d.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${v?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[v&&T.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),T.jsx(g,{size:18}),d.label]},d.path)})}),T.jsxs("div",{className:"p-5 border-t border-border",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${a!=null&&a.connected?"bg-green-500":"bg-red-500"}`}),T.jsx("span",{className:"text-xs text-slate-400",children:a!=null&&a.connected?"Connected":"Disconnected"})]}),T.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(h=a==null?void 0:a.connection_type)==null?void 0:h.toUpperCase(),": ",a==null?void 0:a.connection_target]}),T.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",a?cce(a.uptime_seconds):"..."]})]})]}),T.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[T.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[T.jsx("h1",{className:"text-lg font-semibold",children:fce(t.pathname)}),T.jsxs("div",{className:"flex items-center gap-6",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),T.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),T.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[f," MT"]})]})]}),T.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:e})]})]})}function wZ(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t-1}var fhe=che,hhe=pS;function dhe(e,t){var r=this.__data__,n=hhe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var vhe=dhe,phe=Kfe,ghe=ahe,mhe=lhe,yhe=fhe,_he=vhe;function ov(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},cc=function(t){return Vc(t)&&t.indexOf("%")===t.length-1},we=function(t){return zde(t)&&!lv(t)},Gde=function(t){return ft(t)},jr=function(t){return we(t)||Vc(t)},Hde=0,uv=function(t){var r=++Hde;return"".concat(t||"").concat(r)},Gc=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!we(t)&&!Vc(t))return n;var a;if(cc(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return lv(a)&&(a=n),i&&a>r&&(a=r),a},fh=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},Wde=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Qde(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function XP(e){"@babel/helpers - typeof";return XP=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},XP(e)}var lz={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ps=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},uz=null,qC=null,UE=function e(t){if(t===uz&&Array.isArray(qC))return qC;var r=[];return W.Children.forEach(t,function(n){ft(n)||(Ide.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),qC=r,uz=t,r};function ea(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return ps(i)}):n=[ps(t)],UE(e).forEach(function(i){var a=Ji(i,"type.displayName")||Ji(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function di(e,t){var r=ea(e,t);return r&&r[0]}var cz=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!we(n)||n<=0||!we(i)||i<=0)},Jde=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],eve=function(t){return t&&t.type&&Vc(t.type)&&Jde.indexOf(t.type)>=0},NZ=function(t){return t&&XP(t)==="object"&&"clipDot"in t},tve=function(t,r,n,i){var a,o=(a=XC==null?void 0:XC[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ut(t)&&(i&&o.includes(r)||Yde.includes(r))||n&&WE.includes(r)},lt=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(W.isValidElement(t)&&(i=t.props),!iv(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;tve((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},qP=function e(t,r){if(t===r)return!0;var n=W.Children.count(t);if(n!==W.Children.count(r))return!1;if(n===0)return!0;if(n===1)return fz(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ove(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function QP(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=ave(e,ive),c=i||{width:r,height:n,x:0,y:0},f=mt("recharts-surface",a);return Q.createElement("svg",KP({},lt(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),Q.createElement("title",null,s),Q.createElement("desc",null,l),t)}var sve=["children","className"];function JP(){return JP=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Wt=Q.forwardRef(function(e,t){var r=e.children,n=e.className,i=lve(e,sve),a=mt("recharts-layer",n);return Q.createElement("g",JP({className:a},lt(i,!0),{ref:t}),r)}),Tc=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:hve(e,t,r)}var vve=dve,pve="\\ud800-\\udfff",gve="\\u0300-\\u036f",mve="\\ufe20-\\ufe2f",yve="\\u20d0-\\u20ff",_ve=gve+mve+yve,xve="\\ufe0e\\ufe0f",bve="\\u200d",wve=RegExp("["+bve+pve+_ve+xve+"]");function Sve(e){return wve.test(e)}var RZ=Sve;function Tve(e){return e.split("")}var Cve=Tve,jZ="\\ud800-\\udfff",Ave="\\u0300-\\u036f",Mve="\\ufe20-\\ufe2f",Pve="\\u20d0-\\u20ff",Lve=Ave+Mve+Pve,kve="\\ufe0e\\ufe0f",Ove="["+jZ+"]",eL="["+Lve+"]",tL="\\ud83c[\\udffb-\\udfff]",Dve="(?:"+eL+"|"+tL+")",BZ="[^"+jZ+"]",zZ="(?:\\ud83c[\\udde6-\\uddff]){2}",$Z="[\\ud800-\\udbff][\\udc00-\\udfff]",Eve="\\u200d",FZ=Dve+"?",VZ="["+kve+"]?",Ive="(?:"+Eve+"(?:"+[BZ,zZ,$Z].join("|")+")"+VZ+FZ+")*",Nve=VZ+FZ+Ive,Rve="(?:"+[BZ+eL+"?",eL,zZ,$Z,Ove].join("|")+")",jve=RegExp(tL+"(?="+tL+")|"+Rve+Nve,"g");function Bve(e){return e.match(jve)||[]}var zve=Bve,$ve=Cve,Fve=RZ,Vve=zve;function Gve(e){return Fve(e)?Vve(e):$ve(e)}var Hve=Gve,Wve=vve,Uve=RZ,Zve=Hve,Yve=LZ;function Xve(e){return function(t){t=Yve(t);var r=Uve(t)?Zve(t):void 0,n=r?r[0]:t.charAt(0),i=r?Wve(r,1).join(""):t.slice(1);return n[e]()+i}}var qve=Xve,Kve=qve,Qve=Kve("toUpperCase"),Jve=Qve;const LS=jt(Jve);function Gt(e){return function(){return e}}const GZ=Math.cos,jb=Math.sin,Ga=Math.sqrt,Bb=Math.PI,kS=2*Bb,rL=Math.PI,nL=2*rL,Yu=1e-6,epe=nL-Yu;function HZ(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return HZ;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iYu)if(!(Math.abs(f*l-u*c)>Yu)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=n-o,v=i-s,g=l*l+u*u,m=d*d+v*v,y=Math.sqrt(g),_=Math.sqrt(h),x=a*Math.tan((rL-Math.acos((g+h-m)/(2*y*_)))/2),w=x/_,S=x/y;Math.abs(w-1)>Yu&&this._append`L${t+w*c},${r+w*f}`,this._append`A${a},${a},0,0,${+(f*d>c*v)},${this._x1=t+S*l},${this._y1=r+S*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,c=r+l,f=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Yu||Math.abs(this._y1-c)>Yu)&&this._append`L${u},${c}`,n&&(h<0&&(h=h%nL+nL),h>epe?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:h>Yu&&this._append`A${n},${n},0,${+(h>=rL)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};function ZE(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new rpe(t)}function YE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function WZ(e){this._context=e}WZ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function OS(e){return new WZ(e)}function UZ(e){return e[0]}function ZZ(e){return e[1]}function YZ(e,t){var r=Gt(!0),n=null,i=OS,a=null,o=ZE(s);e=typeof e=="function"?e:e===void 0?UZ:Gt(e),t=typeof t=="function"?t:t===void 0?ZZ:Gt(t);function s(l){var u,c=(l=YE(l)).length,f,h=!1,d;for(n==null&&(a=i(d=o())),u=0;u<=c;++u)!(u=d;--v)s.point(x[v],w[v]);s.lineEnd(),s.areaEnd()}y&&(x[h]=+e(m,h,f),w[h]=+t(m,h,f),s.point(n?+n(m,h,f):x[h],r?+r(m,h,f):w[h]))}if(_)return s=null,_+""||null}function c(){return YZ().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Gt(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Gt(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Gt(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Gt(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Gt(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Gt(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Gt(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class XZ{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function npe(e){return new XZ(e,!0)}function ipe(e){return new XZ(e,!1)}const XE={draw(e,t){const r=Ga(t/Bb);e.moveTo(r,0),e.arc(0,0,r,0,kS)}},ape={draw(e,t){const r=Ga(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},qZ=Ga(1/3),ope=qZ*2,spe={draw(e,t){const r=Ga(t/ope),n=r*qZ;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},lpe={draw(e,t){const r=Ga(t),n=-r/2;e.rect(n,n,r,r)}},upe=.8908130915292852,KZ=jb(Bb/10)/jb(7*Bb/10),cpe=jb(kS/10)*KZ,fpe=-GZ(kS/10)*KZ,hpe={draw(e,t){const r=Ga(t*upe),n=cpe*r,i=fpe*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=kS*a/5,s=GZ(o),l=jb(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},KC=Ga(3),dpe={draw(e,t){const r=-Ga(t/(KC*3));e.moveTo(0,r*2),e.lineTo(-KC*r,-r),e.lineTo(KC*r,-r),e.closePath()}},Ii=-.5,Ni=Ga(3)/2,iL=1/Ga(12),vpe=(iL/2+1)*3,ppe={draw(e,t){const r=Ga(t/vpe),n=r/2,i=r*iL,a=n,o=r*iL+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Ii*n-Ni*i,Ni*n+Ii*i),e.lineTo(Ii*a-Ni*o,Ni*a+Ii*o),e.lineTo(Ii*s-Ni*l,Ni*s+Ii*l),e.lineTo(Ii*n+Ni*i,Ii*i-Ni*n),e.lineTo(Ii*a+Ni*o,Ii*o-Ni*a),e.lineTo(Ii*s+Ni*l,Ii*l-Ni*s),e.closePath()}};function gpe(e,t){let r=null,n=ZE(i);e=typeof e=="function"?e:Gt(e||XE),t=typeof t=="function"?t:Gt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Gt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Gt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function zb(){}function $b(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function QZ(e){this._context=e}QZ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:$b(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:$b(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mpe(e){return new QZ(e)}function JZ(e){this._context=e}JZ.prototype={areaStart:zb,areaEnd:zb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:$b(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ype(e){return new JZ(e)}function eY(e){this._context=e}eY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:$b(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _pe(e){return new eY(e)}function tY(e){this._context=e}tY.prototype={areaStart:zb,areaEnd:zb,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function xpe(e){return new tY(e)}function dz(e){return e<0?-1:1}function vz(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(dz(a)+dz(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function pz(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function QC(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Fb(e){this._context=e}Fb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:QC(this,this._t0,pz(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,QC(this,pz(this,r=vz(this,e,t)),r);break;default:QC(this,this._t0,r=vz(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function rY(e){this._context=new nY(e)}(rY.prototype=Object.create(Fb.prototype)).point=function(e,t){Fb.prototype.point.call(this,t,e)};function nY(e){this._context=e}nY.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function bpe(e){return new Fb(e)}function wpe(e){return new rY(e)}function iY(e){this._context=e}iY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=gz(e),i=gz(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Tpe(e){return new DS(e,.5)}function Cpe(e){return new DS(e,0)}function Ape(e){return new DS(e,1)}function hd(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r=0;)r[t]=t;return r}function Mpe(e,t){return e[t]}function Ppe(e){const t=[];return t.key=e,t}function Lpe(){var e=Gt([]),t=aL,r=hd,n=Mpe;function i(a){var o=Array.from(e.apply(this,arguments),Ppe),s,l=o.length,u=-1,c;for(const f of a)for(s=0,++u;s0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Bpe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var aY={symbolCircle:XE,symbolCross:ape,symbolDiamond:spe,symbolSquare:lpe,symbolStar:hpe,symbolTriangle:dpe,symbolWye:ppe},zpe=Math.PI/180,$pe=function(t){var r="symbol".concat(LS(t));return aY[r]||XE},Fpe=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*zpe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Vpe=function(t,r){aY["symbol".concat(LS(t))]=r},qE=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=jpe(t,Epe),u=yz(yz({},l),{},{type:n,size:a,sizeType:s}),c=function(){var m=$pe(n),y=gpe().type(m).size(Fpe(a,s,n));return y()},f=u.className,h=u.cx,d=u.cy,v=lt(u,!0);return h===+h&&d===+d&&a===+a?Q.createElement("path",oL({},v,{className:mt("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(d,")"),d:c()})):null};qE.registerSymbol=Vpe;function dd(e){"@babel/helpers - typeof";return dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dd(e)}function sL(){return sL=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var _=d.inactive?u:d.color;return Q.createElement("li",sL({className:m,style:f,key:"legend-item-".concat(v)},Rb(n.props,d,v)),Q.createElement(QP,{width:o,height:o,viewBox:c,style:h},n.renderIcon(d)),Q.createElement("span",{className:"recharts-legend-item-text",style:{color:_}},g?g(y,d,v):y))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Q.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(W.PureComponent);pm(KE,"displayName","Legend");pm(KE,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Qpe=gS;function Jpe(){this.__data__=new Qpe,this.size=0}var ege=Jpe;function tge(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var rge=tge;function nge(e){return this.__data__.get(e)}var ige=nge;function age(e){return this.__data__.has(e)}var oge=age,sge=gS,lge=BE,uge=zE,cge=200;function fge(e,t){var r=this.__data__;if(r instanceof sge){var n=r.__data__;if(!lge||n.lengths))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,h=!0,d=r&Ege?new Lge:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=jme}var tI=Bme,zme=Fs,$me=tI,Fme=Vs,Vme="[object Arguments]",Gme="[object Array]",Hme="[object Boolean]",Wme="[object Date]",Ume="[object Error]",Zme="[object Function]",Yme="[object Map]",Xme="[object Number]",qme="[object Object]",Kme="[object RegExp]",Qme="[object Set]",Jme="[object String]",eye="[object WeakMap]",tye="[object ArrayBuffer]",rye="[object DataView]",nye="[object Float32Array]",iye="[object Float64Array]",aye="[object Int8Array]",oye="[object Int16Array]",sye="[object Int32Array]",lye="[object Uint8Array]",uye="[object Uint8ClampedArray]",cye="[object Uint16Array]",fye="[object Uint32Array]",Zt={};Zt[nye]=Zt[iye]=Zt[aye]=Zt[oye]=Zt[sye]=Zt[lye]=Zt[uye]=Zt[cye]=Zt[fye]=!0;Zt[Vme]=Zt[Gme]=Zt[tye]=Zt[Hme]=Zt[rye]=Zt[Wme]=Zt[Ume]=Zt[Zme]=Zt[Yme]=Zt[Xme]=Zt[qme]=Zt[Kme]=Zt[Qme]=Zt[Jme]=Zt[eye]=!1;function hye(e){return Fme(e)&&$me(e.length)&&!!Zt[zme(e)]}var dye=hye;function vye(e){return function(t){return e(t)}}var gY=vye,Wb={exports:{}};Wb.exports;(function(e,t){var r=SZ,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Wb,Wb.exports);var pye=Wb.exports,gye=dye,mye=gY,Cz=pye,Az=Cz&&Cz.isTypedArray,yye=Az?mye(Az):gye,mY=yye,_ye=wme,xye=JE,bye=li,wye=pY,Sye=eI,Tye=mY,Cye=Object.prototype,Aye=Cye.hasOwnProperty;function Mye(e,t){var r=bye(e),n=!r&&xye(e),i=!r&&!n&&wye(e),a=!r&&!n&&!i&&Tye(e),o=r||n||i||a,s=o?_ye(e.length,String):[],l=s.length;for(var u in e)(t||Aye.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Sye(u,l)))&&s.push(u);return s}var Pye=Mye,Lye=Object.prototype;function kye(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Lye;return e===r}var Oye=kye;function Dye(e,t){return function(r){return e(t(r))}}var yY=Dye,Eye=yY,Iye=Eye(Object.keys,Object),Nye=Iye,Rye=Oye,jye=Nye,Bye=Object.prototype,zye=Bye.hasOwnProperty;function $ye(e){if(!Rye(e))return jye(e);var t=[];for(var r in Object(e))zye.call(e,r)&&r!="constructor"&&t.push(r);return t}var Fye=$ye,Vye=RE,Gye=tI;function Hye(e){return e!=null&&Gye(e.length)&&!Vye(e)}var ES=Hye,Wye=Pye,Uye=Fye,Zye=ES;function Yye(e){return Zye(e)?Wye(e):Uye(e)}var rI=Yye,Xye=cme,qye=xme,Kye=rI;function Qye(e){return Xye(e,Kye,qye)}var Jye=Qye,Mz=Jye,e0e=1,t0e=Object.prototype,r0e=t0e.hasOwnProperty;function n0e(e,t,r,n,i,a){var o=r&e0e,s=Mz(e),l=s.length,u=Mz(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var h=s[f];if(!(o?h in t:r0e.call(t,h)))return!1}var d=a.get(e),v=a.get(t);if(d&&v)return d==t&&v==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=o;++f-1}var rxe=txe;function nxe(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=yxe){var u=t?null:gxe(e);if(u)return mxe(u);o=!1,i=pxe,l=new hxe}else l=t?[]:s;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ixe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Nxe(e){return e.value}function Rxe(e,t){if(Q.isValidElement(e))return Q.cloneElement(e,t);if(typeof e=="function")return Q.createElement(e,t);t.ref;var r=Exe(t,Cxe);return Q.createElement(KE,r)}var Gz=1,Zh=function(e){function t(){var r;Axe(this,t);for(var n=arguments.length,i=new Array(n),a=0;aGz||Math.abs(i.height-this.lastBoundingBox.height)>Gz)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Zo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,c=i.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var d=this.getBBoxSnapshot();f={left:((u||0)-d.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();h={top:((c||0)-v.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Zo(Zo({},f),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,c=i.payload,f=Zo(Zo({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return Q.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(d){n.wrapperNode=d}},Rxe(a,Zo(Zo({},this.props),{},{payload:TY(c,u,Nxe)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Zo(Zo({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&we(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(W.PureComponent);IS(Zh,"displayName","Legend");IS(Zh,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Hz=By,jxe=JE,Bxe=li,Wz=Hz?Hz.isConcatSpreadable:void 0;function zxe(e){return Bxe(e)||jxe(e)||!!(Wz&&e&&e[Wz])}var $xe=zxe,Fxe=dY,Vxe=$xe;function MY(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=Vxe),i||(i=[]);++a0&&r(s)?t>1?MY(s,t-1,r,n,i):Fxe(i,s):n||(i[i.length]=s)}return i}var PY=MY;function Gxe(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var Hxe=Gxe,Wxe=Hxe,Uxe=Wxe(),Zxe=Uxe,Yxe=Zxe,Xxe=rI;function qxe(e,t){return e&&Yxe(e,t,Xxe)}var LY=qxe,Kxe=ES;function Qxe(e,t){return function(r,n){if(r==null)return r;if(!Kxe(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var hbe=fbe,rA=FE,dbe=VE,vbe=dv,pbe=kY,gbe=sbe,mbe=gY,ybe=hbe,_be=hv,xbe=li;function bbe(e,t,r){t.length?t=rA(t,function(a){return xbe(a)?function(o){return dbe(o,a.length===1?a[0]:a)}:a}):t=[_be];var n=-1;t=rA(t,mbe(vbe));var i=pbe(e,function(a,o,s){var l=rA(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return gbe(i,function(a,o){return ybe(a,o,r)})}var wbe=bbe;function Sbe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Tbe=Sbe,Cbe=Tbe,Zz=Math.max;function Abe(e,t,r){return t=Zz(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Zz(n.length-t,0),o=Array(a);++i0){if(++t>=Rbe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var $be=zbe,Fbe=Nbe,Vbe=$be,Gbe=Vbe(Fbe),Hbe=Gbe,Wbe=hv,Ube=Mbe,Zbe=Hbe;function Ybe(e,t){return Zbe(Ube(e,t,Wbe),e+"")}var Xbe=Ybe,qbe=jE,Kbe=ES,Qbe=eI,Jbe=ru;function e1e(e,t,r){if(!Jbe(r))return!1;var n=typeof t;return(n=="number"?Kbe(r)&&Qbe(t,r.length):n=="string"&&t in r)?qbe(r[t],e):!1}var NS=e1e,t1e=PY,r1e=wbe,n1e=Xbe,Xz=NS,i1e=n1e(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Xz(e,t[0],t[1])?t=[]:r>2&&Xz(t[0],t[1],t[2])&&(t=[t[0]]),r1e(e,t1e(t,1),[])}),a1e=i1e;const aI=jt(a1e);function gm(e){"@babel/helpers - typeof";return gm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gm(e)}function pL(){return pL=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(lp,"-left"),we(r)&&t&&we(t.x)&&r=t.y),"".concat(lp,"-top"),we(n)&&t&&we(t.y)&&ng?Math.max(c,l[n]):Math.max(f,l[n])}function x1e(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function b1e(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=Qz({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Qz({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=x1e({translateX:c,translateY:f,useTranslate3d:s})):u=y1e,{cssProperties:u,cssClasses:_1e({translateX:c,translateY:f,coordinate:r})}}function pd(e){"@babel/helpers - typeof";return pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pd(e)}function Jz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e3(e){for(var t=1;tt3||Math.abs(n.height-this.state.lastBoundingBox.height)>t3)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,c=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,d=i.offset,v=i.position,g=i.reverseDirection,m=i.useTranslate3d,y=i.viewBox,_=i.wrapperStyle,x=b1e({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:d,position:v,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:y}),w=x.cssClasses,S=x.cssProperties,C=e3(e3({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},_);return Q.createElement("div",{tabIndex:-1,className:w,style:C,ref:function(P){n.wrapperNode=P}},u)}}])}(W.PureComponent),O1e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},uf={isSsr:O1e()};function gd(e){"@babel/helpers - typeof";return gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gd(e)}function r3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function n3(e){for(var t=1;t0;return Q.createElement(k1e,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:c,hasPayload:C,offset:d,position:m,reverseDirection:y,useTranslate3d:_,viewBox:x,wrapperStyle:w},F1e(u,n3(n3({},this.props),{},{payload:S})))}}])}(W.PureComponent);oI(es,"displayName","Tooltip");oI(es,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!uf.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var V1e=zo,G1e=function(){return V1e.Date.now()},H1e=G1e,W1e=/\s/;function U1e(e){for(var t=e.length;t--&&W1e.test(e.charAt(t)););return t}var Z1e=U1e,Y1e=Z1e,X1e=/^\s+/;function q1e(e){return e&&e.slice(0,Y1e(e)+1).replace(X1e,"")}var K1e=q1e,Q1e=K1e,i3=ru,J1e=nv,a3=NaN,ewe=/^[-+]0x[0-9a-f]+$/i,twe=/^0b[01]+$/i,rwe=/^0o[0-7]+$/i,nwe=parseInt;function iwe(e){if(typeof e=="number")return e;if(J1e(e))return a3;if(i3(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=i3(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Q1e(e);var r=twe.test(e);return r||rwe.test(e)?nwe(e.slice(2),r?2:8):ewe.test(e)?a3:+e}var RY=iwe,awe=ru,iA=H1e,o3=RY,owe="Expected a function",swe=Math.max,lwe=Math.min;function uwe(e,t,r){var n,i,a,o,s,l,u=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(owe);t=o3(t)||0,awe(r)&&(c=!!r.leading,f="maxWait"in r,a=f?swe(o3(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function d(C){var M=n,P=i;return n=i=void 0,u=C,o=e.apply(P,M),o}function v(C){return u=C,s=setTimeout(y,t),c?d(C):o}function g(C){var M=C-l,P=C-u,k=t-M;return f?lwe(k,a-P):k}function m(C){var M=C-l,P=C-u;return l===void 0||M>=t||M<0||f&&P>=a}function y(){var C=iA();if(m(C))return _(C);s=setTimeout(y,g(C))}function _(C){return s=void 0,h&&n?d(C):(n=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function w(){return s===void 0?o:_(iA())}function S(){var C=iA(),M=m(C);if(n=arguments,i=this,l=C,M){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(y,t),d(l)}return s===void 0&&(s=setTimeout(y,t)),o}return S.cancel=x,S.flush=w,S}var cwe=uwe,fwe=cwe,hwe=ru,dwe="Expected a function";function vwe(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(dwe);return hwe(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),fwe(e,t,{leading:n,maxWait:t,trailing:i})}var pwe=vwe;const jY=jt(pwe);function ym(e){"@babel/helpers - typeof";return ym=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ym(e)}function s3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e_(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(N=jY(N,g,{trailing:!0,leading:!1}));var B=new ResizeObserver(N),F=S.current.getBoundingClientRect(),$=F.width,G=F.height;return D($,G),B.observe(S.current),function(){B.disconnect()}},[D,g]);var I=W.useMemo(function(){var N=k.containerWidth,B=k.containerHeight;if(N<0||B<0)return null;Tc(cc(o)||cc(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,l),Tc(!r||r>0,"The aspect(%s) must be greater than zero.",r);var F=cc(o)?N:o,$=cc(l)?B:l;r&&r>0&&(F?$=F/r:$&&(F=$*r),h&&$>h&&($=h)),Tc(F>0||$>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,F,$,o,l,c,f,r);var G=!Array.isArray(d)&&ps(d.type).endsWith("Chart");return Q.Children.map(d,function(z){return Q.isValidElement(z)?W.cloneElement(z,e_({width:F,height:$},G?{style:e_({height:"100%",width:"100%",maxHeight:$,maxWidth:F},z.props.style)}:{})):z})},[r,d,l,h,f,c,k,o]);return Q.createElement("div",{id:m?"".concat(m):void 0,className:mt("recharts-responsive-container",y),style:e_(e_({},w),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:h}),ref:S},I)}),zY=function(t){return null};zY.displayName="Cell";function _m(e){"@babel/helpers - typeof";return _m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_m(e)}function u3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _L(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||uf.isSsr)return{width:0,height:0};var n=Lwe(r),i=JSON.stringify({text:t,copyStyle:n});if(If.widthCache[i])return If.widthCache[i];try{var a=document.getElementById(c3);a||(a=document.createElement("span"),a.setAttribute("id",c3),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=_L(_L({},Pwe),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return If.widthCache[i]=l,++If.cacheCount>Mwe&&(If.cacheCount=0,If.widthCache={}),l}catch{return{width:0,height:0}}},kwe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function xm(e){"@babel/helpers - typeof";return xm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xm(e)}function Xb(e,t){return Iwe(e)||Ewe(e,t)||Dwe(e,t)||Owe()}function Owe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dwe(e,t){if(e){if(typeof e=="string")return f3(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f3(e,t)}}function f3(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ywe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function m3(e,t){return Qwe(e)||Kwe(e,t)||qwe(e,t)||Xwe()}function Xwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qwe(e,t){if(e){if(typeof e=="string")return y3(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y3(e,t)}}function y3(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return F.reduce(function($,G){var z=G.word,U=G.width,H=$[$.length-1];if(H&&(i==null||a||H.width+U+nG.width?$:G})};if(!c)return d;for(var g="…",m=function(F){var $=f.slice(0,F),G=GY({breakAll:u,style:l,children:$+g}).wordsWithComputedWidth,z=h(G),U=z.length>o||v(z).width>Number(i);return[U,z]},y=0,_=f.length-1,x=0,w;y<=_&&x<=f.length-1;){var S=Math.floor((y+_)/2),C=S-1,M=m(C),P=m3(M,2),k=P[0],O=P[1],D=m(S),I=m3(D,1),N=I[0];if(!k&&!N&&(y=S+1),k&&N&&(_=S-1),!k&&N){w=O;break}x++}return w||d},_3=function(t){var r=ft(t)?[]:t.toString().split(VY);return[{words:r}]},eSe=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!uf.isSsr){var l,u,c=GY({breakAll:o,children:i,style:a});if(c){var f=c.wordsWithComputedWidth,h=c.spaceWidth;l=f,u=h}else return _3(i);return Jwe({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return _3(i)},x3="#808080",qb=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,h=t.textAnchor,d=h===void 0?"start":h,v=t.verticalAnchor,g=v===void 0?"end":v,m=t.fill,y=m===void 0?x3:m,_=g3(t,Uwe),x=W.useMemo(function(){return eSe({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:f,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,f,_.style,_.width]),w=_.dx,S=_.dy,C=_.angle,M=_.className,P=_.breakAll,k=g3(_,Zwe);if(!jr(n)||!jr(a))return null;var O=n+(we(w)?w:0),D=a+(we(S)?S:0),I;switch(g){case"start":I=aA("calc(".concat(u,")"));break;case"middle":I=aA("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:I=aA("calc(".concat(x.length-1," * -").concat(s,")"));break}var N=[];if(f){var B=x[0].width,F=_.width;N.push("scale(".concat((we(F)?F/B:1)/B,")"))}return C&&N.push("rotate(".concat(C,", ").concat(O,", ").concat(D,")")),N.length&&(k.transform=N.join(" ")),Q.createElement("text",xL({},lt(k,!0),{x:O,y:D,className:mt("recharts-text",M),textAnchor:d,fill:y.includes("url")?x3:y}),x.map(function($,G){var z=$.words.join(P?"":" ");return Q.createElement("tspan",{x:O,dy:G===0?I:s,key:"".concat(z,"-").concat(G)},z)}))};function Nl(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function tSe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function sI(e){let t,r,n;e.length!==2?(t=Nl,r=(s,l)=>Nl(e(s),l),n=(s,l)=>e(s)-l):(t=e===Nl||e===tSe?e:rSe,r=e,n=e);function i(s,l,u=0,c=s.length){if(u>>1;r(s[f],l)<0?u=f+1:c=f}while(u>>1;r(s[f],l)<=0?u=f+1:c=f}while(uu&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function rSe(){return 0}function HY(e){return e===null?NaN:+e}function*nSe(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const iSe=sI(Nl),zy=iSe.right;sI(HY).center;class b3 extends Map{constructor(t,r=sSe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(w3(this,t))}has(t){return super.has(w3(this,t))}set(t,r){return super.set(aSe(this,t),r)}delete(t){return super.delete(oSe(this,t))}}function w3({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function aSe({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function oSe({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function sSe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function lSe(e=Nl){if(e===Nl)return WY;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function WY(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const uSe=Math.sqrt(50),cSe=Math.sqrt(10),fSe=Math.sqrt(2);function Kb(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=uSe?10:a>=cSe?5:a>=fSe?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const n=t=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u=n)&&(r=n);return r}function T3(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function UY(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?WY:lSe(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),d=Math.max(r,Math.floor(t-u*f/l+h)),v=Math.min(n,Math.floor(t+(l-u)*f/l+h));UY(e,t,d,v,i)}const a=e[t];let o=r,s=n;for(up(e,r,t),i(e[n],a)>0&&up(e,r,n);o0;)--s}i(e[r],a)===0?up(e,r,s):(++s,up(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function up(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function hSe(e,t,r){if(e=Float64Array.from(nSe(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return T3(e);if(t>=1)return S3(e);var n,i=(n-1)*t,a=Math.floor(i),o=S3(UY(e,a).subarray(0,a+1)),s=T3(e.subarray(a+1));return o+(s-o)*(i-a)}}function dSe(e,t,r=HY){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function vSe(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?r_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?r_(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=gSe.exec(e))?new ri(t[1],t[2],t[3],1):(t=mSe.exec(e))?new ri(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ySe.exec(e))?r_(t[1],t[2],t[3],t[4]):(t=_Se.exec(e))?r_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=xSe.exec(e))?O3(t[1],t[2]/100,t[3]/100,1):(t=bSe.exec(e))?O3(t[1],t[2]/100,t[3]/100,t[4]):C3.hasOwnProperty(e)?P3(C3[e]):e==="transparent"?new ri(NaN,NaN,NaN,0):null}function P3(e){return new ri(e>>16&255,e>>8&255,e&255,1)}function r_(e,t,r,n){return n<=0&&(e=t=r=NaN),new ri(e,t,r,n)}function TSe(e){return e instanceof $y||(e=Tm(e)),e?(e=e.rgb(),new ri(e.r,e.g,e.b,e.opacity)):new ri}function CL(e,t,r,n){return arguments.length===1?TSe(e):new ri(e,t,r,n??1)}function ri(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}uI(ri,CL,YY($y,{brighter(e){return e=e==null?Qb:Math.pow(Qb,e),new ri(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?wm:Math.pow(wm,e),new ri(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ri(Cc(this.r),Cc(this.g),Cc(this.b),Jb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:L3,formatHex:L3,formatHex8:CSe,formatRgb:k3,toString:k3}));function L3(){return`#${fc(this.r)}${fc(this.g)}${fc(this.b)}`}function CSe(){return`#${fc(this.r)}${fc(this.g)}${fc(this.b)}${fc((isNaN(this.opacity)?1:this.opacity)*255)}`}function k3(){const e=Jb(this.opacity);return`${e===1?"rgb(":"rgba("}${Cc(this.r)}, ${Cc(this.g)}, ${Cc(this.b)}${e===1?")":`, ${e})`}`}function Jb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Cc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fc(e){return e=Cc(e),(e<16?"0":"")+e.toString(16)}function O3(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new La(e,t,r,n)}function XY(e){if(e instanceof La)return new La(e.h,e.s,e.l,e.opacity);if(e instanceof $y||(e=Tm(e)),!e)return new La;if(e instanceof La)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new La(o,s,l,e.opacity)}function ASe(e,t,r,n){return arguments.length===1?XY(e):new La(e,t,r,n??1)}function La(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}uI(La,ASe,YY($y,{brighter(e){return e=e==null?Qb:Math.pow(Qb,e),new La(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?wm:Math.pow(wm,e),new La(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ri(oA(e>=240?e-240:e+120,i,n),oA(e,i,n),oA(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new La(D3(this.h),n_(this.s),n_(this.l),Jb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Jb(this.opacity);return`${e===1?"hsl(":"hsla("}${D3(this.h)}, ${n_(this.s)*100}%, ${n_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function D3(e){return e=(e||0)%360,e<0?e+360:e}function n_(e){return Math.max(0,Math.min(1,e||0))}function oA(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const cI=e=>()=>e;function MSe(e,t){return function(r){return e+r*t}}function PSe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function LSe(e){return(e=+e)==1?qY:function(t,r){return r-t?PSe(t,r,e):cI(isNaN(t)?r:t)}}function qY(e,t){var r=t-e;return r?MSe(e,r):cI(isNaN(e)?t:e)}const E3=function e(t){var r=LSe(t);function n(i,a){var o=r((i=CL(i)).r,(a=CL(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=qY(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);function kSe(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:e1(n,i)})),r=sA.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function FSe(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?VSe:FSe,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(n),t,r)))(n(o(h)))}return f.invert=function(h){return o(i((u||(u=s(t,e.map(n),e1)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,t1),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=fI,c()},f.clamp=function(h){return arguments.length?(o=h?!0:Bn,c()):o!==Bn},f.interpolate=function(h){return arguments.length?(r=h,c()):r},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,d){return n=h,i=d,c()}}function hI(){return RS()(Bn,Bn)}function GSe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function r1(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function md(e){return e=r1(Math.abs(e)),e?e[1]:NaN}function HSe(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function WSe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var USe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cm(e){if(!(t=USe.exec(e)))throw new Error("invalid format: "+e);var t;return new dI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Cm.prototype=dI.prototype;function dI(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}dI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ZSe(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var n1;function YSe(e,t){var r=r1(e,t);if(!r)return n1=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(n1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+r1(e,Math.max(0,t+a-1))[0]}function N3(e,t){var r=r1(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const R3={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:GSe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>N3(e*100,t),r:N3,s:YSe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function j3(e){return e}var B3=Array.prototype.map,z3=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function XSe(e){var t=e.grouping===void 0||e.thousands===void 0?j3:HSe(B3.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?j3:WSe(B3.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f,h){f=Cm(f);var d=f.fill,v=f.align,g=f.sign,m=f.symbol,y=f.zero,_=f.width,x=f.comma,w=f.precision,S=f.trim,C=f.type;C==="n"?(x=!0,C="g"):R3[C]||(w===void 0&&(w=12),S=!0,C="g"),(y||d==="0"&&v==="=")&&(y=!0,d="0",v="=");var M=(h&&h.prefix!==void 0?h.prefix:"")+(m==="$"?r:m==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),P=(m==="$"?n:/[%p]/.test(C)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),k=R3[C],O=/[defgprs%]/.test(C);w=w===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function D(I){var N=M,B=P,F,$,G;if(C==="c")B=k(I)+B,I="";else{I=+I;var z=I<0||1/I<0;if(I=isNaN(I)?l:k(Math.abs(I),w),S&&(I=ZSe(I)),z&&+I==0&&g!=="+"&&(z=!1),N=(z?g==="("?g:s:g==="-"||g==="("?"":g)+N,B=(C==="s"&&!isNaN(I)&&n1!==void 0?z3[8+n1/3]:"")+B+(z&&g==="("?")":""),O){for(F=-1,$=I.length;++F<$;)if(G=I.charCodeAt(F),48>G||G>57){B=(G===46?i+I.slice(F+1):I.slice(F))+B,I=I.slice(0,F);break}}}x&&!y&&(I=t(I,1/0));var U=N.length+I.length+B.length,H=U<_?new Array(_-U+1).join(d):"";switch(x&&y&&(I=t(H+I,H.length?_-B.length:1/0),H=""),v){case"<":I=N+I+B+H;break;case"=":I=N+H+I+B;break;case"^":I=H.slice(0,U=H.length>>1)+N+I+B+H.slice(U);break;default:I=H+N+I+B;break}return a(I)}return D.toString=function(){return f+""},D}function c(f,h){var d=Math.max(-8,Math.min(8,Math.floor(md(h)/3)))*3,v=Math.pow(10,-d),g=u((f=Cm(f),f.type="f",f),{suffix:z3[8+d/3]});return function(m){return g(v*m)}}return{format:u,formatPrefix:c}}var i_,vI,KY;qSe({thousands:",",grouping:[3],currency:["$",""]});function qSe(e){return i_=XSe(e),vI=i_.format,KY=i_.formatPrefix,i_}function KSe(e){return Math.max(0,-md(Math.abs(e)))}function QSe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(md(t)/3)))*3-md(Math.abs(e)))}function JSe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,md(t)-md(e))+1}function QY(e,t,r,n){var i=SL(e,t,r),a;switch(n=Cm(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=QSe(i,o))&&(n.precision=a),KY(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=JSe(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=KSe(i))&&(n.precision=a-(n.type==="%")*2);break}}return vI(n)}function nu(e){var t=e.domain;return e.ticks=function(r){var n=t();return bL(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return QY(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,c=10;for(s0;){if(u=wL(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function i1(){var e=hI();return e.copy=function(){return Fy(e,i1())},fa.apply(e,arguments),nu(e)}function JY(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,t1),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return JY(e).unknown(t)},e=arguments.length?Array.from(e,t1):[0,1],nu(r)}function eX(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function iTe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function V3(e){return(t,r)=>-e(-t,r)}function pI(e){const t=e($3,F3),r=t.domain;let n=10,i,a;function o(){return i=iTe(n),a=nTe(n),r()[0]<0?(i=V3(i),a=V3(a),e(eTe,tTe)):e($3,F3),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c0){for(;h<=d;++h)for(v=1;vc)break;y.push(g)}}else for(;h<=d;++h)for(v=n-1;v>=1;--v)if(g=h>0?v/a(-h):v*a(h),!(gc)break;y.push(g)}y.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Cm(l)).precision==null&&(l.trim=!0),l=vI(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*nr(eX(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function tX(){const e=pI(RS()).domain([1,10]);return e.copy=()=>Fy(e,tX()).base(e.base()),fa.apply(e,arguments),e}function G3(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function H3(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function gI(e){var t=1,r=e(G3(t),H3(t));return r.constant=function(n){return arguments.length?e(G3(t=+n),H3(t)):t},nu(r)}function rX(){var e=gI(RS());return e.copy=function(){return Fy(e,rX()).constant(e.constant())},fa.apply(e,arguments)}function W3(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function aTe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function oTe(e){return e<0?-e*e:e*e}function mI(e){var t=e(Bn,Bn),r=1;function n(){return r===1?e(Bn,Bn):r===.5?e(aTe,oTe):e(W3(r),W3(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},nu(t)}function yI(){var e=mI(RS());return e.copy=function(){return Fy(e,yI()).exponent(e.exponent())},fa.apply(e,arguments),e}function sTe(){return yI.apply(null,arguments).exponent(.5)}function U3(e){return Math.sign(e)*e*e}function lTe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function nX(){var e=hI(),t=[0,1],r=!1,n;function i(a){var o=lTe(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(U3(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,t1)).map(U3)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return nX(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},fa.apply(i,arguments),nu(i)}function iX(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return aX().domain([e,t]).range(i).unknown(a)},fa.apply(nu(o),arguments)}function oX(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[zy(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return oX().domain(e).range(t).unknown(r)},fa.apply(i,arguments)}const lA=new Date,uA=new Date;function Gr(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(uGr(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(lA.setTime(+a),uA.setTime(+o),e(lA),e(uA),Math.floor(r(lA,uA))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const a1=Gr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);a1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Gr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):a1);a1.range;const ss=1e3,Ki=ss*60,ls=Ki*60,Ls=ls*24,_I=Ls*7,Z3=Ls*30,cA=Ls*365,hc=Gr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ss)},(e,t)=>(t-e)/ss,e=>e.getUTCSeconds());hc.range;const xI=Gr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ss)},(e,t)=>{e.setTime(+e+t*Ki)},(e,t)=>(t-e)/Ki,e=>e.getMinutes());xI.range;const bI=Gr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ki)},(e,t)=>(t-e)/Ki,e=>e.getUTCMinutes());bI.range;const wI=Gr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ss-e.getMinutes()*Ki)},(e,t)=>{e.setTime(+e+t*ls)},(e,t)=>(t-e)/ls,e=>e.getHours());wI.range;const SI=Gr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ls)},(e,t)=>(t-e)/ls,e=>e.getUTCHours());SI.range;const Vy=Gr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ki)/Ls,e=>e.getDate()-1);Vy.range;const jS=Gr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ls,e=>e.getUTCDate()-1);jS.range;const sX=Gr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ls,e=>Math.floor(e/Ls));sX.range;function cf(e){return Gr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Ki)/_I)}const BS=cf(0),o1=cf(1),uTe=cf(2),cTe=cf(3),yd=cf(4),fTe=cf(5),hTe=cf(6);BS.range;o1.range;uTe.range;cTe.range;yd.range;fTe.range;hTe.range;function ff(e){return Gr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/_I)}const zS=ff(0),s1=ff(1),dTe=ff(2),vTe=ff(3),_d=ff(4),pTe=ff(5),gTe=ff(6);zS.range;s1.range;dTe.range;vTe.range;_d.range;pTe.range;gTe.range;const TI=Gr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());TI.range;const CI=Gr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());CI.range;const ks=Gr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ks.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ks.range;const Os=Gr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Os.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Os.range;function lX(e,t,r,n,i,a){const o=[[hc,1,ss],[hc,5,5*ss],[hc,15,15*ss],[hc,30,30*ss],[a,1,Ki],[a,5,5*Ki],[a,15,15*Ki],[a,30,30*Ki],[i,1,ls],[i,3,3*ls],[i,6,6*ls],[i,12,12*ls],[n,1,Ls],[n,2,2*Ls],[r,1,_I],[t,1,Z3],[t,3,3*Z3],[e,1,cA]];function s(u,c,f){const h=cm).right(o,h);if(d===o.length)return e.every(SL(u/cA,c/cA,f));if(d===0)return a1.every(Math.max(SL(u,c,f),1));const[v,g]=o[h/o[d-1][2]53)return null;"w"in ee||(ee.w=1),"Z"in ee?(Se=hA(cp(ee.y,0,1)),ze=Se.getUTCDay(),Se=ze>4||ze===0?s1.ceil(Se):s1(Se),Se=jS.offset(Se,(ee.V-1)*7),ee.y=Se.getUTCFullYear(),ee.m=Se.getUTCMonth(),ee.d=Se.getUTCDate()+(ee.w+6)%7):(Se=fA(cp(ee.y,0,1)),ze=Se.getDay(),Se=ze>4||ze===0?o1.ceil(Se):o1(Se),Se=Vy.offset(Se,(ee.V-1)*7),ee.y=Se.getFullYear(),ee.m=Se.getMonth(),ee.d=Se.getDate()+(ee.w+6)%7)}else("W"in ee||"U"in ee)&&("w"in ee||(ee.w="u"in ee?ee.u%7:"W"in ee?1:0),ze="Z"in ee?hA(cp(ee.y,0,1)).getUTCDay():fA(cp(ee.y,0,1)).getDay(),ee.m=0,ee.d="W"in ee?(ee.w+6)%7+ee.W*7-(ze+5)%7:ee.w+ee.U*7-(ze+6)%7);return"Z"in ee?(ee.H+=ee.Z/100|0,ee.M+=ee.Z%100,hA(ee)):fA(ee)}}function P(ne,fe,le,ee){for(var Be=0,Se=fe.length,ze=le.length,Ue,ht;Be=ze)return-1;if(Ue=fe.charCodeAt(Be++),Ue===37){if(Ue=fe.charAt(Be++),ht=S[Ue in Y3?fe.charAt(Be++):Ue],!ht||(ee=ht(ne,le,ee))<0)return-1}else if(Ue!=le.charCodeAt(ee++))return-1}return ee}function k(ne,fe,le){var ee=u.exec(fe.slice(le));return ee?(ne.p=c.get(ee[0].toLowerCase()),le+ee[0].length):-1}function O(ne,fe,le){var ee=d.exec(fe.slice(le));return ee?(ne.w=v.get(ee[0].toLowerCase()),le+ee[0].length):-1}function D(ne,fe,le){var ee=f.exec(fe.slice(le));return ee?(ne.w=h.get(ee[0].toLowerCase()),le+ee[0].length):-1}function I(ne,fe,le){var ee=y.exec(fe.slice(le));return ee?(ne.m=_.get(ee[0].toLowerCase()),le+ee[0].length):-1}function N(ne,fe,le){var ee=g.exec(fe.slice(le));return ee?(ne.m=m.get(ee[0].toLowerCase()),le+ee[0].length):-1}function B(ne,fe,le){return P(ne,t,fe,le)}function F(ne,fe,le){return P(ne,r,fe,le)}function $(ne,fe,le){return P(ne,n,fe,le)}function G(ne){return o[ne.getDay()]}function z(ne){return a[ne.getDay()]}function U(ne){return l[ne.getMonth()]}function H(ne){return s[ne.getMonth()]}function Y(ne){return i[+(ne.getHours()>=12)]}function Z(ne){return 1+~~(ne.getMonth()/3)}function J(ne){return o[ne.getUTCDay()]}function ae(ne){return a[ne.getUTCDay()]}function ce(ne){return l[ne.getUTCMonth()]}function ge(ne){return s[ne.getUTCMonth()]}function Fe(ne){return i[+(ne.getUTCHours()>=12)]}function _e(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var fe=C(ne+="",x);return fe.toString=function(){return ne},fe},parse:function(ne){var fe=M(ne+="",!1);return fe.toString=function(){return ne},fe},utcFormat:function(ne){var fe=C(ne+="",w);return fe.toString=function(){return ne},fe},utcParse:function(ne){var fe=M(ne+="",!0);return fe.toString=function(){return ne},fe}}}var Y3={"-":"",_:" ",0:"0"},rn=/^\s*\d+/,wTe=/^%/,STe=/[\\^$*+?|[\]().{}]/g;function Tt(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function CTe(e,t,r){var n=rn.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function ATe(e,t,r){var n=rn.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function MTe(e,t,r){var n=rn.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function PTe(e,t,r){var n=rn.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function LTe(e,t,r){var n=rn.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function X3(e,t,r){var n=rn.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function q3(e,t,r){var n=rn.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function kTe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function OTe(e,t,r){var n=rn.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function DTe(e,t,r){var n=rn.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function K3(e,t,r){var n=rn.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function ETe(e,t,r){var n=rn.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Q3(e,t,r){var n=rn.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function ITe(e,t,r){var n=rn.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function NTe(e,t,r){var n=rn.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function RTe(e,t,r){var n=rn.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function jTe(e,t,r){var n=rn.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function BTe(e,t,r){var n=wTe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function zTe(e,t,r){var n=rn.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function $Te(e,t,r){var n=rn.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function J3(e,t){return Tt(e.getDate(),t,2)}function FTe(e,t){return Tt(e.getHours(),t,2)}function VTe(e,t){return Tt(e.getHours()%12||12,t,2)}function GTe(e,t){return Tt(1+Vy.count(ks(e),e),t,3)}function uX(e,t){return Tt(e.getMilliseconds(),t,3)}function HTe(e,t){return uX(e,t)+"000"}function WTe(e,t){return Tt(e.getMonth()+1,t,2)}function UTe(e,t){return Tt(e.getMinutes(),t,2)}function ZTe(e,t){return Tt(e.getSeconds(),t,2)}function YTe(e){var t=e.getDay();return t===0?7:t}function XTe(e,t){return Tt(BS.count(ks(e)-1,e),t,2)}function cX(e){var t=e.getDay();return t>=4||t===0?yd(e):yd.ceil(e)}function qTe(e,t){return e=cX(e),Tt(yd.count(ks(e),e)+(ks(e).getDay()===4),t,2)}function KTe(e){return e.getDay()}function QTe(e,t){return Tt(o1.count(ks(e)-1,e),t,2)}function JTe(e,t){return Tt(e.getFullYear()%100,t,2)}function eCe(e,t){return e=cX(e),Tt(e.getFullYear()%100,t,2)}function tCe(e,t){return Tt(e.getFullYear()%1e4,t,4)}function rCe(e,t){var r=e.getDay();return e=r>=4||r===0?yd(e):yd.ceil(e),Tt(e.getFullYear()%1e4,t,4)}function nCe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Tt(t/60|0,"0",2)+Tt(t%60,"0",2)}function e4(e,t){return Tt(e.getUTCDate(),t,2)}function iCe(e,t){return Tt(e.getUTCHours(),t,2)}function aCe(e,t){return Tt(e.getUTCHours()%12||12,t,2)}function oCe(e,t){return Tt(1+jS.count(Os(e),e),t,3)}function fX(e,t){return Tt(e.getUTCMilliseconds(),t,3)}function sCe(e,t){return fX(e,t)+"000"}function lCe(e,t){return Tt(e.getUTCMonth()+1,t,2)}function uCe(e,t){return Tt(e.getUTCMinutes(),t,2)}function cCe(e,t){return Tt(e.getUTCSeconds(),t,2)}function fCe(e){var t=e.getUTCDay();return t===0?7:t}function hCe(e,t){return Tt(zS.count(Os(e)-1,e),t,2)}function hX(e){var t=e.getUTCDay();return t>=4||t===0?_d(e):_d.ceil(e)}function dCe(e,t){return e=hX(e),Tt(_d.count(Os(e),e)+(Os(e).getUTCDay()===4),t,2)}function vCe(e){return e.getUTCDay()}function pCe(e,t){return Tt(s1.count(Os(e)-1,e),t,2)}function gCe(e,t){return Tt(e.getUTCFullYear()%100,t,2)}function mCe(e,t){return e=hX(e),Tt(e.getUTCFullYear()%100,t,2)}function yCe(e,t){return Tt(e.getUTCFullYear()%1e4,t,4)}function _Ce(e,t){var r=e.getUTCDay();return e=r>=4||r===0?_d(e):_d.ceil(e),Tt(e.getUTCFullYear()%1e4,t,4)}function xCe(){return"+0000"}function t4(){return"%"}function r4(e){return+e}function n4(e){return Math.floor(+e/1e3)}var Nf,dX,vX;bCe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function bCe(e){return Nf=bTe(e),dX=Nf.format,Nf.parse,vX=Nf.utcFormat,Nf.utcParse,Nf}function wCe(e){return new Date(e)}function SCe(e){return e instanceof Date?+e:+new Date(+e)}function AI(e,t,r,n,i,a,o,s,l,u){var c=hI(),f=c.invert,h=c.domain,d=u(".%L"),v=u(":%S"),g=u("%I:%M"),m=u("%I %p"),y=u("%a %d"),_=u("%b %d"),x=u("%B"),w=u("%Y");function S(C){return(l(C)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>hSe(e,a/n))},r.copy=function(){return yX(t).domain(e)},Gs.apply(r,arguments)}function FS(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=Bn,c,f=!1,h;function d(g){return isNaN(g=+g)?h:(g=.5+((g=+c(g))-a)*(n*gt}var OCe=kCe,DCe=wX,ECe=OCe,ICe=hv;function NCe(e){return e&&e.length?DCe(e,ICe,ECe):void 0}var RCe=NCe;const ml=jt(RCe);function jCe(e,t){return ee.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};Ne.decimalPlaces=Ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Yt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Ne.dividedBy=Ne.div=function(e){return gs(this,new this.constructor(e))};Ne.dividedToIntegerBy=Ne.idiv=function(e){var t=this,r=t.constructor;return zt(gs(t,new r(e),0,1),r.precision)};Ne.equals=Ne.eq=function(e){return!this.cmp(e)};Ne.exponent=function(){return Pr(this)};Ne.greaterThan=Ne.gt=function(e){return this.cmp(e)>0};Ne.greaterThanOrEqualTo=Ne.gte=function(e){return this.cmp(e)>=0};Ne.isInteger=Ne.isint=function(){return this.e>this.d.length-2};Ne.isNegative=Ne.isneg=function(){return this.s<0};Ne.isPositive=Ne.ispos=function(){return this.s>0};Ne.isZero=function(){return this.s===0};Ne.lessThan=Ne.lt=function(e){return this.cmp(e)<0};Ne.lessThanOrEqualTo=Ne.lte=function(e){return this.cmp(e)<1};Ne.logarithm=Ne.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(gi))throw Error(aa+"NaN");if(r.s<1)throw Error(aa+(r.s?"NaN":"-Infinity"));return r.eq(gi)?new n(0):(Qt=!1,t=gs(Am(r,a),Am(e,a),a),Qt=!0,zt(t,i))};Ne.minus=Ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AX(t,e):TX(t,(e.s=-e.s,e))};Ne.modulo=Ne.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(aa+"NaN");return r.s?(Qt=!1,t=gs(r,e,0,1).times(e),Qt=!0,r.minus(t)):zt(new n(r),i)};Ne.naturalExponential=Ne.exp=function(){return CX(this)};Ne.naturalLogarithm=Ne.ln=function(){return Am(this)};Ne.negated=Ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ne.plus=Ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?TX(t,e):AX(t,(e.s=-e.s,e))};Ne.precision=Ne.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ac+e);if(t=Pr(i)+1,n=i.d.length-1,r=n*Yt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Ne.squareRoot=Ne.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(aa+"NaN")}for(e=Pr(s),Qt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ho(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=gv((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(gs(s,a,o+2)).times(.5),ho(a.d).slice(0,o)===(t=ho(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(zt(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Qt=!0,zt(n,r)};Ne.times=Ne.mul=function(e){var t,r,n,i,a,o,s,l,u,c=this,f=c.constructor,h=c.d,d=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=h.length,u=d.length,l=0;){for(t=0,i=l+n;i>n;)s=a[i]+d[n]*h[i-n-1]+t,a[i--]=s%Xr|0,t=s/Xr|0;a[i]=(a[i]+t)%Xr|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Qt?zt(e,f.precision):e};Ne.toDecimalPlaces=Ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ko(e,0,pv),t===void 0?t=n.rounding:ko(t,0,8),zt(r,e+Pr(r)+1,t))};Ne.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Hc(n,!0):(ko(e,0,pv),t===void 0?t=i.rounding:ko(t,0,8),n=zt(new i(n),e+1,t),r=Hc(n,!0,e+1)),r};Ne.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Hc(i):(ko(e,0,pv),t===void 0?t=a.rounding:ko(t,0,8),n=zt(new a(i),e+Pr(i)+1,t),r=Hc(n.abs(),!1,e+Pr(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Ne.toInteger=Ne.toint=function(){var e=this,t=e.constructor;return zt(new t(e),Pr(e)+1,t.rounding)};Ne.toNumber=function(){return+this};Ne.toPower=Ne.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(gi);if(s=new l(s),!s.s){if(e.s<1)throw Error(aa+"Infinity");return s}if(s.eq(gi))return s;if(n=l.precision,e.eq(gi))return zt(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=c<0?-c:c)<=SX){for(i=new l(gi),t=Math.ceil(n/Yt+4),Qt=!1;r%2&&(i=i.times(s),o4(i.d,t)),r=gv(r/2),r!==0;)s=s.times(s),o4(s.d,t);return Qt=!0,e.s<0?new l(gi).div(i):zt(i,n)}}else if(a<0)throw Error(aa+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Qt=!1,i=e.times(Am(s,n+u)),Qt=!0,i=CX(i),i.s=a,i};Ne.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Pr(i),n=Hc(i,r<=a.toExpNeg||r>=a.toExpPos)):(ko(e,1,pv),t===void 0?t=a.rounding:ko(t,0,8),i=zt(new a(i),e,t),r=Pr(i),n=Hc(i,e<=r||r<=a.toExpNeg,e)),n};Ne.toSignificantDigits=Ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ko(e,1,pv),t===void 0?t=n.rounding:ko(t,0,8)),zt(new n(r),e,t)};Ne.toString=Ne.valueOf=Ne.val=Ne.toJSON=Ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Pr(e),r=e.constructor;return Hc(e,t<=r.toExpNeg||t>=r.toExpPos)};function TX(e,t){var r,n,i,a,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Qt?zt(t,f):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(f/Yt),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/Xr|0,l[a]%=Xr;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Qt?zt(t,f):t}function ko(e,t,r){if(e!==~~e||er)throw Error(Ac+e)}function ho(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]1;)n.shift()}return function(n,i,a,o){var s,l,u,c,f,h,d,v,g,m,y,_,x,w,S,C,M,P,k=n.constructor,O=n.s==i.s?1:-1,D=n.d,I=i.d;if(!n.s)return new k(n);if(!i.s)throw Error(aa+"Division by zero");for(l=n.e-i.e,M=I.length,S=D.length,d=new k(O),v=d.d=[],u=0;I[u]==(D[u]||0);)++u;if(I[u]>(D[u]||0)&&--l,a==null?_=a=k.precision:o?_=a+(Pr(n)-Pr(i))+1:_=a,_<0)return new k(0);if(_=_/Yt+2|0,u=0,M==1)for(c=0,I=I[0],_++;(u1&&(I=e(I,c),D=e(D,c),M=I.length,S=D.length),w=M,g=D.slice(0,M),m=g.length;m=Xr/2&&++C;do c=0,s=t(I,g,M,m),s<0?(y=g[0],M!=m&&(y=y*Xr+(g[1]||0)),c=y/C|0,c>1?(c>=Xr&&(c=Xr-1),f=e(I,c),h=f.length,m=g.length,s=t(f,g,h,m),s==1&&(c--,r(f,M16)throw Error(LI+Pr(e));if(!e.s)return new c(gi);for(Qt=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(qu(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new c(gi),c.precision=s;;){if(i=zt(i.times(e),s),r=r.times(++l),o=a.plus(gs(i,r,s)),ho(o.d).slice(0,s)===ho(a.d).slice(0,s)){for(;u--;)a=zt(a.times(a),s);return c.precision=f,t==null?(Qt=!0,zt(a,f)):a}a=o}}function Pr(e){for(var t=e.e*Yt,r=e.d[0];r>=10;r/=10)t++;return t}function dA(e,t,r){if(t>e.LN10.sd())throw Qt=!0,r&&(e.precision=r),Error(aa+"LN10 precision limit exceeded");return zt(new e(e.LN10),t)}function ul(e){for(var t="";e--;)t+="0";return t}function Am(e,t){var r,n,i,a,o,s,l,u,c,f=1,h=10,d=e,v=d.d,g=d.constructor,m=g.precision;if(d.s<1)throw Error(aa+(d.s?"NaN":"-Infinity"));if(d.eq(gi))return new g(0);if(t==null?(Qt=!1,u=m):u=t,d.eq(10))return t==null&&(Qt=!0),dA(g,u);if(u+=h,g.precision=u,r=ho(v),n=r.charAt(0),a=Pr(d),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)d=d.times(e),r=ho(d.d),n=r.charAt(0),f++;a=Pr(d),n>1?(d=new g("0."+r),a++):d=new g(n+"."+r.slice(1))}else return l=dA(g,u+2,m).times(a+""),d=Am(new g(n+"."+r.slice(1)),u-h).plus(l),g.precision=m,t==null?(Qt=!0,zt(d,m)):d;for(s=o=d=gs(d.minus(gi),d.plus(gi),u),c=zt(d.times(d),u),i=3;;){if(o=zt(o.times(c),u),l=s.plus(gs(o,new g(i),u)),ho(l.d).slice(0,u)===ho(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(dA(g,u+2,m).times(a+""))),s=gs(s,new g(f),u),g.precision=m,t==null?(Qt=!0,zt(s,m)):s;s=l,i+=2}}function a4(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=gv(r/Yt),e.d=[],n=(r+1)%Yt,r<0&&(n+=Yt),nl1||e.e<-l1))throw Error(LI+r)}else e.s=0,e.e=0,e.d=[0];return e}function zt(e,t,r){var n,i,a,o,s,l,u,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Yt,i=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Yt),a=f.length,c>=a)return e;for(u=a=f[c],o=1;a>=10;a/=10)o++;n%=Yt,i=n-Yt+o}if(r!==void 0&&(a=qu(10,o-i-1),s=u/a%10|0,l=t<0||f[c+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/qu(10,o-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=Pr(e),f.length=1,t=t-a-1,f[0]=qu(10,(Yt-t%Yt)%Yt),e.e=gv(-t/Yt)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=qu(10,Yt-n),f[c]=i>0?(u/qu(10,o-i)%qu(10,i)|0)*a:0),l)for(;;)if(c==0){(f[0]+=a)==Xr&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=Xr)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(Qt&&(e.e>l1||e.e<-l1))throw Error(LI+Pr(e));return e}function AX(e,t){var r,n,i,a,o,s,l,u,c,f,h=e.constructor,d=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Qt?zt(t,d):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),i=Math.max(Math.ceil(d/Yt),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=f.length,c=i0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+ul(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+ul(-i-1)+a,r&&(n=r-o)>0&&(a+=ul(n))):i>=o?(a+=ul(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+ul(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=ul(n))),e.s<0?"-"+a:a}function o4(e,t){if(e.length>t)return e.length=t,!0}function MX(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ac+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return a4(o,a.toString())}else if(typeof a!="string")throw Error(Ac+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,aAe.test(a))a4(o,a);else throw Error(Ac+a)}if(i.prototype=Ne,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=MX,i.config=i.set=oAe,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ac+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ac+r+": "+n);return this}var kI=MX(iAe);gi=new kI(1);const Nt=kI;function sAe(e){return fAe(e)||cAe(e)||uAe(e)||lAe()}function lAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uAe(e,t){if(e){if(typeof e=="string")return PL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PL(e,t)}}function cAe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function fAe(e){if(Array.isArray(e))return PL(e)}function PL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-o,s4(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function AAe(e){if(Array.isArray(e))return e}function DX(e){var t=Mm(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function EX(e,t,r){if(e.lte(0))return new Nt(0);var n=HS.getDigitCount(e.toNumber()),i=new Nt(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Nt(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new Nt(Math.ceil(l))}function MAe(e,t,r){var n=1,i=new Nt(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Nt(10).pow(HS.getDigitCount(e)-1),i=new Nt(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Nt(Math.floor(e)))}else e===0?i=new Nt(Math.floor((t-1)/2)):r||(i=new Nt(Math.floor(e)));var o=Math.floor((t-1)/2),s=pAe(vAe(function(l){return i.add(new Nt(l-o).mul(n)).toNumber()}),LL);return s(0,t)}function IX(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Nt(0),tickMin:new Nt(0),tickMax:new Nt(0)};var a=EX(new Nt(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new Nt(0):(o=new Nt(e).add(t).div(2),o=o.sub(new Nt(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Nt(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?IX(e,t,r,n,i+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new Nt(s).mul(a)),tickMax:o.add(new Nt(l).mul(a))})}function PAe(e){var t=Mm(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=DX([r,n]),l=Mm(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(OL(LL(0,i-1).map(function(){return 1/0}))):[].concat(OL(LL(0,i-1).map(function(){return-1/0})),[c]);return r>n?kL(f):f}if(u===c)return MAe(u,i,a);var h=IX(u,c,o,a),d=h.step,v=h.tickMin,g=h.tickMax,m=HS.rangeStep(v,g.add(new Nt(.1).mul(d)),d);return r>n?kL(m):m}function LAe(e,t){var r=Mm(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=DX([n,i]),s=Mm(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var c=Math.max(t,2),f=EX(new Nt(u).sub(l).div(c-1),a,0),h=[].concat(OL(HS.rangeStep(new Nt(l),new Nt(u).sub(new Nt(.99).mul(f)),f)),[u]);return n>i?kL(h):h}var kAe=kX(PAe),OAe=kX(LAe),DAe="Invariant failed";function Wc(e,t){throw new Error(DAe)}var EAe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function bd(e){"@babel/helpers - typeof";return bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bd(e)}function u1(){return u1=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $Ae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function FAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VAe(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,d=void 0;if(ka(f-c)!==ka(h-f)){var v=[];if(ka(h-f)===ka(l[1]-l[0])){d=h;var g=f+l[1]-l[0];v[0]=Math.min(g,(g+c)/2),v[1]=Math.max(g,(g+c)/2)}else{d=c;var m=h+l[1]-l[0];v[0]=Math.min(f,(m+f)/2),v[1]=Math.max(f,(m+f)/2)}var y=[Math.min(f,(d+f)/2),Math.max(f,(d+f)/2)];if(t>y[0]&&t<=y[1]||t>=v[0]&&t<=v[1]){o=i[u].index;break}}else{var _=Math.min(c,h),x=Math.max(c,h);if(t>(_+f)/2&&t<=(x+f)/2){o=i[u].index;break}}}else for(var w=0;w0&&w(n[w].coordinate+n[w-1].coordinate)/2&&t<=(n[w].coordinate+n[w+1].coordinate)/2||w===s-1&&t>(n[w].coordinate+n[w-1].coordinate)/2){o=n[w].index;break}return o},OI=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?cr(cr({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},a2e=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l=0});if(y&&y.length){var _=y[0].type.defaultProps,x=_!==void 0?cr(cr({},_),y[0].props):y[0].props,w=x.barSize,S=x[m];o[S]||(o[S]=[]);var C=ft(w)?r:w;o[S].push({item:y[0],stackList:y.slice(1),barSize:ft(C)?void 0:Gc(C,n,0)})}}return o},o2e=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=Gc(r,i,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,d=i/l,v=o.reduce(function(w,S){return w+S.barSize||0},0);v+=(l-1)*u,v>=i&&(v-=(l-1)*u,u=0),v>=i&&d>0&&(h=!0,d*=.9,v=l*d);var g=(i-v)/2>>0,m={offset:g-u,size:0};c=o.reduce(function(w,S){var C={item:S.item,position:{offset:m.offset+m.size+u,size:h?d:S.barSize}},M=[].concat(c4(w),[C]);return m=M[M.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(P){M.push({item:P,position:m})}),M},f)}else{var y=Gc(n,i,0,!0);i-2*y-(l-1)*u<=0&&(u=0);var _=(i-2*y-(l-1)*u)/l;_>1&&(_>>=0);var x=s===+s?Math.min(_,s):_;c=o.reduce(function(w,S,C){var M=[].concat(c4(w),[{item:S.item,position:{offset:y+(_+u)*C+(_-x)/2,size:x}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(P){M.push({item:P,position:M[M.length-1].position})}),M},f)}return c},s2e=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=BX({children:a,legendWidth:l});if(u){var c=i||{},f=c.width,h=c.height,d=u.align,v=u.verticalAlign,g=u.layout;if((g==="vertical"||g==="horizontal"&&v==="middle")&&d!=="center"&&we(t[d]))return cr(cr({},t),{},Xh({},d,t[d]+(f||0)));if((g==="horizontal"||g==="vertical"&&d==="center")&&v!=="middle"&&we(t[v]))return cr(cr({},t),{},Xh({},v,t[v]+(h||0)))}return t},l2e=function(t,r,n){return ft(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},zX=function(t,r,n,i,a){var o=r.props.children,s=ea(o,Gy).filter(function(u){return l2e(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Fn(c,n);if(ft(f))return u;var h=Array.isArray(f)?[VS(f),ml(f)]:[f,f],d=l.reduce(function(v,g){var m=Fn(c,g,0),y=h[0]-Math.abs(Array.isArray(m)?m[0]:m),_=h[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(y,v[0]),Math.max(_,v[1])]},[1/0,-1/0]);return[Math.min(d[0],u[0]),Math.max(d[1],u[1])]},[1/0,-1/0])}return null},u2e=function(t,r,n,i,a){var o=r.map(function(s){return zX(t,s,n,a,i)}).filter(function(s){return!ft(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},$X=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&zX(t,l,u,i)||Cg(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c=2?ka(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+u,value:f,offset:u}});return c.filter(function(f){return!lv(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+u,value:f,index:h,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,h){return{coordinate:i(f)+u,value:a?a[f]:f,index:h,offset:u}})},vA=new WeakMap,a_=function(t,r){if(typeof r!="function")return t;vA.has(t)||vA.set(t,new WeakMap);var n=vA.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},c2e=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:bm(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:i1(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Tg(),realScaleType:"point"}:a==="category"?{scale:bm(),realScaleType:"band"}:{scale:i1(),realScaleType:"linear"};if(Vc(i)){var l="scale".concat(LS(i));return{scale:(i4[l]||Tg)(),realScaleType:i4[l]?l:"point"}}return ut(i)?{scale:i}:{scale:Tg(),realScaleType:"point"}},h4=1e-4,f2e=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-h4,o=Math.max(i[0],i[1])+h4,s=t(r[0]),l=t(r[n-1]);(so||lo)&&t.domain([r[0],r[n-1]])}},h2e=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},p2e=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},g2e={sign:v2e,expand:kpe,none:hd,silhouette:Ope,wiggle:Dpe,positive:p2e},m2e=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=g2e[n],o=Lpe().keys(i).value(function(s,l){return+Fn(s,l,0)}).order(aL).offset(a);return o(t)},y2e=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,h){var d,v=(d=h.type)!==null&&d!==void 0&&d.defaultProps?cr(cr({},h.type.defaultProps),h.props):h.props,g=v.stackId,m=v.hide;if(m)return f;var y=v[n],_=f[y]||{hasStack:!1,stackGroups:{}};if(jr(g)){var x=_.stackGroups[g]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(h),_.hasStack=!0,_.stackGroups[g]=x}else _.stackGroups[uv("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return cr(cr({},f),{},Xh({},y,_))},l),c={};return Object.keys(u).reduce(function(f,h){var d=u[h];if(d.hasStack){var v={};d.stackGroups=Object.keys(d.stackGroups).reduce(function(g,m){var y=d.stackGroups[m];return cr(cr({},g),{},Xh({},m,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:m2e(t,y.items,a)}))},v)}return cr(cr({},f),{},Xh({},h,d))},c)},_2e=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=kAe(u,a,s);return t.domain([VS(c),ml(c)]),{niceTicks:c}}if(a&&i==="number"){var f=t.domain(),h=OAe(f,a,s);return{niceTicks:h}}return null};function f1(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ft(i[t.dataKey])){var s=Ib(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=Fn(i,ft(o)?t.dataKey:o);return ft(l)?null:t.scale(l)}var d4=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=Fn(o,r.dataKey,r.domain[s]);return ft(l)?null:r.scale(l)-a/2+i},x2e=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},b2e=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?cr(cr({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(jr(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},w2e=function(t){return t.reduce(function(r,n){return[VS(n.concat([r[0]]).filter(we)),ml(n.concat([r[1]]).filter(we))]},[1/0,-1/0])},VX=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,c){var f=w2e(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},v4=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,p4=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,NL=function(t,r,n){if(ut(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(we(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(v4.test(t[0])){var a=+v4.exec(t[0])[1];i[0]=r[0]-a}else ut(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(we(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(p4.test(t[1])){var o=+p4.exec(t[1])[1];i[1]=r[1]+o}else ut(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},h1=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=aI(r,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;so&&(u=2*Math.PI-u),{radius:s,angle:A2e(u),angleInRadian:u}},L2e=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},k2e=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},_4=function(t,r){var n=t.x,i=t.y,a=P2e({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(ou)return!1;if(o===0)return!0;var c=L2e(r),f=c.startAngle,h=c.endAngle,d=s,v;if(f<=h){for(;d>h;)d-=360;for(;d=f&&d<=h}else{for(;d>f;)d-=360;for(;d=h&&d<=f}return v?y4(y4({},r),{},{radius:o,angle:k2e(d,r)}):null};function Om(e){"@babel/helpers - typeof";return Om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Om(e)}var O2e=["offset"];function D2e(e){return R2e(e)||N2e(e)||I2e(e)||E2e()}function E2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I2e(e,t){if(e){if(typeof e=="string")return RL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RL(e,t)}}function N2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function R2e(e){if(Array.isArray(e))return RL(e)}function RL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function B2e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function x4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Er(e){for(var t=1;t=0?1:-1,x,w;i==="insideStart"?(x=d+_*o,w=g):i==="insideEnd"?(x=v-_*o,w=!g):i==="end"&&(x=v+_*o,w=g),w=y<=0?w:!w;var S=cn(u,c,m,x),C=cn(u,c,m,x+(w?1:-1)*359),M="M".concat(S.x,",").concat(S.y,` + A`).concat(m,",").concat(m,",0,1,").concat(w?0:1,`, + `).concat(C.x,",").concat(C.y),P=ft(t.id)?uv("recharts-radial-line-"):t.id;return Q.createElement("text",Dm({},n,{dominantBaseline:"central",className:mt("recharts-radial-bar-label",s)}),Q.createElement("defs",null,Q.createElement("path",{id:P,d:M})),Q.createElement("textPath",{xlinkHref:"#".concat(P)},r))},W2e=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,c=a.startAngle,f=a.endAngle,h=(c+f)/2;if(i==="outside"){var d=cn(o,s,u+n,h),v=d.x,g=d.y;return{x:v,y:g,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var m=(l+u)/2,y=cn(o,s,m,h),_=y.x,x=y.y;return{x:_,y:x,textAnchor:"middle",verticalAnchor:"middle"}},U2e=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,h=f*i,d=f>0?"end":"start",v=f>0?"start":"end",g=u>=0?1:-1,m=g*i,y=g>0?"end":"start",_=g>0?"start":"end";if(a==="top"){var x={x:s+u/2,y:l-f*i,textAnchor:"middle",verticalAnchor:d};return Er(Er({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var w={x:s+u/2,y:l+c+h,textAnchor:"middle",verticalAnchor:v};return Er(Er({},w),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(a==="left"){var S={x:s-m,y:l+c/2,textAnchor:y,verticalAnchor:"middle"};return Er(Er({},S),n?{width:Math.max(S.x-n.x,0),height:c}:{})}if(a==="right"){var C={x:s+u+m,y:l+c/2,textAnchor:_,verticalAnchor:"middle"};return Er(Er({},C),n?{width:Math.max(n.x+n.width-C.x,0),height:c}:{})}var M=n?{width:u,height:c}:{};return a==="insideLeft"?Er({x:s+m,y:l+c/2,textAnchor:_,verticalAnchor:"middle"},M):a==="insideRight"?Er({x:s+u-m,y:l+c/2,textAnchor:y,verticalAnchor:"middle"},M):a==="insideTop"?Er({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:v},M):a==="insideBottom"?Er({x:s+u/2,y:l+c-h,textAnchor:"middle",verticalAnchor:d},M):a==="insideTopLeft"?Er({x:s+m,y:l+h,textAnchor:_,verticalAnchor:v},M):a==="insideTopRight"?Er({x:s+u-m,y:l+h,textAnchor:y,verticalAnchor:v},M):a==="insideBottomLeft"?Er({x:s+m,y:l+c-h,textAnchor:_,verticalAnchor:d},M):a==="insideBottomRight"?Er({x:s+u-m,y:l+c-h,textAnchor:y,verticalAnchor:d},M):iv(a)&&(we(a.x)||cc(a.x))&&(we(a.y)||cc(a.y))?Er({x:s+Gc(a.x,u),y:l+Gc(a.y,c),textAnchor:"end",verticalAnchor:"end"},M):Er({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},M)},Z2e=function(t){return"cx"in t&&we(t.cx)};function An(e){var t=e.offset,r=t===void 0?5:t,n=j2e(e,O2e),i=Er({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,c=i.className,f=c===void 0?"":c,h=i.textBreakAll;if(!a||ft(s)&&ft(l)&&!W.isValidElement(u)&&!ut(u))return null;if(W.isValidElement(u))return W.cloneElement(u,i);var d;if(ut(u)){if(d=W.createElement(u,i),W.isValidElement(d))return d}else d=V2e(i);var v=Z2e(a),g=lt(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return H2e(i,d,g);var m=v?W2e(i):U2e(i);return Q.createElement(qb,Dm({className:mt("recharts-label",f)},g,m,{breakAll:h}),d)}An.displayName="Label";var HX=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,h=t.y,d=t.top,v=t.left,g=t.width,m=t.height,y=t.clockWise,_=t.labelViewBox;if(_)return _;if(we(g)&&we(m)){if(we(f)&&we(h))return{x:f,y:h,width:g,height:m};if(we(d)&&we(v))return{x:d,y:v,width:g,height:m}}return we(f)&&we(h)?{x:f,y:h,width:0,height:0}:we(r)&&we(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:y}:t.viewBox?t.viewBox:{}},Y2e=function(t,r){return t?t===!0?Q.createElement(An,{key:"label-implicit",viewBox:r}):jr(t)?Q.createElement(An,{key:"label-implicit",viewBox:r,value:t}):W.isValidElement(t)?t.type===An?W.cloneElement(t,{key:"label-implicit",viewBox:r}):Q.createElement(An,{key:"label-implicit",content:t,viewBox:r}):ut(t)?Q.createElement(An,{key:"label-implicit",content:t,viewBox:r}):iv(t)?Q.createElement(An,Dm({viewBox:r},t,{key:"label-implicit"})):null:null},X2e=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=HX(t),o=ea(i,An).map(function(l,u){return W.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=Y2e(t.label,r||a);return[s].concat(D2e(o))};An.parseViewBox=HX;An.renderCallByParent=X2e;function q2e(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var K2e=q2e;const Q2e=jt(K2e);function Em(e){"@babel/helpers - typeof";return Em=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Em(e)}var J2e=["valueAccessor"],eMe=["data","dataKey","clockWise","id","textBreakAll"];function tMe(e){return aMe(e)||iMe(e)||nMe(e)||rMe()}function rMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nMe(e,t){if(e){if(typeof e=="string")return jL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jL(e,t)}}function iMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aMe(e){if(Array.isArray(e))return jL(e)}function jL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uMe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var cMe=function(t){return Array.isArray(t.value)?Q2e(t.value):t.value};function ms(e){var t=e.valueAccessor,r=t===void 0?cMe:t,n=S4(e,J2e),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=S4(n,eMe);return!i||!i.length?null:Q.createElement(Wt,{className:"recharts-label-list"},i.map(function(c,f){var h=ft(a)?r(c,f):Fn(c&&c.payload,a),d=ft(s)?{}:{id:"".concat(s,"-").concat(f)};return Q.createElement(An,v1({},lt(c,!0),u,d,{parentViewBox:c.parentViewBox,value:h,textBreakAll:l,viewBox:An.parseViewBox(ft(o)?c:w4(w4({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}ms.displayName="LabelList";function fMe(e,t){return e?e===!0?Q.createElement(ms,{key:"labelList-implicit",data:t}):Q.isValidElement(e)||ut(e)?Q.createElement(ms,{key:"labelList-implicit",data:t,content:e}):iv(e)?Q.createElement(ms,v1({data:t},e,{key:"labelList-implicit"})):null:null}function hMe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=ea(n,ms).map(function(o,s){return W.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=fMe(e.label,t);return[a].concat(tMe(i))}ms.renderCallByParent=hMe;function Im(e){"@babel/helpers - typeof";return Im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Im(e)}function BL(){return BL=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, + `).concat(f.x,",").concat(f.y,` + `);if(i>0){var d=cn(r,n,i,o),v=cn(r,n,i,u);h+="L ".concat(v.x,",").concat(v.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`, + `).concat(d.x,",").concat(d.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},mMe=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=ka(c-u),h=o_({cx:r,cy:n,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),d=h.circleTangency,v=h.lineTangency,g=h.theta,m=o_({cx:r,cy:n,radius:a,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),y=m.circleTangency,_=m.lineTangency,x=m.theta,w=l?Math.abs(u-c):Math.abs(u-c)-g-x;if(w<0)return s?"M ".concat(v.x,",").concat(v.y,` + a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 + a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 + `):WX({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:c});var S="M ".concat(v.x,",").concat(v.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(d.x,",").concat(d.y,` + A`).concat(a,",").concat(a,",0,").concat(+(w>180),",").concat(+(f<0),",").concat(y.x,",").concat(y.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,` + `);if(i>0){var C=o_({cx:r,cy:n,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),M=C.circleTangency,P=C.lineTangency,k=C.theta,O=o_({cx:r,cy:n,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),D=O.circleTangency,I=O.lineTangency,N=O.theta,B=l?Math.abs(u-c):Math.abs(u-c)-k-N;if(B<0&&o===0)return"".concat(S,"L").concat(r,",").concat(n,"Z");S+="L".concat(I.x,",").concat(I.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(D.x,",").concat(D.y,` + A`).concat(i,",").concat(i,",0,").concat(+(B>180),",").concat(+(f>0),",").concat(M.x,",").concat(M.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else S+="L".concat(r,",").concat(n,"Z");return S},yMe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},UX=function(t){var r=C4(C4({},yMe),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,h=r.className;if(o0&&Math.abs(c-f)<360?m=mMe({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(g,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):m=WX({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:c,endAngle:f}),Q.createElement("path",BL({},lt(r,!0),{className:d,d:m,role:"img"}))};function Nm(e){"@babel/helpers - typeof";return Nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nm(e)}function zL(){return zL=Object.assign?Object.assign.bind():function(e){for(var t=1;tOMe.call(e,t));function hf(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const IMe="__v",NMe="__o",RMe="_owner",{getOwnPropertyDescriptor:k4,keys:O4}=Object;function jMe(e,t){return e.byteLength===t.byteLength&&p1(new Uint8Array(e),new Uint8Array(t))}function BMe(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function zMe(e,t){return e.byteLength===t.byteLength&&p1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function $Me(e,t){return hf(e.getTime(),t.getTime())}function FMe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function VMe(e,t){return e===t}function D4(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let c=!1,f=0;for(;(s=u.next())&&!s.done;){if(i[f]){f++;continue}const h=o.value,d=s.value;if(r.equals(h[0],d[0],l,f,e,t,r)&&r.equals(h[1],d[1],h[0],d[0],e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1;l++}return!0}const GMe=hf;function HMe(e,t,r){const n=O4(e);let i=n.length;if(O4(t).length!==i)return!1;for(;i-- >0;)if(!qX(e,t,r,n[i]))return!1;return!0}function pp(e,t,r){const n=L4(e);let i=n.length;if(L4(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!qX(e,t,r,a)||(o=k4(e,a),s=k4(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function WMe(e,t){return hf(e.valueOf(),t.valueOf())}function UMe(e,t){return e.source===t.source&&e.flags===t.flags}function E4(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!i[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function p1(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function ZMe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function qX(e,t,r,n){return(n===RMe||n===NMe||n===IMe)&&(e.$$typeof||t.$$typeof)?!0:EMe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const YMe="[object ArrayBuffer]",XMe="[object Arguments]",qMe="[object Boolean]",KMe="[object DataView]",QMe="[object Date]",JMe="[object Error]",ePe="[object Map]",tPe="[object Number]",rPe="[object Object]",nPe="[object RegExp]",iPe="[object Set]",aPe="[object String]",oPe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},sPe="[object URL]",lPe=Object.prototype.toString;function uPe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:h,areUrlsEqual:d,unknownTagComparators:v}){return function(m,y,_){if(m===y)return!0;if(m==null||y==null)return!1;const x=typeof m;if(x!==typeof y)return!1;if(x!=="object")return x==="number"?s(m,y,_):x==="function"?a(m,y,_):!1;const w=m.constructor;if(w!==y.constructor)return!1;if(w===Object)return l(m,y,_);if(Array.isArray(m))return t(m,y,_);if(w===Date)return n(m,y,_);if(w===RegExp)return c(m,y,_);if(w===Map)return o(m,y,_);if(w===Set)return f(m,y,_);const S=lPe.call(m);if(S===QMe)return n(m,y,_);if(S===nPe)return c(m,y,_);if(S===ePe)return o(m,y,_);if(S===iPe)return f(m,y,_);if(S===rPe)return typeof m.then!="function"&&typeof y.then!="function"&&l(m,y,_);if(S===sPe)return d(m,y,_);if(S===JMe)return i(m,y,_);if(S===XMe)return l(m,y,_);if(oPe[S])return h(m,y,_);if(S===YMe)return e(m,y,_);if(S===KMe)return r(m,y,_);if(S===qMe||S===tPe||S===aPe)return u(m,y,_);if(v){let C=v[S];if(!C){const M=DMe(m);M&&(C=v[M])}if(C)return C(m,y,_)}return!1}}function cPe({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:jMe,areArraysEqual:r?pp:BMe,areDataViewsEqual:zMe,areDatesEqual:$Me,areErrorsEqual:FMe,areFunctionsEqual:VMe,areMapsEqual:r?pA(D4,pp):D4,areNumbersEqual:GMe,areObjectsEqual:r?pp:HMe,arePrimitiveWrappersEqual:WMe,areRegExpsEqual:UMe,areSetsEqual:r?pA(E4,pp):E4,areTypedArraysEqual:r?pA(p1,pp):p1,areUrlsEqual:ZMe,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=l_(n.areArraysEqual),a=l_(n.areMapsEqual),o=l_(n.areObjectsEqual),s=l_(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function fPe(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function hPe({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:c}=r();return t(s,l,{cache:u,equals:n,meta:c,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const dPe=au();au({strict:!0});au({circular:!0});au({circular:!0,strict:!0});au({createInternalComparator:()=>hf});au({strict:!0,createInternalComparator:()=>hf});au({circular:!0,createInternalComparator:()=>hf});au({circular:!0,createInternalComparator:()=>hf,strict:!0});function au(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=cPe(e),o=uPe(a),s=r?r(o):fPe(o);return hPe({circular:t,comparator:o,createState:n,equals:s,strict:i})}function vPe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function I4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):vPe(i)};requestAnimationFrame(n)}function $L(e){"@babel/helpers - typeof";return $L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$L(e)}function pPe(e){return _Pe(e)||yPe(e)||mPe(e)||gPe()}function gPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mPe(e,t){if(e){if(typeof e=="string")return N4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N4(e,t)}}function N4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:y<0?0:y},g=function(y){for(var _=y>1?1:y,x=_,w=0;w<8;++w){var S=f(x)-_,C=d(x);if(Math.abs(S-_)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(c,f,h){var d=-(c-f)*n,v=h*a,g=h+(d-v)*s/1e3,m=h*s/1e3+c;return Math.abs(m-f)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qPe(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function gA(e){return eLe(e)||JPe(e)||QPe(e)||KPe()}function KPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QPe(e,t){if(e){if(typeof e=="string")return WL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return WL(e,t)}}function JPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eLe(e){if(Array.isArray(e))return WL(e)}function WL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function y1(e){return y1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},y1(e)}var Oo=function(e){aLe(r,e);var t=oLe(r);function r(n,i){var a;tLe(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,h=o.children,d=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(YL(a)),a.changeStyle=a.changeStyle.bind(YL(a)),!s||d<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:c}),ZL(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof h=="function")return a.state={style:u},ZL(a);a.state={style:l?eg({},l,u):u}}else a.state={style:{}};return a}return nLe(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,c=a.to,f=a.from,h=this.state.style;if(s){if(!o){var d={style:l?eg({},l,c):c};this.state&&h&&(l&&h[l]!==c||!l&&h!==c)&&this.setState(d);return}if(!(dPe(i.to,c)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=v||u?f:i.to;if(this.state&&h){var m={style:l?eg({},l,g):g};(l&&h[l]!==g||!l&&h!==g)&&this.setState(m)}this.runAnimation(ya(ya({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,c=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,d=ZPe(o,s,RPe(u),l,this.changeStyle),v=function(){a.stopJSAnimation=d()};this.manager.start([h,c,v,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],c=u.style,f=u.duration,h=f===void 0?0:f,d=function(g,m,y){if(y===0)return g;var _=m.duration,x=m.easing,w=x===void 0?"ease":x,S=m.style,C=m.properties,M=m.onAnimationEnd,P=y>0?o[y-1]:m,k=C||Object.keys(S);if(typeof w=="function"||w==="spring")return[].concat(gA(g),[a.runJSAnimation.bind(a,{from:P.style,to:S,duration:_,easing:w}),_]);var O=B4(k,_,w),D=ya(ya(ya({},P.style),S),{},{transition:O});return[].concat(gA(g),[D,_,M]).filter(TPe)};return this.manager.start([l].concat(gA(o.reduce(d,[c,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=xPe());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,d=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof d=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var g=s?eg({},s,l):l,m=B4(Object.keys(g),o,u);v.start([c,a,ya(ya({},g),{},{transition:m}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=XPe(i,YPe),u=W.Children.count(a),c=this.state.style;if(typeof a=="function")return a(c);if(!s||u===0||o<=0)return a;var f=function(d){var v=d.props,g=v.style,m=g===void 0?{}:g,y=v.className,_=W.cloneElement(d,ya(ya({},l),{},{style:ya(ya({},m),c),className:y}));return _};return u===1?f(W.Children.only(a)):Q.createElement("div",null,W.Children.map(a,function(h){return f(h)}))}}]),r}(W.PureComponent);Oo.displayName="Animate";Oo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Oo.propTypes={from:Pt.oneOfType([Pt.object,Pt.string]),to:Pt.oneOfType([Pt.object,Pt.string]),attributeName:Pt.string,duration:Pt.number,begin:Pt.number,easing:Pt.oneOfType([Pt.string,Pt.func]),steps:Pt.arrayOf(Pt.shape({duration:Pt.number.isRequired,style:Pt.object.isRequired,easing:Pt.oneOfType([Pt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pt.func]),properties:Pt.arrayOf("string"),onAnimationEnd:Pt.func})),children:Pt.oneOfType([Pt.node,Pt.func]),isActive:Pt.bool,canBegin:Pt.bool,onAnimationEnd:Pt.func,shouldReAnimate:Pt.bool,onAnimationStart:Pt.func,onAnimationReStart:Pt.func};function Bm(e){"@babel/helpers - typeof";return Bm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bm(e)}function _1(){return _1=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,c;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,d=4;ho?o:a[h];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, + `).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, + `).concat(t+n-l*f[2],",").concat(r+i)),c+="L ".concat(t+l*f[3],",").concat(r+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, + `).concat(t,",").concat(r+i-s*f[3])),c+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);c="M ".concat(t,",").concat(r+s*v,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(r,` + L `).concat(t+n-l*v,",").concat(r,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*v,` + L `).concat(t+n,",").concat(r+i-s*v,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n-l*v,",").concat(r+i,` + L `).concat(t+l*v,",").concat(r+i,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*v," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},gLe=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),c=Math.max(a,a+s),f=Math.min(o,o+l),h=Math.max(o,o+l);return n>=u&&n<=c&&i>=f&&i<=h}return!1},mLe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},DI=function(t){var r=U4(U4({},mLe),t),n=W.useRef(),i=W.useState(-1),a=lLe(i,2),o=a[0],s=a[1];W.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,h=r.radius,d=r.className,v=r.animationEasing,g=r.animationDuration,m=r.animationBegin,y=r.isAnimationActive,_=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var x=mt("recharts-rectangle",d);return _?Q.createElement(Oo,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:g,animationEasing:v,isActive:_},function(w){var S=w.width,C=w.height,M=w.x,P=w.y;return Q.createElement(Oo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,isActive:y,easing:v},Q.createElement("path",_1({},lt(r,!0),{className:x,d:Z4(M,P,S,C,h),ref:n})))}):Q.createElement("path",_1({},lt(r,!0),{className:x,d:Z4(l,u,c,f,h)}))};function XL(){return XL=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TLe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var CLe=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},ALe=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,h=t.height,d=h===void 0?0:h,v=t.className,g=SLe(t,yLe),m=_Le({x:n,y:a,top:s,left:u,width:f,height:d},g);return!we(n)||!we(a)||!we(f)||!we(d)||!we(s)||!we(u)?null:Q.createElement("path",qL({},lt(m,!0),{className:mt("recharts-cross",v),d:CLe(n,a,f,d,s,u)}))},MLe=yY,PLe=MLe(Object.getPrototypeOf,Object),LLe=PLe,kLe=Fs,OLe=LLe,DLe=Vs,ELe="[object Object]",ILe=Function.prototype,NLe=Object.prototype,nq=ILe.toString,RLe=NLe.hasOwnProperty,jLe=nq.call(Object);function BLe(e){if(!DLe(e)||kLe(e)!=ELe)return!1;var t=OLe(e);if(t===null)return!0;var r=RLe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&nq.call(r)==jLe}var zLe=BLe;const $Le=jt(zLe);var FLe=Fs,VLe=Vs,GLe="[object Boolean]";function HLe(e){return e===!0||e===!1||VLe(e)&&FLe(e)==GLe}var WLe=HLe;const ULe=jt(WLe);function $m(e){"@babel/helpers - typeof";return $m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$m(e)}function x1(){return x1=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:h,x:l,y:u},duration:g,animationEasing:v,isActive:y},function(x){var w=x.upperWidth,S=x.lowerWidth,C=x.height,M=x.x,P=x.y;return Q.createElement(Oo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,easing:v},Q.createElement("path",x1({},lt(r,!0),{className:_,d:Q4(M,P,w,S,C),ref:n})))}):Q.createElement("g",null,Q.createElement("path",x1({},lt(r,!0),{className:_,d:Q4(l,u,c,f,h)})))},nke=["option","shapeType","propTransformer","activeClassName","isActive"];function Fm(e){"@babel/helpers - typeof";return Fm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fm(e)}function ike(e,t){if(e==null)return{};var r=ake(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ake(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function J4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function b1(e){for(var t=1;t0&&n.handleDrag(i.changedTouches[0])}),fi(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),fi(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),fi(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),fi(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),fi(n,"handleSlideDragStart",function(i){var a=o$(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return Hke(t,e),$ke(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(i,a),h=Math.max(i,a),d=t.getIndexInRange(o,f),v=t.getIndexInRange(o,h);return{startIndex:d-d%l,endIndex:v===c?c:v-v%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Fn(a[n],s,n);return ut(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,h=l.startIndex,d=l.endIndex,v=l.onChange,g=n.pageX-a;g>0?g=Math.min(g,u+c-f-s,u+c-f-o):g<0&&(g=Math.max(g,u-o,u-s));var m=this.getIndex({startX:o+g,endX:s+g});(m.startIndex!==h||m.endIndex!==d)&&v&&v(m),this.setState({startX:o+g,endX:s+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=o$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],c=this.props,f=c.x,h=c.width,d=c.travellerWidth,v=c.onChange,g=c.gap,m=c.data,y={startX:this.state.startX,endX:this.state.endX},_=n.pageX-a;_>0?_=Math.min(_,f+h-d-u):_<0&&(_=Math.max(_,f-u)),y[o]=u+_;var x=this.getIndex(y),w=x.startIndex,S=x.endIndex,C=function(){var P=m.length-1;return o==="startX"&&(s>l?w%g===0:S%g===0)||sl?S%g===0:w%g===0)||s>l&&S===P};this.setState(fi(fi({},o,u+_),"brushMoveStartX",n.pageX),function(){v&&C()&&v(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var h=f+n;if(!(h===-1||h>=s.length)){var d=s[h];i==="startX"&&d>=u||i==="endX"&&d<=l||this.setState(fi({},i,d),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return Q.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=W.Children.only(u);return f?Q.cloneElement(f,{x:i,y:a,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,h=l.traveller,d=l.ariaLabel,v=l.data,g=l.startIndex,m=l.endIndex,y=Math.max(n,this.props.x),_=yA(yA({},lt(this.props,!1)),{},{x:y,y:u,width:c,height:f}),x=d||"Min value: ".concat((a=v[g])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[m])===null||o===void 0?void 0:o.name);return Q.createElement(Wt,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(S){["ArrowLeft","ArrowRight"].includes(S.key)&&(S.preventDefault(),S.stopPropagation(),s.handleTravellerMoveKeyboard(S.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,_))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,c=Math.min(n,i)+u,f=Math.max(Math.abs(i-n)-u,0);return Q.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,h=c.endX,d=5,v={pointerEvents:"none",fill:u};return Q.createElement(Wt,{className:"recharts-brush-texts"},Q.createElement(qb,S1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-d,y:o+s/2},v),this.getTextOfTick(i)),Q.createElement(qb,S1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+d,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,h=this.state,d=h.startX,v=h.endX,g=h.isTextActive,m=h.isSlideMoving,y=h.isTravellerMoving,_=h.isTravellerFocused;if(!i||!i.length||!we(s)||!we(l)||!we(u)||!we(c)||u<=0||c<=0)return null;var x=mt("recharts-brush",a),w=Q.Children.count(o)===1,S=Bke("userSelect","none");return Q.createElement(Wt,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),w&&this.renderPanorama(),this.renderSlide(d,v),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(v,"endX"),(g||m||y||_||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return Q.createElement(Q.Fragment,null,Q.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),Q.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),Q.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return Q.isValidElement(n)?a=Q.cloneElement(n,i):ut(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return yA({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?Uke({data:a,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(d){return i.scale(d)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(W.PureComponent);fi(Td,"displayName","Brush");fi(Td,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Zke=iI;function Yke(e,t){var r;return Zke(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Xke=Yke,qke=cY,Kke=dv,Qke=Xke,Jke=li,eOe=NS;function tOe(e,t,r){var n=Jke(e)?qke:Qke;return r&&eOe(e,t,r)&&(t=void 0),n(e,Kke(t))}var rOe=tOe;const nOe=jt(rOe);var To=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},s$=OY;function iOe(e,t,r){t=="__proto__"&&s$?s$(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var aOe=iOe,oOe=aOe,sOe=LY,lOe=dv;function uOe(e,t){var r={};return t=lOe(t),sOe(e,function(n,i,a){oOe(r,i,t(n,i,a))}),r}var cOe=uOe;const fOe=jt(cOe);function hOe(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kOe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function OOe(e,t){var r=e.x,n=e.y,i=LOe(e,COe),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),c=parseInt(u,10),f="".concat(t.width||i.width),h=parseInt(f,10);return gp(gp(gp(gp(gp({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function u$(e){return Q.createElement(hke,QL({shapeType:"rectangle",propTransformer:OOe,activeClassName:"recharts-active-bar"},e))}var DOe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=we(n)||Gde(n);return a?t(n,i):(a||Wc(),r)}},EOe=["value","background"],sq;function Cd(e){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cd(e)}function IOe(e,t){if(e==null)return{};var r=NOe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NOe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function C1(){return C1=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(F)0&&Math.abs(B)0&&(N=Math.min((ae||0)-(B[ce-1]||0),N))}),Number.isFinite(N)){var F=N/I,$=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(M=F*$/2),g.padding==="no-gap"){var G=Gc(t.barCategoryGap,F*$),z=F*$/2;M=z-G-(z-G)/$*G}}}i==="xAxis"?P=[n.left+(x.left||0)+(M||0),n.left+n.width-(x.right||0)-(M||0)]:i==="yAxis"?P=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(M||0),n.top+n.height-(x.bottom||0)-(M||0)]:P=g.range,S&&(P=[P[1],P[0]]);var U=c2e(g,a,h),H=U.scale,Y=U.realScaleType;H.domain(y).range(P),f2e(H);var Z=_2e(H,Aa(Aa({},g),{},{realScaleType:Y}));i==="xAxis"?(D=m==="top"&&!w||m==="bottom"&&w,k=n.left,O=f[C]-D*g.height):i==="yAxis"&&(D=m==="left"&&!w||m==="right"&&w,k=f[C]-D*g.width,O=n.top);var J=Aa(Aa(Aa({},g),Z),{},{realScaleType:Y,x:k,y:O,scale:H,width:i==="xAxis"?n.width:g.width,height:i==="yAxis"?n.height:g.height});return J.bandSize=h1(J,Z),!g.hide&&i==="xAxis"?f[C]+=(D?-1:1)*J.height:g.hide||(f[C]+=(D?-1:1)*J.width),Aa(Aa({},d),{},YS({},v,J))},{})},hq=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},UOe=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return hq({x:r,y:n},{x:i,y:a})},dq=function(){function e(t){GOe(this,e),this.scale=t}return HOe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();YS(dq,"EPS",1e-4);var EI=function(t){var r=Object.keys(t).reduce(function(n,i){return Aa(Aa({},n),{},YS({},i,dq.create(t[i])))},{});return Aa(Aa({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return fOe(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return TOe(i,function(a,o){return r[o].isInRange(a)})}})};function ZOe(e){return(e%180+180)%180}var YOe=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=ZOe(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&oe.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function NDe(e,t){return kq(e,t+1)}function RDe(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:kq(n,u)};var g=l,m,y=function(){return m===void 0&&(m=r(v,g)),m},_=v.coordinate,x=l===0||k1(e,_,y,c,s);x||(l=0,c=o,u+=1),x&&(c=_+e*(y()/2+i),l+=u)},h;u<=a.length;)if(h=f(),h)return h.v;return[]}function Zm(e){"@babel/helpers - typeof";return Zm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zm(e)}function w$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wn(e){for(var t=1;t0?d.coordinate-m*e:d.coordinate})}else a[h]=d=wn(wn({},d),{},{tickCoord:d.coordinate});var y=k1(e,d.tickCoord,g,s,l);y&&(l=d.tickCoord-e*(g()/2+i),a[h]=wn(wn({},d),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return a}function FDe(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var c=n[s-1],f=r(c,s-1),h=e*(c.coordinate+e*f/2-u);o[s-1]=c=wn(wn({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var d=k1(e,c.tickCoord,function(){return f},l,u);d&&(u=c.tickCoord-e*(f/2+i),o[s-1]=wn(wn({},c),{},{isShow:!0}))}for(var v=a?s-1:s,g=function(_){var x=o[_],w,S=function(){return w===void 0&&(w=r(x,_)),w};if(_===0){var C=e*(x.coordinate-e*S()/2-l);o[_]=x=wn(wn({},x),{},{tickCoord:C<0?x.coordinate-C*e:x.coordinate})}else o[_]=x=wn(wn({},x),{},{tickCoord:x.coordinate});var M=k1(e,x.tickCoord,S,l,u);M&&(l=x.tickCoord+e*(S()/2+i),o[_]=wn(wn({},x),{},{isShow:!0}))},m=0;m=2?ka(i[1].coordinate-i[0].coordinate):1,y=IDe(a,m,d);return l==="equidistantPreserveStart"?RDe(m,y,g,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=FDe(m,y,g,i,o,l==="preserveStartEnd"):h=$De(m,y,g,i,o),h.filter(function(_){return _.isShow}))}var GDe=["viewBox"],HDe=["viewBox"],WDe=["ticks"];function Ld(e){"@babel/helpers - typeof";return Ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ld(e)}function Lh(){return Lh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function UDe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ZDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T$(e,t){for(var r=0;r0?l(this.props):l(d)),o<=0||s<=0||!v||!v.length?null:Q.createElement(Wt,{className:mt("recharts-cartesian-axis",u),ref:function(m){n.layerReference=m}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),An.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=mt(i.className,"recharts-cartesian-axis-tick-value");return Q.isValidElement(n)?o=Q.cloneElement(n,Dr(Dr({},i),{},{className:s})):ut(n)?o=n(Dr(Dr({},i),{},{className:s})):o=Q.createElement(qb,Lh({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(W.Component);NI(JS,"displayName","CartesianAxis");NI(JS,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var eEe=["type","layout","connectNulls","ref"],tEe=["key"];function kd(e){"@babel/helpers - typeof";return kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kd(e)}function C$(e,t){if(e==null)return{};var r=rEe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Mg(){return Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rf){d=[].concat(Rf(l.slice(0,v)),[f-g]);break}var m=d.length%2===0?[0,h]:[h];return[].concat(Rf(t.repeat(l,c)),Rf(d),m).map(function(y){return"".concat(y,"px")}).join(", ")}),Ma(r,"id",uv("recharts-line-")),Ma(r,"pathRef",function(o){r.mainCurve=o}),Ma(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Ma(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return hEe(t,e),lEe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,f=ea(c,Gy);if(!f)return null;var h=function(g,m){return{x:g.x,y:g.y,value:g.value,errorVal:Fn(g.payload,m)}},d={clipPath:n?"url(#clipPath-".concat(i,")"):null};return Q.createElement(Wt,d,f.map(function(v){return Q.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=lt(this.props,!1),h=lt(l,!0),d=u.map(function(g,m){var y=ci(ci(ci({key:"dot-".concat(m),r:3},f),h),{},{index:m,cx:g.x,cy:g.y,value:g.value,dataKey:c,payload:g.payload,points:u});return t.renderDotItem(l,y)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return Q.createElement(Wt,Mg({className:"recharts-line-dots",key:"dots"},v),d)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=C$(s,eEe),h=ci(ci(ci({},lt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return Q.createElement(qh,Mg({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,h=o.animationEasing,d=o.animationId,v=o.animateNewValues,g=o.width,m=o.height,y=this.state,_=y.prevPoints,x=y.totalLength;return Q.createElement(Oo,{begin:c,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var S=w.t;if(_){var C=_.length/s.length,M=s.map(function(I,N){var B=Math.floor(N*C);if(_[B]){var F=_[B],$=un(F.x,I.x),G=un(F.y,I.y);return ci(ci({},I),{},{x:$(S),y:G(S)})}if(v){var z=un(g*2,I.x),U=un(m/2,I.y);return ci(ci({},I),{},{x:z(S),y:U(S)})}return ci(ci({},I),{},{x:I.x,y:I.y})});return a.renderCurveStatically(M,n,i)}var P=un(0,x),k=P(S),O;if(l){var D="".concat(l).split(/[,\s]+/gim).map(function(I){return parseFloat(I)});O=a.getStrokeDasharray(k,x,D)}else O=a.generateSimpleStrokeDasharray(x,k);return a.renderCurveStatically(s,n,i,{strokeDasharray:O})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!xd(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.xAxis,c=i.yAxis,f=i.top,h=i.left,d=i.width,v=i.height,g=i.isAnimationActive,m=i.id;if(a||!s||!s.length)return null;var y=this.state.isAnimationFinished,_=s.length===1,x=mt("recharts-line",l),w=u&&u.allowDataOverflow,S=c&&c.allowDataOverflow,C=w||S,M=ft(m)?this.id:m,P=(n=lt(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},k=P.r,O=k===void 0?3:k,D=P.strokeWidth,I=D===void 0?2:D,N=NZ(o)?o:{},B=N.clipDot,F=B===void 0?!0:B,$=O*2+I;return Q.createElement(Wt,{className:x},w||S?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:w?h:h-d/2,y:S?f:f-v/2,width:w?d:d*2,height:S?v:v*2})),!F&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:h-$/2,y:f-$/2,width:d+$,height:v+$}))):null,!_&&this.renderCurve(C,M),this.renderErrorBar(C,M),(_||o)&&this.renderDots(C,F,M),(!g||y)&&ms.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Rf(n),[0]):n,o=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function vc(){return vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!xd(c,o)||!xd(f,s))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.top,c=i.left,f=i.xAxis,h=i.yAxis,d=i.width,v=i.height,g=i.isAnimationActive,m=i.id;if(a||!s||!s.length)return null;var y=this.state.isAnimationFinished,_=s.length===1,x=mt("recharts-area",l),w=f&&f.allowDataOverflow,S=h&&h.allowDataOverflow,C=w||S,M=ft(m)?this.id:m,P=(n=lt(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},k=P.r,O=k===void 0?3:k,D=P.strokeWidth,I=D===void 0?2:D,N=NZ(o)?o:{},B=N.clipDot,F=B===void 0?!0:B,$=O*2+I;return Q.createElement(Wt,{className:x},w||S?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:w?c:c-d/2,y:S?u:u-v/2,width:w?d:d*2,height:S?v:v*2})),!F&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:c-$/2,y:u-$/2,width:d+$,height:v+$}))):null,_?null:this.renderArea(C,M),(o||_)&&this.renderDots(C,F,M),(!g||y)&&ms.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(W.PureComponent);Nq=ou;vo(ou,"displayName","Area");vo(ou,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!uf.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});vo(ou,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(we(s)&&typeof s=="number")return s;var l=i==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});vo(ou,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,d=t.layout,v=u&&u.length,g=Nq.getBaseValue(t,r,n,i),m=d==="horizontal",y=!1,_=f.map(function(w,S){var C;v?C=u[c+S]:(C=Fn(w,l),Array.isArray(C)?y=!0:C=[g,C]);var M=C[1]==null||v&&Fn(w,l)==null;return m?{x:f1({axis:n,ticks:a,bandSize:s,entry:w,index:S}),y:M?null:i.scale(C[1]),value:C,payload:w}:{x:M?null:n.scale(C[1]),y:f1({axis:i,ticks:o,bandSize:s,entry:w,index:S}),value:C,payload:w}}),x;return v||y?x=_.map(function(w){var S=Array.isArray(w.value)?w.value[0]:null;return m?{x:w.x,y:S!=null&&w.y!=null?i.scale(S):null}:{x:S!=null?n.scale(S):null,y:w.y}}):x=m?i.scale(g):n.scale(g),il({points:_,baseLine:x,layout:d,isRange:y},h)});vo(ou,"renderDotItem",function(e,t){var r;if(Q.isValidElement(e))r=Q.cloneElement(e,t);else if(ut(e))r=e(t);else{var n=mt("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=Rq(t,pEe);r=Q.createElement(WS,vc({},a,{key:i,className:n}))}return r});function Dd(e){"@babel/helpers - typeof";return Dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dd(e)}function TEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CEe(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fIe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function hIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dIe(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&we(i)&&we(a)?t.slice(i,a+1):[]};function Qq(e){return e==="number"?[0,"auto"]:void 0}var yk=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=eT(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var d=f===void 0?s:f;h=Ib(d,o.dataKey,i)}else h=f&&f[n]||s[n];return h?[].concat(Nd(l),[GX(u,h)]):l},[])},N$=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=CIe(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=i2e(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,h=yk(t,r,c,f),d=AIe(n,s,c,a);return{activeTooltipIndex:c,activeLabel:f,activePayload:h,activeCoordinate:d}}return null},MIe=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,h=t.stackOffset,d=FX(c,a);return n.reduce(function(v,g){var m,y=g.type.defaultProps!==void 0?ue(ue({},g.type.defaultProps),g.props):g.props,_=y.type,x=y.dataKey,w=y.allowDataOverflow,S=y.allowDuplicatedCategory,C=y.scale,M=y.ticks,P=y.includeHidden,k=y[o];if(v[k])return v;var O=eT(t.data,{graphicalItems:i.filter(function(Z){var J,ae=o in Z.props?Z.props[o]:(J=Z.type.defaultProps)===null||J===void 0?void 0:J[o];return ae===k}),dataStartIndex:l,dataEndIndex:u}),D=O.length,I,N,B;JEe(y.domain,w,_)&&(I=NL(y.domain,null,w),d&&(_==="number"||C!=="auto")&&(B=Cg(O,x,"category")));var F=Qq(_);if(!I||I.length===0){var $,G=($=y.domain)!==null&&$!==void 0?$:F;if(x){if(I=Cg(O,x,_),_==="category"&&d){var z=Wde(I);S&&z?(N=I,I=w1(0,D)):S||(I=g4(G,I,g).reduce(function(Z,J){return Z.indexOf(J)>=0?Z:[].concat(Nd(Z),[J])},[]))}else if(_==="category")S?I=I.filter(function(Z){return Z!==""&&!ft(Z)}):I=g4(G,I,g).reduce(function(Z,J){return Z.indexOf(J)>=0||J===""||ft(J)?Z:[].concat(Nd(Z),[J])},[]);else if(_==="number"){var U=u2e(O,i.filter(function(Z){var J,ae,ce=o in Z.props?Z.props[o]:(J=Z.type.defaultProps)===null||J===void 0?void 0:J[o],ge="hide"in Z.props?Z.props.hide:(ae=Z.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return ce===k&&(P||!ge)}),x,a,c);U&&(I=U)}d&&(_==="number"||C!=="auto")&&(B=Cg(O,x,"category"))}else d?I=w1(0,D):s&&s[k]&&s[k].hasStack&&_==="number"?I=h==="expand"?[0,1]:VX(s[k].stackGroups,l,u):I=$X(O,i.filter(function(Z){var J=o in Z.props?Z.props[o]:Z.type.defaultProps[o],ae="hide"in Z.props?Z.props.hide:Z.type.defaultProps.hide;return J===k&&(P||!ae)}),_,c,!0);if(_==="number")I=pk(f,I,k,a,M),G&&(I=NL(G,I,w));else if(_==="category"&&G){var H=G,Y=I.every(function(Z){return H.indexOf(Z)>=0});Y&&(I=H)}}return ue(ue({},v),{},Xe({},k,ue(ue({},y),{},{axisType:a,domain:I,categoricalDomain:B,duplicateDomain:N,originalDomain:(m=y.domain)!==null&&m!==void 0?m:F,isCategorical:d,layout:c})))},{})},PIe=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,h=eT(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),d=h.length,v=FX(c,a),g=-1;return n.reduce(function(m,y){var _=y.type.defaultProps!==void 0?ue(ue({},y.type.defaultProps),y.props):y.props,x=_[o],w=Qq("number");if(!m[x]){g++;var S;return v?S=w1(0,d):s&&s[x]&&s[x].hasStack?(S=VX(s[x].stackGroups,l,u),S=pk(f,S,x,a)):(S=NL(w,$X(h,n.filter(function(C){var M,P,k=o in C.props?C.props[o]:(M=C.type.defaultProps)===null||M===void 0?void 0:M[o],O="hide"in C.props?C.props.hide:(P=C.type.defaultProps)===null||P===void 0?void 0:P.hide;return k===x&&!O}),"number",c),i.defaultProps.allowDataOverflow),S=pk(f,S,x,a)),ue(ue({},m),{},Xe({},x,ue(ue({axisType:a},i.defaultProps),{},{hide:!0,orientation:Ji(SIe,"".concat(a,".").concat(g%2),null),domain:S,originalDomain:w,isCategorical:v,layout:c})))}return m},{})},LIe=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(i,"Id"),h=ea(c,a),d={};return h&&h.length?d=MIe(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(d=PIe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),d},kIe=function(t){var r=fh(t),n=dc(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:aI(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:h1(r,n)}},R$=function(t){var r=t.children,n=t.defaultShowTooltip,i=di(r,Td),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},OIe=function(t){return!t||!t.length?!1:t.some(function(r){var n=ps(r&&r.type);return n&&n.indexOf("Bar")>=0})},j$=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},DIe=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,h=n.margin||{},d=di(f,Td),v=di(f,Zh),g=Object.keys(l).reduce(function(S,C){var M=l[C],P=M.orientation;return!M.mirror&&!M.hide?ue(ue({},S),{},Xe({},P,S[P]+M.width)):S},{left:h.left||0,right:h.right||0}),m=Object.keys(o).reduce(function(S,C){var M=o[C],P=M.orientation;return!M.mirror&&!M.hide?ue(ue({},S),{},Xe({},P,Ji(S,"".concat(P))+M.height)):S},{top:h.top||0,bottom:h.bottom||0}),y=ue(ue({},m),g),_=y.bottom;d&&(y.bottom+=d.props.height||Td.defaultProps.height),v&&r&&(y=s2e(y,i,n,r));var x=u-y.left-y.right,w=c-y.top-y.bottom;return ue(ue({brushBottom:_},y),{},{width:Math.max(x,0),height:Math.max(w,0)})},EIe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Jq=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,h=function(y,_){var x=_.graphicalItems,w=_.stackGroups,S=_.offset,C=_.updateId,M=_.dataStartIndex,P=_.dataEndIndex,k=y.barSize,O=y.layout,D=y.barGap,I=y.barCategoryGap,N=y.maxBarSize,B=j$(O),F=B.numericAxisName,$=B.cateAxisName,G=OIe(x),z=[];return x.forEach(function(U,H){var Y=eT(y.data,{graphicalItems:[U],dataStartIndex:M,dataEndIndex:P}),Z=U.type.defaultProps!==void 0?ue(ue({},U.type.defaultProps),U.props):U.props,J=Z.dataKey,ae=Z.maxBarSize,ce=Z["".concat(F,"Id")],ge=Z["".concat($,"Id")],Fe={},_e=l.reduce(function(Wr,Yn){var Sf=_["".concat(Yn.axisType,"Map")],v0=Z["".concat(Yn.axisType,"Id")];Sf&&Sf[v0]||Yn.axisType==="zAxis"||Wc();var p0=Sf[v0];return ue(ue({},Wr),{},Xe(Xe({},Yn.axisType,p0),"".concat(Yn.axisType,"Ticks"),dc(p0)))},Fe),ne=_e[$],fe=_e["".concat($,"Ticks")],le=w&&w[ce]&&w[ce].hasStack&&b2e(U,w[ce].stackGroups),ee=ps(U.type).indexOf("Bar")>=0,Be=h1(ne,fe),Se=[],ze=G&&a2e({barSize:k,stackGroups:w,totalSize:EIe(_e,$)});if(ee){var Ue,ht,Bt=ft(ae)?N:ae,Jt=(Ue=(ht=h1(ne,fe,!0))!==null&&ht!==void 0?ht:Bt)!==null&&Ue!==void 0?Ue:0;Se=o2e({barGap:D,barCategoryGap:I,bandSize:Jt!==Be?Jt:Be,sizeList:ze[ge],maxBarSize:Bt}),Jt!==Be&&(Se=Se.map(function(Wr){return ue(ue({},Wr),{},{position:ue(ue({},Wr.position),{},{offset:Wr.position.offset-Jt/2})})}))}var On=U&&U.type&&U.type.getComposedData;On&&z.push({props:ue(ue({},On(ue(ue({},_e),{},{displayedData:Y,props:y,dataKey:J,item:U,bandSize:Be,barPosition:Se,offset:S,stackedData:le,layout:O,dataStartIndex:M,dataEndIndex:P}))),{},Xe(Xe(Xe({key:U.key||"item-".concat(H)},F,_e[F]),$,_e[$]),"animationId",C)),childIndex:nve(U,y.children),item:U})}),z},d=function(y,_){var x=y.props,w=y.dataStartIndex,S=y.dataEndIndex,C=y.updateId;if(!cz({props:x}))return null;var M=x.children,P=x.layout,k=x.stackOffset,O=x.data,D=x.reverseStackOrder,I=j$(P),N=I.numericAxisName,B=I.cateAxisName,F=ea(M,n),$=y2e(O,F,"".concat(N,"Id"),"".concat(B,"Id"),k,D),G=l.reduce(function(Z,J){var ae="".concat(J.axisType,"Map");return ue(ue({},Z),{},Xe({},ae,LIe(x,ue(ue({},J),{},{graphicalItems:F,stackGroups:J.axisType===N&&$,dataStartIndex:w,dataEndIndex:S}))))},{}),z=DIe(ue(ue({},G),{},{props:x,graphicalItems:F}),_==null?void 0:_.legendBBox);Object.keys(G).forEach(function(Z){G[Z]=c(x,G[Z],z,Z.replace("Map",""),r)});var U=G["".concat(B,"Map")],H=kIe(U),Y=h(x,ue(ue({},G),{},{dataStartIndex:w,dataEndIndex:S,updateId:C,graphicalItems:F,stackGroups:$,offset:z}));return ue(ue({formattedGraphicalItems:Y,graphicalItems:F,offset:z,stackGroups:$},H),G)},v=function(m){function y(_){var x,w,S;return hIe(this,y),S=pIe(this,y,[_]),Xe(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Xe(S,"accessibilityManager",new QEe),Xe(S,"handleLegendBBoxUpdate",function(C){if(C){var M=S.state,P=M.dataStartIndex,k=M.dataEndIndex,O=M.updateId;S.setState(ue({legendBBox:C},d({props:S.props,dataStartIndex:P,dataEndIndex:k,updateId:O},ue(ue({},S.state),{},{legendBBox:C}))))}}),Xe(S,"handleReceiveSyncEvent",function(C,M,P){if(S.props.syncId===C){if(P===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(M)}}),Xe(S,"handleBrushChange",function(C){var M=C.startIndex,P=C.endIndex;if(M!==S.state.dataStartIndex||P!==S.state.dataEndIndex){var k=S.state.updateId;S.setState(function(){return ue({dataStartIndex:M,dataEndIndex:P},d({props:S.props,dataStartIndex:M,dataEndIndex:P,updateId:k},S.state))}),S.triggerSyncEvent({dataStartIndex:M,dataEndIndex:P})}}),Xe(S,"handleMouseEnter",function(C){var M=S.getMouseInfo(C);if(M){var P=ue(ue({},M),{},{isTooltipActive:!0});S.setState(P),S.triggerSyncEvent(P);var k=S.props.onMouseEnter;ut(k)&&k(P,C)}}),Xe(S,"triggeredAfterMouseMove",function(C){var M=S.getMouseInfo(C),P=M?ue(ue({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(P),S.triggerSyncEvent(P);var k=S.props.onMouseMove;ut(k)&&k(P,C)}),Xe(S,"handleItemMouseEnter",function(C){S.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),Xe(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),Xe(S,"handleMouseMove",function(C){C.persist(),S.throttleTriggeredAfterMouseMove(C)}),Xe(S,"handleMouseLeave",function(C){S.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};S.setState(M),S.triggerSyncEvent(M);var P=S.props.onMouseLeave;ut(P)&&P(M,C)}),Xe(S,"handleOuterEvent",function(C){var M=rve(C),P=Ji(S.props,"".concat(M));if(M&&ut(P)){var k,O;/.*touch.*/i.test(M)?O=S.getMouseInfo(C.changedTouches[0]):O=S.getMouseInfo(C),P((k=O)!==null&&k!==void 0?k:{},C)}}),Xe(S,"handleClick",function(C){var M=S.getMouseInfo(C);if(M){var P=ue(ue({},M),{},{isTooltipActive:!0});S.setState(P),S.triggerSyncEvent(P);var k=S.props.onClick;ut(k)&&k(P,C)}}),Xe(S,"handleMouseDown",function(C){var M=S.props.onMouseDown;if(ut(M)){var P=S.getMouseInfo(C);M(P,C)}}),Xe(S,"handleMouseUp",function(C){var M=S.props.onMouseUp;if(ut(M)){var P=S.getMouseInfo(C);M(P,C)}}),Xe(S,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),Xe(S,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&S.handleMouseDown(C.changedTouches[0])}),Xe(S,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&S.handleMouseUp(C.changedTouches[0])}),Xe(S,"handleDoubleClick",function(C){var M=S.props.onDoubleClick;if(ut(M)){var P=S.getMouseInfo(C);M(P,C)}}),Xe(S,"handleContextMenu",function(C){var M=S.props.onContextMenu;if(ut(M)){var P=S.getMouseInfo(C);M(P,C)}}),Xe(S,"triggerSyncEvent",function(C){S.props.syncId!==void 0&&xA.emit(bA,S.props.syncId,C,S.eventEmitterSymbol)}),Xe(S,"applySyncEvent",function(C){var M=S.props,P=M.layout,k=M.syncMethod,O=S.state.updateId,D=C.dataStartIndex,I=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)S.setState(ue({dataStartIndex:D,dataEndIndex:I},d({props:S.props,dataStartIndex:D,dataEndIndex:I,updateId:O},S.state)));else if(C.activeTooltipIndex!==void 0){var N=C.chartX,B=C.chartY,F=C.activeTooltipIndex,$=S.state,G=$.offset,z=$.tooltipTicks;if(!G)return;if(typeof k=="function")F=k(z,C);else if(k==="value"){F=-1;for(var U=0;U=0){var le,ee;if(N.dataKey&&!N.allowDuplicatedCategory){var Be=typeof N.dataKey=="function"?fe:"payload.".concat(N.dataKey.toString());le=Ib(U,Be,F),ee=H&&Y&&Ib(Y,Be,F)}else le=U==null?void 0:U[B],ee=H&&Y&&Y[B];if(ge||ce){var Se=C.props.activeIndex!==void 0?C.props.activeIndex:B;return[W.cloneElement(C,ue(ue(ue({},k.props),_e),{},{activeIndex:Se})),null,null]}if(!ft(le))return[ne].concat(Nd(S.renderActivePoints({item:k,activePoint:le,basePoint:ee,childIndex:B,isRange:H})))}else{var ze,Ue=(ze=S.getItemByXY(S.state.activeCoordinate))!==null&&ze!==void 0?ze:{graphicalItem:ne},ht=Ue.graphicalItem,Bt=ht.item,Jt=Bt===void 0?C:Bt,On=ht.childIndex,Wr=ue(ue(ue({},k.props),_e),{},{activeIndex:On});return[W.cloneElement(Jt,Wr),null,null]}return H?[ne,null,null]:[ne,null]}),Xe(S,"renderCustomized",function(C,M,P){return W.cloneElement(C,ue(ue({key:"recharts-customized-".concat(P)},S.props),S.state))}),Xe(S,"renderMap",{CartesianGrid:{handler:c_,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:c_},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:c_},YAxis:{handler:c_},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((x=_.id)!==null&&x!==void 0?x:uv("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=jY(S.triggeredAfterMouseMove,(w=_.throttleDelay)!==null&&w!==void 0?w:1e3/60),S.state={},S}return yIe(y,m),vIe(y,[{key:"componentDidMount",value:function(){var x,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,w=x.children,S=x.data,C=x.height,M=x.layout,P=di(w,es);if(P){var k=P.props.defaultIndex;if(!(typeof k!="number"||k<0||k>this.state.tooltipTicks.length-1)){var O=this.state.tooltipTicks[k]&&this.state.tooltipTicks[k].value,D=yk(this.state,S,k,O),I=this.state.tooltipTicks[k].coordinate,N=(this.state.offset.top+C)/2,B=M==="horizontal",F=B?{x:I,y:N}:{y:I,x:N},$=this.state.formattedGraphicalItems.find(function(z){var U=z.item;return U.type.name==="Scatter"});$&&(F=ue(ue({},F),$.props.points[k].tooltipPosition),D=$.props.points[k].tooltipPayload);var G={activeTooltipIndex:k,isTooltipActive:!0,activeLabel:O,activePayload:D,activeCoordinate:F};this.setState(G),this.renderCursor(P),this.accessibilityManager.setIndex(k)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var S,C;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(x){qP([di(x.children,es)],[di(this.props.children,es)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=di(this.props.children,es);if(x&&typeof x.props.shared=="boolean"){var w=x.props.shared?"axis":"item";return s.indexOf(w)>=0?w:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var w=this.container,S=w.getBoundingClientRect(),C=kwe(S),M={chartX:Math.round(x.pageX-C.left),chartY:Math.round(x.pageY-C.top)},P=S.width/w.offsetWidth||1,k=this.inRange(M.chartX,M.chartY,P);if(!k)return null;var O=this.state,D=O.xAxisMap,I=O.yAxisMap,N=this.getTooltipEventType(),B=N$(this.state,this.props.data,this.props.layout,k);if(N!=="axis"&&D&&I){var F=fh(D).scale,$=fh(I).scale,G=F&&F.invert?F.invert(M.chartX):null,z=$&&$.invert?$.invert(M.chartY):null;return ue(ue({},M),{},{xValue:G,yValue:z},B)}return B?ue(ue({},M),B):null}},{key:"inRange",value:function(x,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,M=x/S,P=w/S;if(C==="horizontal"||C==="vertical"){var k=this.state.offset,O=M>=k.left&&M<=k.left+k.width&&P>=k.top&&P<=k.top+k.height;return O?{x:M,y:P}:null}var D=this.state,I=D.angleAxisMap,N=D.radiusAxisMap;if(I&&N){var B=fh(I);return _4({x:M,y:P},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,w=this.getTooltipEventType(),S=di(x,es),C={};S&&w==="axis"&&(S.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var M=Nb(this.props,this.handleOuterEvent);return ue(ue({},M),C)}},{key:"addListener",value:function(){xA.on(bA,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){xA.removeListener(bA,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,w,S){for(var C=this.state.formattedGraphicalItems,M=0,P=C.length;Ms>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(t),a=2*Math.PI*45,o=t/100*a;return T.jsx("div",{className:"flex flex-col items-center",children:T.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[T.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),T.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),T.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:t.toFixed(1)}),T.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function f_({label:e,value:t}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:e}),T.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:T.jsx("div",{className:`h-full ${r(t)} transition-all duration-300`,style:{width:`${t}%`}})}),T.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:t.toFixed(1)})]})}function jIe({alert:e}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:Ry,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:Ps,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:hm,iconColor:"text-green-500"}}})(e.severity),n=r.icon;return T.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[T.jsx(n,{size:16,className:r.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"text-sm text-slate-200",children:e.message}),T.jsx("div",{className:"text-xs text-slate-500 mt-1",children:e.timestamp||"Just now"})]})]})}function BIe({source:e}){const t=()=>e.is_loaded?e.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return T.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${t()}`}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"text-sm text-slate-200 truncate",children:e.name}),T.jsxs("div",{className:"text-xs text-slate-500",children:[e.node_count," nodes · ",e.type]})]})]})}function h_({icon:e,label:t,value:r,subvalue:n}){return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[T.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[T.jsx(e,{size:14}),T.jsx("span",{className:"text-xs",children:t})]}),T.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&T.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function SA({label:e,value:t}){const r=()=>t===0?"bg-green-500/20 text-green-400 border-green-500/50":t<=2?"bg-amber-500/20 text-amber-400 border-amber-500/50":"bg-red-500/20 text-red-400 border-red-500/50";return T.jsxs("span",{className:`px-2 py-1 rounded text-xs font-mono font-medium border ${r()}`,children:[e,t]})}function B$({label:e,value:t,unit:r,getColor:n}){const i=t!==void 0?n(t):"text-slate-400";return T.jsxs("div",{className:"text-center",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:e}),T.jsx("div",{className:`font-mono text-3xl font-bold ${i}`,children:(t==null?void 0:t.toFixed(0))??"—"}),r&&T.jsx("div",{className:"text-xs text-slate-500",children:r})]})}function zIe({history:e}){var a;const t=W.useMemo(()=>!e||e.length===0?[]:e.slice(-16).map((o,s)=>({idx:s,value:o.value,time:o.time})),[e]);if(t.length===0)return null;const r=Math.max(...t.map(o=>o.value),5),n=((a=t[t.length-1])==null?void 0:a.value)??0,i=()=>r>5?"kpGradientRed":r>3?"kpGradientAmber":"kpGradientGreen";return T.jsxs("div",{className:"h-20 w-full",children:[T.jsx(BY,{width:"100%",height:"100%",children:T.jsxs(NIe,{data:t,margin:{top:5,right:5,bottom:5,left:5},children:[T.jsxs("defs",{children:[T.jsxs("linearGradient",{id:"kpGradientGreen",x1:"0",y1:"0",x2:"0",y2:"1",children:[T.jsx("stop",{offset:"0%",stopColor:"#22c55e",stopOpacity:.4}),T.jsx("stop",{offset:"100%",stopColor:"#22c55e",stopOpacity:.05})]}),T.jsxs("linearGradient",{id:"kpGradientAmber",x1:"0",y1:"0",x2:"0",y2:"1",children:[T.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:.4}),T.jsx("stop",{offset:"100%",stopColor:"#f59e0b",stopOpacity:.05})]}),T.jsxs("linearGradient",{id:"kpGradientRed",x1:"0",y1:"0",x2:"0",y2:"1",children:[T.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:.4}),T.jsx("stop",{offset:"100%",stopColor:"#ef4444",stopOpacity:.05})]})]}),T.jsx(yv,{domain:[0,Math.ceil(r)],hide:!0}),T.jsx(mv,{dataKey:"idx",hide:!0}),T.jsx(Um,{y:3,stroke:"#f59e0b",strokeDasharray:"3 3",strokeOpacity:.5}),T.jsx(Um,{y:5,stroke:"#ef4444",strokeDasharray:"3 3",strokeOpacity:.5}),T.jsx(ou,{type:"monotone",dataKey:"value",stroke:n>5?"#ef4444":n>3?"#f59e0b":"#22c55e",fill:`url(#${i()})`,strokeWidth:2})]})}),T.jsxs("div",{className:"flex justify-between text-xs text-slate-600 px-1",children:[T.jsx("span",{children:"48h ago"}),T.jsx("span",{children:"now"})]})]})}function $Ie({profile:e}){const t=W.useMemo(()=>!e||e.length===0?[]:[...e].sort((r,n)=>r.height_m-n.height_m).map(r=>({height:r.height_m,M:r.M})),[e]);return t.length===0?null:T.jsxs("div",{className:"h-24 w-full",children:[T.jsx(BY,{width:"100%",height:"100%",children:T.jsxs(IIe,{data:t,margin:{top:5,right:10,bottom:5,left:5},children:[T.jsx(mv,{dataKey:"M",type:"number",domain:["dataMin - 20","dataMax + 20"],tick:{fontSize:10,fill:"#64748b"},tickLine:!1,axisLine:{stroke:"#334155"}}),T.jsx(yv,{dataKey:"height",type:"number",domain:[0,"dataMax"],tick:{fontSize:10,fill:"#64748b"},tickLine:!1,axisLine:{stroke:"#334155"},tickFormatter:r=>`${(r/1e3).toFixed(1)}k`}),T.jsx(Wy,{type:"monotone",dataKey:"M",stroke:"#3b82f6",strokeWidth:2,dot:{r:3,fill:"#3b82f6"}})]})}),T.jsx("div",{className:"text-center text-xs text-slate-600",children:"M-units vs Height (km)"})]})}function FIe({swpc:e,ducting:t}){const r=a=>a>=120?"text-green-400":a>=80?"text-amber-400":"text-red-400",n=a=>a<=3?"text-green-400":a<=5?"text-amber-400":"text-red-400",i=a=>{if(!a)return null;const o={normal:"bg-green-500/20 text-green-400 border-green-500/50",super_refraction:"bg-amber-500/20 text-amber-400 border-amber-500/50",surface_duct:"bg-blue-500/20 text-blue-400 border-blue-500/50",elevated_duct:"bg-blue-500/20 text-blue-400 border-blue-500/50"},s={normal:"Normal",super_refraction:"Super Refraction",surface_duct:"Surface Duct",elevated_duct:"Elevated Duct"};return T.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium border ${o[a]||o.normal}`,children:s[a]||a})};return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4 flex flex-col h-full",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(dm,{size:14}),"RF Propagation"]}),T.jsxs("div",{className:"flex justify-around mb-4",children:[T.jsx(B$,{label:"SFI",value:e==null?void 0:e.sfi,getColor:r}),T.jsx("div",{className:"w-px bg-border"}),T.jsx(B$,{label:"Kp",value:e==null?void 0:e.kp_current,getColor:n})]}),T.jsxs("div",{className:"flex justify-center gap-2 mb-4",children:[T.jsx(SA,{label:"R",value:(e==null?void 0:e.r_scale)??0}),T.jsx(SA,{label:"S",value:(e==null?void 0:e.s_scale)??0}),T.jsx(SA,{label:"G",value:(e==null?void 0:e.g_scale)??0})]}),(e==null?void 0:e.kp_history)&&e.kp_history.length>0&&T.jsxs("div",{className:"mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Kp Trend (48h)"}),T.jsx(zIe,{history:e.kp_history})]}),T.jsx("div",{className:"border-t border-border my-3"}),T.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[T.jsx($c,{size:14,className:"text-slate-400"}),T.jsx("span",{className:"text-xs text-slate-500",children:"Tropospheric"}),i(t==null?void 0:t.condition)]}),(t==null?void 0:t.min_gradient)!==void 0&&T.jsxs("div",{className:"text-xs text-slate-400 font-mono mb-2",children:["dM/dz: ",t.min_gradient.toFixed(1)," M-units/km"]}),(t==null?void 0:t.profile)&&t.profile.length>0&&T.jsx($Ie,{profile:t.profile}),(e==null?void 0:e.active_warnings)&&e.active_warnings.length>0&&T.jsxs("div",{className:"mt-auto pt-3 border-t border-border",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"SWPC Alerts"}),T.jsx("div",{className:"flex flex-wrap gap-1",children:e.active_warnings.slice(0,3).map((a,o)=>T.jsx("span",{className:"px-2 py-0.5 rounded text-xs bg-amber-500/20 text-amber-400 border border-amber-500/30 truncate max-w-full",children:a.replace("Space Weather Message Code: ","")},o))})]})]})}const VIe={nws:{icon:$c,color:"text-blue-400",label:"NWS"},swpc:{icon:ZP,color:"text-yellow-400",label:"SWPC"},ducting:{icon:Fc,color:"text-cyan-400",label:"Tropo"},nifc:{icon:iZ,color:"text-orange-400",label:"NIFC"},firms:{icon:cZ,color:"text-red-400",label:"FIRMS"},avalanche:{icon:sZ,color:"text-slate-300",label:"Avy"},usgs:{icon:rZ,color:"text-blue-300",label:"USGS"},traffic:{icon:eZ,color:"text-purple-400",label:"Traffic"},roads:{icon:Rue,color:"text-amber-400",label:"511"}},z$={info:"bg-blue-500/20 text-blue-400 border-blue-500/30",advisory:"bg-amber-500/20 text-amber-400 border-amber-500/30",moderate:"bg-amber-500/20 text-amber-400 border-amber-500/30",watch:"bg-orange-500/20 text-orange-400 border-orange-500/30",warning:"bg-red-500/20 text-red-400 border-red-500/30",critical:"bg-red-600/20 text-red-300 border-red-600/30",emergency:"bg-red-700/20 text-red-200 border-red-700/30"};function GIe({event:e}){var a;const t=VIe[e.source]||{icon:hm,color:"text-slate-400",label:e.source},r=t.icon,n=z$[(a=e.severity)==null?void 0:a.toLowerCase()]||z$.info,i=o=>{const s=new Date(o*1e3),u=new Date().getTime()-s.getTime(),c=Math.floor(u/6e4);return c<1?"just now":c<60?`${c}m ago`:c<1440?`${Math.floor(c/60)}h ago`:s.toLocaleDateString(void 0,{month:"short",day:"numeric"})};return T.jsxs("div",{className:"flex items-start gap-2 py-2 border-b border-border/50 last:border-0",children:[T.jsx(r,{size:14,className:`mt-0.5 flex-shrink-0 ${t.color}`}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[T.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs border ${n}`,children:e.severity||"info"}),T.jsx("span",{className:"text-xs text-slate-500",children:t.label}),T.jsx("span",{className:"text-xs text-slate-600 ml-auto",children:i(e.fetched_at)})]}),T.jsx("div",{className:"text-sm text-slate-200 truncate",children:e.headline})]})]})}function HIe({events:e,envStatus:t}){const r=W.useMemo(()=>[...e].sort((i,a)=>(a.fetched_at||0)-(i.fetched_at||0)),[e]),n=W.useMemo(()=>{if(!(t!=null&&t.feeds))return null;const i=t.feeds.length,a=t.feeds.filter(u=>u.is_loaded&&!u.last_error).length,o=t.feeds.filter(u=>u.last_error).map(u=>u.source),s=Math.max(...t.feeds.map(u=>u.last_fetch||0)),l=s?Math.floor(Date.now()/1e3-s):null;return{total:i,active:a,errors:o,secAgo:l}},[t]);return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4 flex flex-col h-full",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[T.jsx(hS,{size:14}),"Live Event Feed"]}),r.length>0?T.jsx("div",{className:"flex-1 overflow-y-auto max-h-80 pr-1 -mr-1",children:r.map((i,a)=>T.jsx(GIe,{event:i},i.event_id||a))}):T.jsx("div",{className:"flex-1 flex items-center justify-center",children:T.jsxs("div",{className:"text-center py-8",children:[T.jsx(Wh,{size:24,className:"text-green-500 mx-auto mb-2"}),T.jsx("div",{className:"text-slate-400",children:"No active events"}),T.jsx("div",{className:"text-xs text-slate-500",children:"All clear"})]})}),n&&T.jsxs("div",{className:`text-xs mt-3 pt-3 border-t border-border ${n.errors.length>0?"text-amber-400":"text-slate-500"}`,children:[n.active," of ",n.total," feeds active",n.secAgo!==null&&` · Last update ${n.secAgo}s ago`,n.errors.length>0&&T.jsxs("span",{className:"text-amber-400",children:[" · ",n.errors.join(", "),": error"]})]})]})}function WIe(){var w,S,C,M,P;const[e,t]=W.useState(null),[r,n]=W.useState([]),[i,a]=W.useState([]),[o,s]=W.useState(null),[l,u]=W.useState([]),[c,f]=W.useState(null),[h,d]=W.useState(null),[v,g]=W.useState(!0),[m,y]=W.useState(null),{lastHealth:_,lastMessage:x}=IE();return W.useEffect(()=>{Promise.all([Yue(),Kue(),pZ(),gZ(),mZ().catch(()=>[]),yZ().catch(()=>null),_Z().catch(()=>null)]).then(([k,O,D,I,N,B,F])=>{t(k),n(O),a(D),s(I),u(N),f(B),d(F),g(!1),document.title="Dashboard — MeshAI"}).catch(k=>{y(k.message),g(!1),document.title="Dashboard — MeshAI"})},[]),W.useEffect(()=>{_&&t(_)},[_]),W.useEffect(()=>{(x==null?void 0:x.type)==="env_update"&&x.event&&u(k=>{const O=x.event,D=k.filter(I=>I.event_id!==O.event_id);return[O,...D].slice(0,100)})},[x]),v?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading..."})}):m?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",m]})}):T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),e&&T.jsxs(T.Fragment,{children:[T.jsx(RIe,{health:e}),T.jsxs("div",{className:"mt-6 space-y-3",children:[T.jsx(f_,{label:"Infrastructure",value:((w=e.pillars)==null?void 0:w.infrastructure)??0}),T.jsx(f_,{label:"Utilization",value:((S=e.pillars)==null?void 0:S.utilization)??0}),T.jsx(f_,{label:"Behavior",value:((C=e.pillars)==null?void 0:C.behavior)??0}),T.jsx(f_,{label:"Power",value:((M=e.pillars)==null?void 0:M.power)??0})]})]})]}),T.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?T.jsx("div",{className:"space-y-3 max-h-48 overflow-y-auto",children:i.map((k,O)=>T.jsx(jIe,{alert:k},O))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(Wh,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No active alerts"})]})]}),T.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[T.jsx(h_,{icon:Fc,label:"Nodes Online",value:(e==null?void 0:e.total_nodes)||0,subvalue:`${(e==null?void 0:e.unlocated_count)||0} unlocated`}),T.jsx(h_,{icon:tZ,label:"Infrastructure",value:`${(e==null?void 0:e.infra_online)||0}/${(e==null?void 0:e.infra_total)||0}`,subvalue:(e==null?void 0:e.infra_online)===(e==null?void 0:e.infra_total)?"All online":"Some offline"}),T.jsx(h_,{icon:hS,label:"Utilization",value:`${((P=e==null?void 0:e.util_percent)==null?void 0:P.toFixed(1))||0}%`,subvalue:`${(e==null?void 0:e.flagged_nodes)||0} flagged`}),T.jsx(h_,{icon:oZ,label:"Regions",value:(e==null?void 0:e.total_regions)||0,subvalue:`${(e==null?void 0:e.battery_warnings)||0} battery warnings`})]})]})]}),T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?T.jsx("div",{className:"space-y-2",children:r.map((k,O)=>T.jsx(BIe,{source:k},O))}):T.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),T.jsx(FIe,{swpc:c,ducting:h}),T.jsx(HIe,{events:l,envStatus:o})]})]})}/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var _k=function(e,t){return _k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},_k(e,t)};function q(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");_k(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Pg=function(){return Pg=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]"u"&&typeof self<"u"?tt.worker=!0:!tt.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(tt.node=!0,tt.svgSupported=!0):XIe(navigator.userAgent,tt);function XIe(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}}var RI=12,eK="sans-serif",Ds=RI+"px "+eK,qIe=20,KIe=100,QIe="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function JIe(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return t.clearMarkers=function(){j(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function SNe(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),f=2*u,h=c.left,d=c.top;o.push(h,d),l=l&&a&&h===a[f]&&d===a[f+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=r?G$(s,o):G$(o,s))}function cK(e){return e.nodeName.toUpperCase()==="CANVAS"}var TNe=/([&<>"'])/g,CNe={"&":"&","<":"<",">":">",'"':""","'":"'"};function Mn(e){return e==null?"":(e+"").replace(TNe,function(t,r){return CNe[r]})}var ANe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,CA=[],MNe=tt.browser.firefox&&+tt.browser.version.split(".")[0]<39;function Tk(e,t,r,n){return r=r||{},n?H$(e,t,r):MNe&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):H$(e,t,r),r}function H$(e,t,r){if(tt.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(cK(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Sk(CA,e,n,i)){r.zrX=CA[0],r.zrY=CA[1];return}}r.zrX=r.zrY=0}function GI(e){return e||window.event}function Fi(e,t,r){if(t=GI(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Tk(e,o,t,r)}else{Tk(e,t,t,r);var a=PNe(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&ANe.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function PNe(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function Ck(e,t,r,n){e.addEventListener(t,r,n)}function LNe(e,t,r,n){e.removeEventListener(t,r,n)}var Es=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function W$(e){return e.which===2||e.which===3}var kNe=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o1&&n&&n.length>1){var a=U$(n)/U$(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=ONe(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function zr(){return[1,0,0,1,0,0]}function Xy(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function qy(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Na(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function $a(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function Hs(e,t,r,n){n===void 0&&(n=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(r),f=Math.cos(r);return e[0]=i*f+s*c,e[1]=-i*c+s*f,e[2]=a*f+l*c,e[3]=-a*c+f*l,e[4]=f*(o-n[0])+c*(u-n[1])+n[0],e[5]=f*(u-n[1])-c*(o-n[0])+n[1],e}function oT(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function sa(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null}function fK(e){var t=zr();return qy(t,e),t}const DNe=Object.freeze(Object.defineProperty({__proto__:null,clone:fK,copy:qy,create:zr,identity:Xy,invert:sa,mul:Na,rotate:Hs,scale:oT,translate:$a},Symbol.toStringTag,{value:"Module"}));var ke=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e}(),pc=Math.min,Oh=Math.max,Ak=Math.abs,Z$=["x","y"],ENe=["width","height"],_u=new ke,xu=new ke,bu=new ke,wu=new ke,pi=hK(),tg=pi.minTv,Mk=pi.maxTv,Dg=[0,0],Oe=function(){function e(t,r,n,i){e.set(this,t,r,n,i)}return e.set=function(t,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),t.x=r,t.y=n,t.width=i,t.height=a,t},e.prototype.union=function(t){var r=pc(t.x,this.x),n=pc(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Oh(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Oh(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,n=t.width/r.width,i=t.height/r.height,a=zr();return $a(a,a,[-r.x,-r.y]),oT(a,a,[n,i]),$a(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r,n){return e.intersect(this,t,r,n)},e.intersect=function(t,r,n,i){n&&ke.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!r)return!1;t instanceof e||(t=e.set(INe,t.x,t.y,t.width,t.height)),r instanceof e||(r=e.set(NNe,r.x,r.y,r.width,r.height));var s=!!n;pi.reset(i,s);var l=pi.touchThreshold,u=t.x+l,c=t.x+t.width-l,f=t.y+l,h=t.y+t.height-l,d=r.x+l,v=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||f>h||d>v||g>m)return!1;var y=!(c=t.x&&r<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},e.prototype.contain=function(t,r){return e.contain(this,t,r)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,r){return t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height,t},e.applyTransform=function(t,r,n){if(!n){t!==r&&e.copy(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=r.x*i+o,t.y=r.y*a+s,t.width=r.width*i,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}_u.x=bu.x=r.x,_u.y=wu.y=r.y,xu.x=wu.x=r.x+r.width,xu.y=bu.y=r.y+r.height,_u.transform(n),wu.transform(n),xu.transform(n),bu.transform(n),t.x=pc(_u.x,xu.x,bu.x,wu.x),t.y=pc(_u.y,xu.y,bu.y,wu.y);var l=Oh(_u.x,xu.x,bu.x,wu.x),u=Oh(_u.y,xu.y,bu.y,wu.y);t.width=l-t.x,t.height=u-t.y},e}(),INe=new Oe(0,0,0,0),NNe=new Oe(0,0,0,0);function Y$(e,t,r,n,i,a,o,s){var l=Ak(t-r),u=Ak(n-e),c=pc(l,u),f=Z$[i],h=Z$[1-i],d=ENe[i];t=u||!pi.bidirectional)&&(tg[f]=-u,tg[h]=0,pi.useDir&&pi.calcDirMTV())))}function hK(){var e=0,t=new ke,r=new ke,n={minTv:new ke,maxTv:new ke,useDir:!1,dirMinTv:new ke,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=Oh(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),e=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(e),u=Math.cos(e),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||t.dot(r)>0)&&r.len()=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(MA.copy(h.getBoundingRect()),h.transform&&MA.applyTransform(h.transform),MA.intersect(c)&&s.push(h))}if(s.length)for(var d=4,v=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function $Ne(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?dK:!0}return!1}function X$(e,t,r,n,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=$Ne(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==dK)){t.target=o;break}}}function pK(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var gK=32,yp=7;function FNe(e){for(var t=0;e>=gK;)t|=e&1,e>>=1;return e+t}function q$(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function VNe(e,t,r){for(r--;t>>1,i(a,e[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=a}}function PA(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(e,t[r+c])>0?o=c+1:l=c}return l}function LA(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(e,t[r+c])<0?l=c:o=c+1}return l}function GNe(e,t){var r=yp,n,i,a=0,o=[];n=[],i=[];function s(d,v){n[a]=d,i[a]=v,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]=yp||M>=yp);if(P)break;S<0&&(S=0),S+=2}if(r=S,r<1&&(r=1),v===1){for(y=0;y=0;y--)e[C+y]=e[S+y];e[w]=o[x];return}for(var M=r;;){var P=0,k=0,O=!1;do if(t(o[x],e[_])<0){if(e[w--]=e[_--],P++,k=0,--v===0){O=!0;break}}else if(e[w--]=o[x--],k++,P=0,--m===1){O=!0;break}while((P|k)=0;y--)e[C+y]=e[S+y];if(v===0){O=!0;break}}if(e[w--]=o[x--],--m===1){O=!0;break}if(k=m-PA(e[_],o,0,m,m-1,t),k!==0){for(w-=k,x-=k,m-=k,C=w+1,S=x+1,y=0;y=yp||k>=yp);if(O)break;M<0&&(M=0),M+=2}if(r=M,r<1&&(r=1),m===1){for(w-=v,_-=v,C=w+1,S=_+1,y=v-1;y>=0;y--)e[C+y]=e[S+y];e[w]=o[x]}else{if(m===0)throw new Error;for(S=w-(m-1),y=0;ys&&(l=s),K$(e,r,r+l,r+a,t),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var mi=1,rg=2,hh=4,Q$=!1;function kA(){Q$||(Q$=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function J$(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var HNe=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=J$}return e.prototype.traverse=function(t,r){for(var n=0;n=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),F1;F1=tt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Eg={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Eg.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Eg.bounceIn(e*2)*.5:Eg.bounceOut(e*2-1)*.5+.5}},v_=Math.pow,jl=Math.sqrt,V1=1e-8,mK=1e-4,eF=jl(3),p_=1/3,uo=lu(),Zi=lu(),Qh=lu();function xl(e){return e>-V1&&eV1||e<-V1}function Nr(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function tF(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function G1(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),l=3*(t-e),u=e-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,d=0;if(xl(c)&&xl(f))if(xl(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[d++]=v)}else{var g=f*f-4*c*h;if(xl(g)){var m=f/c,v=-s/o+m,y=-m/2;v>=0&&v<=1&&(a[d++]=v),y>=0&&y<=1&&(a[d++]=y)}else if(g>0){var _=jl(g),x=c*s+1.5*o*(-f+_),w=c*s+1.5*o*(-f-_);x<0?x=-v_(-x,p_):x=v_(x,p_),w<0?w=-v_(-w,p_):w=v_(w,p_);var v=(-s-(x+w))/(3*o);v>=0&&v<=1&&(a[d++]=v)}else{var S=(2*c*s-3*o*f)/(2*jl(c*c*c)),C=Math.acos(S)/3,M=jl(c),P=Math.cos(C),v=(-s-2*M*P)/(3*o),y=(-s+M*(P+eF*Math.sin(C)))/(3*o),k=(-s+M*(P-eF*Math.sin(C)))/(3*o);v>=0&&v<=1&&(a[d++]=v),y>=0&&y<=1&&(a[d++]=y),k>=0&&k<=1&&(a[d++]=k)}}return d}function _K(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(xl(o)){if(yK(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(xl(c))i[0]=-a/(2*o);else if(c>0){var f=jl(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function Zl(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=e,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function xK(e,t,r,n,i,a,o,s,l,u,c){var f,h=.005,d=1/0,v,g,m,y;uo[0]=l,uo[1]=u;for(var _=0;_<1;_+=.05)Zi[0]=Nr(e,r,i,o,_),Zi[1]=Nr(t,n,a,s,_),m=Rl(uo,Zi),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(xl(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=jl(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function bK(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function Qm(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function wK(e,t,r,n,i,a,o,s,l){var u,c=.005,f=1/0;uo[0]=o,uo[1]=s;for(var h=0;h<1;h+=.05){Zi[0]=Kr(e,r,i,h),Zi[1]=Kr(t,n,a,h);var d=Rl(uo,Zi);d=0&&d=1?1:G1(0,n,a,1,l,s)&&Nr(0,i,o,1,s[0])}}}var XNe=function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||nr,this.ondestroy=t.ondestroy||nr,this.onrestart=t.onrestart||nr,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Te(t)?t:Eg[t]||HI(t)},e}(),SK=function(){function e(t){this.value=t}return e}(),qNe=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new SK(t);return this.insertEntry(r),r},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),jd=function(){function e(t){this._list=new qNe,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new SK(r),s.key=t,n.insertEntry(s),i[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),rF={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ra(e){return e=Math.round(e),e<0?0:e>255?255:e}function KNe(e){return e=Math.round(e),e<0?0:e>360?360:e}function Jm(e){return e<0?0:e>1?1:e}function Fx(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Ra(parseFloat(t)/100*255):Ra(parseInt(t,10))}function ys(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Jm(parseFloat(t)/100):Jm(parseFloat(t))}function OA(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function bl(e,t,r){return e+(t-e)*r}function $i(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function Lk(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var TK=new jd(20),g_=null;function Bf(e,t){g_&&Lk(g_,t),g_=TK.put(e,g_||t.slice())}function Pn(e,t){if(e){t=t||[];var r=TK.get(e);if(r)return Lk(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in rF)return Lk(t,rF[n]),Bf(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){$i(t,0,0,0,1);return}return $i(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Bf(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){$i(t,0,0,0,1);return}return $i(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Bf(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?$i(t,+u[0],+u[1],+u[2],1):$i(t,0,0,0,1);c=ys(u.pop());case"rgb":if(u.length>=3)return $i(t,Fx(u[0]),Fx(u[1]),Fx(u[2]),u.length===3?c:ys(u[3])),Bf(e,t),t;$i(t,0,0,0,1);return;case"hsla":if(u.length!==4){$i(t,0,0,0,1);return}return u[3]=ys(u[3]),kk(u,t),Bf(e,t),t;case"hsl":if(u.length!==3){$i(t,0,0,0,1);return}return kk(u,t),Bf(e,t),t;default:return}}$i(t,0,0,0,1)}}function kk(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=ys(e[1]),i=ys(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],$i(t,Ra(OA(o,a,r+1/3)*255),Ra(OA(o,a,r)*255),Ra(OA(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function QNe(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-t)/6+o/2)/o,f=((a-r)/6+o/2)/o,h=((a-n)/6+o/2)/o;t===a?l=h-f:r===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return e[3]!=null&&d.push(e[3]),d}}function H1(e,t){var r=Pn(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return ta(r,r.length===4?"rgba":"rgb")}}function JNe(e){var t=Pn(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Ig(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){r=r||[];var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=t[i],s=t[a],l=n-i;return r[0]=Ra(bl(o[0],s[0],l)),r[1]=Ra(bl(o[1],s[1],l)),r[2]=Ra(bl(o[2],s[2],l)),r[3]=Jm(bl(o[3],s[3],l)),r}}var eRe=Ig;function WI(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=Pn(t[i]),s=Pn(t[a]),l=n-i,u=ta([Ra(bl(o[0],s[0],l)),Ra(bl(o[1],s[1],l)),Ra(bl(o[2],s[2],l)),Jm(bl(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var tRe=WI;function _s(e,t,r,n){var i=Pn(e);if(e)return i=QNe(i),t!=null&&(i[0]=KNe(Te(t)?t(i[0]):t)),r!=null&&(i[1]=ys(Te(r)?r(i[1]):r)),n!=null&&(i[2]=ys(Te(n)?n(i[2]):n)),ta(kk(i),"rgba")}function ey(e,t){var r=Pn(e);if(r&&t!=null)return r[3]=Jm(t),ta(r,"rgba")}function ta(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function ty(e,t){var r=Pn(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}function rRe(){return ta([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var nF=new jd(100);function W1(e){if(ve(e)){var t=nF.get(e);return t||(t=H1(e,-.1),nF.put(e,t)),t}else if(Uy(e)){var r=re({},e);return r.colorStops=se(e.colorStops,function(n){return{offset:n.offset,color:H1(n.color,-.1)}}),r}return e}const nRe=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Ig,fastMapToColor:eRe,lerp:WI,lift:H1,liftColor:W1,lum:ty,mapToColor:tRe,modifyAlpha:ey,modifyHSL:_s,parse:Pn,parseCssFloat:ys,parseCssInt:Fx,random:rRe,stringify:ta,toHex:JNe},Symbol.toStringTag,{value:"Module"}));var U1=Math.round;function ry(e){var t;if(!e||e==="transparent")e="none";else if(typeof e=="string"&&e.indexOf("rgba")>-1){var r=Pn(e);r&&(e="rgb("+r[0]+","+r[1]+","+r[2]+")",t=r[3])}return{color:e,opacity:t??1}}var iF=1e-4;function wl(e){return e-iF}function m_(e){return U1(e*1e3)/1e3}function Ok(e){return U1(e*1e4)/1e4}function iRe(e){return"matrix("+m_(e[0])+","+m_(e[1])+","+m_(e[2])+","+m_(e[3])+","+Ok(e[4])+","+Ok(e[5])+")"}var aRe={left:"start",right:"end",center:"middle",middle:"middle"};function oRe(e,t,r){return r==="top"?e+=t/2:r==="bottom"&&(e-=t/2),e}function sRe(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function lRe(e){var t=e.style,r=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function CK(e){return e&&!!e.image}function uRe(e){return e&&!!e.svgElement}function UI(e){return CK(e)||uRe(e)}function AK(e){return e.type==="linear"}function MK(e){return e.type==="radial"}function PK(e){return e&&(e.type==="linear"||e.type==="radial")}function sT(e){return"url(#"+e+")"}function LK(e){var t=e.getGlobalScale(),r=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function kK(e){var t=e.x||0,r=e.y||0,n=(e.rotation||0)*Lg,i=be(e.scaleX,1),a=be(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,l=[];return(t||r)&&l.push("translate("+t+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+U1(o*Lg)+"deg, "+U1(s*Lg)+"deg)"),l.join(" ")}var cRe=function(){return tt.hasGlobalWindow&&Te(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}}(),Dk=Array.prototype.slice;function ts(e,t,r){return(t-e)*r+e}function DA(e,t,r,n){for(var i=t.length,a=0;an?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=oF,l=r;if(vn(r)){var u=vRe(r);s=u,(u===1&&!it(r[0])||u===2&&!it(r[0][0]))&&(o=!0)}else if(it(r)&&!hn(r))s=__;else if(ve(r))if(!isNaN(+r))s=__;else{var c=Pn(r);c&&(l=c,s=ng)}else if(Uy(r)){var f=re({},l);f.colorStops=se(r.colorStops,function(d){return{offset:d.offset,color:Pn(d.color)}}),AK(r)?s=Ek:MK(r)&&(s=Ik),l=f}a===0?this.valType=s:(s!==this.valType||s===oF)&&(o=!0),this.discrete=this.discrete||o;var h={time:t,value:l,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=Te(n)?n:Eg[n]||HI(n)),i.push(h),h},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=x_(i),u=sF(i),c=0;c=0&&!(o[c].percent<=r);c--);c=h(c,s-2)}else{for(c=f;cr);c++);c=h(c-1,s-2)}v=o[c+1],d=o[c]}if(d&&v){this._lastFr=c,this._lastFrP=r;var m=v.percent-d.percent,y=m===0?1:h((r-d.percent)/m,1);v.easingFunc&&(y=v.easingFunc(y));var _=n?this._additiveValue:u?_p:t[l];if((x_(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)t[l]=y<1?d.rawValue:v.rawValue;else if(x_(a))a===Gx?DA(_,d[i],v[i],y):fRe(_,d[i],v[i],y);else if(sF(a)){var x=d[i],w=v[i],S=a===Ek;t[l]={type:S?"linear":"radial",x:ts(x.x,w.x,y),y:ts(x.y,w.y,y),colorStops:se(x.colorStops,function(M,P){var k=w.colorStops[P];return{offset:ts(M.offset,k.offset,y),color:Vx(DA([],M.color,k.color,y))}}),global:w.global},S?(t[l].x2=ts(x.x2,w.x2,y),t[l].y2=ts(x.y2,w.y2,y)):t[l].r=ts(x.r,w.r,y)}else if(u)DA(_,d[i],v[i],y),n||(t[l]=Vx(_));else{var C=ts(d[i],v[i],y);n?this._additiveValue=C:t[l]=C}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===__?t[n]=t[n]+i:r===ng?(Pn(t[n],_p),y_(_p,_p,i,1),t[n]=Vx(_p)):r===Gx?y_(t[n],t[n],i,1):r===OK&&aF(t[n],t[n],i,1)},e}(),ZI=function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){rT("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,rt(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,Ng(u),i),this._trackKeys.push(s)}l.addKeyframe(t,Ng(r[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e}();function Dh(){return new Date().getTime()}var gRe=function(e){q(t,e);function t(r){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},t.prototype.update=function(r){for(var n=Dh()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(F1(n),!r._paused&&r.update())}F1(n)},t.prototype.start=function(){this._running||(this._time=Dh(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Dh(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Dh()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,n){n=n||{},this.start();var i=new ZI(r,n.loop);return this.addAnimator(i),i},t}(ha),mRe=300,EA=tt.domSupported,IA=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=se(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}}(),lF={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},uF=!1;function Nk(e){var t=e.pointerType;return t==="pen"||t==="touch"}function yRe(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function NA(e){e&&(e.zrByTouch=!0)}function _Re(e,t){return Fi(e.dom,new xRe(e,t),!0)}function DK(e,t){for(var r=t,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return n}var xRe=function(){function e(t,r){this.stopPropagation=nr,this.stopImmediatePropagation=nr,this.preventDefault=nr,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),ba={mousedown:function(e){e=Fi(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Fi(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Fi(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=Fi(this.dom,e);var t=e.toElement||e.relatedTarget;DK(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){uF=!0,e=Fi(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){uF||(e=Fi(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=Fi(this.dom,e),NA(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),ba.mousemove.call(this,e),ba.mousedown.call(this,e)},touchmove:function(e){e=Fi(this.dom,e),NA(e),this.handler.processGesture(e,"change"),ba.mousemove.call(this,e)},touchend:function(e){e=Fi(this.dom,e),NA(e),this.handler.processGesture(e,"end"),ba.mouseup.call(this,e),+new Date-+this.__lastTouchMomenthF||e<-hF}var Tu=[],zf=[],jA=zr(),BA=Math.abs,hs=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return Su(this.rotation)||Su(this.x)||Su(this.y)||Su(this.scaleX-1)||Su(this.scaleY-1)||Su(this.skewX)||Su(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&(fF(n),this.invTransform=null);return}n=n||zr(),r?this.getLocalTransform(n):fF(n),t&&(r?Na(n,t,n):qy(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Tu);var n=Tu[0]<0?-1:1,i=Tu[1]<0?-1:1,a=((Tu[0]-n)*r+n)/Tu[0]||0,o=((Tu[1]-i)*r+i)/Tu[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||zr(),sa(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var r=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||zr(),Na(zf,t.invTransform,r),r=zf);var n=this.originX,i=this.originY;(n||i)&&(jA[4]=n,jA[5]=i,Na(zf,r,jA),zf[4]-=n,zf[5]-=i,r=zf),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var n=[t,r],i=this.invTransform;return i&&ir(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&ir(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&BA(t[0]-1)>1e-10&&BA(t[3]-1)>1e-10?Math.sqrt(BA(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){Y1(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,f=t.y,h=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var v=n+s,g=i+l;r[4]=-v*a-h*g*o,r[5]=-g*o-d*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=h*o,u&&Hs(r,r,u),r[4]+=n+c,r[5]+=i+f,r},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),Do=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Y1(e,t){for(var r=0;r=dF)){e=e||Ds;for(var t=[],r=+new Date,n=0;n<=127;n++)t[n]=si.measureText(String.fromCharCode(n),e).width;var i=+new Date-r;return i>16?zA=dF:i>2&&zA++,t}}var zA=0,dF=5;function IK(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=CRe(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?e.asciiWidthMap!=null?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function Mo(e,t){var r=e.strWidthCache,n=r.get(t);return n==null&&(n=si.measureText(t,e.font).width,r.put(t,n)),n}function vF(e,t,r,n){var i=Mo(Ao(t),e),a=Ky(t),o=Bd(0,i,r),s=Mc(0,a,n),l=new Oe(o,s,i,a);return l}function lT(e,t,r,n){var i=((e||"")+"").split(` +`),a=i.length;if(a===1)return vF(i[0],t,r,n);for(var o=new Oe(0,0,0,0),s=0;s=0?parseFloat(e)/100*t:parseFloat(e):e}function X1(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",f="top";if(n instanceof Array)l+=Fa(n[0],r.width),u+=Fa(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=c,e.verticalAlign=f,e}var $A="__zr_normal__",FA=Do.concat(["ignore"]),ARe=oa(Do,function(e,t){return e[t]=!0,e},{ignore:!1}),$f={},MRe=new Oe(0,0,0,0),w_=[],uT=function(){function e(t){this.id=zI(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,f=n.autoOverflowArea,h=void 0;if((f||c)&&(h=MRe,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition($f,n,h):X1($f,n,h),a.x=$f.x,a.y=$f.y,o=$f.align,s=$f.verticalAlign;var d=n.origin;if(d&&n.rotation!=null){var v=void 0,g=void 0;d==="center"?(v=h.width*.5,g=h.height*.5):(v=Fa(d[0],h.width),g=Fa(d[1],h.height)),u=!0,a.originX=-a.x+v+(i?0:h.x),a.originY=-a.y+g+(i?0:h.y)}}n.rotation!=null&&(a.rotation=n.rotation);var m=n.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var _=y.overflowRect=y.overflowRect||new Oe(0,0,0,0);a.getLocalTransform(w_),sa(w_,w_),Oe.copy(_,h),_.applyTransform(w_)}else y.overflowRect=null;var x=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,w=void 0,S=void 0,C=void 0;x&&this.canBeInsideText()?(w=n.insideFill,S=n.insideStroke,(w==null||w==="auto")&&(w=this.getInsideTextFill()),(S==null||S==="auto")&&(S=this.getInsideTextStroke(w),C=!0)):(w=n.outsideFill,S=n.outsideStroke,(w==null||w==="auto")&&(w=this.getOutsideFill()),(S==null||S==="auto")&&(S=this.getOutsideStroke(w),C=!0)),w=w||"#000",(w!==y.fill||S!==y.stroke||C!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=w,y.stroke=S,y.autoStroke=C,y.align=o,y.verticalAlign=s,r.setDefaultTextStyle(y)),r.__dirty|=mi,l&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?zk:Bk},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Pn(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ta(n,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},re(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(Pe(t))for(var n=t,i=rt(n),a=0;a0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState($A,!1,t)},e.prototype.useState=function(t,r,n,i){var a=t===$A,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!($e(s,t)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){rT("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(t,r,n,c),h&&h.useState(t,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~mi),u}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l0,v);var g=this._textContent,m=this._textGuide;g&&g.useStates(t,r,h),m&&m.useStates(t,r,h),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~mi)}},e.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var r=t.__hostTarget;t=r?t.ignoreHostSilent?null:r:t.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},e.prototype.replaceState=function(t,r,n){var i=this.currentStates.slice(),a=$e(i,t),o=$e(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(v,g){r.during(g)});for(var h=0;h0||i.force&&!o.length){var P=void 0,k=void 0,O=void 0;if(s){k={},h&&(P={});for(var w=0;w=0&&(i.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var i=$e(this._children,r);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},t.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(r){var n=this.__zr,i=this._children,a=$e(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){if(!this._disposed)return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this._disposed||this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this._disposed||this.handler.off(t,r)},e.prototype.trigger=function(t,r){this._disposed||this.handler.trigger(t,r)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),r=0;r0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}var de=FRe;function FRe(e,t,r){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return q1(e,t,r)}function q1(e,t,r){return ve(e)?$Re(e).match(/%$/)?parseFloat(e)/100*t+(r||0):parseFloat(e):e==null?NaN:+e}function hr(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),zK),e=(+e).toFixed(t),r?e:+e}function bi(e){return e.sort(function(t,r){return t-r}),e}function Oa(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return $K(e)}function $K(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function YI(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(po(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function VRe(e,t,r){if(!e[t])return 0;var n=FK(e,r);return n[t]||0}function FK(e,t){var r=oa(e,function(d,v){return d+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,t),i=se(e,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=se(i,function(d){return Math.floor(d)}),s=oa(o,function(d,v){return d+v},0),l=se(i,function(d,v){return d-o[v]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return se(o,function(d){return d/n})}function GRe(e,t){var r=Math.max(Oa(e),Oa(t)),n=e+t;return r>zK?n:hr(n,r)}var Vk=9007199254740991;function XI(e){var t=Math.PI*2;return(e%t+t)%t}function zd(e){return e>-pF&&e=10&&t++,t}function qI(e,t){var r=cT(e),n=Math.pow(10,r),i=e/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,e=a*n,r>=-20?+e.toFixed(r<0?-r:0):e}function Ux(e,t){var r=(e.length-1)*t+1,n=Math.floor(r),i=+e[n-1],a=r-n;return a?i+a*(e[n]-i):i}function Gk(e){e.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,r=1,n=0;n0?t.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},e}();function HA(e){e.option=e.parentModel=e.ecModel=null}var uje=".",Cu="___EC__COMPONENT__CONTAINER___",QK="___EC__EXTENDED_CLASS___";function go(e){var t={main:"",sub:""};if(e){var r=e.split(uje);t.main=r[0]||"",t.sub=r[1]||""}return t}function cje(e){pn(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function fje(e){return!!(e&&e[QK])}function eN(e,t){e.$constructor=e,e.extend=function(r){var n=this,i;return hje(n)?i=function(a){q(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},$I(i,this)),re(i.prototype,r),i[QK]=!0,i.extend=this.extend,i.superCall=pje,i.superApply=gje,i.superClass=n,i}}function hje(e){return Te(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function JK(e,t){e.extend=t.extend}var dje=Math.round(Math.random()*10);function vje(e){var t=["__\0is_clz",dje++].join("_");e.prototype[t]=!0,e.isInstance=function(r){return!!(r&&r[t])}}function pje(e,t){for(var r=[],n=2;n=0||a&&$e(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var mje=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],yje=Xc(mje),_je=function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return yje(this,t,r)},e}(),Wk=new jd(50);function xje(e){if(typeof e=="string"){var t=Wk.get(e);return t&&t.image}else return e}function tN(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=Wk.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!hT(t)&&a.pending.push(o)):(t=si.loadImage(e,_F,_F),t.__zrImageSrc=e,Wk.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function _F(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;u++)l-=s;var c=Mo(o,r);return c>l&&(r="",c=0),l=e-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=e,i}function rQ(e,t,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){e.textLine="",e.isTruncated=!1;return}var o=Mo(a,t);if(o<=n){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){t+=r.ellipsis;break}var l=s===0?wje(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,l),o=Mo(a,t)}t===""&&(t=r.placeholder),e.textLine=t,e.isTruncated=!0}function wje(e,t,r){for(var n=0,i=0,a=e.length;im&&d){var x=Math.floor(m/h);v=v||y.length>x,y=y.slice(0,x),_=y.length*h}if(i&&c&&g!=null)for(var w=tQ(g,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),S={},C=0;Cv&&UA(a,o.substring(v,m),t,d),UA(a,g[2],t,d,g[1]),v=WA.lastIndex}vf){var U=a.lines.length;I>0?(k.tokens=k.tokens.slice(0,I),M(k,D,O),a.lines=a.lines.slice(0,P+1)):a.lines=a.lines.slice(0,P),a.isTruncated=a.isTruncated||a.lines.length0&&v+n.accumWidth>n.width&&(c=t.split(` +`),u=!0),n.accumWidth=v}else{var g=nQ(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,f=g.linesWidths,c=g.lines}}c||(c=t.split(` +`));for(var m=Ao(l),y=0;y=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Pje=oa(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function Lje(e){return Mje(e)?!!Pje[e]:!0}function nQ(e,t,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=Ao(t),h=0;hr:i+c+v>r){c?(s||l)&&(g?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=d,u+=v,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=d,c=v)):g?(a.push(l),o.push(u),l=d,u=v):(a.push(d),o.push(v));continue}c+=v,g?(l+=d,u+=v):(l&&(s+=l,l="",u=0),s+=d)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function bF(e,t,r,n,i,a){if(e.baseX=r,e.baseY=n,e.outerWidth=e.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;Oe.set(wF,Bd(r,o,i),Mc(n,s,a),o,s),Oe.intersect(t,wF,null,SF);var l=SF.outIntersectRect;e.outerWidth=l.width,e.outerHeight=l.height,e.baseX=Bd(l.x,l.width,i,!0),e.baseY=Mc(l.y,l.height,a,!0)}}var wF=new Oe(0,0,0,0),SF={outIntersectRect:{},clamp:!0};function rN(e){return e!=null?e+="":e=""}function kje(e){var t=rN(e.text),r=e.font,n=Mo(Ao(r),t),i=Ky(r);return Uk(e,n,i,null)}function Uk(e,t,r,n){var i=new Oe(Bd(e.x||0,t,e.textAlign),Mc(e.y||0,r,e.textBaseline),t,r),a=n??(iQ(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function iQ(e){var t=e.stroke;return t!=null&&t!=="none"&&e.lineWidth>0}var Zk="__zr_style_"+Math.round(Math.random()*10),Pc={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},dT={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Pc[Zk]=!0;var TF=["z","z2","invisible"],Oje=["invisible"],la=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=rt(r),i=0;i1e-4){s[0]=e-r,s[1]=t-n,l[0]=e+r,l[1]=t+n;return}if(S_[0]=qA(i)*r+e,S_[1]=XA(i)*n+t,T_[0]=qA(a)*r+e,T_[1]=XA(a)*n+t,u(s,S_,T_),c(l,S_,T_),i=i%Au,i<0&&(i=i+Au),a=a%Au,a<0&&(a=a+Au),i>a&&!o?a+=Au:ii&&(C_[0]=qA(d)*r+e,C_[1]=XA(d)*n+t,u(s,C_,s),c(l,C_,l))}var Lt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Mu=[],Pu=[],Ka=[],qs=[],Qa=[],Ja=[],KA=Math.min,QA=Math.max,Lu=Math.cos,ku=Math.sin,Yo=Math.abs,Yk=Math.PI,al=Yk*2,JA=typeof Float32Array<"u",xp=[];function e2(e){var t=Math.round(e/Yk*1e8)/1e8;return t%2*Yk}function pT(e,t){var r=e2(e[0]);r<0&&(r+=al);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=al?i=r+al:t&&r-i>=al?i=r-al:!t&&r>i?i=r+(al-e2(r-i)):t&&r0&&(this._ux=Yo(n/Z1/t)||0,this._uy=Yo(n/Z1/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(Lt.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var n=Yo(t-this._xi),i=Yo(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(Lt.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){return this._drawPendingPt(),this.addData(Lt.C,t,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,i){return this._drawPendingPt(),this.addData(Lt.Q,t,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,r,n,i,a,o){this._drawPendingPt(),xp[0]=i,xp[1]=a,pT(xp,o),i=xp[0],a=xp[1];var s=a-i;return this.addData(Lt.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=Lu(a)*n+t,this._yi=ku(a)*n+r,this},e.prototype.arcTo=function(t,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,i,a),this},e.prototype.rect=function(t,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,i),this.addData(Lt.R,t,r,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Lt.Z);var t=this._ctx,r=this._x0,n=this._y0;return t&&t.closePath(),this._xi=r,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){if(this._saveData){var r=t.length;!(this.data&&this.data.length===r)&&JA&&(this.data=new Float32Array(r));for(var n=0;n0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){Ka[0]=Ka[1]=Qa[0]=Qa[1]=Number.MAX_VALUE,qs[0]=qs[1]=Ja[0]=Ja[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Yo(x)>i||h===r-1)&&(g=Math.sqrt(_*_+x*x),a=m,o=y);break}case Lt.C:{var w=t[h++],S=t[h++],m=t[h++],y=t[h++],C=t[h++],M=t[h++];g=WNe(a,o,w,S,m,y,C,M,10),a=C,o=M;break}case Lt.Q:{var w=t[h++],S=t[h++],m=t[h++],y=t[h++];g=ZNe(a,o,w,S,m,y,10),a=m,o=y;break}case Lt.A:var P=t[h++],k=t[h++],O=t[h++],D=t[h++],I=t[h++],N=t[h++],B=N+I;h+=1,v&&(s=Lu(I)*O+P,l=ku(I)*D+k),g=QA(O,D)*KA(al,Math.abs(N)),a=Lu(B)*O+P,o=ku(B)*D+k;break;case Lt.R:{s=a=t[h++],l=o=t[h++];var F=t[h++],$=t[h++];g=F*2+$*2;break}case Lt.Z:{var _=s-a,x=l-o;g=Math.sqrt(_*_+x*x),a=s,o=l;break}}g>=0&&(u[f++]=g,c+=g)}return this._pathLen=c,c},e.prototype.rebuildPath=function(t,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,d=r<1,v,g,m=0,y=0,_,x=0,w,S;if(!(d&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,g=this._pathLen,_=r*g,!_)))e:for(var C=0;C0&&(t.lineTo(w,S),x=0),M){case Lt.M:s=u=n[C++],l=c=n[C++],t.moveTo(u,c);break;case Lt.L:{f=n[C++],h=n[C++];var k=Yo(f-u),O=Yo(h-c);if(k>i||O>a){if(d){var D=v[y++];if(m+D>_){var I=(_-m)/D;t.lineTo(u*(1-I)+f*I,c*(1-I)+h*I);break e}m+=D}t.lineTo(f,h),u=f,c=h,x=0}else{var N=k*k+O*O;N>x&&(w=f,S=h,x=N)}break}case Lt.C:{var B=n[C++],F=n[C++],$=n[C++],G=n[C++],z=n[C++],U=n[C++];if(d){var D=v[y++];if(m+D>_){var I=(_-m)/D;Zl(u,B,$,z,I,Mu),Zl(c,F,G,U,I,Pu),t.bezierCurveTo(Mu[1],Pu[1],Mu[2],Pu[2],Mu[3],Pu[3]);break e}m+=D}t.bezierCurveTo(B,F,$,G,z,U),u=z,c=U;break}case Lt.Q:{var B=n[C++],F=n[C++],$=n[C++],G=n[C++];if(d){var D=v[y++];if(m+D>_){var I=(_-m)/D;Qm(u,B,$,I,Mu),Qm(c,F,G,I,Pu),t.quadraticCurveTo(Mu[1],Pu[1],Mu[2],Pu[2]);break e}m+=D}t.quadraticCurveTo(B,F,$,G),u=$,c=G;break}case Lt.A:var H=n[C++],Y=n[C++],Z=n[C++],J=n[C++],ae=n[C++],ce=n[C++],ge=n[C++],Fe=!n[C++],_e=Z>J?Z:J,ne=Yo(Z-J)>.001,fe=ae+ce,le=!1;if(d){var D=v[y++];m+D>_&&(fe=ae+ce*(_-m)/D,le=!0),m+=D}if(ne&&t.ellipse?t.ellipse(H,Y,Z,J,ge,ae,fe,Fe):t.arc(H,Y,_e,ae,fe,Fe),le)break e;P&&(s=Lu(ae)*Z+H,l=ku(ae)*J+Y),u=Lu(fe)*Z+H,c=ku(fe)*J+Y;break;case Lt.R:s=u=n[C],l=c=n[C+1],f=n[C++],h=n[C++];var ee=n[C++],Be=n[C++];if(d){var D=v[y++];if(m+D>_){var Se=_-m;t.moveTo(f,h),t.lineTo(f+KA(Se,ee),h),Se-=ee,Se>0&&t.lineTo(f+ee,h+KA(Se,Be)),Se-=Be,Se>0&&t.lineTo(f+QA(ee-Se,0),h+Be),Se-=ee,Se>0&&t.lineTo(f,h+QA(Be-Se,0));break e}m+=D}t.rect(f,h,ee,Be);break;case Lt.Z:if(d){var D=v[y++];if(m+D>_){var I=(_-m)/D;t.lineTo(u*(1-I)+s*I,c*(1-I)+l*I);break e}m+=D}t.closePath(),u=s,c=l}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Lt,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();function cl(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=e;if(o>t+s&&o>n+s||oe+s&&a>r+s||at+f&&c>n+f&&c>a+f&&c>s+f||ce+f&&u>r+f&&u>i+f&&u>o+f||ut+u&&l>n+u&&l>a+u||le+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=bp);var h=Math.atan2(l,s);return h<0&&(h+=bp),h>=n&&h<=i||h+bp>=n&&h+bp<=i}function rs(e,t,r,n,i,a){if(a>t&&a>n||ai?s:0}var Ks=Io.CMD,Ou=Math.PI*2,Bje=1e-4;function zje(e,t){return Math.abs(e-t)t&&u>n&&u>a&&u>s||u1&&$je(),d=Nr(t,n,a,s,Gi[0]),h>1&&(v=Nr(t,n,a,s,Gi[1]))),h===2?mt&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=Kr(t,n,a,u),h=0;hr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Nn[0]=-l,Nn[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Ou-1e-4){n=0,i=Ou;var c=a?1:-1;return o>=Nn[0]+e&&o<=Nn[1]+e?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=Ou,i+=Ou);for(var h=0,d=0;d<2;d++){var v=Nn[d];if(v+e>o){var g=Math.atan2(s,v),c=a?1:-1;g<0&&(g=Ou+g),(g>=n&&g<=i||g+Ou>=n&&g+Ou<=i)&&(g>Math.PI/2&&g1&&(r||(s+=rs(l,u,c,f,n,i))),m&&(l=a[v],u=a[v+1],c=l,f=u),g){case Ks.M:c=a[v++],f=a[v++],l=c,u=f;break;case Ks.L:if(r){if(cl(l,u,a[v],a[v+1],t,n,i))return!0}else s+=rs(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ks.C:if(r){if(Rje(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=Fje(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ks.Q:if(r){if(aQ(l,u,a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=Vje(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ks.A:var y=a[v++],_=a[v++],x=a[v++],w=a[v++],S=a[v++],C=a[v++];v+=1;var M=!!(1-a[v++]);h=Math.cos(S)*x+y,d=Math.sin(S)*w+_,m?(c=h,f=d):s+=rs(l,u,h,d,n,i);var P=(n-y)*w/x+y;if(r){if(jje(y,_,w,S,S+C,M,t,P,i))return!0}else s+=Gje(y,_,w,S,S+C,M,P,i);l=Math.cos(S+C)*x+y,u=Math.sin(S+C)*w+_;break;case Ks.R:c=l=a[v++],f=u=a[v++];var k=a[v++],O=a[v++];if(h=c+k,d=f+O,r){if(cl(c,f,h,f,t,n,i)||cl(h,f,h,d,t,n,i)||cl(h,d,c,d,t,n,i)||cl(c,d,c,f,t,n,i))return!0}else s+=rs(h,f,h,d,n,i),s+=rs(c,d,c,f,n,i);break;case Ks.Z:if(r){if(cl(l,u,c,f,t,n,i))return!0}else s+=rs(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!zje(u,f)&&(s+=rs(l,u,c,f,n,i)||0),s!==0}function Hje(e,t,r){return oQ(e,0,!1,t,r)}function Wje(e,t,r,n){return oQ(e,t,!0,r,n)}var K1=Me({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Pc),Uje={style:Me({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},dT.style)},t2=Do.concat(["invisible","culling","z","z2","zlevel","parent"]),et=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Bk:n>.2?TRe:zk}else if(r)return zk}return Bk},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(ve(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=ty(r,0)0))},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&hh)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Wje(s,l/u,r,n)))return!0}if(this.hasFill())return Hje(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=hh,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):e.prototype.attrKV.call(this,r,n)},t.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:re(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&hh)},t.prototype.createStyle=function(r){return Yy(K1,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=re({},this.shape))},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=re({},i.shape),re(u,n.shape)):(u=re({},a?this.shape:i.shape),re(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=re({},this.shape);for(var c={},f=rt(u),h=0;hi&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),e.moveTo(r+s,n),e.lineTo(r+i-l,n),l!==0&&e.arc(r+i-l,n+l,l,-Math.PI/2,0),e.lineTo(r+i,n+a-u),u!==0&&e.arc(r+i-u,n+a-u,u,0,Math.PI/2),e.lineTo(r+c,n+a),c!==0&&e.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),e.lineTo(r,n+s),s!==0&&e.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Eh=Math.round;function gT(e,t,r){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=i,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(Eh(n*2)===Eh(i*2)&&(e.x1=e.x2=Si(n,s,!0)),Eh(a*2)===Eh(o*2)&&(e.y1=e.y2=Si(a,s,!0))),e}}function sQ(e,t,r){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;e.x=n,e.y=i,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=Si(n,s,!0),e.y=Si(i,s,!0),e.width=Math.max(Si(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Si(i+o,s,!1)-e.y,o===0?0:1)),e}}function Si(e,t,r){if(!t)return e;var n=Eh(e*2);return(n+Eh(t))%2===0?n/2:(n+(r?1:-1))/2}var Qje=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Jje={},Ze=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Qje},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=sQ(Jje,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Kje(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(et);Ze.prototype.type="rect";var LF={fill:"#000"},kF=2,eo={},e5e={style:Me({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},dT.style)},nt=function(e){q(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=LF,n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,I=0;I=0&&(B=C[N],B.align==="right");)this._placeToken(B,r,P,y,I,"right",x),k-=B.width,I-=B.width,N--;for(D+=(c-(D-m)-(_-I)-k)/2;O<=N;)B=C[O],this._placeToken(B,r,P,y,D+B.width/2,"center",x),D+=B.width,O++;y+=P}},t.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var h=!r.isLineHolder&&r2(u);h&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var d=!!u.backgroundColor,v=r.textPadding;v&&(o=RF(o,s,v),f-=r.height/2-v[0]-r.innerHeight/2);var g=this._getOrCreateChild($d),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,_=!1,x=0,w=!1,S=NF("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,y.fill)),C=IF("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!y.autoStroke||_)?(x=kF,w=!0,y.stroke):null),M=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=f,M&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||Ds,m.opacity=oi(u.opacity,n.opacity,1),DF(m,u),C&&(m.lineWidth=oi(u.lineWidth,n.lineWidth,x),m.lineDash=be(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=C),S&&(m.fill=S),g.setBoundingRect(Uk(m,r.contentWidth,r.contentHeight,w?0:null))},t.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,h=l&&!f,d=r.borderRadius,v=this,g,m;if(h||r.lineHeight||u&&c){g=this._getOrCreateChild(Ze),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=d,g.dirtyShape()}if(h){var _=g.style;_.fill=l||null,_.fillOpacity=be(r.fillOpacity,1)}else if(f){m=this._getOrCreateChild(Hr),m.onload=function(){v.dirtyStyle()};var x=m.style;x.image=l.image,x.x=i,x.y=a,x.width=o,x.height=s}if(u&&c){var _=g.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=be(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var w=(g||m).style;w.shadowBlur=r.shadowBlur||0,w.shadowColor=r.shadowColor||"transparent",w.shadowOffsetX=r.shadowOffsetX||0,w.shadowOffsetY=r.shadowOffsetY||0,w.opacity=oi(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return uQ(r)&&(n=[r.fontStyle,r.fontWeight,lQ(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&xi(n)||r.textFont||r.font},t}(la),t5e={left:!0,right:1,center:1},r5e={top:1,bottom:1,middle:1},OF=["fontStyle","fontWeight","fontSize","fontFamily"];function lQ(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?RI+"px":e+"px"}function DF(e,t){for(var r=0;r=0,a=!1;if(e instanceof et){var o=cQ(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Ff(s)||Ff(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=re({},n),u=re({},u),u.fill=s):!Ff(u.fill)&&Ff(s)?(a=!0,n=re({},n),u=re({},u),u.fill=W1(s)):!Ff(u.stroke)&&Ff(l)&&(a||(n=re({},n),u=re({},u)),u.stroke=W1(l)),n.style=u}}if(n&&n.z2==null){a||(n=re({},n));var c=e.z2EmphasisLift;n.z2=e.z2+(c??wv)}return n}function u5e(e,t,r){if(r&&r.z2==null){r=re({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??i5e)}return r}function c5e(e,t,r){var n=$e(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:s5e(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=re({},r),o=re({opacity:n?i:a.opacity*.1},o),r.style=o),r}function n2(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return l5e(this,e,t,r);if(e==="blur")return c5e(this,e,r);if(e==="select")return u5e(this,e,r)}return r}function qc(e){e.stateProxy=n2;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=n2),r&&(r.stateProxy=n2)}function FF(e,t){!mQ(e,t)&&!e.__highByOuter&&Ws(e,fQ)}function VF(e,t){!mQ(e,t)&&!e.__highByOuter&&Ws(e,hQ)}function Is(e,t){e.__highByOuter|=1<<(t||0),Ws(e,fQ)}function Ns(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Ws(e,hQ)}function vQ(e){Ws(e,oN)}function sN(e){Ws(e,dQ)}function pQ(e){Ws(e,a5e)}function gQ(e){Ws(e,o5e)}function mQ(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function yQ(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=nN(a),s=i==="series",l=s?e.getViewOfSeriesModel(a):e.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){dQ(u)}),s&&r.push(a)),o.isBlured=!1}),j(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function Kk(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function zl(e,t,r){mc(e,!0),Ws(e,qc),Jk(e,t,r)}function g5e(e){mc(e,!1)}function $t(e,t,r,n){n?g5e(e):zl(e,t,r)}function Jk(e,t,r){var n=Ee(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var HF=["emphasis","blur","select"],m5e={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Lr(e,t,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=i2(v),s*=i2(v));var g=(i===a?-1:1)*i2((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,m=g*o*d/s,y=g*-s*h/o,_=(e+r)/2+M_(f)*m-A_(f)*y,x=(t+n)/2+A_(f)*m+M_(f)*y,w=YF([1,0],[(h-m)/o,(d-y)/s]),S=[(h-m)/o,(d-y)/s],C=[(-1*h-m)/o,(-1*d-y)/s],M=YF(S,C);if(tO(S,C)<=-1&&(M=wp),tO(S,C)>=1&&(M=0),M<0){var P=Math.round(M/wp*1e6)/1e6;M=wp*2+P%2*wp}c.addData(u,_,x,o,s,w,M,f,a)}var S5e=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,T5e=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function C5e(e){var t=new Io;if(!e)return t;var r=0,n=0,i=r,a=n,o,s=Io.CMD,l=e.match(S5e);if(!l)return t;for(var u=0;uB*B+F*F&&(P=O,k=D),{cx:P,cy:k,x0:-c,y0:-f,x1:P*(i/S-1),y1:k*(i/S-1)}}function D5e(e){var t;if(ie(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function E5e(e,t){var r,n=ig(t.r,0),i=ig(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,h=!!t.clockwise,d=qF(u-l),v=d>a2&&d%a2;if(v>xa&&(d=v),!(n>xa))e.moveTo(c,f);else if(d>a2-xa)e.moveTo(c+n*Gf(l),f+n*Du(l)),e.arc(c,f,n,l,u,!h),i>xa&&(e.moveTo(c+i*Gf(u),f+i*Du(u)),e.arc(c,f,i,u,l,h));else{var g=void 0,m=void 0,y=void 0,_=void 0,x=void 0,w=void 0,S=void 0,C=void 0,M=void 0,P=void 0,k=void 0,O=void 0,D=void 0,I=void 0,N=void 0,B=void 0,F=n*Gf(l),$=n*Du(l),G=i*Gf(u),z=i*Du(u),U=d>xa;if(U){var H=t.cornerRadius;H&&(r=D5e(H),g=r[0],m=r[1],y=r[2],_=r[3]);var Y=qF(n-i)/2;if(x=to(Y,y),w=to(Y,_),S=to(Y,g),C=to(Y,m),k=M=ig(x,w),O=P=ig(S,C),(M>xa||P>xa)&&(D=n*Gf(u),I=n*Du(u),N=i*Gf(l),B=i*Du(l),dxa){var ne=to(y,k),fe=to(_,k),le=P_(N,B,F,$,n,ne,h),ee=P_(D,I,G,z,n,fe,h);e.moveTo(c+le.cx+le.x0,f+le.cy+le.y0),k0&&e.arc(c+le.cx,f+le.cy,ne,xn(le.y0,le.x0),xn(le.y1,le.x1),!h),e.arc(c,f,n,xn(le.cy+le.y1,le.cx+le.x1),xn(ee.cy+ee.y1,ee.cx+ee.x1),!h),fe>0&&e.arc(c+ee.cx,f+ee.cy,fe,xn(ee.y1,ee.x1),xn(ee.y0,ee.x0),!h))}else e.moveTo(c+F,f+$),e.arc(c,f,n,l,u,!h);if(!(i>xa)||!U)e.lineTo(c+G,f+z);else if(O>xa){var ne=to(g,O),fe=to(m,O),le=P_(G,z,D,I,i,-fe,h),ee=P_(F,$,N,B,i,-ne,h);e.lineTo(c+le.cx+le.x0,f+le.cy+le.y0),O0&&e.arc(c+le.cx,f+le.cy,fe,xn(le.y0,le.x0),xn(le.y1,le.x1),!h),e.arc(c,f,i,xn(le.cy+le.y1,le.cx+le.x1),xn(ee.cy+ee.y1,ee.cx+ee.x1),h),ne>0&&e.arc(c+ee.cx,f+ee.cy,ne,xn(ee.y1,ee.x1),xn(ee.y0,ee.x0),!h))}else e.lineTo(c+G,f+z),e.arc(c,f,i,u,l,h)}e.closePath()}}}var I5e=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),gn=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new I5e},t.prototype.buildPath=function(r,n){E5e(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(et);gn.prototype.type="sector";var N5e=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),Sv=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new N5e},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},t}(et);Sv.prototype.type="ring";function R5e(e,t,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,d=e.length;h=2){if(n){var a=R5e(i,n,r,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;sIu[1]){if(a=!1,Yr.negativeSize||n)return a;var l=L_(Iu[0]-Eu[1]),u=L_(Eu[0]-Iu[1]);o2(l,u)>O_.len()&&(l=u||!Yr.bidirectional)&&(ke.scale(k_,s,-u*i),Yr.useDir&&Yr.calcDirMTV()))}}return a},e.prototype._getProjMinMaxOnAxis=function(t,r,n){for(var i=this._axes[t],a=this._origin,o=r[0].dot(i)+a[t],s=o,l=o,u=1;u0){var f=c.duration,h=c.delay,d=c.easing,v={duration:f,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(r,v):t.animateTo(r,v)}else t.stopAnimation(),!s&&t.attr(r),o&&o(1),a&&a()}function ot(e,t,r,n,i,a){fN("update",e,t,r,n,i,a)}function Et(e,t,r,n,i,a){fN("enter",e,t,r,n,i,a)}function ed(e){if(!e.__zr)return!0;for(var t=0;tpo(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function JF(e){return!e.isGroup}function Y5e(e){return e.shape!=null}function r0(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(l){JF(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Y5e(o)&&(s.shape=Ce(o.shape)),s}var a=n(e);t.traverse(function(o){if(JF(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),ot(o,l,r,Ee(o).dataIndex)}}})}function vN(e,t){return se(e,function(r){var n=r[0];n=fr(n,t.x),n=Ci(n,t.x+t.width);var i=r[1];return i=fr(i,t.y),i=Ci(i,t.y+t.height),[n,i]})}function EQ(e,t){var r=fr(e.x,t.x),n=Ci(e.x+e.width,t.x+t.width),i=fr(e.y,t.y),a=Ci(e.y+e.height,t.y+t.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Av(e,t,r){var n=re({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),Me(i,r),new Hr(n)):Fd(e.replace("path://",""),n,r,"center")}function ag(e,t,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=s2(d,v,c,f)/h;return!(m<0||m>1)}function s2(e,t,r,n){return e*n-r*t}function X5e(e){return e<=1e-6&&e>=-1e-6}function Kc(e,t,r,n,i){return t==null||(it(t)?Vt[0]=Vt[1]=Vt[2]=Vt[3]=t:(Vt[0]=t[0],Vt[1]=t[1],Vt[2]=t[2],Vt[3]=t[3]),n&&(Vt[0]=fr(0,Vt[0]),Vt[1]=fr(0,Vt[1]),Vt[2]=fr(0,Vt[2]),Vt[3]=fr(0,Vt[3])),r&&(Vt[0]=-Vt[0],Vt[1]=-Vt[1],Vt[2]=-Vt[2],Vt[3]=-Vt[3]),eV(e,Vt,"x","width",3,1,i&&i[0]||0),eV(e,Vt,"y","height",0,2,i&&i[1]||0)),e}var Vt=[0,0,0,0];function eV(e,t,r,n,i,a,o){var s=t[a]+t[i],l=e[n];e[n]+=s,o=fr(0,Ci(o,l)),e[n]=0?-t[i]:t[a]>=0?l+t[a]:po(s)>1e-8?(l-o)*t[i]/s:0):e[r]-=t[i]}function Us(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=ve(t)?{formatter:t}:t,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=e.formatterParamsExtra;l&&j(rt(l),function(c){ye(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Ee(e.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Me({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function nO(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function uu(e,t){if(e)if(ie(e))for(var r=0;rt&&(t=o),ot&&(r=t=0),{min:r,max:t}}function xT(e,t,r){RQ(e,t,r,-1/0)}function RQ(e,t,r,n){if(e.ignoreModelZ)return n;var i=e.getTextContent(),a=e.getTextGuideLine(),o=e.isGroup;if(o)for(var s=e.childrenRef(),l=0;l=0&&s.push(l)}),s}}function cu(e,t){return Ve(Ve({},e,!0),t,!0)}const sBe={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},lBe={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var rw="ZH",yN="EN",td=yN,Xx={},_N={},VQ=tt.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||td).toUpperCase();return e.indexOf(rw)>-1?rw:td}():td;function xN(e,t){e=e.toUpperCase(),_N[e]=new Je(t),Xx[e]=t}function uBe(e){if(ve(e)){var t=Xx[e.toUpperCase()]||{};return e===rw||e===yN?Ce(t):Ve(Ce(t),Ce(Xx[td]),!1)}else return Ve(Ce(e),Ce(Xx[td]),!1)}function aO(e){return _N[e]}function cBe(){return _N[td]}xN(yN,sBe);xN(rw,lBe);var oO=null;function fBe(e){oO||(oO=e)}function yr(){return oO}var bN=1e3,wN=bN*60,Bg=wN*60,Xi=Bg*24,aV=Xi*365,hBe={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},qx={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},dBe="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",E_="{yyyy}-{MM}-{dd}",oV={year:"{yyyy}",month:"{yyyy}-{MM}",day:E_,hour:E_+" "+qx.hour,minute:E_+" "+qx.minute,second:E_+" "+qx.second,millisecond:dBe},vi=["year","month","day","hour","minute","second","millisecond"],vBe=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function pBe(e){return!ve(e)&&!Te(e)?gBe(e):e}function gBe(e){e=e||{};var t={},r=!0;return j(vi,function(n){r&&(r=e[n]==null)}),j(vi,function(n,i){var a=e[n];t[n]={};for(var o=null,s=i;s>=0;s--){var l=vi[s],u=Pe(a)&&!ie(a)?a[l]:a,c=void 0;ie(u)?(c=u.slice(),o=c[0]||""):ve(u)?(o=u,c=[o]):(o==null?o=qx[n]:hBe[l].test(o)||(o=t[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),t[n][l]=c}}),t}function Rn(e,t){return e+="","0000".substr(0,t-e.length)+e}function zg(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function mBe(e){return e===zg(e)}function yBe(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function n0(e,t,r,n){var i=$o(e),a=i[GQ(r)](),o=i[SN(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[TN(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[CN(r)](),f=(c-1)%12+1,h=i[AN(r)](),d=i[MN(r)](),v=i[PN(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof Je?n:aO(n||VQ)||cBe(),_=y.getModel("time"),x=_.get("month"),w=_.get("monthAbbr"),S=_.get("dayOfWeek"),C=_.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Rn(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,x[o-1]).replace(/{MMM}/g,w[o-1]).replace(/{MM}/g,Rn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Rn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,S[u]).replace(/{ee}/g,C[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Rn(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Rn(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Rn(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Rn(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Rn(v,3)).replace(/{S}/g,v+"")}function _Be(e,t,r,n,i){var a=null;if(ve(r))a=r;else if(Te(r)){var o={time:e.time,level:e.time.level},s=yr();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=r(e.value,t,o)}else{var l=e.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=Nh(e.value,i);a=r[c][c][0]}}return n0(new Date(e.value),a,i,n)}function Nh(e,t){var r=$o(e),n=r[SN(t)]()+1,i=r[TN(t)](),a=r[CN(t)](),o=r[AN(t)](),s=r[MN(t)](),l=r[PN(t)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,d=h&&i===1,v=d&&n===1;return v?"year":d?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function nw(e,t,r){switch(t){case"year":e[HQ(r)](0);case"month":e[WQ(r)](1);case"day":e[UQ(r)](0);case"hour":e[ZQ(r)](0);case"minute":e[YQ(r)](0);case"second":e[XQ(r)](0)}return e}function GQ(e){return e?"getUTCFullYear":"getFullYear"}function SN(e){return e?"getUTCMonth":"getMonth"}function TN(e){return e?"getUTCDate":"getDate"}function CN(e){return e?"getUTCHours":"getHours"}function AN(e){return e?"getUTCMinutes":"getMinutes"}function MN(e){return e?"getUTCSeconds":"getSeconds"}function PN(e){return e?"getUTCMilliseconds":"getMilliseconds"}function xBe(e){return e?"setUTCFullYear":"setFullYear"}function HQ(e){return e?"setUTCMonth":"setMonth"}function WQ(e){return e?"setUTCDate":"setDate"}function UQ(e){return e?"setUTCHours":"setHours"}function ZQ(e){return e?"setUTCMinutes":"setMinutes"}function YQ(e){return e?"setUTCSeconds":"setSeconds"}function XQ(e){return e?"setUTCMilliseconds":"setMilliseconds"}function bBe(e,t,r,n,i,a,o,s){var l=new nt({style:{text:e,font:t,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function LN(e){if(!KI(e))return ve(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function kN(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Lv=Zy;function sO(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&xi(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?$o(e):e;if(isNaN(+l)){if(s)return"-"}else return n0(l,n,r)}if(t==="ordinal")return j1(e)?i(e):it(e)&&a(e)?e+"":"-";var u=Eo(e);return a(u)?LN(u):j1(e)?i(e):typeof e=="boolean"?e+"":"-"}var sV=["a","b","c","d","e","f","g"],c2=function(e,t){return"{"+e+(t??"")+"}"};function ON(e,t,r){ie(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function SBe(e,t,r){(e==="week"||e==="month"||e==="quarter"||e==="half-year"||e==="year")&&(e=`MM-dd +yyyy`);var n=$o(t),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),f=n[i+"Milliseconds"]();return e=e.replace("MM",Rn(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Rn(a%100+"",2)).replace("dd",Rn(s,2)).replace("d",s).replace("hh",Rn(l,2)).replace("h",l).replace("mm",Rn(u,2)).replace("m",u).replace("ss",Rn(c,2)).replace("s",c).replace("SSS",Rn(f,3)),e}function TBe(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function Jc(e,t){return t=t||"transparent",ve(e)?e:Pe(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function iw(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var Kx={},f2={},kv=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(t,r){this._nonSeriesBoxMasterList=n(Kx),this._normalMasterList=n(f2);function n(i,a){var o=[];return j(i,function(s,l){var u=s.create(t,r);o=o.concat(u||[])}),o}},e.prototype.update=function(t,r){j(this._normalMasterList,function(n){n.update&&n.update(t,r)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(t,r){if(t==="matrix"||t==="calendar"){Kx[t]=r;return}f2[t]=r},e.get=function(t){return f2[t]||Kx[t]},e}();function CBe(e){return!!Kx[e]}var lO={coord:1,coord2:2};function ABe(e){KQ.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var KQ=xe();function MBe(e){var t=e.getShallow("coord",!0),r=lO.coord;if(t==null){var n=KQ.get(e.type);n&&n.getCoord2&&(r=lO.coord2,t=n.getCoord2(e))}return{coord:t,from:r}}var co={none:0,dataCoordSys:1,boxCoordSys:2};function QQ(e,t){var r=e.getShallow("coordinateSystem"),n=e.getShallow("coordinateSystemUsage",!0),i=co.none;if(r){var a=e.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=co.dataCoordSys,a||(i=co.none)):n==="box"&&(i=co.boxCoordSys,!a&&!CBe(r)&&(i=co.none))}return{coordSysType:r,kind:i}}function i0(e){var t=e.targetModel,r=e.coordSysType,n=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=QQ(t),o=a.kind,s=a.coordSysType;if(i&&o!==co.dataCoordSys&&(o=co.dataCoordSys,s=r),o===co.none||s!==r)return!1;var l=n(r,t);return l?(o===co.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var JQ=function(e,t){var r=t.getReferringComponents(e,Kt).models[0];return r&&r.coordinateSystem},Qx=j,eJ=["left","right","top","bottom","width","height"],yc=[["width","left","right"],["height","top","bottom"]];function DN(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),h=f&&f.getBoundingRect(),d,v;if(e==="horizontal"){var g=c.width+(h?-h.x+c.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);v=o+m,v>i||l.newline?(a+=s+r,o=0,v=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),e==="horizontal"?a=d+r:o=v+r)})}var kc=DN;je(DN,"vertical");je(DN,"horizontal");function tJ(e,t){return{left:e.getShallow("left",t),top:e.getShallow("top",t),right:e.getShallow("right",t),bottom:e.getShallow("bottom",t),width:e.getShallow("width",t),height:e.getShallow("height",t)}}function PBe(e,t){var r=Or(e,t,{enableLayoutOnlyByCenter:!0}),n=e.getBoxLayoutParams(),i,a;if(r.type===og.point)a=r.refPoint,i=Rt(n,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get("center"),s=ie(o)?o:[o,o];i=Rt(n,r.refContainer),a=r.boxCoordFrom===lO.coord2?r.refPoint:[de(s[0],i.width)+i.x,de(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function rJ(e,t){var r=PBe(e,t),n=r.viewRect,i=r.center,a=e.get("radius");ie(a)||(a=[0,a]);var o=de(n.width,t.getWidth()),s=de(n.height,t.getHeight()),l=Math.min(o,s),u=de(a[0],l/2),c=de(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function Rt(e,t,r){r=Lv(r||0);var n=t.width,i=t.height,a=de(e.left,n),o=de(e.top,i),s=de(e.right,n),l=de(e.bottom,i),u=de(e.width,n),c=de(e.height,i),f=r[2]+r[0],h=r[1]+r[3],d=e.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),e.left||e.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-h;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var v=new Oe((t.x||0)+a+r[3],(t.y||0)+o+r[0],u,c);return v.margin=r,v}function nJ(e,t,r){var n=e.getShallow("preserveAspect",!0);if(!n)return t;var i=t.width/t.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return t;var a=e.getShallow("preserveAspectAlign",!0),o=e.getShallow("preserveAspectVerticalAlign",!0),s={width:t.width,height:t.height},l=n==="cover";return i>r&&!l||i=g)return f;for(var m=0;m=0;l--)s=Ve(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return bv(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){return tJ(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(r){this.option.zlevel=r},t.protoInitialize=function(){var r=t.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),t}(Je);JK(qe,Je);fT(qe);aBe(qe);oBe(qe,OBe);function OBe(e){var t=[];return j(qe.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=se(t,function(r){return go(r).main}),e!=="dataset"&&$e(t,"dataset")<=0&&t.unshift("dataset"),t}var K={color:{},darkColor:{},size:{}},sr=K.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};re(sr,{primary:sr.neutral80,secondary:sr.neutral70,tertiary:sr.neutral60,quaternary:sr.neutral50,disabled:sr.neutral20,border:sr.neutral30,borderTint:sr.neutral20,borderShade:sr.neutral40,background:sr.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:sr.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:sr.neutral70,axisLineTint:sr.neutral40,axisTick:sr.neutral70,axisTickMinor:sr.neutral60,axisLabel:sr.neutral70,axisSplitLine:sr.neutral15,axisMinorSplitLine:sr.neutral05});for(var Nu in sr)if(sr.hasOwnProperty(Nu)){var lV=sr[Nu];Nu==="theme"?K.darkColor.theme=sr.theme.slice():Nu==="highlight"?K.darkColor.highlight="rgba(255,231,130,0.4)":Nu.indexOf("accent")===0?K.darkColor[Nu]=_s(lV,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):K.darkColor[Nu]=_s(lV,null,function(e){return e*.9},function(e){return 1-Math.pow(e,1.5)})}K.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var aJ="";typeof navigator<"u"&&(aJ=navigator.platform||"");var Hf="rgba(0, 0, 0, 0.2)",oJ=K.color.theme[0],DBe=_s(oJ,null,null,.9);const EBe={darkMode:"auto",colorBy:"series",color:K.color.theme,gradientColor:[DBe,oJ],aria:{decal:{decals:[{color:Hf,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Hf,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Hf,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Hf,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Hf,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Hf,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:aJ.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var sJ=xe(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Li="original",tn="arrayRows",ki="objectRows",Ha="keyedColumns",Fl="typedArray",lJ="unknown",Ba="column",mf="row",sn={Must:1,Might:2,Not:3},uJ=Ke();function IBe(e){uJ(e).datasetMap=xe()}function cJ(e,t,r){var n={},i=IN(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,l=uJ(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;e=e.slice(),j(e,function(g,m){var y=Pe(g)?g:e[m]={name:g};y.type==="ordinal"&&c==null&&(c=m,f=v(y)),n[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});j(e,function(g,m){var y=g.name,_=v(g);if(c==null){var x=h.valueWayDim;d(n[y],x,_),d(o,x,_),h.valueWayDim+=_}else if(c===m)d(n[y],0,_),d(a,0,_);else{var x=h.categoryWayDim;d(n[y],x,_),d(o,x,_),h.categoryWayDim+=_}});function d(g,m,y){for(var _=0;_t)return e[n];return e[r-1]}function dJ(e,t,r,n,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:zBe(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function $Be(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var I_,Sp,cV,fV="\0_ec_inner",FBe=1,RN=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Je(a),this._locale=new Je(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=vV(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,vV(n))},t.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?cV(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&j(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=xe(),u=n&&n.replaceMergeMainTypeMap;IBe(this),j(r,function(f,h){f!=null&&(qe.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?Ce(f):Ve(i[h],f,!0))}),u&&u.each(function(f,h){qe.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),qe.topologicalTravel(s,qe.getAllClassMainTypes(),c,this);function c(f){var h=jBe(this,f,At(r[f])),d=a.get(f),v=d?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=YK(d,h,v);rje(g,f,qe),i[f]=null,a.set(f,null),o.set(f,0);var m=[],y=[],_=0,x;j(g,function(w,S){var C=w.existing,M=w.newOption;if(!M)C&&(C.mergeOption({},this),C.optionUpdated({},!1));else{var P=f==="series",k=qe.getClass(f,w.keyInfo.subType,!P);if(!k)return;if(f==="tooltip"){if(x)return;x=!0}if(C&&C.constructor===k)C.name=w.keyInfo.name,C.mergeOption(M,this),C.optionUpdated(M,!1);else{var O=re({componentIndex:S},w.keyInfo);C=new k(M,this,this,O),re(C,O),w.brandNew&&(C.__requireNewView=!0),C.init(M,this,this),C.optionUpdated(null,!0)}}C?(m.push(C.option),y.push(C),_++):(m.push(void 0),y.push(void 0))},this),i[f]=m,a.set(f,y),o.set(f,_),f==="series"&&I_(this)}this._seriesIndices||I_(this)},t.prototype.getOption=function(){var r=Ce(this.option);return j(r,function(n,i){if(qe.hasClass(i)){for(var a=At(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!ny(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[fV],r},t.prototype.setTheme=function(r){this._theme=new Je(r),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=t:r==="max"?e<=t:e===t}function qBe(e,t){return e.join(",")===t.join(",")}var _a=j,uy=Pe,pV=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function h2(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=pV.length;r0?r[o-1].seriesModel:null)}),aze(r)}})}function aze(e){j(e,function(t,r){var n=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var h=o.get(t.stackedDimension,f);if(isNaN(h))return i;var d,v;s?v=o.getRawIndex(f):d=o.get(t.stackedByDimension,f);for(var g=NaN,m=r-1;m>=0;m--){var y=e[m];if(s||(v=y.data.rawIndexOf(y.stackedByDimension,d)),v>=0){var _=y.data.getByRawIndex(y.stackResultDimension,v);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&h>=0&&_>0||l==="samesign"&&h<=0&&_<0){h=GRe(h,_),g=_;break}}}return n[0]=h,n[1]=g,n})})}var ST=function(){function e(t){this.data=t.data||(t.sourceFormat===Ha?{}:[]),this.sourceFormat=t.sourceFormat||lJ,this.seriesLayoutBy=t.seriesLayoutBy||Ba,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;ng&&(g=x)}d[0]=v,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};wV=(t={},t[tn+"_"+Ba]={pure:!0,appendData:a},t[tn+"_"+mf]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[ki]={pure:!0,appendData:a},t[Ha]={pure:!0,appendData:function(o){var s=this._data;j(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[Li]={appendData:a},t[Fl]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},e.prototype.getRawValue=function(t,r){return Gd(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e}();function AV(e){var t,r;return Pe(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function $g(e){return new dze(e)}var dze=function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,v=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||d1&&n>0?s:o}};return a;function o(){return t=e?null:lt},gte:function(e,t){return e>=t}},pze=function(){function e(t,r){if(!it(r)){var n="";pt(n)}this._opFn=TJ[t],this._rvalFloat=Eo(r)}return e.prototype.evaluate=function(t){return it(t)?this._opFn(t,this._rvalFloat):this._opFn(Eo(t),this._rvalFloat)},e}(),CJ=function(){function e(t,r){var n=t==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return e.prototype.evaluate=function(t,r){var n=it(t)?t:Eo(t),i=it(r)?r:Eo(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=ve(t),l=ve(r);s&&(n=l?t:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},e}(),gze=function(){function e(t,r){this._rval=r,this._isEQ=t,this._rvalTypeof=typeof r,this._rvalFloat=Eo(r)}return e.prototype.evaluate=function(t){var r=t===this._rval;if(!r){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Eo(t)===this._rvalFloat)}return this._isEQ?r:!r},e}();function mze(e,t){return e==="eq"||e==="ne"?new gze(e==="eq",t):ye(TJ,e)?new pze(e,t):null}var yze=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return Vl(t,r)},e}();function _ze(e,t){var r=new yze,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==Ba&&pt(o);var s=[],l={},u=e.dimensionsDefine;if(u)j(u,function(g,m){var y=g.name,_={index:m,name:y,displayName:g.displayName};if(s.push(_),y!=null){var x="";ye(l,y)&&pt(x),l[y]=_}});else for(var c=0;c65535?Mze:Pze}function Uf(){return[1/0,-1/0]}function Lze(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function LV(e,t,r,n,i){var a=PJ[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=se(o,function(_){return _.property}),c=0;cy[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r=0&&r=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&nt)a=o-1;else return o}return-1},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a=f&&_<=h||isNaN(_))&&(l[u++]=g),g++}v=!0}else if(a===2){for(var m=d[i[0]],x=d[i[1]],w=t[i[1]][0],S=t[i[1]][1],y=0;y=f&&_<=h||isNaN(_))&&(C>=w&&C<=S||isNaN(C))&&(l[u++]=g),g++}v=!0}}if(!v)if(a===1)for(var y=0;y=f&&_<=h||isNaN(_))&&(l[u++]=M)}else for(var y=0;yt[O][1])&&(P=!1)}P&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=m)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,h,d=new(Wf(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var v=1;vc&&(c=f,h=w)}D>0&&Ds&&(g=s-c);for(var m=0;mv&&(v=_,d=c+m)}var x=this.getRawIndex(f),w=this.getRawIndex(d);fc-v&&(l=c-v,s.length=l);for(var g=0;gf[1]&&(f[1]=y),h[d++]=_}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();al&&(l=f)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(r,n,i,a){return Vl(r[a],this._dimensions[a])}p2={arrayRows:t,objectRows:function(r,n,i,a){return Vl(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Vl(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),e}(),LJ=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(R_(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=Vn(s)?Fl:Li,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},d=be(f.seriesLayoutBy,h.seriesLayoutBy)||null,v=be(f.sourceHeader,h.sourceHeader),g=be(f.dimensions,h.dimensions),m=d!==h.seriesLayoutBy||!!v!=!!h.sourceHeader||g;i=m?[fO(s,{seriesLayoutBy:d,sourceHeader:v,dimensions:g},l)]:[]}else{var y=t;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var x=y.get("source",!0);i=[fO(x,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&OV(a)}var o,s=[],l=[];return j(t,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&OV(f),s.push(c),l.push(u._getVersionSign())}),n?o=Cze(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[oze(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!e.noHeader;return j(e.blocks,function(i){var a=EJ(i);a>=t&&(t=a+ +(n&&(!a||dO(i)&&!i.noHeader)))}),t}return 0}function Eze(e,t,r,n){var i=t.noHeader,a=Nze(EJ(t)),o=[],s=t.blocks||[];pn(!s||ie(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(ye(u,l)){var c=new CJ(u[l],null);s.sort(function(g,m){return c.evaluate(g.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}j(s,function(g,m){var y=t.valueFormatter,_=DJ(g)(y?re(re({},e),{valueFormatter:y}):e,g,m>0?a.html:0,n);_!=null&&o.push(_)});var f=e.renderMode==="richText"?o.join(a.richText):vO(n,o.join(""),i?r:a.html);if(i)return f;var h=sO(t.header,"ordinal",e.useUTC),d=OJ(n,e.renderMode).nameStyle,v=kJ(n);return e.renderMode==="richText"?IJ(e,h,d)+a.richText+f:vO(n,'
'+Mn(h)+"
"+f,r)}function Ize(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(w){return w=ie(w)?w:[w],se(w,function(S,C){return sO(S,ie(d)?d[C]:d,u)})};if(!(a&&o)){var f=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||K.color.secondary,i),h=a?"":sO(l,"ordinal",u),d=t.valueType,v=o?[]:c(t.value,t.dataIndex),g=!s||!a,m=!s&&a,y=OJ(n,i),_=y.nameStyle,x=y.valueStyle;return i==="richText"?(s?"":f)+(a?"":IJ(e,h,_))+(o?"":Bze(e,v,g,m,x)):vO(n,(s?"":f)+(a?"":Rze(h,!s,_))+(o?"":jze(v,g,m,x)),r)}}function DV(e,t,r,n,i,a){if(e){var o=DJ(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function Nze(e){return{html:Oze[e],richText:Dze[e]}}function vO(e,t,r){var n='
',i="margin: "+r+"px 0 0",a=kJ(e);return'
'+t+n+"
"}function Rze(e,t,r){var n=t?"margin-left:2px":"";return''+Mn(e)+""}function jze(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=ie(e)?e:[e],''+se(e,function(o){return Mn(o)}).join("  ")+""}function IJ(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function Bze(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(ie(t)?t.join(" "):t,a)}function NJ(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return Jc(n)}function RJ(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var g2=function(){function e(){this.richTextStyles={},this._nextStyleNameId=GK()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=qQ({color:r,type:t,renderMode:n,markerId:i});return ve(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};ie(r)?j(r,function(a){return re(n,a)}):re(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function jJ(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=ie(s),u=NJ(t,r),c,f,h,d;if(o>1||l&&!o){var v=zze(s,t,r,a,u);c=v.inlineValues,f=v.inlineValueTypes,h=v.blocks,d=v.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=c=Gd(i,r,a[0]),f=g.type}else d=c=l?s[0]:s;var m=QI(t),y=m&&t.name||"",_=i.getName(r),x=n?y:_;return xr("section",{header:y,noHeader:n||!m,sortParam:d,blocks:[xr("nameValue",{markerType:"item",markerColor:u,name:x,noName:!xi(x),value:c,valueType:f,dataIndex:r})].concat(h||[])})}function zze(e,t,r,n,i){var a=t.getData(),o=oa(e,function(f,h,d){var v=a.getDimensionInfo(d);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?j(n,function(f){c(Gd(a,r,f),f)}):j(e,c);function c(f,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?u.push(xr("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:f,valueType:d.type})):(s.push(f),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Qs=Ke();function j_(e,t){return e.getName(t)||e.getId(t)}var Jx="__universalTransitionEnabled",bt=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=$g({count:Fze,reset:Vze}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Qs(this).sourceManager=new LJ(this);a.prepareSource();var o=this.getInitialData(r,i);IV(o,this),this.dataTask.context.data=o,Qs(this).dataBeforeProcessed=o,EV(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=ly(this),a=i?gf(r):{},o=this.subType;qe.hasClass(o)&&(o+="Series"),Ve(r,n.getTheme().get(this.subType)),Ve(r,this.getDefaultOption()),Zc(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&No(r,a,i)},t.prototype.mergeOption=function(r,n){r=Ve(this.option,r,!0),this.fillDataTextStyle(r.data);var i=ly(this);i&&No(this.option,r,i);var a=Qs(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);IV(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Qs(this).dataBeforeProcessed=o,EV(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!Vn(r))for(var n=["show"],i=0;i=0&&h<0)&&(f=_,h=y,d=0),y===h&&(c[d++]=g))}),c.length=d,c},t.prototype.formatTooltip=function(r,n,i){return jJ({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(tt.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=NN.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[j_(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Jx])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Pe(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},t.registerClass=function(r){return qe.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(qe);or(bt,TT);or(bt,NN);JK(bt,qe);function EV(e){var t=e.name;QI(e)||(e.name=$ze(e)||t)}function $ze(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return j(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function Fze(e){return e.model.getRawData().count()}function Vze(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Gze}function Gze(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function IV(e,t){j(Rd(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,je(Hze,t))})}function Hze(e,t){var r=pO(e);return r&&r.setOutputEnd((t||this).count()),t}function pO(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var Mt=function(){function e(){this.group=new Ae,this.uid=Pv("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();eN(Mt);fT(Mt);function Ov(){var e=Ke();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var BJ=Ke(),Wze=Ov(),yt=function(){function e(){this.group=new Ae,this.uid=Pv("viewChart"),this.renderTask=$g({plan:Uze,reset:Zze}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&RV(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&RV(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){uu(this.group,t)},e.markUpdateMethod=function(t,r){BJ(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function NV(e,t,r){e&&ay(e)&&(t==="emphasis"?Is:Ns)(e,r)}function RV(e,t,r){var n=Yc(e,t),i=t&&t.highlightKey!=null?_5e(t.highlightKey):null;n!=null?j(At(n),function(a){NV(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){NV(a,r,i)})}eN(yt);fT(yt);function Uze(e){return Wze(e.model)}function Zze(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&BJ(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),Yze[l]}var Yze={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},aw="\0__throttleOriginMethod",jV="\0__throttleRate",BV="\0__throttleType";function AT(e,t,r){var n,i=0,a=0,o=null,s,l,u,c;t=t||0;function f(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var h=function(){for(var d=[],v=0;v=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){c=d},h}function Dv(e,t,r,n){var i=e[t];if(i){var a=i[aw]||i,o=i[BV],s=i[jV];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=AT(a,r,n==="debounce"),i[aw]=a,i[BV]=n,i[jV]=r}return i}}function cy(e,t){var r=e[t];r&&r[aw]&&(r.clear&&r.clear(),e[t]=r[aw])}var zV=Ke(),$V={itemStyle:Xc(FQ,!0),lineStyle:Xc($Q,!0)},Xze={lineStyle:"stroke",itemStyle:"fill"};function zJ(e,t){var r=e.visualStyleMapper||$V[t];return r||(console.warn("Unknown style type '"+t+"'."),$V.itemStyle)}function $J(e,t){var r=e.visualDrawType||Xze[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var qze={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=zJ(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=$J(e,n),u=o[l],c=Te(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Te(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||Te(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,v){var g=e.getDataParams(v),m=re({},o);m[l]=c(g),d.setItemVisual(v,"style",m)}}}},Cp=new Je,Kze={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=zJ(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Cp.option=l[n];var u=i(Cp),c=o.ensureUniqueItemVisual(s,"style");re(c,u),Cp.option.decal&&(o.setItemVisual(s,"decal",Cp.option.decal),Cp.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},Qze={performRawSeries:!0,overallReset:function(e){var t=xe();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),zV(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=zV(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=$J(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",v=n.count();h[l]=r.getColorFromPalette(d,o,v)}})}})}},B_=Math.PI;function Jze(e,t){t=t||{},Me(t,{text:"loading",textColor:K.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:K.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new Ae,n=new Ze({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new nt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Ze({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new e0({shape:{startAngle:-B_/2,endAngle:-B_/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:B_*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:B_*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var FJ=function(){function e(t,r,n,i){this._stageTaskMap=xe(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=xe();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;j(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";pn(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;j(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var d,v=h.agentStubMap;v.each(function(m){s(i,m)&&(m.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);v.each(function(m){m.perform(g)}),h.perform(g)&&(a=!0)}else f&&f.each(function(m,y){s(i,m)&&m.dirty();var _=o.getPerformArgs(m,i.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=xe(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,d=s.set(h,o&&o.get(h)||$g({plan:i3e,reset:a3e,count:s3e}));d.context={model:f,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(f,d)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||$g({reset:e3e});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=xe(),u=t.seriesType,c=t.getTargetSeries,f=!0,h=!1,d="";pn(!t.createOnAllSeries,d),u?n.eachRawSeriesByType(u,v):c?c(n,i).each(v):(f=!1,j(n.getSeries(),v));function v(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(h=!0,$g({reset:t3e,onDirty:n3e})));y.context={model:g,overallProgress:f},y.agent=o,y.__block=f,a._pipe(g,y)}h&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return Te(t)&&(t={overallReset:t,seriesType:l3e(t)}),t.uid=Pv("stageHandler"),r&&(t.visualType=r),t},e}();function e3e(e){e.overallReset(e.ecModel,e.api,e.payload)}function t3e(e){return e.overallProgress&&r3e}function r3e(){this.agent.dirty(),this.getDownstream().dirty()}function n3e(){this.agent&&this.agent.dirty()}function i3e(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function a3e(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=At(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?se(t,function(r,n){return VJ(n)}):o3e}var o3e=VJ(0);function VJ(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&d===u.length-h.length){var v=u.slice(0,d);v!=="data"&&(r.mainType=v,r[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function c(f,h,d,v){return f[d]==null||h[v||d]===f[d]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),gO=["symbol","symbolSize","symbolRotate","symbolOffset"],VV=gO.concat(["symbolKeepAspect"]),f3e={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&xc(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function mO(e,t,r){for(var n=t.type==="radial"?A3e(e,t,r):C3e(e,t,r),i=t.colorStops,a=0;a0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:it(e)?[e]:ie(e)?e:null}function VN(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&P3e(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=se(r,function(a){return a/i}),n/=i)}return[r,n]}var L3e=new Io(!0);function lw(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function GV(e){return typeof e=="string"&&e!=="none"}function uw(e){var t=e.fill;return t!=null&&t!=="none"}function HV(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function WV(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function yO(e,t,r){var n=tN(t.image,t.__image,r);if(hT(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Lg),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function k3e(e,t,r,n){var i,a=lw(r),o=uw(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||L3e,f=t.__dirty;if(!n){var h=r.fill,d=r.stroke,v=o&&!!h.colorStops,g=a&&!!d.colorStops,m=o&&!!h.image,y=a&&!!d.image,_=void 0,x=void 0,w=void 0,S=void 0,C=void 0;(v||g)&&(C=t.getBoundingRect()),v&&(_=f?mO(e,h,C):t.__canvasFillGradient,t.__canvasFillGradient=_),g&&(x=f?mO(e,d,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(w=f||!t.__canvasFillPattern?yO(e,h,t):t.__canvasFillPattern,t.__canvasFillPattern=w),y&&(S=f||!t.__canvasStrokePattern?yO(e,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),v?e.fillStyle=_:m&&(w?e.fillStyle=w:o=!1),g?e.strokeStyle=x:y&&(S?e.strokeStyle=S:a=!1)}var M=t.getGlobalScale();c.setScale(M[0],M[1],t.segmentIgnoreThreshold);var P,k;e.setLineDash&&r.lineDash&&(i=VN(t),P=i[0],k=i[1]);var O=!0;(u||f&hh)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),O=!1),c.reset(),t.buildPath(c,t.shape,n),c.toStatic(),t.pathUpdated()),O&&c.rebuildPath(e,l?s:1),P&&(e.setLineDash(P),e.lineDashOffset=k),n||(r.strokeFirst?(a&&WV(e,r),o&&HV(e,r)):(o&&HV(e,r),a&&WV(e,r))),P&&e.setLineDash([])}function O3e(e,t,r){var n=t.__image=tN(r.image,t.__image,t,t.onload);if(!(!n||!hT(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;e.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,h=s-c;e.drawImage(n,u,c,f,h,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function D3e(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||Ds,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=VN(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(lw(r)&&e.strokeText(i,r.x,r.y),uw(r)&&e.fillText(i,r.x,r.y)):(uw(r)&&e.fillText(i,r.x,r.y),lw(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var UV=["shadowBlur","shadowOffsetX","shadowOffsetY"],ZV=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function YJ(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){ei(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Pc.opacity:o}(n||t.blend!==r.blend)&&(a||(ei(e,i),a=!0),e.globalCompositeOperation=t.blend||Pc.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(r,n,i){if(!this[Sr]){if(this._disposed){this.id;return}var a,o,s;if(Pe(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Sr]=!0,qf(this),!this._model||n){var l=new UBe(this._api),u=this._theme,c=this._model=new RN;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},wO);var f={seriesTransition:s,optionChanged:!0};if(i)this[Zr]={silent:a,updateParams:f},this[Sr]=!1,this.getZr().wakeUp();else{try{$u(this),qo.update.call(this,null,f)}catch(h){throw this[Zr]=null,this[Sr]=!1,h}this._ssr||this._zr.flush(),this[Zr]=null,this[Sr]=!1,Yf.call(this,a),Xf.call(this,a)}}},t.prototype.setTheme=function(r,n){if(!this[Sr]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[Zr]&&(a==null&&(a=this[Zr].silent),o=this[Zr].updateParams,this[Zr]=null),this[Sr]=!0,qf(this);try{this._updateTheme(r),i.setTheme(this._theme),$u(this),qo.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Sr]=!1,s}this[Sr]=!1,Yf.call(this,a),Xf.call(this,a)}}},t.prototype._updateTheme=function(r){ve(r)&&(r=dee[r]),r&&(r=Ce(r),r&&gJ(r,!0),this._theme=r)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||tt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return j(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;j(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return j(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(dw[i]){var l=s,u=s,c=-s,f=-s,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();j(Oc,function(x,w){if(x.group===i){var S=n?x.getZr().painter.getSvgDom().innerHTML:x.renderToCanvas(Ce(r)),C=x.getDom().getBoundingClientRect();l=a(C.left,l),u=a(C.top,u),c=o(C.right,c),f=o(C.bottom,f),h.push({dom:S,left:C.left,top:C.top})}}),l*=d,u*=d,c*=d,f*=d;var v=c-l,g=f-u,m=si.createCanvas(),y=$k(m,{renderer:n?"svg":"canvas"});if(y.resize({width:v,height:g}),n){var _="";return j(h,function(x){var w=x.left-l,S=x.top-u;_+=''+x.dom+""}),y.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new Ze({shape:{x:0,y:0,width:v,height:g},style:{fill:r.connectedBackgroundColor}})),j(h,function(x){var w=new Hr({style:{x:x.left*d-l,y:x.top*d-u,image:x.dom}});y.add(w)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n,i){return V_(this,"convertToPixel",r,n,i)},t.prototype.convertToLayout=function(r,n,i){return V_(this,"convertToLayout",r,n,i)},t.prototype.convertFromPixel=function(r,n,i){return V_(this,"convertFromPixel",r,n,i)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Jh(i,r);return j(o,function(s,l){l.indexOf("Models")>=0&&j(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=Jh(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?FN(s,l,n):a0(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;j(i4e,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&_c(l,function(g){var m=Ee(g);if(m&&m.dataIndex!=null){var y=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=y&&y.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=re({},m.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var d=f&&h!=null&&s.getComponent(f,h),v=d&&r[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:d,view:v},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;j(xO,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),d3e(n,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&qK(this.getDom(),UN,"");var n=this,i=n._api,a=n._model;j(n._componentsViews,function(o){o.dispose(a,i)}),j(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Oc[n.id]},t.prototype.resize=function(r){if(!this[Sr]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Zr]&&(a==null&&(a=this[Zr].silent),i=!0,this[Zr]=null),this[Sr]=!0,qf(this);try{i&&$u(this),qo.update.call(this,{type:"resize",animation:re({duration:0},r&&r.animation)})}catch(o){throw this[Sr]=!1,o}this[Sr]=!1,Yf.call(this,a),Xf.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(Pe(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!SO[r]){var i=SO[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=re({},r);return n.type=_O[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(Pe(n)||(n={silent:!!n}),!!fw[r.type]&&this._model){if(this[Sr]){this._pendingActions.push(r);return}var i=n.silent;w2.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&tt.browser.weChat&&this._throttledZrFlush(),Yf.call(this,i),Xf.call(this,i)}},t.prototype.updateLabelLayout=function(){wa.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){$u=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),x2(f,!0),x2(f,!1),h.plan()},x2=function(f,h){for(var d=f._model,v=f._scheduler,g=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,y=f._zr,_=f._api,x=0;xh.get("hoverLayerThreshold")&&!tt.node&&!tt.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=f._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(f,h){var d=f.get("blendMode")||null;h.eachRendered(function(v){v.isGroup||(v.style.blend=d)})}function l(f,h){if(!f.preventAutoZ){var d=Qc(f);h.eachRendered(function(v){return xT(v,d.z,d.zlevel),!0})}}function u(f,h){h.eachRendered(function(d){if(!ed(d)){var v=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(f,h){var d=f.getModel("stateAnimation"),v=f.isAnimationEnabled(),g=d.get("duration"),m=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(ed(y))return;if(y instanceof et&&x5e(y),y.__dirty){var _=y.prevStates;_&&y.useStates(_)}if(v){y.stateTransition=m;var x=y.getTextContent(),w=y.getTextGuideLine();x&&(x.stateTransition=m),w&&(w.stateTransition=m)}y.__dirty&&a(y)}})}o6=function(f){return new(function(h){q(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(v){for(;v;){var g=v.__ecComponentInfo;if(g!=null)return f._model.getComponent(g.mainType,g.index);v=v.parent}},d.prototype.enterEmphasis=function(v,g){Is(v,g),ji(f)},d.prototype.leaveEmphasis=function(v,g){Ns(v,g),ji(f)},d.prototype.enterBlur=function(v){vQ(v),ji(f)},d.prototype.leaveBlur=function(v){sN(v),ji(f)},d.prototype.enterSelect=function(v){pQ(v),ji(f)},d.prototype.leaveSelect=function(v){gQ(v),ji(f)},d.prototype.getModel=function(){return f.getModel()},d.prototype.getViewOfComponentModel=function(v){return f.getViewOfComponentModel(v)},d.prototype.getViewOfSeriesModel=function(v){return f.getViewOfSeriesModel(v)},d.prototype.getMainProcessVersion=function(){return f[$_]},d}(vJ))(f)},hee=function(f){function h(d,v){for(var g=0;g=0)){l6.push(r);var a=FJ.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function QN(e,t){SO[e]=t}function v4e(e){tK({createCanvas:e})}function _ee(e,t,r){var n=eee("registerMap");n&&n(e,t,r)}function p4e(e){var t=eee("getMap");return t&&t(e)}var xee=Tze;fu(HN,qze);fu(MT,Kze);fu(MT,Qze);fu(HN,f3e);fu(MT,h3e);fu(aee,$3e);XN(gJ);qN(Z3e,ize);QN("default",Jze);Wa({type:Lc,event:Lc,update:Lc},nr);Wa({type:Zx,event:Zx,update:Zx},nr);Wa({type:Q1,event:aN,update:Q1,action:nr,refineEvent:JN,publishNonRefinedEvent:!0});Wa({type:qk,event:aN,update:qk,action:nr,refineEvent:JN,publishNonRefinedEvent:!0});Wa({type:J1,event:aN,update:J1,action:nr,refineEvent:JN,publishNonRefinedEvent:!0});function JN(e,t,r,n){return{eventContent:{selected:p5e(r),isFromClick:t.isFromClick||!1}}}YN("default",{});YN("dark",WJ);var g4e={},u6=[],m4e={registerPreprocessor:XN,registerProcessor:qN,registerPostInit:pee,registerPostUpdate:gee,registerUpdateLifecycle:PT,registerAction:Wa,registerCoordinateSystem:mee,registerLayout:yee,registerVisual:fu,registerTransform:xee,registerLoading:QN,registerMap:_ee,registerImpl:F3e,PRIORITY:oee,ComponentModel:qe,ComponentView:Mt,SeriesModel:bt,ChartView:yt,registerComponentModel:function(e){qe.registerClass(e)},registerComponentView:function(e){Mt.registerClass(e)},registerSeriesModel:function(e){bt.registerClass(e)},registerChartView:function(e){yt.registerClass(e)},registerCustomSeries:function(e,t){ree(e,t)},registerSubTypeDefaulter:function(e,t){qe.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){RK(e,t)}};function We(e){if(ie(e)){j(e,function(t){We(t)});return}$e(u6,e)>=0||(u6.push(e),Te(e)&&(e={install:e}),e.install(m4e))}function Mp(e){return e==null?0:e.length||1}function c6(e){return e}var Rs=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||c6,this._newKeyGetter=i||c6,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var d=0;d1)for(var s=0;s30}var Pp=Pe,Js=se,S4e=typeof Int32Array>"u"?Array:Int32Array,T4e="e\0\0",f6=-1,C4e=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],A4e=["_approximateExtent"],h6,H_,Lp,kp,C2,Op,A2,Ln=function(){function e(t,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;wee(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Li;if(l&&!i.pure)for(var u=[],c=t;c0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),ie(a)?a=a.slice():Pp(a)&&(a=re({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Pp(r)?re(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){Pp(t)?re(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?re(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;Xk(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){j(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Js(this.dimensions,this._getDimInfo,this),this.hostModel)),C2(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];Te(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(iT(arguments)))})},e.internalField=function(){h6=function(t){var r=t._invertedIndicesMap;j(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new S4e(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),e}();function M4e(e,t){return Iv(e,t).dimensions}function Iv(e,t){jN(e)||(e=BN(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=xe(),a=[],o=L4e(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Cee(o),l=n===e.dimensionsDefine,u=l?Tee(e):See(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var f=xe(c),h=new MJ(o),d=0;d0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function L4e(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return j(t,function(a){var o;Pe(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function k4e(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var O4e=function(){function e(t){this.coordSysDims=[],this.axisMap=xe(),this.categoryAxisMap=xe(),this.coordSysName=t}return e}();function D4e(e){var t=e.get("coordinateSystem"),r=new O4e(t),n=E4e[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var E4e={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",Kt).models[0],a=e.getReferringComponents("yAxis",Kt).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Kf(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Kf(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",Kt).models[0];t.coordSysDims=["single"],r.set("single",i),Kf(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",Kt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Kf(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Kf(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();j(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Kf(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(e,t,r,n){var i=e.getReferringComponents("matrix",Kt).models[0];t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Kf(e){return e.get("type")==="category"}function Aee(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;I4e(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,c,f,h;if(j(a,function(_,x){ve(_)&&(a[x]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!i||i===_.coordDim)&&(c=_))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+e.id,h="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,v=c.type,g=0;j(a,function(_){_.coordDim===d&&g++});var m={name:f,coordDim:d,coordDimIndex:g,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:h,coordDim:h,coordDimIndex:g+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,v),y.storeDimIndex=s.ensureCalculationDimension(f,v)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function I4e(e){return!wee(e.schema)}function js(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function eR(e,t){return js(e,t)?e.getCalculationInfo("stackResultDimension"):t}function N4e(e,t){var r=e.get("coordinateSystem"),n=kv.get(r),i;return t&&t.coordSysDims&&(i=se(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=vw(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function R4e(e,t,r){var n,i;return r&&j(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function Vo(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;e?(a=!0,i=BN(e)):(i=n.getSource(),a=i.sourceFormat===Li);var o=D4e(t),s=N4e(t,o),l=r.useEncodeDefaulter,u=Te(l)?l:l?je(cJ,s,t):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Iv(i,c),h=R4e(f.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(f),v=Aee(t,{schema:f,store:d}),g=new Ln(f,t);g.setCalculationInfo(v);var m=h!=null&&j4e(i)?function(y,_,x,w){return w===h?x:this.defaultDimValueGetter(y,_,x,w)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,m),g}function j4e(e){if(e.sourceFormat===Li){var t=B4e(e.data||[]);return!ie(xv(t))}}function B4e(e){for(var t=0;ti&&(o=a.interval=i);var s=a.intervalPrecision=dy(o),l=a.niceTickExtent=[hr(Math.ceil(e[0]/o)*o,s),hr(Math.floor(e[1]/o)*o,s)];return $4e(l,e),a}function M2(e){var t=Math.pow(10,cT(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,hr(r*t)}function dy(e){return Oa(e)+2}function d6(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function $4e(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),d6(e,0,t),d6(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function tR(e,t){return e>=t[0]&&e<=t[1]}var F4e=function(){function e(){this.normalize=v6,this.scale=p6}return e.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=pe(t.normalize,t),this.scale=pe(t.scale,t)):(this.normalize=v6,this.scale=p6)},e}();function v6(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function p6(e,t){return e*(t[1]-t[0])+t[0]}function CO(e,t,r){var n=Math.log(e);return[Math.log(r?t[0]:Math.max(0,t[0]))/n,Math.log(r?t[1]:Math.max(0,t[1]))/n]}var hu=function(){function e(t){this._calculator=new F4e,this._setting=t||{},this._extent=[1/0,-1/0];var r=yr();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return e.prototype.getSetting=function(t){return this._setting[t]},e.prototype._innerUnionExtent=function(t){var r=this._extent;this._innerSetExtent(t[0]r[1]?t[1]:r[1])},e.prototype.unionExtentFromData=function(t,r){this._innerUnionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){this._innerSetExtent(t,r)},e.prototype._innerSetExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(t){var r=yr();r&&this._innerSetBreak(r.parseAxisBreakOption(t,pe(this.parse,this)))},e.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();fT(hu);var V4e=0,vy=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++V4e,this._onCollect=t.onCollect}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&se(n,G4e);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!ve(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,this._onCollect&&this._onCollect(t,r),r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r),this._onCollect&&this._onCollect(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=xe(this.categories))},e}();function G4e(e){return Pe(e)&&e.value!=null?e.value:e+""}var Wd=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new vy({})),ie(i)&&(i=new vy({categories:se(i,function(a){return Pe(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:ve(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return tR(r,this._extent)&&r>=0&&r=0&&r=0&&r=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(hu);hu.registerClass(Wd);var el=hr,Bs=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},t.prototype.contain=function(r){return tR(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=dy(r)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=yr(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]=0&&(f=el(f+h*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var d=l.length?l[l.length-1].value:a[1];return i[1]>d&&(r.expandToNicedExtent?l.push({value:el(d+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(v){return v.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;oa[0]&&v0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function kee(e){var t=U4e(e),r=[];return j(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var v=de(n.get("barWidth"),s),g=de(n.get("barMaxWidth"),s),m=de(n.get("barMinWidth")||(Nee(n)?.5:1),s),y=n.get("barGap"),_=n.get("barCategoryGap"),x=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:_,defaultBarGap:x,axisKey:rR(a),stackId:Pee(n)})}),Oee(r)}function Oee(e){var t={};j(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var r={};return j(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=rt(a).length;s=Math.max(35-l*4,15)+"%"}var u=de(s,o),c=de(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,d=(f-u)/(h+(h-1)*c);d=Math.max(d,0),j(a,function(y){var _=y.maxWidth,x=y.minWidth;if(y.width){var w=y.width;_&&(w=Math.min(w,_)),x&&(w=Math.max(w,x)),y.width=w,f-=w+c*w,h--}else{var w=d;_&&_w&&(w=x),w!==d&&(y.width=w,f-=w+c*w,h--)}}),d=(f-u)/(h+(h-1)*c),d=Math.max(d,0);var v=0,g;j(a,function(y,_){y.width||(y.width=d),g=y,v+=y.width*(1+c)}),g&&(v-=g.width*c);var m=-v/2;j(a,function(y,_){r[i][_]=r[i][_]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+c)})}),r}function Z4e(e,t,r){if(e&&t){var n=e[rR(t)];return n}}function Dee(e,t){var r=Lee(e,t),n=kee(r);j(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=Pee(i),u=n[rR(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function Eee(e){return{seriesType:e,plan:Ov(),reset:function(t){if(Iee(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=js(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=Y4e(i,a),v=Nee(t),g=t.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(x,w){for(var S=x.count,C=v&&mo(S*3),M=v&&l&&mo(S*3),P=v&&mo(S),k=n.master.getRect(),O=h?k.width:k.height,D,I=w.getStore(),N=0;(D=x.next())!=null;){var B=I.get(f?m:o,D),F=I.get(s,D),$=d,G=void 0;f&&(G=+B-I.get(o,D));var z=void 0,U=void 0,H=void 0,Y=void 0;if(h){var Z=n.dataToPoint([B,F]);if(f){var J=n.dataToPoint([G,F]);$=J[0]}z=$,U=Z[1]+_,H=Z[0]-$,Y=y,Math.abs(H)0?r:1:r))}var X4e=function(e,t,r,n){for(;r>>1;e[i][1]i&&(this._approxInterval=i);var o=W_.length,s=Math.min(X4e(W_,this._approxInterval,0,o),o-1);this._interval=W_[s][1],this._intervalPrecision=dy(this._interval),this._minLevelUnit=W_[Math.max(s-1,0)][0]},t.prototype.parse=function(r){return it(r)?r:+$o(r)},t.prototype.contain=function(r){return tR(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.type="time",t}(Bs),W_=[["second",bN],["minute",wN],["hour",Bg],["quarter-day",Bg*6],["half-day",Bg*12],["day",Xi*1.2],["half-week",Xi*3.5],["week",Xi*7],["month",Xi*31],["quarter",Xi*95],["half-year",aV/2],["year",aV]];function Ree(e,t,r,n){return nw(new Date(t),e,n).getTime()===nw(new Date(r),e,n).getTime()}function q4e(e,t){return e/=Xi,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function K4e(e){var t=30*Xi;return e/=t,e>6?6:e>3?3:e>2?2:1}function Q4e(e){return e/=Bg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function g6(e,t){return e/=t?wN:bN,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function J4e(e){return qI(e,!0)}function e$e(e,t,r){var n=Math.max(0,$e(vi,t)-1);return nw(new Date(e),vi[n],r).getTime()}function t$e(e,t){var r=new Date(0);r[e](1);var n=r.getTime();r[e](1+t);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function r$e(e,t,r,n,i,a){var o=1e4,s=vBe,l=0;function u(N,B,F,$,G,z,U){for(var H=t$e(G,N),Y=B,Z=new Date(Y);Yo));)if(Z[G](Z[$]()+N),Y=Z.getTime(),a){var J=a.calcNiceTickMultiple(Y,H);J>0&&(Z[G](Z[$]()+J*N),Y=Z.getTime())}U.push({value:Y,notAdd:!0})}function c(N,B,F){var $=[],G=!B.length;if(!Ree(zg(N),n[0],n[1],r)){G&&(B=[{value:e$e(n[0],N,r)},{value:n[1]}]);for(var z=0;z=n[0]&&U<=n[1]&&u(Y,U,H,Z,J,ae,$),N==="year"&&F.length>1&&z===0&&F.unshift({value:F[0].value-Y})}}for(var z=0;z<$.length;z++)F.push($[z])}}for(var f=[],h=[],d=0,v=0,g=0;g=n[0]&&w<=n[1]&&d++)}var S=i/t;if(d>S*1.5&&v>S/1.5||(f.push(_),d>S||e===s[g]))break}h=[]}}}for(var C=ct(se(f,function(N){return ct(N,function(B){return B.value>=n[0]&&B.value<=n[1]&&!B.notAdd})}),function(N){return N.length>0}),M=[],P=C.length-1,g=0;g0;)a*=10;var s=[MO(i$e(n[0]/a)*a),MO(n$e(n[1]/a)*a)];this._interval=a,this._intervalPrecision=dy(a),this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){e.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.contain=function(r){return r=Z_(r)/Z_(this.base),e.prototype.contain.call(this,r)},t.prototype.normalize=function(r){return r=Z_(r)/Z_(this.base),e.prototype.normalize.call(this,r)},t.prototype.scale=function(r){return r=e.prototype.scale.call(this,r),U_(this.base,r)},t.prototype.setBreaksFromOption=function(r){var n=yr();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,pe(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},t.type="log",t}(Bs);function Y_(e,t){return MO(e,Oa(t))}hu.registerClass(jee);var a$e=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},e.prototype.modifyDataMinMax=function(t,r){this[s$e[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=o$e[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),o$e={min:"_determinedMin",max:"_determinedMax"},s$e={min:"_dataMin",max:"_dataMax"};function Bee(e,t,r){var n=e.rawExtentInfo;return n||(n=new a$e(e,t,r),e.rawExtentInfo=n,n)}function X_(e,t){return t==null?null:hn(t)?NaN:e.parse(t)}function zee(e,t){var r=e.type,n=Bee(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=Lee("bar",o),l=!1;if(j(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=kee(s),c=l$e(i,a,t,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function l$e(e,t,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Z4e(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;j(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;j(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,f=1-(s+l)/a,h=c/f-c;return t+=h*(l/u),e-=h*(s/u),{min:e,max:t}}function ef(e,t){var r=t,n=zee(e,r),i=n.extent,a=r.get("splitNumber");e instanceof jee&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setBreaksFromOption(Fee(r)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function o0(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new Wd({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new nR({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(hu.getClass(t)||Bs)}}function u$e(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function Nv(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var r=pBe(t);return function(i,a){return e.scale.getFormattedLabel(i,a,r)}}else{if(ve(t))return function(i){var a=e.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if(Te(t)){if(e.type==="category")return function(i,a){return t(pw(e,i),i.value-e.scale.getExtent()[0],null)};var n=yr();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),t(pw(e,i),a,o)}}else return function(i){return e.scale.getLabel(i)}}}function pw(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function iR(e){var t=e.get("interval");return t??"auto"}function $ee(e){return e.type==="category"&&iR(e.getLabelModel())===0}function gw(e,t){var r={};return j(e.mapDimensionsAll(t),function(n){r[eR(e,n)]=!0}),rt(r)}function c$e(e,t,r){t&&j(gw(t,r),function(n){var i=t.getApproximateExtent(n);i[0]e[1]&&(e[1]=i[1])})}function Ud(e){return e==="middle"||e==="center"}function py(e){return e.getShallow("show")}function Fee(e){var t=e.get("breaks",!0);if(t!=null)return!yr()||!f$e(e.axis)?void 0:t}function f$e(e){return(e.dim==="x"||e.dim==="y"||e.dim==="z"||e.dim==="single")&&e.type!=="category"}var Rv=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e}();function h$e(e){return Vo(null,e)}var d$e={isDimensionStacked:js,enableDataStack:Aee,getStackedDimension:eR};function v$e(e,t){var r=t;t instanceof Je||(r=new Je(t));var n=o0(r);return n.setExtent(e[0],e[1]),ef(n,r),n}function p$e(e){or(e,Rv)}function g$e(e,t){return t=t||{},Ct(e,null,null,t.state!=="normal")}const m$e=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:M4e,createList:h$e,createScale:v$e,createSymbol:vr,createTextStyle:g$e,dataStack:d$e,enableHoverEmphasis:zl,getECData:Ee,getLayoutRect:Rt,mixinAxisModelCommonMethods:p$e},Symbol.toStringTag,{value:"Module"}));var y$e=1e-8;function m6(e,t){return Math.abs(e-t)i&&(n=o,i=l)}if(n)return x$e(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return j(o,function(s){s.type==="polygon"?y6(s.exterior,i,a,r):j(s.points,function(l){y6(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Oe(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},t.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function PO(e,t){return e=w$e(e),se(ct(e.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new _6(o[0],o.slice(1)));break;case"MultiPolygon":j(i.coordinates,function(l){l[0]&&a.push(new _6(l[0],l.slice(1)))});break;case"LineString":a.push(new x6([i.coordinates]));break;case"MultiLineString":a.push(new x6(i.coordinates))}var s=new Gee(n[t||"name"],a,n.cp);return s.properties=n,s})}const S$e=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Vk,asc:bi,getPercentWithPrecision:VRe,getPixelPrecision:YI,getPrecision:Oa,getPrecisionSafe:$K,isNumeric:KI,isRadianAroundZero:zd,linearMap:vt,nice:qI,numericToNumber:Eo,parseDate:$o,parsePercent:de,quantile:Ux,quantity:VK,quantityExponent:cT,reformIntervals:Gk,remRadian:XI,round:hr},Symbol.toStringTag,{value:"Module"})),T$e=Object.freeze(Object.defineProperty({__proto__:null,format:n0,parse:$o,roundTime:nw},Symbol.toStringTag,{value:"Module"})),C$e=Object.freeze(Object.defineProperty({__proto__:null,Arc:e0,BezierCurve:Tv,BoundingRect:Oe,Circle:Fo,CompoundPath:t0,Ellipse:Jy,Group:Ae,Image:Hr,IncrementalDisplayable:PQ,Line:dr,LinearGradient:vf,Polygon:mn,Polyline:en,RadialGradient:cN,Rect:Ze,Ring:Sv,Sector:gn,Text:nt,clipPointsByRect:vN,clipRectByRect:EQ,createIcon:Av,extendPath:OQ,extendShape:kQ,getShapeClass:oy,getTransform:$l,initProps:Et,makeImage:hN,makePath:Fd,mergePath:yi,registerShape:da,resizePath:dN,updateProps:ot},Symbol.toStringTag,{value:"Module"})),A$e=Object.freeze(Object.defineProperty({__proto__:null,addCommas:LN,capitalFirst:TBe,encodeHTML:Mn,formatTime:SBe,formatTpl:ON,getTextRect:bBe,getTooltipMarker:qQ,normalizeCssArray:Lv,toCamelCase:kN,truncateText:bje},Symbol.toStringTag,{value:"Module"})),M$e=Object.freeze(Object.defineProperty({__proto__:null,bind:pe,clone:Ce,curry:je,defaults:Me,each:j,extend:re,filter:ct,indexOf:$e,inherits:$I,isArray:ie,isFunction:Te,isObject:Pe,isString:ve,map:se,merge:Ve,reduce:oa},Symbol.toStringTag,{value:"Module"}));var P$e=Ke(),Fg=Ke(),Va={estimate:1,determine:2};function mw(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function Wee(e,t){var r=se(t,function(n){return e.scale.parse(n)});return e.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function L$e(e,t){var r=e.getLabelModel().get("customValues");if(r){var n=Nv(e),i=e.scale.getExtent(),a=Wee(e,r),o=ct(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:se(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:e.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return e.type==="category"?O$e(e,t):E$e(e)}function k$e(e,t,r){var n=e.getTickModel().get("customValues");if(n){var i=e.scale.getExtent(),a=Wee(e,n);return{ticks:ct(a,function(o){return o>=i[0]&&o<=i[1]})}}return e.type==="category"?D$e(e,t):{ticks:se(e.scale.getTicks(r),function(o){return o.value})}}function O$e(e,t){var r=e.getLabelModel(),n=Uee(e,r,t);return!r.get("show")||e.scale.isBlank()?{labels:[]}:n}function Uee(e,t,r){var n=N$e(e),i=iR(t),a=r.kind===Va.estimate;if(!a){var o=Yee(n,i);if(o)return o}var s,l;Te(i)?s=Kee(e,i):(l=i==="auto"?R$e(e,r):i,s=qee(e,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return LO(n,i,u),!0}):LO(n,i,u),u}function D$e(e,t){var r=I$e(e),n=iR(t),i=Yee(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),Te(n))a=Kee(e,n,!0);else if(n==="auto"){var s=Uee(e,e.getLabelModel(),mw(Va.determine));o=s.labelCategoryInterval,a=se(s.labels,function(l){return l.tickValue})}else o=n,a=qee(e,o,!0);return LO(r,n,{ticks:a,tickCategoryInterval:o})}function E$e(e){var t=e.scale.getTicks(),r=Nv(e);return{labels:se(t,function(n,i){return{formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var I$e=Zee("axisTick"),N$e=Zee("axisLabel");function Zee(e){return function(r){return Fg(r)[e]||(Fg(r)[e]={list:[]})}}function Yee(e,t){for(var r=0;rc&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=e.dataToCoord(f+1)-e.dataToCoord(f),d=Math.abs(h*Math.cos(a)),v=Math.abs(h*Math.sin(a)),g=0,m=0;f<=s[1];f+=u){var y=0,_=0,x=lT(i({value:f}),n.font,"center","top");y=x.width*1.3,_=x.height*1.3,g=Math.max(g,y,7),m=Math.max(m,_,7)}var w=g/d,S=m/v;isNaN(w)&&(w=1/0),isNaN(S)&&(S=1/0);var C=Math.max(0,Math.floor(Math.min(w,S)));if(r===Va.estimate)return t.out.noPxChangeTryDetermine.push(pe(B$e,null,e,C,l)),C;var M=Xee(e,C,l);return M??C}function B$e(e,t,r){return Xee(e,t,r)==null}function Xee(e,t,r){var n=P$e(e.model),i=e.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-r)<=1&&a>t&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=t,n.axisExtent0=i[0],n.axisExtent1=i[1]}function z$e(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function qee(e,t,r){var n=Nv(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=$ee(e),h=o.get("showMinLabel")||f,d=o.get("showMaxLabel")||f;h&&u!==a[0]&&g(a[0]);for(var v=u;v<=a[1];v+=l)g(v);d&&v-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m,time:void 0,break:void 0})}return s}function Kee(e,t,r){var n=e.scale,i=Nv(e),a=[];return j(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var b6=[0,1],va=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return YI(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),w6(n,i.count())),vt(t,b6,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),w6(n,i.count()));var a=vt(t,n,b6,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=k$e(this,r,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=n.ticks,a=se(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return $$e(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=se(n,function(a){return se(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(t){return t=t||mw(Va.determine),L$e(this,t).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(t){return t=t||mw(Va.determine),j$e(this,t)},e}();function w6(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function $$e(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;j(t,function(d){d.coord-=u/2,d.onBand=!0});var c=e.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},t.push(o)}var f=a[0]>a[1];h(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&h(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),h(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&h(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function h(d,v){return d=hr(d),v=hr(v),f?d>v:di&&(i+=Dp);var d=Math.atan2(s,o);if(d<0&&(d+=Dp),d>=n&&d<=i||d+Dp>=n&&d+Dp<=i)return l[0]=c,l[1]=f,u-r;var v=r*Math.cos(n)+e,g=r*Math.sin(n)+t,m=r*Math.cos(i)+e,y=r*Math.sin(i)+t,_=(v-o)*(v-o)+(g-s)*(g-s),x=(m-o)*(m-o)+(y-s)*(y-s);return _0){t=t/180*Math.PI,Da.fromArray(e[0]),kt.fromArray(e[1]),ur.fromArray(e[2]),ke.sub(yo,Da,kt),ke.sub(fo,ur,kt);var r=yo.len(),n=fo.len();if(!(r<.001||n<.001)){yo.scale(1/r),fo.scale(1/n);var i=yo.dot(fo),a=Math.cos(t);if(a1&&ke.copy(jn,ur),jn.toArray(e[1])}}}}function q$e(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Da.fromArray(e[0]),kt.fromArray(e[1]),ur.fromArray(e[2]),ke.sub(yo,kt,Da),ke.sub(fo,ur,kt);var n=yo.len(),i=fo.len();if(!(n<.001||i<.001)){yo.scale(1/n),fo.scale(1/i);var a=yo.dot(t),o=Math.cos(r);if(a=l)ke.copy(jn,ur);else{jn.scaleAndAdd(fo,s/Math.tan(Math.PI/2-c));var f=ur.x!==kt.x?(jn.x-kt.x)/(ur.x-kt.x):(jn.y-kt.y)/(ur.y-kt.y);if(isNaN(f))return;f<0?ke.copy(jn,kt):f>1&&ke.copy(jn,ur)}jn.toArray(e[1])}}}}function k2(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function K$e(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=us(n[0],n[1]),a=us(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Og([],n[1],n[0],o/i),l=Og([],n[1],n[2],o/a),u=Og([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0){w(O*k,0,a);var D=O+M;D<0&&S(-D*k,1)}else S(-M*k,1)}}function w(M,P,k){M!==0&&(c=!0);for(var O=P;O0)for(var D=0;D0;D--){var F=k[D-1]*B;w(-F,D,a)}}}function C(M){var P=M<0?-1:1;M=Math.abs(M);for(var k=Math.ceil(M/(a-1)),O=0;O0?w(k,0,O+1):w(-k,a-O-1,a),M-=k,M<=0)return}return c}function eFe(e){for(var t=0;t=0&&n.attr(a.oldLayoutSelect),$e(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),ot(n,u,r,l)}else if(n.attr(u),!Mv(n).valueAnimation){var f=be(n.style.opacity,1);n.style.opacity=0,Et(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};q_(d,u,K_),q_(d,n.states.select,K_)}if(n.states.emphasis){var v=a.oldLayoutEmphasis={};q_(v,u,K_),q_(v,n.states.emphasis,K_)}zQ(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=nFe(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),ot(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,Et(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},e}(),E2=Ke();function aFe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=E2(r).labelManager;i||(i=E2(r).labelManager=new iFe),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=E2(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var I2=Math.sin,N2=Math.cos,ite=Math.PI,Vu=Math.PI*2,oFe=180/ite,ate=function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,r){this._add("M",t,r)},e.prototype.lineTo=function(t,r){this._add("L",t,r)},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){this._add("C",t,r,n,i,a,o)},e.prototype.quadraticCurveTo=function(t,r,n,i){this._add("Q",t,r,n,i)},e.prototype.arc=function(t,r,n,i,a,o){this.ellipse(t,r,n,n,0,i,a,o)},e.prototype.ellipse=function(t,r,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=wl(f-Vu)||(c?u>=Vu:-u>=Vu),d=u>0?u%Vu:u%Vu+Vu,v=!1;h?v=!0:wl(f)?v=!1:v=d>=ite==!!c;var g=t+n*N2(o),m=r+i*I2(o);this._start&&this._add("M",g,m);var y=Math.round(a*oFe);if(h){var _=1/this._p,x=(c?1:-1)*(Vu-_);this._add("A",n,i,y,1,+c,t+n*N2(o+x),r+i*I2(o+x)),_>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var w=t+n*N2(s),S=r+i*I2(s);this._add("A",n,i,y,+v,+c,w,S)}},e.prototype.rect=function(t,r,n,i){this._add("M",t,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,r,n,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h"}function pFe(e){return""}function lR(e,t){t=t||{};var r=t.newline?` +`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return vFe(o,s)+(o!=="style"?Mn(l):l||"")+(a?""+r+se(a,function(u){return n(u)}).join(r)+r:"")+pFe(o)}return n(e)}function gFe(e,t,r){r=r||{};var n=r.newline?` +`:"",i=" {"+n,a=n+"}",o=se(rt(e),function(l){return l+i+se(rt(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),s=se(rt(t),function(l){return"@keyframes "+l+i+se(rt(t[l]),function(u){return u+i+se(rt(t[l][u]),function(c){var f=t[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function IO(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function P6(e,t,r,n){return Br("svg","root",{width:e,height:t,xmlns:ote,"xmlns:xlink":ste,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var mFe=0;function ute(){return mFe++}var L6={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Ku="transform-origin";function yFe(e,t,r){var n=re({},e.shape);re(n,t),e.buildPath(r,n);var i=new ate;return i.reset(LK(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function _Fe(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[Ku]=r+"px "+n+"px")}var xFe={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function cte(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function bFe(e,t,r){var n=e.shape.paths,i={},a,o;if(j(n,function(l){var u=IO(r.zrId);u.animation=!0,kT(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=rt(c),d=h.length;if(d){o=h[d-1];var v=c[o];for(var g in v){var m=v[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in f){var _=f[y].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){t.d=!1;var s=cte(i,r);return a.replace(o,s)}}function k6(e){return ve(e)?L6[e]?"cubic-bezier("+L6[e]+")":HI(e)?e:"":""}function kT(e,t,r,n){var i=e.animators,a=i.length,o=[];if(e instanceof t0){var s=bFe(e,t,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Fe=cte(M,r);return Fe+" "+_[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+ute();r.cssNodes["."+y]={animation:o.join(",")},t.class=y}}function wFe(e,t,r){if(!e.ignore)if(e.isSilent()){var n={"pointer-events":"none"};O6(n,t,r)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&s||o;l&&(a=W1(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&e.transform?e.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),O6(n,t,r)}}function O6(e,t,r,n){var i=JSON.stringify(e),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+ute(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=e),t.class=t.class?t.class+" "+a:a}var gy=Math.round;function fte(e){return e&&ve(e.src)}function hte(e){return e&&Te(e.toDataURL)}function uR(e,t,r,n){fFe(function(i,a){var o=i==="fill"||i==="stroke";o&&PK(a)?vte(t,e,i,n):o&&UI(a)?pte(r,e,i,n):e[i]=a,o&&n.ssr&&a==="none"&&(e["pointer-events"]="visible")},t,r,!1),LFe(r,e,n)}function cR(e,t){var r=jK(t);r&&(r.each(function(n,i){n!=null&&(e[(M6+i).toLowerCase()]=n+"")}),t.isSilent()&&(e[M6+"silent"]="true"))}function D6(e){return wl(e[0]-1)&&wl(e[1])&&wl(e[2])&&wl(e[3]-1)}function SFe(e){return wl(e[4])&&wl(e[5])}function fR(e,t,r){if(t&&!(SFe(t)&&D6(t))){var n=1e4;e.transform=D6(t)?"translate("+gy(t[4]*n)/n+" "+gy(t[5]*n)/n+")":iRe(t)}}function E6(e,t,r){for(var n=e.points,i=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";pn(h,m),pn(d,m)}else if(h==null||d==null){var y=function(O,D){if(O){var I=O.elm,N=h||D.width,B=d||D.height;O.tag==="pattern"&&(u?(B=1,N/=a.width):c&&(N=1,B/=a.height)),O.attrs.width=N,O.attrs.height=B,I&&(I.setAttribute("width",N),I.setAttribute("height",B))}},_=tN(v,null,e,function(O){l||y(C,O),y(f,O)});_&&_.width&&_.height&&(h=h||_.width,d=d||_.height)}f=Br("image","img",{href:v,width:h,height:d}),o.width=h,o.height=d}else i.svgElement&&(f=Ce(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var x,w;l?x=w=1:u?(w=1,x=o.width/a.width):c?(x=1,w=o.height/a.height):o.patternUnits="userSpaceOnUse",x!=null&&!isNaN(x)&&(o.width=x),w!=null&&!isNaN(w)&&(o.height=w);var S=kK(i);S&&(o.patternTransform=S);var C=Br("pattern","",o,[f]),M=lR(C),P=n.patternCache,k=P[M];k||(k=n.zrId+"-p"+n.patternIdx++,P[M]=k,o.id=k,C=n.defs[k]=Br("pattern",k,o,[f])),t[r]=sT(k)}}function kFe(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[e.id]=a,i[a]=Br("clipPath",a,o,[dte(e,r)])}t["clip-path"]=sT(a)}function R6(e){return document.createTextNode(e)}function ic(e,t,r){e.insertBefore(t,r)}function j6(e,t){e.removeChild(t)}function B6(e,t){e.appendChild(t)}function gte(e){return e.parentNode}function mte(e){return e.nextSibling}function R2(e,t){e.textContent=t}var z6=58,OFe=120,DFe=Br("","");function NO(e){return e===void 0}function so(e){return e!==void 0}function EFe(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(n[a]=i)}return n}function lg(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function my(e){var t,r=e.children,n=e.tag;if(so(n)){var i=e.elm=lte(n);if(hR(DFe,e),ie(r))for(t=0;ta?(v=r[l+1]==null?null:r[l+1].elm,yte(e,v,r,i,l)):ww(e,t,n,a))}function dh(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(hR(e,t),NO(t.text)?so(n)&&so(i)?n!==i&&IFe(r,n,i):so(i)?(so(e.text)&&R2(r,""),yte(r,null,i,0,i.length-1)):so(n)?ww(r,n,0,n.length-1):so(e.text)&&R2(r,""):e.text!==t.text&&(so(n)&&ww(r,n,0,n.length-1),R2(r,t.text)))}function NFe(e,t){if(lg(e,t))dh(e,t);else{var r=e.elm,n=gte(r);my(t),n!==null&&(ic(n,t.elm,mte(r)),ww(n,[e],0,0))}return t}var RFe=0,jFe=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=$6(),this.configLayer=$6(),this.storage=r,this._opts=n=re({},n),this.root=t,this._id="zr"+RFe++,this._oldVNode=P6(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=lte("svg");hR(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",NFe(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return N6(t,IO(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=IO(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=BFe(n,i,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=Br("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=se(rt(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(Br("defs","defs",{},u)),t.animation){var c=gFe(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=Br("style","stl",{},[],c);o.push(f)}}return P6(n,i,o,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},lR(this.renderToVNode({animation:be(t.cssAnimation,!0),emphasis:be(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:be(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var i=t.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(h&&l&&h[g]===l[g]);g--);for(var m=v-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y=s)}}for(var f=this.__startIndex;f15)break}}B.prevElClipPaths&&y.restore()};if(_)if(_.length===0)P=m.__endIndex;else for(var O=d.dpr,D=0;D<_.length;++D){var I=_[D];y.save(),y.beginPath(),y.rect(I.x*O,I.y*O,I.width*O,I.height*O),y.clip(),k(I),y.restore()}else y.save(),k(),y.restore();m.__drawIndex=P,m.__drawIndex0&&t>i[0]){for(l=0;lt);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i0?Q_:0),this._needsManuallyCompositing),c.__builtin__||rT("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&mi&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,j(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?Ve(n[t],r,!0):n[t]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill=K.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(bt);function Zd(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Gd(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(t[a])}return n.join(" ")}var s0=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=vr(r,-1,-1,2,2,null,s);l.attr({z2:be(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=UFe,this._symbolType=r,this.add(l)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Is(this.childAt(0))},t.prototype.downplay=function(){Ns(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=t.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var h=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,h)}else{var d=this.childAt(0);d.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?d.attr(v):ot(d,v,s,n),ua(d)}if(this._updateCommon(r,n,l,i,a),c){var d=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,Et(d,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,h,d,v,g,m,y;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,d=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,v=a.emphasisDisabled),!a||r.hasItemOption){var _=a&&a.itemModel?a.itemModel:r.getItemModel(n),x=_.getModel("emphasis");u=x.getModel("itemStyle").getItemStyle(),f=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),h=x.get("focus"),d=x.get("blurScope"),v=x.get("disabled"),g=kr(_),m=x.getShallow("scale"),y=_.getShallow("cursor")}var w=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var S=yf(r.getItemVisual(n,"symbolOffset"),i);S&&(s.x=S[0],s.y=S[1]),y&&s.attr("cursor",y);var C=r.getItemVisual(n,"style"),M=C.fill;if(s instanceof Hr){var P=s.style;s.useStyle(re({image:P.image,x:P.x,y:P.y,width:P.width,height:P.height},C))}else s.__isEmptyBrush?s.useStyle(re({},C)):s.useStyle(C),s.style.decal=null,s.setColor(M,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var k=r.getItemVisual(n,"liftZ"),O=this._z2;k!=null?O==null&&(this._z2=s.z2,s.z2+=k):O!=null&&(s.z2=O,this._z2=null);var D=o&&o.useNameLabel;Fr(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:M,defaultOpacity:C.opacity});function I(F){return D?r.getName(F):Zd(r,F)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var N=s.ensureState("emphasis");N.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var B=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;N.scaleX=this._sizeX*B,N.scaleY=this._sizeY*B,this.setSymbolScale(1),$t(this,h,d,v)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Ee(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Yl(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Yl(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return Ev(r.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},t}(Ae);function UFe(e,t){this.parent.drift(e,t)}function B2(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function G6(e){return e!=null&&!Pe(e)&&(e={isIgnore:e}),e||{}}function H6(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:kr(t),cursorStyle:t.get("cursor")}}var l0=function(){function e(t){this.group=new Ae,this._SymbolCtor=t||s0}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=G6(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=H6(t),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return t.getItemLayout(f)};a||n.removeAll(),t.diff(a).add(function(f){var h=c(f);if(B2(t,h,f,r)){var d=new o(t,f,l,u);d.setPosition(h),t.setItemGraphicEl(f,d),n.add(d)}}).update(function(f,h){var d=a.getItemGraphicEl(h),v=c(f);if(!B2(t,v,f,r)){n.remove(d);return}var g=t.getItemVisual(f,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==g)n.remove(d),d=new o(t,f,l,u),d.setPosition(v);else{d.updateData(t,f,l,u);var y={x:v[0],y:v[1]};s?d.attr(y):ot(d,y,i)}n.add(d),t.setItemGraphicEl(f,d)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=H6(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=G6(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function bte(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function YFe(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function XFe(e,t,r,n,i,a,o,s){for(var l=YFe(e,t),u=[],c=[],f=[],h=[],d=[],v=[],g=[],m=xte(i,t,o),y=e.getLayout("points")||[],_=t.getLayout("points")||[],x=0;x=i||g<0)break;if(Dc(y,_)){if(l){g+=a;continue}break}if(g===r)e[a>0?"moveTo":"lineTo"](y,_),f=y,h=_;else{var x=y-u,w=_-c;if(x*x+w*w<.5){g+=a;continue}if(o>0){for(var S=g+a,C=t[S*2],M=t[S*2+1];C===y&&M===_&&m=n||Dc(C,M))d=y,v=_;else{O=C-u,D=M-c;var B=y-u,F=C-y,$=_-c,G=M-_,z=void 0,U=void 0;if(s==="x"){z=Math.abs(B),U=Math.abs(F);var H=O>0?1:-1;d=y-H*z*o,v=_,I=y+H*U*o,N=_}else if(s==="y"){z=Math.abs($),U=Math.abs(G);var Y=D>0?1:-1;d=y,v=_-Y*z*o,I=y,N=_+Y*U*o}else z=Math.sqrt(B*B+$*$),U=Math.sqrt(F*F+G*G),k=U/(U+z),d=y-O*o*(1-k),v=_-D*o*(1-k),I=y+O*o*k,N=_+D*o*k,I=tl(I,rl(C,y)),N=tl(N,rl(M,_)),I=rl(I,tl(C,y)),N=rl(N,tl(M,_)),O=I-y,D=N-_,d=y-O*z/U,v=_-D*z/U,d=tl(d,rl(u,y)),v=tl(v,rl(c,_)),d=rl(d,tl(u,y)),v=rl(v,tl(c,_)),O=y-d,D=_-v,I=y+O*U/z,N=_+D*U/z}e.bezierCurveTo(f,h,d,v,y,_),f=I,h=N}else e.lineTo(y,_)}u=y,c=_,g+=a}return m}var wte=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),qFe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new wte},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Dc(i[o*2-2],i[o*2-1]);o--);for(;a=0){var w=u?(v-l)*x+l:(d-s)*x+s;return u?[r,w]:[w,r]}s=d,l=v;break;case o.C:d=a[f++],v=a[f++],g=a[f++],m=a[f++],y=a[f++],_=a[f++];var S=u?G1(s,d,g,y,r,c):G1(l,v,m,_,r,c);if(S>0)for(var C=0;C=0){var w=u?Nr(l,v,m,_,M):Nr(s,d,g,y,M);return u?[r,w]:[w,r]}}s=y,l=_;break}}},t}(et),KFe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(wte),Ste=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new KFe},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Dc(i[s*2-2],i[s*2-1]);s--);for(;ot){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function eVe(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=t.getAxis(i),u=se(a.stops,function(x){return{coord:l.toGlobalCoord(l.dataToCoord(x.value)),color:x.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=JFe(u,i==="x"?r.getWidth():r.getHeight()),d=h.length;if(!d&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var v=10,g=h[0].coord-v,m=h[d-1].coord+v,y=m-g;if(y<.001)return"transparent";j(h,function(x){x.offset=(x.coord-g)/y}),h.push({offset:d?h[d-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:f[0]||"transparent"});var _=new vf(0,0,0,0,h,!0);return _[i]=g,_[i+"2"]=m,_}}}function tVe(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&rVe(a,t))){var o=t.mapDimension(a.dim),s={};return j(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function rVe(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function nVe(e,t){return isNaN(e)||isNaN(t)}function iVe(e){for(var t=e.length/2;t>0&&nVe(e[t*2-2],e[t*2-1]);t--);return t-1}function X6(e,t){return[e[t*2],e[t*2+1]]}function aVe(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function Ate(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var U=v.getState("emphasis").style;U.lineWidth=+v.style.lineWidth+1}Ee(v).seriesIndex=r.seriesIndex,$t(v,$,G,z);var H=Y6(r.get("smooth")),Y=r.get("smoothMonotone");if(v.setShape({smooth:H,smoothMonotone:Y,connectNulls:M}),g){var Z=s.getCalculationInfo("stackedOnSeries"),J=0;g.useStyle(Me(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Z&&(J=Y6(Z.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:J,smoothMonotone:Y,connectNulls:M}),Lr(g,r,"areaStyle"),Ee(g).seriesIndex=r.seriesIndex,$t(g,$,G,z)}var ae=this._changePolyState;s.eachItemGraphicEl(function(ce){ce&&(ce.onHoverStateChange=ae)}),this._polyline.onHoverStateChange=ae,this._data=s,this._coordSys=a,this._stackedOnPoints=S,this._points=c,this._step=O,this._valueOrigin=x,r.get("triggerLineEvent")&&(this.packEventData(r,v),g&&this.packEventData(r,g))},t.prototype.packEventData=function(r,n){Ee(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Yc(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=r.get("zlevel")||0,d=r.get("z")||0;u=new s0(o,s),u.x=c,u.y=f,u.setZ(h,d);var v=u.getSymbolPath().getTextContent();v&&(v.zlevel=h,v.z=d,v.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else yt.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Yc(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else yt.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;ew(this._polyline,r),n&&ew(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new qFe({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Ste({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");Te(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=Te(f)?f(null):f;r.eachItemGraphicEl(function(d,v){var g=d;if(g){var m=[d.x,d.y],y=void 0,_=void 0,x=void 0;if(i)if(o){var w=i,S=n.pointToCoord(m);a?(y=w.startAngle,_=w.endAngle,x=-S[1]/180*Math.PI):(y=w.r0,_=w.r,x=S[0])}else{var C=i;a?(y=C.x,_=C.x+C.width,x=d.x):(y=C.y+C.height,_=C.y,x=d.y)}var M=_===y?0:(x-y)/(_-y);l&&(M=1-M);var P=Te(f)?f(v):c*M+h,k=g.getSymbolPath(),O=k.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:P}),O&&O.animateFrom({style:{opacity:0}},{duration:300,delay:P}),k.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(Ate(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new nt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=iVe(l);c>=0&&(Fr(s,kr(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,h,d){return d!=null?_te(o,d):Zd(o,f)},enableTextSetter:!0},oVe(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),v=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),_=m.inverse,x=n.shape,w=_?y?x.x:x.y+x.height:y?x.x+x.width:x.y,S=(y?g:0)*(_?-1:1),C=(y?0:-g)*(_?-1:1),M=y?"x":"y",P=aVe(f,w,M),k=P.range,O=k[1]-k[0],D=void 0;if(O>=1){if(O>1&&!d){var I=X6(f,k[0]);u.attr({x:I[0]+S,y:I[1]+C}),o&&(D=h.getRawValue(k[0]))}else{var I=c.getPointOn(w,M);I&&u.attr({x:I[0]+S,y:I[1]+C});var N=h.getRawValue(k[0]),B=h.getRawValue(k[1]);o&&(D=KK(i,v,N,B,P.t))}a.lastFrameIndex=k[0]}else{var F=r===1||a.lastFrameIndex>0?k[0]:0,I=X6(f,F);o&&(D=h.getRawValue(F)),u.attr({x:I[0]+S,y:I[1]+C})}if(o){var $=Mv(u);typeof $.setLabelText=="function"&&$.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,h=XFe(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,v=h.stackedOnCurrent,g=h.next,m=h.stackedOnNext;if(o&&(v=nl(h.stackedOnCurrent,h.current,i,o,l),d=nl(h.current,null,i,o,l),m=nl(h.stackedOnNext,h.next,i,o,l),g=nl(h.next,null,i,o,l)),Z6(d,g)>3e3||c&&Z6(v,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=d;var y={shape:{points:g}};h.current!==d&&(y.shape.__points=h.next),u.stopAnimation(),ot(u,y,f),c&&(c.setShape({points:d,stackedOnPoints:v}),c.stopAnimation(),ot(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],x=h.status,w=0;wt&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var v=void 0;ve(a)?v=lVe[a]:Te(a)&&(v=a),v&&t.setData(i.downSample(i.mapDimension(u.dim),1/d,v,uVe))}}}}}function cVe(e){e.registerChartView(sVe),e.registerSeriesModel(WFe),e.registerLayout(c0("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Mte("line"))}var yy=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return Vo(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)j(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var v=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),m=o[d],y=n[d]==="x1"||n[d]==="y1";if(y&&!g&&(m+=1),v.length<2)return;if(v.length===2){s[d]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var _=void 0,x=void 0,w=1,S=0;Sm){x=(C+_)/2;break}S===1&&(w=M-v[0].tickValue)}x==null&&(_?_&&(x=v[v.length-1].coord):x=v[0].coord),s[d]=h.toGlobalCoord(x)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(bt);bt.registerClass(yy);var fVe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return Vo(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=cu(yy.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:K.color.primary,borderWidth:2}},realtimeSort:!1}),t}(yy),hVe=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Sw=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new hVe},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,d=Math.PI*2,v=h?f-cMath.PI/2&&cs)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){xs(a,r,Ee(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(yt),q6={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=$2(t.x,e.x),s=F2(t.x+t.width,i),l=$2(t.y,e.y),u=F2(t.y+t.height,a),c=si?s:o,t.y=f&&l>a?u:l,t.width=c?0:s-o,t.height=f?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=F2(t.r,e.r),a=$2(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},K6={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new Ze({shape:re({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?Sw:gn,c=new u({shape:n,z2:1});c.name="item";var f=Pte(i);if(c.calculateTextPosition=dVe(f,{isRoundCap:u===Sw}),a){var h=c.shape,d=i?"r":"endAngle",v={};h[d]=i?n.r0:n.startAngle,v[d]=n[d],(s?ot:Et)(c,{shape:v},a)}return c}};function mVe(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function Q6(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?ot:Et)(r,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(o?ot:Et)(r,{shape:u},c,i)}function J6(e,t){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function xVe(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function Pte(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function tG(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=e.shape,f=_o(n.getModel("itemStyle"),c,!0);re(c,f),e.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var h=n.getShallow("cursor");h&&e.attr("cursor",h);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",v=kr(n);Fr(e,v,{labelFetcher:a,labelDataIndex:r,defaultText:Zd(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=e.getTextContent();if(s&&g){var m=n.get(["label","position"]);e.textConfig.inside=m==="middle"?!0:null,vVe(e,m==="outside"?d:m,Pte(o),n.get(["label","rotate"]))}BQ(g,v,a.getRawValue(r),function(_){return _te(t,_)});var y=n.getModel(["emphasis"]);$t(e,y.get("focus"),y.get("blurScope"),y.get("disabled")),Lr(e,n),xVe(i)&&(e.style.fill="none",e.style.stroke="none",j(e.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function bVe(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var wVe=function(){function e(){}return e}(),rG=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new wVe},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?r:null},30,!1);function SVe(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,f=a.length/3;c=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function Lte(e,t,r){if(Xl(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function TVe(e,t,r){var n=e.type==="polar"?gn:Ze;return new n({shape:Lte(t,r,e),silent:!0,z2:0})}function CVe(e){e.registerChartView(gVe),e.registerSeriesModel(fVe),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,je(Dee,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Eee("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Mte("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var aG=Math.PI*2,rx=Math.PI/180;function AVe(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=rJ(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,h=-n.get("startAngle")*rx,d=n.get("endAngle"),v=n.get("padAngle")*rx;d=d==="auto"?h-aG:-d*rx;var g=n.get("minAngle")*rx,m=g+v,y=0;i.each(a,function(G){!isNaN(G)&&y++});var _=i.getSum(a),x=Math.PI/(_||y)*2,w=n.get("clockwise"),S=n.get("roseType"),C=n.get("stillShowZeroSum"),M=i.getDataExtent(a);M[0]=0;var P=w?1:-1,k=[h,d],O=P*v/2;pT(k,!w),h=k[0],d=k[1];var D=kte(n);D.startAngle=h,D.endAngle=d,D.clockwise=w,D.cx=s,D.cy=l,D.r=u,D.r0=c;var I=Math.abs(d-h),N=I,B=0,F=h;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(G,z){var U;if(isNaN(G)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:s,cy:l,r0:c,r:S?NaN:u});return}S!=="area"?U=_===0&&C?x:G*x:U=I/y,UU?(Y=F+P*U/2,Z=Y):(Y=F+O,Z=H-O),i.setItemLayout(z,{angle:U,startAngle:Y,endAngle:Z,clockwise:w,cx:s,cy:l,r0:c,r:S?vt(G,M,[c,u]):u}),F=H}),Nr?y:m,S=Math.abs(x.label.y-r);if(S>=w.maxY){var C=x.label.x-t-x.len2*i,M=n+x.len,P=Math.abs(C)e.unconstrainedWidth?null:h:null;n.setStyle("width",d)}Dte(a,n)}}}function Dte(e,t){sG.rect=e,rte(sG,t,LVe)}var LVe={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},sG={};function V2(e){return e.position==="center"}function kVe(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*MVe,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function d(C){C.ignore=!0}function v(C){if(!C.ignore)return!0;for(var M in C.states)if(C.states[M].ignore===!1)return!0;return!1}t.each(function(C){var M=t.getItemGraphicEl(C),P=M.shape,k=M.getTextContent(),O=M.getTextGuideLine(),D=t.getItemModel(C),I=D.getModel("label"),N=I.get("position")||D.get(["emphasis","label","position"]),B=I.get("distanceToLabelLine"),F=I.get("alignTo"),$=de(I.get("edgeDistance"),u),G=I.get("bleedMargin");G==null&&(G=Math.min(u,h)>200?10:2);var z=D.getModel("labelLine"),U=z.get("length");U=de(U,u);var H=z.get("length2");if(H=de(H,u),Math.abs(P.endAngle-P.startAngle)0?"right":"left":Z>0?"left":"right"}var ze=Math.PI,Ue=0,ht=I.get("rotate");if(it(ht))Ue=ht*(ze/180);else if(N==="center")Ue=0;else if(ht==="radial"||ht===!0){var Bt=Z<0?-Y+ze:-Y;Ue=Bt}else if(ht==="tangential"&&N!=="outside"&&N!=="outer"){var Jt=Math.atan2(Z,J);Jt<0&&(Jt=ze*2+Jt);var On=J>0;On&&(Jt=ze+Jt),Ue=Jt-ze}if(a=!!Ue,k.x=ae,k.y=ce,k.rotation=Ue,k.setStyle({verticalAlign:"middle"}),_e){k.setStyle({align:Fe});var Yn=k.states.select;Yn&&(Yn.x+=k.x,Yn.y+=k.y)}else{var Wr=new Oe(0,0,0,0);Dte(Wr,k),r.push({label:k,labelLine:O,position:N,len:U,len2:H,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new ke(Z,J),linePoints:ge,textAlign:Fe,labelDistance:B,labelAlignTo:F,edgeDistance:$,bleedMargin:G,rect:Wr,unconstrainedWidth:Wr.width,labelStyleWidth:k.style.width})}M.setTextConfig({inside:_e})}}),!a&&e.get("avoidLabelOverlap")&&PVe(r,n,i,l,u,h,c,f);for(var g=0;g0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},t.type="pie",t}(yt);function Bv(e,t,r){t=ie(t)&&{coordDimensions:t}||re({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=Iv(n,t).dimensions,a=new Ln(i,e);return a.initData(n,r),a}var zv=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}(),EVe=Ke(),Ete=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new zv(pe(this.getData,this),pe(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Bv(this,{coordDimensions:["value"],encodeDefaulter:je(EN,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=EVe(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=FK(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){Zc(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(bt);ABe({fullType:Ete.type,getCoord2:function(e){return e.getShallow("center")}});function IVe(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(it(o)&&!isNaN(o)&&o<0)})}}}function NVe(e){e.registerChartView(DVe),e.registerSeriesModel(Ete),ZJ("pie",e.registerAction),e.registerLayout(je(AVe,"pie")),e.registerProcessor(jv("pie")),e.registerProcessor(IVe("pie"))}var RVe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return Vo(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:K.color.primary}},universalTransition:{divideShape:"clone"}},t}(bt),Ite=4,jVe=function(){function e(){}return e}(),BVe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new jVe},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(r>=f&&n>=h&&r<=f+s&&n<=h+l)return u}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h=0&&(u.dataIndex=f+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),$Ve=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=c0("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new zVe:new l0,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(yt),Nte={left:0,right:0,top:0,bottom:0},Tw=["25%","25%"],FVe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(r,n){var i=gf(r.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&No(r.outerBounds,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&No(this.option.outerBounds,r.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:Nte,outerBoundsContain:"all",outerBoundsClampWidth:Tw[0],outerBoundsClampHeight:Tw[1],backgroundColor:K.color.transparent,borderWidth:1,borderColor:K.color.neutral30},t}(qe),jO=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Kt).models[0]},t.type="cartesian2dAxis",t}(qe);or(jO,Rv);var Rte={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:K.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:K.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:K.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[K.color.backgroundTint,K.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:K.color.neutral00,borderColor:K.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},VVe=Ve({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},Rte),dR=Ve({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:K.color.axisMinorSplitLine,width:1}}},Rte),GVe=Ve({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},dR),HVe=Me({logBase:10},dR);const jte={category:VVe,value:dR,time:GVe,log:HVe};var WVe={value:1,category:1,time:1,log:1},BO=null;function UVe(e){BO||(BO=e)}function f0(){return BO}function Yd(e,t,r,n){j(WVe,function(i,a){var o=Ve(Ve({},jte[a],!0),n,!0),s=function(l){q(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=ly(this),d=h?gf(c):{},v=f.getTheme();Ve(c,v.get(a+"Axis")),Ve(c,this.getDefaultOption()),c.type=lG(c),h&&No(c,d,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=vy.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=f0();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",lG)}function lG(e){return e.type||(e.data?"category":"value")}var ZVe=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return se(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),ct(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}(),zO=["x","y"];function uG(e){return(e.type==="interval"||e.type==="time")&&!e.hasBreaks()}var YVe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=zO,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!uG(r)||!uG(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,d=o[1]-a[0]*f,v=this._transform=[c,0,0,f,h,d];this._invTransform=sa([],v)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Oe(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return ir(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return ir(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Oe(a,o,s,l)},t}(ZVe),Bte=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(va),OT="expandAxisBreak",zte="collapseAxisBreak",$te="toggleAxisBreak",vR="axisbreakchanged",XVe={type:OT,event:vR,update:"update",refineEvent:pR},qVe={type:zte,event:vR,update:"update",refineEvent:pR},KVe={type:$te,event:vR,update:"update",refineEvent:pR};function pR(e,t,r,n){var i=[];return j(e,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function QVe(e){e.registerAction(XVe,t),e.registerAction(qVe,t),e.registerAction(KVe,t);function t(r,n){var i=[],a=Jh(n,r);function o(s,l){j(a[s],function(u){var c=u.updateAxisBreaks(r);j(c.breaks,function(f){var h;i.push(Me((h={},h[l]=u.componentIndex,h),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Sl=Math.PI,JVe=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],e6e=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Xd=Ke(),Fte=Ke(),Vte=function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},e}();function t6e(e,t,r,n){var i=r.axis,a=t.ensureRecord(r),o=[],s,l=gR(e.axisName)&&Ud(e.nameLocation);j(n,function(v){var g=Ro(v);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?sa(Ep,m.transform):Xy(Ep),g.transform&&Na(Ep,Ep,g.transform),Oe.copy(nx,g.localRect),nx.applyTransform(Ep),s?s.union(nx):Oe.copy(s=new Oe(0,0,0,0),nx))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(v,g){return Math.abs(v.label[u]-c)-Math.abs(g.label[u]-c)}),l&&s){var f=i.getExtent(),h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1])-h;s.union(new Oe(h,0,d,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Ep=zr(),nx=new Oe(0,0,0,0),Gte=function(e,t,r,n,i,a){if(Ud(e.nameLocation)){var o=a.stOccupiedRect;o&&Hte(J$e({},o,a.transGroup.transform),n,i)}else Wte(a.labelInfoList,a.dirVec,n,i)};function Hte(e,t,r){var n=new ke;LT(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&kO(t,n)}function Wte(e,t,r,n){for(var i=ke.dot(n,t)>=0,a=0,o=e.length;a0?"top":"bottom",a="center"):zd(i-Sl)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),r6e=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],n6e={axisLine:function(e,t,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],f=[l[1],0],h=c[0]>f[0];u&&(ir(c,c,u),ir(f,f,u));var d=re({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())f0().buildAxisBreakLine(n,i,a,v);else{var g=new dr(re({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},v));Vd(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);ve(m)&&(m=[m,m]),(ve(y)||it(y))&&(y=[y,y]);var _=yf(n.get(["axisLine","symbolOffset"])||0,y),x=y[0],w=y[1];j([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(S,C){if(m[C]!=="none"&&m[C]!=null){var M=vr(m[C],-x/2,-w/2,x,w,d.stroke,!0),P=S.r+S.offset,k=h?f:c;M.attr({rotation:S.rotate,x:k[0]+P*Math.cos(e.rotation),y:k[1]-P*Math.sin(e.rotation),silent:!0,z2:11}),i.add(M)}})}}},axisTickLabelEstimate:function(e,t,r,n,i,a,o,s){var l=fG(t,i,s);l&&cG(e,t,r,n,i,a,o,Va.estimate)},axisTickLabelDetermine:function(e,t,r,n,i,a,o,s){var l=fG(t,i,s);l&&cG(e,t,r,n,i,a,o,Va.determine);var u=s6e(e,i,a,n);o6e(e,t.labelLayoutList,u),l6e(e,i,a,n,e.tickDirection)},axisName:function(e,t,r,n,i,a,o,s){var l=r.ensureRecord(n);t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=e.axisName;if(gR(u)){var c=e.nameLocation,f=e.nameDirection,h=n.getModel("nameTextStyle"),d=n.get("nameGap")||0,v=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new ke(0,0),y=new ke(0,0);c==="start"?(m.x=v[0]-g*d,y.x=-g):c==="end"?(m.x=v[1]+g*d,y.x=g):(m.x=(v[0]+v[1])/2,m.y=e.labelOffset+f*d,y.y=f);var _=zr();y.transform(Hs(_,_,e.rotation));var x=n.get("nameRotate");x!=null&&(x=x*Sl/180);var w,S;Ud(c)?w=$n.innerTextLayout(e.rotation,x??e.rotation,f):(w=i6e(e.rotation,c,x||0,v),S=e.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(w.rotation)),!isFinite(S)&&(S=null)));var C=h.getFont(),M=n.get("nameTruncate",!0)||{},P=M.ellipsis,k=Qr(e.raw.nameTruncateMaxWidth,M.maxWidth,S),O=s.nameMarginLevel||0,D=new nt({x:m.x,y:m.y,rotation:w.rotation,silent:$n.isLabelSilent(n),style:Ct(h,{text:u,font:C,overflow:"truncate",width:k,ellipsis:P,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||w.textAlign,verticalAlign:h.get("verticalAlign")||w.textVerticalAlign}),z2:1});if(Us({el:D,componentModel:n,itemName:u}),D.__fullText=u,D.anid="name",n.get("triggerEvent")){var I=$n.makeAxisEventDataBase(n);I.targetType="axisName",I.name=u,Ee(D).eventData=I}a.add(D),D.updateTransform(),t.nameEl=D;var N=l.nameLayout=Ro({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Ud(c)?JVe[O]:e6e[O]});if(l.nameLocation=c,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&N){var B=r.ensureRecord(n);r.resolveAxisNameOverlap(e,r,n,N,y,B)}}}};function cG(e,t,r,n,i,a,o,s){Zte(t)||u6e(e,t,i,s,n,o);var l=t.labelLayoutList;c6e(e,n,l,a),d6e(n,e.rotation,l);var u=e.optionHideOverlap;a6e(n,l,u),u&&nte(ct(l,function(c){return c&&!c.label.ignore})),t6e(e,r,n,l)}function i6e(e,t,r,n){var i=XI(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return zd(i-Sl/2)?(o=l?"bottom":"top",a="center"):zd(i-Sl*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iSl/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function a6e(e,t,r){if($ee(e.axis))return;function n(s,l,u){var c=Ro(t[l]),f=Ro(t[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){ug(c.label);return}if(f.suggestIgnore){ug(f.label);return}var h=.1;if(!r){var d=[0,0,0,0];c=OO({marginForce:d},c),f=OO({marginForce:d},f)}LT(c,f,null,{touchThreshold:h})&&ug(s?f.label:c.label)}}var i=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]),o=t.length;n(i,0,1),n(a,o-1,o-2)}function o6e(e,t,r){e.showMinorTicks||j(t,function(n){if(n&&n.label.ignore)for(var i=0;iu[0]&&isFinite(v)&&isFinite(u[0]);)d=M2(d),v=u[1]-d*o;else{var m=e.getTicks().length-1;m>o&&(d=M2(d));var y=d*o;g=Math.ceil(u[1]/d)*d,v=hr(g-y),v<0&&u[0]>=0?(v=0,g=hr(y)):g>0&&u[1]<=0&&(g=0,v=-hr(y))}var _=(i[0].value-a[0].value)/s,x=(i[o].value-a[o].value)/s;n.setExtent.call(e,v+d*_,g+d*x),n.setInterval.call(e,d),(_||x)&&n.setNiceExtent.call(e,v+d,g-d)}var dG=[[3,1],[0,2]],m6e=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=zO,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=rt(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],d=o[h],v=d.model,g=d.scale;TO(g)&&v.get("alignTicks")&&v.get("interval")==null?c.push(d):(ef(g,v),TO(g)&&(s=d))}c.length&&(s||(s=c.pop(),ef(s.scale,s.model)),j(c,function(m){Yte(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};j(n.x,function(o){vG(n,"y",o,a)}),j(n.y,function(o){vG(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=Or(t,r),a=this._rect=Rt(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(FO(o,a),!n){var u=x6e(a,s,o,l,r),c=void 0;if(l)VO?(VO(this._axesList,a),FO(o,a)):c=mG(a.clone(),"axisLabel",null,a,o,u,i);else{var f=b6e(t,a,i),h=f.outerBoundsRect,d=f.parsedOuterBoundsContain,v=f.outerBoundsClamp;h&&(c=mG(h,d,v,a,o,u,i))}Xte(a,o,Va.determine,null,c,i)}j(this._coordsList,function(g){g.calcAffineTransform()})},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}Pe(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i0})==null;return Kc(n,s,!0,!0,r),FO(i,n),l;function u(h){j(i[Re[h]],function(d){if(py(d.model)){var v=a.ensureRecord(d.model),g=v.labelInfoList;if(g)for(var m=0;m0&&!hn(d)&&d>1e-4&&(h/=d),h}}function x6e(e,t,r,n,i){var a=new Vte(w6e);return j(r,function(o){return j(o,function(s){if(py(s.model)){var l=!n;s.axisBuilder=p6e(e,t,s.model,i,a,l)}})}),a}function Xte(e,t,r,n,i,a){var o=r===Va.determine;j(t,function(u){return j(u,function(c){py(c.model)&&(g6e(c.axisBuilder,e,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Re[1-u]]=e[_r[u]]<=a.refContainer[_r[u]]*.5?0:1-u===1?2:1}j(t,function(u,c){return j(u,function(f){py(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function b6e(e,t,r){var n,i=e.get("outerBoundsMode",!0);i==="same"?n=t.clone():(i==null||i==="auto")&&(n=Rt(e.get("outerBounds",!0)||Nte,r.refContainer));var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"||$e(["all","axisLabel"],a)<0?o="all":o=a;var s=[q1(be(e.get("outerBoundsClampWidth",!0),Tw[0]),t.width),q1(be(e.get("outerBoundsClampHeight",!0),Tw[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var w6e=function(e,t,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";Gte(e,t,r,n,i,a),Ud(e.nameLocation)||j(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&Wte(s.labelInfoList,s.dirVec,n,i)})};function S6e(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return T6e(r,e,t),r.seriesInvolved&&A6e(r,e),r}function T6e(e,t,r){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];j(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=_y(s.model),u=e.coordSysAxesInfo[l]={};e.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(j(s.getAxes(),je(g,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",d=f.get(["axisPointer","type"])==="cross",v=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||d)&&j(v.baseAxes,je(g,d?"cross":!0,h)),d&&j(v.otherAxes,je(g,"cross",!1))}function g(m,y,_){var x=_.model.getModel("axisPointer",i),w=x.get("show");if(!(!w||w==="auto"&&!m&&!GO(x))){y==null&&(y=x.get("triggerTooltip")),x=m?C6e(_,f,i,t,m,y):x;var S=x.get("snap"),C=x.get("triggerEmphasis"),M=_y(_.model),P=y||S||_.type==="category",k=e.axesInfo[M]={key:M,axis:_,coordSys:s,axisPointerModel:x,triggerTooltip:y,triggerEmphasis:C,involveSeries:P,snap:S,useHandle:GO(x),seriesModels:[],linkGroup:null};u[M]=k,e.seriesInvolved=e.seriesInvolved||P;var O=M6e(a,_);if(O!=null){var D=o[O]||(o[O]={axesInfo:{}});D.axesInfo[M]=k,D.mapper=a[O].mapper,k.linkGroup=D}}}})}function C6e(e,t,r,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};j(s,function(h){l[h]=Ce(o.get(h))}),l.snap=e.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&Me(u,f.textStyle)}}return e.model.getModel("axisPointer",new Je(l,r,n))}function A6e(e,t){t.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||j(e.coordSysAxesInfo[_y(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function M6e(e,t){for(var r=t.model,n=t.dim,i=0;i=0||e===t}function P6e(e){var t=mR(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=GO(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var N6e=Ke();function xG(e,t,r,n){if(e instanceof Bte){var i=e.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=e.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=e.scale.type==="ordinal"?e.getBandWidth():null;return o>0?s?tre(r,o,u,n):R6e(e,t,r,n,o,l):r}function tre(e,t,r,n){if(r===null)return e+(Math.random()-.5)*t;var i=r-n*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function R6e(e,t,r,n,i,a){var o=N6e(e);o.items||(o.items=[]);var s=o.items,l=bG(s,t,r,n,i,a,1),u=bG(s,t,r,n,i,a,-1),c=Math.abs(l-r)i/2||f&&h>f/2-n?tre(r,i,f,n):(s.push({fixedCoord:t,floatCoord:c,r:n}),c)}function bG(e,t,r,n,i,a,o){for(var s=r,l=0;li/2)return Number.MAX_VALUE;if(o===1&&v>s||o===-1&&v0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var g=l;v.color!=null&&(g=Me({color:v.color},l));var m=Ve(Ce(v),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:g,triggerEvent:h},!1);if(ve(c)){var y=m.name;m.name=c.replace("{value}",y??"")}else Te(c)&&(m.name=c(m.name,m));var _=new Je(m,null,this.ecModel);return or(_,Rv.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:K.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ve({lineStyle:{color:K.color.neutral20}},Ip.axisLine),axisLabel:ix(Ip.axisLabel,!1),axisTick:ix(Ip.axisTick,!1),splitLine:ix(Ip.splitLine,!0),splitArea:ix(Ip.splitArea,!0),indicator:[]},t}(qe),W6e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=se(a,function(s){var l=s.model.get("showName")?s.name:"",u=new $n(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});j(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),d=u.get("color"),v=ie(h)?h:[h],g=ie(d)?d:[d],m=[],y=[];function _(F,$,G){var z=G%$.length;return F[z]=F[z]||[],z}if(a==="circle")for(var x=i[0].getTicksCoords(),w=n.cx,S=n.cy,C=0;C3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(r){if(!(TG(this._zr,"globalPan")||Np(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(Es(a.event),a.__ecRoamConsumed=!0,CG(r,n,i,a,o))},t}(ha);function Np(e){return e.__ecRoamConsumed}var J6e=Ke();function DT(e){var t=J6e(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Rp(e,t,r,n){for(var i=DT(e),a=i.roam,o=a[t]=a[t]||[],s=0;s=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=sre(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new Ae,i.add(d),d.scaleX=d.scaleY=f.scale,d.x=f.x,d.y=f.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Ze({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},e.prototype._parseNode=function(t,r,n,i,a,o){var s=t.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=W2[s];if(c&&ye(W2,s)){l=c.call(this,t,r);var f=t.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=LG[s];if(d&&ye(LG,s)){var v=d.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=v)}}if(l&&l.isGroup)for(var m=t.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},e.prototype._parseText=function(t,r){var n=new $d({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Bi(r,n),ui(t,n,this._defsUsePending,!1,!1),nGe(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},e.internalField=function(){W2={g:function(t,r){var n=new Ae;return Bi(r,n),ui(t,n,this._defsUsePending,!1,!1),n},rect:function(t,r){var n=new Ze;return Bi(r,n),ui(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,r){var n=new Fo;return Bi(r,n),ui(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,r){var n=new dr;return Bi(r,n),ui(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,r){var n=new Jy;return Bi(r,n),ui(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,r){var n=t.getAttribute("points"),i;n&&(i=DG(n));var a=new mn({shape:{points:i||[]},silent:!0});return Bi(r,a),ui(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,r){var n=t.getAttribute("points"),i;n&&(i=DG(n));var a=new en({shape:{points:i||[]},silent:!0});return Bi(r,a),ui(t,a,this._defsUsePending,!1,!1),a},image:function(t,r){var n=new Hr;return Bi(r,n),ui(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,r){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new Ae;return Bi(r,s),ui(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,r){var n=t.getAttribute("x"),i=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new Ae;return Bi(r,s),ui(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,r){var n=t.getAttribute("d")||"",i=SQ(n);return Bi(r,i),ui(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),e}(),LG={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),r=parseInt(e.getAttribute("y1")||"0",10),n=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),a=new vf(t,r,n,i);return kG(e,a),OG(e,a),a},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),r=parseInt(e.getAttribute("cy")||"0",10),n=parseInt(e.getAttribute("r")||"0",10),i=new cN(t,r,n);return kG(e,i),OG(e,i),i}};function kG(e,t){var r=e.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(t.global=!0)}function OG(e,t){for(var r=e.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};ore(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=Pn(o),u=l&&l[3];u&&(l[3]*=ys(s),o=ta(l,"rgba"))}t.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Bi(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Me(t.__inheritedStyle,e.__inheritedStyle))}function DG(e){for(var t=IT(e),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=IT(o);switch(i=i||zr(),s){case"translate":$a(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":oT(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Hs(i,i,-parseFloat(l[0])*U2,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*U2);Na(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*U2);Na(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var IG=/([^\s:;]+)\s*:\s*([^:;]+)/g;function ore(e,t,r){var n=e.getAttribute("style");if(n){IG.lastIndex=0;for(var i;(i=IG.exec(n))!=null;){var a=i[1],o=ye(Aw,a)?Aw[a]:null;o&&(t[o]=i[2]);var s=ye(Mw,a)?Mw[a]:null;s&&(r[s]=i[2])}}}function uGe(e,t,r){for(var n=0;n0,_={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(t,m,r,n),this._updateMapSelectHandler(t,u,n,i)},e.prototype._buildGeoJSON=function(t){var r=this._regionsGroupByName=xe(),n=xe(),i=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(d,v){return v&&(d=v(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function f(d){for(var v=[],g=!u&&l&&l.project,m=0;m=0)&&(h=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Fr(t,kr(n),{labelFetcher:h,labelDataIndex:f,defaultText:r},d);var v=t.getTextContent();if(v&&(lre(v).ignore=v.ignore,t.textConfig&&o)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function zG(e,t,r,n,i,a){e.data?e.data.setItemGraphicEl(a,t):Ee(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function $G(e,t,r,n,i){e.data||Us({el:t,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function FG(e,t,r,n,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return $t(t,o,a.get("blurScope"),a.get("disabled")),e.isGeo&&y5e(t,i,r),o}function VG(e,t,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),j(e,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill=K.color.neutral00,i.style.lineWidth=2),i},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:K.color.tertiary},itemStyle:{borderWidth:.5,borderColor:K.color.border,areaColor:K.color.background},emphasis:{label:{show:!0,color:K.color.primary},itemStyle:{areaColor:K.color.highlight}},select:{label:{show:!0,color:K.color.primary},itemStyle:{color:K.color.highlight}},nameProperty:"name"},t}(bt);function LGe(e,t){var r={};return j(e,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),e[0].map(e[0].mapDimension("value"),function(n,i){for(var a="ec-"+e[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c1?(x.width=_,x.height=_/g):(x.height=_,x.width=_*g),x.y=y[1]-x.height/2,x.x=y[0]-x.width/2;else{var w=e.getBoxLayoutParams();w.aspect=g,x=Rt(w,v),x=nJ(e,x,g)}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function EGe(e,t){j(t.get("geoCoord"),function(r,n){e.addGeoCoord(n,r)})}var IGe=function(){function e(){this.dimensions=cre}return e.prototype.create=function(t,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new UO(l+s,l,re({nameMap:o.get("nameMap"),api:r,ecModel:t},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=UG,u.resize(o,r)}),t.eachSeries(function(o){i0({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Kt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),j(a,function(o,s){var l=se(o,function(c){return c.get("nameMap")}),u=new UO(s,s,re({nameMap:nT(l),api:r,ecModel:t},i(o[0])));u.zoomLimit=Qr.apply(null,se(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=UG,u.resize(o[0],r),j(o,function(c){c.coordinateSystem=u,EGe(u,c)})}),n},e.prototype.getFilledRegions=function(t,r,n,i){for(var a=(t||[]).slice(),o=xe(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function $Ge(e,t){var r=e.isExpand?e.children:[],n=e.parentNode.children,i=e.hierNode.i?n[e.hierNode.i-1]:null;if(r.length){VGe(e);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=GGe(e,i,e.parentNode.hierNode.defaultAncestor||n[0],t)}function FGe(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function ZG(e){return arguments.length?e:UGe}function cg(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function VGe(e){for(var t=e.children,r=t.length,n=0,i=0;--r>=0;){var a=t[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function GGe(e,t,r,n){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=Z2(s),a=Y2(a),s&&a;){i=Z2(i),o=Y2(o),i.hierNode.ancestor=e;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(WGe(HGe(s,e,r),e,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!Z2(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!Y2(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=e)}return r}function Z2(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function Y2(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function HGe(e,t,r){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:r}function WGe(e,t,r){var n=r/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=r,t.hierNode.modifier+=r,t.hierNode.prelim+=r,e.hierNode.change+=n}function UGe(e,t){return e.parentNode===t.parentNode?1:2}var ZGe=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),YGe=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new ZGe},t.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=de(n.forkPosition,1),d=[];d[c]=o[c],d[f]=o[f]+(l[f]-o[f])*h,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[c]=s[c],r.lineTo(d[0],d[1]),d[c]=l[c],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var v=1;v_.x,S||(w=w-Math.PI));var M=S?"left":"right",P=s.getModel("label"),k=P.get("rotate"),O=k*(Math.PI/180),D=m.getTextContent();D&&(m.setTextConfig({position:P.get("position")||M,rotation:k==null?-w:O,origin:"center"}),D.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),N=I==="relative"?Rd(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;N&&(Ee(r).focus=N),qGe(i,o,c,r,v,d,g,n),r.__edge&&(r.onHoverStateChange=function(B){if(B!=="blur"){var F=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);F&&F.hoverState===Qy||ew(r.__edge,B)}})}function qGe(e,t,r,n,i,a,o,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),f=e.getOrient(),h=e.get(["lineStyle","curveness"]),d=e.get("edgeForkPosition"),v=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==r&&(g||(g=n.__edge=new Tv({shape:ZO(c,f,h,i,i)})),ot(g,{shape:ZO(c,f,h,a,o)},e));else if(u==="polyline"&&c==="orthogonal"&&t!==r&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var m=t.children,y=[],_=0;_r&&(r=i.height)}this.height=r+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,r)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,r)},e.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=e.targetNode;if(ve(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function gre(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function CR(e,t){var r=gre(e);return $e(r,t)>=0}function NT(e,t){for(var r=[];e;){var n=e.dataIndex;r.push({name:e.name,dataIndex:n,value:t.getRawValue(n)}),e=e.parentNode}return r.reverse(),r}var a8e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new Je(i,this,this.ecModel),o=TR.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,d){var v=o.getNodeByDataIndex(d);return v&&v.children.length&&v.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},t.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return xr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=NT(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:K.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(bt);function o8e(e,t,r){for(var n=[e],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function s8e(e,t){e.eachSeriesByType("tree",function(r){l8e(r,t)})}function l8e(e,t){var r=Or(e,t).refContainer,n=Rt(e.getBoxLayoutParams(),r);e.layoutInfo=n;var i=e.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=ZG(function(w,S){return(w.parentNode===S.parentNode?1:2)/w.depth})):(a=n.width,o=n.height,s=ZG());var l=e.getData().tree.root,u=l.children[0];if(u){zGe(l),o8e(u,$Ge,s),l.hierNode.modifier=-u.hierNode.prelim,zp(u,FGe);var c=u,f=u,h=u;zp(u,function(w){var S=w.getLayout().x;Sf.getLayout().x&&(f=w),w.depth>h.depth&&(h=w)});var d=c===f?1:s(c,f)/2,v=d-c.getLayout().x,g=0,m=0,y=0,_=0;if(i==="radial")g=a/(f.getLayout().x+d+v),m=o/(h.depth-1||1),zp(u,function(w){y=(w.getLayout().x+v)*g,_=(w.depth-1)*m;var S=cg(y,_);w.setLayout({x:S.x,y:S.y,rawX:y,rawY:_},!0)});else{var x=e.getOrient();x==="RL"||x==="LR"?(m=o/(f.getLayout().x+d+v),g=a/(h.depth-1||1),zp(u,function(w){_=(w.getLayout().x+v)*m,y=x==="LR"?(w.depth-1)*g:a-(w.depth-1)*g,w.setLayout({x:y,y:_},!0)})):(x==="TB"||x==="BT")&&(g=a/(f.getLayout().x+d+v),m=o/(h.depth-1||1),zp(u,function(w){y=(w.getLayout().x+v)*g,_=x==="TB"?(w.depth-1)*m:o-(w.depth-1)*m,w.setLayout({x:y,y:_},!0)}))}}}function u8e(e){e.eachSeriesByType("tree",function(t){var r=t.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");re(s,o)})})}function c8e(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=t.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var a=i.coordinateSystem,o=ET(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function f8e(e){e.registerChartView(XGe),e.registerSeriesModel(a8e),e.registerLayout(s8e),e.registerVisual(u8e),c8e(e)}var QG=["treemapZoomToNode","treemapRender","treemapMove"];function h8e(e){for(var t=0;t1;)a=a.parentNode;var o=cO(e.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var d8e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventUsingHoverLayer=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};yre(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new Je({itemStyle:o},this,n);a=r.levels=v8e(a,n);var l=se(a||[],function(f){return new Je(f,s,n)},this),u=TR.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,d){var v=u.getNodeByDataIndex(d),g=v?l[v.depth]:null;return h.parentModel=g||s,h})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return xr("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=NT(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},re(this.layoutInfo,r)},t.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=xe(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){mre(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:K.size.l,top:K.size.xxxl,right:K.size.l,bottom:K.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:K.size.m,emptyItemWidth:25,itemStyle:{color:K.color.backgroundShade,textStyle:{color:K.color.secondary}},emphasis:{itemStyle:{color:K.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:K.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:K.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(bt);function yre(e){var t=0;j(e.children,function(n){yre(n);var i=n.value;ie(i)&&(i=i[0]),t+=i});var r=e.value;ie(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),ie(e.value)?e.value[0]=r:e.value=r}function v8e(e,t){var r=At(t.get("color")),n=At(t.get(["aria","decal","decals"]));if(r){e=e||[];var i,a;j(e,function(s){var l=new Je(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),e}}var p8e=8,JG=8,X2=5,g8e=function(){function e(t){this.group=new Ae,t.add(this.group)}return e.prototype.render=function(t,r,n,i){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=Or(t,r).refContainer,h={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},d={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},v=Rt(h,f);this._prepare(n,d,u),this._renderContent(t,d,v,s,l,u,c,i),wT(o,h,f)}},e.prototype._prepare=function(t,r,n){for(var i=t;i;i=i.parentNode){var a=Ar(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+p8e*2,r.emptyItemWidth);r.totalWidth+=s+JG,r.renderList.push({node:i,text:a,width:s})}},e.prototype._renderContent=function(t,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,f=t.get(["breadcrumb","height"]),h=r.totalWidth,d=r.renderList,v=a.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var m=d[g],y=m.node,_=m.width,x=m.text;h>n.width&&(h-=_-c,_=c,x=null);var w=new mn({shape:{points:m8e(u,0,_,f,g===d.length-1,g===0)},style:Me(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new nt({style:Ct(o,{text:x})}),textConfig:{position:"inside"},z2:wv*1e4,onclick:je(l,y)});w.disableLabelAnimation=!0,w.getTextContent().ensureState("emphasis").style=Ct(s,{text:x}),w.ensureState("emphasis").style=v,$t(w,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(w),y8e(w,t,y),u+=_+JG}},e.prototype.remove=function(){this.group.removeAll()},e}();function m8e(e,t,r,n,i,a){var o=[[i?e:e-X2,t],[e+r,t],[e+r,t+n],[i?e:e-X2,t+n]];return!a&&o.splice(2,0,[e+r+X2,t+n/2]),!i&&o.push([e,t+n/2]),o}function y8e(e,t,r){Ee(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&NT(r,t)}}var _8e=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(t,r,n,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:r,duration:n,delay:i,easing:a}),!0)},e.prototype.finished=function(t){return this._finishedCallback=t,this},e.prototype.start=function(){for(var t=this,r=this._storage.length,n=function(){r--,r<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,a=this._storage.length;it8||Math.abs(r.dy)>t8)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Oe(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,d=u.max||1/0;f=Math.max(Math.min(d,f),h)}var v=f/c.zoom;c.zoom=f;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=zr();$a(m,m,[-n,-i]),oT(m,m,[v,v]),$a(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&iw(u,c)}}}}},this)},t.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new g8e(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(CR(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=$p(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(yt);function $p(){return{nodeGroup:[],background:[],content:[]}}function C8e(e,t,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=e.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,v=c.height,g=c.borderWidth,m=c.invisible,y=o.getRawIndex(),_=s&&s.getRawIndex(),x=o.viewChildren,w=c.upperHeight,S=x&&x.length,C=h.getModel("itemStyle"),M=h.getModel(["emphasis","itemStyle"]),P=h.getModel(["blur","itemStyle"]),k=h.getModel(["select","itemStyle"]),O=C.get("borderRadius")||0,D=ce("nodeGroup",YO);if(!D)return;if(l.add(D),D.x=c.x||0,D.y=c.y||0,D.markRedraw(),Pw(D).nodeWidth=d,Pw(D).nodeHeight=v,c.isAboveViewRoot)return D;var I=ce("background",e8,u,w8e);I&&H(D,I,S&&c.upperLabelHeight);var N=h.getModel("emphasis"),B=N.get("focus"),F=N.get("blurScope"),$=N.get("disabled"),G=B==="ancestor"?o.getAncestorsIndices():B==="descendant"?o.getDescendantIndices():B;if(S)ay(D)&&mc(D,!1),I&&(mc(I,!$),f.setItemGraphicEl(o.dataIndex,I),Jk(I,G,F));else{var z=ce("content",e8,u,S8e);z&&Y(D,z),I.disableMorphing=!0,I&&ay(I)&&mc(I,!1),mc(D,!$),f.setItemGraphicEl(o.dataIndex,D);var U=h.getShallow("cursor");U&&z.attr("cursor",U),Jk(D,G,F)}return D;function H(_e,ne,fe){var le=Ee(ne);if(le.dataIndex=o.dataIndex,le.seriesIndex=e.seriesIndex,ne.setShape({x:0,y:0,width:d,height:v,r:O}),m)Z(ne);else{ne.invisible=!1;var ee=o.getVisual("style"),Be=ee.stroke,Se=i8(C);Se.fill=Be;var ze=Ju(M);ze.fill=M.get("borderColor");var Ue=Ju(P);Ue.fill=P.get("borderColor");var ht=Ju(k);if(ht.fill=k.get("borderColor"),fe){var Bt=d-2*g;J(ne,Be,ee.opacity,{x:g,y:0,width:Bt,height:w})}else ne.removeTextContent();ne.setStyle(Se),ne.ensureState("emphasis").style=ze,ne.ensureState("blur").style=Ue,ne.ensureState("select").style=ht,qc(ne)}_e.add(ne)}function Y(_e,ne){var fe=Ee(ne);fe.dataIndex=o.dataIndex,fe.seriesIndex=e.seriesIndex;var le=Math.max(d-2*g,0),ee=Math.max(v-2*g,0);if(ne.culling=!0,ne.setShape({x:g,y:g,width:le,height:ee,r:O}),m)Z(ne);else{ne.invisible=!1;var Be=o.getVisual("style"),Se=Be.fill,ze=i8(C);ze.fill=Se,ze.decal=Be.decal;var Ue=Ju(M),ht=Ju(P),Bt=Ju(k);J(ne,Se,Be.opacity,null),ne.setStyle(ze),ne.ensureState("emphasis").style=Ue,ne.ensureState("blur").style=ht,ne.ensureState("select").style=Bt,qc(ne)}_e.add(ne)}function Z(_e){!_e.invisible&&a.push(_e)}function J(_e,ne,fe,le){var ee=h.getModel(le?n8:r8),Be=Ar(h.get("name"),null),Se=ee.getShallow("show");Fr(_e,kr(h,le?n8:r8),{defaultText:Se?Be:null,inheritColor:ne,defaultOpacity:fe,labelFetcher:e,labelDataIndex:o.dataIndex});var ze=_e.getTextContent();if(ze){var Ue=ze.style,ht=Zy(Ue.padding||0);le&&(_e.setTextConfig({layoutRect:le}),ze.disableLabelLayout=!0),ze.beforeUpdate=function(){var Jt=Math.max((le?le.width:_e.shape.width)-ht[1]-ht[3],0),On=Math.max((le?le.height:_e.shape.height)-ht[0]-ht[2],0);(Ue.width!==Jt||Ue.height!==On)&&ze.setStyle({width:Jt,height:On})},Ue.truncateMinChar=2,Ue.lineOverflow="truncate",ae(Ue,le,c);var Bt=ze.getState("emphasis");ae(Bt?Bt.style:null,le,c)}}function ae(_e,ne,fe){var le=_e?_e.text:null;if(!ne&&fe.isLeafRoot&&le!=null){var ee=e.get("drillDownIcon",!0);_e.text=ee?ee+" "+le:le}}function ce(_e,ne,fe,le){var ee=_!=null&&r[_e][_],Be=i[_e];return ee?(r[_e][_]=null,ge(Be,ee)):m||(ee=new ne,ee instanceof la&&(ee.z2=A8e(fe,le)),Fe(Be,ee)),t[_e][y]=ee}function ge(_e,ne){var fe=_e[y]={};ne instanceof YO?(fe.oldX=ne.x,fe.oldY=ne.y):fe.oldShape=re({},ne.shape)}function Fe(_e,ne){var fe=_e[y]={},le=o.parentNode,ee=ne instanceof Ae;if(le&&(!n||n.direction==="drillDown")){var Be=0,Se=0,ze=i.background[le.getRawIndex()];!n&&ze&&ze.oldShape&&(Be=ze.oldShape.width,Se=ze.oldShape.height),ee?(fe.oldX=0,fe.oldY=Se):fe.oldShape={x:Be,y:Se,width:0,height:0}}fe.fadein=!ee}}function A8e(e,t){return e*b8e+t}var by=j,M8e=Pe,Lw=-1,$r=function(){function e(t){var r=t.mappingMethod,n=t.type,i=this.option=Ce(t);this.type=n,this.mappingMethod=r,this._normalizeData=k8e[r];var a=e.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(q2(i),P8e(i)):r==="category"?i.categories?L8e(i):q2(i,!0):(pn(r!=="linear"||i.dataExtent),q2(i))}return e.prototype.mapValueToVisual=function(t){var r=this._normalizeData(t);return this._normalizedToVisual(r,t)},e.prototype.getNormalizer=function(){return pe(this._normalizeData,this)},e.listVisualTypes=function(){return rt(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,r,n){Pe(t)?j(t,r,n):r.call(n,t)},e.mapVisual=function(t,r,n){var i,a=ie(t)?[]:Pe(t)?{}:(i=!0,null);return e.eachVisual(t,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},e.retrieveVisuals=function(t){var r={},n;return t&&by(e.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(r[a]=t[a],n=!0)}),n?r:null},e.prepareVisualTypes=function(t){if(ie(t))t=t.slice();else if(M8e(t)){var r=[];by(t,function(n,i){r.push(i)}),t=r}else return[];return t.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},e.dependsOn=function(t,r){return r==="color"?!!(t&&t.indexOf(r)===0):t===r},e.findPieceIndex=function(t,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[t[a]],t.pop())}function q2(e,t){var r=e.visual,n=[];Pe(r)?by(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!t&&n.length===1&&!i.hasOwnProperty(e.type)&&(n[1]=n[0]),_re(e,n)}function ox(e){return{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("color",e(r("color"),i))},_normalizedToVisual:XO([0,1])}}function a8(e){var t=this.option.visual;return t[Math.round(vt(e,[0,1],[0,t.length-1],!0))]||{}}function Fp(e){return function(t,r,n){n(e,this.mapValueToVisual(t))}}function fg(e){var t=this.option.visual;return t[this.option.loop&&e!==Lw?e%t.length:e]}function ec(){return this.option.visual[0]}function XO(e){return{linear:function(t){return vt(t,e,this.option.visual,!0)},category:fg,piecewise:function(t,r){var n=qO.call(this,r);return n==null&&(n=vt(t,e,this.option.visual,!0)),n},fixed:ec}}function qO(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var n=$r.findPieceIndex(e,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function _re(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=se(t,function(r){var n=Pn(r);return n||[0,0,0,1]})),t}var k8e={linear:function(e){return vt(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,r=$r.findPieceIndex(e,t,!0);if(r!=null)return vt(r,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??Lw},fixed:nr};function sx(e,t,r){return e?t<=r:t=r.length||g===r[g.depth]){var y=R8e(i,l,g,m,v,n);bre(g,y,r,n)}})}}}function E8e(e,t,r){var n=re({},t),i=r.designatedVisualItemStyle;return j(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=e.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function o8(e){var t=K2(e,"color");if(t){var r=K2(e,"colorAlpha"),n=K2(e,"colorSaturation");return n&&(t=_s(t,null,null,n)),r&&(t=ey(t,r)),t}}function I8e(e,t){return t!=null?_s(t,null,null,e):null}function K2(e,t){var r=e[t];if(r!=null&&r!=="none")return r}function N8e(e,t,r,n,i,a){if(!(!a||!a.length)){var o=Q2(t,"color")||i.color!=null&&i.color!=="none"&&(Q2(t,"colorAlpha")||Q2(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=t.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new $r(f);return xre(h).drColorMappingBy=c,h}}}function Q2(e,t){var r=e.get(t);return ie(r)&&r.length?{name:t,range:r}:null}function R8e(e,t,r,n,i,a){var o=re({},t);if(i){var s=i.type,l=s==="color"&&xre(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var wy=Math.max,kw=Math.min,s8=Qr,AR=j,wre=["itemStyle","borderWidth"],j8e=["itemStyle","gapWidth"],B8e=["upperLabel","show"],z8e=["upperLabel","height"];const $8e={seriesType:"treemap",reset:function(e,t,r,n){var i=e.option,a=Or(e,r).refContainer,o=Rt(e.getBoxLayoutParams(),a),s=i.size||[],l=de(s8(o.width,s[0]),a.width),u=de(s8(o.height,s[1]),a.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],h=xy(n,f,e),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,v=e.getViewRoot(),g=gre(v);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?U8e(e,h,v,l,u):d?[d.width,d.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};v.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};v.setLayout(x),Sre(v,_,!1,0),x=v.getLayout(),AR(g,function(S,C){var M=(g[C+1]||v).getValue();S.setLayout(re({dataExtent:[M,M],borderWidth:0,upperHeight:0},x))})}var w=e.getData().tree.root;w.setLayout(Z8e(o,d,h),!0),e.setLayoutInfo(o),Tre(w,new Oe(-o.x,-o.y,r.getWidth(),r.getHeight()),g,v,0)}};function Sre(e,t,r,n){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),l=s.get(wre),u=s.get(j8e)/2,c=Cre(s),f=Math.max(l,c),h=l-u,d=f-u;e.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=wy(i-2*h,0),a=wy(a-h-d,0);var v=i*a,g=F8e(e,s,v,t,r,n);if(g.length){var m={x:h,y:d,width:i,height:a},y=kw(i,a),_=1/0,x=[];x.area=0;for(var w=0,S=g.length;w=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*ts[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function W8e(e,t,r){for(var n=0,i=1/0,a=0,o=void 0,s=e.length;an&&(n=o));var l=e.area*e.area,u=t*t*r;return l?wy(u*n/l,l/(u*i)):1/0}function l8(e,t,r,n,i){var a=t===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=t?e.area/t:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var f=0,h=e.length;fVk&&(u=Vk),a=s}un&&(n=t);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(S[0]=-S[0],S[1]=-S[1]);var M=w[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var P=-Math.atan2(w[1],w[0]);f[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*y+c[0],a.y=-h[1]*_+c[1],v=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*M+c[0],a.y=c[1]+k,v=w[0]<0?"right":"left",a.originX=-y*M,a.originY=-k;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=C[0],a.y=C[1]+k,v="center",a.originY=-k;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*M+f[0],a.y=f[1]+k,v=w[0]>=0?"right":"left",a.originX=y*M,a.originY=-k;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||v})}},t}(Ae),OR=function(){function e(t){this.group=new Ae,this._LineCtor=t||kR}return e.prototype.updateData=function(t){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=v8(t);t.diff(a).add(function(s){r._doAdd(t,s,o)}).update(function(s,l){r._doUpdate(a,t,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},e.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(r,n){r.updateLayout(t,n)},this)},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=v8(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r){this._progressiveEls=[];function n(s){!s.isGroup&&!cHe(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0}function v8(e){var t=e.hostModel,r=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:kr(t)}}function p8(e){return isNaN(e[0])||isNaN(e[1])}function nM(e){return e&&!p8(e[0])&&!p8(e[1])}var iM=[],aM=[],oM=[],eh=Kr,sM=Rl,g8=Math.abs;function m8(e,t,r){for(var n=e[0],i=e[1],a=e[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){iM[0]=eh(n[0],i[0],a[0],c),iM[1]=eh(n[1],i[1],a[1],c);var f=g8(sM(iM,t)-l);f=0?s=s+u:s=s-u:v>=0?s=s-u:s=s+u}return s}function lM(e,t){var r=[],n=Qm,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Co(u[0]),Co(u[1])],u[2]&&u.__original.push(Co(u[2])));var h=u.__original;if(u[2]!=null){if(Sn(i[0],h[0]),Sn(i[1],h[2]),Sn(i[2],h[1]),c&&c!=="none"){var d=dg(s.node1),v=m8(i,h[0],d*t);n(i[0][0],i[1][0],i[2][0],v,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],v,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var d=dg(s.node2),v=m8(i,h[1],d*t);n(i[0][0],i[1][0],i[2][0],v,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],v,r),i[1][1]=r[1],i[2][1]=r[2]}Sn(u[0],i[0]),Sn(u[1],i[2]),Sn(u[2],i[1])}else{if(Sn(a[0],h[0]),Sn(a[1],h[1]),_l(o,a[1],a[0]),df(o,o),c&&c!=="none"){var d=dg(s.node1);B1(a[0],a[0],o,d*t)}if(f&&f!=="none"){var d=dg(s.node2);B1(a[1],a[1],o,-d*t)}Sn(u[0],a[0]),Sn(u[1],a[1])}})}var Dre=Ke();function fHe(e){if(e)return Dre(e).bridge}function y8(e,t){e&&(Dre(e).bridge=t)}function _8(e){return e.type==="view"}var hHe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){var i=new l0,a=new OR,o=this.group,s=new Ae;this._controller=new xf(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(_8(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):ot(this._mainGroup,f,r)}lM(r.getGraph(),hg(r));var h=r.getData();u.updateData(h);var d=r.getEdgeData();c.updateData(d),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var v=r.forceLayout,g=r.get(["force","layoutAnimation"]);v&&(s=!0,this._startForceLayoutIteration(v,i,g));var m=r.get("layout");h.graph.eachNode(function(w){var S=w.dataIndex,C=w.getGraphicEl(),M=w.getModel();if(C){C.off("drag").off("dragend");var P=M.get("draggable");P&&C.on("drag",function(O){switch(m){case"force":v.warmUp(),!a._layouting&&a._startForceLayoutIteration(v,i,g),v.setFixed(S),h.setItemLayout(S,[C.x,C.y]);break;case"circular":h.setItemLayout(S,[C.x,C.y]),w.setLayout({fixed:!0},!0),LR(r,"symbolSize",w,[O.offsetX,O.offsetY]),a.updateLayout(r);break;case"none":default:h.setItemLayout(S,[C.x,C.y]),PR(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){v&&v.setUnfixed(S)}),C.setDraggable(P,!!M.get("cursor"));var k=M.get(["emphasis","focus"]);k==="adjacency"&&(Ee(C).focus=w.getAdjacentDataIndices())}}),h.graph.eachEdge(function(w){var S=w.getGraphicEl(),C=w.getModel().get(["emphasis","focus"]);S&&C==="adjacency"&&(Ee(S).focus={edge:[w.dataIndex],node:[w.node1.dataIndex,w.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=h.getLayout("cx"),x=h.getLayout("cy");h.graph.eachNode(function(w){Lre(w,y,_,x)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!_8(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},t.prototype.updateViewOnPan=function(r,n,i){this._active&&(_R(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(r,n,i){this._active&&(xR(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),lM(r.getGraph(),hg(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=hg(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},t.prototype.updateLayout=function(r){this._active&&(lM(r.getGraph(),hg(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=fHe(r);if(i)return{bridge:i,coordSys:n}}},t.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new Ae,l=i.group.children(),u=a.group.children(),c=new Ae,f=new Ae;s.add(f),s.add(c);for(var h=0;h=0&&t.call(r,n[a],a)},e.prototype.eachEdge=function(t,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&t.call(r,n[a],a)},e.prototype.breadthFirstTraverse=function(t,r,n,i){if(r instanceof tc||(r=this._nodesMap[th(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&!t.hasKey(v)&&(t.set(v,!0),o.push(d.node1))}for(l=0;l=0&&!t.hasKey(x)&&(t.set(x,!0),s.push(_.node2))}}}return{edge:t.keys(),node:r.keys()}},e}(),Ere=function(){function e(t,r,n){this.dataIndex=-1,this.node1=t,this.node2=r,this.dataIndex=n??-1}return e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var t=xe(),r=xe();t.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a=0&&!t.hasKey(f)&&(t.set(f,!0),n.push(c.node1))}for(a=0;a=0&&!t.hasKey(g)&&(t.set(g,!0),i.push(v.node2))}return{edge:t.keys(),node:r.keys()}},e}();function Ire(e,t){return{getValue:function(r){var n=this[e][t];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[e][t].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}or(tc,Ire("hostGraph","data"));or(Ere,Ire("hostGraph","edgeData"));function DR(e,t,r,n,i){for(var a=new dHe(n),o=0;o "+h)),u++)}var d=r.get("coordinateSystem"),v;if(d==="cartesian2d"||d==="polar"||d==="matrix")v=Vo(e,r);else{var g=kv.get(d),m=g?g.dimensions||[]:[];$e(m,"value")<0&&m.concat(["value"]);var y=Iv(e,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;v=new Ln(y,r),v.initData(e)}var _=new Ln(["value"],r);return _.initData(l,s),i&&i(v,_),vre({mainData:v,struct:a,structAttr:"graph",datas:{node:v,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var vHe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new zv(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(r){e.prototype.mergeDefaultAndTheme.apply(this,arguments),Zc(r,"edgeLabel",["show"])},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){eHe(this);var s=DR(a,i,this,!0,l);return j(s.edges,function(u){tHe(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(v){var g=o._categoriesModels,m=v.getShallow("category"),y=g[m];return y&&(y.parentModel=v.parentModel,v.parentModel=y),v});var f=Je.prototype.getModel;function h(v,g){var m=f.call(this,v,g);return m.resolveParentPath=d,m}c.wrapMethod("getItemModel",function(v){return v.resolveParentPath=d,v.getModel=h,v});function d(v){if(v&&(v[0]==="label"||v[1]==="label")){var g=v.slice();return v[0]==="label"?g[0]="edgeLabel":v[1]==="label"&&(g[1]="edgeLabel"),g}return v}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),xr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=jJ({series:this,dataIndex:r,multipleSeries:n});return f},t.prototype._updateCategoriesData=function(){var r=se(this.option.categories||[],function(i){return i.value!=null?i:re({value:0},i)}),n=new Ln(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:K.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:K.color.primary}}},t}(bt);function pHe(e){e.registerChartView(hHe),e.registerSeriesModel(vHe),e.registerProcessor(X8e),e.registerVisual(q8e),e.registerVisual(K8e),e.registerLayout(rHe),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,iHe),e.registerLayout(oHe),e.registerCoordinateSystem("graphView",{dimensions:bf.dimensions,create:lHe}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},nr),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},nr),e.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",query:t},function(i){var a=n.getViewOfSeriesModel(i);a&&(t.dx!=null&&t.dy!=null&&a.updateViewOnPan(i,n,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&a.updateViewOnZoom(i,n,t));var o=i.coordinateSystem,s=ET(o,t,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var x8=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;Ee(a).dataType="node",a.z2=2;var o=new nt;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=r.getItemLayout(n),h=re(_o(u.getModel("itemStyle"),f,!0),f),d=this;if(isNaN(h.startAngle)){d.setShape(h);return}a?d.setShape(h):ot(d,{shape:h},l,n);var v=re(_o(u.getModel("itemStyle"),f,!0),f);o.setShape(v),o.useStyle(r.getItemVisual(n,"style")),Lr(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,d),Lr(d,u,"itemStyle");var g=c.get("focus");$t(this,g==="adjacency"?s.getAdjacentDataIndices():g,c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var f=kr(n),h=i.getVisual("style");Fr(a,f,{labelFetcher:{getFormattedLabel:function(_,x,w,S,C,M){return r.getFormattedLabel(_,x,"node",S,oi(C,f.normal&&f.normal.get("formatter"),n.get("name")),M)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var d=c.get("position")||"outside",v=c.get("distance")||0,g;d==="outside"?g=o.r+v:g=(o.r+o.r0)/2,this.textConfig={inside:d!=="outside"};var m=d!=="outside"?c.get("align")||"center":l>0?"left":"right",y=d!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*g+o.cx,y:u*g+o.cy,rotation:0,style:{align:m,verticalAlign:y}})},t}(gn),gHe=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;return Ee(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return t.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},t.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),f=n.getItemModel(l.dataIndex),h=f.getModel("lineStyle"),d=f.getModel("emphasis"),v=d.get("focus"),g=re(_o(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),b8(m,l,r,h)):(ua(m),b8(m,l,r,h),ot(m,{shape:g},s,i)),$t(this,v==="adjacency"?l.getAdjacentDataIndices():v,d.get("blurScope"),d.get("disabled")),Lr(m,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},t}(et);function b8(e,t,r,n){var i=t.node1,a=t.node2,o=e.style;e.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(ve(l)&&ve(u)){var c=e.shape,f=(c.s1[0]+c.s2[0])/2,h=(c.s1[1]+c.s2[1])/2,d=(c.t1[0]+c.t2[0])/2,v=(c.t1[1]+c.t2[1])/2;o.fill=new vf(f,h,d,v,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var mHe=Math.PI/180,yHe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){},t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*mHe;if(a.diff(o).add(function(c){var f=a.getItemLayout(c);if(f){var h=new x8(a,c,l);Ee(h).dataIndex=c,s.add(h)}}).update(function(c,f){var h=o.getItemGraphicEl(f),d=a.getItemLayout(c);if(!d){h&&xs(h,r,f);return}h?h.updateData(a,c,l):h=new x8(a,c,l),s.add(h)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&xs(f,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=de(u[0],i.getWidth()),this.group.originY=de(u[1],i.getHeight()),Et(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},t.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new gHe(i,a,l,n);Ee(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&xs(u,r,l)}).execute(),this._edgeData=a},t.prototype.dispose=function(){},t.type="chord",t}(yt),_He=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new zv(pe(this.getData,this),pe(this.getRawData,this))},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=DR(a,i,this,!0,s);return o.data}function s(l,u){var c=Je.prototype.getModel;function f(d,v){var g=c.call(this,d,v);return g.resolveParentPath=h,g}u.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=f,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var v=d.slice();return d[0]==="label"?v[0]="edgeLabel":d[1]==="label"&&(v[1]="edgeLabel"),v}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),xr("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return xr("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},t.type="series.chord",t.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},t}(bt),uM=Math.PI/180;function xHe(e,t){e.eachSeriesByType("chord",function(r){bHe(r,t)})}function bHe(e,t){var r=e.getData(),n=r.graph,i=e.getEdgeData(),a=i.count();if(a){var o=rJ(e,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((e.get("padAngle")||0)*uM,0),h=Math.max((e.get("minAngle")||0)*uM,0),d=-e.get("startAngle")*uM,v=d+Math.PI*2,g=e.get("clockwise"),m=g?1:-1,y=[d,v];pT(y,!g);var _=y[0],x=y[1],w=x-_,S=r.getSum("value")===0&&i.getSum("value")===0,C=[],M=0;n.eachEdge(function(z){var U=S?1:z.getValue("value");S&&(U>0||h)&&(M+=2);var H=z.node1.dataIndex,Y=z.node2.dataIndex;C[H]=(C[H]||0)+U,C[Y]=(C[Y]||0)+U});var P=0;if(n.eachNode(function(z){var U=z.getValue("value");isNaN(U)||(C[z.dataIndex]=Math.max(U,C[z.dataIndex]||0)),!S&&(C[z.dataIndex]>0||h)&&M++,P+=C[z.dataIndex]||0}),!(M===0||P===0)){f*M>=Math.abs(w)&&(f=Math.max(0,(Math.abs(w)-h*M)/M)),(f+h)*M>=Math.abs(w)&&(h=(Math.abs(w)-f*M)/M);var k=(w-f*M*m)/P,O=0,D=0,I=0;n.eachNode(function(z){var U=C[z.dataIndex]||0,H=k*(P?U:1)*m;Math.abs(H)D){var B=O/D;n.eachNode(function(z){var U=z.getLayout().angle;Math.abs(U)>=h?z.setLayout({angle:U*B,ratio:B},!0):z.setLayout({angle:h,ratio:h===0?1:U/h},!0)})}else n.eachNode(function(z){if(!N){var U=z.getLayout().angle,H=Math.min(U/I,1),Y=H*O;U-Yh&&h>0){var H=N?1:Math.min(U/I,1),Y=U-h,Z=Math.min(Y,Math.min(F,O*H));F-=Z,z.setLayout({angle:U-Z,ratio:(U-Z)/U},!0)}else h>0&&z.setLayout({angle:h,ratio:U===0?1:h/U},!0)}});var $=_,G=[];n.eachNode(function(z){var U=Math.max(z.getLayout().angle,h);z.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:$,endAngle:$+U*m,clockwise:g},!0),G[z.dataIndex]=$,$+=(U+f)*m}),n.eachEdge(function(z){var U=S?1:z.getValue("value"),H=k*(P?U:1)*m,Y=z.node1.dataIndex,Z=G[Y]||0,J=Math.abs((z.node1.getLayout().ratio||1)*H),ae=Z+J*m,ce=[s+c*Math.cos(Z),l+c*Math.sin(Z)],ge=[s+c*Math.cos(ae),l+c*Math.sin(ae)],Fe=z.node2.dataIndex,_e=G[Fe]||0,ne=Math.abs((z.node2.getLayout().ratio||1)*H),fe=_e+ne*m,le=[s+c*Math.cos(_e),l+c*Math.sin(_e)],ee=[s+c*Math.cos(fe),l+c*Math.sin(fe)];z.setLayout({s1:ce,s2:ge,sStartAngle:Z,sEndAngle:ae,t1:le,t2:ee,tStartAngle:_e,tEndAngle:fe,cx:s,cy:l,r:c,value:U,clockwise:g}),G[Y]=ae,G[Fe]=fe})}}}function wHe(e){e.registerChartView(yHe),e.registerSeriesModel(_He),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,xHe),e.registerProcessor(jv("chord"))}var SHe=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),THe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new SHe},t.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},t}(et);function CHe(e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight(),a=Math.min(n,i),o=de(r[0],t.getWidth()),s=de(r[1],t.getHeight()),l=de(e.get("radius"),a/2);return{cx:o,cy:s,r:l}}function ux(e,t){var r=e==null?"":e+"";return t&&(ve(t)?r=t.replace("{value}",r):Te(t)&&(r=t(e))),r}var AHe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=CHe(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,f=r.getModel("axisLine"),h=f.get("roundCap"),d=h?Sw:gn,v=f.get("show"),g=f.getModel("lineStyle"),m=g.get("width"),y=[u,c];pT(y,!l),u=y[0],c=y[1];for(var _=c-u,x=u,w=[],S=0;v&&S=k&&(O===0?0:a[O-1][0])Math.PI/2&&(ae+=Math.PI)):J==="tangential"?ae=-P-Math.PI/2:it(J)&&(ae=J*Math.PI/180),ae===0?f.add(new nt({style:Ct(x,{text:U,x:Y,y:Z,verticalAlign:F<-.8?"top":F>.8?"bottom":"middle",align:B<-.4?"left":B>.4?"right":"center"},{inheritColor:H}),silent:!0})):f.add(new nt({style:Ct(x,{text:U,x:Y,y:Z,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:Y,originY:Z,rotation:ae}))}if(_.get("show")&&$!==w){var G=_.get("distance");G=G?G+c:c;for(var ce=0;ce<=S;ce++){B=Math.cos(P),F=Math.sin(P);var ge=new dr({shape:{x1:B*(v-G)+h,y1:F*(v-G)+d,x2:B*(v-M-G)+h,y2:F*(v-M-G)+d},silent:!0,style:I});I.stroke==="auto"&&ge.setStyle({stroke:a(($+ce/S)/w)}),f.add(ge),P+=O}P-=O}else P+=k}},t.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,d=this._progressEls,v=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),_=r.getData(),x=_.mapDimension("value"),w=+r.get("min"),S=+r.get("max"),C=[w,S],M=[s,l];function P(O,D){var I=_.getItemModel(O),N=I.getModel("pointer"),B=de(N.get("width"),o.r),F=de(N.get("length"),o.r),$=r.get(["pointer","icon"]),G=N.get("offsetCenter"),z=de(G[0],o.r),U=de(G[1],o.r),H=N.get("keepAspect"),Y;return $?Y=vr($,z-B/2,U-F,B,F,null,H):Y=new THe({shape:{angle:-Math.PI/2,width:B,r:F,x:z,y:U}}),Y.rotation=-(D+Math.PI/2),Y.x=o.cx,Y.y=o.cy,Y}function k(O,D){var I=m.get("roundCap"),N=I?Sw:gn,B=m.get("overlap"),F=B?m.get("width"):c/_.count(),$=B?o.r-F:o.r-(O+1)*F,G=B?o.r:o.r-O*F,z=new N({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:$,r:G}});return B&&(z.z2=vt(_.get(x,O),[w,S],[100,0],!0)),z}(y||g)&&(_.diff(h).add(function(O){var D=_.get(x,O);if(g){var I=P(O,s);Et(I,{rotation:-((isNaN(+D)?M[0]:vt(D,C,M,!0))+Math.PI/2)},r),f.add(I),_.setItemGraphicEl(O,I)}if(y){var N=k(O,s),B=m.get("clip");Et(N,{shape:{endAngle:vt(D,C,M,B)}},r),f.add(N),Xk(r.seriesIndex,_.dataType,O,N),v[O]=N}}).update(function(O,D){var I=_.get(x,O);if(g){var N=h.getItemGraphicEl(D),B=N?N.rotation:s,F=P(O,B);F.rotation=B,ot(F,{rotation:-((isNaN(+I)?M[0]:vt(I,C,M,!0))+Math.PI/2)},r),f.add(F),_.setItemGraphicEl(O,F)}if(y){var $=d[D],G=$?$.shape.endAngle:s,z=k(O,G),U=m.get("clip");ot(z,{shape:{endAngle:vt(I,C,M,U)}},r),f.add(z),Xk(r.seriesIndex,_.dataType,O,z),v[O]=z}}).execute(),_.each(function(O){var D=_.getItemModel(O),I=D.getModel("emphasis"),N=I.get("focus"),B=I.get("blurScope"),F=I.get("disabled");if(g){var $=_.getItemGraphicEl(O),G=_.getItemVisual(O,"style"),z=G.fill;if($ instanceof Hr){var U=$.style;$.useStyle(re({image:U.image,x:U.x,y:U.y,width:U.width,height:U.height},G))}else $.useStyle(G),$.type!=="pointer"&&$.setColor(z);$.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),$.style.fill==="auto"&&$.setStyle("fill",a(vt(_.get(x,O),C,[0,1],!0))),$.z2EmphasisLift=0,Lr($,D),$t($,N,B,F)}if(y){var H=v[O];H.useStyle(_.getItemVisual(O,"style")),H.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,Lr(H,D),$t(H,N,B,F)}}),this._progressEls=v)},t.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=vr(s,n.cx-o/2+de(l[0],n.r),n.cy-o/2+de(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},t.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),f=+r.get("max"),h=new Ae,d=[],v=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){d[y]=new nt({silent:!0}),v[y]=new nt({silent:!0})}).update(function(y,_){d[y]=s._titleEls[_],v[y]=s._detailEls[_]}).execute(),l.each(function(y){var _=l.getItemModel(y),x=l.get(u,y),w=new Ae,S=a(vt(x,[c,f],[0,1],!0)),C=_.getModel("title");if(C.get("show")){var M=C.get("offsetCenter"),P=o.cx+de(M[0],o.r),k=o.cy+de(M[1],o.r),O=d[y];O.attr({z2:m?0:2,style:Ct(C,{x:P,y:k,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:S})}),w.add(O)}var D=_.getModel("detail");if(D.get("show")){var I=D.get("offsetCenter"),N=o.cx+de(I[0],o.r),B=o.cy+de(I[1],o.r),F=de(D.get("width"),o.r),$=de(D.get("height"),o.r),G=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:S,O=v[y],z=D.get("formatter");O.attr({z2:m?0:2,style:Ct(D,{x:N,y:B,text:ux(x,z),width:isNaN(F)?null:F,height:isNaN($)?null:$,align:"center",verticalAlign:"middle"},{inheritColor:G})}),BQ(O,{normal:D},x,function(H){return ux(H,z)}),g&&zQ(O,y,l,r,{getFormattedLabel:function(H,Y,Z,J,ae,ce){return ux(ce?ce.interpolatedValue:x,z)}}),w.add(O)}h.add(w)}),this.group.add(h),this._titleEls=d,this._detailEls=v},t.type="gauge",t}(yt),MHe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="itemStyle",r}return t.prototype.getInitialData=function(r,n){return Bv(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,K.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:K.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:K.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:K.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:K.color.neutral00,borderWidth:0,borderColor:K.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:K.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:K.color.transparent,borderWidth:0,borderColor:K.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:K.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(bt);function PHe(e){e.registerChartView(AHe),e.registerSeriesModel(MHe)}var LHe=["itemStyle","opacity"],kHe=function(e){q(t,e);function t(r,n){var i=e.call(this)||this,a=i,o=new en,s=new nt;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return t.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(LHe);c=c??1,i||ua(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Et(a,{style:{opacity:c}},o,n)):ot(a,{style:{opacity:c},shape:{points:l.points}},o,n),Lr(a,s),this._updateLabel(r,n),$t(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,f=r.getItemVisual(n,"style"),h=f.fill;Fr(o,kr(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var d=l.getModel("label"),v=d.get("color"),g=v==="inherit"?h:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:g,outsideFill:g});var m=c.linePoints;a.setShape({points:m}),i.textGuideLineConfig={anchor:m?new ke(m[0][0],m[0][1]):null},ot(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),aR(i,oR(l),{stroke:h})},t}(mn),OHe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new kHe(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);xs(u,r,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(yt),DHe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new zv(pe(this.getData,this),pe(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.getInitialData=function(r,n){return Bv(this,{coordDimensions:["value"],encodeDefaulter:je(EN,this)})},t.prototype._defaultLabelLine=function(r){Zc(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.prototype.getDataParams=function(r){var n=this.getData(),i=e.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:K.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:K.color.primary}}},t}(bt);function EHe(e,t){for(var r=e.mapDimension("value"),n=e.mapArray(r,function(l){return l}),i=[],a=t==="ascending",o=0,s=e.count();oXHe)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!fM(this,"mousemove"))){var t=this._model,r=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function fM(e,t){var r=e._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===t}var QHe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(r){var n=this.option;r&&Ve(n,r,!0),this._initDimensions()},t.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},t.prototype.setAxisExpand=function(r){j(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},t.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=ct(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);j(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(qe),JHe=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(va);function ql(e,t,r,n,i,a){e=e||0;var o=r[1]-r[0];if(i!=null&&(i=rh(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=rh(s,[0,o]),i=a=rh(s,[i,a]),n=0}t[0]=rh(t[0],r),t[1]=rh(t[1],r);var l=hM(t,n);t[n]+=e;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,t[n]=rh(t[n],c);var f;return f=hM(t,n),i!=null&&(f.sign!==l.sign||f.spana&&(t[1-n]=t[n]+f.sign*a),t}function hM(e,t){var r=e[t]-e[1-t];return{span:Math.abs(r),sign:r>0?-1:r<0?1:t?-1:1}}function rh(e,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,e))}var dM=j,Rre=Math.min,jre=Math.max,T8=Math.floor,eWe=Math.ceil,C8=hr,tWe=Math.PI,rWe=function(){function e(t,r,n){this.type="parallel",this._axesMap=xe(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=t.dimensions,a=t.parallelAxisIndex;dM(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new JHe(o,o0(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},e.prototype.update=function(t,r){this._updateAxesFromSeries(this._model,t)},e.prototype.containPoint=function(t){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=t[1-a],s=t[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(t,r){r.eachSeries(function(n){if(t.contains(n,r)){var i=n.getData();dM(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),ef(o.scale,o.model)},this)}},this)},e.prototype.resize=function(t,r){var n=Or(t,r).refContainer;this._rect=Rt(t.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var t=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=cx(t.get("axisExpandWidth"),l),f=cx(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,d=t.get("axisExpandWindow"),v;if(d)v=cx(d[1]-d[0],l),d[1]=d[0]+v;else{v=cx(c*(f-1),l);var g=t.get("axisExpandCenter")||T8(u/2);d=[c*g-v/2],d[1]=d[0]+v}var m=(s-v)/(u-f);m<3&&(m=0);var y=[T8(C8(d[0]/c,1))+1,eWe(C8(d[1]/c,1))-1],_=m/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:d,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:_}},e.prototype._layoutAxes=function(){var t=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),dM(n,function(o,s){var l=(i.axisExpandable?iWe:nWe)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:tWe/2,vertical:0},f=[u[a].x+t.x,u[a].y+t.y],h=c[a],d=zr();Hs(d,d,h),$a(d,d,f),this._axesLayout[o]={position:f,rotation:h,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(t){return this._axesMap.get(t)},e.prototype.dataToPoint=function(t,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(t),r)},e.prototype.eachActiveState=function(t,r,n,i){n==null&&(n=0),i==null&&(i=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];j(o,function(m){s.push(t.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;ca*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?ql(l,i,o,"all"):u="none";else{var d=i[1]-i[0],v=o[1]*s/d;i=[jre(0,v-d/2)],i[1]=Rre(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},e}();function cx(e,t){return Rre(jre(e,t[0]),t[1])}function nWe(e,t){var r=t.layoutLength/(t.axisCount-1);return{position:r*e,axisNameAvailableWidth:r,axisLabelShow:!0}}function iWe(e,t){var r=t.layoutLength,n=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,c;return e=0;i--)bi(n[i])},t.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;auWe}function Gre(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function Hre(e,t,r,n){var i=new Ae;return i.add(new Ze({name:"main",style:jR(r),silent:!0,draggable:!0,cursor:"move",drift:je(P8,e,t,i,["n","s","w","e"]),ondragend:je(rf,t,{isEnd:!0})})),j(n,function(a){i.add(new Ze({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:je(P8,e,t,i,a),ondragend:je(rf,t,{isEnd:!0})}))}),i}function Wre(e,t,r,n){var i=n.brushStyle.lineWidth||0,a=qd(i,cWe),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],f=r[1][1],h=c-a+i/2,d=f-a+i/2,v=c-o,g=f-s,m=v+i,y=g+i;Qo(e,t,"main",o,s,v,g),n.transformable&&(Qo(e,t,"w",l,u,a,y),Qo(e,t,"e",h,u,a,y),Qo(e,t,"n",l,u,m,a),Qo(e,t,"s",l,d,m,a),Qo(e,t,"nw",l,u,a,a),Qo(e,t,"ne",h,u,a,a),Qo(e,t,"sw",l,d,a,a),Qo(e,t,"se",h,d,a,a))}function rD(e,t){var r=t.__brushOption,n=r.transformable,i=t.childAt(0);i.useStyle(jR(r)),i.attr({silent:!n,cursor:n?"move":"default"}),j([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?nD(e,a[0]):gWe(e,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?hWe[s]+"-resize":null})})}function Qo(e,t,r,n,i,a,o){var s=t.childOfName(r);s&&s.setShape(yWe(BR(e,t,[[n,i],[n+a,i+o]])))}function jR(e){return Me({strokeNoScale:!0},e.brushStyle)}function Ure(e,t,r,n){var i=[Ty(e,r),Ty(t,n)],a=[qd(e,r),qd(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function pWe(e){return $l(e.group)}function nD(e,t){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=_T(r[t],pWe(e));return n[i]}function gWe(e,t){var r=[nD(e,t[0]),nD(e,t[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function P8(e,t,r,n,i,a){var o=r.__brushOption,s=e.toRectRange(o.range),l=Zre(t,i,a);j(n,function(u){var c=fWe[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=e.fromRectRange(Ure(s[0][0],s[1][0],s[0][1],s[1][1])),IR(t,r),rf(t,{isEnd:!1})}function mWe(e,t,r,n){var i=t.__brushOption.range,a=Zre(e,r,n);j(i,function(o){o[0]+=a[0],o[1]+=a[1]}),IR(e,t),rf(e,{isEnd:!1})}function Zre(e,t,r){var n=e.group,i=n.transformCoordToLocal(t,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function BR(e,t,r){var n=Vre(e,t);return n&&n!==tf?n.clipPath(r,e._transform):Ce(r)}function yWe(e){var t=Ty(e[0][0],e[1][0]),r=Ty(e[0][1],e[1][1]),n=qd(e[0][0],e[1][0]),i=qd(e[0][1],e[1][1]);return{x:t,y:r,width:n-t,height:i-r}}function _We(e,t,r){if(!(!e._brushType||bWe(e,t.offsetX,t.offsetY))){var n=e._zr,i=e._covers,a=RR(e,t,r);if(!e._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var jT={lineX:O8(0),lineY:O8(1),rect:{createCover:function(e,t){function r(n){return n}return Hre({toRectRange:r,fromRectRange:r},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=Gre(e);return Ure(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,r,n){Wre(e,t,r,n)},updateCommon:rD,contain:aD},polygon:{createCover:function(e,t){var r=new Ae;return r.add(new en({name:"main",style:jR(t),silent:!0})),r},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new mn({name:"main",draggable:!0,drift:je(mWe,e,t),ondragend:je(rf,e,{isEnd:!0})}))},updateCoverShape:function(e,t,r,n){t.childAt(0).setShape({points:BR(e,t,r)})},updateCommon:rD,contain:aD}};function O8(e){return{createCover:function(t,r){return Hre({toRectRange:function(n){var i=[n,[0,100]];return e&&i.reverse(),i},fromRectRange:function(n){return n[e]}},t,r,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var r=Gre(t),n=Ty(r[0][e],r[1][e]),i=qd(r[0][e],r[1][e]);return[n,i]},updateCoverShape:function(t,r,n,i){var a,o=Vre(t,r);if(o!==tf&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[n,a];e&&l.reverse(),Wre(t,r,l,i)},updateCommon:rD,contain:aD}}function Xre(e){return e=zR(e),function(t){return vN(t,e)}}function qre(e,t){return e=zR(e),function(r){var n=t??r,i=n?e.width:e.height,a=n?e.x:e.y;return[a,a+(i||0)]}}function Kre(e,t,r){var n=zR(e);return function(i,a){return n.contain(a[0],a[1])&&!rre(i,t,r)}}function zR(e){return Oe.create(e)}var wWe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){e.prototype.init.apply(this,arguments),(this._brushController=new ER(n.getZr())).on("brush",pe(this._onBrush,this))},t.prototype.render=function(r,n,i,a){if(!SWe(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ae,this.group.add(this._axisGroup),!!r.get("show")){var s=CWe(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,f=r.axis.dim,h=l.getAxisLayout(f),d=re({strokeContainThreshold:c},h),v=new $n(r,i,d);v.build(),this._axisGroup.add(v.group),this._refreshBrushController(d,u,r,s,c,i),r0(o,this._axisGroup,r)}}},t.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Oe.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:Xre(f),isTargetByCursor:Kre(f,s,a),getLinearBrushOtherExtent:qre(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(TWe(i))},t.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=se(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Mt);function SWe(e,t,r){return r&&r.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:r})[0]===e}function TWe(e){var t=e.axis;return se(e.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(r[0],!0),t.dataToCoord(r[1],!0)]}})}function CWe(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var AWe={type:"axisAreaSelect",event:"axisAreaSelected"};function MWe(e){e.registerAction(AWe,function(t,r){r.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),e.registerAction("parallelAxisExpand",function(t,r){r.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var PWe={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Qre(e){e.registerComponentView(qHe),e.registerComponentModel(QHe),e.registerCoordinateSystem("parallel",oWe),e.registerPreprocessor(UHe),e.registerComponentModel(eD),e.registerComponentView(wWe),Yd(e,"parallel",eD,PWe),MWe(e)}function LWe(e){We(Qre),e.registerChartView(BHe),e.registerSeriesModel(FHe),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,WHe)}var kWe=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),OWe=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new kWe},t.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},t.prototype.highlight=function(){Is(this)},t.prototype.downplay=function(){Ns(this)},t}(et),DWe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new Ae,r._focusAdjacencyDisabled=!1,r}return t.prototype.init=function(r,n){this._controller=new xf(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,f=r.getData(),h=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),nre(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(v){var g=new OWe,m=Ee(g);m.dataIndex=v.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=v.getModel(),_=y.getModel("lineStyle"),x=_.get("curveness"),w=v.node1.getLayout(),S=v.node1.getModel(),C=S.get("localX"),M=S.get("localY"),P=v.node2.getLayout(),k=v.node2.getModel(),O=k.get("localX"),D=k.get("localY"),I=v.getLayout(),N,B,F,$,G,z,U,H;g.shape.extent=Math.max(1,I.dy),g.shape.orient=d,d==="vertical"?(N=(C!=null?C*u:w.x)+I.sy,B=(M!=null?M*c:w.y)+w.dy,F=(O!=null?O*u:P.x)+I.ty,$=D!=null?D*c:P.y,G=N,z=B*(1-x)+$*x,U=F,H=B*x+$*(1-x)):(N=(C!=null?C*u:w.x)+w.dx,B=(M!=null?M*c:w.y)+I.sy,F=O!=null?O*u:P.x,$=(D!=null?D*c:P.y)+I.ty,G=N*(1-x)+F*x,z=B,U=N*x+F*(1-x),H=$),g.setShape({x1:N,y1:B,x2:F,y2:$,cpx1:G,cpy1:z,cpx2:U,cpy2:H}),g.useStyle(_.getItemStyle()),D8(g.style,d,v);var Y=""+y.get("value"),Z=kr(y,"edgeLabel");Fr(g,Z,{labelFetcher:{getFormattedLabel:function(ce,ge,Fe,_e,ne,fe){return r.getFormattedLabel(ce,ge,"edge",_e,oi(ne,Z.normal&&Z.normal.get("formatter"),Y),fe)}},labelDataIndex:v.dataIndex,defaultText:Y}),g.setTextConfig({position:"inside"});var J=y.getModel("emphasis");Lr(g,y,"lineStyle",function(ce){var ge=ce.getItemStyle();return D8(ge,d,v),ge}),s.add(g),h.setItemGraphicEl(v.dataIndex,g);var ae=J.get("focus");$t(g,ae==="adjacency"?v.getAdjacentDataIndices():ae==="trajectory"?v.getTrajectoryDataIndices():ae,J.get("blurScope"),J.get("disabled"))}),o.eachNode(function(v){var g=v.getLayout(),m=v.getModel(),y=m.get("localX"),_=m.get("localY"),x=m.getModel("emphasis"),w=m.get(["itemStyle","borderRadius"])||0,S=new Ze({shape:{x:y!=null?y*u:g.x,y:_!=null?_*c:g.y,width:g.dx,height:g.dy,r:w},style:m.getModel("itemStyle").getItemStyle(),z2:10});Fr(S,kr(m),{labelFetcher:{getFormattedLabel:function(M,P){return r.getFormattedLabel(M,P,"node")}},labelDataIndex:v.dataIndex,defaultText:v.id}),S.disableLabelAnimation=!0,S.setStyle("fill",v.getVisual("color")),S.setStyle("decal",v.getVisual("style").decal),Lr(S,m),s.add(S),f.setItemGraphicEl(v.dataIndex,S),Ee(S).dataType="node";var C=x.get("focus");$t(S,C==="adjacency"?v.getAdjacentDataIndices():C==="trajectory"?v.getTrajectoryDataIndices():C,x.get("blurScope"),x.get("disabled"))}),f.eachItemGraphicEl(function(v,g){var m=f.getItemModel(g);m.get("draggable")&&(v.drift=function(y,_){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=_,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:f.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},v.ondragend=function(){a._focusAdjacencyDisabled=!1},v.draggable=!0,v.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(EWe(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new bf(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t}(yt);function D8(e,t,r){switch(e.fill){case"source":e.fill=r.node1.getVisual("color"),e.decal=r.node1.getVisual("style").decal;break;case"target":e.fill=r.node2.getVisual("color"),e.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");ve(n)&&ve(i)&&(e.fill=new vf(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function EWe(e,t,r){var n=new Ze({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Et(n,{shape:{width:e.width+20}},t,r),n}var IWe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Je(o[l],this,n));var u=DR(a,i,this,!0,c);return u.data;function c(f,h){f.wrapMethod("getItemModel",function(d,v){var g=d.parentModel,m=g.getData().getItemLayout(v);if(m){var y=m.depth,_=g.levelModels[y];_&&(d.parentModel=_)}return d}),h.wrapMethod("getItemModel",function(d,v){var g=d.parentModel,m=g.getGraph().getEdgeByIndex(v),y=m.node1.getLayout();if(y){var _=y.depth,x=g.levelModels[_];x&&(d.parentModel=x)}return d})}},t.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return xr("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),f=c.getLayout().value,h=this.getDataParams(r,i).data.name;return xr("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},t.type="series.sankey",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:K.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:K.color.primary}},animationEasing:"linear",animationDuration:1e3},t}(bt);function NWe(e,t){e.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=Or(r,t).refContainer,o=Rt(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,f=u.edges;jWe(c);var h=ct(c,function(m){return m.getLayout().value===0}),d=h.length!==0?0:r.get("layoutIterations"),v=r.get("orient"),g=r.get("nodeAlign");RWe(c,f,n,i,s,l,d,v,g)})}function RWe(e,t,r,n,i,a,o,s,l){BWe(e,t,r,i,a,s,l),VWe(e,t,a,i,n,o,s),KWe(e,s)}function jWe(e){j(e,function(t){var r=Gl(t.outEdges,Ow),n=Gl(t.inEdges,Ow),i=t.getValue()||0,a=Math.max(r,n,i);t.setLayout({value:a},!0)})}function BWe(e,t,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h=0;y&&m.depth>d&&(d=m.depth),g.setLayout({depth:y?m.depth:f},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var _=0;_f-1?d:f-1;o&&o!=="left"&&zWe(e,o,a,M);var P=a==="vertical"?(i-r)/M:(n-r)/M;FWe(e,P,a)}function Jre(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function zWe(e,t,r,n){if(t==="right"){for(var i=[],a=e,o=0;a.length;){for(var s=0;s0;a--)l*=.99,WWe(s,l,o),vM(s,i,r,n,o),qWe(s,l,o),vM(s,i,r,n,o)}function GWe(e,t){var r=[],n=t==="vertical"?"y":"x",i=Hk(e,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),j(i.keys,function(a){r.push(i.buckets.get(a))}),r}function HWe(e,t,r,n,i,a){var o=1/0;j(e,function(s){var l=s.length,u=0;j(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+t;var v=i==="vertical"?n:r;if(u=c-t-v,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=f-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[h]+t-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function WWe(e,t,r){j(e.slice().reverse(),function(n){j(n,function(i){if(i.outEdges.length){var a=Gl(i.outEdges,UWe,r)/Gl(i.outEdges,Ow);if(isNaN(a)){var o=i.outEdges.length;a=o?Gl(i.outEdges,ZWe,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-Kl(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Kl(i,r))*t;i.setLayout({y:l},!0)}}})})}function UWe(e,t){return Kl(e.node2,t)*e.getValue()}function ZWe(e,t){return Kl(e.node2,t)}function YWe(e,t){return Kl(e.node1,t)*e.getValue()}function XWe(e,t){return Kl(e.node1,t)}function Kl(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Ow(e){return e.getValue()}function Gl(e,t,r){for(var n=0,i=e.length,a=-1;++ao&&(o=l)}),j(n,function(s){var l=new $r({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&j(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function JWe(e){e.registerChartView(DWe),e.registerSeriesModel(IWe),e.registerLayout(NWe),e.registerVisual(QWe),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),e.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(i){var a=i.coordinateSystem,o=ET(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var ene=function(){function e(){}return e.prototype._hasEncodeRule=function(t){var r=this.getEncode();return r&&r.get(t)!=null},e.prototype.getInitialData=function(t,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],c=t.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],d=[i,a],v=d[c].get("type"),g=d[1-c].get("type"),m=t.data;if(m&&l){var y=[];j(m,function(w,S){var C;ie(w)?(C=w.slice(),w.unshift(S)):ie(w.value)?(C=re({},w),C.value=C.value.slice(),w.value.unshift(S)):C=w,y.push(C)}),t.data=y}var _=this.defaultValueDimensions,x=[{name:f,type:vw(v),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:vw(g),dimsDef:_.slice()}];return Bv(this,{coordDimensions:x,dimensionsCount:_.length+1,encodeDefaulter:je(cJ,x,this)})},e.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},e}(),tne=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:K.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:K.color.shadow}},animationDuration:800},t}(bt);or(tne,ene,!0);var eUe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=E8(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(ua(f),rne(h,f,a,u)):f=E8(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},t.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},t.type="boxplot",t}(yt),tUe=function(){function e(){}return e}(),rUe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new tUe},t.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();ag){var w=[y,x];n.push(w)}}}return{boxData:r,outliers:n}}var uUe={type:"echarts:boxplot",transform:function(t){var r=t.upstream;if(r.sourceFormat!==tn){var n="";pt(n)}var i=lUe(r.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function cUe(e){e.registerSeriesModel(tne),e.registerChartView(eUe),e.registerLayout(iUe),e.registerTransform(uUe)}var fUe=["itemStyle","borderColor"],hUe=["itemStyle","borderColor0"],dUe=["itemStyle","borderColorDoji"],vUe=["itemStyle","color"],pUe=["itemStyle","color0"];function $R(e,t){return t.get(e>0?vUe:pUe)}function FR(e,t){return t.get(e===0?dUe:e>0?fUe:hUe)}var gUe={seriesType:"candlestick",plan:Ov(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e)){var r=e.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=$R(s,o),l.stroke=FR(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");re(u,l)}}}}}},mUe=["color","borderColor"],yUe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},t.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},t.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},t.prototype.eachRendered=function(r){uu(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&I8(u,f))return;var h=pM(f,c,!0);Et(h,{shape:{points:f.ends}},r,c),gM(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var d=n.getItemLayout(c);if(s&&I8(u,d)){a.remove(h);return}h?(ot(h,{shape:{points:d.ends}},r,c),ua(h)):h=pM(d),gM(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},t.prototype._renderLarge=function(r){this._clear(),N8(r,this.group);var n=r.get("clip",!0)?u0(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=pM(s);gM(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(r,n){N8(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(r){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(yt),_Ue=function(){function e(){}return e}(),xUe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new _Ue},t.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},t}(et);function pM(e,t,r){var n=e.ends;return new xUe({shape:{points:r?bUe(n,e):n},z2:100})}function I8(e,t){for(var r=!0,n=0;nS?D[a]:O[a],ends:B,brushRect:U(C,M,x)})}function G(Y,Z){var J=[];return J[i]=Z,J[a]=Y,isNaN(Z)||isNaN(Y)?[NaN,NaN]:t.dataToPoint(J)}function z(Y,Z,J){var ae=Z.slice(),ce=Z.slice();ae[i]=Yx(ae[i]+n/2,1,!1),ce[i]=Yx(ce[i]-n/2,1,!0),J?Y.push(ae,ce):Y.push(ce,ae)}function U(Y,Z,J){var ae=G(Y,J),ce=G(Z,J);return ae[i]-=n/2,ce[i]-=n/2,{x:ae[0],y:ae[1],width:n,height:ce[1]-ae[1]}}function H(Y){return Y[i]=Yx(Y[i],1),Y}}function v(g,m){for(var y=mo(g.count*4),_=0,x,w=[],S=[],C,M=m.getStore(),P=!!e.get(["itemStyle","borderColorDoji"]);(C=g.next())!=null;){var k=M.get(s,C),O=M.get(u,C),D=M.get(c,C),I=M.get(f,C),N=M.get(h,C);if(isNaN(k)||isNaN(I)||isNaN(N)){y[_++]=NaN,_+=3;continue}y[_++]=R8(M,C,O,D,c,P),w[i]=k,w[a]=I,x=t.dataToPoint(w,null,S),y[_++]=x?x[0]:NaN,y[_++]=x?x[1]:NaN,w[a]=N,x=t.dataToPoint(w,null,S),y[_++]=x?x[1]:NaN}m.setLayout("largePoints",y)}}};function R8(e,t,r,n,i,a){var o;return r>n?o=-1:r0?e.get(i,t-1)<=n?1:-1:1,o}function CUe(e,t){var r=e.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=de(be(e.get("barMaxWidth"),i),i),o=de(be(e.get("barMinWidth"),1),i),s=e.get("barWidth");return s!=null?de(s,i):Math.max(Math.min(i/2,a),o)}function AUe(e){e.registerChartView(yUe),e.registerSeriesModel(nne),e.registerPreprocessor(SUe),e.registerVisual(gUe),e.registerLayout(TUe)}function j8(e,t){var r=t.rippleEffectColor||t.color;e.eachChild(function(n){n.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?r:null,fill:t.brushType==="fill"?r:null}})})}var MUe=function(e){q(t,e);function t(r,n){var i=e.call(this)||this,a=new s0(r,n),o=new Ae;return i.add(a),i.add(o),i.updateData(r,n),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;Te(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},t.prototype._getLineLength=function(r){return us(r.__p1,r.__cp1)+us(r.__cp1,r.__p2)},t.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},t.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},t.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=Kr,c=Pk;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];r.x=f[0]*(1-c)+c*h[0],r.y=f[1]*(1-c)+c*h[1];var d=r.__t<1?h[0]-f[0]:f[0]-h[0],v=r.__t<1?h[1]-f[1]:f[1]-h[1];r.rotation=-Math.atan2(v,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},t}(ine),DUe=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),EUe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new DUe},t.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var d=(u+f)/2-(c-h)*a,v=(c+h)/2-(f-u)*a;r.quadraticCurveTo(d,v,f,h)}else r.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var f=a[u++],h=a[u++],d=1;d0){var m=(f+v)/2-(h-g)*o,y=(h+g)/2-(v-f)*o;if(aQ(f,h,m,y,v,g,s,r,n))return l}else if(cl(f,h,v,g,s,r,n))return l;l++}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+t.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),one={seriesType:"lines",plan:Ov(),reset:function(e){var t=e.coordinateSystem;if(t){var r=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=r.get("clip",!0)&&u0(r.coordinateSystem,!1,r);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},t.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},t.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=one.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new IUe:new OR(o?a?OUe:ane:a?ine:kR),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(r){return!!r.get(["effect","show"])},t.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.type="lines",t}(yt),RUe=typeof Uint32Array>"u"?Array:Uint32Array,jUe=typeof Float64Array>"u"?Array:Float64Array;function B8(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=se(t,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),nT([i,r[0],r[1]])}))}var BUe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.init=function(r){r.data=r.data||[],B8(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(r){if(B8(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=Rd(this._flatCoords,n.flatCoords),this._flatCoordsOffset=Rd(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},t.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},t.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},t.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(bt);function fx(e){return e instanceof Array||(e=[e,e]),e}var zUe={seriesType:"lines",reset:function(e){var t=fx(e.get("symbol")),r=fx(e.get("symbolSize")),n=e.getData();n.setVisual("fromSymbol",t&&t[0]),n.setVisual("toSymbol",t&&t[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=fx(s.getShallow("symbol",!0)),u=fx(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function $Ue(e){e.registerChartView(NUe),e.registerSeriesModel(BUe),e.registerLayout(one),e.registerVisual(zUe)}var FUe=256,VUe=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=si.createCanvas();this.canvas=t}return e.prototype.update=function(t,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),d=t.length;f.width=r,f.height=n;for(var v=0;v0){var I=o(x)?l:u;x>0&&(x=x*O+P),S[C++]=I[D],S[C++]=I[D+1],S[C++]=I[D+2],S[C++]=I[D+3]*x*256}else C+=4}return h.putImageData(w,0,0),f},e.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=si.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=K.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},e.prototype._getGradient=function(t,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},e}();function GUe(e,t,r){var n=e[1]-e[0];t=se(t,function(o){return{interval:[(o.interval[0]-e[0])/n,(o.interval[1]-e[0])/n]}});var i=t.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=t[0]&&n<=t[1]}}function z8(e){var t=e.dimensions;return t[0]==="lng"&&t[1]==="lat"}var WUe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):z8(o)&&this._renderOnGeo(o,r,a,i)},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(z8(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},t.prototype.eachRendered=function(r){uu(this._progressiveEls||this.group,r)},t.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=Xl(s,"cartesian2d"),u=Xl(s,"matrix"),c,f,h,d;if(l){var v=s.getAxis("x"),g=s.getAxis("y");c=v.getBandWidth()+.5,f=g.getBandWidth()+.5,h=v.scale.getExtent(),d=g.scale.getExtent()}for(var m=this.group,y=r.getData(),_=r.getModel(["emphasis","itemStyle"]).getItemStyle(),x=r.getModel(["blur","itemStyle"]).getItemStyle(),w=r.getModel(["select","itemStyle"]).getItemStyle(),S=r.get(["itemStyle","borderRadius"]),C=kr(r),M=r.getModel("emphasis"),P=M.get("focus"),k=M.get("blurScope"),O=M.get("disabled"),D=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],I=i;Ih[1]||$d[1])continue;var G=s.dataToPoint([F,$]);N=new Ze({shape:{x:G[0]-c/2,y:G[1]-f/2,width:c,height:f},style:B})}else if(u){var z=s.dataToLayout([y.get(D[0],I),y.get(D[1],I)]).rect;if(hn(z.x))continue;N=new Ze({z2:1,shape:z,style:B})}else{if(isNaN(y.get(D[1],I)))continue;var U=s.dataToLayout([y.get(D[0],I)]),z=U.contentRect||U.rect;if(hn(z.x)||hn(z.y))continue;N=new Ze({z2:1,shape:z,style:B})}if(y.hasItemOption){var H=y.getItemModel(I),Y=H.getModel("emphasis");_=Y.getModel("itemStyle").getItemStyle(),x=H.getModel(["blur","itemStyle"]).getItemStyle(),w=H.getModel(["select","itemStyle"]).getItemStyle(),S=H.get(["itemStyle","borderRadius"]),P=Y.get("focus"),k=Y.get("blurScope"),O=Y.get("disabled"),C=kr(H)}N.shape.r=S;var Z=r.getRawValue(I),J="-";Z&&Z[2]!=null&&(J=Z[2]+""),Fr(N,C,{labelFetcher:r,labelDataIndex:I,defaultOpacity:B.opacity,defaultText:J}),N.ensureState("emphasis").style=_,N.ensureState("blur").style=x,N.ensureState("select").style=w,$t(N,P,k,O),N.incremental=o,o&&(N.states.emphasis.hoverLayer=!0),m.add(N),y.setItemGraphicEl(I,N),this._progressiveEls&&this._progressiveEls.push(N)}},t.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new VUe;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),f=r.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),d=Math.max(c.y,0),v=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=v-h,y=g-d,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],x=l.mapArray(_,function(M,P,k){var O=r.dataToPoint([M,P]);return O[0]-=h,O[1]-=d,O.push(k),O}),w=i.getExtent(),S=i.type==="visualMap.continuous"?HUe(w,i.option.range):GUe(w,i.getPieceList(),i.option.selected);u.update(x,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},S);var C=new Hr({style:{width:m,height:y,x:h,y:d,image:u.canvas},silent:!0});this.group.add(C)},t.type="heatmap",t}(yt),UUe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return Vo(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var r=kv.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:K.color.primary}}},t}(bt);function ZUe(e){e.registerChartView(WUe),e.registerSeriesModel(UUe)}var YUe=["itemStyle","borderWidth"],$8=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],_M=new Fo,XUe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:$8[+c],categoryDim:$8[1-+c]};o.diff(s).add(function(v){if(o.hasValue(v)){var g=V8(o,v),m=F8(o,v,g,h),y=G8(o,h,m);o.setItemGraphicEl(v,y),a.add(y),W8(y,h,m)}}).update(function(v,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(v)){a.remove(m);return}var y=V8(o,v),_=F8(o,v,y,h),x=hne(o,_);m&&x!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(v,null),m=null),m?r7e(m,h,_):m=G8(o,h,_,!0),o.setItemGraphicEl(v,m),m.__pictorialSymbolMeta=_,a.add(m),W8(m,h,_)}).remove(function(v){var g=s.getItemGraphicEl(v);g&&H8(s,v,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=r.get("clip",!0)?u0(r.coordinateSystem,!1,r):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){H8(a,Ee(o).dataIndex,r,o)}):i.removeAll()},t.type="pictorialBar",t}(yt);function F8(e,t,r,n){var i=e.getItemLayout(t),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,f=r.isAnimationEnabled(),h={dataIndex:t,layout:i,itemModel:r,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?r:null,hoverScale:f&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};qUe(r,a,i,n,h),KUe(e,t,i,a,o,h.boundingLength,h.pxSign,c,n,h),QUe(r,h.symbolScale,u,n,h);var d=h.symbolSize,v=yf(r.get("symbolOffset"),d);return JUe(r,d,i,a,o,v,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function qUe(e,t,r,n,i){var a=n.valueDim,o=e.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(ie(o)){var f=[xM(s,o[0])-l,xM(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function xM(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function KUe(e,t,r,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(r[f.wh]),d=e.getItemVisual(t,"symbolSize"),v;ie(d)?v=d.slice():d==null?v=["100%","100%"]:v=[d,d],v[f.index]=de(v[f.index],h),v[c.index]=de(v[c.index],n?h:Math.abs(a)),u.symbolSize=v;var g=u.symbolScale=[v[0]/s,v[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function QUe(e,t,r,n,i){var a=e.get(YUe)||0;a&&(_M.attr({scaleX:t[0],scaleY:t[1],rotation:r}),_M.updateTransform(),a/=_M.getLineScale(),a*=t[n.valueDim.index]),i.valueLineWidth=a||0}function JUe(e,t,r,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,d=c.valueDim,v=f.pxSign,g=Math.max(t[d.index]+s,0),m=g;if(n){var y=Math.abs(l),_=Qr(e.get("symbolMargin"),"15%")+"",x=!1;_.lastIndexOf("!")===_.length-1&&(x=!0,_=_.slice(0,_.length-1));var w=de(_,t[d.index]),S=Math.max(g+w*2,0),C=x?0:w*2,M=KI(n),P=M?n:U8((y+C)/S),k=y-P*g;w=k/2/(x?P:Math.max(P-1,1)),S=g+w*2,C=x?0:w*2,!M&&n!=="fixed"&&(P=u?U8((Math.abs(u)+C)/S):0),m=P*S-C,f.repeatTimes=P,f.symbolMargin=w}var O=v*(m/2),D=f.pathPosition=[];D[h.index]=r[h.wh]/2,D[d.index]=o==="start"?O:o==="end"?l-O:l/2,a&&(D[0]+=a[0],D[1]+=a[1]);var I=f.bundlePosition=[];I[h.index]=r[h.xy],I[d.index]=r[d.xy];var N=f.barRectShape=re({},r);N[d.wh]=v*Math.max(Math.abs(r[d.wh]),Math.abs(D[d.index]+O)),N[h.wh]=r[h.wh];var B=f.clipShape={};B[h.xy]=-r[h.xy],B[h.wh]=c.ecSize[h.wh],B[d.xy]=0,B[d.wh]=r[d.wh]}function sne(e){var t=e.symbolPatternSize,r=vr(e.symbolType,-t/2,-t/2,t,t);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function lne(e,t,r,n){var i=e.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=t.valueDim,u=r.repeatTimes||0,c=0,f=a[t.valueDim.index]+o+r.symbolMargin*2;for(VR(e,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:y<0)&&(_=u-1-g),m[l.index]=f*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function une(e,t,r,n){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?rd(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=e.__pictorialMainPath=sne(r),i.add(a),rd(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function cne(e,t,r){var n=re({},t.barRectShape),i=e.__pictorialBarRect;i?rd(i,null,{shape:n},t,r):(i=e.__pictorialBarRect=new Ze({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function fne(e,t,r,n){if(r.symbolClip){var i=e.__pictorialClipPath,a=re({},r.clipShape),o=t.valueDim,s=r.animationModel,l=r.dataIndex;if(i)ot(i,{shape:a},s,l);else{a[o.wh]=0,i=new Ze({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],pf[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function V8(e,t){var r=e.getItemModel(t);return r.getAnimationDelayParams=e7e,r.isAnimationEnabled=t7e,r}function e7e(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function t7e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function G8(e,t,r,n){var i=new Ae,a=new Ae;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?lne(i,t,r):une(i,t,r),cne(i,r,n),fne(i,t,r,n),i.__pictorialShapeStr=hne(e,r),i.__pictorialSymbolMeta=r,i}function r7e(e,t,r){var n=r.animationModel,i=r.dataIndex,a=e.__pictorialBundle;ot(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?lne(e,t,r,!0):une(e,t,r,!0),cne(e,r,!0),fne(e,t,r,!0)}function H8(e,t,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];VR(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),j(a,function(o){Yl(o,{scaleX:0,scaleY:0},r,t,function(){n.parent&&n.parent.remove(n)})}),e.setItemGraphicEl(t,null)}function hne(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function VR(e,t,r){j(e.__pictorialBundle.children(),function(n){n!==e.__pictorialBarRect&&t.call(r,n)})}function rd(e,t,r,n,i,a){t&&e.attr(t),n.symbolClip&&!i?r&&e.attr(r):r&&pf[i?"updateProps":"initProps"](e,r,n.animationModel,n.dataIndex,a)}function W8(e,t,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");VR(e,function(g){if(g instanceof Hr){var m=g.style;g.useStyle(re({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,h&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var d=t.valueDim.posDesc[+(r.boundingLength>0)],v=e.__pictorialBarRect;v.ignoreClip=!0,Fr(v,kr(i),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:Zd(t.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),$t(e,c,f,a.get("disabled"))}function U8(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var n7e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return t.prototype.getInitialData=function(r){return r.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=cu(yy.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:K.color.primary}}}),t}(yy);function i7e(e){e.registerChartView(XUe),e.registerSeriesModel(n7e),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,je(Dee,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Eee("pictorialBar"))}var a7e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._layers=[],r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(m){return m.name}var d=new Rs(this._layersSeries||[],l,h,h),v=[];d.add(pe(g,this,"add")).update(pe(g,this,"update")).remove(pe(g,this,"remove")).execute();function g(m,y,_){var x=o._layers;if(m==="remove"){s.remove(x[y]);return}for(var w=[],S=[],C,M=l[y].indices,P=0;Pa&&(a=s),n.push(s)}for(var u=0;ua&&(a=f)}return{y0:i,max:a}}function c7e(e){e.registerChartView(a7e),e.registerSeriesModel(s7e),e.registerLayout(l7e),e.registerProcessor(jv("themeRiver"))}var f7e=2,h7e=4,Y8=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;o.z2=f7e,o.textConfig={inside:!0},Ee(o).seriesIndex=n.seriesIndex;var s=new nt({z2:h7e,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return t.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Ee(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=re({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var d=n.getVisual("decal");d&&(h.decal=Hd(d,o));var v=_o(l.getModel("itemStyle"),f,!0);re(f,v),j(Gn,function(_){var x=s.ensureState(_),w=l.getModel([_,"itemStyle"]);x.style=w.getItemStyle();var S=_o(w,f);S&&(x.shape=S)}),r?(s.setShape(f),s.shape.r=c.r0,Et(s,{shape:{r:c.r}},i,n.dataIndex)):(ot(s,{shape:f},i),ua(s)),s.useStyle(h),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="relative"?Rd(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;$t(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),d=this.node.dataIndex,v=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(v!=null&&Math.abs(s)B&&!zd($-B)&&$0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new Y8(_,r,n,i),c.add(o.virtualPiece)),x.piece.off("click"),o.virtualPiece.on("click",function(w){o._rootToNode(x.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";iw(u,c)}}i=!0}})})},t.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:oD,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(yt),g7e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};dne(i);var a=this._levelModels=se(r.levels||[],function(l){return new Je(l,this,n)},this),o=TR.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=NT(i,this),n},t.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){mre(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(bt);function dne(e){var t=0;j(e.children,function(n){dne(n);var i=n.value;ie(i)&&(i=i[0]),t+=i});var r=e.value;ie(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),ie(e.value)?e.value[0]=r:e.value=r}var q8=Math.PI/180;function m7e(e,t,r){t.eachSeriesByType(e,function(n){var i=n.get("center"),a=n.get("radius");ie(a)||(a=[0,a]),ie(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=de(i[0],o),c=de(i[1],s),f=de(a[0],l/2),h=de(a[1],l/2),d=-n.get("startAngle")*q8,v=n.get("minAngle")*q8,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,_=n.get("sort");_!=null&&vne(m,_);var x=0;j(m.children,function($){!isNaN($.getValue())&&x++});var w=m.getValue(),S=Math.PI/(w||x)*2,C=m.depth>0,M=m.height-(C?-1:1),P=(h-f)/(M||1),k=n.get("clockwise"),O=n.get("stillShowZeroSum"),D=k?1:-1,I=function($,G){if($){var z=G;if($!==g){var U=$.getValue(),H=w===0&&O?S:U*S;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&ve(s)&&(s=H1(s,(n.depth-1)/(a-1)*.5)),s}e.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");re(u,l)})})}function x7e(e){e.registerChartView(p7e),e.registerSeriesModel(g7e),e.registerLayout(je(m7e,"sunburst")),e.registerProcessor(je(jv,"sunburst")),e.registerVisual(_7e),v7e(e)}var K8={color:"fill",borderColor:"stroke"},b7e={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},bs=Ke(),w7e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(r,n){return Vo(null,this)},t.prototype.getDataParams=function(r,n,i){var a=e.prototype.getDataParams.call(this,r,n);return i&&(a.info=bs(i).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(bt);function S7e(e,t){return t=t||[0,0],se(["x","y"],function(r,n){var i=this.getAxis(r),a=t[n],o=e[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function T7e(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:pe(S7e,e)}}}function C7e(e,t){return t=t||[0,0],se([0,1],function(r){var n=t[r],i=e[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=t[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function A7e(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(r){return e.dataToPoint(r)},size:pe(C7e,e)}}}function M7e(e,t){var r=this.getAxis(),n=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function P7e(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:pe(M7e,e)}}}function L7e(e,t){return t=t||[0,0],se(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=t[n],s=e[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function k7e(e){var t=e.getRadiusAxis(),r=e.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=t.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=e.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:pe(L7e,e)}}}function O7e(e){var t=e.getRect(),r=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return e.dataToPoint(n,i)},layout:function(n,i){return e.dataToLayout(n,i)}}}}function D7e(e){var t=e.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r,n){return e.dataToPoint(r,n)},layout:function(r,n){return e.dataToLayout(r,n)}}}}function pne(e,t,r,n){return e&&(e.legacy||e.legacy!==!1&&!r&&!n&&t!=="tspan"&&(t==="text"||ye(e,"text")))}function gne(e,t,r){var n=e,i,a,o;if(t==="text")o=n;else{o={},ye(n,"text")&&(o.text=n.text),ye(n,"rich")&&(o.rich=n.rich),ye(n,"textFill")&&(o.fill=n.textFill),ye(n,"textStroke")&&(o.stroke=n.textStroke),ye(n,"fontFamily")&&(o.fontFamily=n.fontFamily),ye(n,"fontSize")&&(o.fontSize=n.fontSize),ye(n,"fontStyle")&&(o.fontStyle=n.fontStyle),ye(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=ye(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),ye(n,"textPosition")&&(i.position=n.textPosition),ye(n,"textOffset")&&(i.offset=n.textOffset),ye(n,"textRotation")&&(i.rotation=n.textRotation),ye(n,"textDistance")&&(i.distance=n.textDistance)}return Q8(o,e),j(o.rich,function(l){Q8(l,l)}),{textConfig:i,textContent:a}}function Q8(e,t){t&&(t.font=t.textFont||t.font,ye(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),ye(t,"textAlign")&&(e.align=t.textAlign),ye(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),ye(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),ye(t,"textWidth")&&(e.width=t.textWidth),ye(t,"textHeight")&&(e.height=t.textHeight),ye(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),ye(t,"textPadding")&&(e.padding=t.textPadding),ye(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),ye(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),ye(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),ye(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),ye(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),ye(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),ye(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function J8(e,t,r){var n=e;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=e.fill||K.color.neutral99;eH(n,t);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||K.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=e.fill||r.outsideFill||K.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=t.text,n.rich=t.rich,j(t.rich,function(s){eH(s,s)}),n}function eH(e,t){t&&(ye(t,"fill")&&(e.textFill=t.fill),ye(t,"stroke")&&(e.textStroke=t.fill),ye(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),ye(t,"font")&&(e.font=t.font),ye(t,"fontStyle")&&(e.fontStyle=t.fontStyle),ye(t,"fontWeight")&&(e.fontWeight=t.fontWeight),ye(t,"fontSize")&&(e.fontSize=t.fontSize),ye(t,"fontFamily")&&(e.fontFamily=t.fontFamily),ye(t,"align")&&(e.textAlign=t.align),ye(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),ye(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),ye(t,"width")&&(e.textWidth=t.width),ye(t,"height")&&(e.textHeight=t.height),ye(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),ye(t,"padding")&&(e.textPadding=t.padding),ye(t,"borderColor")&&(e.textBorderColor=t.borderColor),ye(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),ye(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),ye(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),ye(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),ye(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),ye(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),ye(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),ye(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),ye(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),ye(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var mne={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},tH=rt(mne);oa(Do,function(e,t){return e[t]=1,e},{});Do.join(", ");var Dw=["","style","shape","extra"],Kd=Ke();function GR(e,t,r,n,i){var a=e+"Animation",o=Cv(e,n,i)||{},s=Kd(t).userDuring;return o.duration>0&&(o.during=s?pe(j7e,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),re(o,r[a]),o}function rb(e,t,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=Kd(e),u=t.style;l.userDuring=t.during;var c={},f={};if(z7e(e,t,f),e.type==="compound")for(var h=e.shape.paths,d=t.shape.paths,v=0;v0&&e.animateFrom(m,y)}else I7e(e,t,i||0,r,c);yne(e,t),u?e.dirty():e.markRedraw()}function yne(e,t){for(var r=Kd(e).leaveToProps,n=0;n0&&e.animateFrom(i,a)}}function N7e(e,t){ye(t,"silent")&&(e.silent=t.silent),ye(t,"ignore")&&(e.ignore=t.ignore),e instanceof la&&ye(t,"invisible")&&(e.invisible=t.invisible),e instanceof et&&ye(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var io={},R7e={setTransform:function(e,t){return io.el[e]=t,this},getTransform:function(e){return io.el[e]},setShape:function(e,t){var r=io.el,n=r.shape||(r.shape={});return n[e]=t,r.dirtyShape&&r.dirtyShape(),this},getShape:function(e){var t=io.el.shape;if(t)return t[e]},setStyle:function(e,t){var r=io.el,n=r.style;return n&&(n[e]=t,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(e){var t=io.el.style;if(t)return t[e]},setExtra:function(e,t){var r=io.el.extra||(io.el.extra={});return r[e]=t,this},getExtra:function(e){var t=io.el.extra;if(t)return t[e]}};function j7e(){var e=this,t=e.el;if(t){var r=Kd(t).userDuring,n=e.userDuring;if(r!==n){e.el=e.userDuring=null;return}io.el=t,n(R7e)}}function rH(e,t,r,n){var i=r[e];if(i){var a=t[e],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[e]={}),Ec(l))re(o,a);else for(var u=At(l),c=0;c=0){!o&&(o=n[e]={});for(var d=rt(a),c=0;c=0)){var h=e.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var v=rt(r),u=0;u=0?t.getStore().get(z,$):void 0}var U=t.get(G.name,$),H=G&&G.ordinalMeta;return H?H.categories[U]:U}function M(F,$){$==null&&($=c);var G=t.getItemVisual($,"style"),z=G&&G.fill,U=G&&G.opacity,H=x($,Tl).getItemStyle();z!=null&&(H.fill=z),U!=null&&(H.opacity=U);var Y={inheritColor:ve(z)?z:K.color.neutral99},Z=w($,Tl),J=Ct(Z,null,Y,!1,!0);J.text=Z.getShallow("show")?be(e.getFormattedLabel($,Tl),Zd(t,$)):null;var ae=tw(Z,Y,!1);return O(F,H),H=J8(H,J,ae),F&&k(H,F),H.legacy=!0,H}function P(F,$){$==null&&($=c);var G=x($,ws).getItemStyle(),z=w($,ws),U=Ct(z,null,null,!0,!0);U.text=z.getShallow("show")?oi(e.getFormattedLabel($,ws),e.getFormattedLabel($,Tl),Zd(t,$)):null;var H=tw(z,null,!0);return O(F,G),G=J8(G,U,H),F&&k(G,F),G.legacy=!0,G}function k(F,$){for(var G in $)ye($,G)&&(F[G]=$[G])}function O(F,$){F&&(F.textFill&&($.textFill=F.textFill),F.textPosition&&($.textPosition=F.textPosition))}function D(F,$){if($==null&&($=c),ye(K8,F)){var G=t.getItemVisual($,"style");return G?G[K8[F]]:null}if(ye(b7e,F))return t.getItemVisual($,F)}function I(F){if(o.type==="cartesian2d"){var $=o.getBaseAxis();return W4e(Me({axis:$},F))}}function N(){return r.getCurrentSeriesIndices()}function B(F){return mN(F,r)}}function q7e(e){var t={};return j(e.dimensions,function(r){var n=e.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=t[i]=t[i]||[];a[n.coordDimIndex]=e.getDimensionIndex(r)}}),t}function CM(e,t,r,n,i,a,o){if(!n){a.remove(t);return}var s=YR(e,t,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&$t(s,n.focus,n.blurScope,n.emphasisDisabled),s}function YR(e,t,r,n,i,a){var o=-1,s=t;t&&wne(t,n,i)&&(o=$e(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=UR(n),s&&U7e(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),zi.normal.cfg=zi.normal.conOpt=zi.emphasis.cfg=zi.emphasis.conOpt=zi.blur.cfg=zi.blur.conOpt=zi.select.cfg=zi.select.conOpt=null,zi.isLegacy=!1,Q7e(u,r,n,i,l,zi),K7e(u,r,n,i,l),ZR(e,u,r,n,zi,i,l),ye(n,"info")&&(bs(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function wne(e,t,r){var n=bs(e),i=t.type,a=t.shape,o=t.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&n9e(a)&&Sne(a)!==n.customPathData||i==="image"&&ye(o,"image")&&o.image!==n.customImagePath}function K7e(e,t,r,n,i){var a=r.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&wne(o,a,n)&&(o=null),o||(o=UR(a),e.setClipPath(o)),ZR(null,o,t,a,null,n,i)}}function Q7e(e,t,r,n,i,a){if(!(e.isGroup||e.type==="compoundPath")){iH(r,null,a),iH(r,ws,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=e.getTextContent();if(o===!1)c&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=UR(o),e.setTextContent(c)),ZR(null,c,t,o,null,n,i);for(var f=o&&o.style,h=0;h=c;d--){var v=t.childAt(d);e9e(t,v,i)}}}function e9e(e,t,r){t&&BT(t,bs(e).option,r)}function t9e(e){new Rs(e.oldChildren,e.newChildren,aH,aH,e).add(oH).update(oH).remove(r9e).execute()}function aH(e,t){var r=e&&e.name;return r??H7e+t}function oH(e,t){var r=this.context,n=e!=null?r.newChildren[e]:null,i=t!=null?r.oldChildren[t]:null;YR(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function r9e(e){var t=this.context,r=t.oldChildren[e];r&&BT(r,bs(r).option,t.seriesModel)}function Sne(e){return e&&(e.pathData||e.d)}function n9e(e){return e&&(ye(e,"pathData")||ye(e,"d"))}function i9e(e){e.registerChartView(Z7e),e.registerSeriesModel(w7e)}var ac=Ke(),sH=Ce,AM=pe,qR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(t,r);if(!s)s=this._group=new Ae,this.createPointerEl(s,u,t,r),this.createLabelEl(s,u,t,r),n.getZr().add(s);else{var h=je(lH,r,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,r)}cH(s,r,!0),this._renderHandle(a)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,r){var n=r.get("animation"),i=t.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=mR(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=ac(t).pointerEl=new pf[a.type](sH(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=ac(t).labelEl=new nt(sH(r.label));t.add(a),uH(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=ac(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=ac(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),uH(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Av(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Es(u.event)},onmousedown:AM(this._onHandleDragMove,this,0,0),drift:AM(this._onHandleDragMove,this),ondragend:AM(this._onHandleDragEnd,this)}),n.add(i)),cH(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ie(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Dv(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){lH(this._axisPointerModel,!r&&this._moveAnimation,this._handle,MM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(MM(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(MM(i)),ac(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),cy(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function lH(e,t,r,n){Tne(ac(r).lastProp,n)||(ac(r).lastProp=n,t?ot(r,n,e):(r.stopAnimation(),r.attr(n)))}function Tne(e,t){if(Pe(e)&&Pe(t)){var r=!0;return j(t,function(n,i){r=r&&Tne(e[i],n)}),!!r}else return e===t}function uH(e,t){e[t.get(["label","show"])?"show":"hide"]()}function MM(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function cH(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function KR(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function Cne(e,t,r,n,i){var a=r.get("value"),o=Ane(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Lv(s.get("padding")||0),u=s.getFont(),c=lT(o,u),f=i.position,h=c.width+l[1]+l[3],d=c.height+l[0]+l[2],v=i.align;v==="right"&&(f[0]-=h),v==="center"&&(f[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=d),g==="middle"&&(f[1]-=d/2),a9e(f,h,d,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=t.get(["axisLine","lineStyle","color"])),e.label={x:f[0],y:f[1],style:Ct(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function a9e(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function Ane(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:pw(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};j(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),ve(o)?a=o.replace("{value}",a):Te(o)&&(a=o(s))}return a}function QR(e,t,r){var n=zr();return Hs(n,n,r.rotation),$a(n,n,r.position),ja([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function Mne(e,t,r,n,i,a){var o=$n.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),Cne(t,n,i,a,{position:QR(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function JR(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function Pne(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function fH(e,t,r,n,i,a){return{cx:e,cy:t,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var o9e=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=hH(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=KR(a),d=s9e[u](s,f,c);d.style=h,r.graphicKey=d.type,r.pointer=d}var v=Cw(l.getRect(),i);Mne(n,r,v,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=Cw(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=QR(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=hH(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[r.x,r.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,d=[h,h];d[c]=f[c];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:d,tooltipOption:v[c]}},t}(qR);function hH(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var s9e={line:function(e,t,r){var n=JR([t,r[0]],[t,r[1]],dH(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:Pne([t-n/2,r[0]],[n,i],dH(e))}}};function dH(e){return e.dim==="x"?0:1}var l9e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:K.color.border,width:1,type:"dashed"},shadowStyle:{color:K.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:K.color.neutral00,padding:[5,7,5,7],backgroundColor:K.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:K.color.accent40,throttle:40}},t}(qe),ds=Ke(),u9e=j;function Lne(e,t,r){if(!tt.node){var n=t.getZr();ds(n).records||(ds(n).records={}),c9e(n,t);var i=ds(n).records[e]||(ds(n).records[e]={});i.handler=r}}function c9e(e,t){if(ds(e).initialized)return;ds(e).initialized=!0,r("click",je(vH,"click")),r("mousemove",je(vH,"mousemove")),r("globalout",h9e);function r(n,i){e.on(n,function(a){var o=d9e(t);u9e(ds(e).records,function(s){s&&i(s,a,o.dispatchAction)}),f9e(o.pendings,t)})}}function f9e(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function h9e(e,t,r){e.handler("leave",null,r)}function vH(e,t,r,n){t.handler(e,r,n)}function d9e(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function uD(e,t){if(!tt.node){var r=t.getZr(),n=(ds(r).records||{})[e];n&&(ds(r).records[e]=null)}}var v9e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";Lne("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){uD("axisPointer",n)},t.prototype.dispose=function(r,n){uD("axisPointer",n)},t.type="axisPointer",t}(Mt);function kne(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Yc(a,e);if(o==null||o<0||ie(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,d=f==="x"||f==="radius"?1:0,v=a.mapDimension(h),g=[];g[d]=a.get(v,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(se(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var pH=Ke();function p9e(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||pe(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){nb(i)&&(i=kne({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=nb(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||nb(i),h={},d={},v={list:[],map:{}},g={showPointer:je(m9e,d),showTooltip:je(y9e,v)};j(s.coordSysMap,function(y,_){var x=l||y.containPoint(i);j(s.coordSysAxesInfo[_],function(w,S){var C=w.axis,M=w9e(u,w);if(!f&&x&&(!u||M)){var P=M&&M.value;P==null&&!l&&(P=C.pointToData(i)),P!=null&&gH(w,P,g,!1,h)}})});var m={};return j(c,function(y,_){var x=y.linkGroup;x&&!d[_]&&j(x.axesInfo,function(w,S){var C=d[S];if(w!==y&&C){var M=C.value;x.mapper&&(M=y.axis.scale.parse(x.mapper(M,mH(w),mH(y)))),m[y.key]=M}})}),j(m,function(y,_){gH(c[_],y,g,!0,h)}),_9e(d,c,h),x9e(v,i,e,o),b9e(c,o,r),h}}function gH(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=g9e(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&re(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function g9e(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return j(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,e,r);h=d.dataIndices,f=d.nestestValue}else{if(h=l.indicesOfNearest(n,c[0],e,r.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var v=e-f,g=Math.abs(v);g<=o&&((g=0&&s<0)&&(o=g,s=v,i=f,a.length=0),j(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function m9e(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function y9e(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=_y(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function _9e(e,t,r){var n=r.axesInfo=[];j(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function x9e(e,t,r,n){if(nb(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function b9e(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=pH(n)[i]||{},o=pH(n)[i]={};j(e,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&j(f.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],l=[];j(a,function(u,c){!o[c]&&l.push(u)}),j(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function w9e(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function mH(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function nb(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function h0(e){_f.registerAxisPointerClass("CartesianAxisPointer",o9e),e.registerComponentModel(l9e),e.registerComponentView(v9e),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!ie(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=S6e(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},p9e)}function S9e(e){We(ere),We(h0)}var T9e=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var d=KR(a),v=A9e[h](s,l,f,c);v.style=d,r.graphicKey=v.type,r.pointer=v}var g=a.get(["label","margin"]),m=C9e(n,i,a,l,g);Cne(r,i,a,o,m)},t}(qR);function C9e(e,t,r,n,i){var a=t.axis,o=a.dataToCoord(e),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=zr();Hs(h,h,s),$a(h,h,[n.cx,n.cy]),u=ja([o,-i],h);var d=t.getModel("axisLabel").get("rotate")||0,v=$n.innerTextLayout(s,d*Math.PI/180,-1);c=v.textAlign,f=v.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var A9e={line:function(e,t,r,n){return e.dim==="angle"?{type:"Line",shape:JR(t.coordToPoint([n[0],r]),t.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r}}},shadow:function(e,t,r,n){var i=Math.max(1,e.getBandWidth()),a=Math.PI/180;return e.dim==="angle"?{type:"Sector",shape:fH(t.cx,t.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:fH(t.cx,t.cy,r-i/2,r+i/2,0,Math.PI*2)}}},M9e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(qe),ej=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Kt).models[0]},t.type="polarAxis",t}(qe);or(ej,Rv);var P9e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="angleAxis",t}(ej),L9e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="radiusAxis",t}(ej),tj=function(e){q(t,e);function t(r,n){return e.call(this,"radius",r,n)||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t}(va);tj.prototype.dataToRadius=va.prototype.dataToCoord;tj.prototype.radiusToData=va.prototype.coordToData;var k9e=Ke(),rj=function(e){q(t,e);function t(r,n){return e.call(this,"angle",r,n||[0,360])||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=lT(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var d=Math.max(0,Math.floor(h)),v=k9e(r.model),g=v.lastAutoInterval,m=v.lastTickCount;return g!=null&&m!=null&&Math.abs(g-d)<=1&&Math.abs(m-o)<=1&&g>d?d=g:(v.lastTickCount=o,v.lastAutoInterval=d),d},t}(va);rj.prototype.dataToAngle=va.prototype.dataToCoord;rj.prototype.angleToData=va.prototype.coordToData;var One=["radius","angle"],O9e=function(){function e(t){this.dimensions=One,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new tj,this._angleAxis=new rj,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(t){var r=this.pointToCoord(t);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},e.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},e.prototype.getAxis=function(t){var r="_"+t+"Axis";return this[r]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(t){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&r.push(n),i.scale.type===t&&r.push(i),r},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(t){var r=this._angleAxis;return t===r?this._radiusAxis:r},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(t){var r=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},e.prototype.dataToPoint=function(t,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],r),this._angleAxis.dataToAngle(t[1],r)],n)},e.prototype.pointToData=function(t,r,n){n=n||[];var i=this.pointToCoord(t);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},e.prototype.pointToCoord=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=us;)u+=c*360;return[l,u]},e.prototype.coordToPoint=function(t,r){r=r||[];var n=t[0],i=t[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},e.prototype.getArea=function(){var t=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=t.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,h=this.r,d=this.r0;return h!==d&&f-o<=h*h&&f+o>=d*d},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},e.prototype.convertToPixel=function(t,r,n){var i=yH(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=yH(r);return i===this?this.pointToData(n):null},e}();function yH(e){var t=e.seriesModel,r=e.polarModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function D9e(e,t,r){var n=t.get("center"),i=Or(t,r).refContainer;e.cx=de(n[0],i.width)+i.x,e.cy=de(n[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:ie(s)||(s=[0,s]);var l=[de(s[0],o),de(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function E9e(e,t){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();j(gw(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),j(gw(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),ef(n.scale,n.model),ef(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function I9e(e){return e.mainType==="angleAxis"}function _H(e,t){var r;if(e.type=t.get("type"),e.scale=o0(t),e.onBand=t.get("boundaryGap")&&e.type==="category",e.inverse=t.get("inverse"),I9e(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle"),i=(r=t.get("endAngle"))!==null&&r!==void 0?r:n+(e.inverse?-360:360);e.setExtent(n,i)}t.axis=e,e.model=t}var N9e={dimensions:One,create:function(e,t){var r=[];return e.eachComponent("polar",function(n,i){var a=new O9e(i+"");a.update=E9e;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");_H(o,l),_H(s,u),D9e(a,n,t),r.push(a),n.coordinateSystem=a,a.model=n}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Kt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},R9e=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function hx(e,t,r){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],r]),i=e.coordToPoint([t[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function dx(e){var t=e.getRadiusAxis();return t.inverse?0:1}function xH(e){var t=e[0],r=e[e.length-1];t&&r&&Math.abs(Math.abs(t.coord-r.coord)-360)<1e-4&&e.pop()}var j9e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=se(i.getViewLabels(),function(c){c=Ce(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});xH(u),xH(s),j(R9e,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&B9e[c](this.group,r,a,s,l,o,u)},this)}},t.type="angleAxis",t}(_f),B9e={axisLine:function(e,t,r,n,i,a){var o=t.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=dx(r),f=c?0:1,h,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new pf[d]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new Sv({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,e.add(h)},axisTick:function(e,t,r,n,i,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[dx(r)],u=se(n,function(c){return new dr({shape:hx(r,[l,l+s],c.coord)})});e.add(yi(u,{style:Me(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[dx(r)],c=[],f=0;fy?"left":"right",w=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[v]){var S=s[v];Pe(S)&&S.textStyle&&(d=new Je(S.textStyle,l,l.ecModel))}var C=new nt({silent:$n.isLabelSilent(t),style:Ct(d,{x:m[0],y:m[1],fill:d.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:x,verticalAlign:w})});if(e.add(C),Us({el:C,componentModel:t,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return C.isTruncated},value:f.rawLabel,tickIndex:h}}),c){var M=$n.makeAxisEventDataBase(t);M.targetType="axisLabel",M.value=f.rawLabel,Ee(C).eventData=M}},this)},splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",F=k;S&&(n[c][N]||(n[c][N]={p:k,n:k}),F=n[c][N][B]);var $=void 0,G=void 0,z=void 0,U=void 0;if(v.dim==="radius"){var H=v.dataToCoord(I)-k,Y=l.dataToCoord(N);Math.abs(H)=U})}}})}function H9e(e){var t={};j(e,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=Ene(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=t[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;t[l]=f;var d=Dne(n);h[d]||f.autoWidthCount++,h[d]=h[d]||{width:0,maxWidth:0};var v=de(n.get("barWidth"),c),g=de(n.get("barMaxWidth"),c),m=n.get("barGap"),y=n.get("barCategoryGap");v&&!h[d].width&&(v=Math.min(f.remainedWidth,v),h[d].width=v,f.remainedWidth-=v),g&&(h[d].maxWidth=g),m!=null&&(f.gap=m),y!=null&&(f.categoryGap=y)});var r={};return j(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=de(n.categoryGap,o),l=de(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),j(a,function(g,m){var y=g.maxWidth;y&&y=r.y&&t[1]<=r.y+r.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=r.y&&t[0]<=r.y+r.height},e.prototype.pointToData=function(t,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(t[i.orient==="horizontal"?0:1])),n},e.prototype.dataToPoint=function(t,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+t)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},e.prototype.convertToPixel=function(t,r,n){var i=bH(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=bH(r);return i===this?this.pointToData(n):null},e}();function bH(e){var t=e.seriesModel,r=e.singleAxisModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function eZe(e,t){var r=[];return e.eachComponent("singleAxis",function(n,i){var a=new J9e(n,e,t);a.name="single_"+i,a.resize(n,t),n.coordinateSystem=a,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Kt).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var tZe={create:eZe,dimensions:Ine},wH=["x","y"],rZe=["width","height"],nZe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=PM(l,1-Nw(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=KR(a),d=iZe[f](s,c,u);d.style=h,r.graphicKey=d.type,r.pointer=d}var v=cD(i);Mne(n,r,v,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=cD(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=QR(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=Nw(o),u=PM(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=PM(s,1-l),h=(f[1]+f[0])/2,d=[h,h];return d[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(qR),iZe={line:function(e,t,r){var n=JR([t,r[0]],[t,r[1]],Nw(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=e.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:Pne([t-n/2,r[0]],[n,i],Nw(e))}}};function Nw(e){return e.isHorizontal()?0:1}function PM(e,t){var r=e.getRect();return[r[wH[t]],r[wH[t]]+r[rZe[t]]]}var aZe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="single",t}(Mt);function oZe(e){We(h0),_f.registerAxisPointerClass("SingleAxisPointer",nZe),e.registerComponentView(aZe),e.registerComponentView(q9e),e.registerComponentModel(ib),Yd(e,"single",ib,ib.defaultOption),e.registerCoordinateSystem("single",tZe)}var sZe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,i){var a=gf(r);e.prototype.init.apply(this,arguments),SH(r,a)},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),SH(this.option,r)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.layoutMode="box",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:K.color.axisLine,width:1,type:"solid"}},itemStyle:{color:K.color.neutral00,borderWidth:1,borderColor:K.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:K.size.s,color:K.color.secondary},monthLabel:{show:!0,position:"start",margin:K.size.s,align:"center",formatter:null,color:K.color.secondary},yearLabel:{show:!0,position:null,margin:K.size.xl,formatter:null,color:K.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(qe);function SH(e,t){var r=e.cellSize,n;ie(r)?n=r:n=e.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=se([0,1],function(a){return LBe(t,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});No(e,t,{type:"box",ignoreSize:i})}var lZe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},t.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,f=new Ze({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},t.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){v(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var d=f.date;d.setMonth(d.getMonth()+1),f=s.getDateInfo(d)}v(s.getNextNDay(n.end.time,1).formatedDate);function v(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToCalendarLayout([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},t.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},t.prototype._drawSplitline=function(r,n,i){var a=new en({z2:20,shape:{points:r},style:n});i.add(a)},t.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(r,n){return ve(r)&&r?wBe(r,n):Te(r)?r(n):n.nameMap},t.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,d={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},v=n.start.y;+n.end.y>+n.start.y&&(v=v+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:v},y=this._formatterLabel(g,m),_=new nt({z2:30,style:Ct(o,{text:y}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,d[l],i,l,s)),a.add(_)}},t.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||ve(s))&&(s&&(n=aO(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var v=c==="center",g=o.get("silent"),m=0;m=a.start.time&&i.times.end.time&&r.reverse(),r},e.prototype._getRangeInfo=function(t){var r=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/LM)-Math.floor(r[0].time/LM)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),f=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:f,fweek:r[0].day,lweek:r[1].day}},e.prototype._getDateByWeeksAndDay=function(t,r,n){var i=this._getRangeInfo(n);if(t>i.weeks||t===0&&ri.lweek)return null;var a=(t-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},e.create=function(t,r){var n=[];return t.eachComponent("calendar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachComponent(function(i,a){i0({targetModel:a,coordSysType:"calendar",coordSysProvider:JQ})}),n},e.dimensions=["time","value"],e}();function kM(e){var t=e.calendarModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}function cZe(e){e.registerComponentModel(sZe),e.registerComponentView(lZe),e.registerCoordinateSystem("calendar",uZe)}var is={level:1,leaf:2,nonLeaf:3},Ss={none:0,all:1,body:2,corner:3};function fD(e,t,r){var n=t[Re[r]].getCell(e);return!n&&it(e)&&e<0&&(n=t[Re[1-r]].getUnitLayoutInfo(r,Math.round(e))),n}function Nne(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function Rne(e,t,r,n,i){TH(e[0],t,i,r,n,0),TH(e[1],t,i,r,n,1)}function TH(e,t,r,n,i,a){e[0]=1/0,e[1]=-1/0;var o=n[a],s=ie(o)?o:[o],l=s.length,u=!!r;if(l>=1?(CH(e,t,s,u,i,a,0),l>1&&CH(e,t,s,u,i,a,l-1)):e[0]=e[1]=NaN,u){var c=-i[Re[1-a]].getLocatorCount(a),f=i[Re[a]].getLocatorCount(a)-1;r===Ss.body?c=fr(0,c):r===Ss.corner&&(f=Ci(-1,f)),f=t[0]&&e[0]<=t[1]}function PH(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function dZe(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function LH(e,t,r,n){var i=fD(t[n][0],r,n),a=fD(t[n][1],r,n);e[Re[n]]=e[_r[n]]=NaN,i&&a&&(e[Re[n]]=i.xy,e[_r[n]]=a.xy+a.wh-i.xy)}function Vp(e,t,r,n){return e[Re[t]]=r,e[Re[1-t]]=n,e}function vZe(e){return e&&(e.type===is.leaf||e.type===is.nonLeaf)?e:null}function Rw(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var kH=function(){function e(t,r){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=r,this._uniqueValueGen=pZe(t);var n=r.get("data",!0);n!=null&&!ie(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return e.prototype._initByDimModelData=function(t){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(t,0,0),l();return;function s(u,c,f){var h=0;return u&&j(u,function(d,v){var g;ve(d)?g={value:d}:Pe(d)?(g=d,d.value!=null&&!ve(d.value)&&(g={value:null})):g={value:null};var m={type:is.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new ke,span:Vp(new ke,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:Rw()};o++,(a[c]||(a[c]=[])).push(m),i[f]||(i[f]={type:is.level,xy:NaN,wh:NaN,option:null,id:new ke,dim:r});var y=s(g.children,c,f+1),_=Math.max(1,y);m.span[Re[r.dimIdx]]=_,h+=_,c+=_}),h}function l(){for(var u=[];n.length=1,x=r[Re[n]],w=a.getLocatorCount(n)-1,S=new Bl;for(o.resetLayoutIterator(S,n);S.next();)C(S.item);for(a.resetLayoutIterator(S,n);S.next();)C(S.item);function C(M){hn(M.wh)&&(M.wh=y),M.xy=x,M.id[Re[n]]===w&&!_&&(M.wh=r[Re[n]]+r[_r[n]]-M.xy),x+=M.wh}}function jH(e,t){for(var r=t[Re[e]].resetCellIterator();r.next();){var n=r.item;jw(n.rect,e,n.id,n.span,t),jw(n.rect,1-e,n.id,n.span,t),n.type===is.nonLeaf&&(n.xy=n.rect[Re[e]],n.wh=n.rect[_r[e]])}}function BH(e,t){e.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;jw(i,0,a,n,t),jw(i,1,a,n,t)}})}function jw(e,t,r,n,i){e[_r[t]]=0;var a=r[Re[t]],o=a<0?i[Re[1-t]]:i[Re[t]],s=o.getUnitLayoutInfo(t,r[Re[t]]);if(e[Re[t]]=s.xy,e[_r[t]]=s.wh,n[Re[t]]>1){var l=o.getUnitLayoutInfo(t,r[Re[t]]+n[Re[t]]-1);e[_r[t]]=l.xy+l.wh-s.xy}}function PZe(e,t,r){var n=q1(e,r[_r[t]]);return dD(n,r[_r[t]])}function dD(e,t){return Math.max(Math.min(e,be(t,1/0)),0)}function EM(e){var t=e.matrixModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}var ln={inBody:1,inCorner:2,outside:3},ro={x:null,y:null,point:[]};function zH(e,t,r,n,i){var a=r[Re[t]],o=r[Re[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),l=a.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),c=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,f=e.point[t]=n[t];if(!l&&!c){e[Re[t]]=ln.outside;return}if(i===Ss.body){l?(e[Re[t]]=ln.inBody,f=Ci(s.xy+s.wh,fr(l.xy,f)),e.point[t]=f):e[Re[t]]=ln.outside;return}else if(i===Ss.corner){c?(e[Re[t]]=ln.inCorner,f=Ci(c.xy+c.wh,fr(u.xy,f)),e.point[t]=f):e[Re[t]]=ln.outside;return}var h=l?l.xy:c?c.xy+c.wh:NaN,d=u?u.xy:h,v=s?s.xy+s.wh:h;if(fv){if(!i){e[Re[t]]=ln.outside;return}f=v}e.point[t]=f,e[Re[t]]=h<=f&&f<=v?ln.inBody:d<=f&&f<=h?ln.inCorner:ln.outside}function $H(e,t,r,n){var i=1-r;if(e[Re[r]]!==ln.outside)for(n[Re[r]].resetCellIterator(DM);DM.next();){var a=DM.item;if(VH(e.point[r],a.rect,r)&&VH(e.point[i],a.rect,i)){t[r]=a.ordinal,t[i]=a.id[Re[i]];return}}}function FH(e,t,r,n){if(e[Re[r]]!==ln.outside){var i=e[Re[r]]===ln.inCorner?n[Re[1-r]]:n[Re[r]];for(i.resetLayoutIterator(yx,r);yx.next();)if(LZe(e.point[r],yx.item)){t[r]=yx.item.id[Re[r]];return}}}function LZe(e,t){return t.xy<=e&&e<=t.xy+t.wh}function VH(e,t,r){return t[Re[r]]<=e&&e<=t[Re[r]]+t[_r[r]]}function kZe(e){e.registerComponentModel(_Ze),e.registerComponentView(TZe),e.registerCoordinateSystem("matrix",MZe)}function OZe(e,t){var r=e.existing;if(t.id=e.keyInfo.id,!t.type&&r&&(t.type=r.type),t.parentId==null){var n=t.parentOption;n?t.parentId=n.id:r&&(t.parentId=r.parentId)}t.parentOption=null}function GH(e,t){var r;return j(t,function(n){e[n]!=null&&e[n]!=="auto"&&(r=!0)}),r}function DZe(e,t,r){var n=re({},r),i=e[t],a=r.$action||"merge";a==="merge"?i?(Ve(i,n,!0),No(i,n,{ignoreSize:!0}),iJ(r,i),_x(r,i),_x(r,i,"shape"),_x(r,i,"style"),_x(r,i,"extra"),r.clipPath=i.clipPath):e[t]=n:a==="replace"?e[t]=n:a==="remove"&&i&&(e[t]=null)}var Bne=["transition","enterFrom","leaveTo"],EZe=Bne.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function _x(e,t,r){if(r&&(!e[r]&&t[r]&&(e[r]={}),e=e[r],t=t[r]),!(!e||!t))for(var n=r?Bne:EZe,i=0;i=0;c--){var f=i[c],h=Ar(f.id,null),d=h!=null?o.get(h):null;if(d){var v=d.parent,y=Hi(v),_=v===a?{width:s,height:l}:{width:y.width,height:y.height},x={},w=wT(d,f,_,null,{hv:f.hv,boundingMode:f.bounding},x);if(!Hi(d).isNew&&w){for(var S=f.transition,C={},M=0;M=0)?C[P]=k:d[P]=k}ot(d,C,r,0)}else d.attr(x)}}},t.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){ab(i,Hi(i).option,n,r._lastGraphicModel)}),this._elMap=xe()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Mt);function vD(e){var t=ye(HH,e)?HH[e]:oy(e),r=new t({});return Hi(r).type=e,r}function WH(e,t,r,n){var i=vD(r);return t.add(i),n.set(e,i),Hi(i).id=e,Hi(i).isNew=!0,i}function ab(e,t,r,n){var i=e&&e.parent;i&&(e.type==="group"&&e.traverse(function(a){ab(a,t,r,n)}),BT(e,t,n),r.removeKey(Hi(e).id))}function UH(e,t,r,n){e.isGroup||j([["cursor",la.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];ye(t,a)?e[a]=be(t[a],i[1]):e[a]==null&&(e[a]=i[1])}),j(rt(t),function(i){if(i.indexOf("on")===0){var a=t[i];e[i]=Te(a)?a:null}}),ye(t,"draggable")&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function jZe(e){return e=re({},e),j(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(eJ),function(t){delete e[t]}),e}function BZe(e,t,r){var n=Ee(e).eventData;!e.silent&&!e.ignore&&!n&&(n=Ee(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),n&&(n.info=r.info)}function zZe(e){e.registerComponentModel(NZe),e.registerComponentView(RZe),e.registerPreprocessor(function(t){var r=t.graphic;ie(r)?!r[0]||!r[0].elements?t.graphic=[{elements:r}]:t.graphic=[t.graphic[0]]:r&&!r.elements&&(t.graphic=[{elements:[r]}])})}var ZH=["x","y","radius","angle","single"],$Ze=["cartesian2d","polar","singleAxis"];function FZe(e){var t=e.get("coordinateSystem");return $e($Ze,t)>=0}function Cl(e){return e+"Axis"}function VZe(e,t){var r=xe(),n=[],i=xe();e.eachComponent({mainType:"dataZoom",query:t},function(c){i.get(c.uid)||s(c)});var a;do a=!1,e.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,d){var v=r.get(h);v&&v[d]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(r.get(f)||r.set(f,[]))[h]=!0})}return n}function zne(e){var t=e.ecModel,r={infoList:[],infoMap:xe()};return e.eachTargetAxis(function(n,i){var a=t.getComponent(Cl(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var IM=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},e}(),Cy=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return t.prototype.init=function(r,n,i){var a=YH(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},t.prototype.mergeOption=function(r){var n=YH(r);Ve(this.option,r,!0),Ve(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;j([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=xe(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return j(ZH,function(i){var a=this.getReferringComponents(Cl(i),oje);if(a.specified){n=!0;var o=new IM;j(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new IM;if(h.add(f.componentIndex),r.set(c,h),a=!1,c==="x"||c==="y"){var d=f.getReferringComponents("grid",Kt).models[0];d&&j(u,function(v){f.componentIndex!==v.componentIndex&&d===v.getReferringComponents("grid",Kt).models[0]&&h.add(v.componentIndex)})}}}a&&j(ZH,function(u){if(a){var c=i.findComponents({mainType:Cl(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new IM;f.add(c[0].componentIndex),r.set(u,f),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");j([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Cl(n),i))},this),r},t.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){j(i.indexList,function(o){r.call(n,a,o)})})},t.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Cl(r),n)},t.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;j([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},t.prototype.setCalculatedRange=function(r){var n=this.option;j(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},t.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},t.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(x&&!w&&!S)return!0;x&&(m=!0),w&&(v=!0),S&&(g=!0)}return m&&v&&g})}else vh(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var v={};v[d]=o,u.selectRange(v)}});vh(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},e.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;vh(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=vt(n[0]+o,n,[0,100],!0):a!=null&&(o=vt(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var t=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=YI(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},e}();function UZe(e,t,r){var n=[1/0,-1/0];vh(r,function(o){c$e(n,o.getData(),t)});var i=e.getAxisModel(),a=Bee(i.axis.scale,i,n).calculate();return[a.min,a.max]}var ZZe={getTargetSeries:function(e){function t(i){e.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=e.getComponent(Cl(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new WZe(i,a,s,e),r.push(o.__dzAxisProxy))});var n=xe();return j(r,function(i){j(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(e,t){e.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,t)})}),e.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function YZe(e){e.registerAction("dataZoom",function(t,r){var n=VZe(r,t);j(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var qH=!1;function oj(e){qH||(qH=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,ZZe),YZe(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function XZe(e){e.registerComponentModel(GZe),e.registerComponentView(HZe),oj(e)}var Yi=function(){function e(){}return e}(),$ne={};function ph(e,t){$ne[e]=t}function Fne(e){return $ne[e]}var qZe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;j(this.option.feature,function(n,i){var a=Fne(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),Ve(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:K.color.border,borderRadius:0,borderWidth:0,padding:K.size.m,itemSize:15,itemGap:K.size.s,showTitle:!0,iconStyle:{borderColor:K.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:K.color.accent50}},tooltip:{show:!1,position:"bottom"}},t}(qe);function Vne(e,t){var r=Lv(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new Ze({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var KZe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),f=[];j(u,function(_,x){f.push(x)}),new Rs(this._featureNames||[],f).add(h).update(h).remove(je(h,null)).execute(),this._featureNames=f;function h(_,x){var w=f[_],S=f[x],C=u[w],M=new Je(C,r,r.ecModel),P;if(a&&a.newTitle!=null&&a.featureName===w&&(C.title=a.newTitle),w&&!S){if(QZe(w))P={onclick:M.option.onclick,featureName:w};else{var k=Fne(w);if(!k)return;P=new k}c[w]=P}else if(P=c[S],!P)return;P.uid=Pv("toolbox-feature"),P.model=M,P.ecModel=n,P.api=i;var O=P instanceof Yi;if(!w&&S){O&&P.dispose&&P.dispose(n,i);return}if(!M.get("show")||O&&P.unusable){O&&P.remove&&P.remove(n,i);return}d(M,P,w),M.setIconStatus=function(D,I){var N=this.option,B=this.iconPaths;N.iconStatus=N.iconStatus||{},N.iconStatus[D]=I,B[D]&&(I==="emphasis"?Is:Ns)(B[D])},P instanceof Yi&&P.render&&P.render(M,n,i,a)}function d(_,x,w){var S=_.getModel("iconStyle"),C=_.getModel(["emphasis","iconStyle"]),M=x instanceof Yi&&x.getIcons?x.getIcons():_.get("icon"),P=_.get("title")||{},k,O;ve(M)?(k={},k[w]=M):k=M,ve(P)?(O={},O[w]=P):O=P;var D=_.iconPaths={};j(k,function(I,N){var B=Av(I,{},{x:-s/2,y:-s/2,width:s,height:s});B.setStyle(S.getItemStyle());var F=B.ensureState("emphasis");F.style=C.getItemStyle();var $=new nt({style:{text:O[N],align:C.get("textAlign"),borderRadius:C.get("textBorderRadius"),padding:C.get("textPadding"),fill:null,font:mN({fontStyle:C.get("textFontStyle"),fontFamily:C.get("textFontFamily"),fontSize:C.get("textFontSize"),fontWeight:C.get("textFontWeight")},n)},ignore:!0});B.setTextContent($),Us({el:B,componentModel:r,itemName:N,formatterParamsExtra:{title:O[N]}}),B.__title=O[N],B.on("mouseover",function(){var G=C.getItemStyle(),z=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";$.setStyle({fill:C.get("textFill")||G.fill||G.stroke||K.color.neutral99,backgroundColor:C.get("textBackgroundColor")}),B.setTextConfig({position:C.get("textPosition")||z}),$.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",N])!=="emphasis"&&i.leaveEmphasis(this),$.hide()}),(_.get(["iconStatus",N])==="emphasis"?Is:Ns)(B),o.add(B),B.on("click",pe(x.onclick,x,n,i,N)),D[N]=B})}var v=Or(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),y=Rt(g,v,m);kc(r.get("orient"),o,r.get("itemGap"),y.width,y.height),wT(o,g,v,m),o.add(Vne(o.getBoundingRect(),r)),l||o.eachChild(function(_){var x=_.__title,w=_.ensureState("emphasis"),S=w.textConfig||(w.textConfig={}),C=_.getTextContent(),M=C&&C.ensureState("emphasis");if(M&&!Te(M)&&x){var P=M.style||(M.style={}),k=lT(x,nt.makeFont(P)),O=_.x+o.x,D=_.y+o.y+s,I=!1;D+k.height>i.getHeight()&&(S.position="top",I=!0);var N=I?-5-k.height:s+10;O+k.width/2>i.getWidth()?(S.position=["100%",N],P.align="right"):O-k.width/2<0&&(S.position=[0,N],P.align="left")}})},t.prototype.updateView=function(r,n,i,a){j(this._features,function(o){o instanceof Yi&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(r,n){j(this._features,function(i){i instanceof Yi&&i.remove&&i.remove(r,n)}),this.group.removeAll()},t.prototype.dispose=function(r,n){j(this._features,function(i){i instanceof Yi&&i.dispose&&i.dispose(r,n)})},t.type="toolbox",t}(Mt);function QZe(e){return e.indexOf("my")===0}var JZe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||K.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=tt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),d=h[0].indexOf("base64")>-1,v=o?decodeURIComponent(h[1]):h[1];d&&(v=window.atob(v));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=v.length,y=new Uint8Array(m);m--;)y[m]=v.charCodeAt(m);var _=new Blob([y]);window.navigator.msSaveOrOpenBlob(_,g)}else{var x=document.createElement("iframe");document.body.appendChild(x);var w=x.contentWindow,S=w.document;S.open("image/svg+xml","replace"),S.write(v),S.close(),w.focus(),S.execCommand("SaveAs",!0,g),document.body.removeChild(x)}}else{var C=i.get("lang"),M='',P=window.open();P.document.write(M),P.document.title=a}},t.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:K.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(Yi),KH="__ec_magicType_stack__",eYe=[["line","bar"],["stack"]],tYe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return j(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(QH[i]){var s={series:[]},l=function(f){var h=f.subType,d=f.id,v=QH[i](h,d,f,a);v&&(Me(v,f.option),s.series.push(v));var g=f.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,_=y+"Axis",x=f.getReferringComponents(_,Kt).models[0],w=x.componentIndex;s[_]=s[_]||[];for(var S=0;S<=w;S++)s[_][w]=s[_][w]||{};s[_][w].boundaryGap=i==="bar"}}};j(eYe,function(f){$e(f,i)>=0&&j(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Ve({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Yi),QH={line:function(e,t,r,n){if(e==="bar")return Ve({id:t,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(e,t,r,n){if(e==="line")return Ve({id:t,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(e,t,r,n){var i=r.get("stack")===KH;if(e==="line"||e==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ve({id:t,stack:i?"":KH},n.get(["option","stack"])||{},!0)}};Wa({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var zT=new Array(60).join("-"),Qd=" ";function rYe(e){var t={},r=[],n=[];return e.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:t,other:r,meta:n}}function nYe(e){var t=[];return j(e,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(se(r.series,function(d){return d.name})),l=[i.model.getCategories()];j(r.series,function(d){var v=d.getRawData();l.push(d.getRawData().mapArray(v.mapDimension(o),function(g){return g}))});for(var u=[s.join(Qd)],c=0;c=0)return!0}var pD=new RegExp("["+Qd+"]+","g");function sYe(e){for(var t=e.split(/\n+/g),r=Bw(t.shift()).split(pD),n=[],i=se(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(t)}function dYe(e){var t=sj(e),r=t[t.length-1];t.length>1&&t.pop();var n={};return Gne(r,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function vYe(e){Hne(e).snapshots=null}function pYe(e){return sj(e).length}function sj(e){var t=Hne(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var gYe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){vYe(r),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(Yi);Wa({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var mYe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],lj=function(){function e(t,r,n){var i=this;this._targetInfoList=[];var a=JH(r,t);j(yYe,function(o,s){(!n||!n.include||$e(n.include,s)>=0)&&o(a,i._targetInfoList)})}return e.prototype.setOutputRanges=function(t,r){return this.matchOutputRanges(t,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=NM[n.brushType](0,a,i);n.__rangeOffset={offset:nW[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},e.prototype.matchOutputRanges=function(t,r,n){j(t,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&j(a.coordSyses,function(o){var s=NM[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},e.prototype.setInputRanges=function(t,r){j(t,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=NM[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?nW[n.brushType](a.values,o.offset,_Ye(a.xyMinMax,o.xyMinMax)):a.values}},this)},e.prototype.makePanelOpts=function(t,r){return se(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:Xre(i),isTargetByCursor:Kre(i,t,n.coordSysModel),getLinearBrushOtherExtent:qre(i)}})},e.prototype.controlSeries=function(t,r,n){var i=this.findTargetInfo(t,n);return i===!0||i&&$e(i.coordSyses,r.coordinateSystem)>=0},e.prototype.findTargetInfo=function(t,r){for(var n=this._targetInfoList,i=JH(r,t),a=0;ae[1]&&e.reverse(),e}function JH(e,t){return Jh(e,t,{includeMainTypes:mYe})}var yYe={grid:function(e,t){var r=e.xAxisModels,n=e.yAxisModels,i=e.gridModels,a=xe(),o={},s={};!r&&!n&&!i||(j(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),j(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),j(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];j(u.getCartesians(),function(f,h){($e(r,f.getAxis("x").model)>=0||$e(n,f.getAxis("y").model)>=0)&&c.push(f)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:tW.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(e,t){j(e.geoModels,function(r){var n=r.coordinateSystem;t.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:tW.geo})})}},eW=[function(e,t){var r=e.xAxisModel,n=e.yAxisModel,i=e.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(e,t){var r=e.geoModel;return r&&r===t.geoModel}],tW={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform($l(e)),t}},NM={lineX:je(rW,0),lineY:je(rW,1),rect:function(e,t,r,n){var i=e?t.pointToData([r[0][0],r[1][0]],n):t.dataToPoint([r[0][0],r[1][0]],n),a=e?t.pointToData([r[0][1],r[1][1]],n):t.dataToPoint([r[0][1],r[1][1]],n),o=[gD([i[0],a[0]]),gD([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=se(r,function(o){var s=e?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function rW(e,t,r,n){var i=r.getAxis(["x","y"][e]),a=gD(se([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var nW={lineX:je(iW,0),lineY:je(iW,1),rect:function(e,t,r){return[[e[0][0]-r[0]*t[0][0],e[0][1]-r[0]*t[0][1]],[e[1][0]-r[1]*t[1][0],e[1][1]-r[1]*t[1][1]]]},polygon:function(e,t,r){return se(e,function(n,i){return[n[0]-r[0]*t[i][0],n[1]-r[1]*t[i][1]]})}};function iW(e,t,r,n){return[t[0]-n[e]*r[0],t[1]-n[e]*r[1]]}function _Ye(e,t){var r=aW(e),n=aW(t),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function aW(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var mD=j,xYe=tje("toolbox-dataZoom_"),bYe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new ER(i.getZr()),this._brushController.on("brush",pe(this._onBrush,this)).mount()),TYe(r,n,this,a,i),SYe(r,n)},t.prototype.onclick=function(r,n,i){wYe[i].call(this)},t.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new lj(uj(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),hYe(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),d=h.model,v=l(u,d,a),g=v.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(f=ql(0,f.slice(),h.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),v&&(i[v.id]={dataZoomId:v.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var v=d.getAxisModel(u,c.componentIndex);v&&(h=d)}),h}},t.prototype._dispatchZoomAction=function(r){var n=[];mD(r,function(i,a){n.push(Ce(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:K.color.backgroundTint}};return n},t}(Yi),wYe={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(dYe(this.ecModel))}};function uj(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function SYe(e,t){e.setIconStatus("back",pYe(t)>1?"emphasis":"normal")}function TYe(e,t,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var o=new lj(uj(e),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()}:!1)}RBe("dataZoom",function(e){var t=e.getComponent("toolbox",0),r=["feature","dataZoom"];if(!t||t.get(r)==null)return;var n=t.getModel(r),i=[],a=uj(n),o=Jh(e,a);mD(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),mD(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:xYe+u+f};h[c]=f,i.push(h)}return i});function CYe(e){e.registerComponentModel(qZe),e.registerComponentView(KZe),ph("saveAsImage",JZe),ph("magicType",tYe),ph("dataView",cYe),ph("dataZoom",bYe),ph("restore",gYe),We(XZe)}var AYe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:K.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:K.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:K.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:K.color.tertiary,fontSize:14}},t}(qe);function Wne(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function Une(e){if(tt.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+d+"px";var v=t+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+v,"border-right:"+v,"background-color:"+n+";"];return'
'}function EYe(e,t,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+e/2+"s "+n,a="opacity"+i+",visibility"+i),t||(i=" "+e+"s "+n,a+=(a.length?",":"")+(tt.transformSupported?""+cj+i:",left"+i+",top"+i)),LYe+":"+a}function oW(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!tt.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=tt.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+cj+":"+o+";":[["top",0],["left",0],[Zne,o]]}function IYe(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var i=be(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),j(["decoration","align"],function(u){var c=e.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function NYe(e,t,r,n){var i=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.get("shadowBlur"),l=e.get("shadowColor"),u=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),f=e.getModel("textStyle"),h=RJ(e,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),t&&a>0&&i.push(EYe(a,r,n)),o&&i.push("background-color:"+o),j(["width","color","radius"],function(v){var g="border-"+v,m=kN(g),y=e.get(m);y!=null&&i.push(g+":"+y+(v==="color"?"":"px"))}),i.push(IYe(f)),h!=null&&i.push("padding:"+Lv(h).join("px ")+"px"),i.join(";")+";"}function sW(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&xNe(e,o,r,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var RYe=function(){function e(t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,tt.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=r.appendTo,o=a&&(ve(a)?document.querySelector(a):Uc(a)?a:Te(a)&&a(t.getDom()));sW(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Fi(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),n=PYe(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=kYe+NYe(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+oW(a[0],a[1],!0)+("border-color:"+Jc(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(ve(a)&&n.get("trigger")==="item"&&!Wne(n)&&(s=DYe(n,i,a)),ve(t))o.innerHTML=t+s;else if(t){o.innerHTML="",ie(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||tt.node||!i.getDom())){var o=cW(a,i);this._ticket="";var s=a.dataByCoordSys,l=GYe(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=BYe;c.x=a.x,c.y=a.y,c.update(),Ee(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var f=kne(a,n),h=f.point[0],d=f.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(cW(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=Hp([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=Ee(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;_c(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Ee(c).dataIndex!=null?l=c:Ee(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=pe(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Hp([n.tooltipOption],a),l=this._renderMode,u=[],c=xr("section",{blocks:[],noHeader:!0}),f=[],h=new g2;j(r,function(_){j(_.dataByAxis,function(x){var w=i.getComponent(x.axisDim+"Axis",x.axisIndex),S=x.value;if(!(!w||S==null)){var C=Ane(S,w.axis,i,x.seriesDataIndices,x.valueLabelOpt),M=xr("section",{header:C,noHeader:!xi(C),sortBlocks:!0,blocks:[]});c.blocks.push(M),j(x.seriesDataIndices,function(P){var k=i.getSeriesByIndex(P.seriesIndex),O=P.dataIndexInside,D=k.getDataParams(O);if(!(D.dataIndex<0)){D.axisDim=x.axisDim,D.axisIndex=x.axisIndex,D.axisType=x.axisType,D.axisId=x.axisId,D.axisValue=pw(w.axis,{value:S}),D.axisValueLabel=C,D.marker=h.makeTooltipMarker("item",Jc(D.color),l);var I=AV(k.formatTooltip(O,!0,null)),N=I.frag;if(N){var B=Hp([k],a).get("valueFormatter");M.blocks.push(B?re({valueFormatter:B},N):N)}I.text&&f.push(I.text),u.push(D)}})}})}),c.blocks.reverse(),f.reverse();var d=n.position,v=s.get("order"),g=DV(c,h,l,v,i.get("useUTC"),s.get("textStyle"));g&&f.unshift(g);var m=l==="richText"?` + +`:"
",y=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],d,null,h)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Ee(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),d=this._renderMode,v=r.positionDefault,g=Hp([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(c,f),_=new g2;y.marker=_.makeTooltipMarker("item",Jc(y.color),d);var x=AV(u.formatTooltip(c,!1,f)),w=g.get("order"),S=g.get("valueFormatter"),C=x.frag,M=C?DV(S?re({valueFormatter:S},C):C,_,d,w,a.get("useUTC"),g.get("textStyle")):x.text,P="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,M,y,P,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Ee(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(ve(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=Ce(l),l.content=Mn(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var d=r.positionDefault,v=Hp(f,this._tooltipModel,d?{position:d}:null),g=v.get("content"),m=Math.random()+"",y=new g2;this._showOrMove(v,function(){var _=Ce(v.get("formatterParams")||{});this._showTooltipContent(v,g,_,m,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var h=r.get("formatter");l=l||r.get("position");var d=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=v.color;if(h)if(ve(h)){var m=r.ecModel.get("useUTC"),y=ie(i)?i[0]:i,_=y&&y.axisType&&y.axisType.indexOf("time")>=0;d=h,_&&(d=n0(y.axisValue,d,m)),d=ON(d,i,!0)}else if(Te(h)){var x=pe(function(w,S){w===this._ticket&&(f.setContent(S,c,r,g,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,d=h(i,a,x)}else d=h;f.setContent(d,c,r,g,l),f.show(r,g),this._updatePosition(r,l,o,s,f,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||ie(n))return{color:a||o};if(!ie(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),h=r.get("align"),d=r.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),Te(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,c],contentSize:f.slice()})),ie(n))i=de(n[0],u),a=de(n[1],c);else if(Pe(n)){var g=n;g.width=f[0],g.height=f[1];var m=Rt(g,{width:u,height:c});i=m.x,a=m.y,h=null,d=null}else if(ve(n)&&l){var y=VYe(n,v,f,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=$Ye(i,a,o,u,c,h?null:20,d?null:20);i=y[0],a=y[1]}if(h&&(i-=fW(h)?f[0]/2:h==="right"?f[0]:0),d&&(a-=fW(d)?f[1]/2:d==="bottom"?f[1]:0),Wne(r)){var y=FYe(i,a,o,u,c);i=y[0],a=y[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&j(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&j(u,function(h,d){var v=f[d]||{},g=h.seriesDataIndices||[],m=v.seriesDataIndices||[];o=o&&h.value===v.value&&h.axisType===v.axisType&&h.axisId===v.axisId&&g.length===m.length,o&&j(g,function(y,_){var x=m[_];o=o&&y.seriesIndex===x.seriesIndex&&y.dataIndex===x.dataIndex}),a&&j(h.seriesDataIndices,function(y){var _=y.seriesIndex,x=n[_],w=a[_];x&&w&&w.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){tt.node||!n.getDom()||(cy(this,"_updatePosition"),this._tooltipContent.dispose(),uD("itemTooltip",n))},t.type="tooltip",t}(Mt);function Hp(e,t,r){var n=t.ecModel,i;r?(i=new Je(r,n,n),i=new Je(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Je&&(o=o.get("tooltip",!0)),ve(o)&&(o={formatter:o}),o&&(i=new Je(o,i,n)))}return i}function cW(e,t){return e.dispatchAction||pe(t.dispatchAction,t)}function $Ye(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function FYe(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function VYe(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function fW(e){return e==="center"||e==="middle"}function GYe(e,t,r){var n=JI(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=bv(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Ee(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function HYe(e){We(h0),e.registerComponentModel(AYe),e.registerComponentView(zYe),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},nr),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},nr)}var WYe=["rect","polygon","keep","clear"];function UYe(e,t){var r=At(e?e.brush:[]);if(r.length){var n=[];j(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=e&&e.toolbox;ie(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),ZYe(s),t&&!s.length&&s.push.apply(s,WYe)}}function ZYe(e){var t={};j(e,function(r){t[r]=1}),e.length=0,j(t,function(r,n){e.push(n)})}var hW=j;function dW(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function yD(e,t,r){var n={};return hW(t,function(a){var o=n[a]=i();hW(e[a],function(s,l){if($r.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new $r(u),l==="opacity"&&(u=Ce(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new $r(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function Xne(e,t,r){var n;j(r,function(i){t.hasOwnProperty(i)&&dW(t[i])&&(n=!0)}),n&&j(r,function(i){t.hasOwnProperty(i)&&dW(t[i])?e[i]=Ce(t[i]):delete e[i]})}function YYe(e,t,r,n,i,a){var o={};j(e,function(f){var h=$r.prepareVisualTypes(t[f]);o[f]=h});var s;function l(f){return FN(r,s,f)}function u(f,h){UJ(r,s,f,h)}r.each(c);function c(f,h){s=f;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var v=n.call(i,f),g=t[v],m=o[v],y=0,_=m.length;y<_;y++){var x=m[y];g[x]&&g[x].applyVisual(f,l,u)}}}function XYe(e,t,r,n){var i={};return j(e,function(a){var o=$r.prepareVisualTypes(t[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(S){return FN(s,f,S)}function c(S,C){UJ(s,f,S,C)}for(var f,h=s.getStore();(f=o.next())!=null;){var d=s.getRawDataItem(f);if(!(d&&d.visualMap===!1))for(var v=n!=null?h.get(l,f):f,g=r(v),m=t[g],y=i[g],_=0,x=y.length;_t[0][1]&&(t[0][1]=a[0]),a[1]t[1][1]&&(t[1][1]=a[1])}return t&&yW(t)}};function yW(e){return new Oe(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var rXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new ER(n.getZr())).on("brush",pe(this._onBrush,this)).mount()},t.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},t.prototype.updateTransform=function(r,n,i,a){qne(n),this._updateController(r,n,i,a)},t.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},t.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},t.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Ce(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Ce(i),$from:n})},t.type="brush",t}(Mt),nXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.areas=[],r.brushOption={},r}return t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&Xne(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(r){r&&(this.areas=se(r,function(n){return _W(this.option,n)},this))},t.prototype.setBrushOption=function(r){this.brushOption=_W(this.option,r),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:K.color.backgroundTint,borderColor:K.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:K.color.disabled},t}(qe);function _W(e,t){return Ve({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Je(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var iXe=["rect","polygon","lineX","lineY","keep","clear"],aXe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,j(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(r,n,i){this.render(r,n,i)},t.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return j(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},t.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(r){var n={show:!0,type:iXe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},t}(Yi);function oXe(e){e.registerComponentView(rXe),e.registerComponentModel(nXe),e.registerPreprocessor(UYe),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,KYe),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,r){r.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},nr),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},nr),ph("brush",aXe)}var sXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:K.size.m,backgroundColor:K.color.transparent,borderColor:K.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:K.color.primary},subtextStyle:{fontSize:12,color:K.color.quaternary}},t}(qe),lXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=be(r.get("textBaseline"),r.get("textVerticalAlign")),c=new nt({style:Ct(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=r.get("subtext"),d=new nt({style:Ct(s,{text:h,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);c.silent=!v&&!m,d.silent=!g&&!m,v&&c.on("click",function(){iw(v,"_"+r.get("target"))}),g&&d.on("click",function(){iw(g,"_"+r.get("subtarget"))}),Ee(c).eventData=Ee(d).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),h&&a.add(d);var y=a.getBoundingRect(),_=r.getBoxLayoutParams();_.width=y.width,_.height=y.height;var x=Or(r,i),w=Rt(_,x.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?w.x+=w.width:l==="center"&&(w.x+=w.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?w.y+=w.height:u==="middle"&&(w.y+=w.height/2),u=u||"top"),a.x=w.x,a.y=w.y,a.markRedraw();var S={align:l,verticalAlign:u};c.setStyle(S),d.setStyle(S),y=a.getBoundingRect();var C=w.margin,M=r.getItemStyle(["color","opacity"]);M.fill=r.get("backgroundColor");var P=new Ze({shape:{x:y.x-C[3],y:y.y-C[0],width:y.width+C[1]+C[3],height:y.height+C[0]+C[2],r:r.get("borderRadius")},style:M,subPixelOptimize:!0,silent:!0});a.add(P)}},t.type="title",t}(Mt);function uXe(e){e.registerComponentModel(sXe),e.registerComponentView(lXe)}var xW=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode="box",r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(r){this.option.autoPlay=!!r},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],j(n,function(u,c){var f=Ar(xv(u),""),h;Pe(u)?(h=Ce(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Ln([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:K.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:K.color.secondary},data:[]},t}(qe),Kne=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline.slider",t.defaultOption=cu(xW.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:K.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:K.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:K.color.tertiary},itemStyle:{color:K.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:K.color.accent50,borderColor:K.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:K.color.accent50,borderColor:K.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:K.color.accent60},itemStyle:{color:K.color.accent60,borderColor:K.color.accent60},controlStyle:{color:K.color.accent70,borderColor:K.color.accent70}},progress:{lineStyle:{color:K.color.accent30},itemStyle:{color:K.color.accent40}},data:[]}),t}(xW);or(Kne,TT.prototype);var cXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline",t}(Mt),fXe=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this,r,n,i)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(va),jM=Math.PI,bW=Ke(),hXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.api=n},t.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return xr("nameValue",{noName:!0,value:c})},j(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=vXe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:jM/2},f=a==="vertical"?o.height:o.width,h=r.getModel("controlStyle"),d=h.get("show",!0),v=d?h.get("itemSize"):0,g=d?h.get("itemGap"):0,m=v+g,y=r.get(["label","rotate"])||0;y=y*jM/180;var _,x,w,S=h.get("position",!0),C=d&&h.get("showPlayBtn",!0),M=d&&h.get("showPrevBtn",!0),P=d&&h.get("showNextBtn",!0),k=0,O=f;S==="left"||S==="bottom"?(C&&(_=[0,0],k+=m),M&&(x=[k,0],k+=m),P&&(w=[O-v,0],O-=m)):(C&&(_=[O-v,0],O-=m),M&&(x=[0,0],k+=m),P&&(w=[O-v,0],O-=m));var D=[k,O];return r.get("inverse")&&D.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:x,nextBtnPosition:w,axisExtent:D,controlSize:v,controlGap:g}},t.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=zr(),l=o.x,u=o.y+o.height;$a(s,s,[-l,-u]),Hs(s,s,-jM/2),$a(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),f=_(i.getBoundingRect()),h=_(a.getBoundingRect()),d=[i.x,i.y],v=[a.x,a.y];v[0]=d[0]=c[0][0];var g=r.labelPosOpt;if(g==null||ve(g)){var m=g==="+"?0:1;x(d,f,c,1,m),x(v,h,c,1,1-m)}else{var m=g>=0?0:1;x(d,f,c,1,m),v[1]=d[1]+g}i.setPosition(d),a.setPosition(v),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(w){w.originX=c[0][0]-w.x,w.originY=c[1][0]-w.y}function _(w){return[[w.x,w.x+w.width],[w.y,w.y+w.height]]}function x(w,S,C,M,P){w[M]+=C[M][P]-S[M][P]}},t.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=dXe(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new fXe("value",o,r.axisExtent,a);return l.model=n,l},t.prototype._createGroup=function(r){var n=this[r]=new Ae;return this.group.add(n),n},t.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new dr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:re({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new dr({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Me({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],j(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),d=f.getModel(["emphasis","itemStyle"]),v=f.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:pe(o._changeTimeline,o,u.value)},m=wW(f,h,n,g);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=v.getItemStyle(),zl(m);var y=Ee(m);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},t.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],j(u,function(c){var f=c.tickValue,h=l.getItemModel(f),d=h.getModel("label"),v=h.getModel(["emphasis","label"]),g=h.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),y=new nt({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:pe(o._changeTimeline,o,f),silent:!1,style:Ct(d,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=Ct(v),y.ensureState("progress").style=Ct(g),n.add(y),zl(y),bW(y).dataIndex=f,o._tickLabels.push(y)})}},t.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(r.nextBtnPosition,"next",pe(this._changeTimeline,this,f?"-":"+")),h(r.prevBtnPosition,"prev",pe(this._changeTimeline,this,f?"+":"-")),h(r.playPosition,c?"stop":"play",pe(this._handlePlayClick,this,!c),!0);function h(d,v,g,m){if(d){var y=Fa(be(a.get(["controlStyle",v+"BtnSize"]),o),o),_=[0,-y/2,y,y],x=pXe(a,v+"Icon",_,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});x.ensureState("emphasis").style=u,n.add(x),zl(x)}}},t.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=pe(u._handlePointerDrag,u),f.ondragend=pe(u._handlePointerDragend,u),SW(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){SW(f,u._progressLine,s,i,a)}};this._currentPointer=wW(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},t.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},t.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=bi(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(v)),[s,d]}var Tx={min:je(Sx,"min"),max:je(Sx,"max"),average:je(Sx,"average"),median:je(Sx,"median")};function Ay(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!bXe(t)&&!ie(t.coord)&&ie(i)){var a=Qne(t,r,n,e);if(t=Ce(t),t.type&&Tx[t.type]&&a.baseAxis&&a.valueAxis){var o=$e(i,a.baseAxis.dim),s=$e(i,a.valueAxis.dim),l=Tx[t.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!ie(i)){t.coord=[];var u=e.getBaseAxis();if(u&&t.type&&Tx[t.type]){var c=n.getOtherAxis(u);c&&(t.value=zw(r,r.mapDimension(c.dim),t.type))}}else for(var f=t.coord,h=0;h<2;h++)Tx[f[h]]&&(f[h]=zw(r,r.mapDimension(i[h]),f[h]));return t}}function Qne(e,t,r,n){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=r.getAxis(wXe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function wXe(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function My(e,t){return e&&e.containData&&t.coord&&!xD(t)?e.containData(t.coord):!0}function SXe(e,t,r){return e&&e.containZone&&t.coord&&r.coord&&!xD(t)&&!xD(r)?e.containZone(t.coord,r.coord):!0}function Jne(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return Vl(o,t[a])}:function(r,n,i,a){return Vl(r.value,t[a])}}function zw(e,t,r){if(r==="average"){var n=0,i=0;return e.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var BM=Ke(),hj=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this.markerGroupMap=xe()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){BM(s).keep=!1}),n.eachSeries(function(s){var l=jo.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!BM(s).keep&&a.group.remove(s.group)}),TXe(n,o,this.type)},t.prototype.markKeep=function(r){BM(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;j(r,function(a){var o=jo.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?vQ(l):sN(l))})}})},t.type="marker",t}(Mt);function TXe(e,t,r){e.eachSeries(function(n){var i=jo.getMarkerModelFromSeries(n,r),a=t.get(n.id);if(i&&a&&a.group){var o=Qc(i),s=o.z,l=o.zlevel;xT(a.group,s,l)}})}function CW(e,t,r){var n=t.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();e.each(function(s){var l=e.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,f=u?o?o.height:0:a,h=u&&o?o.x:0,d=u&&o?o.y:0,v,g=de(l.get("x"),c)+h,m=de(l.get("y"),f)+d;if(!isNaN(g)&&!isNaN(m))v=[g,m];else if(t.getMarkerPosition)v=t.getMarkerPosition(e.getValues(e.dimensions,s));else if(n){var y=e.get(n.dimensions[0],s),_=e.get(n.dimensions[1],s);v=n.dataToPoint([y,_])}isNaN(g)||(v[0]=g),isNaN(m)||(v[1]=m),e.setItemLayout(s,v)})}var CXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=jo.getMarkerModelFromSeries(a,"markPoint");o&&(CW(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new l0),f=AXe(o,r,n);n.setData(f),CW(n.getData(),r,a),f.each(function(h){var d=f.getItemModel(h),v=d.getShallow("symbol"),g=d.getShallow("symbolSize"),m=d.getShallow("symbolRotate"),y=d.getShallow("symbolOffset"),_=d.getShallow("symbolKeepAspect");if(Te(v)||Te(g)||Te(m)||Te(y)){var x=n.getRawValue(h),w=n.getDataParams(h);Te(v)&&(v=v(x,w)),Te(g)&&(g=g(x,w)),Te(m)&&(m=m(x,w)),Te(y)&&(y=y(x,w))}var S=d.getModel("itemStyle").getItemStyle(),C=d.get("z2"),M=a0(l,"color");S.fill||(S.fill=M),f.setItemVisual(h,{z2:be(C,0),symbol:v,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:_,style:S})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(d){Ee(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markPoint",t}(hj);function AXe(e,t,r){var n;e?n=se(e&&e.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return re(re({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Ln(n,r),a=se(r.get("data"),je(Ay,t));e&&(a=ct(a,je(My,e)));var o=Jne(!!e,n);return i.initData(a,null,o),i}function MXe(e){e.registerComponentModel(xXe),e.registerComponentView(CXe),e.registerPreprocessor(function(t){fj(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var PXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(jo),Cx=Ke(),LXe=function(e,t,r,n){var i=e.getData(),a;if(ie(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=Qr(n.yAxis,n.xAxis);else{var u=Qne(n,i,t,e);s=u.valueAxis;var c=eR(i,u.valueDataDim);l=zw(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,d=Ce(n),v={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,v.coord[h]=1/0;var g=r.get("precision");g>=0&&it(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[f]=v.coord[f]=l,a=[d,v,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[Ay(e,a[0]),Ay(e,a[1]),re({},a[2])];return m[2].type=m[2].type||null,Ve(m[2],m[0]),Ve(m[2],m[1]),m};function $w(e){return!isNaN(e)&&!isFinite(e)}function AW(e,t,r,n){var i=1-e,a=n.dimensions[e];return $w(t[i])&&$w(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function kXe(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(AW(1,r,n,e)||AW(0,r,n,e)))return!0}return My(e,t[0])&&My(e,t[1])}function zM(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=de(o.get("x"),i.getWidth()),u=de(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,f=e.get(c[0],t),h=e.get(c[1],t);s=a.dataToPoint([f,h])}if(Xl(a,"cartesian2d")){var d=a.getAxis("x"),v=a.getAxis("y"),c=a.dimensions;$w(e.get(c[0],t))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):$w(e.get(c[1],t))&&(s[1]=v.toGlobalCoord(v.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}e.setItemLayout(t,s)}var OXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=jo.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Cx(o).from,u=Cx(o).to;l.each(function(c){zM(l,c,!0,a,i),zM(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new OR);this.group.add(c.group);var f=DXe(o,r,n),h=f.from,d=f.to,v=f.line;Cx(n).from=h,Cx(n).to=d,n.setData(v);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),_=n.get("symbolOffset");ie(g)||(g=[g,g]),ie(m)||(m=[m,m]),ie(y)||(y=[y,y]),ie(_)||(_=[_,_]),f.from.each(function(w){x(h,w,!0),x(d,w,!1)}),v.each(function(w){var S=v.getItemModel(w),C=S.getModel("lineStyle").getLineStyle();v.setItemLayout(w,[h.getItemLayout(w),d.getItemLayout(w)]);var M=S.get("z2");C.stroke==null&&(C.stroke=h.getItemVisual(w,"style").fill),v.setItemVisual(w,{z2:be(M,0),fromSymbolKeepAspect:h.getItemVisual(w,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(w,"symbolOffset"),fromSymbolRotate:h.getItemVisual(w,"symbolRotate"),fromSymbolSize:h.getItemVisual(w,"symbolSize"),fromSymbol:h.getItemVisual(w,"symbol"),toSymbolKeepAspect:d.getItemVisual(w,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(w,"symbolOffset"),toSymbolRotate:d.getItemVisual(w,"symbolRotate"),toSymbolSize:d.getItemVisual(w,"symbolSize"),toSymbol:d.getItemVisual(w,"symbol"),style:C})}),c.updateData(v),f.line.eachItemGraphicEl(function(w){Ee(w).dataModel=n,w.traverse(function(S){Ee(S).dataModel=n})});function x(w,S,C){var M=w.getItemModel(S);zM(w,S,C,r,a);var P=M.getModel("itemStyle").getItemStyle();P.fill==null&&(P.fill=a0(l,"color")),w.setItemVisual(S,{symbolKeepAspect:M.get("symbolKeepAspect"),symbolOffset:be(M.get("symbolOffset",!0),_[C?0:1]),symbolRotate:be(M.get("symbolRotate",!0),y[C?0:1]),symbolSize:be(M.get("symbolSize"),m[C?0:1]),symbol:be(M.get("symbol",!0),g[C?0:1]),style:P})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t}(hj);function DXe(e,t,r){var n;e?n=se(e&&e.dimensions,function(u){var c=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return re(re({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Ln(n,r),a=new Ln(n,r),o=new Ln([],r),s=se(r.get("data"),je(LXe,t,e,r));e&&(s=ct(s,je(kXe,e)));var l=Jne(!!e,n);return i.initData(se(s,function(u){return u[0]}),null,l),a.initData(se(s,function(u){return u[1]}),null,l),o.initData(se(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function EXe(e){e.registerComponentModel(PXe),e.registerComponentView(OXe),e.registerPreprocessor(function(t){fj(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var IXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(jo),Ax=Ke(),NXe=function(e,t,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Ay(e,i),s=Ay(e,a),l=o.coord,u=s.coord;l[0]=Qr(l[0],-1/0),l[1]=Qr(l[1],-1/0),u[0]=Qr(u[0],1/0),u[1]=Qr(u[1],1/0);var c=nT([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Fw(e){return!isNaN(e)&&!isFinite(e)}function MW(e,t,r,n){var i=1-e;return Fw(t[i])&&Fw(r[i])}function RXe(e,t){var r=t.coord[0],n=t.coord[1],i={coord:r,x:t.x0,y:t.y0},a={coord:n,x:t.x1,y:t.y1};return Xl(e,"cartesian2d")?r&&n&&(MW(1,r,n)||MW(0,r,n))?!0:SXe(e,i,a):My(e,i)||My(e,a)}function PW(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=de(o.get(r[0]),i.getWidth()),u=de(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=e.getValues(["x0","y0"],t),f=e.getValues(["x1","y1"],t),h=a.clampData(c),d=a.clampData(f),v=[];r[0]==="x0"?v[0]=h[0]>d[0]?f[0]:c[0]:v[0]=h[0]>d[0]?c[0]:f[0],r[1]==="y0"?v[1]=h[1]>d[1]?f[1]:c[1]:v[1]=h[1]>d[1]?c[1]:f[1],s=n.getMarkerPosition(v,r,!0)}else{var g=e.get(r[0],t),m=e.get(r[1],t),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(Xl(a,"cartesian2d")){var _=a.getAxis("x"),x=a.getAxis("y"),g=e.get(r[0],t),m=e.get(r[1],t);Fw(g)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):Fw(m)&&(s[1]=x.toGlobalCoord(x.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var LW=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],jXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=jo.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=se(LW,function(f){return PW(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Ae});this.group.add(c.group),this.markKeep(c);var f=BXe(o,r,n);n.setData(f),f.each(function(h){var d=se(LW,function(O){return PW(f,h,O,r,a)}),v=o.getAxis("x").scale,g=o.getAxis("y").scale,m=v.getExtent(),y=g.getExtent(),_=[v.parse(f.get("x0",h)),v.parse(f.get("x1",h))],x=[g.parse(f.get("y0",h)),g.parse(f.get("y1",h))];bi(_),bi(x);var w=!(m[0]>_[1]||m[1]<_[0]||y[0]>x[1]||y[1]=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:K.size.m,align:"auto",backgroundColor:K.color.transparent,borderColor:K.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:K.color.disabled,inactiveBorderColor:K.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:K.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:K.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:K.color.tertiary,borderWidth:1,borderColor:K.color.border},emphasis:{selectorLabel:{show:!0,color:K.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(qe),ah=je,wD=j,Mx=Ae,eie=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new Mx),this.group.add(this._selectorGroup=new Mx),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=Or(r,i).refContainer,f=r.getBoxLayoutParams(),h=r.get("padding"),d=Rt(f,c,h),v=this.layoutInner(r,o,d,a,l,u),g=Rt(Me({width:v.width,height:v.height},f),c,h);this.group.x=g.x-v.x,this.group.y=g.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Vne(v,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=xe(),f=n.get("selectedMode"),h=n.get("triggerEvent"),d=[];i.eachRawSeries(function(v){!v.get("legendHoverLink")&&d.push(v.id)}),wD(n.getData(),function(v,g){var m=this,y=v.get("name");if(!this.newlineDisabled&&(y===""||y===` +`)){var _=new Mx;_.newline=!0,u.add(_);return}var x=i.getSeriesByName(y)[0];if(!c.get(y))if(x){var w=x.getData(),S=w.getVisual("legendLineStyle")||{},C=w.getVisual("legendIcon"),M=w.getVisual("style"),P=this._createItem(x,y,g,v,n,r,S,M,C,f,a);P.on("click",ah(kW,y,null,a,d)).on("mouseover",ah(SD,x.name,null,a,d)).on("mouseout",ah(TD,x.name,null,a,d)),i.ssr&&P.eachChild(function(k){var O=Ee(k);O.seriesIndex=x.seriesIndex,O.dataIndex=g,O.ssrType="legend"}),h&&P.eachChild(function(k){m.packEventData(k,n,x,g,y)}),c.set(y,!0)}else i.eachRawSeries(function(k){var O=this;if(!c.get(y)&&k.legendVisualProvider){var D=k.legendVisualProvider;if(!D.containName(y))return;var I=D.indexOfName(y),N=D.getItemVisual(I,"style"),B=D.getItemVisual(I,"legendIcon"),F=Pn(N.fill);F&&F[3]===0&&(F[3]=.2,N=re(re({},N),{fill:ta(F,"rgba")}));var $=this._createItem(k,y,g,v,n,r,{},N,B,f,a);$.on("click",ah(kW,null,y,a,d)).on("mouseover",ah(SD,null,y,a,d)).on("mouseout",ah(TD,null,y,a,d)),i.ssr&&$.eachChild(function(G){var z=Ee(G);z.seriesIndex=k.seriesIndex,z.dataIndex=g,z.ssrType="legend"}),h&&$.eachChild(function(G){O.packEventData(G,n,k,g,y)}),c.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Ee(r).eventData=s},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();wD(r,function(u){var c=u.type,f=new nt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);Fr(f,{normal:h,emphasis:d},{defaultText:u.title}),zl(f)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,h){var d=r.visualDrawType,v=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),x=a.get("icon");c=x||c||"roundRect";var w=FXe(c,a,l,u,d,m,h),S=new Mx,C=a.getModel("textStyle");if(Te(r.getLegendIcon)&&(!x||x==="inherit"))S.add(r.getLegendIcon({itemWidth:v,itemHeight:g,icon:c,iconRotate:y,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:_}));else{var M=x==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;S.add(VXe({itemWidth:v,itemHeight:g,icon:c,iconRotate:M,itemStyle:w.itemStyle,symbolKeepAspect:_}))}var P=s==="left"?v+5:-5,k=s,O=o.get("formatter"),D=n;ve(O)&&O?D=O.replace("{name}",n??""):Te(O)&&(D=O(n));var I=m?C.getTextColor():a.get("inactiveColor");S.add(new nt({style:Ct(C,{text:D,x:P,y:g/2,fill:I,align:k,verticalAlign:"middle"},{inheritColor:I})}));var N=new Ze({shape:S.getBoundingRect(),style:{fill:"transparent"}}),B=a.getModel("tooltip");return B.get("show")&&Us({el:N,componentModel:o,itemName:n,itemTooltipOption:B.option}),S.add(N),S.eachChild(function(F){F.silent=!0}),N.silent=!f,this.getContentGroup().add(S),zl(S),S.__legendDataIndex=i,S},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();kc(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){kc("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],v=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",_=g===0?"y":"x";s==="end"?d[g]+=c[m]+v:f[g]+=h[m]+v,d[1-g]+=c[y]/2-h[y]/2,u.x=d[0],u.y=d[1],l.x=f[0],l.y=f[1];var x={x:0,y:0};return x[m]=c[m]+v+h[m],x[y]=Math.max(c[y],h[y]),x[_]=Math.min(0,h[_]+d[1-g]),x}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Mt);function FXe(e,t,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),wD(m,function(_,x){m[x]==="inherit"&&(m[x]=y[x])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:Hd(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var h=t.getModel("lineStyle"),d=h.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var v=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth=v==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function VXe(e){var t=e.icon||"roundRect",r=vr(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=K.color.neutral00,r.style.lineWidth=2),r}function kW(e,t,r,n){TD(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),SD(e,t,r,n)}function tie(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;ni[o],m=[-d.x,-d.y];n||(m[a]=c[u]);var y=[0,0],_=[-v.x,-v.y],x=be(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var w=r.get("pageButtonPosition",!0);w==="end"?_[a]+=i[o]-v[o]:y[a]+=v[o]+x}_[1-a]+=d[s]/2-v[s]/2,c.setPosition(m),f.setPosition(y),h.setPosition(_);var S={x:0,y:0};if(S[o]=g?i[o]:d[o],S[s]=Math.max(d[s],v[s]),S[l]=Math.min(0,v[l]+_[1-a]),f.__rectSize=i[o],g){var C={x:0,y:0};C[o]=Math.max(i[o]-v[o]-x,0),C[s]=S[s],f.setClipPath(new Ze({shape:C})),f.__rectSize=C[o]}else h.eachChild(function(P){P.attr({invisible:!0,silent:!0})});var M=this._getPageInfo(r);return M.pageIndex!=null&&ot(c,{x:M.contentPosition[0],y:M.contentPosition[1]},g?r:null),this._updatePageInfoView(r,M),S},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;j(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",ve(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=$M[o],l=FM[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,d=h?1:0,v={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var g=w(f);v.contentPosition[o]=-g.s;for(var m=u+1,y=g,_=g,x=null;m<=h;++m)x=w(c[m]),(!x&&_.e>y.s+a||x&&!S(x,y.s))&&(_.i>y.i?y=_:y=x,y&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=y.i),++v.pageCount)),_=x;for(var m=u-1,y=g,_=g,x=null;m>=-1;--m)x=w(c[m]),(!x||!S(_,x.s))&&y.i<_.i&&(_=y,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=y.i),++v.pageCount,++v.pageIndex),y=x;return v;function w(C){if(C){var M=C.getBoundingRect(),P=M[l]+C[l];return{s:P,e:P+M[s],i:C.__legendDataIndex}}}function S(C,M){return C.e>=M&&C.s<=M+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(eie);function ZXe(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function YXe(e){We(rie),e.registerComponentModel(WXe),e.registerComponentView(UXe),ZXe(e)}function XXe(e){We(rie),We(YXe)}var qXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=cu(Cy.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Cy),dj=Ke();function KXe(e,t,r){dj(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function QXe(e,t){for(var r=dj(e).coordSysRecordMap,n=r.keys(),i=0;ia[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function nqe(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=dj(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=xe());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=zne(a);j(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,JXe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=xe());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){nie(i,a);return}var c=rqe(l,a,r);o.enable(c.controlType,c.opt),Dv(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var iqe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),KXe(i,r,{pan:pe(VM.pan,this),zoom:pe(VM.zoom,this),scrollMove:pe(VM.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){QXe(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(aj),VM={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=GM[t](null,[n.originX,n.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ql(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:IW(function(e,t,r,n,i,a){var o=GM[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:IW(function(e,t,r,n,i,a){var o=GM[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return o.signal*(e[1]-e[0])*a.scrollDelta})};function IW(e){return function(t,r,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,n,i);if(ql(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var GM={grid:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function iie(e){oj(e),e.registerComponentModel(qXe),e.registerComponentView(iqe),nqe(e)}var aqe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=cu(Cy.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:K.color.accent10,borderRadius:0,backgroundColor:K.color.transparent,dataBackground:{lineStyle:{color:K.color.accent30,width:.5},areaStyle:{color:K.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:K.color.accent40,width:.5},areaStyle:{color:K.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:K.color.neutral00,borderColor:K.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:K.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:K.color.tertiary},brushSelect:!0,brushStyle:{color:K.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:K.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(Cy),Zp=Ze,oqe=1,HM=30,sqe=7,Yp="horizontal",NW="vertical",lqe=5,uqe=["line","bar","candlestick","scatter"],cqe={easing:"cubicOut",duration:100,delay:0},fqe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=pe(this._onBrush,this),this._onBrushEnd=pe(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),Dv(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){cy(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new Ae;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?sqe:0,o=Or(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Yp?{right:o.width-s.x-s.width,top:o.height-HM-l-a,width:s.width,height:HM}:{right:l,top:s.y,width:HM,height:s.height},c=gf(r.option);j(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var f=Rt(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===NW&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Yp&&!o?{scaleY:l?1:-1,scaleX:1}:i===Yp&&o?{scaleY:l?1:-1,scaleX:-1}:i===NW&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Zp({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Zp({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:pe(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(r.thisDim),h=o.getDataExtent(l),d=(h[1]-h[0])*.3;h=[h[0]-d,h[1]+d];var v=[0,n[1]],g=[0,n[0]],m=[[n[0],0],[0,0]],y=[],_=g[1]/Math.max(1,o.count()-1),x=n[0]/(f[1]-f[0]),w=r.thisAxis.type==="time",S=-_,C=Math.round(o.count()/n[0]),M;o.each([r.thisDim,l],function(I,N,B){if(C>0&&B%C){w||(S+=_);return}S=w?(+I-f[0])*x:S+_;var F=N==null||isNaN(N)||N==="",$=F?0:vt(N,h,v,!0);F&&!M&&B?(m.push([m[m.length-1][0],0]),y.push([y[y.length-1][0],0])):!F&&M&&(m.push([S,0]),y.push([S,0])),F||(m.push([S,$]),y.push([S,$])),M=F}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var P=this.dataZoomModel;function k(I){var N=P.getModel(I?"selectedDataBackground":"dataBackground"),B=new Ae,F=new mn({shape:{points:u},segmentIgnoreThreshold:1,style:N.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),$=new en({shape:{points:c},segmentIgnoreThreshold:1,style:N.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return B.add(F),B.add($),B}for(var O=0;O<3;O++){var D=k(O===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();j(l,function(u){if(!i&&!(n!==!0&&$e(uqe,u.get("type"))<0)){var c=a.getComponent(Cl(o),s).axis,f=hqe(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var v=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:v,otherDim:f,otherAxisInverse:h}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new Zp({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Zp({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:oqe,fill:K.color.transparent}})),j([0,1],function(x){var w=l.get("handleIcon");!sw[w]&&w.indexOf("path://")<0&&w.indexOf("image://")<0&&(w="path://"+w);var S=vr(w,-1,0,2,2,null,!0);S.attr({cursor:dqe(this._orient),draggable:!0,drift:pe(this._onDragMove,this,x),ondragend:pe(this._onDragEnd,this),onmouseover:pe(this._showDataInfo,this,!0),onmouseout:pe(this._showDataInfo,this,!1),z2:5});var C=S.getBoundingRect(),M=l.get("handleSize");this._handleHeight=de(M,this._size[1]),this._handleWidth=C.width/C.height*this._handleHeight,S.setStyle(l.getModel("handleStyle").getItemStyle()),S.style.strokeNoScale=!0,S.rectHover=!0,S.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),zl(S);var P=l.get("handleColor");P!=null&&(S.style.fill=P),o.add(i[x]=S);var k=l.getModel("textStyle"),O=l.get("handleLabel")||{},D=O.show||!1;r.add(a[x]=new nt({silent:!0,invisible:!D,style:Ct(k,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:k.getTextColor(),font:k.getFont()}),z2:10}))},this);var d=h;if(f){var v=de(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new Ze({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:v}}),m=v*.8,y=n.moveHandleIcon=vr(l.get("moveHandleIcon"),-m/2,-m/2,m,m,K.color.neutral00,!0);y.silent=!0,y.y=s[1]+v/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(v,10));d=n.moveZone=new Ze({invisible:!0,shape:{y:s[1]-_,height:v+_}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(d)}d.attr({draggable:!0,cursor:"default",drift:pe(this._onDragMove,this,"all"),ondragstart:pe(this._showDataInfo,this,!0),ondragend:pe(this._onDragEnd,this),onmouseover:pe(this._showDataInfo,this,!0),onmouseout:pe(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[vt(r[0],[0,100],n,!0),vt(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ql(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?vt(s.minSpan,l,o,!0):null,s.maxSpan!=null?vt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=bi([vt(a[0],o,l,!0),vt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=bi(i.slice()),o=this._size;j([0,1],function(d){var v=n.handles[d],g=this._handleHeight;v.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;cn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new ke(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();ql(0,l,o,0,u.minSpan!=null?vt(u.minSpan,s,o,!0):null,u.maxSpan!=null?vt(u.maxSpan,s,o,!0):null),this._range=bi([vt(l[0],o,s,!0),vt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(Es(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Zp({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?cqe:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=zne(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},t.type="dataZoom.slider",t}(aj);function hqe(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function dqe(e){return e==="vertical"?"ns-resize":"ew-resize"}function aie(e){e.registerComponentModel(aqe),e.registerComponentView(fqe),oj(e)}function vqe(e){We(iie),We(aie)}var oie={get:function(e,t,r){var n=Ce((pqe[e]||{})[t]);return r&&ie(n)?n[n.length-1]:n}},pqe={color:{active:["#006edd","#e0ffff"],inactive:[K.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},RW=$r.mapVisual,gqe=$r.eachVisual,mqe=ie,jW=j,yqe=bi,_qe=vt,Vw=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&Xne(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=pe(r,this),this.controllerVisuals=yD(this.option.controller,n,r),this.targetVisuals=yD(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=bv(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return se(i,function(a){return a.componentIndex})},t.prototype.eachTargetSeries=function(r,n){j(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],ie(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(ve(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(Te(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=yqe([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Ve(a,i),Ve(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){mqe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,h,d){var v=f[h],g=f[d];v&&!g&&(g=f[d]={},jW(v,function(m,y){if($r.isValidType(y)){var _=oie.get(y,"inactive",s);_!=null&&(g[y]=_,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,v=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";jW(this.stateList,function(y){var _=this.itemSize,x=f[y];x||(x=f[y]={color:s?v:[v]}),x.symbol==null&&(x.symbol=h&&Ce(h)||(s?m:[m])),x.symbolSize==null&&(x.symbolSize=d&&Ce(d)||(s?_[0]:[_[0],_[0]])),x.symbol=RW(x.symbol,function(C){return C==="none"?m:C});var w=x.symbolSize;if(w!=null){var S=-1/0;gqe(w,function(C){C>S&&(S=C)}),x.symbolSize=RW(w,function(C){return _qe(C,[0,S],[0,_[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:K.color.transparent,borderColor:K.color.borderTint,contentColor:K.color.theme[0],inactiveColor:K.color.disabled,borderWidth:0,padding:K.size.m,textGap:10,precision:0,textStyle:{color:K.color.secondary}},t}(qe),BW=[20,140],xqe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=BW[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=BW[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):ie(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),j(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=bi((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=zW(this,"outOfRange",this.getExtent()),i=zW(this,"inRange",this.option.range.slice()),a=[];function o(d,v){a.push({value:d,color:r(d,v)})}for(var s=0,l=0,u=i.length,c=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new Ae(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);bqe([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=r[f];var d=ao(r[f],[0,l[1]],u,!0),v=this.getControllerVisual(d,"symbolSize");h.scaleX=h.scaleY=v/l[0],h.x=l[0]-v/2;var g=ja(i.handleLabelPoints[f],$l(h,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-v)/2:(l[0]-v)/-2;g[1]+=m}s[f].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",h),v=this.getControllerVisual(r,"symbolSize"),g=ao(r,s,u,!0),m=l[0]-v/2,y={x:f.x,y:f.y};f.y=g,f.x=m;var _=ja(c.indicatorLabelPoint,$l(f,this.group)),x=c.indicatorLabel;x.attr("invisible",!1);var w=this._applyTransform("left",c.mainGroup),S=this._orient,C=S==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:C?w:"middle",align:C?"center":w});var M={x:m,y:g,style:{fill:d}},P={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var k={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(M,k),x.animateTo(P,k)}else f.attr(M),x.attr(P);this._firstShowIndicator=!1;var O=this._shapes.handleLabels;if(O)for(var D=0;Do[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,d=[];(n||GW(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var v=ije(h,d);this._dispatchHighDown("downplay",ob(v[0],i)),this._dispatchHighDown("highlight",ob(v[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(_c(r.target,function(l){var u=Ee(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function Lqe(e,t,r,n){for(var i=t.targetVisuals[n],a=$r.prepareVisualTypes(i),o={color:a0(e.getData(),"color")},s=0,l=a.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(Aqe,Mqe),j(Pqe,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(kqe))}function cie(e){e.registerComponentModel(xqe),e.registerComponentView(Tqe),uie(e)}var Oqe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Dqe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=Ce(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=se(this._pieceList,function(l){return l=Ce(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=$r.listVisualTypes(),a=this.isCategory();j(r.pieces,function(s){j(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),j(n,function(s,l){var u=!1;j(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&j(this.stateList,function(c){(r[c]||(r[c]={}))[l]=oie.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,j(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;j(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=Ce(r)},t.prototype.getValueState=function(r){var n=$r.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=$r.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var d=r(h,f);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return j(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=cu(Vw.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(Vw),Dqe={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function ZW(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var Eqe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=Qr(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),j(l.viewPieceList,function(h){var d=h.piece,v=new Ae;v.onclick=pe(this._onItemClick,this,d),this._enableHoverLink(v,h.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(v,g,[0,0,s[0],s[1]],f),c){var m=this.visualMapModel.getValueState(g),y=a.get("align")||o;v.add(new nt({style:Ct(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:d.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:be(a.get("opacity"),m==="outOfRange"?.5:1)}),silent:f}))}r.add(v)},this),u&&this._renderEndsText(r,u[1],s,c,o),kc(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:ob(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return lie(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new Ae,l=this.visualMapModel.textStyleModel;s.add(new nt({style:Ct(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=se(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i,a){var o=vr(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=Ce(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,j(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(sie);function fie(e){e.registerComponentModel(Oqe),e.registerComponentView(Eqe),uie(e)}function Iqe(e){We(cie),We(fie)}var Nqe=function(){function e(t){this._thumbnailModel=t}return e.prototype.reset=function(t){this._renderVersion=t.getMainProcessVersion()},e.prototype.renderContent=function(t){var r=t.api.getViewOfComponentModel(this._thumbnailModel);r&&(t.group.silent=!0,r.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:NQ(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(t,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},e}(),Rqe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventAutoZ=!0,r}return t.prototype.optionUpdated=function(r,n){this._updateBridge()},t.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new Nqe(this);if(this._target=null,this.ecModel.eachSeries(function(i){y8(i,null)}),this.shouldShow()){var n=this.getTarget();y8(n.baseMapProvider,r)}},t.prototype.shouldShow=function(){return this.getShallow("show",!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},t.type="thumbnail",t.layoutMode="box",t.dependencies=["series","geo"],t.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:K.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:K.color.neutral30,borderColor:K.color.neutral40,opacity:.3},z:10},t}(qe),jqe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new bf),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||K.color.neutral00);var l=Or(r,i).refContainer,u=Rt(tJ(r,!0),l),c=s.lineWidth||0,f=this._contentRect=Kc(u.clone(),c/2,!0,!0),h=new Ae;a.add(h),h.setClipPath(new Ze({shape:f.plain()}));var d=this._targetGroup=new Ae;h.add(d);var v=u.plain();v.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new Ze({style:s,shape:v,silent:!1,cursor:"grab"}));var g=r.getModel("windowStyle"),m=g.getShallow("borderRadius",!0);h.add(this._windowRect=new Ze({shape:{x:0,y:0,width:0,height:0,r:m},style:g.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),XW(r,this)},t.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),XW(this._model,this))},t.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=Rt({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},t.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=sa([],r.targetTrans),i=Na([],this._coordSys.transform,n);this._transThisToTarget=sa([],i);var a=r.viewportRect;a?a=a.clone():a=new Oe(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(Me({r:s},a))}},t.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new xf(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",pe(this._onPan,this)).on("zoom",pe(this._onZoom,this))},t.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=ir([],[r.oldX,r.oldY],n),a=ir([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(YW(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},t.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=ir([],[r.originX,r.originY],n);this._api.dispatchAction(YW(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[1]}))}},t.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type="thumbnail",t}(Mt);function YW(e,t){var r=e.mainType==="series"?e.subType+"Roam":e.mainType+"Roam",n={type:r};return n[e.mainType+"Id"]=e.id,re(n,t),n}function XW(e,t){var r=Qc(e);xT(t.group,r.z,r.zlevel)}function Bqe(e){e.registerComponentModel(Rqe),e.registerComponentView(jqe)}var zqe={label:{enabled:!0},decal:{show:!1}},qW=Ke(),$qe={};function Fqe(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=Ce(zqe);Ve(n.label,e.getLocaleModel().get("aria"),!1),Ve(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=xe();e.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),qW(h).scope=d}}),e.eachRawSeries(function(h){if(e.isSeriesFiltered(h))return;if(Te(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var _=cO(h.ecModel,h.name,$qe,e.getSeriesCount()),x=d.getVisual("decal");d.setVisual("decal",w(x,_))}else{var v=h.getRawData(),g={},m=qW(h).scope;d.each(function(S){var C=d.getRawIndex(S);g[C]=S});var y=v.count();v.each(function(S){var C=g[S],M=v.getName(S)||S+"",P=cO(h.ecModel,M,m,y),k=d.getItemVisual(C,"decal");d.setItemVisual(C,"decal",w(k,P))})}function w(S,C){var M=S?re(re({},C),S):C;return M.dirty=!0,M}})}}function a(){var u=t.getZr().dom;if(u){var c=e.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=Me(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=e.getSeriesCount(),d=f.get(["data","maxCount"])||10,v=f.get(["series","maxCount"])||10,g=Math.min(h,v),m;if(!(h<1)){var y=s();if(y){var _=f.get(["general","withTitle"]);m=o(_,{title:y})}else m=f.get(["general","withoutTitle"]);var x=[],w=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(w,{seriesCount:h}),e.eachSeries(function(P,k){if(k1?f.get(["series","multiple",I]):f.get(["series","single",I]),O=o(O,{seriesId:P.seriesIndex,seriesName:P.get("name"),seriesType:l(P.subType)});var N=P.getData();if(N.count()>d){var B=f.get(["data","partialData"]);O+=o(B,{displayCnt:d})}else O+=f.get(["data","allData"]);for(var F=f.get(["data","separator","middle"]),$=f.get(["data","separator","end"]),G=f.get(["data","excludeDimensionId"]),z=[],U=0;U":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Hqe=function(){function e(t){var r=this._condVal=ve(t)?new RegExp(t):aK(t)?t:null;if(r==null){var n="";pt(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return ve(r)?this._condVal.test(t):it(r)?this._condVal.test(t+""):!1},e}(),Wqe=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),Uqe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r2&&n.push(i),i=[N,B]}function c(N,B,F,$){jh(N,F)&&jh(B,$)||i.push(N,B,F,$,F,$)}function f(N,B,F,$,G,z){var U=Math.abs(B-N),H=Math.tan(U/4)*4/3,Y=BP:D2&&n.push(i),n}function AD(e,t,r,n,i,a,o,s,l,u){if(jh(e,r)&&jh(t,n)&&jh(i,o)&&jh(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-e,d=s-t,v=Math.sqrt(h*h+d*d);h/=v,d/=v;var g=r-e,m=n-t,y=i-o,_=a-s,x=g*g+m*m,w=y*y+_*_;if(x=0&&P=0){l.push(o,s);return}var k=[],O=[];Zl(e,r,i,o,.5,k),Zl(t,n,a,s,.5,O),AD(k[0],O[0],k[1],O[1],k[2],O[2],k[3],O[3],l,u),AD(k[4],O[4],k[5],O[5],k[6],O[6],k[7],O[7],l,u)}function oKe(e,t){var r=CD(e),n=[];t=t||1;for(var i=0;i0)for(var u=0;uMath.abs(u),f=die([l,u],c?0:1,t),h=(c?s:u)/f.length,d=0;di,o=die([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=e[s]/o.length,h=0;h1?null:new ke(g*l+e,g*u+t)}function uKe(e,t,r){var n=new ke;ke.sub(n,r,t),n.normalize();var i=new ke;ke.sub(i,e,t);var a=i.dot(n);return a}function sh(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function cKe(e,t,r){for(var n=e.length,i=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),cKe(t,u,c)}function Gw(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);Gw(e,a[0],i,n),Gw(e,a[1],r-i,n)}return n}function fKe(e,t){for(var r=[],n=0;n0;u/=2){var c=0,f=0;(e&u)>0&&(c=1),(t&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function Uw(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=se(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=se(a,function(s,l){return{cp:s,z:xKe(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function gie(e){return vKe(e.path,e.count)}function MD(){return{fromIndividuals:[],toIndividuals:[],count:0}}function bKe(e,t,r){var n=[];function i(S){for(var C=0;C=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var SKe={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;aU(e)&&(u=e,c=t),aU(t)&&(u=t,c=e);function f(y,_,x,w,S){var C=y.many,M=y.one;if(C.length===1&&!S){var P=_?C[0]:M,k=_?M:C[0];if(Hw(P))f({many:[P],one:k},!0,x,w,!0);else{var O=s?Me({delay:s(x,w)},l):l;pj(P,k,O),a(P,k,P,k,O)}}else for(var D=Me({dividePath:SKe[r],individualDelay:s&&function(G,z,U,H){return s(G+x,w)}},l),I=_?bKe(C,M,D):wKe(M,C,D),N=I.fromIndividuals,B=I.toIndividuals,F=N.length,$=0;$t.length,d=u?oU(c,u):oU(h?t:e,[h?e:t]),v=0,g=0;gmie))for(var a=n.getIndices(),o=0;o0&&C.group.traverse(function(P){P instanceof et&&!P.animators.length&&P.animateFrom({style:{opacity:0}},M)})})}function fU(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function hU(e){return ie(e)?e.sort().join(","):e}function fl(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function kKe(e,t){var r=xe(),n=xe(),i=xe();return j(e.oldSeries,function(a,o){var s=e.oldDataGroupIds[o],l=e.oldData[o],u=fU(a),c=hU(u);n.set(c,{dataGroupId:s,data:l}),ie(u)&&j(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),j(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=fU(a),u=hU(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:fl(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:fl(s),data:s}]});else if(ie(l)){var f=[];j(l,function(v){var g=n.get(v);g.data&&f.push({dataGroupId:g.dataGroupId,divide:fl(g.data),data:g.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:fl(s)}]})}else{var h=i.get(l);if(h){var d=r.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:fl(h.data)}],newSeries:[]},r.set(h.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:fl(s)})}}}}),r}function dU(e,t){for(var r=0;r=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:fl(t.oldData[s]),groupIdDim:o.dimension})}),j(At(e.to),function(o){var s=dU(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:fl(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&yie(i,a,n)}function DKe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){j(At(n.seriesTransition),function(i){j(At(i.to),function(a){for(var o=n.updatedSeries,s=0;so.vmin?r+=o.vmin-n+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=t-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=t-n),r},e.prototype.unelapse=function(t){for(var r=vU,n=pU,i=!0,a=0,o=0;ol?a=s.vmin+(t-l)/(u-l)*(s.vmax-s.vmin):a=n+t-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+t-r),a},e}();function IKe(){return new EKe}var vU=0,pU=0;function NKe(e,t){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};j(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=gj(s,t);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(c&&f))if(c||f){var d=c?"S":"E";a[d][l.type].has=!0,a[d][l.type].span=h,a[d][l.type].inExtFrac=h/(s.vmax-s.vmin),a[d][l.type].val=l.val}else n[l.type].span+=h,n[l.type].val+=l.val}});var o=r*(0+(t[1]-t[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));j(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function RKe(e,t,r,n,i,a){e!=="no"&&j(r,function(o){var s=gj(o,a);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],c=n(u),f=i*3/4;c>s.vmin-f&&ct[0]&&r=0&&o<1-1e-5}j(e,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:Ce(o),vmin:t(o.start),vmax:t(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(ve(o.gap)){var u=xi(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=t(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&j(["vmin","vmax"],function(d){s[d]<0&&(s[d]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return j(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function mj(e,t){return LD(t)===LD(e)}function LD(e){return e.start+"_\0_"+e.end}function BKe(e,t,r){var n=[];j(e,function(a,o){var s=t(a);s&&s.type==="vmin"&&n.push([o])}),j(e,function(a,o){var s=t(a);if(s&&s.type==="vmax"){var l=su(n,function(u){return mj(t(e[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return j(n,function(a){a.length===2&&i.push(r?a:[e[a[0]],e[a[1]]])}),i}function zKe(e,t,r,n){var i,a;if(e.break){var o=e.break.parsedBreak,s=su(r,function(f){return mj(f.breakOption,e.break.parsedBreak.breakOption)}),l=n(Math.pow(t,o.vmin),s.vmin),u=n(Math.pow(t,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?hr(Math.pow(t,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:e.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[e.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function $Ke(e,t,r){var n={noNegative:!0},i=PD(e,r,n),a=PD(e,r,n),o=Math.log(t);return a.breaks=se(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var FKe={vmin:"start",vmax:"end"};function VKe(e,t){return t&&(e=e||{},e.break={type:FKe[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function GKe(){fBe({createScaleBreakContext:IKe,pruneTicksByBreak:RKe,addBreaksToTicks:jKe,parseAxisBreakOption:PD,identifyAxisBreak:mj,serializeAxisBreakIdentifier:LD,retrieveAxisBreakPairs:BKe,getTicksLogTransformBreak:zKe,logarithmicParseBreaksFromOption:$Ke,makeAxisLabelFormatterParamBreak:VKe})}var gU=Ke();function HKe(e,t){var r=su(e,function(n){return yr().identifyAxisBreak(n.parsedBreak.breakOption,t.breakOption)});return r||e.push(r={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),r}function WKe(e){j(e,function(t){return t.shouldRemove=!0})}function UKe(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function ZKe(e,t,r,n,i){var a=r.axis;if(a.scale.isBlank()||!yr())return;var o=yr().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(k){return k.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),h=s.get("zigzagZ"),d=s.getModel("itemStyle"),v=d.getItemStyle(),g=v.stroke,m=v.lineWidth,y=v.lineDash,_=v.fill,x=new Ae({ignoreModelZ:!0}),w=a.isHorizontal(),S=gU(t).visualList||(gU(t).visualList=[]);WKe(S);for(var C=function(k){var O=o[k][0].break.parsedBreak,D=[];D[0]=a.toGlobalCoord(a.dataToCoord(O.vmin,!0)),D[1]=a.toGlobalCoord(a.dataToCoord(O.vmax,!0)),D[1]=z;ge&&(J=z);var Fe=[],_e=[];Fe[$]=D,_e[$]=I,!ce&&!ge&&(Fe[$]+=Z?-l:l,_e[$]-=Z?l:-l),Fe[G]=J,_e[G]=J,H.push(Fe),Y.push(_e);var ne=void 0;if(ae_[1]&&_.reverse(),{coordPair:_,brkId:yr().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(m,y){return m.coordPair[0]-y.coordPair[0]});for(var u=o[0],c=null,f=0;f=0?l[0].width:l[1].width),h=(f+c.x)/2-u.x,d=Math.min(h,h-c.x),v=Math.max(h,h-c.x),g=v<0?v:d>0?d:0;s=(h-g)/c.x}var m=new ke,y=new ke;ke.scale(m,n,-s),ke.scale(y,n,1-s),kO(r[0],m),kO(r[1],y)}function qKe(e,t){var r={breaks:[]};return j(t.breaks,function(n){if(n){var i=su(e.get("breaks",!0),function(s){return yr().identifyAxisBreak(s,n)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===OT?!0:a===zte?!1:a===$te?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function KKe(){UVe({adjustBreakLabelPair:XKe,buildAxisBreakLine:YKe,rectCoordBuildBreakAxis:ZKe,updateModelAxisBreak:qKe})}function QKe(e){QVe(e),GKe(),KKe()}function JKe(){_6e(eQe)}function eQe(e,t){j(e,function(r){if(!r.model.get(["axisLabel","inside"])){var n=tQe(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);t[i]-=n[i]+a,r.position==="top"?t.y+=n.height+a:r.position==="left"&&(t.x+=n.width+a)}}})}function tQe(e){var t=e.model,r=e.scale;if(!t.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof Wd?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=Nv(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function yQe(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function _Qe(e){return e==="ROUTER"||e==="ROUTER_LATE"?30:e==="REPEATER"||e==="TRACKER"?25:e==="CLIENT_MUTE"?7:e==="CLIENT_BASE"?12:15}function xQe({nodes:e,edges:t,selectedNodeId:r,onSelectNode:n}){const i=W.useRef(null),[a,o]=W.useState("connected"),s=W.useMemo(()=>{const m=new Set;return t.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[t]),l=W.useMemo(()=>{let m=e;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>_U.includes(y.role))),m},[e,a,s]),u=W.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=W.useMemo(()=>t.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[t,u]),f=W.useMemo(()=>{const m=new Set;return r!==null&&c.forEach(y=>{y.from_node===r&&m.add(y.to_node),y.to_node===r&&m.add(y.from_node)}),m},[r,c]),h=W.useMemo(()=>{const m=l.map(_=>{const x=yQe(_.latitude),w=yU[x%yU.length],S=_U.includes(_.role),C=_.node_num===r,M=f.has(_.node_num),P=r===null||C||M;return{id:String(_.node_num),name:_.short_name,value:_.node_num,symbolSize:_Qe(_.role),itemStyle:{color:S?w:"#111827",borderColor:w,borderWidth:S?0:2,opacity:P?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:P?"#94a3b8":"#94a3b820"},nodeNum:_.node_num,longName:_.long_name,role:_.role}}),y=c.map(_=>{const x=r===null||_.from_node===r||_.to_node===r;return{source:String(_.from_node),target:String(_.to_node),value:_.snr,lineStyle:{color:mQe(_.snr),width:x&&r!==null?2:1,opacity:r===null?.4:x?.6:.04}}});return{nodes:m,links:y}},[l,c,r,f]),d=W.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:m=>{if(m.data&&m.data.longName){const y=m.data;return`${y.name}
${y.longName}
Role: ${y.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:h.nodes,links:h.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[h]),v=W.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=W.useMemo(()=>({click:v}),[v]);return W.useEffect(()=>{var y;const m=(y=i.current)==null?void 0:y.getEchartsInstance();m&&m.setOption(d,{notMerge:!1,lazyUpdate:!0})},[d]),T.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[T.jsx(gQe,{ref:i,option:d,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),T.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[T.jsx(DE,{size:14,className:"text-slate-500"}),T.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:y})=>T.jsx("button",{onClick:()=>o(m),className:`px-2 py-1 text-xs rounded transition-colors ${a===m?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:y},m))}),T.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),T.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[T.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),T.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(m=>T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),T.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),T.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[T.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),T.jsxs("div",{className:"space-y-2",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),T.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),T.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function bie(e,t){const r=W.useRef(t);W.useEffect(function(){t!==r.current&&e.attributionControl!=null&&(r.current!=null&&e.attributionControl.removeAttribution(r.current),t!=null&&e.attributionControl.addAttribution(t)),r.current=t},[e,t])}function bQe(e,t,r){t.center!==r.center&&e.setLatLng(t.center),t.radius!=null&&t.radius!==r.radius&&e.setRadius(t.radius)}const wQe=1;function SQe(e){return Object.freeze({__version:wQe,map:e})}function wie(e,t){return Object.freeze({...e,...t})}const Sie=W.createContext(null),Tie=Sie.Provider;function GT(){const e=W.useContext(Sie);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function TQe(e){function t(r,n){const{instance:i,context:a}=e(r).current;return W.useImperativeHandle(n,()=>i),r.children==null?null:Q.createElement(Tie,{value:a},r.children)}return W.forwardRef(t)}function CQe(e){function t(r,n){const[i,a]=W.useState(!1),{instance:o}=e(r,a).current;W.useImperativeHandle(n,()=>o),W.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?$9.createPortal(r.children,s):null}return W.forwardRef(t)}function AQe(e){function t(r,n){const{instance:i}=e(r).current;return W.useImperativeHandle(n,()=>i),null}return W.forwardRef(t)}function bj(e,t){const r=W.useRef();W.useEffect(function(){return t!=null&&e.instance.on(t),r.current=t,function(){r.current!=null&&e.instance.off(r.current),r.current=null}},[e,t])}function HT(e,t){const r=e.pane??t.pane;return r?{...e,pane:r}:e}function MQe(e,t){return function(n,i){const a=GT(),o=e(HT(n,a),a);return bie(a.map,n.attribution),bj(o.current,n.eventHandlers),t(o.current,a,n,i),o}}var DD={exports:{}};/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */(function(e,t){(function(r,n){n(t)})(Xp,function(r){var n="1.9.4";function i(p){var b,A,E,R;for(A=1,E=arguments.length;A"u"||!L||!L.Mixin)){p=x(p)?p:[p];for(var b=0;b0?Math.floor(p):Math.ceil(p)};z.prototype={clone:function(){return new z(this.x,this.y)},add:function(p){return this.clone()._add(H(p))},_add:function(p){return this.x+=p.x,this.y+=p.y,this},subtract:function(p){return this.clone()._subtract(H(p))},_subtract:function(p){return this.x-=p.x,this.y-=p.y,this},divideBy:function(p){return this.clone()._divideBy(p)},_divideBy:function(p){return this.x/=p,this.y/=p,this},multiplyBy:function(p){return this.clone()._multiplyBy(p)},_multiplyBy:function(p){return this.x*=p,this.y*=p,this},scaleBy:function(p){return new z(this.x*p.x,this.y*p.y)},unscaleBy:function(p){return new z(this.x/p.x,this.y/p.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=U(this.x),this.y=U(this.y),this},distanceTo:function(p){p=H(p);var b=p.x-this.x,A=p.y-this.y;return Math.sqrt(b*b+A*A)},equals:function(p){return p=H(p),p.x===this.x&&p.y===this.y},contains:function(p){return p=H(p),Math.abs(p.x)<=Math.abs(this.x)&&Math.abs(p.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}};function H(p,b,A){return p instanceof z?p:x(p)?new z(p[0],p[1]):p==null?p:typeof p=="object"&&"x"in p&&"y"in p?new z(p.x,p.y):new z(p,b,A)}function Y(p,b){if(p)for(var A=b?[p,b]:p,E=0,R=A.length;E=this.min.x&&A.x<=this.max.x&&b.y>=this.min.y&&A.y<=this.max.y},intersects:function(p){p=Z(p);var b=this.min,A=this.max,E=p.min,R=p.max,V=R.x>=b.x&&E.x<=A.x,X=R.y>=b.y&&E.y<=A.y;return V&&X},overlaps:function(p){p=Z(p);var b=this.min,A=this.max,E=p.min,R=p.max,V=R.x>b.x&&E.xb.y&&E.y=b.lat&&R.lat<=A.lat&&E.lng>=b.lng&&R.lng<=A.lng},intersects:function(p){p=ae(p);var b=this._southWest,A=this._northEast,E=p.getSouthWest(),R=p.getNorthEast(),V=R.lat>=b.lat&&E.lat<=A.lat,X=R.lng>=b.lng&&E.lng<=A.lng;return V&&X},overlaps:function(p){p=ae(p);var b=this._southWest,A=this._northEast,E=p.getSouthWest(),R=p.getNorthEast(),V=R.lat>b.lat&&E.latb.lng&&E.lng1,zie=function(){var p=!1;try{var b=Object.defineProperty({},"passive",{get:function(){p=!0}});window.addEventListener("testPassiveEventSupport",f,b),window.removeEventListener("testPassiveEventSupport",f,b)}catch{}return p}(),$ie=function(){return!!document.createElement("canvas").getContext}(),ZT=!!(document.createElementNS&&ze("svg").createSVGRect),Fie=!!ZT&&function(){var p=document.createElement("div");return p.innerHTML="",(p.firstChild&&p.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Vie=!ZT&&function(){try{var p=document.createElement("div");p.innerHTML='';var b=p.firstChild;return b.style.behavior="url(#default#VML)",b&&typeof b.adj=="object"}catch{return!1}}(),Gie=navigator.platform.indexOf("Mac")===0,Hie=navigator.platform.indexOf("Linux")===0;function Ua(p){return navigator.userAgent.toLowerCase().indexOf(p)>=0}var He={ie:Bt,ielt9:Jt,edge:On,webkit:Wr,android:Yn,android23:Sf,androidStock:p0,opera:WT,chrome:Cj,gecko:Aj,safari:kie,phantom:Mj,opera12:Pj,win:Oie,ie3d:Lj,webkit3d:UT,gecko3d:kj,any3d:Die,mobile:$v,mobileWebkit:Eie,mobileWebkit3d:Iie,msPointer:Oj,pointer:Dj,touch:Nie,touchNative:Ej,mobileOpera:Rie,mobileGecko:jie,retina:Bie,passiveEvents:zie,canvas:$ie,svg:ZT,vml:Vie,inlineSvg:Fie,mac:Gie,linux:Hie},Ij=He.msPointer?"MSPointerDown":"pointerdown",Nj=He.msPointer?"MSPointerMove":"pointermove",Rj=He.msPointer?"MSPointerUp":"pointerup",jj=He.msPointer?"MSPointerCancel":"pointercancel",YT={touchstart:Ij,touchmove:Nj,touchend:Rj,touchcancel:jj},Bj={touchstart:qie,touchmove:g0,touchend:g0,touchcancel:g0},Tf={},zj=!1;function Wie(p,b,A){return b==="touchstart"&&Xie(),Bj[b]?(A=Bj[b].bind(this,A),p.addEventListener(YT[b],A,!1),A):(console.warn("wrong event specified:",b),f)}function Uie(p,b,A){if(!YT[b]){console.warn("wrong event specified:",b);return}p.removeEventListener(YT[b],A,!1)}function Zie(p){Tf[p.pointerId]=p}function Yie(p){Tf[p.pointerId]&&(Tf[p.pointerId]=p)}function $j(p){delete Tf[p.pointerId]}function Xie(){zj||(document.addEventListener(Ij,Zie,!0),document.addEventListener(Nj,Yie,!0),document.addEventListener(Rj,$j,!0),document.addEventListener(jj,$j,!0),zj=!0)}function g0(p,b){if(b.pointerType!==(b.MSPOINTER_TYPE_MOUSE||"mouse")){b.touches=[];for(var A in Tf)b.touches.push(Tf[A]);b.changedTouches=[b],p(b)}}function qie(p,b){b.MSPOINTER_TYPE_TOUCH&&b.pointerType===b.MSPOINTER_TYPE_TOUCH&&nn(b),g0(p,b)}function Kie(p){var b={},A,E;for(E in p)A=p[E],b[E]=A&&A.bind?A.bind(p):A;return p=b,b.type="dblclick",b.detail=2,b.isTrusted=!1,b._simulated=!0,b}var Qie=200;function Jie(p,b){p.addEventListener("dblclick",b);var A=0,E;function R(V){if(V.detail!==1){E=V.detail;return}if(!(V.pointerType==="mouse"||V.sourceCapabilities&&!V.sourceCapabilities.firesTouchEvents)){var X=Wj(V);if(!(X.some(function(oe){return oe instanceof HTMLLabelElement&&oe.attributes.for})&&!X.some(function(oe){return oe instanceof HTMLInputElement||oe instanceof HTMLSelectElement}))){var te=Date.now();te-A<=Qie?(E++,E===2&&b(Kie(V))):E=1,A=te}}}return p.addEventListener("click",R),{dblclick:b,simDblclick:R}}function eae(p,b){p.removeEventListener("dblclick",b.dblclick),p.removeEventListener("click",b.simDblclick)}var XT=_0(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Fv=_0(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Fj=Fv==="webkitTransition"||Fv==="OTransition"?Fv+"End":"transitionend";function Vj(p){return typeof p=="string"?document.getElementById(p):p}function Vv(p,b){var A=p.style[b]||p.currentStyle&&p.currentStyle[b];if((!A||A==="auto")&&document.defaultView){var E=document.defaultView.getComputedStyle(p,null);A=E?E[b]:null}return A==="auto"?null:A}function wt(p,b,A){var E=document.createElement(p);return E.className=b||"",A&&A.appendChild(E),E}function er(p){var b=p.parentNode;b&&b.removeChild(p)}function m0(p){for(;p.firstChild;)p.removeChild(p.firstChild)}function Cf(p){var b=p.parentNode;b&&b.lastChild!==p&&b.appendChild(p)}function Af(p){var b=p.parentNode;b&&b.firstChild!==p&&b.insertBefore(p,b.firstChild)}function qT(p,b){if(p.classList!==void 0)return p.classList.contains(b);var A=y0(p);return A.length>0&&new RegExp("(^|\\s)"+b+"(\\s|$)").test(A)}function st(p,b){if(p.classList!==void 0)for(var A=v(b),E=0,R=A.length;E0?2*window.devicePixelRatio:1;function Zj(p){return He.edge?p.wheelDeltaY/2:p.deltaY&&p.deltaMode===0?-p.deltaY/nae:p.deltaY&&p.deltaMode===1?-p.deltaY*20:p.deltaY&&p.deltaMode===2?-p.deltaY*60:p.deltaX||p.deltaZ?0:p.wheelDelta?(p.wheelDeltaY||p.wheelDelta)/2:p.detail&&Math.abs(p.detail)<32765?-p.detail*20:p.detail?p.detail/-32765*60:0}function lC(p,b){var A=b.relatedTarget;if(!A)return!0;try{for(;A&&A!==p;)A=A.parentNode}catch{return!1}return A!==p}var iae={__proto__:null,on:at,off:Ft,stopPropagation:pu,disableScrollPropagation:sC,disableClickPropagation:Uv,preventDefault:nn,stop:gu,getPropagationPath:Wj,getMousePosition:Uj,getWheelDelta:Zj,isExternalTarget:lC,addListener:at,removeListener:Ft},Yj=G.extend({run:function(p,b,A,E){this.stop(),this._el=p,this._inProgress=!0,this._duration=A||.25,this._easeOutPower=1/Math.max(E||.5,.2),this._startPos=vu(p),this._offset=b.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=D(this._animate,this),this._step()},_step:function(p){var b=+new Date-this._startTime,A=this._duration*1e3;bthis.options.maxZoom)?this.setZoom(p):this},panInsideBounds:function(p,b){this._enforcingBounds=!0;var A=this.getCenter(),E=this._limitCenter(A,this._zoom,ae(p));return A.equals(E)||this.panTo(E,b),this._enforcingBounds=!1,this},panInside:function(p,b){b=b||{};var A=H(b.paddingTopLeft||b.padding||[0,0]),E=H(b.paddingBottomRight||b.padding||[0,0]),R=this.project(this.getCenter()),V=this.project(p),X=this.getPixelBounds(),te=Z([X.min.add(A),X.max.subtract(E)]),oe=te.getSize();if(!te.contains(V)){this._enforcingBounds=!0;var he=V.subtract(te.getCenter()),De=te.extend(V).getSize().subtract(oe);R.x+=he.x<0?-De.x:De.x,R.y+=he.y<0?-De.y:De.y,this.panTo(this.unproject(R),b),this._enforcingBounds=!1}return this},invalidateSize:function(p){if(!this._loaded)return this;p=i({animate:!1,pan:!0},p===!0?{animate:!0}:p);var b=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var A=this.getSize(),E=b.divideBy(2).round(),R=A.divideBy(2).round(),V=E.subtract(R);return!V.x&&!V.y?this:(p.animate&&p.pan?this.panBy(V):(p.pan&&this._rawPanBy(V),this.fire("move"),p.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:b,newSize:A}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(p){if(p=this._locateOptions=i({timeout:1e4,watch:!1},p),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var b=o(this._handleGeolocationResponse,this),A=o(this._handleGeolocationError,this);return p.watch?this._locationWatchId=navigator.geolocation.watchPosition(b,A,p):navigator.geolocation.getCurrentPosition(b,A,p),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(p){if(this._container._leaflet_id){var b=p.code,A=p.message||(b===1?"permission denied":b===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:b,message:"Geolocation error: "+A+"."})}},_handleGeolocationResponse:function(p){if(this._container._leaflet_id){var b=p.coords.latitude,A=p.coords.longitude,E=new ce(b,A),R=E.toBounds(p.coords.accuracy*2),V=this._locateOptions;if(V.setView){var X=this.getBoundsZoom(R);this.setView(E,V.maxZoom?Math.min(X,V.maxZoom):X)}var te={latlng:E,bounds:R,timestamp:p.timestamp};for(var oe in p.coords)typeof p.coords[oe]=="number"&&(te[oe]=p.coords[oe]);this.fire("locationfound",te)}},addHandler:function(p,b){if(!b)return this;var A=this[p]=new b(this);return this._handlers.push(A),this.options[p]&&A.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),er(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(I(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var p;for(p in this._layers)this._layers[p].remove();for(p in this._panes)er(this._panes[p]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(p,b){var A="leaflet-pane"+(p?" leaflet-"+p.replace("Pane","")+"-pane":""),E=wt("div",A,b||this._mapPane);return p&&(this._panes[p]=E),E},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var p=this.getPixelBounds(),b=this.unproject(p.getBottomLeft()),A=this.unproject(p.getTopRight());return new J(b,A)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(p,b,A){p=ae(p),A=H(A||[0,0]);var E=this.getZoom()||0,R=this.getMinZoom(),V=this.getMaxZoom(),X=p.getNorthWest(),te=p.getSouthEast(),oe=this.getSize().subtract(A),he=Z(this.project(te,E),this.project(X,E)).getSize(),De=He.any3d?this.options.zoomSnap:1,Qe=oe.x/he.x,dt=oe.y/he.y,Dn=b?Math.max(Qe,dt):Math.min(Qe,dt);return E=this.getScaleZoom(Dn,E),De&&(E=Math.round(E/(De/100))*(De/100),E=b?Math.ceil(E/De)*De:Math.floor(E/De)*De),Math.max(R,Math.min(V,E))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(p,b){var A=this._getTopLeftPoint(p,b);return new Y(A,A.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(p){return this.options.crs.getProjectedBounds(p===void 0?this.getZoom():p)},getPane:function(p){return typeof p=="string"?this._panes[p]:p},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(p,b){var A=this.options.crs;return b=b===void 0?this._zoom:b,A.scale(p)/A.scale(b)},getScaleZoom:function(p,b){var A=this.options.crs;b=b===void 0?this._zoom:b;var E=A.zoom(p*A.scale(b));return isNaN(E)?1/0:E},project:function(p,b){return b=b===void 0?this._zoom:b,this.options.crs.latLngToPoint(ge(p),b)},unproject:function(p,b){return b=b===void 0?this._zoom:b,this.options.crs.pointToLatLng(H(p),b)},layerPointToLatLng:function(p){var b=H(p).add(this.getPixelOrigin());return this.unproject(b)},latLngToLayerPoint:function(p){var b=this.project(ge(p))._round();return b._subtract(this.getPixelOrigin())},wrapLatLng:function(p){return this.options.crs.wrapLatLng(ge(p))},wrapLatLngBounds:function(p){return this.options.crs.wrapLatLngBounds(ae(p))},distance:function(p,b){return this.options.crs.distance(ge(p),ge(b))},containerPointToLayerPoint:function(p){return H(p).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(p){return H(p).add(this._getMapPanePos())},containerPointToLatLng:function(p){var b=this.containerPointToLayerPoint(H(p));return this.layerPointToLatLng(b)},latLngToContainerPoint:function(p){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ge(p)))},mouseEventToContainerPoint:function(p){return Uj(p,this._container)},mouseEventToLayerPoint:function(p){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(p))},mouseEventToLatLng:function(p){return this.layerPointToLatLng(this.mouseEventToLayerPoint(p))},_initContainer:function(p){var b=this._container=Vj(p);if(b){if(b._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");at(b,"scroll",this._onScroll,this),this._containerId=l(b)},_initLayout:function(){var p=this._container;this._fadeAnimated=this.options.fadeAnimation&&He.any3d,st(p,"leaflet-container"+(He.touch?" leaflet-touch":"")+(He.retina?" leaflet-retina":"")+(He.ielt9?" leaflet-oldie":"")+(He.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var b=Vv(p,"position");b!=="absolute"&&b!=="relative"&&b!=="fixed"&&b!=="sticky"&&(p.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var p=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),br(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(st(p.markerPane,"leaflet-zoom-hide"),st(p.shadowPane,"leaflet-zoom-hide"))},_resetView:function(p,b,A){br(this._mapPane,new z(0,0));var E=!this._loaded;this._loaded=!0,b=this._limitZoom(b),this.fire("viewprereset");var R=this._zoom!==b;this._moveStart(R,A)._move(p,b)._moveEnd(R),this.fire("viewreset"),E&&this.fire("load")},_moveStart:function(p,b){return p&&this.fire("zoomstart"),b||this.fire("movestart"),this},_move:function(p,b,A,E){b===void 0&&(b=this._zoom);var R=this._zoom!==b;return this._zoom=b,this._lastCenter=p,this._pixelOrigin=this._getNewPixelOrigin(p),E?A&&A.pinch&&this.fire("zoom",A):((R||A&&A.pinch)&&this.fire("zoom",A),this.fire("move",A)),this},_moveEnd:function(p){return p&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return I(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(p){br(this._mapPane,this._getMapPanePos().subtract(p))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(p){this._targets={},this._targets[l(this._container)]=this;var b=p?Ft:at;b(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&b(window,"resize",this._onResize,this),He.any3d&&this.options.transform3DLimit&&(p?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){I(this._resizeRequest),this._resizeRequest=D(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var p=this._getMapPanePos();Math.max(Math.abs(p.x),Math.abs(p.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(p,b){for(var A=[],E,R=b==="mouseout"||b==="mouseover",V=p.target||p.srcElement,X=!1;V;){if(E=this._targets[l(V)],E&&(b==="click"||b==="preclick")&&this._draggableMoved(E)){X=!0;break}if(E&&E.listens(b,!0)&&(R&&!lC(V,p)||(A.push(E),R))||V===this._container)break;V=V.parentNode}return!A.length&&!X&&!R&&this.listens(b,!0)&&(A=[this]),A},_isClickDisabled:function(p){for(;p&&p!==this._container;){if(p._leaflet_disable_click)return!0;p=p.parentNode}},_handleDOMEvent:function(p){var b=p.target||p.srcElement;if(!(!this._loaded||b._leaflet_disable_events||p.type==="click"&&this._isClickDisabled(b))){var A=p.type;A==="mousedown"&&rC(b),this._fireDOMEvent(p,A)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(p,b,A){if(p.type==="click"){var E=i({},p);E.type="preclick",this._fireDOMEvent(E,E.type,A)}var R=this._findEventTargets(p,b);if(A){for(var V=[],X=0;X0?Math.round(p-b)/2:Math.max(0,Math.ceil(p))-Math.max(0,Math.floor(b))},_limitZoom:function(p){var b=this.getMinZoom(),A=this.getMaxZoom(),E=He.any3d?this.options.zoomSnap:1;return E&&(p=Math.round(p/E)*E),Math.max(b,Math.min(A,p))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){pr(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(p,b){var A=this._getCenterOffset(p)._trunc();return(b&&b.animate)!==!0&&!this.getSize().contains(A)?!1:(this.panBy(A,b),!0)},_createAnimProxy:function(){var p=this._proxy=wt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(p),this.on("zoomanim",function(b){var A=XT,E=this._proxy.style[A];du(this._proxy,this.project(b.center,b.zoom),this.getZoomScale(b.zoom,1)),E===this._proxy.style[A]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){er(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var p=this.getCenter(),b=this.getZoom();du(this._proxy,this.project(p,b),this.getZoomScale(b,1))},_catchTransitionEnd:function(p){this._animatingZoom&&p.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(p,b,A){if(this._animatingZoom)return!0;if(A=A||{},!this._zoomAnimated||A.animate===!1||this._nothingToAnimate()||Math.abs(b-this._zoom)>this.options.zoomAnimationThreshold)return!1;var E=this.getZoomScale(b),R=this._getCenterOffset(p)._divideBy(1-1/E);return A.animate!==!0&&!this.getSize().contains(R)?!1:(D(function(){this._moveStart(!0,A.noMoveStart||!1)._animateZoom(p,b,!0)},this),!0)},_animateZoom:function(p,b,A,E){this._mapPane&&(A&&(this._animatingZoom=!0,this._animateToCenter=p,this._animateToZoom=b,st(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:p,zoom:b,noUpdate:E}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&pr(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function aae(p,b){return new _t(p,b)}var pa=B.extend({options:{position:"topright"},initialize:function(p){g(this,p)},getPosition:function(){return this.options.position},setPosition:function(p){var b=this._map;return b&&b.removeControl(this),this.options.position=p,b&&b.addControl(this),this},getContainer:function(){return this._container},addTo:function(p){this.remove(),this._map=p;var b=this._container=this.onAdd(p),A=this.getPosition(),E=p._controlCorners[A];return st(b,"leaflet-control"),A.indexOf("bottom")!==-1?E.insertBefore(b,E.firstChild):E.appendChild(b),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(er(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(p){this._map&&p&&p.screenX>0&&p.screenY>0&&this._map.getContainer().focus()}}),Zv=function(p){return new pa(p)};_t.include({addControl:function(p){return p.addTo(this),this},removeControl:function(p){return p.remove(),this},_initControlPos:function(){var p=this._controlCorners={},b="leaflet-",A=this._controlContainer=wt("div",b+"control-container",this._container);function E(R,V){var X=b+R+" "+b+V;p[R+V]=wt("div",X,A)}E("top","left"),E("top","right"),E("bottom","left"),E("bottom","right")},_clearControlPos:function(){for(var p in this._controlCorners)er(this._controlCorners[p]);er(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Xj=pa.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(p,b,A,E){return A1,this._baseLayersList.style.display=p?"":"none"),this._separator.style.display=b&&p?"":"none",this},_onLayerChange:function(p){this._handlingClick||this._update();var b=this._getLayer(l(p.target)),A=b.overlay?p.type==="add"?"overlayadd":"overlayremove":p.type==="add"?"baselayerchange":null;A&&this._map.fire(A,b)},_createRadioElement:function(p,b){var A='",E=document.createElement("div");return E.innerHTML=A,E.firstChild},_addItem:function(p){var b=document.createElement("label"),A=this._map.hasLayer(p.layer),E;p.overlay?(E=document.createElement("input"),E.type="checkbox",E.className="leaflet-control-layers-selector",E.defaultChecked=A):E=this._createRadioElement("leaflet-base-layers_"+l(this),A),this._layerControlInputs.push(E),E.layerId=l(p.layer),at(E,"click",this._onInputClick,this);var R=document.createElement("span");R.innerHTML=" "+p.name;var V=document.createElement("span");b.appendChild(V),V.appendChild(E),V.appendChild(R);var X=p.overlay?this._overlaysList:this._baseLayersList;return X.appendChild(b),this._checkDisabledLayers(),b},_onInputClick:function(){if(!this._preventClick){var p=this._layerControlInputs,b,A,E=[],R=[];this._handlingClick=!0;for(var V=p.length-1;V>=0;V--)b=p[V],A=this._getLayer(b.layerId).layer,b.checked?E.push(A):b.checked||R.push(A);for(V=0;V=0;R--)b=p[R],A=this._getLayer(b.layerId).layer,b.disabled=A.options.minZoom!==void 0&&EA.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var p=this._section;this._preventClick=!0,at(p,"click",nn),this.expand();var b=this;setTimeout(function(){Ft(p,"click",nn),b._preventClick=!1})}}),oae=function(p,b,A){return new Xj(p,b,A)},uC=pa.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(p){var b="leaflet-control-zoom",A=wt("div",b+" leaflet-bar"),E=this.options;return this._zoomInButton=this._createButton(E.zoomInText,E.zoomInTitle,b+"-in",A,this._zoomIn),this._zoomOutButton=this._createButton(E.zoomOutText,E.zoomOutTitle,b+"-out",A,this._zoomOut),this._updateDisabled(),p.on("zoomend zoomlevelschange",this._updateDisabled,this),A},onRemove:function(p){p.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(p){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(p.shiftKey?3:1))},_createButton:function(p,b,A,E,R){var V=wt("a",A,E);return V.innerHTML=p,V.href="#",V.title=b,V.setAttribute("role","button"),V.setAttribute("aria-label",b),Uv(V),at(V,"click",gu),at(V,"click",R,this),at(V,"click",this._refocusOnMap,this),V},_updateDisabled:function(){var p=this._map,b="leaflet-disabled";pr(this._zoomInButton,b),pr(this._zoomOutButton,b),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||p._zoom===p.getMinZoom())&&(st(this._zoomOutButton,b),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||p._zoom===p.getMaxZoom())&&(st(this._zoomInButton,b),this._zoomInButton.setAttribute("aria-disabled","true"))}});_t.mergeOptions({zoomControl:!0}),_t.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new uC,this.addControl(this.zoomControl))});var sae=function(p){return new uC(p)},qj=pa.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(p){var b="leaflet-control-scale",A=wt("div",b),E=this.options;return this._addScales(E,b+"-line",A),p.on(E.updateWhenIdle?"moveend":"move",this._update,this),p.whenReady(this._update,this),A},onRemove:function(p){p.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(p,b,A){p.metric&&(this._mScale=wt("div",b,A)),p.imperial&&(this._iScale=wt("div",b,A))},_update:function(){var p=this._map,b=p.getSize().y/2,A=p.distance(p.containerPointToLatLng([0,b]),p.containerPointToLatLng([this.options.maxWidth,b]));this._updateScales(A)},_updateScales:function(p){this.options.metric&&p&&this._updateMetric(p),this.options.imperial&&p&&this._updateImperial(p)},_updateMetric:function(p){var b=this._getRoundNum(p),A=b<1e3?b+" m":b/1e3+" km";this._updateScale(this._mScale,A,b/p)},_updateImperial:function(p){var b=p*3.2808399,A,E,R;b>5280?(A=b/5280,E=this._getRoundNum(A),this._updateScale(this._iScale,E+" mi",E/A)):(R=this._getRoundNum(b),this._updateScale(this._iScale,R+" ft",R/b))},_updateScale:function(p,b,A){p.style.width=Math.round(this.options.maxWidth*A)+"px",p.innerHTML=b},_getRoundNum:function(p){var b=Math.pow(10,(Math.floor(p)+"").length-1),A=p/b;return A=A>=10?10:A>=5?5:A>=3?3:A>=2?2:1,b*A}}),lae=function(p){return new qj(p)},uae='',cC=pa.extend({options:{position:"bottomright",prefix:''+(He.inlineSvg?uae+" ":"")+"Leaflet"},initialize:function(p){g(this,p),this._attributions={}},onAdd:function(p){p.attributionControl=this,this._container=wt("div","leaflet-control-attribution"),Uv(this._container);for(var b in p._layers)p._layers[b].getAttribution&&this.addAttribution(p._layers[b].getAttribution());return this._update(),p.on("layeradd",this._addAttribution,this),this._container},onRemove:function(p){p.off("layeradd",this._addAttribution,this)},_addAttribution:function(p){p.layer.getAttribution&&(this.addAttribution(p.layer.getAttribution()),p.layer.once("remove",function(){this.removeAttribution(p.layer.getAttribution())},this))},setPrefix:function(p){return this.options.prefix=p,this._update(),this},addAttribution:function(p){return p?(this._attributions[p]||(this._attributions[p]=0),this._attributions[p]++,this._update(),this):this},removeAttribution:function(p){return p?(this._attributions[p]&&(this._attributions[p]--,this._update()),this):this},_update:function(){if(this._map){var p=[];for(var b in this._attributions)this._attributions[b]&&p.push(b);var A=[];this.options.prefix&&A.push(this.options.prefix),p.length&&A.push(p.join(", ")),this._container.innerHTML=A.join(' ')}}});_t.mergeOptions({attributionControl:!0}),_t.addInitHook(function(){this.options.attributionControl&&new cC().addTo(this)});var cae=function(p){return new cC(p)};pa.Layers=Xj,pa.Zoom=uC,pa.Scale=qj,pa.Attribution=cC,Zv.layers=oae,Zv.zoom=sae,Zv.scale=lae,Zv.attribution=cae;var Ya=B.extend({initialize:function(p){this._map=p},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ya.addTo=function(p,b){return p.addHandler(b,this),this};var fae={Events:$},Kj=He.touch?"touchstart mousedown":"mousedown",Zs=G.extend({options:{clickTolerance:3},initialize:function(p,b,A,E){g(this,E),this._element=p,this._dragStartTarget=b||p,this._preventOutline=A},enable:function(){this._enabled||(at(this._dragStartTarget,Kj,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Zs._dragging===this&&this.finishDrag(!0),Ft(this._dragStartTarget,Kj,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(p){if(this._enabled&&(this._moved=!1,!qT(this._element,"leaflet-zoom-anim"))){if(p.touches&&p.touches.length!==1){Zs._dragging===this&&this.finishDrag();return}if(!(Zs._dragging||p.shiftKey||p.which!==1&&p.button!==1&&!p.touches)&&(Zs._dragging=this,this._preventOutline&&rC(this._element),JT(),Gv(),!this._moving)){this.fire("down");var b=p.touches?p.touches[0]:p,A=Gj(this._element);this._startPoint=new z(b.clientX,b.clientY),this._startPos=vu(this._element),this._parentScale=nC(A);var E=p.type==="mousedown";at(document,E?"mousemove":"touchmove",this._onMove,this),at(document,E?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(p){if(this._enabled){if(p.touches&&p.touches.length>1){this._moved=!0;return}var b=p.touches&&p.touches.length===1?p.touches[0]:p,A=new z(b.clientX,b.clientY)._subtract(this._startPoint);!A.x&&!A.y||Math.abs(A.x)+Math.abs(A.y)V&&(X=te,V=oe);V>A&&(b[X]=1,hC(p,b,A,E,X),hC(p,b,A,X,R))}function pae(p,b){for(var A=[p[0]],E=1,R=0,V=p.length;Eb&&(A.push(p[E]),R=E);return Rb.max.x&&(A|=2),p.yb.max.y&&(A|=8),A}function gae(p,b){var A=b.x-p.x,E=b.y-p.y;return A*A+E*E}function Yv(p,b,A,E){var R=b.x,V=b.y,X=A.x-R,te=A.y-V,oe=X*X+te*te,he;return oe>0&&(he=((p.x-R)*X+(p.y-V)*te)/oe,he>1?(R=A.x,V=A.y):he>0&&(R+=X*he,V+=te*he)),X=p.x-R,te=p.y-V,E?X*X+te*te:new z(R,V)}function Di(p){return!x(p[0])||typeof p[0][0]!="object"&&typeof p[0][0]<"u"}function i5(p){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Di(p)}function a5(p,b){var A,E,R,V,X,te,oe,he;if(!p||p.length===0)throw new Error("latlngs not passed");Di(p)||(console.warn("latlngs are not flat! Only the first ring will be used"),p=p[0]);var De=ge([0,0]),Qe=ae(p),dt=Qe.getNorthWest().distanceTo(Qe.getSouthWest())*Qe.getNorthEast().distanceTo(Qe.getNorthWest());dt<1700&&(De=fC(p));var Dn=p.length,Ur=[];for(A=0;AE){oe=(V-E)/R,he=[te.x-oe*(te.x-X.x),te.y-oe*(te.y-X.y)];break}var Xn=b.unproject(H(he));return ge([Xn.lat+De.lat,Xn.lng+De.lng])}var mae={__proto__:null,simplify:e5,pointToSegmentDistance:t5,closestPointOnSegment:dae,clipSegment:n5,_getEdgeIntersection:w0,_getBitCode:mu,_sqClosestPointOnSegment:Yv,isFlat:Di,_flat:i5,polylineCenter:a5},dC={project:function(p){return new z(p.lng,p.lat)},unproject:function(p){return new ce(p.y,p.x)},bounds:new Y([-180,-90],[180,90])},vC={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Y([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(p){var b=Math.PI/180,A=this.R,E=p.lat*b,R=this.R_MINOR/A,V=Math.sqrt(1-R*R),X=V*Math.sin(E),te=Math.tan(Math.PI/4-E/2)/Math.pow((1-X)/(1+X),V/2);return E=-A*Math.log(Math.max(te,1e-10)),new z(p.lng*b*A,E)},unproject:function(p){for(var b=180/Math.PI,A=this.R,E=this.R_MINOR/A,R=Math.sqrt(1-E*E),V=Math.exp(-p.y/A),X=Math.PI/2-2*Math.atan(V),te=0,oe=.1,he;te<15&&Math.abs(oe)>1e-7;te++)he=R*Math.sin(X),he=Math.pow((1-he)/(1+he),R/2),oe=Math.PI/2-2*Math.atan(V*he)-X,X+=oe;return new ce(X*b,p.x*b/A)}},yae={__proto__:null,LonLat:dC,Mercator:vC,SphericalMercator:fe},_ae=i({},_e,{code:"EPSG:3395",projection:vC,transformation:function(){var p=.5/(Math.PI*vC.R);return ee(p,.5,-p,.5)}()}),o5=i({},_e,{code:"EPSG:4326",projection:dC,transformation:ee(1/180,1,-1/180,.5)}),xae=i({},Fe,{projection:dC,transformation:ee(1,0,-1,0),scale:function(p){return Math.pow(2,p)},zoom:function(p){return Math.log(p)/Math.LN2},distance:function(p,b){var A=b.lng-p.lng,E=b.lat-p.lat;return Math.sqrt(A*A+E*E)},infinite:!0});Fe.Earth=_e,Fe.EPSG3395=_ae,Fe.EPSG3857=Be,Fe.EPSG900913=Se,Fe.EPSG4326=o5,Fe.Simple=xae;var ga=G.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(p){return p.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(p){return p&&p.removeLayer(this),this},getPane:function(p){return this._map.getPane(p?this.options[p]||p:this.options.pane)},addInteractiveTarget:function(p){return this._map._targets[l(p)]=this,this},removeInteractiveTarget:function(p){return delete this._map._targets[l(p)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(p){var b=p.target;if(b.hasLayer(this)){if(this._map=b,this._zoomAnimated=b._zoomAnimated,this.getEvents){var A=this.getEvents();b.on(A,this),this.once("remove",function(){b.off(A,this)},this)}this.onAdd(b),this.fire("add"),b.fire("layeradd",{layer:this})}}});_t.include({addLayer:function(p){if(!p._layerAdd)throw new Error("The provided object is not a Layer.");var b=l(p);return this._layers[b]?this:(this._layers[b]=p,p._mapToAdd=this,p.beforeAdd&&p.beforeAdd(this),this.whenReady(p._layerAdd,p),this)},removeLayer:function(p){var b=l(p);return this._layers[b]?(this._loaded&&p.onRemove(this),delete this._layers[b],this._loaded&&(this.fire("layerremove",{layer:p}),p.fire("remove")),p._map=p._mapToAdd=null,this):this},hasLayer:function(p){return l(p)in this._layers},eachLayer:function(p,b){for(var A in this._layers)p.call(b,this._layers[A]);return this},_addLayers:function(p){p=p?x(p)?p:[p]:[];for(var b=0,A=p.length;bthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&b[0]instanceof ce&&b[0].equals(b[A-1])&&b.pop(),b},_setLatLngs:function(p){Ho.prototype._setLatLngs.call(this,p),Di(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Di(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var p=this._renderer._bounds,b=this.options.weight,A=new z(b,b);if(p=new Y(p.min.subtract(A),p.max.add(A)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(p))){if(this.options.noClip){this._parts=this._rings;return}for(var E=0,R=this._rings.length,V;Ep.y!=R.y>p.y&&p.x<(R.x-E.x)*(p.y-E.y)/(R.y-E.y)+E.x&&(b=!b);return b||Ho.prototype._containsPoint.call(this,p,!0)}});function Pae(p,b){return new Lf(p,b)}var Wo=Go.extend({initialize:function(p,b){g(this,b),this._layers={},p&&this.addData(p)},addData:function(p){var b=x(p)?p:p.features,A,E,R;if(b){for(A=0,E=b.length;A0&&R.push(R[0].slice()),R}function kf(p,b){return p.feature?i({},p.feature,{geometry:b}):P0(b)}function P0(p){return p.type==="Feature"||p.type==="FeatureCollection"?p:{type:"Feature",properties:{},geometry:p}}var yC={toGeoJSON:function(p){return kf(this,{type:"Point",coordinates:mC(this.getLatLng(),p)})}};S0.include(yC),pC.include(yC),T0.include(yC),Ho.include({toGeoJSON:function(p){var b=!Di(this._latlngs),A=M0(this._latlngs,b?1:0,!1,p);return kf(this,{type:(b?"Multi":"")+"LineString",coordinates:A})}}),Lf.include({toGeoJSON:function(p){var b=!Di(this._latlngs),A=b&&!Di(this._latlngs[0]),E=M0(this._latlngs,A?2:b?1:0,!0,p);return b||(E=[E]),kf(this,{type:(A?"Multi":"")+"Polygon",coordinates:E})}}),Mf.include({toMultiPoint:function(p){var b=[];return this.eachLayer(function(A){b.push(A.toGeoJSON(p).geometry.coordinates)}),kf(this,{type:"MultiPoint",coordinates:b})},toGeoJSON:function(p){var b=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(b==="MultiPoint")return this.toMultiPoint(p);var A=b==="GeometryCollection",E=[];return this.eachLayer(function(R){if(R.toGeoJSON){var V=R.toGeoJSON(p);if(A)E.push(V.geometry);else{var X=P0(V);X.type==="FeatureCollection"?E.push.apply(E,X.features):E.push(X)}}}),A?kf(this,{geometries:E,type:"GeometryCollection"}):{type:"FeatureCollection",features:E}}});function u5(p,b){return new Wo(p,b)}var Lae=u5,L0=ga.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(p,b,A){this._url=p,this._bounds=ae(b),g(this,A)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(st(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){er(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(p){return this.options.opacity=p,this._image&&this._updateOpacity(),this},setStyle:function(p){return p.opacity&&this.setOpacity(p.opacity),this},bringToFront:function(){return this._map&&Cf(this._image),this},bringToBack:function(){return this._map&&Af(this._image),this},setUrl:function(p){return this._url=p,this._image&&(this._image.src=p),this},setBounds:function(p){return this._bounds=ae(p),this._map&&this._reset(),this},getEvents:function(){var p={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(p.zoomanim=this._animateZoom),p},setZIndex:function(p){return this.options.zIndex=p,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var p=this._url.tagName==="IMG",b=this._image=p?this._url:wt("img");if(st(b,"leaflet-image-layer"),this._zoomAnimated&&st(b,"leaflet-zoom-animated"),this.options.className&&st(b,this.options.className),b.onselectstart=f,b.onmousemove=f,b.onload=o(this.fire,this,"load"),b.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(b.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),p){this._url=b.src;return}b.src=this._url,b.alt=this.options.alt},_animateZoom:function(p){var b=this._map.getZoomScale(p.zoom),A=this._map._latLngBoundsToNewLayerBounds(this._bounds,p.zoom,p.center).min;du(this._image,A,b)},_reset:function(){var p=this._image,b=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),A=b.getSize();br(p,b.min),p.style.width=A.x+"px",p.style.height=A.y+"px"},_updateOpacity:function(){Oi(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var p=this.options.errorOverlayUrl;p&&this._url!==p&&(this._url=p,this._image.src=p)},getCenter:function(){return this._bounds.getCenter()}}),kae=function(p,b,A){return new L0(p,b,A)},c5=L0.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var p=this._url.tagName==="VIDEO",b=this._image=p?this._url:wt("video");if(st(b,"leaflet-image-layer"),this._zoomAnimated&&st(b,"leaflet-zoom-animated"),this.options.className&&st(b,this.options.className),b.onselectstart=f,b.onmousemove=f,b.onloadeddata=o(this.fire,this,"load"),p){for(var A=b.getElementsByTagName("source"),E=[],R=0;R0?E:[b.src];return}x(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(b.style,"objectFit")&&(b.style.objectFit="fill"),b.autoplay=!!this.options.autoplay,b.loop=!!this.options.loop,b.muted=!!this.options.muted,b.playsInline=!!this.options.playsInline;for(var V=0;VR?(b.height=R+"px",st(p,V)):pr(p,V),this._containerWidth=this._container.offsetWidth},_animateZoom:function(p){var b=this._map._latLngToNewLayerPoint(this._latlng,p.zoom,p.center),A=this._getAnchor();br(this._container,b.add(A))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var p=this._map,b=parseInt(Vv(this._container,"marginBottom"),10)||0,A=this._container.offsetHeight+b,E=this._containerWidth,R=new z(this._containerLeft,-A-this._containerBottom);R._add(vu(this._container));var V=p.layerPointToContainerPoint(R),X=H(this.options.autoPanPadding),te=H(this.options.autoPanPaddingTopLeft||X),oe=H(this.options.autoPanPaddingBottomRight||X),he=p.getSize(),De=0,Qe=0;V.x+E+oe.x>he.x&&(De=V.x+E-he.x+oe.x),V.x-De-te.x<0&&(De=V.x-te.x),V.y+A+oe.y>he.y&&(Qe=V.y+A-he.y+oe.y),V.y-Qe-te.y<0&&(Qe=V.y-te.y),(De||Qe)&&(this.options.keepInView&&(this._autopanning=!0),p.fire("autopanstart").panBy([De,Qe]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Eae=function(p,b){return new k0(p,b)};_t.mergeOptions({closePopupOnClick:!0}),_t.include({openPopup:function(p,b,A){return this._initOverlay(k0,p,b,A).openOn(this),this},closePopup:function(p){return p=arguments.length?p:this._popup,p&&p.close(),this}}),ga.include({bindPopup:function(p,b){return this._popup=this._initOverlay(k0,this._popup,p,b),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(p){return this._popup&&(this instanceof Go||(this._popup._source=this),this._popup._prepareOpen(p||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(p){return this._popup&&this._popup.setContent(p),this},getPopup:function(){return this._popup},_openPopup:function(p){if(!(!this._popup||!this._map)){gu(p);var b=p.layer||p.target;if(this._popup._source===b&&!(b instanceof Ys)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(p.latlng);return}this._popup._source=b,this.openPopup(p.latlng)}},_movePopup:function(p){this._popup.setLatLng(p.latlng)},_onKeyPress:function(p){p.originalEvent.keyCode===13&&this._openPopup(p)}});var O0=Xa.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(p){Xa.prototype.onAdd.call(this,p),this.setOpacity(this.options.opacity),p.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(p){Xa.prototype.onRemove.call(this,p),p.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var p=Xa.prototype.getEvents.call(this);return this.options.permanent||(p.preclick=this.close),p},_initLayout:function(){var p="leaflet-tooltip",b=p+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=wt("div",b),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(p){var b,A,E=this._map,R=this._container,V=E.latLngToContainerPoint(E.getCenter()),X=E.layerPointToContainerPoint(p),te=this.options.direction,oe=R.offsetWidth,he=R.offsetHeight,De=H(this.options.offset),Qe=this._getAnchor();te==="top"?(b=oe/2,A=he):te==="bottom"?(b=oe/2,A=0):te==="center"?(b=oe/2,A=he/2):te==="right"?(b=0,A=he/2):te==="left"?(b=oe,A=he/2):X.xthis.options.maxZoom||AE?this._retainParent(R,V,X,E):!1)},_retainChildren:function(p,b,A,E){for(var R=2*p;R<2*p+2;R++)for(var V=2*b;V<2*b+2;V++){var X=new z(R,V);X.z=A+1;var te=this._tileCoordsToKey(X),oe=this._tiles[te];if(oe&&oe.active){oe.retain=!0;continue}else oe&&oe.loaded&&(oe.retain=!0);A+1this.options.maxZoom||this.options.minZoom!==void 0&&R1){this._setView(p,A);return}for(var Qe=R.min.y;Qe<=R.max.y;Qe++)for(var dt=R.min.x;dt<=R.max.x;dt++){var Dn=new z(dt,Qe);if(Dn.z=this._tileZoom,!!this._isValidTile(Dn)){var Ur=this._tiles[this._tileCoordsToKey(Dn)];Ur?Ur.current=!0:X.push(Dn)}}if(X.sort(function(Xn,Df){return Xn.distanceTo(V)-Df.distanceTo(V)}),X.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ei=document.createDocumentFragment();for(dt=0;dtA.max.x)||!b.wrapLat&&(p.yA.max.y))return!1}if(!this.options.bounds)return!0;var E=this._tileCoordsToBounds(p);return ae(this.options.bounds).overlaps(E)},_keyToBounds:function(p){return this._tileCoordsToBounds(this._keyToTileCoords(p))},_tileCoordsToNwSe:function(p){var b=this._map,A=this.getTileSize(),E=p.scaleBy(A),R=E.add(A),V=b.unproject(E,p.z),X=b.unproject(R,p.z);return[V,X]},_tileCoordsToBounds:function(p){var b=this._tileCoordsToNwSe(p),A=new J(b[0],b[1]);return this.options.noWrap||(A=this._map.wrapLatLngBounds(A)),A},_tileCoordsToKey:function(p){return p.x+":"+p.y+":"+p.z},_keyToTileCoords:function(p){var b=p.split(":"),A=new z(+b[0],+b[1]);return A.z=+b[2],A},_removeTile:function(p){var b=this._tiles[p];b&&(er(b.el),delete this._tiles[p],this.fire("tileunload",{tile:b.el,coords:this._keyToTileCoords(p)}))},_initTile:function(p){st(p,"leaflet-tile");var b=this.getTileSize();p.style.width=b.x+"px",p.style.height=b.y+"px",p.onselectstart=f,p.onmousemove=f,He.ielt9&&this.options.opacity<1&&Oi(p,this.options.opacity)},_addTile:function(p,b){var A=this._getTilePos(p),E=this._tileCoordsToKey(p),R=this.createTile(this._wrapCoords(p),o(this._tileReady,this,p));this._initTile(R),this.createTile.length<2&&D(o(this._tileReady,this,p,null,R)),br(R,A),this._tiles[E]={el:R,coords:p,current:!0},b.appendChild(R),this.fire("tileloadstart",{tile:R,coords:p})},_tileReady:function(p,b,A){b&&this.fire("tileerror",{error:b,tile:A,coords:p});var E=this._tileCoordsToKey(p);A=this._tiles[E],A&&(A.loaded=+new Date,this._map._fadeAnimated?(Oi(A.el,0),I(this._fadeFrame),this._fadeFrame=D(this._updateOpacity,this)):(A.active=!0,this._pruneTiles()),b||(st(A.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:A.el,coords:p})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),He.ielt9||!this._map._fadeAnimated?D(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(p){return p.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(p){var b=new z(this._wrapX?c(p.x,this._wrapX):p.x,this._wrapY?c(p.y,this._wrapY):p.y);return b.z=p.z,b},_pxBoundsToTileRange:function(p){var b=this.getTileSize();return new Y(p.min.unscaleBy(b).floor(),p.max.unscaleBy(b).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var p in this._tiles)if(!this._tiles[p].loaded)return!1;return!0}});function Rae(p){return new qv(p)}var Of=qv.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(p,b){this._url=p,b=g(this,b),b.detectRetina&&He.retina&&b.maxZoom>0?(b.tileSize=Math.floor(b.tileSize/2),b.zoomReverse?(b.zoomOffset--,b.minZoom=Math.min(b.maxZoom,b.minZoom+1)):(b.zoomOffset++,b.maxZoom=Math.max(b.minZoom,b.maxZoom-1)),b.minZoom=Math.max(0,b.minZoom)):b.zoomReverse?b.minZoom=Math.min(b.maxZoom,b.minZoom):b.maxZoom=Math.max(b.minZoom,b.maxZoom),typeof b.subdomains=="string"&&(b.subdomains=b.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(p,b){return this._url===p&&b===void 0&&(b=!0),this._url=p,b||this.redraw(),this},createTile:function(p,b){var A=document.createElement("img");return at(A,"load",o(this._tileOnLoad,this,b,A)),at(A,"error",o(this._tileOnError,this,b,A)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(A.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(A.referrerPolicy=this.options.referrerPolicy),A.alt="",A.src=this.getTileUrl(p),A},getTileUrl:function(p){var b={r:He.retina?"@2x":"",s:this._getSubdomain(p),x:p.x,y:p.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var A=this._globalTileRange.max.y-p.y;this.options.tms&&(b.y=A),b["-y"]=A}return _(this._url,i(b,this.options))},_tileOnLoad:function(p,b){He.ielt9?setTimeout(o(p,this,null,b),0):p(null,b)},_tileOnError:function(p,b,A){var E=this.options.errorTileUrl;E&&b.getAttribute("src")!==E&&(b.src=E),p(A,b)},_onTileRemove:function(p){p.tile.onload=null},_getZoomForUrl:function(){var p=this._tileZoom,b=this.options.maxZoom,A=this.options.zoomReverse,E=this.options.zoomOffset;return A&&(p=b-p),p+E},_getSubdomain:function(p){var b=Math.abs(p.x+p.y)%this.options.subdomains.length;return this.options.subdomains[b]},_abortLoading:function(){var p,b;for(p in this._tiles)if(this._tiles[p].coords.z!==this._tileZoom&&(b=this._tiles[p].el,b.onload=f,b.onerror=f,!b.complete)){b.src=S;var A=this._tiles[p].coords;er(b),delete this._tiles[p],this.fire("tileabort",{tile:b,coords:A})}},_removeTile:function(p){var b=this._tiles[p];if(b)return b.el.setAttribute("src",S),qv.prototype._removeTile.call(this,p)},_tileReady:function(p,b,A){if(!(!this._map||A&&A.getAttribute("src")===S))return qv.prototype._tileReady.call(this,p,b,A)}});function d5(p,b){return new Of(p,b)}var v5=Of.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(p,b){this._url=p;var A=i({},this.defaultWmsParams);for(var E in b)E in this.options||(A[E]=b[E]);b=g(this,b);var R=b.detectRetina&&He.retina?2:1,V=this.getTileSize();A.width=V.x*R,A.height=V.y*R,this.wmsParams=A},onAdd:function(p){this._crs=this.options.crs||p.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var b=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[b]=this._crs.code,Of.prototype.onAdd.call(this,p)},getTileUrl:function(p){var b=this._tileCoordsToNwSe(p),A=this._crs,E=Z(A.project(b[0]),A.project(b[1])),R=E.min,V=E.max,X=(this._wmsVersion>=1.3&&this._crs===o5?[R.y,R.x,V.y,V.x]:[R.x,R.y,V.x,V.y]).join(","),te=Of.prototype.getTileUrl.call(this,p);return te+m(this.wmsParams,te,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+X},setParams:function(p,b){return i(this.wmsParams,p),b||this.redraw(),this}});function jae(p,b){return new v5(p,b)}Of.WMS=v5,d5.wms=jae;var Uo=ga.extend({options:{padding:.1},initialize:function(p){g(this,p),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),st(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var p={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(p.zoomanim=this._onAnimZoom),p},_onAnimZoom:function(p){this._updateTransform(p.center,p.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(p,b){var A=this._map.getZoomScale(b,this._zoom),E=this._map.getSize().multiplyBy(.5+this.options.padding),R=this._map.project(this._center,b),V=E.multiplyBy(-A).add(R).subtract(this._map._getNewPixelOrigin(p,b));He.any3d?du(this._container,V,A):br(this._container,V)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var p in this._layers)this._layers[p]._reset()},_onZoomEnd:function(){for(var p in this._layers)this._layers[p]._project()},_updatePaths:function(){for(var p in this._layers)this._layers[p]._update()},_update:function(){var p=this.options.padding,b=this._map.getSize(),A=this._map.containerPointToLayerPoint(b.multiplyBy(-p)).round();this._bounds=new Y(A,A.add(b.multiplyBy(1+p*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),p5=Uo.extend({options:{tolerance:0},getEvents:function(){var p=Uo.prototype.getEvents.call(this);return p.viewprereset=this._onViewPreReset,p},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Uo.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var p=this._container=document.createElement("canvas");at(p,"mousemove",this._onMouseMove,this),at(p,"click dblclick mousedown mouseup contextmenu",this._onClick,this),at(p,"mouseout",this._handleMouseOut,this),p._leaflet_disable_events=!0,this._ctx=p.getContext("2d")},_destroyContainer:function(){I(this._redrawRequest),delete this._ctx,er(this._container),Ft(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var p;this._redrawBounds=null;for(var b in this._layers)p=this._layers[b],p._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Uo.prototype._update.call(this);var p=this._bounds,b=this._container,A=p.getSize(),E=He.retina?2:1;br(b,p.min),b.width=E*A.x,b.height=E*A.y,b.style.width=A.x+"px",b.style.height=A.y+"px",He.retina&&this._ctx.scale(2,2),this._ctx.translate(-p.min.x,-p.min.y),this.fire("update")}},_reset:function(){Uo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(p){this._updateDashArray(p),this._layers[l(p)]=p;var b=p._order={layer:p,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=b),this._drawLast=b,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(p){this._requestRedraw(p)},_removePath:function(p){var b=p._order,A=b.next,E=b.prev;A?A.prev=E:this._drawLast=E,E?E.next=A:this._drawFirst=A,delete p._order,delete this._layers[l(p)],this._requestRedraw(p)},_updatePath:function(p){this._extendRedrawBounds(p),p._project(),p._update(),this._requestRedraw(p)},_updateStyle:function(p){this._updateDashArray(p),this._requestRedraw(p)},_updateDashArray:function(p){if(typeof p.options.dashArray=="string"){var b=p.options.dashArray.split(/[, ]+/),A=[],E,R;for(R=0;R')}}catch{}return function(p){return document.createElement("<"+p+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Bae={_initContainer:function(){this._container=wt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Uo.prototype._update.call(this),this.fire("update"))},_initPath:function(p){var b=p._container=Kv("shape");st(b,"leaflet-vml-shape "+(this.options.className||"")),b.coordsize="1 1",p._path=Kv("path"),b.appendChild(p._path),this._updateStyle(p),this._layers[l(p)]=p},_addPath:function(p){var b=p._container;this._container.appendChild(b),p.options.interactive&&p.addInteractiveTarget(b)},_removePath:function(p){var b=p._container;er(b),p.removeInteractiveTarget(b),delete this._layers[l(p)]},_updateStyle:function(p){var b=p._stroke,A=p._fill,E=p.options,R=p._container;R.stroked=!!E.stroke,R.filled=!!E.fill,E.stroke?(b||(b=p._stroke=Kv("stroke")),R.appendChild(b),b.weight=E.weight+"px",b.color=E.color,b.opacity=E.opacity,E.dashArray?b.dashStyle=x(E.dashArray)?E.dashArray.join(" "):E.dashArray.replace(/( *, *)/g," "):b.dashStyle="",b.endcap=E.lineCap.replace("butt","flat"),b.joinstyle=E.lineJoin):b&&(R.removeChild(b),p._stroke=null),E.fill?(A||(A=p._fill=Kv("fill")),R.appendChild(A),A.color=E.fillColor||E.color,A.opacity=E.fillOpacity):A&&(R.removeChild(A),p._fill=null)},_updateCircle:function(p){var b=p._point.round(),A=Math.round(p._radius),E=Math.round(p._radiusY||A);this._setPath(p,p._empty()?"M0 0":"AL "+b.x+","+b.y+" "+A+","+E+" 0,"+65535*360)},_setPath:function(p,b){p._path.v=b},_bringToFront:function(p){Cf(p._container)},_bringToBack:function(p){Af(p._container)}},D0=He.vml?Kv:ze,Qv=Uo.extend({_initContainer:function(){this._container=D0("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=D0("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){er(this._container),Ft(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Uo.prototype._update.call(this);var p=this._bounds,b=p.getSize(),A=this._container;(!this._svgSize||!this._svgSize.equals(b))&&(this._svgSize=b,A.setAttribute("width",b.x),A.setAttribute("height",b.y)),br(A,p.min),A.setAttribute("viewBox",[p.min.x,p.min.y,b.x,b.y].join(" ")),this.fire("update")}},_initPath:function(p){var b=p._path=D0("path");p.options.className&&st(b,p.options.className),p.options.interactive&&st(b,"leaflet-interactive"),this._updateStyle(p),this._layers[l(p)]=p},_addPath:function(p){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(p._path),p.addInteractiveTarget(p._path)},_removePath:function(p){er(p._path),p.removeInteractiveTarget(p._path),delete this._layers[l(p)]},_updatePath:function(p){p._project(),p._update()},_updateStyle:function(p){var b=p._path,A=p.options;b&&(A.stroke?(b.setAttribute("stroke",A.color),b.setAttribute("stroke-opacity",A.opacity),b.setAttribute("stroke-width",A.weight),b.setAttribute("stroke-linecap",A.lineCap),b.setAttribute("stroke-linejoin",A.lineJoin),A.dashArray?b.setAttribute("stroke-dasharray",A.dashArray):b.removeAttribute("stroke-dasharray"),A.dashOffset?b.setAttribute("stroke-dashoffset",A.dashOffset):b.removeAttribute("stroke-dashoffset")):b.setAttribute("stroke","none"),A.fill?(b.setAttribute("fill",A.fillColor||A.color),b.setAttribute("fill-opacity",A.fillOpacity),b.setAttribute("fill-rule",A.fillRule||"evenodd")):b.setAttribute("fill","none"))},_updatePoly:function(p,b){this._setPath(p,Ue(p._parts,b))},_updateCircle:function(p){var b=p._point,A=Math.max(Math.round(p._radius),1),E=Math.max(Math.round(p._radiusY),1)||A,R="a"+A+","+E+" 0 1,0 ",V=p._empty()?"M0 0":"M"+(b.x-A)+","+b.y+R+A*2+",0 "+R+-A*2+",0 ";this._setPath(p,V)},_setPath:function(p,b){p._path.setAttribute("d",b)},_bringToFront:function(p){Cf(p._path)},_bringToBack:function(p){Af(p._path)}});He.vml&&Qv.include(Bae);function m5(p){return He.svg||He.vml?new Qv(p):null}_t.include({getRenderer:function(p){var b=p.options.renderer||this._getPaneRenderer(p.options.pane)||this.options.renderer||this._renderer;return b||(b=this._renderer=this._createRenderer()),this.hasLayer(b)||this.addLayer(b),b},_getPaneRenderer:function(p){if(p==="overlayPane"||p===void 0)return!1;var b=this._paneRenderers[p];return b===void 0&&(b=this._createRenderer({pane:p}),this._paneRenderers[p]=b),b},_createRenderer:function(p){return this.options.preferCanvas&&g5(p)||m5(p)}});var y5=Lf.extend({initialize:function(p,b){Lf.prototype.initialize.call(this,this._boundsToLatLngs(p),b)},setBounds:function(p){return this.setLatLngs(this._boundsToLatLngs(p))},_boundsToLatLngs:function(p){return p=ae(p),[p.getSouthWest(),p.getNorthWest(),p.getNorthEast(),p.getSouthEast()]}});function zae(p,b){return new y5(p,b)}Qv.create=D0,Qv.pointsToPath=Ue,Wo.geometryToLayer=C0,Wo.coordsToLatLng=gC,Wo.coordsToLatLngs=A0,Wo.latLngToCoords=mC,Wo.latLngsToCoords=M0,Wo.getFeature=kf,Wo.asFeature=P0,_t.mergeOptions({boxZoom:!0});var _5=Ya.extend({initialize:function(p){this._map=p,this._container=p._container,this._pane=p._panes.overlayPane,this._resetStateTimeout=0,p.on("unload",this._destroy,this)},addHooks:function(){at(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ft(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){er(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(p){if(!p.shiftKey||p.which!==1&&p.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Gv(),JT(),this._startPoint=this._map.mouseEventToContainerPoint(p),at(document,{contextmenu:gu,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(p){this._moved||(this._moved=!0,this._box=wt("div","leaflet-zoom-box",this._container),st(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(p);var b=new Y(this._point,this._startPoint),A=b.getSize();br(this._box,b.min),this._box.style.width=A.x+"px",this._box.style.height=A.y+"px"},_finish:function(){this._moved&&(er(this._box),pr(this._container,"leaflet-crosshair")),Hv(),eC(),Ft(document,{contextmenu:gu,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(p){if(!(p.which!==1&&p.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var b=new J(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(b).fire("boxzoomend",{boxZoomBounds:b})}},_onKeyDown:function(p){p.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});_t.addInitHook("addHandler","boxZoom",_5),_t.mergeOptions({doubleClickZoom:!0});var x5=Ya.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(p){var b=this._map,A=b.getZoom(),E=b.options.zoomDelta,R=p.originalEvent.shiftKey?A-E:A+E;b.options.doubleClickZoom==="center"?b.setZoom(R):b.setZoomAround(p.containerPoint,R)}});_t.addInitHook("addHandler","doubleClickZoom",x5),_t.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var b5=Ya.extend({addHooks:function(){if(!this._draggable){var p=this._map;this._draggable=new Zs(p._mapPane,p._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),p.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),p.on("zoomend",this._onZoomEnd,this),p.whenReady(this._onZoomEnd,this))}st(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){pr(this._map._container,"leaflet-grab"),pr(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var p=this._map;if(p._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var b=ae(this._map.options.maxBounds);this._offsetLimit=Z(this._map.latLngToContainerPoint(b.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(b.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;p.fire("movestart").fire("dragstart"),p.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(p){if(this._map.options.inertia){var b=this._lastTime=+new Date,A=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(A),this._times.push(b),this._prunePositions(b)}this._map.fire("move",p).fire("drag",p)},_prunePositions:function(p){for(;this._positions.length>1&&p-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var p=this._map.getSize().divideBy(2),b=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=b.subtract(p).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(p,b){return p-(p-b)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var p=this._draggable._newPos.subtract(this._draggable._startPos),b=this._offsetLimit;p.xb.max.x&&(p.x=this._viscousLimit(p.x,b.max.x)),p.y>b.max.y&&(p.y=this._viscousLimit(p.y,b.max.y)),this._draggable._newPos=this._draggable._startPos.add(p)}},_onPreDragWrap:function(){var p=this._worldWidth,b=Math.round(p/2),A=this._initialWorldOffset,E=this._draggable._newPos.x,R=(E-b+A)%p+b-A,V=(E+b+A)%p-b-A,X=Math.abs(R+A)0?V:-V))-b;this._delta=0,this._startTime=null,X&&(p.options.scrollWheelZoom==="center"?p.setZoom(b+X):p.setZoomAround(this._lastMousePos,b+X))}});_t.addInitHook("addHandler","scrollWheelZoom",S5);var $ae=600;_t.mergeOptions({tapHold:He.touchNative&&He.safari&&He.mobile,tapTolerance:15});var T5=Ya.extend({addHooks:function(){at(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ft(this._map._container,"touchstart",this._onDown,this)},_onDown:function(p){if(clearTimeout(this._holdTimeout),p.touches.length===1){var b=p.touches[0];this._startPos=this._newPos=new z(b.clientX,b.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(at(document,"touchend",nn),at(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",b))},this),$ae),at(document,"touchend touchcancel contextmenu",this._cancel,this),at(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function p(){Ft(document,"touchend",nn),Ft(document,"touchend touchcancel",p)},_cancel:function(){clearTimeout(this._holdTimeout),Ft(document,"touchend touchcancel contextmenu",this._cancel,this),Ft(document,"touchmove",this._onMove,this)},_onMove:function(p){var b=p.touches[0];this._newPos=new z(b.clientX,b.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(p,b){var A=new MouseEvent(p,{bubbles:!0,cancelable:!0,view:window,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY});A._simulated=!0,b.target.dispatchEvent(A)}});_t.addInitHook("addHandler","tapHold",T5),_t.mergeOptions({touchZoom:He.touch,bounceAtZoomLimits:!0});var C5=Ya.extend({addHooks:function(){st(this._map._container,"leaflet-touch-zoom"),at(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){pr(this._map._container,"leaflet-touch-zoom"),Ft(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(p){var b=this._map;if(!(!p.touches||p.touches.length!==2||b._animatingZoom||this._zooming)){var A=b.mouseEventToContainerPoint(p.touches[0]),E=b.mouseEventToContainerPoint(p.touches[1]);this._centerPoint=b.getSize()._divideBy(2),this._startLatLng=b.containerPointToLatLng(this._centerPoint),b.options.touchZoom!=="center"&&(this._pinchStartLatLng=b.containerPointToLatLng(A.add(E)._divideBy(2))),this._startDist=A.distanceTo(E),this._startZoom=b.getZoom(),this._moved=!1,this._zooming=!0,b._stop(),at(document,"touchmove",this._onTouchMove,this),at(document,"touchend touchcancel",this._onTouchEnd,this),nn(p)}},_onTouchMove:function(p){if(!(!p.touches||p.touches.length!==2||!this._zooming)){var b=this._map,A=b.mouseEventToContainerPoint(p.touches[0]),E=b.mouseEventToContainerPoint(p.touches[1]),R=A.distanceTo(E)/this._startDist;if(this._zoom=b.getScaleZoom(R,this._startZoom),!b.options.bounceAtZoomLimits&&(this._zoomb.getMaxZoom()&&R>1)&&(this._zoom=b._limitZoom(this._zoom)),b.options.touchZoom==="center"){if(this._center=this._startLatLng,R===1)return}else{var V=A._add(E)._divideBy(2)._subtract(this._centerPoint);if(R===1&&V.x===0&&V.y===0)return;this._center=b.unproject(b.project(this._pinchStartLatLng,this._zoom).subtract(V),this._zoom)}this._moved||(b._moveStart(!0,!1),this._moved=!0),I(this._animRequest);var X=o(b._move,b,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=D(X,this,!0),nn(p)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,I(this._animRequest),Ft(document,"touchmove",this._onTouchMove,this),Ft(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});_t.addInitHook("addHandler","touchZoom",C5),_t.BoxZoom=_5,_t.DoubleClickZoom=x5,_t.Drag=b5,_t.Keyboard=w5,_t.ScrollWheelZoom=S5,_t.TapHold=T5,_t.TouchZoom=C5,r.Bounds=Y,r.Browser=He,r.CRS=Fe,r.Canvas=p5,r.Circle=pC,r.CircleMarker=T0,r.Class=B,r.Control=pa,r.DivIcon=h5,r.DivOverlay=Xa,r.DomEvent=iae,r.DomUtil=rae,r.Draggable=Zs,r.Evented=G,r.FeatureGroup=Go,r.GeoJSON=Wo,r.GridLayer=qv,r.Handler=Ya,r.Icon=Pf,r.ImageOverlay=L0,r.LatLng=ce,r.LatLngBounds=J,r.Layer=ga,r.LayerGroup=Mf,r.LineUtil=mae,r.Map=_t,r.Marker=S0,r.Mixin=fae,r.Path=Ys,r.Point=z,r.PolyUtil=hae,r.Polygon=Lf,r.Polyline=Ho,r.Popup=k0,r.PosAnimation=Yj,r.Projection=yae,r.Rectangle=y5,r.Renderer=Uo,r.SVG=Qv,r.SVGOverlay=f5,r.TileLayer=Of,r.Tooltip=O0,r.Transformation=le,r.Util=N,r.VideoOverlay=c5,r.bind=o,r.bounds=Z,r.canvas=g5,r.circle=Aae,r.circleMarker=Cae,r.control=Zv,r.divIcon=Nae,r.extend=i,r.featureGroup=wae,r.geoJSON=u5,r.geoJson=Lae,r.gridLayer=Rae,r.icon=Sae,r.imageOverlay=kae,r.latLng=ge,r.latLngBounds=ae,r.layerGroup=bae,r.map=aae,r.marker=Tae,r.point=H,r.polygon=Pae,r.polyline=Mae,r.popup=Eae,r.rectangle=zae,r.setOptions=g,r.stamp=l,r.svg=m5,r.svgOverlay=Dae,r.tileLayer=d5,r.tooltip=Iae,r.transformation=ee,r.version=n,r.videoOverlay=Oae;var Fae=window.L;r.noConflict=function(){return window.L=Fae,this},window.L=r})})(DD,DD.exports);var wf=DD.exports;const Cie=jt(wf);function d0(e,t,r){return Object.freeze({instance:e,context:t,container:r})}function wj(e,t){return t==null?function(n,i){const a=W.useRef();return a.current||(a.current=e(n,i)),a}:function(n,i){const a=W.useRef();a.current||(a.current=e(n,i));const o=W.useRef(n),{instance:s}=a.current;return W.useEffect(function(){o.current!==n&&(t(s,n,o.current),o.current=n)},[s,n,i]),a}}function Aie(e,t){W.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var a;(a=t.layerContainer)==null||a.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function PQe(e){return function(r){const n=GT(),i=e(HT(r,n),n);return bie(n.map,r.attribution),bj(i.current,r.eventHandlers),Aie(i.current,n),i}}function LQe(e,t){const r=W.useRef();W.useEffect(function(){if(t.pathOptions!==r.current){const i=t.pathOptions??{};e.instance.setStyle(i),r.current=i}},[e,t])}function kQe(e){return function(r){const n=GT(),i=e(HT(r,n),n);return bj(i.current,r.eventHandlers),Aie(i.current,n),LQe(i.current,r),i}}function Mie(e,t){const r=wj(e),n=MQe(r,t);return CQe(n)}function Pie(e,t){const r=wj(e,t),n=kQe(r);return TQe(n)}function OQe(e,t){const r=wj(e,t),n=PQe(r);return AQe(n)}function DQe(e,t,r){const{opacity:n,zIndex:i}=t;n!=null&&n!==r.opacity&&e.setOpacity(n),i!=null&&i!==r.zIndex&&e.setZIndex(i)}function EQe(){return GT().map}const IQe=Pie(function({center:t,children:r,...n},i){const a=new wf.CircleMarker(t,n);return d0(a,wie(i,{overlayContainer:a}))},bQe);function ED(){return ED=Object.assign||function(e){for(var t=1;t(d==null?void 0:d.map)??null,[d]);const g=W.useCallback(y=>{if(y!==null&&d===null){const _=new wf.Map(y,c);r!=null&&u!=null?_.setView(r,u):e!=null&&_.fitBounds(e,t),l!=null&&_.whenReady(l),v(SQe(_))}},[]);W.useEffect(()=>()=>{d==null||d.map.remove()},[d]);const m=d?Q.createElement(Tie,{value:d},n):o??null;return Q.createElement("div",ED({},h,{ref:g}),m)}const RQe=W.forwardRef(NQe),jQe=Pie(function({positions:t,...r},n){const i=new wf.Polyline(t,r);return d0(i,wie(n,{overlayContainer:i}))},function(t,r,n){r.positions!==n.positions&&t.setLatLngs(r.positions)}),BQe=Mie(function(t,r){const n=new wf.Popup(t,r.overlayContainer);return d0(n,r)},function(t,r,{position:n},i){W.useEffect(function(){const{instance:o}=t;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[t,r,i,n])}),zQe=OQe(function({url:t,...r},n){const i=new wf.TileLayer(t,HT(r,n));return d0(i,n)},function(t,r,n){DQe(t,r,n);const{url:i}=r;i!=null&&i!==n.url&&t.setUrl(i)}),$Qe=Mie(function(t,r){const n=new wf.Tooltip(t,r.overlayContainer);return d0(n,r)},function(t,r,{position:n},i){W.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=t,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[t,r,i,n])}),FQe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",VQe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",GQe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete Cie.Icon.Default.prototype._getIconUrl;Cie.Icon.Default.mergeOptions({iconUrl:FQe,iconRetinaUrl:VQe,shadowUrl:GQe});const xU=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],HQe=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function WQe(e){return e>12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function UQe(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function ZQe(e){if(!e)return"Unknown";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function YQe({bounds:e}){const t=EQe();return W.useEffect(()=>{e&&t.fitBounds(e,{padding:[50,50]})},[t,e]),null}function XQe({node:e}){const t=e.latitude!==null&&e.longitude!==null,r=e.battery_level!==null?e.battery_level>100||e.voltage&&e.voltage>4.1?"USB ⚡":`${e.battery_level.toFixed(0)}%`:"Unknown";return T.jsxs("div",{className:"min-w-[200px]",children:[T.jsx("div",{className:"font-semibold text-slate-800",children:e.short_name}),T.jsx("div",{className:"text-xs text-slate-600 mb-2",children:e.long_name}),T.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[T.jsx("div",{className:"text-slate-500",children:"Role"}),T.jsx("div",{className:"text-slate-700 font-medium",children:e.role}),T.jsx("div",{className:"text-slate-500",children:"Hardware"}),T.jsx("div",{className:"text-slate-700",children:e.hardware||"Unknown"}),T.jsx("div",{className:"text-slate-500",children:"Battery"}),T.jsx("div",{className:"text-slate-700",children:r}),T.jsx("div",{className:"text-slate-500",children:"Last Heard"}),T.jsx("div",{className:"text-slate-700",children:ZQe(e.last_heard)})]}),t&&T.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[T.jsxs("a",{href:`https://www.google.com/maps?q=${e.latitude},${e.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[T.jsx(fm,{size:10}),"Google Maps"]}),T.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${e.latitude}&mlon=${e.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[T.jsx(fm,{size:10}),"OSM"]})]})]})}function qQe({nodes:e,edges:t,selectedNodeId:r,onSelectNode:n}){const i=W.useMemo(()=>e.filter(f=>f.latitude!==null&&f.longitude!==null),[e]),a=e.length-i.length,o=W.useMemo(()=>new Map(i.map(f=>[f.node_num,f])),[i]),s=W.useMemo(()=>t.filter(f=>o.has(f.from_node)&&o.has(f.to_node)),[t,o]),l=W.useMemo(()=>{if(i.length===0)return null;const f=i.map(d=>d.latitude),h=i.map(d=>d.longitude);return[[Math.min(...f),Math.min(...h)],[Math.max(...f),Math.max(...h)]]},[i]),u=[43.6,-114.4],c=W.useMemo(()=>{const f=new Set;return r!==null&&t.forEach(h=>{h.from_node===r&&f.add(h.to_node),h.to_node===r&&f.add(h.from_node)}),f},[r,t]);return T.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[T.jsxs(RQe,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[T.jsx(zQe,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© OpenStreetMap, © CARTO'}),T.jsx(YQe,{bounds:l}),s.map((f,h)=>{const d=o.get(f.from_node),v=o.get(f.to_node),g=r===null||f.from_node===r||f.to_node===r;return T.jsx(jQe,{positions:[[d.latitude,d.longitude],[v.latitude,v.longitude]],color:WQe(f.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},h)}),i.map(f=>{const h=f.node_num===r,d=c.has(f.node_num),v=r===null||h||d,g=HQe.includes(f.role),m=UQe(f.latitude),y=xU[m%xU.length];return T.jsxs(IQe,{center:[f.latitude,f.longitude],radius:g?8:5,fillColor:g?y:"#111827",fillOpacity:v?.9:.2,stroke:!0,color:h?"#ffffff":y,weight:h?3:g?0:2,opacity:v?1:.3,eventHandlers:{click:()=>n(h?null:f.node_num)},children:[T.jsx($Qe,{direction:"top",offset:[0,-8],children:T.jsx("span",{className:"font-mono text-xs",children:f.short_name})}),T.jsx(BQe,{children:T.jsx(XQe,{node:f})})]},f.node_num)})]}),T.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[T.jsx(oZ,{size:12}),T.jsxs("span",{children:["Showing ",i.length," of ",e.length," nodes",a>0&&T.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const bU=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],KQe=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function wU(e){return e>12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function QQe(e){return e>12?"excellent":e>8?"good":e>5?"fair":e>3?"marginal":"poor"}function JQe(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function eJe(e){return["Northern ID","Central ID","SW Idaho","SC Idaho"][e]||"Unknown"}function tJe(e){if(!e)return"Unknown";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function rJe(e){if(!e)return"bg-slate-500";const t=new Date(e),n=(new Date().getTime()-t.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function nJe({node:e,edges:t,nodes:r,onSelectNode:n}){const i=W.useMemo(()=>{if(!e)return[];const f=new Map(r.map(d=>[d.node_num,d])),h=[];return t.forEach(d=>{if(d.from_node===e.node_num){const v=f.get(d.to_node);v&&h.push({node:v,snr:d.snr,quality:d.quality})}else if(d.to_node===e.node_num){const v=f.get(d.from_node);v&&h.push({node:v,snr:d.snr,quality:d.quality})}}),h.sort((d,v)=>v.snr-d.snr)},[e,t,r]);if(!e)return T.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[T.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:T.jsx(Fc,{size:24,className:"text-slate-500"})}),T.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=KQe.includes(e.role),o=JQe(e.latitude),s=bU[o%bU.length],l=e.latitude!==null&&e.longitude!==null,u=e.battery_level!==null?e.battery_level>100||e.voltage&&e.voltage>4.1?"USB":`${e.battery_level.toFixed(0)}%`:"—",c=e.battery_level!==null&&(e.battery_level>100||e.voltage&&e.voltage>4.1);return T.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[T.jsxs("div",{className:"p-4 border-b border-border",children:[T.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:e.node_id_hex}),T.jsx("div",{className:"font-mono text-lg text-slate-100",children:e.short_name}),T.jsx("div",{className:"text-xs text-slate-500 truncate",children:e.long_name})]}),T.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),T.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:e.role})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),T.jsx("div",{className:"text-sm text-slate-300",children:eJe(o)})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),T.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&T.jsx(dm,{size:12,className:"text-amber-400"}),u]})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),T.jsxs("div",{className:"flex items-center gap-1.5",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${rJe(e.last_heard)}`}),T.jsx("span",{className:"text-sm text-slate-300",children:tJe(e.last_heard)})]})]}),T.jsxs("div",{className:"col-span-2",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),T.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:e.hardware||"Unknown"})]})]}),l&&T.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[T.jsxs("a",{href:`https://www.google.com/maps?q=${e.latitude},${e.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[T.jsx(fm,{size:10}),"Google Maps"]}),T.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${e.latitude}&mlon=${e.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[T.jsx(fm,{size:10}),"OSM"]})]}),T.jsxs("div",{className:"flex-1 overflow-y-auto",children:[T.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?T.jsx("div",{className:"divide-y divide-border",children:i.map(f=>T.jsxs("button",{onClick:()=>n(f.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:wU(f.snr)},children:[T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:f.node.short_name}),T.jsx("div",{className:"text-xs text-slate-500 truncate",children:f.node.long_name})]}),T.jsxs("div",{className:"text-right flex-shrink-0",children:[T.jsxs("div",{className:"text-xs font-mono",style:{color:wU(f.snr)},children:[f.snr.toFixed(1)," dB"]}),T.jsx("div",{className:"text-xs text-slate-500",children:QQe(f.snr)})]})]},f.node.node_num))}):T.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const SU=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function iJe(e){if(!e)return"bg-slate-500";const t=new Date(e),n=(new Date().getTime()-t.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function aJe(e){if(!e)return"—";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function oJe(e){return e.battery_level===null?"—":e.battery_level>100||e.voltage&&e.voltage>4.1?"USB ⚡":`${e.battery_level.toFixed(0)}%`}function TU(e){return e===null?"—":e>46?"Northern":e>44.5?"Central":e>43?"SW Idaho":"SC Idaho"}function sJe({nodes:e,selectedNodeId:t,onSelectNode:r}){const[n,i]=W.useState(""),[a,o]=W.useState("short_name"),[s,l]=W.useState("asc"),[u,c]=W.useState("all"),f=W.useMemo(()=>{let v=[...e];if(u==="infra"?v=v.filter(g=>SU.includes(g.role)):u==="online"&&(v=v.filter(g=>{if(!g.last_heard)return!1;const m=new Date(g.last_heard);return(new Date().getTime()-m.getTime())/36e5<1})),n){const g=n.toLowerCase();v=v.filter(m=>m.short_name.toLowerCase().includes(g)||m.long_name.toLowerCase().includes(g)||m.role.toLowerCase().includes(g)||TU(m.latitude).toLowerCase().includes(g))}return v.sort((g,m)=>{let y="",_="";switch(a){case"short_name":y=g.short_name.toLowerCase(),_=m.short_name.toLowerCase();break;case"role":y=g.role,_=m.role;break;case"battery_level":y=g.battery_level??-1,_=m.battery_level??-1;break;case"last_heard":y=g.last_heard?new Date(g.last_heard).getTime():0,_=m.last_heard?new Date(m.last_heard).getTime():0;break;case"hardware":y=g.hardware.toLowerCase(),_=m.hardware.toLowerCase();break}return y<_?s==="asc"?-1:1:y>_?s==="asc"?1:-1:0}),v},[e,n,a,s,u]),h=v=>{a===v?l(s==="asc"?"desc":"asc"):(o(v),l("asc"))},d=({field:v})=>a!==v?null:s==="asc"?T.jsx(Nue,{size:14,className:"inline ml-1"}):T.jsx(Ny,{size:14,className:"inline ml-1"});return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[T.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[T.jsxs("div",{className:"relative flex-1 max-w-xs",children:[T.jsx(hZ,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),T.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:v=>i(v.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx(DE,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(v=>T.jsx("button",{onClick:()=>c(v),className:`px-2 py-1 text-xs rounded transition-colors ${u===v?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:v==="all"?"All":v==="infra"?"Infra":"Online"},v))]}),T.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[f.length," of ",e.length," nodes"]})]}),T.jsxs("div",{className:"overflow-x-auto",children:[T.jsxs("table",{className:"w-full text-sm",children:[T.jsx("thead",{children:T.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[T.jsx("th",{className:"w-8 px-3 py-2"}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("short_name"),children:["Name ",T.jsx(d,{field:"short_name"})]}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("role"),children:["Role ",T.jsx(d,{field:"role"})]}),T.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("battery_level"),children:["Battery ",T.jsx(d,{field:"battery_level"})]}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("last_heard"),children:["Last Heard ",T.jsx(d,{field:"last_heard"})]}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("hardware"),children:["Hardware ",T.jsx(d,{field:"hardware"})]})]})}),T.jsx("tbody",{className:"divide-y divide-border",children:f.slice(0,100).map(v=>{const g=SU.includes(v.role),m=v.node_num===t;return T.jsxs("tr",{onClick:()=>r(v.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[T.jsx("td",{className:"px-3 py-2",children:T.jsx("div",{className:`w-2 h-2 rounded-full ${iJe(v.last_heard)}`})}),T.jsxs("td",{className:"px-3 py-2",children:[T.jsx("div",{className:"font-mono text-slate-200",children:v.short_name}),T.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:v.long_name})]}),T.jsx("td",{className:"px-3 py-2",children:T.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${g?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:v.role})}),T.jsx("td",{className:"px-3 py-2 text-slate-400",children:TU(v.latitude)}),T.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:oJe(v)}),T.jsx("td",{className:"px-3 py-2 text-slate-400",children:aJe(v.last_heard)}),T.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:v.hardware||"—"})]},v.node_num)})})]}),f.length>100&&T.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",f.length," nodes"]}),f.length===0&&T.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function lJe(){const[e,t]=W.useState([]),[r,n]=W.useState([]),[i,a]=W.useState([]),[o,s]=W.useState(null),[l,u]=W.useState("topo"),[c,f]=W.useState(!0),[h,d]=W.useState(null);W.useEffect(()=>{document.title="Mesh — MeshAI",Promise.all([Xue(),que(),ace()]).then(([m,y,_])=>{t(m),n(y),a(_),f(!1)}).catch(m=>{d(m.message),f(!1)})},[]);const v=W.useMemo(()=>e.find(m=>m.node_num===o)||null,[e,o]),g=W.useCallback(m=>{s(m)},[]);return c?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):h?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"text-sm text-slate-400",children:[e.length," nodes • ",r.length," edges"]}),T.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[T.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[T.jsx(Gue,{size:14}),"Topology"]}),T.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[T.jsx($ue,{size:14}),"Geographic"]})]})]}),T.jsxs("div",{className:"flex gap-0",children:[T.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?T.jsx(xQe,{nodes:e,edges:r,selectedNodeId:o,onSelectNode:g}):T.jsx(qQe,{nodes:e,edges:r,selectedNodeId:o,onSelectNode:g})}),T.jsx(nJe,{node:v,edges:r,nodes:e,onSelectNode:g})]}),T.jsx(sJe,{nodes:e,selectedNodeId:o,onSelectNode:g})]})}function uJe({feed:e}){const t=()=>e.is_loaded?e.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=()=>e.is_loaded?e.consecutive_errors>0?`${e.consecutive_errors} errors`:"Healthy":"Not loaded",n=i=>i?new Date(i*1e3).toLocaleTimeString():"Never";return T.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[T.jsxs("div",{className:"flex items-center justify-between mb-2",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${t()}`}),T.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:e.source})]}),T.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),T.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[T.jsxs("div",{children:["Events: ",e.event_count]}),T.jsxs("div",{children:["Last fetch: ",n(e.last_fetch)]}),e.last_error&&T.jsx("div",{className:"text-amber-500 truncate",children:e.last_error})]})]})}function cJe({event:e}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:Ry,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:Ps,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:hm,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:hm,iconColor:"text-slate-400"}}})(e.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return T.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:T.jsxs("div",{className:"flex items-start gap-3",children:[T.jsx(n,{size:18,className:r.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[T.jsx("span",{className:"text-sm font-medium text-slate-200",children:e.event_type}),T.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:e.severity})]}),T.jsx("div",{className:"text-sm text-slate-300 mb-2",children:e.headline}),e.description&&T.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:e.description}),T.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[T.jsx("span",{className:"uppercase",children:e.source}),e.expires&&T.jsxs("span",{children:["Expires: ",i(e.expires)]})]})]})]})})}function fJe({swpc:e}){var n,i;if(!e||!e.enabled)return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(ZP,{size:14}),"Solar/Geomagnetic Indices"]}),T.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const t=a=>a===void 0?"text-slate-400":a<=2?"text-green-500":a<=4?"text-amber-500":a<=6?"text-orange-500":"text-red-500",r=a=>a===void 0||a===0?"text-green-500":a<=2?"text-amber-500":a<=3?"text-orange-500":"text-red-500";return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(ZP,{size:14}),"Solar/Geomagnetic Indices"]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),T.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=e.sfi)==null?void 0:n.toFixed(0))??"—"}),T.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),T.jsx("div",{className:`text-2xl font-mono ${t(e.kp_current)}`,children:((i=e.kp_current)==null?void 0:i.toFixed(1))??"—"}),T.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),T.jsxs("div",{className:"flex items-center gap-4",children:[T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),T.jsx("span",{className:`text-sm font-mono ${r(e.r_scale)}`,children:e.r_scale??0})]}),T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),T.jsx("span",{className:`text-sm font-mono ${r(e.s_scale)}`,children:e.s_scale??0})]}),T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),T.jsx("span",{className:`text-sm font-mono ${r(e.g_scale)}`,children:e.g_scale??0})]})]}),T.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Radio Blackout / Solar Radiation / Geomagnetic Storm"})]}),e.active_warnings&&e.active_warnings.length>0&&T.jsxs("div",{className:"space-y-2",children:[T.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),e.active_warnings.slice(0,3).map((a,o)=>T.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function hJe({ducting:e}){if(!e||!e.enabled)return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(YB,{size:14}),"Tropospheric Ducting"]}),T.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const t=n=>{switch(n){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},r=n=>n?n.replace("_"," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown";return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(YB,{size:14}),"Tropospheric Ducting"]}),T.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),T.jsx("div",{className:`text-xl font-medium ${t(e.condition)}`,children:r(e.condition)})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),T.jsx("div",{className:"text-lg font-mono text-slate-100",children:e.min_gradient??"—"}),T.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),e.duct_thickness_m&&T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),T.jsx("div",{className:"text-lg font-mono text-slate-100",children:e.duct_thickness_m}),T.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),e.duct_base_m&&T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),T.jsx("div",{className:"text-lg font-mono text-slate-100",children:e.duct_base_m}),T.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),T.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[T.jsx("div",{children:"dM/dz reference:"}),T.jsxs("div",{className:"mt-1 space-y-0.5",children:[T.jsx("div",{children:">79: Normal propagation"}),T.jsx("div",{children:"0–79: Super-refraction"}),T.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),e.last_update&&T.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",e.last_update]})]})}function dJe(){var O;const[e,t]=W.useState(null),[r,n]=W.useState([]),[i,a]=W.useState(null),[o,s]=W.useState(null),[l,u]=W.useState([]),[c,f]=W.useState(null),[h,d]=W.useState([]),[v,g]=W.useState([]),[m,y]=W.useState([]),[_,x]=W.useState([]),[w,S]=W.useState(0),[C,M]=W.useState(!0),[P,k]=W.useState(null);return W.useEffect(()=>{document.title="Environment — MeshAI",Promise.all([gZ().catch(()=>null),mZ().catch(()=>[]),yZ().catch(()=>null),_Z().catch(()=>null),Jue().catch(()=>[]),ece().catch(()=>null),tce().catch(()=>[]),rce().catch(()=>[]),nce().catch(()=>[]),ice().catch(()=>({hotspots:[],new_ignitions:0}))]).then(([D,I,N,B,F,$,G,z,U,H])=>{t(D),n(I),a(N),s(B),u(F),f($),d(G||[]),g(z||[]),y(U||[]),x((H==null?void 0:H.hotspots)||[]),S((H==null?void 0:H.new_ignitions)||0),M(!1)}).catch(D=>{k(D.message),M(!1)})},[]),C?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):P?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",P]})}):e!=null&&e.enabled?T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),T.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(hS,{size:14}),"Feed Status"]}),T.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:e.feeds.map(D=>T.jsx(uJe,{feed:D},D.source))})]}),T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[T.jsx(fJe,{swpc:i}),T.jsx(hJe,{ducting:o})]}),T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(iZ,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?T.jsx("div",{className:"space-y-3",children:l.map(D=>T.jsxs("div",{className:`p-3 rounded-lg ${D.severity==="warning"?"bg-red-500/10 border-l-2 border-red-500":D.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-slate-500/10 border-l-2 border-slate-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between mb-1",children:[T.jsx("span",{className:"text-sm font-medium text-slate-200",children:D.name}),T.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${D.severity==="warning"?"bg-red-500/20 text-red-400":D.severity==="watch"?"bg-amber-500/20 text-amber-400":"bg-slate-500/20 text-slate-400"}`,children:D.severity})]}),T.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[T.jsxs("div",{children:[D.acres.toLocaleString()," acres, ",D.pct_contained,"% contained"]}),D.distance_km&&D.nearest_anchor&&T.jsxs("div",{children:[Math.round(D.distance_km)," km from ",D.nearest_anchor]})]})]},D.event_id))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(Wh,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No active wildfires in the area"})]})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(sZ,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?T.jsx("div",{className:"text-slate-500 py-4",children:T.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?T.jsxs("div",{className:"space-y-3",children:[c.advisories.map(D=>T.jsxs("div",{className:`p-3 rounded-lg ${D.danger_level>=4?"bg-red-500/10 border-l-2 border-red-500":D.danger_level>=3?"bg-amber-500/10 border-l-2 border-amber-500":D.danger_level>=2?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between mb-1",children:[T.jsx("span",{className:"text-sm font-medium text-slate-200",children:D.zone_name}),T.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${D.danger_level>=4?"bg-red-500/20 text-red-400":D.danger_level>=3?"bg-amber-500/20 text-amber-400":D.danger_level>=2?"bg-yellow-500/20 text-yellow-400":"bg-green-500/20 text-green-400"}`,children:D.danger_name})]}),T.jsx("div",{className:"text-xs text-slate-400",children:D.center}),D.travel_advice&&T.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:D.travel_advice})]},D.event_id)),((O=c.advisories[0])==null?void 0:O.center_link)&&T.jsx("a",{href:c.advisories[0].center_link,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:underline",children:"View full forecast"})]}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(Wh,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No avalanche advisories"})]})]})]}),h.length>0&&T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(rZ,{size:14}),"Stream Gauges (",h.length,")"]}),T.jsx("div",{className:"space-y-2",children:h.map(D=>{var I,N,B,F,$;return T.jsxs("div",{className:`p-3 rounded-lg ${D.severity==="warning"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-blue-500/10 border-l-2 border-blue-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm text-slate-200",children:((I=D.properties)==null?void 0:I.site_name)||"Unknown Site"}),T.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(B=(N=D.properties)==null?void 0:N.value)==null?void 0:B.toLocaleString()," ",(F=D.properties)==null?void 0:F.unit]})]}),T.jsx("div",{className:"text-xs text-slate-500 mt-1",children:($=D.properties)==null?void 0:$.parameter})]},D.event_id)})})]}),(v.length>0||m.length>0)&&T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(eZ,{size:14}),"Road Conditions"]}),v.length>0&&T.jsxs("div",{className:"mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),T.jsx("div",{className:"space-y-2",children:v.map(D=>{var I,N,B,F,$,G,z,U,H;return T.jsxs("div",{className:`p-3 rounded-lg ${(I=D.properties)!=null&&I.roadClosure?"bg-red-500/10 border-l-2 border-red-500":((N=D.properties)==null?void 0:N.speedRatio)<.5?"bg-amber-500/10 border-l-2 border-amber-500":((B=D.properties)==null?void 0:B.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm text-slate-200",children:((F=D.properties)==null?void 0:F.corridor)||"Unknown"}),T.jsx("span",{className:"text-sm font-mono text-slate-300",children:($=D.properties)!=null&&$.roadClosure?"CLOSED":`${Math.round(((G=D.properties)==null?void 0:G.currentSpeed)||0)}mph`})]}),!((z=D.properties)!=null&&z.roadClosure)&&T.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[Math.round((((U=D.properties)==null?void 0:U.speedRatio)||1)*100),"% of free flow (",Math.round(((H=D.properties)==null?void 0:H.freeFlowSpeed)||0),"mph)"]})]},D.event_id)})})]}),m.length>0&&T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),T.jsx("div",{className:"space-y-2",children:m.map(D=>{var I,N;return T.jsxs("div",{className:`p-3 rounded-lg ${(I=D.properties)!=null&&I.is_closure?"bg-red-500/10 border-l-2 border-red-500":"bg-amber-500/10 border-l-2 border-amber-500"}`,children:[T.jsxs("div",{className:"flex items-center gap-2",children:[((N=D.properties)==null?void 0:N.is_closure)&&T.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),T.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:D.headline})]}),T.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:D.event_type})]},D.event_id)})})]})]}),_.length>0&&T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(cZ,{size:14}),"Satellite Hotspots (",_.length,")",w>0&&T.jsxs("span",{className:"ml-2 px-2 py-0.5 text-xs rounded-full bg-red-500/20 text-red-400 animate-pulse",children:[w," NEW"]})]}),T.jsx("div",{className:"space-y-2",children:_.map(D=>{var I,N,B,F,$,G;return T.jsxs("div",{className:`p-3 rounded-lg ${(I=D.properties)!=null&&I.new_ignition?"bg-red-500/10 border-l-2 border-red-500":D.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-orange-500/10 border-l-2 border-orange-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[((N=D.properties)==null?void 0:N.new_ignition)&&T.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"NEW"}),T.jsx("span",{className:"text-sm text-slate-200",children:D.headline})]}),((B=D.properties)==null?void 0:B.frp)&&T.jsxs("span",{className:"text-sm font-mono text-orange-400",children:[Math.round(D.properties.frp)," MW"]})]}),T.jsxs("div",{className:"text-xs text-slate-500 mt-1 flex items-center gap-3",children:[T.jsxs("span",{children:["Conf: ",((F=D.properties)==null?void 0:F.confidence)||"N/A"]}),(($=D.properties)==null?void 0:$.acq_time)&&T.jsxs("span",{children:["@",D.properties.acq_time,"Z"]}),((G=D.properties)==null?void 0:G.near_fire)&&T.jsxs("span",{children:["Near: ",D.properties.near_fire]})]})]},D.event_id)})})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(Ps,{size:14}),"Active Events (",r.length,")"]}),r.length>0?T.jsx("div",{className:"space-y-3",children:r.map(D=>T.jsx(cJe,{event:D},D.event_id))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(Wh,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No active environmental events"})]})]})]}):T.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[T.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:T.jsx($c,{size:32,className:"text-slate-500"})}),T.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),T.jsx("p",{className:"text-slate-500 max-w-md",children:"Enable environmental feeds in config.yaml to see weather alerts, space weather indices, and tropospheric ducting data."})]})}function Sj({label:e,value:t,onChange:r,helper:n,info:i,roleFilter:a,valueType:o="short_name"}){const[s,l]=W.useState([]),[u,c]=W.useState(!0),[f,h]=W.useState(""),[d,v]=W.useState(!1);W.useEffect(()=>{fetch("/api/nodes").then(w=>w.json()).then(w=>{l(w),c(!1)}).catch(()=>{l([]),c(!1)})},[]);const g=W.useMemo(()=>{let w=s;if(a&&(w=w.filter(S=>a==="ROUTER"||a==="infrastructure"?S.is_infrastructure||S.role==="ROUTER"||S.role==="ROUTER_CLIENT"||S.role==="REPEATER":S.role===a)),f.trim()){const S=f.toLowerCase();w=w.filter(C=>{var M,P,k,O;return((M=C.short_name)==null?void 0:M.toLowerCase().includes(S))||((P=C.long_name)==null?void 0:P.toLowerCase().includes(S))||((k=C.role)==null?void 0:k.toLowerCase().includes(S))||((O=C.node_id_hex)==null?void 0:O.toLowerCase().includes(S))})}return w.sort((S,C)=>(S.short_name||"").localeCompare(C.short_name||""))},[s,f,a]),m=w=>{switch(o){case"node_num":return String(w.node_num);case"node_id_hex":return w.node_id_hex;default:return w.short_name||String(w.node_num)}},y=w=>{const S=m(w);return t.includes(S)},_=w=>{const S=m(w);t.includes(S)?r(t.filter(C=>C!==S)):r([...t,S])},x=w=>{const S=[w.short_name];return w.long_name&&w.long_name!==w.short_name&&S.push(`— ${w.long_name}`),w.role&&S.push(`(${w.role})`),S.join(" ")};return!u&&s.length===0?T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e}),T.jsx("input",{type:"text",value:t.join(", "),onChange:w=>r(w.target.value.split(",").map(S=>S.trim()).filter(Boolean)),placeholder:"Enter node IDs separated by commas",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]}):T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e}),t.length>0&&T.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:t.map(w=>{const S=s.find(C=>m(C)===w);return T.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-accent/20 text-accent rounded text-sm",children:[S?S.short_name:w,T.jsx("button",{type:"button",onClick:()=>r(t.filter(C=>C!==w)),className:"hover:text-white",children:T.jsx(jy,{size:14})})]},w)})}),T.jsxs("div",{className:"relative",children:[T.jsxs("div",{className:"relative",children:[T.jsx(hZ,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),T.jsx("input",{type:"text",value:f,onChange:w=>h(w.target.value),onFocus:()=>v(!0),placeholder:u?"Loading nodes...":"Search nodes...",className:"w-full pl-9 pr-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent"})]}),d&&!u&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>v(!1)}),T.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 z-50 max-h-64 overflow-y-auto bg-[#0a0e17] border border-[#1e2a3a] rounded-lg shadow-xl",children:g.length===0?T.jsx("div",{className:"p-3 text-sm text-slate-500 text-center",children:"No nodes found"}):g.map(w=>T.jsxs("button",{type:"button",onClick:()=>_(w),className:`w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[#1e2a3a] ${y(w)?"bg-accent/10":""}`,children:[T.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${y(w)?"bg-accent border-accent":"border-slate-600"}`,children:y(w)&&T.jsx(cd,{size:12,className:"text-white"})}),T.jsx("span",{className:"text-slate-200",children:x(w)})]},w.node_num))})]})]}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Tj(e){const[t,r]=W.useState([]),[n,i]=W.useState(!0);W.useEffect(()=>{fetch("/api/channels").then(h=>h.json()).then(h=>{r(h),i(!1)}).catch(()=>{r([]),i(!1)})},[]);const a=h=>{const d=h.role==="PRIMARY"?"Primary":h.role==="SECONDARY"?"Secondary":"";return`${h.index}: ${h.name}${d?` (${d})`:""}`};if(!n&&t.length===0)return e.mode==="single"?T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e.label}),T.jsx("input",{type:"number",value:e.value,onChange:h=>e.onChange(Number(h.target.value)),min:e.includeDisabled?-1:0,max:7,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),e.helper&&T.jsx("p",{className:"text-xs text-slate-600",children:e.helper})]}):T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e.label}),T.jsx("input",{type:"text",value:e.value.join(", "),onChange:h=>{const d=h.target.value.split(",").map(v=>parseInt(v.trim())).filter(v=>!isNaN(v));e.onChange(d)},placeholder:"Enter channel numbers separated by commas",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),e.helper&&T.jsx("p",{className:"text-xs text-slate-600",children:e.helper})]});if(e.mode==="single"){const{value:h,onChange:d,label:v,helper:g,includeDisabled:m}=e,y=t.filter(_=>_.enabled);return T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:v}),T.jsxs("select",{value:h,onChange:_=>d(Number(_.target.value)),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:[m&&T.jsx("option",{value:-1,children:"Disabled"}),y.map(_=>T.jsx("option",{value:_.index,children:a(_)},_.index))]}),g&&T.jsx("p",{className:"text-xs text-slate-600",children:g})]})}const{value:o,onChange:s,label:l,helper:u}=e,c=t.filter(h=>h.enabled),f=h=>{o.includes(h)?s(o.filter(d=>d!==h)):s([...o,h].sort((d,v)=>d-v))};return T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:l}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:[c.map(h=>T.jsxs("label",{onClick:()=>f(h.index),className:"flex items-center gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[T.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${o.includes(h.index)?"bg-accent border-accent":"border-slate-600"}`,children:o.includes(h.index)&&T.jsx(cd,{size:12,className:"text-white"})}),T.jsx("span",{className:"text-sm text-slate-200",children:a(h)})]},h.index)),c.length===0&&T.jsx("div",{className:"text-sm text-slate-500 p-2",children:"No channels available"})]}),u&&T.jsx("p",{className:"text-xs text-slate-600",children:u})]})}const CU=[{key:"bot",label:"Bot",icon:Oue},{key:"connection",label:"Connection",icon:vZ},{key:"response",label:"Response",icon:Fue},{key:"history",label:"History",icon:Bue},{key:"memory",label:"Memory",icon:Due},{key:"context",label:"Context",icon:OE},{key:"commands",label:"Commands",icon:Hue},{key:"llm",label:"LLM",icon:tZ},{key:"weather",label:"Weather",icon:$c},{key:"meshmonitor",label:"MeshMonitor",icon:Fc},{key:"knowledge",label:"Knowledge",icon:kue},{key:"mesh_sources",label:"Mesh Sources",icon:zue},{key:"mesh_intelligence",label:"Intelligence",icon:hS},{key:"environmental",label:"Environmental",icon:Wue},{key:"dashboard",label:"Dashboard",icon:aZ}],Un={bot:"Identity and behavior settings for the bot on the mesh network.",connection:"How MeshAI connects to your Meshtastic radio.",response:"Controls how quickly and how much the bot responds on the mesh.",history:"Conversation history storage and cleanup.",memory:"Short-term conversation memory management. Controls how the bot maintains context within a conversation.",context:"Passive channel monitoring. The bot listens to mesh channels and uses recent messages as context when responding.",commands:"Mesh commands available via the configured prefix. Toggle individual commands on or off.",llm:"AI model configuration. MeshAI uses an LLM to understand questions and generate responses.",weather:"Weather data for the !weather command. This is separate from NWS environmental alerts.",meshmonitor:"AIDA MeshMonitor integration. An additional data source for mesh network monitoring.",knowledge:"Knowledge base for answering questions from stored documents. Connects to Qdrant vector database or local SQLite.",mesh_sources:"Data sources for mesh network information. MeshAI can pull data from multiple sources simultaneously and merge them into a unified view.",mesh_intelligence:"Advanced mesh analysis: health scoring, region management, and automated alerting. The intelligence engine monitors your mesh and detects problems automatically.",environmental:"Live environmental data feeds for situational awareness. Each feed polls a public or authenticated API for real-time conditions affecting your area.",dashboard:"Web dashboard settings. You're looking at it right now."},vJe=[{name:"help",description:"Show available commands and usage"},{name:"health",description:"Mesh network health overview with status dots"},{name:"status",description:"Quick mesh status summary"},{name:"region",description:"List regions or get detailed region breakdown"},{name:"neighbors",description:"Show top infrastructure neighbors with signal quality"},{name:"ping",description:"Test bot responsiveness"},{name:"clear",description:"Clear your conversation history"},{name:"reset",description:"Reset conversation context"},{name:"sub",description:"Subscribe to scheduled reports or alerts"},{name:"unsub",description:"Remove a subscription"},{name:"mysubs",description:"List your active subscriptions"},{name:"alerts",description:"Active NWS weather alerts for mesh area"},{name:"solar",description:"Space weather and HF propagation conditions"},{name:"hf",description:"HF radio propagation (alias for !solar)"},{name:"fire",description:"Active wildfires near the mesh"},{name:"avy",description:"Avalanche advisories for configured zones"},{name:"hotspots",description:"NASA FIRMS satellite fire detections"},{name:"streams",description:"USGS stream gauge readings"},{name:"roads",description:"Road conditions and closures"},{name:"traffic",description:"Traffic flow on monitored corridors"}],pJe=[{value:"US-AL",label:"Alabama"},{value:"US-AK",label:"Alaska"},{value:"US-AZ",label:"Arizona"},{value:"US-AR",label:"Arkansas"},{value:"US-CA",label:"California"},{value:"US-CO",label:"Colorado"},{value:"US-CT",label:"Connecticut"},{value:"US-DE",label:"Delaware"},{value:"US-FL",label:"Florida"},{value:"US-GA",label:"Georgia"},{value:"US-HI",label:"Hawaii"},{value:"US-ID",label:"Idaho"},{value:"US-IL",label:"Illinois"},{value:"US-IN",label:"Indiana"},{value:"US-IA",label:"Iowa"},{value:"US-KS",label:"Kansas"},{value:"US-KY",label:"Kentucky"},{value:"US-LA",label:"Louisiana"},{value:"US-ME",label:"Maine"},{value:"US-MD",label:"Maryland"},{value:"US-MA",label:"Massachusetts"},{value:"US-MI",label:"Michigan"},{value:"US-MN",label:"Minnesota"},{value:"US-MS",label:"Mississippi"},{value:"US-MO",label:"Missouri"},{value:"US-MT",label:"Montana"},{value:"US-NE",label:"Nebraska"},{value:"US-NV",label:"Nevada"},{value:"US-NH",label:"New Hampshire"},{value:"US-NJ",label:"New Jersey"},{value:"US-NM",label:"New Mexico"},{value:"US-NY",label:"New York"},{value:"US-NC",label:"North Carolina"},{value:"US-ND",label:"North Dakota"},{value:"US-OH",label:"Ohio"},{value:"US-OK",label:"Oklahoma"},{value:"US-OR",label:"Oregon"},{value:"US-PA",label:"Pennsylvania"},{value:"US-RI",label:"Rhode Island"},{value:"US-SC",label:"South Carolina"},{value:"US-SD",label:"South Dakota"},{value:"US-TN",label:"Tennessee"},{value:"US-TX",label:"Texas"},{value:"US-UT",label:"Utah"},{value:"US-VT",label:"Vermont"},{value:"US-VA",label:"Virginia"},{value:"US-WA",label:"Washington"},{value:"US-WV",label:"West Virginia"},{value:"US-WI",label:"Wisconsin"},{value:"US-WY",label:"Wyoming"}];function Bo({info:e,link:t,linkText:r="Learn more"}){const[n,i]=W.useState(!1);return T.jsxs("div",{className:"relative inline-block",children:[T.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),i(!n)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),n&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),T.jsxs("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:[e,t&&T.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-1 text-accent hover:underline",onClick:a=>a.stopPropagation(),children:[r," ",T.jsx(fm,{size:10})]})]})]})]})}function Zn({text:e}){return T.jsx("p",{className:"text-sm text-slate-500 mb-6 pb-4 border-b border-[#1e2a3a]",children:e})}function St({label:e,value:t,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o="",infoLink:s=""}){const[l,u]=W.useState(!1),c=n==="password";return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,o&&T.jsx(Bo,{info:o,link:s})]}),T.jsxs("div",{className:"relative",children:[T.jsx("input",{type:c&&!l?"password":"text",value:t,onChange:f=>r(f.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),c&&T.jsx("button",{type:"button",onClick:()=>u(!l),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:l?T.jsx(nZ,{size:16}):T.jsx(OE,{size:16})})]}),a&&T.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function Ye({label:e,value:t,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s="",infoLink:l=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,s&&T.jsx(Bo,{info:s,link:l})]}),T.jsx("input",{type:"number",value:t,onChange:u=>r(Number(u.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&T.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function Ot({label:e,checked:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){return T.jsxs("div",{className:"flex items-center justify-between py-2",children:[T.jsxs("div",{children:[T.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[e,i&&T.jsx(Bo,{info:i,link:a})]}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]}),T.jsx("button",{type:"button",onClick:()=>r(!t),className:`relative w-11 h-6 rounded-full transition-colors ${t?"bg-accent":"bg-[#1e2a3a]"}`,children:T.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${t?"translate-x-5":""}`})})]})}function xo({label:e,value:t,onChange:r,options:n,helper:i="",info:a="",infoLink:o=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&T.jsx(Bo,{info:a,link:o})]}),T.jsx("select",{value:t,onChange:s=>r(s.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(s=>T.jsx("option",{value:s.value,children:s.label},s.value))}),i&&T.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function gJe({label:e,value:t,onChange:r,rows:n=4,helper:i="",info:a="",infoLink:o=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&T.jsx(Bo,{info:a,link:o})]}),T.jsx("textarea",{value:t,onChange:s=>r(s.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&T.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Bh({label:e,value:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=W.useState(t.join(", "));W.useEffect(()=>{s(t.join(", "))},[t]);const l=()=>{const u=o.split(",").map(c=>c.trim()).filter(Boolean);r(u)};return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&T.jsx(Bo,{info:i,link:a})]}),T.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function mJe({label:e,value:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=W.useState(t.join(", "));W.useEffect(()=>{s(t.join(", "))},[t]);const l=()=>{const u=o.split(",").map(c=>parseInt(c.trim(),10)).filter(c=>!isNaN(c));r(u)};return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&T.jsx(Bo,{info:i,link:a})]}),T.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function bn({label:e,description:t,checked:r,onChange:n,threshold:i,onThresholdChange:a,thresholdLabel:o,thresholdMin:s,thresholdMax:l,thresholdStep:u=1,thresholdSuffix:c=""}){return T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-3 space-y-2",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"flex-1",children:[T.jsx("span",{className:"text-sm text-slate-300",children:e}),T.jsx("p",{className:"text-xs text-slate-600",children:t})]}),T.jsx("button",{type:"button",onClick:()=>n(!r),className:`relative w-11 h-6 rounded-full transition-colors flex-shrink-0 ml-3 ${r?"bg-accent":"bg-[#1e2a3a]"}`,children:T.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${r?"translate-x-5":""}`})})]}),r&&i!==void 0&&a&&T.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-[#1e2a3a]",children:[T.jsxs("span",{className:"text-xs text-slate-500",children:[o||"Threshold",":"]}),T.jsx("input",{type:"number",value:i,onChange:f=>a(Number(f.target.value)),min:s,max:l,step:u,className:"w-20 px-2 py-1 bg-[#0a0e17] border border-[#1e2a3a] rounded text-xs text-slate-200 font-mono"}),c&&T.jsx("span",{className:"text-xs text-slate-500",children:c})]})]})}function yJe({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.bot}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(St,{label:"Bot Name",value:e.name,onChange:r=>t({...e,name:r}),helper:"Name the bot responds to on the mesh",info:"When someone sends a message containing this name, the bot will respond. Also used as the sender name in broadcasts. Changing this requires a restart."}),T.jsx(St,{label:"Owner",value:e.owner,onChange:r=>t({...e,owner:r}),helper:"Your callsign or identifier",info:"Identifies the bot operator. Shown in !help responses and used for admin-level commands."})]}),T.jsx(Ot,{label:"Respond to DMs",checked:e.respond_to_dms,onChange:r=>t({...e,respond_to_dms:r}),helper:"Reply when someone sends a direct message",info:"When enabled, the bot responds to direct messages from any node. When disabled, the bot only responds to channel messages that mention its name."}),T.jsx(Ot,{label:"Filter BBS Protocols",checked:e.filter_bbs_protocols,onChange:r=>t({...e,filter_bbs_protocols:r}),helper:"Ignore BBS bulletin board traffic",info:"Filters out automated BBS protocol messages (advBBS, MAIL*, BOARD*) so the bot doesn't try to respond to machine-to-machine traffic."})]})}function _Je({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.connection}),T.jsx(xo,{label:"Connection Type",value:e.type,onChange:r=>t({...e,type:r}),options:[{value:"serial",label:"Serial (USB)"},{value:"tcp",label:"TCP (Network)"}],helper:"Serial for USB-connected radios, TCP for network or meshtasticd",info:"Serial: direct USB connection to a Meshtastic radio. TCP: connect over the network to a radio's IP or to meshtasticd running on another machine."}),e.type==="serial"?T.jsx(St,{label:"Serial Port",value:e.serial_port,onChange:r=>t({...e,serial_port:r}),placeholder:"/dev/ttyUSB0",helper:"Device path for your USB radio",info:"Usually /dev/ttyUSB0 on Linux or /dev/ttyACM0. Check with 'ls /dev/tty*' after plugging in your radio."}):T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(St,{label:"TCP Host",value:e.tcp_host,onChange:r=>t({...e,tcp_host:r}),placeholder:"192.168.1.100",helper:"IP address or hostname of the radio/meshtasticd"}),T.jsx(Ye,{label:"TCP Port",value:e.tcp_port,onChange:r=>t({...e,tcp_port:r}),min:1,max:65535,helper:"Default 4403 for meshtasticd"})]})]})}function xJe({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.response}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Delay Min (sec)",value:e.delay_min,onChange:r=>t({...e,delay_min:r}),min:0,step:.1,helper:"Minimum wait before responding",info:"Adds a random delay between min and max before the bot sends a response. Prevents the bot from appearing to respond instantly, which can feel unnatural on a radio network."}),T.jsx(Ye,{label:"Delay Max (sec)",value:e.delay_max,onChange:r=>t({...e,delay_max:r}),min:0,step:.1,helper:"Maximum wait before responding",info:"Also prevents collisions with other traffic by staggering transmissions."})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Max Length",value:e.max_length,onChange:r=>t({...e,max_length:r}),min:50,max:500,helper:"Maximum characters per response message",info:"Meshtastic packets have limited size. This caps how long each message chunk can be. The bot will split longer responses into multiple messages up to Max Messages."}),T.jsx(Ye,{label:"Max Messages",value:e.max_messages,onChange:r=>t({...e,max_messages:r}),min:1,max:10,helper:"Maximum chunks per response",info:"If a response is longer than Max Length, the bot splits it into this many chunks at most. Higher values = more complete answers but more airtime used."})]})]})}function bJe({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.history}),T.jsx(St,{label:"Database Path",value:e.database,onChange:r=>t({...e,database:r}),helper:"SQLite file for storing conversation history",info:"Path to the SQLite database file. Created automatically if it doesn't exist. Stores all conversation history for context."}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Max Messages Per User",value:e.max_messages_per_user,onChange:r=>t({...e,max_messages_per_user:r}),min:0,helper:"History limit per user (0 = unlimited)",info:"Limits how many messages are stored per user. Older messages are pruned when the limit is reached. Set to 0 for no limit."}),T.jsx(Ye,{label:"Conversation Timeout (sec)",value:e.conversation_timeout,onChange:r=>t({...e,conversation_timeout:r}),min:0,helper:"Seconds before context resets",info:"If a user doesn't message for this long, their next message starts a new conversation context. The bot won't remember the previous topic."})]}),T.jsx(Ot,{label:"Auto Cleanup",checked:e.auto_cleanup,onChange:r=>t({...e,auto_cleanup:r}),helper:"Automatically prune old conversations"}),e.auto_cleanup&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Cleanup Interval (hours)",value:e.cleanup_interval_hours,onChange:r=>t({...e,cleanup_interval_hours:r}),min:1,helper:"Hours between cleanup runs"}),T.jsx(Ye,{label:"Max Age (days)",value:e.max_age_days,onChange:r=>t({...e,max_age_days:r}),min:1,helper:"Delete conversations older than this"})]})]})}function wJe({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.memory}),T.jsx(Ot,{label:"Enable Memory",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Keep conversation context between messages"}),e.enabled&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Window Size",value:e.window_size,onChange:r=>t({...e,window_size:r}),min:1,helper:"Recent message pairs kept in full",info:"The bot keeps this many recent exchanges (user message + bot response pairs) as full text in context. Older messages are summarized to save token space."}),T.jsx(Ye,{label:"Summarize Threshold",value:e.summarize_threshold,onChange:r=>t({...e,summarize_threshold:r}),min:1,helper:"Messages before older context is summarized",info:"When the conversation exceeds this many messages, older ones outside the window are compressed into a summary by the LLM."})]})]})}function SJe({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.context}),T.jsx(Ot,{label:"Enable Passive Context",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Listen to channel traffic for context",info:"When enabled, the bot monitors mesh channels and includes recent messages in its context. This lets the bot reference things other people said on the channel."}),e.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(Tj,{label:"Observe Channels",value:e.observe_channels,onChange:r=>t({...e,observe_channels:r}),helper:"Channels to monitor (empty = all)",info:"Meshtastic channels to listen on. Leave empty to monitor all channels.",mode:"multi"}),T.jsx(Sj,{label:"Ignore Nodes",value:e.ignore_nodes,onChange:r=>t({...e,ignore_nodes:r}),helper:"Nodes to exclude from context",info:"Messages from these nodes won't be included in passive context. Useful for filtering out noisy automated nodes."}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Max Age (sec)",value:e.max_age,onChange:r=>t({...e,max_age:r}),min:0,helper:"Ignore messages older than this"}),T.jsx(Ye,{label:"Max Context Items",value:e.max_context_items,onChange:r=>t({...e,max_context_items:r}),min:1,helper:"Maximum recent messages to include"})]})]})]})}function TJe({data:e,onChange:t}){const r=new Set(e.disabled_commands.map(i=>i.toLowerCase())),n=i=>{const a=i.toLowerCase();r.has(a)?t({...e,disabled_commands:e.disabled_commands.filter(o=>o.toLowerCase()!==a)}):t({...e,disabled_commands:[...e.disabled_commands,i]})};return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.commands}),T.jsx(Ot,{label:"Enable Commands",checked:e.enabled,onChange:i=>t({...e,enabled:i}),helper:"Allow !commands on the mesh"}),e.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(St,{label:"Command Prefix",value:e.prefix,onChange:i=>t({...e,prefix:i}),helper:"Character that triggers commands (e.g. ! for !help)",info:"Users type this character followed by the command name. Only single characters recommended."}),T.jsxs("div",{className:"space-y-2",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Available Commands",T.jsx(Bo,{info:"Toggle commands on or off. Disabled commands won't respond when users invoke them."})]}),T.jsx("div",{className:"grid gap-1",children:vJe.map(i=>{const a=!r.has(i.name.toLowerCase());return T.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#0a0e17] border border-[#1e2a3a] rounded hover:border-[#2a3a4a] transition-colors",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs("code",{className:"text-accent text-sm",children:["!",i.name]}),T.jsx("span",{className:"text-xs text-slate-500",children:i.description})]}),T.jsx("button",{type:"button",onClick:()=>n(i.name),className:`relative w-9 h-5 rounded-full transition-colors ${a?"bg-accent":"bg-[#1e2a3a]"}`,children:T.jsx("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white transition-transform ${a?"translate-x-4":""}`})})]},i.name)})})]})]})]})}function CJe({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.llm}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(xo,{label:"Backend",value:e.backend,onChange:r=>t({...e,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}],helper:"LLM provider to use",info:"OpenAI: GPT models (gpt-4o, gpt-4o-mini). Anthropic: Claude models (claude-sonnet-4-20250514). Google: Gemini models. Can also point to compatible APIs like Ollama, LM Studio, or Open WebUI by changing the Base URL."}),T.jsx(St,{label:"Model",value:e.model,onChange:r=>t({...e,model:r}),placeholder:"gpt-4o-mini",helper:"Specific model name",info:"The specific model to use. Common choices: gpt-4o-mini (fast, cheap), gpt-4o (better, costs more), claude-sonnet-4-20250514 (Anthropic equivalent). For local models via Ollama, use the model name you pulled (e.g. llama3.1)."})]}),T.jsx(St,{label:"API Key",value:e.api_key,onChange:r=>t({...e,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax",info:"Your API key from the provider. You can also use ${ENV_VAR} syntax to read from an environment variable instead of storing the key in the config file."}),T.jsx(St,{label:"Base URL",value:e.base_url,onChange:r=>t({...e,base_url:r}),placeholder:"https://api.openai.com/v1",helper:"API endpoint (change for local LLMs)",info:"Default API endpoint for the selected backend. Change this to point to a local LLM server (Ollama at http://localhost:11434/v1, Open WebUI, LM Studio, etc.) or a proxy."}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Timeout (sec)",value:e.timeout,onChange:r=>t({...e,timeout:r}),min:5,max:120,helper:"Maximum seconds to wait for response"}),T.jsx(Ye,{label:"Max Response Tokens",value:e.max_response_tokens,onChange:r=>t({...e,max_response_tokens:r}),min:100,helper:"Token limit for LLM responses"})]}),T.jsx(Ot,{label:"Use System Prompt",checked:e.use_system_prompt,onChange:r=>t({...e,use_system_prompt:r}),helper:"Enable custom system instructions"}),e.use_system_prompt&&T.jsx(gJe,{label:"System Prompt",value:e.system_prompt,onChange:r=>t({...e,system_prompt:r}),rows:6,helper:"Instructions that shape the bot's personality",info:"Instructions that shape the bot's personality and behavior. The bot always follows these instructions. MeshAI adds mesh health data and environmental context automatically — you don't need to include those here."}),T.jsx(Ot,{label:"Web Search",checked:e.web_search,onChange:r=>t({...e,web_search:r}),helper:"Enable web search tool (Open WebUI feature)"}),T.jsx(Ot,{label:"Google Grounding",checked:e.google_grounding,onChange:r=>t({...e,google_grounding:r}),helper:"Ground responses in web search (Gemini only)"})]})}function AJe({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.weather}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(xo,{label:"Primary Provider",value:e.primary,onChange:r=>t({...e,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}],helper:"Main weather data source"}),T.jsx(xo,{label:"Fallback Provider",value:e.fallback,onChange:r=>t({...e,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}],helper:"Backup if primary fails"})]}),T.jsx(St,{label:"Default Location",value:e.default_location,onChange:r=>t({...e,default_location:r}),placeholder:"Your city, state",helper:"Location when none specified"})]})}function MJe({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.meshmonitor}),T.jsx(Ot,{label:"Enable MeshMonitor",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Connect to AIDA MeshMonitor instance",info:"MeshMonitor by Yeraze provides node data, battery info, telemetry, and auto-responder patterns. MeshAI uses this as a data source and avoids duplicate responses."}),e.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(St,{label:"URL",value:e.url,onChange:r=>t({...e,url:r}),placeholder:"http://192.168.1.100:8080",helper:"MeshMonitor API endpoint",info:"Full URL to your MeshMonitor instance. Usually runs on port 8080."}),T.jsx(Ot,{label:"Inject Into Prompt",checked:e.inject_into_prompt,onChange:r=>t({...e,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands",info:"Adds MeshMonitor's auto-responder patterns to the LLM context so it knows what commands MeshMonitor handles."}),T.jsx(Ye,{label:"Refresh Interval (sec)",value:e.refresh_interval,onChange:r=>t({...e,refresh_interval:r}),min:10,helper:"How often to fetch patterns"}),T.jsx(Ot,{label:"Polite Mode",checked:e.polite_mode,onChange:r=>t({...e,polite_mode:r}),helper:"Reduce polling frequency",info:"Reduces polling frequency for shared instances to be a good neighbor."})]})]})}function PJe({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.knowledge}),T.jsx(Ot,{label:"Enable Knowledge Base",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Answer questions from stored documents",info:"Uses RAG (Retrieval-Augmented Generation) to answer questions from a knowledge base. Supports Qdrant vector database or local SQLite with FTS5."}),e.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(xo,{label:"Backend",value:e.backend,onChange:r=>t({...e,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}],helper:"Knowledge storage backend",info:"Auto tries Qdrant first, falls back to SQLite. Qdrant provides hybrid search with dense+sparse embeddings. SQLite uses FTS5 keyword search."}),(e.backend==="qdrant"||e.backend==="auto")&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(St,{label:"Qdrant Host",value:e.qdrant_host,onChange:r=>t({...e,qdrant_host:r}),helper:"Qdrant server hostname",info:"IP or hostname of your Qdrant vector database server."}),T.jsx(Ye,{label:"Qdrant Port",value:e.qdrant_port,onChange:r=>t({...e,qdrant_port:r}),helper:"Default 6333"})]}),T.jsx(St,{label:"Collection",value:e.qdrant_collection,onChange:r=>t({...e,qdrant_collection:r}),helper:"Qdrant collection name"}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(St,{label:"TEI Host",value:e.tei_host,onChange:r=>t({...e,tei_host:r}),helper:"Text Embeddings Inference host",info:"TEI service for generating dense embeddings. Uses BAAI/bge-m3 model."}),T.jsx(Ye,{label:"TEI Port",value:e.tei_port,onChange:r=>t({...e,tei_port:r}),helper:"Default 8090"})]}),T.jsx(Ot,{label:"Use Sparse Embeddings",checked:e.use_sparse,onChange:r=>t({...e,use_sparse:r}),helper:"Enable hybrid search with sparse vectors",info:"Combines dense embeddings with sparse (keyword-based) embeddings using Reciprocal Rank Fusion for better search results."})]}),T.jsx(St,{label:"SQLite DB Path",value:e.db_path,onChange:r=>t({...e,db_path:r}),helper:"Local knowledge database file"}),T.jsx(Ye,{label:"Top K Results",value:e.top_k,onChange:r=>t({...e,top_k:r}),min:1,max:20,helper:"Number of documents to retrieve"})]})]})}function LJe({source:e,onChange:t,onDelete:r}){const[n,i]=W.useState(!1),a={meshview:"Web-based mesh monitoring tool. Enter the full URL of a MeshView instance. No API key typically required.",meshmonitor:"AIDA MeshMonitor API. Provides node data and network statistics. Requires API token.",mqtt:"Subscribe directly to a Meshtastic MQTT broker for real-time packet data. This is push-based (instant) vs the polling approach of MeshView/MeshMonitor."};return T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[T.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[T.jsxs("div",{className:"flex items-center gap-3",children:[n?T.jsx(Ny,{size:16}):T.jsx(cm,{size:16}),T.jsx("div",{className:`w-2 h-2 rounded-full ${e.enabled?"bg-green-500":"bg-slate-500"}`}),T.jsx("span",{className:"font-mono text-sm text-slate-200",children:e.name||"Unnamed Source"}),T.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:e.type})]}),T.jsx("button",{onClick:o=>{o.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:T.jsx(EE,{size:14})})]}),n&&T.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(St,{label:"Name",value:e.name,onChange:o=>t({...e,name:o}),helper:"Friendly name for this source"}),T.jsx(xo,{label:"Type",value:e.type,onChange:o=>t({...e,type:o}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}],info:a[e.type]||""})]}),e.type!=="mqtt"&&T.jsx(St,{label:"URL",value:e.url,onChange:o=>t({...e,url:o}),helper:"Full URL including protocol"}),e.type==="meshmonitor"&&T.jsx(St,{label:"API Token",value:e.api_token,onChange:o=>t({...e,api_token:o}),type:"password",helper:"Bearer token for authentication"}),e.type==="mqtt"&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(St,{label:"Host",value:e.host||"",onChange:o=>t({...e,host:o}),helper:"MQTT broker hostname"}),T.jsx(Ye,{label:"Port",value:e.port||1883,onChange:o=>t({...e,port:o}),min:1,max:65535,helper:"1883 plain, 8883 TLS"})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(St,{label:"Username",value:e.username||"",onChange:o=>t({...e,username:o})}),T.jsx(St,{label:"Password",value:e.password||"",onChange:o=>t({...e,password:o}),type:"password"})]}),T.jsx(St,{label:"Topic Root",value:e.topic_root||"msh/US",onChange:o=>t({...e,topic_root:o}),helper:"Base topic to subscribe to"}),T.jsx(Ot,{label:"Use TLS",checked:e.use_tls||!1,onChange:o=>t({...e,use_tls:o}),helper:"Encrypt MQTT connection"})]}),T.jsx(Ye,{label:"Refresh Interval (sec)",value:e.refresh_interval,onChange:o=>t({...e,refresh_interval:o}),min:10,helper:"Polling frequency"}),T.jsx(Ot,{label:"Enabled",checked:e.enabled,onChange:o=>t({...e,enabled:o})}),T.jsx(Ot,{label:"Polite Mode",checked:e.polite_mode,onChange:o=>t({...e,polite_mode:o}),helper:"Reduce polling for shared instances"})]})]})}function kJe({data:e,onChange:t}){const r=()=>{t([...e,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.mesh_sources}),e.map((n,i)=>T.jsx(LJe,{source:n,onChange:a=>{const o=[...e];o[i]=a,t(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&t(e.filter((a,o)=>o!==i))}},i)),T.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[T.jsx(dS,{size:16})," Add Source"]})]})}function OJe({data:e,onChange:t}){const[r,n]=W.useState(null);return T.jsxs("div",{className:"space-y-6",children:[T.jsx(Zn,{text:Un.mesh_intelligence}),T.jsx(Ot,{label:"Enable Mesh Intelligence",checked:e.enabled,onChange:i=>t({...e,enabled:i}),helper:"Activate health scoring and alerting"}),e.enabled&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Locality Radius (miles)",value:e.locality_radius_miles,onChange:i=>t({...e,locality_radius_miles:i}),min:1,step:.5,helper:"Region assignment radius",info:"Nodes within this distance of a region anchor point are assigned to that region."}),T.jsx(Ye,{label:"Offline Threshold (hours)",value:e.offline_threshold_hours,onChange:i=>t({...e,offline_threshold_hours:i}),min:1,helper:"Time until node marked offline",info:"A node is considered offline after not being heard for this many hours."})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Packet Threshold",value:e.packet_threshold,onChange:i=>t({...e,packet_threshold:i}),min:0,helper:"Min packets per 24h to flag",info:"Minimum packets per 24 hours. Nodes below this are flagged as low activity."}),T.jsx(Ye,{label:"Battery Warning %",value:e.battery_warning_percent,onChange:i=>t({...e,battery_warning_percent:i}),min:1,max:100,helper:"Global battery warning level"})]}),T.jsx(Sj,{label:"Critical Nodes",value:e.critical_nodes,onChange:i=>t({...e,critical_nodes:i}),helper:"Critical infrastructure nodes",info:"Nodes that get priority alerting when they go offline.",roleFilter:"infrastructure"}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Tj,{label:"Alert Channel",value:e.alert_channel,onChange:i=>t({...e,alert_channel:i}),helper:"Channel for broadcast alerts",info:"Meshtastic channel for broadcast alerts. Select Disabled to turn off channel broadcasting.",mode:"single",includeDisabled:!0}),T.jsx(Ye,{label:"Alert Cooldown (min)",value:e.alert_cooldown_minutes,onChange:i=>t({...e,alert_cooldown_minutes:i}),min:1,helper:"Min time between repeat alerts",info:"Minimum minutes between repeated alerts for the same condition. Uses scaling cooldown (12h, 24h, 48h)."})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Regions",T.jsx(Bo,{info:"Regions group mesh nodes by geographic area. Each region has an anchor point (lat/lon) and nodes within the region radius are automatically assigned. Regions enable localized reports, alerts, and health scoring."})]}),e.regions.map((i,a)=>T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[T.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:[T.jsxs("div",{className:"flex items-center gap-3",children:[r===a?T.jsx(Ny,{size:16}):T.jsx(cm,{size:16}),T.jsx("span",{className:"font-medium text-slate-200",children:i.name||"Unnamed Region"}),T.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]}),T.jsx("button",{onClick:o=>{if(o.stopPropagation(),confirm(`Delete region "${i.name||"Unnamed Region"}"?`)){const s=e.regions.filter((l,u)=>u!==a);t({...e,regions:s})}},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:T.jsx(EE,{size:14})})]}),r===a&&T.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(St,{label:"Name",value:i.name,onChange:o=>{const s=[...e.regions];s[a]={...i,name:o},t({...e,regions:s})}}),T.jsx(St,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...e.regions];s[a]={...i,local_name:o},t({...e,regions:s})}})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...e.regions];s[a]={...i,lat:o},t({...e,regions:s})},step:1e-4}),T.jsx(Ye,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...e.regions];s[a]={...i,lon:o},t({...e,regions:s})},step:1e-4})]}),T.jsx(St,{label:"Description",value:i.description,onChange:o=>{const s=[...e.regions];s[a]={...i,description:o},t({...e,regions:s})}}),T.jsx(Bh,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...e.regions];s[a]={...i,aliases:o},t({...e,regions:s})}}),T.jsx(Bh,{label:"Cities",value:i.cities,onChange:o=>{const s=[...e.regions];s[a]={...i,cities:o},t({...e,regions:s})}})]})]},a)),T.jsxs("button",{onClick:()=>{const i={name:"",local_name:"",lat:0,lon:0,description:"",aliases:[],cities:[]};t({...e,regions:[...e.regions,i]}),n(e.regions.length)},className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[T.jsx(dS,{size:16})," Add Region"]})]}),T.jsxs("div",{className:"space-y-3",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Rules",T.jsx(Bo,{info:"Configure which conditions trigger alerts. Each rule can have an optional threshold value."})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Infrastructure"}),T.jsx(bn,{label:"Infra Offline",description:"Alert when an infrastructure node (router/repeater) goes offline",checked:e.alert_rules.infra_offline,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_offline:i}})}),T.jsx(bn,{label:"Infra Recovery",description:"Alert when an offline infrastructure node comes back online",checked:e.alert_rules.infra_recovery,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_recovery:i}})}),T.jsx(bn,{label:"New Router",description:"Alert when a new router/repeater appears on the mesh",checked:e.alert_rules.new_router,onChange:i=>t({...e,alert_rules:{...e.alert_rules,new_router:i}})}),T.jsx(bn,{label:"Feeder Offline",description:"Alert when a data source (MeshView/MeshMonitor) stops responding",checked:e.alert_rules.feeder_offline,onChange:i=>t({...e,alert_rules:{...e.alert_rules,feeder_offline:i}})}),T.jsx(bn,{label:"Single Gateway",description:"Alert when an infrastructure node has only one connection path",checked:e.alert_rules.infra_single_gateway,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_single_gateway:i}})}),T.jsx(bn,{label:"Region Blackout",description:"Alert when all infrastructure in a region goes offline",checked:e.alert_rules.region_total_blackout,onChange:i=>t({...e,alert_rules:{...e.alert_rules,region_total_blackout:i}})})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Power"}),T.jsx(bn,{label:"Battery Warning",description:"Alert when infra node battery drops below warning threshold",checked:e.alert_rules.battery_warning,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_warning:i}}),threshold:e.alert_rules.battery_warning_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_warning_threshold:i}}),thresholdLabel:"Below",thresholdMin:10,thresholdMax:90,thresholdSuffix:"%"}),T.jsx(bn,{label:"Battery Critical",description:"Alert at critical battery level",checked:e.alert_rules.battery_critical,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_critical:i}}),threshold:e.alert_rules.battery_critical_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_critical_threshold:i}}),thresholdLabel:"Below",thresholdMin:5,thresholdMax:50,thresholdSuffix:"%"}),T.jsx(bn,{label:"Battery Emergency",description:"Alert at emergency battery level",checked:e.alert_rules.battery_emergency,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_emergency:i}}),threshold:e.alert_rules.battery_emergency_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_emergency_threshold:i}}),thresholdLabel:"Below",thresholdMin:1,thresholdMax:25,thresholdSuffix:"%"}),T.jsx(bn,{label:"Battery Trend Declining",description:"Alert when battery shows a declining trend over 7 days",checked:e.alert_rules.battery_trend_declining,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_trend_declining:i}})}),T.jsx(bn,{label:"Power Source Change",description:"Alert when a node switches between battery and USB power",checked:e.alert_rules.power_source_change,onChange:i=>t({...e,alert_rules:{...e.alert_rules,power_source_change:i}})}),T.jsx(bn,{label:"Solar Not Charging",description:"Alert when a solar-powered node isn't charging during daylight",checked:e.alert_rules.solar_not_charging,onChange:i=>t({...e,alert_rules:{...e.alert_rules,solar_not_charging:i}})})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Utilization"}),T.jsx(bn,{label:"High Utilization",description:"Alert when channel utilization stays high for extended periods",checked:e.alert_rules.sustained_high_util,onChange:i=>t({...e,alert_rules:{...e.alert_rules,sustained_high_util:i}}),threshold:e.alert_rules.high_util_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,high_util_threshold:i}}),thresholdLabel:"Above",thresholdMin:5,thresholdMax:50,thresholdSuffix:`% for ${e.alert_rules.high_util_hours}h`}),T.jsx(bn,{label:"Packet Flood",description:"Alert when a single node sends excessive packets",checked:e.alert_rules.packet_flood,onChange:i=>t({...e,alert_rules:{...e.alert_rules,packet_flood:i}}),threshold:e.alert_rules.packet_flood_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,packet_flood_threshold:i}}),thresholdLabel:"Over",thresholdMin:100,thresholdMax:2e3,thresholdSuffix:"pkts/24h"})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Health Scores"}),T.jsx(bn,{label:"Mesh Score Alert",description:"Alert when overall mesh health score drops below threshold",checked:e.alert_rules.mesh_score_alert,onChange:i=>t({...e,alert_rules:{...e.alert_rules,mesh_score_alert:i}}),threshold:e.alert_rules.mesh_score_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,mesh_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"}),T.jsx(bn,{label:"Region Score Alert",description:"Alert when a region's health score drops below threshold",checked:e.alert_rules.region_score_alert,onChange:i=>t({...e,alert_rules:{...e.alert_rules,region_score_alert:i}}),threshold:e.alert_rules.region_score_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,region_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"})]})]})]})]})}function DJe({data:e,onChange:t}){var r,n,i,a,o,s,l,u,c,f,h,d,v,g,m,y;return T.jsxs("div",{className:"space-y-6",children:[T.jsx(Zn,{text:Un.environmental}),T.jsx(Ot,{label:"Enable Environmental Feeds",checked:e.enabled,onChange:_=>t({...e,enabled:_}),helper:"Activate live data polling"}),e.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(Bh,{label:"NWS Zones",value:e.nws_zones,onChange:_=>t({...e,nws_zones:_}),helper:"Zone IDs like IDZ016, IDZ030",info:"NWS forecast zones covering your mesh area. Find yours at https://www.weather.gov/pimar/PubZone",infoLink:"https://www.weather.gov/pimar/PubZone"}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),T.jsx(Ot,{label:"",checked:e.nws.enabled,onChange:_=>t({...e,nws:{...e.nws,enabled:_}})})]}),e.nws.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(St,{label:"User Agent",value:e.nws.user_agent,onChange:_=>t({...e,nws:{...e.nws,user_agent:_}}),placeholder:"(MeshAI, your@email.com)",helper:"Required format: (app_name, contact_email)",info:"Required by NWS. You make it up - just use the format (app_name, your_email). No signup needed."}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Tick Seconds",value:e.nws.tick_seconds,onChange:_=>t({...e,nws:{...e.nws,tick_seconds:_}}),min:30,helper:"Polling interval"}),T.jsx(xo,{label:"Min Severity",value:e.nws.severity_min,onChange:_=>t({...e,nws:{...e.nws,severity_min:_}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}],helper:"Filter out lower severity alerts",info:"Minimum severity level to display. 'Moderate' filters out minor advisories. 'Severe' shows only serious warnings."})]})]})]}),T.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),T.jsx("p",{className:"text-xs text-slate-600",children:"Solar indices, geomagnetic storms, HF propagation"})]}),T.jsx(Ot,{label:"",checked:e.swpc.enabled,onChange:_=>t({...e,swpc:{...e.swpc,enabled:_}})})]})}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),T.jsx("p",{className:"text-xs text-slate-600",children:"VHF/UHF extended range conditions"})]}),T.jsx(Ot,{label:"",checked:e.ducting.enabled,onChange:_=>t({...e,ducting:{...e.ducting,enabled:_}})})]}),e.ducting.enabled&&T.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[T.jsx(Ye,{label:"Tick Seconds",value:e.ducting.tick_seconds,onChange:_=>t({...e,ducting:{...e.ducting,tick_seconds:_}}),min:60}),T.jsx(Ye,{label:"Latitude",value:e.ducting.latitude,onChange:_=>t({...e,ducting:{...e.ducting,latitude:_}}),step:.01,info:"Center point of your mesh coverage area. The ducting adapter checks atmospheric conditions at this location."}),T.jsx(Ye,{label:"Longitude",value:e.ducting.longitude,onChange:_=>t({...e,ducting:{...e.ducting,longitude:_}}),step:.01})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),T.jsx("p",{className:"text-xs text-slate-600",children:"Active wildfires from National Interagency Fire Center"})]}),T.jsx(Ot,{label:"",checked:e.fires.enabled,onChange:_=>t({...e,fires:{...e.fires,enabled:_}})})]}),e.fires.enabled&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Ye,{label:"Tick Seconds",value:e.fires.tick_seconds,onChange:_=>t({...e,fires:{...e.fires,tick_seconds:_}}),min:60}),T.jsx(xo,{label:"State",value:e.fires.state,onChange:_=>t({...e,fires:{...e.fires,state:_}}),options:pJe,helper:"Filter fires by state",info:"Two-letter state code for NIFC wildfire filtering."})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),T.jsx("p",{className:"text-xs text-slate-600",children:"Backcountry avalanche danger ratings"})]}),T.jsx(Ot,{label:"",checked:e.avalanche.enabled,onChange:_=>t({...e,avalanche:{...e.avalanche,enabled:_}})})]}),e.avalanche.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(Ye,{label:"Tick Seconds",value:e.avalanche.tick_seconds,onChange:_=>t({...e,avalanche:{...e.avalanche,tick_seconds:_}}),min:60}),T.jsx(Bh,{label:"Center IDs",value:e.avalanche.center_ids,onChange:_=>t({...e,avalanche:{...e.avalanche,center_ids:_}}),helper:"e.g., SNFAC, IPAC, FAC",info:"Find your local center at https://avalanche.org/avalanche-centers/",infoLink:"https://avalanche.org/avalanche-centers/"}),T.jsx(mJe,{label:"Season Months",value:e.avalanche.season_months,onChange:_=>t({...e,avalanche:{...e.avalanche,season_months:_}}),helper:"e.g., 12, 1, 2, 3, 4",info:"Months when avalanche forecasts are active. Default Dec-Apr. Adjust for your region's season."})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"USGS Stream Gauges"}),T.jsx("p",{className:"text-xs text-slate-600",children:"River and stream water levels"})]}),T.jsx(Ot,{label:"",checked:((r=e.usgs)==null?void 0:r.enabled)||!1,onChange:_=>{var x,w;return t({...e,usgs:{...e.usgs,enabled:_,tick_seconds:((x=e.usgs)==null?void 0:x.tick_seconds)||900,sites:((w=e.usgs)==null?void 0:w.sites)||[]}})}})]}),((n=e.usgs)==null?void 0:n.enabled)&&T.jsxs(T.Fragment,{children:[T.jsx(Ye,{label:"Tick Seconds",value:e.usgs.tick_seconds,onChange:_=>t({...e,usgs:{...e.usgs,tick_seconds:_}}),min:900,helper:"Minimum 15 min (900s)"}),T.jsx(Bh,{label:"Site IDs",value:e.usgs.sites,onChange:_=>t({...e,usgs:{...e.usgs,sites:_}}),helper:"USGS gauge site numbers",info:"Find site IDs at waterdata.usgs.gov/nwis",infoLink:"https://waterdata.usgs.gov/nwis"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"TomTom Traffic"}),T.jsx("p",{className:"text-xs text-slate-600",children:"Traffic flow on monitored corridors"})]}),T.jsx(Ot,{label:"",checked:((i=e.traffic)==null?void 0:i.enabled)||!1,onChange:_=>{var x,w,S;return t({...e,traffic:{...e.traffic,enabled:_,tick_seconds:((x=e.traffic)==null?void 0:x.tick_seconds)||300,api_key:((w=e.traffic)==null?void 0:w.api_key)||"",corridors:((S=e.traffic)==null?void 0:S.corridors)||[]}})}})]}),((a=e.traffic)==null?void 0:a.enabled)&&T.jsxs(T.Fragment,{children:[T.jsx(St,{label:"API Key",value:e.traffic.api_key,onChange:_=>t({...e,traffic:{...e.traffic,api_key:_}}),type:"password",helper:"Get key at developer.tomtom.com",infoLink:"https://developer.tomtom.com"}),T.jsx(Ye,{label:"Tick Seconds",value:e.traffic.tick_seconds,onChange:_=>t({...e,traffic:{...e.traffic,tick_seconds:_}}),min:60}),T.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors (each with name, lat, lon):"}),(e.traffic.corridors||[]).map((_,x)=>T.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[T.jsx(St,{label:"Name",value:_.name,onChange:w=>{const S=[...e.traffic.corridors];S[x]={..._,name:w},t({...e,traffic:{...e.traffic,corridors:S}})}}),T.jsx(Ye,{label:"Lat",value:_.lat,onChange:w=>{const S=[...e.traffic.corridors];S[x]={..._,lat:w},t({...e,traffic:{...e.traffic,corridors:S}})},step:.01}),T.jsx(Ye,{label:"Lon",value:_.lon,onChange:w=>{const S=[...e.traffic.corridors];S[x]={..._,lon:w},t({...e,traffic:{...e.traffic,corridors:S}})},step:.01}),T.jsx("button",{onClick:()=>t({...e,traffic:{...e.traffic,corridors:e.traffic.corridors.filter((w,S)=>S!==x)}}),className:"px-2 py-2 text-xs text-red-400 hover:text-red-300 border border-red-400/30 rounded",children:"Remove"})]},x)),T.jsx("button",{onClick:()=>t({...e,traffic:{...e.traffic,corridors:[...e.traffic.corridors||[],{name:"",lat:0,lon:0}]}}),className:"text-xs text-accent hover:underline",children:"+ Add Corridor"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"511 Road Conditions"}),T.jsx("p",{className:"text-xs text-slate-600",children:"State DOT road events and closures"})]}),T.jsx(Ot,{label:"",checked:((o=e.roads511)==null?void 0:o.enabled)||!1,onChange:_=>{var x,w,S,C,M;return t({...e,roads511:{...e.roads511,enabled:_,tick_seconds:((x=e.roads511)==null?void 0:x.tick_seconds)||300,api_key:((w=e.roads511)==null?void 0:w.api_key)||"",base_url:((S=e.roads511)==null?void 0:S.base_url)||"",endpoints:((C=e.roads511)==null?void 0:C.endpoints)||["/get/event"],bbox:((M=e.roads511)==null?void 0:M.bbox)||[]}})}})]}),((s=e.roads511)==null?void 0:s.enabled)&&T.jsxs(T.Fragment,{children:[T.jsx(St,{label:"Base URL",value:e.roads511.base_url,onChange:_=>t({...e,roads511:{...e.roads511,base_url:_}}),placeholder:"https://511.yourstate.gov/api/v2",helper:"State 511 API endpoint"}),T.jsx(St,{label:"API Key",value:e.roads511.api_key,onChange:_=>t({...e,roads511:{...e.roads511,api_key:_}}),type:"password",helper:"Leave empty if not required"}),T.jsx(Ye,{label:"Tick Seconds",value:e.roads511.tick_seconds,onChange:_=>t({...e,roads511:{...e.roads511,tick_seconds:_}}),min:60}),T.jsx(Bh,{label:"Endpoints",value:e.roads511.endpoints,onChange:_=>t({...e,roads511:{...e.roads511,endpoints:_}}),helper:"e.g., /get/event, /get/mountainpasses"}),T.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[T.jsx(Ye,{label:"West",value:((l=e.roads511.bbox)==null?void 0:l[0])||0,onChange:_=>{const x=[...e.roads511.bbox||[0,0,0,0]];x[0]=_,t({...e,roads511:{...e.roads511,bbox:x}})},step:.01}),T.jsx(Ye,{label:"South",value:((u=e.roads511.bbox)==null?void 0:u[1])||0,onChange:_=>{const x=[...e.roads511.bbox||[0,0,0,0]];x[1]=_,t({...e,roads511:{...e.roads511,bbox:x}})},step:.01}),T.jsx(Ye,{label:"East",value:((c=e.roads511.bbox)==null?void 0:c[2])||0,onChange:_=>{const x=[...e.roads511.bbox||[0,0,0,0]];x[2]=_,t({...e,roads511:{...e.roads511,bbox:x}})},step:.01}),T.jsx(Ye,{label:"North",value:((f=e.roads511.bbox)==null?void 0:f[3])||0,onChange:_=>{const x=[...e.roads511.bbox||[0,0,0,0]];x[3]=_,t({...e,roads511:{...e.roads511,bbox:x}})},step:.01})]}),T.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box filter (leave all 0 to disable)"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NASA FIRMS Satellite Fire Detection"}),T.jsx("p",{className:"text-xs text-slate-600",children:"Near real-time thermal anomalies from satellites"})]}),T.jsx(Ot,{label:"",checked:((h=e.firms)==null?void 0:h.enabled)||!1,onChange:_=>{var x,w,S,C,M,P,k;return t({...e,firms:{...e.firms,enabled:_,tick_seconds:((x=e.firms)==null?void 0:x.tick_seconds)||1800,map_key:((w=e.firms)==null?void 0:w.map_key)||"",source:((S=e.firms)==null?void 0:S.source)||"VIIRS_SNPP_NRT",bbox:((C=e.firms)==null?void 0:C.bbox)||[],day_range:((M=e.firms)==null?void 0:M.day_range)||1,confidence_min:((P=e.firms)==null?void 0:P.confidence_min)||"nominal",proximity_km:((k=e.firms)==null?void 0:k.proximity_km)||10}})}})]}),((d=e.firms)==null?void 0:d.enabled)&&T.jsxs(T.Fragment,{children:[T.jsx(St,{label:"MAP Key",value:e.firms.map_key,onChange:_=>t({...e,firms:{...e.firms,map_key:_}}),type:"password",helper:"Get key at firms.modaps.eosdis.nasa.gov/api/area/",infoLink:"https://firms.modaps.eosdis.nasa.gov/api/area/"}),T.jsx(Ye,{label:"Tick Seconds",value:e.firms.tick_seconds,onChange:_=>t({...e,firms:{...e.firms,tick_seconds:_}}),min:300,helper:"Minimum 5 min (300s)"}),T.jsx(xo,{label:"Satellite Source",value:e.firms.source,onChange:_=>t({...e,firms:{...e.firms,source:_}}),options:[{value:"VIIRS_SNPP_NRT",label:"VIIRS SNPP (Near Real-Time)"},{value:"VIIRS_NOAA20_NRT",label:"VIIRS NOAA-20 (Near Real-Time)"},{value:"MODIS_NRT",label:"MODIS (Near Real-Time)"}]}),T.jsx(Ye,{label:"Day Range",value:e.firms.day_range,onChange:_=>t({...e,firms:{...e.firms,day_range:_}}),min:1,max:10,helper:"1-10 days of data"}),T.jsx(xo,{label:"Minimum Confidence",value:e.firms.confidence_min,onChange:_=>t({...e,firms:{...e.firms,confidence_min:_}}),options:[{value:"low",label:"Low"},{value:"nominal",label:"Nominal"},{value:"high",label:"High"}]}),T.jsx(Ye,{label:"Proximity (km)",value:e.firms.proximity_km,onChange:_=>t({...e,firms:{...e.firms,proximity_km:_}}),step:.5,helper:"Distance to match known fires"}),T.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[T.jsx(Ye,{label:"West",value:((v=e.firms.bbox)==null?void 0:v[0])||0,onChange:_=>{const x=[...e.firms.bbox||[0,0,0,0]];x[0]=_,t({...e,firms:{...e.firms,bbox:x}})},step:.01}),T.jsx(Ye,{label:"South",value:((g=e.firms.bbox)==null?void 0:g[1])||0,onChange:_=>{const x=[...e.firms.bbox||[0,0,0,0]];x[1]=_,t({...e,firms:{...e.firms,bbox:x}})},step:.01}),T.jsx(Ye,{label:"East",value:((m=e.firms.bbox)==null?void 0:m[2])||0,onChange:_=>{const x=[...e.firms.bbox||[0,0,0,0]];x[2]=_,t({...e,firms:{...e.firms,bbox:x}})},step:.01}),T.jsx(Ye,{label:"North",value:((y=e.firms.bbox)==null?void 0:y[3])||0,onChange:_=>{const x=[...e.firms.bbox||[0,0,0,0]];x[3]=_,t({...e,firms:{...e.firms,bbox:x}})},step:.01})]}),T.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box for monitoring area (required)"})]})]})]})]})}function EJe({data:e,onChange:t}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Zn,{text:Un.dashboard}),T.jsx(Ot,{label:"Enable Dashboard",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Run the web dashboard"}),e.enabled&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(St,{label:"Host",value:e.host,onChange:r=>t({...e,host:r}),placeholder:"0.0.0.0",helper:"Network bind address",info:"0.0.0.0 = accessible from any device on the network. 127.0.0.1 = only accessible from this machine."}),T.jsx(Ye,{label:"Port",value:e.port,onChange:r=>t({...e,port:r}),min:1,max:65535,helper:"Dashboard URL port",info:"Port number for the web dashboard URL. You access the dashboard at http://your-ip:port"})]})]})}function IJe(){var k;const[e,t]=W.useState(null),[r,n]=W.useState(null),[i,a]=W.useState("bot"),[o,s]=W.useState(!0),[l,u]=W.useState(!1),[c,f]=W.useState(null),[h,d]=W.useState(null),[v,g]=W.useState(!1),[m,y]=W.useState(!1),_=W.useCallback(async()=>{try{const O=await fetch("/api/config");if(!O.ok)throw new Error("Failed to fetch config");const D=await O.json();t(D),n(JSON.parse(JSON.stringify(D))),y(!1),f(null)}catch(O){f(O instanceof Error?O.message:"Unknown error")}finally{s(!1)}},[]);W.useEffect(()=>{document.title="Config — MeshAI",_()},[_]),W.useEffect(()=>{e&&r&&y(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);const x=async()=>{if(e){u(!0),f(null),d(null);try{const O=e[i],D=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)}),I=await D.json();if(!D.ok)throw new Error(I.detail||"Save failed");d(`${i} saved successfully`),n(JSON.parse(JSON.stringify(e))),y(!1),I.restart_required&&g(!0),setTimeout(()=>d(null),3e3)}catch(O){f(O instanceof Error?O.message:"Save failed")}finally{u(!1)}}},w=()=>{r&&(t(JSON.parse(JSON.stringify(r))),y(!1))},S=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),d("Restart initiated")}catch{f("Restart failed")}},C=(O,D)=>{e&&t({...e,[O]:D})};if(o)return T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!e)return T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const M=()=>{switch(i){case"bot":return T.jsx(yJe,{data:e.bot,onChange:O=>C("bot",O)});case"connection":return T.jsx(_Je,{data:e.connection,onChange:O=>C("connection",O)});case"response":return T.jsx(xJe,{data:e.response,onChange:O=>C("response",O)});case"history":return T.jsx(bJe,{data:e.history,onChange:O=>C("history",O)});case"memory":return T.jsx(wJe,{data:e.memory,onChange:O=>C("memory",O)});case"context":return T.jsx(SJe,{data:e.context,onChange:O=>C("context",O)});case"commands":return T.jsx(TJe,{data:e.commands,onChange:O=>C("commands",O)});case"llm":return T.jsx(CJe,{data:e.llm,onChange:O=>C("llm",O)});case"weather":return T.jsx(AJe,{data:e.weather,onChange:O=>C("weather",O)});case"meshmonitor":return T.jsx(MJe,{data:e.meshmonitor,onChange:O=>C("meshmonitor",O)});case"knowledge":return T.jsx(PJe,{data:e.knowledge,onChange:O=>C("knowledge",O)});case"mesh_sources":return T.jsx(kJe,{data:e.mesh_sources,onChange:O=>C("mesh_sources",O)});case"mesh_intelligence":return T.jsx(OJe,{data:e.mesh_intelligence,onChange:O=>C("mesh_intelligence",O)});case"environmental":return T.jsx(DJe,{data:e.environmental,onChange:O=>C("environmental",O)});case"dashboard":return T.jsx(EJe,{data:e.dashboard,onChange:O=>C("dashboard",O)});default:return null}},P=((k=CU.find(O=>O.key===i))==null?void 0:k.label)||i;return T.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[T.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:CU.map(({key:O,label:D,icon:I})=>T.jsxs("button",{onClick:()=>a(O),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===O?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[T.jsx(I,{size:16}),T.jsx("span",{children:D}),m&&i===O&&T.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},O))}),T.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[T.jsxs("div",{className:"flex items-center justify-between mb-6",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx(dZ,{size:20,className:"text-slate-500"}),T.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:P})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[m&&T.jsxs("button",{onClick:w,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[T.jsx(uZ,{size:14}),"Discard"]}),T.jsxs("button",{onClick:x,disabled:l||!m,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?T.jsx(lZ,{size:14,className:"animate-spin"}):T.jsx(fZ,{size:14}),"Save"]})]})]}),v&&T.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[T.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[T.jsx(Ps,{size:16}),T.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),T.jsx("button",{onClick:S,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&T.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[T.jsx(jy,{size:16}),T.jsx("span",{className:"text-sm",children:c})]}),h&&T.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[T.jsx(cd,{size:16}),T.jsx("span",{className:"text-sm",children:h})]}),T.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:T.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:M()})})]})]})}const AU={infra_offline:Zue,infra_recovery:vZ,battery_warning:ZC,battery_critical:ZC,battery_emergency:ZC,hf_blackout:dm,uhf_ducting:Fc,weather_warning:$c,weather_watch:$c,new_router:Fc,packet_flood:Ps,sustained_high_util:Ps,region_blackout:Ry,default:Eb};function NJe(e){return AU[e]||AU.default}function Lie(e){switch(e==null?void 0:e.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",badge:"bg-red-500/20 text-red-400",iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",badge:"bg-amber-500/20 text-amber-400",iconColor:"text-amber-500"};case"watch":return{bg:"bg-yellow-500/10",border:"border-yellow-500",badge:"bg-yellow-500/20 text-yellow-400",iconColor:"text-yellow-500"};case"advisory":case"info":default:return{bg:"bg-blue-500/10",border:"border-blue-500",badge:"bg-blue-500/20 text-blue-400",iconColor:"text-blue-500"}}}function RJe(e){const t=typeof e=="number"?new Date(e*1e3):new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/1e3),a=Math.floor(i/60),o=Math.floor(a/60),s=Math.floor(o/24);return i<60?"Just now":a<60?`${a}m ago`:o<24?`${o}h ago`:`${s}d ago`}function jJe(e){return(typeof e=="number"?new Date(e*1e3):new Date(e)).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}function BJe(e){return e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h ${Math.floor(e%3600/60)}m`:`${Math.floor(e/86400)}d`}function zJe({alert:e,onAcknowledge:t}){var i;const r=Lie(e.severity),n=NJe(e.type);return T.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-4 ${r.border}`,children:T.jsxs("div",{className:"flex items-start gap-3",children:[T.jsx(n,{size:20,className:r.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[T.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${r.badge}`,children:(i=e.severity)==null?void 0:i.toUpperCase()}),T.jsx("span",{className:"text-xs text-slate-500",children:e.type})]}),T.jsx("div",{className:"text-sm text-slate-200",children:e.message}),T.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[T.jsxs("span",{className:"flex items-center gap-1",children:[T.jsx(fd,{size:12}),e.timestamp?RJe(e.timestamp):"Just now"]}),e.scope_value&&T.jsxs("span",{children:[e.scope_type,": ",e.scope_value]})]})]}),T.jsx("button",{onClick:()=>t(e),className:"px-3 py-1 text-xs text-slate-400 hover:text-slate-200 border border-border rounded hover:bg-bg-hover transition-colors",children:"Acknowledge"})]})})}function $Je({history:e,typeFilter:t,severityFilter:r,onTypeFilterChange:n,onSeverityFilterChange:i,page:a,totalPages:o,onPageChange:s}){const l=["all","infra_offline","infra_recovery","battery_warning","battery_critical","hf_blackout","uhf_ducting","weather_warning","new_router","packet_flood"],u=["all","critical","warning","watch","info"];return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg",children:[T.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-4",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(DE,{size:14,className:"text-slate-400"}),T.jsx("span",{className:"text-sm text-slate-400",children:"Filter:"})]}),T.jsx("select",{value:t,onChange:c=>n(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:l.map(c=>T.jsx("option",{value:c,children:c==="all"?"All Types":c.replace(/_/g," ")},c))}),T.jsx("select",{value:r,onChange:c=>i(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:u.map(c=>T.jsx("option",{value:c,children:c==="all"?"All Severities":c.charAt(0).toUpperCase()+c.slice(1)},c))})]}),T.jsx("div",{className:"overflow-x-auto",children:T.jsxs("table",{className:"w-full",children:[T.jsx("thead",{children:T.jsxs("tr",{className:"border-b border-border",children:[T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Time"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Type"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Severity"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Message"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Duration"})]})}),T.jsx("tbody",{children:e.length>0?e.map((c,f)=>{const h=Lie(c.severity);return T.jsxs("tr",{className:"border-b border-border hover:bg-bg-hover",children:[T.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono whitespace-nowrap",children:jJe(c.timestamp)}),T.jsx("td",{className:"p-4 text-sm text-slate-300",children:c.type.replace(/_/g," ")}),T.jsx("td",{className:"p-4",children:T.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${h.badge}`,children:c.severity})}),T.jsx("td",{className:"p-4 text-sm text-slate-200 max-w-md truncate",children:c.message}),T.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono",children:c.duration?BJe(c.duration):"-"})]},c.id||f)}):T.jsx("tr",{children:T.jsx("td",{colSpan:5,className:"p-8 text-center text-slate-500",children:"No alert history available"})})})]})}),o>1&&T.jsxs("div",{className:"p-4 border-t border-border flex items-center justify-between",children:[T.jsxs("span",{className:"text-sm text-slate-400",children:["Page ",a," of ",o]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("button",{onClick:()=>s(a-1),disabled:a<=1,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:T.jsx(Iue,{size:16})}),T.jsx("button",{onClick:()=>s(a+1),disabled:a>=o,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:T.jsx(cm,{size:16})})]})]})]})}function FJe({subscription:e,nodes:t}){const r=o=>{const s=t.find(l=>l.node_id_hex===o||String(l.node_num)===o||l.short_name===o);return s?s.long_name&&s.long_name!==s.short_name?`${s.short_name} (${s.long_name})`:s.short_name:o},n=()=>{if(e.sub_type==="alerts")return"Real-time";const o=e.schedule_time||"0000",s=parseInt(o.slice(0,2)),l=o.slice(2),u=s>=12?"PM":"AM";let f=`${s%12||12}:${l} ${u}`;return e.sub_type==="weekly"&&e.schedule_day&&(f+=` ${e.schedule_day.charAt(0).toUpperCase()}${e.schedule_day.slice(1)}`),f},a=(()=>{switch(e.sub_type){case"alerts":return Eb;case"daily":return fd;case"weekly":return fd;default:return Eb}})();return T.jsx("div",{className:"p-4 rounded-lg bg-bg-hover border border-border",children:T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center",children:T.jsx(a,{size:18,className:"text-blue-400"})}),T.jsxs("div",{className:"flex-1",children:[T.jsxs("div",{className:"text-sm text-slate-200 font-medium",children:[e.sub_type.charAt(0).toUpperCase()+e.sub_type.slice(1),e.scope_type!=="mesh"&&e.scope_value&&T.jsxs("span",{className:"text-slate-400 font-normal ml-2",children:["(",e.scope_type,": ",e.scope_value,")"]})]}),T.jsxs("div",{className:"text-xs text-slate-500 mt-0.5",children:[n()," • ",r(e.user_id)]})]}),T.jsx("div",{className:`w-2 h-2 rounded-full ${e.enabled?"bg-green-500":"bg-slate-500"}`})]})})}function VJe(){const[e,t]=W.useState([]),[r,n]=W.useState([]),[i,a]=W.useState([]),[o,s]=W.useState([]),[l,u]=W.useState(!0),[c,f]=W.useState(null),[h,d]=W.useState("all"),[v,g]=W.useState("all"),[m,y]=W.useState(1),[_,x]=W.useState(1),w=20,[S,C]=W.useState(new Set),{lastAlert:M}=IE();W.useEffect(()=>{document.title="Alerts — MeshAI"},[]),W.useEffect(()=>{Promise.all([pZ().catch(()=>[]),qB(w,0).catch(()=>({items:[],total:0})),Que().catch(()=>[]),fetch("/api/nodes").then(O=>O.json()).catch(()=>[])]).then(([O,D,I,N])=>{t(O),Array.isArray(D)?(n(D),x(1)):(n(D.items||[]),x(Math.ceil((D.total||0)/w))),a(I),s(N),u(!1)}).catch(O=>{f(O.message),u(!1)})},[]),W.useEffect(()=>{M&&t(O=>O.some(I=>I.type===M.type&&I.message===M.message)?O:[M,...O])},[M]),W.useEffect(()=>{const O=(m-1)*w;qB(w,O,h,v).then(D=>{Array.isArray(D)?(n(D),x(1)):(n(D.items||[]),x(Math.ceil((D.total||0)/w)))}).catch(()=>{})},[m,h,v]);const P=W.useCallback(O=>{const D=`${O.type}-${O.message}-${O.timestamp}`;C(I=>new Set([...I,D]))},[]),k=e.filter(O=>{const D=`${O.type}-${O.message}-${O.timestamp}`;return!S.has(D)});return l?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading alerts..."})}):c?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",c]})}):T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(Ps,{size:14}),"Active Alerts (",k.length,")"]}),k.length>0?T.jsx("div",{className:"space-y-3",children:k.map((O,D)=>T.jsx(zJe,{alert:O,onAcknowledge:P},`${O.type}-${O.timestamp}-${D}`))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-8",children:[T.jsx(Wh,{size:20,className:"text-green-500"}),T.jsx("span",{children:"No active alerts — all systems nominal"})]})]}),T.jsxs("div",{children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(fd,{size:14}),"Alert History"]}),T.jsx($Je,{history:r,typeFilter:h,severityFilter:v,onTypeFilterChange:O=>{d(O),y(1)},onSeverityFilterChange:O=>{g(O),y(1)},page:m,totalPages:_,onPageChange:y})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(Uue,{size:14}),"Mesh Subscriptions (",i.length,")"]}),i.length>0?T.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:i.map(O=>T.jsx(FJe,{subscription:O,nodes:o},O.id))}):T.jsxs("div",{className:"text-slate-500 py-4",children:[T.jsx("p",{children:"No active subscriptions."}),T.jsxs("p",{className:"text-xs mt-2",children:["Manage subscriptions via ",T.jsx("code",{className:"text-blue-400",children:"!subscribe"})," on mesh"]})]})]})]})}const sb=[{value:"info",label:"Info",description:"Routine updates (ducting detected, new router appeared)"},{value:"advisory",label:"Advisory",description:"Worth knowing (weather advisory, traffic slow, battery declining)"},{value:"watch",label:"Watch",description:"Pay attention (fire within 50km, weather watch, stream rising)"},{value:"warning",label:"Warning",description:"Act now (fire within 25km, severe weather, critical battery)"},{value:"critical",label:"Critical",description:"Serious issue (critical node down, battery emergency)"},{value:"emergency",label:"Emergency",description:"Life safety (extreme weather, fire at infrastructure, total blackout)"}];function Lo({info:e}){const[t,r]=W.useState(!1);return T.jsxs("div",{className:"relative inline-block",children:[T.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),r(!t)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),t&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>r(!1)}),T.jsx("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:e})]})]})}function ch({label:e,value:t,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o=""}){const[s,l]=W.useState(!1),u=n==="password";return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,o&&T.jsx(Lo,{info:o})]}),T.jsxs("div",{className:"relative",children:[T.jsx("input",{type:u&&!s?"password":"text",value:t,onChange:c=>r(c.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),u&&T.jsx("button",{type:"button",onClick:()=>l(!s),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:s?T.jsx(nZ,{size:16}):T.jsx(OE,{size:16})})]}),a&&T.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function MU({label:e,value:t,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,s&&T.jsx(Lo,{info:s})]}),T.jsx("input",{type:"number",value:t,onChange:l=>r(Number(l.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&T.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function Zw({label:e,checked:t,onChange:r,helper:n="",info:i=""}){return T.jsxs("div",{className:"flex items-center justify-between py-2",children:[T.jsxs("div",{children:[T.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[e,i&&T.jsx(Lo,{info:i})]}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]}),T.jsx("button",{type:"button",onClick:()=>r(!t),className:`relative w-11 h-6 rounded-full transition-colors ${t?"bg-accent":"bg-[#1e2a3a]"}`,children:T.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${t?"translate-x-5":""}`})})]})}function Yw({label:e,value:t,onChange:r,helper:n="",info:i=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&T.jsx(Lo,{info:i})]}),T.jsx("input",{type:"time",value:t,onChange:a=>r(a.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent"}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function GJe({label:e,value:t,onChange:r,placeholder:n="Add item...",helper:i="",info:a=""}){const[o,s]=W.useState(""),l=()=>{o.trim()&&!t.includes(o.trim())&&(r([...t,o.trim()]),s(""))},u=c=>{r(t.filter((f,h)=>h!==c))};return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&T.jsx(Lo,{info:a})]}),T.jsxs("div",{className:"flex gap-2",children:[T.jsx("input",{type:"text",value:o,onChange:c=>s(c.target.value),onKeyDown:c=>c.key==="Enter"&&(c.preventDefault(),l()),className:"flex-1 px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent",placeholder:n}),T.jsx("button",{type:"button",onClick:l,className:"px-3 py-2 bg-accent hover:bg-accent/80 rounded text-sm text-white transition-colors",children:T.jsx(dS,{size:16})})]}),t.length>0&&T.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:t.map((c,f)=>T.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-[#1e2a3a] rounded text-sm text-slate-300",children:[c,T.jsx("button",{type:"button",onClick:()=>u(f),className:"text-slate-500 hover:text-red-400",children:T.jsx(jy,{size:14})})]},f))}),i&&T.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function HJe({value:e,onChange:t}){const[r,n]=W.useState(!1),i=sb.find(a=>a.value===e)||sb[3];return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Severity Threshold",T.jsx(Lo,{info:"Only alerts at or above this severity trigger this rule. Lower threshold = more notifications. 'Warning' is recommended for most rules."})]}),T.jsxs("div",{className:"relative",children:[T.jsxs("button",{type:"button",onClick:()=>n(!r),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-left flex items-center justify-between hover:border-accent transition-colors",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-slate-200",children:i.label}),T.jsxs("span",{className:"text-slate-500 ml-2",children:["— ",i.description]})]}),T.jsx(Ny,{size:16,className:`text-slate-500 transition-transform ${r?"rotate-180":""}`})]}),r&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),T.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 z-50 bg-[#0a0e17] border border-[#1e2a3a] rounded-lg shadow-xl overflow-hidden",children:sb.map(a=>T.jsxs("button",{type:"button",onClick:()=>{t(a.value),n(!1)},className:`w-full px-3 py-2.5 text-left text-sm hover:bg-[#1e2a3a] transition-colors ${e===a.value?"bg-accent/10":""}`,children:[T.jsx("div",{className:"font-medium text-slate-200",children:a.label}),T.jsx("div",{className:"text-xs text-slate-500",children:a.description})]},a.value))})]})]}),T.jsx("p",{className:"text-xs text-slate-600",children:'Lower = more notifications. "Warning" recommended for most rules.'})]})}function WJe({rule:e,categories:t,quietHoursEnabled:r,onChange:n,onDelete:i,onDuplicate:a,onTest:o}){var w,S,C,M;const[s,l]=W.useState(!e.name),[u,c]=W.useState(!1),f=[{value:"",label:"(None)",description:"Rule matches but does not deliver"},{value:"mesh_broadcast",label:"Mesh Broadcast",description:"Send to a mesh radio channel"},{value:"mesh_dm",label:"Mesh DM",description:"Direct message to specific nodes"},{value:"email",label:"Email",description:"Send via SMTP"},{value:"webhook",label:"Webhook",description:"POST to any URL"}],h=[{value:"daily",label:"Daily"},{value:"twice_daily",label:"Twice Daily"},{value:"weekly",label:"Weekly"}],d=[{value:"mesh_health_summary",label:"Mesh Health Summary",description:"Current health score, pillar breakdown, problem nodes"},{value:"rf_propagation_report",label:"RF Propagation Report",description:"Solar indices, Kp, ducting conditions"},{value:"alerts_digest",label:"Active Alerts Digest",description:"Summary of all active environmental alerts"},{value:"environmental_conditions",label:"Environmental Conditions",description:"Full conditions: weather, fire, streams, roads"},{value:"custom",label:"Custom Message",description:"Write your own with template tokens"}],v=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],g=P=>{const k=e.categories||[];k.includes(P)?n({...e,categories:k.filter(O=>O!==P)}):n({...e,categories:[...k,P]})},m=P=>{const k=e.schedule_days||[];k.includes(P)?n({...e,schedule_days:k.filter(O=>O!==P)}):n({...e,schedule_days:[...k,P]})},y=async()=>{c(!0),await o(),c(!1)},_=()=>{if(e.trigger_type==="schedule")return"[Scheduled report preview would appear here]";const P=e.categories||[];if(P.length===0&&t.length>0)return t[0].example_message||"Alert notification";const k=t.find(O=>P.includes(O.id));return(k==null?void 0:k.example_message)||"Alert notification"},x=()=>{var k,O,D,I,N,B,F,$;const P=[];if(e.trigger_type==="schedule"){const G=((k=h.find(U=>U.value===e.schedule_frequency))==null?void 0:k.label)||e.schedule_frequency,z=((O=d.find(U=>U.value===e.message_type))==null?void 0:O.label)||e.message_type;P.push(`${G} at ${e.schedule_time||"??:??"}`),P.push(z)}else{const G=((D=e.categories)==null?void 0:D.length)||0,z=G===0?"All":t.filter(H=>{var Y;return(Y=e.categories)==null?void 0:Y.includes(H.id)}).map(H=>H.name).slice(0,2).join(", ")+(G>2?` +${G-2}`:""),U=((I=sb.find(H=>H.value===e.min_severity))==null?void 0:I.label)||e.min_severity;P.push(`${z} at ${U}+`)}if(!e.delivery_type)P.push("⚠️ No delivery");else{const G=((N=f.find(U=>U.value===e.delivery_type))==null?void 0:N.label)||e.delivery_type;let z="";if(e.delivery_type==="mesh_broadcast")z=`Ch ${e.broadcast_channel}`;else if(e.delivery_type==="mesh_dm")z=`${((B=e.node_ids)==null?void 0:B.length)||0} nodes`;else if(e.delivery_type==="email")z=(F=e.recipients)!=null&&F.length?e.recipients[0]+(e.recipients.length>1?` +${e.recipients.length-1}`:""):"no recipients";else if(e.delivery_type==="webhook")try{z=new URL(e.webhook_url).hostname}catch{z=(($=e.webhook_url)==null?void 0:$.slice(0,20))||"no URL"}P.push(`${G}${z?` (${z})`:""}`)}return P.join(" → ")};return T.jsxs("div",{className:`border rounded-lg overflow-hidden ${e.enabled?"border-[#1e2a3a]":"border-slate-700 opacity-60"}`,children:[T.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>l(!s),children:[T.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[s?T.jsx(Ny,{size:16,className:"text-slate-500 flex-shrink-0"}):T.jsx(cm,{size:16,className:"text-slate-500 flex-shrink-0"}),T.jsx("button",{onClick:P=>{P.stopPropagation(),n({...e,enabled:!e.enabled})},className:`w-2 h-2 rounded-full flex-shrink-0 ${e.enabled?"bg-green-500":"bg-slate-500"}`,title:e.enabled?"Enabled":"Disabled"}),e.trigger_type==="schedule"?T.jsx(fd,{size:14,className:"text-blue-400 flex-shrink-0"}):T.jsx(dm,{size:14,className:"text-yellow-400 flex-shrink-0"}),T.jsx("span",{className:"font-medium text-slate-200 truncate",children:e.name||"New Rule"}),!s&&T.jsx("span",{className:`text-xs truncate hidden sm:block ${e.delivery_type?"text-slate-500":"text-amber-400"}`,children:x()})]}),T.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[T.jsx("button",{onClick:P=>{P.stopPropagation(),y()},disabled:u||!e.name,className:"p-1.5 text-blue-400 hover:text-blue-300 hover:bg-blue-500/10 rounded disabled:opacity-50",title:"Test rule",children:T.jsx(ZB,{size:14})}),T.jsx("button",{onClick:P=>{P.stopPropagation(),a()},className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-500/10 rounded",title:"Duplicate",children:T.jsx(jue,{size:14})}),T.jsx("button",{onClick:P=>{P.stopPropagation(),i()},className:"p-1.5 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",title:"Delete",children:T.jsx(EE,{size:14})})]})]}),s&&T.jsxs("div",{className:"p-4 space-y-6 border-t border-[#1e2a3a]",children:[T.jsx(ch,{label:"Rule Name",value:e.name,onChange:P=>n({...e,name:P}),placeholder:"e.g., Emergency Broadcast, Daily Health Report",helper:"A descriptive name for this rule"}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Trigger Type"}),T.jsxs("div",{className:"flex gap-2",children:[T.jsxs("button",{type:"button",onClick:()=>n({...e,trigger_type:"condition"}),className:`flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors ${e.trigger_type!=="schedule"?"bg-accent/10 border-accent text-accent":"bg-[#0a0e17] border-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:[T.jsx(dm,{size:16}),T.jsx("span",{children:"Condition"})]}),T.jsxs("button",{type:"button",onClick:()=>n({...e,trigger_type:"schedule"}),className:`flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors ${e.trigger_type==="schedule"?"bg-accent/10 border-accent text-accent":"bg-[#0a0e17] border-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:[T.jsx(fd,{size:16}),T.jsx("span",{children:"Schedule"})]})]}),T.jsx("p",{className:"text-xs text-slate-600",children:e.trigger_type==="schedule"?"Send reports on a schedule (daily briefings, weekly digests)":"React to alert conditions (fires, outages, weather warnings)"})]}),e.trigger_type!=="schedule"&&T.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[T.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[T.jsx(Ps,{size:14}),"WHEN (Condition)"]}),T.jsx(HJe,{value:e.min_severity,onChange:P=>n({...e,min_severity:P})}),T.jsxs("div",{className:"space-y-2",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Categories",T.jsx(Lo,{info:"Select which types of alerts trigger this rule. Leave all unchecked to match ALL categories."})]}),T.jsx("div",{className:"text-xs text-slate-500 mb-2",children:(((w=e.categories)==null?void 0:w.length)||0)===0?"All categories (none selected)":`${(S=e.categories)==null?void 0:S.length} selected`}),T.jsx("div",{className:"max-h-48 overflow-y-auto border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:t.map(P=>{var k,O;return T.jsxs("label",{onClick:()=>g(P.id),className:"flex items-start gap-2 p-2 rounded hover:bg-[#1e2a3a]/50 cursor-pointer",children:[T.jsx("div",{className:`w-4 h-4 mt-0.5 rounded border flex items-center justify-center flex-shrink-0 ${(k=e.categories)!=null&&k.includes(P.id)?"bg-accent border-accent":"border-slate-600"}`,children:((O=e.categories)==null?void 0:O.includes(P.id))&&T.jsx(cd,{size:12,className:"text-white"})}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"text-sm text-slate-200",children:P.name}),T.jsx("div",{className:"text-xs text-slate-500",children:P.description})]})]},P.id)})})]})]}),e.trigger_type==="schedule"&&T.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[T.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[T.jsx(Eue,{size:14}),"WHEN (Schedule)"]}),T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Frequency"}),T.jsx("select",{value:e.schedule_frequency||"daily",onChange:P=>n({...e,schedule_frequency:P.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:h.map(P=>T.jsx("option",{value:P.value,children:P.label},P.value))})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Yw,{label:"Time",value:e.schedule_time||"07:00",onChange:P=>n({...e,schedule_time:P})}),e.schedule_frequency==="twice_daily"&&T.jsx(Yw,{label:"Second Time",value:e.schedule_time_2||"19:00",onChange:P=>n({...e,schedule_time_2:P})})]}),e.schedule_frequency==="weekly"&&T.jsxs("div",{className:"space-y-2",children:[T.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Days"}),T.jsx("div",{className:"flex flex-wrap gap-2",children:v.map(P=>{var k;return T.jsx("button",{type:"button",onClick:()=>m(P),className:`px-3 py-1.5 rounded text-sm capitalize transition-colors ${(k=e.schedule_days)!=null&&k.includes(P)?"bg-accent text-white":"bg-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:P.slice(0,3)},P)})})]}),T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Report Type"}),T.jsx("select",{value:e.message_type||"mesh_health_summary",onChange:P=>n({...e,message_type:P.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:d.map(P=>T.jsx("option",{value:P.value,children:P.label},P.value))}),T.jsx("p",{className:"text-xs text-slate-600",children:(C=d.find(P=>P.value===e.message_type))==null?void 0:C.description})]}),e.message_type==="custom"&&T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Custom Message",T.jsx(Lo,{info:"Available tokens: {MESH_SCORE}, {NODE_COUNT}, {NODES_ONLINE}, {ACTIVE_ALERTS}, {KP}, {SFI}, {DATE}, {TIME}"})]}),T.jsx("textarea",{value:e.custom_message||"",onChange:P=>n({...e,custom_message:P.target.value}),rows:4,placeholder:"Good morning! Mesh health: {MESH_SCORE}/100 with {NODE_COUNT} nodes online.",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"})]})]}),T.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[T.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[T.jsx(ZB,{size:14}),"SEND VIA"]}),T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Delivery Method",T.jsx(Lo,{info:"Where this notification gets delivered. Select (None) to save the rule without delivery — it will match conditions but won't send until you configure a delivery method."})]}),T.jsx("select",{value:e.delivery_type||"",onChange:P=>n({...e,delivery_type:P.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:f.map(P=>T.jsx("option",{value:P.value,children:P.label},P.value))}),T.jsx("p",{className:"text-xs text-slate-600",children:(M=f.find(P=>P.value===(e.delivery_type||"")))==null?void 0:M.description})]}),!e.delivery_type&&T.jsxs("div",{className:"flex items-start gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg",children:[T.jsx(Ry,{size:16,className:"text-amber-400 mt-0.5 flex-shrink-0"}),T.jsx("div",{className:"text-sm text-amber-300",children:"Rule will log matches but not deliver until a delivery method is configured."})]}),e.delivery_type==="mesh_broadcast"&&T.jsx(Tj,{label:"Broadcast Channel",value:e.broadcast_channel??0,onChange:P=>n({...e,broadcast_channel:P}),helper:"Select the mesh radio channel",mode:"single"}),e.delivery_type==="mesh_dm"&&T.jsx(Sj,{label:"Recipient Nodes",value:e.node_ids||[],onChange:P=>n({...e,node_ids:P}),helper:"Nodes that receive direct messages",valueType:"node_id_hex"}),e.delivery_type==="email"&&T.jsxs("div",{className:"space-y-4",children:[T.jsx(GJe,{label:"Recipients",value:e.recipients||[],onChange:P=>n({...e,recipients:P}),placeholder:"email@example.com",helper:"Email addresses to receive alerts"}),T.jsxs("details",{className:"group",children:[T.jsxs("summary",{className:"flex items-center gap-2 cursor-pointer text-sm text-slate-400 hover:text-slate-200",children:[T.jsx(cm,{size:14,className:"group-open:rotate-90 transition-transform"}),"SMTP Configuration"]}),T.jsxs("div",{className:"mt-4 space-y-4 pl-6 border-l border-[#1e2a3a]",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ch,{label:"SMTP Host",value:e.smtp_host||"",onChange:P=>n({...e,smtp_host:P}),placeholder:"smtp.gmail.com"}),T.jsx(MU,{label:"SMTP Port",value:e.smtp_port??587,onChange:P=>n({...e,smtp_port:P}),min:1,max:65535})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ch,{label:"Username",value:e.smtp_user||"",onChange:P=>n({...e,smtp_user:P})}),T.jsx(ch,{label:"Password",value:e.smtp_password||"",onChange:P=>n({...e,smtp_password:P}),type:"password",info:"Gmail users: use an App Password from myaccount.google.com/apppasswords"})]}),T.jsx(Zw,{label:"Use TLS",checked:e.smtp_tls??!0,onChange:P=>n({...e,smtp_tls:P})}),T.jsx(ch,{label:"From Address",value:e.from_address||"",onChange:P=>n({...e,from_address:P}),placeholder:"alerts@yourdomain.com"})]})]})]}),e.delivery_type==="webhook"&&T.jsx(ch,{label:"Webhook URL",value:e.webhook_url||"",onChange:P=>n({...e,webhook_url:P}),placeholder:"https://discord.com/api/webhooks/...",helper:"POST alert as JSON",info:"Works with Discord webhooks, ntfy.sh, Slack, Home Assistant, Pushover, or any HTTP POST endpoint."})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(MU,{label:"Cooldown (minutes)",value:e.cooldown_minutes??10,onChange:P=>n({...e,cooldown_minutes:P}),min:0,helper:"Min time between repeat sends",info:"Prevents alert spam. Same condition won't re-trigger this rule within this window."}),r&&T.jsx("div",{className:"flex items-end pb-1",children:T.jsx(Zw,{label:"Override Quiet Hours",checked:e.override_quiet??!1,onChange:P=>n({...e,override_quiet:P}),helper:"Deliver during quiet hours"})})]}),e.trigger_type!=="schedule"&&T.jsxs("div",{className:"space-y-2",children:[T.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Example Message"}),T.jsx("div",{className:"p-3 bg-[#1e2a3a]/50 rounded-lg border border-[#1e2a3a]",children:T.jsx("p",{className:"text-sm text-slate-300 font-mono",children:_()})}),T.jsx("p",{className:"text-xs text-slate-600",children:"This is an example of what this rule would send."})]})]})]})}function UJe(){var k,O;const[e,t]=W.useState(null),[r,n]=W.useState(null),[i,a]=W.useState([]),[o,s]=W.useState(!0),[l,u]=W.useState(!1),[c,f]=W.useState(null),[h,d]=W.useState(null),[v,g]=W.useState(null),[m,y]=W.useState(!1),_=W.useCallback(async()=>{try{const[D,I]=await Promise.all([fetch("/api/config/notifications"),fetch("/api/notifications/categories")]);if(!D.ok)throw new Error("Failed to fetch notifications config");const N=await D.json(),B=await I.json();t(N),n(JSON.parse(JSON.stringify(N))),a(B),y(!1),f(null)}catch(D){f(D instanceof Error?D.message:"Unknown error")}finally{s(!1)}},[]);W.useEffect(()=>{document.title="Notifications — MeshAI",_()},[_]),W.useEffect(()=>{e&&r&&y(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);const x=async()=>{if(e){u(!0),f(null),d(null);try{const D=await fetch("/api/config/notifications",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),I=await D.json();if(!D.ok)throw new Error(I.detail||"Save failed");d("Notifications config saved successfully"),n(JSON.parse(JSON.stringify(e))),y(!1),setTimeout(()=>d(null),3e3)}catch(D){f(D instanceof Error?D.message:"Save failed")}finally{u(!1)}}},w=()=>{r&&(t(JSON.parse(JSON.stringify(r))),y(!1))},S=()=>({name:"",enabled:!0,trigger_type:"condition",categories:[],min_severity:"warning",schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"19:00",schedule_days:["monday"],message_type:"mesh_health_summary",custom_message:"",delivery_type:"",broadcast_channel:0,node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{},cooldown_minutes:10,override_quiet:!1}),C=()=>{e&&t({...e,rules:[...e.rules||[],S()]})},M=D=>{if(!e)return;const I=e.rules[D],N={...JSON.parse(JSON.stringify(I)),name:`${I.name} (copy)`},B=[...e.rules];B.splice(D+1,0,N),t({...e,rules:B})},P=async D=>{try{const N=await(await fetch(`/api/notifications/rules/${D}/test`,{method:"POST"})).json();g(N),setTimeout(()=>g(null),5e3)}catch{g({success:!1,message:"Test failed"}),setTimeout(()=>g(null),5e3)}};return o?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading notifications config..."})}):e?T.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("div",{children:T.jsx("p",{className:"text-sm text-slate-500",children:"Alert delivery and scheduled reports. Rules define what triggers a notification and where it gets sent."})}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("button",{onClick:_,className:"p-2 text-slate-400 hover:text-slate-200 hover:bg-bg-hover rounded transition-colors",title:"Refresh",children:T.jsx(lZ,{size:18})}),T.jsxs("button",{onClick:w,disabled:!m,className:"flex items-center gap-2 px-3 py-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[T.jsx(uZ,{size:16}),"Discard"]}),T.jsxs("button",{onClick:x,disabled:l||!m,className:"flex items-center gap-2 px-4 py-2 bg-accent hover:bg-accent/80 disabled:bg-slate-700 disabled:cursor-not-allowed rounded text-white transition-colors",children:[T.jsx(fZ,{size:16}),l?"Saving...":"Save"]})]})]}),c&&T.jsx("div",{className:"p-3 rounded-lg text-sm bg-red-500/10 text-red-400 border border-red-500/20",children:c}),h&&T.jsxs("div",{className:"p-3 rounded-lg text-sm bg-green-500/10 text-green-400 border border-green-500/20",children:[T.jsx(cd,{size:14,className:"inline mr-2"}),h]}),v&&T.jsxs("div",{className:`p-3 rounded-lg text-sm ${v.success?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:[v.success?T.jsx(cd,{size:14,className:"inline mr-2"}):T.jsx(jy,{size:14,className:"inline mr-2"}),v.message]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6 space-y-6",children:[T.jsx(Zw,{label:"Enable Notifications",checked:e.enabled,onChange:D=>t({...e,enabled:D}),helper:"Master switch for all notification delivery",info:"When disabled, no alerts or scheduled messages will be delivered. Alerts still get recorded to history."}),e.enabled&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"space-y-3 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(Vue,{size:14,className:"text-slate-400"}),T.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Quiet Hours"})]}),T.jsx(Zw,{label:"Enable Quiet Hours",checked:e.quiet_hours_enabled??!0,onChange:D=>t({...e,quiet_hours_enabled:D}),helper:"Suppress non-emergency alerts during sleeping hours",info:"When enabled, alerts below emergency severity are held during quiet hours. When disabled, all alerts deliver anytime."}),e.quiet_hours_enabled&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Yw,{label:"Start Time",value:e.quiet_hours_start||"22:00",onChange:D=>t({...e,quiet_hours_start:D}),helper:"When quiet hours begin"}),T.jsx(Yw,{label:"End Time",value:e.quiet_hours_end||"06:00",onChange:D=>t({...e,quiet_hours_end:D}),helper:"When quiet hours end"})]}),T.jsx("p",{className:"text-xs text-slate-600",children:'Emergency alerts and rules with "Override Quiet Hours" enabled always deliver.'})]})]}),T.jsxs("div",{className:"space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Notification Rules",T.jsx(Lo,{info:"Each rule is self-contained: define what triggers it (condition or schedule), where to send it (mesh, email, webhook), and behavior settings."})]}),T.jsxs("span",{className:"text-xs text-slate-500",children:[((k=e.rules)==null?void 0:k.length)||0," rule",(((O=e.rules)==null?void 0:O.length)||0)!==1?"s":""]})]}),(e.rules||[]).map((D,I)=>T.jsx(WJe,{rule:D,categories:i,quietHoursEnabled:e.quiet_hours_enabled??!0,onChange:N=>{const B=[...e.rules||[]];B[I]=N,t({...e,rules:B})},onDelete:()=>{confirm(`Delete rule "${D.name||"New Rule"}"?`)&&t({...e,rules:(e.rules||[]).filter((N,B)=>B!==I)})},onDuplicate:()=>M(I),onTest:()=>P(I)},I)),T.jsxs("button",{onClick:C,className:"w-full py-3 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[T.jsx(dS,{size:16})," Add Rule"]})]})]})]})]}):T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-red-400",children:"Failed to load notifications config"})})}function ZJe(){return T.jsx(uce,{children:T.jsx(hce,{children:T.jsxs(vue,{children:[T.jsx(Zu,{path:"/",element:T.jsx(WIe,{})}),T.jsx(Zu,{path:"/mesh",element:T.jsx(lJe,{})}),T.jsx(Zu,{path:"/environment",element:T.jsx(dJe,{})}),T.jsx(Zu,{path:"/config",element:T.jsx(IJe,{})}),T.jsx(Zu,{path:"/alerts",element:T.jsx(VJe,{})}),T.jsx(Zu,{path:"/notifications",element:T.jsx(UJe,{})})]})})})}KM.createRoot(document.getElementById("root")).render(T.jsx(Q.StrictMode,{children:T.jsx(bue,{children:T.jsx(ZJe,{})})})); diff --git a/meshai/dashboard/static/assets/index-E1oMzltW.css b/meshai/dashboard/static/assets/index-E1oMzltW.css new file mode 100644 index 0000000..31feacc --- /dev/null +++ b/meshai/dashboard/static/assets/index-E1oMzltW.css @@ -0,0 +1 @@ +.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.left-0\.5{left:.125rem}.left-1{left:.25rem}.left-3{left:.75rem}.left-4{left:1rem}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.top-6{top:1.5rem}.top-full{top:100%}.z-0{z-index:0}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.-my-4{margin-top:-1rem;margin-bottom:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.-ml-4{margin-left:-1rem}.-mr-1{margin-right:-.25rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-\[540px\]{height:540px}.h-\[60vh\]{height:60vh}.h-\[calc\(100vh-8rem\)\]{height:calc(100vh - 8rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[220px\]{width:220px}.w-\[250px\]{width:250px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.max-w-4xl{max-width:56rem}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-4{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 42 58 / var(--tw-divide-opacity, 1))}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#1e2a3a\]{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-\[\#2a3a4a\]{--tw-border-opacity: 1;border-color:rgb(42 58 74 / var(--tw-border-opacity, 1))}.border-accent{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/20{border-color:#f59e0b33}.border-amber-500\/30{border-color:#f59e0b4d}.border-amber-500\/50{border-color:#f59e0b80}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-500\/30{border-color:#3b82f64d}.border-blue-500\/50{border-color:#3b82f680}.border-border{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-border\/50{border-color:#1e2a3a80}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-500\/20{border-color:#22c55e33}.border-green-500\/30{border-color:#22c55e4d}.border-green-500\/50{border-color:#22c55e80}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-orange-500\/30{border-color:#f973164d}.border-red-400\/30{border-color:#f871714d}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/20{border-color:#ef444433}.border-red-500\/30{border-color:#ef44444d}.border-red-500\/50{border-color:#ef444480}.border-red-600\/30{border-color:#dc26264d}.border-red-700\/30{border-color:#b91c1c4d}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-slate-600{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-\[\#0a0e17\]{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-\[\#1a2332\]{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-\[\#1e2a3a\]{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-\[\#1e2a3a\]\/50{background-color:#1e2a3a80}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:#3b82f61a}.bg-accent\/20{background-color:#3b82f633}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-bg{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-bg-card{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-bg-card\/90{background-color:#111827e6}.bg-bg-hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-border{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-cyan-500\/20{background-color:#06b6d433}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-orange-500\/10{background-color:#f973161a}.bg-orange-500\/20{background-color:#f9731633}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-red-600\/20{background-color:#dc262633}.bg-red-700\/20{background-color:#b91c1c33}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-500\/10{background-color:#64748b1a}.bg-slate-500\/20{background-color:#64748b33}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/20{background-color:#eab30833}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-700{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.fill-slate-100{fill:#f1f5f9}.fill-slate-400{fill:#94a3b8}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-4{padding-bottom:1rem}.pl-6{padding-left:1.5rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-relaxed{line-height:1.625}.tracking-wide{letter-spacing:.025em}.text-accent{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-200{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.opacity-60{opacity:.6}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}body{background:#0a0e17;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0a0e17}::-webkit-scrollbar-thumb{background:#2d3a4d;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#3b4a5d}.font-mono{font-family:JetBrains Mono,monospace}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse-slow{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.animate-slide-in{animation:slide-in .3s ease-out}.line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.last\:border-0:last-child{border-width:0px}.hover\:border-\[\#2a3a4a\]:hover{--tw-border-opacity: 1;border-color:rgb(42 58 74 / var(--tw-border-opacity, 1))}.hover\:border-accent:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#0a0e17\]:hover{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#1e2a3a\]:hover{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#1e2a3a\]\/50:hover{background-color:#1e2a3a80}.hover\:bg-accent\/80:hover{background-color:#3b82f6cc}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-bg-hover:hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-500\/10:hover{background-color:#3b82f61a}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-slate-500\/10:hover{background-color:#64748b1a}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-slate-200:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.hover\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-accent:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-slate-700:disabled{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.group[open] .group-open\:rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width: 640px){.sm\:block{display:block}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} diff --git a/meshai/dashboard/static/assets/index-utMF5PG3.js b/meshai/dashboard/static/assets/index-utMF5PG3.js deleted file mode 100644 index 5e62b81..0000000 --- a/meshai/dashboard/static/assets/index-utMF5PG3.js +++ /dev/null @@ -1,430 +0,0 @@ -function fU(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var dU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lz={exports:{}},T0={},kz={exports:{}},at={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Pv=Symbol.for("react.element"),vU=Symbol.for("react.portal"),pU=Symbol.for("react.fragment"),gU=Symbol.for("react.strict_mode"),mU=Symbol.for("react.profiler"),yU=Symbol.for("react.provider"),_U=Symbol.for("react.context"),xU=Symbol.for("react.forward_ref"),bU=Symbol.for("react.suspense"),SU=Symbol.for("react.memo"),wU=Symbol.for("react.lazy"),mk=Symbol.iterator;function TU(e){return e===null||typeof e!="object"?null:(e=mk&&e[mk]||e["@@iterator"],typeof e=="function"?e:null)}var Pz={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dz=Object.assign,Iz={};function vh(e,t,r){this.props=e,this.context=t,this.refs=Iz,this.updater=r||Pz}vh.prototype.isReactComponent={};vh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};vh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nz(){}Nz.prototype=vh.prototype;function bC(e,t,r){this.props=e,this.context=t,this.refs=Iz,this.updater=r||Pz}var SC=bC.prototype=new Nz;SC.constructor=bC;Dz(SC,vh.prototype);SC.isPureReactComponent=!0;var yk=Array.isArray,Ez=Object.prototype.hasOwnProperty,wC={current:null},Rz={key:!0,ref:!0,__self:!0,__source:!0};function Oz(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)Ez.call(t,n)&&!Rz.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,K=B[X];if(0>>1;Xi(ue,H))vei(Ge,ue)?(B[X]=Ge,B[ve]=H,X=ve):(B[X]=ue,B[ie]=H,X=ie);else if(vei(Ge,H))B[X]=Ge,B[ve]=H,X=ve;else break e}}return W}function i(B,W){var H=B.sortIndex-W.sortIndex;return H!==0?H:B.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,h=null,f=3,d=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(B){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=B)n(u),W.sortIndex=W.expirationTime,t(l,W);else break;W=r(u)}}function w(B){if(g=!1,b(B),!p)if(r(l)!==null)p=!0,F(C);else{var W=r(u);W!==null&&Z(w,W.startTime-B)}}function C(B,W){p=!1,g&&(g=!1,y(k),k=-1),d=!0;var H=f;try{for(b(W),h=r(l);h!==null&&(!(h.expirationTime>W)||B&&!I());){var X=h.callback;if(typeof X=="function"){h.callback=null,f=h.priorityLevel;var K=X(h.expirationTime<=W);W=e.unstable_now(),typeof K=="function"?h.callback=K:h===r(l)&&n(l),b(W)}else n(l);h=r(l)}if(h!==null)var ne=!0;else{var ie=r(u);ie!==null&&Z(w,ie.startTime-W),ne=!1}return ne}finally{h=null,f=H,d=!1}}var M=!1,A=null,k=-1,N=5,D=-1;function I(){return!(e.unstable_now()-DB||125X?(B.sortIndex=H,t(u,B),r(l)===null&&B===r(u)&&(g?(y(k),k=-1):g=!0,Z(w,H-X))):(B.sortIndex=K,t(l,B),p||d||(p=!0,F(C))),B},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(B){var W=f;return function(){var H=f;f=W;try{return B.apply(this,arguments)}finally{f=H}}}})(Fz);Vz.exports=Fz;var OU=Vz.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var zU=U,Rn=OU;function ce(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cS=Object.prototype.hasOwnProperty,BU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,xk={},bk={};function jU(e){return cS.call(bk,e)?!0:cS.call(xk,e)?!1:BU.test(e)?bk[e]=!0:(xk[e]=!0,!1)}function VU(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function FU(e,t,r,n){if(t===null||typeof t>"u"||VU(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function sn(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Ir={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ir[e]=new sn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ir[t]=new sn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ir[e]=new sn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ir[e]=new sn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ir[e]=new sn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ir[e]=new sn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ir[e]=new sn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ir[e]=new sn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ir[e]=new sn(e,5,!1,e.toLowerCase(),null,!1,!1)});var CC=/[\-:]([a-z])/g;function MC(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(CC,MC);Ir[t]=new sn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(CC,MC);Ir[t]=new sn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(CC,MC);Ir[t]=new sn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ir[e]=new sn(e,1,!1,e.toLowerCase(),null,!1,!1)});Ir.xlinkHref=new sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ir[e]=new sn(e,1,!1,e.toLowerCase(),null,!0,!0)});function AC(e,t,r,n){var i=Ir.hasOwnProperty(t)?Ir[t]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` -`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{ux=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?jf(e):""}function GU(e){switch(e.tag){case 5:return jf(e.type);case 16:return jf("Lazy");case 13:return jf("Suspense");case 19:return jf("SuspenseList");case 0:case 2:case 15:return e=cx(e.type,!1),e;case 11:return e=cx(e.type.render,!1),e;case 1:return e=cx(e.type,!0),e;default:return""}}function vS(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case uc:return"Fragment";case lc:return"Portal";case hS:return"Profiler";case LC:return"StrictMode";case fS:return"Suspense";case dS:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wz:return(e.displayName||"Context")+".Consumer";case Hz:return(e._context.displayName||"Context")+".Provider";case kC:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case PC:return t=e.displayName||null,t!==null?t:vS(e.type)||"Memo";case Oo:t=e._payload,e=e._init;try{return vS(e(t))}catch{}}return null}function HU(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return vS(t);case 8:return t===LC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zz(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function WU(e){var t=Zz(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lp(e){e._valueTracker||(e._valueTracker=WU(e))}function $z(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Zz(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function jm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function pS(e,t){var r=t.checked;return zt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function wk(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=gs(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Yz(e,t){t=t.checked,t!=null&&AC(e,"checked",t,!1)}function gS(e,t){Yz(e,t);var r=gs(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mS(e,t.type,r):t.hasOwnProperty("defaultValue")&&mS(e,t.type,gs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tk(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function mS(e,t,r){(t!=="number"||jm(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Vf=Array.isArray;function Lc(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=kp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pd(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var rd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},UU=["Webkit","ms","Moz","O"];Object.keys(rd).forEach(function(e){UU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rd[t]=rd[e]})});function Qz(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||rd.hasOwnProperty(e)&&rd[e]?(""+t).trim():t+"px"}function Jz(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Qz(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var ZU=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xS(e,t){if(t){if(ZU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ce(62))}}function bS(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var SS=null;function DC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wS=null,kc=null,Pc=null;function Ak(e){if(e=Nv(e)){if(typeof wS!="function")throw Error(ce(280));var t=e.stateNode;t&&(t=k0(t),wS(e.stateNode,e.type,t))}}function e3(e){kc?Pc?Pc.push(e):Pc=[e]:kc=e}function t3(){if(kc){var e=kc,t=Pc;if(Pc=kc=null,Ak(e),t)for(e=0;e>>=0,e===0?32:31-(n7(e)/i7|0)|0}var Pp=64,Dp=4194304;function Ff(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hm(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Ff(s):(a&=o,a!==0&&(n=Ff(a)))}else o=r&~i,o!==0?n=Ff(o):a!==0&&(n=Ff(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Dv(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Li(t),e[t]=r}function l7(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=id),Ok=" ",zk=!1;function b3(e,t){switch(e){case"keyup":return O7.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function S3(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cc=!1;function B7(e,t){switch(e){case"compositionend":return S3(t);case"keypress":return t.which!==32?null:(zk=!0,Ok);case"textInput":return e=t.data,e===Ok&&zk?null:e;default:return null}}function j7(e,t){if(cc)return e==="compositionend"||!jC&&b3(e,t)?(e=_3(),lm=OC=Go=null,cc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Fk(r)}}function M3(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?M3(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function A3(){for(var e=window,t=jm();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=jm(e.document)}return t}function VC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Y7(e){var t=A3(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&M3(r.ownerDocument.documentElement,r)){if(n!==null&&VC(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=Gk(r,a);var o=Gk(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,hc=null,kS=null,od=null,PS=!1;function Hk(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;PS||hc==null||hc!==jm(n)||(n=hc,"selectionStart"in n&&VC(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),od&&Od(od,n)||(od=n,n=Zm(kS,"onSelect"),0vc||(e.current=OS[vc],OS[vc]=null,vc--)}function Mt(e,t){vc++,OS[vc]=e.current,e.current=t}var ms={},Yr=Cs(ms),mn=Cs(!1),Hl=ms;function Gc(e,t){var r=e.type.contextTypes;if(!r)return ms;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yn(e){return e=e.childContextTypes,e!=null}function Ym(){Lt(mn),Lt(Yr)}function qk(e,t,r){if(Yr.current!==ms)throw Error(ce(168));Mt(Yr,t),Mt(mn,r)}function O3(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(ce(108,HU(e)||"Unknown",i));return zt({},r,n)}function Xm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ms,Hl=Yr.current,Mt(Yr,e),Mt(mn,mn.current),!0}function Kk(e,t,r){var n=e.stateNode;if(!n)throw Error(ce(169));r?(e=O3(e,t,Hl),n.__reactInternalMemoizedMergedChildContext=e,Lt(mn),Lt(Yr),Mt(Yr,e)):Lt(mn),Mt(mn,r)}var Ha=null,P0=!1,Cx=!1;function z3(e){Ha===null?Ha=[e]:Ha.push(e)}function o9(e){P0=!0,z3(e)}function Ms(){if(!Cx&&Ha!==null){Cx=!0;var e=0,t=xt;try{var r=Ha;for(xt=1;e>=o,i-=o,Ua=1<<32-Li(t)+i|r<k?(N=A,A=null):N=A.sibling;var D=f(y,A,b[k],w);if(D===null){A===null&&(A=N);break}e&&A&&D.alternate===null&&t(y,A),_=a(D,_,k),M===null?C=D:M.sibling=D,M=D,A=N}if(k===b.length)return r(y,A),kt&&cl(y,k),C;if(A===null){for(;kk?(N=A,A=null):N=A.sibling;var I=f(y,A,D.value,w);if(I===null){A===null&&(A=N);break}e&&A&&I.alternate===null&&t(y,A),_=a(I,_,k),M===null?C=I:M.sibling=I,M=I,A=N}if(D.done)return r(y,A),kt&&cl(y,k),C;if(A===null){for(;!D.done;k++,D=b.next())D=h(y,D.value,w),D!==null&&(_=a(D,_,k),M===null?C=D:M.sibling=D,M=D);return kt&&cl(y,k),C}for(A=n(y,A);!D.done;k++,D=b.next())D=d(A,y,k,D.value,w),D!==null&&(e&&D.alternate!==null&&A.delete(D.key===null?k:D.key),_=a(D,_,k),M===null?C=D:M.sibling=D,M=D);return e&&A.forEach(function(z){return t(y,z)}),kt&&cl(y,k),C}function m(y,_,b,w){if(typeof b=="object"&&b!==null&&b.type===uc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Ap:e:{for(var C=b.key,M=_;M!==null;){if(M.key===C){if(C=b.type,C===uc){if(M.tag===7){r(y,M.sibling),_=i(M,b.props.children),_.return=y,y=_;break e}}else if(M.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Oo&&eP(C)===M.type){r(y,M.sibling),_=i(M,b.props),_.ref=nf(y,M,b),_.return=y,y=_;break e}r(y,M);break}else t(y,M);M=M.sibling}b.type===uc?(_=El(b.props.children,y.mode,w,b.key),_.return=y,y=_):(w=gm(b.type,b.key,b.props,null,y.mode,w),w.ref=nf(y,_,b),w.return=y,y=w)}return o(y);case lc:e:{for(M=b.key;_!==null;){if(_.key===M)if(_.tag===4&&_.stateNode.containerInfo===b.containerInfo&&_.stateNode.implementation===b.implementation){r(y,_.sibling),_=i(_,b.children||[]),_.return=y,y=_;break e}else{r(y,_);break}else t(y,_);_=_.sibling}_=Nx(b,y.mode,w),_.return=y,y=_}return o(y);case Oo:return M=b._init,m(y,_,M(b._payload),w)}if(Vf(b))return p(y,_,b,w);if(Qh(b))return g(y,_,b,w);Bp(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,_!==null&&_.tag===6?(r(y,_.sibling),_=i(_,b),_.return=y,y=_):(r(y,_),_=Ix(b,y.mode,w),_.return=y,y=_),o(y)):r(y,_)}return m}var Wc=F3(!0),G3=F3(!1),Qm=Cs(null),Jm=null,mc=null,WC=null;function UC(){WC=mc=Jm=null}function ZC(e){var t=Qm.current;Lt(Qm),e._currentValue=t}function jS(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ic(e,t){Jm=e,WC=mc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gn=!0),e.firstContext=null)}function oi(e){var t=e._currentValue;if(WC!==e)if(e={context:e,memoizedValue:t,next:null},mc===null){if(Jm===null)throw Error(ce(308));mc=e,Jm.dependencies={lanes:0,firstContext:e}}else mc=mc.next=e;return t}var Tl=null;function $C(e){Tl===null?Tl=[e]:Tl.push(e)}function H3(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,$C(t)):(r.next=i.next,i.next=r),t.interleaved=r,so(e,n)}function so(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var zo=!1;function YC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function W3(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function rs(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ct&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,so(e,r)}return i=n.interleaved,i===null?(t.next=t,$C(n)):(t.next=i.next,i.next=t),n.interleaved=t,so(e,r)}function cm(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,NC(e,r)}}function tP(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ey(e,t,r,n){var i=e.updateQueue;zo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var h=i.baseState;o=0,c=u=l=null,s=a;do{var f=s.lane,d=s.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,g=s;switch(f=t,d=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){h=p.call(d,h,f);break e}h=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(d,h,f):p,f==null)break e;h=zt({},h,f);break e;case 2:zo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else d={eventTime:d,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=d,l=h):c=c.next=d,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Zl|=o,e.lanes=o,e.memoizedState=h}}function rP(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Ax.transition;Ax.transition={};try{e(!1),t()}finally{xt=r,Ax.transition=n}}function sB(){return si().memoizedState}function c9(e,t,r){var n=is(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},lB(e))uB(t,r);else if(r=H3(e,t,r,n),r!==null){var i=tn();ki(r,e,n,i),cB(r,t,n)}}function h9(e,t,r){var n=is(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(lB(e))uB(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,Ei(s,o)){var l=t.interleaved;l===null?(i.next=i,$C(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=H3(e,t,i,n),r!==null&&(i=tn(),ki(r,e,n,i),cB(r,t,n))}}function lB(e){var t=e.alternate;return e===Et||t!==null&&t===Et}function uB(e,t){sd=ry=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function cB(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,NC(e,r)}}var ny={readContext:oi,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},f9={readContext:oi,useCallback:function(e,t){return ra().memoizedState=[e,t===void 0?null:t],e},useContext:oi,useEffect:iP,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,fm(4194308,4,rB.bind(null,t,e),r)},useLayoutEffect:function(e,t){return fm(4194308,4,e,t)},useInsertionEffect:function(e,t){return fm(4,2,e,t)},useMemo:function(e,t){var r=ra();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ra();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=c9.bind(null,Et,e),[n.memoizedState,e]},useRef:function(e){var t=ra();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:r2,useDeferredValue:function(e){return ra().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=u9.bind(null,e[1]),ra().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Et,i=ra();if(kt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=t(),wr===null)throw Error(ce(349));Ul&30||Y3(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,iP(q3.bind(null,n,a,e),[e]),n.flags|=2048,Wd(9,X3.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=ra(),t=wr.identifierPrefix;if(kt){var r=Za,n=Ua;r=(n&~(1<<32-Li(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Gd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[ia]=t,e[jd]=n,xB(e,t,!1,!1),t.stateNode=e;e:{switch(o=bS(r,n),r){case"dialog":At("cancel",e),At("close",e),i=n;break;case"iframe":case"object":case"embed":At("load",e),i=n;break;case"video":case"audio":for(i=0;i$c&&(t.flags|=128,n=!0,af(a,!1),t.lanes=4194304)}else{if(!n)if(e=ty(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),af(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!kt)return jr(t),null}else 2*Yt()-a.renderingStartTime>$c&&r!==1073741824&&(t.flags|=128,n=!0,af(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Yt(),t.sibling=null,r=Nt.current,Mt(Nt,n?r&1|2:r&1),t):(jr(t),null);case 22:case 23:return l2(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?wn&1073741824&&(jr(t),t.subtreeFlags&6&&(t.flags|=8192)):jr(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function x9(e,t){switch(GC(t),t.tag){case 1:return yn(t.type)&&Ym(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Uc(),Lt(mn),Lt(Yr),KC(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qC(t),null;case 13:if(Lt(Nt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));Hc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(Nt),null;case 4:return Uc(),null;case 10:return ZC(t.type._context),null;case 22:case 23:return l2(),null;case 24:return null;default:return null}}var Vp=!1,Wr=!1,b9=typeof WeakSet=="function"?WeakSet:Set,ke=null;function yc(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Vt(e,t,n)}else r.current=null}function YS(e,t,r){try{r()}catch(n){Vt(e,t,n)}}var pP=!1;function S9(e,t){if(DS=Wm,e=A3(),VC(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,h=e,f=null;t:for(;;){for(var d;h!==r||i!==0&&h.nodeType!==3||(s=o+i),h!==a||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(d=h.firstChild)!==null;)f=h,h=d;for(;;){if(h===e)break t;if(f===r&&++u===i&&(s=o),f===a&&++c===n&&(l=o),(d=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=d}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(IS={focusedElem:e,selectionRange:r},Wm=!1,ke=t;ke!==null;)if(t=ke,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ke=e;else for(;ke!==null;){t=ke;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,y=t.stateNode,_=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Si(t.type,g),m);y.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(w){Vt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ke=e;break}ke=t.return}return p=pP,pP=!1,p}function ld(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&YS(t,r,a)}i=i.next}while(i!==n)}}function N0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function XS(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function wB(e){var t=e.alternate;t!==null&&(e.alternate=null,wB(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ia],delete t[jd],delete t[RS],delete t[i9],delete t[a9])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function TB(e){return e.tag===5||e.tag===3||e.tag===4}function gP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||TB(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qS(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=$m));else if(n!==4&&(e=e.child,e!==null))for(qS(e,t,r),e=e.sibling;e!==null;)qS(e,t,r),e=e.sibling}function KS(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(KS(e,t,r),e=e.sibling;e!==null;)KS(e,t,r),e=e.sibling}var Ar=null,Ti=!1;function Co(e,t,r){for(r=r.child;r!==null;)CB(e,t,r),r=r.sibling}function CB(e,t,r){if(va&&typeof va.onCommitFiberUnmount=="function")try{va.onCommitFiberUnmount(C0,r)}catch{}switch(r.tag){case 5:Wr||yc(r,t);case 6:var n=Ar,i=Ti;Ar=null,Co(e,t,r),Ar=n,Ti=i,Ar!==null&&(Ti?(e=Ar,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ar.removeChild(r.stateNode));break;case 18:Ar!==null&&(Ti?(e=Ar,r=r.stateNode,e.nodeType===8?Tx(e.parentNode,r):e.nodeType===1&&Tx(e,r),Ed(e)):Tx(Ar,r.stateNode));break;case 4:n=Ar,i=Ti,Ar=r.stateNode.containerInfo,Ti=!0,Co(e,t,r),Ar=n,Ti=i;break;case 0:case 11:case 14:case 15:if(!Wr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&YS(r,t,o),i=i.next}while(i!==n)}Co(e,t,r);break;case 1:if(!Wr&&(yc(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Vt(r,t,s)}Co(e,t,r);break;case 21:Co(e,t,r);break;case 22:r.mode&1?(Wr=(n=Wr)||r.memoizedState!==null,Co(e,t,r),Wr=n):Co(e,t,r);break;default:Co(e,t,r)}}function mP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new b9),t.forEach(function(n){var i=D9.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function mi(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*T9(n/1960))-n,10e?16:e,Ho===null)var n=!1;else{if(e=Ho,Ho=null,oy=0,ct&6)throw Error(ce(331));var i=ct;for(ct|=4,ke=e.current;ke!==null;){var a=ke,o=a.child;if(ke.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lYt()-o2?Nl(e,0):a2|=r),_n(e,t)}function NB(e,t){t===0&&(e.mode&1?(t=Dp,Dp<<=1,!(Dp&130023424)&&(Dp=4194304)):t=1);var r=tn();e=so(e,t),e!==null&&(Dv(e,t,r),_n(e,r))}function P9(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),NB(e,r)}function D9(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ce(314))}n!==null&&n.delete(t),NB(e,r)}var EB;EB=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||mn.current)gn=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return gn=!1,y9(e,t,r);gn=!!(e.flags&131072)}else gn=!1,kt&&t.flags&1048576&&B3(t,Km,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;dm(e,t),e=t.pendingProps;var i=Gc(t,Yr.current);Ic(t,r),i=JC(null,t,n,e,i,r);var a=e2();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yn(n)?(a=!0,Xm(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,YC(t),i.updater=I0,t.stateNode=i,i._reactInternals=t,FS(t,n,e,r),t=WS(null,t,n,!0,a,r)):(t.tag=0,kt&&a&&FC(t),Kr(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(dm(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=N9(n),e=Si(n,e),i){case 0:t=HS(null,t,n,e,r);break e;case 1:t=fP(null,t,n,e,r);break e;case 11:t=cP(null,t,n,e,r);break e;case 14:t=hP(null,t,n,Si(n.type,e),r);break e}throw Error(ce(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Si(n,i),HS(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Si(n,i),fP(e,t,n,i,r);case 3:e:{if(mB(t),e===null)throw Error(ce(387));n=t.pendingProps,a=t.memoizedState,i=a.element,W3(e,t),ey(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Zc(Error(ce(423)),t),t=dP(e,t,n,r,i);break e}else if(n!==i){i=Zc(Error(ce(424)),t),t=dP(e,t,n,r,i);break e}else for(Ln=ts(t.stateNode.containerInfo.firstChild),Nn=t,kt=!0,Ci=null,r=G3(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Hc(),n===i){t=lo(e,t,r);break e}Kr(e,t,n,r)}t=t.child}return t;case 5:return U3(t),e===null&&BS(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,NS(n,i)?o=null:a!==null&&NS(n,a)&&(t.flags|=32),gB(e,t),Kr(e,t,o,r),t.child;case 6:return e===null&&BS(t),null;case 13:return yB(e,t,r);case 4:return XC(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Wc(t,null,n,r):Kr(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Si(n,i),cP(e,t,n,i,r);case 7:return Kr(e,t,t.pendingProps,r),t.child;case 8:return Kr(e,t,t.pendingProps.children,r),t.child;case 12:return Kr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Mt(Qm,n._currentValue),n._currentValue=o,a!==null)if(Ei(a.value,o)){if(a.children===i.children&&!mn.current){t=lo(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=Qa(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),jS(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(ce(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),jS(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Kr(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Ic(t,r),i=oi(i),n=n(i),t.flags|=1,Kr(e,t,n,r),t.child;case 14:return n=t.type,i=Si(n,t.pendingProps),i=Si(n.type,i),hP(e,t,n,i,r);case 15:return vB(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Si(n,i),dm(e,t),t.tag=1,yn(n)?(e=!0,Xm(t)):e=!1,Ic(t,r),hB(t,n,i),FS(t,n,i,r),WS(null,t,n,!0,e,r);case 19:return _B(e,t,r);case 22:return pB(e,t,r)}throw Error(ce(156,t.tag))};function RB(e,t){return l3(e,t)}function I9(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ri(e,t,r,n){return new I9(e,t,r,n)}function c2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function N9(e){if(typeof e=="function")return c2(e)?1:0;if(e!=null){if(e=e.$$typeof,e===kC)return 11;if(e===PC)return 14}return 2}function as(e,t){var r=e.alternate;return r===null?(r=ri(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function gm(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")c2(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case uc:return El(r.children,i,a,t);case LC:o=8,i|=8;break;case hS:return e=ri(12,r,t,i|2),e.elementType=hS,e.lanes=a,e;case fS:return e=ri(13,r,t,i),e.elementType=fS,e.lanes=a,e;case dS:return e=ri(19,r,t,i),e.elementType=dS,e.lanes=a,e;case Uz:return R0(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Hz:o=10;break e;case Wz:o=9;break e;case kC:o=11;break e;case PC:o=14;break e;case Oo:o=16,n=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=ri(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function El(e,t,r,n){return e=ri(7,e,n,t),e.lanes=r,e}function R0(e,t,r,n){return e=ri(22,e,n,t),e.elementType=Uz,e.lanes=r,e.stateNode={isHidden:!1},e}function Ix(e,t,r){return e=ri(6,e,null,t),e.lanes=r,e}function Nx(e,t,r){return t=ri(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function E9(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fx(0),this.expirationTimes=fx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fx(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function h2(e,t,r,n,i,a,o,s,l){return e=new E9(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=ri(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},YC(a),e}function R9(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(jB)}catch(e){console.error(e)}}jB(),jz.exports=On;var VB=jz.exports,CP=VB;uS.createRoot=CP.createRoot,uS.hydrateRoot=CP.hydrateRoot;/** - * @remix-run/router v1.23.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Zd(){return Zd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function p2(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function F9(){return Math.random().toString(36).substr(2,8)}function AP(e,t){return{usr:e.state,key:e.key,idx:t}}function rw(e,t,r,n){return r===void 0&&(r=null),Zd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?mh(t):t,{state:r,key:t&&t.key||n||F9()})}function uy(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function mh(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function G9(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Wo.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Zd({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function h(){s=Wo.Pop;let m=c(),y=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:y})}function f(m,y){s=Wo.Push;let _=rw(g.location,m,y);u=c()+1;let b=AP(_,u),w=g.createHref(_);try{o.pushState(b,"",w)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(w)}a&&l&&l({action:s,location:g.location,delta:1})}function d(m,y){s=Wo.Replace;let _=rw(g.location,m,y);u=c();let b=AP(_,u),w=g.createHref(_);o.replaceState(b,"",w),a&&l&&l({action:s,location:g.location,delta:0})}function p(m){let y=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof m=="string"?m:uy(m);return _=_.replace(/ $/,"%20"),nr(y,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,y)}let g={get action(){return s},get location(){return e(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(MP,h),l=m,()=>{i.removeEventListener(MP,h),l=null}},createHref(m){return t(i,m)},createURL:p,encodeLocation(m){let y=p(m);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:d,go(m){return o.go(m)}};return g}var LP;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(LP||(LP={}));function H9(e,t,r){return r===void 0&&(r="/"),W9(e,t,r)}function W9(e,t,r,n){let i=typeof t=="string"?mh(t):t,a=g2(i.pathname||"/",r);if(a==null)return null;let o=FB(e);U9(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(nr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=os([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(nr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),FB(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:Q9(u,a.index),routesMeta:c})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of GB(a.path))i(a,o,l)}),t}function GB(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=GB(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function U9(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:J9(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Z9=/^:[\w-]+$/,$9=3,Y9=2,X9=1,q9=10,K9=-2,kP=e=>e==="*";function Q9(e,t){let r=e.split("/"),n=r.length;return r.some(kP)&&(n+=K9),t&&(n+=Y9),r.filter(i=>!kP(i)).reduce((i,a)=>i+(Z9.test(a)?$9:a===""?X9:q9),n)}function J9(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function eZ(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:f,isOptional:d}=c;if(f==="*"){let g=s[h]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[h];return d&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function rZ(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),p2(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function nZ(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return p2(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function g2(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const iZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,aZ=e=>iZ.test(e);function oZ(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?mh(e):e,a;if(r)if(aZ(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),p2(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=PP(r.substring(1),"/"):a=PP(r,t)}else a=t;return{pathname:a,search:uZ(n),hash:cZ(i)}}function PP(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Ex(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function sZ(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function HB(e,t){let r=sZ(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function WB(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=mh(e):(i=Zd({},e),nr(!i.pathname||!i.pathname.includes("?"),Ex("?","pathname","search",i)),nr(!i.pathname||!i.pathname.includes("#"),Ex("#","pathname","hash",i)),nr(!i.search||!i.search.includes("#"),Ex("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;i.pathname=f.join("/")}s=h>=0?t[h]:"/"}let l=oZ(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const os=e=>e.join("/").replace(/\/\/+/g,"/"),lZ=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),uZ=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cZ=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function hZ(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const UB=["post","put","patch","delete"];new Set(UB);const fZ=["get",...UB];new Set(fZ);/** - * React Router v6.30.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function $d(){return $d=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),U.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let h=WB(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:os([t,h.pathname])),(c.replace?n.replace:n.push)(h,c.state,c)},[t,n,o,a,e])}function XB(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=U.useContext(su),{matches:i}=U.useContext(lu),{pathname:a}=Ov(),o=JSON.stringify(HB(i,n.v7_relativeSplatPath));return U.useMemo(()=>WB(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function gZ(e,t){return mZ(e,t)}function mZ(e,t,r,n){Rv()||nr(!1);let{navigator:i}=U.useContext(su),{matches:a}=U.useContext(lu),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Ov(),c;if(t){var h;let m=typeof t=="string"?mh(t):t;l==="/"||(h=m.pathname)!=null&&h.startsWith(l)||nr(!1),c=m}else c=u;let f=c.pathname||"/",d=f;if(l!=="/"){let m=l.replace(/^\//,"").split("/");d="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=H9(e,{pathname:d}),g=SZ(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:os([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:os([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return t&&g?U.createElement(V0.Provider,{value:{location:$d({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Wo.Pop}},g):g}function yZ(){let e=MZ(),t=hZ(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return U.createElement(U.Fragment,null,U.createElement("h2",null,"Unexpected Application Error!"),U.createElement("h3",{style:{fontStyle:"italic"}},t),r?U.createElement("pre",{style:i},r):null,null)}const _Z=U.createElement(yZ,null);class xZ extends U.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?U.createElement(lu.Provider,{value:this.props.routeContext},U.createElement(ZB.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bZ(e){let{routeContext:t,match:r,children:n}=e,i=U.useContext(m2);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),U.createElement(lu.Provider,{value:t},n)}function SZ(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);c>=0||nr(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,h,f)=>{let d,p=!1,g=null,m=null;r&&(d=s&&h.route.id?s[h.route.id]:void 0,g=h.route.errorElement||_Z,l&&(u<0&&f===0?(LZ("route-fallback"),p=!0,m=null):u===f&&(p=!0,m=h.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,f+1)),_=()=>{let b;return d?b=g:p?b=m:h.route.Component?b=U.createElement(h.route.Component,null):h.route.element?b=h.route.element:b=c,U.createElement(bZ,{match:h,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:b})};return r&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?U.createElement(xZ,{location:r.location,revalidation:r.revalidation,component:g,error:d,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):_()},null)}var qB=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(qB||{}),KB=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(KB||{});function wZ(e){let t=U.useContext(m2);return t||nr(!1),t}function TZ(e){let t=U.useContext(dZ);return t||nr(!1),t}function CZ(e){let t=U.useContext(lu);return t||nr(!1),t}function QB(e){let t=CZ(),r=t.matches[t.matches.length-1];return r.route.id||nr(!1),r.route.id}function MZ(){var e;let t=U.useContext(ZB),r=TZ(),n=QB();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function AZ(){let{router:e}=wZ(qB.UseNavigateStable),t=QB(KB.UseNavigateStable),r=U.useRef(!1);return $B(()=>{r.current=!0}),U.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,$d({fromRouteId:t},a)))},[e,t])}const DP={};function LZ(e,t,r){DP[e]||(DP[e]=!0)}function kZ(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function fl(e){nr(!1)}function PZ(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Wo.Pop,navigator:a,static:o=!1,future:s}=e;Rv()&&nr(!1);let l=t.replace(/^\/*/,"/"),u=U.useMemo(()=>({basename:l,navigator:a,static:o,future:$d({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=mh(n));let{pathname:c="/",search:h="",hash:f="",state:d=null,key:p="default"}=n,g=U.useMemo(()=>{let m=g2(c,l);return m==null?null:{location:{pathname:m,search:h,hash:f,state:d,key:p},navigationType:i}},[l,c,h,f,d,p,i]);return g==null?null:U.createElement(su.Provider,{value:u},U.createElement(V0.Provider,{children:r,value:g}))}function DZ(e){let{children:t,location:r}=e;return gZ(nw(t),r)}new Promise(()=>{});function nw(e,t){t===void 0&&(t=[]);let r=[];return U.Children.forEach(e,(n,i)=>{if(!U.isValidElement(n))return;let a=[...t,i];if(n.type===U.Fragment){r.push.apply(r,nw(n.props.children,a));return}n.type!==fl&&nr(!1),!n.props.index||!n.props.children||nr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=nw(n.props.children,a)),r.push(o)}),r}/** - * React Router DOM v6.30.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function iw(){return iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function NZ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function EZ(e,t){return e.button===0&&(!t||t==="_self")&&!NZ(e)}const RZ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],OZ="6";try{window.__reactRouterVersion=OZ}catch{}const zZ="startTransition",IP=kU[zZ];function BZ(e){let{basename:t,children:r,future:n,window:i}=e,a=U.useRef();a.current==null&&(a.current=V9({window:i,v5Compat:!0}));let o=a.current,[s,l]=U.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=U.useCallback(h=>{u&&IP?IP(()=>l(h)):l(h)},[l,u]);return U.useLayoutEffect(()=>o.listen(c),[o,c]),U.useEffect(()=>kZ(n),[n]),U.createElement(PZ,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const jZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",VZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,FZ=U.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:h}=t,f=IZ(t,RZ),{basename:d}=U.useContext(su),p,g=!1;if(typeof u=="string"&&VZ.test(u)&&(p=u,jZ))try{let b=new URL(window.location.href),w=u.startsWith("//")?new URL(b.protocol+u):new URL(u),C=g2(w.pathname,d);w.origin===b.origin&&C!=null?u=C+w.search+w.hash:g=!0}catch{}let m=vZ(u,{relative:i}),y=GZ(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:h});function _(b){n&&n(b),b.defaultPrevented||y(b)}return U.createElement("a",iw({},f,{href:p||m,onClick:g||a?n:_,ref:r,target:l}))});var NP;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(NP||(NP={}));var EP;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(EP||(EP={}));function GZ(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=YB(),u=Ov(),c=XB(e,{relative:o});return U.useCallback(h=>{if(EZ(h,r)){h.preventDefault();let f=n!==void 0?n:uy(u)===uy(c);l(e,{replace:f,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,e,a,o,s])}/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const HZ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JB=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var WZ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const UZ=U.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>U.createElement("svg",{ref:l,...WZ,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:JB("lucide",i),...s},[...o.map(([u,c])=>U.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Oe=(e,t)=>{const r=U.forwardRef(({className:n,...i},a)=>U.createElement(UZ,{ref:a,iconNode:t,className:JB(`lucide-${HZ(e)}`,n),...i}));return r.displayName=`${e}`,r};/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const y2=Oe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rx=Oe("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ZZ=Oe("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cy=Oe("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $Z=Oe("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const YZ=Oe("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XZ=Oe("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qZ=Oe("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const KZ=Oe("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yc=Oe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zv=Oe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const QZ=Oe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yd=Oe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JZ=Oe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Bv=Oe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hd=Oe("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xc=Oe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xd=Oe("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const e$=Oe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const e4=Oe("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const t$=Oe("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r$=Oe("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qd=Oe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const t4=Oe("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _2=Oe("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const x2=Oe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const n$=Oe("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hy=Oe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const i$=Oe("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r4=Oe("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const n4=Oe("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const a$=Oe("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const o$=Oe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const s$=Oe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const l$=Oe("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const u$=Oe("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const F0=Oe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qc=Oe("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const i4=Oe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const a4=Oe("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const c$=Oe("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const o4=Oe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const s4=Oe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RP=Oe("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const l4=Oe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const OP=Oe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const h$=Oe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const f$=Oe("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const b2=Oe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uo=Oe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const d$=Oe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const v$=Oe("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const u4=Oe("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zP=Oe("Wind",[["path",{d:"M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2",key:"1k4u03"}],["path",{d:"M9.6 4.6A2 2 0 1 1 11 8H2",key:"b7d0fd"}],["path",{d:"M12.6 19.4A2 2 0 1 0 14 16H2",key:"1p5cb3"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jv=Oe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** - * @license lucide-react v0.383.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kd=Oe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);async function or(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function BP(){return or("/api/status")}async function p$(){return or("/api/health")}async function g$(){return or("/api/nodes")}async function m$(){return or("/api/edges")}async function y$(){return or("/api/sources")}async function c4(){return or("/api/alerts/active")}async function jP(e=50,t=0,r,n){const i=new URLSearchParams;return i.set("limit",e.toString()),i.set("offset",t.toString()),r&&r!=="all"&&i.set("type",r),n&&n!=="all"&&i.set("severity",n),or(`/api/alerts/history?${i.toString()}`)}async function _$(){return or("/api/subscriptions")}async function h4(){return or("/api/env/status")}async function x$(){return or("/api/env/active")}async function b$(){return or("/api/env/propagation")}async function S$(){return or("/api/env/swpc")}async function w$(){return or("/api/env/ducting")}async function T$(){return or("/api/env/fires")}async function C$(){return or("/api/env/avalanche")}async function M$(){return or("/api/env/streams")}async function A$(){return or("/api/env/traffic")}async function L$(){return or("/api/env/roads")}async function k$(){return or("/api/env/hotspots")}async function P$(){return or("/api/regions")}function S2(){const[e,t]=U.useState(!1),[r,n]=U.useState(null),[i,a]=U.useState(null),o=U.useRef(null),s=U.useRef(null),l=U.useRef(1e3),u=U.useCallback(()=>{var f;if(((f=o.current)==null?void 0:f.readyState)===WebSocket.OPEN)return;const h=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const d=new WebSocket(h);o.current=d,d.onopen=()=>{t(!0),l.current=1e3},d.onmessage=g=>{try{const m=JSON.parse(g.data);switch(m.type){case"health_update":n(m.data);break;case"alert_fired":a(m.data);break}}catch(m){console.error("Failed to parse WebSocket message:",m)}},d.onclose=()=>{t(!1),o.current=null;const g=Math.min(l.current,3e4);s.current=window.setTimeout(()=>{l.current=Math.min(g*2,3e4),u()},g)},d.onerror=()=>{d.close()};const p=setInterval(()=>{d.readyState===WebSocket.OPEN&&d.send("ping")},3e4);d.addEventListener("close",()=>{clearInterval(p)})}catch(d){console.error("Failed to create WebSocket:",d)}},[]);return U.useEffect(()=>(u(),()=>{s.current&&clearTimeout(s.current),o.current&&o.current.close()}),[u]),{connected:e,lastHealth:r,lastAlert:i}}const f4=U.createContext(null);function D$(){const e=U.useContext(f4);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function I$(e){switch(e==null?void 0:e.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:Bv,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:uo,iconColor:"text-amber-500"};default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:hy,iconColor:"text-blue-500"}}}function N$({toast:e,onDismiss:t,onNavigate:r}){const n=I$(e.alert.severity),i=n.icon;return U.useEffect(()=>{const a=setTimeout(t,8e3);return()=>clearTimeout(a)},[t]),S.jsx("div",{className:`${n.bg} border ${n.border} rounded-lg shadow-lg overflow-hidden animate-slide-in cursor-pointer`,onClick:r,role:"alert",children:S.jsxs("div",{className:"flex items-start gap-3 p-4",children:[S.jsx("div",{className:`w-1 self-stretch -ml-4 -my-4 ${n.border.replace("border","bg")}`}),S.jsx(i,{size:18,className:n.iconColor}),S.jsxs("div",{className:"flex-1 min-w-0 pr-2",children:[S.jsx("div",{className:"text-sm font-medium text-slate-200 mb-0.5",children:e.alert.type.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}),S.jsx("div",{className:"text-sm text-slate-300 line-clamp-2",children:e.alert.message})]}),S.jsx("button",{onClick:a=>{a.stopPropagation(),t()},className:"text-slate-400 hover:text-slate-200 transition-colors",children:S.jsx(jv,{size:16})})]})})}function E$({children:e}){const[t,r]=U.useState([]),n=YB(),i=U.useCallback(s=>{const l=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r(u=>[...u,{id:l,alert:s}])},[]),a=U.useCallback(s=>{r(l=>l.filter(u=>u.id!==s))},[]),o=U.useCallback(()=>{n("/alerts")},[n]);return S.jsxs(f4.Provider,{value:{addToast:i},children:[e,S.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:t.map(s=>S.jsx("div",{className:"pointer-events-auto",children:S.jsx(N$,{toast:s,onDismiss:()=>a(s.id),onNavigate:o})},s.id))})]})}const d4=[{path:"/",label:"Dashboard",icon:r4},{path:"/mesh",label:"Mesh",icon:qc},{path:"/environment",label:"Environment",icon:Xd},{path:"/config",label:"Config",icon:l4},{path:"/alerts",label:"Alerts",icon:cy},{path:"/notifications",label:"Notifications",icon:ZZ}];function R$(e){const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60);return t>0?`${t}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function O$(e){const t=d4.find(r=>r.path===e);return(t==null?void 0:t.label)||"Dashboard"}function z$({children:e}){var f;const t=Ov(),{connected:r,lastAlert:n}=S2(),{addToast:i}=D$(),[a,o]=U.useState(null),[s,l]=U.useState(null);U.useEffect(()=>{if(n){const d=`${n.type}-${n.message}-${n.timestamp}`;d!==s&&(l(d),i(n))}},[n,s,i]);const[u,c]=U.useState(new Date);U.useEffect(()=>{BP().then(o).catch(console.error);const d=setInterval(()=>{BP().then(o).catch(console.error)},3e4);return()=>clearInterval(d)},[]),U.useEffect(()=>{const d=setInterval(()=>c(new Date),1e3);return()=>clearInterval(d)},[]);const h=u.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return S.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[S.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[S.jsx("div",{className:"p-5 border-b border-border",children:S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),S.jsxs("div",{children:[S.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),S.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(a==null?void 0:a.version)||"..."]})]})]})}),S.jsx("nav",{className:"flex-1 py-4",children:d4.map(d=>{const p=t.pathname===d.path,g=d.icon;return S.jsxs(FZ,{to:d.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${p?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[p&&S.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),S.jsx(g,{size:18}),d.label]},d.path)})}),S.jsxs("div",{className:"p-5 border-t border-border",children:[S.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${a!=null&&a.connected?"bg-green-500":"bg-red-500"}`}),S.jsx("span",{className:"text-xs text-slate-400",children:a!=null&&a.connected?"Connected":"Disconnected"})]}),S.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(f=a==null?void 0:a.connection_type)==null?void 0:f.toUpperCase(),": ",a==null?void 0:a.connection_target]}),S.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",a?R$(a.uptime_seconds):"..."]})]})]}),S.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[S.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[S.jsx("h1",{className:"text-lg font-semibold",children:O$(t.pathname)}),S.jsxs("div",{className:"flex items-center gap-6",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),S.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),S.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[h," MT"]})]})]}),S.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:e})]})]})}function B$({health:e}){const t=e.score,r=e.tier,i=(s=>s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(t),a=2*Math.PI*45,o=t/100*a;return S.jsx("div",{className:"flex flex-col items-center",children:S.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[S.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),S.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),S.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:t.toFixed(1)}),S.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function Hp({label:e,value:t}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:e}),S.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:S.jsx("div",{className:`h-full ${r(t)} transition-all duration-300`,style:{width:`${t}%`}})}),S.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:t.toFixed(1)})]})}function j$({alert:e}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:Bv,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:uo,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:hy,iconColor:"text-green-500"}}})(e.severity),n=r.icon;return S.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[S.jsx(n,{size:16,className:r.iconColor}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("div",{className:"text-sm text-slate-200",children:e.message}),S.jsx("div",{className:"text-xs text-slate-500 mt-1",children:e.timestamp||"Just now"})]})]})}function V$({source:e}){const t=()=>e.is_loaded?e.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return S.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${t()}`}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("div",{className:"text-sm text-slate-200 truncate",children:e.name}),S.jsxs("div",{className:"text-xs text-slate-500",children:[e.node_count," nodes * ",e.type]})]})]})}function Wp({icon:e,label:t,value:r,subvalue:n}){return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[S.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[S.jsx(e,{size:14}),S.jsx("span",{className:"text-xs",children:t})]}),S.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&S.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function F$({propagation:e}){var o,s,l;if(!e)return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"RF Propagation"}),S.jsx("div",{className:"text-slate-500",children:S.jsx("p",{children:"Loading propagation data..."})})]});const t=e.hf,r=e.uhf_ducting,n=u=>{if(!u)return"text-slate-400";switch(u){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},i=t&&(t.sfi||t.kp_current!==void 0),a=r&&r.condition;return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(Kd,{size:14}),"RF Propagation"]}),S.jsxs("div",{className:"mb-4",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar/Geomagnetic"}),i?S.jsxs("div",{className:"space-y-1",children:[S.jsxs("div",{className:"text-sm font-mono text-slate-200",children:["SFI ",((o=t.sfi)==null?void 0:o.toFixed(0))||"?"," / Kp ",((s=t.kp_current)==null?void 0:s.toFixed(1))||"?"]}),S.jsxs("div",{className:"text-xs text-slate-400",children:["R",t.r_scale??0," / S",t.s_scale??0," / G",t.g_scale??0]}),t.r_scale!==void 0&&t.r_scale>0&&S.jsxs("div",{className:"text-xs text-amber-500",children:["R",t.r_scale," Radio Blackout"]})]}):S.jsx("div",{className:"text-sm text-slate-500",children:"No data"})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Tropospheric"}),a?S.jsxs("div",{className:"space-y-1",children:[S.jsx("div",{className:`text-sm font-medium ${n(r.condition)}`,children:r.condition==="normal"?"Normal":(l=r.condition)==null?void 0:l.replace("_"," ").replace(/\b\w/g,u=>u.toUpperCase())}),S.jsxs("div",{className:"text-xs text-slate-400 font-mono",children:["dM/dz: ",r.min_gradient??"?"," M-units/km"]}),r.duct_thickness_m&&S.jsxs("div",{className:"text-xs text-slate-400",children:["Duct: ~",r.duct_thickness_m,"m thick"]})]}):S.jsx("div",{className:"text-sm text-slate-500",children:"No ducting data"})]})]})}function G$(){var g,m,y,_,b;const[e,t]=U.useState(null),[r,n]=U.useState([]),[i,a]=U.useState([]),[o,s]=U.useState(null),[l,u]=U.useState(null),[c,h]=U.useState(!0),[f,d]=U.useState(null),{lastHealth:p}=S2();return U.useEffect(()=>{Promise.all([p$(),y$(),c4(),h4(),b$().catch(()=>null)]).then(([w,C,M,A,k])=>{t(w),n(C),a(M),s(A),u(k),h(!1),document.title="Dashboard — MeshAI"}).catch(w=>{d(w.message),h(!1),document.title="Dashboard — MeshAI"})},[]),U.useEffect(()=>{p&&t(p)},[p]),c?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading..."})}):f?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsxs("div",{className:"text-red-400",children:["Error: ",f]})}):S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),e&&S.jsxs(S.Fragment,{children:[S.jsx(B$,{health:e}),S.jsxs("div",{className:"mt-6 space-y-3",children:[S.jsx(Hp,{label:"Infrastructure",value:((g=e.pillars)==null?void 0:g.infrastructure)??0}),S.jsx(Hp,{label:"Utilization",value:((m=e.pillars)==null?void 0:m.utilization)??0}),S.jsx(Hp,{label:"Behavior",value:((y=e.pillars)==null?void 0:y.behavior)??0}),S.jsx(Hp,{label:"Power",value:((_=e.pillars)==null?void 0:_.power)??0})]})]})]}),S.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?S.jsx("div",{className:"space-y-3",children:i.map((w,C)=>S.jsx(j$,{alert:w},C))}):S.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[S.jsx(hd,{size:16,className:"text-green-500"}),S.jsx("span",{children:"No active alerts"})]})]}),S.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[S.jsx(Wp,{icon:qc,label:"Nodes Online",value:(e==null?void 0:e.total_nodes)||0,subvalue:`${(e==null?void 0:e.unlocated_count)||0} unlocated`}),S.jsx(Wp,{icon:e4,label:"Infrastructure",value:`${(e==null?void 0:e.infra_online)||0}/${(e==null?void 0:e.infra_total)||0}`,subvalue:(e==null?void 0:e.infra_online)===(e==null?void 0:e.infra_total)?"All online":"Some offline"}),S.jsx(Wp,{icon:y2,label:"Utilization",value:`${((b=e==null?void 0:e.util_percent)==null?void 0:b.toFixed(1))||0}%`,subvalue:`${(e==null?void 0:e.flagged_nodes)||0} flagged`}),S.jsx(Wp,{icon:n4,label:"Regions",value:(e==null?void 0:e.total_regions)||0,subvalue:`${(e==null?void 0:e.battery_warnings)||0} battery warnings`})]})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?S.jsx("div",{className:"space-y-2",children:r.map((w,C)=>S.jsx(V$,{source:w},C))}):S.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Environmental Feeds"}),o!=null&&o.enabled?S.jsxs("div",{className:"text-slate-400",children:[o.feeds.length," feeds active"]}):S.jsxs("div",{className:"text-slate-500",children:[S.jsx("p",{children:"Environmental feeds not enabled."}),S.jsx("p",{className:"text-xs mt-2",children:"Enable in config.yaml"})]})]}),S.jsx(F$,{propagation:l})]})}/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var aw=function(e,t){return aw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},aw(e,t)};function Y(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");aw(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var fd=function(){return fd=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]"u"&&typeof self<"u"?Ze.worker=!0:!Ze.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Ze.node=!0,Ze.svgSupported=!0):Z$(navigator.userAgent,Ze);function Z$(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}}var w2=12,v4="sans-serif",co=w2+"px "+v4,$$=20,Y$=100,X$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function q$(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return t.clearMarkers=function(){R(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function xY(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),h=2*u,f=c.left,d=c.top;o.push(f,d),l=l&&a&&f===a[h]&&d===a[h+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=r?HP(s,o):HP(o,s))}function T4(e){return e.nodeName.toUpperCase()==="CANVAS"}var bY=/([&<>"'])/g,SY={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ur(e){return e==null?"":(e+"").replace(bY,function(t,r){return SY[r]})}var wY=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,zx=[],TY=Ze.browser.firefox&&+Ze.browser.version.split(".")[0]<39;function cw(e,t,r,n){return r=r||{},n?WP(e,t,r):TY&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):WP(e,t,r),r}function WP(e,t,r){if(Ze.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(T4(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(uw(zx,e,n,i)){r.zrX=zx[0],r.zrY=zx[1];return}}r.zrX=r.zrY=0}function P2(e){return e||window.event}function $n(e,t,r){if(t=P2(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&cw(e,o,t,r)}else{cw(e,t,t,r);var a=CY(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&wY.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function CY(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function hw(e,t,r,n){e.addEventListener(t,r,n)}function MY(e,t,r,n){e.removeEventListener(t,r,n)}var ho=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function UP(e){return e.which===2||e.which===3}var AY=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o1&&n&&n.length>1){var a=ZP(n)/ZP(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=LY(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function fr(){return[1,0,0,1,0,0]}function Hv(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Wv(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Pi(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function Ri(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function xo(e,t,r,n){n===void 0&&(n=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(r),h=Math.cos(r);return e[0]=i*h+s*c,e[1]=-i*c+s*h,e[2]=a*h+l*c,e[3]=-a*c+h*l,e[4]=h*(o-n[0])+c*(u-n[1])+n[0],e[5]=h*(u-n[1])-c*(o-n[0])+n[1],e}function $0(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function ui(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null}function C4(e){var t=fr();return Wv(t,e),t}const kY=Object.freeze(Object.defineProperty({__proto__:null,clone:C4,copy:Wv,create:fr,identity:Hv,invert:ui,mul:Pi,rotate:xo,scale:$0,translate:Ri},Symbol.toStringTag,{value:"Module"}));var Te=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e}(),Ml=Math.min,xc=Math.max,fw=Math.abs,$P=["x","y"],PY=["width","height"],Bs=new Te,js=new Te,Vs=new Te,Fs=new Te,Cn=M4(),Hf=Cn.minTv,dw=Cn.maxTv,gd=[0,0],Ce=function(){function e(t,r,n,i){e.set(this,t,r,n,i)}return e.set=function(t,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),t.x=r,t.y=n,t.width=i,t.height=a,t},e.prototype.union=function(t){var r=Ml(t.x,this.x),n=Ml(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=xc(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=xc(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,n=t.width/r.width,i=t.height/r.height,a=fr();return Ri(a,a,[-r.x,-r.y]),$0(a,a,[n,i]),Ri(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r,n){return e.intersect(this,t,r,n)},e.intersect=function(t,r,n,i){n&&Te.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!r)return!1;t instanceof e||(t=e.set(DY,t.x,t.y,t.width,t.height)),r instanceof e||(r=e.set(IY,r.x,r.y,r.width,r.height));var s=!!n;Cn.reset(i,s);var l=Cn.touchThreshold,u=t.x+l,c=t.x+t.width-l,h=t.y+l,f=t.y+t.height-l,d=r.x+l,p=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||h>f||d>p||g>m)return!1;var y=!(c=t.x&&r<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},e.prototype.contain=function(t,r){return e.contain(this,t,r)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,r){return t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height,t},e.applyTransform=function(t,r,n){if(!n){t!==r&&e.copy(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=r.x*i+o,t.y=r.y*a+s,t.width=r.width*i,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Bs.x=Vs.x=r.x,Bs.y=Fs.y=r.y,js.x=Fs.x=r.x+r.width,js.y=Vs.y=r.y+r.height,Bs.transform(n),Fs.transform(n),js.transform(n),Vs.transform(n),t.x=Ml(Bs.x,js.x,Vs.x,Fs.x),t.y=Ml(Bs.y,js.y,Vs.y,Fs.y);var l=xc(Bs.x,js.x,Vs.x,Fs.x),u=xc(Bs.y,js.y,Vs.y,Fs.y);t.width=l-t.x,t.height=u-t.y},e}(),DY=new Ce(0,0,0,0),IY=new Ce(0,0,0,0);function YP(e,t,r,n,i,a,o,s){var l=fw(t-r),u=fw(n-e),c=Ml(l,u),h=$P[i],f=$P[1-i],d=PY[i];t=u||!Cn.bidirectional)&&(Hf[h]=-u,Hf[f]=0,Cn.useDir&&Cn.calcDirMTV())))}function M4(){var e=0,t=new Te,r=new Te,n={minTv:new Te,maxTv:new Te,useDir:!1,dirMinTv:new Te,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=xc(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),e=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(e),u=Math.cos(e),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||t.dot(r)>0)&&r.len()=0;h--){var f=a[h];f!==i&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(jx.copy(f.getBoundingRect()),f.transform&&jx.applyTransform(f.transform),jx.intersect(c)&&s.push(f))}if(s.length)for(var d=4,p=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function zY(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?A4:!0}return!1}function XP(e,t,r,n,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=zY(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==A4)){t.target=o;break}}}function k4(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var P4=32,lf=7;function BY(e){for(var t=0;e>=P4;)t|=e&1,e>>=1;return e+t}function qP(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function jY(e,t,r){for(r--;t>>1,i(a,e[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=a}}function Vx(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(e,t[r+c])>0?o=c+1:l=c}return l}function Fx(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(e,t[r+c])<0?l=c:o=c+1}return l}function VY(e,t){var r=lf,n,i,a=0,o=[];n=[],i=[];function s(d,p){n[a]=d,i[a]=p,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]=lf||A>=lf);if(k)break;C<0&&(C=0),C+=2}if(r=C,r<1&&(r=1),p===1){for(y=0;y=0;y--)e[M+y]=e[C+y];e[w]=o[b];return}for(var A=r;;){var k=0,N=0,D=!1;do if(t(o[b],e[_])<0){if(e[w--]=e[_--],k++,N=0,--p===0){D=!0;break}}else if(e[w--]=o[b--],N++,k=0,--m===1){D=!0;break}while((k|N)=0;y--)e[M+y]=e[C+y];if(p===0){D=!0;break}}if(e[w--]=o[b--],--m===1){D=!0;break}if(N=m-Vx(e[_],o,0,m,m-1,t),N!==0){for(w-=N,b-=N,m-=N,M=w+1,C=b+1,y=0;y=lf||N>=lf);if(D)break;A<0&&(A=0),A+=2}if(r=A,r<1&&(r=1),m===1){for(w-=p,_-=p,M=w+1,C=_+1,y=p-1;y>=0;y--)e[M+y]=e[C+y];e[w]=o[b]}else{if(m===0)throw new Error;for(C=w-(m-1),y=0;ys&&(l=s),KP(e,r,r+l,r+a,t),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var Mn=1,Wf=2,ic=4,QP=!1;function Gx(){QP||(QP=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function JP(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var FY=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=JP}return e.prototype.traverse=function(t,r){for(var n=0;n=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),gy;gy=Ze.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var md={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-md.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?md.bounceIn(e*2)*.5:md.bounceOut(e*2-1)*.5+.5}},Zp=Math.pow,ls=Math.sqrt,my=1e-8,D4=1e-4,eD=ls(3),$p=1/3,aa=Ls(),Jn=Ls(),Rc=Ls();function Zo(e){return e>-my&&emy||e<-my}function ur(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function tD(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function yy(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),l=3*(t-e),u=e-i,c=s*s-3*o*l,h=s*l-9*o*u,f=l*l-3*s*u,d=0;if(Zo(c)&&Zo(h))if(Zo(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[d++]=p)}else{var g=h*h-4*c*f;if(Zo(g)){var m=h/c,p=-s/o+m,y=-m/2;p>=0&&p<=1&&(a[d++]=p),y>=0&&y<=1&&(a[d++]=y)}else if(g>0){var _=ls(g),b=c*s+1.5*o*(-h+_),w=c*s+1.5*o*(-h-_);b<0?b=-Zp(-b,$p):b=Zp(b,$p),w<0?w=-Zp(-w,$p):w=Zp(w,$p);var p=(-s-(b+w))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var C=(2*c*s-3*o*h)/(2*ls(c*c*c)),M=Math.acos(C)/3,A=ls(c),k=Math.cos(M),p=(-s-2*A*k)/(3*o),y=(-s+A*(k+eD*Math.sin(M)))/(3*o),N=(-s+A*(k-eD*Math.sin(M)))/(3*o);p>=0&&p<=1&&(a[d++]=p),y>=0&&y<=1&&(a[d++]=y),N>=0&&N<=1&&(a[d++]=N)}}return d}function N4(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(Zo(o)){if(I4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Zo(c))i[0]=-a/(2*o);else if(c>0){var h=ls(c),u=(-a+h)/(2*o),f=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function ys(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,h=(c-u)*i+u;a[0]=e,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=n}function E4(e,t,r,n,i,a,o,s,l,u,c){var h,f=.005,d=1/0,p,g,m,y;aa[0]=l,aa[1]=u;for(var _=0;_<1;_+=.05)Jn[0]=ur(e,r,i,o,_),Jn[1]=ur(t,n,a,s,_),m=ss(aa,Jn),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Zo(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var h=ls(c),u=(-o+h)/(2*a),f=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function R4(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function ev(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function O4(e,t,r,n,i,a,o,s,l){var u,c=.005,h=1/0;aa[0]=o,aa[1]=s;for(var f=0;f<1;f+=.05){Jn[0]=br(e,r,i,f),Jn[1]=br(t,n,a,f);var d=ss(aa,Jn);d=0&&d=1?1:yy(0,n,a,1,l,s)&&ur(0,i,o,1,s[0])}}}var ZY=function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Rt,this.ondestroy=t.ondestroy||Rt,this.onrestart=t.onrestart||Rt,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=me(t)?t:md[t]||D2(t)},e}(),z4=function(){function e(t){this.value=t}return e}(),$Y=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new z4(t);return this.insertEntry(r),r},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Qc=function(){function e(t){this._list=new $Y,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new z4(r),s.key=t,n.insertEntry(s),i[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),rD={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Di(e){return e=Math.round(e),e<0?0:e>255?255:e}function YY(e){return e=Math.round(e),e<0?0:e>360?360:e}function tv(e){return e<0?0:e>1?1:e}function ym(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Di(parseFloat(t)/100*255):Di(parseInt(t,10))}function Ja(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?tv(parseFloat(t)/100):tv(parseFloat(t))}function Hx(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function $o(e,t,r){return e+(t-e)*r}function Zn(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function pw(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var B4=new Qc(20),Yp=null;function Du(e,t){Yp&&pw(Yp,t),Yp=B4.put(e,Yp||t.slice())}function Zr(e,t){if(e){t=t||[];var r=B4.get(e);if(r)return pw(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in rD)return pw(t,rD[n]),Du(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Zn(t,0,0,0,1);return}return Zn(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Du(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Zn(t,0,0,0,1);return}return Zn(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Du(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Zn(t,+u[0],+u[1],+u[2],1):Zn(t,0,0,0,1);c=Ja(u.pop());case"rgb":if(u.length>=3)return Zn(t,ym(u[0]),ym(u[1]),ym(u[2]),u.length===3?c:Ja(u[3])),Du(e,t),t;Zn(t,0,0,0,1);return;case"hsla":if(u.length!==4){Zn(t,0,0,0,1);return}return u[3]=Ja(u[3]),gw(u,t),Du(e,t),t;case"hsl":if(u.length!==3){Zn(t,0,0,0,1);return}return gw(u,t),Du(e,t),t;default:return}}Zn(t,0,0,0,1)}}function gw(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=Ja(e[1]),i=Ja(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],Zn(t,Di(Hx(o,a,r+1/3)*255),Di(Hx(o,a,r)*255),Di(Hx(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function XY(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-t)/6+o/2)/o,h=((a-r)/6+o/2)/o,f=((a-n)/6+o/2)/o;t===a?l=f-h:r===a?l=1/3+c-f:n===a&&(l=2/3+h-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return e[3]!=null&&d.push(e[3]),d}}function _y(e,t){var r=Zr(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return ii(r,r.length===4?"rgba":"rgb")}}function qY(e){var t=Zr(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function yd(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){r=r||[];var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=t[i],s=t[a],l=n-i;return r[0]=Di($o(o[0],s[0],l)),r[1]=Di($o(o[1],s[1],l)),r[2]=Di($o(o[2],s[2],l)),r[3]=tv($o(o[3],s[3],l)),r}}var KY=yd;function I2(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=Zr(t[i]),s=Zr(t[a]),l=n-i,u=ii([Di($o(o[0],s[0],l)),Di($o(o[1],s[1],l)),Di($o(o[2],s[2],l)),tv($o(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var QY=I2;function eo(e,t,r,n){var i=Zr(e);if(e)return i=XY(i),t!=null&&(i[0]=YY(me(t)?t(i[0]):t)),r!=null&&(i[1]=Ja(me(r)?r(i[1]):r)),n!=null&&(i[2]=Ja(me(n)?n(i[2]):n)),ii(gw(i),"rgba")}function rv(e,t){var r=Zr(e);if(r&&t!=null)return r[3]=tv(t),ii(r,"rgba")}function ii(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function nv(e,t){var r=Zr(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}function JY(){return ii([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var nD=new Qc(100);function xy(e){if(se(e)){var t=nD.get(e);return t||(t=_y(e,-.1),nD.put(e,t)),t}else if(Vv(e)){var r=J({},e);return r.colorStops=re(e.colorStops,function(n){return{offset:n.offset,color:_y(n.color,-.1)}}),r}return e}const eX=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:yd,fastMapToColor:KY,lerp:I2,lift:_y,liftColor:xy,lum:nv,mapToColor:QY,modifyAlpha:rv,modifyHSL:eo,parse:Zr,parseCssFloat:Ja,parseCssInt:ym,random:JY,stringify:ii,toHex:qY},Symbol.toStringTag,{value:"Module"}));var by=Math.round;function iv(e){var t;if(!e||e==="transparent")e="none";else if(typeof e=="string"&&e.indexOf("rgba")>-1){var r=Zr(e);r&&(e="rgb("+r[0]+","+r[1]+","+r[2]+")",t=r[3])}return{color:e,opacity:t??1}}var iD=1e-4;function Yo(e){return e-iD}function Xp(e){return by(e*1e3)/1e3}function mw(e){return by(e*1e4)/1e4}function tX(e){return"matrix("+Xp(e[0])+","+Xp(e[1])+","+Xp(e[2])+","+Xp(e[3])+","+mw(e[4])+","+mw(e[5])+")"}var rX={left:"start",right:"end",center:"middle",middle:"middle"};function nX(e,t,r){return r==="top"?e+=t/2:r==="bottom"&&(e-=t/2),e}function iX(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function aX(e){var t=e.style,r=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function j4(e){return e&&!!e.image}function oX(e){return e&&!!e.svgElement}function N2(e){return j4(e)||oX(e)}function V4(e){return e.type==="linear"}function F4(e){return e.type==="radial"}function G4(e){return e&&(e.type==="linear"||e.type==="radial")}function Y0(e){return"url(#"+e+")"}function H4(e){var t=e.getGlobalScale(),r=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function W4(e){var t=e.x||0,r=e.y||0,n=(e.rotation||0)*dd,i=pe(e.scaleX,1),a=pe(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,l=[];return(t||r)&&l.push("translate("+t+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+by(o*dd)+"deg, "+by(s*dd)+"deg)"),l.join(" ")}var sX=function(){return Ze.hasGlobalWindow&&me(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}}(),yw=Array.prototype.slice;function Fa(e,t,r){return(t-e)*r+e}function Wx(e,t,r,n){for(var i=t.length,a=0;an?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=oD,l=r;if(Nr(r)){var u=hX(r);s=u,(u===1&&!qe(r[0])||u===2&&!qe(r[0][0]))&&(o=!0)}else if(qe(r)&&!Dr(r))s=Kp;else if(se(r))if(!isNaN(+r))s=Kp;else{var c=Zr(r);c&&(l=c,s=Uf)}else if(Vv(r)){var h=J({},l);h.colorStops=re(r.colorStops,function(d){return{offset:d.offset,color:Zr(d.color)}}),V4(r)?s=_w:F4(r)&&(s=xw),l=h}a===0?this.valType=s:(s!==this.valType||s===oD)&&(o=!0),this.discrete=this.discrete||o;var f={time:t,value:l,rawValue:r,percent:0};return n&&(f.easing=n,f.easingFunc=me(n)?n:md[n]||D2(n)),i.push(f),f},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Qp(i),u=sD(i),c=0;c=0&&!(o[c].percent<=r);c--);c=f(c,s-2)}else{for(c=h;cr);c++);c=f(c-1,s-2)}p=o[c+1],d=o[c]}if(d&&p){this._lastFr=c,this._lastFrP=r;var m=p.percent-d.percent,y=m===0?1:f((r-d.percent)/m,1);p.easingFunc&&(y=p.easingFunc(y));var _=n?this._additiveValue:u?uf:t[l];if((Qp(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)t[l]=y<1?d.rawValue:p.rawValue;else if(Qp(a))a===xm?Wx(_,d[i],p[i],y):lX(_,d[i],p[i],y);else if(sD(a)){var b=d[i],w=p[i],C=a===_w;t[l]={type:C?"linear":"radial",x:Fa(b.x,w.x,y),y:Fa(b.y,w.y,y),colorStops:re(b.colorStops,function(A,k){var N=w.colorStops[k];return{offset:Fa(A.offset,N.offset,y),color:_m(Wx([],A.color,N.color,y))}}),global:w.global},C?(t[l].x2=Fa(b.x2,w.x2,y),t[l].y2=Fa(b.y2,w.y2,y)):t[l].r=Fa(b.r,w.r,y)}else if(u)Wx(_,d[i],p[i],y),n||(t[l]=_m(_));else{var M=Fa(d[i],p[i],y);n?this._additiveValue=M:t[l]=M}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===Kp?t[n]=t[n]+i:r===Uf?(Zr(t[n],uf),qp(uf,uf,i,1),t[n]=_m(uf)):r===xm?qp(t[n],t[n],i,1):r===U4&&aD(t[n],t[n],i,1)},e}(),E2=function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){H0("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,$e(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,_d(u),i),this._trackKeys.push(s)}l.addKeyframe(t,_d(r[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e}();function bc(){return new Date().getTime()}var dX=function(e){Y(t,e);function t(r){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},t.prototype.update=function(r){for(var n=bc()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(gy(n),!r._paused&&r.update())}gy(n)},t.prototype.start=function(){this._running||(this._time=bc(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=bc(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=bc()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,n){n=n||{},this.start();var i=new E2(r,n.loop);return this.addAnimator(i),i},t}(fi),vX=300,Ux=Ze.domSupported,Zx=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=re(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}}(),lD={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},uD=!1;function bw(e){var t=e.pointerType;return t==="pen"||t==="touch"}function pX(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function $x(e){e&&(e.zrByTouch=!0)}function gX(e,t){return $n(e.dom,new mX(e,t),!0)}function Z4(e,t){for(var r=t,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return n}var mX=function(){function e(t,r){this.stopPropagation=Rt,this.stopImmediatePropagation=Rt,this.preventDefault=Rt,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),xi={mousedown:function(e){e=$n(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=$n(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=$n(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=$n(this.dom,e);var t=e.toElement||e.relatedTarget;Z4(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){uD=!0,e=$n(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){uD||(e=$n(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=$n(this.dom,e),$x(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),xi.mousemove.call(this,e),xi.mousedown.call(this,e)},touchmove:function(e){e=$n(this.dom,e),$x(e),this.handler.processGesture(e,"change"),xi.mousemove.call(this,e)},touchend:function(e){e=$n(this.dom,e),$x(e),this.handler.processGesture(e,"end"),xi.mouseup.call(this,e),+new Date-+this.__lastTouchMomentfD||e<-fD}var Hs=[],Iu=[],Xx=fr(),qx=Math.abs,qa=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return Gs(this.rotation)||Gs(this.x)||Gs(this.y)||Gs(this.scaleX-1)||Gs(this.scaleY-1)||Gs(this.skewX)||Gs(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&(hD(n),this.invTransform=null);return}n=n||fr(),r?this.getLocalTransform(n):hD(n),t&&(r?Pi(n,t,n):Wv(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Hs);var n=Hs[0]<0?-1:1,i=Hs[1]<0?-1:1,a=((Hs[0]-n)*r+n)/Hs[0]||0,o=((Hs[1]-i)*r+i)/Hs[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||fr(),ui(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var r=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||fr(),Pi(Iu,t.invTransform,r),r=Iu);var n=this.originX,i=this.originY;(n||i)&&(Xx[4]=n,Xx[5]=i,Pi(Iu,r,Xx),Iu[4]-=n,Iu[5]-=i,r=Iu),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var n=[t,r],i=this.invTransform;return i&&Ot(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&Ot(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&qx(t[0]-1)>1e-10&&qx(t[3]-1)>1e-10?Math.sqrt(qx(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){wy(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,h=t.y,f=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;r[4]=-p*a-f*g*o,r[5]=-g*o-d*p*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=f*o,u&&xo(r,r,u),r[4]+=n+c,r[5]+=i+h,r},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),ba=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function wy(e,t){for(var r=0;r=dD)){e=e||co;for(var t=[],r=+new Date,n=0;n<=127;n++)t[n]=bn.measureText(String.fromCharCode(n),e).width;var i=+new Date-r;return i>16?Kx=dD:i>2&&Kx++,t}}var Kx=0,dD=5;function Y4(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=SX(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?e.asciiWidthMap!=null?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function ya(e,t){var r=e.strWidthCache,n=r.get(t);return n==null&&(n=bn.measureText(t,e.font).width,r.put(t,n)),n}function vD(e,t,r,n){var i=ya(ma(t),e),a=Uv(t),o=Jc(0,i,r),s=Rl(0,a,n),l=new Ce(o,s,i,a);return l}function X0(e,t,r,n){var i=((e||"")+"").split(` -`),a=i.length;if(a===1)return vD(i[0],t,r,n);for(var o=new Ce(0,0,0,0),s=0;s=0?parseFloat(e)/100*t:parseFloat(e):e}function Ty(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",h="top";if(n instanceof Array)l+=Oi(n[0],r.width),u+=Oi(n[1],r.height),c=null,h=null;else switch(n){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,c="center",h="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,c="right",h="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",h="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=c,e.verticalAlign=h,e}var Qx="__zr_normal__",Jx=ba.concat(["ignore"]),wX=li(ba,function(e,t){return e[t]=!0,e},{ignore:!1}),Nu={},TX=new Ce(0,0,0,0),eg=[],q0=function(){function e(t){this.id=M2(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,h=n.autoOverflowArea,f=void 0;if((h||c)&&(f=TX,n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Nu,n,f):Ty(Nu,n,f),a.x=Nu.x,a.y=Nu.y,o=Nu.align,s=Nu.verticalAlign;var d=n.origin;if(d&&n.rotation!=null){var p=void 0,g=void 0;d==="center"?(p=f.width*.5,g=f.height*.5):(p=Oi(d[0],f.width),g=Oi(d[1],f.height)),u=!0,a.originX=-a.x+p+(i?0:f.x),a.originY=-a.y+g+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var m=n.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var _=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);a.getLocalTransform(eg),ui(eg,eg),Ce.copy(_,f),_.applyTransform(eg)}else y.overflowRect=null;var b=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,w=void 0,C=void 0,M=void 0;b&&this.canBeInsideText()?(w=n.insideFill,C=n.insideStroke,(w==null||w==="auto")&&(w=this.getInsideTextFill()),(C==null||C==="auto")&&(C=this.getInsideTextStroke(w),M=!0)):(w=n.outsideFill,C=n.outsideStroke,(w==null||w==="auto")&&(w=this.getOutsideFill()),(C==null||C==="auto")&&(C=this.getOutsideStroke(w),M=!0)),w=w||"#000",(w!==y.fill||C!==y.stroke||M!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=w,y.stroke=C,y.autoStroke=M,y.align=o,y.verticalAlign=s,r.setDefaultTextStyle(y)),r.__dirty|=Mn,l&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Cw:Tw},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Zr(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ii(n,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},J(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(Se(t))for(var n=t,i=$e(n),a=0;a0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState(Qx,!1,t)},e.prototype.useState=function(t,r,n,i){var a=t===Qx,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ne(s,t)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){H0("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,f=this._textGuide;return h&&h.useState(t,r,n,c),f&&f.useState(t,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Mn),u}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l0,p);var g=this._textContent,m=this._textGuide;g&&g.useStates(t,r,f),m&&m.useStates(t,r,f),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Mn)}},e.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var r=t.__hostTarget;t=r?t.ignoreHostSilent?null:r:t.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},e.prototype.replaceState=function(t,r,n){var i=this.currentStates.slice(),a=Ne(i,t),o=Ne(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(p,g){r.during(g)});for(var f=0;f0||i.force&&!o.length){var k=void 0,N=void 0,D=void 0;if(s){N={},f&&(k={});for(var w=0;w=0&&(i.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var i=Ne(this._children,r);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},t.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Ne(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){if(!this._disposed)return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this._disposed||this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this._disposed||this.handler.off(t,r)},e.prototype.trigger=function(t,r){this._disposed||this.handler.trigger(t,r)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),r=0;r0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}var oe=BX;function BX(e,t,r){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return Cy(e,t,r)}function Cy(e,t,r){return se(e)?zX(e).match(/%$/)?parseFloat(e)/100*t+(r||0):parseFloat(e):e==null?NaN:+e}function Ht(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),J4),e=(+e).toFixed(t),r?e:+e}function Pn(e){return e.sort(function(t,r){return t-r}),e}function Mi(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return ej(e)}function ej(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function R2(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(la(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function jX(e,t,r){if(!e[t])return 0;var n=tj(e,r);return n[t]||0}function tj(e,t){var r=li(e,function(d,p){return d+(isNaN(p)?0:p)},0);if(r===0)return[];for(var n=Math.pow(10,t),i=re(e,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=re(i,function(d){return Math.floor(d)}),s=li(o,function(d,p){return d+p},0),l=re(i,function(d,p){return d-o[p]});su&&(u=l[h],c=h);++o[c],l[c]=0,++s}return re(o,function(d){return d/n})}function VX(e,t){var r=Math.max(Mi(e),Mi(t)),n=e+t;return r>J4?n:Ht(n,r)}var Lw=9007199254740991;function O2(e){var t=Math.PI*2;return(e%t+t)%t}function eh(e){return e>-pD&&e=10&&t++,t}function z2(e,t){var r=K0(e),n=Math.pow(10,r),i=e/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,e=a*n,r>=-20?+e.toFixed(r<0?-r:0):e}function wm(e,t){var r=(e.length-1)*t+1,n=Math.floor(r),i=+e[n-1],a=r-n;return a?i+a*(e[n]-i):i}function kw(e){e.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,r=1,n=0;n0?t.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},e}();function r1(e){e.option=e.parentModel=e.ecModel=null}var oq=".",Ws="___EC__COMPONENT__CONTAINER___",fj="___EC__EXTENDED_CLASS___";function ua(e){var t={main:"",sub:""};if(e){var r=e.split(oq);t.main=r[0]||"",t.sub=r[1]||""}return t}function sq(e){Er(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function lq(e){return!!(e&&e[fj])}function F2(e,t){e.$constructor=e,e.extend=function(r){var n=this,i;return uq(n)?i=function(a){Y(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},A2(i,this)),J(i.prototype,r),i[fj]=!0,i.extend=this.extend,i.superCall=fq,i.superApply=dq,i.superClass=n,i}}function uq(e){return me(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function dj(e,t){e.extend=t.extend}var cq=Math.round(Math.random()*10);function hq(e){var t=["__\0is_clz",cq++].join("_");e.prototype[t]=!0,e.isInstance=function(r){return!!(r&&r[t])}}function fq(e,t){for(var r=[],n=2;n=0||a&&Ne(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var vq=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],pq=Kl(vq),gq=function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return pq(this,t,r)},e}(),Dw=new Qc(50);function mq(e){if(typeof e=="string"){var t=Dw.get(e);return t&&t.image}else return e}function G2(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=Dw.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!J0(t)&&a.pending.push(o)):(t=bn.loadImage(e,_D,_D),t.__zrImageSrc=e,Dw.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function _D(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;u++)l-=s;var c=ya(o,r);return c>l&&(r="",c=0),l=e-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=e,i}function gj(e,t,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){e.textLine="",e.isTruncated=!1;return}var o=ya(a,t);if(o<=n){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){t+=r.ellipsis;break}var l=s===0?_q(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,l),o=ya(a,t)}t===""&&(t=r.placeholder),e.textLine=t,e.isTruncated=!0}function _q(e,t,r){for(var n=0,i=0,a=e.length;im&&d){var b=Math.floor(m/f);p=p||y.length>b,y=y.slice(0,b),_=y.length*f}if(i&&c&&g!=null)for(var w=pj(g,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),C={},M=0;Mp&&i1(a,o.substring(p,m),t,d),i1(a,g[2],t,d,g[1]),p=n1.lastIndex}ph){var W=a.lines.length;z>0?(N.tokens=N.tokens.slice(0,z),A(N,I,D),a.lines=a.lines.slice(0,k+1)):a.lines=a.lines.slice(0,k),a.isTruncated=a.isTruncated||a.lines.length0&&p+n.accumWidth>n.width&&(c=t.split(` -`),u=!0),n.accumWidth=p}else{var g=mj(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,h=g.linesWidths,c=g.lines}}c||(c=t.split(` -`));for(var m=ma(l),y=0;y=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Cq=li(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function Mq(e){return Tq(e)?!!Cq[e]:!0}function mj(e,t,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,h=ma(t),f=0;fr:i+c+p>r){c?(s||l)&&(g?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=d,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=d,c=p)):g?(a.push(l),o.push(u),l=d,u=p):(a.push(d),o.push(p));continue}c+=p,g?(l+=d,u+=p):(l&&(s+=l,l="",u=0),s+=d)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function bD(e,t,r,n,i,a){if(e.baseX=r,e.baseY=n,e.outerWidth=e.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;Ce.set(SD,Jc(r,o,i),Rl(n,s,a),o,s),Ce.intersect(t,SD,null,wD);var l=wD.outIntersectRect;e.outerWidth=l.width,e.outerHeight=l.height,e.baseX=Jc(l.x,l.width,i,!0),e.baseY=Rl(l.y,l.height,a,!0)}}var SD=new Ce(0,0,0,0),wD={outIntersectRect:{},clamp:!0};function H2(e){return e!=null?e+="":e=""}function Aq(e){var t=H2(e.text),r=e.font,n=ya(ma(r),t),i=Uv(r);return Iw(e,n,i,null)}function Iw(e,t,r,n){var i=new Ce(Jc(e.x||0,t,e.textAlign),Rl(e.y||0,r,e.textBaseline),t,r),a=n??(yj(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function yj(e){var t=e.stroke;return t!=null&&t!=="none"&&e.lineWidth>0}var Nw="__zr_style_"+Math.round(Math.random()*10),Ol={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},e_={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ol[Nw]=!0;var TD=["z","z2","invisible"],Lq=["invisible"],ci=function(e){Y(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=$e(r),i=0;i1e-4){s[0]=e-r,s[1]=t-n,l[0]=e+r,l[1]=t+n;return}if(tg[0]=l1(i)*r+e,tg[1]=s1(i)*n+t,rg[0]=l1(a)*r+e,rg[1]=s1(a)*n+t,u(s,tg,rg),c(l,tg,rg),i=i%Us,i<0&&(i=i+Us),a=a%Us,a<0&&(a=a+Us),i>a&&!o?a+=Us:ii&&(ng[0]=l1(d)*r+e,ng[1]=s1(d)*n+t,u(s,ng,s),c(l,ng,l))}var mt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Zs=[],$s=[],$i=[],Mo=[],Yi=[],Xi=[],u1=Math.min,c1=Math.max,Ys=Math.cos,Xs=Math.sin,Ra=Math.abs,Ew=Math.PI,Eo=Ew*2,h1=typeof Float32Array<"u",cf=[];function f1(e){var t=Math.round(e/Ew*1e8)/1e8;return t%2*Ew}function r_(e,t){var r=f1(e[0]);r<0&&(r+=Eo);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=Eo?i=r+Eo:t&&r-i>=Eo?i=r-Eo:!t&&r>i?i=r+(Eo-f1(r-i)):t&&r0&&(this._ux=Ra(n/Sy/t)||0,this._uy=Ra(n/Sy/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(mt.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var n=Ra(t-this._xi),i=Ra(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(mt.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){return this._drawPendingPt(),this.addData(mt.C,t,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,i){return this._drawPendingPt(),this.addData(mt.Q,t,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,r,n,i,a,o){this._drawPendingPt(),cf[0]=i,cf[1]=a,r_(cf,o),i=cf[0],a=cf[1];var s=a-i;return this.addData(mt.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=Ys(a)*n+t,this._yi=Xs(a)*n+r,this},e.prototype.arcTo=function(t,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,i,a),this},e.prototype.rect=function(t,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,i),this.addData(mt.R,t,r,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(mt.Z);var t=this._ctx,r=this._x0,n=this._y0;return t&&t.closePath(),this._xi=r,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){if(this._saveData){var r=t.length;!(this.data&&this.data.length===r)&&h1&&(this.data=new Float32Array(r));for(var n=0;n0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){$i[0]=$i[1]=Yi[0]=Yi[1]=Number.MAX_VALUE,Mo[0]=Mo[1]=Xi[0]=Xi[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Ra(b)>i||f===r-1)&&(g=Math.sqrt(_*_+b*b),a=m,o=y);break}case mt.C:{var w=t[f++],C=t[f++],m=t[f++],y=t[f++],M=t[f++],A=t[f++];g=GY(a,o,w,C,m,y,M,A,10),a=M,o=A;break}case mt.Q:{var w=t[f++],C=t[f++],m=t[f++],y=t[f++];g=WY(a,o,w,C,m,y,10),a=m,o=y;break}case mt.A:var k=t[f++],N=t[f++],D=t[f++],I=t[f++],z=t[f++],O=t[f++],V=O+z;f+=1,p&&(s=Ys(z)*D+k,l=Xs(z)*I+N),g=c1(D,I)*u1(Eo,Math.abs(O)),a=Ys(V)*D+k,o=Xs(V)*I+N;break;case mt.R:{s=a=t[f++],l=o=t[f++];var G=t[f++],F=t[f++];g=G*2+F*2;break}case mt.Z:{var _=s-a,b=l-o;g=Math.sqrt(_*_+b*b),a=s,o=l;break}}g>=0&&(u[h++]=g,c+=g)}return this._pathLen=c,c},e.prototype.rebuildPath=function(t,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,h,f,d=r<1,p,g,m=0,y=0,_,b=0,w,C;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,_=r*g,!_)))e:for(var M=0;M0&&(t.lineTo(w,C),b=0),A){case mt.M:s=u=n[M++],l=c=n[M++],t.moveTo(u,c);break;case mt.L:{h=n[M++],f=n[M++];var N=Ra(h-u),D=Ra(f-c);if(N>i||D>a){if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;t.lineTo(u*(1-z)+h*z,c*(1-z)+f*z);break e}m+=I}t.lineTo(h,f),u=h,c=f,b=0}else{var O=N*N+D*D;O>b&&(w=h,C=f,b=O)}break}case mt.C:{var V=n[M++],G=n[M++],F=n[M++],Z=n[M++],B=n[M++],W=n[M++];if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;ys(u,V,F,B,z,Zs),ys(c,G,Z,W,z,$s),t.bezierCurveTo(Zs[1],$s[1],Zs[2],$s[2],Zs[3],$s[3]);break e}m+=I}t.bezierCurveTo(V,G,F,Z,B,W),u=B,c=W;break}case mt.Q:{var V=n[M++],G=n[M++],F=n[M++],Z=n[M++];if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;ev(u,V,F,z,Zs),ev(c,G,Z,z,$s),t.quadraticCurveTo(Zs[1],$s[1],Zs[2],$s[2]);break e}m+=I}t.quadraticCurveTo(V,G,F,Z),u=F,c=Z;break}case mt.A:var H=n[M++],X=n[M++],K=n[M++],ne=n[M++],ie=n[M++],ue=n[M++],ve=n[M++],Ge=!n[M++],xe=K>ne?K:ne,ge=Ra(K-ne)>.001,Pe=ie+ue,fe=!1;if(d){var I=p[y++];m+I>_&&(Pe=ie+ue*(_-m)/I,fe=!0),m+=I}if(ge&&t.ellipse?t.ellipse(H,X,K,ne,ve,ie,Pe,Ge):t.arc(H,X,xe,ie,Pe,Ge),fe)break e;k&&(s=Ys(ie)*K+H,l=Xs(ie)*ne+X),u=Ys(Pe)*K+H,c=Xs(Pe)*ne+X;break;case mt.R:s=u=n[M],l=c=n[M+1],h=n[M++],f=n[M++];var Me=n[M++],ot=n[M++];if(d){var I=p[y++];if(m+I>_){var Ye=_-m;t.moveTo(h,f),t.lineTo(h+u1(Ye,Me),f),Ye-=Me,Ye>0&&t.lineTo(h+Me,f+u1(Ye,ot)),Ye-=ot,Ye>0&&t.lineTo(h+c1(Me-Ye,0),f+ot),Ye-=Me,Ye>0&&t.lineTo(h,f+c1(ot-Ye,0));break e}m+=I}t.rect(h,f,Me,ot);break;case mt.Z:if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;t.lineTo(u*(1-z)+s*z,c*(1-z)+l*z);break e}m+=I}t.closePath(),u=s,c=l}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=mt,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();function Bo(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=e;if(o>t+s&&o>n+s||oe+s&&a>r+s||at+h&&c>n+h&&c>a+h&&c>s+h||ce+h&&u>r+h&&u>i+h&&u>o+h||ut+u&&l>n+u&&l>a+u||le+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=hf);var f=Math.atan2(l,s);return f<0&&(f+=hf),f>=n&&f<=i||f+hf>=n&&f+hf<=i}function Ga(e,t,r,n,i,a){if(a>t&&a>n||ai?s:0}var Ao=wa.CMD,qs=Math.PI*2,Rq=1e-4;function Oq(e,t){return Math.abs(e-t)t&&u>n&&u>a&&u>s||u1&&zq(),d=ur(t,n,a,s,Xn[0]),f>1&&(p=ur(t,n,a,s,Xn[1]))),f===2?mt&&s>n&&s>a||s=0&&u<=1){for(var c=0,h=br(t,n,a,u),f=0;fr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Qr[0]=-l,Qr[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=qs-1e-4){n=0,i=qs;var c=a?1:-1;return o>=Qr[0]+e&&o<=Qr[1]+e?c:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=qs,i+=qs);for(var f=0,d=0;d<2;d++){var p=Qr[d];if(p+e>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=qs+g),(g>=n&&g<=i||g+qs>=n&&g+qs<=i)&&(g>Math.PI/2&&g1&&(r||(s+=Ga(l,u,c,h,n,i))),m&&(l=a[p],u=a[p+1],c=l,h=u),g){case Ao.M:c=a[p++],h=a[p++],l=c,u=h;break;case Ao.L:if(r){if(Bo(l,u,a[p],a[p+1],t,n,i))return!0}else s+=Ga(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ao.C:if(r){if(Nq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],t,n,i))return!0}else s+=Bq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ao.Q:if(r){if(_j(l,u,a[p++],a[p++],a[p],a[p+1],t,n,i))return!0}else s+=jq(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ao.A:var y=a[p++],_=a[p++],b=a[p++],w=a[p++],C=a[p++],M=a[p++];p+=1;var A=!!(1-a[p++]);f=Math.cos(C)*b+y,d=Math.sin(C)*w+_,m?(c=f,h=d):s+=Ga(l,u,f,d,n,i);var k=(n-y)*w/b+y;if(r){if(Eq(y,_,w,C,C+M,A,t,k,i))return!0}else s+=Vq(y,_,w,C,C+M,A,k,i);l=Math.cos(C+M)*b+y,u=Math.sin(C+M)*w+_;break;case Ao.R:c=l=a[p++],h=u=a[p++];var N=a[p++],D=a[p++];if(f=c+N,d=h+D,r){if(Bo(c,h,f,h,t,n,i)||Bo(f,h,f,d,t,n,i)||Bo(f,d,c,d,t,n,i)||Bo(c,d,c,h,t,n,i))return!0}else s+=Ga(f,h,f,d,n,i),s+=Ga(c,d,c,h,n,i);break;case Ao.Z:if(r){if(Bo(l,u,c,h,t,n,i))return!0}else s+=Ga(l,u,c,h,n,i);l=c,u=h;break}}return!r&&!Oq(u,h)&&(s+=Ga(l,u,c,h,n,i)||0),s!==0}function Fq(e,t,r){return xj(e,0,!1,t,r)}function Gq(e,t,r,n){return xj(e,t,!0,r,n)}var My=be({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ol),Hq={style:be({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},e_.style)},d1=ba.concat(["invisible","culling","z","z2","zlevel","parent"]),Ue=function(e){Y(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Tw:n>.2?bX:Cw}else if(r)return Cw}return Tw},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=nv(r,0)0))},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&ic)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Gq(s,l/u,r,n)))return!0}if(this.hasFill())return Fq(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=ic,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):e.prototype.attrKV.call(this,r,n)},t.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:J(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&ic)},t.prototype.createStyle=function(r){return Gv(My,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=J({},this.shape))},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=J({},i.shape),J(u,n.shape)):(u=J({},a?this.shape:i.shape),J(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=J({},this.shape);for(var c={},h=$e(u),f=0;fi&&(h=s+l,s*=i/h,l*=i/h),u+c>i&&(h=u+c,u*=i/h,c*=i/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+c>a&&(h=s+c,s*=a/h,c*=a/h),e.moveTo(r+s,n),e.lineTo(r+i-l,n),l!==0&&e.arc(r+i-l,n+l,l,-Math.PI/2,0),e.lineTo(r+i,n+a-u),u!==0&&e.arc(r+i-u,n+a-u,u,0,Math.PI/2),e.lineTo(r+c,n+a),c!==0&&e.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),e.lineTo(r,n+s),s!==0&&e.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Sc=Math.round;function n_(e,t,r){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=i,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(Sc(n*2)===Sc(i*2)&&(e.x1=e.x2=In(n,s,!0)),Sc(a*2)===Sc(o*2)&&(e.y1=e.y2=In(a,s,!0))),e}}function bj(e,t,r){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;e.x=n,e.y=i,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=In(n,s,!0),e.y=In(i,s,!0),e.width=Math.max(In(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(In(i+o,s,!1)-e.y,o===0?0:1)),e}}function In(e,t,r){if(!t)return e;var n=Sc(e*2);return(n+Sc(t))%2===0?n/2:(n+(r?1:-1))/2}var Xq=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),qq={},Be=function(e){Y(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Xq},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=bj(qq,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Yq(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Ue);Be.prototype.type="rect";var kD={fill:"#000"},PD=2,qi={},Kq={style:be({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},e_.style)},Xe=function(e){Y(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=kD,n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,z=0;z=0&&(V=M[O],V.align==="right");)this._placeToken(V,r,k,y,z,"right",b),N-=V.width,z-=V.width,O--;for(I+=(c-(I-m)-(_-z)-N)/2;D<=O;)V=M[D],this._placeToken(V,r,k,y,I+V.width/2,"center",b),I+=V.width,D++;y+=k}},t.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,h=a+i/2;c==="top"?h=a+r.height/2:c==="bottom"&&(h=a+i-r.height/2);var f=!r.isLineHolder&&v1(u);f&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var d=!!u.backgroundColor,p=r.textPadding;p&&(o=OD(o,s,p),h-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(th),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,_=!1,b=0,w=!1,C=RD("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,y.fill)),M=ED("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!y.autoStroke||_)?(b=PD,w=!0,y.stroke):null),A=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=h,A&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||co,m.opacity=xn(u.opacity,n.opacity,1),ID(m,u),M&&(m.lineWidth=xn(u.lineWidth,n.lineWidth,b),m.lineDash=pe(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=M),C&&(m.fill=C),g.setBoundingRect(Iw(m,r.contentWidth,r.contentHeight,w?0:null))},t.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,h=l&&l.image,f=l&&!h,d=r.borderRadius,p=this,g,m;if(f||r.lineHeight||u&&c){g=this._getOrCreateChild(Be),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=d,g.dirtyShape()}if(f){var _=g.style;_.fill=l||null,_.fillOpacity=pe(r.fillOpacity,1)}else if(h){m=this._getOrCreateChild(pr),m.onload=function(){p.dirtyStyle()};var b=m.style;b.image=l.image,b.x=i,b.y=a,b.width=o,b.height=s}if(u&&c){var _=g.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=pe(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var w=(g||m).style;w.shadowBlur=r.shadowBlur||0,w.shadowColor=r.shadowColor||"transparent",w.shadowOffsetX=r.shadowOffsetX||0,w.shadowOffsetY=r.shadowOffsetY||0,w.opacity=xn(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return wj(r)&&(n=[r.fontStyle,r.fontWeight,Sj(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&kn(n)||r.textFont||r.font},t}(ci),Qq={left:!0,right:1,center:1},Jq={top:1,bottom:1,middle:1},DD=["fontStyle","fontWeight","fontSize","fontFamily"];function Sj(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?w2+"px":e+"px"}function ID(e,t){for(var r=0;r=0,a=!1;if(e instanceof Ue){var o=Tj(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Eu(s)||Eu(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=J({},n),u=J({},u),u.fill=s):!Eu(u.fill)&&Eu(s)?(a=!0,n=J({},n),u=J({},u),u.fill=xy(s)):!Eu(u.stroke)&&Eu(l)&&(a||(n=J({},n),u=J({},u)),u.stroke=xy(l)),n.style=u}}if(n&&n.z2==null){a||(n=J({},n));var c=e.z2EmphasisLift;n.z2=e.z2+(c??bh)}return n}function oK(e,t,r){if(r&&r.z2==null){r=J({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??tK)}return r}function sK(e,t,r){var n=Ne(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:iK(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=J({},r),o=J({opacity:n?i:a.opacity*.1},o),r.style=o),r}function p1(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return aK(this,e,t,r);if(e==="blur")return sK(this,e,r);if(e==="select")return oK(this,e,r)}return r}function Ql(e){e.stateProxy=p1;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=p1),r&&(r.stateProxy=p1)}function FD(e,t){!Dj(e,t)&&!e.__highByOuter&&bo(e,Cj)}function GD(e,t){!Dj(e,t)&&!e.__highByOuter&&bo(e,Mj)}function fo(e,t){e.__highByOuter|=1<<(t||0),bo(e,Cj)}function vo(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&bo(e,Mj)}function Lj(e){bo(e,$2)}function Y2(e){bo(e,Aj)}function kj(e){bo(e,rK)}function Pj(e){bo(e,nK)}function Dj(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Ij(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=W2(a),s=i==="series",l=s?e.getViewOfSeriesModel(a):e.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Aj(u)}),s&&r.push(a)),o.isBlured=!1}),R(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function zw(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var h=0;h0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function cs(e,t,r){Ll(e,!0),bo(e,Ql),jw(e,t,r)}function dK(e){Ll(e,!1)}function wt(e,t,r,n){n?dK(e):cs(e,t,r)}function jw(e,t,r){var n=Le(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var WD=["emphasis","blur","select"],vK={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ir(e,t,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=g1(p),s*=g1(p));var g=(i===a?-1:1)*g1((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,m=g*o*d/s,y=g*-s*f/o,_=(e+r)/2+ag(h)*m-ig(h)*y,b=(t+n)/2+ig(h)*m+ag(h)*y,w=YD([1,0],[(f-m)/o,(d-y)/s]),C=[(f-m)/o,(d-y)/s],M=[(-1*f-m)/o,(-1*d-y)/s],A=YD(C,M);if(Fw(C,M)<=-1&&(A=ff),Fw(C,M)>=1&&(A=0),A<0){var k=Math.round(A/ff*1e6)/1e6;A=ff*2+k%2*ff}c.addData(u,_,b,o,s,w,A,h,a)}var xK=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,bK=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function SK(e){var t=new wa;if(!e)return t;var r=0,n=0,i=r,a=n,o,s=wa.CMD,l=e.match(xK);if(!l)return t;for(var u=0;uV*V+G*G&&(k=D,N=I),{cx:k,cy:N,x0:-c,y0:-h,x1:k*(i/C-1),y1:N*(i/C-1)}}function kK(e){var t;if(ee(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function PK(e,t){var r,n=Zf(t.r,0),i=Zf(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,h=t.cy,f=!!t.clockwise,d=qD(u-l),p=d>m1&&d%m1;if(p>_i&&(d=p),!(n>_i))e.moveTo(c,h);else if(d>m1-_i)e.moveTo(c+n*Ou(l),h+n*Ks(l)),e.arc(c,h,n,l,u,!f),i>_i&&(e.moveTo(c+i*Ou(u),h+i*Ks(u)),e.arc(c,h,i,u,l,f));else{var g=void 0,m=void 0,y=void 0,_=void 0,b=void 0,w=void 0,C=void 0,M=void 0,A=void 0,k=void 0,N=void 0,D=void 0,I=void 0,z=void 0,O=void 0,V=void 0,G=n*Ou(l),F=n*Ks(l),Z=i*Ou(u),B=i*Ks(u),W=d>_i;if(W){var H=t.cornerRadius;H&&(r=kK(H),g=r[0],m=r[1],y=r[2],_=r[3]);var X=qD(n-i)/2;if(b=Ki(X,y),w=Ki(X,_),C=Ki(X,g),M=Ki(X,m),N=A=Zf(b,w),D=k=Zf(C,M),(A>_i||k>_i)&&(I=n*Ou(u),z=n*Ks(u),O=i*Ou(l),V=i*Ks(l),d_i){var ge=Ki(y,N),Pe=Ki(_,N),fe=og(O,V,G,F,n,ge,f),Me=og(I,z,Z,B,n,Pe,f);e.moveTo(c+fe.cx+fe.x0,h+fe.cy+fe.y0),N0&&e.arc(c+fe.cx,h+fe.cy,ge,Vr(fe.y0,fe.x0),Vr(fe.y1,fe.x1),!f),e.arc(c,h,n,Vr(fe.cy+fe.y1,fe.cx+fe.x1),Vr(Me.cy+Me.y1,Me.cx+Me.x1),!f),Pe>0&&e.arc(c+Me.cx,h+Me.cy,Pe,Vr(Me.y1,Me.x1),Vr(Me.y0,Me.x0),!f))}else e.moveTo(c+G,h+F),e.arc(c,h,n,l,u,!f);if(!(i>_i)||!W)e.lineTo(c+Z,h+B);else if(D>_i){var ge=Ki(g,D),Pe=Ki(m,D),fe=og(Z,B,I,z,i,-Pe,f),Me=og(G,F,O,V,i,-ge,f);e.lineTo(c+fe.cx+fe.x0,h+fe.cy+fe.y0),D0&&e.arc(c+fe.cx,h+fe.cy,Pe,Vr(fe.y0,fe.x0),Vr(fe.y1,fe.x1),!f),e.arc(c,h,i,Vr(fe.cy+fe.y1,fe.cx+fe.x1),Vr(Me.cy+Me.y1,Me.cx+Me.x1),f),ge>0&&e.arc(c+Me.cx,h+Me.cy,ge,Vr(Me.y1,Me.x1),Vr(Me.y0,Me.x0),!f))}else e.lineTo(c+Z,h+B),e.arc(c,h,i,u,l,f)}e.closePath()}}}var DK=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),Rr=function(e){Y(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new DK},t.prototype.buildPath=function(r,n){PK(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Ue);Rr.prototype.type="sector";var IK=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),Sh=function(e){Y(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new IK},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},t}(Ue);Sh.prototype.type="ring";function NK(e,t,r,n){var i=[],a=[],o=[],s=[],l,u,c,h;if(n){c=[1/0,1/0],h=[-1/0,-1/0];for(var f=0,d=e.length;f=2){if(n){var a=NK(i,n,r,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;sJs[1]){if(a=!1,_r.negativeSize||n)return a;var l=sg(Js[0]-Qs[1]),u=sg(Qs[0]-Js[1]);y1(l,u)>ug.len()&&(l=u||!_r.bidirectional)&&(Te.scale(lg,s,-u*i),_r.useDir&&_r.calcDirMTV()))}}return a},e.prototype._getProjMinMaxOnAxis=function(t,r,n){for(var i=this._axes[t],a=this._origin,o=r[0].dot(i)+a[t],s=o,l=o,u=1;u0){var h=c.duration,f=c.delay,d=c.easing,p={duration:h,delay:f||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(r,p):t.animateTo(r,p)}else t.stopAnimation(),!s&&t.attr(r),o&&o(1),a&&a()}function Qe(e,t,r,n,i,a){Q2("update",e,t,r,n,i,a)}function bt(e,t,r,n,i,a){Q2("enter",e,t,r,n,i,a)}function zc(e){if(!e.__zr)return!0;for(var t=0;tla(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function JD(e){return!e.isGroup}function UK(e){return e.shape!=null}function qv(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(l){JD(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return UK(o)&&(s.shape=ye(o.shape)),s}var a=n(e);t.traverse(function(o){if(JD(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Qe(o,l,r,Le(o).dataIndex)}}})}function tM(e,t){return re(e,function(r){var n=r[0];n=Gt(n,t.x),n=En(n,t.x+t.width);var i=r[1];return i=Gt(i,t.y),i=En(i,t.y+t.height),[n,i]})}function $j(e,t){var r=Gt(e.x,t.x),n=En(e.x+e.width,t.x+t.width),i=Gt(e.y,t.y),a=En(e.y+e.height,t.y+t.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Ch(e,t,r){var n=J({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),be(i,r),new pr(n)):rh(e.replace("path://",""),n,r,"center")}function $f(e,t,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=_1(d,p,c,h)/f;return!(m<0||m>1)}function _1(e,t,r,n){return e*n-r*t}function ZK(e){return e<=1e-6&&e>=-1e-6}function Jl(e,t,r,n,i){return t==null||(qe(t)?Ct[0]=Ct[1]=Ct[2]=Ct[3]=t:(Ct[0]=t[0],Ct[1]=t[1],Ct[2]=t[2],Ct[3]=t[3]),n&&(Ct[0]=Gt(0,Ct[0]),Ct[1]=Gt(0,Ct[1]),Ct[2]=Gt(0,Ct[2]),Ct[3]=Gt(0,Ct[3])),r&&(Ct[0]=-Ct[0],Ct[1]=-Ct[1],Ct[2]=-Ct[2],Ct[3]=-Ct[3]),eI(e,Ct,"x","width",3,1,i&&i[0]||0),eI(e,Ct,"y","height",0,2,i&&i[1]||0)),e}var Ct=[0,0,0,0];function eI(e,t,r,n,i,a,o){var s=t[a]+t[i],l=e[n];e[n]+=s,o=Gt(0,En(o,l)),e[n]=0?-t[i]:t[a]>=0?l+t[a]:la(s)>1e-8?(l-o)*t[i]/s:0):e[r]-=t[i]}function So(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=se(t)?{formatter:t}:t,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=e.formatterParamsExtra;l&&R($e(l),function(c){he(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Le(e.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:be({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function Hw(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function ks(e,t){if(e)if(ee(e))for(var r=0;rt&&(t=o),ot&&(r=t=0),{min:r,max:t}}function s_(e,t,r){qj(e,t,r,-1/0)}function qj(e,t,r,n){if(e.ignoreModelZ)return n;var i=e.getTextContent(),a=e.getTextGuideLine(),o=e.isGroup;if(o)for(var s=e.childrenRef(),l=0;l=0&&s.push(l)}),s}}function Ps(e,t){return Ee(Ee({},e,!0),t,!0)}const iQ={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},aQ={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Dy="ZH",aM="EN",Bc=aM,Mm={},oM={},rV=Ze.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Bc).toUpperCase();return e.indexOf(Dy)>-1?Dy:Bc}():Bc;function sM(e,t){e=e.toUpperCase(),oM[e]=new We(t),Mm[e]=t}function oQ(e){if(se(e)){var t=Mm[e.toUpperCase()]||{};return e===Dy||e===aM?ye(t):Ee(ye(t),ye(Mm[Bc]),!1)}else return Ee(ye(e),ye(Mm[Bc]),!1)}function Uw(e){return oM[e]}function sQ(){return oM[Bc]}sM(aM,iQ);sM(Dy,aQ);var Zw=null;function lQ(e){Zw||(Zw=e)}function Xt(){return Zw}var lM=1e3,uM=lM*60,Sd=uM*60,ti=Sd*24,aI=ti*365,uQ={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Am={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},cQ="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",hg="{yyyy}-{MM}-{dd}",oI={year:"{yyyy}",month:"{yyyy}-{MM}",day:hg,hour:hg+" "+Am.hour,minute:hg+" "+Am.minute,second:hg+" "+Am.second,millisecond:cQ},Tn=["year","month","day","hour","minute","second","millisecond"],hQ=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function fQ(e){return!se(e)&&!me(e)?dQ(e):e}function dQ(e){e=e||{};var t={},r=!0;return R(Tn,function(n){r&&(r=e[n]==null)}),R(Tn,function(n,i){var a=e[n];t[n]={};for(var o=null,s=i;s>=0;s--){var l=Tn[s],u=Se(a)&&!ee(a)?a[l]:a,c=void 0;ee(u)?(c=u.slice(),o=c[0]||""):se(u)?(o=u,c=[o]):(o==null?o=Am[n]:uQ[l].test(o)||(o=t[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),t[n][l]=c}}),t}function Jr(e,t){return e+="","0000".substr(0,t-e.length)+e}function wd(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function vQ(e){return e===wd(e)}function pQ(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Kv(e,t,r,n){var i=La(e),a=i[nV(r)](),o=i[cM(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[hM(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[fM(r)](),h=(c-1)%12+1,f=i[dM(r)](),d=i[vM(r)](),p=i[pM(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof We?n:Uw(n||rV)||sQ(),_=y.getModel("time"),b=_.get("month"),w=_.get("monthAbbr"),C=_.get("dayOfWeek"),M=_.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Jr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,w[o-1]).replace(/{MM}/g,Jr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Jr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,C[u]).replace(/{ee}/g,M[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Jr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Jr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Jr(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,Jr(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Jr(p,3)).replace(/{S}/g,p+"")}function gQ(e,t,r,n,i){var a=null;if(se(r))a=r;else if(me(r)){var o={time:e.time,level:e.time.level},s=Xt();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=r(e.value,t,o)}else{var l=e.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=Tc(e.value,i);a=r[c][c][0]}}return Kv(new Date(e.value),a,i,n)}function Tc(e,t){var r=La(e),n=r[cM(t)]()+1,i=r[hM(t)](),a=r[fM(t)](),o=r[dM(t)](),s=r[vM(t)](),l=r[pM(t)](),u=l===0,c=u&&s===0,h=c&&o===0,f=h&&a===0,d=f&&i===1,p=d&&n===1;return p?"year":d?"month":f?"day":h?"hour":c?"minute":u?"second":"millisecond"}function Iy(e,t,r){switch(t){case"year":e[iV(r)](0);case"month":e[aV(r)](1);case"day":e[oV(r)](0);case"hour":e[sV(r)](0);case"minute":e[lV(r)](0);case"second":e[uV(r)](0)}return e}function nV(e){return e?"getUTCFullYear":"getFullYear"}function cM(e){return e?"getUTCMonth":"getMonth"}function hM(e){return e?"getUTCDate":"getDate"}function fM(e){return e?"getUTCHours":"getHours"}function dM(e){return e?"getUTCMinutes":"getMinutes"}function vM(e){return e?"getUTCSeconds":"getSeconds"}function pM(e){return e?"getUTCMilliseconds":"getMilliseconds"}function mQ(e){return e?"setUTCFullYear":"setFullYear"}function iV(e){return e?"setUTCMonth":"setMonth"}function aV(e){return e?"setUTCDate":"setDate"}function oV(e){return e?"setUTCHours":"setHours"}function sV(e){return e?"setUTCMinutes":"setMinutes"}function lV(e){return e?"setUTCSeconds":"setSeconds"}function uV(e){return e?"setUTCMilliseconds":"setMilliseconds"}function yQ(e,t,r,n,i,a,o,s){var l=new Xe({style:{text:e,font:t,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function gM(e){if(!B2(e))return se(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function mM(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Lh=Fv;function $w(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&kn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?La(e):e;if(isNaN(+l)){if(s)return"-"}else return Kv(l,n,r)}if(t==="ordinal")return fy(e)?i(e):qe(e)&&a(e)?e+"":"-";var u=Sa(e);return a(u)?gM(u):fy(e)?i(e):typeof e=="boolean"?e+"":"-"}var sI=["a","b","c","d","e","f","g"],S1=function(e,t){return"{"+e+(t??"")+"}"};function yM(e,t,r){ee(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function xQ(e,t,r){(e==="week"||e==="month"||e==="quarter"||e==="half-year"||e==="year")&&(e=`MM-dd -yyyy`);var n=La(t),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),h=n[i+"Milliseconds"]();return e=e.replace("MM",Jr(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Jr(a%100+"",2)).replace("dd",Jr(s,2)).replace("d",s).replace("hh",Jr(l,2)).replace("h",l).replace("mm",Jr(u,2)).replace("m",u).replace("ss",Jr(c,2)).replace("s",c).replace("SSS",Jr(h,3)),e}function bQ(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function tu(e,t){return t=t||"transparent",se(e)?e:Se(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Ny(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var Lm={},w1={},kh=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(t,r){this._nonSeriesBoxMasterList=n(Lm),this._normalMasterList=n(w1);function n(i,a){var o=[];return R(i,function(s,l){var u=s.create(t,r);o=o.concat(u||[])}),o}},e.prototype.update=function(t,r){R(this._normalMasterList,function(n){n.update&&n.update(t,r)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(t,r){if(t==="matrix"||t==="calendar"){Lm[t]=r;return}w1[t]=r},e.get=function(t){return w1[t]||Lm[t]},e}();function SQ(e){return!!Lm[e]}var Yw={coord:1,coord2:2};function wQ(e){hV.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var hV=de();function TQ(e){var t=e.getShallow("coord",!0),r=Yw.coord;if(t==null){var n=hV.get(e.type);n&&n.getCoord2&&(r=Yw.coord2,t=n.getCoord2(e))}return{coord:t,from:r}}var oa={none:0,dataCoordSys:1,boxCoordSys:2};function fV(e,t){var r=e.getShallow("coordinateSystem"),n=e.getShallow("coordinateSystemUsage",!0),i=oa.none;if(r){var a=e.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=oa.dataCoordSys,a||(i=oa.none)):n==="box"&&(i=oa.boxCoordSys,!a&&!SQ(r)&&(i=oa.none))}return{coordSysType:r,kind:i}}function Qv(e){var t=e.targetModel,r=e.coordSysType,n=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=fV(t),o=a.kind,s=a.coordSysType;if(i&&o!==oa.dataCoordSys&&(o=oa.dataCoordSys,s=r),o===oa.none||s!==r)return!1;var l=n(r,t);return l?(o===oa.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var dV=function(e,t){var r=t.getReferringComponents(e,Pt).models[0];return r&&r.coordinateSystem},km=R,vV=["left","right","top","bottom","width","height"],kl=[["width","left","right"],["height","top","bottom"]];function _M(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),h=t.childAt(u+1),f=h&&h.getBoundingRect(),d,p;if(e==="horizontal"){var g=c.width+(f?-f.x+c.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(f?-f.y+c.y:0);p=o+m,p>i||l.newline?(a+=s+r,o=0,p=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),e==="horizontal"?a=d+r:o=p+r)})}var Bl=_M;Ie(_M,"vertical");Ie(_M,"horizontal");function pV(e,t){return{left:e.getShallow("left",t),top:e.getShallow("top",t),right:e.getShallow("right",t),bottom:e.getShallow("bottom",t),width:e.getShallow("width",t),height:e.getShallow("height",t)}}function CQ(e,t){var r=sr(e,t,{enableLayoutOnlyByCenter:!0}),n=e.getBoxLayoutParams(),i,a;if(r.type===Yf.point)a=r.refPoint,i=St(n,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get("center"),s=ee(o)?o:[o,o];i=St(n,r.refContainer),a=r.boxCoordFrom===Yw.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function gV(e,t){var r=CQ(e,t),n=r.viewRect,i=r.center,a=e.get("radius");ee(a)||(a=[0,a]);var o=oe(n.width,t.getWidth()),s=oe(n.height,t.getHeight()),l=Math.min(o,s),u=oe(a[0],l/2),c=oe(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function St(e,t,r){r=Lh(r||0);var n=t.width,i=t.height,a=oe(e.left,n),o=oe(e.top,i),s=oe(e.right,n),l=oe(e.bottom,i),u=oe(e.width,n),c=oe(e.height,i),h=r[2]+r[0],f=r[1]+r[3],d=e.aspect;switch(isNaN(u)&&(u=n-s-f-a),isNaN(c)&&(c=i-l-h-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-f),isNaN(o)&&(o=i-l-c-h),e.left||e.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-f;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-h;break}a=a||0,o=o||0,isNaN(u)&&(u=n-f-a-(s||0)),isNaN(c)&&(c=i-h-o-(l||0));var p=new Ce((t.x||0)+a+r[3],(t.y||0)+o+r[0],u,c);return p.margin=r,p}function mV(e,t,r){var n=e.getShallow("preserveAspect",!0);if(!n)return t;var i=t.width/t.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return t;var a=e.getShallow("preserveAspectAlign",!0),o=e.getShallow("preserveAspectVerticalAlign",!0),s={width:t.width,height:t.height},l=n==="cover";return i>r&&!l||i=g)return h;for(var m=0;m=0;l--)s=Ee(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return xh(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){return pV(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(r){this.option.zlevel=r},t.protoInitialize=function(){var r=t.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),t}(We);dj(Ve,We);Q0(Ve);rQ(Ve);nQ(Ve,LQ);function LQ(e){var t=[];return R(Ve.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=re(t,function(r){return ua(r).main}),e!=="dataset"&&Ne(t,"dataset")<=0&&t.unshift("dataset"),t}var q={color:{},darkColor:{},size:{}},jt=q.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};J(jt,{primary:jt.neutral80,secondary:jt.neutral70,tertiary:jt.neutral60,quaternary:jt.neutral50,disabled:jt.neutral20,border:jt.neutral30,borderTint:jt.neutral20,borderShade:jt.neutral40,background:jt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:jt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:jt.neutral70,axisLineTint:jt.neutral40,axisTick:jt.neutral70,axisTickMinor:jt.neutral60,axisLabel:jt.neutral70,axisSplitLine:jt.neutral15,axisMinorSplitLine:jt.neutral05});for(var el in jt)if(jt.hasOwnProperty(el)){var lI=jt[el];el==="theme"?q.darkColor.theme=jt.theme.slice():el==="highlight"?q.darkColor.highlight="rgba(255,231,130,0.4)":el.indexOf("accent")===0?q.darkColor[el]=eo(lI,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):q.darkColor[el]=eo(lI,null,function(e){return e*.9},function(e){return 1-Math.pow(e,1.5)})}q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var _V="";typeof navigator<"u"&&(_V=navigator.platform||"");var zu="rgba(0, 0, 0, 0.2)",xV=q.color.theme[0],kQ=eo(xV,null,null,.9);const PQ={darkMode:"auto",colorBy:"series",color:q.color.theme,gradientColor:[kQ,xV],aria:{decal:{decals:[{color:zu,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:zu,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:zu,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:zu,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:zu,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:zu,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:_V.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var bV=de(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Bn="original",Cr="arrayRows",jn="objectRows",Bi="keyedColumns",fs="typedArray",SV="unknown",Ni="column",du="row",Lr={Must:1,Might:2,Not:3},wV=Fe();function DQ(e){wV(e).datasetMap=de()}function TV(e,t,r){var n={},i=bM(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,l=wV(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,h;e=e.slice(),R(e,function(g,m){var y=Se(g)?g:e[m]={name:g};y.type==="ordinal"&&c==null&&(c=m,h=p(y)),n[y.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});R(e,function(g,m){var y=g.name,_=p(g);if(c==null){var b=f.valueWayDim;d(n[y],b,_),d(o,b,_),f.valueWayDim+=_}else if(c===m)d(n[y],0,_),d(a,0,_);else{var b=f.categoryWayDim;d(n[y],b,_),d(o,b,_),f.categoryWayDim+=_}});function d(g,m,y){for(var _=0;_t)return e[n];return e[r-1]}function AV(e,t,r,n,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:OQ(n,o);if(c=c||r,!(!c||!c.length)){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}function zQ(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var fg,df,cI,hI="\0_ec_inner",BQ=1,wM=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new We(a),this._locale=new We(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=vI(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,vI(n))},t.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?cI(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&R(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=de(),u=n&&n.replaceMergeMainTypeMap;DQ(this),R(r,function(h,f){h!=null&&(Ve.hasClass(f)?f&&(s.push(f),l.set(f,!0)):i[f]=i[f]==null?ye(h):Ee(i[f],h,!0))}),u&&u.each(function(h,f){Ve.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),Ve.topologicalTravel(s,Ve.getAllClassMainTypes(),c,this);function c(h){var f=EQ(this,h,pt(r[h])),d=a.get(h),p=d?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=lj(d,f,p);JX(g,h,Ve),i[h]=null,a.set(h,null),o.set(h,0);var m=[],y=[],_=0,b;R(g,function(w,C){var M=w.existing,A=w.newOption;if(!A)M&&(M.mergeOption({},this),M.optionUpdated({},!1));else{var k=h==="series",N=Ve.getClass(h,w.keyInfo.subType,!k);if(!N)return;if(h==="tooltip"){if(b)return;b=!0}if(M&&M.constructor===N)M.name=w.keyInfo.name,M.mergeOption(A,this),M.optionUpdated(A,!1);else{var D=J({componentIndex:C},w.keyInfo);M=new N(A,this,this,D),J(M,D),w.brandNew&&(M.__requireNewView=!0),M.init(A,this,this),M.optionUpdated(null,!0)}}M?(m.push(M.option),y.push(M),_++):(m.push(void 0),y.push(void 0))},this),i[h]=m,a.set(h,y),o.set(h,_),h==="series"&&fg(this)}this._seriesIndices||fg(this)},t.prototype.getOption=function(){var r=ye(this.option);return R(r,function(n,i){if(Ve.hasClass(i)){for(var a=pt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!av(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[hI],r},t.prototype.setTheme=function(r){this._theme=new We(r),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=t:r==="max"?e<=t:e===t}function $Q(e,t){return e.join(",")===t.join(",")}var yi=R,hv=Se,pI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function T1(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=pI.length;r0?r[o-1].seriesModel:null)}),rJ(r)}})}function rJ(e){R(e,function(t,r){var n=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,h){var f=o.get(t.stackedDimension,h);if(isNaN(f))return i;var d,p;s?p=o.getRawIndex(h):d=o.get(t.stackedByDimension,h);for(var g=NaN,m=r-1;m>=0;m--){var y=e[m];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,d)),p>=0){var _=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&f>=0&&_>0||l==="samesign"&&f<=0&&_<0){f=VX(f,_),g=_;break}}}return n[0]=f,n[1]=g,n})})}var c_=function(){function e(t){this.data=t.data||(t.sourceFormat===Bi?{}:[]),this.sourceFormat=t.sourceFormat||SV,this.seriesLayoutBy=t.seriesLayoutBy||Ni,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;ng&&(g=b)}d[0]=p,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};SI=(t={},t[Cr+"_"+Ni]={pure:!0,appendData:a},t[Cr+"_"+du]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[jn]={pure:!0,appendData:a},t[Bi]={pure:!0,appendData:function(o){var s=this._data;R(o,function(l,u){for(var c=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)c.push(l[h])})}},t[Bn]={appendData:a},t[fs]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},e.prototype.getRawValue=function(t,r){return ih(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e}();function MI(e){var t,r;return Se(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function Td(e){return new cJ(e)}var cJ=function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var f=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!n&&(h||d1&&n>0?s:o}};return a;function o(){return t=e?null:lt},gte:function(e,t){return e>=t}},fJ=function(){function e(t,r){if(!qe(r)){var n="";it(n)}this._opFn=BV[t],this._rvalFloat=Sa(r)}return e.prototype.evaluate=function(t){return qe(t)?this._opFn(t,this._rvalFloat):this._opFn(Sa(t),this._rvalFloat)},e}(),jV=function(){function e(t,r){var n=t==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return e.prototype.evaluate=function(t,r){var n=qe(t)?t:Sa(t),i=qe(r)?r:Sa(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=se(t),l=se(r);s&&(n=l?t:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},e}(),dJ=function(){function e(t,r){this._rval=r,this._isEQ=t,this._rvalTypeof=typeof r,this._rvalFloat=Sa(r)}return e.prototype.evaluate=function(t){var r=t===this._rval;if(!r){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Sa(t)===this._rvalFloat)}return this._isEQ?r:!r},e}();function vJ(e,t){return e==="eq"||e==="ne"?new dJ(e==="eq",t):he(BV,e)?new fJ(e,t):null}var pJ=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return ds(t,r)},e}();function gJ(e,t){var r=new pJ,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==Ni&&it(o);var s=[],l={},u=e.dimensionsDefine;if(u)R(u,function(g,m){var y=g.name,_={index:m,name:y,displayName:g.displayName};if(s.push(_),y!=null){var b="";he(l,y)&&it(b),l[y]=_}});else for(var c=0;c65535?TJ:CJ}function ju(){return[1/0,-1/0]}function MJ(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function kI(e,t,r,n,i){var a=GV[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=re(o,function(_){return _.property}),c=0;cy[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r=0&&r=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&nt)a=o-1;else return o}return-1},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a=h&&_<=f||isNaN(_))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var m=d[i[0]],b=d[i[1]],w=t[i[1]][0],C=t[i[1]][1],y=0;y=h&&_<=f||isNaN(_))&&(M>=w&&M<=C||isNaN(M))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var y=0;y=h&&_<=f||isNaN(_))&&(l[u++]=A)}else for(var y=0;yt[D][1])&&(k=!1)}k&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=m)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,h,f,d=new(Bu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;pc&&(c=h,f=w)}I>0&&Is&&(g=s-c);for(var m=0;mp&&(p=_,d=c+m)}var b=this.getRawIndex(h),w=this.getRawIndex(d);hc-p&&(l=c-p,s.length=l);for(var g=0;gh[1]&&(h[1]=y),f[d++]=_}return a._count=d,a._indices=f,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();al&&(l=h)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(r,n,i,a){return ds(r[a],this._dimensions[a])}A1={arrayRows:t,objectRows:function(r,n,i,a){return ds(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return ds(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),e}(),HV=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(vg(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=nn(s)?fs:Bn,a=[];var h=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},d=pe(h.seriesLayoutBy,f.seriesLayoutBy)||null,p=pe(h.sourceHeader,f.sourceHeader),g=pe(h.dimensions,f.dimensions),m=d!==f.seriesLayoutBy||!!p!=!!f.sourceHeader||g;i=m?[Kw(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:g},l)]:[]}else{var y=t;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var b=y.get("source",!0);i=[Kw(b,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&DI(a)}var o,s=[],l=[];return R(t,function(u){u.prepareSource();var c=u.getSource(i||0),h="";i!=null&&!c&&DI(h),s.push(c),l.push(u._getVersionSign())}),n?o=SJ(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[nJ(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!e.noHeader;return R(e.blocks,function(i){var a=$V(i);a>=t&&(t=a+ +(n&&(!a||Jw(i)&&!i.noHeader)))}),t}return 0}function PJ(e,t,r,n){var i=t.noHeader,a=IJ($V(t)),o=[],s=t.blocks||[];Er(!s||ee(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(he(u,l)){var c=new jV(u[l],null);s.sort(function(g,m){return c.evaluate(g.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}R(s,function(g,m){var y=t.valueFormatter,_=ZV(g)(y?J(J({},e),{valueFormatter:y}):e,g,m>0?a.html:0,n);_!=null&&o.push(_)});var h=e.renderMode==="richText"?o.join(a.richText):eT(n,o.join(""),i?r:a.html);if(i)return h;var f=$w(t.header,"ordinal",e.useUTC),d=UV(n,e.renderMode).nameStyle,p=WV(n);return e.renderMode==="richText"?YV(e,f,d)+a.richText+h:eT(n,'
'+Ur(f)+"
"+h,r)}function DJ(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(w){return w=ee(w)?w:[w],re(w,function(C,M){return $w(C,ee(d)?d[M]:d,u)})};if(!(a&&o)){var h=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||q.color.secondary,i),f=a?"":$w(l,"ordinal",u),d=t.valueType,p=o?[]:c(t.value,t.dataIndex),g=!s||!a,m=!s&&a,y=UV(n,i),_=y.nameStyle,b=y.valueStyle;return i==="richText"?(s?"":h)+(a?"":YV(e,f,_))+(o?"":RJ(e,p,g,m,b)):eT(n,(s?"":h)+(a?"":NJ(f,!s,_))+(o?"":EJ(p,g,m,b)),r)}}function II(e,t,r,n,i,a){if(e){var o=ZV(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function IJ(e){return{html:LJ[e],richText:kJ[e]}}function eT(e,t,r){var n='
',i="margin: "+r+"px 0 0",a=WV(e);return'
'+t+n+"
"}function NJ(e,t,r){var n=t?"margin-left:2px":"";return''+Ur(e)+""}function EJ(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=ee(e)?e:[e],''+re(e,function(o){return Ur(o)}).join("  ")+""}function YV(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function RJ(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(ee(t)?t.join(" "):t,a)}function XV(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return tu(n)}function qV(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var L1=function(){function e(){this.richTextStyles={},this._nextStyleNameId=nj()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=cV({color:r,type:t,renderMode:n,markerId:i});return se(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};ee(r)?R(r,function(a){return J(n,a)}):J(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function KV(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=ee(s),u=XV(t,r),c,h,f,d;if(o>1||l&&!o){var p=OJ(s,t,r,a,u);c=p.inlineValues,h=p.inlineValueTypes,f=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=c=ih(i,r,a[0]),h=g.type}else d=c=l?s[0]:s;var m=j2(t),y=m&&t.name||"",_=i.getName(r),b=n?y:_;return Kt("section",{header:y,noHeader:n||!m,sortParam:d,blocks:[Kt("nameValue",{markerType:"item",markerColor:u,name:b,noName:!kn(b),value:c,valueType:h,dataIndex:r})].concat(f||[])})}function OJ(e,t,r,n,i){var a=t.getData(),o=li(e,function(h,f,d){var p=a.getDimensionInfo(d);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?R(n,function(h){c(ih(a,r,h),h)}):R(e,c);function c(h,f){var d=a.getDimensionInfo(f);!d||d.otherDims.tooltip===!1||(o?u.push(Kt("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:h,valueType:d.type})):(s.push(h),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Lo=Fe();function pg(e,t){return e.getName(t)||e.getId(t)}var Pm="__universalTransitionEnabled",ht=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Td({count:BJ,reset:jJ}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Lo(this).sourceManager=new HV(this);a.prepareSource();var o=this.getInitialData(r,i);EI(o,this),this.dataTask.context.data=o,Lo(this).dataBeforeProcessed=o,NI(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=cv(this),a=i?fu(r):{},o=this.subType;Ve.hasClass(o)&&(o+="Series"),Ee(r,n.getTheme().get(this.subType)),Ee(r,this.getDefaultOption()),Xl(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Ta(r,a,i)},t.prototype.mergeOption=function(r,n){r=Ee(this.option,r,!0),this.fillDataTextStyle(r.data);var i=cv(this);i&&Ta(this.option,r,i);var a=Lo(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);EI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Lo(this).dataBeforeProcessed=o,NI(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!nn(r))for(var n=["show"],i=0;i=0&&f<0)&&(h=_,f=y,d=0),y===f&&(c[d++]=g))}),c.length=d,c},t.prototype.formatTooltip=function(r,n,i){return KV({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Ze.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=SM.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[pg(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Pm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Se(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},t.registerClass=function(r){return Ve.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(Ve);Bt(ht,h_);Bt(ht,SM);dj(ht,Ve);function NI(e){var t=e.name;j2(e)||(e.name=zJ(e)||t)}function zJ(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return R(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function BJ(e){return e.model.getRawData().count()}function jJ(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),VJ}function VJ(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function EI(e,t){R(Kc(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,Ie(FJ,t))})}function FJ(e,t){var r=tT(e);return r&&r.setOutputEnd((t||this).count()),t}function tT(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var gt=function(){function e(){this.group=new _e,this.uid=Ah("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();F2(gt);Q0(gt);function Ph(){var e=Fe();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var QV=Fe(),GJ=Ph(),st=function(){function e(){this.group=new _e,this.uid=Ah("viewChart"),this.renderTask=Td({plan:HJ,reset:WJ}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&OI(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&OI(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){ks(this.group,t)},e.markUpdateMethod=function(t,r){QV(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function RI(e,t,r){e&&sv(e)&&(t==="emphasis"?fo:vo)(e,r)}function OI(e,t,r){var n=ql(e,t),i=t&&t.highlightKey!=null?gK(t.highlightKey):null;n!=null?R(pt(n),function(a){RI(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){RI(a,r,i)})}F2(st);Q0(st);function HJ(e){return GJ(e.model)}function WJ(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&QV(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),UJ[l]}var UJ={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Ey="\0__throttleOriginMethod",zI="\0__throttleRate",BI="\0__throttleType";function d_(e,t,r){var n,i=0,a=0,o=null,s,l,u,c;t=t||0;function h(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var f=function(){for(var d=[],p=0;p=0?h():o=setTimeout(h,-s),i=n};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(d){c=d},f}function Dh(e,t,r,n){var i=e[t];if(i){var a=i[Ey]||i,o=i[BI],s=i[zI];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=d_(a,r,n==="debounce"),i[Ey]=a,i[BI]=n,i[zI]=r}return i}}function fv(e,t){var r=e[t];r&&r[Ey]&&(r.clear&&r.clear(),e[t]=r[Ey])}var jI=Fe(),VI={itemStyle:Kl(tV,!0),lineStyle:Kl(eV,!0)},ZJ={lineStyle:"stroke",itemStyle:"fill"};function JV(e,t){var r=e.visualStyleMapper||VI[t];return r||(console.warn("Unknown style type '"+t+"'."),VI.itemStyle)}function eF(e,t){var r=e.visualDrawType||ZJ[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var $J={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=JV(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=eF(e,n),u=o[l],c=me(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||h){var f=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=f,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||me(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||me(o.stroke)?f:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=e.getDataParams(p),m=J({},o);m[l]=c(g),d.setItemVisual(p,"style",m)}}}},pf=new We,YJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=JV(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){pf.option=l[n];var u=i(pf),c=o.ensureUniqueItemVisual(s,"style");J(c,u),pf.option.decal&&(o.setItemVisual(s,"decal",pf.option.decal),pf.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},XJ={performRawSeries:!0,overallReset:function(e){var t=de();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),jI(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=jI(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=eF(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],h=a.getItemVisual(c,"colorFromPalette");if(h){var f=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();f[l]=r.getColorFromPalette(d,o,p)}})}})}},gg=Math.PI;function qJ(e,t){t=t||{},be(t,{text:"loading",textColor:q.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new _e,n=new Be({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new Xe({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Be({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new Yv({shape:{startAngle:-gg/2,endAngle:-gg/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:gg*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:gg*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var tF=function(){function e(t,r,n,i){this._stageTaskMap=de(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=de();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;R(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";Er(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;R(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),h=c.seriesTaskMap,f=c.overallTask;if(f){var d,p=f.agentStubMap;p.each(function(m){s(i,m)&&(m.dirty(),d=!0)}),d&&f.dirty(),o.updatePayload(f,n);var g=o.getPerformArgs(f,i.block);p.each(function(m){m.perform(g)}),f.perform(g)&&(a=!0)}else h&&h.each(function(m,y){s(i,m)&&m.dirty();var _=o.getPerformArgs(m,i.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=de(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(h){var f=h.uid,d=s.set(f,o&&o.get(f)||Td({plan:tee,reset:ree,count:iee}));d.context={model:h,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,d)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||Td({reset:KJ});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=de(),u=t.seriesType,c=t.getTargetSeries,h=!0,f=!1,d="";Er(!t.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(h=!1,R(n.getSeries(),p));function p(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(f=!0,Td({reset:QJ,onDirty:eee})));y.context={model:g,overallProgress:h},y.agent=o,y.__block=h,a._pipe(g,y)}f&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return me(t)&&(t={overallReset:t,seriesType:aee(t)}),t.uid=Ah("stageHandler"),r&&(t.visualType=r),t},e}();function KJ(e){e.overallReset(e.ecModel,e.api,e.payload)}function QJ(e){return e.overallProgress&&JJ}function JJ(){this.agent.dirty(),this.getDownstream().dirty()}function eee(){this.agent&&this.agent.dirty()}function tee(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function ree(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=pt(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?re(t,function(r,n){return rF(n)}):nee}var nee=rF(0);function rF(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&d===u.length-f.length){var p=u.slice(0,d);p!=="data"&&(r.mainType=p,r[f.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function c(h,f,d,p){return h[d]==null||f[p||d]===h[d]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),rT=["symbol","symbolSize","symbolRotate","symbolOffset"],GI=rT.concat(["symbolKeepAspect"]),lee={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Dl(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function nT(e,t,r){for(var n=t.type==="radial"?wee(e,t,r):See(e,t,r),i=t.colorStops,a=0;a0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:qe(e)?[e]:ee(e)?e:null}function kM(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&Cee(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=re(r,function(a){return a/i}),n/=i)}return[r,n]}var Mee=new wa(!0);function zy(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function HI(e){return typeof e=="string"&&e!=="none"}function By(e){var t=e.fill;return t!=null&&t!=="none"}function WI(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function UI(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function iT(e,t,r){var n=G2(t.image,t.__image,r);if(J0(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*dd),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Aee(e,t,r,n){var i,a=zy(r),o=By(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||Mee,h=t.__dirty;if(!n){var f=r.fill,d=r.stroke,p=o&&!!f.colorStops,g=a&&!!d.colorStops,m=o&&!!f.image,y=a&&!!d.image,_=void 0,b=void 0,w=void 0,C=void 0,M=void 0;(p||g)&&(M=t.getBoundingRect()),p&&(_=h?nT(e,f,M):t.__canvasFillGradient,t.__canvasFillGradient=_),g&&(b=h?nT(e,d,M):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),m&&(w=h||!t.__canvasFillPattern?iT(e,f,t):t.__canvasFillPattern,t.__canvasFillPattern=w),y&&(C=h||!t.__canvasStrokePattern?iT(e,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=C),p?e.fillStyle=_:m&&(w?e.fillStyle=w:o=!1),g?e.strokeStyle=b:y&&(C?e.strokeStyle=C:a=!1)}var A=t.getGlobalScale();c.setScale(A[0],A[1],t.segmentIgnoreThreshold);var k,N;e.setLineDash&&r.lineDash&&(i=kM(t),k=i[0],N=i[1]);var D=!0;(u||h&ic)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),D=!1),c.reset(),t.buildPath(c,t.shape,n),c.toStatic(),t.pathUpdated()),D&&c.rebuildPath(e,l?s:1),k&&(e.setLineDash(k),e.lineDashOffset=N),n||(r.strokeFirst?(a&&UI(e,r),o&&WI(e,r)):(o&&WI(e,r),a&&UI(e,r))),k&&e.setLineDash([])}function Lee(e,t,r){var n=t.__image=G2(r.image,t.__image,t,t.onload);if(!(!n||!J0(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;e.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,h=o-u,f=s-c;e.drawImage(n,u,c,h,f,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function kee(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||co,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=kM(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(zy(r)&&e.strokeText(i,r.x,r.y),By(r)&&e.fillText(i,r.x,r.y)):(By(r)&&e.fillText(i,r.x,r.y),zy(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var ZI=["shadowBlur","shadowOffsetX","shadowOffsetY"],$I=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function lF(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){pn(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Ol.opacity:o}(n||t.blend!==r.blend)&&(a||(pn(e,i),a=!0),e.globalCompositeOperation=t.blend||Ol.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(r,n,i){if(!this[er]){if(this._disposed){this.id;return}var a,o,s;if(Se(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[er]=!0,Hu(this),!this._model||n){var l=new HQ(this._api),u=this._theme,c=this._model=new wM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},lT);var h={seriesTransition:s,optionChanged:!0};if(i)this[yr]={silent:a,updateParams:h},this[er]=!1,this.getZr().wakeUp();else{try{al(this),za.update.call(this,null,h)}catch(f){throw this[yr]=null,this[er]=!1,f}this._ssr||this._zr.flush(),this[yr]=null,this[er]=!1,Fu.call(this,a),Gu.call(this,a)}}},t.prototype.setTheme=function(r,n){if(!this[er]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[yr]&&(a==null&&(a=this[yr].silent),o=this[yr].updateParams,this[yr]=null),this[er]=!0,Hu(this);try{this._updateTheme(r),i.setTheme(this._theme),al(this),za.update.call(this,{type:"setTheme"},o)}catch(s){throw this[er]=!1,s}this[er]=!1,Fu.call(this,a),Gu.call(this,a)}}},t.prototype._updateTheme=function(r){se(r)&&(r=AF[r]),r&&(r=ye(r),r&&PV(r,!0),this._theme=r)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ze.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return R(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;R(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return R(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Gy[i]){var l=s,u=s,c=-s,h=-s,f=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();R(jl,function(b,w){if(b.group===i){var C=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(ye(r)),M=b.getDom().getBoundingClientRect();l=a(M.left,l),u=a(M.top,u),c=o(M.right,c),h=o(M.bottom,h),f.push({dom:C,left:M.left,top:M.top})}}),l*=d,u*=d,c*=d,h*=d;var p=c-l,g=h-u,m=bn.createCanvas(),y=Mw(m,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:g}),n){var _="";return R(f,function(b){var w=b.left-l,C=b.top-u;_+=''+b.dom+""}),y.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new Be({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),R(f,function(b){var w=new pr({style:{x:b.left*d-l,y:b.top*d-u,image:b.dom}});y.add(w)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n,i){return xg(this,"convertToPixel",r,n,i)},t.prototype.convertToLayout=function(r,n,i){return xg(this,"convertToLayout",r,n,i)},t.prototype.convertFromPixel=function(r,n,i){return xg(this,"convertFromPixel",r,n,i)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Oc(i,r);return R(o,function(s,l){l.indexOf("Models")>=0&&R(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=Oc(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?LM(s,l,n):Jv(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;R(tte,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Pl(l,function(g){var m=Le(g);if(m&&m.dataIndex!=null){var y=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=y&&y.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=J({},m.eventData),!0},!0),u){var h=u.componentType,f=u.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",f=u.seriesIndex);var d=h&&f!=null&&s.getComponent(h,f),p=d&&r[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:d,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;R(oT,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),cee(n,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&cj(this.getDom(),NM,"");var n=this,i=n._api,a=n._model;R(n._componentsViews,function(o){o.dispose(a,i)}),R(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete jl[n.id]},t.prototype.resize=function(r){if(!this[er]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[yr]&&(a==null&&(a=this[yr].silent),i=!0,this[yr]=null),this[er]=!0,Hu(this);try{i&&al(this),za.update.call(this,{type:"resize",animation:J({duration:0},r&&r.animation)})}catch(o){throw this[er]=!1,o}this[er]=!1,Fu.call(this,a),Gu.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(Se(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!uT[r]){var i=uT[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=J({},r);return n.type=aT[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(Se(n)||(n={silent:!!n}),!!Vy[r.type]&&this._model){if(this[er]){this._pendingActions.push(r);return}var i=n.silent;E1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ze.browser.weChat&&this._throttledZrFlush(),Fu.call(this,i),Gu.call(this,i)}},t.prototype.updateLabelLayout=function(){bi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){al=function(h){var f=h._scheduler;f.restorePipelines(h._model),f.prepareStageTasks(),I1(h,!0),I1(h,!1),f.plan()},I1=function(h,f){for(var d=h._model,p=h._scheduler,g=f?h._componentsViews:h._chartsViews,m=f?h._componentsMap:h._chartsMap,y=h._zr,_=h._api,b=0;bf.get("hoverLayerThreshold")&&!Ze.node&&!Ze.worker&&f.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=h._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(h,f){var d=h.get("blendMode")||null;f.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function l(h,f){if(!h.preventAutoZ){var d=eu(h);f.eachRendered(function(p){return s_(p,d.z,d.zlevel),!0})}}function u(h,f){f.eachRendered(function(d){if(!zc(d)){var p=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(h,f){var d=h.getModel("stateAnimation"),p=h.isAnimationEnabled(),g=d.get("duration"),m=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;f.eachRendered(function(y){if(y.states&&y.states.emphasis){if(zc(y))return;if(y instanceof Ue&&mK(y),y.__dirty){var _=y.prevStates;_&&y.useStates(_)}if(p){y.stateTransition=m;var b=y.getTextContent(),w=y.getTextGuideLine();b&&(b.stateTransition=m),w&&(w.stateTransition=m)}y.__dirty&&a(y)}})}oN=function(h){return new(function(f){Y(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return h._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){fo(p,g),Hn(h)},d.prototype.leaveEmphasis=function(p,g){vo(p,g),Hn(h)},d.prototype.enterBlur=function(p){Lj(p),Hn(h)},d.prototype.leaveBlur=function(p){Y2(p),Hn(h)},d.prototype.enterSelect=function(p){kj(p),Hn(h)},d.prototype.leaveSelect=function(p){Pj(p),Hn(h)},d.prototype.getModel=function(){return h.getModel()},d.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},d.prototype.getMainProcessVersion=function(){return h[yg]},d}(LV))(h)},MF=function(h){function f(d,p){for(var g=0;g=0)){lN.push(r);var a=tF.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function jM(e,t){uT[e]=t}function hte(e){p4({createCanvas:e})}function NF(e,t,r){var n=vF("registerMap");n&&n(e,t,r)}function fte(e){var t=vF("getMap");return t&&t(e)}var EF=bJ;Ds(DM,$J);Ds(v_,YJ);Ds(v_,XJ);Ds(DM,lee);Ds(v_,uee);Ds(_F,zee);OM(PV);zM(Wee,tJ);jM("default",qJ);ji({type:zl,event:zl,update:zl},Rt);ji({type:Tm,event:Tm,update:Tm},Rt);ji({type:Ay,event:Z2,update:Ay,action:Rt,refineEvent:VM,publishNonRefinedEvent:!0});ji({type:Ow,event:Z2,update:Ow,action:Rt,refineEvent:VM,publishNonRefinedEvent:!0});ji({type:Ly,event:Z2,update:Ly,action:Rt,refineEvent:VM,publishNonRefinedEvent:!0});function VM(e,t,r,n){return{eventContent:{selected:fK(r),isFromClick:t.isFromClick||!1}}}RM("default",{});RM("dark",aF);var dte={},uN=[],vte={registerPreprocessor:OM,registerProcessor:zM,registerPostInit:kF,registerPostUpdate:PF,registerUpdateLifecycle:p_,registerAction:ji,registerCoordinateSystem:DF,registerLayout:IF,registerVisual:Ds,registerTransform:EF,registerLoading:jM,registerMap:NF,registerImpl:Bee,PRIORITY:xF,ComponentModel:Ve,ComponentView:gt,SeriesModel:ht,ChartView:st,registerComponentModel:function(e){Ve.registerClass(e)},registerComponentView:function(e){gt.registerClass(e)},registerSeriesModel:function(e){ht.registerClass(e)},registerChartView:function(e){st.registerClass(e)},registerCustomSeries:function(e,t){gF(e,t)},registerSubTypeDefaulter:function(e,t){Ve.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){q4(e,t)}};function ze(e){if(ee(e)){R(e,function(t){ze(t)});return}Ne(uN,e)>=0||(uN.push(e),me(e)&&(e={install:e}),e.install(vte))}function mf(e){return e==null?0:e.length||1}function cN(e){return e}var po=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||cN,this._newKeyGetter=i||cN,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&f===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(h===1&&f>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(h===1&&f===1)this._update&&this._update(c,u),i[l]=null;else if(h>1&&f>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(h>1)for(var d=0;d1)for(var s=0;s30}var yf=Se,ko=re,xte=typeof Int32Array>"u"?Array:Int32Array,bte="e\0\0",hN=-1,Ste=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],wte=["_approximateExtent"],fN,Sg,_f,xf,z1,bf,B1,$r=function(){function e(t,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;OF(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Bn;if(l&&!i.pure)for(var u=[],c=t;c0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),ee(a)?a=a.slice():yf(a)&&(a=J({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,yf(r)?J(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){yf(t)?J(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?J(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;Rw(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){R(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:ko(this.dimensions,this._getDimInfo,this),this.hostModel)),z1(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(U0(arguments)))})},e.internalField=function(){fN=function(t){var r=t._invertedIndicesMap;R(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new xte(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),e}();function Tte(e,t){return Nh(e,t).dimensions}function Nh(e,t){TM(e)||(e=CM(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=de(),a=[],o=Mte(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&jF(o),l=n===e.dimensionsDefine,u=l?BF(e):zF(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var h=de(c),f=new FV(o),d=0;d0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function Mte(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return R(t,function(a){var o;Se(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function Ate(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var Lte=function(){function e(t){this.coordSysDims=[],this.axisMap=de(),this.categoryAxisMap=de(),this.coordSysName=t}return e}();function kte(e){var t=e.get("coordinateSystem"),r=new Lte(t),n=Pte[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var Pte={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",Pt).models[0],a=e.getReferringComponents("yAxis",Pt).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Wu(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Wu(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",Pt).models[0];t.coordSysDims=["single"],r.set("single",i),Wu(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",Pt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Wu(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Wu(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Wu(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(e,t,r,n){var i=e.getReferringComponents("matrix",Pt).models[0];t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Wu(e){return e.get("type")==="category"}function VF(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;Dte(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,c,h,f;if(R(a,function(_,b){se(_)&&(a[b]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!i||i===_.coordDim)&&(c=_))}),c&&!n&&!u&&(n=!0),c){h="__\0ecstackresult_"+e.id,f="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,g=0;R(a,function(_){_.coordDim===d&&g++});var m={name:h,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(f,p),y.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:f,stackResultDimension:h}}function Dte(e){return!OF(e.schema)}function go(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function FM(e,t){return go(e,t)?e.getCalculationInfo("stackResultDimension"):t}function Ite(e,t){var r=e.get("coordinateSystem"),n=kh.get(r),i;return t&&t.coordSysDims&&(i=re(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=Hy(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function Nte(e,t,r){var n,i;return r&&R(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function Pa(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;e?(a=!0,i=CM(e)):(i=n.getSource(),a=i.sourceFormat===Bn);var o=kte(t),s=Ite(t,o),l=r.useEncodeDefaulter,u=me(l)?l:l?Ie(TV,s,t):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=Nh(i,c),f=Nte(h.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(h),p=VF(t,{schema:h,store:d}),g=new $r(h,t);g.setCalculationInfo(p);var m=f!=null&&Ete(i)?function(y,_,b,w){return w===f?b:this.defaultDimValueGetter(y,_,b,w)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,m),g}function Ete(e){if(e.sourceFormat===Bn){var t=Rte(e.data||[]);return!ee(_h(t))}}function Rte(e){for(var t=0;ti&&(o=a.interval=i);var s=a.intervalPrecision=pv(o),l=a.niceTickExtent=[Ht(Math.ceil(e[0]/o)*o,s),Ht(Math.floor(e[1]/o)*o,s)];return zte(l,e),a}function j1(e){var t=Math.pow(10,K0(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ht(r*t)}function pv(e){return Mi(e)+2}function dN(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function zte(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),dN(e,0,t),dN(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function GM(e,t){return e>=t[0]&&e<=t[1]}var Bte=function(){function e(){this.normalize=vN,this.scale=pN}return e.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=le(t.normalize,t),this.scale=le(t.scale,t)):(this.normalize=vN,this.scale=pN)},e}();function vN(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function pN(e,t){return e*(t[1]-t[0])+t[0]}function hT(e,t,r){var n=Math.log(e);return[Math.log(r?t[0]:Math.max(0,t[0]))/n,Math.log(r?t[1]:Math.max(0,t[1]))/n]}var Is=function(){function e(t){this._calculator=new Bte,this._setting=t||{},this._extent=[1/0,-1/0];var r=Xt();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return e.prototype.getSetting=function(t){return this._setting[t]},e.prototype._innerUnionExtent=function(t){var r=this._extent;this._innerSetExtent(t[0]r[1]?t[1]:r[1])},e.prototype.unionExtentFromData=function(t,r){this._innerUnionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){this._innerSetExtent(t,r)},e.prototype._innerSetExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(t){var r=Xt();r&&this._innerSetBreak(r.parseAxisBreakOption(t,le(this.parse,this)))},e.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();Q0(Is);var jte=0,gv=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++jte,this._onCollect=t.onCollect}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&re(n,Vte);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!se(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,this._onCollect&&this._onCollect(t,r),r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r),this._onCollect&&this._onCollect(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=de(this.categories))},e}();function Vte(e){return Se(e)&&e.value!=null?e.value:e+""}var oh=function(e){Y(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new gv({})),ee(i)&&(i=new gv({categories:re(i,function(a){return Se(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:se(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return GM(r,this._extent)&&r>=0&&r=0&&r=0&&r=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Is);Is.registerClass(oh);var Po=Ht,mo=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},t.prototype.contain=function(r){return GM(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=pv(r)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Xt(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]=0&&(h=Po(h+f*n,o))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var d=l.length?l[l.length-1].value:a[1];return i[1]>d&&(r.expandToNicedExtent?l.push({value:Po(d+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;oa[0]&&p0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function WF(e){var t=Hte(e),r=[];return R(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],c=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),f=Math.abs(h[1]-h[0]);s=u?c/f*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=oe(n.get("barWidth"),s),g=oe(n.get("barMaxWidth"),s),m=oe(n.get("barMinWidth")||(XF(n)?.5:1),s),y=n.get("barGap"),_=n.get("barCategoryGap"),b=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:_,defaultBarGap:b,axisKey:HM(a),stackId:GF(n)})}),UF(r)}function UF(e){var t={};R(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var f=n.barMinWidth;f&&(l[u].minWidth=f);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return R(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=$e(a).length;s=Math.max(35-l*4,15)+"%"}var u=oe(s,o),c=oe(n.gap,1),h=n.remainedWidth,f=n.autoWidthCount,d=(h-u)/(f+(f-1)*c);d=Math.max(d,0),R(a,function(y){var _=y.maxWidth,b=y.minWidth;if(y.width){var w=y.width;_&&(w=Math.min(w,_)),b&&(w=Math.max(w,b)),y.width=w,h-=w+c*w,f--}else{var w=d;_&&_w&&(w=b),w!==d&&(y.width=w,h-=w+c*w,f--)}}),d=(h-u)/(f+(f-1)*c),d=Math.max(d,0);var p=0,g;R(a,function(y,_){y.width||(y.width=d),g=y,p+=y.width*(1+c)}),g&&(p-=g.width*c);var m=-p/2;R(a,function(y,_){r[i][_]=r[i][_]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+c)})}),r}function Wte(e,t,r){if(e&&t){var n=e[HM(t)];return n}}function ZF(e,t){var r=HF(e,t),n=WF(r);R(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=GF(i),u=n[HM(s)][l],c=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function $F(e){return{seriesType:e,plan:Ph(),reset:function(t){if(YF(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),h=go(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),d=Ute(i,a),p=XF(t),g=t.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(b,w){for(var C=b.count,M=p&&ca(C*3),A=p&&l&&ca(C*3),k=p&&ca(C),N=n.master.getRect(),D=f?N.width:N.height,I,z=w.getStore(),O=0;(I=b.next())!=null;){var V=z.get(h?m:o,I),G=z.get(s,I),F=d,Z=void 0;h&&(Z=+V-z.get(o,I));var B=void 0,W=void 0,H=void 0,X=void 0;if(f){var K=n.dataToPoint([V,G]);if(h){var ne=n.dataToPoint([Z,G]);F=ne[0]}B=F,W=K[1]+_,H=K[0]-F,X=y,Math.abs(H)0?r:1:r))}var Zte=function(e,t,r,n){for(;r>>1;e[i][1]i&&(this._approxInterval=i);var o=wg.length,s=Math.min(Zte(wg,this._approxInterval,0,o),o-1);this._interval=wg[s][1],this._intervalPrecision=pv(this._interval),this._minLevelUnit=wg[Math.max(s-1,0)][0]},t.prototype.parse=function(r){return qe(r)?r:+La(r)},t.prototype.contain=function(r){return GM(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.type="time",t}(mo),wg=[["second",lM],["minute",uM],["hour",Sd],["quarter-day",Sd*6],["half-day",Sd*12],["day",ti*1.2],["half-week",ti*3.5],["week",ti*7],["month",ti*31],["quarter",ti*95],["half-year",aI/2],["year",aI]];function qF(e,t,r,n){return Iy(new Date(t),e,n).getTime()===Iy(new Date(r),e,n).getTime()}function $te(e,t){return e/=ti,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function Yte(e){var t=30*ti;return e/=t,e>6?6:e>3?3:e>2?2:1}function Xte(e){return e/=Sd,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function gN(e,t){return e/=t?uM:lM,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function qte(e){return z2(e,!0)}function Kte(e,t,r){var n=Math.max(0,Ne(Tn,t)-1);return Iy(new Date(e),Tn[n],r).getTime()}function Qte(e,t){var r=new Date(0);r[e](1);var n=r.getTime();r[e](1+t);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function Jte(e,t,r,n,i,a){var o=1e4,s=hQ,l=0;function u(O,V,G,F,Z,B,W){for(var H=Qte(Z,O),X=V,K=new Date(X);Xo));)if(K[Z](K[F]()+O),X=K.getTime(),a){var ne=a.calcNiceTickMultiple(X,H);ne>0&&(K[Z](K[F]()+ne*O),X=K.getTime())}W.push({value:X,notAdd:!0})}function c(O,V,G){var F=[],Z=!V.length;if(!qF(wd(O),n[0],n[1],r)){Z&&(V=[{value:Kte(n[0],O,r)},{value:n[1]}]);for(var B=0;B=n[0]&&W<=n[1]&&u(X,W,H,K,ne,ie,F),O==="year"&&G.length>1&&B===0&&G.unshift({value:G[0].value-X})}}for(var B=0;B=n[0]&&w<=n[1]&&d++)}var C=i/t;if(d>C*1.5&&p>C/1.5||(h.push(_),d>C||e===s[g]))break}f=[]}}}for(var M=et(re(h,function(O){return et(O,function(V){return V.value>=n[0]&&V.value<=n[1]&&!V.notAdd})}),function(O){return O.length>0}),A=[],k=M.length-1,g=0;g0;)a*=10;var s=[dT(tre(n[0]/a)*a),dT(ere(n[1]/a)*a)];this._interval=a,this._intervalPrecision=pv(a),this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){e.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.contain=function(r){return r=Cg(r)/Cg(this.base),e.prototype.contain.call(this,r)},t.prototype.normalize=function(r){return r=Cg(r)/Cg(this.base),e.prototype.normalize.call(this,r)},t.prototype.scale=function(r){return r=e.prototype.scale.call(this,r),Tg(this.base,r)},t.prototype.setBreaksFromOption=function(r){var n=Xt();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,le(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},t.type="log",t}(mo);function Mg(e,t){return dT(e,Mi(t))}Is.registerClass(KF);var rre=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var f=this._determinedMin,d=this._determinedMax;return f!=null&&(s=f,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},e.prototype.modifyDataMinMax=function(t,r){this[ire[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=nre[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),nre={min:"_determinedMin",max:"_determinedMax"},ire={min:"_dataMin",max:"_dataMax"};function QF(e,t,r){var n=e.rawExtentInfo;return n||(n=new rre(e,t,r),e.rawExtentInfo=n,n)}function Ag(e,t){return t==null?null:Dr(t)?NaN:e.parse(t)}function JF(e,t){var r=e.type,n=QF(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=HF("bar",o),l=!1;if(R(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=WF(s),c=are(i,a,t,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function are(e,t,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Wte(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;R(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;R(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,h=1-(s+l)/a,f=c/h-c;return t+=f*(l/u),e-=f*(s/u),{min:e,max:t}}function ru(e,t){var r=t,n=JF(e,r),i=n.extent,a=r.get("splitNumber");e instanceof KF&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setBreaksFromOption(t6(r)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function ep(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new oh({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new WM({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Is.getClass(t)||mo)}}function ore(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function Eh(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var r=fQ(t);return function(i,a){return e.scale.getFormattedLabel(i,a,r)}}else{if(se(t))return function(i){var a=e.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if(me(t)){if(e.type==="category")return function(i,a){return t(Wy(e,i),i.value-e.scale.getExtent()[0],null)};var n=Xt();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),t(Wy(e,i),a,o)}}else return function(i){return e.scale.getLabel(i)}}}function Wy(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function UM(e){var t=e.get("interval");return t??"auto"}function e6(e){return e.type==="category"&&UM(e.getLabelModel())===0}function Uy(e,t){var r={};return R(e.mapDimensionsAll(t),function(n){r[FM(e,n)]=!0}),$e(r)}function sre(e,t,r){t&&R(Uy(t,r),function(n){var i=t.getApproximateExtent(n);i[0]e[1]&&(e[1]=i[1])})}function sh(e){return e==="middle"||e==="center"}function mv(e){return e.getShallow("show")}function t6(e){var t=e.get("breaks",!0);if(t!=null)return!Xt()||!lre(e.axis)?void 0:t}function lre(e){return(e.dim==="x"||e.dim==="y"||e.dim==="z"||e.dim==="single")&&e.type!=="category"}var Rh=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e}();function ure(e){return Pa(null,e)}var cre={isDimensionStacked:go,enableDataStack:VF,getStackedDimension:FM};function hre(e,t){var r=t;t instanceof We||(r=new We(t));var n=ep(r);return n.setExtent(e[0],e[1]),ru(n,r),n}function fre(e){Bt(e,Rh)}function dre(e,t){return t=t||{},vt(e,null,null,t.state!=="normal")}const vre=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:Tte,createList:ure,createScale:hre,createSymbol:Ut,createTextStyle:dre,dataStack:cre,enableHoverEmphasis:cs,getECData:Le,getLayoutRect:St,mixinAxisModelCommonMethods:fre},Symbol.toStringTag,{value:"Module"}));var pre=1e-8;function mN(e,t){return Math.abs(e-t)i&&(n=o,i=l)}if(n)return mre(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return R(o,function(s){s.type==="polygon"?yN(s.exterior,i,a,r):R(s.points,function(l){yN(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},t.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function vT(e,t){return e=_re(e),re(et(e.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new _N(o[0],o.slice(1)));break;case"MultiPolygon":R(i.coordinates,function(l){l[0]&&a.push(new _N(l[0],l.slice(1)))});break;case"LineString":a.push(new xN([i.coordinates]));break;case"MultiLineString":a.push(new xN(i.coordinates))}var s=new n6(n[t||"name"],a,n.cp);return s.properties=n,s})}const xre=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Lw,asc:Pn,getPercentWithPrecision:jX,getPixelPrecision:R2,getPrecision:Mi,getPrecisionSafe:ej,isNumeric:B2,isRadianAroundZero:eh,linearMap:nt,nice:z2,numericToNumber:Sa,parseDate:La,parsePercent:oe,quantile:wm,quantity:rj,quantityExponent:K0,reformIntervals:kw,remRadian:O2,round:Ht},Symbol.toStringTag,{value:"Module"})),bre=Object.freeze(Object.defineProperty({__proto__:null,format:Kv,parse:La,roundTime:Iy},Symbol.toStringTag,{value:"Module"})),Sre=Object.freeze(Object.defineProperty({__proto__:null,Arc:Yv,BezierCurve:wh,BoundingRect:Ce,Circle:ka,CompoundPath:Xv,Ellipse:$v,Group:_e,Image:pr,IncrementalDisplayable:Gj,Line:Wt,LinearGradient:cu,Polygon:Or,Polyline:Tr,RadialGradient:K2,Rect:Be,Ring:Sh,Sector:Rr,Text:Xe,clipPointsByRect:tM,clipRectByRect:$j,createIcon:Ch,extendPath:Uj,extendShape:Wj,getShapeClass:lv,getTransform:hs,initProps:bt,makeImage:J2,makePath:rh,mergePath:An,registerShape:di,resizePath:eM,updateProps:Qe},Symbol.toStringTag,{value:"Module"})),wre=Object.freeze(Object.defineProperty({__proto__:null,addCommas:gM,capitalFirst:bQ,encodeHTML:Ur,formatTime:xQ,formatTpl:yM,getTextRect:yQ,getTooltipMarker:cV,normalizeCssArray:Lh,toCamelCase:mM,truncateText:yq},Symbol.toStringTag,{value:"Module"})),Tre=Object.freeze(Object.defineProperty({__proto__:null,bind:le,clone:ye,curry:Ie,defaults:be,each:R,extend:J,filter:et,indexOf:Ne,inherits:A2,isArray:ee,isFunction:me,isObject:Se,isString:se,map:re,merge:Ee,reduce:li},Symbol.toStringTag,{value:"Module"}));var Cre=Fe(),Cd=Fe(),zi={estimate:1,determine:2};function Zy(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function a6(e,t){var r=re(t,function(n){return e.scale.parse(n)});return e.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function Mre(e,t){var r=e.getLabelModel().get("customValues");if(r){var n=Eh(e),i=e.scale.getExtent(),a=a6(e,r),o=et(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:re(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:e.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return e.type==="category"?Lre(e,t):Pre(e)}function Are(e,t,r){var n=e.getTickModel().get("customValues");if(n){var i=e.scale.getExtent(),a=a6(e,n);return{ticks:et(a,function(o){return o>=i[0]&&o<=i[1]})}}return e.type==="category"?kre(e,t):{ticks:re(e.scale.getTicks(r),function(o){return o.value})}}function Lre(e,t){var r=e.getLabelModel(),n=o6(e,r,t);return!r.get("show")||e.scale.isBlank()?{labels:[]}:n}function o6(e,t,r){var n=Ire(e),i=UM(t),a=r.kind===zi.estimate;if(!a){var o=l6(n,i);if(o)return o}var s,l;me(i)?s=h6(e,i):(l=i==="auto"?Nre(e,r):i,s=c6(e,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return pT(n,i,u),!0}):pT(n,i,u),u}function kre(e,t){var r=Dre(e),n=UM(t),i=l6(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),me(n))a=h6(e,n,!0);else if(n==="auto"){var s=o6(e,e.getLabelModel(),Zy(zi.determine));o=s.labelCategoryInterval,a=re(s.labels,function(l){return l.tickValue})}else o=n,a=c6(e,o,!0);return pT(r,n,{ticks:a,tickCategoryInterval:o})}function Pre(e){var t=e.scale.getTicks(),r=Eh(e);return{labels:re(t,function(n,i){return{formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var Dre=s6("axisTick"),Ire=s6("axisLabel");function s6(e){return function(r){return Cd(r)[e]||(Cd(r)[e]={list:[]})}}function l6(e,t){for(var r=0;rc&&(u=Math.max(1,Math.floor(l/c)));for(var h=s[0],f=e.dataToCoord(h+1)-e.dataToCoord(h),d=Math.abs(f*Math.cos(a)),p=Math.abs(f*Math.sin(a)),g=0,m=0;h<=s[1];h+=u){var y=0,_=0,b=X0(i({value:h}),n.font,"center","top");y=b.width*1.3,_=b.height*1.3,g=Math.max(g,y,7),m=Math.max(m,_,7)}var w=g/d,C=m/p;isNaN(w)&&(w=1/0),isNaN(C)&&(C=1/0);var M=Math.max(0,Math.floor(Math.min(w,C)));if(r===zi.estimate)return t.out.noPxChangeTryDetermine.push(le(Rre,null,e,M,l)),M;var A=u6(e,M,l);return A??M}function Rre(e,t,r){return u6(e,t,r)==null}function u6(e,t,r){var n=Cre(e.model),i=e.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-r)<=1&&a>t&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=t,n.axisExtent0=i[0],n.axisExtent1=i[1]}function Ore(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function c6(e,t,r){var n=Eh(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=e6(e),f=o.get("showMinLabel")||h,d=o.get("showMaxLabel")||h;f&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);d&&p-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m,time:void 0,break:void 0})}return s}function h6(e,t,r){var n=e.scale,i=Eh(e),a=[];return R(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var bN=[0,1],vi=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return R2(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),SN(n,i.count())),nt(t,bN,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),SN(n,i.count()));var a=nt(t,n,bN,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=Are(this,r,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=n.ticks,a=re(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return zre(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=re(n,function(a){return re(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(t){return t=t||Zy(zi.determine),Mre(this,t).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(t){return t=t||Zy(zi.determine),Ere(this,t)},e}();function SN(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function zre(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;R(t,function(d){d.coord-=u/2,d.onBand=!0});var c=e.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},t.push(o)}var h=a[0]>a[1];f(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&f(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),f(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&f(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function f(d,p){return d=Ht(d),p=Ht(p),h?d>p:di&&(i+=Sf);var d=Math.atan2(s,o);if(d<0&&(d+=Sf),d>=n&&d<=i||d+Sf>=n&&d+Sf<=i)return l[0]=c,l[1]=h,u-r;var p=r*Math.cos(n)+e,g=r*Math.sin(n)+t,m=r*Math.cos(i)+e,y=r*Math.sin(i)+t,_=(p-o)*(p-o)+(g-s)*(g-s),b=(m-o)*(m-o)+(y-s)*(y-s);return _0){t=t/180*Math.PI,Ai.fromArray(e[0]),yt.fromArray(e[1]),Ft.fromArray(e[2]),Te.sub(ha,Ai,yt),Te.sub(sa,Ft,yt);var r=ha.len(),n=sa.len();if(!(r<.001||n<.001)){ha.scale(1/r),sa.scale(1/n);var i=ha.dot(sa),a=Math.cos(t);if(a1&&Te.copy(en,Ft),en.toArray(e[1])}}}}function $re(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Ai.fromArray(e[0]),yt.fromArray(e[1]),Ft.fromArray(e[2]),Te.sub(ha,yt,Ai),Te.sub(sa,Ft,yt);var n=ha.len(),i=sa.len();if(!(n<.001||i<.001)){ha.scale(1/n),sa.scale(1/i);var a=ha.dot(t),o=Math.cos(r);if(a=l)Te.copy(en,Ft);else{en.scaleAndAdd(sa,s/Math.tan(Math.PI/2-c));var h=Ft.x!==yt.x?(en.x-yt.x)/(Ft.x-yt.x):(en.y-yt.y)/(Ft.y-yt.y);if(isNaN(h))return;h<0?Te.copy(en,yt):h>1&&Te.copy(en,Ft)}en.toArray(e[1])}}}}function G1(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function Yre(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=$a(n[0],n[1]),a=$a(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=pd([],n[1],n[0],o/i),l=pd([],n[1],n[2],o/a),u=pd([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0){w(D*N,0,a);var I=D+A;I<0&&C(-I*N,1)}else C(-A*N,1)}}function w(A,k,N){A!==0&&(c=!0);for(var D=k;D0)for(var I=0;I0;I--){var G=N[I-1]*V;w(-G,I,a)}}}function M(A){var k=A<0?-1:1;A=Math.abs(A);for(var N=Math.ceil(A/(a-1)),D=0;D0?w(N,0,D+1):w(-N,a-D-1,a),A-=N,A<=0)return}return c}function Kre(e){for(var t=0;t=0&&n.attr(a.oldLayoutSelect),Ne(f,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Qe(n,u,r,l)}else if(n.attr(u),!Mh(n).valueAnimation){var h=pe(n.style.opacity,1);n.style.opacity=0,bt(n,{style:{opacity:h}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};Lg(d,u,kg),Lg(d,n.states.select,kg)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};Lg(p,u,kg),Lg(p,n.states.emphasis,kg)}Jj(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=ene(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Qe(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,bt(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},e}(),U1=Fe();function rne(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=U1(r).labelManager;i||(i=U1(r).labelManager=new tne),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=U1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var Z1=Math.sin,$1=Math.cos,y6=Math.PI,sl=Math.PI*2,nne=180/y6,_6=function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,r){this._add("M",t,r)},e.prototype.lineTo=function(t,r){this._add("L",t,r)},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){this._add("C",t,r,n,i,a,o)},e.prototype.quadraticCurveTo=function(t,r,n,i){this._add("Q",t,r,n,i)},e.prototype.arc=function(t,r,n,i,a,o){this.ellipse(t,r,n,n,0,i,a,o)},e.prototype.ellipse=function(t,r,n,i,a,o,s,l){var u=s-o,c=!l,h=Math.abs(u),f=Yo(h-sl)||(c?u>=sl:-u>=sl),d=u>0?u%sl:u%sl+sl,p=!1;f?p=!0:Yo(h)?p=!1:p=d>=y6==!!c;var g=t+n*$1(o),m=r+i*Z1(o);this._start&&this._add("M",g,m);var y=Math.round(a*nne);if(f){var _=1/this._p,b=(c?1:-1)*(sl-_);this._add("A",n,i,y,1,+c,t+n*$1(o+b),r+i*Z1(o+b)),_>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var w=t+n*$1(s),C=r+i*Z1(s);this._add("A",n,i,y,+p,+c,w,C)}},e.prototype.rect=function(t,r,n,i){this._add("M",t,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,r,n,i,a,o,s,l,u){for(var c=[],h=this._p,f=1;f"}function fne(e){return""}function XM(e,t){t=t||{};var r=t.newline?` -`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return hne(o,s)+(o!=="style"?Ur(l):l||"")+(a?""+r+re(a,function(u){return n(u)}).join(r)+r:"")+fne(o)}return n(e)}function dne(e,t,r){r=r||{};var n=r.newline?` -`:"",i=" {"+n,a=n+"}",o=re($e(e),function(l){return l+i+re($e(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),s=re($e(t),function(l){return"@keyframes "+l+i+re($e(t[l]),function(u){return u+i+re($e(t[l][u]),function(c){var h=t[l][u][c];return c==="d"&&(h='path("'+h+'")'),c+":"+h+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function xT(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function LN(e,t,r,n){return hr("svg","root",{width:e,height:t,xmlns:x6,"xmlns:xlink":b6,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var vne=0;function w6(){return vne++}var kN={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},dl="transform-origin";function pne(e,t,r){var n=J({},e.shape);J(n,t),e.buildPath(r,n);var i=new _6;return i.reset(H4(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function gne(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[dl]=r+"px "+n+"px")}var mne={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function T6(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function yne(e,t,r){var n=e.shape.paths,i={},a,o;if(R(n,function(l){var u=xT(r.zrId);u.animation=!0,m_(l,{},u,!0);var c=u.cssAnims,h=u.cssNodes,f=$e(c),d=f.length;if(d){o=f[d-1];var p=c[o];for(var g in p){var m=p[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in h){var _=h[y].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){t.d=!1;var s=T6(i,r);return a.replace(o,s)}}function PN(e){return se(e)?kN[e]?"cubic-bezier("+kN[e]+")":D2(e)?e:"":""}function m_(e,t,r,n){var i=e.animators,a=i.length,o=[];if(e instanceof Xv){var s=yne(e,t,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Ge=T6(A,r);return Ge+" "+_[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+w6();r.cssNodes["."+y]={animation:o.join(",")},t.class=y}}function _ne(e,t,r){if(!e.ignore)if(e.isSilent()){var n={"pointer-events":"none"};DN(n,t,r)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&s||o;l&&(a=xy(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&e.transform?e.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),DN(n,t,r)}}function DN(e,t,r,n){var i=JSON.stringify(e),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+w6(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=e),t.class=t.class?t.class+" "+a:a}var yv=Math.round;function C6(e){return e&&se(e.src)}function M6(e){return e&&me(e.toDataURL)}function qM(e,t,r,n){lne(function(i,a){var o=i==="fill"||i==="stroke";o&&G4(a)?L6(t,e,i,n):o&&N2(a)?k6(r,e,i,n):e[i]=a,o&&n.ssr&&a==="none"&&(e["pointer-events"]="visible")},t,r,!1),Mne(r,e,n)}function KM(e,t){var r=K4(t);r&&(r.each(function(n,i){n!=null&&(e[(AN+i).toLowerCase()]=n+"")}),t.isSilent()&&(e[AN+"silent"]="true"))}function IN(e){return Yo(e[0]-1)&&Yo(e[1])&&Yo(e[2])&&Yo(e[3]-1)}function xne(e){return Yo(e[4])&&Yo(e[5])}function QM(e,t,r){if(t&&!(xne(t)&&IN(t))){var n=1e4;e.transform=IN(t)?"translate("+yv(t[4]*n)/n+" "+yv(t[5]*n)/n+")":tX(t)}}function NN(e,t,r){for(var n=e.points,i=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Er(f,m),Er(d,m)}else if(f==null||d==null){var y=function(D,I){if(D){var z=D.elm,O=f||I.width,V=d||I.height;D.tag==="pattern"&&(u?(V=1,O/=a.width):c&&(O=1,V/=a.height)),D.attrs.width=O,D.attrs.height=V,z&&(z.setAttribute("width",O),z.setAttribute("height",V))}},_=G2(p,null,e,function(D){l||y(M,D),y(h,D)});_&&_.width&&_.height&&(f=f||_.width,d=d||_.height)}h=hr("image","img",{href:p,width:f,height:d}),o.width=f,o.height=d}else i.svgElement&&(h=ye(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(h){var b,w;l?b=w=1:u?(w=1,b=o.width/a.width):c?(b=1,w=o.height/a.height):o.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(o.width=b),w!=null&&!isNaN(w)&&(o.height=w);var C=W4(i);C&&(o.patternTransform=C);var M=hr("pattern","",o,[h]),A=XM(M),k=n.patternCache,N=k[A];N||(N=n.zrId+"-p"+n.patternIdx++,k[A]=N,o.id=N,M=n.defs[N]=hr("pattern",N,o,[h])),t[r]=Y0(N)}}function Ane(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[e.id]=a,i[a]=hr("clipPath",a,o,[A6(e,r)])}t["clip-path"]=Y0(a)}function ON(e){return document.createTextNode(e)}function xl(e,t,r){e.insertBefore(t,r)}function zN(e,t){e.removeChild(t)}function BN(e,t){e.appendChild(t)}function P6(e){return e.parentNode}function D6(e){return e.nextSibling}function Y1(e,t){e.textContent=t}var jN=58,Lne=120,kne=hr("","");function bT(e){return e===void 0}function na(e){return e!==void 0}function Pne(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(n[a]=i)}return n}function qf(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function _v(e){var t,r=e.children,n=e.tag;if(na(n)){var i=e.elm=S6(n);if(JM(kne,e),ee(r))for(t=0;ta?(p=r[l+1]==null?null:r[l+1].elm,I6(e,p,r,i,l)):Ky(e,t,n,a))}function ac(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(JM(e,t),bT(t.text)?na(n)&&na(i)?n!==i&&Dne(r,n,i):na(i)?(na(e.text)&&Y1(r,""),I6(r,null,i,0,i.length-1)):na(n)?Ky(r,n,0,n.length-1):na(e.text)&&Y1(r,""):e.text!==t.text&&(na(n)&&Ky(r,n,0,n.length-1),Y1(r,t.text)))}function Ine(e,t){if(qf(e,t))ac(e,t);else{var r=e.elm,n=P6(r);_v(t),n!==null&&(xl(n,t.elm,D6(r)),Ky(n,[e],0,0))}return t}var Nne=0,Ene=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=VN(),this.configLayer=VN(),this.storage=r,this._opts=n=J({},n),this.root=t,this._id="zr"+Nne++,this._oldVNode=LN(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=S6("svg");JM(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",Ine(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return RN(t,xT(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=xT(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Rne(n,i,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=hr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=re($e(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(hr("defs","defs",{},u)),t.animation){var c=dne(a.cssNodes,a.cssAnims,{newline:!0});if(c){var h=hr("style","stl",{},[],c);o.push(h)}}return LN(n,i,o,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},XM(this.renderToVNode({animation:pe(t.cssAnimation,!0),emphasis:pe(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:pe(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var i=t.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(f&&l&&f[g]===l[g]);g--);for(var m=p-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y=s)}}for(var h=this.__startIndex;h15)break}}V.prevElClipPaths&&y.restore()};if(_)if(_.length===0)k=m.__endIndex;else for(var D=d.dpr,I=0;I<_.length;++I){var z=_[I];y.save(),y.beginPath(),y.rect(z.x*D,z.y*D,z.width*D,z.height*D),y.clip(),N(z),y.restore()}else y.save(),N(),y.restore();m.__drawIndex=k,m.__drawIndex0&&t>i[0]){for(l=0;lt);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i0?Pg:0),this._needsManuallyCompositing),c.__builtin__||H0("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&Mn&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,R(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?Ee(n[t],r,!0):n[t]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill=q.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(ht);function lh(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=ih(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(t[a])}return n.join(" ")}var tp=function(e){Y(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=Ut(r,-1,-1,2,2,null,s);l.attr({z2:pe(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=Hne,this._symbolType=r,this.add(l)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){fo(this.childAt(0))},t.prototype.downplay=function(){vo(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=t.getSymbolZ2(r,n),c=o!==this._symbolType,h=a&&a.disableAnimation;if(c){var f=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,f)}else{var d=this.childAt(0);d.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};h?d.attr(p):Qe(d,p,s,n),hi(d)}if(this._updateCommon(r,n,l,i,a),c){var d=this.childAt(0);if(!h){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,bt(d,p,s,n)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,h,f,d,p,g,m,y;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,h=a.selectItemStyle,f=a.focus,d=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var _=a&&a.itemModel?a.itemModel:r.getItemModel(n),b=_.getModel("emphasis");u=b.getModel("itemStyle").getItemStyle(),h=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),f=b.get("focus"),d=b.get("blurScope"),p=b.get("disabled"),g=ar(_),m=b.getShallow("scale"),y=_.getShallow("cursor")}var w=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var C=vu(r.getItemVisual(n,"symbolOffset"),i);C&&(s.x=C[0],s.y=C[1]),y&&s.attr("cursor",y);var M=r.getItemVisual(n,"style"),A=M.fill;if(s instanceof pr){var k=s.style;s.useStyle(J({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},M))}else s.__isEmptyBrush?s.useStyle(J({},M)):s.useStyle(M),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var N=r.getItemVisual(n,"liftZ"),D=this._z2;N!=null?D==null&&(this._z2=s.z2,s.z2+=N):D!=null&&(s.z2=D,this._z2=null);var I=o&&o.useNameLabel;vr(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:z,inheritColor:A,defaultOpacity:M.opacity});function z(G){return I?r.getName(G):lh(r,G)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var O=s.ensureState("emphasis");O.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=c;var V=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;O.scaleX=this._sizeX*V,O.scaleY=this._sizeY*V,this.setSymbolScale(1),wt(this,f,d,p)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Le(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&_s(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();_s(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return Ih(r.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},t}(_e);function Hne(e,t){this.parent.drift(e,t)}function q1(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function HN(e){return e!=null&&!Se(e)&&(e={isIgnore:e}),e||{}}function WN(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ar(t),cursorStyle:t.get("cursor")}}var rp=function(){function e(t){this.group=new _e,this._SymbolCtor=t||tp}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=HN(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=WN(t),u={disableAnimation:s},c=r.getSymbolPoint||function(h){return t.getItemLayout(h)};a||n.removeAll(),t.diff(a).add(function(h){var f=c(h);if(q1(t,f,h,r)){var d=new o(t,h,l,u);d.setPosition(f),t.setItemGraphicEl(h,d),n.add(d)}}).update(function(h,f){var d=a.getItemGraphicEl(f),p=c(h);if(!q1(t,p,h,r)){n.remove(d);return}var g=t.getItemVisual(h,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==g)n.remove(d),d=new o(t,h,l,u),d.setPosition(p);else{d.updateData(t,h,l,u);var y={x:p[0],y:p[1]};s?d.attr(y):Qe(d,y,i)}n.add(d),t.setItemGraphicEl(h,d)}).remove(function(h){var f=a.getItemGraphicEl(h);f&&f.fadeOut(function(){n.remove(f)},i)}).execute(),this._getSymbolPoint=c,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=WN(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=HN(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function R6(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function Une(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function Zne(e,t,r,n,i,a,o,s){for(var l=Une(e,t),u=[],c=[],h=[],f=[],d=[],p=[],g=[],m=E6(i,t,o),y=e.getLayout("points")||[],_=t.getLayout("points")||[],b=0;b=i||g<0)break;if(Vl(y,_)){if(l){g+=a;continue}break}if(g===r)e[a>0?"moveTo":"lineTo"](y,_),h=y,f=_;else{var b=y-u,w=_-c;if(b*b+w*w<.5){g+=a;continue}if(o>0){for(var C=g+a,M=t[C*2],A=t[C*2+1];M===y&&A===_&&m=n||Vl(M,A))d=y,p=_;else{D=M-u,I=A-c;var V=y-u,G=M-y,F=_-c,Z=A-_,B=void 0,W=void 0;if(s==="x"){B=Math.abs(V),W=Math.abs(G);var H=D>0?1:-1;d=y-H*B*o,p=_,z=y+H*W*o,O=_}else if(s==="y"){B=Math.abs(F),W=Math.abs(Z);var X=I>0?1:-1;d=y,p=_-X*B*o,z=y,O=_+X*W*o}else B=Math.sqrt(V*V+F*F),W=Math.sqrt(G*G+Z*Z),N=W/(W+B),d=y-D*o*(1-N),p=_-I*o*(1-N),z=y+D*o*N,O=_+I*o*N,z=Do(z,Io(M,y)),O=Do(O,Io(A,_)),z=Io(z,Do(M,y)),O=Io(O,Do(A,_)),D=z-y,I=O-_,d=y-D*B/W,p=_-I*B/W,d=Do(d,Io(u,y)),p=Do(p,Io(c,_)),d=Io(d,Do(u,y)),p=Io(p,Do(c,_)),D=y-d,I=_-p,z=y+D*W/B,O=_+I*W/B}e.bezierCurveTo(h,f,d,p,y,_),h=z,f=O}else e.lineTo(y,_)}u=y,c=_,g+=a}return m}var O6=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),$ne=function(e){Y(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new O6},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Vl(i[o*2-2],i[o*2-1]);o--);for(;a=0){var w=u?(p-l)*b+l:(d-s)*b+s;return u?[r,w]:[w,r]}s=d,l=p;break;case o.C:d=a[h++],p=a[h++],g=a[h++],m=a[h++],y=a[h++],_=a[h++];var C=u?yy(s,d,g,y,r,c):yy(l,p,m,_,r,c);if(C>0)for(var M=0;M=0){var w=u?ur(l,p,m,_,A):ur(s,d,g,y,A);return u?[r,w]:[w,r]}}s=y,l=_;break}}},t}(Ue),Yne=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(O6),z6=function(e){Y(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new Yne},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Vl(i[s*2-2],i[s*2-1]);s--);for(;ot){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function Kne(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=t.getAxis(i),u=re(a.stops,function(b){return{coord:l.toGlobalCoord(l.dataToCoord(b.value)),color:b.color}}),c=u.length,h=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var f=qne(u,i==="x"?r.getWidth():r.getHeight()),d=f.length;if(!d&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,g=f[0].coord-p,m=f[d-1].coord+p,y=m-g;if(y<.001)return"transparent";R(f,function(b){b.offset=(b.coord-g)/y}),f.push({offset:d?f[d-1].offset:.5,color:h[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:h[0]||"transparent"});var _=new cu(0,0,0,0,f,!0);return _[i]=g,_[i+"2"]=m,_}}}function Qne(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Jne(a,t))){var o=t.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function Jne(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function eie(e,t){return isNaN(e)||isNaN(t)}function tie(e){for(var t=e.length/2;t>0&&eie(e[t*2-2],e[t*2-1]);t--);return t-1}function XN(e,t){return[e[t*2],e[t*2+1]]}function rie(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function V6(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var W=p.getState("emphasis").style;W.lineWidth=+p.style.lineWidth+1}Le(p).seriesIndex=r.seriesIndex,wt(p,F,Z,B);var H=YN(r.get("smooth")),X=r.get("smoothMonotone");if(p.setShape({smooth:H,smoothMonotone:X,connectNulls:A}),g){var K=s.getCalculationInfo("stackedOnSeries"),ne=0;g.useStyle(be(u.getAreaStyle(),{fill:z,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),K&&(ne=YN(K.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:ne,smoothMonotone:X,connectNulls:A}),ir(g,r,"areaStyle"),Le(g).seriesIndex=r.seriesIndex,wt(g,F,Z,B)}var ie=this._changePolyState;s.eachItemGraphicEl(function(ue){ue&&(ue.onHoverStateChange=ie)}),this._polyline.onHoverStateChange=ie,this._data=s,this._coordSys=a,this._stackedOnPoints=C,this._points=c,this._step=D,this._valueOrigin=b,r.get("triggerLineEvent")&&(this.packEventData(r,p),g&&this.packEventData(r,g))},t.prototype.packEventData=function(r,n){Le(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=ql(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],h=l[s*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var f=r.get("zlevel")||0,d=r.get("z")||0;u=new tp(o,s),u.x=c,u.y=h,u.setZ(f,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else st.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=ql(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else st.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;ky(this._polyline,r),n&&ky(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new $ne({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new z6({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");me(c)&&(c=c(null));var h=u.get("animationDelay")||0,f=me(h)?h(null):h;r.eachItemGraphicEl(function(d,p){var g=d;if(g){var m=[d.x,d.y],y=void 0,_=void 0,b=void 0;if(i)if(o){var w=i,C=n.pointToCoord(m);a?(y=w.startAngle,_=w.endAngle,b=-C[1]/180*Math.PI):(y=w.r0,_=w.r,b=C[0])}else{var M=i;a?(y=M.x,_=M.x+M.width,b=d.x):(y=M.y+M.height,_=M.y,b=d.y)}var A=_===y?0:(b-y)/(_-y);l&&(A=1-A);var k=me(h)?h(p):c*A+f,N=g.getSymbolPath(),D=N.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:k}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:k}),N.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(V6(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Xe({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=tie(l);c>=0&&(vr(s,ar(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(h,f,d){return d!=null?N6(o,d):lh(o,h)},enableTextSetter:!0},nie(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),f=i.hostModel,d=f.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),_=m.inverse,b=n.shape,w=_?y?b.x:b.y+b.height:y?b.x+b.width:b.y,C=(y?g:0)*(_?-1:1),M=(y?0:-g)*(_?-1:1),A=y?"x":"y",k=rie(h,w,A),N=k.range,D=N[1]-N[0],I=void 0;if(D>=1){if(D>1&&!d){var z=XN(h,N[0]);u.attr({x:z[0]+C,y:z[1]+M}),o&&(I=f.getRawValue(N[0]))}else{var z=c.getPointOn(w,A);z&&u.attr({x:z[0]+C,y:z[1]+M});var O=f.getRawValue(N[0]),V=f.getRawValue(N[1]);o&&(I=hj(i,p,O,V,k.t))}a.lastFrameIndex=N[0]}else{var G=r===1||a.lastFrameIndex>0?N[0]:0,z=XN(h,G);o&&(I=f.getRawValue(G)),u.attr({x:z[0]+C,y:z[1]+M})}if(o){var F=Mh(u);typeof F.setLabelText=="function"&&F.setLabelText(I)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,h=r.hostModel,f=Zne(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=f.current,p=f.stackedOnCurrent,g=f.next,m=f.stackedOnNext;if(o&&(p=No(f.stackedOnCurrent,f.current,i,o,l),d=No(f.current,null,i,o,l),m=No(f.stackedOnNext,f.next,i,o,l),g=No(f.next,null,i,o,l)),$N(d,g)>3e3||c&&$N(p,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=f.current,u.shape.points=d;var y={shape:{points:g}};f.current!==d&&(y.shape.__points=f.next),u.stopAnimation(),Qe(u,y,h),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),Qe(c,{shape:{stackedOnPoints:m}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],b=f.status,w=0;wt&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),h=n.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(h||1),d=Math.round(s/f);if(isFinite(d)&&d>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var p=void 0;se(a)?p=aie[a]:me(a)&&(p=a),p&&t.setData(i.downSample(i.mapDimension(u.dim),1/d,p,oie))}}}}}function sie(e){e.registerChartView(iie),e.registerSeriesModel(Gne),e.registerLayout(ip("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,F6("line"))}var xv=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return Pa(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)R(a.getAxes(),function(f,d){if(f.type==="category"&&n!=null){var p=f.getTicksCoords(),g=f.getTickModel().get("alignWithLabel"),m=o[d],y=n[d]==="x1"||n[d]==="y1";if(y&&!g&&(m+=1),p.length<2)return;if(p.length===2){s[d]=f.toGlobalCoord(f.getExtent()[y?1:0]);return}for(var _=void 0,b=void 0,w=1,C=0;Cm){b=(M+_)/2;break}C===1&&(w=A-p[0].tickValue)}b==null&&(_?_&&(b=p[p.length-1].coord):b=p[0].coord),s[d]=f.toGlobalCoord(b)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(ht);ht.registerClass(xv);var lie=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return Pa(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Ps(xv.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(xv),uie=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Qy=function(e){Y(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new uie},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,h=n.endAngle,f=n.clockwise,d=Math.PI*2,p=f?h-cMath.PI/2&&cs)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){to(a,r,Le(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(st),qN={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=Q1(t.x,e.x),s=J1(t.x+t.width,i),l=Q1(t.y,e.y),u=J1(t.y+t.height,a),c=si?s:o,t.y=h&&l>a?u:l,t.width=c?0:s-o,t.height=h?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||h},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=J1(t.r,e.r),a=Q1(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},KN={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new Be({shape:J({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,h=i?"height":"width";c[h]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?Qy:Rr,c=new u({shape:n,z2:1});c.name="item";var h=G6(i);if(c.calculateTextPosition=cie(h,{isRoundCap:u===Qy}),a){var f=c.shape,d=i?"r":"endAngle",p={};f[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Qe:bt)(c,{shape:p},a)}return c}};function vie(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function QN(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Qe:bt)(r,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(o?Qe:bt)(r,{shape:u},c,i)}function JN(e,t){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function mie(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function G6(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function tE(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=e.shape,h=fa(n.getModel("itemStyle"),c,!0);J(c,h),e.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var f=n.getShallow("cursor");f&&e.attr("cursor",f);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=ar(n);vr(e,p,{labelFetcher:a,labelDataIndex:r,defaultText:lh(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=e.getTextContent();if(s&&g){var m=n.get(["label","position"]);e.textConfig.inside=m==="middle"?!0:null,hie(e,m==="outside"?d:m,G6(o),n.get(["label","rotate"]))}Qj(g,p,a.getRawValue(r),function(_){return N6(t,_)});var y=n.getModel(["emphasis"]);wt(e,y.get("focus"),y.get("blurScope"),y.get("disabled")),ir(e,n),mie(i)&&(e.style.fill="none",e.style.stroke="none",R(e.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function yie(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var _ie=function(){function e(){}return e}(),rE=function(e){Y(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new _ie},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?r:null},30,!1);function xie(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,h=a.length/3;c=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function H6(e,t,r){if(xs(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function bie(e,t,r){var n=e.type==="polar"?Rr:Be;return new n({shape:H6(t,r,e),silent:!0,z2:0})}function Sie(e){e.registerChartView(die),e.registerSeriesModel(lie),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Ie(ZF,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$F("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,F6("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var aE=Math.PI*2,Eg=Math.PI/180;function wie(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=gV(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=o.viewRect,f=-n.get("startAngle")*Eg,d=n.get("endAngle"),p=n.get("padAngle")*Eg;d=d==="auto"?f-aE:-d*Eg;var g=n.get("minAngle")*Eg,m=g+p,y=0;i.each(a,function(Z){!isNaN(Z)&&y++});var _=i.getSum(a),b=Math.PI/(_||y)*2,w=n.get("clockwise"),C=n.get("roseType"),M=n.get("stillShowZeroSum"),A=i.getDataExtent(a);A[0]=0;var k=w?1:-1,N=[f,d],D=k*p/2;r_(N,!w),f=N[0],d=N[1];var I=W6(n);I.startAngle=f,I.endAngle=d,I.clockwise=w,I.cx=s,I.cy=l,I.r=u,I.r0=c;var z=Math.abs(d-f),O=z,V=0,G=f;if(i.setLayout({viewRect:h,r:u}),i.each(a,function(Z,B){var W;if(isNaN(Z)){i.setItemLayout(B,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:s,cy:l,r0:c,r:C?NaN:u});return}C!=="area"?W=_===0&&M?b:Z*b:W=z/y,WW?(X=G+k*W/2,K=X):(X=G+D,K=H-D),i.setItemLayout(B,{angle:W,startAngle:X,endAngle:K,clockwise:w,cx:s,cy:l,r0:c,r:C?nt(Z,A,[c,u]):u}),G=H}),Or?y:m,C=Math.abs(b.label.y-r);if(C>=w.maxY){var M=b.label.x-t-b.len2*i,A=n+b.len,k=Math.abs(M)e.unconstrainedWidth?null:f:null;n.setStyle("width",d)}Z6(a,n)}}}function Z6(e,t){sE.rect=e,g6(sE,t,Mie)}var Mie={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},sE={};function eb(e){return e.position==="center"}function Aie(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*Tie,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,h=s.y,f=s.height;function d(M){M.ignore=!0}function p(M){if(!M.ignore)return!0;for(var A in M.states)if(M.states[A].ignore===!1)return!0;return!1}t.each(function(M){var A=t.getItemGraphicEl(M),k=A.shape,N=A.getTextContent(),D=A.getTextGuideLine(),I=t.getItemModel(M),z=I.getModel("label"),O=z.get("position")||I.get(["emphasis","label","position"]),V=z.get("distanceToLabelLine"),G=z.get("alignTo"),F=oe(z.get("edgeDistance"),u),Z=z.get("bleedMargin");Z==null&&(Z=Math.min(u,f)>200?10:2);var B=I.getModel("labelLine"),W=B.get("length");W=oe(W,u);var H=B.get("length2");if(H=oe(H,u),Math.abs(k.endAngle-k.startAngle)0?"right":"left":K>0?"left":"right"}var tt=Math.PI,lt=0,Dt=z.get("rotate");if(qe(Dt))lt=Dt*(tt/180);else if(O==="center")lt=0;else if(Dt==="radial"||Dt===!0){var gr=K<0?-X+tt:-X;lt=gr}else if(Dt==="tangential"&&O!=="outside"&&O!=="outer"){var zr=Math.atan2(K,ne);zr<0&&(zr=tt*2+zr);var Vi=ne>0;Vi&&(zr=tt+zr),lt=zr-tt}if(a=!!lt,N.x=ie,N.y=ue,N.rotation=lt,N.setStyle({verticalAlign:"middle"}),xe){N.setStyle({align:Ge});var _u=N.states.select;_u&&(_u.x+=N.x,_u.y+=N.y)}else{var Fi=new Ce(0,0,0,0);Z6(Fi,N),r.push({label:N,labelLine:D,position:O,len:W,len2:H,minTurnAngle:B.get("minTurnAngle"),maxSurfaceAngle:B.get("maxSurfaceAngle"),surfaceNormal:new Te(K,ne),linePoints:ve,textAlign:Ge,labelDistance:V,labelAlignTo:G,edgeDistance:F,bleedMargin:Z,rect:Fi,unconstrainedWidth:Fi.width,labelStyleWidth:N.style.width})}A.setTextConfig({inside:xe})}}),!a&&e.get("avoidLabelOverlap")&&Cie(r,n,i,l,u,f,c,h);for(var g=0;g0){for(var c=o.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h=a.r0}},t.type="pie",t}(st);function zh(e,t,r){t=ee(t)&&{coordDimensions:t}||J({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=Nh(n,t).dimensions,a=new $r(i,e);return a.initData(n,r),a}var Bh=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}(),Pie=Fe(),$6=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bh(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return zh(this,{coordDimensions:["value"],encodeDefaulter:Ie(xM,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=Pie(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=tj(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){Xl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(ht);wQ({fullType:$6.type,getCoord2:function(e){return e.getShallow("center")}});function Die(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(qe(o)&&!isNaN(o)&&o<0)})}}}function Iie(e){e.registerChartView(kie),e.registerSeriesModel($6),sF("pie",e.registerAction),e.registerLayout(Ie(wie,"pie")),e.registerProcessor(Oh("pie")),e.registerProcessor(Die("pie"))}var Nie=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return Pa(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:q.color.primary}},universalTransition:{divideShape:"clone"}},t}(ht),Y6=4,Eie=function(){function e(){}return e}(),Rie=function(e){Y(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new Eie},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var c=u*2,h=a[c]-s/2,f=a[c+1]-l/2;if(r>=h&&n>=f&&r<=h+s&&n<=f+l)return u}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,h=-1/0,f=0;f=0&&(u.dataIndex=h+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),zie=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=ip("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new Oie:new rp,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(st),X6={left:0,right:0,top:0,bottom:0},Jy=["25%","25%"],Bie=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(r,n){var i=fu(r.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Ta(r.outerBounds,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Ta(this.option.outerBounds,r.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:X6,outerBoundsContain:"all",outerBoundsClampWidth:Jy[0],outerBoundsClampHeight:Jy[1],backgroundColor:q.color.transparent,borderWidth:1,borderColor:q.color.neutral30},t}(Ve),wT=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Pt).models[0]},t.type="cartesian2dAxis",t}(Ve);Bt(wT,Rh);var q6={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:q.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:q.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[q.color.backgroundTint,q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:q.color.neutral00,borderColor:q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},jie=Ee({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},q6),eA=Ee({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:q.color.axisMinorSplitLine,width:1}}},q6),Vie=Ee({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},eA),Fie=be({logBase:10},eA);const K6={category:jie,value:eA,time:Vie,log:Fie};var Gie={value:1,category:1,time:1,log:1},TT=null;function Hie(e){TT||(TT=e)}function ap(){return TT}function uh(e,t,r,n){R(Gie,function(i,a){var o=Ee(Ee({},K6[a],!0),n,!0),s=function(l){Y(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var f=cv(this),d=f?fu(c):{},p=h.getTheme();Ee(c,p.get(a+"Axis")),Ee(c,this.getDefaultOption()),c.type=lE(c),f&&Ta(c,d,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=gv.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var h=ap();return h?h.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",lE)}function lE(e){return e.type||(e.data?"category":"value")}var Wie=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return re(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),et(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}(),CT=["x","y"];function uE(e){return(e.type==="interval"||e.type==="time")&&!e.hasBreaks()}var Uie=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=CT,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!uE(r)||!uE(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,h=(s[1]-o[1])/u,f=o[0]-i[0]*c,d=o[1]-a[0]*h,p=this._transform=[c,0,0,h,f,d];this._invTransform=ui([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ot(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return Ot(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Ce(a,o,s,l)},t}(Wie),Q6=function(e){Y(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(vi),y_="expandAxisBreak",J6="collapseAxisBreak",eG="toggleAxisBreak",tA="axisbreakchanged",Zie={type:y_,event:tA,update:"update",refineEvent:rA},$ie={type:J6,event:tA,update:"update",refineEvent:rA},Yie={type:eG,event:tA,update:"update",refineEvent:rA};function rA(e,t,r,n){var i=[];return R(e,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function Xie(e){e.registerAction(Zie,t),e.registerAction($ie,t),e.registerAction(Yie,t);function t(r,n){var i=[],a=Oc(n,r);function o(s,l){R(a[s],function(u){var c=u.updateAxisBreaks(r);R(c.breaks,function(h){var f;i.push(be((f={},f[l]=u.componentIndex,f),h))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Xo=Math.PI,qie=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Kie=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ch=Fe(),tG=Fe(),rG=function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},e}();function Qie(e,t,r,n){var i=r.axis,a=t.ensureRecord(r),o=[],s,l=nA(e.axisName)&&sh(e.nameLocation);R(n,function(p){var g=Ca(p);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?ui(wf,m.transform):Hv(wf),g.transform&&Pi(wf,wf,g.transform),Ce.copy(Rg,g.localRect),Rg.applyTransform(wf),s?s.union(Rg):Ce.copy(s=new Ce(0,0,0,0),Rg))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,g){return Math.abs(p.label[u]-c)-Math.abs(g.label[u]-c)}),l&&s){var h=i.getExtent(),f=Math.min(h[0],h[1]),d=Math.max(h[0],h[1])-f;s.union(new Ce(f,0,d,1))}a.stOccupiedRect=s,a.labelInfoList=o}var wf=fr(),Rg=new Ce(0,0,0,0),nG=function(e,t,r,n,i,a){if(sh(e.nameLocation)){var o=a.stOccupiedRect;o&&iG(qre({},o,a.transGroup.transform),n,i)}else aG(a.labelInfoList,a.dirVec,n,i)};function iG(e,t,r){var n=new Te;g_(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&gT(t,n)}function aG(e,t,r,n){for(var i=Te.dot(n,t)>=0,a=0,o=e.length;a0?"top":"bottom",a="center"):eh(i-Xo)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),Jie=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],eae={axisLine:function(e,t,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],h=[l[1],0],f=c[0]>h[0];u&&(Ot(c,c,u),Ot(h,h,u));var d=J({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())ap().buildAxisBreakLine(n,i,a,p);else{var g=new Wt(J({shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]}},p));nh(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);se(m)&&(m=[m,m]),(se(y)||qe(y))&&(y=[y,y]);var _=vu(n.get(["axisLine","symbolOffset"])||0,y),b=y[0],w=y[1];R([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-h[0])*(c[0]-h[0])+(c[1]-h[1])*(c[1]-h[1]))}],function(C,M){if(m[M]!=="none"&&m[M]!=null){var A=Ut(m[M],-b/2,-w/2,b,w,d.stroke,!0),k=C.r+C.offset,N=f?h:c;A.attr({rotation:C.rotate,x:N[0]+k*Math.cos(e.rotation),y:N[1]-k*Math.sin(e.rotation),silent:!0,z2:11}),i.add(A)}})}}},axisTickLabelEstimate:function(e,t,r,n,i,a,o,s){var l=hE(t,i,s);l&&cE(e,t,r,n,i,a,o,zi.estimate)},axisTickLabelDetermine:function(e,t,r,n,i,a,o,s){var l=hE(t,i,s);l&&cE(e,t,r,n,i,a,o,zi.determine);var u=iae(e,i,a,n);nae(e,t.labelLayoutList,u),aae(e,i,a,n,e.tickDirection)},axisName:function(e,t,r,n,i,a,o,s){var l=r.ensureRecord(n);t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=e.axisName;if(nA(u)){var c=e.nameLocation,h=e.nameDirection,f=n.getModel("nameTextStyle"),d=n.get("nameGap")||0,p=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Te(0,0),y=new Te(0,0);c==="start"?(m.x=p[0]-g*d,y.x=-g):c==="end"?(m.x=p[1]+g*d,y.x=g):(m.x=(p[0]+p[1])/2,m.y=e.labelOffset+h*d,y.y=h);var _=fr();y.transform(xo(_,_,e.rotation));var b=n.get("nameRotate");b!=null&&(b=b*Xo/180);var w,C;sh(c)?w=rn.innerTextLayout(e.rotation,b??e.rotation,h):(w=tae(e.rotation,c,b||0,p),C=e.raw.axisNameAvailableWidth,C!=null&&(C=Math.abs(C/Math.sin(w.rotation)),!isFinite(C)&&(C=null)));var M=f.getFont(),A=n.get("nameTruncate",!0)||{},k=A.ellipsis,N=Sr(e.raw.nameTruncateMaxWidth,A.maxWidth,C),D=s.nameMarginLevel||0,I=new Xe({x:m.x,y:m.y,rotation:w.rotation,silent:rn.isLabelSilent(n),style:vt(f,{text:u,font:M,overflow:"truncate",width:N,ellipsis:k,fill:f.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:f.get("align")||w.textAlign,verticalAlign:f.get("verticalAlign")||w.textVerticalAlign}),z2:1});if(So({el:I,componentModel:n,itemName:u}),I.__fullText=u,I.anid="name",n.get("triggerEvent")){var z=rn.makeAxisEventDataBase(n);z.targetType="axisName",z.name=u,Le(I).eventData=z}a.add(I),I.updateTransform(),t.nameEl=I;var O=l.nameLayout=Ca({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:sh(c)?qie[D]:Kie[D]});if(l.nameLocation=c,i.add(I),I.decomposeTransform(),e.shouldNameMoveOverlap&&O){var V=r.ensureRecord(n);r.resolveAxisNameOverlap(e,r,n,O,y,V)}}}};function cE(e,t,r,n,i,a,o,s){sG(t)||oae(e,t,i,s,n,o);var l=t.labelLayoutList;sae(e,n,l,a),cae(n,e.rotation,l);var u=e.optionHideOverlap;rae(n,l,u),u&&m6(et(l,function(c){return c&&!c.label.ignore})),Qie(e,r,n,l)}function tae(e,t,r,n){var i=O2(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return eh(i-Xo/2)?(o=l?"bottom":"top",a="center"):eh(i-Xo*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iXo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function rae(e,t,r){if(e6(e.axis))return;function n(s,l,u){var c=Ca(t[l]),h=Ca(t[u]);if(!(!c||!h)){if(s===!1||c.suggestIgnore){Kf(c.label);return}if(h.suggestIgnore){Kf(h.label);return}var f=.1;if(!r){var d=[0,0,0,0];c=mT({marginForce:d},c),h=mT({marginForce:d},h)}g_(c,h,null,{touchThreshold:f})&&Kf(s?h.label:c.label)}}var i=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]),o=t.length;n(i,0,1),n(a,o-1,o-2)}function nae(e,t,r){e.showMinorTicks||R(t,function(n){if(n&&n.label.ignore)for(var i=0;iu[0]&&isFinite(p)&&isFinite(u[0]);)d=j1(d),p=u[1]-d*o;else{var m=e.getTicks().length-1;m>o&&(d=j1(d));var y=d*o;g=Math.ceil(u[1]/d)*d,p=Ht(g-y),p<0&&u[0]>=0?(p=0,g=Ht(y)):g>0&&u[1]<=0&&(g=0,p=-Ht(y))}var _=(i[0].value-a[0].value)/s,b=(i[o].value-a[o].value)/s;n.setExtent.call(e,p+d*_,g+d*b),n.setInterval.call(e,d),(_||b)&&n.setNiceExtent.call(e,p+d,g-d)}var dE=[[3,1],[0,2]],vae=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=CT,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=$e(o),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var f=+l[h],d=o[f],p=d.model,g=d.scale;cT(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(ru(g,p),cT(g)&&(s=d))}c.length&&(s||(s=c.pop(),ru(s.scale,s.model)),R(c,function(m){lG(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};R(n.x,function(o){vE(n,"y",o,a)}),R(n.y,function(o){vE(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=sr(t,r),a=this._rect=St(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(AT(o,a),!n){var u=mae(a,s,o,l,r),c=void 0;if(l)LT?(LT(this._axesList,a),AT(o,a)):c=mE(a.clone(),"axisLabel",null,a,o,u,i);else{var h=yae(t,a,i),f=h.outerBoundsRect,d=h.parsedOuterBoundsContain,p=h.outerBoundsClamp;f&&(c=mE(f,d,p,a,o,u,i))}uG(a,o,zi.determine,null,c,i)}R(this._coordsList,function(g){g.calcAffineTransform()})},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}Se(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i0})==null;return Jl(n,s,!0,!0,r),AT(i,n),l;function u(f){R(i[De[f]],function(d){if(mv(d.model)){var p=a.ensureRecord(d.model),g=p.labelInfoList;if(g)for(var m=0;m0&&!Dr(d)&&d>1e-4&&(f/=d),f}}function mae(e,t,r,n,i){var a=new rG(_ae);return R(r,function(o){return R(o,function(s){if(mv(s.model)){var l=!n;s.axisBuilder=fae(e,t,s.model,i,a,l)}})}),a}function uG(e,t,r,n,i,a){var o=r===zi.determine;R(t,function(u){return R(u,function(c){mv(c.model)&&(dae(c.axisBuilder,e,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[De[1-u]]=e[qt[u]]<=a.refContainer[qt[u]]*.5?0:1-u===1?2:1}R(t,function(u,c){return R(u,function(h){mv(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function yae(e,t,r){var n,i=e.get("outerBoundsMode",!0);i==="same"?n=t.clone():(i==null||i==="auto")&&(n=St(e.get("outerBounds",!0)||X6,r.refContainer));var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"||Ne(["all","axisLabel"],a)<0?o="all":o=a;var s=[Cy(pe(e.get("outerBoundsClampWidth",!0),Jy[0]),t.width),Cy(pe(e.get("outerBoundsClampHeight",!0),Jy[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var _ae=function(e,t,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";nG(e,t,r,n,i,a),sh(e.nameLocation)||R(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&aG(s.labelInfoList,s.dirVec,n,i)})};function xae(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return bae(r,e,t),r.seriesInvolved&&wae(r,e),r}function bae(e,t,r){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];R(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=bv(s.model),u=e.coordSysAxesInfo[l]={};e.coordSysMap[l]=s;var c=s.model,h=c.getModel("tooltip",n);if(R(s.getAxes(),Ie(g,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var f=h.get("trigger")==="axis",d=h.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(h.get(["axisPointer","axis"]));(f||d)&&R(p.baseAxes,Ie(g,d?"cross":!0,f)),d&&R(p.otherAxes,Ie(g,"cross",!1))}function g(m,y,_){var b=_.model.getModel("axisPointer",i),w=b.get("show");if(!(!w||w==="auto"&&!m&&!kT(b))){y==null&&(y=b.get("triggerTooltip")),b=m?Sae(_,h,i,t,m,y):b;var C=b.get("snap"),M=b.get("triggerEmphasis"),A=bv(_.model),k=y||C||_.type==="category",N=e.axesInfo[A]={key:A,axis:_,coordSys:s,axisPointerModel:b,triggerTooltip:y,triggerEmphasis:M,involveSeries:k,snap:C,useHandle:kT(b),seriesModels:[],linkGroup:null};u[A]=N,e.seriesInvolved=e.seriesInvolved||k;var D=Tae(a,_);if(D!=null){var I=o[D]||(o[D]={axesInfo:{}});I.axesInfo[A]=N,I.mapper=a[D].mapper,N.linkGroup=I}}}})}function Sae(e,t,r,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};R(s,function(f){l[f]=ye(o.get(f))}),l.snap=e.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&be(u,h.textStyle)}}return e.model.getModel("axisPointer",new We(l,r,n))}function wae(e,t){t.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||R(e.coordSysAxesInfo[bv(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function Tae(e,t){for(var r=t.model,n=t.dim,i=0;i=0||e===t}function Cae(e){var t=iA(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=kT(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var Iae=Fe();function xE(e,t,r,n){if(e instanceof Q6){var i=e.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=e.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=e.scale.type==="ordinal"?e.getBandWidth():null;return o>0?s?pG(r,o,u,n):Nae(e,t,r,n,o,l):r}function pG(e,t,r,n){if(r===null)return e+(Math.random()-.5)*t;var i=r-n*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function Nae(e,t,r,n,i,a){var o=Iae(e);o.items||(o.items=[]);var s=o.items,l=bE(s,t,r,n,i,a,1),u=bE(s,t,r,n,i,a,-1),c=Math.abs(l-r)i/2||h&&f>h/2-n?pG(r,i,h,n):(s.push({fixedCoord:t,floatCoord:c,r:n}),c)}function bE(e,t,r,n,i,a,o){for(var s=r,l=0;li/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=be({color:p.color},l));var m=Ee(ye(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:f},!1);if(se(c)){var y=m.name;m.name=c.replace("{value}",y??"")}else me(c)&&(m.name=c(m.name,m));var _=new We(m,null,this.ecModel);return Bt(_,Rh.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:q.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ee({lineStyle:{color:q.color.neutral20}},Tf.axisLine),axisLabel:Og(Tf.axisLabel,!1),axisTick:Og(Tf.axisTick,!1),splitLine:Og(Tf.splitLine,!0),splitArea:Og(Tf.splitArea,!0),indicator:[]},t}(Ve),Gae=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=re(a,function(s){var l=s.model.get("showName")?s.name:"",u=new rn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});R(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),h=s.get("show"),f=l.get("color"),d=u.get("color"),p=ee(f)?f:[f],g=ee(d)?d:[d],m=[],y=[];function _(G,F,Z){var B=Z%F.length;return G[B]=G[B]||[],B}if(a==="circle")for(var b=i[0].getTicksCoords(),w=n.cx,C=n.cy,M=0;M3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),f=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(r){if(!(TE(this._zr,"globalPan")||Cf(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(ho(a.event),a.__ecRoamConsumed=!0,CE(r,n,i,a,o))},t}(fi);function Cf(e){return e.__ecRoamConsumed}var qae=Fe();function __(e){var t=qae(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Mf(e,t,r,n){for(var i=__(e),a=i.roam,o=a[t]=a[t]||[],s=0;s=4&&(c={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(c&&s!=null&&l!=null&&(h=bG(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new _e,i.add(d),d.scaleX=d.scaleY=h.scale,d.x=h.x,d.y=h.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Be({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:h,named:a}},e.prototype._parseNode=function(t,r,n,i,a,o){var s=t.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=nb[s];if(c&&he(nb,s)){l=c.call(this,t,r);var h=t.getAttribute("name");if(h){var f={name:h,namedFrom:null,svgNodeTagLower:s,el:l};n.push(f),s==="g"&&(u=f)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=kE[s];if(d&&he(kE,s)){var p=d.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var m=t.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},e.prototype._parseText=function(t,r){var n=new th({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Wn(r,n),Sn(t,n,this._defsUsePending,!1,!1),eoe(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},e.internalField=function(){nb={g:function(t,r){var n=new _e;return Wn(r,n),Sn(t,n,this._defsUsePending,!1,!1),n},rect:function(t,r){var n=new Be;return Wn(r,n),Sn(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,r){var n=new ka;return Wn(r,n),Sn(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,r){var n=new Wt;return Wn(r,n),Sn(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,r){var n=new $v;return Wn(r,n),Sn(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,r){var n=t.getAttribute("points"),i;n&&(i=IE(n));var a=new Or({shape:{points:i||[]},silent:!0});return Wn(r,a),Sn(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,r){var n=t.getAttribute("points"),i;n&&(i=IE(n));var a=new Tr({shape:{points:i||[]},silent:!0});return Wn(r,a),Sn(t,a,this._defsUsePending,!1,!1),a},image:function(t,r){var n=new pr;return Wn(r,n),Sn(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,r){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new _e;return Wn(r,s),Sn(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,r){var n=t.getAttribute("x"),i=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new _e;return Wn(r,s),Sn(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,r){var n=t.getAttribute("d")||"",i=zj(n);return Wn(r,i),Sn(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),e}(),kE={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),r=parseInt(e.getAttribute("y1")||"0",10),n=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),a=new cu(t,r,n,i);return PE(e,a),DE(e,a),a},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),r=parseInt(e.getAttribute("cy")||"0",10),n=parseInt(e.getAttribute("r")||"0",10),i=new K2(t,r,n);return PE(e,i),DE(e,i),i}};function PE(e,t){var r=e.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(t.global=!0)}function DE(e,t){for(var r=e.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};xG(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=Zr(o),u=l&&l[3];u&&(l[3]*=Ja(s),o=ii(l,"rgba"))}t.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Wn(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),be(t.__inheritedStyle,e.__inheritedStyle))}function IE(e){for(var t=b_(e),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=b_(o);switch(i=i||fr(),s){case"translate":Ri(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":$0(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":xo(i,i,-parseFloat(l[0])*ib,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*ib);Pi(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*ib);Pi(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var EE=/([^\s:;]+)\s*:\s*([^:;]+)/g;function xG(e,t,r){var n=e.getAttribute("style");if(n){EE.lastIndex=0;for(var i;(i=EE.exec(n))!=null;){var a=i[1],o=he(t0,a)?t0[a]:null;o&&(t[o]=i[2]);var s=he(r0,a)?r0[a]:null;s&&(r[s]=i[2])}}}function ooe(e,t,r){for(var n=0;n0,_={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(t,m,r,n),this._updateMapSelectHandler(t,u,n,i)},e.prototype._buildGeoJSON=function(t){var r=this._regionsGroupByName=de(),n=de(),i=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function h(d){for(var p=[],g=!u&&l&&l.project,m=0;m=0)&&(f=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vr(t,ar(n),{labelFetcher:f,labelDataIndex:h,defaultText:r},d);var p=t.getTextContent();if(p&&(SG(p).ignore=p.ignore,t.textConfig&&o)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function jE(e,t,r,n,i,a){e.data?e.data.setItemGraphicEl(a,t):Le(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function VE(e,t,r,n,i){e.data||So({el:t,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function FE(e,t,r,n,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return wt(t,o,a.get("blurScope"),a.get("disabled")),e.isGeo&&pK(t,i,r),o}function GE(e,t,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),R(e,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill=q.color.neutral00,i.style.lineWidth=2),i},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:q.color.tertiary},itemStyle:{borderWidth:.5,borderColor:q.color.border,areaColor:q.color.background},emphasis:{label:{show:!0,color:q.color.primary},itemStyle:{areaColor:q.color.highlight}},select:{label:{show:!0,color:q.color.primary},itemStyle:{color:q.color.highlight}},nameProperty:"name"},t}(ht);function Moe(e,t){var r={};return R(e,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),e[0].map(e[0].mapDimension("value"),function(n,i){for(var a="ec-"+e[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c1?(b.width=_,b.height=_/g):(b.height=_,b.width=_*g),b.y=y[1]-b.height/2,b.x=y[0]-b.width/2;else{var w=e.getBoxLayoutParams();w.aspect=g,b=St(w,p),b=mV(e,b,g)}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function Poe(e,t){R(t.get("geoCoord"),function(r,n){e.addGeoCoord(n,r)})}var Doe=function(){function e(){this.dimensions=TG}return e.prototype.create=function(t,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new IT(l+s,l,J({nameMap:o.get("nameMap"),api:r,ecModel:t},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=ZE,u.resize(o,r)}),t.eachSeries(function(o){Qv({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Pt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),R(a,function(o,s){var l=re(o,function(c){return c.get("nameMap")}),u=new IT(s,s,J({nameMap:W0(l),api:r,ecModel:t},i(o[0])));u.zoomLimit=Sr.apply(null,re(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=ZE,u.resize(o[0],r),R(o,function(c){c.coordinateSystem=u,Poe(u,c)})}),n},e.prototype.getFilledRegions=function(t,r,n,i){for(var a=(t||[]).slice(),o=de(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function zoe(e,t){var r=e.isExpand?e.children:[],n=e.parentNode.children,i=e.hierNode.i?n[e.hierNode.i-1]:null;if(r.length){joe(e);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=Voe(e,i,e.parentNode.hierNode.defaultAncestor||n[0],t)}function Boe(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function $E(e){return arguments.length?e:Hoe}function Qf(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function joe(e){for(var t=e.children,r=t.length,n=0,i=0;--r>=0;){var a=t[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function Voe(e,t,r,n){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=ab(s),a=ob(a),s&&a;){i=ab(i),o=ob(o),i.hierNode.ancestor=e;var f=s.hierNode.prelim+h-a.hierNode.prelim-u+n(s,a);f>0&&(Goe(Foe(s,e,r),e,f),u+=f,l+=f),h+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!ab(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),a&&!ob(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=e)}return r}function ab(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function ob(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function Foe(e,t,r){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:r}function Goe(e,t,r){var n=r/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=r,t.hierNode.modifier+=r,t.hierNode.prelim+=r,e.hierNode.change+=n}function Hoe(e,t){return e.parentNode===t.parentNode?1:2}var Woe=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),Uoe=function(e){Y(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Woe},t.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,h=1-c,f=oe(n.forkPosition,1),d=[];d[c]=o[c],d[h]=o[h]+(l[h]-o[h])*f,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[c]=s[c],r.lineTo(d[0],d[1]),d[c]=l[c],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var p=1;p_.x,C||(w=w-Math.PI));var A=C?"left":"right",k=s.getModel("label"),N=k.get("rotate"),D=N*(Math.PI/180),I=m.getTextContent();I&&(m.setTextConfig({position:k.get("position")||A,rotation:N==null?-w:D,origin:"center"}),I.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),O=z==="relative"?Kc(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;O&&(Le(r).focus=O),$oe(i,o,c,r,p,d,g,n),r.__edge&&(r.onHoverStateChange=function(V){if(V!=="blur"){var G=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);G&&G.hoverState===Zv||ky(r.__edge,V)}})}function $oe(e,t,r,n,i,a,o,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),h=e.getOrient(),f=e.get(["lineStyle","curveness"]),d=e.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==r&&(g||(g=n.__edge=new wh({shape:NT(c,h,f,i,i)})),Qe(g,{shape:NT(c,h,f,a,o)},e));else if(u==="polyline"&&c==="orthogonal"&&t!==r&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var m=t.children,y=[],_=0;_r&&(r=i.height)}this.height=r+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,r)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,r)},e.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=e.targetNode;if(se(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function PG(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function fA(e,t){var r=PG(e);return Ne(r,t)>=0}function S_(e,t){for(var r=[];e;){var n=e.dataIndex;r.push({name:e.name,dataIndex:n,value:t.getRawValue(n)}),e=e.parentNode}return r.reverse(),r}var rse=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new We(i,this,this.ecModel),o=hA.createTree(n,this,s);function s(h){h.wrapMethod("getItemModel",function(f,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var f=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=f&&f.collapsed!=null?!f.collapsed:h.depth<=c}),o.data},t.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Kt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=S_(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:q.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(ht);function nse(e,t,r){for(var n=[e],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function ise(e,t){e.eachSeriesByType("tree",function(r){ase(r,t)})}function ase(e,t){var r=sr(e,t).refContainer,n=St(e.getBoxLayoutParams(),r);e.layoutInfo=n;var i=e.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=$E(function(w,C){return(w.parentNode===C.parentNode?1:2)/w.depth})):(a=n.width,o=n.height,s=$E());var l=e.getData().tree.root,u=l.children[0];if(u){Ooe(l),nse(u,zoe,s),l.hierNode.modifier=-u.hierNode.prelim,kf(u,Boe);var c=u,h=u,f=u;kf(u,function(w){var C=w.getLayout().x;Ch.getLayout().x&&(h=w),w.depth>f.depth&&(f=w)});var d=c===h?1:s(c,h)/2,p=d-c.getLayout().x,g=0,m=0,y=0,_=0;if(i==="radial")g=a/(h.getLayout().x+d+p),m=o/(f.depth-1||1),kf(u,function(w){y=(w.getLayout().x+p)*g,_=(w.depth-1)*m;var C=Qf(y,_);w.setLayout({x:C.x,y:C.y,rawX:y,rawY:_},!0)});else{var b=e.getOrient();b==="RL"||b==="LR"?(m=o/(h.getLayout().x+d+p),g=a/(f.depth-1||1),kf(u,function(w){_=(w.getLayout().x+p)*m,y=b==="LR"?(w.depth-1)*g:a-(w.depth-1)*g,w.setLayout({x:y,y:_},!0)})):(b==="TB"||b==="BT")&&(g=a/(h.getLayout().x+d+p),m=o/(f.depth-1||1),kf(u,function(w){y=(w.getLayout().x+p)*g,_=b==="TB"?(w.depth-1)*m:o-(w.depth-1)*m,w.setLayout({x:y,y:_},!0)}))}}}function ose(e){e.eachSeriesByType("tree",function(t){var r=t.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");J(s,o)})})}function sse(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=t.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var a=i.coordinateSystem,o=x_(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function lse(e){e.registerChartView(Zoe),e.registerSeriesModel(rse),e.registerLayout(ise),e.registerVisual(ose),sse(e)}var QE=["treemapZoomToNode","treemapRender","treemapMove"];function use(e){for(var t=0;t1;)a=a.parentNode;var o=qw(e.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var cse=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventUsingHoverLayer=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};IG(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new We({itemStyle:o},this,n);a=r.levels=hse(a,n);var l=re(a||[],function(h){return new We(h,s,n)},this),u=hA.createTree(i,this,c);function c(h){h.wrapMethod("getItemModel",function(f,d){var p=u.getNodeByDataIndex(d),g=p?l[p.depth]:null;return f.parentModel=g||s,f})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Kt("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=S_(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},J(this.layoutInfo,r)},t.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=de(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){DG(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:q.size.l,top:q.size.xxxl,right:q.size.l,bottom:q.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:q.size.m,emptyItemWidth:25,itemStyle:{color:q.color.backgroundShade,textStyle:{color:q.color.secondary}},emphasis:{itemStyle:{color:q.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:q.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:q.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(ht);function IG(e){var t=0;R(e.children,function(n){IG(n);var i=n.value;ee(i)&&(i=i[0]),t+=i});var r=e.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),ee(e.value)?e.value[0]=r:e.value=r}function hse(e,t){var r=pt(t.get("color")),n=pt(t.get(["aria","decal","decals"]));if(r){e=e||[];var i,a;R(e,function(s){var l=new We(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),e}}var fse=8,JE=8,sb=5,dse=function(){function e(t){this.group=new _e,t.add(this.group)}return e.prototype.render=function(t,r,n,i){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),h=sr(t,r).refContainer,f={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},d={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=St(f,h);this._prepare(n,d,u),this._renderContent(t,d,p,s,l,u,c,i),u_(o,f,h)}},e.prototype._prepare=function(t,r,n){for(var i=t;i;i=i.parentNode){var a=rr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+fse*2,r.emptyItemWidth);r.totalWidth+=s+JE,r.renderList.push({node:i,text:a,width:s})}},e.prototype._renderContent=function(t,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,h=t.get(["breadcrumb","height"]),f=r.totalWidth,d=r.renderList,p=a.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var m=d[g],y=m.node,_=m.width,b=m.text;f>n.width&&(f-=_-c,_=c,b=null);var w=new Or({shape:{points:vse(u,0,_,h,g===d.length-1,g===0)},style:be(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xe({style:vt(o,{text:b})}),textConfig:{position:"inside"},z2:bh*1e4,onclick:Ie(l,y)});w.disableLabelAnimation=!0,w.getTextContent().ensureState("emphasis").style=vt(s,{text:b}),w.ensureState("emphasis").style=p,wt(w,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(w),pse(w,t,y),u+=_+JE}},e.prototype.remove=function(){this.group.removeAll()},e}();function vse(e,t,r,n,i,a){var o=[[i?e:e-sb,t],[e+r,t],[e+r,t+n],[i?e:e-sb,t+n]];return!a&&o.splice(2,0,[e+r+sb,t+n/2]),!i&&o.push([e,t+n/2]),o}function pse(e,t,r){Le(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&S_(r,t)}}var gse=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(t,r,n,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:r,duration:n,delay:i,easing:a}),!0)},e.prototype.finished=function(t){return this._finishedCallback=t,this},e.prototype.start=function(){for(var t=this,r=this._storage.length,n=function(){r--,r<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,a=this._storage.length;itR||Math.abs(r.dy)>tR)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ce(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var h=c.zoom=c.zoom||1;if(h*=a,u){var f=u.min||0,d=u.max||1/0;h=Math.max(Math.min(d,h),f)}var p=h/c.zoom;c.zoom=h;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=fr();Ri(m,m,[-n,-i]),$0(m,m,[p,p]),Ri(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Ny(u,c)}}}}},this)},t.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new dse(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(fA(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Pf(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(st);function Pf(){return{nodeGroup:[],background:[],content:[]}}function Sse(e,t,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),h=e.getData(),f=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,g=c.borderWidth,m=c.invisible,y=o.getRawIndex(),_=s&&s.getRawIndex(),b=o.viewChildren,w=c.upperHeight,C=b&&b.length,M=f.getModel("itemStyle"),A=f.getModel(["emphasis","itemStyle"]),k=f.getModel(["blur","itemStyle"]),N=f.getModel(["select","itemStyle"]),D=M.get("borderRadius")||0,I=ue("nodeGroup",ET);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),n0(I).nodeWidth=d,n0(I).nodeHeight=p,c.isAboveViewRoot)return I;var z=ue("background",eR,u,_se);z&&H(I,z,C&&c.upperLabelHeight);var O=f.getModel("emphasis"),V=O.get("focus"),G=O.get("blurScope"),F=O.get("disabled"),Z=V==="ancestor"?o.getAncestorsIndices():V==="descendant"?o.getDescendantIndices():V;if(C)sv(I)&&Ll(I,!1),z&&(Ll(z,!F),h.setItemGraphicEl(o.dataIndex,z),jw(z,Z,G));else{var B=ue("content",eR,u,xse);B&&X(I,B),z.disableMorphing=!0,z&&sv(z)&&Ll(z,!1),Ll(I,!F),h.setItemGraphicEl(o.dataIndex,I);var W=f.getShallow("cursor");W&&B.attr("cursor",W),jw(I,Z,G)}return I;function H(xe,ge,Pe){var fe=Le(ge);if(fe.dataIndex=o.dataIndex,fe.seriesIndex=e.seriesIndex,ge.setShape({x:0,y:0,width:d,height:p,r:D}),m)K(ge);else{ge.invisible=!1;var Me=o.getVisual("style"),ot=Me.stroke,Ye=iR(M);Ye.fill=ot;var tt=pl(A);tt.fill=A.get("borderColor");var lt=pl(k);lt.fill=k.get("borderColor");var Dt=pl(N);if(Dt.fill=N.get("borderColor"),Pe){var gr=d-2*g;ne(ge,ot,Me.opacity,{x:g,y:0,width:gr,height:w})}else ge.removeTextContent();ge.setStyle(Ye),ge.ensureState("emphasis").style=tt,ge.ensureState("blur").style=lt,ge.ensureState("select").style=Dt,Ql(ge)}xe.add(ge)}function X(xe,ge){var Pe=Le(ge);Pe.dataIndex=o.dataIndex,Pe.seriesIndex=e.seriesIndex;var fe=Math.max(d-2*g,0),Me=Math.max(p-2*g,0);if(ge.culling=!0,ge.setShape({x:g,y:g,width:fe,height:Me,r:D}),m)K(ge);else{ge.invisible=!1;var ot=o.getVisual("style"),Ye=ot.fill,tt=iR(M);tt.fill=Ye,tt.decal=ot.decal;var lt=pl(A),Dt=pl(k),gr=pl(N);ne(ge,Ye,ot.opacity,null),ge.setStyle(tt),ge.ensureState("emphasis").style=lt,ge.ensureState("blur").style=Dt,ge.ensureState("select").style=gr,Ql(ge)}xe.add(ge)}function K(xe){!xe.invisible&&a.push(xe)}function ne(xe,ge,Pe,fe){var Me=f.getModel(fe?nR:rR),ot=rr(f.get("name"),null),Ye=Me.getShallow("show");vr(xe,ar(f,fe?nR:rR),{defaultText:Ye?ot:null,inheritColor:ge,defaultOpacity:Pe,labelFetcher:e,labelDataIndex:o.dataIndex});var tt=xe.getTextContent();if(tt){var lt=tt.style,Dt=Fv(lt.padding||0);fe&&(xe.setTextConfig({layoutRect:fe}),tt.disableLabelLayout=!0),tt.beforeUpdate=function(){var zr=Math.max((fe?fe.width:xe.shape.width)-Dt[1]-Dt[3],0),Vi=Math.max((fe?fe.height:xe.shape.height)-Dt[0]-Dt[2],0);(lt.width!==zr||lt.height!==Vi)&&tt.setStyle({width:zr,height:Vi})},lt.truncateMinChar=2,lt.lineOverflow="truncate",ie(lt,fe,c);var gr=tt.getState("emphasis");ie(gr?gr.style:null,fe,c)}}function ie(xe,ge,Pe){var fe=xe?xe.text:null;if(!ge&&Pe.isLeafRoot&&fe!=null){var Me=e.get("drillDownIcon",!0);xe.text=Me?Me+" "+fe:fe}}function ue(xe,ge,Pe,fe){var Me=_!=null&&r[xe][_],ot=i[xe];return Me?(r[xe][_]=null,ve(ot,Me)):m||(Me=new ge,Me instanceof ci&&(Me.z2=wse(Pe,fe)),Ge(ot,Me)),t[xe][y]=Me}function ve(xe,ge){var Pe=xe[y]={};ge instanceof ET?(Pe.oldX=ge.x,Pe.oldY=ge.y):Pe.oldShape=J({},ge.shape)}function Ge(xe,ge){var Pe=xe[y]={},fe=o.parentNode,Me=ge instanceof _e;if(fe&&(!n||n.direction==="drillDown")){var ot=0,Ye=0,tt=i.background[fe.getRawIndex()];!n&&tt&&tt.oldShape&&(ot=tt.oldShape.width,Ye=tt.oldShape.height),Me?(Pe.oldX=0,Pe.oldY=Ye):Pe.oldShape={x:ot,y:Ye,width:0,height:0}}Pe.fadein=!Me}}function wse(e,t){return e*yse+t}var wv=R,Tse=Se,i0=-1,dr=function(){function e(t){var r=t.mappingMethod,n=t.type,i=this.option=ye(t);this.type=n,this.mappingMethod=r,this._normalizeData=Ase[r];var a=e.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(lb(i),Cse(i)):r==="category"?i.categories?Mse(i):lb(i,!0):(Er(r!=="linear"||i.dataExtent),lb(i))}return e.prototype.mapValueToVisual=function(t){var r=this._normalizeData(t);return this._normalizedToVisual(r,t)},e.prototype.getNormalizer=function(){return le(this._normalizeData,this)},e.listVisualTypes=function(){return $e(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,r,n){Se(t)?R(t,r,n):r.call(n,t)},e.mapVisual=function(t,r,n){var i,a=ee(t)?[]:Se(t)?{}:(i=!0,null);return e.eachVisual(t,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},e.retrieveVisuals=function(t){var r={},n;return t&&wv(e.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(r[a]=t[a],n=!0)}),n?r:null},e.prepareVisualTypes=function(t){if(ee(t))t=t.slice();else if(Tse(t)){var r=[];wv(t,function(n,i){r.push(i)}),t=r}else return[];return t.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},e.dependsOn=function(t,r){return r==="color"?!!(t&&t.indexOf(r)===0):t===r},e.findPieceIndex=function(t,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[t[a]],t.pop())}function lb(e,t){var r=e.visual,n=[];Se(r)?wv(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!t&&n.length===1&&!i.hasOwnProperty(e.type)&&(n[1]=n[0]),NG(e,n)}function Bg(e){return{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("color",e(r("color"),i))},_normalizedToVisual:RT([0,1])}}function aR(e){var t=this.option.visual;return t[Math.round(nt(e,[0,1],[0,t.length-1],!0))]||{}}function Df(e){return function(t,r,n){n(e,this.mapValueToVisual(t))}}function Jf(e){var t=this.option.visual;return t[this.option.loop&&e!==i0?e%t.length:e]}function gl(){return this.option.visual[0]}function RT(e){return{linear:function(t){return nt(t,e,this.option.visual,!0)},category:Jf,piecewise:function(t,r){var n=OT.call(this,r);return n==null&&(n=nt(t,e,this.option.visual,!0)),n},fixed:gl}}function OT(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var n=dr.findPieceIndex(e,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function NG(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=re(t,function(r){var n=Zr(r);return n||[0,0,0,1]})),t}var Ase={linear:function(e){return nt(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,r=dr.findPieceIndex(e,t,!0);if(r!=null)return nt(r,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??i0},fixed:Rt};function jg(e,t,r){return e?t<=r:t=r.length||g===r[g.depth]){var y=Nse(i,l,g,m,p,n);RG(g,y,r,n)}})}}}function Pse(e,t,r){var n=J({},t),i=r.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=e.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function oR(e){var t=ub(e,"color");if(t){var r=ub(e,"colorAlpha"),n=ub(e,"colorSaturation");return n&&(t=eo(t,null,null,n)),r&&(t=rv(t,r)),t}}function Dse(e,t){return t!=null?eo(t,null,null,e):null}function ub(e,t){var r=e[t];if(r!=null&&r!=="none")return r}function Ise(e,t,r,n,i,a){if(!(!a||!a.length)){var o=cb(t,"color")||i.color!=null&&i.color!=="none"&&(cb(t,"colorAlpha")||cb(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(c==="index"||c==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var f=new dr(h);return EG(f).drColorMappingBy=c,f}}}function cb(e,t){var r=e.get(t);return ee(r)&&r.length?{name:t,range:r}:null}function Nse(e,t,r,n,i,a){var o=J({},t);if(i){var s=i.type,l=s==="color"&&EG(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Tv=Math.max,a0=Math.min,sR=Sr,dA=R,OG=["itemStyle","borderWidth"],Ese=["itemStyle","gapWidth"],Rse=["upperLabel","show"],Ose=["upperLabel","height"];const zse={seriesType:"treemap",reset:function(e,t,r,n){var i=e.option,a=sr(e,r).refContainer,o=St(e.getBoxLayoutParams(),a),s=i.size||[],l=oe(sR(o.width,s[0]),a.width),u=oe(sR(o.height,s[1]),a.height),c=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],f=Sv(n,h,e),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=e.getViewRoot(),g=PG(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?Hse(e,f,p,l,u):d?[d.width,d.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(b),zG(p,_,!1,0),b=p.getLayout(),dA(g,function(C,M){var A=(g[M+1]||p).getValue();C.setLayout(J({dataExtent:[A,A],borderWidth:0,upperHeight:0},b))})}var w=e.getData().tree.root;w.setLayout(Wse(o,d,f),!0),e.setLayoutInfo(o),BG(w,new Ce(-o.x,-o.y,r.getWidth(),r.getHeight()),g,p,0)}};function zG(e,t,r,n){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),l=s.get(OG),u=s.get(Ese)/2,c=jG(s),h=Math.max(l,c),f=l-u,d=h-u;e.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),i=Tv(i-2*f,0),a=Tv(a-f-d,0);var p=i*a,g=Bse(e,s,p,t,r,n);if(g.length){var m={x:f,y:d,width:i,height:a},y=a0(i,a),_=1/0,b=[];b.area=0;for(var w=0,C=g.length;w=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*ts[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Gse(e,t,r){for(var n=0,i=1/0,a=0,o=void 0,s=e.length;an&&(n=o));var l=e.area*e.area,u=t*t*r;return l?Tv(u*n/l,l/(u*i)):1/0}function lR(e,t,r,n,i){var a=t===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=t?e.area/t:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var h=0,f=e.length;hLw&&(u=Lw),a=s}un&&(n=t);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(C[0]=-C[0],C[1]=-C[1]);var A=w[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var k=-Math.atan2(w[1],w[0]);h[0].8?"left":f[0]<-.8?"right":"center",g=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*y+c[0],a.y=-f[1]*_+c[1],p=f[0]>.8?"right":f[0]<-.8?"left":"center",g=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*A+c[0],a.y=c[1]+N,p=w[0]<0?"right":"left",a.originX=-y*A,a.originY=-N;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=M[0],a.y=M[1]+N,p="center",a.originY=-N;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*A+h[0],a.y=h[1]+N,p=w[0]>=0?"right":"left",a.originX=y*A,a.originY=-N;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},t}(_e),yA=function(){function e(t){this.group=new _e,this._LineCtor=t||mA}return e.prototype.updateData=function(t){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=vR(t);t.diff(a).add(function(s){r._doAdd(t,s,o)}).update(function(s,l){r._doUpdate(a,t,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},e.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(r,n){r.updateLayout(t,n)},this)},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=vR(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r){this._progressiveEls=[];function n(s){!s.isGroup&&!sle(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0}function vR(e){var t=e.hostModel,r=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ar(t)}}function pR(e){return isNaN(e[0])||isNaN(e[1])}function pb(e){return e&&!pR(e[0])&&!pR(e[1])}var gb=[],mb=[],yb=[],$u=br,_b=ss,gR=Math.abs;function mR(e,t,r){for(var n=e[0],i=e[1],a=e[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){gb[0]=$u(n[0],i[0],a[0],c),gb[1]=$u(n[1],i[1],a[1],c);var h=gR(_b(gb,t)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function xb(e,t){var r=[],n=ev,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[ga(u[0]),ga(u[1])],u[2]&&u.__original.push(ga(u[2])));var f=u.__original;if(u[2]!=null){if(Gr(i[0],f[0]),Gr(i[1],f[2]),Gr(i[2],f[1]),c&&c!=="none"){var d=td(s.node1),p=mR(i,f[0],d*t);n(i[0][0],i[1][0],i[2][0],p,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],p,r),i[0][1]=r[3],i[1][1]=r[4]}if(h&&h!=="none"){var d=td(s.node2),p=mR(i,f[1],d*t);n(i[0][0],i[1][0],i[2][0],p,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],p,r),i[1][1]=r[1],i[2][1]=r[2]}Gr(u[0],i[0]),Gr(u[1],i[2]),Gr(u[2],i[1])}else{if(Gr(a[0],f[0]),Gr(a[1],f[1]),Uo(o,a[1],a[0]),uu(o,o),c&&c!=="none"){var d=td(s.node1);dy(a[0],a[0],o,d*t)}if(h&&h!=="none"){var d=td(s.node2);dy(a[1],a[1],o,-d*t)}Gr(u[0],a[0]),Gr(u[1],a[1])}})}var ZG=Fe();function lle(e){if(e)return ZG(e).bridge}function yR(e,t){e&&(ZG(e).bridge=t)}function _R(e){return e.type==="view"}var ule=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){var i=new rp,a=new yA,o=this.group,s=new _e;this._controller=new gu(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(_R(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(h):Qe(this._mainGroup,h,r)}xb(r.getGraph(),ed(r));var f=r.getData();u.updateData(f);var d=r.getEdgeData();c.updateData(d),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var p=r.forceLayout,g=r.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,i,g));var m=r.get("layout");f.graph.eachNode(function(w){var C=w.dataIndex,M=w.getGraphicEl(),A=w.getModel();if(M){M.off("drag").off("dragend");var k=A.get("draggable");k&&M.on("drag",function(D){switch(m){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,g),p.setFixed(C),f.setItemLayout(C,[M.x,M.y]);break;case"circular":f.setItemLayout(C,[M.x,M.y]),w.setLayout({fixed:!0},!0),gA(r,"symbolSize",w,[D.offsetX,D.offsetY]),a.updateLayout(r);break;case"none":default:f.setItemLayout(C,[M.x,M.y]),pA(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(C)}),M.setDraggable(k,!!A.get("cursor"));var N=A.get(["emphasis","focus"]);N==="adjacency"&&(Le(M).focus=w.getAdjacentDataIndices())}}),f.graph.eachEdge(function(w){var C=w.getGraphicEl(),M=w.getModel().get(["emphasis","focus"]);C&&M==="adjacency"&&(Le(C).focus={edge:[w.dataIndex],node:[w.node1.dataIndex,w.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=f.getLayout("cx"),b=f.getLayout("cy");f.graph.eachNode(function(w){HG(w,y,_,b)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!_R(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},t.prototype.updateViewOnPan=function(r,n,i){this._active&&(oA(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(r,n,i){this._active&&(sA(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),xb(r.getGraph(),ed(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=ed(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},t.prototype.updateLayout=function(r){this._active&&(xb(r.getGraph(),ed(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=lle(r);if(i)return{bridge:i,coordSys:n}}},t.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new _e,l=i.group.children(),u=a.group.children(),c=new _e,h=new _e;s.add(h),s.add(c);for(var f=0;f=0&&t.call(r,n[a],a)},e.prototype.eachEdge=function(t,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&t.call(r,n[a],a)},e.prototype.breadthFirstTraverse=function(t,r,n,i){if(r instanceof ml||(r=this._nodesMap[Yu(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&!t.hasKey(p)&&(t.set(p,!0),o.push(d.node1))}for(l=0;l=0&&!t.hasKey(b)&&(t.set(b,!0),s.push(_.node2))}}}return{edge:t.keys(),node:r.keys()}},e}(),$G=function(){function e(t,r,n){this.dataIndex=-1,this.node1=t,this.node2=r,this.dataIndex=n??-1}return e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var t=de(),r=de();t.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a=0&&!t.hasKey(h)&&(t.set(h,!0),n.push(c.node1))}for(a=0;a=0&&!t.hasKey(g)&&(t.set(g,!0),i.push(p.node2))}return{edge:t.keys(),node:r.keys()}},e}();function YG(e,t){return{getValue:function(r){var n=this[e][t];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[e][t].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Bt(ml,YG("hostGraph","data"));Bt($G,YG("hostGraph","edgeData"));function _A(e,t,r,n,i){for(var a=new cle(n),o=0;o "+f)),u++)}var d=r.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar"||d==="matrix")p=Pa(e,r);else{var g=kh.get(d),m=g?g.dimensions||[]:[];Ne(m,"value")<0&&m.concat(["value"]);var y=Nh(e,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;p=new $r(y,r),p.initData(e)}var _=new $r(["value"],r);return _.initData(l,s),i&&i(p,_),LG({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var hle=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Bh(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(r){e.prototype.mergeDefaultAndTheme.apply(this,arguments),Xl(r,"edgeLabel",["show"])},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){Kse(this);var s=_A(a,i,this,!0,l);return R(s.edges,function(u){Qse(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,m=p.getShallow("category"),y=g[m];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var h=We.prototype.getModel;function f(p,g){var m=h.call(this,p,g);return m.resolveParentPath=d,m}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=f,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}return p}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var h=KV({series:this,dataIndex:r,multipleSeries:n});return h},t.prototype._updateCategoriesData=function(){var r=re(this.option.categories||[],function(i){return i.value!=null?i:J({value:0},i)}),n=new $r(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:q.color.primary}}},t}(ht);function fle(e){e.registerChartView(ule),e.registerSeriesModel(hle),e.registerProcessor(Zse),e.registerVisual($se),e.registerVisual(Yse),e.registerLayout(Jse),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,tle),e.registerLayout(nle),e.registerCoordinateSystem("graphView",{dimensions:mu.dimensions,create:ale}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Rt),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Rt),e.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",query:t},function(i){var a=n.getViewOfSeriesModel(i);a&&(t.dx!=null&&t.dy!=null&&a.updateViewOnPan(i,n,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&a.updateViewOnZoom(i,n,t));var o=i.coordinateSystem,s=x_(o,t,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var xR=function(e){Y(t,e);function t(r,n,i){var a=e.call(this)||this;Le(a).dataType="node",a.z2=2;var o=new Xe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),h=r.getItemLayout(n),f=J(fa(u.getModel("itemStyle"),h,!0),h),d=this;if(isNaN(f.startAngle)){d.setShape(f);return}a?d.setShape(f):Qe(d,{shape:f},l,n);var p=J(fa(u.getModel("itemStyle"),h,!0),h);o.setShape(p),o.useStyle(r.getItemVisual(n,"style")),ir(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,d),ir(d,u,"itemStyle");var g=c.get("focus");wt(this,g==="adjacency"?s.getAdjacentDataIndices():g,c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var h=ar(n),f=i.getVisual("style");vr(a,h,{labelFetcher:{getFormattedLabel:function(_,b,w,C,M,A){return r.getFormattedLabel(_,b,"node",C,xn(M,h.normal&&h.normal.get("formatter"),n.get("name")),A)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:f.fill,defaultOpacity:f.opacity,defaultOutsidePosition:"startArc"});var d=c.get("position")||"outside",p=c.get("distance")||0,g;d==="outside"?g=o.r+p:g=(o.r+o.r0)/2,this.textConfig={inside:d!=="outside"};var m=d!=="outside"?c.get("align")||"center":l>0?"left":"right",y=d!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*g+o.cx,y:u*g+o.cy,rotation:0,style:{align:m,verticalAlign:y}})},t}(Rr),dle=function(e){Y(t,e);function t(r,n,i,a){var o=e.call(this)||this;return Le(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return t.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},t.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),h=n.getItemModel(l.dataIndex),f=h.getModel("lineStyle"),d=h.getModel("emphasis"),p=d.get("focus"),g=J(fa(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),bR(m,l,r,f)):(hi(m),bR(m,l,r,f),Qe(m,{shape:g},s,i)),wt(this,p==="adjacency"?l.getAdjacentDataIndices():p,d.get("blurScope"),d.get("disabled")),ir(m,h,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},t}(Ue);function bR(e,t,r,n){var i=t.node1,a=t.node2,o=e.style;e.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(se(l)&&se(u)){var c=e.shape,h=(c.s1[0]+c.s2[0])/2,f=(c.s1[1]+c.s2[1])/2,d=(c.t1[0]+c.t2[0])/2,p=(c.t1[1]+c.t2[1])/2;o.fill=new cu(h,f,d,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var vle=Math.PI/180,ple=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){},t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*vle;if(a.diff(o).add(function(c){var h=a.getItemLayout(c);if(h){var f=new xR(a,c,l);Le(f).dataIndex=c,s.add(f)}}).update(function(c,h){var f=o.getItemGraphicEl(h),d=a.getItemLayout(c);if(!d){f&&to(f,r,h);return}f?f.updateData(a,c,l):f=new xR(a,c,l),s.add(f)}).remove(function(c){var h=o.getItemGraphicEl(c);h&&to(h,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=oe(u[0],i.getWidth()),this.group.originY=oe(u[1],i.getHeight()),bt(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},t.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new dle(i,a,l,n);Le(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&to(u,r,l)}).execute(),this._edgeData=a},t.prototype.dispose=function(){},t.type="chord",t}(st),gle=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new Bh(le(this.getData,this),le(this.getRawData,this))},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=_A(a,i,this,!0,s);return o.data}function s(l,u){var c=We.prototype.getModel;function h(d,p){var g=c.call(this,d,p);return g.resolveParentPath=f,g}u.wrapMethod("getItemModel",function(d){return d.resolveParentPath=f,d.getModel=h,d});function f(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return Kt("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},t.type="series.chord",t.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},t}(ht),bb=Math.PI/180;function mle(e,t){e.eachSeriesByType("chord",function(r){yle(r,t)})}function yle(e,t){var r=e.getData(),n=r.graph,i=e.getEdgeData(),a=i.count();if(a){var o=gV(e,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=Math.max((e.get("padAngle")||0)*bb,0),f=Math.max((e.get("minAngle")||0)*bb,0),d=-e.get("startAngle")*bb,p=d+Math.PI*2,g=e.get("clockwise"),m=g?1:-1,y=[d,p];r_(y,!g);var _=y[0],b=y[1],w=b-_,C=r.getSum("value")===0&&i.getSum("value")===0,M=[],A=0;n.eachEdge(function(B){var W=C?1:B.getValue("value");C&&(W>0||f)&&(A+=2);var H=B.node1.dataIndex,X=B.node2.dataIndex;M[H]=(M[H]||0)+W,M[X]=(M[X]||0)+W});var k=0;if(n.eachNode(function(B){var W=B.getValue("value");isNaN(W)||(M[B.dataIndex]=Math.max(W,M[B.dataIndex]||0)),!C&&(M[B.dataIndex]>0||f)&&A++,k+=M[B.dataIndex]||0}),!(A===0||k===0)){h*A>=Math.abs(w)&&(h=Math.max(0,(Math.abs(w)-f*A)/A)),(h+f)*A>=Math.abs(w)&&(f=(Math.abs(w)-h*A)/A);var N=(w-h*A*m)/k,D=0,I=0,z=0;n.eachNode(function(B){var W=M[B.dataIndex]||0,H=N*(k?W:1)*m;Math.abs(H)I){var V=D/I;n.eachNode(function(B){var W=B.getLayout().angle;Math.abs(W)>=f?B.setLayout({angle:W*V,ratio:V},!0):B.setLayout({angle:f,ratio:f===0?1:W/f},!0)})}else n.eachNode(function(B){if(!O){var W=B.getLayout().angle,H=Math.min(W/z,1),X=H*D;W-Xf&&f>0){var H=O?1:Math.min(W/z,1),X=W-f,K=Math.min(X,Math.min(G,D*H));G-=K,B.setLayout({angle:W-K,ratio:(W-K)/W},!0)}else f>0&&B.setLayout({angle:f,ratio:W===0?1:f/W},!0)}});var F=_,Z=[];n.eachNode(function(B){var W=Math.max(B.getLayout().angle,f);B.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:F,endAngle:F+W*m,clockwise:g},!0),Z[B.dataIndex]=F,F+=(W+h)*m}),n.eachEdge(function(B){var W=C?1:B.getValue("value"),H=N*(k?W:1)*m,X=B.node1.dataIndex,K=Z[X]||0,ne=Math.abs((B.node1.getLayout().ratio||1)*H),ie=K+ne*m,ue=[s+c*Math.cos(K),l+c*Math.sin(K)],ve=[s+c*Math.cos(ie),l+c*Math.sin(ie)],Ge=B.node2.dataIndex,xe=Z[Ge]||0,ge=Math.abs((B.node2.getLayout().ratio||1)*H),Pe=xe+ge*m,fe=[s+c*Math.cos(xe),l+c*Math.sin(xe)],Me=[s+c*Math.cos(Pe),l+c*Math.sin(Pe)];B.setLayout({s1:ue,s2:ve,sStartAngle:K,sEndAngle:ie,t1:fe,t2:Me,tStartAngle:xe,tEndAngle:Pe,cx:s,cy:l,r:c,value:W,clockwise:g}),Z[X]=ie,Z[Ge]=Pe})}}}function _le(e){e.registerChartView(ple),e.registerSeriesModel(gle),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,mle),e.registerProcessor(Oh("chord"))}var xle=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),ble=function(e){Y(t,e);function t(r){var n=e.call(this,r)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new xle},t.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},t}(Ue);function Sle(e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight(),a=Math.min(n,i),o=oe(r[0],t.getWidth()),s=oe(r[1],t.getHeight()),l=oe(e.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Fg(e,t){var r=e==null?"":e+"";return t&&(se(t)?r=t.replace("{value}",r):me(t)&&(r=t(e))),r}var wle=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=Sle(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,h=r.getModel("axisLine"),f=h.get("roundCap"),d=f?Qy:Rr,p=h.get("show"),g=h.getModel("lineStyle"),m=g.get("width"),y=[u,c];r_(y,!l),u=y[0],c=y[1];for(var _=c-u,b=u,w=[],C=0;p&&C=N&&(D===0?0:a[D-1][0])Math.PI/2&&(ie+=Math.PI)):ne==="tangential"?ie=-k-Math.PI/2:qe(ne)&&(ie=ne*Math.PI/180),ie===0?h.add(new Xe({style:vt(b,{text:W,x:X,y:K,verticalAlign:G<-.8?"top":G>.8?"bottom":"middle",align:V<-.4?"left":V>.4?"right":"center"},{inheritColor:H}),silent:!0})):h.add(new Xe({style:vt(b,{text:W,x:X,y:K,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:X,originY:K,rotation:ie}))}if(_.get("show")&&F!==w){var Z=_.get("distance");Z=Z?Z+c:c;for(var ue=0;ue<=C;ue++){V=Math.cos(k),G=Math.sin(k);var ve=new Wt({shape:{x1:V*(p-Z)+f,y1:G*(p-Z)+d,x2:V*(p-A-Z)+f,y2:G*(p-A-Z)+d},silent:!0,style:z});z.stroke==="auto"&&ve.setStyle({stroke:a((F+ue/C)/w)}),h.add(ve),k+=D}k-=D}else k+=N}},t.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var h=this.group,f=this._data,d=this._progressEls,p=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),_=r.getData(),b=_.mapDimension("value"),w=+r.get("min"),C=+r.get("max"),M=[w,C],A=[s,l];function k(D,I){var z=_.getItemModel(D),O=z.getModel("pointer"),V=oe(O.get("width"),o.r),G=oe(O.get("length"),o.r),F=r.get(["pointer","icon"]),Z=O.get("offsetCenter"),B=oe(Z[0],o.r),W=oe(Z[1],o.r),H=O.get("keepAspect"),X;return F?X=Ut(F,B-V/2,W-G,V,G,null,H):X=new ble({shape:{angle:-Math.PI/2,width:V,r:G,x:B,y:W}}),X.rotation=-(I+Math.PI/2),X.x=o.cx,X.y=o.cy,X}function N(D,I){var z=m.get("roundCap"),O=z?Qy:Rr,V=m.get("overlap"),G=V?m.get("width"):c/_.count(),F=V?o.r-G:o.r-(D+1)*G,Z=V?o.r:o.r-D*G,B=new O({shape:{startAngle:s,endAngle:I,cx:o.cx,cy:o.cy,clockwise:u,r0:F,r:Z}});return V&&(B.z2=nt(_.get(b,D),[w,C],[100,0],!0)),B}(y||g)&&(_.diff(f).add(function(D){var I=_.get(b,D);if(g){var z=k(D,s);bt(z,{rotation:-((isNaN(+I)?A[0]:nt(I,M,A,!0))+Math.PI/2)},r),h.add(z),_.setItemGraphicEl(D,z)}if(y){var O=N(D,s),V=m.get("clip");bt(O,{shape:{endAngle:nt(I,M,A,V)}},r),h.add(O),Rw(r.seriesIndex,_.dataType,D,O),p[D]=O}}).update(function(D,I){var z=_.get(b,D);if(g){var O=f.getItemGraphicEl(I),V=O?O.rotation:s,G=k(D,V);G.rotation=V,Qe(G,{rotation:-((isNaN(+z)?A[0]:nt(z,M,A,!0))+Math.PI/2)},r),h.add(G),_.setItemGraphicEl(D,G)}if(y){var F=d[I],Z=F?F.shape.endAngle:s,B=N(D,Z),W=m.get("clip");Qe(B,{shape:{endAngle:nt(z,M,A,W)}},r),h.add(B),Rw(r.seriesIndex,_.dataType,D,B),p[D]=B}}).execute(),_.each(function(D){var I=_.getItemModel(D),z=I.getModel("emphasis"),O=z.get("focus"),V=z.get("blurScope"),G=z.get("disabled");if(g){var F=_.getItemGraphicEl(D),Z=_.getItemVisual(D,"style"),B=Z.fill;if(F instanceof pr){var W=F.style;F.useStyle(J({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},Z))}else F.useStyle(Z),F.type!=="pointer"&&F.setColor(B);F.setStyle(I.getModel(["pointer","itemStyle"]).getItemStyle()),F.style.fill==="auto"&&F.setStyle("fill",a(nt(_.get(b,D),M,[0,1],!0))),F.z2EmphasisLift=0,ir(F,I),wt(F,O,V,G)}if(y){var H=p[D];H.useStyle(_.getItemVisual(D,"style")),H.setStyle(I.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ir(H,I),wt(H,O,V,G)}}),this._progressEls=p)},t.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=Ut(s,n.cx-o/2+oe(l[0],n.r),n.cy-o/2+oe(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},t.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),h=+r.get("max"),f=new _e,d=[],p=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){d[y]=new Xe({silent:!0}),p[y]=new Xe({silent:!0})}).update(function(y,_){d[y]=s._titleEls[_],p[y]=s._detailEls[_]}).execute(),l.each(function(y){var _=l.getItemModel(y),b=l.get(u,y),w=new _e,C=a(nt(b,[c,h],[0,1],!0)),M=_.getModel("title");if(M.get("show")){var A=M.get("offsetCenter"),k=o.cx+oe(A[0],o.r),N=o.cy+oe(A[1],o.r),D=d[y];D.attr({z2:m?0:2,style:vt(M,{x:k,y:N,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:C})}),w.add(D)}var I=_.getModel("detail");if(I.get("show")){var z=I.get("offsetCenter"),O=o.cx+oe(z[0],o.r),V=o.cy+oe(z[1],o.r),G=oe(I.get("width"),o.r),F=oe(I.get("height"),o.r),Z=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:C,D=p[y],B=I.get("formatter");D.attr({z2:m?0:2,style:vt(I,{x:O,y:V,text:Fg(b,B),width:isNaN(G)?null:G,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:Z})}),Qj(D,{normal:I},b,function(H){return Fg(H,B)}),g&&Jj(D,y,l,r,{getFormattedLabel:function(H,X,K,ne,ie,ue){return Fg(ue?ue.interpolatedValue:b,B)}}),w.add(D)}f.add(w)}),this.group.add(f),this._titleEls=d,this._detailEls=p},t.type="gauge",t}(st),Tle=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="itemStyle",r}return t.prototype.getInitialData=function(r,n){return zh(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,q.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:q.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:q.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:q.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:q.color.neutral00,borderWidth:0,borderColor:q.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:q.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:q.color.transparent,borderWidth:0,borderColor:q.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:q.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(ht);function Cle(e){e.registerChartView(wle),e.registerSeriesModel(Tle)}var Mle=["itemStyle","opacity"],Ale=function(e){Y(t,e);function t(r,n){var i=e.call(this)||this,a=i,o=new Tr,s=new Xe;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return t.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(Mle);c=c??1,i||hi(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,bt(a,{style:{opacity:c}},o,n)):Qe(a,{style:{opacity:c},shape:{points:l.points}},o,n),ir(a,s),this._updateLabel(r,n),wt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,h=r.getItemVisual(n,"style"),f=h.fill;vr(o,ar(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:h.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var d=l.getModel("label"),p=d.get("color"),g=p==="inherit"?f:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:g,outsideFill:g});var m=c.linePoints;a.setShape({points:m}),i.textGuideLineConfig={anchor:m?new Te(m[0][0],m[0][1]):null},Qe(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),ZM(i,$M(l),{stroke:f})},t}(Or),Lle=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new Ale(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);to(u,r,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(st),kle=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bh(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.getInitialData=function(r,n){return zh(this,{coordDimensions:["value"],encodeDefaulter:Ie(xM,this)})},t.prototype._defaultLabelLine=function(r){Xl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.prototype.getDataParams=function(r){var n=this.getData(),i=e.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:q.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:q.color.primary}}},t}(ht);function Ple(e,t){for(var r=e.mapDimension("value"),n=e.mapArray(r,function(l){return l}),i=[],a=t==="ascending",o=0,s=e.count();oZle)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!wb(this,"mousemove"))){var t=this._model,r=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function wb(e,t){var r=e._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===t}var Xle=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(r){var n=this.option;r&&Ee(n,r,!0),this._initDimensions()},t.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},t.prototype.setAxisExpand=function(r){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},t.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=et(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);R(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(Ve),qle=function(e){Y(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(vi);function bs(e,t,r,n,i,a){e=e||0;var o=r[1]-r[0];if(i!=null&&(i=Xu(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=Xu(s,[0,o]),i=a=Xu(s,[i,a]),n=0}t[0]=Xu(t[0],r),t[1]=Xu(t[1],r);var l=Tb(t,n);t[n]+=e;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,t[n]=Xu(t[n],c);var h;return h=Tb(t,n),i!=null&&(h.sign!==l.sign||h.spana&&(t[1-n]=t[n]+h.sign*a),t}function Tb(e,t){var r=e[t]-e[1-t];return{span:Math.abs(r),sign:r>0?-1:r<0?1:t?-1:1}}function Xu(e,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,e))}var Cb=R,qG=Math.min,KG=Math.max,TR=Math.floor,Kle=Math.ceil,CR=Ht,Qle=Math.PI,Jle=function(){function e(t,r,n){this.type="parallel",this._axesMap=de(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=t.dimensions,a=t.parallelAxisIndex;Cb(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new qle(o,ep(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},e.prototype.update=function(t,r){this._updateAxesFromSeries(this._model,t)},e.prototype.containPoint=function(t){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=t[1-a],s=t[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(t,r){r.eachSeries(function(n){if(t.contains(n,r)){var i=n.getData();Cb(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),ru(o.scale,o.model)},this)}},this)},e.prototype.resize=function(t,r){var n=sr(t,r).refContainer;this._rect=St(t.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var t=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=Gg(t.get("axisExpandWidth"),l),h=Gg(t.get("axisExpandCount")||0,[0,u]),f=t.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,d=t.get("axisExpandWindow"),p;if(d)p=Gg(d[1]-d[0],l),d[1]=d[0]+p;else{p=Gg(c*(h-1),l);var g=t.get("axisExpandCenter")||TR(u/2);d=[c*g-p/2],d[1]=d[0]+p}var m=(s-p)/(u-h);m<3&&(m=0);var y=[TR(CR(d[0]/c,1))+1,Kle(CR(d[1]/c,1))-1],_=m/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:f,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:d,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:_}},e.prototype._layoutAxes=function(){var t=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Cb(n,function(o,s){var l=(i.axisExpandable?tue:eue)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Qle/2,vertical:0},h=[u[a].x+t.x,u[a].y+t.y],f=c[a],d=fr();xo(d,d,f),Ri(d,d,h),this._axesLayout[o]={position:h,rotation:f,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(t){return this._axesMap.get(t)},e.prototype.dataToPoint=function(t,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(t),r)},e.prototype.eachActiveState=function(t,r,n,i){n==null&&(n=0),i==null&&(i=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];R(o,function(m){s.push(t.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;ca*(1-h[0])?(u="jump",l=s-a*(1-h[2])):(l=s-a*h[1])>=0&&(l=s-a*(1-h[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?bs(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[KG(0,p-d/2)],i[1]=qG(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},e}();function Gg(e,t){return qG(KG(e,t[0]),t[1])}function eue(e,t){var r=t.layoutLength/(t.axisCount-1);return{position:r*e,axisNameAvailableWidth:r,axisLabelShow:!0}}function tue(e,t){var r=t.layoutLength,n=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,c;return e=0;i--)Pn(n[i])},t.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;aoue}function nH(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function iH(e,t,r,n){var i=new _e;return i.add(new Be({name:"main",style:TA(r),silent:!0,draggable:!0,cursor:"move",drift:Ie(LR,e,t,i,["n","s","w","e"]),ondragend:Ie(iu,t,{isEnd:!0})})),R(n,function(a){i.add(new Be({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(LR,e,t,i,a),ondragend:Ie(iu,t,{isEnd:!0})}))}),i}function aH(e,t,r,n){var i=n.brushStyle.lineWidth||0,a=hh(i,sue),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],h=r[1][1],f=c-a+i/2,d=h-a+i/2,p=c-o,g=h-s,m=p+i,y=g+i;ja(e,t,"main",o,s,p,g),n.transformable&&(ja(e,t,"w",l,u,a,y),ja(e,t,"e",f,u,a,y),ja(e,t,"n",l,u,m,a),ja(e,t,"s",l,d,m,a),ja(e,t,"nw",l,u,a,a),ja(e,t,"ne",f,u,a,a),ja(e,t,"sw",l,d,a,a),ja(e,t,"se",f,d,a,a))}function GT(e,t){var r=t.__brushOption,n=r.transformable,i=t.childAt(0);i.useStyle(TA(r)),i.attr({silent:!n,cursor:n?"move":"default"}),R([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?HT(e,a[0]):due(e,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?uue[s]+"-resize":null})})}function ja(e,t,r,n,i,a,o){var s=t.childOfName(r);s&&s.setShape(pue(CA(e,t,[[n,i],[n+a,i+o]])))}function TA(e){return be({strokeNoScale:!0},e.brushStyle)}function oH(e,t,r,n){var i=[Mv(e,r),Mv(t,n)],a=[hh(e,r),hh(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function fue(e){return hs(e.group)}function HT(e,t){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=o_(r[t],fue(e));return n[i]}function due(e,t){var r=[HT(e,t[0]),HT(e,t[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function LR(e,t,r,n,i,a){var o=r.__brushOption,s=e.toRectRange(o.range),l=sH(t,i,a);R(n,function(u){var c=lue[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=e.fromRectRange(oH(s[0][0],s[1][0],s[0][1],s[1][1])),bA(t,r),iu(t,{isEnd:!1})}function vue(e,t,r,n){var i=t.__brushOption.range,a=sH(e,r,n);R(i,function(o){o[0]+=a[0],o[1]+=a[1]}),bA(e,t),iu(e,{isEnd:!1})}function sH(e,t,r){var n=e.group,i=n.transformCoordToLocal(t,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function CA(e,t,r){var n=rH(e,t);return n&&n!==nu?n.clipPath(r,e._transform):ye(r)}function pue(e){var t=Mv(e[0][0],e[1][0]),r=Mv(e[0][1],e[1][1]),n=hh(e[0][0],e[1][0]),i=hh(e[0][1],e[1][1]);return{x:t,y:r,width:n-t,height:i-r}}function gue(e,t,r){if(!(!e._brushType||yue(e,t.offsetX,t.offsetY))){var n=e._zr,i=e._covers,a=wA(e,t,r);if(!e._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var T_={lineX:DR(0),lineY:DR(1),rect:{createCover:function(e,t){function r(n){return n}return iH({toRectRange:r,fromRectRange:r},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=nH(e);return oH(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,r,n){aH(e,t,r,n)},updateCommon:GT,contain:UT},polygon:{createCover:function(e,t){var r=new _e;return r.add(new Tr({name:"main",style:TA(t),silent:!0})),r},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Or({name:"main",draggable:!0,drift:Ie(vue,e,t),ondragend:Ie(iu,e,{isEnd:!0})}))},updateCoverShape:function(e,t,r,n){t.childAt(0).setShape({points:CA(e,t,r)})},updateCommon:GT,contain:UT}};function DR(e){return{createCover:function(t,r){return iH({toRectRange:function(n){var i=[n,[0,100]];return e&&i.reverse(),i},fromRectRange:function(n){return n[e]}},t,r,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var r=nH(t),n=Mv(r[0][e],r[1][e]),i=hh(r[0][e],r[1][e]);return[n,i]},updateCoverShape:function(t,r,n,i){var a,o=rH(t,r);if(o!==nu&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[n,a];e&&l.reverse(),aH(t,r,l,i)},updateCommon:GT,contain:UT}}function uH(e){return e=MA(e),function(t){return tM(t,e)}}function cH(e,t){return e=MA(e),function(r){var n=t??r,i=n?e.width:e.height,a=n?e.x:e.y;return[a,a+(i||0)]}}function hH(e,t,r){var n=MA(e);return function(i,a){return n.contain(a[0],a[1])&&!gG(i,t,r)}}function MA(e){return Ce.create(e)}var _ue=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){e.prototype.init.apply(this,arguments),(this._brushController=new xA(n.getZr())).on("brush",le(this._onBrush,this))},t.prototype.render=function(r,n,i,a){if(!xue(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),!!r.get("show")){var s=Sue(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,h=r.axis.dim,f=l.getAxisLayout(h),d=J({strokeContainThreshold:c},f),p=new rn(r,i,d);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(d,u,r,s,c,i),qv(o,this._axisGroup,r)}}},t.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),h=Ce.create({x:l[0],y:-o/2,width:u,height:o});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:uH(h),isTargetByCursor:hH(h,s,a),getLinearBrushOtherExtent:cH(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(bue(i))},t.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=re(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(gt);function xue(e,t,r){return r&&r.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:r})[0]===e}function bue(e){var t=e.axis;return re(e.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(r[0],!0),t.dataToCoord(r[1],!0)]}})}function Sue(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var wue={type:"axisAreaSelect",event:"axisAreaSelected"};function Tue(e){e.registerAction(wue,function(t,r){r.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),e.registerAction("parallelAxisExpand",function(t,r){r.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var Cue={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function fH(e){e.registerComponentView($le),e.registerComponentModel(Xle),e.registerCoordinateSystem("parallel",nue),e.registerPreprocessor(Hle),e.registerComponentModel(VT),e.registerComponentView(_ue),uh(e,"parallel",VT,Cue),Tue(e)}function Mue(e){ze(fH),e.registerChartView(Rle),e.registerSeriesModel(Ble),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,Gle)}var Aue=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),Lue=function(e){Y(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Aue},t.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},t.prototype.highlight=function(){fo(this)},t.prototype.downplay=function(){vo(this)},t}(Ue),kue=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new _e,r._focusAdjacencyDisabled=!1,r}return t.prototype.init=function(r,n){this._controller=new gu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,h=r.getData(),f=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),mG(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var g=new Lue,m=Le(g);m.dataIndex=p.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=p.getModel(),_=y.getModel("lineStyle"),b=_.get("curveness"),w=p.node1.getLayout(),C=p.node1.getModel(),M=C.get("localX"),A=C.get("localY"),k=p.node2.getLayout(),N=p.node2.getModel(),D=N.get("localX"),I=N.get("localY"),z=p.getLayout(),O,V,G,F,Z,B,W,H;g.shape.extent=Math.max(1,z.dy),g.shape.orient=d,d==="vertical"?(O=(M!=null?M*u:w.x)+z.sy,V=(A!=null?A*c:w.y)+w.dy,G=(D!=null?D*u:k.x)+z.ty,F=I!=null?I*c:k.y,Z=O,B=V*(1-b)+F*b,W=G,H=V*b+F*(1-b)):(O=(M!=null?M*u:w.x)+w.dx,V=(A!=null?A*c:w.y)+z.sy,G=D!=null?D*u:k.x,F=(I!=null?I*c:k.y)+z.ty,Z=O*(1-b)+G*b,B=V,W=O*b+G*(1-b),H=F),g.setShape({x1:O,y1:V,x2:G,y2:F,cpx1:Z,cpy1:B,cpx2:W,cpy2:H}),g.useStyle(_.getItemStyle()),IR(g.style,d,p);var X=""+y.get("value"),K=ar(y,"edgeLabel");vr(g,K,{labelFetcher:{getFormattedLabel:function(ue,ve,Ge,xe,ge,Pe){return r.getFormattedLabel(ue,ve,"edge",xe,xn(ge,K.normal&&K.normal.get("formatter"),X),Pe)}},labelDataIndex:p.dataIndex,defaultText:X}),g.setTextConfig({position:"inside"});var ne=y.getModel("emphasis");ir(g,y,"lineStyle",function(ue){var ve=ue.getItemStyle();return IR(ve,d,p),ve}),s.add(g),f.setItemGraphicEl(p.dataIndex,g);var ie=ne.get("focus");wt(g,ie==="adjacency"?p.getAdjacentDataIndices():ie==="trajectory"?p.getTrajectoryDataIndices():ie,ne.get("blurScope"),ne.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),m=p.getModel(),y=m.get("localX"),_=m.get("localY"),b=m.getModel("emphasis"),w=m.get(["itemStyle","borderRadius"])||0,C=new Be({shape:{x:y!=null?y*u:g.x,y:_!=null?_*c:g.y,width:g.dx,height:g.dy,r:w},style:m.getModel("itemStyle").getItemStyle(),z2:10});vr(C,ar(m),{labelFetcher:{getFormattedLabel:function(A,k){return r.getFormattedLabel(A,k,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),C.disableLabelAnimation=!0,C.setStyle("fill",p.getVisual("color")),C.setStyle("decal",p.getVisual("style").decal),ir(C,m),s.add(C),h.setItemGraphicEl(p.dataIndex,C),Le(C).dataType="node";var M=b.get("focus");wt(C,M==="adjacency"?p.getAdjacentDataIndices():M==="trajectory"?p.getTrajectoryDataIndices():M,b.get("blurScope"),b.get("disabled"))}),h.eachItemGraphicEl(function(p,g){var m=h.getItemModel(g);m.get("draggable")&&(p.drift=function(y,_){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=_,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:h.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(Pue(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new mu(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t}(st);function IR(e,t,r){switch(e.fill){case"source":e.fill=r.node1.getVisual("color"),e.decal=r.node1.getVisual("style").decal;break;case"target":e.fill=r.node2.getVisual("color"),e.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");se(n)&&se(i)&&(e.fill=new cu(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function Pue(e,t,r){var n=new Be({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return bt(n,{shape:{width:e.width+20}},t,r),n}var Due=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new We(o[l],this,n));var u=_A(a,i,this,!0,c);return u.data;function c(h,f){h.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,m=g.getData().getItemLayout(p);if(m){var y=m.depth,_=g.levelModels[y];_&&(d.parentModel=_)}return d}),f.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,m=g.getGraph().getEdgeByIndex(p),y=m.node1.getLayout();if(y){var _=y.depth,b=g.levelModels[_];b&&(d.parentModel=b)}return d})}},t.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Kt("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),h=c.getLayout().value,f=this.getDataParams(r,i).data.name;return Kt("nameValue",{name:f!=null?f+"":null,value:h,noValue:a(h)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},t.type="series.sankey",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:q.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:q.color.primary}},animationEasing:"linear",animationDuration:1e3},t}(ht);function Iue(e,t){e.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=sr(r,t).refContainer,o=St(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,h=u.edges;Eue(c);var f=et(c,function(m){return m.getLayout().value===0}),d=f.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),g=r.get("nodeAlign");Nue(c,h,n,i,s,l,d,p,g)})}function Nue(e,t,r,n,i,a,o,s,l){Rue(e,t,r,i,a,s,l),jue(e,t,a,i,n,o,s),Yue(e,s)}function Eue(e){R(e,function(t){var r=vs(t.outEdges,o0),n=vs(t.inEdges,o0),i=t.getValue()||0,a=Math.max(r,n,i);t.setLayout({value:a},!0)})}function Rue(e,t,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],h=0,f=0;f=0;y&&m.depth>d&&(d=m.depth),g.setLayout({depth:y?m.depth:h},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var _=0;_h-1?d:h-1;o&&o!=="left"&&Oue(e,o,a,A);var k=a==="vertical"?(i-r)/A:(n-r)/A;Bue(e,k,a)}function dH(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function Oue(e,t,r,n){if(t==="right"){for(var i=[],a=e,o=0;a.length;){for(var s=0;s0;a--)l*=.99,Gue(s,l,o),Mb(s,i,r,n,o),$ue(s,l,o),Mb(s,i,r,n,o)}function Vue(e,t){var r=[],n=t==="vertical"?"y":"x",i=Pw(e,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),R(i.keys,function(a){r.push(i.buckets.get(a))}),r}function Fue(e,t,r,n,i,a){var o=1/0;R(e,function(s){var l=s.length,u=0;R(s,function(h){u+=h.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[f]+t;var p=i==="vertical"?n:r;if(u=c-t-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=h-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[f]+t-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function Gue(e,t,r){R(e.slice().reverse(),function(n){R(n,function(i){if(i.outEdges.length){var a=vs(i.outEdges,Hue,r)/vs(i.outEdges,o0);if(isNaN(a)){var o=i.outEdges.length;a=o?vs(i.outEdges,Wue,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-Ss(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ss(i,r))*t;i.setLayout({y:l},!0)}}})})}function Hue(e,t){return Ss(e.node2,t)*e.getValue()}function Wue(e,t){return Ss(e.node2,t)}function Uue(e,t){return Ss(e.node1,t)*e.getValue()}function Zue(e,t){return Ss(e.node1,t)}function Ss(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function o0(e){return e.getValue()}function vs(e,t,r){for(var n=0,i=e.length,a=-1;++ao&&(o=l)}),R(n,function(s){var l=new dr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&R(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function que(e){e.registerChartView(kue),e.registerSeriesModel(Due),e.registerLayout(Iue),e.registerVisual(Xue),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),e.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(i){var a=i.coordinateSystem,o=x_(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var vH=function(){function e(){}return e.prototype._hasEncodeRule=function(t){var r=this.getEncode();return r&&r.get(t)!=null},e.prototype.getInitialData=function(t,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],c=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[c],f=u[1-c],d=[i,a],p=d[c].get("type"),g=d[1-c].get("type"),m=t.data;if(m&&l){var y=[];R(m,function(w,C){var M;ee(w)?(M=w.slice(),w.unshift(C)):ee(w.value)?(M=J({},w),M.value=M.value.slice(),w.value.unshift(C)):M=w,y.push(M)}),t.data=y}var _=this.defaultValueDimensions,b=[{name:h,type:Hy(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:Hy(g),dimsDef:_.slice()}];return zh(this,{coordDimensions:b,dimensionsCount:_.length+1,encodeDefaulter:Ie(TV,b,this)})},e.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},e}(),pH=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:q.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:q.color.shadow}},animationDuration:800},t}(ht);Bt(pH,vH,!0);var Kue=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),h=NR(c,a,u,l,!0);a.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,c){var h=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(h);return}var f=a.getItemLayout(u);h?(hi(h),gH(f,h,a,u)):h=NR(f,a,u,l),o.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},t.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},t.type="boxplot",t}(st),Que=function(){function e(){}return e}(),Jue=function(e){Y(t,e);function t(r){var n=e.call(this,r)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new Que},t.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();ag){var w=[y,b];n.push(w)}}}return{boxData:r,outliers:n}}var oce={type:"echarts:boxplot",transform:function(t){var r=t.upstream;if(r.sourceFormat!==Cr){var n="";it(n)}var i=ace(r.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function sce(e){e.registerSeriesModel(pH),e.registerChartView(Kue),e.registerLayout(tce),e.registerTransform(oce)}var lce=["itemStyle","borderColor"],uce=["itemStyle","borderColor0"],cce=["itemStyle","borderColorDoji"],hce=["itemStyle","color"],fce=["itemStyle","color0"];function AA(e,t){return t.get(e>0?hce:fce)}function LA(e,t){return t.get(e===0?cce:e>0?lce:uce)}var dce={seriesType:"candlestick",plan:Ph(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e)){var r=e.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=AA(s,o),l.stroke=LA(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");J(u,l)}}}}}},vce=["color","borderColor"],pce=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},t.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},t.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},t.prototype.eachRendered=function(r){ks(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var h=n.getItemLayout(c);if(s&&ER(u,h))return;var f=Ab(h,c,!0);bt(f,{shape:{points:h.ends}},r,c),Lb(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}}).update(function(c,h){var f=i.getItemGraphicEl(h);if(!n.hasValue(c)){a.remove(f);return}var d=n.getItemLayout(c);if(s&&ER(u,d)){a.remove(f);return}f?(Qe(f,{shape:{points:d.ends}},r,c),hi(f)):f=Ab(d),Lb(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&a.remove(h)}).execute(),this._data=n},t.prototype._renderLarge=function(r){this._clear(),RR(r,this.group);var n=r.get("clip",!0)?np(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=Ab(s);Lb(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(r,n){RR(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(r){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(st),gce=function(){function e(){}return e}(),mce=function(e){Y(t,e);function t(r){var n=e.call(this,r)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new gce},t.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},t}(Ue);function Ab(e,t,r){var n=e.ends;return new mce({shape:{points:r?yce(n,e):n},z2:100})}function ER(e,t){for(var r=!0,n=0;nC?I[a]:D[a],ends:V,brushRect:W(M,A,b)})}function Z(X,K){var ne=[];return ne[i]=K,ne[a]=X,isNaN(K)||isNaN(X)?[NaN,NaN]:t.dataToPoint(ne)}function B(X,K,ne){var ie=K.slice(),ue=K.slice();ie[i]=Cm(ie[i]+n/2,1,!1),ue[i]=Cm(ue[i]-n/2,1,!0),ne?X.push(ie,ue):X.push(ue,ie)}function W(X,K,ne){var ie=Z(X,ne),ue=Z(K,ne);return ie[i]-=n/2,ue[i]-=n/2,{x:ie[0],y:ie[1],width:n,height:ue[1]-ie[1]}}function H(X){return X[i]=Cm(X[i],1),X}}function p(g,m){for(var y=ca(g.count*4),_=0,b,w=[],C=[],M,A=m.getStore(),k=!!e.get(["itemStyle","borderColorDoji"]);(M=g.next())!=null;){var N=A.get(s,M),D=A.get(u,M),I=A.get(c,M),z=A.get(h,M),O=A.get(f,M);if(isNaN(N)||isNaN(z)||isNaN(O)){y[_++]=NaN,_+=3;continue}y[_++]=OR(A,M,D,I,c,k),w[i]=N,w[a]=z,b=t.dataToPoint(w,null,C),y[_++]=b?b[0]:NaN,y[_++]=b?b[1]:NaN,w[a]=O,b=t.dataToPoint(w,null,C),y[_++]=b?b[1]:NaN}m.setLayout("largePoints",y)}}};function OR(e,t,r,n,i,a){var o;return r>n?o=-1:r0?e.get(i,t-1)<=n?1:-1:1,o}function Sce(e,t){var r=e.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=oe(pe(e.get("barMaxWidth"),i),i),o=oe(pe(e.get("barMinWidth"),1),i),s=e.get("barWidth");return s!=null?oe(s,i):Math.max(Math.min(i/2,a),o)}function wce(e){e.registerChartView(pce),e.registerSeriesModel(mH),e.registerPreprocessor(xce),e.registerVisual(dce),e.registerLayout(bce)}function zR(e,t){var r=t.rippleEffectColor||t.color;e.eachChild(function(n){n.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?r:null,fill:t.brushType==="fill"?r:null}})})}var Tce=function(e){Y(t,e);function t(r,n){var i=e.call(this)||this,a=new tp(r,n),o=new _e;return i.add(a),i.add(o),i.updateData(r,n),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;me(h)?f=h(i):f=h,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},t.prototype._getLineLength=function(r){return $a(r.__p1,r.__cp1)+$a(r.__cp1,r.__p2)},t.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},t.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},t.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=br,c=vw;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var h=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),f=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(f,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),h=i[l],f=i[l+1];r.x=h[0]*(1-c)+c*f[0],r.y=h[1]*(1-c)+c*f[1];var d=r.__t<1?f[0]-h[0]:h[0]-f[0],p=r.__t<1?f[1]-h[1]:h[1]-f[1];r.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},t}(yH),kce=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),Pce=function(e){Y(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new kce},t.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var d=(u+h)/2-(c-f)*a,p=(c+f)/2-(h-u)*a;r.quadraticCurveTo(d,p,h,f)}else r.lineTo(h,f)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var h=a[u++],f=a[u++],d=1;d0){var m=(h+p)/2-(f-g)*o,y=(f+g)/2-(p-h)*o;if(_j(h,f,m,y,p,g,s,r,n))return l}else if(Bo(h,f,p,g,s,r,n))return l;l++}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+t.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),xH={seriesType:"lines",plan:Ph(),reset:function(e){var t=e.coordinateSystem;if(t){var r=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var h=r.get("clip",!0)&&np(r.coordinateSystem,!1,r);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},t.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},t.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=xH.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new Dce:new yA(o?a?Lce:_H:a?yH:mA),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(r){return!!r.get(["effect","show"])},t.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.type="lines",t}(st),Nce=typeof Uint32Array>"u"?Array:Uint32Array,Ece=typeof Float64Array>"u"?Array:Float64Array;function BR(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=re(t,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),W0([i,r[0],r[1]])}))}var Rce=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.init=function(r){r.data=r.data||[],BR(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(r){if(BR(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=Kc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=Kc(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},t.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},t.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},t.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(ht);function Hg(e){return e instanceof Array||(e=[e,e]),e}var Oce={seriesType:"lines",reset:function(e){var t=Hg(e.get("symbol")),r=Hg(e.get("symbolSize")),n=e.getData();n.setVisual("fromSymbol",t&&t[0]),n.setVisual("toSymbol",t&&t[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=Hg(s.getShallow("symbol",!0)),u=Hg(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function zce(e){e.registerChartView(Ice),e.registerSeriesModel(Rce),e.registerLayout(xH),e.registerVisual(Oce)}var Bce=256,jce=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=bn.createCanvas();this.canvas=t}return e.prototype.update=function(t,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),d=t.length;h.width=r,h.height=n;for(var p=0;p0){var z=o(b)?l:u;b>0&&(b=b*D+k),C[M++]=z[I],C[M++]=z[I+1],C[M++]=z[I+2],C[M++]=z[I+3]*b*256}else M+=4}return f.putImageData(w,0,0),h},e.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=bn.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=q.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},e.prototype._getGradient=function(t,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},e}();function Vce(e,t,r){var n=e[1]-e[0];t=re(t,function(o){return{interval:[(o.interval[0]-e[0])/n,(o.interval[1]-e[0])/n]}});var i=t.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=t[0]&&n<=t[1]}}function jR(e){var t=e.dimensions;return t[0]==="lng"&&t[1]==="lat"}var Gce=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):jR(o)&&this._renderOnGeo(o,r,a,i)},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(jR(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},t.prototype.eachRendered=function(r){ks(this._progressiveEls||this.group,r)},t.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=xs(s,"cartesian2d"),u=xs(s,"matrix"),c,h,f,d;if(l){var p=s.getAxis("x"),g=s.getAxis("y");c=p.getBandWidth()+.5,h=g.getBandWidth()+.5,f=p.scale.getExtent(),d=g.scale.getExtent()}for(var m=this.group,y=r.getData(),_=r.getModel(["emphasis","itemStyle"]).getItemStyle(),b=r.getModel(["blur","itemStyle"]).getItemStyle(),w=r.getModel(["select","itemStyle"]).getItemStyle(),C=r.get(["itemStyle","borderRadius"]),M=ar(r),A=r.getModel("emphasis"),k=A.get("focus"),N=A.get("blurScope"),D=A.get("disabled"),I=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],z=i;zf[1]||Fd[1])continue;var Z=s.dataToPoint([G,F]);O=new Be({shape:{x:Z[0]-c/2,y:Z[1]-h/2,width:c,height:h},style:V})}else if(u){var B=s.dataToLayout([y.get(I[0],z),y.get(I[1],z)]).rect;if(Dr(B.x))continue;O=new Be({z2:1,shape:B,style:V})}else{if(isNaN(y.get(I[1],z)))continue;var W=s.dataToLayout([y.get(I[0],z)]),B=W.contentRect||W.rect;if(Dr(B.x)||Dr(B.y))continue;O=new Be({z2:1,shape:B,style:V})}if(y.hasItemOption){var H=y.getItemModel(z),X=H.getModel("emphasis");_=X.getModel("itemStyle").getItemStyle(),b=H.getModel(["blur","itemStyle"]).getItemStyle(),w=H.getModel(["select","itemStyle"]).getItemStyle(),C=H.get(["itemStyle","borderRadius"]),k=X.get("focus"),N=X.get("blurScope"),D=X.get("disabled"),M=ar(H)}O.shape.r=C;var K=r.getRawValue(z),ne="-";K&&K[2]!=null&&(ne=K[2]+""),vr(O,M,{labelFetcher:r,labelDataIndex:z,defaultOpacity:V.opacity,defaultText:ne}),O.ensureState("emphasis").style=_,O.ensureState("blur").style=b,O.ensureState("select").style=w,wt(O,k,N,D),O.incremental=o,o&&(O.states.emphasis.hoverLayer=!0),m.add(O),y.setItemGraphicEl(z,O),this._progressiveEls&&this._progressiveEls.push(O)}},t.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new jce;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),h=r.getRoamTransform();c.applyTransform(h);var f=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=p-f,y=g-d,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],b=l.mapArray(_,function(A,k,N){var D=r.dataToPoint([A,k]);return D[0]-=f,D[1]-=d,D.push(N),D}),w=i.getExtent(),C=i.type==="visualMap.continuous"?Fce(w,i.option.range):Vce(w,i.getPieceList(),i.option.selected);u.update(b,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},C);var M=new pr({style:{width:m,height:y,x:f,y:d,image:u.canvas},silent:!0});this.group.add(M)},t.type="heatmap",t}(st),Hce=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return Pa(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var r=kh.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:q.color.primary}}},t}(ht);function Wce(e){e.registerChartView(Gce),e.registerSeriesModel(Hce)}var Uce=["itemStyle","borderWidth"],VR=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Db=new ka,Zce=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),h=l.master.getRect(),f={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:c,valueDim:VR[+c],categoryDim:VR[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=GR(o,p),m=FR(o,p,g,f),y=HR(o,f,m);o.setItemGraphicEl(p,y),a.add(y),UR(y,f,m)}}).update(function(p,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(m);return}var y=GR(o,p),_=FR(o,p,y,f),b=MH(o,_);m&&b!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?Jce(m,f,_):m=HR(o,f,_,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=_,a.add(m),UR(m,f,_)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&WR(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=r.get("clip",!0)?np(r.coordinateSystem,!1,r):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){WR(a,Le(o).dataIndex,r,o)}):i.removeAll()},t.type="pictorialBar",t}(st);function FR(e,t,r,n){var i=e.getItemLayout(t),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,h=r.isAnimationEnabled(),f={dataIndex:t,layout:i,itemModel:r,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?r:null,hoverScale:h&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};$ce(r,a,i,n,f),Yce(e,t,i,a,o,f.boundingLength,f.pxSign,c,n,f),Xce(r,f.symbolScale,u,n,f);var d=f.symbolSize,p=vu(r.get("symbolOffset"),d);return qce(r,d,i,a,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,n,f),f}function $ce(e,t,r,n,i){var a=n.valueDim,o=e.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(ee(o)){var h=[Ib(s,o[0])-l,Ib(s,o[1])-l];h[1]=0?1:-1:c>0?1:-1}function Ib(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function Yce(e,t,r,n,i,a,o,s,l,u){var c=l.valueDim,h=l.categoryDim,f=Math.abs(r[h.wh]),d=e.getItemVisual(t,"symbolSize"),p;ee(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[h.index]=oe(p[h.index],f),p[c.index]=oe(p[c.index],n?f:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function Xce(e,t,r,n,i){var a=e.get(Uce)||0;a&&(Db.attr({scaleX:t[0],scaleY:t[1],rotation:r}),Db.updateTransform(),a/=Db.getLineScale(),a*=t[n.valueDim.index]),i.valueLineWidth=a||0}function qce(e,t,r,n,i,a,o,s,l,u,c,h){var f=c.categoryDim,d=c.valueDim,p=h.pxSign,g=Math.max(t[d.index]+s,0),m=g;if(n){var y=Math.abs(l),_=Sr(e.get("symbolMargin"),"15%")+"",b=!1;_.lastIndexOf("!")===_.length-1&&(b=!0,_=_.slice(0,_.length-1));var w=oe(_,t[d.index]),C=Math.max(g+w*2,0),M=b?0:w*2,A=B2(n),k=A?n:ZR((y+M)/C),N=y-k*g;w=N/2/(b?k:Math.max(k-1,1)),C=g+w*2,M=b?0:w*2,!A&&n!=="fixed"&&(k=u?ZR((Math.abs(u)+M)/C):0),m=k*C-M,h.repeatTimes=k,h.symbolMargin=w}var D=p*(m/2),I=h.pathPosition=[];I[f.index]=r[f.wh]/2,I[d.index]=o==="start"?D:o==="end"?l-D:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var z=h.bundlePosition=[];z[f.index]=r[f.xy],z[d.index]=r[d.xy];var O=h.barRectShape=J({},r);O[d.wh]=p*Math.max(Math.abs(r[d.wh]),Math.abs(I[d.index]+D)),O[f.wh]=r[f.wh];var V=h.clipShape={};V[f.xy]=-r[f.xy],V[f.wh]=c.ecSize[f.wh],V[d.xy]=0,V[d.wh]=r[d.wh]}function bH(e){var t=e.symbolPatternSize,r=Ut(e.symbolType,-t/2,-t/2,t,t);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function SH(e,t,r,n){var i=e.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=t.valueDim,u=r.repeatTimes||0,c=0,h=a[t.valueDim.index]+o+r.symbolMargin*2;for(kA(e,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:y<0)&&(_=u-1-g),m[l.index]=h*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function wH(e,t,r,n){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?jc(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=e.__pictorialMainPath=bH(r),i.add(a),jc(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function TH(e,t,r){var n=J({},t.barRectShape),i=e.__pictorialBarRect;i?jc(i,null,{shape:n},t,r):(i=e.__pictorialBarRect=new Be({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function CH(e,t,r,n){if(r.symbolClip){var i=e.__pictorialClipPath,a=J({},r.clipShape),o=t.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Qe(i,{shape:a},s,l);else{a[o.wh]=0,i=new Be({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],hu[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function GR(e,t){var r=e.getItemModel(t);return r.getAnimationDelayParams=Kce,r.isAnimationEnabled=Qce,r}function Kce(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function Qce(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function HR(e,t,r,n){var i=new _e,a=new _e;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?SH(i,t,r):wH(i,t,r),TH(i,r,n),CH(i,t,r,n),i.__pictorialShapeStr=MH(e,r),i.__pictorialSymbolMeta=r,i}function Jce(e,t,r){var n=r.animationModel,i=r.dataIndex,a=e.__pictorialBundle;Qe(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?SH(e,t,r,!0):wH(e,t,r,!0),TH(e,r,!0),CH(e,t,r,!0)}function WR(e,t,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];kA(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),R(a,function(o){_s(o,{scaleX:0,scaleY:0},r,t,function(){n.parent&&n.parent.remove(n)})}),e.setItemGraphicEl(t,null)}function MH(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function kA(e,t,r){R(e.__pictorialBundle.children(),function(n){n!==e.__pictorialBarRect&&t.call(r,n)})}function jc(e,t,r,n,i,a){t&&e.attr(t),n.symbolClip&&!i?r&&e.attr(r):r&&hu[i?"updateProps":"initProps"](e,r,n.animationModel,n.dataIndex,a)}function UR(e,t,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),h=a.get("blurScope"),f=a.get("scale");kA(e,function(g){if(g instanceof pr){var m=g.style;g.useStyle(J({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,f&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var d=t.valueDim.posDesc[+(r.boundingLength>0)],p=e.__pictorialBarRect;p.ignoreClip=!0,vr(p,ar(i),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:lh(t.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),wt(e,c,h,a.get("disabled"))}function ZR(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var ehe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return t.prototype.getInitialData=function(r){return r.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Ps(xv.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:q.color.primary}}}),t}(xv);function the(e){e.registerChartView(Zce),e.registerSeriesModel(ehe),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Ie(ZF,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$F("pictorialBar"))}var rhe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._layers=[],r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,h=u.boundaryGap;s.x=0,s.y=c.y+h[0];function f(m){return m.name}var d=new po(this._layersSeries||[],l,f,f),p=[];d.add(le(g,this,"add")).update(le(g,this,"update")).remove(le(g,this,"remove")).execute();function g(m,y,_){var b=o._layers;if(m==="remove"){s.remove(b[y]);return}for(var w=[],C=[],M,A=l[y].indices,k=0;ka&&(a=s),n.push(s)}for(var u=0;ua&&(a=h)}return{y0:i,max:a}}function she(e){e.registerChartView(rhe),e.registerSeriesModel(ihe),e.registerLayout(ahe),e.registerProcessor(Oh("themeRiver"))}var lhe=2,uhe=4,YR=function(e){Y(t,e);function t(r,n,i,a){var o=e.call(this)||this;o.z2=lhe,o.textConfig={inside:!0},Le(o).seriesIndex=n.seriesIndex;var s=new Xe({z2:uhe,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return t.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Le(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),h=J({},c);h.label=null;var f=n.getVisual("style");f.lineJoin="bevel";var d=n.getVisual("decal");d&&(f.decal=ah(d,o));var p=fa(l.getModel("itemStyle"),h,!0);J(h,p),R(an,function(_){var b=s.ensureState(_),w=l.getModel([_,"itemStyle"]);b.style=w.getItemStyle();var C=fa(w,h);C&&(b.shape=C)}),r?(s.setShape(h),s.shape.r=c.r0,bt(s,{shape:{r:c.r}},i,n.dataIndex)):(Qe(s,{shape:h},i),hi(s)),s.useStyle(f),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="relative"?Kc(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;wt(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),h=this,f=h.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)V&&!eh(F-V)&&F0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new YR(_,r,n,i),c.add(o.virtualPiece)),b.piece.off("click"),o.virtualPiece.on("click",function(w){o._rootToNode(b.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Ny(u,c)}}i=!0}})})},t.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ZT,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(st),dhe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};AH(i);var a=this._levelModels=re(r.levels||[],function(l){return new We(l,this,n)},this),o=hA.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var h=o.getNodeByDataIndex(c),f=a[h.depth];return f&&(u.parentModel=f),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=S_(i,this),n},t.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){DG(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(ht);function AH(e){var t=0;R(e.children,function(n){AH(n);var i=n.value;ee(i)&&(i=i[0]),t+=i});var r=e.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),ee(e.value)?e.value[0]=r:e.value=r}var qR=Math.PI/180;function vhe(e,t,r){t.eachSeriesByType(e,function(n){var i=n.get("center"),a=n.get("radius");ee(a)||(a=[0,a]),ee(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=oe(i[0],o),c=oe(i[1],s),h=oe(a[0],l/2),f=oe(a[1],l/2),d=-n.get("startAngle")*qR,p=n.get("minAngle")*qR,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,_=n.get("sort");_!=null&&LH(m,_);var b=0;R(m.children,function(F){!isNaN(F.getValue())&&b++});var w=m.getValue(),C=Math.PI/(w||b)*2,M=m.depth>0,A=m.height-(M?-1:1),k=(f-h)/(A||1),N=n.get("clockwise"),D=n.get("stillShowZeroSum"),I=N?1:-1,z=function(F,Z){if(F){var B=Z;if(F!==g){var W=F.getValue(),H=w===0&&D?C:W*C;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&se(s)&&(s=_y(s,(n.depth-1)/(a-1)*.5)),s}e.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");J(u,l)})})}function mhe(e){e.registerChartView(fhe),e.registerSeriesModel(dhe),e.registerLayout(Ie(vhe,"sunburst")),e.registerProcessor(Ie(Oh,"sunburst")),e.registerVisual(ghe),hhe(e)}var KR={color:"fill",borderColor:"stroke"},yhe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ro=Fe(),_he=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(r,n){return Pa(null,this)},t.prototype.getDataParams=function(r,n,i){var a=e.prototype.getDataParams.call(this,r,n);return i&&(a.info=ro(i).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(ht);function xhe(e,t){return t=t||[0,0],re(["x","y"],function(r,n){var i=this.getAxis(r),a=t[n],o=e[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function bhe(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:le(xhe,e)}}}function She(e,t){return t=t||[0,0],re([0,1],function(r){var n=t[r],i=e[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=t[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function whe(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(r){return e.dataToPoint(r)},size:le(She,e)}}}function The(e,t){var r=this.getAxis(),n=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function Che(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:le(The,e)}}}function Mhe(e,t){return t=t||[0,0],re(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=t[n],s=e[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function Ahe(e){var t=e.getRadiusAxis(),r=e.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=t.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=e.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:le(Mhe,e)}}}function Lhe(e){var t=e.getRect(),r=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return e.dataToPoint(n,i)},layout:function(n,i){return e.dataToLayout(n,i)}}}}function khe(e){var t=e.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r,n){return e.dataToPoint(r,n)},layout:function(r,n){return e.dataToLayout(r,n)}}}}function kH(e,t,r,n){return e&&(e.legacy||e.legacy!==!1&&!r&&!n&&t!=="tspan"&&(t==="text"||he(e,"text")))}function PH(e,t,r){var n=e,i,a,o;if(t==="text")o=n;else{o={},he(n,"text")&&(o.text=n.text),he(n,"rich")&&(o.rich=n.rich),he(n,"textFill")&&(o.fill=n.textFill),he(n,"textStroke")&&(o.stroke=n.textStroke),he(n,"fontFamily")&&(o.fontFamily=n.fontFamily),he(n,"fontSize")&&(o.fontSize=n.fontSize),he(n,"fontStyle")&&(o.fontStyle=n.fontStyle),he(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=he(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),he(n,"textPosition")&&(i.position=n.textPosition),he(n,"textOffset")&&(i.offset=n.textOffset),he(n,"textRotation")&&(i.rotation=n.textRotation),he(n,"textDistance")&&(i.distance=n.textDistance)}return QR(o,e),R(o.rich,function(l){QR(l,l)}),{textConfig:i,textContent:a}}function QR(e,t){t&&(t.font=t.textFont||t.font,he(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),he(t,"textAlign")&&(e.align=t.textAlign),he(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),he(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),he(t,"textWidth")&&(e.width=t.textWidth),he(t,"textHeight")&&(e.height=t.textHeight),he(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),he(t,"textPadding")&&(e.padding=t.textPadding),he(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),he(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),he(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),he(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),he(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),he(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),he(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function JR(e,t,r){var n=e;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=e.fill||q.color.neutral99;eO(n,t);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||q.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=e.fill||r.outsideFill||q.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=t.text,n.rich=t.rich,R(t.rich,function(s){eO(s,s)}),n}function eO(e,t){t&&(he(t,"fill")&&(e.textFill=t.fill),he(t,"stroke")&&(e.textStroke=t.fill),he(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),he(t,"font")&&(e.font=t.font),he(t,"fontStyle")&&(e.fontStyle=t.fontStyle),he(t,"fontWeight")&&(e.fontWeight=t.fontWeight),he(t,"fontSize")&&(e.fontSize=t.fontSize),he(t,"fontFamily")&&(e.fontFamily=t.fontFamily),he(t,"align")&&(e.textAlign=t.align),he(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),he(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),he(t,"width")&&(e.textWidth=t.width),he(t,"height")&&(e.textHeight=t.height),he(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),he(t,"padding")&&(e.textPadding=t.padding),he(t,"borderColor")&&(e.textBorderColor=t.borderColor),he(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),he(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),he(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),he(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),he(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),he(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),he(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),he(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),he(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),he(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var DH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},tO=$e(DH);li(ba,function(e,t){return e[t]=1,e},{});ba.join(", ");var s0=["","style","shape","extra"],fh=Fe();function PA(e,t,r,n,i){var a=e+"Animation",o=Th(e,n,i)||{},s=fh(t).userDuring;return o.duration>0&&(o.during=s?le(Ehe,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),J(o,r[a]),o}function Nm(e,t,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=fh(e),u=t.style;l.userDuring=t.during;var c={},h={};if(Ohe(e,t,h),e.type==="compound")for(var f=e.shape.paths,d=t.shape.paths,p=0;p0&&e.animateFrom(m,y)}else Dhe(e,t,i||0,r,c);IH(e,t),u?e.dirty():e.markRedraw()}function IH(e,t){for(var r=fh(e).leaveToProps,n=0;n0&&e.animateFrom(i,a)}}function Ihe(e,t){he(t,"silent")&&(e.silent=t.silent),he(t,"ignore")&&(e.ignore=t.ignore),e instanceof ci&&he(t,"invisible")&&(e.invisible=t.invisible),e instanceof Ue&&he(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var ea={},Nhe={setTransform:function(e,t){return ea.el[e]=t,this},getTransform:function(e){return ea.el[e]},setShape:function(e,t){var r=ea.el,n=r.shape||(r.shape={});return n[e]=t,r.dirtyShape&&r.dirtyShape(),this},getShape:function(e){var t=ea.el.shape;if(t)return t[e]},setStyle:function(e,t){var r=ea.el,n=r.style;return n&&(n[e]=t,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(e){var t=ea.el.style;if(t)return t[e]},setExtra:function(e,t){var r=ea.el.extra||(ea.el.extra={});return r[e]=t,this},getExtra:function(e){var t=ea.el.extra;if(t)return t[e]}};function Ehe(){var e=this,t=e.el;if(t){var r=fh(t).userDuring,n=e.userDuring;if(r!==n){e.el=e.userDuring=null;return}ea.el=t,n(Nhe)}}function rO(e,t,r,n){var i=r[e];if(i){var a=t[e],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[e]={}),Fl(l))J(o,a);else for(var u=pt(l),c=0;c=0){!o&&(o=n[e]={});for(var d=$e(a),c=0;c=0)){var f=e.getAnimationStyleProps(),d=f?f.style:null;if(d){!a&&(a=n.style={});for(var p=$e(r),u=0;u=0?t.getStore().get(B,F):void 0}var W=t.get(Z.name,F),H=Z&&Z.ordinalMeta;return H?H.categories[W]:W}function A(G,F){F==null&&(F=c);var Z=t.getItemVisual(F,"style"),B=Z&&Z.fill,W=Z&&Z.opacity,H=b(F,qo).getItemStyle();B!=null&&(H.fill=B),W!=null&&(H.opacity=W);var X={inheritColor:se(B)?B:q.color.neutral99},K=w(F,qo),ne=vt(K,null,X,!1,!0);ne.text=K.getShallow("show")?pe(e.getFormattedLabel(F,qo),lh(t,F)):null;var ie=Py(K,X,!1);return D(G,H),H=JR(H,ne,ie),G&&N(H,G),H.legacy=!0,H}function k(G,F){F==null&&(F=c);var Z=b(F,no).getItemStyle(),B=w(F,no),W=vt(B,null,null,!0,!0);W.text=B.getShallow("show")?xn(e.getFormattedLabel(F,no),e.getFormattedLabel(F,qo),lh(t,F)):null;var H=Py(B,null,!0);return D(G,Z),Z=JR(Z,W,H),G&&N(Z,G),Z.legacy=!0,Z}function N(G,F){for(var Z in F)he(F,Z)&&(G[Z]=F[Z])}function D(G,F){G&&(G.textFill&&(F.textFill=G.textFill),G.textPosition&&(F.textPosition=G.textPosition))}function I(G,F){if(F==null&&(F=c),he(KR,G)){var Z=t.getItemVisual(F,"style");return Z?Z[KR[G]]:null}if(he(yhe,G))return t.getItemVisual(F,G)}function z(G){if(o.type==="cartesian2d"){var F=o.getBaseAxis();return Gte(be({axis:F},G))}}function O(){return r.getCurrentSeriesIndices()}function V(G){return iM(G,r)}}function $he(e){var t={};return R(e.dimensions,function(r){var n=e.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=t[i]=t[i]||[];a[n.coordDimIndex]=e.getDimensionIndex(r)}}),t}function zb(e,t,r,n,i,a,o){if(!n){a.remove(t);return}var s=RA(e,t,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&wt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function RA(e,t,r,n,i,a){var o=-1,s=t;t&&OH(t,n,i)&&(o=Ne(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=NA(n),s&&Hhe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Un.normal.cfg=Un.normal.conOpt=Un.emphasis.cfg=Un.emphasis.conOpt=Un.blur.cfg=Un.blur.conOpt=Un.select.cfg=Un.select.conOpt=null,Un.isLegacy=!1,Xhe(u,r,n,i,l,Un),Yhe(u,r,n,i,l),EA(e,u,r,n,Un,i,l),he(n,"info")&&(ro(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function OH(e,t,r){var n=ro(e),i=t.type,a=t.shape,o=t.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&efe(a)&&zH(a)!==n.customPathData||i==="image"&&he(o,"image")&&o.image!==n.customImagePath}function Yhe(e,t,r,n,i){var a=r.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&OH(o,a,n)&&(o=null),o||(o=NA(a),e.setClipPath(o)),EA(null,o,t,a,null,n,i)}}function Xhe(e,t,r,n,i,a){if(!(e.isGroup||e.type==="compoundPath")){iO(r,null,a),iO(r,no,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=e.getTextContent();if(o===!1)c&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=NA(o),e.setTextContent(c)),EA(null,c,t,o,null,n,i);for(var h=o&&o.style,f=0;f=c;d--){var p=t.childAt(d);Khe(t,p,i)}}}function Khe(e,t,r){t&&C_(t,ro(e).option,r)}function Qhe(e){new po(e.oldChildren,e.newChildren,aO,aO,e).add(oO).update(oO).remove(Jhe).execute()}function aO(e,t){var r=e&&e.name;return r??Fhe+t}function oO(e,t){var r=this.context,n=e!=null?r.newChildren[e]:null,i=t!=null?r.oldChildren[t]:null;RA(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function Jhe(e){var t=this.context,r=t.oldChildren[e];r&&C_(r,ro(r).option,t.seriesModel)}function zH(e){return e&&(e.pathData||e.d)}function efe(e){return e&&(he(e,"pathData")||he(e,"d"))}function tfe(e){e.registerChartView(Whe),e.registerSeriesModel(_he)}var bl=Fe(),sO=ye,Bb=le,zA=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(t,r);if(!s)s=this._group=new _e,this.createPointerEl(s,u,t,r),this.createLabelEl(s,u,t,r),n.getZr().add(s);else{var f=Ie(lO,r,h);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,r)}cO(s,r,!0),this._renderHandle(a)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,r){var n=r.get("animation"),i=t.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=iA(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=bl(t).pointerEl=new hu[a.type](sO(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=bl(t).labelEl=new Xe(sO(r.label));t.add(a),uO(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=bl(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=bl(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),uO(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Ch(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ho(u.event)},onmousedown:Bb(this._onHandleDragMove,this,0,0),drift:Bb(this._onHandleDragMove,this),ondragend:Bb(this._onHandleDragEnd,this)}),n.add(i)),cO(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ee(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Dh(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){lO(this._axisPointerModel,!r&&this._moveAnimation,this._handle,jb(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(jb(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(jb(i)),bl(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),fv(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function lO(e,t,r,n){BH(bl(r).lastProp,n)||(bl(r).lastProp=n,t?Qe(r,n,e):(r.stopAnimation(),r.attr(n)))}function BH(e,t){if(Se(e)&&Se(t)){var r=!0;return R(t,function(n,i){r=r&&BH(e[i],n)}),!!r}else return e===t}function uO(e,t){e[t.get(["label","show"])?"show":"hide"]()}function jb(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function cO(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function BA(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function jH(e,t,r,n,i){var a=r.get("value"),o=VH(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Lh(s.get("padding")||0),u=s.getFont(),c=X0(o,u),h=i.position,f=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(h[0]-=f),p==="center"&&(h[0]-=f/2);var g=i.verticalAlign;g==="bottom"&&(h[1]-=d),g==="middle"&&(h[1]-=d/2),rfe(h,f,d,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=t.get(["axisLine","lineStyle","color"])),e.label={x:h[0],y:h[1],style:vt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function rfe(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function VH(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Wy(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),se(o)?a=o.replace("{value}",a):me(o)&&(a=o(s))}return a}function jA(e,t,r){var n=fr();return xo(n,n,r.rotation),Ri(n,n,r.position),Ii([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function FH(e,t,r,n,i,a){var o=rn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),jH(t,n,i,a,{position:jA(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function VA(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function GH(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function hO(e,t,r,n,i,a){return{cx:e,cy:t,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var nfe=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=fO(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=BA(a),d=ife[u](s,h,c);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=e0(l.getRect(),i);FH(n,r,p,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=e0(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=jA(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=fO(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,h=[r.x,r.y];h[c]+=n[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var f=(u[1]+u[0])/2,d=[f,f];d[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[c]}},t}(zA);function fO(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var ife={line:function(e,t,r){var n=VA([t,r[0]],[t,r[1]],dO(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:GH([t-n/2,r[0]],[n,i],dO(e))}}};function dO(e){return e.dim==="x"?0:1}var afe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:q.color.border,width:1,type:"dashed"},shadowStyle:{color:q.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:q.color.neutral00,padding:[5,7,5,7],backgroundColor:q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:q.color.accent40,throttle:40}},t}(Ve),Ka=Fe(),ofe=R;function HH(e,t,r){if(!Ze.node){var n=t.getZr();Ka(n).records||(Ka(n).records={}),sfe(n,t);var i=Ka(n).records[e]||(Ka(n).records[e]={});i.handler=r}}function sfe(e,t){if(Ka(e).initialized)return;Ka(e).initialized=!0,r("click",Ie(vO,"click")),r("mousemove",Ie(vO,"mousemove")),r("globalout",ufe);function r(n,i){e.on(n,function(a){var o=cfe(t);ofe(Ka(e).records,function(s){s&&i(s,a,o.dispatchAction)}),lfe(o.pendings,t)})}}function lfe(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function ufe(e,t,r){e.handler("leave",null,r)}function vO(e,t,r,n){t.handler(e,r,n)}function cfe(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function XT(e,t){if(!Ze.node){var r=t.getZr(),n=(Ka(r).records||{})[e];n&&(Ka(r).records[e]=null)}}var hfe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";HH("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){XT("axisPointer",n)},t.prototype.dispose=function(r,n){XT("axisPointer",n)},t.type="axisPointer",t}(gt);function WH(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=ql(a,e);if(o==null||o<0||ee(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,f=u.dim,d=h==="x"||h==="radius"?1:0,p=a.mapDimension(f),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(re(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var pO=Fe();function ffe(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||le(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Em(i)&&(i=WH({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Em(i),u=a.axesInfo,c=s.axesInfo,h=n==="leave"||Em(i),f={},d={},p={list:[],map:{}},g={showPointer:Ie(vfe,d),showTooltip:Ie(pfe,p)};R(s.coordSysMap,function(y,_){var b=l||y.containPoint(i);R(s.coordSysAxesInfo[_],function(w,C){var M=w.axis,A=_fe(u,w);if(!h&&b&&(!u||A)){var k=A&&A.value;k==null&&!l&&(k=M.pointToData(i)),k!=null&&gO(w,k,g,!1,f)}})});var m={};return R(c,function(y,_){var b=y.linkGroup;b&&!d[_]&&R(b.axesInfo,function(w,C){var M=d[C];if(w!==y&&M){var A=M.value;b.mapper&&(A=y.axis.scale.parse(b.mapper(A,mO(w),mO(y)))),m[y.key]=A}})}),R(m,function(y,_){gO(c[_],y,g,!0,f)}),gfe(d,c,f),mfe(p,i,e,o),yfe(c,o,r),f}}function gO(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=dfe(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&J(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function dfe(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return R(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),h,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,e,r);f=d.dataIndices,h=d.nestestValue}else{if(f=l.indicesOfNearest(n,c[0],e,r.type==="category"?.5:null),!f.length)return;h=l.getData().get(c[0],f[0])}if(!(h==null||!isFinite(h))){var p=e-h,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,i=h,a.length=0),R(f,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function vfe(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function pfe(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=bv(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function gfe(e,t,r){var n=r.axesInfo=[];R(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function mfe(e,t,r,n){if(Em(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function yfe(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=pO(n)[i]||{},o=pO(n)[i]={};R(e,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&R(h.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];R(a,function(u,c){!o[c]&&l.push(u)}),R(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function _fe(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function mO(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function Em(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function op(e){pu.registerAxisPointerClass("CartesianAxisPointer",nfe),e.registerComponentModel(afe),e.registerComponentView(hfe),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!ee(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=xae(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},ffe)}function xfe(e){ze(vG),ze(op)}var bfe=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),h=s.dataToCoord(n),f=a.get("type");if(f&&f!=="none"){var d=BA(a),p=wfe[f](s,l,h,c);p.style=d,r.graphicKey=p.type,r.pointer=p}var g=a.get(["label","margin"]),m=Sfe(n,i,a,l,g);jH(r,i,a,o,m)},t}(zA);function Sfe(e,t,r,n,i){var a=t.axis,o=a.dataToCoord(e),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,h;if(a.dim==="radius"){var f=fr();xo(f,f,s),Ri(f,f,[n.cx,n.cy]),u=Ii([o,-i],f);var d=t.getModel("axisLabel").get("rotate")||0,p=rn.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,h=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",h=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:h}}var wfe={line:function(e,t,r,n){return e.dim==="angle"?{type:"Line",shape:VA(t.coordToPoint([n[0],r]),t.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r}}},shadow:function(e,t,r,n){var i=Math.max(1,e.getBandWidth()),a=Math.PI/180;return e.dim==="angle"?{type:"Sector",shape:hO(t.cx,t.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:hO(t.cx,t.cy,r-i/2,r+i/2,0,Math.PI*2)}}},Tfe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(Ve),FA=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Pt).models[0]},t.type="polarAxis",t}(Ve);Bt(FA,Rh);var Cfe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="angleAxis",t}(FA),Mfe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="radiusAxis",t}(FA),GA=function(e){Y(t,e);function t(r,n){return e.call(this,"radius",r,n)||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t}(vi);GA.prototype.dataToRadius=vi.prototype.dataToCoord;GA.prototype.radiusToData=vi.prototype.coordToData;var Afe=Fe(),HA=function(e){Y(t,e);function t(r,n){return e.call(this,"angle",r,n||[0,360])||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=X0(s==null?"":s+"",n.getFont(),"center","top"),h=Math.max(c.height,7),f=h/u;isNaN(f)&&(f=1/0);var d=Math.max(0,Math.floor(f)),p=Afe(r.model),g=p.lastAutoInterval,m=p.lastTickCount;return g!=null&&m!=null&&Math.abs(g-d)<=1&&Math.abs(m-o)<=1&&g>d?d=g:(p.lastTickCount=o,p.lastAutoInterval=d),d},t}(vi);HA.prototype.dataToAngle=vi.prototype.dataToCoord;HA.prototype.angleToData=vi.prototype.coordToData;var UH=["radius","angle"],Lfe=function(){function e(t){this.dimensions=UH,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new GA,this._angleAxis=new HA,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(t){var r=this.pointToCoord(t);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},e.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},e.prototype.getAxis=function(t){var r="_"+t+"Axis";return this[r]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(t){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&r.push(n),i.scale.type===t&&r.push(i),r},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(t){var r=this._angleAxis;return t===r?this._radiusAxis:r},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(t){var r=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},e.prototype.dataToPoint=function(t,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],r),this._angleAxis.dataToAngle(t[1],r)],n)},e.prototype.pointToData=function(t,r,n){n=n||[];var i=this.pointToCoord(t);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},e.prototype.pointToCoord=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=us;)u+=c*360;return[l,u]},e.prototype.coordToPoint=function(t,r){r=r||[];var n=t[0],i=t[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},e.prototype.getArea=function(){var t=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=t.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,h=u*u+c*c,f=this.r,d=this.r0;return f!==d&&h-o<=f*f&&h+o>=d*d},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},e.prototype.convertToPixel=function(t,r,n){var i=yO(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=yO(r);return i===this?this.pointToData(n):null},e}();function yO(e){var t=e.seriesModel,r=e.polarModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function kfe(e,t,r){var n=t.get("center"),i=sr(t,r).refContainer;e.cx=oe(n[0],i.width)+i.x,e.cy=oe(n[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:ee(s)||(s=[0,s]);var l=[oe(s[0],o),oe(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function Pfe(e,t){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();R(Uy(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),R(Uy(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),ru(n.scale,n.model),ru(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function Dfe(e){return e.mainType==="angleAxis"}function _O(e,t){var r;if(e.type=t.get("type"),e.scale=ep(t),e.onBand=t.get("boundaryGap")&&e.type==="category",e.inverse=t.get("inverse"),Dfe(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle"),i=(r=t.get("endAngle"))!==null&&r!==void 0?r:n+(e.inverse?-360:360);e.setExtent(n,i)}t.axis=e,e.model=t}var Ife={dimensions:UH,create:function(e,t){var r=[];return e.eachComponent("polar",function(n,i){var a=new Lfe(i+"");a.update=Pfe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");_O(o,l),_O(s,u),kfe(a,n,t),r.push(a),n.coordinateSystem=a,a.model=n}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Pt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},Nfe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Wg(e,t,r){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],r]),i=e.coordToPoint([t[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function Ug(e){var t=e.getRadiusAxis();return t.inverse?0:1}function xO(e){var t=e[0],r=e[e.length-1];t&&r&&Math.abs(Math.abs(t.coord-r.coord)-360)<1e-4&&e.pop()}var Efe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=re(i.getViewLabels(),function(c){c=ye(c);var h=i.scale,f=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(f),c});xO(u),xO(s),R(Nfe,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&Rfe[c](this.group,r,a,s,l,o,u)},this)}},t.type="angleAxis",t}(pu),Rfe={axisLine:function(e,t,r,n,i,a){var o=t.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Ug(r),h=c?0:1,f,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?f=new hu[d]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new Sh({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[h]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,e.add(f)},axisTick:function(e,t,r,n,i,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Ug(r)],u=re(n,function(c){return new Wt({shape:Wg(r,[l,l+s],c.coord)})});e.add(An(u,{style:be(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Ug(r)],c=[],h=0;hy?"left":"right",w=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[p]){var C=s[p];Se(C)&&C.textStyle&&(d=new We(C.textStyle,l,l.ecModel))}var M=new Xe({silent:rn.isLabelSilent(t),style:vt(d,{x:m[0],y:m[1],fill:d.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:b,verticalAlign:w})});if(e.add(M),So({el:M,componentModel:t,itemName:h.formattedLabel,formatterParamsExtra:{isTruncated:function(){return M.isTruncated},value:h.rawLabel,tickIndex:f}}),c){var A=rn.makeAxisEventDataBase(t);A.targetType="axisLabel",A.value=h.rawLabel,Le(M).eventData=A}},this)},splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h=0?"p":"n",G=N;C&&(n[c][O]||(n[c][O]={p:N,n:N}),G=n[c][O][V]);var F=void 0,Z=void 0,B=void 0,W=void 0;if(p.dim==="radius"){var H=p.dataToCoord(z)-N,X=l.dataToCoord(O);Math.abs(H)=W})}}})}function Ffe(e){var t={};R(e,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=$H(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=t[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=h.stacks;t[l]=h;var d=ZH(n);f[d]||h.autoWidthCount++,f[d]=f[d]||{width:0,maxWidth:0};var p=oe(n.get("barWidth"),c),g=oe(n.get("barMaxWidth"),c),m=n.get("barGap"),y=n.get("barCategoryGap");p&&!f[d].width&&(p=Math.min(h.remainedWidth,p),f[d].width=p,h.remainedWidth-=p),g&&(f[d].maxWidth=g),m!=null&&(h.gap=m),y!=null&&(h.categoryGap=y)});var r={};return R(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=oe(n.categoryGap,o),l=oe(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),R(a,function(g,m){var y=g.maxWidth;y&&y=r.y&&t[1]<=r.y+r.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=r.y&&t[0]<=r.y+r.height},e.prototype.pointToData=function(t,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(t[i.orient==="horizontal"?0:1])),n},e.prototype.dataToPoint=function(t,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+t)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},e.prototype.convertToPixel=function(t,r,n){var i=bO(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=bO(r);return i===this?this.pointToData(n):null},e}();function bO(e){var t=e.seriesModel,r=e.singleAxisModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function Kfe(e,t){var r=[];return e.eachComponent("singleAxis",function(n,i){var a=new qfe(n,e,t);a.name="single_"+i,a.resize(n,t),n.coordinateSystem=a,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Pt).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var Qfe={create:Kfe,dimensions:YH},SO=["x","y"],Jfe=["width","height"],ede=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=Vb(l,1-c0(s)),c=l.dataToPoint(n)[0],h=a.get("type");if(h&&h!=="none"){var f=BA(a),d=tde[h](s,c,u);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=qT(i);FH(n,r,p,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=qT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=jA(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=c0(o),u=Vb(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var h=Vb(s,1-l),f=(h[1]+h[0])/2,d=[f,f];return d[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(zA),tde={line:function(e,t,r){var n=VA([t,r[0]],[t,r[1]],c0(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=e.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:GH([t-n/2,r[0]],[n,i],c0(e))}}};function c0(e){return e.isHorizontal()?0:1}function Vb(e,t){var r=e.getRect();return[r[SO[t]],r[SO[t]]+r[Jfe[t]]]}var rde=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="single",t}(gt);function nde(e){ze(op),pu.registerAxisPointerClass("SingleAxisPointer",ede),e.registerComponentView(rde),e.registerComponentView($fe),e.registerComponentModel(Rm),uh(e,"single",Rm,Rm.defaultOption),e.registerCoordinateSystem("single",Qfe)}var ide=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,i){var a=fu(r);e.prototype.init.apply(this,arguments),wO(r,a)},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),wO(this.option,r)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.layoutMode="box",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:q.color.axisLine,width:1,type:"solid"}},itemStyle:{color:q.color.neutral00,borderWidth:1,borderColor:q.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:q.size.s,color:q.color.secondary},monthLabel:{show:!0,position:"start",margin:q.size.s,align:"center",formatter:null,color:q.color.secondary},yearLabel:{show:!0,position:null,margin:q.size.xl,formatter:null,color:q.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(Ve);function wO(e,t){var r=e.cellSize,n;ee(r)?n=r:n=e.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=re([0,1],function(a){return MQ(t,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Ta(e,t,{type:"box",ignoreSize:i})}var ade=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},t.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,h=new Be({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(h)}},t.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=n.start,f=0;h.time<=n.end.time;f++){p(h.formatedDate),f===0&&(h=s.getDateInfo(n.start.y+"-"+n.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToCalendarLayout([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},t.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},t.prototype._drawSplitline=function(r,n,i){var a=new Tr({z2:20,shape:{points:r},style:n});i.add(a)},t.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(r,n){return se(r)&&r?_Q(r,n):me(r)?r(n):n.nameMap},t.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,f=i==="horizontal"?0:1,d={top:[c,u[f][1]],bottom:[c,u[1-f][1]],left:[u[1-f][0],h],right:[u[f][0],h]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(g,m),_=new Xe({z2:30,style:vt(o,{text:y}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,d[l],i,l,s)),a.add(_)}},t.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||se(s))&&(s&&(n=Uw(s)||n),s=n.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=o.get("silent"),m=0;m=a.start.time&&i.times.end.time&&r.reverse(),r},e.prototype._getRangeInfo=function(t){var r=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/Fb)-Math.floor(r[0].time/Fb)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),h=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:h,fweek:r[0].day,lweek:r[1].day}},e.prototype._getDateByWeeksAndDay=function(t,r,n){var i=this._getRangeInfo(n);if(t>i.weeks||t===0&&ri.lweek)return null;var a=(t-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},e.create=function(t,r){var n=[];return t.eachComponent("calendar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachComponent(function(i,a){Qv({targetModel:a,coordSysType:"calendar",coordSysProvider:dV})}),n},e.dimensions=["time","value"],e}();function Gb(e){var t=e.calendarModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}function sde(e){e.registerComponentModel(ide),e.registerComponentView(ade),e.registerCoordinateSystem("calendar",ode)}var Wa={level:1,leaf:2,nonLeaf:3},io={none:0,all:1,body:2,corner:3};function KT(e,t,r){var n=t[De[r]].getCell(e);return!n&&qe(e)&&e<0&&(n=t[De[1-r]].getUnitLayoutInfo(r,Math.round(e))),n}function XH(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function qH(e,t,r,n,i){TO(e[0],t,i,r,n,0),TO(e[1],t,i,r,n,1)}function TO(e,t,r,n,i,a){e[0]=1/0,e[1]=-1/0;var o=n[a],s=ee(o)?o:[o],l=s.length,u=!!r;if(l>=1?(CO(e,t,s,u,i,a,0),l>1&&CO(e,t,s,u,i,a,l-1)):e[0]=e[1]=NaN,u){var c=-i[De[1-a]].getLocatorCount(a),h=i[De[a]].getLocatorCount(a)-1;r===io.body?c=Gt(0,c):r===io.corner&&(h=En(-1,h)),h=t[0]&&e[0]<=t[1]}function LO(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function cde(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function kO(e,t,r,n){var i=KT(t[n][0],r,n),a=KT(t[n][1],r,n);e[De[n]]=e[qt[n]]=NaN,i&&a&&(e[De[n]]=i.xy,e[qt[n]]=a.xy+a.wh-i.xy)}function If(e,t,r,n){return e[De[t]]=r,e[De[1-t]]=n,e}function hde(e){return e&&(e.type===Wa.leaf||e.type===Wa.nonLeaf)?e:null}function h0(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var PO=function(){function e(t,r){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=r,this._uniqueValueGen=fde(t);var n=r.get("data",!0);n!=null&&!ee(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return e.prototype._initByDimModelData=function(t){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(t,0,0),l();return;function s(u,c,h){var f=0;return u&&R(u,function(d,p){var g;se(d)?g={value:d}:Se(d)?(g=d,d.value!=null&&!se(d.value)&&(g={value:null})):g={value:null};var m={type:Wa.nonLeaf,ordinal:NaN,level:h,firstLeafLocator:c,id:new Te,span:If(new Te,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:h0()};o++,(a[c]||(a[c]=[])).push(m),i[h]||(i[h]={type:Wa.level,xy:NaN,wh:NaN,option:null,id:new Te,dim:r});var y=s(g.children,c,h+1),_=Math.max(1,y);m.span[De[r.dimIdx]]=_,f+=_,c+=_}),f}function l(){for(var u=[];n.length=1,b=r[De[n]],w=a.getLocatorCount(n)-1,C=new us;for(o.resetLayoutIterator(C,n);C.next();)M(C.item);for(a.resetLayoutIterator(C,n);C.next();)M(C.item);function M(A){Dr(A.wh)&&(A.wh=y),A.xy=b,A.id[De[n]]===w&&!_&&(A.wh=r[De[n]]+r[qt[n]]-A.xy),b+=A.wh}}function zO(e,t){for(var r=t[De[e]].resetCellIterator();r.next();){var n=r.item;f0(n.rect,e,n.id,n.span,t),f0(n.rect,1-e,n.id,n.span,t),n.type===Wa.nonLeaf&&(n.xy=n.rect[De[e]],n.wh=n.rect[qt[e]])}}function BO(e,t){e.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;f0(i,0,a,n,t),f0(i,1,a,n,t)}})}function f0(e,t,r,n,i){e[qt[t]]=0;var a=r[De[t]],o=a<0?i[De[1-t]]:i[De[t]],s=o.getUnitLayoutInfo(t,r[De[t]]);if(e[De[t]]=s.xy,e[qt[t]]=s.wh,n[De[t]]>1){var l=o.getUnitLayoutInfo(t,r[De[t]]+n[De[t]]-1);e[qt[t]]=l.xy+l.wh-s.xy}}function Cde(e,t,r){var n=Cy(e,r[qt[t]]);return JT(n,r[qt[t]])}function JT(e,t){return Math.max(Math.min(e,pe(t,1/0)),0)}function Ub(e){var t=e.matrixModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}var kr={inBody:1,inCorner:2,outside:3},Qi={x:null,y:null,point:[]};function jO(e,t,r,n,i){var a=r[De[t]],o=r[De[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),l=a.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),c=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,h=e.point[t]=n[t];if(!l&&!c){e[De[t]]=kr.outside;return}if(i===io.body){l?(e[De[t]]=kr.inBody,h=En(s.xy+s.wh,Gt(l.xy,h)),e.point[t]=h):e[De[t]]=kr.outside;return}else if(i===io.corner){c?(e[De[t]]=kr.inCorner,h=En(c.xy+c.wh,Gt(u.xy,h)),e.point[t]=h):e[De[t]]=kr.outside;return}var f=l?l.xy:c?c.xy+c.wh:NaN,d=u?u.xy:f,p=s?s.xy+s.wh:f;if(hp){if(!i){e[De[t]]=kr.outside;return}h=p}e.point[t]=h,e[De[t]]=f<=h&&h<=p?kr.inBody:d<=h&&h<=f?kr.inCorner:kr.outside}function VO(e,t,r,n){var i=1-r;if(e[De[r]]!==kr.outside)for(n[De[r]].resetCellIterator(Wb);Wb.next();){var a=Wb.item;if(GO(e.point[r],a.rect,r)&&GO(e.point[i],a.rect,i)){t[r]=a.ordinal,t[i]=a.id[De[i]];return}}}function FO(e,t,r,n){if(e[De[r]]!==kr.outside){var i=e[De[r]]===kr.inCorner?n[De[1-r]]:n[De[r]];for(i.resetLayoutIterator(qg,r);qg.next();)if(Mde(e.point[r],qg.item)){t[r]=qg.item.id[De[r]];return}}}function Mde(e,t){return t.xy<=e&&e<=t.xy+t.wh}function GO(e,t,r){return t[De[r]]<=e&&e<=t[De[r]]+t[qt[r]]}function Ade(e){e.registerComponentModel(gde),e.registerComponentView(bde),e.registerCoordinateSystem("matrix",Tde)}function Lde(e,t){var r=e.existing;if(t.id=e.keyInfo.id,!t.type&&r&&(t.type=r.type),t.parentId==null){var n=t.parentOption;n?t.parentId=n.id:r&&(t.parentId=r.parentId)}t.parentOption=null}function HO(e,t){var r;return R(t,function(n){e[n]!=null&&e[n]!=="auto"&&(r=!0)}),r}function kde(e,t,r){var n=J({},r),i=e[t],a=r.$action||"merge";a==="merge"?i?(Ee(i,n,!0),Ta(i,n,{ignoreSize:!0}),yV(r,i),Kg(r,i),Kg(r,i,"shape"),Kg(r,i,"style"),Kg(r,i,"extra"),r.clipPath=i.clipPath):e[t]=n:a==="replace"?e[t]=n:a==="remove"&&i&&(e[t]=null)}var QH=["transition","enterFrom","leaveTo"],Pde=QH.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Kg(e,t,r){if(r&&(!e[r]&&t[r]&&(e[r]={}),e=e[r],t=t[r]),!(!e||!t))for(var n=r?QH:Pde,i=0;i=0;c--){var h=i[c],f=rr(h.id,null),d=f!=null?o.get(f):null;if(d){var p=d.parent,y=qn(p),_=p===a?{width:s,height:l}:{width:y.width,height:y.height},b={},w=u_(d,h,_,null,{hv:h.hv,boundingMode:h.bounding},b);if(!qn(d).isNew&&w){for(var C=h.transition,M={},A=0;A=0)?M[k]=N:d[k]=N}Qe(d,M,r,0)}else d.attr(b)}}},t.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Om(i,qn(i).option,n,r._lastGraphicModel)}),this._elMap=de()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(gt);function eC(e){var t=he(WO,e)?WO[e]:lv(e),r=new t({});return qn(r).type=e,r}function UO(e,t,r,n){var i=eC(r);return t.add(i),n.set(e,i),qn(i).id=e,qn(i).isNew=!0,i}function Om(e,t,r,n){var i=e&&e.parent;i&&(e.type==="group"&&e.traverse(function(a){Om(a,t,r,n)}),C_(e,t,n),r.removeKey(qn(e).id))}function ZO(e,t,r,n){e.isGroup||R([["cursor",ci.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];he(t,a)?e[a]=pe(t[a],i[1]):e[a]==null&&(e[a]=i[1])}),R($e(t),function(i){if(i.indexOf("on")===0){var a=t[i];e[i]=me(a)?a:null}}),he(t,"draggable")&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function Ede(e){return e=J({},e),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(vV),function(t){delete e[t]}),e}function Rde(e,t,r){var n=Le(e).eventData;!e.silent&&!e.ignore&&!n&&(n=Le(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),n&&(n.info=r.info)}function Ode(e){e.registerComponentModel(Ide),e.registerComponentView(Nde),e.registerPreprocessor(function(t){var r=t.graphic;ee(r)?!r[0]||!r[0].elements?t.graphic=[{elements:r}]:t.graphic=[t.graphic[0]]:r&&!r.elements&&(t.graphic=[{elements:[r]}])})}var $O=["x","y","radius","angle","single"],zde=["cartesian2d","polar","singleAxis"];function Bde(e){var t=e.get("coordinateSystem");return Ne(zde,t)>=0}function Ko(e){return e+"Axis"}function jde(e,t){var r=de(),n=[],i=de();e.eachComponent({mainType:"dataZoom",query:t},function(c){i.get(c.uid)||s(c)});var a;do a=!1,e.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(f,d){var p=r.get(f);p&&p[d]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,f){(r.get(h)||r.set(h,[]))[f]=!0})}return n}function JH(e){var t=e.ecModel,r={infoList:[],infoMap:de()};return e.eachTargetAxis(function(n,i){var a=t.getComponent(Ko(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var Zb=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},e}(),Av=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return t.prototype.init=function(r,n,i){var a=YO(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},t.prototype.mergeOption=function(r){var n=YO(r);Ee(this.option,r,!0),Ee(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=de(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return R($O,function(i){var a=this.getReferringComponents(Ko(i),nq);if(a.specified){n=!0;var o=new Zb;R(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var h=u[0];if(h){var f=new Zb;if(f.add(h.componentIndex),r.set(c,f),a=!1,c==="x"||c==="y"){var d=h.getReferringComponents("grid",Pt).models[0];d&&R(u,function(p){h.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",Pt).models[0]&&f.add(p.componentIndex)})}}}a&&R($O,function(u){if(a){var c=i.findComponents({mainType:Ko(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var h=new Zb;h.add(c[0].componentIndex),r.set(u,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");R([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Ko(n),i))},this),r},t.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){R(i.indexList,function(o){r.call(n,a,o)})})},t.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Ko(r),n)},t.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},t.prototype.setCalculatedRange=function(r){var n=this.option;R(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},t.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},t.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(b&&!w&&!C)return!0;b&&(m=!0),w&&(p=!0),C&&(g=!0)}return m&&p&&g})}else oc(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});oc(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},e.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;oc(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=nt(n[0]+o,n,[0,100],!0):a!=null&&(o=nt(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var t=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=R2(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},e}();function Hde(e,t,r){var n=[1/0,-1/0];oc(r,function(o){sre(n,o.getData(),t)});var i=e.getAxisModel(),a=QF(i.axis.scale,i,n).calculate();return[a.min,a.max]}var Wde={getTargetSeries:function(e){function t(i){e.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=e.getComponent(Ko(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Gde(i,a,s,e),r.push(o.__dzAxisProxy))});var n=de();return R(r,function(i){R(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(e,t){e.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,t)})}),e.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function Ude(e){e.registerAction("dataZoom",function(t,r){var n=jde(r,t);R(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var qO=!1;function $A(e){qO||(qO=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Wde),Ude(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Zde(e){e.registerComponentModel(Vde),e.registerComponentView(Fde),$A(e)}var ei=function(){function e(){}return e}(),e8={};function sc(e,t){e8[e]=t}function t8(e){return e8[e]}var $de=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;R(this.option.feature,function(n,i){var a=t8(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),Ee(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:q.color.border,borderRadius:0,borderWidth:0,padding:q.size.m,itemSize:15,itemGap:q.size.s,showTitle:!0,iconStyle:{borderColor:q.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:q.color.accent50}},tooltip:{show:!1,position:"bottom"}},t}(Ve);function r8(e,t){var r=Lh(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new Be({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var Yde=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),h=[];R(u,function(_,b){h.push(b)}),new po(this._featureNames||[],h).add(f).update(f).remove(Ie(f,null)).execute(),this._featureNames=h;function f(_,b){var w=h[_],C=h[b],M=u[w],A=new We(M,r,r.ecModel),k;if(a&&a.newTitle!=null&&a.featureName===w&&(M.title=a.newTitle),w&&!C){if(Xde(w))k={onclick:A.option.onclick,featureName:w};else{var N=t8(w);if(!N)return;k=new N}c[w]=k}else if(k=c[C],!k)return;k.uid=Ah("toolbox-feature"),k.model=A,k.ecModel=n,k.api=i;var D=k instanceof ei;if(!w&&C){D&&k.dispose&&k.dispose(n,i);return}if(!A.get("show")||D&&k.unusable){D&&k.remove&&k.remove(n,i);return}d(A,k,w),A.setIconStatus=function(I,z){var O=this.option,V=this.iconPaths;O.iconStatus=O.iconStatus||{},O.iconStatus[I]=z,V[I]&&(z==="emphasis"?fo:vo)(V[I])},k instanceof ei&&k.render&&k.render(A,n,i,a)}function d(_,b,w){var C=_.getModel("iconStyle"),M=_.getModel(["emphasis","iconStyle"]),A=b instanceof ei&&b.getIcons?b.getIcons():_.get("icon"),k=_.get("title")||{},N,D;se(A)?(N={},N[w]=A):N=A,se(k)?(D={},D[w]=k):D=k;var I=_.iconPaths={};R(N,function(z,O){var V=Ch(z,{},{x:-s/2,y:-s/2,width:s,height:s});V.setStyle(C.getItemStyle());var G=V.ensureState("emphasis");G.style=M.getItemStyle();var F=new Xe({style:{text:D[O],align:M.get("textAlign"),borderRadius:M.get("textBorderRadius"),padding:M.get("textPadding"),fill:null,font:iM({fontStyle:M.get("textFontStyle"),fontFamily:M.get("textFontFamily"),fontSize:M.get("textFontSize"),fontWeight:M.get("textFontWeight")},n)},ignore:!0});V.setTextContent(F),So({el:V,componentModel:r,itemName:O,formatterParamsExtra:{title:D[O]}}),V.__title=D[O],V.on("mouseover",function(){var Z=M.getItemStyle(),B=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";F.setStyle({fill:M.get("textFill")||Z.fill||Z.stroke||q.color.neutral99,backgroundColor:M.get("textBackgroundColor")}),V.setTextConfig({position:M.get("textPosition")||B}),F.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",O])!=="emphasis"&&i.leaveEmphasis(this),F.hide()}),(_.get(["iconStatus",O])==="emphasis"?fo:vo)(V),o.add(V),V.on("click",le(b.onclick,b,n,i,O)),I[O]=V})}var p=sr(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),y=St(g,p,m);Bl(r.get("orient"),o,r.get("itemGap"),y.width,y.height),u_(o,g,p,m),o.add(r8(o.getBoundingRect(),r)),l||o.eachChild(function(_){var b=_.__title,w=_.ensureState("emphasis"),C=w.textConfig||(w.textConfig={}),M=_.getTextContent(),A=M&&M.ensureState("emphasis");if(A&&!me(A)&&b){var k=A.style||(A.style={}),N=X0(b,Xe.makeFont(k)),D=_.x+o.x,I=_.y+o.y+s,z=!1;I+N.height>i.getHeight()&&(C.position="top",z=!0);var O=z?-5-N.height:s+10;D+N.width/2>i.getWidth()?(C.position=["100%",O],k.align="right"):D-N.width/2<0&&(C.position=[0,O],k.align="left")}})},t.prototype.updateView=function(r,n,i,a){R(this._features,function(o){o instanceof ei&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(r,n){R(this._features,function(i){i instanceof ei&&i.remove&&i.remove(r,n)}),this.group.removeAll()},t.prototype.dispose=function(r,n){R(this._features,function(i){i instanceof ei&&i.dispose&&i.dispose(r,n)})},t.type="toolbox",t}(gt);function Xde(e){return e.indexOf("my")===0}var qde=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||q.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Ze.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];d&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=p.length,y=new Uint8Array(m);m--;)y[m]=p.charCodeAt(m);var _=new Blob([y]);window.navigator.msSaveOrOpenBlob(_,g)}else{var b=document.createElement("iframe");document.body.appendChild(b);var w=b.contentWindow,C=w.document;C.open("image/svg+xml","replace"),C.write(p),C.close(),w.focus(),C.execCommand("SaveAs",!0,g),document.body.removeChild(b)}}else{var M=i.get("lang"),A='',k=window.open();k.document.write(A),k.document.title=a}},t.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:q.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(ei),KO="__ec_magicType_stack__",Kde=[["line","bar"],["stack"]],Qde=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return R(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(QO[i]){var s={series:[]},l=function(h){var f=h.subType,d=h.id,p=QO[i](f,d,h,a);p&&(be(p,h.option),s.series.push(p));var g=h.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,_=y+"Axis",b=h.getReferringComponents(_,Pt).models[0],w=b.componentIndex;s[_]=s[_]||[];for(var C=0;C<=w;C++)s[_][w]=s[_][w]||{};s[_][w].boundaryGap=i==="bar"}}};R(Kde,function(h){Ne(h,i)>=0&&R(h,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Ee({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t}(ei),QO={line:function(e,t,r,n){if(e==="bar")return Ee({id:t,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(e,t,r,n){if(e==="line")return Ee({id:t,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(e,t,r,n){var i=r.get("stack")===KO;if(e==="line"||e==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ee({id:t,stack:i?"":KO},n.get(["option","stack"])||{},!0)}};ji({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var M_=new Array(60).join("-"),dh=" ";function Jde(e){var t={},r=[],n=[];return e.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:t,other:r,meta:n}}function eve(e){var t=[];return R(e,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(re(r.series,function(d){return d.name})),l=[i.model.getCategories()];R(r.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(dh)],c=0;c=0)return!0}var tC=new RegExp("["+dh+"]+","g");function ive(e){for(var t=e.split(/\n+/g),r=d0(t.shift()).split(tC),n=[],i=re(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(t)}function cve(e){var t=YA(e),r=t[t.length-1];t.length>1&&t.pop();var n={};return n8(r,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function hve(e){i8(e).snapshots=null}function fve(e){return YA(e).length}function YA(e){var t=i8(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var dve=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){hve(r),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(ei);ji({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var vve=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],XA=function(){function e(t,r,n){var i=this;this._targetInfoList=[];var a=JO(r,t);R(pve,function(o,s){(!n||!n.include||Ne(n.include,s)>=0)&&o(a,i._targetInfoList)})}return e.prototype.setOutputRanges=function(t,r){return this.matchOutputRanges(t,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=$b[n.brushType](0,a,i);n.__rangeOffset={offset:n5[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},e.prototype.matchOutputRanges=function(t,r,n){R(t,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&R(a.coordSyses,function(o){var s=$b[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},e.prototype.setInputRanges=function(t,r){R(t,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=$b[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?n5[n.brushType](a.values,o.offset,gve(a.xyMinMax,o.xyMinMax)):a.values}},this)},e.prototype.makePanelOpts=function(t,r){return re(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:uH(i),isTargetByCursor:hH(i,t,n.coordSysModel),getLinearBrushOtherExtent:cH(i)}})},e.prototype.controlSeries=function(t,r,n){var i=this.findTargetInfo(t,n);return i===!0||i&&Ne(i.coordSyses,r.coordinateSystem)>=0},e.prototype.findTargetInfo=function(t,r){for(var n=this._targetInfoList,i=JO(r,t),a=0;ae[1]&&e.reverse(),e}function JO(e,t){return Oc(e,t,{includeMainTypes:vve})}var pve={grid:function(e,t){var r=e.xAxisModels,n=e.yAxisModels,i=e.gridModels,a=de(),o={},s={};!r&&!n&&!i||(R(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),R(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),R(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];R(u.getCartesians(),function(h,f){(Ne(r,h.getAxis("x").model)>=0||Ne(n,h.getAxis("y").model)>=0)&&c.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:t5.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(e,t){R(e.geoModels,function(r){var n=r.coordinateSystem;t.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:t5.geo})})}},e5=[function(e,t){var r=e.xAxisModel,n=e.yAxisModel,i=e.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(e,t){var r=e.geoModel;return r&&r===t.geoModel}],t5={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(hs(e)),t}},$b={lineX:Ie(r5,0),lineY:Ie(r5,1),rect:function(e,t,r,n){var i=e?t.pointToData([r[0][0],r[1][0]],n):t.dataToPoint([r[0][0],r[1][0]],n),a=e?t.pointToData([r[0][1],r[1][1]],n):t.dataToPoint([r[0][1],r[1][1]],n),o=[rC([i[0],a[0]]),rC([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=re(r,function(o){var s=e?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function r5(e,t,r,n){var i=r.getAxis(["x","y"][e]),a=rC(re([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var n5={lineX:Ie(i5,0),lineY:Ie(i5,1),rect:function(e,t,r){return[[e[0][0]-r[0]*t[0][0],e[0][1]-r[0]*t[0][1]],[e[1][0]-r[1]*t[1][0],e[1][1]-r[1]*t[1][1]]]},polygon:function(e,t,r){return re(e,function(n,i){return[n[0]-r[0]*t[i][0],n[1]-r[1]*t[i][1]]})}};function i5(e,t,r,n){return[t[0]-n[e]*r[0],t[1]-n[e]*r[1]]}function gve(e,t){var r=a5(e),n=a5(t),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function a5(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var nC=R,mve=QX("toolbox-dataZoom_"),yve=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new xA(i.getZr()),this._brushController.on("brush",le(this._onBrush,this)).mount()),bve(r,n,this,a,i),xve(r,n)},t.prototype.onclick=function(r,n,i){_ve[i].call(this)},t.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new XA(qA(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,h){if(h.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",h,c[0]),s("y",h,c[1])):s({lineX:"x",lineY:"y"}[f],h,c)}}),uve(a,i),this._dispatchZoomAction(i);function s(u,c,h){var f=c.getAxis(u),d=f.model,p=l(u,d,a),g=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(h=bs(0,h.slice(),f.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,c,h){var f;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(f=d)}),f}},t.prototype._dispatchZoomAction=function(r){var n=[];nC(r,function(i,a){n.push(ye(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:q.color.backgroundTint}};return n},t}(ei),_ve={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(cve(this.ecModel))}};function qA(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function xve(e,t){e.setIconStatus("back",fve(t)>1?"emphasis":"normal")}function bve(e,t,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var o=new XA(qA(e),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()}:!1)}NQ("dataZoom",function(e){var t=e.getComponent("toolbox",0),r=["feature","dataZoom"];if(!t||t.get(r)==null)return;var n=t.getModel(r),i=[],a=qA(n),o=Oc(e,a);nC(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),nC(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var h=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:mve+u+h};f[c]=h,i.push(f)}return i});function Sve(e){e.registerComponentModel($de),e.registerComponentView(Yde),sc("saveAsImage",qde),sc("magicType",Qde),sc("dataView",sve),sc("dataZoom",yve),sc("restore",dve),ze(Zde)}var wve=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:q.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:q.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:q.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:q.color.tertiary,fontSize:14}},t}(Ve);function a8(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function o8(e){if(Ze.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=o+i,f=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),d=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-h)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=t+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function Pve(e,t,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+e/2+"s "+n,a="opacity"+i+",visibility"+i),t||(i=" "+e+"s "+n,a+=(a.length?",":"")+(Ze.transformSupported?""+KA+i:",left"+i+",top"+i)),Mve+":"+a}function o5(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Ze.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ze.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+KA+":"+o+";":[["top",0],["left",0],[s8,o]]}function Dve(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var i=pe(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),R(["decoration","align"],function(u){var c=e.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function Ive(e,t,r,n){var i=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.get("shadowBlur"),l=e.get("shadowColor"),u=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),h=e.getModel("textStyle"),f=qV(e,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),t&&a>0&&i.push(Pve(a,r,n)),o&&i.push("background-color:"+o),R(["width","color","radius"],function(p){var g="border-"+p,m=mM(g),y=e.get(m);y!=null&&i.push(g+":"+y+(p==="color"?"":"px"))}),i.push(Dve(h)),f!=null&&i.push("padding:"+Lh(f).join("px ")+"px"),i.join(";")+";"}function s5(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&mY(e,o,r,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var Nve=function(){function e(t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ze.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=r.appendTo,o=a&&(se(a)?document.querySelector(a):Yl(a)?a:me(a)&&a(t.getDom()));s5(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();$n(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),n=Cve(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Ave+Ive(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+o5(a[0],a[1],!0)+("border-color:"+tu(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(se(a)&&n.get("trigger")==="item"&&!a8(n)&&(s=kve(n,i,a)),se(t))o.innerHTML=t+s;else if(t){o.innerHTML="",ee(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Ze.node||!i.getDom())){var o=c5(a,i);this._ticket="";var s=a.dataByCoordSys,l=Vve(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=Rve;c.x=a.x,c.y=a.y,c.update(),Le(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var h=WH(a,n),f=h.point[0],d=h.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(c5(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),h=Ef([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=Le(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Pl(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Le(c).dataIndex!=null?l=c:Le(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=le(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Ef([n.tooltipOption],a),l=this._renderMode,u=[],c=Kt("section",{blocks:[],noHeader:!0}),h=[],f=new L1;R(r,function(_){R(_.dataByAxis,function(b){var w=i.getComponent(b.axisDim+"Axis",b.axisIndex),C=b.value;if(!(!w||C==null)){var M=VH(C,w.axis,i,b.seriesDataIndices,b.valueLabelOpt),A=Kt("section",{header:M,noHeader:!kn(M),sortBlocks:!0,blocks:[]});c.blocks.push(A),R(b.seriesDataIndices,function(k){var N=i.getSeriesByIndex(k.seriesIndex),D=k.dataIndexInside,I=N.getDataParams(D);if(!(I.dataIndex<0)){I.axisDim=b.axisDim,I.axisIndex=b.axisIndex,I.axisType=b.axisType,I.axisId=b.axisId,I.axisValue=Wy(w.axis,{value:C}),I.axisValueLabel=M,I.marker=f.makeTooltipMarker("item",tu(I.color),l);var z=MI(N.formatTooltip(D,!0,null)),O=z.frag;if(O){var V=Ef([N],a).get("valueFormatter");A.blocks.push(V?J({valueFormatter:V},O):O)}z.text&&h.push(z.text),u.push(I)}})}})}),c.blocks.reverse(),h.reverse();var d=n.position,p=s.get("order"),g=II(c,f,l,p,i.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var m=l==="richText"?` - -`:"
",y=h.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],d,null,f)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Le(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,h=o.dataType,f=u.getData(h),d=this._renderMode,p=r.positionDefault,g=Ef([f.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(c,h),_=new L1;y.marker=_.makeTooltipMarker("item",tu(y.color),d);var b=MI(u.formatTooltip(c,!1,h)),w=g.get("order"),C=g.get("valueFormatter"),M=b.frag,A=M?II(C?J({valueFormatter:C},M):M,_,d,w,a.get("useUTC"),g.get("textStyle")):b.text,k="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,A,y,k,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:c,dataIndex:f.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Le(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(se(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ye(l),l.content=Ur(l.content));var h=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&h.push(f),h.push({formatter:l.content});var d=r.positionDefault,p=Ef(h,this._tooltipModel,d?{position:d}:null),g=p.get("content"),m=Math.random()+"",y=new L1;this._showOrMove(p,function(){var _=ye(p.get("formatterParams")||{});this._showTooltipContent(p,g,_,m,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var f=r.get("formatter");l=l||r.get("position");var d=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=p.color;if(f)if(se(f)){var m=r.ecModel.get("useUTC"),y=ee(i)?i[0]:i,_=y&&y.axisType&&y.axisType.indexOf("time")>=0;d=f,_&&(d=Kv(y.axisValue,d,m)),d=yM(d,i,!0)}else if(me(f)){var b=le(function(w,C){w===this._ticket&&(h.setContent(C,c,r,g,l),this._updatePosition(r,l,o,s,h,i,u))},this);this._ticket=a,d=f(i,a,b)}else d=f;h.setContent(d,c,r,g,l),h.show(r,g),this._updatePosition(r,l,o,s,h,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||ee(n))return{color:a||o};if(!ee(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var h=o.getSize(),f=r.get("align"),d=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),me(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:h.slice()})),ee(n))i=oe(n[0],u),a=oe(n[1],c);else if(Se(n)){var g=n;g.width=h[0],g.height=h[1];var m=St(g,{width:u,height:c});i=m.x,a=m.y,f=null,d=null}else if(se(n)&&l){var y=jve(n,p,h,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=zve(i,a,o,u,c,f?null:20,d?null:20);i=y[0],a=y[1]}if(f&&(i-=h5(f)?h[0]/2:f==="right"?h[0]:0),d&&(a-=h5(d)?h[1]/2:d==="bottom"?h[1]:0),a8(r)){var y=Bve(i,a,o,u,c);i=y[0],a=y[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&R(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},h=c.dataByAxis||[];o=o&&u.length===h.length,o&&R(u,function(f,d){var p=h[d]||{},g=f.seriesDataIndices||[],m=p.seriesDataIndices||[];o=o&&f.value===p.value&&f.axisType===p.axisType&&f.axisId===p.axisId&&g.length===m.length,o&&R(g,function(y,_){var b=m[_];o=o&&y.seriesIndex===b.seriesIndex&&y.dataIndex===b.dataIndex}),a&&R(f.seriesDataIndices,function(y){var _=y.seriesIndex,b=n[_],w=a[_];b&&w&&w.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){Ze.node||!n.getDom()||(fv(this,"_updatePosition"),this._tooltipContent.dispose(),XT("itemTooltip",n))},t.type="tooltip",t}(gt);function Ef(e,t,r){var n=t.ecModel,i;r?(i=new We(r,n,n),i=new We(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof We&&(o=o.get("tooltip",!0)),se(o)&&(o={formatter:o}),o&&(i=new We(o,i,n)))}return i}function c5(e,t){return e.dispatchAction||le(t.dispatchAction,t)}function zve(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function Bve(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function jve(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function h5(e){return e==="center"||e==="middle"}function Vve(e,t,r){var n=V2(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=xh(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Le(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function Fve(e){ze(op),e.registerComponentModel(wve),e.registerComponentView(Ove),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Rt),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Rt)}var Gve=["rect","polygon","keep","clear"];function Hve(e,t){var r=pt(e?e.brush:[]);if(r.length){var n=[];R(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=e&&e.toolbox;ee(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),Wve(s),t&&!s.length&&s.push.apply(s,Gve)}}function Wve(e){var t={};R(e,function(r){t[r]=1}),e.length=0,R(t,function(r,n){e.push(n)})}var f5=R;function d5(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function iC(e,t,r){var n={};return f5(t,function(a){var o=n[a]=i();f5(e[a],function(s,l){if(dr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new dr(u),l==="opacity"&&(u=ye(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new dr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function u8(e,t,r){var n;R(r,function(i){t.hasOwnProperty(i)&&d5(t[i])&&(n=!0)}),n&&R(r,function(i){t.hasOwnProperty(i)&&d5(t[i])?e[i]=ye(t[i]):delete e[i]})}function Uve(e,t,r,n,i,a){var o={};R(e,function(h){var f=dr.prepareVisualTypes(t[h]);o[h]=f});var s;function l(h){return LM(r,s,h)}function u(h,f){oF(r,s,h,f)}r.each(c);function c(h,f){s=h;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,h),g=t[p],m=o[p],y=0,_=m.length;y<_;y++){var b=m[y];g[b]&&g[b].applyVisual(h,l,u)}}}function Zve(e,t,r,n){var i={};return R(e,function(a){var o=dr.prepareVisualTypes(t[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(C){return LM(s,h,C)}function c(C,M){oF(s,h,C,M)}for(var h,f=s.getStore();(h=o.next())!=null;){var d=s.getRawDataItem(h);if(!(d&&d.visualMap===!1))for(var p=n!=null?f.get(l,h):h,g=r(p),m=t[g],y=i[g],_=0,b=y.length;_t[0][1]&&(t[0][1]=a[0]),a[1]t[1][1]&&(t[1][1]=a[1])}return t&&y5(t)}};function y5(e){return new Ce(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var Jve=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new xA(n.getZr())).on("brush",le(this._onBrush,this)).mount()},t.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},t.prototype.updateTransform=function(r,n,i,a){c8(n),this._updateController(r,n,i,a)},t.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},t.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},t.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ye(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ye(i),$from:n})},t.type="brush",t}(gt),epe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.areas=[],r.brushOption={},r}return t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&u8(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(r){r&&(this.areas=re(r,function(n){return _5(this.option,n)},this))},t.prototype.setBrushOption=function(r){this.brushOption=_5(this.option,r),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:q.color.backgroundTint,borderColor:q.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:q.color.disabled},t}(Ve);function _5(e,t){return Ee({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new We(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var tpe=["rect","polygon","lineX","lineY","keep","clear"],rpe=function(e){Y(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,R(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(r,n,i){this.render(r,n,i)},t.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return R(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},t.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(r){var n={show:!0,type:tpe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},t}(ei);function npe(e){e.registerComponentView(Jve),e.registerComponentModel(epe),e.registerPreprocessor(Hve),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,Yve),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,r){r.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Rt),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Rt),sc("brush",rpe)}var ipe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:q.size.m,backgroundColor:q.color.transparent,borderColor:q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:q.color.primary},subtextStyle:{fontSize:12,color:q.color.quaternary}},t}(Ve),ape=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=pe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new Xe({style:vt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),f=r.get("subtext"),d=new Xe({style:vt(s,{text:f,fill:s.getTextColor(),y:h.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);c.silent=!p&&!m,d.silent=!g&&!m,p&&c.on("click",function(){Ny(p,"_"+r.get("target"))}),g&&d.on("click",function(){Ny(g,"_"+r.get("subtarget"))}),Le(c).eventData=Le(d).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),f&&a.add(d);var y=a.getBoundingRect(),_=r.getBoxLayoutParams();_.width=y.width,_.height=y.height;var b=sr(r,i),w=St(_,b.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?w.x+=w.width:l==="center"&&(w.x+=w.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?w.y+=w.height:u==="middle"&&(w.y+=w.height/2),u=u||"top"),a.x=w.x,a.y=w.y,a.markRedraw();var C={align:l,verticalAlign:u};c.setStyle(C),d.setStyle(C),y=a.getBoundingRect();var M=w.margin,A=r.getItemStyle(["color","opacity"]);A.fill=r.get("backgroundColor");var k=new Be({shape:{x:y.x-M[3],y:y.y-M[0],width:y.width+M[1]+M[3],height:y.height+M[0]+M[2],r:r.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});a.add(k)}},t.type="title",t}(gt);function ope(e){e.registerComponentModel(ipe),e.registerComponentView(ape)}var x5=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode="box",r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(r){this.option.autoPlay=!!r},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],R(n,function(u,c){var h=rr(_h(u),""),f;Se(u)?(f=ye(u),f.value=c):f=c,o.push(f),a.push(h)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new $r([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:q.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:q.color.secondary},data:[]},t}(Ve),h8=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline.slider",t.defaultOption=Ps(x5.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:q.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:q.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:q.color.tertiary},itemStyle:{color:q.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:q.color.accent50,borderColor:q.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:q.color.accent50,borderColor:q.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:q.color.accent60},itemStyle:{color:q.color.accent60,borderColor:q.color.accent60},controlStyle:{color:q.color.accent70,borderColor:q.color.accent70}},progress:{lineStyle:{color:q.color.accent30},itemStyle:{color:q.color.accent40}},data:[]}),t}(x5);Bt(h8,h_.prototype);var spe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline",t}(gt),lpe=function(e){Y(t,e);function t(r,n,i,a){var o=e.call(this,r,n,i)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(vi),Xb=Math.PI,b5=Fe(),upe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.api=n},t.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Kt("nameValue",{noName:!0,value:c})},R(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=hpe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Xb/2},h=a==="vertical"?o.height:o.width,f=r.getModel("controlStyle"),d=f.get("show",!0),p=d?f.get("itemSize"):0,g=d?f.get("itemGap"):0,m=p+g,y=r.get(["label","rotate"])||0;y=y*Xb/180;var _,b,w,C=f.get("position",!0),M=d&&f.get("showPlayBtn",!0),A=d&&f.get("showPrevBtn",!0),k=d&&f.get("showNextBtn",!0),N=0,D=h;C==="left"||C==="bottom"?(M&&(_=[0,0],N+=m),A&&(b=[N,0],N+=m),k&&(w=[D-p,0],D-=m)):(M&&(_=[D-p,0],D-=m),A&&(b=[0,0],N+=m),k&&(w=[D-p,0],D-=m));var I=[N,D];return r.get("inverse")&&I.reverse(),{viewRect:o,mainLength:h,orient:a,rotation:c[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:b,nextBtnPosition:w,axisExtent:I,controlSize:p,controlGap:g}},t.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=fr(),l=o.x,u=o.y+o.height;Ri(s,s,[-l,-u]),xo(s,s,-Xb/2),Ri(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),h=_(i.getBoundingRect()),f=_(a.getBoundingRect()),d=[i.x,i.y],p=[a.x,a.y];p[0]=d[0]=c[0][0];var g=r.labelPosOpt;if(g==null||se(g)){var m=g==="+"?0:1;b(d,h,c,1,m),b(p,f,c,1,1-m)}else{var m=g>=0?0:1;b(d,h,c,1,m),p[1]=d[1]+g}i.setPosition(d),a.setPosition(p),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(w){w.originX=c[0][0]-w.x,w.originY=c[1][0]-w.y}function _(w){return[[w.x,w.x+w.width],[w.y,w.y+w.height]]}function b(w,C,M,A,k){w[A]+=M[A][k]-C[A][k]}},t.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=cpe(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new lpe("value",o,r.axisExtent,a);return l.model=n,l},t.prototype._createGroup=function(r){var n=this[r]=new _e;return this.group.add(n),n},t.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Wt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:J({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Wt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:be({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],R(l,function(u){var c=i.dataToCoord(u.value),h=s.getItemModel(u.value),f=h.getModel("itemStyle"),d=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:le(o._changeTimeline,o,u.value)},m=S5(h,f,n,g);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),cs(m);var y=Le(m);h.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},t.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],R(u,function(c){var h=c.tickValue,f=l.getItemModel(h),d=f.getModel("label"),p=f.getModel(["emphasis","label"]),g=f.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),y=new Xe({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:le(o._changeTimeline,o,h),silent:!1,style:vt(d,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=vt(p),y.ensureState("progress").style=vt(g),n.add(y),cs(y),b5(y).dataIndex=h,o._tickLabels.push(y)})}},t.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),h=a.get("inverse",!0);f(r.nextBtnPosition,"next",le(this._changeTimeline,this,h?"-":"+")),f(r.prevBtnPosition,"prev",le(this._changeTimeline,this,h?"+":"-")),f(r.playPosition,c?"stop":"play",le(this._handlePlayClick,this,!c),!0);function f(d,p,g,m){if(d){var y=Oi(pe(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-y/2,y,y],b=fpe(a,p+"Icon",_,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});b.ensureState("emphasis").style=u,n.add(b),cs(b)}}},t.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(h){h.draggable=!0,h.drift=le(u._handlePointerDrag,u),h.ondragend=le(u._handlePointerDragend,u),w5(h,u._progressLine,s,i,a,!0)},onUpdate:function(h){w5(h,u._progressLine,s,i,a)}};this._currentPointer=S5(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},t.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},t.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Pn(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(p)),[s,d]}var tm={min:Ie(em,"min"),max:Ie(em,"max"),average:Ie(em,"average"),median:Ie(em,"median")};function Lv(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!ype(t)&&!ee(t.coord)&&ee(i)){var a=f8(t,r,n,e);if(t=ye(t),t.type&&tm[t.type]&&a.baseAxis&&a.valueAxis){var o=Ne(i,a.baseAxis.dim),s=Ne(i,a.valueAxis.dim),l=tm[t.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!ee(i)){t.coord=[];var u=e.getBaseAxis();if(u&&t.type&&tm[t.type]){var c=n.getOtherAxis(u);c&&(t.value=v0(r,r.mapDimension(c.dim),t.type))}}else for(var h=t.coord,f=0;f<2;f++)tm[h[f]]&&(h[f]=v0(r,r.mapDimension(i[f]),h[f]));return t}}function f8(e,t,r,n){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=r.getAxis(_pe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function _pe(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function kv(e,t){return e&&e.containData&&t.coord&&!oC(t)?e.containData(t.coord):!0}function xpe(e,t,r){return e&&e.containZone&&t.coord&&r.coord&&!oC(t)&&!oC(r)?e.containZone(t.coord,r.coord):!0}function d8(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return ds(o,t[a])}:function(r,n,i,a){return ds(r.value,t[a])}}function v0(e,t,r){if(r==="average"){var n=0,i=0;return e.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var qb=Fe(),JA=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this.markerGroupMap=de()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){qb(s).keep=!1}),n.eachSeries(function(s){var l=Ma.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!qb(s).keep&&a.group.remove(s.group)}),bpe(n,o,this.type)},t.prototype.markKeep=function(r){qb(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;R(r,function(a){var o=Ma.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?Lj(l):Y2(l))})}})},t.type="marker",t}(gt);function bpe(e,t,r){e.eachSeries(function(n){var i=Ma.getMarkerModelFromSeries(n,r),a=t.get(n.id);if(i&&a&&a.group){var o=eu(i),s=o.z,l=o.zlevel;s_(a.group,s,l)}})}function C5(e,t,r){var n=t.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();e.each(function(s){var l=e.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,h=u?o?o.height:0:a,f=u&&o?o.x:0,d=u&&o?o.y:0,p,g=oe(l.get("x"),c)+f,m=oe(l.get("y"),h)+d;if(!isNaN(g)&&!isNaN(m))p=[g,m];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,s));else if(n){var y=e.get(n.dimensions[0],s),_=e.get(n.dimensions[1],s);p=n.dataToPoint([y,_])}isNaN(g)||(p[0]=g),isNaN(m)||(p[1]=m),e.setItemLayout(s,p)})}var Spe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ma.getMarkerModelFromSeries(a,"markPoint");o&&(C5(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new rp),h=wpe(o,r,n);n.setData(h),C5(n.getData(),r,a),h.each(function(f){var d=h.getItemModel(f),p=d.getShallow("symbol"),g=d.getShallow("symbolSize"),m=d.getShallow("symbolRotate"),y=d.getShallow("symbolOffset"),_=d.getShallow("symbolKeepAspect");if(me(p)||me(g)||me(m)||me(y)){var b=n.getRawValue(f),w=n.getDataParams(f);me(p)&&(p=p(b,w)),me(g)&&(g=g(b,w)),me(m)&&(m=m(b,w)),me(y)&&(y=y(b,w))}var C=d.getModel("itemStyle").getItemStyle(),M=d.get("z2"),A=Jv(l,"color");C.fill||(C.fill=A),h.setItemVisual(f,{z2:pe(M,0),symbol:p,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:_,style:C})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(f){f.traverse(function(d){Le(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markPoint",t}(JA);function wpe(e,t,r){var n;e?n=re(e&&e.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return J(J({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new $r(n,r),a=re(r.get("data"),Ie(Lv,t));e&&(a=et(a,Ie(kv,e)));var o=d8(!!e,n);return i.initData(a,null,o),i}function Tpe(e){e.registerComponentModel(mpe),e.registerComponentView(Spe),e.registerPreprocessor(function(t){QA(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var Cpe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(Ma),rm=Fe(),Mpe=function(e,t,r,n){var i=e.getData(),a;if(ee(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=Sr(n.yAxis,n.xAxis);else{var u=f8(n,i,t,e);s=u.valueAxis;var c=FM(i,u.valueDataDim);l=v0(i,c,o)}var h=s.dim==="x"?0:1,f=1-h,d=ye(n),p={coord:[]};d.type=null,d.coord=[],d.coord[f]=-1/0,p.coord[f]=1/0;var g=r.get("precision");g>=0&&qe(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[h]=p.coord[h]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[Lv(e,a[0]),Lv(e,a[1]),J({},a[2])];return m[2].type=m[2].type||null,Ee(m[2],m[0]),Ee(m[2],m[1]),m};function p0(e){return!isNaN(e)&&!isFinite(e)}function M5(e,t,r,n){var i=1-e,a=n.dimensions[e];return p0(t[i])&&p0(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function Ape(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(M5(1,r,n,e)||M5(0,r,n,e)))return!0}return kv(e,t[0])&&kv(e,t[1])}function Kb(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=oe(o.get("x"),i.getWidth()),u=oe(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,h=e.get(c[0],t),f=e.get(c[1],t);s=a.dataToPoint([h,f])}if(xs(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;p0(e.get(c[0],t))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):p0(e.get(c[1],t))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}e.setItemLayout(t,s)}var Lpe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ma.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=rm(o).from,u=rm(o).to;l.each(function(c){Kb(l,c,!0,a,i),Kb(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new yA);this.group.add(c.group);var h=kpe(o,r,n),f=h.from,d=h.to,p=h.line;rm(n).from=f,rm(n).to=d,n.setData(p);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),_=n.get("symbolOffset");ee(g)||(g=[g,g]),ee(m)||(m=[m,m]),ee(y)||(y=[y,y]),ee(_)||(_=[_,_]),h.from.each(function(w){b(f,w,!0),b(d,w,!1)}),p.each(function(w){var C=p.getItemModel(w),M=C.getModel("lineStyle").getLineStyle();p.setItemLayout(w,[f.getItemLayout(w),d.getItemLayout(w)]);var A=C.get("z2");M.stroke==null&&(M.stroke=f.getItemVisual(w,"style").fill),p.setItemVisual(w,{z2:pe(A,0),fromSymbolKeepAspect:f.getItemVisual(w,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(w,"symbolOffset"),fromSymbolRotate:f.getItemVisual(w,"symbolRotate"),fromSymbolSize:f.getItemVisual(w,"symbolSize"),fromSymbol:f.getItemVisual(w,"symbol"),toSymbolKeepAspect:d.getItemVisual(w,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(w,"symbolOffset"),toSymbolRotate:d.getItemVisual(w,"symbolRotate"),toSymbolSize:d.getItemVisual(w,"symbolSize"),toSymbol:d.getItemVisual(w,"symbol"),style:M})}),c.updateData(p),h.line.eachItemGraphicEl(function(w){Le(w).dataModel=n,w.traverse(function(C){Le(C).dataModel=n})});function b(w,C,M){var A=w.getItemModel(C);Kb(w,C,M,r,a);var k=A.getModel("itemStyle").getItemStyle();k.fill==null&&(k.fill=Jv(l,"color")),w.setItemVisual(C,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:pe(A.get("symbolOffset",!0),_[M?0:1]),symbolRotate:pe(A.get("symbolRotate",!0),y[M?0:1]),symbolSize:pe(A.get("symbolSize"),m[M?0:1]),symbol:pe(A.get("symbol",!0),g[M?0:1]),style:k})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t}(JA);function kpe(e,t,r){var n;e?n=re(e&&e.dimensions,function(u){var c=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return J(J({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new $r(n,r),a=new $r(n,r),o=new $r([],r),s=re(r.get("data"),Ie(Mpe,t,e,r));e&&(s=et(s,Ie(Ape,e)));var l=d8(!!e,n);return i.initData(re(s,function(u){return u[0]}),null,l),a.initData(re(s,function(u){return u[1]}),null,l),o.initData(re(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Ppe(e){e.registerComponentModel(Cpe),e.registerComponentView(Lpe),e.registerPreprocessor(function(t){QA(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var Dpe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(Ma),nm=Fe(),Ipe=function(e,t,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Lv(e,i),s=Lv(e,a),l=o.coord,u=s.coord;l[0]=Sr(l[0],-1/0),l[1]=Sr(l[1],-1/0),u[0]=Sr(u[0],1/0),u[1]=Sr(u[1],1/0);var c=W0([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function g0(e){return!isNaN(e)&&!isFinite(e)}function A5(e,t,r,n){var i=1-e;return g0(t[i])&&g0(r[i])}function Npe(e,t){var r=t.coord[0],n=t.coord[1],i={coord:r,x:t.x0,y:t.y0},a={coord:n,x:t.x1,y:t.y1};return xs(e,"cartesian2d")?r&&n&&(A5(1,r,n)||A5(0,r,n))?!0:xpe(e,i,a):kv(e,i)||kv(e,a)}function L5(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=oe(o.get(r[0]),i.getWidth()),u=oe(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=e.getValues(["x0","y0"],t),h=e.getValues(["x1","y1"],t),f=a.clampData(c),d=a.clampData(h),p=[];r[0]==="x0"?p[0]=f[0]>d[0]?h[0]:c[0]:p[0]=f[0]>d[0]?c[0]:h[0],r[1]==="y0"?p[1]=f[1]>d[1]?h[1]:c[1]:p[1]=f[1]>d[1]?c[1]:h[1],s=n.getMarkerPosition(p,r,!0)}else{var g=e.get(r[0],t),m=e.get(r[1],t),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(xs(a,"cartesian2d")){var _=a.getAxis("x"),b=a.getAxis("y"),g=e.get(r[0],t),m=e.get(r[1],t);g0(g)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):g0(m)&&(s[1]=b.toGlobalCoord(b.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var k5=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Epe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ma.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=re(k5,function(h){return L5(s,l,h,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new _e});this.group.add(c.group),this.markKeep(c);var h=Rpe(o,r,n);n.setData(h),h.each(function(f){var d=re(k5,function(D){return L5(h,f,D,r,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,m=p.getExtent(),y=g.getExtent(),_=[p.parse(h.get("x0",f)),p.parse(h.get("x1",f))],b=[g.parse(h.get("y0",f)),g.parse(h.get("y1",f))];Pn(_),Pn(b);var w=!(m[0]>_[1]||m[1]<_[0]||y[0]>b[1]||y[1]=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:q.size.m,align:"auto",backgroundColor:q.color.transparent,borderColor:q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:q.color.disabled,inactiveBorderColor:q.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:q.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:q.color.tertiary,borderWidth:1,borderColor:q.color.border},emphasis:{selectorLabel:{show:!0,color:q.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Ve),Qu=Ie,lC=R,im=_e,v8=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new im),this.group.add(this._selectorGroup=new im),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=sr(r,i).refContainer,h=r.getBoxLayoutParams(),f=r.get("padding"),d=St(h,c,f),p=this.layoutInner(r,o,d,a,l,u),g=St(be({width:p.width,height:p.height},h),c,f);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=r8(p,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=de(),h=n.get("selectedMode"),f=n.get("triggerEvent"),d=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&d.push(p.id)}),lC(n.getData(),function(p,g){var m=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` -`)){var _=new im;_.newline=!0,u.add(_);return}var b=i.getSeriesByName(y)[0];if(!c.get(y))if(b){var w=b.getData(),C=w.getVisual("legendLineStyle")||{},M=w.getVisual("legendIcon"),A=w.getVisual("style"),k=this._createItem(b,y,g,p,n,r,C,A,M,h,a);k.on("click",Qu(P5,y,null,a,d)).on("mouseover",Qu(uC,b.name,null,a,d)).on("mouseout",Qu(cC,b.name,null,a,d)),i.ssr&&k.eachChild(function(N){var D=Le(N);D.seriesIndex=b.seriesIndex,D.dataIndex=g,D.ssrType="legend"}),f&&k.eachChild(function(N){m.packEventData(N,n,b,g,y)}),c.set(y,!0)}else i.eachRawSeries(function(N){var D=this;if(!c.get(y)&&N.legendVisualProvider){var I=N.legendVisualProvider;if(!I.containName(y))return;var z=I.indexOfName(y),O=I.getItemVisual(z,"style"),V=I.getItemVisual(z,"legendIcon"),G=Zr(O.fill);G&&G[3]===0&&(G[3]=.2,O=J(J({},O),{fill:ii(G,"rgba")}));var F=this._createItem(N,y,g,p,n,r,{},O,V,h,a);F.on("click",Qu(P5,null,y,a,d)).on("mouseover",Qu(uC,null,y,a,d)).on("mouseout",Qu(cC,null,y,a,d)),i.ssr&&F.eachChild(function(Z){var B=Le(Z);B.seriesIndex=N.seriesIndex,B.dataIndex=g,B.ssrType="legend"}),f&&F.eachChild(function(Z){D.packEventData(Z,n,N,g,y)}),c.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Le(r).eventData=s},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();lC(r,function(u){var c=u.type,h=new Xe({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var f=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);vr(h,{normal:f,emphasis:d},{defaultText:u.title}),cs(h)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,h,f){var d=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),b=a.get("icon");c=b||c||"roundRect";var w=Bpe(c,a,l,u,d,m,f),C=new im,M=a.getModel("textStyle");if(me(r.getLegendIcon)&&(!b||b==="inherit"))C.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:y,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:_}));else{var A=b==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;C.add(jpe({itemWidth:p,itemHeight:g,icon:c,iconRotate:A,itemStyle:w.itemStyle,symbolKeepAspect:_}))}var k=s==="left"?p+5:-5,N=s,D=o.get("formatter"),I=n;se(D)&&D?I=D.replace("{name}",n??""):me(D)&&(I=D(n));var z=m?M.getTextColor():a.get("inactiveColor");C.add(new Xe({style:vt(M,{text:I,x:k,y:g/2,fill:z,align:N,verticalAlign:"middle"},{inheritColor:z})}));var O=new Be({shape:C.getBoundingRect(),style:{fill:"transparent"}}),V=a.getModel("tooltip");return V.get("show")&&So({el:O,componentModel:o,itemName:n,itemTooltipOption:V.option}),C.add(O),C.eachChild(function(G){G.silent=!0}),O.silent=!h,this.getContentGroup().add(C),cs(C),C.__legendDataIndex=i,C},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Bl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Bl("horizontal",u,r.get("selectorItemGap",!0));var f=u.getBoundingRect(),d=[-f.x,-f.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",_=g===0?"y":"x";s==="end"?d[g]+=c[m]+p:h[g]+=f[m]+p,d[1-g]+=c[y]/2-f[y]/2,u.x=d[0],u.y=d[1],l.x=h[0],l.y=h[1];var b={x:0,y:0};return b[m]=c[m]+p+f[m],b[y]=Math.max(c[y],f[y]),b[_]=Math.min(0,f[_]+d[1-g]),b}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(gt);function Bpe(e,t,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),lC(m,function(_,b){m[b]==="inherit"&&(m[b]=y[b])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:ah(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var f=t.getModel("lineStyle"),d=f.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),d.stroke=f.get("inactiveColor"),d.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function jpe(e){var t=e.icon||"roundRect",r=Ut(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=q.color.neutral00,r.style.lineWidth=2),r}function P5(e,t,r,n){cC(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),uC(e,t,r,n)}function p8(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;ni[o],m=[-d.x,-d.y];n||(m[a]=c[u]);var y=[0,0],_=[-p.x,-p.y],b=pe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var w=r.get("pageButtonPosition",!0);w==="end"?_[a]+=i[o]-p[o]:y[a]+=p[o]+b}_[1-a]+=d[s]/2-p[s]/2,c.setPosition(m),h.setPosition(y),f.setPosition(_);var C={x:0,y:0};if(C[o]=g?i[o]:d[o],C[s]=Math.max(d[s],p[s]),C[l]=Math.min(0,p[l]+_[1-a]),h.__rectSize=i[o],g){var M={x:0,y:0};M[o]=Math.max(i[o]-p[o]-b,0),M[s]=C[s],h.setClipPath(new Be({shape:M})),h.__rectSize=M[o]}else f.eachChild(function(k){k.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(r);return A.pageIndex!=null&&Qe(c,{x:A.contentPosition[0],y:A.contentPosition[1]},g?r:null),this._updatePageInfoView(r,A),C},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",f=n[h]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",f?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=f?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",se(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=Qb[o],l=Jb[o],u=this._findTargetItemIndex(n),c=i.children(),h=c[u],f=c.length,d=f?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var g=w(h);p.contentPosition[o]=-g.s;for(var m=u+1,y=g,_=g,b=null;m<=f;++m)b=w(c[m]),(!b&&_.e>y.s+a||b&&!C(b,y.s))&&(_.i>y.i?y=_:y=b,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),_=b;for(var m=u-1,y=g,_=g,b=null;m>=-1;--m)b=w(c[m]),(!b||!C(_,b.s))&&y.i<_.i&&(_=y,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=y.i),++p.pageCount,++p.pageIndex),y=b;return p;function w(M){if(M){var A=M.getBoundingRect(),k=A[l]+M[l];return{s:k,e:k+A[s],i:M.__legendDataIndex}}}function C(M,A){return M.e>=A&&M.s<=A+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(v8);function Wpe(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function Upe(e){ze(g8),e.registerComponentModel(Gpe),e.registerComponentView(Hpe),Wpe(e)}function Zpe(e){ze(g8),ze(Upe)}var $pe=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=Ps(Av.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Av),eL=Fe();function Ype(e,t,r){eL(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function Xpe(e,t){for(var r=eL(e).coordSysRecordMap,n=r.keys(),i=0;ia[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function ege(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=eL(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=de());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=JH(a);R(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,qpe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=de());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){m8(i,a);return}var c=Jpe(l,a,r);o.enable(c.controlType,c.opt),Dh(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var tge=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),Ype(i,r,{pan:le(eS.pan,this),zoom:le(eS.zoom,this),scrollMove:le(eS.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Xpe(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(ZA),eS={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=tS[t](null,[n.originX,n.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(bs(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:E5(function(e,t,r,n,i,a){var o=tS[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:E5(function(e,t,r,n,i,a){var o=tS[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return o.signal*(e[1]-e[0])*a.scrollDelta})};function E5(e){return function(t,r,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,n,i);if(bs(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var tS={grid:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function y8(e){$A(e),e.registerComponentModel($pe),e.registerComponentView(tge),ege(e)}var rge=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Ps(Av.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:q.color.accent10,borderRadius:0,backgroundColor:q.color.transparent,dataBackground:{lineStyle:{color:q.color.accent30,width:.5},areaStyle:{color:q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:q.color.accent40,width:.5},areaStyle:{color:q.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:q.color.neutral00,borderColor:q.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:q.color.tertiary},brushSelect:!0,brushStyle:{color:q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(Av),zf=Be,nge=1,rS=30,ige=7,Bf="horizontal",R5="vertical",age=5,oge=["line","bar","candlestick","scatter"],sge={easing:"cubicOut",duration:100,delay:0},lge=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=le(this._onBrush,this),this._onBrushEnd=le(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),Dh(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){fv(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new _e;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?ige:0,o=sr(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Bf?{right:o.width-s.x-s.width,top:o.height-rS-l-a,width:s.width,height:rS}:{right:l,top:s.y,width:rS,height:s.height},c=fu(r.option);R(["right","top","width","height"],function(f){c[f]==="ph"&&(c[f]=u[f])});var h=St(c,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===R5&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Bf&&!o?{scaleY:l?1:-1,scaleX:1}:i===Bf&&o?{scaleY:l?1:-1,scaleX:-1}:i===R5&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new zf({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new zf({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:le(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var h=o.getDataExtent(r.thisDim),f=o.getDataExtent(l),d=(f[1]-f[0])*.3;f=[f[0]-d,f[1]+d];var p=[0,n[1]],g=[0,n[0]],m=[[n[0],0],[0,0]],y=[],_=g[1]/Math.max(1,o.count()-1),b=n[0]/(h[1]-h[0]),w=r.thisAxis.type==="time",C=-_,M=Math.round(o.count()/n[0]),A;o.each([r.thisDim,l],function(z,O,V){if(M>0&&V%M){w||(C+=_);return}C=w?(+z-h[0])*b:C+_;var G=O==null||isNaN(O)||O==="",F=G?0:nt(O,f,p,!0);G&&!A&&V?(m.push([m[m.length-1][0],0]),y.push([y[y.length-1][0],0])):!G&&A&&(m.push([C,0]),y.push([C,0])),G||(m.push([C,F]),y.push([C,F])),A=G}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var k=this.dataZoomModel;function N(z){var O=k.getModel(z?"selectedDataBackground":"dataBackground"),V=new _e,G=new Or({shape:{points:u},segmentIgnoreThreshold:1,style:O.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),F=new Tr({shape:{points:c},segmentIgnoreThreshold:1,style:O.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return V.add(G),V.add(F),V}for(var D=0;D<3;D++){var I=N(D===1);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();R(l,function(u){if(!i&&!(n!==!0&&Ne(oge,u.get("type"))<0)){var c=a.getComponent(Ko(o),s).axis,h=uge(o),f,d=u.coordinateSystem;h!=null&&d.getOtherAxis&&(f=d.getOtherAxis(c).inverse),h=u.getData().mapDimension(h);var p=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:p,otherDim:h,otherAxisInverse:f}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,h=l.get("brushSelect"),f=n.filler=new zf({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new zf({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:nge,fill:q.color.transparent}})),R([0,1],function(b){var w=l.get("handleIcon");!Oy[w]&&w.indexOf("path://")<0&&w.indexOf("image://")<0&&(w="path://"+w);var C=Ut(w,-1,0,2,2,null,!0);C.attr({cursor:cge(this._orient),draggable:!0,drift:le(this._onDragMove,this,b),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1),z2:5});var M=C.getBoundingRect(),A=l.get("handleSize");this._handleHeight=oe(A,this._size[1]),this._handleWidth=M.width/M.height*this._handleHeight,C.setStyle(l.getModel("handleStyle").getItemStyle()),C.style.strokeNoScale=!0,C.rectHover=!0,C.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),cs(C);var k=l.get("handleColor");k!=null&&(C.style.fill=k),o.add(i[b]=C);var N=l.getModel("textStyle"),D=l.get("handleLabel")||{},I=D.show||!1;r.add(a[b]=new Xe({silent:!0,invisible:!I,style:vt(N,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:N.getTextColor(),font:N.getFont()}),z2:10}))},this);var d=f;if(h){var p=oe(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new Be({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),m=p*.8,y=n.moveHandleIcon=Ut(l.get("moveHandleIcon"),-m/2,-m/2,m,m,q.color.neutral00,!0);y.silent=!0,y.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new Be({invisible:!0,shape:{y:s[1]-_,height:p+_}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(d)}d.attr({draggable:!0,cursor:"default",drift:le(this._onDragMove,this,"all"),ondragstart:le(this._showDataInfo,this,!0),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[nt(r[0],[0,100],n,!0),nt(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];bs(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?nt(s.minSpan,l,o,!0):null,s.maxSpan!=null?nt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Pn([nt(a[0],o,l,!0),nt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Pn(i.slice()),o=this._size;R([0,1],function(d){var p=n.handles[d],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;cn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Te(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();bs(0,l,o,0,u.minSpan!=null?nt(u.minSpan,s,o,!0):null,u.maxSpan!=null?nt(u.maxSpan,s,o,!0):null),this._range=Pn([nt(l[0],o,s,!0),nt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(ho(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new zf({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?sge:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=JH(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},t.type="dataZoom.slider",t}(ZA);function uge(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function cge(e){return e==="vertical"?"ns-resize":"ew-resize"}function _8(e){e.registerComponentModel(rge),e.registerComponentView(lge),$A(e)}function hge(e){ze(y8),ze(_8)}var x8={get:function(e,t,r){var n=ye((fge[e]||{})[t]);return r&&ee(n)?n[n.length-1]:n}},fge={color:{active:["#006edd","#e0ffff"],inactive:[q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},O5=dr.mapVisual,dge=dr.eachVisual,vge=ee,z5=R,pge=Pn,gge=nt,m0=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&u8(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=le(r,this),this.controllerVisuals=iC(this.option.controller,n,r),this.targetVisuals=iC(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=xh(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return re(i,function(a){return a.componentIndex})},t.prototype.eachTargetSeries=function(r,n){R(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],ee(r)&&(r=r.slice(),u=!0);var c=n?r:u?[h(r[0]),h(r[1])]:h(r);if(se(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(me(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function h(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=pge([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Ee(a,i),Ee(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(h){vge(n.color)&&!h.inRange&&(h.inRange={color:n.color.slice().reverse()}),h.inRange=h.inRange||{color:r.get("gradientColor")}}function u(h,f,d){var p=h[f],g=h[d];p&&!g&&(g=h[d]={},z5(p,function(m,y){if(dr.isValidType(y)){var _=x8.get(y,"inactive",s);_!=null&&(g[y]=_,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(h){var f=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,d=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";z5(this.stateList,function(y){var _=this.itemSize,b=h[y];b||(b=h[y]={color:s?p:[p]}),b.symbol==null&&(b.symbol=f&&ye(f)||(s?m:[m])),b.symbolSize==null&&(b.symbolSize=d&&ye(d)||(s?_[0]:[_[0],_[0]])),b.symbol=O5(b.symbol,function(M){return M==="none"?m:M});var w=b.symbolSize;if(w!=null){var C=-1/0;dge(w,function(M){M>C&&(C=M)}),b.symbolSize=O5(w,function(M){return gge(M,[0,C],[0,_[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:q.color.transparent,borderColor:q.color.borderTint,contentColor:q.color.theme[0],inactiveColor:q.color.disabled,borderWidth:0,padding:q.size.m,textGap:10,precision:0,textStyle:{color:q.color.secondary}},t}(Ve),B5=[20,140],mge=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=B5[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=B5[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):ee(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=Pn((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=j5(this,"outOfRange",this.getExtent()),i=j5(this,"inRange",this.option.range.slice()),a=[];function o(d,p){a.push({value:d,color:r(d,p)})}for(var s=0,l=0,u=i.length,c=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new _e(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);yge([0,1],function(h){var f=o[h];f.setStyle("fill",n.handlesColor[h]),f.y=r[h];var d=ta(r[h],[0,l[1]],u,!0),p=this.getControllerVisual(d,"symbolSize");f.scaleX=f.scaleY=p/l[0],f.x=l[0]-p/2;var g=Ii(i.handleLabelPoints[h],hs(f,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;g[1]+=m}s[h].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var f={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",f),p=this.getControllerVisual(r,"symbolSize"),g=ta(r,s,u,!0),m=l[0]-p/2,y={x:h.x,y:h.y};h.y=g,h.x=m;var _=Ii(c.indicatorLabelPoint,hs(h,this.group)),b=c.indicatorLabel;b.attr("invisible",!1);var w=this._applyTransform("left",c.mainGroup),C=this._orient,M=C==="horizontal";b.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:M?w:"middle",align:M?"center":w});var A={x:m,y:g,style:{fill:d}},k={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var N={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(A,N),b.animateTo(k,N)}else h.attr(A),b.attr(k);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var I=0;Io[1]&&(h[1]=1/0),n&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",l):h[1]===1/0?this._showIndicator(c,h[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var f=this._hoverLinkDataIndices,d=[];(n||H5(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var p=tq(f,d);this._dispatchHighDown("downplay",zm(p[0],i)),this._dispatchHighDown("highlight",zm(p[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Pl(r.target,function(l){var u=Le(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function Mge(e,t,r,n){for(var i=t.targetVisuals[n],a=dr.prepareVisualTypes(i),o={color:Jv(e.getData(),"color")},s=0,l=a.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(wge,Tge),R(Cge,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(Age))}function T8(e){e.registerComponentModel(mge),e.registerComponentView(bge),w8(e)}var Lge=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],kge[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ye(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=re(this._pieceList,function(l){return l=ye(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=dr.listVisualTypes(),a=this.isCategory();R(r.pieces,function(s){R(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),R(n,function(s,l){var u=!1;R(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&R(this.stateList,function(c){(r[c]||(r[c]={}))[l]=x8.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,R(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;R(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=ye(r)},t.prototype.getValueState=function(r){var n=dr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=dr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,h){var f=a.getRepresentValue({interval:c});h||(h=a.getValueState(f));var d=r(f,h);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return R(s,function(c){var h=c.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=Ps(m0.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(m0),kge={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function $5(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var Pge=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=Sr(n.get("showLabel",!0),!u),h=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),R(l.viewPieceList,function(f){var d=f.piece,p=new _e;p.onclick=le(this._onItemClick,this,d),this._enableHoverLink(p,f.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(p,g,[0,0,s[0],s[1]],h),c){var m=this.visualMapModel.getValueState(g),y=a.get("align")||o;p.add(new Xe({style:vt(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:d.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:pe(a.get("opacity"),m==="outOfRange"?.5:1)}),silent:h}))}r.add(p)},this),u&&this._renderEndsText(r,u[1],s,c,o),Bl(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:zm(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return S8(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Xe({style:vt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=re(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i,a){var o=Ut(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ye(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,R(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(b8);function C8(e){e.registerComponentModel(Lge),e.registerComponentView(Pge),w8(e)}function Dge(e){ze(T8),ze(C8)}var Ige=function(){function e(t){this._thumbnailModel=t}return e.prototype.reset=function(t){this._renderVersion=t.getMainProcessVersion()},e.prototype.renderContent=function(t){var r=t.api.getViewOfComponentModel(this._thumbnailModel);r&&(t.group.silent=!0,r.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:Xj(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(t,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},e}(),Nge=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventAutoZ=!0,r}return t.prototype.optionUpdated=function(r,n){this._updateBridge()},t.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new Ige(this);if(this._target=null,this.ecModel.eachSeries(function(i){yR(i,null)}),this.shouldShow()){var n=this.getTarget();yR(n.baseMapProvider,r)}},t.prototype.shouldShow=function(){return this.getShallow("show",!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},t.type="thumbnail",t.layoutMode="box",t.dependencies=["series","geo"],t.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:q.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:q.color.neutral30,borderColor:q.color.neutral40,opacity:.3},z:10},t}(Ve),Ege=function(e){Y(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new mu),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||q.color.neutral00);var l=sr(r,i).refContainer,u=St(pV(r,!0),l),c=s.lineWidth||0,h=this._contentRect=Jl(u.clone(),c/2,!0,!0),f=new _e;a.add(f),f.setClipPath(new Be({shape:h.plain()}));var d=this._targetGroup=new _e;f.add(d);var p=u.plain();p.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new Be({style:s,shape:p,silent:!1,cursor:"grab"}));var g=r.getModel("windowStyle"),m=g.getShallow("borderRadius",!0);f.add(this._windowRect=new Be({shape:{x:0,y:0,width:0,height:0,r:m},style:g.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),X5(r,this)},t.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),X5(this._model,this))},t.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=St({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},t.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=ui([],r.targetTrans),i=Pi([],this._coordSys.transform,n);this._transThisToTarget=ui([],i);var a=r.viewportRect;a?a=a.clone():a=new Ce(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(be({r:s},a))}},t.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new gu(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",le(this._onPan,this)).on("zoom",le(this._onZoom,this))},t.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.oldX,r.oldY],n),a=Ot([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(Y5(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},t.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.originX,r.originY],n);this._api.dispatchAction(Y5(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[1]}))}},t.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type="thumbnail",t}(gt);function Y5(e,t){var r=e.mainType==="series"?e.subType+"Roam":e.mainType+"Roam",n={type:r};return n[e.mainType+"Id"]=e.id,J(n,t),n}function X5(e,t){var r=eu(e);s_(t.group,r.z,r.zlevel)}function Rge(e){e.registerComponentModel(Nge),e.registerComponentView(Ege)}var Oge={label:{enabled:!0},decal:{show:!1}},q5=Fe(),zge={};function Bge(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=ye(Oge);Ee(n.label,e.getLocaleModel().get("aria"),!1),Ee(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var h=de();e.eachSeries(function(f){if(!f.isColorBySeries()){var d=h.get(f.type);d||(d={},h.set(f.type,d)),q5(f).scope=d}}),e.eachRawSeries(function(f){if(e.isSeriesFiltered(f))return;if(me(f.enableAriaDecal)){f.enableAriaDecal();return}var d=f.getData();if(f.isColorBySeries()){var _=qw(f.ecModel,f.name,zge,e.getSeriesCount()),b=d.getVisual("decal");d.setVisual("decal",w(b,_))}else{var p=f.getRawData(),g={},m=q5(f).scope;d.each(function(C){var M=d.getRawIndex(C);g[M]=C});var y=p.count();p.each(function(C){var M=g[C],A=p.getName(C)||C+"",k=qw(f.ecModel,A,m,y),N=d.getItemVisual(M,"decal");d.setItemVisual(M,"decal",w(N,k))})}function w(C,M){var A=C?J(J({},M),C):M;return A.dirty=!0,A}})}}function a(){var u=t.getZr().dom;if(u){var c=e.getLocaleModel().get("aria"),h=r.getModel("label");if(h.option=be(h.option,c),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var f=e.getSeriesCount(),d=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,g=Math.min(f,p),m;if(!(f<1)){var y=s();if(y){var _=h.get(["general","withTitle"]);m=o(_,{title:y})}else m=h.get(["general","withoutTitle"]);var b=[],w=f>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);m+=o(w,{seriesCount:f}),e.eachSeries(function(k,N){if(N1?h.get(["series","multiple",z]):h.get(["series","single",z]),D=o(D,{seriesId:k.seriesIndex,seriesName:k.get("name"),seriesType:l(k.subType)});var O=k.getData();if(O.count()>d){var V=h.get(["data","partialData"]);D+=o(V,{displayCnt:d})}else D+=h.get(["data","allData"]);for(var G=h.get(["data","separator","middle"]),F=h.get(["data","separator","end"]),Z=h.get(["data","excludeDimensionId"]),B=[],W=0;W":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Fge=function(){function e(t){var r=this._condVal=se(t)?new RegExp(t):_4(t)?t:null;if(r==null){var n="";it(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return se(r)?this._condVal.test(t):qe(r)?this._condVal.test(t+""):!1},e}(),Gge=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),Hge=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r2&&n.push(i),i=[O,V]}function c(O,V,G,F){Mc(O,G)&&Mc(V,F)||i.push(O,V,G,F,G,F)}function h(O,V,G,F,Z,B){var W=Math.abs(V-O),H=Math.tan(W/4)*4/3,X=Vk:I2&&n.push(i),n}function fC(e,t,r,n,i,a,o,s,l,u){if(Mc(e,r)&&Mc(t,n)&&Mc(i,o)&&Mc(a,s)){l.push(o,s);return}var c=2/u,h=c*c,f=o-e,d=s-t,p=Math.sqrt(f*f+d*d);f/=p,d/=p;var g=r-e,m=n-t,y=i-o,_=a-s,b=g*g+m*m,w=y*y+_*_;if(b=0&&k=0){l.push(o,s);return}var N=[],D=[];ys(e,r,i,o,.5,N),ys(t,n,a,s,.5,D),fC(N[0],D[0],N[1],D[1],N[2],D[2],N[3],D[3],l,u),fC(N[4],D[4],N[5],D[5],N[6],D[6],N[7],D[7],l,u)}function nme(e,t){var r=hC(e),n=[];t=t||1;for(var i=0;i0)for(var u=0;uMath.abs(u),h=A8([l,u],c?0:1,t),f=(c?s:u)/h.length,d=0;di,o=A8([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",h=e[s]/o.length,f=0;f1?null:new Te(g*l+e,g*u+t)}function ome(e,t,r){var n=new Te;Te.sub(n,r,t),n.normalize();var i=new Te;Te.sub(i,e,t);var a=i.dot(n);return a}function ec(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function sme(e,t,r){for(var n=e.length,i=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),sme(t,u,c)}function y0(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);y0(e,a[0],i,n),y0(e,a[1],r-i,n)}return n}function lme(e,t){for(var r=[],n=0;n0;u/=2){var c=0,h=0;(e&u)>0&&(c=1),(t&u)>0&&(h=1),s+=u*u*(3*c^h),h===0&&(c===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function b0(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=re(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),r=Math.min(h,r),n=Math.max(c,n),i=Math.max(h,i),[c,h]}),o=re(a,function(s,l){return{cp:s,z:mme(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function P8(e){return hme(e.path,e.count)}function dC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function yme(e,t,r){var n=[];function i(C){for(var M=0;M=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var xme={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;az(e)&&(u=e,c=t),az(t)&&(u=t,c=e);function h(y,_,b,w,C){var M=y.many,A=y.one;if(M.length===1&&!C){var k=_?M[0]:A,N=_?A:M[0];if(_0(k))h({many:[k],one:N},!0,b,w,!0);else{var D=s?be({delay:s(b,w)},l):l;rL(k,N,D),a(k,N,k,N,D)}}else for(var I=be({dividePath:xme[r],individualDelay:s&&function(Z,B,W,H){return s(Z+b,w)}},l),z=_?yme(M,A,I):_me(A,M,I),O=z.fromIndividuals,V=z.toIndividuals,G=O.length,F=0;Ft.length,d=u?oz(c,u):oz(f?t:e,[f?e:t]),p=0,g=0;gD8))for(var a=n.getIndices(),o=0;o0&&M.group.traverse(function(k){k instanceof Ue&&!k.animators.length&&k.animateFrom({style:{opacity:0}},A)})})}function hz(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function fz(e){return ee(e)?e.sort().join(","):e}function jo(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function Ame(e,t){var r=de(),n=de(),i=de();return R(e.oldSeries,function(a,o){var s=e.oldDataGroupIds[o],l=e.oldData[o],u=hz(a),c=fz(u);n.set(c,{dataGroupId:s,data:l}),ee(u)&&R(u,function(h){i.set(h,{key:c,dataGroupId:s,data:l})})}),R(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=hz(a),u=fz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:jo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:jo(s),data:s}]});else if(ee(l)){var h=[];R(l,function(p){var g=n.get(p);g.data&&h.push({dataGroupId:g.dataGroupId,divide:jo(g.data),data:g.data})}),h.length&&r.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:jo(s)}]})}else{var f=i.get(l);if(f){var d=r.get(f.key);d||(d={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:jo(f.data)}],newSeries:[]},r.set(f.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:jo(s)})}}}}),r}function dz(e,t){for(var r=0;r=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:jo(t.oldData[s]),groupIdDim:o.dimension})}),R(pt(e.to),function(o){var s=dz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:jo(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&I8(i,a,n)}function kme(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){R(pt(n.seriesTransition),function(i){R(pt(i.to),function(a){for(var o=n.updatedSeries,s=0;so.vmin?r+=o.vmin-n+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=t-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=t-n),r},e.prototype.unelapse=function(t){for(var r=vz,n=pz,i=!0,a=0,o=0;ol?a=s.vmin+(t-l)/(u-l)*(s.vmax-s.vmin):a=n+t-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+t-r),a},e}();function Dme(){return new Pme}var vz=0,pz=0;function Ime(e,t){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};R(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=nL(s,t);if(u){var c=u.vmin!==s.vmin,h=u.vmax!==s.vmax,f=u.vmax-u.vmin;if(!(c&&h))if(c||h){var d=c?"S":"E";a[d][l.type].has=!0,a[d][l.type].span=f,a[d][l.type].inExtFrac=f/(s.vmax-s.vmin),a[d][l.type].val=l.val}else n[l.type].span+=f,n[l.type].val+=l.val}});var o=r*(0+(t[1]-t[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));R(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function Nme(e,t,r,n,i,a){e!=="no"&&R(r,function(o){var s=nL(o,a);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],c=n(u),h=i*3/4;c>s.vmin-h&&ct[0]&&r=0&&o<1-1e-5}R(e,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:ye(o),vmin:t(o.start),vmax:t(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(se(o.gap)){var u=kn(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var h=t(o.gap);(!isFinite(h)||h<0)&&(h=0),s.gapParsed.type="tpAbs",s.gapParsed.val=h}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&R(["vmin","vmax"],function(d){s[d]<0&&(s[d]=0)}),s.vmin>s.vmax){var f=s.vmax;s.vmax=s.vmin,s.vmin=f}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return R(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function iL(e,t){return pC(t)===pC(e)}function pC(e){return e.start+"_\0_"+e.end}function Rme(e,t,r){var n=[];R(e,function(a,o){var s=t(a);s&&s.type==="vmin"&&n.push([o])}),R(e,function(a,o){var s=t(a);if(s&&s.type==="vmax"){var l=As(n,function(u){return iL(t(e[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return R(n,function(a){a.length===2&&i.push(r?a:[e[a[0]],e[a[1]]])}),i}function Ome(e,t,r,n){var i,a;if(e.break){var o=e.break.parsedBreak,s=As(r,function(h){return iL(h.breakOption,e.break.parsedBreak.breakOption)}),l=n(Math.pow(t,o.vmin),s.vmin),u=n(Math.pow(t,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Ht(Math.pow(t,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:e.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[e.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function zme(e,t,r){var n={noNegative:!0},i=vC(e,r,n),a=vC(e,r,n),o=Math.log(t);return a.breaks=re(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var Bme={vmin:"start",vmax:"end"};function jme(e,t){return t&&(e=e||{},e.break={type:Bme[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function Vme(){lQ({createScaleBreakContext:Dme,pruneTicksByBreak:Nme,addBreaksToTicks:Eme,parseAxisBreakOption:vC,identifyAxisBreak:iL,serializeAxisBreakIdentifier:pC,retrieveAxisBreakPairs:Rme,getTicksLogTransformBreak:Ome,logarithmicParseBreaksFromOption:zme,makeAxisLabelFormatterParamBreak:jme})}var gz=Fe();function Fme(e,t){var r=As(e,function(n){return Xt().identifyAxisBreak(n.parsedBreak.breakOption,t.breakOption)});return r||e.push(r={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),r}function Gme(e){R(e,function(t){return t.shouldRemove=!0})}function Hme(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function Wme(e,t,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Xt())return;var o=Xt().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(N){return N.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var h=s.get("expandOnClick"),f=s.get("zigzagZ"),d=s.getModel("itemStyle"),p=d.getItemStyle(),g=p.stroke,m=p.lineWidth,y=p.lineDash,_=p.fill,b=new _e({ignoreModelZ:!0}),w=a.isHorizontal(),C=gz(t).visualList||(gz(t).visualList=[]);Gme(C);for(var M=function(N){var D=o[N][0].break.parsedBreak,I=[];I[0]=a.toGlobalCoord(a.dataToCoord(D.vmin,!0)),I[1]=a.toGlobalCoord(a.dataToCoord(D.vmax,!0)),I[1]=B;ve&&(ne=B);var Ge=[],xe=[];Ge[F]=I,xe[F]=z,!ue&&!ve&&(Ge[F]+=K?-l:l,xe[F]-=K?l:-l),Ge[Z]=ne,xe[Z]=ne,H.push(Ge),X.push(xe);var ge=void 0;if(ie_[1]&&_.reverse(),{coordPair:_,brkId:Xt().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(m,y){return m.coordPair[0]-y.coordPair[0]});for(var u=o[0],c=null,h=0;h=0?l[0].width:l[1].width),f=(h+c.x)/2-u.x,d=Math.min(f,f-c.x),p=Math.max(f,f-c.x),g=p<0?p:d>0?d:0;s=(f-g)/c.x}var m=new Te,y=new Te;Te.scale(m,n,-s),Te.scale(y,n,1-s),gT(r[0],m),gT(r[1],y)}function $me(e,t){var r={breaks:[]};return R(t.breaks,function(n){if(n){var i=As(e.get("breaks",!0),function(s){return Xt().identifyAxisBreak(s,n)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===y_?!0:a===J6?!1:a===eG?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function Yme(){Hie({adjustBreakLabelPair:Zme,buildAxisBreakLine:Ume,rectCoordBuildBreakAxis:Wme,updateModelAxisBreak:$me})}function Xme(e){Xie(e),Vme(),Yme()}function qme(){gae(Kme)}function Kme(e,t){R(e,function(r){if(!r.model.get(["axisLabel","inside"])){var n=Qme(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);t[i]-=n[i]+a,r.position==="top"?t.y+=n.height+a:r.position==="left"&&(t.x+=n.width+a)}}})}function Qme(e){var t=e.model,r=e.scale;if(!t.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof oh?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=Eh(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function pye(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function gye(e){return e==="ROUTER"||e==="ROUTER_LATE"?30:e==="REPEATER"||e==="TRACKER"?25:e==="CLIENT_MUTE"?7:e==="CLIENT_BASE"?12:15}function mye({nodes:e,edges:t,selectedNodeId:r,onSelectNode:n}){const i=U.useRef(null),[a,o]=U.useState("connected"),s=U.useMemo(()=>{const m=new Set;return t.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[t]),l=U.useMemo(()=>{let m=e;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>_z.includes(y.role))),m},[e,a,s]),u=U.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=U.useMemo(()=>t.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[t,u]),h=U.useMemo(()=>{const m=new Set;return r!==null&&c.forEach(y=>{y.from_node===r&&m.add(y.to_node),y.to_node===r&&m.add(y.from_node)}),m},[r,c]),f=U.useMemo(()=>{const m=l.map(_=>{const b=pye(_.latitude),w=yz[b%yz.length],C=_z.includes(_.role),M=_.node_num===r,A=h.has(_.node_num),k=r===null||M||A;return{id:String(_.node_num),name:_.short_name,value:_.node_num,symbolSize:gye(_.role),itemStyle:{color:C?w:"#111827",borderColor:w,borderWidth:C?0:2,opacity:k?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:k?"#94a3b8":"#94a3b820"},nodeNum:_.node_num,longName:_.long_name,role:_.role}}),y=c.map(_=>{const b=r===null||_.from_node===r||_.to_node===r;return{source:String(_.from_node),target:String(_.to_node),value:_.snr,lineStyle:{color:vye(_.snr),width:b&&r!==null?2:1,opacity:r===null?.4:b?.6:.04}}});return{nodes:m,links:y}},[l,c,r,h]),d=U.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:m=>{if(m.data&&m.data.longName){const y=m.data;return`${y.name}
${y.longName}
Role: ${y.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:f.nodes,links:f.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[f]),p=U.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=U.useMemo(()=>({click:p}),[p]);return U.useEffect(()=>{var y;const m=(y=i.current)==null?void 0:y.getEchartsInstance();m&&m.setOption(d,{notMerge:!1,lazyUpdate:!0})},[d]),S.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[S.jsx(dye,{ref:i,option:d,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),S.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[S.jsx(x2,{size:14,className:"text-slate-500"}),S.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:y})=>S.jsx("button",{onClick:()=>o(m),className:`px-2 py-1 text-xs rounded transition-colors ${a===m?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:y},m))}),S.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),S.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[S.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),S.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(m=>S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),S.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),S.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[S.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),S.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),S.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function R8(e,t){const r=U.useRef(t);U.useEffect(function(){t!==r.current&&e.attributionControl!=null&&(r.current!=null&&e.attributionControl.removeAttribution(r.current),t!=null&&e.attributionControl.addAttribution(t)),r.current=t},[e,t])}function yye(e,t,r){t.center!==r.center&&e.setLatLng(t.center),t.radius!=null&&t.radius!==r.radius&&e.setRadius(t.radius)}const _ye=1;function xye(e){return Object.freeze({__version:_ye,map:e})}function O8(e,t){return Object.freeze({...e,...t})}const z8=U.createContext(null),B8=z8.Provider;function P_(){const e=U.useContext(z8);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function bye(e){function t(r,n){const{instance:i,context:a}=e(r).current;return U.useImperativeHandle(n,()=>i),r.children==null?null:Vc.createElement(B8,{value:a},r.children)}return U.forwardRef(t)}function Sye(e){function t(r,n){const[i,a]=U.useState(!1),{instance:o}=e(r,a).current;U.useImperativeHandle(n,()=>o),U.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?VB.createPortal(r.children,s):null}return U.forwardRef(t)}function wye(e){function t(r,n){const{instance:i}=e(r).current;return U.useImperativeHandle(n,()=>i),null}return U.forwardRef(t)}function lL(e,t){const r=U.useRef();U.useEffect(function(){return t!=null&&e.instance.on(t),r.current=t,function(){r.current!=null&&e.instance.off(r.current),r.current=null}},[e,t])}function D_(e,t){const r=e.pane??t.pane;return r?{...e,pane:r}:e}function Tye(e,t){return function(n,i){const a=P_(),o=e(D_(n,a),a);return R8(a.map,n.attribution),lL(o.current,n.eventHandlers),t(o.current,a,n,i),o}}var yC={exports:{}};/* @preserve - * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(r,n){n(t)})(dU,function(r){var n="1.9.4";function i(v){var x,T,P,E;for(T=1,P=arguments.length;T"u"||!L||!L.Mixin)){v=b(v)?v:[v];for(var x=0;x0?Math.floor(v):Math.ceil(v)};B.prototype={clone:function(){return new B(this.x,this.y)},add:function(v){return this.clone()._add(H(v))},_add:function(v){return this.x+=v.x,this.y+=v.y,this},subtract:function(v){return this.clone()._subtract(H(v))},_subtract:function(v){return this.x-=v.x,this.y-=v.y,this},divideBy:function(v){return this.clone()._divideBy(v)},_divideBy:function(v){return this.x/=v,this.y/=v,this},multiplyBy:function(v){return this.clone()._multiplyBy(v)},_multiplyBy:function(v){return this.x*=v,this.y*=v,this},scaleBy:function(v){return new B(this.x*v.x,this.y*v.y)},unscaleBy:function(v){return new B(this.x/v.x,this.y/v.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=W(this.x),this.y=W(this.y),this},distanceTo:function(v){v=H(v);var x=v.x-this.x,T=v.y-this.y;return Math.sqrt(x*x+T*T)},equals:function(v){return v=H(v),v.x===this.x&&v.y===this.y},contains:function(v){return v=H(v),Math.abs(v.x)<=Math.abs(this.x)&&Math.abs(v.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function H(v,x,T){return v instanceof B?v:b(v)?new B(v[0],v[1]):v==null?v:typeof v=="object"&&"x"in v&&"y"in v?new B(v.x,v.y):new B(v,x,T)}function X(v,x){if(v)for(var T=x?[v,x]:v,P=0,E=T.length;P=this.min.x&&T.x<=this.max.x&&x.y>=this.min.y&&T.y<=this.max.y},intersects:function(v){v=K(v);var x=this.min,T=this.max,P=v.min,E=v.max,j=E.x>=x.x&&P.x<=T.x,$=E.y>=x.y&&P.y<=T.y;return j&&$},overlaps:function(v){v=K(v);var x=this.min,T=this.max,P=v.min,E=v.max,j=E.x>x.x&&P.xx.y&&P.y=x.lat&&E.lat<=T.lat&&P.lng>=x.lng&&E.lng<=T.lng},intersects:function(v){v=ie(v);var x=this._southWest,T=this._northEast,P=v.getSouthWest(),E=v.getNorthEast(),j=E.lat>=x.lat&&P.lat<=T.lat,$=E.lng>=x.lng&&P.lng<=T.lng;return j&&$},overlaps:function(v){v=ie(v);var x=this._southWest,T=this._northEast,P=v.getSouthWest(),E=v.getNorthEast(),j=E.lat>x.lat&&P.latx.lng&&P.lng1,tW=function(){var v=!1;try{var x=Object.defineProperty({},"passive",{get:function(){v=!0}});window.addEventListener("testPassiveEventSupport",h,x),window.removeEventListener("testPassiveEventSupport",h,x)}catch{}return v}(),rW=function(){return!!document.createElement("canvas").getContext}(),E_=!!(document.createElementNS&&tt("svg").createSVGRect),nW=!!E_&&function(){var v=document.createElement("div");return v.innerHTML="",(v.firstChild&&v.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),iW=!E_&&function(){try{var v=document.createElement("div");v.innerHTML='';var x=v.firstChild;return x.style.behavior="url(#default#VML)",x&&typeof x.adj=="object"}catch{return!1}}(),aW=navigator.platform.indexOf("Mac")===0,oW=navigator.platform.indexOf("Linux")===0;function Gi(v){return navigator.userAgent.toLowerCase().indexOf(v)>=0}var Re={ie:gr,ielt9:zr,edge:Vi,webkit:Fi,android:_u,android23:fL,androidStock:U8,opera:I_,chrome:dL,gecko:vL,safari:Z8,phantom:pL,opera12:gL,win:$8,ie3d:mL,webkit3d:N_,gecko3d:yL,any3d:Y8,mobile:jh,mobileWebkit:X8,mobileWebkit3d:q8,msPointer:_L,pointer:xL,touch:K8,touchNative:bL,mobileOpera:Q8,mobileGecko:J8,retina:eW,passiveEvents:tW,canvas:rW,svg:E_,vml:iW,inlineSvg:nW,mac:aW,linux:oW},SL=Re.msPointer?"MSPointerDown":"pointerdown",wL=Re.msPointer?"MSPointerMove":"pointermove",TL=Re.msPointer?"MSPointerUp":"pointerup",CL=Re.msPointer?"MSPointerCancel":"pointercancel",R_={touchstart:SL,touchmove:wL,touchend:TL,touchcancel:CL},ML={touchstart:fW,touchmove:lp,touchend:lp,touchcancel:lp},xu={},AL=!1;function sW(v,x,T){return x==="touchstart"&&hW(),ML[x]?(T=ML[x].bind(this,T),v.addEventListener(R_[x],T,!1),T):(console.warn("wrong event specified:",x),h)}function lW(v,x,T){if(!R_[x]){console.warn("wrong event specified:",x);return}v.removeEventListener(R_[x],T,!1)}function uW(v){xu[v.pointerId]=v}function cW(v){xu[v.pointerId]&&(xu[v.pointerId]=v)}function LL(v){delete xu[v.pointerId]}function hW(){AL||(document.addEventListener(SL,uW,!0),document.addEventListener(wL,cW,!0),document.addEventListener(TL,LL,!0),document.addEventListener(CL,LL,!0),AL=!0)}function lp(v,x){if(x.pointerType!==(x.MSPOINTER_TYPE_MOUSE||"mouse")){x.touches=[];for(var T in xu)x.touches.push(xu[T]);x.changedTouches=[x],v(x)}}function fW(v,x){x.MSPOINTER_TYPE_TOUCH&&x.pointerType===x.MSPOINTER_TYPE_TOUCH&&Mr(x),lp(v,x)}function dW(v){var x={},T,P;for(P in v)T=v[P],x[P]=T&&T.bind?T.bind(v):T;return v=x,x.type="dblclick",x.detail=2,x.isTrusted=!1,x._simulated=!0,x}var vW=200;function pW(v,x){v.addEventListener("dblclick",x);var T=0,P;function E(j){if(j.detail!==1){P=j.detail;return}if(!(j.pointerType==="mouse"||j.sourceCapabilities&&!j.sourceCapabilities.firesTouchEvents)){var $=NL(j);if(!($.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!$.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var Q=Date.now();Q-T<=vW?(P++,P===2&&x(dW(j))):P=1,T=Q}}}return v.addEventListener("click",E),{dblclick:x,simDblclick:E}}function gW(v,x){v.removeEventListener("dblclick",x.dblclick),v.removeEventListener("click",x.simDblclick)}var O_=hp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Vh=hp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),kL=Vh==="webkitTransition"||Vh==="OTransition"?Vh+"End":"transitionend";function PL(v){return typeof v=="string"?document.getElementById(v):v}function Fh(v,x){var T=v.style[x]||v.currentStyle&&v.currentStyle[x];if((!T||T==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(v,null);T=P?P[x]:null}return T==="auto"?null:T}function ft(v,x,T){var P=document.createElement(v);return P.className=x||"",T&&T.appendChild(P),P}function It(v){var x=v.parentNode;x&&x.removeChild(v)}function up(v){for(;v.firstChild;)v.removeChild(v.firstChild)}function bu(v){var x=v.parentNode;x&&x.lastChild!==v&&x.appendChild(v)}function Su(v){var x=v.parentNode;x&&x.firstChild!==v&&x.insertBefore(v,x.firstChild)}function z_(v,x){if(v.classList!==void 0)return v.classList.contains(x);var T=cp(v);return T.length>0&&new RegExp("(^|\\s)"+x+"(\\s|$)").test(T)}function Je(v,x){if(v.classList!==void 0)for(var T=p(x),P=0,E=T.length;P0?2*window.devicePixelRatio:1;function RL(v){return Re.edge?v.wheelDeltaY/2:v.deltaY&&v.deltaMode===0?-v.deltaY/_W:v.deltaY&&v.deltaMode===1?-v.deltaY*20:v.deltaY&&v.deltaMode===2?-v.deltaY*60:v.deltaX||v.deltaZ?0:v.wheelDelta?(v.wheelDeltaY||v.wheelDelta)/2:v.detail&&Math.abs(v.detail)<32765?-v.detail*20:v.detail?v.detail/-32765*60:0}function X_(v,x){var T=x.relatedTarget;if(!T)return!0;try{for(;T&&T!==v;)T=T.parentNode}catch{return!1}return T!==v}var xW={__proto__:null,on:Ke,off:Tt,stopPropagation:Rs,disableScrollPropagation:Y_,disableClickPropagation:Uh,preventDefault:Mr,stop:Os,getPropagationPath:NL,getMousePosition:EL,getWheelDelta:RL,isExternalTarget:X_,addListener:Ke,removeListener:Tt},OL=Z.extend({run:function(v,x,T,P){this.stop(),this._el=v,this._inProgress=!0,this._duration=T||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=Es(v),this._offset=x.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=I(this._animate,this),this._step()},_step:function(v){var x=+new Date-this._startTime,T=this._duration*1e3;xthis.options.maxZoom)?this.setZoom(v):this},panInsideBounds:function(v,x){this._enforcingBounds=!0;var T=this.getCenter(),P=this._limitCenter(T,this._zoom,ie(v));return T.equals(P)||this.panTo(P,x),this._enforcingBounds=!1,this},panInside:function(v,x){x=x||{};var T=H(x.paddingTopLeft||x.padding||[0,0]),P=H(x.paddingBottomRight||x.padding||[0,0]),E=this.project(this.getCenter()),j=this.project(v),$=this.getPixelBounds(),Q=K([$.min.add(T),$.max.subtract(P)]),te=Q.getSize();if(!Q.contains(j)){this._enforcingBounds=!0;var ae=j.subtract(Q.getCenter()),Ae=Q.extend(j).getSize().subtract(te);E.x+=ae.x<0?-Ae.x:Ae.x,E.y+=ae.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(E),x),this._enforcingBounds=!1}return this},invalidateSize:function(v){if(!this._loaded)return this;v=i({animate:!1,pan:!0},v===!0?{animate:!0}:v);var x=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var T=this.getSize(),P=x.divideBy(2).round(),E=T.divideBy(2).round(),j=P.subtract(E);return!j.x&&!j.y?this:(v.animate&&v.pan?this.panBy(j):(v.pan&&this._rawPanBy(j),this.fire("move"),v.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:x,newSize:T}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(v){if(v=this._locateOptions=i({timeout:1e4,watch:!1},v),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var x=o(this._handleGeolocationResponse,this),T=o(this._handleGeolocationError,this);return v.watch?this._locationWatchId=navigator.geolocation.watchPosition(x,T,v):navigator.geolocation.getCurrentPosition(x,T,v),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(v){if(this._container._leaflet_id){var x=v.code,T=v.message||(x===1?"permission denied":x===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:x,message:"Geolocation error: "+T+"."})}},_handleGeolocationResponse:function(v){if(this._container._leaflet_id){var x=v.coords.latitude,T=v.coords.longitude,P=new ue(x,T),E=P.toBounds(v.coords.accuracy*2),j=this._locateOptions;if(j.setView){var $=this.getBoundsZoom(E);this.setView(P,j.maxZoom?Math.min($,j.maxZoom):$)}var Q={latlng:P,bounds:E,timestamp:v.timestamp};for(var te in v.coords)typeof v.coords[te]=="number"&&(Q[te]=v.coords[te]);this.fire("locationfound",Q)}},addHandler:function(v,x){if(!x)return this;var T=this[v]=new x(this);return this._handlers.push(T),this.options[v]&&T.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),It(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var v;for(v in this._layers)this._layers[v].remove();for(v in this._panes)It(this._panes[v]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(v,x){var T="leaflet-pane"+(v?" leaflet-"+v.replace("Pane","")+"-pane":""),P=ft("div",T,x||this._mapPane);return v&&(this._panes[v]=P),P},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var v=this.getPixelBounds(),x=this.unproject(v.getBottomLeft()),T=this.unproject(v.getTopRight());return new ne(x,T)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(v,x,T){v=ie(v),T=H(T||[0,0]);var P=this.getZoom()||0,E=this.getMinZoom(),j=this.getMaxZoom(),$=v.getNorthWest(),Q=v.getSouthEast(),te=this.getSize().subtract(T),ae=K(this.project(Q,P),this.project($,P)).getSize(),Ae=Re.any3d?this.options.zoomSnap:1,He=te.x/ae.x,rt=te.y/ae.y,Xr=x?Math.max(He,rt):Math.min(He,rt);return P=this.getScaleZoom(Xr,P),Ae&&(P=Math.round(P/(Ae/100))*(Ae/100),P=x?Math.ceil(P/Ae)*Ae:Math.floor(P/Ae)*Ae),Math.max(E,Math.min(j,P))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new B(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(v,x){var T=this._getTopLeftPoint(v,x);return new X(T,T.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(v){return this.options.crs.getProjectedBounds(v===void 0?this.getZoom():v)},getPane:function(v){return typeof v=="string"?this._panes[v]:v},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(v,x){var T=this.options.crs;return x=x===void 0?this._zoom:x,T.scale(v)/T.scale(x)},getScaleZoom:function(v,x){var T=this.options.crs;x=x===void 0?this._zoom:x;var P=T.zoom(v*T.scale(x));return isNaN(P)?1/0:P},project:function(v,x){return x=x===void 0?this._zoom:x,this.options.crs.latLngToPoint(ve(v),x)},unproject:function(v,x){return x=x===void 0?this._zoom:x,this.options.crs.pointToLatLng(H(v),x)},layerPointToLatLng:function(v){var x=H(v).add(this.getPixelOrigin());return this.unproject(x)},latLngToLayerPoint:function(v){var x=this.project(ve(v))._round();return x._subtract(this.getPixelOrigin())},wrapLatLng:function(v){return this.options.crs.wrapLatLng(ve(v))},wrapLatLngBounds:function(v){return this.options.crs.wrapLatLngBounds(ie(v))},distance:function(v,x){return this.options.crs.distance(ve(v),ve(x))},containerPointToLayerPoint:function(v){return H(v).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(v){return H(v).add(this._getMapPanePos())},containerPointToLatLng:function(v){var x=this.containerPointToLayerPoint(H(v));return this.layerPointToLatLng(x)},latLngToContainerPoint:function(v){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ve(v)))},mouseEventToContainerPoint:function(v){return EL(v,this._container)},mouseEventToLayerPoint:function(v){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(v))},mouseEventToLatLng:function(v){return this.layerPointToLatLng(this.mouseEventToLayerPoint(v))},_initContainer:function(v){var x=this._container=PL(v);if(x){if(x._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ke(x,"scroll",this._onScroll,this),this._containerId=l(x)},_initLayout:function(){var v=this._container;this._fadeAnimated=this.options.fadeAnimation&&Re.any3d,Je(v,"leaflet-container"+(Re.touch?" leaflet-touch":"")+(Re.retina?" leaflet-retina":"")+(Re.ielt9?" leaflet-oldie":"")+(Re.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var x=Fh(v,"position");x!=="absolute"&&x!=="relative"&&x!=="fixed"&&x!=="sticky"&&(v.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var v=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Qt(this._mapPane,new B(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Je(v.markerPane,"leaflet-zoom-hide"),Je(v.shadowPane,"leaflet-zoom-hide"))},_resetView:function(v,x,T){Qt(this._mapPane,new B(0,0));var P=!this._loaded;this._loaded=!0,x=this._limitZoom(x),this.fire("viewprereset");var E=this._zoom!==x;this._moveStart(E,T)._move(v,x)._moveEnd(E),this.fire("viewreset"),P&&this.fire("load")},_moveStart:function(v,x){return v&&this.fire("zoomstart"),x||this.fire("movestart"),this},_move:function(v,x,T,P){x===void 0&&(x=this._zoom);var E=this._zoom!==x;return this._zoom=x,this._lastCenter=v,this._pixelOrigin=this._getNewPixelOrigin(v),P?T&&T.pinch&&this.fire("zoom",T):((E||T&&T.pinch)&&this.fire("zoom",T),this.fire("move",T)),this},_moveEnd:function(v){return v&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(v){Qt(this._mapPane,this._getMapPanePos().subtract(v))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(v){this._targets={},this._targets[l(this._container)]=this;var x=v?Tt:Ke;x(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&x(window,"resize",this._onResize,this),Re.any3d&&this.options.transform3DLimit&&(v?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=I(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var v=this._getMapPanePos();Math.max(Math.abs(v.x),Math.abs(v.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(v,x){for(var T=[],P,E=x==="mouseout"||x==="mouseover",j=v.target||v.srcElement,$=!1;j;){if(P=this._targets[l(j)],P&&(x==="click"||x==="preclick")&&this._draggableMoved(P)){$=!0;break}if(P&&P.listens(x,!0)&&(E&&!X_(j,v)||(T.push(P),E))||j===this._container)break;j=j.parentNode}return!T.length&&!$&&!E&&this.listens(x,!0)&&(T=[this]),T},_isClickDisabled:function(v){for(;v&&v!==this._container;){if(v._leaflet_disable_click)return!0;v=v.parentNode}},_handleDOMEvent:function(v){var x=v.target||v.srcElement;if(!(!this._loaded||x._leaflet_disable_events||v.type==="click"&&this._isClickDisabled(x))){var T=v.type;T==="mousedown"&&H_(x),this._fireDOMEvent(v,T)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(v,x,T){if(v.type==="click"){var P=i({},v);P.type="preclick",this._fireDOMEvent(P,P.type,T)}var E=this._findEventTargets(v,x);if(T){for(var j=[],$=0;$0?Math.round(v-x)/2:Math.max(0,Math.ceil(v))-Math.max(0,Math.floor(x))},_limitZoom:function(v){var x=this.getMinZoom(),T=this.getMaxZoom(),P=Re.any3d?this.options.zoomSnap:1;return P&&(v=Math.round(v/P)*P),Math.max(x,Math.min(T,v))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(v,x){var T=this._getCenterOffset(v)._trunc();return(x&&x.animate)!==!0&&!this.getSize().contains(T)?!1:(this.panBy(T,x),!0)},_createAnimProxy:function(){var v=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(v),this.on("zoomanim",function(x){var T=O_,P=this._proxy.style[T];Ns(this._proxy,this.project(x.center,x.zoom),this.getZoomScale(x.zoom,1)),P===this._proxy.style[T]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){It(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var v=this.getCenter(),x=this.getZoom();Ns(this._proxy,this.project(v,x),this.getZoomScale(x,1))},_catchTransitionEnd:function(v){this._animatingZoom&&v.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(v,x,T){if(this._animatingZoom)return!0;if(T=T||{},!this._zoomAnimated||T.animate===!1||this._nothingToAnimate()||Math.abs(x-this._zoom)>this.options.zoomAnimationThreshold)return!1;var P=this.getZoomScale(x),E=this._getCenterOffset(v)._divideBy(1-1/P);return T.animate!==!0&&!this.getSize().contains(E)?!1:(I(function(){this._moveStart(!0,T.noMoveStart||!1)._animateZoom(v,x,!0)},this),!0)},_animateZoom:function(v,x,T,P){this._mapPane&&(T&&(this._animatingZoom=!0,this._animateToCenter=v,this._animateToZoom=x,Je(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:v,zoom:x,noUpdate:P}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Zt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function bW(v,x){return new ut(v,x)}var pi=V.extend({options:{position:"topright"},initialize:function(v){g(this,v)},getPosition:function(){return this.options.position},setPosition:function(v){var x=this._map;return x&&x.removeControl(this),this.options.position=v,x&&x.addControl(this),this},getContainer:function(){return this._container},addTo:function(v){this.remove(),this._map=v;var x=this._container=this.onAdd(v),T=this.getPosition(),P=v._controlCorners[T];return Je(x,"leaflet-control"),T.indexOf("bottom")!==-1?P.insertBefore(x,P.firstChild):P.appendChild(x),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(It(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(v){this._map&&v&&v.screenX>0&&v.screenY>0&&this._map.getContainer().focus()}}),Zh=function(v){return new pi(v)};ut.include({addControl:function(v){return v.addTo(this),this},removeControl:function(v){return v.remove(),this},_initControlPos:function(){var v=this._controlCorners={},x="leaflet-",T=this._controlContainer=ft("div",x+"control-container",this._container);function P(E,j){var $=x+E+" "+x+j;v[E+j]=ft("div",$,T)}P("top","left"),P("top","right"),P("bottom","left"),P("bottom","right")},_clearControlPos:function(){for(var v in this._controlCorners)It(this._controlCorners[v]);It(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var zL=pi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(v,x,T,P){return T1,this._baseLayersList.style.display=v?"":"none"),this._separator.style.display=x&&v?"":"none",this},_onLayerChange:function(v){this._handlingClick||this._update();var x=this._getLayer(l(v.target)),T=x.overlay?v.type==="add"?"overlayadd":"overlayremove":v.type==="add"?"baselayerchange":null;T&&this._map.fire(T,x)},_createRadioElement:function(v,x){var T='",P=document.createElement("div");return P.innerHTML=T,P.firstChild},_addItem:function(v){var x=document.createElement("label"),T=this._map.hasLayer(v.layer),P;v.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=T):P=this._createRadioElement("leaflet-base-layers_"+l(this),T),this._layerControlInputs.push(P),P.layerId=l(v.layer),Ke(P,"click",this._onInputClick,this);var E=document.createElement("span");E.innerHTML=" "+v.name;var j=document.createElement("span");x.appendChild(j),j.appendChild(P),j.appendChild(E);var $=v.overlay?this._overlaysList:this._baseLayersList;return $.appendChild(x),this._checkDisabledLayers(),x},_onInputClick:function(){if(!this._preventClick){var v=this._layerControlInputs,x,T,P=[],E=[];this._handlingClick=!0;for(var j=v.length-1;j>=0;j--)x=v[j],T=this._getLayer(x.layerId).layer,x.checked?P.push(T):x.checked||E.push(T);for(j=0;j=0;E--)x=v[E],T=this._getLayer(x.layerId).layer,x.disabled=T.options.minZoom!==void 0&&PT.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var v=this._section;this._preventClick=!0,Ke(v,"click",Mr),this.expand();var x=this;setTimeout(function(){Tt(v,"click",Mr),x._preventClick=!1})}}),SW=function(v,x,T){return new zL(v,x,T)},q_=pi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(v){var x="leaflet-control-zoom",T=ft("div",x+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,x+"-in",T,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,x+"-out",T,this._zoomOut),this._updateDisabled(),v.on("zoomend zoomlevelschange",this._updateDisabled,this),T},onRemove:function(v){v.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(v){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(v.shiftKey?3:1))},_createButton:function(v,x,T,P,E){var j=ft("a",T,P);return j.innerHTML=v,j.href="#",j.title=x,j.setAttribute("role","button"),j.setAttribute("aria-label",x),Uh(j),Ke(j,"click",Os),Ke(j,"click",E,this),Ke(j,"click",this._refocusOnMap,this),j},_updateDisabled:function(){var v=this._map,x="leaflet-disabled";Zt(this._zoomInButton,x),Zt(this._zoomOutButton,x),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||v._zoom===v.getMinZoom())&&(Je(this._zoomOutButton,x),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||v._zoom===v.getMaxZoom())&&(Je(this._zoomInButton,x),this._zoomInButton.setAttribute("aria-disabled","true"))}});ut.mergeOptions({zoomControl:!0}),ut.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new q_,this.addControl(this.zoomControl))});var wW=function(v){return new q_(v)},BL=pi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(v){var x="leaflet-control-scale",T=ft("div",x),P=this.options;return this._addScales(P,x+"-line",T),v.on(P.updateWhenIdle?"moveend":"move",this._update,this),v.whenReady(this._update,this),T},onRemove:function(v){v.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(v,x,T){v.metric&&(this._mScale=ft("div",x,T)),v.imperial&&(this._iScale=ft("div",x,T))},_update:function(){var v=this._map,x=v.getSize().y/2,T=v.distance(v.containerPointToLatLng([0,x]),v.containerPointToLatLng([this.options.maxWidth,x]));this._updateScales(T)},_updateScales:function(v){this.options.metric&&v&&this._updateMetric(v),this.options.imperial&&v&&this._updateImperial(v)},_updateMetric:function(v){var x=this._getRoundNum(v),T=x<1e3?x+" m":x/1e3+" km";this._updateScale(this._mScale,T,x/v)},_updateImperial:function(v){var x=v*3.2808399,T,P,E;x>5280?(T=x/5280,P=this._getRoundNum(T),this._updateScale(this._iScale,P+" mi",P/T)):(E=this._getRoundNum(x),this._updateScale(this._iScale,E+" ft",E/x))},_updateScale:function(v,x,T){v.style.width=Math.round(this.options.maxWidth*T)+"px",v.innerHTML=x},_getRoundNum:function(v){var x=Math.pow(10,(Math.floor(v)+"").length-1),T=v/x;return T=T>=10?10:T>=5?5:T>=3?3:T>=2?2:1,x*T}}),TW=function(v){return new BL(v)},CW='',K_=pi.extend({options:{position:"bottomright",prefix:''+(Re.inlineSvg?CW+" ":"")+"Leaflet"},initialize:function(v){g(this,v),this._attributions={}},onAdd:function(v){v.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),Uh(this._container);for(var x in v._layers)v._layers[x].getAttribution&&this.addAttribution(v._layers[x].getAttribution());return this._update(),v.on("layeradd",this._addAttribution,this),this._container},onRemove:function(v){v.off("layeradd",this._addAttribution,this)},_addAttribution:function(v){v.layer.getAttribution&&(this.addAttribution(v.layer.getAttribution()),v.layer.once("remove",function(){this.removeAttribution(v.layer.getAttribution())},this))},setPrefix:function(v){return this.options.prefix=v,this._update(),this},addAttribution:function(v){return v?(this._attributions[v]||(this._attributions[v]=0),this._attributions[v]++,this._update(),this):this},removeAttribution:function(v){return v?(this._attributions[v]&&(this._attributions[v]--,this._update()),this):this},_update:function(){if(this._map){var v=[];for(var x in this._attributions)this._attributions[x]&&v.push(x);var T=[];this.options.prefix&&T.push(this.options.prefix),v.length&&T.push(v.join(", ")),this._container.innerHTML=T.join(' ')}}});ut.mergeOptions({attributionControl:!0}),ut.addInitHook(function(){this.options.attributionControl&&new K_().addTo(this)});var MW=function(v){return new K_(v)};pi.Layers=zL,pi.Zoom=q_,pi.Scale=BL,pi.Attribution=K_,Zh.layers=SW,Zh.zoom=wW,Zh.scale=TW,Zh.attribution=MW;var Wi=V.extend({initialize:function(v){this._map=v},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Wi.addTo=function(v,x){return v.addHandler(x,this),this};var AW={Events:F},jL=Re.touch?"touchstart mousedown":"mousedown",wo=Z.extend({options:{clickTolerance:3},initialize:function(v,x,T,P){g(this,P),this._element=v,this._dragStartTarget=x||v,this._preventOutline=T},enable:function(){this._enabled||(Ke(this._dragStartTarget,jL,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(wo._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,jL,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(v){if(this._enabled&&(this._moved=!1,!z_(this._element,"leaflet-zoom-anim"))){if(v.touches&&v.touches.length!==1){wo._dragging===this&&this.finishDrag();return}if(!(wo._dragging||v.shiftKey||v.which!==1&&v.button!==1&&!v.touches)&&(wo._dragging=this,this._preventOutline&&H_(this._element),V_(),Gh(),!this._moving)){this.fire("down");var x=v.touches?v.touches[0]:v,T=DL(this._element);this._startPoint=new B(x.clientX,x.clientY),this._startPos=Es(this._element),this._parentScale=W_(T);var P=v.type==="mousedown";Ke(document,P?"mousemove":"touchmove",this._onMove,this),Ke(document,P?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(v){if(this._enabled){if(v.touches&&v.touches.length>1){this._moved=!0;return}var x=v.touches&&v.touches.length===1?v.touches[0]:v,T=new B(x.clientX,x.clientY)._subtract(this._startPoint);!T.x&&!T.y||Math.abs(T.x)+Math.abs(T.y)j&&($=Q,j=te);j>T&&(x[$]=1,J_(v,x,T,P,$),J_(v,x,T,$,E))}function DW(v,x){for(var T=[v[0]],P=1,E=0,j=v.length;Px&&(T.push(v[P]),E=P);return Ex.max.x&&(T|=2),v.yx.max.y&&(T|=8),T}function IW(v,x){var T=x.x-v.x,P=x.y-v.y;return T*T+P*P}function $h(v,x,T,P){var E=x.x,j=x.y,$=T.x-E,Q=T.y-j,te=$*$+Q*Q,ae;return te>0&&(ae=((v.x-E)*$+(v.y-j)*Q)/te,ae>1?(E=T.x,j=T.y):ae>0&&(E+=$*ae,j+=Q*ae)),$=v.x-E,Q=v.y-j,P?$*$+Q*Q:new B(E,j)}function Fn(v){return!b(v[0])||typeof v[0][0]!="object"&&typeof v[0][0]<"u"}function ZL(v){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Fn(v)}function $L(v,x){var T,P,E,j,$,Q,te,ae;if(!v||v.length===0)throw new Error("latlngs not passed");Fn(v)||(console.warn("latlngs are not flat! Only the first ring will be used"),v=v[0]);var Ae=ve([0,0]),He=ie(v),rt=He.getNorthWest().distanceTo(He.getSouthWest())*He.getNorthEast().distanceTo(He.getNorthWest());rt<1700&&(Ae=Q_(v));var Xr=v.length,mr=[];for(T=0;TP){te=(j-P)/E,ae=[Q.x-te*(Q.x-$.x),Q.y-te*(Q.y-$.y)];break}var cn=x.unproject(H(ae));return ve([cn.lat+Ae.lat,cn.lng+Ae.lng])}var NW={__proto__:null,simplify:GL,pointToSegmentDistance:HL,closestPointOnSegment:kW,clipSegment:UL,_getEdgeIntersection:vp,_getBitCode:zs,_sqClosestPointOnSegment:$h,isFlat:Fn,_flat:ZL,polylineCenter:$L},ex={project:function(v){return new B(v.lng,v.lat)},unproject:function(v){return new ue(v.y,v.x)},bounds:new X([-180,-90],[180,90])},tx={R:6378137,R_MINOR:6356752314245179e-9,bounds:new X([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(v){var x=Math.PI/180,T=this.R,P=v.lat*x,E=this.R_MINOR/T,j=Math.sqrt(1-E*E),$=j*Math.sin(P),Q=Math.tan(Math.PI/4-P/2)/Math.pow((1-$)/(1+$),j/2);return P=-T*Math.log(Math.max(Q,1e-10)),new B(v.lng*x*T,P)},unproject:function(v){for(var x=180/Math.PI,T=this.R,P=this.R_MINOR/T,E=Math.sqrt(1-P*P),j=Math.exp(-v.y/T),$=Math.PI/2-2*Math.atan(j),Q=0,te=.1,ae;Q<15&&Math.abs(te)>1e-7;Q++)ae=E*Math.sin($),ae=Math.pow((1-ae)/(1+ae),E/2),te=Math.PI/2-2*Math.atan(j*ae)-$,$+=te;return new ue($*x,v.x*x/T)}},EW={__proto__:null,LonLat:ex,Mercator:tx,SphericalMercator:Pe},RW=i({},xe,{code:"EPSG:3395",projection:tx,transformation:function(){var v=.5/(Math.PI*tx.R);return Me(v,.5,-v,.5)}()}),YL=i({},xe,{code:"EPSG:4326",projection:ex,transformation:Me(1/180,1,-1/180,.5)}),OW=i({},Ge,{projection:ex,transformation:Me(1,0,-1,0),scale:function(v){return Math.pow(2,v)},zoom:function(v){return Math.log(v)/Math.LN2},distance:function(v,x){var T=x.lng-v.lng,P=x.lat-v.lat;return Math.sqrt(T*T+P*P)},infinite:!0});Ge.Earth=xe,Ge.EPSG3395=RW,Ge.EPSG3857=ot,Ge.EPSG900913=Ye,Ge.EPSG4326=YL,Ge.Simple=OW;var gi=Z.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(v){return v.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(v){return v&&v.removeLayer(this),this},getPane:function(v){return this._map.getPane(v?this.options[v]||v:this.options.pane)},addInteractiveTarget:function(v){return this._map._targets[l(v)]=this,this},removeInteractiveTarget:function(v){return delete this._map._targets[l(v)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(v){var x=v.target;if(x.hasLayer(this)){if(this._map=x,this._zoomAnimated=x._zoomAnimated,this.getEvents){var T=this.getEvents();x.on(T,this),this.once("remove",function(){x.off(T,this)},this)}this.onAdd(x),this.fire("add"),x.fire("layeradd",{layer:this})}}});ut.include({addLayer:function(v){if(!v._layerAdd)throw new Error("The provided object is not a Layer.");var x=l(v);return this._layers[x]?this:(this._layers[x]=v,v._mapToAdd=this,v.beforeAdd&&v.beforeAdd(this),this.whenReady(v._layerAdd,v),this)},removeLayer:function(v){var x=l(v);return this._layers[x]?(this._loaded&&v.onRemove(this),delete this._layers[x],this._loaded&&(this.fire("layerremove",{layer:v}),v.fire("remove")),v._map=v._mapToAdd=null,this):this},hasLayer:function(v){return l(v)in this._layers},eachLayer:function(v,x){for(var T in this._layers)v.call(x,this._layers[T]);return this},_addLayers:function(v){v=v?b(v)?v:[v]:[];for(var x=0,T=v.length;xthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&x[0]instanceof ue&&x[0].equals(x[T-1])&&x.pop(),x},_setLatLngs:function(v){Ia.prototype._setLatLngs.call(this,v),Fn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var v=this._renderer._bounds,x=this.options.weight,T=new B(x,x);if(v=new X(v.min.subtract(T),v.max.add(T)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(v))){if(this.options.noClip){this._parts=this._rings;return}for(var P=0,E=this._rings.length,j;Pv.y!=E.y>v.y&&v.x<(E.x-P.x)*(v.y-P.y)/(E.y-P.y)+P.x&&(x=!x);return x||Ia.prototype._containsPoint.call(this,v,!0)}});function WW(v,x){return new Cu(v,x)}var Na=Da.extend({initialize:function(v,x){g(this,x),this._layers={},v&&this.addData(v)},addData:function(v){var x=b(v)?v:v.features,T,P,E;if(x){for(T=0,P=x.length;T0&&E.push(E[0].slice()),E}function Mu(v,x){return v.feature?i({},v.feature,{geometry:x}):xp(x)}function xp(v){return v.type==="Feature"||v.type==="FeatureCollection"?v:{type:"Feature",properties:{},geometry:v}}var ax={toGeoJSON:function(v){return Mu(this,{type:"Point",coordinates:ix(this.getLatLng(),v)})}};pp.include(ax),rx.include(ax),gp.include(ax),Ia.include({toGeoJSON:function(v){var x=!Fn(this._latlngs),T=_p(this._latlngs,x?1:0,!1,v);return Mu(this,{type:(x?"Multi":"")+"LineString",coordinates:T})}}),Cu.include({toGeoJSON:function(v){var x=!Fn(this._latlngs),T=x&&!Fn(this._latlngs[0]),P=_p(this._latlngs,T?2:x?1:0,!0,v);return x||(P=[P]),Mu(this,{type:(T?"Multi":"")+"Polygon",coordinates:P})}}),wu.include({toMultiPoint:function(v){var x=[];return this.eachLayer(function(T){x.push(T.toGeoJSON(v).geometry.coordinates)}),Mu(this,{type:"MultiPoint",coordinates:x})},toGeoJSON:function(v){var x=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(x==="MultiPoint")return this.toMultiPoint(v);var T=x==="GeometryCollection",P=[];return this.eachLayer(function(E){if(E.toGeoJSON){var j=E.toGeoJSON(v);if(T)P.push(j.geometry);else{var $=xp(j);$.type==="FeatureCollection"?P.push.apply(P,$.features):P.push($)}}}),T?Mu(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function KL(v,x){return new Na(v,x)}var UW=KL,bp=gi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(v,x,T){this._url=v,this._bounds=ie(x),g(this,T)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Je(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){It(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(v){return this.options.opacity=v,this._image&&this._updateOpacity(),this},setStyle:function(v){return v.opacity&&this.setOpacity(v.opacity),this},bringToFront:function(){return this._map&&bu(this._image),this},bringToBack:function(){return this._map&&Su(this._image),this},setUrl:function(v){return this._url=v,this._image&&(this._image.src=v),this},setBounds:function(v){return this._bounds=ie(v),this._map&&this._reset(),this},getEvents:function(){var v={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(v.zoomanim=this._animateZoom),v},setZIndex:function(v){return this.options.zIndex=v,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var v=this._url.tagName==="IMG",x=this._image=v?this._url:ft("img");if(Je(x,"leaflet-image-layer"),this._zoomAnimated&&Je(x,"leaflet-zoom-animated"),this.options.className&&Je(x,this.options.className),x.onselectstart=h,x.onmousemove=h,x.onload=o(this.fire,this,"load"),x.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(x.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),v){this._url=x.src;return}x.src=this._url,x.alt=this.options.alt},_animateZoom:function(v){var x=this._map.getZoomScale(v.zoom),T=this._map._latLngBoundsToNewLayerBounds(this._bounds,v.zoom,v.center).min;Ns(this._image,T,x)},_reset:function(){var v=this._image,x=new X(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),T=x.getSize();Qt(v,x.min),v.style.width=T.x+"px",v.style.height=T.y+"px"},_updateOpacity:function(){Vn(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var v=this.options.errorOverlayUrl;v&&this._url!==v&&(this._url=v,this._image.src=v)},getCenter:function(){return this._bounds.getCenter()}}),ZW=function(v,x,T){return new bp(v,x,T)},QL=bp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var v=this._url.tagName==="VIDEO",x=this._image=v?this._url:ft("video");if(Je(x,"leaflet-image-layer"),this._zoomAnimated&&Je(x,"leaflet-zoom-animated"),this.options.className&&Je(x,this.options.className),x.onselectstart=h,x.onmousemove=h,x.onloadeddata=o(this.fire,this,"load"),v){for(var T=x.getElementsByTagName("source"),P=[],E=0;E0?P:[x.src];return}b(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(x.style,"objectFit")&&(x.style.objectFit="fill"),x.autoplay=!!this.options.autoplay,x.loop=!!this.options.loop,x.muted=!!this.options.muted,x.playsInline=!!this.options.playsInline;for(var j=0;jE?(x.height=E+"px",Je(v,j)):Zt(v,j),this._containerWidth=this._container.offsetWidth},_animateZoom:function(v){var x=this._map._latLngToNewLayerPoint(this._latlng,v.zoom,v.center),T=this._getAnchor();Qt(this._container,x.add(T))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var v=this._map,x=parseInt(Fh(this._container,"marginBottom"),10)||0,T=this._container.offsetHeight+x,P=this._containerWidth,E=new B(this._containerLeft,-T-this._containerBottom);E._add(Es(this._container));var j=v.layerPointToContainerPoint(E),$=H(this.options.autoPanPadding),Q=H(this.options.autoPanPaddingTopLeft||$),te=H(this.options.autoPanPaddingBottomRight||$),ae=v.getSize(),Ae=0,He=0;j.x+P+te.x>ae.x&&(Ae=j.x+P-ae.x+te.x),j.x-Ae-Q.x<0&&(Ae=j.x-Q.x),j.y+T+te.y>ae.y&&(He=j.y+T-ae.y+te.y),j.y-He-Q.y<0&&(He=j.y-Q.y),(Ae||He)&&(this.options.keepInView&&(this._autopanning=!0),v.fire("autopanstart").panBy([Ae,He]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),XW=function(v,x){return new Sp(v,x)};ut.mergeOptions({closePopupOnClick:!0}),ut.include({openPopup:function(v,x,T){return this._initOverlay(Sp,v,x,T).openOn(this),this},closePopup:function(v){return v=arguments.length?v:this._popup,v&&v.close(),this}}),gi.include({bindPopup:function(v,x){return this._popup=this._initOverlay(Sp,this._popup,v,x),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(v){return this._popup&&(this instanceof Da||(this._popup._source=this),this._popup._prepareOpen(v||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(v){return this._popup&&this._popup.setContent(v),this},getPopup:function(){return this._popup},_openPopup:function(v){if(!(!this._popup||!this._map)){Os(v);var x=v.layer||v.target;if(this._popup._source===x&&!(x instanceof To)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(v.latlng);return}this._popup._source=x,this.openPopup(v.latlng)}},_movePopup:function(v){this._popup.setLatLng(v.latlng)},_onKeyPress:function(v){v.originalEvent.keyCode===13&&this._openPopup(v)}});var wp=Ui.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(v){Ui.prototype.onAdd.call(this,v),this.setOpacity(this.options.opacity),v.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(v){Ui.prototype.onRemove.call(this,v),v.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var v=Ui.prototype.getEvents.call(this);return this.options.permanent||(v.preclick=this.close),v},_initLayout:function(){var v="leaflet-tooltip",x=v+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",x),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(v){var x,T,P=this._map,E=this._container,j=P.latLngToContainerPoint(P.getCenter()),$=P.layerPointToContainerPoint(v),Q=this.options.direction,te=E.offsetWidth,ae=E.offsetHeight,Ae=H(this.options.offset),He=this._getAnchor();Q==="top"?(x=te/2,T=ae):Q==="bottom"?(x=te/2,T=0):Q==="center"?(x=te/2,T=ae/2):Q==="right"?(x=0,T=ae/2):Q==="left"?(x=te,T=ae/2):$.xthis.options.maxZoom||TP?this._retainParent(E,j,$,P):!1)},_retainChildren:function(v,x,T,P){for(var E=2*v;E<2*v+2;E++)for(var j=2*x;j<2*x+2;j++){var $=new B(E,j);$.z=T+1;var Q=this._tileCoordsToKey($),te=this._tiles[Q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);T+1this.options.maxZoom||this.options.minZoom!==void 0&&E1){this._setView(v,T);return}for(var He=E.min.y;He<=E.max.y;He++)for(var rt=E.min.x;rt<=E.max.x;rt++){var Xr=new B(rt,He);if(Xr.z=this._tileZoom,!!this._isValidTile(Xr)){var mr=this._tiles[this._tileCoordsToKey(Xr)];mr?mr.current=!0:$.push(Xr)}}if($.sort(function(cn,Lu){return cn.distanceTo(j)-Lu.distanceTo(j)}),$.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Gn=document.createDocumentFragment();for(rt=0;rt<$.length;rt++)this._addTile($[rt],Gn);this._level.el.appendChild(Gn)}}}},_isValidTile:function(v){var x=this._map.options.crs;if(!x.infinite){var T=this._globalTileRange;if(!x.wrapLng&&(v.xT.max.x)||!x.wrapLat&&(v.yT.max.y))return!1}if(!this.options.bounds)return!0;var P=this._tileCoordsToBounds(v);return ie(this.options.bounds).overlaps(P)},_keyToBounds:function(v){return this._tileCoordsToBounds(this._keyToTileCoords(v))},_tileCoordsToNwSe:function(v){var x=this._map,T=this.getTileSize(),P=v.scaleBy(T),E=P.add(T),j=x.unproject(P,v.z),$=x.unproject(E,v.z);return[j,$]},_tileCoordsToBounds:function(v){var x=this._tileCoordsToNwSe(v),T=new ne(x[0],x[1]);return this.options.noWrap||(T=this._map.wrapLatLngBounds(T)),T},_tileCoordsToKey:function(v){return v.x+":"+v.y+":"+v.z},_keyToTileCoords:function(v){var x=v.split(":"),T=new B(+x[0],+x[1]);return T.z=+x[2],T},_removeTile:function(v){var x=this._tiles[v];x&&(It(x.el),delete this._tiles[v],this.fire("tileunload",{tile:x.el,coords:this._keyToTileCoords(v)}))},_initTile:function(v){Je(v,"leaflet-tile");var x=this.getTileSize();v.style.width=x.x+"px",v.style.height=x.y+"px",v.onselectstart=h,v.onmousemove=h,Re.ielt9&&this.options.opacity<1&&Vn(v,this.options.opacity)},_addTile:function(v,x){var T=this._getTilePos(v),P=this._tileCoordsToKey(v),E=this.createTile(this._wrapCoords(v),o(this._tileReady,this,v));this._initTile(E),this.createTile.length<2&&I(o(this._tileReady,this,v,null,E)),Qt(E,T),this._tiles[P]={el:E,coords:v,current:!0},x.appendChild(E),this.fire("tileloadstart",{tile:E,coords:v})},_tileReady:function(v,x,T){x&&this.fire("tileerror",{error:x,tile:T,coords:v});var P=this._tileCoordsToKey(v);T=this._tiles[P],T&&(T.loaded=+new Date,this._map._fadeAnimated?(Vn(T.el,0),z(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(T.active=!0,this._pruneTiles()),x||(Je(T.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:T.el,coords:v})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Re.ielt9||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(v){return v.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(v){var x=new B(this._wrapX?c(v.x,this._wrapX):v.x,this._wrapY?c(v.y,this._wrapY):v.y);return x.z=v.z,x},_pxBoundsToTileRange:function(v){var x=this.getTileSize();return new X(v.min.unscaleBy(x).floor(),v.max.unscaleBy(x).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var v in this._tiles)if(!this._tiles[v].loaded)return!1;return!0}});function QW(v){return new Xh(v)}var Au=Xh.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(v,x){this._url=v,x=g(this,x),x.detectRetina&&Re.retina&&x.maxZoom>0?(x.tileSize=Math.floor(x.tileSize/2),x.zoomReverse?(x.zoomOffset--,x.minZoom=Math.min(x.maxZoom,x.minZoom+1)):(x.zoomOffset++,x.maxZoom=Math.max(x.minZoom,x.maxZoom-1)),x.minZoom=Math.max(0,x.minZoom)):x.zoomReverse?x.minZoom=Math.min(x.maxZoom,x.minZoom):x.maxZoom=Math.max(x.minZoom,x.maxZoom),typeof x.subdomains=="string"&&(x.subdomains=x.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(v,x){return this._url===v&&x===void 0&&(x=!0),this._url=v,x||this.redraw(),this},createTile:function(v,x){var T=document.createElement("img");return Ke(T,"load",o(this._tileOnLoad,this,x,T)),Ke(T,"error",o(this._tileOnError,this,x,T)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(T.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(T.referrerPolicy=this.options.referrerPolicy),T.alt="",T.src=this.getTileUrl(v),T},getTileUrl:function(v){var x={r:Re.retina?"@2x":"",s:this._getSubdomain(v),x:v.x,y:v.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var T=this._globalTileRange.max.y-v.y;this.options.tms&&(x.y=T),x["-y"]=T}return _(this._url,i(x,this.options))},_tileOnLoad:function(v,x){Re.ielt9?setTimeout(o(v,this,null,x),0):v(null,x)},_tileOnError:function(v,x,T){var P=this.options.errorTileUrl;P&&x.getAttribute("src")!==P&&(x.src=P),v(T,x)},_onTileRemove:function(v){v.tile.onload=null},_getZoomForUrl:function(){var v=this._tileZoom,x=this.options.maxZoom,T=this.options.zoomReverse,P=this.options.zoomOffset;return T&&(v=x-v),v+P},_getSubdomain:function(v){var x=Math.abs(v.x+v.y)%this.options.subdomains.length;return this.options.subdomains[x]},_abortLoading:function(){var v,x;for(v in this._tiles)if(this._tiles[v].coords.z!==this._tileZoom&&(x=this._tiles[v].el,x.onload=h,x.onerror=h,!x.complete)){x.src=C;var T=this._tiles[v].coords;It(x),delete this._tiles[v],this.fire("tileabort",{tile:x,coords:T})}},_removeTile:function(v){var x=this._tiles[v];if(x)return x.el.setAttribute("src",C),Xh.prototype._removeTile.call(this,v)},_tileReady:function(v,x,T){if(!(!this._map||T&&T.getAttribute("src")===C))return Xh.prototype._tileReady.call(this,v,x,T)}});function tk(v,x){return new Au(v,x)}var rk=Au.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(v,x){this._url=v;var T=i({},this.defaultWmsParams);for(var P in x)P in this.options||(T[P]=x[P]);x=g(this,x);var E=x.detectRetina&&Re.retina?2:1,j=this.getTileSize();T.width=j.x*E,T.height=j.y*E,this.wmsParams=T},onAdd:function(v){this._crs=this.options.crs||v.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var x=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[x]=this._crs.code,Au.prototype.onAdd.call(this,v)},getTileUrl:function(v){var x=this._tileCoordsToNwSe(v),T=this._crs,P=K(T.project(x[0]),T.project(x[1])),E=P.min,j=P.max,$=(this._wmsVersion>=1.3&&this._crs===YL?[E.y,E.x,j.y,j.x]:[E.x,E.y,j.x,j.y]).join(","),Q=Au.prototype.getTileUrl.call(this,v);return Q+m(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+$},setParams:function(v,x){return i(this.wmsParams,v),x||this.redraw(),this}});function JW(v,x){return new rk(v,x)}Au.WMS=rk,tk.wms=JW;var Ea=gi.extend({options:{padding:.1},initialize:function(v){g(this,v),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Je(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var v={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(v.zoomanim=this._onAnimZoom),v},_onAnimZoom:function(v){this._updateTransform(v.center,v.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(v,x){var T=this._map.getZoomScale(x,this._zoom),P=this._map.getSize().multiplyBy(.5+this.options.padding),E=this._map.project(this._center,x),j=P.multiplyBy(-T).add(E).subtract(this._map._getNewPixelOrigin(v,x));Re.any3d?Ns(this._container,j,T):Qt(this._container,j)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var v in this._layers)this._layers[v]._reset()},_onZoomEnd:function(){for(var v in this._layers)this._layers[v]._project()},_updatePaths:function(){for(var v in this._layers)this._layers[v]._update()},_update:function(){var v=this.options.padding,x=this._map.getSize(),T=this._map.containerPointToLayerPoint(x.multiplyBy(-v)).round();this._bounds=new X(T,T.add(x.multiplyBy(1+v*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),nk=Ea.extend({options:{tolerance:0},getEvents:function(){var v=Ea.prototype.getEvents.call(this);return v.viewprereset=this._onViewPreReset,v},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ea.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var v=this._container=document.createElement("canvas");Ke(v,"mousemove",this._onMouseMove,this),Ke(v,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ke(v,"mouseout",this._handleMouseOut,this),v._leaflet_disable_events=!0,this._ctx=v.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,It(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var v;this._redrawBounds=null;for(var x in this._layers)v=this._layers[x],v._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ea.prototype._update.call(this);var v=this._bounds,x=this._container,T=v.getSize(),P=Re.retina?2:1;Qt(x,v.min),x.width=P*T.x,x.height=P*T.y,x.style.width=T.x+"px",x.style.height=T.y+"px",Re.retina&&this._ctx.scale(2,2),this._ctx.translate(-v.min.x,-v.min.y),this.fire("update")}},_reset:function(){Ea.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(v){this._updateDashArray(v),this._layers[l(v)]=v;var x=v._order={layer:v,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=x),this._drawLast=x,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(v){this._requestRedraw(v)},_removePath:function(v){var x=v._order,T=x.next,P=x.prev;T?T.prev=P:this._drawLast=P,P?P.next=T:this._drawFirst=T,delete v._order,delete this._layers[l(v)],this._requestRedraw(v)},_updatePath:function(v){this._extendRedrawBounds(v),v._project(),v._update(),this._requestRedraw(v)},_updateStyle:function(v){this._updateDashArray(v),this._requestRedraw(v)},_updateDashArray:function(v){if(typeof v.options.dashArray=="string"){var x=v.options.dashArray.split(/[, ]+/),T=[],P,E;for(E=0;E')}}catch{}return function(v){return document.createElement("<"+v+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),eU={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ea.prototype._update.call(this),this.fire("update"))},_initPath:function(v){var x=v._container=qh("shape");Je(x,"leaflet-vml-shape "+(this.options.className||"")),x.coordsize="1 1",v._path=qh("path"),x.appendChild(v._path),this._updateStyle(v),this._layers[l(v)]=v},_addPath:function(v){var x=v._container;this._container.appendChild(x),v.options.interactive&&v.addInteractiveTarget(x)},_removePath:function(v){var x=v._container;It(x),v.removeInteractiveTarget(x),delete this._layers[l(v)]},_updateStyle:function(v){var x=v._stroke,T=v._fill,P=v.options,E=v._container;E.stroked=!!P.stroke,E.filled=!!P.fill,P.stroke?(x||(x=v._stroke=qh("stroke")),E.appendChild(x),x.weight=P.weight+"px",x.color=P.color,x.opacity=P.opacity,P.dashArray?x.dashStyle=b(P.dashArray)?P.dashArray.join(" "):P.dashArray.replace(/( *, *)/g," "):x.dashStyle="",x.endcap=P.lineCap.replace("butt","flat"),x.joinstyle=P.lineJoin):x&&(E.removeChild(x),v._stroke=null),P.fill?(T||(T=v._fill=qh("fill")),E.appendChild(T),T.color=P.fillColor||P.color,T.opacity=P.fillOpacity):T&&(E.removeChild(T),v._fill=null)},_updateCircle:function(v){var x=v._point.round(),T=Math.round(v._radius),P=Math.round(v._radiusY||T);this._setPath(v,v._empty()?"M0 0":"AL "+x.x+","+x.y+" "+T+","+P+" 0,"+65535*360)},_setPath:function(v,x){v._path.v=x},_bringToFront:function(v){bu(v._container)},_bringToBack:function(v){Su(v._container)}},Tp=Re.vml?qh:tt,Kh=Ea.extend({_initContainer:function(){this._container=Tp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Tp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){It(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ea.prototype._update.call(this);var v=this._bounds,x=v.getSize(),T=this._container;(!this._svgSize||!this._svgSize.equals(x))&&(this._svgSize=x,T.setAttribute("width",x.x),T.setAttribute("height",x.y)),Qt(T,v.min),T.setAttribute("viewBox",[v.min.x,v.min.y,x.x,x.y].join(" ")),this.fire("update")}},_initPath:function(v){var x=v._path=Tp("path");v.options.className&&Je(x,v.options.className),v.options.interactive&&Je(x,"leaflet-interactive"),this._updateStyle(v),this._layers[l(v)]=v},_addPath:function(v){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(v._path),v.addInteractiveTarget(v._path)},_removePath:function(v){It(v._path),v.removeInteractiveTarget(v._path),delete this._layers[l(v)]},_updatePath:function(v){v._project(),v._update()},_updateStyle:function(v){var x=v._path,T=v.options;x&&(T.stroke?(x.setAttribute("stroke",T.color),x.setAttribute("stroke-opacity",T.opacity),x.setAttribute("stroke-width",T.weight),x.setAttribute("stroke-linecap",T.lineCap),x.setAttribute("stroke-linejoin",T.lineJoin),T.dashArray?x.setAttribute("stroke-dasharray",T.dashArray):x.removeAttribute("stroke-dasharray"),T.dashOffset?x.setAttribute("stroke-dashoffset",T.dashOffset):x.removeAttribute("stroke-dashoffset")):x.setAttribute("stroke","none"),T.fill?(x.setAttribute("fill",T.fillColor||T.color),x.setAttribute("fill-opacity",T.fillOpacity),x.setAttribute("fill-rule",T.fillRule||"evenodd")):x.setAttribute("fill","none"))},_updatePoly:function(v,x){this._setPath(v,lt(v._parts,x))},_updateCircle:function(v){var x=v._point,T=Math.max(Math.round(v._radius),1),P=Math.max(Math.round(v._radiusY),1)||T,E="a"+T+","+P+" 0 1,0 ",j=v._empty()?"M0 0":"M"+(x.x-T)+","+x.y+E+T*2+",0 "+E+-T*2+",0 ";this._setPath(v,j)},_setPath:function(v,x){v._path.setAttribute("d",x)},_bringToFront:function(v){bu(v._path)},_bringToBack:function(v){Su(v._path)}});Re.vml&&Kh.include(eU);function ak(v){return Re.svg||Re.vml?new Kh(v):null}ut.include({getRenderer:function(v){var x=v.options.renderer||this._getPaneRenderer(v.options.pane)||this.options.renderer||this._renderer;return x||(x=this._renderer=this._createRenderer()),this.hasLayer(x)||this.addLayer(x),x},_getPaneRenderer:function(v){if(v==="overlayPane"||v===void 0)return!1;var x=this._paneRenderers[v];return x===void 0&&(x=this._createRenderer({pane:v}),this._paneRenderers[v]=x),x},_createRenderer:function(v){return this.options.preferCanvas&&ik(v)||ak(v)}});var ok=Cu.extend({initialize:function(v,x){Cu.prototype.initialize.call(this,this._boundsToLatLngs(v),x)},setBounds:function(v){return this.setLatLngs(this._boundsToLatLngs(v))},_boundsToLatLngs:function(v){return v=ie(v),[v.getSouthWest(),v.getNorthWest(),v.getNorthEast(),v.getSouthEast()]}});function tU(v,x){return new ok(v,x)}Kh.create=Tp,Kh.pointsToPath=lt,Na.geometryToLayer=mp,Na.coordsToLatLng=nx,Na.coordsToLatLngs=yp,Na.latLngToCoords=ix,Na.latLngsToCoords=_p,Na.getFeature=Mu,Na.asFeature=xp,ut.mergeOptions({boxZoom:!0});var sk=Wi.extend({initialize:function(v){this._map=v,this._container=v._container,this._pane=v._panes.overlayPane,this._resetStateTimeout=0,v.on("unload",this._destroy,this)},addHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){It(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(v){if(!v.shiftKey||v.which!==1&&v.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Gh(),V_(),this._startPoint=this._map.mouseEventToContainerPoint(v),Ke(document,{contextmenu:Os,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(v){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),Je(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(v);var x=new X(this._point,this._startPoint),T=x.getSize();Qt(this._box,x.min),this._box.style.width=T.x+"px",this._box.style.height=T.y+"px"},_finish:function(){this._moved&&(It(this._box),Zt(this._container,"leaflet-crosshair")),Hh(),F_(),Tt(document,{contextmenu:Os,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(v){if(!(v.which!==1&&v.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var x=new ne(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(x).fire("boxzoomend",{boxZoomBounds:x})}},_onKeyDown:function(v){v.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ut.addInitHook("addHandler","boxZoom",sk),ut.mergeOptions({doubleClickZoom:!0});var lk=Wi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(v){var x=this._map,T=x.getZoom(),P=x.options.zoomDelta,E=v.originalEvent.shiftKey?T-P:T+P;x.options.doubleClickZoom==="center"?x.setZoom(E):x.setZoomAround(v.containerPoint,E)}});ut.addInitHook("addHandler","doubleClickZoom",lk),ut.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var uk=Wi.extend({addHooks:function(){if(!this._draggable){var v=this._map;this._draggable=new wo(v._mapPane,v._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),v.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),v.on("zoomend",this._onZoomEnd,this),v.whenReady(this._onZoomEnd,this))}Je(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Zt(this._map._container,"leaflet-grab"),Zt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var v=this._map;if(v._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var x=ie(this._map.options.maxBounds);this._offsetLimit=K(this._map.latLngToContainerPoint(x.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(x.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;v.fire("movestart").fire("dragstart"),v.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(v){if(this._map.options.inertia){var x=this._lastTime=+new Date,T=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(T),this._times.push(x),this._prunePositions(x)}this._map.fire("move",v).fire("drag",v)},_prunePositions:function(v){for(;this._positions.length>1&&v-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var v=this._map.getSize().divideBy(2),x=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=x.subtract(v).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(v,x){return v-(v-x)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var v=this._draggable._newPos.subtract(this._draggable._startPos),x=this._offsetLimit;v.xx.max.x&&(v.x=this._viscousLimit(v.x,x.max.x)),v.y>x.max.y&&(v.y=this._viscousLimit(v.y,x.max.y)),this._draggable._newPos=this._draggable._startPos.add(v)}},_onPreDragWrap:function(){var v=this._worldWidth,x=Math.round(v/2),T=this._initialWorldOffset,P=this._draggable._newPos.x,E=(P-x+T)%v+x-T,j=(P+x+T)%v-x-T,$=Math.abs(E+T)0?j:-j))-x;this._delta=0,this._startTime=null,$&&(v.options.scrollWheelZoom==="center"?v.setZoom(x+$):v.setZoomAround(this._lastMousePos,x+$))}});ut.addInitHook("addHandler","scrollWheelZoom",hk);var rU=600;ut.mergeOptions({tapHold:Re.touchNative&&Re.safari&&Re.mobile,tapTolerance:15});var fk=Wi.extend({addHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(v){if(clearTimeout(this._holdTimeout),v.touches.length===1){var x=v.touches[0];this._startPos=this._newPos=new B(x.clientX,x.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(Ke(document,"touchend",Mr),Ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",x))},this),rU),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function v(){Tt(document,"touchend",Mr),Tt(document,"touchend touchcancel",v)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(v){var x=v.touches[0];this._newPos=new B(x.clientX,x.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(v,x){var T=new MouseEvent(v,{bubbles:!0,cancelable:!0,view:window,screenX:x.screenX,screenY:x.screenY,clientX:x.clientX,clientY:x.clientY});T._simulated=!0,x.target.dispatchEvent(T)}});ut.addInitHook("addHandler","tapHold",fk),ut.mergeOptions({touchZoom:Re.touch,bounceAtZoomLimits:!0});var dk=Wi.extend({addHooks:function(){Je(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Zt(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(v){var x=this._map;if(!(!v.touches||v.touches.length!==2||x._animatingZoom||this._zooming)){var T=x.mouseEventToContainerPoint(v.touches[0]),P=x.mouseEventToContainerPoint(v.touches[1]);this._centerPoint=x.getSize()._divideBy(2),this._startLatLng=x.containerPointToLatLng(this._centerPoint),x.options.touchZoom!=="center"&&(this._pinchStartLatLng=x.containerPointToLatLng(T.add(P)._divideBy(2))),this._startDist=T.distanceTo(P),this._startZoom=x.getZoom(),this._moved=!1,this._zooming=!0,x._stop(),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),Mr(v)}},_onTouchMove:function(v){if(!(!v.touches||v.touches.length!==2||!this._zooming)){var x=this._map,T=x.mouseEventToContainerPoint(v.touches[0]),P=x.mouseEventToContainerPoint(v.touches[1]),E=T.distanceTo(P)/this._startDist;if(this._zoom=x.getScaleZoom(E,this._startZoom),!x.options.bounceAtZoomLimits&&(this._zoomx.getMaxZoom()&&E>1)&&(this._zoom=x._limitZoom(this._zoom)),x.options.touchZoom==="center"){if(this._center=this._startLatLng,E===1)return}else{var j=T._add(P)._divideBy(2)._subtract(this._centerPoint);if(E===1&&j.x===0&&j.y===0)return;this._center=x.unproject(x.project(this._pinchStartLatLng,this._zoom).subtract(j),this._zoom)}this._moved||(x._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var $=o(x._move,x,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I($,this,!0),Mr(v)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,z(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ut.addInitHook("addHandler","touchZoom",dk),ut.BoxZoom=sk,ut.DoubleClickZoom=lk,ut.Drag=uk,ut.Keyboard=ck,ut.ScrollWheelZoom=hk,ut.TapHold=fk,ut.TouchZoom=dk,r.Bounds=X,r.Browser=Re,r.CRS=Ge,r.Canvas=nk,r.Circle=rx,r.CircleMarker=gp,r.Class=V,r.Control=pi,r.DivIcon=ek,r.DivOverlay=Ui,r.DomEvent=xW,r.DomUtil=yW,r.Draggable=wo,r.Evented=Z,r.FeatureGroup=Da,r.GeoJSON=Na,r.GridLayer=Xh,r.Handler=Wi,r.Icon=Tu,r.ImageOverlay=bp,r.LatLng=ue,r.LatLngBounds=ne,r.Layer=gi,r.LayerGroup=wu,r.LineUtil=NW,r.Map=ut,r.Marker=pp,r.Mixin=AW,r.Path=To,r.Point=B,r.PolyUtil=LW,r.Polygon=Cu,r.Polyline=Ia,r.Popup=Sp,r.PosAnimation=OL,r.Projection=EW,r.Rectangle=ok,r.Renderer=Ea,r.SVG=Kh,r.SVGOverlay=JL,r.TileLayer=Au,r.Tooltip=wp,r.Transformation=fe,r.Util=O,r.VideoOverlay=QL,r.bind=o,r.bounds=K,r.canvas=ik,r.circle=GW,r.circleMarker=FW,r.control=Zh,r.divIcon=KW,r.extend=i,r.featureGroup=BW,r.geoJSON=KL,r.geoJson=UW,r.gridLayer=QW,r.icon=jW,r.imageOverlay=ZW,r.latLng=ve,r.latLngBounds=ie,r.layerGroup=zW,r.map=bW,r.marker=VW,r.point=H,r.polygon=WW,r.polyline=HW,r.popup=XW,r.rectangle=tU,r.setOptions=g,r.stamp=l,r.svg=ak,r.svgOverlay=YW,r.tileLayer=tk,r.tooltip=qW,r.transformation=Me,r.version=n,r.videoOverlay=$W;var nU=window.L;r.noConflict=function(){return window.L=nU,this},window.L=r})})(yC,yC.exports);var yu=yC.exports;const j8=xC(yu);function sp(e,t,r){return Object.freeze({instance:e,context:t,container:r})}function uL(e,t){return t==null?function(n,i){const a=U.useRef();return a.current||(a.current=e(n,i)),a}:function(n,i){const a=U.useRef();a.current||(a.current=e(n,i));const o=U.useRef(n),{instance:s}=a.current;return U.useEffect(function(){o.current!==n&&(t(s,n,o.current),o.current=n)},[s,n,i]),a}}function V8(e,t){U.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var a;(a=t.layerContainer)==null||a.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function Cye(e){return function(r){const n=P_(),i=e(D_(r,n),n);return R8(n.map,r.attribution),lL(i.current,r.eventHandlers),V8(i.current,n),i}}function Mye(e,t){const r=U.useRef();U.useEffect(function(){if(t.pathOptions!==r.current){const i=t.pathOptions??{};e.instance.setStyle(i),r.current=i}},[e,t])}function Aye(e){return function(r){const n=P_(),i=e(D_(r,n),n);return lL(i.current,r.eventHandlers),V8(i.current,n),Mye(i.current,r),i}}function F8(e,t){const r=uL(e),n=Tye(r,t);return Sye(n)}function G8(e,t){const r=uL(e,t),n=Aye(r);return bye(n)}function Lye(e,t){const r=uL(e,t),n=Cye(r);return wye(n)}function kye(e,t,r){const{opacity:n,zIndex:i}=t;n!=null&&n!==r.opacity&&e.setOpacity(n),i!=null&&i!==r.zIndex&&e.setZIndex(i)}function Pye(){return P_().map}const Dye=G8(function({center:t,children:r,...n},i){const a=new yu.CircleMarker(t,n);return sp(a,O8(i,{overlayContainer:a}))},yye);function _C(){return _C=Object.assign||function(e){for(var t=1;t(d==null?void 0:d.map)??null,[d]);const g=U.useCallback(y=>{if(y!==null&&d===null){const _=new yu.Map(y,c);r!=null&&u!=null?_.setView(r,u):e!=null&&_.fitBounds(e,t),l!=null&&_.whenReady(l),p(xye(_))}},[]);U.useEffect(()=>()=>{d==null||d.map.remove()},[d]);const m=d?Vc.createElement(B8,{value:d},n):o??null;return Vc.createElement("div",_C({},f,{ref:g}),m)}const Nye=U.forwardRef(Iye),Eye=G8(function({positions:t,...r},n){const i=new yu.Polyline(t,r);return sp(i,O8(n,{overlayContainer:i}))},function(t,r,n){r.positions!==n.positions&&t.setLatLngs(r.positions)}),Rye=F8(function(t,r){const n=new yu.Popup(t,r.overlayContainer);return sp(n,r)},function(t,r,{position:n},i){U.useEffect(function(){const{instance:o}=t;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[t,r,i,n])}),Oye=Lye(function({url:t,...r},n){const i=new yu.TileLayer(t,D_(r,n));return sp(i,n)},function(t,r,n){kye(t,r,n);const{url:i}=r;i!=null&&i!==n.url&&t.setUrl(i)}),zye=F8(function(t,r){const n=new yu.Tooltip(t,r.overlayContainer);return sp(n,r)},function(t,r,{position:n},i){U.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=t,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[t,r,i,n])}),Bye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",jye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Vye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete j8.Icon.Default.prototype._getIconUrl;j8.Icon.Default.mergeOptions({iconUrl:Bye,iconRetinaUrl:jye,shadowUrl:Vye});const xz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],Fye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Gye(e){return e>12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function Hye(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function Wye(e){if(!e)return"Unknown";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Uye({bounds:e}){const t=Pye();return U.useEffect(()=>{e&&t.fitBounds(e,{padding:[50,50]})},[t,e]),null}function Zye({node:e}){const t=e.latitude!==null&&e.longitude!==null,r=e.battery_level!==null?e.battery_level>100||e.voltage&&e.voltage>4.1?"USB ⚡":`${e.battery_level.toFixed(0)}%`:"Unknown";return S.jsxs("div",{className:"min-w-[200px]",children:[S.jsx("div",{className:"font-semibold text-slate-800",children:e.short_name}),S.jsx("div",{className:"text-xs text-slate-600 mb-2",children:e.long_name}),S.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[S.jsx("div",{className:"text-slate-500",children:"Role"}),S.jsx("div",{className:"text-slate-700 font-medium",children:e.role}),S.jsx("div",{className:"text-slate-500",children:"Hardware"}),S.jsx("div",{className:"text-slate-700",children:e.hardware||"Unknown"}),S.jsx("div",{className:"text-slate-500",children:"Battery"}),S.jsx("div",{className:"text-slate-700",children:r}),S.jsx("div",{className:"text-slate-500",children:"Last Heard"}),S.jsx("div",{className:"text-slate-700",children:Wye(e.last_heard)})]}),t&&S.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[S.jsxs("a",{href:`https://www.google.com/maps?q=${e.latitude},${e.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[S.jsx(qd,{size:10}),"Google Maps"]}),S.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${e.latitude}&mlon=${e.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[S.jsx(qd,{size:10}),"OSM"]})]})]})}function $ye({nodes:e,edges:t,selectedNodeId:r,onSelectNode:n}){const i=U.useMemo(()=>e.filter(h=>h.latitude!==null&&h.longitude!==null),[e]),a=e.length-i.length,o=U.useMemo(()=>new Map(i.map(h=>[h.node_num,h])),[i]),s=U.useMemo(()=>t.filter(h=>o.has(h.from_node)&&o.has(h.to_node)),[t,o]),l=U.useMemo(()=>{if(i.length===0)return null;const h=i.map(d=>d.latitude),f=i.map(d=>d.longitude);return[[Math.min(...h),Math.min(...f)],[Math.max(...h),Math.max(...f)]]},[i]),u=[43.6,-114.4],c=U.useMemo(()=>{const h=new Set;return r!==null&&t.forEach(f=>{f.from_node===r&&h.add(f.to_node),f.to_node===r&&h.add(f.from_node)}),h},[r,t]);return S.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[S.jsxs(Nye,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[S.jsx(Oye,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© OpenStreetMap, © CARTO'}),S.jsx(Uye,{bounds:l}),s.map((h,f)=>{const d=o.get(h.from_node),p=o.get(h.to_node),g=r===null||h.from_node===r||h.to_node===r;return S.jsx(Eye,{positions:[[d.latitude,d.longitude],[p.latitude,p.longitude]],color:Gye(h.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},f)}),i.map(h=>{const f=h.node_num===r,d=c.has(h.node_num),p=r===null||f||d,g=Fye.includes(h.role),m=Hye(h.latitude),y=xz[m%xz.length];return S.jsxs(Dye,{center:[h.latitude,h.longitude],radius:g?8:5,fillColor:g?y:"#111827",fillOpacity:p?.9:.2,stroke:!0,color:f?"#ffffff":y,weight:f?3:g?0:2,opacity:p?1:.3,eventHandlers:{click:()=>n(f?null:h.node_num)},children:[S.jsx(zye,{direction:"top",offset:[0,-8],children:S.jsx("span",{className:"font-mono text-xs",children:h.short_name})}),S.jsx(Rye,{children:S.jsx(Zye,{node:h})})]},h.node_num)})]}),S.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[S.jsx(n4,{size:12}),S.jsxs("span",{children:["Showing ",i.length," of ",e.length," nodes",a>0&&S.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const bz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],Yye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Sz(e){return e>12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function Xye(e){return e>12?"excellent":e>8?"good":e>5?"fair":e>3?"marginal":"poor"}function qye(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function Kye(e){return["Northern ID","Central ID","SW Idaho","SC Idaho"][e]||"Unknown"}function Qye(e){if(!e)return"Unknown";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Jye(e){if(!e)return"bg-slate-500";const t=new Date(e),n=(new Date().getTime()-t.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function e0e({node:e,edges:t,nodes:r,onSelectNode:n}){const i=U.useMemo(()=>{if(!e)return[];const h=new Map(r.map(d=>[d.node_num,d])),f=[];return t.forEach(d=>{if(d.from_node===e.node_num){const p=h.get(d.to_node);p&&f.push({node:p,snr:d.snr,quality:d.quality})}else if(d.to_node===e.node_num){const p=h.get(d.from_node);p&&f.push({node:p,snr:d.snr,quality:d.quality})}}),f.sort((d,p)=>p.snr-d.snr)},[e,t,r]);if(!e)return S.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[S.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:S.jsx(qc,{size:24,className:"text-slate-500"})}),S.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=Yye.includes(e.role),o=qye(e.latitude),s=bz[o%bz.length],l=e.latitude!==null&&e.longitude!==null,u=e.battery_level!==null?e.battery_level>100||e.voltage&&e.voltage>4.1?"USB":`${e.battery_level.toFixed(0)}%`:"—",c=e.battery_level!==null&&(e.battery_level>100||e.voltage&&e.voltage>4.1);return S.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[S.jsxs("div",{className:"p-4 border-b border-border",children:[S.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:e.node_id_hex}),S.jsx("div",{className:"font-mono text-lg text-slate-100",children:e.short_name}),S.jsx("div",{className:"text-xs text-slate-500 truncate",children:e.long_name})]}),S.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),S.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:e.role})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),S.jsx("div",{className:"text-sm text-slate-300",children:Kye(o)})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),S.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&S.jsx(Kd,{size:12,className:"text-amber-400"}),u]})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${Jye(e.last_heard)}`}),S.jsx("span",{className:"text-sm text-slate-300",children:Qye(e.last_heard)})]})]}),S.jsxs("div",{className:"col-span-2",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),S.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:e.hardware||"Unknown"})]})]}),l&&S.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[S.jsxs("a",{href:`https://www.google.com/maps?q=${e.latitude},${e.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[S.jsx(qd,{size:10}),"Google Maps"]}),S.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${e.latitude}&mlon=${e.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[S.jsx(qd,{size:10}),"OSM"]})]}),S.jsxs("div",{className:"flex-1 overflow-y-auto",children:[S.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?S.jsx("div",{className:"divide-y divide-border",children:i.map(h=>S.jsxs("button",{onClick:()=>n(h.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:Sz(h.snr)},children:[S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:h.node.short_name}),S.jsx("div",{className:"text-xs text-slate-500 truncate",children:h.node.long_name})]}),S.jsxs("div",{className:"text-right flex-shrink-0",children:[S.jsxs("div",{className:"text-xs font-mono",style:{color:Sz(h.snr)},children:[h.snr.toFixed(1)," dB"]}),S.jsx("div",{className:"text-xs text-slate-500",children:Xye(h.snr)})]})]},h.node.node_num))}):S.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const wz=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function t0e(e){if(!e)return"bg-slate-500";const t=new Date(e),n=(new Date().getTime()-t.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function r0e(e){if(!e)return"—";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function n0e(e){return e.battery_level===null?"—":e.battery_level>100||e.voltage&&e.voltage>4.1?"USB ⚡":`${e.battery_level.toFixed(0)}%`}function Tz(e){return e===null?"—":e>46?"Northern":e>44.5?"Central":e>43?"SW Idaho":"SC Idaho"}function i0e({nodes:e,selectedNodeId:t,onSelectNode:r}){const[n,i]=U.useState(""),[a,o]=U.useState("short_name"),[s,l]=U.useState("asc"),[u,c]=U.useState("all"),h=U.useMemo(()=>{let p=[...e];if(u==="infra"?p=p.filter(g=>wz.includes(g.role)):u==="online"&&(p=p.filter(g=>{if(!g.last_heard)return!1;const m=new Date(g.last_heard);return(new Date().getTime()-m.getTime())/36e5<1})),n){const g=n.toLowerCase();p=p.filter(m=>m.short_name.toLowerCase().includes(g)||m.long_name.toLowerCase().includes(g)||m.role.toLowerCase().includes(g)||Tz(m.latitude).toLowerCase().includes(g))}return p.sort((g,m)=>{let y="",_="";switch(a){case"short_name":y=g.short_name.toLowerCase(),_=m.short_name.toLowerCase();break;case"role":y=g.role,_=m.role;break;case"battery_level":y=g.battery_level??-1,_=m.battery_level??-1;break;case"last_heard":y=g.last_heard?new Date(g.last_heard).getTime():0,_=m.last_heard?new Date(m.last_heard).getTime():0;break;case"hardware":y=g.hardware.toLowerCase(),_=m.hardware.toLowerCase();break}return y<_?s==="asc"?-1:1:y>_?s==="asc"?1:-1:0}),p},[e,n,a,s,u]),f=p=>{a===p?l(s==="asc"?"desc":"asc"):(o(p),l("asc"))},d=({field:p})=>a!==p?null:s==="asc"?S.jsx(JZ,{size:14,className:"inline ml-1"}):S.jsx(zv,{size:14,className:"inline ml-1"});return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[S.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[S.jsxs("div",{className:"relative flex-1 max-w-xs",children:[S.jsx(s4,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),S.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:p=>i(p.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx(x2,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(p=>S.jsx("button",{onClick:()=>c(p),className:`px-2 py-1 text-xs rounded transition-colors ${u===p?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:p==="all"?"All":p==="infra"?"Infra":"Online"},p))]}),S.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[h.length," of ",e.length," nodes"]})]}),S.jsxs("div",{className:"overflow-x-auto",children:[S.jsxs("table",{className:"w-full text-sm",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[S.jsx("th",{className:"w-8 px-3 py-2"}),S.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("short_name"),children:["Name ",S.jsx(d,{field:"short_name"})]}),S.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("role"),children:["Role ",S.jsx(d,{field:"role"})]}),S.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),S.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("battery_level"),children:["Battery ",S.jsx(d,{field:"battery_level"})]}),S.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("last_heard"),children:["Last Heard ",S.jsx(d,{field:"last_heard"})]}),S.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("hardware"),children:["Hardware ",S.jsx(d,{field:"hardware"})]})]})}),S.jsx("tbody",{className:"divide-y divide-border",children:h.slice(0,100).map(p=>{const g=wz.includes(p.role),m=p.node_num===t;return S.jsxs("tr",{onClick:()=>r(p.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[S.jsx("td",{className:"px-3 py-2",children:S.jsx("div",{className:`w-2 h-2 rounded-full ${t0e(p.last_heard)}`})}),S.jsxs("td",{className:"px-3 py-2",children:[S.jsx("div",{className:"font-mono text-slate-200",children:p.short_name}),S.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:p.long_name})]}),S.jsx("td",{className:"px-3 py-2",children:S.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${g?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:p.role})}),S.jsx("td",{className:"px-3 py-2 text-slate-400",children:Tz(p.latitude)}),S.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:n0e(p)}),S.jsx("td",{className:"px-3 py-2 text-slate-400",children:r0e(p.last_heard)}),S.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:p.hardware||"—"})]},p.node_num)})})]}),h.length>100&&S.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",h.length," nodes"]}),h.length===0&&S.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function a0e(){const[e,t]=U.useState([]),[r,n]=U.useState([]),[i,a]=U.useState([]),[o,s]=U.useState(null),[l,u]=U.useState("topo"),[c,h]=U.useState(!0),[f,d]=U.useState(null);U.useEffect(()=>{document.title="Mesh — MeshAI",Promise.all([g$(),m$(),P$()]).then(([m,y,_])=>{t(m),n(y),a(_),h(!1)}).catch(m=>{d(m.message),h(!1)})},[]);const p=U.useMemo(()=>e.find(m=>m.node_num===o)||null,[e,o]),g=U.useCallback(m=>{s(m)},[]);return c?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):f?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsxs("div",{className:"text-red-400",children:["Error: ",f]})}):S.jsxs("div",{className:"space-y-6",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{className:"text-sm text-slate-400",children:[e.length," nodes • ",r.length," edges"]}),S.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[S.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[S.jsx(u$,{size:14}),"Topology"]}),S.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[S.jsx(a$,{size:14}),"Geographic"]})]})]}),S.jsxs("div",{className:"flex gap-0",children:[S.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?S.jsx(mye,{nodes:e,edges:r,selectedNodeId:o,onSelectNode:g}):S.jsx($ye,{nodes:e,edges:r,selectedNodeId:o,onSelectNode:g})}),S.jsx(e0e,{node:p,edges:r,nodes:e,onSelectNode:g})]}),S.jsx(i0e,{nodes:e,selectedNodeId:o,onSelectNode:g})]})}function o0e({feed:e}){const t=()=>e.is_loaded?e.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=()=>e.is_loaded?e.consecutive_errors>0?`${e.consecutive_errors} errors`:"Healthy":"Not loaded",n=i=>i?new Date(i*1e3).toLocaleTimeString():"Never";return S.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[S.jsxs("div",{className:"flex items-center justify-between mb-2",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${t()}`}),S.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:e.source})]}),S.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),S.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[S.jsxs("div",{children:["Events: ",e.event_count]}),S.jsxs("div",{children:["Last fetch: ",n(e.last_fetch)]}),e.last_error&&S.jsx("div",{className:"text-amber-500 truncate",children:e.last_error})]})]})}function s0e({event:e}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:Bv,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:uo,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:hy,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:hy,iconColor:"text-slate-400"}}})(e.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return S.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:S.jsxs("div",{className:"flex items-start gap-3",children:[S.jsx(n,{size:18,className:r.iconColor}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[S.jsx("span",{className:"text-sm font-medium text-slate-200",children:e.event_type}),S.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:e.severity})]}),S.jsx("div",{className:"text-sm text-slate-300 mb-2",children:e.headline}),e.description&&S.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:e.description}),S.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[S.jsx("span",{className:"uppercase",children:e.source}),e.expires&&S.jsxs("span",{children:["Expires: ",i(e.expires)]})]})]})]})})}function l0e({swpc:e}){var n,i;if(!e||!e.enabled)return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(OP,{size:14}),"Solar/Geomagnetic Indices"]}),S.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const t=a=>a===void 0?"text-slate-400":a<=2?"text-green-500":a<=4?"text-amber-500":a<=6?"text-orange-500":"text-red-500",r=a=>a===void 0||a===0?"text-green-500":a<=2?"text-amber-500":a<=3?"text-orange-500":"text-red-500";return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(OP,{size:14}),"Solar/Geomagnetic Indices"]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),S.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=e.sfi)==null?void 0:n.toFixed(0))??"—"}),S.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),S.jsx("div",{className:`text-2xl font-mono ${t(e.kp_current)}`,children:((i=e.kp_current)==null?void 0:i.toFixed(1))??"—"}),S.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),S.jsxs("div",{className:"flex items-center gap-4",children:[S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),S.jsx("span",{className:`text-sm font-mono ${r(e.r_scale)}`,children:e.r_scale??0})]}),S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),S.jsx("span",{className:`text-sm font-mono ${r(e.s_scale)}`,children:e.s_scale??0})]}),S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),S.jsx("span",{className:`text-sm font-mono ${r(e.g_scale)}`,children:e.g_scale??0})]})]}),S.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Radio Blackout / Solar Radiation / Geomagnetic Storm"})]}),e.active_warnings&&e.active_warnings.length>0&&S.jsxs("div",{className:"space-y-2",children:[S.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),e.active_warnings.slice(0,3).map((a,o)=>S.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function u0e({ducting:e}){if(!e||!e.enabled)return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(zP,{size:14}),"Tropospheric Ducting"]}),S.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const t=n=>{switch(n){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},r=n=>n?n.replace("_"," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown";return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(zP,{size:14}),"Tropospheric Ducting"]}),S.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),S.jsx("div",{className:`text-xl font-medium ${t(e.condition)}`,children:r(e.condition)})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),S.jsx("div",{className:"text-lg font-mono text-slate-100",children:e.min_gradient??"—"}),S.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),e.duct_thickness_m&&S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),S.jsx("div",{className:"text-lg font-mono text-slate-100",children:e.duct_thickness_m}),S.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),e.duct_base_m&&S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),S.jsx("div",{className:"text-lg font-mono text-slate-100",children:e.duct_base_m}),S.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),S.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[S.jsx("div",{children:"dM/dz reference:"}),S.jsxs("div",{className:"mt-1 space-y-0.5",children:[S.jsx("div",{children:">79: Normal propagation"}),S.jsx("div",{children:"0–79: Super-refraction"}),S.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),e.last_update&&S.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",e.last_update]})]})}function c0e(){var D;const[e,t]=U.useState(null),[r,n]=U.useState([]),[i,a]=U.useState(null),[o,s]=U.useState(null),[l,u]=U.useState([]),[c,h]=U.useState(null),[f,d]=U.useState([]),[p,g]=U.useState([]),[m,y]=U.useState([]),[_,b]=U.useState([]),[w,C]=U.useState(0),[M,A]=U.useState(!0),[k,N]=U.useState(null);return U.useEffect(()=>{document.title="Environment — MeshAI",Promise.all([h4().catch(()=>null),x$().catch(()=>[]),S$().catch(()=>null),w$().catch(()=>null),T$().catch(()=>[]),C$().catch(()=>null),M$().catch(()=>[]),A$().catch(()=>[]),L$().catch(()=>[]),k$().catch(()=>({hotspots:[],new_ignitions:0}))]).then(([I,z,O,V,G,F,Z,B,W,H])=>{t(I),n(z),a(O),s(V),u(G),h(F),d(Z||[]),g(B||[]),y(W||[]),b((H==null?void 0:H.hotspots)||[]),C((H==null?void 0:H.new_ignitions)||0),A(!1)}).catch(I=>{N(I.message),A(!1)})},[]),M?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):k?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsxs("div",{className:"text-red-400",children:["Error: ",k]})}):e!=null&&e.enabled?S.jsxs("div",{className:"space-y-6",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),S.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(y2,{size:14}),"Feed Status"]}),S.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:e.feeds.map(I=>S.jsx(o0e,{feed:I},I.source))})]}),S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[S.jsx(l0e,{swpc:i}),S.jsx(u0e,{ducting:o})]}),S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(n$,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?S.jsx("div",{className:"space-y-3",children:l.map(I=>S.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-slate-500/10 border-l-2 border-slate-500"}`,children:[S.jsxs("div",{className:"flex items-center justify-between mb-1",children:[S.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.name}),S.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.severity==="warning"?"bg-red-500/20 text-red-400":I.severity==="watch"?"bg-amber-500/20 text-amber-400":"bg-slate-500/20 text-slate-400"}`,children:I.severity})]}),S.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[S.jsxs("div",{children:[I.acres.toLocaleString()," acres, ",I.pct_contained,"% contained"]}),I.distance_km&&I.nearest_anchor&&S.jsxs("div",{children:[Math.round(I.distance_km)," km from ",I.nearest_anchor]})]})]},I.event_id))}):S.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[S.jsx(hd,{size:16,className:"text-green-500"}),S.jsx("span",{children:"No active wildfires in the area"})]})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(l$,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?S.jsx("div",{className:"text-slate-500 py-4",children:S.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?S.jsxs("div",{className:"space-y-3",children:[c.advisories.map(I=>S.jsxs("div",{className:`p-3 rounded-lg ${I.danger_level>=4?"bg-red-500/10 border-l-2 border-red-500":I.danger_level>=3?"bg-amber-500/10 border-l-2 border-amber-500":I.danger_level>=2?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[S.jsxs("div",{className:"flex items-center justify-between mb-1",children:[S.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.zone_name}),S.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.danger_level>=4?"bg-red-500/20 text-red-400":I.danger_level>=3?"bg-amber-500/20 text-amber-400":I.danger_level>=2?"bg-yellow-500/20 text-yellow-400":"bg-green-500/20 text-green-400"}`,children:I.danger_name})]}),S.jsx("div",{className:"text-xs text-slate-400",children:I.center}),I.travel_advice&&S.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:I.travel_advice})]},I.event_id)),((D=c.advisories[0])==null?void 0:D.center_link)&&S.jsx("a",{href:c.advisories[0].center_link,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:underline",children:"View full forecast"})]}):S.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[S.jsx(hd,{size:16,className:"text-green-500"}),S.jsx("span",{children:"No avalanche advisories"})]})]})]}),f.length>0&&S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(r$,{size:14}),"Stream Gauges (",f.length,")"]}),S.jsx("div",{className:"space-y-2",children:f.map(I=>{var z,O,V,G,F;return S.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-blue-500/10 border-l-2 border-blue-500"}`,children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("span",{className:"text-sm text-slate-200",children:((z=I.properties)==null?void 0:z.site_name)||"Unknown Site"}),S.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(V=(O=I.properties)==null?void 0:O.value)==null?void 0:V.toLocaleString()," ",(G=I.properties)==null?void 0:G.unit]})]}),S.jsx("div",{className:"text-xs text-slate-500 mt-1",children:(F=I.properties)==null?void 0:F.parameter})]},I.event_id)})})]}),(p.length>0||m.length>0)&&S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(KZ,{size:14}),"Road Conditions"]}),p.length>0&&S.jsxs("div",{className:"mb-4",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),S.jsx("div",{className:"space-y-2",children:p.map(I=>{var z,O,V,G,F,Z,B,W,H;return S.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.roadClosure?"bg-red-500/10 border-l-2 border-red-500":((O=I.properties)==null?void 0:O.speedRatio)<.5?"bg-amber-500/10 border-l-2 border-amber-500":((V=I.properties)==null?void 0:V.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("span",{className:"text-sm text-slate-200",children:((G=I.properties)==null?void 0:G.corridor)||"Unknown"}),S.jsx("span",{className:"text-sm font-mono text-slate-300",children:(F=I.properties)!=null&&F.roadClosure?"CLOSED":`${Math.round(((Z=I.properties)==null?void 0:Z.currentSpeed)||0)}mph`})]}),!((B=I.properties)!=null&&B.roadClosure)&&S.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[Math.round((((W=I.properties)==null?void 0:W.speedRatio)||1)*100),"% of free flow (",Math.round(((H=I.properties)==null?void 0:H.freeFlowSpeed)||0),"mph)"]})]},I.event_id)})})]}),m.length>0&&S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),S.jsx("div",{className:"space-y-2",children:m.map(I=>{var z,O;return S.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.is_closure?"bg-red-500/10 border-l-2 border-red-500":"bg-amber-500/10 border-l-2 border-amber-500"}`,children:[S.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.is_closure)&&S.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),S.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:I.headline})]}),S.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:I.event_type})]},I.event_id)})})]})]}),_.length>0&&S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(c$,{size:14}),"Satellite Hotspots (",_.length,")",w>0&&S.jsxs("span",{className:"ml-2 px-2 py-0.5 text-xs rounded-full bg-red-500/20 text-red-400 animate-pulse",children:[w," NEW"]})]}),S.jsx("div",{className:"space-y-2",children:_.map(I=>{var z,O,V,G,F,Z;return S.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.new_ignition?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-orange-500/10 border-l-2 border-orange-500"}`,children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.new_ignition)&&S.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"NEW"}),S.jsx("span",{className:"text-sm text-slate-200",children:I.headline})]}),((V=I.properties)==null?void 0:V.frp)&&S.jsxs("span",{className:"text-sm font-mono text-orange-400",children:[Math.round(I.properties.frp)," MW"]})]}),S.jsxs("div",{className:"text-xs text-slate-500 mt-1 flex items-center gap-3",children:[S.jsxs("span",{children:["Conf: ",((G=I.properties)==null?void 0:G.confidence)||"N/A"]}),((F=I.properties)==null?void 0:F.acq_time)&&S.jsxs("span",{children:["@",I.properties.acq_time,"Z"]}),((Z=I.properties)==null?void 0:Z.near_fire)&&S.jsxs("span",{children:["Near: ",I.properties.near_fire]})]})]},I.event_id)})})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(uo,{size:14}),"Active Events (",r.length,")"]}),r.length>0?S.jsx("div",{className:"space-y-3",children:r.map(I=>S.jsx(s0e,{event:I},I.event_id))}):S.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[S.jsx(hd,{size:16,className:"text-green-500"}),S.jsx("span",{children:"No active environmental events"})]})]})]}):S.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[S.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:S.jsx(Xd,{size:32,className:"text-slate-500"})}),S.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),S.jsx("p",{className:"text-slate-500 max-w-md",children:"Enable environmental feeds in config.yaml to see weather alerts, space weather indices, and tropospheric ducting data."})]})}function cL({label:e,value:t,onChange:r,helper:n,info:i,roleFilter:a,valueType:o="short_name"}){const[s,l]=U.useState([]),[u,c]=U.useState(!0),[h,f]=U.useState(""),[d,p]=U.useState(!1);U.useEffect(()=>{fetch("/api/nodes").then(w=>w.json()).then(w=>{l(w),c(!1)}).catch(()=>{l([]),c(!1)})},[]);const g=U.useMemo(()=>{let w=s;if(a&&(w=w.filter(C=>a==="ROUTER"||a==="infrastructure"?C.is_infrastructure||C.role==="ROUTER"||C.role==="ROUTER_CLIENT"||C.role==="REPEATER":C.role===a)),h.trim()){const C=h.toLowerCase();w=w.filter(M=>{var A,k,N,D;return((A=M.short_name)==null?void 0:A.toLowerCase().includes(C))||((k=M.long_name)==null?void 0:k.toLowerCase().includes(C))||((N=M.role)==null?void 0:N.toLowerCase().includes(C))||((D=M.node_id_hex)==null?void 0:D.toLowerCase().includes(C))})}return w.sort((C,M)=>(C.short_name||"").localeCompare(M.short_name||""))},[s,h,a]),m=w=>{switch(o){case"node_num":return String(w.node_num);case"node_id_hex":return w.node_id_hex;default:return w.short_name||String(w.node_num)}},y=w=>{const C=m(w);return t.includes(C)},_=w=>{const C=m(w);t.includes(C)?r(t.filter(M=>M!==C)):r([...t,C])},b=w=>{const C=[w.short_name];return w.long_name&&w.long_name!==w.short_name&&C.push(`— ${w.long_name}`),w.role&&C.push(`(${w.role})`),C.join(" ")};return!u&&s.length===0?S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e}),S.jsx("input",{type:"text",value:t.join(", "),onChange:w=>r(w.target.value.split(",").map(C=>C.trim()).filter(Boolean)),placeholder:"Enter node IDs separated by commas",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]}):S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e}),t.length>0&&S.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:t.map(w=>{const C=s.find(M=>m(M)===w);return S.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-accent/20 text-accent rounded text-sm",children:[C?C.short_name:w,S.jsx("button",{type:"button",onClick:()=>r(t.filter(M=>M!==w)),className:"hover:text-white",children:S.jsx(jv,{size:14})})]},w)})}),S.jsxs("div",{className:"relative",children:[S.jsxs("div",{className:"relative",children:[S.jsx(s4,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),S.jsx("input",{type:"text",value:h,onChange:w=>f(w.target.value),onFocus:()=>p(!0),placeholder:u?"Loading nodes...":"Search nodes...",className:"w-full pl-9 pr-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent"})]}),d&&!u&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>p(!1)}),S.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 z-50 max-h-64 overflow-y-auto bg-[#0a0e17] border border-[#1e2a3a] rounded-lg shadow-xl",children:g.length===0?S.jsx("div",{className:"p-3 text-sm text-slate-500 text-center",children:"No nodes found"}):g.map(w=>S.jsxs("button",{type:"button",onClick:()=>_(w),className:`w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[#1e2a3a] ${y(w)?"bg-accent/10":""}`,children:[S.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${y(w)?"bg-accent border-accent":"border-slate-600"}`,children:y(w)&&S.jsx(Yc,{size:12,className:"text-white"})}),S.jsx("span",{className:"text-slate-200",children:b(w)})]},w.node_num))})]})]}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function hL(e){const[t,r]=U.useState([]),[n,i]=U.useState(!0);U.useEffect(()=>{fetch("/api/channels").then(f=>f.json()).then(f=>{r(f),i(!1)}).catch(()=>{r([]),i(!1)})},[]);const a=f=>{const d=f.role==="PRIMARY"?"Primary":f.role==="SECONDARY"?"Secondary":"";return`${f.index}: ${f.name}${d?` (${d})`:""}`};if(!n&&t.length===0)return e.mode==="single"?S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e.label}),S.jsx("input",{type:"number",value:e.value,onChange:f=>e.onChange(Number(f.target.value)),min:e.includeDisabled?-1:0,max:7,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),e.helper&&S.jsx("p",{className:"text-xs text-slate-600",children:e.helper})]}):S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e.label}),S.jsx("input",{type:"text",value:e.value.join(", "),onChange:f=>{const d=f.target.value.split(",").map(p=>parseInt(p.trim())).filter(p=>!isNaN(p));e.onChange(d)},placeholder:"Enter channel numbers separated by commas",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),e.helper&&S.jsx("p",{className:"text-xs text-slate-600",children:e.helper})]});if(e.mode==="single"){const{value:f,onChange:d,label:p,helper:g,includeDisabled:m}=e,y=t.filter(_=>_.enabled);return S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:p}),S.jsxs("select",{value:f,onChange:_=>d(Number(_.target.value)),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:[m&&S.jsx("option",{value:-1,children:"Disabled"}),y.map(_=>S.jsx("option",{value:_.index,children:a(_)},_.index))]}),g&&S.jsx("p",{className:"text-xs text-slate-600",children:g})]})}const{value:o,onChange:s,label:l,helper:u}=e,c=t.filter(f=>f.enabled),h=f=>{o.includes(f)?s(o.filter(d=>d!==f)):s([...o,f].sort((d,p)=>d-p))};return S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:l}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:[c.map(f=>S.jsxs("label",{onClick:()=>h(f.index),className:"flex items-center gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[S.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${o.includes(f.index)?"bg-accent border-accent":"border-slate-600"}`,children:o.includes(f.index)&&S.jsx(Yc,{size:12,className:"text-white"})}),S.jsx("span",{className:"text-sm text-slate-200",children:a(f)})]},f.index)),c.length===0&&S.jsx("div",{className:"text-sm text-slate-500 p-2",children:"No channels available"})]}),u&&S.jsx("p",{className:"text-xs text-slate-600",children:u})]})}const Cz=[{key:"bot",label:"Bot",icon:YZ},{key:"connection",label:"Connection",icon:u4},{key:"response",label:"Response",icon:o$},{key:"history",label:"History",icon:t$},{key:"memory",label:"Memory",icon:XZ},{key:"context",label:"Context",icon:_2},{key:"commands",label:"Commands",icon:h$},{key:"llm",label:"LLM",icon:e4},{key:"weather",label:"Weather",icon:Xd},{key:"meshmonitor",label:"MeshMonitor",icon:qc},{key:"knowledge",label:"Knowledge",icon:$Z},{key:"mesh_sources",label:"Mesh Sources",icon:i$},{key:"mesh_intelligence",label:"Intelligence",icon:y2},{key:"environmental",label:"Environmental",icon:f$},{key:"dashboard",label:"Dashboard",icon:r4}],ln={bot:"Identity and behavior settings for the bot on the mesh network.",connection:"How MeshAI connects to your Meshtastic radio.",response:"Controls how quickly and how much the bot responds on the mesh.",history:"Conversation history storage and cleanup.",memory:"Short-term conversation memory management. Controls how the bot maintains context within a conversation.",context:"Passive channel monitoring. The bot listens to mesh channels and uses recent messages as context when responding.",commands:"Mesh commands available via the configured prefix. Toggle individual commands on or off.",llm:"AI model configuration. MeshAI uses an LLM to understand questions and generate responses.",weather:"Weather data for the !weather command. This is separate from NWS environmental alerts.",meshmonitor:"AIDA MeshMonitor integration. An additional data source for mesh network monitoring.",knowledge:"Knowledge base for answering questions from stored documents. Connects to Qdrant vector database or local SQLite.",mesh_sources:"Data sources for mesh network information. MeshAI can pull data from multiple sources simultaneously and merge them into a unified view.",mesh_intelligence:"Advanced mesh analysis: health scoring, region management, and automated alerting. The intelligence engine monitors your mesh and detects problems automatically.",environmental:"Live environmental data feeds for situational awareness. Each feed polls a public or authenticated API for real-time conditions affecting your area.",dashboard:"Web dashboard settings. You're looking at it right now."},h0e=[{name:"help",description:"Show available commands and usage"},{name:"health",description:"Mesh network health overview with status dots"},{name:"status",description:"Quick mesh status summary"},{name:"region",description:"List regions or get detailed region breakdown"},{name:"neighbors",description:"Show top infrastructure neighbors with signal quality"},{name:"ping",description:"Test bot responsiveness"},{name:"clear",description:"Clear your conversation history"},{name:"reset",description:"Reset conversation context"},{name:"sub",description:"Subscribe to scheduled reports or alerts"},{name:"unsub",description:"Remove a subscription"},{name:"mysubs",description:"List your active subscriptions"},{name:"alerts",description:"Active NWS weather alerts for mesh area"},{name:"solar",description:"Space weather and HF propagation conditions"},{name:"hf",description:"HF radio propagation (alias for !solar)"},{name:"fire",description:"Active wildfires near the mesh"},{name:"avy",description:"Avalanche advisories for configured zones"},{name:"hotspots",description:"NASA FIRMS satellite fire detections"},{name:"streams",description:"USGS stream gauge readings"},{name:"roads",description:"Road conditions and closures"},{name:"traffic",description:"Traffic flow on monitored corridors"}],f0e=[{value:"US-AL",label:"Alabama"},{value:"US-AK",label:"Alaska"},{value:"US-AZ",label:"Arizona"},{value:"US-AR",label:"Arkansas"},{value:"US-CA",label:"California"},{value:"US-CO",label:"Colorado"},{value:"US-CT",label:"Connecticut"},{value:"US-DE",label:"Delaware"},{value:"US-FL",label:"Florida"},{value:"US-GA",label:"Georgia"},{value:"US-HI",label:"Hawaii"},{value:"US-ID",label:"Idaho"},{value:"US-IL",label:"Illinois"},{value:"US-IN",label:"Indiana"},{value:"US-IA",label:"Iowa"},{value:"US-KS",label:"Kansas"},{value:"US-KY",label:"Kentucky"},{value:"US-LA",label:"Louisiana"},{value:"US-ME",label:"Maine"},{value:"US-MD",label:"Maryland"},{value:"US-MA",label:"Massachusetts"},{value:"US-MI",label:"Michigan"},{value:"US-MN",label:"Minnesota"},{value:"US-MS",label:"Mississippi"},{value:"US-MO",label:"Missouri"},{value:"US-MT",label:"Montana"},{value:"US-NE",label:"Nebraska"},{value:"US-NV",label:"Nevada"},{value:"US-NH",label:"New Hampshire"},{value:"US-NJ",label:"New Jersey"},{value:"US-NM",label:"New Mexico"},{value:"US-NY",label:"New York"},{value:"US-NC",label:"North Carolina"},{value:"US-ND",label:"North Dakota"},{value:"US-OH",label:"Ohio"},{value:"US-OK",label:"Oklahoma"},{value:"US-OR",label:"Oregon"},{value:"US-PA",label:"Pennsylvania"},{value:"US-RI",label:"Rhode Island"},{value:"US-SC",label:"South Carolina"},{value:"US-SD",label:"South Dakota"},{value:"US-TN",label:"Tennessee"},{value:"US-TX",label:"Texas"},{value:"US-UT",label:"Utah"},{value:"US-VT",label:"Vermont"},{value:"US-VA",label:"Virginia"},{value:"US-WA",label:"Washington"},{value:"US-WV",label:"West Virginia"},{value:"US-WI",label:"Wisconsin"},{value:"US-WY",label:"Wyoming"}];function Aa({info:e,link:t,linkText:r="Learn more"}){const[n,i]=U.useState(!1);return S.jsxs("div",{className:"relative inline-block",children:[S.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),i(!n)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),n&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),S.jsxs("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:[e,t&&S.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-1 text-accent hover:underline",onClick:a=>a.stopPropagation(),children:[r," ",S.jsx(qd,{size:10})]})]})]})]})}function un({text:e}){return S.jsx("p",{className:"text-sm text-slate-500 mb-6 pb-4 border-b border-[#1e2a3a]",children:e})}function dt({label:e,value:t,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o="",infoLink:s=""}){const[l,u]=U.useState(!1),c=n==="password";return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,o&&S.jsx(Aa,{info:o,link:s})]}),S.jsxs("div",{className:"relative",children:[S.jsx("input",{type:c&&!l?"password":"text",value:t,onChange:h=>r(h.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),c&&S.jsx("button",{type:"button",onClick:()=>u(!l),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:l?S.jsx(t4,{size:16}):S.jsx(_2,{size:16})})]}),a&&S.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function je({label:e,value:t,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s="",infoLink:l=""}){return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,s&&S.jsx(Aa,{info:s,link:l})]}),S.jsx("input",{type:"number",value:t,onChange:u=>r(Number(u.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&S.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function _t({label:e,checked:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){return S.jsxs("div",{className:"flex items-center justify-between py-2",children:[S.jsxs("div",{children:[S.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[e,i&&S.jsx(Aa,{info:i,link:a})]}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]}),S.jsx("button",{type:"button",onClick:()=>r(!t),className:`relative w-11 h-6 rounded-full transition-colors ${t?"bg-accent":"bg-[#1e2a3a]"}`,children:S.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${t?"translate-x-5":""}`})})]})}function da({label:e,value:t,onChange:r,options:n,helper:i="",info:a="",infoLink:o=""}){return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&S.jsx(Aa,{info:a,link:o})]}),S.jsx("select",{value:t,onChange:s=>r(s.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(s=>S.jsx("option",{value:s.value,children:s.label},s.value))}),i&&S.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function d0e({label:e,value:t,onChange:r,rows:n=4,helper:i="",info:a="",infoLink:o=""}){return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&S.jsx(Aa,{info:a,link:o})]}),S.jsx("textarea",{value:t,onChange:s=>r(s.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&S.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Ac({label:e,value:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=U.useState(t.join(", "));U.useEffect(()=>{s(t.join(", "))},[t]);const l=()=>{const u=o.split(",").map(c=>c.trim()).filter(Boolean);r(u)};return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&S.jsx(Aa,{info:i,link:a})]}),S.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function v0e({label:e,value:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=U.useState(t.join(", "));U.useEffect(()=>{s(t.join(", "))},[t]);const l=()=>{const u=o.split(",").map(c=>parseInt(c.trim(),10)).filter(c=>!isNaN(c));r(u)};return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&S.jsx(Aa,{info:i,link:a})]}),S.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Fr({label:e,description:t,checked:r,onChange:n,threshold:i,onThresholdChange:a,thresholdLabel:o,thresholdMin:s,thresholdMax:l,thresholdStep:u=1,thresholdSuffix:c=""}){return S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-3 space-y-2",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{className:"flex-1",children:[S.jsx("span",{className:"text-sm text-slate-300",children:e}),S.jsx("p",{className:"text-xs text-slate-600",children:t})]}),S.jsx("button",{type:"button",onClick:()=>n(!r),className:`relative w-11 h-6 rounded-full transition-colors flex-shrink-0 ml-3 ${r?"bg-accent":"bg-[#1e2a3a]"}`,children:S.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${r?"translate-x-5":""}`})})]}),r&&i!==void 0&&a&&S.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-[#1e2a3a]",children:[S.jsxs("span",{className:"text-xs text-slate-500",children:[o||"Threshold",":"]}),S.jsx("input",{type:"number",value:i,onChange:h=>a(Number(h.target.value)),min:s,max:l,step:u,className:"w-20 px-2 py-1 bg-[#0a0e17] border border-[#1e2a3a] rounded text-xs text-slate-200 font-mono"}),c&&S.jsx("span",{className:"text-xs text-slate-500",children:c})]})]})}function p0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.bot}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Bot Name",value:e.name,onChange:r=>t({...e,name:r}),helper:"Name the bot responds to on the mesh",info:"When someone sends a message containing this name, the bot will respond. Also used as the sender name in broadcasts. Changing this requires a restart."}),S.jsx(dt,{label:"Owner",value:e.owner,onChange:r=>t({...e,owner:r}),helper:"Your callsign or identifier",info:"Identifies the bot operator. Shown in !help responses and used for admin-level commands."})]}),S.jsx(_t,{label:"Respond to DMs",checked:e.respond_to_dms,onChange:r=>t({...e,respond_to_dms:r}),helper:"Reply when someone sends a direct message",info:"When enabled, the bot responds to direct messages from any node. When disabled, the bot only responds to channel messages that mention its name."}),S.jsx(_t,{label:"Filter BBS Protocols",checked:e.filter_bbs_protocols,onChange:r=>t({...e,filter_bbs_protocols:r}),helper:"Ignore BBS bulletin board traffic",info:"Filters out automated BBS protocol messages (advBBS, MAIL*, BOARD*) so the bot doesn't try to respond to machine-to-machine traffic."})]})}function g0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.connection}),S.jsx(da,{label:"Connection Type",value:e.type,onChange:r=>t({...e,type:r}),options:[{value:"serial",label:"Serial (USB)"},{value:"tcp",label:"TCP (Network)"}],helper:"Serial for USB-connected radios, TCP for network or meshtasticd",info:"Serial: direct USB connection to a Meshtastic radio. TCP: connect over the network to a radio's IP or to meshtasticd running on another machine."}),e.type==="serial"?S.jsx(dt,{label:"Serial Port",value:e.serial_port,onChange:r=>t({...e,serial_port:r}),placeholder:"/dev/ttyUSB0",helper:"Device path for your USB radio",info:"Usually /dev/ttyUSB0 on Linux or /dev/ttyACM0. Check with 'ls /dev/tty*' after plugging in your radio."}):S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"TCP Host",value:e.tcp_host,onChange:r=>t({...e,tcp_host:r}),placeholder:"192.168.1.100",helper:"IP address or hostname of the radio/meshtasticd"}),S.jsx(je,{label:"TCP Port",value:e.tcp_port,onChange:r=>t({...e,tcp_port:r}),min:1,max:65535,helper:"Default 4403 for meshtasticd"})]})]})}function m0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.response}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Delay Min (sec)",value:e.delay_min,onChange:r=>t({...e,delay_min:r}),min:0,step:.1,helper:"Minimum wait before responding",info:"Adds a random delay between min and max before the bot sends a response. Prevents the bot from appearing to respond instantly, which can feel unnatural on a radio network."}),S.jsx(je,{label:"Delay Max (sec)",value:e.delay_max,onChange:r=>t({...e,delay_max:r}),min:0,step:.1,helper:"Maximum wait before responding",info:"Also prevents collisions with other traffic by staggering transmissions."})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Max Length",value:e.max_length,onChange:r=>t({...e,max_length:r}),min:50,max:500,helper:"Maximum characters per response message",info:"Meshtastic packets have limited size. This caps how long each message chunk can be. The bot will split longer responses into multiple messages up to Max Messages."}),S.jsx(je,{label:"Max Messages",value:e.max_messages,onChange:r=>t({...e,max_messages:r}),min:1,max:10,helper:"Maximum chunks per response",info:"If a response is longer than Max Length, the bot splits it into this many chunks at most. Higher values = more complete answers but more airtime used."})]})]})}function y0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.history}),S.jsx(dt,{label:"Database Path",value:e.database,onChange:r=>t({...e,database:r}),helper:"SQLite file for storing conversation history",info:"Path to the SQLite database file. Created automatically if it doesn't exist. Stores all conversation history for context."}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Max Messages Per User",value:e.max_messages_per_user,onChange:r=>t({...e,max_messages_per_user:r}),min:0,helper:"History limit per user (0 = unlimited)",info:"Limits how many messages are stored per user. Older messages are pruned when the limit is reached. Set to 0 for no limit."}),S.jsx(je,{label:"Conversation Timeout (sec)",value:e.conversation_timeout,onChange:r=>t({...e,conversation_timeout:r}),min:0,helper:"Seconds before context resets",info:"If a user doesn't message for this long, their next message starts a new conversation context. The bot won't remember the previous topic."})]}),S.jsx(_t,{label:"Auto Cleanup",checked:e.auto_cleanup,onChange:r=>t({...e,auto_cleanup:r}),helper:"Automatically prune old conversations"}),e.auto_cleanup&&S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Cleanup Interval (hours)",value:e.cleanup_interval_hours,onChange:r=>t({...e,cleanup_interval_hours:r}),min:1,helper:"Hours between cleanup runs"}),S.jsx(je,{label:"Max Age (days)",value:e.max_age_days,onChange:r=>t({...e,max_age_days:r}),min:1,helper:"Delete conversations older than this"})]})]})}function _0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.memory}),S.jsx(_t,{label:"Enable Memory",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Keep conversation context between messages"}),e.enabled&&S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Window Size",value:e.window_size,onChange:r=>t({...e,window_size:r}),min:1,helper:"Recent message pairs kept in full",info:"The bot keeps this many recent exchanges (user message + bot response pairs) as full text in context. Older messages are summarized to save token space."}),S.jsx(je,{label:"Summarize Threshold",value:e.summarize_threshold,onChange:r=>t({...e,summarize_threshold:r}),min:1,helper:"Messages before older context is summarized",info:"When the conversation exceeds this many messages, older ones outside the window are compressed into a summary by the LLM."})]})]})}function x0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.context}),S.jsx(_t,{label:"Enable Passive Context",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Listen to channel traffic for context",info:"When enabled, the bot monitors mesh channels and includes recent messages in its context. This lets the bot reference things other people said on the channel."}),e.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(hL,{label:"Observe Channels",value:e.observe_channels,onChange:r=>t({...e,observe_channels:r}),helper:"Channels to monitor (empty = all)",info:"Meshtastic channels to listen on. Leave empty to monitor all channels.",mode:"multi"}),S.jsx(cL,{label:"Ignore Nodes",value:e.ignore_nodes,onChange:r=>t({...e,ignore_nodes:r}),helper:"Nodes to exclude from context",info:"Messages from these nodes won't be included in passive context. Useful for filtering out noisy automated nodes."}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Max Age (sec)",value:e.max_age,onChange:r=>t({...e,max_age:r}),min:0,helper:"Ignore messages older than this"}),S.jsx(je,{label:"Max Context Items",value:e.max_context_items,onChange:r=>t({...e,max_context_items:r}),min:1,helper:"Maximum recent messages to include"})]})]})]})}function b0e({data:e,onChange:t}){const r=new Set(e.disabled_commands.map(i=>i.toLowerCase())),n=i=>{const a=i.toLowerCase();r.has(a)?t({...e,disabled_commands:e.disabled_commands.filter(o=>o.toLowerCase()!==a)}):t({...e,disabled_commands:[...e.disabled_commands,i]})};return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.commands}),S.jsx(_t,{label:"Enable Commands",checked:e.enabled,onChange:i=>t({...e,enabled:i}),helper:"Allow !commands on the mesh"}),e.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"Command Prefix",value:e.prefix,onChange:i=>t({...e,prefix:i}),helper:"Character that triggers commands (e.g. ! for !help)",info:"Users type this character followed by the command name. Only single characters recommended."}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Available Commands",S.jsx(Aa,{info:"Toggle commands on or off. Disabled commands won't respond when users invoke them."})]}),S.jsx("div",{className:"grid gap-1",children:h0e.map(i=>{const a=!r.has(i.name.toLowerCase());return S.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#0a0e17] border border-[#1e2a3a] rounded hover:border-[#2a3a4a] transition-colors",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsxs("code",{className:"text-accent text-sm",children:["!",i.name]}),S.jsx("span",{className:"text-xs text-slate-500",children:i.description})]}),S.jsx("button",{type:"button",onClick:()=>n(i.name),className:`relative w-9 h-5 rounded-full transition-colors ${a?"bg-accent":"bg-[#1e2a3a]"}`,children:S.jsx("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white transition-transform ${a?"translate-x-4":""}`})})]},i.name)})})]})]})]})}function S0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.llm}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(da,{label:"Backend",value:e.backend,onChange:r=>t({...e,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}],helper:"LLM provider to use",info:"OpenAI: GPT models (gpt-4o, gpt-4o-mini). Anthropic: Claude models (claude-sonnet-4-20250514). Google: Gemini models. Can also point to compatible APIs like Ollama, LM Studio, or Open WebUI by changing the Base URL."}),S.jsx(dt,{label:"Model",value:e.model,onChange:r=>t({...e,model:r}),placeholder:"gpt-4o-mini",helper:"Specific model name",info:"The specific model to use. Common choices: gpt-4o-mini (fast, cheap), gpt-4o (better, costs more), claude-sonnet-4-20250514 (Anthropic equivalent). For local models via Ollama, use the model name you pulled (e.g. llama3.1)."})]}),S.jsx(dt,{label:"API Key",value:e.api_key,onChange:r=>t({...e,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax",info:"Your API key from the provider. You can also use ${ENV_VAR} syntax to read from an environment variable instead of storing the key in the config file."}),S.jsx(dt,{label:"Base URL",value:e.base_url,onChange:r=>t({...e,base_url:r}),placeholder:"https://api.openai.com/v1",helper:"API endpoint (change for local LLMs)",info:"Default API endpoint for the selected backend. Change this to point to a local LLM server (Ollama at http://localhost:11434/v1, Open WebUI, LM Studio, etc.) or a proxy."}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Timeout (sec)",value:e.timeout,onChange:r=>t({...e,timeout:r}),min:5,max:120,helper:"Maximum seconds to wait for response"}),S.jsx(je,{label:"Max Response Tokens",value:e.max_response_tokens,onChange:r=>t({...e,max_response_tokens:r}),min:100,helper:"Token limit for LLM responses"})]}),S.jsx(_t,{label:"Use System Prompt",checked:e.use_system_prompt,onChange:r=>t({...e,use_system_prompt:r}),helper:"Enable custom system instructions"}),e.use_system_prompt&&S.jsx(d0e,{label:"System Prompt",value:e.system_prompt,onChange:r=>t({...e,system_prompt:r}),rows:6,helper:"Instructions that shape the bot's personality",info:"Instructions that shape the bot's personality and behavior. The bot always follows these instructions. MeshAI adds mesh health data and environmental context automatically — you don't need to include those here."}),S.jsx(_t,{label:"Web Search",checked:e.web_search,onChange:r=>t({...e,web_search:r}),helper:"Enable web search tool (Open WebUI feature)"}),S.jsx(_t,{label:"Google Grounding",checked:e.google_grounding,onChange:r=>t({...e,google_grounding:r}),helper:"Ground responses in web search (Gemini only)"})]})}function w0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.weather}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(da,{label:"Primary Provider",value:e.primary,onChange:r=>t({...e,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}],helper:"Main weather data source"}),S.jsx(da,{label:"Fallback Provider",value:e.fallback,onChange:r=>t({...e,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}],helper:"Backup if primary fails"})]}),S.jsx(dt,{label:"Default Location",value:e.default_location,onChange:r=>t({...e,default_location:r}),placeholder:"Your city, state",helper:"Location when none specified"})]})}function T0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.meshmonitor}),S.jsx(_t,{label:"Enable MeshMonitor",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Connect to AIDA MeshMonitor instance",info:"MeshMonitor by Yeraze provides node data, battery info, telemetry, and auto-responder patterns. MeshAI uses this as a data source and avoids duplicate responses."}),e.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"URL",value:e.url,onChange:r=>t({...e,url:r}),placeholder:"http://192.168.1.100:8080",helper:"MeshMonitor API endpoint",info:"Full URL to your MeshMonitor instance. Usually runs on port 8080."}),S.jsx(_t,{label:"Inject Into Prompt",checked:e.inject_into_prompt,onChange:r=>t({...e,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands",info:"Adds MeshMonitor's auto-responder patterns to the LLM context so it knows what commands MeshMonitor handles."}),S.jsx(je,{label:"Refresh Interval (sec)",value:e.refresh_interval,onChange:r=>t({...e,refresh_interval:r}),min:10,helper:"How often to fetch patterns"}),S.jsx(_t,{label:"Polite Mode",checked:e.polite_mode,onChange:r=>t({...e,polite_mode:r}),helper:"Reduce polling frequency",info:"Reduces polling frequency for shared instances to be a good neighbor."})]})]})}function C0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.knowledge}),S.jsx(_t,{label:"Enable Knowledge Base",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Answer questions from stored documents",info:"Uses RAG (Retrieval-Augmented Generation) to answer questions from a knowledge base. Supports Qdrant vector database or local SQLite with FTS5."}),e.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(da,{label:"Backend",value:e.backend,onChange:r=>t({...e,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}],helper:"Knowledge storage backend",info:"Auto tries Qdrant first, falls back to SQLite. Qdrant provides hybrid search with dense+sparse embeddings. SQLite uses FTS5 keyword search."}),(e.backend==="qdrant"||e.backend==="auto")&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Qdrant Host",value:e.qdrant_host,onChange:r=>t({...e,qdrant_host:r}),helper:"Qdrant server hostname",info:"IP or hostname of your Qdrant vector database server."}),S.jsx(je,{label:"Qdrant Port",value:e.qdrant_port,onChange:r=>t({...e,qdrant_port:r}),helper:"Default 6333"})]}),S.jsx(dt,{label:"Collection",value:e.qdrant_collection,onChange:r=>t({...e,qdrant_collection:r}),helper:"Qdrant collection name"}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"TEI Host",value:e.tei_host,onChange:r=>t({...e,tei_host:r}),helper:"Text Embeddings Inference host",info:"TEI service for generating dense embeddings. Uses BAAI/bge-m3 model."}),S.jsx(je,{label:"TEI Port",value:e.tei_port,onChange:r=>t({...e,tei_port:r}),helper:"Default 8090"})]}),S.jsx(_t,{label:"Use Sparse Embeddings",checked:e.use_sparse,onChange:r=>t({...e,use_sparse:r}),helper:"Enable hybrid search with sparse vectors",info:"Combines dense embeddings with sparse (keyword-based) embeddings using Reciprocal Rank Fusion for better search results."})]}),S.jsx(dt,{label:"SQLite DB Path",value:e.db_path,onChange:r=>t({...e,db_path:r}),helper:"Local knowledge database file"}),S.jsx(je,{label:"Top K Results",value:e.top_k,onChange:r=>t({...e,top_k:r}),min:1,max:20,helper:"Number of documents to retrieve"})]})]})}function M0e({source:e,onChange:t,onDelete:r}){const[n,i]=U.useState(!1),a={meshview:"Web-based mesh monitoring tool. Enter the full URL of a MeshView instance. No API key typically required.",meshmonitor:"AIDA MeshMonitor API. Provides node data and network statistics. Requires API token.",mqtt:"Subscribe directly to a Meshtastic MQTT broker for real-time packet data. This is push-based (instant) vs the polling approach of MeshView/MeshMonitor."};return S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[S.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[S.jsxs("div",{className:"flex items-center gap-3",children:[n?S.jsx(zv,{size:16}):S.jsx(Yd,{size:16}),S.jsx("div",{className:`w-2 h-2 rounded-full ${e.enabled?"bg-green-500":"bg-slate-500"}`}),S.jsx("span",{className:"font-mono text-sm text-slate-200",children:e.name||"Unnamed Source"}),S.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:e.type})]}),S.jsx("button",{onClick:o=>{o.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:S.jsx(b2,{size:14})})]}),n&&S.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Name",value:e.name,onChange:o=>t({...e,name:o}),helper:"Friendly name for this source"}),S.jsx(da,{label:"Type",value:e.type,onChange:o=>t({...e,type:o}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}],info:a[e.type]||""})]}),e.type!=="mqtt"&&S.jsx(dt,{label:"URL",value:e.url,onChange:o=>t({...e,url:o}),helper:"Full URL including protocol"}),e.type==="meshmonitor"&&S.jsx(dt,{label:"API Token",value:e.api_token,onChange:o=>t({...e,api_token:o}),type:"password",helper:"Bearer token for authentication"}),e.type==="mqtt"&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Host",value:e.host||"",onChange:o=>t({...e,host:o}),helper:"MQTT broker hostname"}),S.jsx(je,{label:"Port",value:e.port||1883,onChange:o=>t({...e,port:o}),min:1,max:65535,helper:"1883 plain, 8883 TLS"})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Username",value:e.username||"",onChange:o=>t({...e,username:o})}),S.jsx(dt,{label:"Password",value:e.password||"",onChange:o=>t({...e,password:o}),type:"password"})]}),S.jsx(dt,{label:"Topic Root",value:e.topic_root||"msh/US",onChange:o=>t({...e,topic_root:o}),helper:"Base topic to subscribe to"}),S.jsx(_t,{label:"Use TLS",checked:e.use_tls||!1,onChange:o=>t({...e,use_tls:o}),helper:"Encrypt MQTT connection"})]}),S.jsx(je,{label:"Refresh Interval (sec)",value:e.refresh_interval,onChange:o=>t({...e,refresh_interval:o}),min:10,helper:"Polling frequency"}),S.jsx(_t,{label:"Enabled",checked:e.enabled,onChange:o=>t({...e,enabled:o})}),S.jsx(_t,{label:"Polite Mode",checked:e.polite_mode,onChange:o=>t({...e,polite_mode:o}),helper:"Reduce polling for shared instances"})]})]})}function A0e({data:e,onChange:t}){const r=()=>{t([...e,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.mesh_sources}),e.map((n,i)=>S.jsx(M0e,{source:n,onChange:a=>{const o=[...e];o[i]=a,t(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&t(e.filter((a,o)=>o!==i))}},i)),S.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[S.jsx(F0,{size:16})," Add Source"]})]})}function L0e({data:e,onChange:t}){const[r,n]=U.useState(null);return S.jsxs("div",{className:"space-y-6",children:[S.jsx(un,{text:ln.mesh_intelligence}),S.jsx(_t,{label:"Enable Mesh Intelligence",checked:e.enabled,onChange:i=>t({...e,enabled:i}),helper:"Activate health scoring and alerting"}),e.enabled&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Locality Radius (miles)",value:e.locality_radius_miles,onChange:i=>t({...e,locality_radius_miles:i}),min:1,step:.5,helper:"Region assignment radius",info:"Nodes within this distance of a region anchor point are assigned to that region."}),S.jsx(je,{label:"Offline Threshold (hours)",value:e.offline_threshold_hours,onChange:i=>t({...e,offline_threshold_hours:i}),min:1,helper:"Time until node marked offline",info:"A node is considered offline after not being heard for this many hours."})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Packet Threshold",value:e.packet_threshold,onChange:i=>t({...e,packet_threshold:i}),min:0,helper:"Min packets per 24h to flag",info:"Minimum packets per 24 hours. Nodes below this are flagged as low activity."}),S.jsx(je,{label:"Battery Warning %",value:e.battery_warning_percent,onChange:i=>t({...e,battery_warning_percent:i}),min:1,max:100,helper:"Global battery warning level"})]}),S.jsx(cL,{label:"Critical Nodes",value:e.critical_nodes,onChange:i=>t({...e,critical_nodes:i}),helper:"Critical infrastructure nodes",info:"Nodes that get priority alerting when they go offline.",roleFilter:"infrastructure"}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(hL,{label:"Alert Channel",value:e.alert_channel,onChange:i=>t({...e,alert_channel:i}),helper:"Channel for broadcast alerts",info:"Meshtastic channel for broadcast alerts. Select Disabled to turn off channel broadcasting.",mode:"single",includeDisabled:!0}),S.jsx(je,{label:"Alert Cooldown (min)",value:e.alert_cooldown_minutes,onChange:i=>t({...e,alert_cooldown_minutes:i}),min:1,helper:"Min time between repeat alerts",info:"Minimum minutes between repeated alerts for the same condition. Uses scaling cooldown (12h, 24h, 48h)."})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Regions",S.jsx(Aa,{info:"Regions group mesh nodes by geographic area. Each region has an anchor point (lat/lon) and nodes within the region radius are automatically assigned. Regions enable localized reports, alerts, and health scoring."})]}),e.regions.map((i,a)=>S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[S.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:[S.jsxs("div",{className:"flex items-center gap-3",children:[r===a?S.jsx(zv,{size:16}):S.jsx(Yd,{size:16}),S.jsx("span",{className:"font-medium text-slate-200",children:i.name||"Unnamed Region"}),S.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]}),S.jsx("button",{onClick:o=>{if(o.stopPropagation(),confirm(`Delete region "${i.name||"Unnamed Region"}"?`)){const s=e.regions.filter((l,u)=>u!==a);t({...e,regions:s})}},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:S.jsx(b2,{size:14})})]}),r===a&&S.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Name",value:i.name,onChange:o=>{const s=[...e.regions];s[a]={...i,name:o},t({...e,regions:s})}}),S.jsx(dt,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...e.regions];s[a]={...i,local_name:o},t({...e,regions:s})}})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...e.regions];s[a]={...i,lat:o},t({...e,regions:s})},step:1e-4}),S.jsx(je,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...e.regions];s[a]={...i,lon:o},t({...e,regions:s})},step:1e-4})]}),S.jsx(dt,{label:"Description",value:i.description,onChange:o=>{const s=[...e.regions];s[a]={...i,description:o},t({...e,regions:s})}}),S.jsx(Ac,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...e.regions];s[a]={...i,aliases:o},t({...e,regions:s})}}),S.jsx(Ac,{label:"Cities",value:i.cities,onChange:o=>{const s=[...e.regions];s[a]={...i,cities:o},t({...e,regions:s})}})]})]},a)),S.jsxs("button",{onClick:()=>{const i={name:"",local_name:"",lat:0,lon:0,description:"",aliases:[],cities:[]};t({...e,regions:[...e.regions,i]}),n(e.regions.length)},className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[S.jsx(F0,{size:16})," Add Region"]})]}),S.jsxs("div",{className:"space-y-3",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Rules",S.jsx(Aa,{info:"Configure which conditions trigger alerts. Each rule can have an optional threshold value."})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Infrastructure"}),S.jsx(Fr,{label:"Infra Offline",description:"Alert when an infrastructure node (router/repeater) goes offline",checked:e.alert_rules.infra_offline,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_offline:i}})}),S.jsx(Fr,{label:"Infra Recovery",description:"Alert when an offline infrastructure node comes back online",checked:e.alert_rules.infra_recovery,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_recovery:i}})}),S.jsx(Fr,{label:"New Router",description:"Alert when a new router/repeater appears on the mesh",checked:e.alert_rules.new_router,onChange:i=>t({...e,alert_rules:{...e.alert_rules,new_router:i}})}),S.jsx(Fr,{label:"Feeder Offline",description:"Alert when a data source (MeshView/MeshMonitor) stops responding",checked:e.alert_rules.feeder_offline,onChange:i=>t({...e,alert_rules:{...e.alert_rules,feeder_offline:i}})}),S.jsx(Fr,{label:"Single Gateway",description:"Alert when an infrastructure node has only one connection path",checked:e.alert_rules.infra_single_gateway,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_single_gateway:i}})}),S.jsx(Fr,{label:"Region Blackout",description:"Alert when all infrastructure in a region goes offline",checked:e.alert_rules.region_total_blackout,onChange:i=>t({...e,alert_rules:{...e.alert_rules,region_total_blackout:i}})})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Power"}),S.jsx(Fr,{label:"Battery Warning",description:"Alert when infra node battery drops below warning threshold",checked:e.alert_rules.battery_warning,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_warning:i}}),threshold:e.alert_rules.battery_warning_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_warning_threshold:i}}),thresholdLabel:"Below",thresholdMin:10,thresholdMax:90,thresholdSuffix:"%"}),S.jsx(Fr,{label:"Battery Critical",description:"Alert at critical battery level",checked:e.alert_rules.battery_critical,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_critical:i}}),threshold:e.alert_rules.battery_critical_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_critical_threshold:i}}),thresholdLabel:"Below",thresholdMin:5,thresholdMax:50,thresholdSuffix:"%"}),S.jsx(Fr,{label:"Battery Emergency",description:"Alert at emergency battery level",checked:e.alert_rules.battery_emergency,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_emergency:i}}),threshold:e.alert_rules.battery_emergency_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_emergency_threshold:i}}),thresholdLabel:"Below",thresholdMin:1,thresholdMax:25,thresholdSuffix:"%"}),S.jsx(Fr,{label:"Battery Trend Declining",description:"Alert when battery shows a declining trend over 7 days",checked:e.alert_rules.battery_trend_declining,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_trend_declining:i}})}),S.jsx(Fr,{label:"Power Source Change",description:"Alert when a node switches between battery and USB power",checked:e.alert_rules.power_source_change,onChange:i=>t({...e,alert_rules:{...e.alert_rules,power_source_change:i}})}),S.jsx(Fr,{label:"Solar Not Charging",description:"Alert when a solar-powered node isn't charging during daylight",checked:e.alert_rules.solar_not_charging,onChange:i=>t({...e,alert_rules:{...e.alert_rules,solar_not_charging:i}})})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Utilization"}),S.jsx(Fr,{label:"High Utilization",description:"Alert when channel utilization stays high for extended periods",checked:e.alert_rules.sustained_high_util,onChange:i=>t({...e,alert_rules:{...e.alert_rules,sustained_high_util:i}}),threshold:e.alert_rules.high_util_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,high_util_threshold:i}}),thresholdLabel:"Above",thresholdMin:5,thresholdMax:50,thresholdSuffix:`% for ${e.alert_rules.high_util_hours}h`}),S.jsx(Fr,{label:"Packet Flood",description:"Alert when a single node sends excessive packets",checked:e.alert_rules.packet_flood,onChange:i=>t({...e,alert_rules:{...e.alert_rules,packet_flood:i}}),threshold:e.alert_rules.packet_flood_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,packet_flood_threshold:i}}),thresholdLabel:"Over",thresholdMin:100,thresholdMax:2e3,thresholdSuffix:"pkts/24h"})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Health Scores"}),S.jsx(Fr,{label:"Mesh Score Alert",description:"Alert when overall mesh health score drops below threshold",checked:e.alert_rules.mesh_score_alert,onChange:i=>t({...e,alert_rules:{...e.alert_rules,mesh_score_alert:i}}),threshold:e.alert_rules.mesh_score_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,mesh_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"}),S.jsx(Fr,{label:"Region Score Alert",description:"Alert when a region's health score drops below threshold",checked:e.alert_rules.region_score_alert,onChange:i=>t({...e,alert_rules:{...e.alert_rules,region_score_alert:i}}),threshold:e.alert_rules.region_score_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,region_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"})]})]})]})]})}function k0e({data:e,onChange:t}){var r,n,i,a,o,s,l,u,c,h,f,d,p,g,m,y;return S.jsxs("div",{className:"space-y-6",children:[S.jsx(un,{text:ln.environmental}),S.jsx(_t,{label:"Enable Environmental Feeds",checked:e.enabled,onChange:_=>t({...e,enabled:_}),helper:"Activate live data polling"}),e.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(Ac,{label:"NWS Zones",value:e.nws_zones,onChange:_=>t({...e,nws_zones:_}),helper:"Zone IDs like IDZ016, IDZ030",info:"NWS forecast zones covering your mesh area. Find yours at https://www.weather.gov/pimar/PubZone",infoLink:"https://www.weather.gov/pimar/PubZone"}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),S.jsx(_t,{label:"",checked:e.nws.enabled,onChange:_=>t({...e,nws:{...e.nws,enabled:_}})})]}),e.nws.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"User Agent",value:e.nws.user_agent,onChange:_=>t({...e,nws:{...e.nws,user_agent:_}}),placeholder:"(MeshAI, your@email.com)",helper:"Required format: (app_name, contact_email)",info:"Required by NWS. You make it up - just use the format (app_name, your_email). No signup needed."}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Tick Seconds",value:e.nws.tick_seconds,onChange:_=>t({...e,nws:{...e.nws,tick_seconds:_}}),min:30,helper:"Polling interval"}),S.jsx(da,{label:"Min Severity",value:e.nws.severity_min,onChange:_=>t({...e,nws:{...e.nws,severity_min:_}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}],helper:"Filter out lower severity alerts",info:"Minimum severity level to display. 'Moderate' filters out minor advisories. 'Severe' shows only serious warnings."})]})]})]}),S.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),S.jsx("p",{className:"text-xs text-slate-600",children:"Solar indices, geomagnetic storms, HF propagation"})]}),S.jsx(_t,{label:"",checked:e.swpc.enabled,onChange:_=>t({...e,swpc:{...e.swpc,enabled:_}})})]})}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),S.jsx("p",{className:"text-xs text-slate-600",children:"VHF/UHF extended range conditions"})]}),S.jsx(_t,{label:"",checked:e.ducting.enabled,onChange:_=>t({...e,ducting:{...e.ducting,enabled:_}})})]}),e.ducting.enabled&&S.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[S.jsx(je,{label:"Tick Seconds",value:e.ducting.tick_seconds,onChange:_=>t({...e,ducting:{...e.ducting,tick_seconds:_}}),min:60}),S.jsx(je,{label:"Latitude",value:e.ducting.latitude,onChange:_=>t({...e,ducting:{...e.ducting,latitude:_}}),step:.01,info:"Center point of your mesh coverage area. The ducting adapter checks atmospheric conditions at this location."}),S.jsx(je,{label:"Longitude",value:e.ducting.longitude,onChange:_=>t({...e,ducting:{...e.ducting,longitude:_}}),step:.01})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),S.jsx("p",{className:"text-xs text-slate-600",children:"Active wildfires from National Interagency Fire Center"})]}),S.jsx(_t,{label:"",checked:e.fires.enabled,onChange:_=>t({...e,fires:{...e.fires,enabled:_}})})]}),e.fires.enabled&&S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Tick Seconds",value:e.fires.tick_seconds,onChange:_=>t({...e,fires:{...e.fires,tick_seconds:_}}),min:60}),S.jsx(da,{label:"State",value:e.fires.state,onChange:_=>t({...e,fires:{...e.fires,state:_}}),options:f0e,helper:"Filter fires by state",info:"Two-letter state code for NIFC wildfire filtering."})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),S.jsx("p",{className:"text-xs text-slate-600",children:"Backcountry avalanche danger ratings"})]}),S.jsx(_t,{label:"",checked:e.avalanche.enabled,onChange:_=>t({...e,avalanche:{...e.avalanche,enabled:_}})})]}),e.avalanche.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(je,{label:"Tick Seconds",value:e.avalanche.tick_seconds,onChange:_=>t({...e,avalanche:{...e.avalanche,tick_seconds:_}}),min:60}),S.jsx(Ac,{label:"Center IDs",value:e.avalanche.center_ids,onChange:_=>t({...e,avalanche:{...e.avalanche,center_ids:_}}),helper:"e.g., SNFAC, IPAC, FAC",info:"Find your local center at https://avalanche.org/avalanche-centers/",infoLink:"https://avalanche.org/avalanche-centers/"}),S.jsx(v0e,{label:"Season Months",value:e.avalanche.season_months,onChange:_=>t({...e,avalanche:{...e.avalanche,season_months:_}}),helper:"e.g., 12, 1, 2, 3, 4",info:"Months when avalanche forecasts are active. Default Dec-Apr. Adjust for your region's season."})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"USGS Stream Gauges"}),S.jsx("p",{className:"text-xs text-slate-600",children:"River and stream water levels"})]}),S.jsx(_t,{label:"",checked:((r=e.usgs)==null?void 0:r.enabled)||!1,onChange:_=>{var b,w;return t({...e,usgs:{...e.usgs,enabled:_,tick_seconds:((b=e.usgs)==null?void 0:b.tick_seconds)||900,sites:((w=e.usgs)==null?void 0:w.sites)||[]}})}})]}),((n=e.usgs)==null?void 0:n.enabled)&&S.jsxs(S.Fragment,{children:[S.jsx(je,{label:"Tick Seconds",value:e.usgs.tick_seconds,onChange:_=>t({...e,usgs:{...e.usgs,tick_seconds:_}}),min:900,helper:"Minimum 15 min (900s)"}),S.jsx(Ac,{label:"Site IDs",value:e.usgs.sites,onChange:_=>t({...e,usgs:{...e.usgs,sites:_}}),helper:"USGS gauge site numbers",info:"Find site IDs at waterdata.usgs.gov/nwis",infoLink:"https://waterdata.usgs.gov/nwis"})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"TomTom Traffic"}),S.jsx("p",{className:"text-xs text-slate-600",children:"Traffic flow on monitored corridors"})]}),S.jsx(_t,{label:"",checked:((i=e.traffic)==null?void 0:i.enabled)||!1,onChange:_=>{var b,w,C;return t({...e,traffic:{...e.traffic,enabled:_,tick_seconds:((b=e.traffic)==null?void 0:b.tick_seconds)||300,api_key:((w=e.traffic)==null?void 0:w.api_key)||"",corridors:((C=e.traffic)==null?void 0:C.corridors)||[]}})}})]}),((a=e.traffic)==null?void 0:a.enabled)&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"API Key",value:e.traffic.api_key,onChange:_=>t({...e,traffic:{...e.traffic,api_key:_}}),type:"password",helper:"Get key at developer.tomtom.com",infoLink:"https://developer.tomtom.com"}),S.jsx(je,{label:"Tick Seconds",value:e.traffic.tick_seconds,onChange:_=>t({...e,traffic:{...e.traffic,tick_seconds:_}}),min:60}),S.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors (each with name, lat, lon):"}),(e.traffic.corridors||[]).map((_,b)=>S.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[S.jsx(dt,{label:"Name",value:_.name,onChange:w=>{const C=[...e.traffic.corridors];C[b]={..._,name:w},t({...e,traffic:{...e.traffic,corridors:C}})}}),S.jsx(je,{label:"Lat",value:_.lat,onChange:w=>{const C=[...e.traffic.corridors];C[b]={..._,lat:w},t({...e,traffic:{...e.traffic,corridors:C}})},step:.01}),S.jsx(je,{label:"Lon",value:_.lon,onChange:w=>{const C=[...e.traffic.corridors];C[b]={..._,lon:w},t({...e,traffic:{...e.traffic,corridors:C}})},step:.01}),S.jsx("button",{onClick:()=>t({...e,traffic:{...e.traffic,corridors:e.traffic.corridors.filter((w,C)=>C!==b)}}),className:"px-2 py-2 text-xs text-red-400 hover:text-red-300 border border-red-400/30 rounded",children:"Remove"})]},b)),S.jsx("button",{onClick:()=>t({...e,traffic:{...e.traffic,corridors:[...e.traffic.corridors||[],{name:"",lat:0,lon:0}]}}),className:"text-xs text-accent hover:underline",children:"+ Add Corridor"})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"511 Road Conditions"}),S.jsx("p",{className:"text-xs text-slate-600",children:"State DOT road events and closures"})]}),S.jsx(_t,{label:"",checked:((o=e.roads511)==null?void 0:o.enabled)||!1,onChange:_=>{var b,w,C,M,A;return t({...e,roads511:{...e.roads511,enabled:_,tick_seconds:((b=e.roads511)==null?void 0:b.tick_seconds)||300,api_key:((w=e.roads511)==null?void 0:w.api_key)||"",base_url:((C=e.roads511)==null?void 0:C.base_url)||"",endpoints:((M=e.roads511)==null?void 0:M.endpoints)||["/get/event"],bbox:((A=e.roads511)==null?void 0:A.bbox)||[]}})}})]}),((s=e.roads511)==null?void 0:s.enabled)&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"Base URL",value:e.roads511.base_url,onChange:_=>t({...e,roads511:{...e.roads511,base_url:_}}),placeholder:"https://511.yourstate.gov/api/v2",helper:"State 511 API endpoint"}),S.jsx(dt,{label:"API Key",value:e.roads511.api_key,onChange:_=>t({...e,roads511:{...e.roads511,api_key:_}}),type:"password",helper:"Leave empty if not required"}),S.jsx(je,{label:"Tick Seconds",value:e.roads511.tick_seconds,onChange:_=>t({...e,roads511:{...e.roads511,tick_seconds:_}}),min:60}),S.jsx(Ac,{label:"Endpoints",value:e.roads511.endpoints,onChange:_=>t({...e,roads511:{...e.roads511,endpoints:_}}),helper:"e.g., /get/event, /get/mountainpasses"}),S.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[S.jsx(je,{label:"West",value:((l=e.roads511.bbox)==null?void 0:l[0])||0,onChange:_=>{const b=[...e.roads511.bbox||[0,0,0,0]];b[0]=_,t({...e,roads511:{...e.roads511,bbox:b}})},step:.01}),S.jsx(je,{label:"South",value:((u=e.roads511.bbox)==null?void 0:u[1])||0,onChange:_=>{const b=[...e.roads511.bbox||[0,0,0,0]];b[1]=_,t({...e,roads511:{...e.roads511,bbox:b}})},step:.01}),S.jsx(je,{label:"East",value:((c=e.roads511.bbox)==null?void 0:c[2])||0,onChange:_=>{const b=[...e.roads511.bbox||[0,0,0,0]];b[2]=_,t({...e,roads511:{...e.roads511,bbox:b}})},step:.01}),S.jsx(je,{label:"North",value:((h=e.roads511.bbox)==null?void 0:h[3])||0,onChange:_=>{const b=[...e.roads511.bbox||[0,0,0,0]];b[3]=_,t({...e,roads511:{...e.roads511,bbox:b}})},step:.01})]}),S.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box filter (leave all 0 to disable)"})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NASA FIRMS Satellite Fire Detection"}),S.jsx("p",{className:"text-xs text-slate-600",children:"Near real-time thermal anomalies from satellites"})]}),S.jsx(_t,{label:"",checked:((f=e.firms)==null?void 0:f.enabled)||!1,onChange:_=>{var b,w,C,M,A,k,N;return t({...e,firms:{...e.firms,enabled:_,tick_seconds:((b=e.firms)==null?void 0:b.tick_seconds)||1800,map_key:((w=e.firms)==null?void 0:w.map_key)||"",source:((C=e.firms)==null?void 0:C.source)||"VIIRS_SNPP_NRT",bbox:((M=e.firms)==null?void 0:M.bbox)||[],day_range:((A=e.firms)==null?void 0:A.day_range)||1,confidence_min:((k=e.firms)==null?void 0:k.confidence_min)||"nominal",proximity_km:((N=e.firms)==null?void 0:N.proximity_km)||10}})}})]}),((d=e.firms)==null?void 0:d.enabled)&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"MAP Key",value:e.firms.map_key,onChange:_=>t({...e,firms:{...e.firms,map_key:_}}),type:"password",helper:"Get key at firms.modaps.eosdis.nasa.gov/api/area/",infoLink:"https://firms.modaps.eosdis.nasa.gov/api/area/"}),S.jsx(je,{label:"Tick Seconds",value:e.firms.tick_seconds,onChange:_=>t({...e,firms:{...e.firms,tick_seconds:_}}),min:300,helper:"Minimum 5 min (300s)"}),S.jsx(da,{label:"Satellite Source",value:e.firms.source,onChange:_=>t({...e,firms:{...e.firms,source:_}}),options:[{value:"VIIRS_SNPP_NRT",label:"VIIRS SNPP (Near Real-Time)"},{value:"VIIRS_NOAA20_NRT",label:"VIIRS NOAA-20 (Near Real-Time)"},{value:"MODIS_NRT",label:"MODIS (Near Real-Time)"}]}),S.jsx(je,{label:"Day Range",value:e.firms.day_range,onChange:_=>t({...e,firms:{...e.firms,day_range:_}}),min:1,max:10,helper:"1-10 days of data"}),S.jsx(da,{label:"Minimum Confidence",value:e.firms.confidence_min,onChange:_=>t({...e,firms:{...e.firms,confidence_min:_}}),options:[{value:"low",label:"Low"},{value:"nominal",label:"Nominal"},{value:"high",label:"High"}]}),S.jsx(je,{label:"Proximity (km)",value:e.firms.proximity_km,onChange:_=>t({...e,firms:{...e.firms,proximity_km:_}}),step:.5,helper:"Distance to match known fires"}),S.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[S.jsx(je,{label:"West",value:((p=e.firms.bbox)==null?void 0:p[0])||0,onChange:_=>{const b=[...e.firms.bbox||[0,0,0,0]];b[0]=_,t({...e,firms:{...e.firms,bbox:b}})},step:.01}),S.jsx(je,{label:"South",value:((g=e.firms.bbox)==null?void 0:g[1])||0,onChange:_=>{const b=[...e.firms.bbox||[0,0,0,0]];b[1]=_,t({...e,firms:{...e.firms,bbox:b}})},step:.01}),S.jsx(je,{label:"East",value:((m=e.firms.bbox)==null?void 0:m[2])||0,onChange:_=>{const b=[...e.firms.bbox||[0,0,0,0]];b[2]=_,t({...e,firms:{...e.firms,bbox:b}})},step:.01}),S.jsx(je,{label:"North",value:((y=e.firms.bbox)==null?void 0:y[3])||0,onChange:_=>{const b=[...e.firms.bbox||[0,0,0,0]];b[3]=_,t({...e,firms:{...e.firms,bbox:b}})},step:.01})]}),S.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box for monitoring area (required)"})]})]})]})]})}function P0e({data:e,onChange:t}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.dashboard}),S.jsx(_t,{label:"Enable Dashboard",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Run the web dashboard"}),e.enabled&&S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Host",value:e.host,onChange:r=>t({...e,host:r}),placeholder:"0.0.0.0",helper:"Network bind address",info:"0.0.0.0 = accessible from any device on the network. 127.0.0.1 = only accessible from this machine."}),S.jsx(je,{label:"Port",value:e.port,onChange:r=>t({...e,port:r}),min:1,max:65535,helper:"Dashboard URL port",info:"Port number for the web dashboard URL. You access the dashboard at http://your-ip:port"})]})]})}function D0e(){var N;const[e,t]=U.useState(null),[r,n]=U.useState(null),[i,a]=U.useState("bot"),[o,s]=U.useState(!0),[l,u]=U.useState(!1),[c,h]=U.useState(null),[f,d]=U.useState(null),[p,g]=U.useState(!1),[m,y]=U.useState(!1),_=U.useCallback(async()=>{try{const D=await fetch("/api/config");if(!D.ok)throw new Error("Failed to fetch config");const I=await D.json();t(I),n(JSON.parse(JSON.stringify(I))),y(!1),h(null)}catch(D){h(D instanceof Error?D.message:"Unknown error")}finally{s(!1)}},[]);U.useEffect(()=>{document.title="Config — MeshAI",_()},[_]),U.useEffect(()=>{e&&r&&y(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);const b=async()=>{if(e){u(!0),h(null),d(null);try{const D=e[i],I=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)}),z=await I.json();if(!I.ok)throw new Error(z.detail||"Save failed");d(`${i} saved successfully`),n(JSON.parse(JSON.stringify(e))),y(!1),z.restart_required&&g(!0),setTimeout(()=>d(null),3e3)}catch(D){h(D instanceof Error?D.message:"Save failed")}finally{u(!1)}}},w=()=>{r&&(t(JSON.parse(JSON.stringify(r))),y(!1))},C=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),d("Restart initiated")}catch{h("Restart failed")}},M=(D,I)=>{e&&t({...e,[D]:I})};if(o)return S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!e)return S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const A=()=>{switch(i){case"bot":return S.jsx(p0e,{data:e.bot,onChange:D=>M("bot",D)});case"connection":return S.jsx(g0e,{data:e.connection,onChange:D=>M("connection",D)});case"response":return S.jsx(m0e,{data:e.response,onChange:D=>M("response",D)});case"history":return S.jsx(y0e,{data:e.history,onChange:D=>M("history",D)});case"memory":return S.jsx(_0e,{data:e.memory,onChange:D=>M("memory",D)});case"context":return S.jsx(x0e,{data:e.context,onChange:D=>M("context",D)});case"commands":return S.jsx(b0e,{data:e.commands,onChange:D=>M("commands",D)});case"llm":return S.jsx(S0e,{data:e.llm,onChange:D=>M("llm",D)});case"weather":return S.jsx(w0e,{data:e.weather,onChange:D=>M("weather",D)});case"meshmonitor":return S.jsx(T0e,{data:e.meshmonitor,onChange:D=>M("meshmonitor",D)});case"knowledge":return S.jsx(C0e,{data:e.knowledge,onChange:D=>M("knowledge",D)});case"mesh_sources":return S.jsx(A0e,{data:e.mesh_sources,onChange:D=>M("mesh_sources",D)});case"mesh_intelligence":return S.jsx(L0e,{data:e.mesh_intelligence,onChange:D=>M("mesh_intelligence",D)});case"environmental":return S.jsx(k0e,{data:e.environmental,onChange:D=>M("environmental",D)});case"dashboard":return S.jsx(P0e,{data:e.dashboard,onChange:D=>M("dashboard",D)});default:return null}},k=((N=Cz.find(D=>D.key===i))==null?void 0:N.label)||i;return S.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[S.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:Cz.map(({key:D,label:I,icon:z})=>S.jsxs("button",{onClick:()=>a(D),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===D?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[S.jsx(z,{size:16}),S.jsx("span",{children:I}),m&&i===D&&S.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},D))}),S.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[S.jsxs("div",{className:"flex items-center justify-between mb-6",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx(l4,{size:20,className:"text-slate-500"}),S.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:k})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[m&&S.jsxs("button",{onClick:w,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[S.jsx(a4,{size:14}),"Discard"]}),S.jsxs("button",{onClick:b,disabled:l||!m,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?S.jsx(i4,{size:14,className:"animate-spin"}):S.jsx(o4,{size:14}),"Save"]})]})]}),p&&S.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[S.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[S.jsx(uo,{size:16}),S.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),S.jsx("button",{onClick:C,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&S.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[S.jsx(jv,{size:16}),S.jsx("span",{className:"text-sm",children:c})]}),f&&S.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[S.jsx(Yc,{size:16}),S.jsx("span",{className:"text-sm",children:f})]}),S.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:S.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:A()})})]})]})}const Mz={infra_offline:v$,infra_recovery:u4,battery_warning:Rx,battery_critical:Rx,battery_emergency:Rx,hf_blackout:Kd,uhf_ducting:qc,weather_warning:Xd,weather_watch:Xd,new_router:qc,packet_flood:uo,sustained_high_util:uo,region_blackout:Bv,default:cy};function I0e(e){return Mz[e]||Mz.default}function H8(e){switch(e==null?void 0:e.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",badge:"bg-red-500/20 text-red-400",iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",badge:"bg-amber-500/20 text-amber-400",iconColor:"text-amber-500"};case"watch":return{bg:"bg-yellow-500/10",border:"border-yellow-500",badge:"bg-yellow-500/20 text-yellow-400",iconColor:"text-yellow-500"};case"advisory":case"info":default:return{bg:"bg-blue-500/10",border:"border-blue-500",badge:"bg-blue-500/20 text-blue-400",iconColor:"text-blue-500"}}}function N0e(e){const t=typeof e=="number"?new Date(e*1e3):new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/1e3),a=Math.floor(i/60),o=Math.floor(a/60),s=Math.floor(o/24);return i<60?"Just now":a<60?`${a}m ago`:o<24?`${o}h ago`:`${s}d ago`}function E0e(e){return(typeof e=="number"?new Date(e*1e3):new Date(e)).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}function R0e(e){return e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h ${Math.floor(e%3600/60)}m`:`${Math.floor(e/86400)}d`}function O0e({alert:e,onAcknowledge:t}){var i;const r=H8(e.severity),n=I0e(e.type);return S.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-4 ${r.border}`,children:S.jsxs("div",{className:"flex items-start gap-3",children:[S.jsx(n,{size:20,className:r.iconColor}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[S.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${r.badge}`,children:(i=e.severity)==null?void 0:i.toUpperCase()}),S.jsx("span",{className:"text-xs text-slate-500",children:e.type})]}),S.jsx("div",{className:"text-sm text-slate-200",children:e.message}),S.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx(Xc,{size:12}),e.timestamp?N0e(e.timestamp):"Just now"]}),e.scope_value&&S.jsxs("span",{children:[e.scope_type,": ",e.scope_value]})]})]}),S.jsx("button",{onClick:()=>t(e),className:"px-3 py-1 text-xs text-slate-400 hover:text-slate-200 border border-border rounded hover:bg-bg-hover transition-colors",children:"Acknowledge"})]})})}function z0e({history:e,typeFilter:t,severityFilter:r,onTypeFilterChange:n,onSeverityFilterChange:i,page:a,totalPages:o,onPageChange:s}){const l=["all","infra_offline","infra_recovery","battery_warning","battery_critical","hf_blackout","uhf_ducting","weather_warning","new_router","packet_flood"],u=["all","critical","warning","watch","info"];return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg",children:[S.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-4",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(x2,{size:14,className:"text-slate-400"}),S.jsx("span",{className:"text-sm text-slate-400",children:"Filter:"})]}),S.jsx("select",{value:t,onChange:c=>n(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:l.map(c=>S.jsx("option",{value:c,children:c==="all"?"All Types":c.replace(/_/g," ")},c))}),S.jsx("select",{value:r,onChange:c=>i(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:u.map(c=>S.jsx("option",{value:c,children:c==="all"?"All Severities":c.charAt(0).toUpperCase()+c.slice(1)},c))})]}),S.jsx("div",{className:"overflow-x-auto",children:S.jsxs("table",{className:"w-full",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border",children:[S.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Time"}),S.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Type"}),S.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Severity"}),S.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Message"}),S.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Duration"})]})}),S.jsx("tbody",{children:e.length>0?e.map((c,h)=>{const f=H8(c.severity);return S.jsxs("tr",{className:"border-b border-border hover:bg-bg-hover",children:[S.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono whitespace-nowrap",children:E0e(c.timestamp)}),S.jsx("td",{className:"p-4 text-sm text-slate-300",children:c.type.replace(/_/g," ")}),S.jsx("td",{className:"p-4",children:S.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${f.badge}`,children:c.severity})}),S.jsx("td",{className:"p-4 text-sm text-slate-200 max-w-md truncate",children:c.message}),S.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono",children:c.duration?R0e(c.duration):"-"})]},c.id||h)}):S.jsx("tr",{children:S.jsx("td",{colSpan:5,className:"p-8 text-center text-slate-500",children:"No alert history available"})})})]})}),o>1&&S.jsxs("div",{className:"p-4 border-t border-border flex items-center justify-between",children:[S.jsxs("span",{className:"text-sm text-slate-400",children:["Page ",a," of ",o]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("button",{onClick:()=>s(a-1),disabled:a<=1,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:S.jsx(QZ,{size:16})}),S.jsx("button",{onClick:()=>s(a+1),disabled:a>=o,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:S.jsx(Yd,{size:16})})]})]})]})}function B0e({subscription:e,nodes:t}){const r=o=>{const s=t.find(l=>l.node_id_hex===o||String(l.node_num)===o||l.short_name===o);return s?s.long_name&&s.long_name!==s.short_name?`${s.short_name} (${s.long_name})`:s.short_name:o},n=()=>{if(e.sub_type==="alerts")return"Real-time";const o=e.schedule_time||"0000",s=parseInt(o.slice(0,2)),l=o.slice(2),u=s>=12?"PM":"AM";let h=`${s%12||12}:${l} ${u}`;return e.sub_type==="weekly"&&e.schedule_day&&(h+=` ${e.schedule_day.charAt(0).toUpperCase()}${e.schedule_day.slice(1)}`),h},a=(()=>{switch(e.sub_type){case"alerts":return cy;case"daily":return Xc;case"weekly":return Xc;default:return cy}})();return S.jsx("div",{className:"p-4 rounded-lg bg-bg-hover border border-border",children:S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center",children:S.jsx(a,{size:18,className:"text-blue-400"})}),S.jsxs("div",{className:"flex-1",children:[S.jsxs("div",{className:"text-sm text-slate-200 font-medium",children:[e.sub_type.charAt(0).toUpperCase()+e.sub_type.slice(1),e.scope_type!=="mesh"&&e.scope_value&&S.jsxs("span",{className:"text-slate-400 font-normal ml-2",children:["(",e.scope_type,": ",e.scope_value,")"]})]}),S.jsxs("div",{className:"text-xs text-slate-500 mt-0.5",children:[n()," • ",r(e.user_id)]})]}),S.jsx("div",{className:`w-2 h-2 rounded-full ${e.enabled?"bg-green-500":"bg-slate-500"}`})]})})}function j0e(){const[e,t]=U.useState([]),[r,n]=U.useState([]),[i,a]=U.useState([]),[o,s]=U.useState([]),[l,u]=U.useState(!0),[c,h]=U.useState(null),[f,d]=U.useState("all"),[p,g]=U.useState("all"),[m,y]=U.useState(1),[_,b]=U.useState(1),w=20,[C,M]=U.useState(new Set),{lastAlert:A}=S2();U.useEffect(()=>{document.title="Alerts — MeshAI"},[]),U.useEffect(()=>{Promise.all([c4().catch(()=>[]),jP(w,0).catch(()=>({items:[],total:0})),_$().catch(()=>[]),fetch("/api/nodes").then(D=>D.json()).catch(()=>[])]).then(([D,I,z,O])=>{t(D),Array.isArray(I)?(n(I),b(1)):(n(I.items||[]),b(Math.ceil((I.total||0)/w))),a(z),s(O),u(!1)}).catch(D=>{h(D.message),u(!1)})},[]),U.useEffect(()=>{A&&t(D=>D.some(z=>z.type===A.type&&z.message===A.message)?D:[A,...D])},[A]),U.useEffect(()=>{const D=(m-1)*w;jP(w,D,f,p).then(I=>{Array.isArray(I)?(n(I),b(1)):(n(I.items||[]),b(Math.ceil((I.total||0)/w)))}).catch(()=>{})},[m,f,p]);const k=U.useCallback(D=>{const I=`${D.type}-${D.message}-${D.timestamp}`;M(z=>new Set([...z,I]))},[]),N=e.filter(D=>{const I=`${D.type}-${D.message}-${D.timestamp}`;return!C.has(I)});return l?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading alerts..."})}):c?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsxs("div",{className:"text-red-400",children:["Error: ",c]})}):S.jsxs("div",{className:"space-y-6",children:[S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(uo,{size:14}),"Active Alerts (",N.length,")"]}),N.length>0?S.jsx("div",{className:"space-y-3",children:N.map((D,I)=>S.jsx(O0e,{alert:D,onAcknowledge:k},`${D.type}-${D.timestamp}-${I}`))}):S.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-8",children:[S.jsx(hd,{size:20,className:"text-green-500"}),S.jsx("span",{children:"No active alerts — all systems nominal"})]})]}),S.jsxs("div",{children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(Xc,{size:14}),"Alert History"]}),S.jsx(z0e,{history:r,typeFilter:f,severityFilter:p,onTypeFilterChange:D=>{d(D),y(1)},onSeverityFilterChange:D=>{g(D),y(1)},page:m,totalPages:_,onPageChange:y})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(d$,{size:14}),"Mesh Subscriptions (",i.length,")"]}),i.length>0?S.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:i.map(D=>S.jsx(B0e,{subscription:D,nodes:o},D.id))}):S.jsxs("div",{className:"text-slate-500 py-4",children:[S.jsx("p",{children:"No active subscriptions."}),S.jsxs("p",{className:"text-xs mt-2",children:["Manage subscriptions via ",S.jsx("code",{className:"text-blue-400",children:"!subscribe"})," on mesh"]})]})]})]})}const Bm=[{value:"info",label:"Info",description:"Routine updates (ducting detected, new router appeared)"},{value:"advisory",label:"Advisory",description:"Worth knowing (weather advisory, traffic slow, battery declining)"},{value:"watch",label:"Watch",description:"Pay attention (fire within 50km, weather watch, stream rising)"},{value:"warning",label:"Warning",description:"Act now (fire within 25km, severe weather, critical battery)"},{value:"critical",label:"Critical",description:"Serious issue (critical node down, battery emergency)"},{value:"emergency",label:"Emergency",description:"Life safety (extreme weather, fire at infrastructure, total blackout)"}];function xa({info:e}){const[t,r]=U.useState(!1);return S.jsxs("div",{className:"relative inline-block",children:[S.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),r(!t)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),t&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>r(!1)}),S.jsx("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:e})]})]})}function nc({label:e,value:t,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o=""}){const[s,l]=U.useState(!1),u=n==="password";return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,o&&S.jsx(xa,{info:o})]}),S.jsxs("div",{className:"relative",children:[S.jsx("input",{type:u&&!s?"password":"text",value:t,onChange:c=>r(c.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),u&&S.jsx("button",{type:"button",onClick:()=>l(!s),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:s?S.jsx(t4,{size:16}):S.jsx(_2,{size:16})})]}),a&&S.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function Az({label:e,value:t,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s=""}){return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,s&&S.jsx(xa,{info:s})]}),S.jsx("input",{type:"number",value:t,onChange:l=>r(Number(l.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&S.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function S0({label:e,checked:t,onChange:r,helper:n="",info:i=""}){return S.jsxs("div",{className:"flex items-center justify-between py-2",children:[S.jsxs("div",{children:[S.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[e,i&&S.jsx(xa,{info:i})]}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]}),S.jsx("button",{type:"button",onClick:()=>r(!t),className:`relative w-11 h-6 rounded-full transition-colors ${t?"bg-accent":"bg-[#1e2a3a]"}`,children:S.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${t?"translate-x-5":""}`})})]})}function w0({label:e,value:t,onChange:r,helper:n="",info:i=""}){return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&S.jsx(xa,{info:i})]}),S.jsx("input",{type:"time",value:t,onChange:a=>r(a.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent"}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function V0e({label:e,value:t,onChange:r,placeholder:n="Add item...",helper:i="",info:a=""}){const[o,s]=U.useState(""),l=()=>{o.trim()&&!t.includes(o.trim())&&(r([...t,o.trim()]),s(""))},u=c=>{r(t.filter((h,f)=>f!==c))};return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&S.jsx(xa,{info:a})]}),S.jsxs("div",{className:"flex gap-2",children:[S.jsx("input",{type:"text",value:o,onChange:c=>s(c.target.value),onKeyDown:c=>c.key==="Enter"&&(c.preventDefault(),l()),className:"flex-1 px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent",placeholder:n}),S.jsx("button",{type:"button",onClick:l,className:"px-3 py-2 bg-accent hover:bg-accent/80 rounded text-sm text-white transition-colors",children:S.jsx(F0,{size:16})})]}),t.length>0&&S.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:t.map((c,h)=>S.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-[#1e2a3a] rounded text-sm text-slate-300",children:[c,S.jsx("button",{type:"button",onClick:()=>u(h),className:"text-slate-500 hover:text-red-400",children:S.jsx(jv,{size:14})})]},h))}),i&&S.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function F0e({value:e,onChange:t}){const[r,n]=U.useState(!1),i=Bm.find(a=>a.value===e)||Bm[3];return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Severity Threshold",S.jsx(xa,{info:"Only alerts at or above this severity trigger this rule. Lower threshold = more notifications. 'Warning' is recommended for most rules."})]}),S.jsxs("div",{className:"relative",children:[S.jsxs("button",{type:"button",onClick:()=>n(!r),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-left flex items-center justify-between hover:border-accent transition-colors",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-slate-200",children:i.label}),S.jsxs("span",{className:"text-slate-500 ml-2",children:["— ",i.description]})]}),S.jsx(zv,{size:16,className:`text-slate-500 transition-transform ${r?"rotate-180":""}`})]}),r&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),S.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 z-50 bg-[#0a0e17] border border-[#1e2a3a] rounded-lg shadow-xl overflow-hidden",children:Bm.map(a=>S.jsxs("button",{type:"button",onClick:()=>{t(a.value),n(!1)},className:`w-full px-3 py-2.5 text-left text-sm hover:bg-[#1e2a3a] transition-colors ${e===a.value?"bg-accent/10":""}`,children:[S.jsx("div",{className:"font-medium text-slate-200",children:a.label}),S.jsx("div",{className:"text-xs text-slate-500",children:a.description})]},a.value))})]})]}),S.jsx("p",{className:"text-xs text-slate-600",children:'Lower = more notifications. "Warning" recommended for most rules.'})]})}function G0e({rule:e,categories:t,quietHoursEnabled:r,onChange:n,onDelete:i,onDuplicate:a,onTest:o}){var w,C,M,A;const[s,l]=U.useState(!e.name),[u,c]=U.useState(!1),h=[{value:"",label:"(None)",description:"Rule matches but does not deliver"},{value:"mesh_broadcast",label:"Mesh Broadcast",description:"Send to a mesh radio channel"},{value:"mesh_dm",label:"Mesh DM",description:"Direct message to specific nodes"},{value:"email",label:"Email",description:"Send via SMTP"},{value:"webhook",label:"Webhook",description:"POST to any URL"}],f=[{value:"daily",label:"Daily"},{value:"twice_daily",label:"Twice Daily"},{value:"weekly",label:"Weekly"}],d=[{value:"mesh_health_summary",label:"Mesh Health Summary",description:"Current health score, pillar breakdown, problem nodes"},{value:"rf_propagation_report",label:"RF Propagation Report",description:"Solar indices, Kp, ducting conditions"},{value:"alerts_digest",label:"Active Alerts Digest",description:"Summary of all active environmental alerts"},{value:"environmental_conditions",label:"Environmental Conditions",description:"Full conditions: weather, fire, streams, roads"},{value:"custom",label:"Custom Message",description:"Write your own with template tokens"}],p=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],g=k=>{const N=e.categories||[];N.includes(k)?n({...e,categories:N.filter(D=>D!==k)}):n({...e,categories:[...N,k]})},m=k=>{const N=e.schedule_days||[];N.includes(k)?n({...e,schedule_days:N.filter(D=>D!==k)}):n({...e,schedule_days:[...N,k]})},y=async()=>{c(!0),await o(),c(!1)},_=()=>{if(e.trigger_type==="schedule")return"[Scheduled report preview would appear here]";const k=e.categories||[];if(k.length===0&&t.length>0)return t[0].example_message||"Alert notification";const N=t.find(D=>k.includes(D.id));return(N==null?void 0:N.example_message)||"Alert notification"},b=()=>{var N,D,I,z,O,V,G,F;const k=[];if(e.trigger_type==="schedule"){const Z=((N=f.find(W=>W.value===e.schedule_frequency))==null?void 0:N.label)||e.schedule_frequency,B=((D=d.find(W=>W.value===e.message_type))==null?void 0:D.label)||e.message_type;k.push(`${Z} at ${e.schedule_time||"??:??"}`),k.push(B)}else{const Z=((I=e.categories)==null?void 0:I.length)||0,B=Z===0?"All":t.filter(H=>{var X;return(X=e.categories)==null?void 0:X.includes(H.id)}).map(H=>H.name).slice(0,2).join(", ")+(Z>2?` +${Z-2}`:""),W=((z=Bm.find(H=>H.value===e.min_severity))==null?void 0:z.label)||e.min_severity;k.push(`${B} at ${W}+`)}if(!e.delivery_type)k.push("⚠️ No delivery");else{const Z=((O=h.find(W=>W.value===e.delivery_type))==null?void 0:O.label)||e.delivery_type;let B="";if(e.delivery_type==="mesh_broadcast")B=`Ch ${e.broadcast_channel}`;else if(e.delivery_type==="mesh_dm")B=`${((V=e.node_ids)==null?void 0:V.length)||0} nodes`;else if(e.delivery_type==="email")B=(G=e.recipients)!=null&&G.length?e.recipients[0]+(e.recipients.length>1?` +${e.recipients.length-1}`:""):"no recipients";else if(e.delivery_type==="webhook")try{B=new URL(e.webhook_url).hostname}catch{B=((F=e.webhook_url)==null?void 0:F.slice(0,20))||"no URL"}k.push(`${Z}${B?` (${B})`:""}`)}return k.join(" → ")};return S.jsxs("div",{className:`border rounded-lg overflow-hidden ${e.enabled?"border-[#1e2a3a]":"border-slate-700 opacity-60"}`,children:[S.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>l(!s),children:[S.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[s?S.jsx(zv,{size:16,className:"text-slate-500 flex-shrink-0"}):S.jsx(Yd,{size:16,className:"text-slate-500 flex-shrink-0"}),S.jsx("button",{onClick:k=>{k.stopPropagation(),n({...e,enabled:!e.enabled})},className:`w-2 h-2 rounded-full flex-shrink-0 ${e.enabled?"bg-green-500":"bg-slate-500"}`,title:e.enabled?"Enabled":"Disabled"}),e.trigger_type==="schedule"?S.jsx(Xc,{size:14,className:"text-blue-400 flex-shrink-0"}):S.jsx(Kd,{size:14,className:"text-yellow-400 flex-shrink-0"}),S.jsx("span",{className:"font-medium text-slate-200 truncate",children:e.name||"New Rule"}),!s&&S.jsx("span",{className:`text-xs truncate hidden sm:block ${e.delivery_type?"text-slate-500":"text-amber-400"}`,children:b()})]}),S.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[S.jsx("button",{onClick:k=>{k.stopPropagation(),y()},disabled:u||!e.name,className:"p-1.5 text-blue-400 hover:text-blue-300 hover:bg-blue-500/10 rounded disabled:opacity-50",title:"Test rule",children:S.jsx(RP,{size:14})}),S.jsx("button",{onClick:k=>{k.stopPropagation(),a()},className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-500/10 rounded",title:"Duplicate",children:S.jsx(e$,{size:14})}),S.jsx("button",{onClick:k=>{k.stopPropagation(),i()},className:"p-1.5 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",title:"Delete",children:S.jsx(b2,{size:14})})]})]}),s&&S.jsxs("div",{className:"p-4 space-y-6 border-t border-[#1e2a3a]",children:[S.jsx(nc,{label:"Rule Name",value:e.name,onChange:k=>n({...e,name:k}),placeholder:"e.g., Emergency Broadcast, Daily Health Report",helper:"A descriptive name for this rule"}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Trigger Type"}),S.jsxs("div",{className:"flex gap-2",children:[S.jsxs("button",{type:"button",onClick:()=>n({...e,trigger_type:"condition"}),className:`flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors ${e.trigger_type!=="schedule"?"bg-accent/10 border-accent text-accent":"bg-[#0a0e17] border-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:[S.jsx(Kd,{size:16}),S.jsx("span",{children:"Condition"})]}),S.jsxs("button",{type:"button",onClick:()=>n({...e,trigger_type:"schedule"}),className:`flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors ${e.trigger_type==="schedule"?"bg-accent/10 border-accent text-accent":"bg-[#0a0e17] border-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:[S.jsx(Xc,{size:16}),S.jsx("span",{children:"Schedule"})]})]}),S.jsx("p",{className:"text-xs text-slate-600",children:e.trigger_type==="schedule"?"Send reports on a schedule (daily briefings, weekly digests)":"React to alert conditions (fires, outages, weather warnings)"})]}),e.trigger_type!=="schedule"&&S.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[S.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[S.jsx(uo,{size:14}),"WHEN (Condition)"]}),S.jsx(F0e,{value:e.min_severity,onChange:k=>n({...e,min_severity:k})}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Categories",S.jsx(xa,{info:"Select which types of alerts trigger this rule. Leave all unchecked to match ALL categories."})]}),S.jsx("div",{className:"text-xs text-slate-500 mb-2",children:(((w=e.categories)==null?void 0:w.length)||0)===0?"All categories (none selected)":`${(C=e.categories)==null?void 0:C.length} selected`}),S.jsx("div",{className:"max-h-48 overflow-y-auto border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:t.map(k=>{var N,D;return S.jsxs("label",{onClick:()=>g(k.id),className:"flex items-start gap-2 p-2 rounded hover:bg-[#1e2a3a]/50 cursor-pointer",children:[S.jsx("div",{className:`w-4 h-4 mt-0.5 rounded border flex items-center justify-center flex-shrink-0 ${(N=e.categories)!=null&&N.includes(k.id)?"bg-accent border-accent":"border-slate-600"}`,children:((D=e.categories)==null?void 0:D.includes(k.id))&&S.jsx(Yc,{size:12,className:"text-white"})}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("div",{className:"text-sm text-slate-200",children:k.name}),S.jsx("div",{className:"text-xs text-slate-500",children:k.description})]})]},k.id)})})]})]}),e.trigger_type==="schedule"&&S.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[S.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[S.jsx(qZ,{size:14}),"WHEN (Schedule)"]}),S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Frequency"}),S.jsx("select",{value:e.schedule_frequency||"daily",onChange:k=>n({...e,schedule_frequency:k.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:f.map(k=>S.jsx("option",{value:k.value,children:k.label},k.value))})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(w0,{label:"Time",value:e.schedule_time||"07:00",onChange:k=>n({...e,schedule_time:k})}),e.schedule_frequency==="twice_daily"&&S.jsx(w0,{label:"Second Time",value:e.schedule_time_2||"19:00",onChange:k=>n({...e,schedule_time_2:k})})]}),e.schedule_frequency==="weekly"&&S.jsxs("div",{className:"space-y-2",children:[S.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Days"}),S.jsx("div",{className:"flex flex-wrap gap-2",children:p.map(k=>{var N;return S.jsx("button",{type:"button",onClick:()=>m(k),className:`px-3 py-1.5 rounded text-sm capitalize transition-colors ${(N=e.schedule_days)!=null&&N.includes(k)?"bg-accent text-white":"bg-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:k.slice(0,3)},k)})})]}),S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Report Type"}),S.jsx("select",{value:e.message_type||"mesh_health_summary",onChange:k=>n({...e,message_type:k.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:d.map(k=>S.jsx("option",{value:k.value,children:k.label},k.value))}),S.jsx("p",{className:"text-xs text-slate-600",children:(M=d.find(k=>k.value===e.message_type))==null?void 0:M.description})]}),e.message_type==="custom"&&S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Custom Message",S.jsx(xa,{info:"Available tokens: {MESH_SCORE}, {NODE_COUNT}, {NODES_ONLINE}, {ACTIVE_ALERTS}, {KP}, {SFI}, {DATE}, {TIME}"})]}),S.jsx("textarea",{value:e.custom_message||"",onChange:k=>n({...e,custom_message:k.target.value}),rows:4,placeholder:"Good morning! Mesh health: {MESH_SCORE}/100 with {NODE_COUNT} nodes online.",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"})]})]}),S.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[S.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[S.jsx(RP,{size:14}),"SEND VIA"]}),S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Delivery Method",S.jsx(xa,{info:"Where this notification gets delivered. Select (None) to save the rule without delivery — it will match conditions but won't send until you configure a delivery method."})]}),S.jsx("select",{value:e.delivery_type||"",onChange:k=>n({...e,delivery_type:k.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:h.map(k=>S.jsx("option",{value:k.value,children:k.label},k.value))}),S.jsx("p",{className:"text-xs text-slate-600",children:(A=h.find(k=>k.value===(e.delivery_type||"")))==null?void 0:A.description})]}),!e.delivery_type&&S.jsxs("div",{className:"flex items-start gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg",children:[S.jsx(Bv,{size:16,className:"text-amber-400 mt-0.5 flex-shrink-0"}),S.jsx("div",{className:"text-sm text-amber-300",children:"Rule will log matches but not deliver until a delivery method is configured."})]}),e.delivery_type==="mesh_broadcast"&&S.jsx(hL,{label:"Broadcast Channel",value:e.broadcast_channel??0,onChange:k=>n({...e,broadcast_channel:k}),helper:"Select the mesh radio channel",mode:"single"}),e.delivery_type==="mesh_dm"&&S.jsx(cL,{label:"Recipient Nodes",value:e.node_ids||[],onChange:k=>n({...e,node_ids:k}),helper:"Nodes that receive direct messages",valueType:"node_id_hex"}),e.delivery_type==="email"&&S.jsxs("div",{className:"space-y-4",children:[S.jsx(V0e,{label:"Recipients",value:e.recipients||[],onChange:k=>n({...e,recipients:k}),placeholder:"email@example.com",helper:"Email addresses to receive alerts"}),S.jsxs("details",{className:"group",children:[S.jsxs("summary",{className:"flex items-center gap-2 cursor-pointer text-sm text-slate-400 hover:text-slate-200",children:[S.jsx(Yd,{size:14,className:"group-open:rotate-90 transition-transform"}),"SMTP Configuration"]}),S.jsxs("div",{className:"mt-4 space-y-4 pl-6 border-l border-[#1e2a3a]",children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(nc,{label:"SMTP Host",value:e.smtp_host||"",onChange:k=>n({...e,smtp_host:k}),placeholder:"smtp.gmail.com"}),S.jsx(Az,{label:"SMTP Port",value:e.smtp_port??587,onChange:k=>n({...e,smtp_port:k}),min:1,max:65535})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(nc,{label:"Username",value:e.smtp_user||"",onChange:k=>n({...e,smtp_user:k})}),S.jsx(nc,{label:"Password",value:e.smtp_password||"",onChange:k=>n({...e,smtp_password:k}),type:"password",info:"Gmail users: use an App Password from myaccount.google.com/apppasswords"})]}),S.jsx(S0,{label:"Use TLS",checked:e.smtp_tls??!0,onChange:k=>n({...e,smtp_tls:k})}),S.jsx(nc,{label:"From Address",value:e.from_address||"",onChange:k=>n({...e,from_address:k}),placeholder:"alerts@yourdomain.com"})]})]})]}),e.delivery_type==="webhook"&&S.jsx(nc,{label:"Webhook URL",value:e.webhook_url||"",onChange:k=>n({...e,webhook_url:k}),placeholder:"https://discord.com/api/webhooks/...",helper:"POST alert as JSON",info:"Works with Discord webhooks, ntfy.sh, Slack, Home Assistant, Pushover, or any HTTP POST endpoint."})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(Az,{label:"Cooldown (minutes)",value:e.cooldown_minutes??10,onChange:k=>n({...e,cooldown_minutes:k}),min:0,helper:"Min time between repeat sends",info:"Prevents alert spam. Same condition won't re-trigger this rule within this window."}),r&&S.jsx("div",{className:"flex items-end pb-1",children:S.jsx(S0,{label:"Override Quiet Hours",checked:e.override_quiet??!1,onChange:k=>n({...e,override_quiet:k}),helper:"Deliver during quiet hours"})})]}),e.trigger_type!=="schedule"&&S.jsxs("div",{className:"space-y-2",children:[S.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Example Message"}),S.jsx("div",{className:"p-3 bg-[#1e2a3a]/50 rounded-lg border border-[#1e2a3a]",children:S.jsx("p",{className:"text-sm text-slate-300 font-mono",children:_()})}),S.jsx("p",{className:"text-xs text-slate-600",children:"This is an example of what this rule would send."})]})]})]})}function H0e(){var N,D;const[e,t]=U.useState(null),[r,n]=U.useState(null),[i,a]=U.useState([]),[o,s]=U.useState(!0),[l,u]=U.useState(!1),[c,h]=U.useState(null),[f,d]=U.useState(null),[p,g]=U.useState(null),[m,y]=U.useState(!1),_=U.useCallback(async()=>{try{const[I,z]=await Promise.all([fetch("/api/config/notifications"),fetch("/api/notifications/categories")]);if(!I.ok)throw new Error("Failed to fetch notifications config");const O=await I.json(),V=await z.json();t(O),n(JSON.parse(JSON.stringify(O))),a(V),y(!1),h(null)}catch(I){h(I instanceof Error?I.message:"Unknown error")}finally{s(!1)}},[]);U.useEffect(()=>{document.title="Notifications — MeshAI",_()},[_]),U.useEffect(()=>{e&&r&&y(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);const b=async()=>{if(e){u(!0),h(null),d(null);try{const I=await fetch("/api/config/notifications",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),z=await I.json();if(!I.ok)throw new Error(z.detail||"Save failed");d("Notifications config saved successfully"),n(JSON.parse(JSON.stringify(e))),y(!1),setTimeout(()=>d(null),3e3)}catch(I){h(I instanceof Error?I.message:"Save failed")}finally{u(!1)}}},w=()=>{r&&(t(JSON.parse(JSON.stringify(r))),y(!1))},C=()=>({name:"",enabled:!0,trigger_type:"condition",categories:[],min_severity:"warning",schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"19:00",schedule_days:["monday"],message_type:"mesh_health_summary",custom_message:"",delivery_type:"",broadcast_channel:0,node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{},cooldown_minutes:10,override_quiet:!1}),M=()=>{e&&t({...e,rules:[...e.rules||[],C()]})},A=I=>{if(!e)return;const z=e.rules[I],O={...JSON.parse(JSON.stringify(z)),name:`${z.name} (copy)`},V=[...e.rules];V.splice(I+1,0,O),t({...e,rules:V})},k=async I=>{try{const O=await(await fetch(`/api/notifications/rules/${I}/test`,{method:"POST"})).json();g(O),setTimeout(()=>g(null),5e3)}catch{g({success:!1,message:"Test failed"}),setTimeout(()=>g(null),5e3)}};return o?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading notifications config..."})}):e?S.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("div",{children:S.jsx("p",{className:"text-sm text-slate-500",children:"Alert delivery and scheduled reports. Rules define what triggers a notification and where it gets sent."})}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("button",{onClick:_,className:"p-2 text-slate-400 hover:text-slate-200 hover:bg-bg-hover rounded transition-colors",title:"Refresh",children:S.jsx(i4,{size:18})}),S.jsxs("button",{onClick:w,disabled:!m,className:"flex items-center gap-2 px-3 py-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[S.jsx(a4,{size:16}),"Discard"]}),S.jsxs("button",{onClick:b,disabled:l||!m,className:"flex items-center gap-2 px-4 py-2 bg-accent hover:bg-accent/80 disabled:bg-slate-700 disabled:cursor-not-allowed rounded text-white transition-colors",children:[S.jsx(o4,{size:16}),l?"Saving...":"Save"]})]})]}),c&&S.jsx("div",{className:"p-3 rounded-lg text-sm bg-red-500/10 text-red-400 border border-red-500/20",children:c}),f&&S.jsxs("div",{className:"p-3 rounded-lg text-sm bg-green-500/10 text-green-400 border border-green-500/20",children:[S.jsx(Yc,{size:14,className:"inline mr-2"}),f]}),p&&S.jsxs("div",{className:`p-3 rounded-lg text-sm ${p.success?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:[p.success?S.jsx(Yc,{size:14,className:"inline mr-2"}):S.jsx(jv,{size:14,className:"inline mr-2"}),p.message]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6 space-y-6",children:[S.jsx(S0,{label:"Enable Notifications",checked:e.enabled,onChange:I=>t({...e,enabled:I}),helper:"Master switch for all notification delivery",info:"When disabled, no alerts or scheduled messages will be delivered. Alerts still get recorded to history."}),e.enabled&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"space-y-3 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(s$,{size:14,className:"text-slate-400"}),S.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Quiet Hours"})]}),S.jsx(S0,{label:"Enable Quiet Hours",checked:e.quiet_hours_enabled??!0,onChange:I=>t({...e,quiet_hours_enabled:I}),helper:"Suppress non-emergency alerts during sleeping hours",info:"When enabled, alerts below emergency severity are held during quiet hours. When disabled, all alerts deliver anytime."}),e.quiet_hours_enabled&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(w0,{label:"Start Time",value:e.quiet_hours_start||"22:00",onChange:I=>t({...e,quiet_hours_start:I}),helper:"When quiet hours begin"}),S.jsx(w0,{label:"End Time",value:e.quiet_hours_end||"06:00",onChange:I=>t({...e,quiet_hours_end:I}),helper:"When quiet hours end"})]}),S.jsx("p",{className:"text-xs text-slate-600",children:'Emergency alerts and rules with "Override Quiet Hours" enabled always deliver.'})]})]}),S.jsxs("div",{className:"space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Notification Rules",S.jsx(xa,{info:"Each rule is self-contained: define what triggers it (condition or schedule), where to send it (mesh, email, webhook), and behavior settings."})]}),S.jsxs("span",{className:"text-xs text-slate-500",children:[((N=e.rules)==null?void 0:N.length)||0," rule",(((D=e.rules)==null?void 0:D.length)||0)!==1?"s":""]})]}),(e.rules||[]).map((I,z)=>S.jsx(G0e,{rule:I,categories:i,quietHoursEnabled:e.quiet_hours_enabled??!0,onChange:O=>{const V=[...e.rules||[]];V[z]=O,t({...e,rules:V})},onDelete:()=>{confirm(`Delete rule "${I.name||"New Rule"}"?`)&&t({...e,rules:(e.rules||[]).filter((O,V)=>V!==z)})},onDuplicate:()=>A(z),onTest:()=>k(z)},z)),S.jsxs("button",{onClick:M,className:"w-full py-3 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[S.jsx(F0,{size:16})," Add Rule"]})]})]})]})]}):S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-red-400",children:"Failed to load notifications config"})})}function W0e(){return S.jsx(E$,{children:S.jsx(z$,{children:S.jsxs(DZ,{children:[S.jsx(fl,{path:"/",element:S.jsx(G$,{})}),S.jsx(fl,{path:"/mesh",element:S.jsx(a0e,{})}),S.jsx(fl,{path:"/environment",element:S.jsx(c0e,{})}),S.jsx(fl,{path:"/config",element:S.jsx(D0e,{})}),S.jsx(fl,{path:"/alerts",element:S.jsx(j0e,{})}),S.jsx(fl,{path:"/notifications",element:S.jsx(H0e,{})})]})})})}uS.createRoot(document.getElementById("root")).render(S.jsx(Vc.StrictMode,{children:S.jsx(BZ,{children:S.jsx(W0e,{})})})); diff --git a/meshai/dashboard/static/index.html b/meshai/dashboard/static/index.html index 6002cfb..da25165 100644 --- a/meshai/dashboard/static/index.html +++ b/meshai/dashboard/static/index.html @@ -8,8 +8,8 @@ - - + +
diff --git a/meshai/env/swpc.py b/meshai/env/swpc.py index 2fa8856..0d3d53a 100644 --- a/meshai/env/swpc.py +++ b/meshai/env/swpc.py @@ -140,15 +140,36 @@ class SWPCAdapter: """Parse noaa-planetary-k-index.json. Data format: array of objects with time_tag, Kp, a_running, station_count - Last entry is most recent. + Last entry is most recent. Store full history for charting. """ if not data: return - # Get last entry (most recent) - last_entry = data[-1] + # Store full history (last 24-48 hours of readings) + kp_history = [] + for entry in data: + if isinstance(entry, dict): + try: + kp_history.append({ + "time": entry.get("time_tag", ""), + "value": float(entry.get("Kp", 0)), + }) + except (ValueError, TypeError): + continue + elif isinstance(entry, list) and len(entry) > 1: + # Legacy array format fallback + try: + kp_history.append({ + "time": entry[0] if len(entry) > 0 else "", + "value": float(entry[1]), + }) + except (ValueError, TypeError): + continue - # Handle both dict format (new API) and list format (legacy) + self._status["kp_history"] = kp_history + + # Get last entry (most recent) for current value + last_entry = data[-1] if isinstance(last_entry, dict): try: self._status["kp_current"] = float(last_entry.get("Kp", 0)) @@ -184,10 +205,26 @@ class SWPCAdapter: """Parse f107_cm_flux.json. Data format: array of objects with time_tag, flux + Store history for potential charting. """ if not data: return + # Store SFI history (last 30 days of readings) + sfi_history = [] + if isinstance(data, list): + for entry in data[-30:]: # Last 30 entries + if isinstance(entry, dict): + try: + sfi_history.append({ + "time": entry.get("time_tag", ""), + "value": float(entry.get("flux", 0)), + }) + except (ValueError, TypeError): + continue + + self._status["sfi_history"] = sfi_history + # Get most recent entry (last in list) if isinstance(data, list) and data: last = data[-1]