+
-
-
-
-
# dash-leaflet2
diff --git a/RELEASING.md b/RELEASING.md
index 414a6ee..b8ff690 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -246,10 +246,20 @@ of a bare slug. The ad network's `/admin/ad-board` keys off `AD_APP_ID`
### 3.5 Post-deploy checklist
-1. `GET /healthz` → `{"ok": true, "app": "leaflet", "version": "0.2.1", "reporting": true}`.
+1. `GET /healthz` → `{"ok": true, "app": "leaflet", "version": "0.2.2",
+ "base_url": "https://leaflet.2plot.dev", "reporting": true}`.
`reporting: false` means `CROSS_APP_WEBHOOK_SECRET` is missing.
+ **`base_url` is the check that matters most here** — if it comes back
+ `http://localhost:8050`, the service has `APP_BASE_URL` or
+ `DASH_LEAFLET2_BASE_URL` set to a loopback origin in its dashboard
+ environment, and every canonical link, `og:url`, sitemap entry and llms.txt
+ URL the site publishes is dead. This has happened on a live deploy. Fix it
+ in the Render dashboard (a blueprint does not overwrite a dashboard-edited
+ variable) and redeploy; the boot log warns about it too.
2. `/llms.txt`, `/robots.txt`, `/sitemap.xml` all 200, and sitemap URLs use
- `leaflet.2plot.dev` (i.e. `DASH_LEAFLET2_BASE_URL` took effect).
+ `leaflet.2plot.dev` (i.e. `APP_BASE_URL` took effect). Note the test suite
+ cannot catch this for you — it compares sitemap URLs against the deployed
+ `BASE_URL`, so it passes when both are wrong in the same way.
3. **Flip the theme toggle on three pages and confirm the basemap changes.**
This is the one thing no automated check covers end to end — the smoke test
proves the JS parses, not that the tiles swap in a browser.
diff --git a/components/header.py b/components/header.py
index a8e6d96..9513a9f 100644
--- a/components/header.py
+++ b/components/header.py
@@ -28,11 +28,14 @@ def create_clerk_avatar():
deploy without the keys renders the header exactly as before rather than
erroring on a missing component.
- The package renders `#clerk-login-button` inside this widget, which is the
- id `lib.auth._install_satellite_fixups` intercepts in the capture phase to
- call `Clerk.redirectToSignIn()`. That indirection is required on a satellite
- domain: the package's own handler calls `openSignIn()`, a modal that POSTs
- to the satellite FAPI and 403s with "not allowed on a satellite domain".
+ The package renders `#clerk-login-button` inside this widget. Since
+ dash-clerk-auth 0.9.2 the package's own handler is already satellite-safe
+ (it navigates to the primary rather than opening `openSignIn()`, a modal
+ that POSTs to the satellite FAPI and 403s), so this button needs nothing
+ from us. `lib.auth._install_satellite_signin_delegation` still intercepts
+ the id in the capture phase — not for this button, but for the sign-in card
+ in `lib.page_visibility`, which Dash renders after the package has already
+ bound its listeners.
"""
if not clerk_enabled():
return None
diff --git a/dash_leaflet2/AttributionControl.py b/dash_leaflet2/AttributionControl.py
index 982a01a..1e192ce 100644
--- a/dash_leaflet2/AttributionControl.py
+++ b/dash_leaflet2/AttributionControl.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class AttributionControl(Component):
"""An AttributionControl component.
diff --git a/dash_leaflet2/BaseLayer.py b/dash_leaflet2/BaseLayer.py
index a05713d..fe4ac34 100644
--- a/dash_leaflet2/BaseLayer.py
+++ b/dash_leaflet2/BaseLayer.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class BaseLayer(Component):
"""A BaseLayer component.
diff --git a/dash_leaflet2/Circle.py b/dash_leaflet2/Circle.py
index 9397ede..b08f82e 100644
--- a/dash_leaflet2/Circle.py
+++ b/dash_leaflet2/Circle.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class Circle(Component):
"""A Circle component.
diff --git a/dash_leaflet2/CircleMarker.py b/dash_leaflet2/CircleMarker.py
index b1f54b0..b568052 100644
--- a/dash_leaflet2/CircleMarker.py
+++ b/dash_leaflet2/CircleMarker.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class CircleMarker(Component):
"""A CircleMarker component.
diff --git a/dash_leaflet2/EasyButton.py b/dash_leaflet2/EasyButton.py
index e108b1a..8ed143b 100644
--- a/dash_leaflet2/EasyButton.py
+++ b/dash_leaflet2/EasyButton.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class EasyButton(Component):
"""An EasyButton component.
diff --git a/dash_leaflet2/EditControl.py b/dash_leaflet2/EditControl.py
index 7984484..c562d80 100644
--- a/dash_leaflet2/EditControl.py
+++ b/dash_leaflet2/EditControl.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class EditControl(Component):
"""An EditControl component.
diff --git a/dash_leaflet2/FeatureGroup.py b/dash_leaflet2/FeatureGroup.py
index b51dfe5..3ce9677 100644
--- a/dash_leaflet2/FeatureGroup.py
+++ b/dash_leaflet2/FeatureGroup.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class FeatureGroup(Component):
"""A FeatureGroup component.
diff --git a/dash_leaflet2/FullScreenControl.py b/dash_leaflet2/FullScreenControl.py
index 133a4d5..aca48ae 100644
--- a/dash_leaflet2/FullScreenControl.py
+++ b/dash_leaflet2/FullScreenControl.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class FullScreenControl(Component):
"""A FullScreenControl component.
diff --git a/dash_leaflet2/GeoJSON.py b/dash_leaflet2/GeoJSON.py
index 04a6dff..1084529 100644
--- a/dash_leaflet2/GeoJSON.py
+++ b/dash_leaflet2/GeoJSON.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class GeoJSON(Component):
"""A GeoJSON component.
diff --git a/dash_leaflet2/ImageOverlay.py b/dash_leaflet2/ImageOverlay.py
index d8aa3a7..015a03e 100644
--- a/dash_leaflet2/ImageOverlay.py
+++ b/dash_leaflet2/ImageOverlay.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class ImageOverlay(Component):
"""An ImageOverlay component.
diff --git a/dash_leaflet2/KeyboardControl.py b/dash_leaflet2/KeyboardControl.py
index e593d7f..3e337cf 100644
--- a/dash_leaflet2/KeyboardControl.py
+++ b/dash_leaflet2/KeyboardControl.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class KeyboardControl(Component):
"""A KeyboardControl component.
diff --git a/dash_leaflet2/LayerGroup.py b/dash_leaflet2/LayerGroup.py
index f5aed99..ebf716a 100644
--- a/dash_leaflet2/LayerGroup.py
+++ b/dash_leaflet2/LayerGroup.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class LayerGroup(Component):
"""A LayerGroup component.
diff --git a/dash_leaflet2/LayersControl.py b/dash_leaflet2/LayersControl.py
index 46ac8fb..d030ac2 100644
--- a/dash_leaflet2/LayersControl.py
+++ b/dash_leaflet2/LayersControl.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class LayersControl(Component):
"""A LayersControl component.
diff --git a/dash_leaflet2/Map.py b/dash_leaflet2/Map.py
index ad826a2..58755d9 100644
--- a/dash_leaflet2/Map.py
+++ b/dash_leaflet2/Map.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class Map(Component):
"""A Map component.
diff --git a/dash_leaflet2/Marker.py b/dash_leaflet2/Marker.py
index 54bcd03..eeb57d6 100644
--- a/dash_leaflet2/Marker.py
+++ b/dash_leaflet2/Marker.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class Marker(Component):
"""A Marker component.
diff --git a/dash_leaflet2/MiniMap.py b/dash_leaflet2/MiniMap.py
index 37847cd..1de36ae 100644
--- a/dash_leaflet2/MiniMap.py
+++ b/dash_leaflet2/MiniMap.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class MiniMap(Component):
"""A MiniMap component.
diff --git a/dash_leaflet2/Overlay.py b/dash_leaflet2/Overlay.py
index 49869d9..52904f8 100644
--- a/dash_leaflet2/Overlay.py
+++ b/dash_leaflet2/Overlay.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class Overlay(Component):
"""An Overlay component.
diff --git a/dash_leaflet2/Polygon.py b/dash_leaflet2/Polygon.py
index e618a44..e16ca5a 100644
--- a/dash_leaflet2/Polygon.py
+++ b/dash_leaflet2/Polygon.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class Polygon(Component):
"""A Polygon component.
diff --git a/dash_leaflet2/Polyline.py b/dash_leaflet2/Polyline.py
index 384ae32..6555910 100644
--- a/dash_leaflet2/Polyline.py
+++ b/dash_leaflet2/Polyline.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class Polyline(Component):
"""A Polyline component.
diff --git a/dash_leaflet2/Popup.py b/dash_leaflet2/Popup.py
index 846bdba..0e001e8 100644
--- a/dash_leaflet2/Popup.py
+++ b/dash_leaflet2/Popup.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class Popup(Component):
"""A Popup component.
diff --git a/dash_leaflet2/Rectangle.py b/dash_leaflet2/Rectangle.py
index a05a796..f03971a 100644
--- a/dash_leaflet2/Rectangle.py
+++ b/dash_leaflet2/Rectangle.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class Rectangle(Component):
"""A Rectangle component.
diff --git a/dash_leaflet2/ScaleControl.py b/dash_leaflet2/ScaleControl.py
index 4d956f4..4b9cfe4 100644
--- a/dash_leaflet2/ScaleControl.py
+++ b/dash_leaflet2/ScaleControl.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class ScaleControl(Component):
"""A ScaleControl component.
diff --git a/dash_leaflet2/TextMarker.py b/dash_leaflet2/TextMarker.py
index dee969e..26f6814 100644
--- a/dash_leaflet2/TextMarker.py
+++ b/dash_leaflet2/TextMarker.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class TextMarker(Component):
"""A TextMarker component.
diff --git a/dash_leaflet2/TileLayer.py b/dash_leaflet2/TileLayer.py
index b3647f6..c974c1a 100644
--- a/dash_leaflet2/TileLayer.py
+++ b/dash_leaflet2/TileLayer.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class TileLayer(Component):
"""A TileLayer component.
diff --git a/dash_leaflet2/TileSelector.py b/dash_leaflet2/TileSelector.py
index e9aa3a9..84c4911 100644
--- a/dash_leaflet2/TileSelector.py
+++ b/dash_leaflet2/TileSelector.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class TileSelector(Component):
"""A TileSelector component.
diff --git a/dash_leaflet2/Tooltip.py b/dash_leaflet2/Tooltip.py
index 94f9962..a9f8e4f 100644
--- a/dash_leaflet2/Tooltip.py
+++ b/dash_leaflet2/Tooltip.py
@@ -3,6 +3,15 @@
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
+try:
+ from dash.types import NumberType # noqa: F401
+except ImportError:
+ # Backwards compatibility for dash<=4.1.0
+ if typing.TYPE_CHECKING:
+ raise
+ NumberType = typing.Union[ # noqa: F401
+ typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
+ ]
ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
@@ -10,10 +19,6 @@
typing.Sequence[ComponentSingleType],
]
-NumberType = typing.Union[
- typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
-]
-
class Tooltip(Component):
"""A Tooltip component.
diff --git a/dash_leaflet2/dash_leaflet2.js b/dash_leaflet2/dash_leaflet2.js
index f6c4419..757c788 100644
--- a/dash_leaflet2/dash_leaflet2.js
+++ b/dash_leaflet2/dash_leaflet2.js
@@ -1,2 +1,2 @@
/*! For license information please see dash_leaflet2.js.LICENSE.txt */
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.dash_leaflet2=e(require("react"),require("react-dom")):t.dash_leaflet2=e(t.React,t.ReactDOM)}(self,(t,e)=>(()=>{"use strict";var n={81(t,e,n){n.d(e,{A:()=>m});var o=n(601),i=n.n(o),r=n(314),s=n.n(r),a=n(417),l=n.n(a),c=new URL(n(709),n.b),h=new URL(n(510),n.b),d=s()(i()),u=l()(c),p=l()(h);d.push([t.id,`/* required styles */\n\n.leaflet-pane,\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-tile-container,\n.leaflet-pane > svg,\n.leaflet-pane > canvas,\n.leaflet-zoom-box,\n.leaflet-image-layer,\n.leaflet-layer {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\twidth:100%;\n\t}\n.leaflet-container {\n\toverflow: hidden;\n\t}\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\tuser-select: none;\n\t-webkit-user-drag: none;\n\t}\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\n.leaflet-safari .leaflet-tile {\n\timage-rendering: -webkit-optimize-contrast;\n\t}\n/* hack that prevents hw layers "stretching" when loading new tiles */\n.leaflet-safari .leaflet-tile-container {\n\twidth: 1600px;\n\theight: 1600px;\n\t-webkit-transform-origin: 0 0;\n\t}\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\tdisplay: block;\n\t}\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\n.leaflet-container .leaflet-overlay-pane svg {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\t}\n.leaflet-container .leaflet-marker-pane img,\n.leaflet-container .leaflet-shadow-pane img,\n.leaflet-container .leaflet-tile-pane img,\n.leaflet-container img.leaflet-image-layer,\n.leaflet-container .leaflet-tile {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\twidth: auto;\n\tpadding: 0;\n\t}\n.leaflet-container img.leaflet-tile {\n\t/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */\n\tmix-blend-mode: plus-lighter;\n\t}\n\n.leaflet-container.leaflet-touch-zoom {\n\ttouch-action: pan-x pan-y;\n\t}\n.leaflet-container.leaflet-touch-drag {\n\t/* Fallback for FF which doesn't support pinch-zoom */\n\ttouch-action: none;\n\ttouch-action: pinch-zoom;\n}\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\n\ttouch-action: none;\n}\n.leaflet-container {\n\t-webkit-tap-highlight-color: transparent;\n}\n.leaflet-container a {\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\n}\n.leaflet-tile {\n\tvisibility: hidden;\n\t}\n.leaflet-tile-loaded {\n\tvisibility: inherit;\n\t}\n.leaflet-zoom-box {\n\twidth: 0;\n\theight: 0;\n\tbox-sizing: border-box;\n\tz-index: 800;\n\t}\n\n.leaflet-pane { z-index: 400; }\n\n.leaflet-tile-pane { z-index: 200; }\n.leaflet-overlay-pane { z-index: 400; }\n.leaflet-shadow-pane { z-index: 500; }\n.leaflet-marker-pane { z-index: 600; }\n.leaflet-tooltip-pane { z-index: 650; }\n.leaflet-popup-pane { z-index: 700; }\n\n.leaflet-map-pane canvas { z-index: 100; }\n.leaflet-map-pane svg { z-index: 200; }\n\n\n/* control positioning */\n\n.leaflet-control {\n\tposition: relative;\n\tz-index: 800;\n\tpointer-events: auto;\n\t}\n.leaflet-top,\n.leaflet-bottom {\n\tposition: absolute;\n\tz-index: 1000;\n\tpointer-events: none;\n\t}\n.leaflet-top {\n\ttop: 0;\n\t}\n.leaflet-right {\n\tright: 0;\n\t}\n.leaflet-bottom {\n\tbottom: 0;\n\t}\n.leaflet-left {\n\tleft: 0;\n\t}\n.leaflet-control {\n\tfloat: left;\n\tclear: both;\n\t}\n.leaflet-right .leaflet-control {\n\tfloat: right;\n\t}\n.leaflet-top .leaflet-control {\n\tmargin-top: 10px;\n\t}\n.leaflet-bottom .leaflet-control {\n\tmargin-bottom: 10px;\n\t}\n.leaflet-left .leaflet-control {\n\tmargin-left: 10px;\n\t}\n.leaflet-right .leaflet-control {\n\tmargin-right: 10px;\n\t}\n\n\n/* zoom and fade animations */\n\n.leaflet-fade-anim .leaflet-popup {\n\topacity: 0;\n\ttransition: opacity 0.2s linear;\n\t}\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\n\topacity: 1;\n\t}\n.leaflet-zoom-animated {\n\ttransform-origin: 0 0;\n\t}\nsvg.leaflet-zoom-animated {\n\twill-change: transform;\n}\n\n.leaflet-zoom-anim .leaflet-zoom-animated {\n\ttransition: transform 0.25s cubic-bezier(0,0,0.25,1);\n\t}\n.leaflet-zoom-anim .leaflet-tile,\n.leaflet-pan-anim .leaflet-tile {\n\ttransition: none;\n\t}\n\n.leaflet-zoom-anim .leaflet-zoom-hide {\n\tvisibility: hidden;\n\t}\n\n\n/* cursors */\n\n.leaflet-interactive {\n\tcursor: pointer;\n\t}\n.leaflet-grab {\n\tcursor: grab;\n\t}\n.leaflet-crosshair,\n.leaflet-crosshair .leaflet-interactive {\n\tcursor: crosshair;\n\t}\n.leaflet-popup-pane,\n.leaflet-control {\n\tcursor: auto;\n\t}\n.leaflet-dragging .leaflet-grab,\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\n.leaflet-dragging .leaflet-marker-draggable {\n\tcursor: grabbing;\n\t}\n\n/* marker & overlays interactivity */\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-image-layer,\n.leaflet-pane > svg path,\n.leaflet-tile-container {\n\tpointer-events: none;\n\t}\n\n.leaflet-marker-icon.leaflet-interactive,\n.leaflet-image-layer.leaflet-interactive,\n.leaflet-pane > svg path.leaflet-interactive,\nsvg.leaflet-image-layer.leaflet-interactive path {\n\tpointer-events: auto;\n\t}\n\n/* visual tweaks */\n\n.leaflet-container {\n\tbackground: #ddd;\n\toutline-offset: 1px;\n\t}\n.leaflet-container a {\n\tcolor: #0078A8;\n\t}\n/* prevent showing outline-box on Chromium when clicking on a vector with a tooltip */\npath.leaflet-interactive:focus:not(:focus-visible) {\n\toutline: 0;\n\t}\n\n.leaflet-zoom-box {\n\tborder: 2px dotted #38f;\n\tbackground: rgba(255,255,255,0.5);\n\t}\n\n\n/* general typography */\n.leaflet-container {\n\tfont-family: "Helvetica Neue", Arial, Helvetica, sans-serif;\n\tfont-size: 12px;\n\tfont-size: 0.75rem;\n\tline-height: 1.5;\n\t}\n\n\n/* general toolbar styles */\n\n.leaflet-bar {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\n\tborder-radius: 4px;\n\t}\n.leaflet-bar a {\n\tbackground-color: #fff;\n\tborder-bottom: 1px solid #ccc;\n\twidth: 26px;\n\theight: 26px;\n\tline-height: 26px;\n\tdisplay: block;\n\ttext-align: center;\n\ttext-decoration: none;\n\tcolor: black;\n\t}\n.leaflet-bar a,\n.leaflet-control-layers-toggle {\n\tbackground-position: 50% 50%;\n\tbackground-repeat: no-repeat;\n\tdisplay: block;\n\t}\n.leaflet-bar a:hover,\n.leaflet-bar a:focus {\n\tbackground-color: #f4f4f4;\n\t}\n.leaflet-bar a:first-child {\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\t}\n.leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tborder-bottom: none;\n\t}\n.leaflet-bar a.leaflet-disabled {\n\tcursor: default;\n\tbackground-color: #f4f4f4;\n\tcolor: #bbb;\n\t}\n\n.leaflet-touch .leaflet-bar a {\n\twidth: 30px;\n\theight: 30px;\n\tline-height: 30px;\n\t}\n.leaflet-touch .leaflet-bar a:first-child {\n\tborder-top-left-radius: 2px;\n\tborder-top-right-radius: 2px;\n\t}\n.leaflet-touch .leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 2px;\n\tborder-bottom-right-radius: 2px;\n\t}\n\n/* zoom control */\n\n.leaflet-control-zoom-in,\n.leaflet-control-zoom-out {\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\n\ttext-indent: 1px;\n\t}\n\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\n\tfont-size: 22px;\n\t}\n\n\n/* layers control */\n\n.leaflet-control-layers {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\n\tbackground: #fff;\n\tborder-radius: 5px;\n\t}\n.leaflet-control-layers-toggle {\n\tbackground-image: url(${u});\n\twidth: 36px;\n\theight: 36px;\n\t}\n.leaflet-touch .leaflet-control-layers-toggle {\n\twidth: 44px;\n\theight: 44px;\n\t}\n.leaflet-control-layers .leaflet-control-layers-list,\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\n\tdisplay: none;\n\t}\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\n\tdisplay: block;\n\tposition: relative;\n\t}\n.leaflet-control-layers-list {\n\tborder: 0;\n\tmargin: 0;\n\tpadding: 0;\n\t}\n.leaflet-control-layers-expanded {\n\tpadding: 6px 10px 6px 6px;\n\tcolor: #333;\n\tbackground: #fff;\n\t}\n.leaflet-control-layers-scrollbar {\n\toverflow-y: scroll;\n\toverflow-x: hidden;\n\tpadding-right: 5px;\n\t}\n.leaflet-control-layers-selector {\n\tmargin-top: 2px;\n\tposition: relative;\n\ttop: 1px;\n\t}\n.leaflet-control-layers label {\n\tdisplay: block;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\t}\n.leaflet-control-layers-separator {\n\theight: 0;\n\tborder-top: 1px solid #ddd;\n\tmargin: 5px -10px 5px -6px;\n\t}\n\n/* Default icon URLs */\n.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */\n\tbackground-image: url(${p});\n\t}\n\n\n/* attribution and scale controls */\n\n.leaflet-container .leaflet-control-attribution {\n\tbackground: #fff;\n\tbackground: rgba(255, 255, 255, 0.8);\n\tmargin: 0;\n\t}\n.leaflet-control-attribution,\n.leaflet-control-scale-line {\n\tpadding: 0 5px;\n\tcolor: #333;\n\tline-height: 1.4;\n\t}\n.leaflet-control-attribution a {\n\ttext-decoration: none;\n\t}\n.leaflet-control-attribution a:hover,\n.leaflet-control-attribution a:focus {\n\ttext-decoration: underline;\n\t}\n.leaflet-attribution-flag {\n\tdisplay: inline !important;\n\tvertical-align: baseline !important;\n\twidth: 1em;\n\theight: 0.6669em;\n\tmargin-right: 0.277em;\n\t}\n.leaflet-left .leaflet-control-scale {\n\tmargin-left: 5px;\n\t}\n.leaflet-bottom .leaflet-control-scale {\n\tmargin-bottom: 5px;\n\t}\n.leaflet-control-scale-line {\n\tborder: 2px solid #777;\n\tborder-top: none;\n\tline-height: 1.1;\n\tpadding: 2px 5px 1px;\n\twhite-space: nowrap;\n\tbox-sizing: border-box;\n\tbackground: rgba(255, 255, 255, 0.8);\n\ttext-shadow: 1px 1px #fff;\n\t}\n.leaflet-control-scale-line:not(:first-child) {\n\tborder-top: 2px solid #777;\n\tborder-bottom: none;\n\tmargin-top: -2px;\n\t}\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\n\tborder-bottom: 2px solid #777;\n\t}\n\n.leaflet-touch .leaflet-control-attribution,\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tbox-shadow: none;\n\t}\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tborder: 2px solid rgba(0,0,0,0.2);\n\tbackground-clip: padding-box;\n\t}\n\n\n/* popup */\n\n.leaflet-popup {\n\tposition: absolute;\n\ttext-align: center;\n\tmargin-bottom: 20px;\n\t}\n.leaflet-popup-content-wrapper {\n\tpadding: 1px;\n\ttext-align: left;\n\tborder-radius: 12px;\n\t}\n.leaflet-popup-content {\n\tmargin: 13px 24px 13px 20px;\n\tline-height: 1.3;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\tmin-height: 1px;\n\t}\n.leaflet-popup-content p {\n\tmargin: 17px 0;\n\tmargin: 1.3em 0;\n\t}\n.leaflet-popup-tip-container {\n\twidth: 40px;\n\theight: 20px;\n\tposition: absolute;\n\tleft: 50%;\n\tmargin-top: -1px;\n\tmargin-left: -20px;\n\toverflow: hidden;\n\tpointer-events: none;\n\t}\n.leaflet-popup-tip {\n\twidth: 17px;\n\theight: 17px;\n\tpadding: 1px;\n\n\tmargin: -10px auto 0;\n\tpointer-events: auto;\n\n\ttransform: rotate(45deg);\n\t}\n.leaflet-popup-content-wrapper,\n.leaflet-popup-tip {\n\tbackground: white;\n\tcolor: #333;\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\n\t}\n.leaflet-container a.leaflet-popup-close-button {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tborder: none;\n\ttext-align: center;\n\twidth: 24px;\n\theight: 24px;\n\tfont: 16px/24px Tahoma, Verdana, sans-serif;\n\tcolor: #757575;\n\ttext-decoration: none;\n\tbackground: transparent;\n\t}\n.leaflet-container a.leaflet-popup-close-button:hover,\n.leaflet-container a.leaflet-popup-close-button:focus {\n\tcolor: #585858;\n\t}\n.leaflet-popup-scrolled {\n\toverflow: auto;\n\t}\n\n/* div icon */\n\n.leaflet-div-icon {\n\tbackground: #fff;\n\tborder: 1px solid #666;\n\t}\n\n\n/* Tooltip */\n/* Base styles for the element that has a tooltip */\n.leaflet-tooltip {\n\tposition: absolute;\n\tpadding: 6px;\n\tbackground-color: #fff;\n\tborder: 1px solid #fff;\n\tborder-radius: 3px;\n\tcolor: #222;\n\twhite-space: nowrap;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\n\t}\n.leaflet-tooltip.leaflet-interactive {\n\tcursor: pointer;\n\tpointer-events: auto;\n\t}\n.leaflet-tooltip-top:before,\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\tposition: absolute;\n\tpointer-events: none;\n\tborder: 6px solid transparent;\n\tbackground: transparent;\n\tcontent: "";\n\t}\n\n/* Directions */\n\n.leaflet-tooltip-bottom {\n\tmargin-top: 6px;\n}\n.leaflet-tooltip-top {\n\tmargin-top: -6px;\n}\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-top:before {\n\tleft: 50%;\n\tmargin-left: -6px;\n\t}\n.leaflet-tooltip-top:before {\n\tbottom: 0;\n\tmargin-bottom: -12px;\n\tborder-top-color: #fff;\n\t}\n.leaflet-tooltip-bottom:before {\n\ttop: 0;\n\tmargin-top: -12px;\n\tmargin-left: -6px;\n\tborder-bottom-color: #fff;\n\t}\n.leaflet-tooltip-left {\n\tmargin-left: -6px;\n}\n.leaflet-tooltip-right {\n\tmargin-left: 6px;\n}\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\ttop: 50%;\n\tmargin-top: -6px;\n\t}\n.leaflet-tooltip-left:before {\n\tright: 0;\n\tmargin-right: -12px;\n\tborder-left-color: #fff;\n\t}\n.leaflet-tooltip-right:before {\n\tleft: 0;\n\tmargin-left: -12px;\n\tborder-right-color: #fff;\n\t}\n\n/* Printing */\n\n@media print {\n\t/* Prevent printers from removing background-images of controls. */\n\t.leaflet-control {\n\t\t-webkit-print-color-adjust: exact;\n\t\tprint-color-adjust: exact;\n\t}\n}\n`,""]);const m=d},711(t,e,n){n.d(e,{A:()=>a});var o=n(601),i=n.n(o),r=n(314),s=n.n(r)()(i());s.push([t.id,"/* Emoji / Iconify markers use a DivIcon; strip Leaflet's default white box + border. */\n.dl2-div-icon {\n background: transparent;\n border: none;\n}\n.dl2-div-icon iconify-icon {\n vertical-align: top;\n}\n",""]);const a=s},246(t,e,n){n.d(e,{A:()=>a});var o=n(601),i=n.n(o),r=n(314),s=n.n(r)()(i());s.push([t.id,"/* ============================================================================\n * dash-leaflet2 — TextMarker (editable on-map captions)\n *\n * The marker icon element is a 0×0 anchor point; the text box is absolutely\n * positioned inside it (and translated per `anchor`). Selection chrome and the\n * resize / rotate handles live on the box so they rotate with the text; the\n * style toolbar is portaled into the map container and stays axis-aligned.\n * ========================================================================== */\n\n/* The DivIcon shell — sized to its content (NOT 0×0, or Leaflet's drag never gets a\n pointerdown on it). We carry the anchor offset + rotation in the inline transform. */\n.dl2-text-marker-icon {\n background: transparent;\n border: none;\n overflow: visible;\n width: max-content !important;\n height: auto !important;\n}\n\n/* --- the text box (background pill + chrome; fills the icon) -------------- */\n.dl2-tm-box {\n position: relative;\n display: inline-block;\n cursor: move;\n user-select: none;\n -webkit-user-select: none;\n transition: box-shadow 0.12s ease;\n}\n\n.dl2-tm-box.is-selected {\n box-shadow: 0 0 0 1.5px rgba(56, 132, 255, 0.95);\n}\n\n.dl2-tm-box.is-editing {\n cursor: text;\n box-shadow: 0 0 0 1.5px rgba(56, 132, 255, 0.95),\n 0 6px 22px -6px rgba(0, 0, 0, 0.45);\n}\n\n/* --- the editable typography (inner) ------------------------------------- */\n.dl2-tm-text {\n white-space: pre;\n outline: none;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);\n /* A label with no background still needs a hit area for clicks/drags. */\n min-width: 0.5em;\n min-height: 1em;\n}\n\n.dl2-tm-box.is-editing .dl2-tm-text {\n cursor: text;\n user-select: text;\n -webkit-user-select: text;\n}\n\n.dl2-tm-text.is-empty::after {\n content: 'Double-click to edit';\n opacity: 0.45;\n font-style: italic;\n text-shadow: none;\n}\n\n/* --- handles (resize / rotate) ------------------------------------------- */\n.dl2-tm-handle {\n position: absolute;\n width: 12px;\n height: 12px;\n background: #ffffff;\n border: 1.5px solid rgba(56, 132, 255, 0.95);\n border-radius: 50%;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);\n z-index: 2;\n}\n\n.dl2-tm-handle-resize {\n right: -7px;\n bottom: -7px;\n cursor: nwse-resize;\n}\n\n.dl2-tm-handle-rotate {\n left: 50%;\n top: -26px;\n margin-left: -6px;\n cursor: grab;\n background: rgba(56, 132, 255, 0.95);\n border-color: #ffffff;\n}\n.dl2-tm-handle-rotate:active {\n cursor: grabbing;\n}\n\n.dl2-tm-rotate-line {\n position: absolute;\n left: 50%;\n top: -20px;\n width: 1.5px;\n height: 20px;\n margin-left: -0.75px;\n background: rgba(56, 132, 255, 0.95);\n z-index: 1;\n}\n\n/* --- the contextual style toolbar (portaled into the map container) ------- */\n.dl2-tm-toolbar {\n position: absolute;\n top: 12px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 1200;\n display: flex;\n align-items: center;\n gap: 5px;\n padding: 6px 8px;\n border-radius: 12px;\n font-family: system-ui, -apple-system, sans-serif;\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 72%, transparent);\n -webkit-backdrop-filter: blur(20px) saturate(180%);\n backdrop-filter: blur(20px) saturate(180%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 60%, transparent);\n box-shadow: 0 8px 28px -6px rgba(0, 0, 0, 0.28),\n inset 0 1px 0 rgba(255, 255, 255, 0.3);\n color: var(--mantine-color-text, #1a1b1e);\n user-select: none;\n}\n\n.dl2-tm-toolbar button,\n.dl2-tm-toolbar select,\n.dl2-tm-toolbar input {\n font-family: inherit;\n color: inherit;\n}\n\n.dl2-tm-tb-select {\n height: 28px;\n border-radius: 7px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n background: color-mix(in srgb, var(--mantine-color-body, #fff) 60%, transparent);\n padding: 0 6px;\n font-size: 12.5px;\n cursor: pointer;\n max-width: 96px;\n}\n\n.dl2-tm-tb-num {\n display: flex;\n align-items: center;\n gap: 2px;\n height: 28px;\n border-radius: 7px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n background: color-mix(in srgb, var(--mantine-color-body, #fff) 60%, transparent);\n padding: 0 3px;\n}\n\n.dl2-tm-tb-step {\n border: none;\n background: transparent;\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n width: 18px;\n height: 22px;\n border-radius: 5px;\n opacity: 0.75;\n}\n.dl2-tm-tb-step:hover {\n background: rgba(0, 0, 0, 0.08);\n opacity: 1;\n}\n\n.dl2-tm-tb-size {\n width: 40px;\n border: none;\n background: transparent;\n text-align: center;\n font-size: 12.5px;\n -moz-appearance: textfield;\n}\n.dl2-tm-tb-size::-webkit-outer-spin-button,\n.dl2-tm-tb-size::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.dl2-tm-tb-rot-ico {\n font-size: 13px;\n opacity: 0.7;\n padding-left: 3px;\n}\n\n.dl2-tm-tb-btn {\n width: 28px;\n height: 28px;\n border-radius: 7px;\n border: 1px solid transparent;\n background: transparent;\n cursor: pointer;\n font-size: 14px;\n line-height: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.dl2-tm-tb-btn:hover {\n background: rgba(0, 0, 0, 0.08);\n}\n.dl2-tm-tb-btn.active {\n background: rgba(56, 132, 255, 0.18);\n border-color: rgba(56, 132, 255, 0.5);\n color: var(--mantine-color-blue-7, #1c66d6);\n}\n\n.dl2-tm-tb-sep {\n width: 1px;\n height: 20px;\n background: rgba(0, 0, 0, 0.12);\n margin: 0 1px;\n}\n\n/* Color swatch: a labeled tile that opens the native color picker. */\n.dl2-tm-tb-swatch {\n position: relative;\n width: 28px;\n height: 28px;\n border-radius: 7px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n cursor: pointer;\n overflow: hidden;\n display: inline-flex;\n align-items: flex-end;\n justify-content: center;\n}\n.dl2-tm-tb-swatch input[type='color'] {\n position: absolute;\n inset: 0;\n opacity: 0;\n cursor: pointer;\n border: none;\n padding: 0;\n}\n.dl2-tm-tb-swatch-ink {\n position: absolute;\n left: 3px;\n right: 3px;\n top: 3px;\n height: 13px;\n border-radius: 3px;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);\n}\n.dl2-tm-tb-swatch-bg {\n background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),\n linear-gradient(-45deg, #ccc 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, #ccc 75%),\n linear-gradient(-45deg, transparent 75%, #ccc 75%);\n background-size: 8px 8px;\n background-position: 0 0, 0 4px, 4px -4px, -4px 0;\n}\n.dl2-tm-tb-swatch-label {\n position: relative;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n padding-bottom: 2px;\n opacity: 0.8;\n}\n.dl2-tm-tb-swatch.is-off .dl2-tm-tb-swatch-ink {\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);\n}\n",""]);const a=s},366(t,e,n){n.d(e,{A:()=>a});var o=n(601),i=n.n(o),r=n(314),s=n.n(r)()(i());s.push([t.id,"/* ============================================================================\n * dash-leaflet2 — liquid-glass theme for Leaflet UI\n *\n * Apple-style glassmorphism (backdrop-blur + translucent fill + inner top\n * highlight) for tooltips, popups, zoom controls, and attribution. Theme-aware\n * via DMC `--mantine-color-*` CSS variables, with fallbacks so non-DMC apps\n * still get a sensible light/dark look. Loaded after leaflet.css.\n * ========================================================================== */\n\n/* --- STACKING CONTEXT ----------------------------------------------------- */\n/* Leaflet's bundled CSS pushes panes to z-index 200–700 and .leaflet-top /\n .leaflet-bottom (the control containers) to z-index 1000, with no z-index on\n .leaflet-container itself. Those internal z-indexes then compete with anything\n on the page — notably a DMC Popover whose portaled dropdown defaults to\n z-index 300, which gets buried under the map's controls. Setting the\n container to z-index 0 makes it a stacking context that confines all the\n leaflet z-indexes within itself, so popovers / modals / overlays render\n above the map as expected. */\n.leaflet-container {\n z-index: 0;\n}\n\n/* --- TOOLTIP -------------------------------------------------------------- */\n.leaflet-tooltip {\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 62%, transparent);\n -webkit-backdrop-filter: blur(20px) saturate(180%);\n backdrop-filter: blur(20px) saturate(180%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 60%, transparent);\n color: var(--mantine-color-text, #1a1b1e);\n border-radius: 12px;\n padding: 6px 11px;\n font-weight: 500;\n font-size: 12.5px;\n letter-spacing: -0.005em;\n box-shadow:\n 0 6px 24px -4px rgba(0, 0, 0, 0.18),\n inset 0 1px 0 rgba(255, 255, 255, 0.28);\n white-space: nowrap;\n}\n/* Hide leaflet's default ::before tooltip tip — the flat glass card reads\n cleaner and the marker's tooltipAnchor already positions it correctly. */\n.leaflet-tooltip-top::before,\n.leaflet-tooltip-bottom::before,\n.leaflet-tooltip-left::before,\n.leaflet-tooltip-right::before {\n display: none;\n}\n\n/* --- POPUP ---------------------------------------------------------------- */\n/* dl2.Map wraps the leaflet map-pane in a `.dl2-rotation-wrapper` with\n `pointer-events: none` so map drags pass through to the container's pointerdown\n listener. Leaflet's interactive layers (`.leaflet-interactive`,\n `.leaflet-marker-icon.leaflet-interactive`) explicitly set `pointer-events: auto`\n to override that — but Leaflet 2's stock CSS does NOT set it on `.leaflet-popup`,\n so popup content (form widgets etc.) inherits `none` and becomes unclickable\n (clicks fall through and drag the map). Re-enable hit testing on the popup\n here; everything inside inherits `auto`. */\n.leaflet-popup {\n pointer-events: auto;\n}\n.leaflet-popup-content-wrapper {\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 65%, transparent);\n -webkit-backdrop-filter: blur(28px) saturate(180%);\n backdrop-filter: blur(28px) saturate(180%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 60%, transparent);\n color: var(--mantine-color-text, #1a1b1e);\n border-radius: 16px;\n padding: 2px;\n box-shadow:\n 0 12px 36px -6px rgba(0, 0, 0, 0.22),\n inset 0 1px 0 rgba(255, 255, 255, 0.30);\n}\n.leaflet-popup-content {\n margin: 12px 16px;\n font-size: 13px;\n line-height: 1.5;\n}\n.leaflet-popup-tip {\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 65%, transparent);\n -webkit-backdrop-filter: blur(28px) saturate(180%);\n backdrop-filter: blur(28px) saturate(180%);\n box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);\n}\n.leaflet-popup-close-button {\n color: var(--mantine-color-text, #1a1b1e) !important;\n opacity: 0.55;\n font-weight: 500;\n transition: opacity 0.15s;\n}\n.leaflet-popup-close-button:hover {\n opacity: 1;\n background: transparent !important;\n}\n\n/* --- ZOOM CONTROLS -------------------------------------------------------- */\n.leaflet-bar {\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 72%, transparent) !important;\n -webkit-backdrop-filter: blur(16px) saturate(170%);\n backdrop-filter: blur(16px) saturate(170%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 45%, transparent) !important;\n border-radius: 10px !important;\n box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.15);\n overflow: hidden;\n}\n.leaflet-bar a,\n.leaflet-bar a:link {\n background: transparent !important;\n color: var(--mantine-color-text, #1a1b1e) !important;\n border-bottom-color:\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 35%, transparent) !important;\n font-weight: 500;\n}\n.leaflet-bar a:hover {\n background: color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 60%, transparent) !important;\n}\n.leaflet-bar a.leaflet-disabled {\n opacity: 0.4;\n}\n\n/* --- LAYERS CONTROL ------------------------------------------------------- */\n.dl2-layers-control {\n /* The .leaflet-bar background/border come from the rule above; only the inner UI\n sizing needs styling here. */\n overflow: visible;\n}\n.dl2-layers-ui {\n font-size: 13px;\n line-height: 1.3;\n color: var(--mantine-color-text, #1a1b1e);\n}\n.dl2-layers-handle {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n background: transparent;\n border: 0;\n cursor: pointer;\n color: var(--mantine-color-text, #1a1b1e);\n font-size: 16px;\n}\n.dl2-layers-ui.collapsed .dl2-layers-body {\n display: none;\n}\n.dl2-layers-ui.open .dl2-layers-handle {\n display: none;\n}\n.dl2-layers-body {\n padding: 8px 10px 6px 10px;\n min-width: 140px;\n}\n.dl2-layer-row {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 2px 0;\n cursor: pointer;\n user-select: none;\n}\n.dl2-layer-row input {\n accent-color: var(--mantine-color-green-6, #2f9e44);\n margin: 0;\n}\n.dl2-layers-sep {\n border: 0;\n border-top: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 40%, transparent);\n margin: 6px 0;\n}\n\n/* --- EDIT CONTROL --------------------------------------------------------- */\n.dl2-edit-control {\n overflow: visible;\n}\n.dl2-edit-ui {\n position: relative; /* anchors the absolute .dl2-edit-actions fly-out */\n display: flex;\n flex-direction: column;\n padding: 4px;\n gap: 2px;\n}\n.dl2-edit-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--mantine-color-text, #1a1b1e);\n cursor: pointer;\n transition: background 0.12s, color 0.12s;\n}\n.dl2-edit-btn:hover {\n background:\n color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 60%, transparent);\n}\n.dl2-edit-btn.active {\n background:\n color-mix(in srgb, var(--mantine-color-green-6, #2f9e44) 22%, transparent);\n color: var(--mantine-color-green-6, #2f9e44);\n}\n.dl2-edit-btn.danger.active {\n background:\n color-mix(in srgb, var(--mantine-color-red-6, #fa5252) 22%, transparent);\n color: var(--mantine-color-red-6, #fa5252);\n}\n\n/* EditControl: allow the inline sub-toolbar to spill outside the .leaflet-bar's clip. */\n.dl2-edit-control { overflow: visible !important; }\n\n/* Subtle inline separator between Draw and Edit icons in the same column (no boxed section). */\n.dl2-edit-section + .dl2-edit-section {\n border-top: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 50%, transparent);\n margin-top: 4px;\n padding-top: 4px;\n}\n\n/* Contextual sub-toolbar — fly-out anchored to the right of the icon strip\n (matching the dash-leaflet UX), not stacked below it. */\n.dl2-edit-actions {\n position: absolute;\n top: 0;\n left: 100%;\n margin-left: 6px;\n display: flex;\n flex-direction: row;\n gap: 4px;\n padding: 5px 6px;\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 75%, transparent);\n -webkit-backdrop-filter: blur(16px) saturate(170%);\n backdrop-filter: blur(16px) saturate(170%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 45%, transparent);\n border-radius: 10px;\n box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.18);\n white-space: nowrap;\n z-index: 1000;\n}\n.dl2-edit-action-btn {\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 50%, transparent);\n background: transparent;\n color: var(--mantine-color-text, #1a1b1e);\n font-size: 11.5px;\n font-weight: 500;\n padding: 4px 8px;\n border-radius: 6px;\n cursor: pointer;\n line-height: 1.2;\n}\n.dl2-edit-action-btn:hover {\n background:\n color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 60%, transparent);\n}\n.dl2-edit-action-btn.primary {\n background:\n color-mix(in srgb, var(--mantine-color-green-6, #2f9e44) 18%, transparent);\n color: var(--mantine-color-green-6, #2f9e44);\n border-color:\n color-mix(in srgb, var(--mantine-color-green-6, #2f9e44) 40%, transparent);\n}\n.dl2-edit-action-btn.danger {\n background:\n color-mix(in srgb, var(--mantine-color-red-6, #fa5252) 18%, transparent);\n color: var(--mantine-color-red-6, #fa5252);\n border-color:\n color-mix(in srgb, var(--mantine-color-red-6, #fa5252) 40%, transparent);\n}\n\n/* Vertex handle shown on polyline/polygon vertices while in edit mode (draggable). */\n.dl2-vertex-handle {\n background: var(--mantine-color-body, #ffffff);\n border: 2px solid var(--mantine-color-green-6, #2f9e44);\n border-radius: 50%;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);\n cursor: grab;\n}\n.dl2-vertex-handle:active { cursor: grabbing; }\n\n/* Smaller white square shown at each placed vertex WHILE drawing (preview, not edit). */\n.dl2-vertex-preview {\n background: #ffffff;\n border: 1px solid #2f9e44;\n border-radius: 1px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);\n pointer-events: none;\n}\n\n/* Text-caption markers dropped by the EditControl `text` tool. The icon sizes to its\n content (like TextMarker's) so Leaflet's drag can grab it; the inner div is the styled,\n inline-editable caption. */\n.dl2-edit-text-icon {\n background: transparent;\n border: none;\n overflow: visible;\n width: max-content !important;\n height: auto !important;\n}\n.dl2-edit-text {\n white-space: pre;\n cursor: move;\n outline: none;\n line-height: 1.15;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);\n min-width: 0.4em;\n min-height: 1em;\n}\n.dl2-edit-text.is-editing {\n cursor: text;\n user-select: text;\n -webkit-user-select: text;\n box-shadow: 0 0 0 1.5px rgba(56, 132, 255, 0.95), 0 6px 22px -6px rgba(0, 0, 0, 0.45);\n border-radius: 4px;\n padding: 0 2px;\n}\n\n/* --- editable ImageOverlay transform chrome (mirrors the TextMarker handles) --- */\n/* A selection box drawn over the image's screen rect; rotated about the anchor. The chrome\n itself passes pointer events through (only the handles are interactive) so the image body\n still receives drag-to-move. */\n.dl2-img-chrome {\n position: absolute;\n pointer-events: none;\n box-shadow: 0 0 0 1.5px rgba(56, 132, 255, 0.95);\n z-index: 650;\n}\n/* Transparent draggable surface filling the selection box — drag it to move the image\n (the Leaflet image element itself can't be the drag target without breaking the pointer\n stream, so the move grip lives here on the chrome). */\n.dl2-img-body {\n position: absolute;\n inset: 0;\n pointer-events: auto;\n cursor: move;\n z-index: 1;\n}\n.dl2-img-handle {\n position: absolute;\n width: 12px;\n height: 12px;\n background: #ffffff;\n border: 1.5px solid rgba(56, 132, 255, 0.95);\n border-radius: 50%;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);\n pointer-events: auto;\n z-index: 2;\n}\n.dl2-img-handle-resize { cursor: nwse-resize; }\n.dl2-img-handle-rotate {\n left: 50%;\n top: -26px;\n margin-left: -6px;\n cursor: grab;\n background: rgba(56, 132, 255, 0.95);\n border-color: #ffffff;\n}\n.dl2-img-handle-rotate:active { cursor: grabbing; }\n.dl2-img-rotate-line {\n position: absolute;\n left: 50%;\n top: -20px;\n width: 1.5px;\n height: 20px;\n margin-left: -0.75px;\n background: rgba(56, 132, 255, 0.95);\n pointer-events: none;\n}\n.dl2-img-editable .leaflet-image-layer { cursor: move; }\n\n/* Cursor-following guide tooltip that prompts the user during drawing\n (\"Click to start drawing\" → \"Click first point to close this shape\"). */\n.dl2-draw-tooltip {\n position: absolute;\n pointer-events: none;\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 75%, transparent);\n -webkit-backdrop-filter: blur(14px) saturate(170%);\n backdrop-filter: blur(14px) saturate(170%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 50%, transparent);\n color: var(--mantine-color-text, #1a1b1e);\n border-radius: 8px;\n padding: 4px 9px;\n font-size: 12px;\n font-weight: 500;\n box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15);\n white-space: nowrap;\n z-index: 700;\n transform: translate(12px, -4px); /* offset from cursor */\n}\n\n/* TileSelector — single toggle button (icon strip style, with active highlight). */\n.dl2-tile-selector-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: 0;\n background: transparent;\n color: var(--mantine-color-text, #1a1b1e);\n cursor: pointer;\n transition: background 0.12s, color 0.12s;\n}\n.dl2-tile-selector-btn:hover {\n background:\n color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 60%, transparent);\n}\n.dl2-tile-selector-btn.active {\n background:\n color-mix(in srgb, var(--mantine-color-blue-6, #228be6) 22%, transparent);\n color: var(--mantine-color-blue-6, #228be6);\n}\n\n/* EasyButton — single-button control. Uses .leaflet-bar styling for the container. */\n.dl2-easy-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: 0;\n background: transparent;\n color: var(--mantine-color-text, #1a1b1e);\n cursor: pointer;\n}\n.dl2-easy-button:hover {\n background:\n color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 60%, transparent);\n}\n\n/* --- MEASUREMENT TOOLTIPS (showMeasurementTooltips=True on dl2.EditControl) - */\n/* Permanent labels that follow shapes around. We override the default Leaflet\n tooltip padding/font down to make them less attention-grabbing — they're\n data overlays, not callouts. The optional name is rendered as
. Zoom-\n gating is handled in EditControl.tsx (close below the draw zoom). */\n.leaflet-tooltip.dl2-measurement-tooltip {\n font-size: 11px;\n line-height: 1.3;\n padding: 3px 8px !important;\n text-align: center;\n pointer-events: none;\n}\n.leaflet-tooltip.dl2-measurement-tooltip b {\n font-weight: 600;\n color: var(--mantine-color-text, #1a1b1e);\n}\n\n/* --- MINIMAP -------------------------------------------------------------- */\n/* The control container itself uses the .leaflet-bar liquid-glass treatment from\n above for the rounded glass frame + border. The wrapper inside holds the second\n Leaflet map and the corner toggle. When .minimized, the wrapper shrinks to a\n single square so only the toggle button is left visible — clicking it expands. */\n.leaflet-control-minimap {\n overflow: hidden; /* clip the inner Leaflet map to the rounded frame */\n padding: 0;\n}\n.leaflet-control-minimap-wrapper {\n position: relative;\n /* width/height set inline (driven by props + minimized state); transitioned so\n toggling feels physical rather than snapping. */\n transition: width 180ms ease, height 180ms ease;\n}\n.leaflet-control-minimap-inner {\n width: 100%;\n height: 100%;\n /* The Leaflet 2 map mounted into this div renders its own .leaflet-container\n below; nothing more needed here. */\n}\n/* Toggle button: a small chevron the user clicks to collapse/expand. Position-aware\n so the chevron points toward the corner the minimap pins to. Class names mirror\n the dash-leaflet/leaflet-minimap convention. */\n.leaflet-control-minimap-toggle-display {\n position: absolute;\n width: 19px;\n height: 19px;\n border: 0;\n padding: 0;\n cursor: pointer;\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 88%, transparent);\n color: var(--mantine-color-text, #1a1b1e);\n border-radius: 4px;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n transition: background 0.12s;\n /* Two stacked diagonal arrows drawn with a gradient — points in/out of the\n minimap corner depending on `minimized`. */\n}\n.leaflet-control-minimap-toggle-display:hover {\n background: color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 100%, var(--mantine-color-body, #ffffff));\n}\n.leaflet-control-minimap-toggle-display::before {\n /* Chevron rendered with a single border + rotation — cheap and theme-aware. */\n content: '';\n display: block;\n width: 6px;\n height: 6px;\n border-right: 2px solid currentColor;\n border-bottom: 2px solid currentColor;\n}\n/* Per-corner toggle placement: the toggle button always lives on the side of the\n minimap that faces the main map (so it doesn't peek off-screen). The chevron\n rotates to point INWARD (collapse) when expanded, OUTWARD (expand) when not. */\n.leaflet-control-minimap-toggle-display-bottomright {\n top: 2px;\n left: 2px;\n}\n.leaflet-control-minimap-toggle-display-bottomleft {\n top: 2px;\n right: 2px;\n}\n.leaflet-control-minimap-toggle-display-topright {\n bottom: 2px;\n left: 2px;\n}\n.leaflet-control-minimap-toggle-display-topleft {\n bottom: 2px;\n right: 2px;\n}\n/* Expanded: chevron points toward the corner (collapse direction). */\n.leaflet-control-minimap-wrapper.expanded.pos-bottomright .leaflet-control-minimap-toggle-display::before {\n transform: rotate(135deg); /* points down-right -> toward bottom-right corner */\n margin: -2px 0 0 2px;\n}\n.leaflet-control-minimap-wrapper.expanded.pos-bottomleft .leaflet-control-minimap-toggle-display::before {\n transform: rotate(-135deg);\n margin: -2px 2px 0 0;\n}\n.leaflet-control-minimap-wrapper.expanded.pos-topright .leaflet-control-minimap-toggle-display::before {\n transform: rotate(45deg);\n margin: 2px 0 0 2px;\n}\n.leaflet-control-minimap-wrapper.expanded.pos-topleft .leaflet-control-minimap-toggle-display::before {\n transform: rotate(-45deg);\n margin: 2px 2px 0 0;\n}\n/* Minimized: chevron points AWAY from the corner (expand direction). */\n.leaflet-control-minimap-wrapper.minimized.pos-bottomright .leaflet-control-minimap-toggle-display::before {\n transform: rotate(-45deg);\n}\n.leaflet-control-minimap-wrapper.minimized.pos-bottomleft .leaflet-control-minimap-toggle-display::before {\n transform: rotate(45deg);\n}\n.leaflet-control-minimap-wrapper.minimized.pos-topright .leaflet-control-minimap-toggle-display::before {\n transform: rotate(-135deg);\n}\n.leaflet-control-minimap-wrapper.minimized.pos-topleft .leaflet-control-minimap-toggle-display::before {\n transform: rotate(135deg);\n}\n/* When minimized, the toggle button fills the small wrapper. */\n.leaflet-control-minimap-wrapper.minimized .leaflet-control-minimap-toggle-display {\n inset: 0;\n width: auto;\n height: auto;\n border-radius: 0;\n}\n\n/* --- ATTRIBUTION ---------------------------------------------------------- */\n.leaflet-control-attribution {\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 75%, transparent) !important;\n -webkit-backdrop-filter: blur(12px);\n backdrop-filter: blur(12px);\n color: var(--mantine-color-dimmed, #73726c) !important;\n border-radius: 8px 0 0 0;\n font-size: 10.5px;\n padding: 2px 8px;\n}\n.leaflet-control-attribution a {\n color: var(--mantine-color-blue-6, #228be6) !important;\n}\n\n/* --- GEOJSON CLUSTERS ----------------------------------------------------- */\n.dl2-cluster-bubble {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n color: var(--mantine-color-bright, #ffffff);\n font-weight: 600;\n font-size: 13px;\n background: color-mix(in srgb, var(--mantine-color-blue-6, #228be6) 80%, transparent);\n box-shadow:\n 0 4px 14px color-mix(in srgb, var(--mantine-color-blue-9, #1864ab) 38%, transparent),\n inset 0 1px 0 rgba(255, 255, 255, 0.35);\n -webkit-backdrop-filter: blur(10px);\n backdrop-filter: blur(10px);\n cursor: pointer;\n user-select: none;\n transition: transform 120ms ease;\n}\n.dl2-cluster-bubble:hover { transform: scale(1.05); }\n.dl2-cluster-32 { font-size: 11px; }\n.dl2-cluster-40 { font-size: 13px; }\n.dl2-cluster-48 { font-size: 15px; }\n.dl2-cluster-56 { font-size: 17px; }\n\n/* --- FULLSCREEN BUTTON ---------------------------------------------------- */\n.dl2-fullscreen-control { background: transparent; border: 0; }\n.dl2-fullscreen-button {\n display: flex !important;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n color: var(--mantine-color-text, #1a1b1e);\n background: transparent;\n}\n.dl2-fullscreen-button:hover { background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 60%, transparent); }\n.dl2-fullscreen-button.dl2-fs-active { color: var(--mantine-color-blue-6, #228be6); }\n\n",""]);const a=s},314(t){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var a=0;a0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=r),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},417(t){t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},601(t){t.exports=function(t){return t[1]}},72(t){var e=[];function n(t){for(var n=-1,o=0;o0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(o,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113(t){t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},709(t){t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNiIgaGVpZ2h0PSIyNiI+PHBhdGggZmlsbD0iI2I5YjliOSIgZD0ibS4wMzIgMTcuMDU2IDEzLTggMTMgOC0xMyA4eiIvPjxwYXRoIGZpbGw9IiM3MzczNzMiIGQ9Im0uMDMyIDE3LjA1Ni0uMDMyLjkzIDEzIDggMTMtOCAuMDMyLS45My0xMyA4eiIvPjxwYXRoIGZpbGw9IiNjZGNkY2QiIGQ9Im0wIDEzLjA3NiAxMy04IDEzIDgtMTMgOHoiLz48cGF0aCBmaWxsPSIjNzM3MzczIiBkPSJNMCAxMy4wNzZ2LjkxbDEzIDggMTMtOHYtLjkxbC0xMyA4eiIvPjxwYXRoIGZpbGw9IiNlOWU5ZTkiIGZpbGwtb3BhY2l0eT0iLjU4NSIgc3Ryb2tlPSIjNzk3OTc5IiBzdHJva2Utd2lkdGg9Ii4xIiBkPSJtMCA4Ljk4NiAxMy04IDEzIDgtMTMgOC0xMy04Ii8+PHBhdGggZmlsbD0iIzczNzM3MyIgZD0iTTAgOC45ODZ2MWwxMyA4IDEzLTh2LTFsLTEzIDh6Ii8+PC9zdmc+"},510(t){t.exports="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="},295(e){e.exports=t},775(t){t.exports=e}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={id:t,exports:{}};return n[t](r,r.exports,i),r.exports}i.m=n,i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r,s=function(){var t=document.currentScript;if(!t){for(var e=document.getElementsByTagName("script"),n=[],o=0;oos,BaseLayer:()=>xr,Circle:()=>Gi,CircleMarker:()=>Ji,EasyButton:()=>qr,EditControl:()=>Ur,FeatureGroup:()=>rs,FullScreenControl:()=>as,GeoJSON:()=>gr,ImageOverlay:()=>ls,KeyboardControl:()=>ts,LayerGroup:()=>is,LayersControl:()=>vr,Map:()=>zn,Marker:()=>Ai,MiniMap:()=>es,Overlay:()=>wr,Polygon:()=>Vi,Polyline:()=>$i,Popup:()=>Ui,Rectangle:()=>Ki,ScaleControl:()=>ss,TextMarker:()=>Wi,TileLayer:()=>Cn,TileSelector:()=>Xr,Tooltip:()=>qi});var c=i(295),h=i.n(c);let d=0;function u(t){return"_leaflet_id"in t||(t._leaflet_id=++d),t._leaflet_id}function p(t,e,n){let o,i;function r(){o=!1,i&&(s.apply(n,i),i=!1)}function s(...s){o?i=s:(t.apply(n,s),setTimeout(r,e),o=!0)}return s}function m(t,e,n){const o=e[1],i=e[0],r=o-i;return t===o&&n?t:((t-i)%r+r)%r+i}function f(){return!1}function g(t,e){if(!1===e)return t;const n=10**(void 0===e?6:e);return Math.round(t*n)/n}function _(t){return t.trim().split(/\s+/)}function y(t,e){Object.hasOwn(t,"options")||(t.options=t.options?Object.create(t.options):{});for(const n in e)Object.hasOwn(e,n)&&(t.options[n]=e[n]);return t.options}const b=/\{ *([\w_ -]+) *\}/g;function v(t,e){return t.replace(b,(t,n)=>{let o=e[n];if(void 0===o)throw new Error(`No value provided for variable ${t}`);return"function"==typeof o&&(o=o(e)),o})}const x="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";var w={__proto__:null,emptyImageUrl:x,falseFn:f,formatNum:g,get lastId(){return d},setOptions:y,splitWords:_,stamp:u,template:v,throttle:p,wrapNum:m};class L{static extend({statics:t,includes:e,...n}){const o=class extends(this){};Object.setPrototypeOf(o,this);const i=this.prototype,r=o.prototype;if(t&&Object.assign(o,t),Array.isArray(e))for(const t of e)Object.assign(r,t);else e&&Object.assign(r,e);return Object.assign(r,n),r.options&&(r.options=i.options?Object.create(i.options):{},Object.assign(r.options,n.options)),r._initHooks=[],o}static include(t){const e=this.prototype.options;return Object.assign(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this}static setDefaultOptions(t){return y(this.prototype,t),this}static mergeOptions(t){return this.prototype.options??={},Object.assign(this.prototype.options,t),this}static addInitHook(t,...e){const n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks??=[],this.prototype._initHooks.push(n),this}constructor(...t){this._initHooksCalled=!1,y(this),this.initialize&&this.initialize(...t),this.callInitHooks()}initialize(){}callInitHooks(){if(this._initHooksCalled)return;const t=[];let e=this;for(;null!==(e=Object.getPrototypeOf(e));)t.push(e);t.reverse();for(const e of t)for(const t of e._initHooks??[])t.call(this);this._initHooksCalled=!0}}class k extends L{on(t,e,n){if("object"==typeof t)for(const[n,o]of Object.entries(t))this._on(n,o,e);else for(const o of _(t))this._on(o,e,n);return this}off(t,e,n){if(arguments.length)if("object"==typeof t)for(const[n,o]of Object.entries(t))this._off(n,o,e);else{const o=1===arguments.length;for(const i of _(t))o?this._off(i):this._off(i,e,n)}else delete this._events;return this}_on(t,e,n,o){if("function"!=typeof e)return void console.warn("wrong listener type: "+typeof e);if(!1!==this._listens(t,e,n))return;n===this&&(n=void 0);const i={fn:e,ctx:n};o&&(i.once=!0),this._events??={},this._events[t]??=[],this._events[t].push(i)}_off(t,e,n){if(!this._events)return;let o=this._events[t];if(!o)return;if(1===arguments.length){if(this._firingCount)for(const t of o)t.fn=f;return void delete this._events[t]}if("function"!=typeof e)return void console.warn("wrong listener type: "+typeof e);const i=this._listens(t,e,n);if(!1!==i){const e=o[i];this._firingCount&&(e.fn=f,this._events[t]=o=o.slice()),o.splice(i,1)}}fire(t,e,n){if(!this.listens(t,n))return this;const o={...e,type:t,target:this,sourceTarget:e?.sourceTarget||this};if(this._events){const e=this._events[t];if(e){this._firingCount=this._firingCount+1||1;for(const n of e){const e=n.fn;n.once&&this.off(t,e,n.ctx),e.call(n.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this}listens(t,e,n,o){"string"!=typeof t&&console.warn('"string" type argument expected');let i=e;if("function"!=typeof e&&(o=!!e,i=void 0,n=void 0),this._events?.[t]?.length&&!1!==this._listens(t,i,n))return!0;if(o)for(const i of Object.values(this._eventParents??{}))if(i.listens(t,e,n,o))return!0;return!1}_listens(t,e,n){if(!this._events)return!1;const o=this._events[t]??[];if(!e)return!!o.length;n===this&&(n=void 0);const i=o.findIndex(t=>t.fn===e&&t.ctx===n);return-1!==i&&i}once(t,e,n){if("object"==typeof t)for(const[n,o]of Object.entries(t))this._on(n,o,e,!0);else for(const o of _(t))this._on(o,e,n,!0);return this}addEventParent(t){return this._eventParents??={},this._eventParents[u(t)]=t,this}removeEventParent(t){return this._eventParents&&delete this._eventParents[u(t)],this}_propagateEvent(t){for(const e of Object.values(this._eventParents??{}))e.fire(t.type,{propagatedFrom:t.target,...t},!0)}}class P{constructor(t,e,n){if(!P.validate(t,e))throw new Error(`Invalid Point object: (${t}, ${e})`);let o,i;if(t instanceof P)return t;Array.isArray(t)?(o=t[0],i=t[1]):"object"==typeof t&&"x"in t&&"y"in t?(o=t.x,i=t.y):(o=t,i=e),this.x=n?Math.round(o):o,this.y=n?Math.round(i):i}static validate(t,e){return!!(t instanceof P||Array.isArray(t))||!!(t&&"object"==typeof t&&"x"in t&&"y"in t)||!(!t&&0!==t||!e&&0!==e)}clone(){const t=new P(0,0);return t.x=this.x,t.y=this.y,t}add(t){return this.clone()._add(new P(t))}_add(t){return this.x+=t.x,this.y+=t.y,this}subtract(t){return this.clone()._subtract(new P(t))}_subtract(t){return this.x-=t.x,this.y-=t.y,this}divideBy(t){return this.clone()._divideBy(t)}_divideBy(t){return this.x/=t,this.y/=t,this}multiplyBy(t){return this.clone()._multiplyBy(t)}_multiplyBy(t){return this.x*=t,this.y*=t,this}scaleBy(t){return new P(this.x*t.x,this.y*t.y)}unscaleBy(t){return new P(this.x/t.x,this.y/t.y)}round(){return this.clone()._round()}_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}floor(){return this.clone()._floor()}_floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.clone()._ceil()}_ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}trunc(){return this.clone()._trunc()}_trunc(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}distanceTo(t){const e=(t=new P(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)}equals(t){return(t=new P(t)).x===this.x&&t.y===this.y}contains(t){return t=new P(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)}toString(){return`Point(${g(this.x)}, ${g(this.y)})`}}class T{constructor(t,e){if(!t)return;if(t instanceof T)return t;const n=e?[t,e]:t;for(const t of n)this.extend(t)}extend(t){let e,n;if(!t)return this;if(t instanceof P||"number"==typeof t[0]||"x"in t)e=n=new P(t);else if(e=(t=new T(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this}getCenter(t){return new P((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)}getBottomLeft(){return new P(this.min.x,this.max.y)}getTopRight(){return new P(this.max.x,this.min.y)}getTopLeft(){return this.min}getBottomRight(){return this.max}getSize(){return this.max.subtract(this.min)}contains(t){let e,n;return(t="number"==typeof t[0]||t instanceof P?new P(t):new T(t))instanceof T?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y}intersects(t){t=new T(t);const e=this.min,n=this.max,o=t.min,i=t.max,r=i.x>=e.x&&o.x<=n.x,s=i.y>=e.y&&o.y<=n.y;return r&&s}overlaps(t){t=new T(t);const e=this.min,n=this.max,o=t.min,i=t.max,r=i.x>e.x&&o.xe.y&&o.y=e.lat&&i.lat<=n.lat&&o.lng>=e.lng&&i.lng<=n.lng}intersects(t){t=new E(t);const e=this._southWest,n=this._northEast,o=t.getSouthWest(),i=t.getNorthEast(),r=i.lat>=e.lat&&o.lat<=n.lat,s=i.lng>=e.lng&&o.lng<=n.lng;return r&&s}overlaps(t){t=new E(t);const e=this._southWest,n=this._northEast,o=t.getSouthWest(),i=t.getNorthEast(),r=i.lat>e.lat&&o.late.lng&&o.lng{const t=M*Math.PI;return new T([-t,-t],[t,t])})()};class O{constructor(t,e,n,o){if(Array.isArray(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=o}transform(t,e){return this._transform(t.clone(),e)}_transform(t,e){return e||=1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t}untransform(t,e){return e||=1,new P((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}}class I extends A{static code="EPSG:3857";static projection=S;static transformation=(()=>{const t=.5/(Math.PI*S.R);return new O(t,.5,-t,.5)})()}const Z=D("chrome"),R=!Z&&D("safari"),B="undefined"!=typeof orientation||D("mobile"),N="undefined"!=typeof window&&!!window.PointerEvent,j="undefined"!=typeof window&&("ontouchstart"in window||!!window.TouchEvent);function D(t){return"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t)}var F={chrome:Z,safari:R,mobile:B,pointer:N,touch:j||N,touchNative:j,retina:"undefined"!=typeof window&&void 0!==window.devicePixelRatio&&window.devicePixelRatio>1,mac:"undefined"!=typeof navigator&&void 0!==navigator.platform&&navigator.platform.startsWith("Mac"),linux:"undefined"!=typeof navigator&&void 0!==navigator.platform&&navigator.platform.startsWith("Linux")};function H(t){return"string"==typeof t?document.getElementById(t):t}function W(t,e,n){const o=document.createElement(t);return o.className=e??"",n?.appendChild(o),o}function U(t){const e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function q(t){const e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function $(t,e,n){const o=e??new P(0,0);t.style.transform=`translate3d(${o.x}px,${o.y}px,0)${n?` scale(${n})`:""}`}const V=new WeakMap;function K(t,e){V.set(t,e),$(t,e)}function G(t){return V.get(t)??new P(0,0)}const J="undefined"==typeof document?{}:document.documentElement.style,Y=["userSelect","WebkitUserSelect"].find(t=>t in J);let X,Q,tt;function et(){const t=J[Y];"none"!==t&&(X=t,J[Y]="none")}function nt(){void 0!==X&&(J[Y]=X,X=void 0)}function ot(){_t(window,"dragstart",Et)}function it(){bt(window,"dragstart",Et)}function rt(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(st(),Q=t,tt=t.style.outlineStyle,t.style.outlineStyle="none",_t(window,"keydown",st))}function st(){Q&&(Q.style.outlineStyle=tt,Q=void 0,tt=void 0,bt(window,"keydown",st))}function at(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function lt(t){const e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var ct={__proto__:null,create:W,disableImageDrag:ot,disableTextSelection:et,enableImageDrag:it,enableTextSelection:nt,get:H,getPosition:G,getScale:lt,getSizedParentNode:at,preventOutline:rt,restoreOutline:st,setPosition:K,setTransform:$,toBack:q,toFront:U};let ht=new Map,dt=!1;function ut(){dt||(dt=!0,document.addEventListener("pointerdown",pt,{capture:!0}),document.addEventListener("pointermove",mt,{capture:!0}),document.addEventListener("pointerup",ft,{capture:!0}),document.addEventListener("pointercancel",ft,{capture:!0}),ht=new Map)}function pt(t){ht.set(t.pointerId,t)}function mt(t){ht.has(t.pointerId)&&ht.set(t.pointerId,t)}function ft(t){ht.delete(t.pointerId)}function gt(){return[...ht.values()]}function _t(t,e,n,o){if(e&&"object"==typeof e)for(const[o,i]of Object.entries(e))wt(t,o,i,n);else for(const i of _(e))wt(t,i,n,o);return this}const yt="_leaflet_events";function bt(t,e,n,o){if(1===arguments.length)vt(t),delete t[yt];else if(e&&"object"==typeof e)for(const[o,i]of Object.entries(e))Lt(t,o,i,n);else if(e=_(e),2===arguments.length)vt(t,t=>e.includes(t));else for(const i of e)Lt(t,i,n,o);return this}function vt(t,e){for(const n of Object.keys(t[yt]??{})){const o=n.split(/\d/)[0];e&&!e(o)||Lt(t,o,null,null,n)}}const xt={pointerenter:"pointerover",pointerleave:"pointerout",wheel:"undefined"!=typeof window&&!("onwheel"in window)&&"mousewheel"};function wt(t,e,n,o){const i=e+u(n)+(o?`_${u(o)}`:"");if(t[yt]&&t[yt][i])return this;let r=function(e){return n.call(o||t,e||window.event)};const s=r;F.touch&&"dblclick"===e?r=function(t,e){t.addEventListener("dblclick",e);let n,o=0;function i(t){if(1!==t.detail)return void(n=t.detail);if("mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents)return;const e=Ct(t);if(e.some(t=>t instanceof HTMLLabelElement&&t.attributes.for)&&!e.some(t=>t instanceof HTMLInputElement||t instanceof HTMLSelectElement))return;const i=Date.now();i-o<=200?(n++,2===n&&t.target.dispatchEvent(function(t){let e,n={bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed,detail:2,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget,region:t.region};return t instanceof PointerEvent?(n={...n,pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist,pointerType:t.pointerType,isPrimary:t.isPrimary},e=new PointerEvent("dblclick",n)):e=new MouseEvent("dblclick",n),e}(t))):n=1,o=i}return t.addEventListener("click",i),{dblclick:e,simDblclick:i}}(t,r):"addEventListener"in t?"wheel"===e||"mousewheel"===e?t.addEventListener(xt[e]||e,r,{passive:!1}):"pointerenter"===e||"pointerleave"===e?(r=function(e){e??=window.event,Ot(t,e)&&s(e)},t.addEventListener(xt[e],r,!1)):t.addEventListener(e,s,!1):t.attachEvent(`on${e}`,r),t[yt]??={},t[yt][i]=r}function Lt(t,e,n,o,i){i??=e+u(n)+(o?`_${u(o)}`:"");const r=t[yt]&&t[yt][i];if(!r)return this;F.touch&&"dblclick"===e?function(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}(t,r):"removeEventListener"in t?t.removeEventListener(xt[e]||e,r,!1):t.detachEvent(`on${e}`,r),t[yt][i]=null}function kt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Pt(t){return wt(t,"wheel",kt),this}function Tt(t){return _t(t,"pointerdown dblclick contextmenu",kt),t._leaflet_disable_click=!0,this}function Et(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function zt(t){return Et(t),kt(t),this}function Ct(t){return t.composedPath()}function At(t,e){if(!e)return new P(t.clientX,t.clientY);const n=lt(e),o=n.boundingClientRect;return new P((t.clientX-o.left)/n.x-e.clientLeft,(t.clientY-o.top)/n.y-e.clientTop)}function Mt(){const t=window.devicePixelRatio;return F.linux&&F.chrome?t:F.mac?3*t:t>0?2*t:1}function St(t){return t.deltaY&&0===t.deltaMode?-t.deltaY/Mt():t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:(t.deltaX||t.deltaZ,0)}function Ot(t,e){let n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var It={__proto__:null,PointerEvents:{__proto__:null,cleanupPointers:function(){ht.clear()},disablePointerDetection:function(){document.removeEventListener("pointerdown",pt,{capture:!0}),document.removeEventListener("pointermove",mt,{capture:!0}),document.removeEventListener("pointerup",ft,{capture:!0}),document.removeEventListener("pointercancel",ft,{capture:!0}),dt=!1},enablePointerDetection:ut,getPointers:gt},disableClickPropagation:Tt,disableScrollPropagation:Pt,getPointerPosition:At,getPropagationPath:Ct,getWheelDelta:St,getWheelPxFactor:Mt,isExternalTarget:Ot,off:bt,on:_t,preventDefault:Et,stop:zt,stopPropagation:kt};class Zt extends k{run(t,e,n,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=n??.25,this._easeOutPower=1/Math.max(o??.5,.2),this._startPos=G(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()}stop(){this._inProgress&&(this._step(!0),this._complete())}_animate(){this._animId=requestAnimationFrame(this._animate.bind(this)),this._step()}_step(t){const e=+new Date-this._startTime,n=1e3*this._duration;e{const n=(Date.now()-g)/y,r=function(t){return 1-(1-t)**1.5}(n)*_;n<=1?(this._flyToFrame=requestAnimationFrame(b),this._move(this.unproject(o.add(i.subtract(o).multiplyBy(function(t){return a*(m(f)*(p(e=f+h*t)/m(e))-p(f))/d;var e}(r)/c)),s),this.getScaleZoom(a/function(t){return a*(m(f)/m(f+h*t))}(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)};return this._moveStart(!0,n.noMoveStart),b(),this}flyToBounds(t,e){const n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)}setMaxBounds(t){return t=new E(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)}setMinZoom(t){const e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()this.options.maxZoom)?this.setZoom(t):this}panInsideBounds(t,e){this._enforcingBounds=!0;const n=this.getCenter(),o=this._limitCenter(n,this._zoom,new E(t));return n.equals(o)||this.panTo(o,e),this._enforcingBounds=!1,this}panInside(t,e){e??={};const n=new P(e.paddingTopLeft||e.padding||[0,0]),o=new P(e.paddingBottomRight||e.padding||[0,0]),i=this.project(this.getCenter()),r=this.project(t),s=this.getPixelBounds(),a=new T([s.min.add(n),s.max.subtract(o)]),l=a.getSize();if(!a.contains(r)){this._enforcingBounds=!0;const t=r.subtract(a.getCenter()),n=a.extend(r).getSize().subtract(l);i.x+=t.x<0?-n.x:n.x,i.y+=t.y<0?-n.y:n.y,this.panTo(this.unproject(i),e),this._enforcingBounds=!1}return this}invalidateSize(t){if(!this._loaded)return this;t={animate:!1,pan:!0,...!0===t?{animate:!0}:t};const e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;const n=this.getSize(),o=e.divideBy(2).round(),i=n.divideBy(2).round(),r=o.subtract(i);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(this.fire.bind(this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this}stop(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()}locate(t){if(t=this._locateOptions={timeout:1e4,watch:!1,...t},!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;const e=this._handleGeolocationResponse.bind(this),n=this._handleGeolocationError.bind(this);return t.watch?(void 0!==this._locationWatchId&&navigator.geolocation.clearWatch(this._locationWatchId),this._locationWatchId=navigator.geolocation.watchPosition(e,n,t)):navigator.geolocation.getCurrentPosition(e,n,t),this}stopLocate(){return navigator.geolocation?.clearWatch?.(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this}_handleGeolocationError(t){if(!this._container._leaflet_id)return;const e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:`Geolocation error: ${n}.`})}_handleGeolocationResponse(t){if(!this._container._leaflet_id)return;const e=t.coords.latitude,n=t.coords.longitude,o=new z(e,n),i=o.toBounds(2*t.coords.accuracy),r=this._locateOptions;if(r.setView){const t=this.getBoundsZoom(i);this.setView(o,r.maxZoom?Math.min(t,r.maxZoom):t)}const s={latlng:o,bounds:i,timestamp:t.timestamp};for(const e in t.coords)"number"==typeof t.coords[e]&&(s[e]=t.coords[e]);this.fire("locationfound",s)}addHandler(t,e){if(!e)return this;const n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this}remove(){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");delete this._container._leaflet_id,delete this._containerId,void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),this._mapPane.remove(),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(cancelAnimationFrame(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),clearTimeout(this._transitionEndTimer),clearTimeout(this._sizeTimer),this._loaded&&this.fire("unload"),this._destroyAnimProxy();for(const t of Object.values(this._layers))t.remove();for(const t of Object.values(this._panes))t.remove();return this._layers={},this._panes={},delete this._mapPane,delete this._renderer,this}createPane(t,e){const n=W("div","leaflet-pane"+(t?` leaflet-${t.replace("Pane","")}-pane`:""),e||this._mapPane);return t&&(this._panes[t]=n),n}getCenter(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())}getZoom(){return this._zoom}getBounds(){const t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),n=this.unproject(t.getTopRight());return new E(e,n)}getMinZoom(){return this.options.minZoom??this._layersMinZoom??0}getMaxZoom(){return this.options.maxZoom??this._layersMaxZoom??1/0}getBoundsZoom(t,e,n){t=new E(t),n=new P(n??[0,0]);let o=this.getZoom()??0;const i=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=new T(this.project(a,o),this.project(s,o)).getSize(),h=this.options.zoomSnap,d=l.x/c.x,u=l.y/c.y,p=e?Math.max(d,u):Math.min(d,u);return o=this.getScaleZoom(p,o),h&&(o=Math.round(o/(h/100))*(h/100),o=e?Math.ceil(o/h)*h:Math.floor(o/h)*h),Math.max(i,Math.min(r,o))}getSize(){return this._size&&!this._sizeChanged||(this._size=new P(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()}getPixelBounds(t,e){const n=this._getTopLeftPoint(t,e);return new T(n,n.add(this.getSize()))}getPixelOrigin(){return this._checkIfLoaded(),this._pixelOrigin}getPixelWorldBounds(t){return this.options.crs.getProjectedBounds(t??this.getZoom())}getPane(t){return"string"==typeof t?this._panes[t]:t}getPanes(){return this._panes}getContainer(){return this._container}getZoomScale(t,e){const n=this.options.crs;return e??=this._zoom,n.scale(t)/n.scale(e)}getScaleZoom(t,e){const n=this.options.crs;e??=this._zoom;const o=n.zoom(t*n.scale(e));return isNaN(o)?1/0:o}project(t,e){return e??=this._zoom,this.options.crs.latLngToPoint(new z(t),e)}unproject(t,e){return e??=this._zoom,this.options.crs.pointToLatLng(new P(t),e)}layerPointToLatLng(t){const e=new P(t).add(this.getPixelOrigin());return this.unproject(e)}latLngToLayerPoint(t){return this.project(new z(t))._round()._subtract(this.getPixelOrigin())}wrapLatLng(t){return this.options.crs.wrapLatLng(new z(t))}wrapLatLngBounds(t){return this.options.crs.wrapLatLngBounds(new E(t))}distance(t,e){return this.options.crs.distance(new z(t),new z(e))}containerPointToLayerPoint(t){return new P(t).subtract(this._getMapPanePos())}layerPointToContainerPoint(t){return new P(t).add(this._getMapPanePos())}containerPointToLatLng(t){const e=this.containerPointToLayerPoint(new P(t));return this.layerPointToLatLng(e)}latLngToContainerPoint(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(new z(t)))}pointerEventToContainerPoint(t){return At(t,this._container)}pointerEventToLayerPoint(t){return this.containerPointToLayerPoint(this.pointerEventToContainerPoint(t))}pointerEventToLatLng(t){return this.layerPointToLatLng(this.pointerEventToLayerPoint(t))}_initContainer(t){const e=this._container=H(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");_t(e,"scroll",this._onScroll,this),this._containerId=u(e),ut()}_initLayout(){const t=this._container;this._fadeAnimated=this.options.fadeAnimation;const e=["leaflet-container","leaflet-touch"];F.retina&&e.push("leaflet-retina"),F.safari&&e.push("leaflet-safari"),this._fadeAnimated&&e.push("leaflet-fade-anim"),t.classList.add(...e);const{position:n}=getComputedStyle(t);"absolute"!==n&&"relative"!==n&&"fixed"!==n&&"sticky"!==n&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()}_initPanes(){const t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),K(this._mapPane,new P(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(t.markerPane.classList.add("leaflet-zoom-hide"),t.shadowPane.classList.add("leaflet-zoom-hide"))}_resetView(t,e,n){K(this._mapPane,new P(0,0));const o=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");const i=this._zoom!==e;this._moveStart(i,n)._move(t,e)._moveEnd(i),this.fire("viewreset"),o&&this.fire("load")}_moveStart(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this}_move(t,e,n,o){void 0===e&&(e=this._zoom);const i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),o?n?.pinch&&this.fire("zoom",n):((i||n?.pinch)&&this.fire("zoom",n),this.fire("move",n)),this}_moveEnd(t){return t&&this.fire("zoomend"),this.fire("moveend")}_stop(){return cancelAnimationFrame(this._flyToFrame),this._panAnim?.stop(),this}_rawPanBy(t){K(this._mapPane,this._getMapPanePos().subtract(t))}_getZoomSpan(){return this.getMaxZoom()-this.getMinZoom()}_panInsideMaxBounds(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)}_checkIfLoaded(){if(!this._loaded)throw new Error("Set map center and zoom first.")}_initEvents(t){this._targets={},this._targets[u(this._container)]=this,(t?bt:_t)(this._container,"click dblclick pointerdown pointerup pointerover pointerout pointermove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&(t?this._resizeObserver.disconnect():(this._resizeObserver||(this._resizeObserver=new ResizeObserver(this._onResize.bind(this))),this._resizeObserver.observe(this._container))),this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)}_onResize(){cancelAnimationFrame(this._resizeRequest),this._resizeRequest=requestAnimationFrame(()=>{this.invalidateSize({debounceMoveend:!0})})}_onScroll(){this._container.scrollTop=0,this._container.scrollLeft=0}_onMoveEnd(){const t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}_findEventTargets(t,e){let n,o=[],i=t.target||t.srcElement,r=!1;const s="pointerout"===e||"pointerover"===e;for(;i;){if(n=this._targets[u(i)],n&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)){if(s&&!Ot(i,t))break;if(o.push(n),s)break}if(i===this._container)break;i=i.parentNode}return o.length||r||s||!this.listens(e,!0)||(o=[this]),o}_isClickDisabled(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click||!t.parentNode)return!0;t=t.parentNode}}_handleDOMEvent(t){const e=t.target??t.srcElement;if(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))return;const n=t.type;"pointerdown"===n&&rt(e),this._fireDOMEvent(t,n)}static _pointerEvents=["click","dblclick","pointerover","pointerout","contextmenu"];_fireDOMEvent(e,n,o){"click"===n&&this._fireDOMEvent(e,"preclick",o);let i=this._findEventTargets(e,n);if(o&&(i=o.filter(t=>t.listens(n,!0)).concat(i)),!i.length)return;"contextmenu"===n&&Et(e);const r=i[0],s={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){const t=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=t?this.latLngToContainerPoint(r.getLatLng()):this.pointerEventToContainerPoint(e),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=t?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(const e of i)if(e.fire(n,s,!0),s.originalEvent._stopped||!1===e.options.bubblingPointerEvents&&t._pointerEvents.includes(n))return}_draggableMoved(t){return t=t.dragging?.enabled()?t:this,t.dragging?.moved()||this.boxZoom?.moved()}_clearHandlers(){for(const t of this._handlers)t.disable()}whenReady(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this}_getMapPanePos(){return G(this._mapPane)}_moved(){const t=this._getMapPanePos();return t&&!t.equals([0,0])}_getTopLeftPoint(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())}_getNewPixelOrigin(t,e){const n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()}_latLngToNewLayerPoint(t,e,n){const o=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(o)}_latLngBoundsToNewLayerBounds(t,e,n){const o=this._getNewPixelOrigin(n,e);return new T([this.project(t.getSouthWest(),e)._subtract(o),this.project(t.getNorthWest(),e)._subtract(o),this.project(t.getSouthEast(),e)._subtract(o),this.project(t.getNorthEast(),e)._subtract(o)])}_getCenterLayerPoint(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))}_getCenterOffset(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())}_limitCenter(t,e,n){if(!n)return t;const o=this.project(t,e),i=this.getSize().divideBy(2),r=new T(o.subtract(i),o.add(i)),s=this._getBoundsOffset(r,n,e);return Math.abs(s.x)<=1&&Math.abs(s.y)<=1?t:this.unproject(o.add(s),e)}_limitOffset(t,e){if(!e)return t;const n=this.getPixelBounds(),o=new T(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(o,e))}_getBoundsOffset(t,e,n){const o=new T(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),i=o.min.subtract(t.min),r=o.max.subtract(t.max),s=this._rebound(i.x,-r.x),a=this._rebound(i.y,-r.y);return new P(s,a)}_rebound(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))}_limitZoom(t){const e=this.getMinZoom(),n=this.getMaxZoom(),o=this.options.zoomSnap;return o&&(t=Math.round(t/o)*o),Math.max(e,Math.min(n,t))}_onPanTransitionStep(){this.fire("move")}_onPanTransitionEnd(){this._mapPane.classList.remove("leaflet-pan-anim"),this.fire("moveend")}_tryAnimatedPan(t,e){const n=this._getCenterOffset(t)._trunc();return!(!0!==e?.animate&&!this.getSize().contains(n)||(this.panBy(n,e),0))}_createAnimProxy(){this._proxy=W("div","leaflet-proxy leaflet-zoom-animated"),this._panes.mapPane.appendChild(this._proxy),this.on("zoomanim",this._animateProxyZoom,this),this.on("load moveend",this._animMoveEnd,this),_t(this._proxy,"transitionend",this._catchTransitionEnd,this)}_animateProxyZoom(t){const e=this._proxy.style.transform;$(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style.transform&&this._animatingZoom&&this._onZoomTransitionEnd()}_animMoveEnd(){const t=this.getCenter(),e=this.getZoom();$(this._proxy,this.project(t,e),this.getZoomScale(e,1))}_destroyAnimProxy(){this._proxy&&(bt(this._proxy,"transitionend",this._catchTransitionEnd,this),this._proxy.remove(),this.off("zoomanim",this._animateProxyZoom,this),this.off("load moveend",this._animMoveEnd,this),delete this._proxy)}_catchTransitionEnd(t){this._animatingZoom&&t.propertyName.includes("transform")&&this._onZoomTransitionEnd()}_nothingToAnimate(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length}_tryAnimatedZoom(t,e,n){if(this._animatingZoom)return!0;if(n??={},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;const o=this.getZoomScale(e),i=this._getCenterOffset(t)._divideBy(1-1/o);return!(!0!==n.animate&&!this.getSize().contains(i)||(requestAnimationFrame(()=>{this._moveStart(!0,n.noMoveStart??!1)._animateZoom(t,e,!0)}),0))}_animateZoom(t,e,n,o){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,this._mapPane.classList.add("leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._transitionEndTimer=setTimeout(this._onZoomTransitionEnd.bind(this),250))}_onZoomTransitionEnd(){this._animatingZoom&&(this._mapPane?.classList.remove("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))}};const Bt=Rt;class Nt extends L{static{this.setDefaultOptions({position:"topright"})}initialize(t){y(this,t)}getPosition(){return this.options.position}setPosition(t){const e=this._map;return e?.removeControl(this),this.options.position=t,e?.addControl(this),this}getContainer(){return this._container}addTo(t){this.remove(),this._map=t;const e=this._container=this.onAdd(t),n=this.getPosition(),o=t._controlCorners[n];return e.classList.add("leaflet-control"),n.includes("bottom")?o.insertBefore(e,o.firstChild):o.appendChild(e),this._map.on("unload",this.remove,this),this}remove(){return this._map?(this._container.remove(),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this}_refocusOnMap(t){this._map&&t&&(0!==t.screenX||0!==t.screenY)&&this._map.getContainer().focus()}}Rt.include({addControl(t){return t.addTo(this),this},removeControl(t){return t.remove(),this},_initControlPos(){const t=this._controlCorners={},e="leaflet-",n=this._controlContainer=W("div",`${e}control-container`,this._container);function o(o,i){const r=`${e+o} ${e}${i}`;t[o+i]=W("div",r,n)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos(){for(const t of Object.values(this._controlCorners))t.remove();this._controlContainer.remove(),delete this._controlCorners,delete this._controlContainer}});class jt extends Nt{static{this.setDefaultOptions({collapsed:!0,collapseDelay:0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:(t,e,n,o)=>n0)return this._collapseDelayTimeout=setTimeout(()=>{this._container.classList.remove("leaflet-control-layers-expanded")},this.options.collapseDelay),this;this._container.classList.remove("leaflet-control-layers-expanded")}return this}_initLayout(){const t="leaflet-control-layers",e=this._container=W("div",t),n=this.options.collapsed;Tt(e),Pt(e);const o=this._section=W("fieldset",`${t}-list`);n&&(this._map.on("click",this.collapse,this),_t(e,{pointerenter:this._expandSafely,pointerleave:this.collapse},this));const i=this._layersLink=W("a",`${t}-toggle`,e);i.href="#",i.title="Layers",i.setAttribute("role","button"),_t(i,{keydown(t){"Enter"===t.code&&this._expandSafely()},click(t){Et(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=W("div",`${t}-base`,o),this._separator=W("div",`${t}-separator`,o),this._overlaysList=W("div",`${t}-overlays`,o),e.appendChild(o)}_getLayer(t){for(const e of this._layers)if(e&&u(e.layer)===t)return e}_addLayer(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort((t,e)=>this.options.sortFunction(t.layer,e.layer,t.name,e.name)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()}_update(){if(!this._container)return this;this._baseLayersList.replaceChildren(),this._overlaysList.replaceChildren(),this._layerControlInputs=[];let t,e,n=0;for(const o of this._layers)this._addItem(o),e||=o.overlay,t||=!o.overlay,n+=o.overlay?0:1;return this.options.hideSingleBase&&(t=t&&n>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this}_onLayerChange(t){this._handlingClick||this._update();const e=this._getLayer(u(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)}_addItem(t){const e=document.createElement("label"),n=this._map.hasLayer(t.layer),o=document.createElement("input");o.type=t.overlay?"checkbox":"radio",o.className="leaflet-control-layers-selector",o.defaultChecked=n,t.overlay||(o.name=`leaflet-base-layers_${u(this)}`),this._layerControlInputs.push(o),o.layerId=u(t.layer),_t(o,"click",this._onInputClick,this);const i=document.createElement("span");i.innerHTML=` ${t.name}`;const r=document.createElement("span");return e.appendChild(r),r.appendChild(o),r.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e}_onInputClick(t){if(this._preventClick)return;const e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(const t of e){const e=this._getLayer(t.layerId).layer;t.checked?n.push(e):t.checked||o.push(e)}for(const t of o)this._map.hasLayer(t)&&this._map.removeLayer(t);for(const t of n)this._map.hasLayer(t)||this._map.addLayer(t);this._handlingClick=!1,this._refocusOnMap(t)}_checkDisabledLayers(){const t=this._layerControlInputs,e=this._map.getZoom();for(const n of t){const t=this._getLayer(n.layerId).layer;n.disabled=void 0!==t.options.minZoom&&et.options.maxZoom}}_expandIfNotCollapsed(){return this._map&&!this.options.collapsed&&this.expand(),this}_expandSafely(){const t=this._section;this._preventClick=!0,_t(t,"click",Et),this.expand(),setTimeout(()=>{bt(t,"click",Et),this._preventClick=!1})}}class Dt extends Nt{static{this.setDefaultOptions({position:"topleft",zoomInText:'+ ',zoomInTitle:"Zoom in",zoomOutText:'− ',zoomOutTitle:"Zoom out"})}onAdd(t){const e="leaflet-control-zoom",n=W("div",`${e} leaflet-bar`),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,`${e}-in`,n,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,`${e}-out`,n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n}onRemove(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)}disable(){return this._disabled=!0,this._updateDisabled(),this}enable(){return this._disabled=!1,this._updateDisabled(),this}_zoomIn(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))}_createButton(t,e,n,o,i){const r=W("a",n,o);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Tt(r),_t(r,"click",zt),_t(r,"click",i,this),_t(r,"click",this._refocusOnMap,this),r}_updateDisabled(){const t=this._map,e="leaflet-disabled";this._zoomInButton.classList.remove(e),this._zoomOutButton.classList.remove(e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(this._zoomOutButton.classList.add(e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(this._zoomInButton.classList.add(e),this._zoomInButton.setAttribute("aria-disabled","true"))}}Rt.mergeOptions({zoomControl:!0}),Rt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Dt,this.addControl(this.zoomControl))});class Ft extends Nt{static{this.setDefaultOptions({position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1})}onAdd(t){const e="leaflet-control-scale",n=W("div",e),o=this.options;return this._addScales(o,`${e}-line`,n),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n}onRemove(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)}_addScales(t,e,n){t.metric&&(this._mScale=W("div",e,n)),t.imperial&&(this._iScale=W("div",e,n))}_update(){const t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)}_updateScales(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)}_updateMetric(t){const e=this._getRoundNum(t),n=e<1e3?`${e} m`:e/1e3+" km";this._updateScale(this._mScale,n,e/t)}_updateImperial(t){const e=3.2808399*t;let n,o,i;e>5280?(n=e/5280,o=this._getRoundNum(n),this._updateScale(this._iScale,`${o} mi`,o/n)):(i=this._getRoundNum(e),this._updateScale(this._iScale,`${i} ft`,i/e))}_updateScale(t,e,n){t.style.width=`${Math.round(this.options.maxWidth*n)}px`,t.innerHTML=e}_getRoundNum(t){const e=10**(`${Math.floor(t)}`.length-1);let n=t/e;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,e*n}}class Ht extends Nt{static{this.setDefaultOptions({position:"bottomright",prefix:' Leaflet '})}initialize(t){y(this,t),this._attributions={}}onAdd(t){t.attributionControl=this,this._container=W("div","leaflet-control-attribution"),Tt(this._container);for(const e of Object.values(t._layers))e.getAttribution&&this.addAttribution(e.getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container}onRemove(t){t.off("layeradd",this._addAttribution,this)}_addAttribution(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",()=>this.removeAttribution(t.layer.getAttribution())))}setPrefix(t){return this.options.prefix=t,this._update(),this}addAttribution(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this}removeAttribution(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this}_update(){if(!this._map)return;const t=Object.keys(this._attributions).filter(t=>this._attributions[t]),e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' | ')}}Rt.mergeOptions({attributionControl:!0}),Rt.addInitHook(function(){this.options.attributionControl&&(new Ht).addTo(this)}),Nt.Layers=jt,Nt.Zoom=Dt,Nt.Scale=Ft,Nt.Attribution=Ht;class Wt extends L{initialize(t){this._map=t}enable(){return this._enabled||(this._enabled=!0,this.addHooks()),this}disable(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this}enabled(){return!!this._enabled}}Wt.addTo=function(t,e){return t.addHandler(e,this),this};class Ut extends k{static{this.setDefaultOptions({clickTolerance:3})}initialize(t,e,n,o){y(this,o),this._element=t,this._dragStartTarget=e??t,this._preventOutline=n}enable(){this._enabled||(_t(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!0)}disable(){this._enabled&&(Ut._dragging===this&&this.finishDrag(!0),bt(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!1,this._moved=!1)}_onDown(t){if(this._moved=!1,this._element.classList.contains("leaflet-zoom-anim"))return;if(1!==gt().length)return void(Ut._dragging===this&&this.finishDrag());if(Ut._dragging||t.shiftKey||0!==t.button&&"touch"!==t.pointerType)return;if(Ut._dragging=this,this._preventOutline&&rt(this._element),ot(),et(),this._moving)return;this.fire("down");const e=at(this._element);this._startPoint=new P(t.clientX,t.clientY),this._startPos=G(this._element),this._parentScale=lt(e),_t(document,"pointermove",this._onMove,this),_t(document,"pointerup pointercancel",this._onUp,this)}_onMove(t){if(gt().length>1)return void(this._moved=!0);const e=new P(t.clientX,t.clientY)._subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)e&&(n.push(t[i]),o=i);return ol&&(r=s,l=a);l>n&&(e[r]=1,Yt(t,e,n,o,r),Yt(t,e,n,r,i))}let Xt;function Qt(t,e,n,o,i){let r,s,a,l=o?Xt:ee(t,n),c=ee(e,n);for(Xt=c;;){if(!(l|c))return[t,e];if(l&c)return!1;r=l||c,s=te(t,e,r,n,i),a=ee(s,n),r===l?(t=s,l=a):(e=s,c=a)}}function te(t,e,n,o,i){const r=e.x-t.x,s=e.y-t.y,a=o.min,l=o.max;let c,h;return 8&n?(c=t.x+r*(l.y-t.y)/s,h=l.y):4&n?(c=t.x+r*(a.y-t.y)/s,h=a.y):2&n?(c=l.x,h=t.y+s*(l.x-t.x)/r):1&n&&(c=a.x,h=t.y+s*(a.x-t.x)/r),new P(c,h,i)}function ee(t,e){let n=0;return t.xe.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function ne(t,e){const n=e.x-t.x,o=e.y-t.y;return n*n+o*o}function oe(t,e,n,o){let i,r=e.x,s=e.y,a=n.x-r,l=n.y-s;const c=a*a+l*l;return c>0&&(i=((t.x-r)*a+(t.y-s)*l)/c,i>1?(r=n.x,s=n.y):i>0&&(r+=a*i,s+=l*i)),a=t.x-r,l=t.y-s,o?a*a+l*l:new P(r,s)}function ie(t){return!Array.isArray(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function re(t,e){let n,o,i,r,s,a,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");ie(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);let h=new z([0,0]);const d=new E(t);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(h=Vt(t));const u=t.length,p=[];for(n=0;no){l=(r-o)/i,c=[a.x-l*(a.x-s.x),a.y-l*(a.y-s.y)];break}const m=e.unproject(new P(c));return new z([m.lat+h.lat,m.lng+h.lng])}var se={__proto__:null,_getBitCode:ee,_getEdgeIntersection:te,_sqClosestPointOnSegment:oe,clipSegment:Qt,closestPointOnSegment:function(t,e,n){return oe(t,e,n)},isFlat:ie,pointToSegmentDistance:Jt,polylineCenter:re,simplify:Gt};const ae={project:t=>(t=new z(t),new P(t.lng,t.lat)),unproject:t=>(t=new P(t),new z(t.y,t.x)),bounds:new T([-180,-90],[180,90])},le={R:6378137,R_MINOR:6356752.314245179,bounds:new T([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project(t){t=new z(t);const e=Math.PI/180,n=this.R,o=this.R_MINOR/n,i=Math.sqrt(1-o*o);let r=t.lat*e;const s=i*Math.sin(r),a=Math.tan(Math.PI/4-r/2)/((1-s)/(1+s))**(i/2);return r=-n*Math.log(Math.max(a,1e-10)),new P(t.lng*e*n,r)},unproject(t){t=new P(t);const e=180/Math.PI,n=this.R,o=this.R_MINOR/n,i=Math.sqrt(1-o*o),r=Math.exp(-t.y/n);let s=Math.PI/2-2*Math.atan(r);for(let t,e=0,n=.1;e<15&&Math.abs(n)>1e-7;e++)t=i*Math.sin(s),t=((1-t)/(1+t))**(i/2),n=Math.PI/2-2*Math.atan(r*t)-s,s+=n;return new z(s*e,t.x*e/n)}};var ce={__proto__:null,LonLat:ae,Mercator:le,SphericalMercator:S};class he extends A{static code="EPSG:3395";static projection=le;static transformation=(()=>{const t=.5/(Math.PI*le.R);return new O(t,.5,-t,.5)})()}class de extends A{static code="EPSG:4326";static projection=ae;static transformation=new O(1/180,1,-1/180,.5)}class ue extends C{static projection=ae;static transformation=new O(1,0,-1,0);static scale(t){return 2**t}static zoom(t){return Math.log(t)/Math.LN2}static distance(t,e){const n=e.lng-t.lng,o=e.lat-t.lat;return Math.sqrt(n*n+o*o)}static infinite=!0}C.Earth=A,C.EPSG3395=he,C.EPSG3857=I,C.EPSG900913=class extends I{static code="EPSG:900913"},C.EPSG4326=de,C.Simple=ue;class pe extends k{static{this.setDefaultOptions({pane:"overlayPane",attribution:null,bubblingPointerEvents:!0})}addTo(t){return t.addLayer(this),this}remove(){return this.removeFrom(this._map||this._mapToAdd)}removeFrom(t){return t?.removeLayer(this),this}getPane(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)}addInteractiveTarget(t){return this._map._targets[u(t)]=this,this}removeInteractiveTarget(t){return delete this._map._targets[u(t)],this}getAttribution(){return this.options.attribution}_layerAdd(t){const e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){const t=this.getEvents();e.on(t,this),this.once("remove",()=>e.off(t,this))}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}}Rt.include({addLayer(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");const e=u(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer(t){const e=u(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer(t){return u(t)in this._layers},eachLayer(t,e){for(const n of Object.values(this._layers))t.call(e,n);return this},_addLayers(t){t=t?Array.isArray(t)?t:[t]:[];for(const e of t)this.addLayer(e)},_addZoomLimit(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[u(t)]=t,this._updateZoomLevels())},_removeZoomLimit(t){const e=u(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels(){let t=1/0,e=-1/0;const n=this._getZoomSpan();for(const n of Object.values(this._zoomBoundLayers)){const o=n.options;t=Math.min(t,o.minZoom??1/0),e=Math.max(e,o.maxZoom??-1/0)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()this._map.latLngToLayerPoint(t));o.forEach(t=>n.extend(t)),e.push(o)}else t.forEach(t=>this._projectLatlngs(t,e,n))}_clipPoints(){const t=this._renderer._bounds;if(this._parts=[],!this._pxBounds||!this._pxBounds.intersects(t))return;if(this.options.noClip)return void(this._parts=this._rings);const e=this._parts;let n,o,i,r,s,a,l;for(n=0,i=0,r=this._rings.length;n=2&&e[0]instanceof z&&e[0].equals(e[n-1])&&e.pop(),e}_setLatLngs(t){Le.prototype._setLatLngs.call(this,t),ie(this._latlngs)&&(this._latlngs=[this._latlngs])}_defaultShape(){return ie(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]}_clipPoints(){let t=this._renderer._bounds;const e=this.options.weight,n=new P(e,e);if(t=new T(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(const e of this._rings){const n=qt(e,t,!0);n.length&&this._parts.push(n)}}_updatePath(){this._renderer._updatePoly(this,!0)}_containsPoint(t){let e,n,o,i,r,s,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,a=this._parts.length;it.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(c=!c);return c||Le.prototype._containsPoint.call(this,t,!0)}}class Pe extends fe{initialize(t,e){y(this,e),this._layers={},t&&this.addData(t)}addData(t){const e=Array.isArray(t)?t:t.features;if(e){for(const t of e)(t.geometries||t.geometry||t.features||t.coordinates)&&this.addData(t);return this}const n=this.options;if(n.filter&&!n.filter(t))return this;const o=Te(t,n);return o?(o.feature=Oe(t),o.defaultOptions=o.options,this.resetStyle(o),n.onEachFeature&&n.onEachFeature(t,o),this.addLayer(o)):this}resetStyle(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=Object.create(t.defaultOptions),this._setLayerStyle(t,this.options.style),this)}setStyle(t){return this.eachLayer(e=>this._setLayerStyle(e,t))}_setLayerStyle(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}}function Te(t,e){const n="Feature"===t.type?t.geometry:t,o=n?.coordinates,i=[],r=e?.pointToLayer,s=e?.coordsToLatLng??ze;let a,l;if(!o&&!n)return null;switch(n.type){case"Point":return a=s(o),Ee(r,t,a,e);case"MultiPoint":for(const n of o)a=s(n),i.push(Ee(r,t,a,e));return new fe(i);case"LineString":case"MultiLineString":return l=Ce(o,"LineString"===n.type?0:1,s),new Le(l,e);case"Polygon":case"MultiPolygon":return l=Ce(o,"Polygon"===n.type?1:2,s),new ke(l,e);case"GeometryCollection":for(const o of n.geometries){const n=Te({geometry:o,type:"Feature",properties:t.properties},e);n&&i.push(n)}return new fe(i);case"FeatureCollection":for(const t of n.features){const n=Te(t,e);n&&i.push(n)}return new fe(i);default:throw new Error("Invalid GeoJSON object.")}}function Ee(t,e,n,o){return t?t(e,n):new be(n,o?.markersInheritOptions&&o)}function ze(t){return new z(t[1],t[0],t[2])}function Ce(t,e,n){return t.map(t=>e?Ce(t,e-1,n):(n||ze)(t))}function Ae(t,e){return void 0!==(t=new z(t)).alt?[g(t.lng,e),g(t.lat,e),g(t.alt,e)]:[g(t.lng,e),g(t.lat,e)]}function Me(t,e,n,o){const i=t.map(t=>e?Me(t,ie(t)?0:e-1,n,o):Ae(t,o));return!e&&n&&i.length>0&&i.push(i[0].slice()),i}function Se(t,e){return t.feature?{...t.feature,geometry:e}:Oe(e)}function Oe(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}const Ie={toGeoJSON(t){return Se(this,{type:"Point",coordinates:Ae(this.getLatLng(),t)})}};be.include(Ie),we.include(Ie),xe.include(Ie),Le.include({toGeoJSON(t){const e=!ie(this._latlngs);return Se(this,{type:(e?"Multi":"")+"LineString",coordinates:Me(this._latlngs,e?1:0,!1,t)})}}),ke.include({toGeoJSON(t){const e=!ie(this._latlngs),n=e&&!ie(this._latlngs[0]);let o=Me(this._latlngs,n?2:e?1:0,!0,t);return e||(o=[o]),Se(this,{type:(n?"Multi":"")+"Polygon",coordinates:o})}}),me.include({toMultiPoint(t){const e=[];return this.eachLayer(n=>{e.push(n.toGeoJSON(t).geometry.coordinates)}),Se(this,{type:"MultiPoint",coordinates:e})},toGeoJSON(t){const e=this.feature?.geometry?.type;if("MultiPoint"===e)return this.toMultiPoint(t);const n="GeometryCollection"===e,o=[];return this.eachLayer(e=>{if(e.toGeoJSON){const i=e.toGeoJSON(t);if(n)o.push(i.geometry);else{const t=Oe(i);"FeatureCollection"===t.type?o.push.apply(o,t.features):o.push(t)}}}),n?Se(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});class Ze extends pe{static{this.setDefaultOptions({padding:.1,continuous:!1})}initialize(t){y(this,t)}onAdd(){this._container||(this._initContainer(),this._container.classList.add("leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._resizeContainer(),this._onMoveEnd()}onRemove(){this._destroyContainer()}getEvents(){const t={viewreset:this._reset,zoom:this._onZoom,moveend:this._onMoveEnd,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),this.options.continuous&&(t.move=this._onMoveEnd),t}_onAnimZoom(t){this._updateTransform(t.center,t.zoom)}_onZoom(){this._updateTransform(this._map.getCenter(),this._map.getZoom())}_updateTransform(t,e){const n=this._map.getZoomScale(e,this._zoom),o=this._map.getSize().multiplyBy(.5+this.options.padding),i=this._map.project(this._center,e),r=o.multiplyBy(-n).add(i).subtract(this._map._getNewPixelOrigin(t,e));$(this._container,r,n)}_onMoveEnd(t){const e=this.options.padding,n=this._map.getSize(),o=this._map.containerPointToLayerPoint(n.multiplyBy(-e)).round();this._bounds=new T(o,o.add(n.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._updateTransform(this._center,this._zoom),this._onSettled(t),this._resizeContainer()}_reset(){this._onSettled(),this._updateTransform(this._center,this._zoom),this._onViewReset()}_initContainer(){this._container=W("div")}_destroyContainer(){bt(this._container),this._container.remove(),delete this._container}_resizeContainer(){const t=this.options.padding,e=this._map.getSize().multiplyBy(1+2*t).round();return this._container.style.width=`${e.x}px`,this._container.style.height=`${e.y}px`,e}_onZoomEnd(){}_onViewReset(){}_onSettled(){}}class Re extends pe{static{this.setDefaultOptions({opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:"",decoding:"auto"})}initialize(t,e,n){this._url=t,this._bounds=new E(e),y(this,n)}onAdd(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(this._image.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()}onRemove(){this._image.remove(),this.options.interactive&&this.removeInteractiveTarget(this._image)}setOpacity(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this}setStyle(t){return t.opacity&&this.setOpacity(t.opacity),this}bringToFront(){return this._map&&U(this._image),this}bringToBack(){return this._map&&q(this._image),this}setUrl(t){return this._url=t,this._image&&(this._image.src=t),this}setBounds(t){return this._bounds=new E(t),this._map&&this._reset(),this}getEvents(){const t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}getBounds(){return this._bounds}getElement(){return this._image}_initImage(){const t="IMG"===this._url.tagName,e=this._image=t?this._url:W("img");e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(..._(this.options.className)),e.onselectstart=f,e.onpointermove=f,e.onload=this.fire.bind(this,"load"),e.onerror=this._overlayOnError.bind(this),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),e.decoding=this.options.decoding,this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)}_animateZoom(t){const e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;$(this._image,n,e)}_reset(){const t=this._image,e=new T(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();K(t,e.min),t.style.width=`${n.x}px`,t.style.height=`${n.y}px`}_updateOpacity(){this._image.style.opacity=this.options.opacity}_updateZIndex(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)}_overlayOnError(){this.fire("error");const t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}getCenter(){return this._bounds.getCenter()}}class Be extends Re{static{this.setDefaultOptions({autoplay:!0,controls:!1,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0})}_initImage(){const t="VIDEO"===this._url.tagName,e=this._image=t?this._url:W("video");if(e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(..._(this.options.className)),_t(e,"pointerdown",t=>{e.controls&&kt(t)}),e.onloadeddata=this.fire.bind(this,"load"),t){const t=e.getElementsByTagName("source"),n=t.map(t=>t.src);return void(this._url=t.length>0?n:[e.src])}Array.isArray(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.hasOwn(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.controls=!!this.options.controls,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(const t of this._url){const n=W("source");n.src=t,e.appendChild(n)}}}class Ne extends pe{static{this.setDefaultOptions({interactive:!1,offset:[0,0],className:"",pane:void 0,content:""})}initialize(t,e){t instanceof z||Array.isArray(t)?(this._latlng=new z(t),y(this,e)):(y(this,t),this._source=e),this.options.content&&(this._content=this.options.content)}openOn(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this}close(){return this._map?.removeLayer(this),this}toggle(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this}onAdd(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&(this._container.style.opacity=0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&(this._container.style.opacity=1),this.bringToFront(),this.options.interactive&&(this._container.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._container))}onRemove(t){t._fadeAnimated?(this._container.style.opacity=0,this._removeTimeout=setTimeout(()=>this._container.remove(),200)):this._container.remove(),this.options.interactive&&(this._container.classList.remove("leaflet-interactive"),this.removeInteractiveTarget(this._container))}getLatLng(){return this._latlng}setLatLng(t){return this._latlng=new z(t),this._map&&(this._updatePosition(),this._adjustPan()),this}getContent(){return this._content}setContent(t){return this._content=t,this.update(),this}getElement(){return this._container}update(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())}getEvents(){const t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}isOpen(){return!!this._map&&this._map.hasLayer(this)}bringToFront(){return this._map&&U(this._container),this}bringToBack(){return this._map&&q(this._container),this}_prepareOpen(t){let e=this._source;if(!e._map)return!1;if(e instanceof fe){e=null;for(const t of Object.values(this._source._layers))if(t._map){e=t;break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0}_updateContent(){if(!this._content)return;const t=this._contentNode,e="function"==typeof this._content?this._content(this._source??this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}_updatePosition(){if(!this._map)return;const t=this._map.latLngToLayerPoint(this._latlng),e=this._getAnchor();let n=new P(this.options.offset);this._zoomAnimated?K(this._container,t.add(e)):n=n.add(t).add(e);const o=this._containerBottom=-n.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+n.x;this._container.style.bottom=`${o}px`,this._container.style.left=`${i}px`}_getAnchor(){return[0,0]}}Rt.include({_initOverlay(t,e,n,o){let i=e;return i instanceof t||(i=new t(o).setContent(e)),n&&i.setLatLng(n),i}}),pe.include({_initOverlay(t,e,n,o){let i=n;return i instanceof t?(y(i,o),i._source=this):(i=e&&!o?e:new t(o,this),i.setContent(n)),i}});class je extends Ne{static{this.setDefaultOptions({pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,closeButtonLabel:"Close popup",autoClose:!0,closeOnEscapeKey:!0,className:"",trackResize:!0})}openOn(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ne.prototype.openOn.call(this,t)}onAdd(t){Ne.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ve||this._source.on("preclick",kt))}onRemove(t){Ne.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ve||this._source.off("preclick",kt))}getEvents(){const t=Ne.prototype.getEvents.call(this);return(this.options.closeOnClick??this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t}_initLayout(){const t="leaflet-popup",e=this._container=W("div",`${t} ${this.options.className||""} leaflet-zoom-animated`),n=this._wrapper=W("div",`${t}-content-wrapper`,e);if(this._contentNode=W("div",`${t}-content`,n),Tt(e),Pt(this._contentNode),_t(e,"contextmenu",kt),this._tipContainer=W("div",`${t}-tip-container`,e),this._tip=W("div",`${t}-tip`,this._tipContainer),this.options.closeButton){const n=this._closeButton=W("a",`${t}-close-button`,e);n.setAttribute("role","button"),n.setAttribute("aria-label",this.options.closeButtonLabel),n.href="#close",n.innerHTML='× ',_t(n,"click",t=>{Et(t),this.close()})}this.options.trackResize&&(this._resizeObserver=new ResizeObserver(t=>{this._map&&(this._containerWidth=t[0]?.contentRect?.width,this._containerHeight=t[0]?.contentRect?.height,this._updateLayout(),this._updatePosition(),this._adjustPan())}),this._resizeObserver.observe(this._contentNode))}_updateLayout(){const t=this._contentNode,e=t.style;e.maxWidth=`${this.options.maxWidth}px`,e.minWidth=`${this.options.minWidth}px`;const n=this._containerHeight??t.offsetHeight,o=this.options.maxHeight,i="leaflet-popup-scrolled";o&&n>o?(e.height=`${o}px`,t.classList.add(i)):t.classList.remove(i),this._containerWidth=this._container.offsetWidth,this._containerHeight=this._container.offsetHeight}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();K(this._container,e.add(n))}_adjustPan(){if(!this.options.autoPan)return;if(this._map._panAnim?.stop(),this._autopanning)return void(this._autopanning=!1);const t=this._map,e=parseInt(getComputedStyle(this._container).marginBottom,10)||0,n=this._containerHeight+e,o=this._containerWidth,i=new P(this._containerLeft,-n-this._containerBottom);i._add(G(this._container));const r=t.layerPointToContainerPoint(i),s=new P(this.options.autoPanPadding),a=new P(this.options.autoPanPaddingTopLeft??s),l=new P(this.options.autoPanPaddingBottomRight??s),c=t.getSize();let h=0,d=0;r.x+o+l.x>c.x&&(h=r.x+o-c.x+l.x),r.x-h-a.x<0&&(h=r.x-a.x),r.y+n+l.y>c.y&&(d=r.y+n-c.y+l.y),r.y-d-a.y<0&&(d=r.y-a.y),(h||d)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([h,d]))}_getAnchor(){return new P(this._source?._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}Rt.mergeOptions({closePopupOnClick:!0}),Rt.include({openPopup(t,e,n){return this._initOverlay(je,t,e,n).openOn(this),this},closePopup(t){return t=arguments.length?t:this._popup,t?.close(),this}}),pe.include({bindPopup(t,e){return this._popup=this._initOverlay(je,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup(){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(t){return this._popup&&(this instanceof fe||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup(){return this._popup?.close(),this},togglePopup(){return this._popup?.toggle(this),this},isPopupOpen(){return this._popup?.isOpen()??!1},setPopupContent(t){return this._popup?.setContent(t),this},getPopup(){return this._popup},_openPopup(t){if(!this._popup||!this._map)return;zt(t);const e=t.propagatedFrom??t.target;this._popup._source!==e||e instanceof ve?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)},_movePopup(t){this._popup.setLatLng(t.latlng)},_onKeyPress(t){"Enter"===t.originalEvent.code&&this._openPopup(t)}});class De extends Ne{static{this.setDefaultOptions({pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9})}onAdd(t){Ne.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))}onRemove(t){Ne.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))}getEvents(){const t=Ne.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t}_initLayout(){const t=`leaflet-tooltip ${this.options.className||""} leaflet-zoom-${this._zoomAnimated?"animated":"hide"}`;this._contentNode=this._container=W("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id",`leaflet-tooltip-${u(this)}`)}_updateLayout(){}_adjustPan(){}_setPosition(t){let e,n,o=this.options.direction;const i=this._map,r=this._container,s=i.latLngToContainerPoint(i.getCenter()),a=i.layerPointToContainerPoint(t),l=r.offsetWidth,c=r.offsetHeight,h=new P(this.options.offset),d=this._getAnchor();"top"===o?(e=l/2,n=c):"bottom"===o?(e=l/2,n=0):"center"===o?(e=l/2,n=c/2):"right"===o?(e=0,n=c/2):"left"===o?(e=l,n=c/2):a.xthis._addFocusListeners(t)),this._tooltip.options.sticky&&(n.pointermove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t},openTooltip(t){return this._tooltip&&(this instanceof fe||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip(){if(this._tooltip)return this._tooltip.close()},toggleTooltip(){return this._tooltip?.toggle(this),this},isTooltipOpen(){return this._tooltip.isOpen()},setTooltipContent(t){return this._tooltip?.setContent(t),this},getTooltip(){return this._tooltip},_addFocusListeners(t){this.getElement?this._addFocusListenersOnLayer(this,t):this.eachLayer&&this.eachLayer(e=>this._addFocusListenersOnLayer(e,t),this)},_addFocusListenersOnLayer(t,e){const n="function"==typeof t.getElement&&t.getElement();if(n){const o=e?"off":"on";e||(n._leaflet_focus_handler&&bt(n,"focus",n._leaflet_focus_handler,this),n._leaflet_focus_handler=()=>{this._tooltip&&(this._tooltip._source=t,this.openTooltip())}),n._leaflet_focus_handler&&It[o](n,"focus",n._leaflet_focus_handler,this),It[o](n,"blur",this.closeTooltip,this),e&&delete n._leaflet_focus_handler}},_setAriaDescribedByOnLayer(t){const e="function"==typeof t.getElement&&t.getElement();e?.setAttribute?.("aria-describedby",this._tooltip._container.id)},_openTooltip(t){this._tooltip&&this._map&&(this._map.dragging?.moving()?"add"!==t.type||this._moveEndOpensTooltip||(this._moveEndOpensTooltip=!0,this._map.once("moveend",()=>{this._moveEndOpensTooltip=!1,this._openTooltip(t)})):(this._tooltip._source=t.propagatedFrom??t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)))},_moveTooltip(t){let e,n,o=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.pointerEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),o=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(o)}});class Fe extends ge{static{this.setDefaultOptions({iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"})}createIcon(t){const e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(e.replaceChildren(),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){const t=new P(n.bgPos);e.style.backgroundPosition=`${-t.x}px ${-t.y}px`}return this._setIconStyles(e,"icon"),e}createShadow(){return null}}ge.Default=_e;class He extends pe{static{this.setDefaultOptions({tileSize:256,opacity:1,updateWhenIdle:F.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2})}initialize(t){y(this,t)}onAdd(){this._initContainer(),this._levels={},this._tiles={},this._resetView()}beforeAdd(t){t._addZoomLimit(this)}onRemove(t){this._removeAllTiles(),this._container.remove(),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0,clearTimeout(this._pruneTimeout)}bringToFront(){return this._map&&(U(this._container),this._setAutoZIndex(Math.max)),this}bringToBack(){return this._map&&(q(this._container),this._setAutoZIndex(Math.min)),this}getContainer(){return this._container}setOpacity(t){return this.options.opacity=t,this._updateOpacity(),this}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}isLoading(){return this._loading}redraw(){if(this._map){this._removeAllTiles();const t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this}getEvents(){const t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=p(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}createTile(){return document.createElement("div")}getTileSize(){const t=this.options.tileSize;return t instanceof P?t:new P(t,t)}_updateZIndex(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)}_setAutoZIndex(t){const e=this.getPane().children;let n=-t(-1/0,1/0);for(const o of e){const e=o.style.zIndex;o!==this._container&&e&&(n=t(n,+e))}isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())}_updateOpacity(){if(!this._map)return;this._container.style.opacity=this.options.opacity;const t=+new Date;let e=!1,n=!1;for(const o of Object.values(this._tiles??{})){if(!o.current||!o.loaded)continue;const i=Math.min(1,(t-o.loaded)/200);o.el.style.opacity=i,i<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}n&&!this._noPrune&&this._pruneTiles(),e&&(cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this)))}_onOpaqueTile(){}_initContainer(){this._container||(this._container=W("div",`leaflet-layer ${this.options.className??""}`),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))}_updateLevels(){const t=this._tileZoom,e=this.options.maxZoom;if(void 0===t)return;for(let n of Object.keys(this._levels))n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(this._levels[n].el.remove(),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);let n=this._levels[t];const o=this._map;return n||(n=this._levels[t]={},n.el=W("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}_onUpdateLevel(){}_onRemoveLevel(){}_onCreateLevel(){}_pruneTiles(){if(!this._map)return;const t=this._map.getZoom();if(t>this.options.maxZoom||to&&this._retainParent(i,r,s,o))}_retainChildren(t,e,n,o){for(let i=2*t;i<2*t+2;i++)for(let t=2*e;t<2*e+2;t++){const e=new P(i,t);e.z=n+1;const r=this._tileCoordsToKey(e),s=this._tiles[r];s?.active?s.retain=!0:(s?.loaded&&(s.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&i1)this._setView(t,n);else{for(let t=i.min.y;t<=i.max.y;t++)for(let e=i.min.x;e<=i.max.x;e++){const n=new P(e,t);if(n.z=this._tileZoom,!this._isValidTile(n))continue;const o=this._tiles[this._tileCoordsToKey(n)];o?o.current=!0:s.push(n)}if(s.sort((t,e)=>t.distanceTo(r)-e.distanceTo(r)),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));const t=document.createDocumentFragment();for(const e of s)this._addTile(e,t);this._level.el.appendChild(t)}}}_isValidTile(t){const e=this._map.options.crs;if(!e.infinite){const n=this._globalTileRange;if(!e.wrapLng&&(t.xn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;const n=this._tileCoordsToBounds(t);return new E(this.options.bounds).overlaps(n)}_keyToBounds(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))}_tileCoordsToNwSe(t){const e=this._map,n=this.getTileSize(),o=t.scaleBy(n),i=o.add(n);return[e.unproject(o,t.z),e.unproject(i,t.z)]}_tileCoordsToBounds(t){const e=this._tileCoordsToNwSe(t);let n=new E(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n}_tileCoordsToKey(t){return`${t.x}:${t.y}:${t.z}`}_keyToTileCoords(t){const e=t.split(":"),n=new P(+e[0],+e[1]);return n.z=+e[2],n}_removeTile(t){const e=this._tiles[t];e&&(e.el.remove(),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))}_initTile(t){t.classList.add("leaflet-tile");const e=this.getTileSize();t.style.width=`${e.x}px`,t.style.height=`${e.y}px`,t.onselectstart=f,t.onpointermove=f}_addTile(t,e){const n=this._getTilePos(t),o=this._tileCoordsToKey(t),i=this.createTile(this._wrapCoords(t),this._tileReady.bind(this,t));this._initTile(i),this.createTile.length<2&&requestAnimationFrame(this._tileReady.bind(this,t,null,i)),K(i,n),this._tiles[o]={el:i,coords:t,current:!0},e.appendChild(i),this.fire("tileloadstart",{tile:i,coords:t})}_tileReady(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});const o=this._tileCoordsToKey(t);(n=this._tiles[o])&&(n.loaded=+new Date,this._map._fadeAnimated?(n.el.style.opacity=0,cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this))):(n.active=!0,this._pruneTiles()),e||(n.el.classList.add("leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),this._map._fadeAnimated?this._pruneTimeout=setTimeout(this._pruneTiles.bind(this),250):requestAnimationFrame(this._pruneTiles.bind(this))))}_getTilePos(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)}_wrapCoords(t){const e=new P(this._wrapX?m(t.x,this._wrapX):t.x,this._wrapY?m(t.y,this._wrapY):t.y);return e.z=t.z,e}_pxBoundsToTileRange(t){const e=this.getTileSize();return new T(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))}_noTilesToLoad(){return Object.values(this._tiles).every(t=>t.loaded)}}class We extends He{static{this.setDefaultOptions({minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1})}initialize(t,e){if(this._url=t,null===(e=y(this,e)).attribution&&URL.canParse(t)){const n=new URL(t).hostname;["tile.openstreetmap.org","tile.osm.org"].some(t=>n.endsWith(t))&&(e.attribution='© OpenStreetMap contributors')}e.detectRetina&&F.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)}setUrl(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this}createTile(t,e){const n=document.createElement("img");return _t(n,"load",this._tileOnLoad.bind(this,e,n)),_t(n,"error",this._tileOnError.bind(this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n}getTileUrl(t){const e=Object.create(this.options);if(Object.assign(e,{r:F.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()}),this._map&&!this._map.options.crs.infinite){const n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return v(this._url,e)}_tileOnLoad(t,e){t(null,e)}_tileOnError(t,e,n){const o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(n,e)}_onTileRemove(t){t.tile.onload=null}_getZoomForUrl(){let t=this._tileZoom;const e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset}_getSubdomain(t){const e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]}_abortLoading(){let t,e;for(t of Object.keys(this._tiles))if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=f,e.onerror=f,!e.complete)){e.src=x;const n=this._tiles[t].coords;e.remove(),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}}_removeTile(t){const e=this._tiles[t];if(e)return e.el.setAttribute("src",x),He.prototype._removeTile.call(this,t)}_tileReady(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==x))return He.prototype._tileReady.call(this,t,e,n)}_clampZoom(t){return Math.round(He.prototype._clampZoom.call(this,t))}}class Ue extends We{static{this.prototype.defaultWmsParams={service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},this.setDefaultOptions({crs:null,uppercase:!1})}initialize(t,e){this._url=t;const n={...this.defaultWmsParams};for(const t of Object.keys(e))t in this.options||(n[t]=e[t]);const o=(e=y(this,e)).detectRetina&&F.retina?2:1,i=this.getTileSize();n.width=i.x*o,n.height=i.y*o,this.wmsParams=n}onAdd(t){this._crs=this.options.crs??t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);const e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,We.prototype.onAdd.call(this,t)}getTileUrl(t){const e=this._tileCoordsToNwSe(t),n=this._crs,o=new T(n.project(e[0]),n.project(e[1])),i=o.min,r=o.max,s=(this._wmsVersion>=1.3&&this._crs===de?[i.y,i.x,r.y,r.x]:[i.x,i.y,r.x,r.y]).join(","),a=new URL(We.prototype.getTileUrl.call(this,t));for(const[t,e]of Object.entries({...this.wmsParams,bbox:s}))a.searchParams.append(this.options.uppercase?t.toUpperCase():t,e);return a.toString()}setParams(t,e){return Object.assign(this.wmsParams,t),e||this.redraw(),this}}We.WMS=Ue;class qe extends Ze{initialize(t){y(this,{...t,continuous:!1}),u(this),this._layers??={}}onAdd(t){super.onAdd(t),this.on("update",this._updatePaths,this)}onRemove(){super.onRemove(),this.off("update",this._updatePaths,this)}_onZoomEnd(){for(const t of Object.values(this._layers))t._project()}_updatePaths(){for(const t of Object.values(this._layers))t._update()}_onViewReset(){for(const t of Object.values(this._layers))t._reset()}_onSettled(){this._update()}_update(){}}class $e extends qe{static{this.setDefaultOptions({tolerance:0})}getEvents(){const t=qe.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t}_onViewPreReset(){this._postponeUpdatePaths=!0}onAdd(t){qe.prototype.onAdd.call(this,t),this._draw()}onRemove(){qe.prototype.onRemove.call(this),clearTimeout(this._pointerHoverThrottleTimeout)}_initContainer(){const t=this._container=document.createElement("canvas");_t(t,"pointermove",this._onPointerMove,this),_t(t,"click dblclick pointerdown pointerup contextmenu",this._onClick,this),_t(t,"pointerout",this._handlePointerOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")}_destroyContainer(){cancelAnimationFrame(this._redrawRequest),this._redrawRequest=null,delete this._ctx,qe.prototype._destroyContainer.call(this)}_resizeContainer(){const t=qe.prototype._resizeContainer.call(this),e=this._ctxScale=window.devicePixelRatio;this._container.width=e*t.x,this._container.height=e*t.y}_updatePaths(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(const t of Object.values(this._layers))t._update();this._redraw()}}_update(){if(this._map._animatingZoom&&this._bounds)return;const t=this._bounds,e=this._ctxScale;this._ctx.setTransform(e,0,0,e,-t.min.x*e,-t.min.y*e),this.fire("update")}_reset(){qe.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())}_initPath(t){this._updateDashArray(t),this._layers[u(t)]=t;const e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst??=this._drawLast}_addPath(t){this._requestRedraw(t)}_removePath(t){const e=t._order,n=e.next,o=e.prev;n?n.prev=o:this._drawLast=o,o?o.next=n:this._drawFirst=n,delete t._order,delete this._layers[u(t)],this._requestRedraw(t)}_updatePath(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)}_updateStyle(t){this._updateDashArray(t),this._requestRedraw(t)}_updateDashArray(t){if("string"==typeof t.options.dashArray){const e=t.options.dashArray.split(/[, ]+/);t.options._dashArray=e.map(t=>Number(t)).filter(t=>!isNaN(t))}else t.options._dashArray=t.options.dashArray}_requestRedraw(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest??=requestAnimationFrame(this._redraw.bind(this)))}_extendRedrawBounds(t){if(t._pxBounds){const e=(t.options.weight??0)+1;this._redrawBounds??=new T,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}}_redraw(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null}_clear(){const t=this._redrawBounds;if(t){const e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()}_draw(){let t;const e=this._redrawBounds;if(this._ctx.save(),e){const t=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,t.x,t.y),this._ctx.clip()}this._drawing=!0;for(let n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()}_updatePoly(t,e){if(!this._drawing)return;const n=t._parts,o=this._ctx;n.length&&(o.beginPath(),n.forEach(t=>{t.forEach((t,e)=>{o[e?"lineTo":"moveTo"](t.x,t.y)}),e&&o.closePath()}),this._fillStroke(o,t))}_updateCircle(t){if(!this._drawing||t._empty())return;const e=t._point,n=this._ctx,o=Math.max(Math.round(t._radius),1),i=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==i&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(e.x,e.y/i,o,0,2*Math.PI,!1),1!==i&&n.restore(),this._fillStroke(n,t)}_fillStroke(t,e){const n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor??n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&(t.lineDashOffset=Number(n.dashOffset??0),t.setLineDash(n._dashArray??[])),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())}_onClick(t){const e=this._map.pointerEventToLayerPoint(t);let n,o;for(let i=this._drawFirst;i;i=i.next)n=i.layer,n.options.interactive&&n._containsPoint(e)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(n))&&(o=n);this._fireEvent(!!o&&[o],t)}_onPointerMove(t){if(!this._map||this._map.dragging.moving()||this._map._animatingZoom)return;const e=this._map.pointerEventToLayerPoint(t);this._handlePointerHover(t,e)}_handlePointerOut(t){const e=this._hoveredLayer;e&&(this._container.classList.remove("leaflet-interactive"),this._fireEvent([e],t,"pointerout"),this._hoveredLayer=null,this._pointerHoverThrottled=!1)}_handlePointerHover(t,e){if(this._pointerHoverThrottled)return;let n,o;for(let t=this._drawFirst;t;t=t.next)n=t.layer,n.options.interactive&&n._containsPoint(e)&&(o=n);o!==this._hoveredLayer&&(this._handlePointerOut(t),o&&(this._container.classList.add("leaflet-interactive"),this._fireEvent([o],t,"pointerover"),this._hoveredLayer=o)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._pointerHoverThrottled=!0,this._pointerHoverThrottleTimeout=setTimeout(()=>{this._pointerHoverThrottled=!1},32)}_fireEvent(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)}_bringToFront(t){const e=t._order;if(!e)return;const n=e.next,o=e.prev;n&&(n.prev=o,o?o.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}_bringToBack(t){const e=t._order;if(!e)return;const n=e.next,o=e.prev;o&&(o.next=n,n?n.prev=o:o&&(this._drawLast=o),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}function Ve(t,e){return t.flatMap(t=>[...t.map((t,e)=>`${(e?"L":"M")+t.x} ${t.y}`),e?"z":""]).join("")||"M0 0"}const Ke=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)};class Ge extends qe{_initContainer(){this._container=Ke("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ke("g"),this._container.appendChild(this._rootGroup)}_destroyContainer(){qe.prototype._destroyContainer.call(this),delete this._rootGroup,delete this._svgSize}_resizeContainer(){const t=qe.prototype._resizeContainer.call(this);this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,this._container.setAttribute("width",t.x),this._container.setAttribute("height",t.y))}_update(){if(this._map._animatingZoom&&this._bounds)return;const t=this._bounds,e=t.getSize();this._container.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}_initPath(t){const e=t._path=Ke("path");t.options.className&&e.classList.add(..._(t.options.className)),t.options.interactive&&e.classList.add("leaflet-interactive"),this._updateStyle(t),this._layers[u(t)]=t}_addPath(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)}_removePath(t){t._path.remove(),t.removeInteractiveTarget(t._path),delete this._layers[u(t)]}_updatePath(t){t._project(),t._update()}_updateStyle(t){const e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))}_updatePoly(t,e){this._setPath(t,Ve(t._parts,e))}_updateCircle(t){const e=t._point,n=Math.max(Math.round(t._radius),1),o=`a${n},${Math.max(Math.round(t._radiusY),1)||n} 0 1,0 `,i=t._empty()?"M0 0":`M${e.x-n},${e.y}${o}${2*n},0 ${o}${2*-n},0 `;this._setPath(t,i)}_setPath(t,e){t._path.setAttribute("d",e)}_bringToFront(t){U(t._path)}_bringToBack(t){q(t._path)}}Rt.include({getRenderer(t){let e=t.options.renderer??this._getPaneRenderer(t.options.pane)??this.options.renderer??this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer(t){if("overlayPane"===t||void 0===t)return;let e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer(t){return this.options.preferCanvas&&new $e(t)||new Ge(t)}});class Je extends ke{initialize(t,e){ke.prototype.initialize.call(this,this._boundsToLatLngs(t),e)}setBounds(t){return this.setLatLngs(this._boundsToLatLngs(t))}_boundsToLatLngs(t){return[(t=new E(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}Ge.create=Ke,Ge.pointsToPath=Ve,Pe.geometryToLayer=Te,Pe.coordsToLatLng=ze,Pe.coordsToLatLngs=Ce,Pe.latLngToCoords=Ae,Pe.latLngsToCoords=Me,Pe.getFeature=Se,Pe.asFeature=Oe,Rt.mergeOptions({boxZoom:!0});class Ye extends Wt{initialize(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)}addHooks(){_t(this._container,"pointerdown",this._onPointerDown,this)}removeHooks(){bt(this._container,"pointerdown",this._onPointerDown,this)}moved(){return this._moved}_destroy(){this._pane.remove(),delete this._pane}_resetState(){this._resetStateTimeout=0,this._moved=!1}_clearDeferredResetState(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)}_onPointerDown(t){if(!t.shiftKey||0!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),et(),ot(),this._startPoint=this._map.pointerEventToContainerPoint(t),_t(document,{contextmenu:zt,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerMove(t){this._moved||(this._moved=!0,this._box=W("div","leaflet-zoom-box",this._container),this._container.classList.add("leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.pointerEventToContainerPoint(t);const e=new T(this._point,this._startPoint),n=e.getSize();K(this._box,e.min),this._box.style.width=`${n.x}px`,this._box.style.height=`${n.y}px`}_finish(){this._moved&&(this._box.remove(),this._container.classList.remove("leaflet-crosshair")),nt(),it(),bt(document,{contextmenu:zt,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerUp(t){if(0!==t.button)return;if(this._finish(),!this._moved)return;this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(this._resetState.bind(this),0);const e=new E(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}_onKeyDown(t){"Escape"===t.code&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}Rt.addInitHook("addHandler","boxZoom",Ye),Rt.mergeOptions({doubleClickZoom:!0});class Xe extends Wt{addHooks(){this._map.on("dblclick",this._onDoubleClick,this)}removeHooks(){this._map.off("dblclick",this._onDoubleClick,this)}_onDoubleClick(t){const e=this._map,n=e.getZoom(),o=e.options.zoomDelta,i=t.originalEvent.shiftKey?n-o:n+o;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}Rt.addInitHook("addHandler","doubleClickZoom",Xe),Rt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});class Qe extends Wt{addHooks(){if(!this._draggable){const t=this._map;this._draggable=new Ut(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}this._map._container.classList.add("leaflet-grab","leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]}removeHooks(){this._map._container.classList.remove("leaflet-grab","leaflet-touch-drag"),this._draggable.disable()}moved(){return this._draggable?._moved}moving(){return this._draggable?._moving}_onDragStart(){const t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){const t=new E(this._map.options.maxBounds);this._offsetLimit=new T(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])}_onDrag(t){if(this._map.options.inertia){const t=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(t),this._prunePositions(t)}this._map.fire("move",t).fire("drag",t)}_prunePositions(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()}_onZoomEnd(){const t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x}_viscousLimit(t,e){return t-(t-e)*this._viscosity}_onPreDragLimit(){if(!this._viscosity||!this._offsetLimit)return;const t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}_onPreDragWrap(){const t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,o=this._draggable._newPos.x,i=(o-e+n)%t+e-n,r=(o+e+n)%t-e-n,s=Math.abs(i+n){e.panBy(h,{duration:c,easeLinearity:i,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}}Rt.addInitHook("addHandler","dragging",Qe),Rt.mergeOptions({keyboard:!0,keyboardPanDelta:80});class tn extends Wt{static keyCodes={left:["ArrowLeft"],right:["ArrowRight"],down:["ArrowDown"],up:["ArrowUp"],zoomIn:["Equal","NumpadAdd","BracketRight"],zoomOut:["Minus","NumpadSubtract","Digit6","Slash"]};initialize(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)}addHooks(){const t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),t.ariaKeyShortcuts=Object.values(tn.keyCodes).flat().join(" "),_t(t,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)}removeHooks(){this._removeHooks(),bt(this._map._container,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)}_onPointerDown(){if(this._focused)return;const t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,o=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(o,n)}_onFocus(){this._focused=!0,this._map.fire("focus")}_onBlur(){this._focused=!1,this._map.fire("blur")}_setPanDelta(t){const e=this._panKeys={},n=tn.keyCodes;for(const o of n.left)e[o]=[-1*t,0];for(const o of n.right)e[o]=[t,0];for(const o of n.down)e[o]=[0,t];for(const o of n.up)e[o]=[0,-1*t]}_setZoomDelta(t){const e=this._zoomKeys={},n=tn.keyCodes;for(const o of n.zoomIn)e[o]=t;for(const o of n.zoomOut)e[o]=-t}_addHooks(){_t(document,"keydown",this._onKeyDown,this)}_removeHooks(){bt(document,"keydown",this._onKeyDown,this)}_onKeyDown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;const e=t.code,n=this._map;let o;if(e in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(o=this._panKeys[e],t.shiftKey&&(o=new P(o).multiplyBy(3)),n.options.maxBounds&&(o=n._limitOffset(new P(o),n.options.maxBounds)),n.options.worldCopyJump){const t=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(o)));n.panTo(t)}else n.panBy(o)}else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if("Escape"!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}zt(t)}}Rt.addInitHook("addHandler","keyboard",tn),Rt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});class en extends Wt{addHooks(){_t(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0}removeHooks(){bt(this._map._container,"wheel",this._onWheelScroll,this),clearTimeout(this._timer)}_onWheelScroll(t){const e=St(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.pointerEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);const o=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(this._performZoom.bind(this),o),zt(t)}_performZoom(){const t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap??0;t._stop();const o=this._delta/(4*this._map.options.wheelPxPerZoomLevel),i=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,r=n?Math.ceil(i/n)*n:i,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}}Rt.addInitHook("addHandler","scrollWheelZoom",en),Rt.mergeOptions({tapHold:F.safari&&F.mobile,tapTolerance:15});class nn extends Wt{addHooks(){_t(this._map._container,"pointerdown",this._onDown,this)}removeHooks(){bt(this._map._container,"pointerdown",this._onDown,this),clearTimeout(this._holdTimeout)}_onDown(t){clearTimeout(this._holdTimeout),1===gt().length&&"mouse"!==t.pointerType&&(this._startPos=this._newPos=new P(t.clientX,t.clientY),this._holdTimeout=setTimeout(()=>{this._cancel(),this._isTapValid()&&(_t(document,"pointerup",Et),_t(document,"pointerup pointercancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},600),_t(document,"pointerup pointercancel contextmenu",this._cancel,this),_t(document,"pointermove",this._onMove,this))}_cancelClickPrevent=function t(){bt(document,"pointerup",Et),bt(document,"pointerup pointercancel",t)};_cancel(){clearTimeout(this._holdTimeout),bt(document,"pointerup pointercancel contextmenu",this._cancel,this),bt(document,"pointermove",this._onMove,this)}_onMove(t){this._newPos=new P(t.clientX,t.clientY)}_isTapValid(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance}_simulateEvent(t,e){const n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}}Rt.addInitHook("addHandler","tapHold",nn),Rt.mergeOptions({pinchZoom:!0,bounceAtZoomLimits:!0});class on extends Wt{addHooks(){this._map._container.classList.add("leaflet-touch-zoom"),_t(this._map._container,"pointerdown",this._onPointerStart,this)}removeHooks(){this._map._container.classList.remove("leaflet-touch-zoom"),bt(this._map._container,"pointerdown",this._onPointerStart,this)}_onPointerStart(t){const e=this._map,n=gt();if(2!==n.length||e._animatingZoom||this._zooming)return;const o=e.pointerEventToContainerPoint(n[0]),i=e.pointerEventToContainerPoint(n[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.pinchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(o.add(i)._divideBy(2))),this._startDist=o.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),_t(document,"pointermove",this._onPointerMove,this),_t(document,"pointerup pointercancel",this._onPointerEnd,this),Et(t)}_onPointerMove(t){const e=gt();if(2!==e.length||!this._zooming)return;const n=this._map,o=n.pointerEventToContainerPoint(e[0]),i=n.pointerEventToContainerPoint(e[1]),r=o.distanceTo(i)/this._startDist;if(this._zoom=n.getScaleZoom(r,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoomn.getMaxZoom()&&r>1)&&(this._zoom=n._limitZoom(this._zoom)),"center"===n.options.pinchZoom){if(this._center=this._startLatLng,1===r)return}else{const t=o._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===t.x&&0===t.y)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(t),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),cancelAnimationFrame(this._animRequest);const s=n._move.bind(n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=requestAnimationFrame(s.bind(this)),Et(t)}_onPointerEnd(){this._moved&&this._zooming?(this._zooming=!1,cancelAnimationFrame(this._animRequest),bt(document,"pointermove",this._onPointerMove,this),bt(document,"pointerup pointercancel",this._onPointerEnd,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))):this._zooming=!1}}Rt.addInitHook("addHandler","pinchZoom",on),Rt.addInitHook(function(){this.touchZoom=this.pinchZoom,void 0!==this.options.touchZoom&&(console.warn("Map: touchZoom option is deprecated and will be removed in future versions. Use pinchZoom instead."),this.options.pinchZoom=this.options.touchZoom,delete this.options.touchZoom),this.options.pinchZoom?this.pinchZoom.enable():this.pinchZoom.disable()}),Rt.BoxZoom=Ye,Rt.DoubleClickZoom=Xe,Rt.Drag=Qe,Rt.Keyboard=tn,Rt.ScrollWheelZoom=en,Rt.TapHold=nn,Rt.PinchZoom=on,Rt.TouchZoom=on;var rn={__proto__:null,BlanketOverlay:Ze,Bounds:T,Browser:F,CRS:C,Canvas:$e,Circle:we,CircleMarker:xe,Class:L,Control:Nt,DivIcon:Fe,DivOverlay:Ne,DomEvent:It,DomUtil:ct,Draggable:Ut,Evented:k,FeatureGroup:fe,GeoJSON:Pe,GridLayer:He,Handler:Wt,Icon:ge,ImageOverlay:Re,LatLng:z,LatLngBounds:E,Layer:pe,LayerGroup:me,LeafletMap:Bt,LineUtil:se,Map:Rt,Marker:be,Path:ve,Point:P,PolyUtil:Kt,Polygon:ke,Polyline:Le,Popup:je,PosAnimation:Zt,Projection:ce,Rectangle:Je,Renderer:qe,SVG:Ge,SVGOverlay:class extends Re{_initImage(){const t=this._image=this._url;t.classList.add("leaflet-image-layer"),this._zoomAnimated&&t.classList.add("leaflet-zoom-animated"),this.options.className&&t.classList.add(..._(this.options.className)),t.onselectstart=f,t.onpointermove=f}},TileLayer:We,Tooltip:De,Transformation:O,Util:w,VideoOverlay:Be,version:"2.0.0-alpha.1"};const sn=an().L;function an(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==i.g)return i.g;throw new Error("Unable to locate global object.")}an().L=rn,an().L.noConflict=function(){return an().L=sn,this};var ln=i(72),cn=i.n(ln),hn=i(825),dn=i.n(hn),un=i(56),pn=i.n(un),mn=i(540),fn=i.n(mn),gn=i(113),_n=i.n(gn),yn=i(81),bn={};bn.styleTagTransform=_n(),bn.setAttributes=pn(),bn.insert=function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t},bn.domAPI=dn(),bn.insertStyleElement=fn(),cn()(yn.A,bn),yn.A&&yn.A.locals&&yn.A.locals;var vn=i(366),xn={};xn.styleTagTransform=_n(),xn.setAttributes=pn(),xn.insert=function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t},xn.domAPI=dn(),xn.insertStyleElement=fn(),cn()(vn.A,xn),vn.A&&vn.A.locals&&vn.A.locals;const wn=h().createContext(null),Ln=()=>h().useContext(wn),kn=h().createContext(null),Pn=()=>h().useContext(kn),Tn=h().createContext({bearing:0,setBearing:()=>{}}),En=()=>h().useContext(Tn),zn=({id:t,center:e=[51.505,-.09],zoom:n=13,minZoom:o,maxZoom:i,maxBounds:r,zoomControl:s=!0,keyboard:a=!0,dragging:l=!0,scrollWheelZoom:d=!0,doubleClickZoom:u=!0,boxZoom:p=!0,pinchZoom:m=!0,tapHold:f,bearing:g=0,preferCanvas:_=!1,attributionControl:y=!0,flyTo:b,className:v,style:x,children:w,setProps:L})=>{const k=(0,c.useRef)(null),P=(0,c.useRef)(null),[T,E]=(0,c.useState)(!1),[z,C]=(0,c.useState)(g),A=(0,c.useRef)(z);A.current=z;const M=h().useCallback(t=>{const e=(t%360+360)%360;C(e),L&&L({bearing:e})},[L]);(0,c.useEffect)(()=>{if(!T)return;const t=P.current;if(!t)return;const e=t._mapPane,n=t._container;if(!e||!n)return;const o=e.parentElement;if(o&&o.classList.contains("dl2-rotation-wrapper"))return;const i=document.createElement("div");i.className="dl2-rotation-wrapper",i.style.cssText="position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; will-change: transform;",n.insertBefore(i,e),i.appendChild(e);const r=()=>{const t=n.clientWidth,e=n.clientHeight;i.style.transformOrigin=`${t/2}px ${e/2}px`};return r(),t.on("resize",r),()=>{try{t.off("resize",r)}catch(t){}i.contains(e)&&(n.insertBefore(e,i),i.remove())}},[T]),(0,c.useEffect)(()=>{if(!T)return;const t=P.current;if(!t||!t._mapPane)return;const e=t._mapPane.parentElement;e&&e.classList.contains("dl2-rotation-wrapper")&&(e.style.transform=`rotate(${z}deg)`)},[z,T]),(0,c.useEffect)(()=>{if(!k.current||P.current)return;const t={preferCanvas:!!_,attributionControl:!1!==y,zoomControl:!1!==s,keyboard:!1!==a,dragging:!1!==l,scrollWheelZoom:!1!==d,doubleClickZoom:!1!==u,boxZoom:!1!==p,pinchZoom:!1!==m};"boolean"==typeof f&&(t.tapHold=f),"number"==typeof o&&(t.minZoom=o),"number"==typeof i&&(t.maxZoom=i),r&&(t.maxBounds=r);const c=new Rt(k.current,t).setView(e,n);P.current=c,k.current.__dl2_map=c;const h=()=>{if(!L)return;const t=c.getCenter(),e=c.getBounds();L({viewport:{center:[+t.lat.toFixed(6),+t.lng.toFixed(6)],zoom:c.getZoom(),bearing:A.current,bounds:{north:+e.getNorth().toFixed(6),south:+e.getSouth().toFixed(6),east:+e.getEast().toFixed(6),west:+e.getWest().toFixed(6)}}})};c.on("moveend zoomend",h),c.on("click",t=>L&&L({clickData:{latlng:[+t.latlng.lat.toFixed(6),+t.latlng.lng.toFixed(6)]}}));let g=0,b=0;return c.on("movestart",()=>{g+=1,L&&L({n_movestart:g})}),c.on("moveend",()=>{b+=1,L&&L({n_moveend:b})}),E(!0),h(),()=>{c.remove(),P.current=null,k.current&&delete k.current.__dl2_map}},[]);const S=(0,c.useRef)(!1);(0,c.useEffect)(()=>{P.current&&e&&"number"==typeof n&&(S.current?P.current.setView(e,n,{animate:!1}):S.current=!0)},[e,n]),(0,c.useEffect)(()=>{const t=P.current;t&&"number"==typeof o&&"function"==typeof t.setMinZoom&&t.setMinZoom(o)},[o]),(0,c.useEffect)(()=>{const t=P.current;t&&"number"==typeof i&&"function"==typeof t.setMaxZoom&&t.setMaxZoom(i)},[i]),(0,c.useEffect)(()=>{const t=P.current;t&&"function"==typeof t.setMaxBounds&&t.setMaxBounds(r||null)},[r]),(0,c.useEffect)(()=>{const t=P.current;t&&t.keyboard&&(a?t.keyboard.enable():t.keyboard.disable())},[a]);const O=(t,e)=>{const n=P.current;if(!n)return;const o=n[t];o&&"function"==typeof o.enable&&(!1===e?o.disable():o.enable())};(0,c.useEffect)(()=>O("dragging",l),[l]),(0,c.useEffect)(()=>O("scrollWheelZoom",d),[d]),(0,c.useEffect)(()=>O("doubleClickZoom",u),[u]),(0,c.useEffect)(()=>O("boxZoom",p),[p]),(0,c.useEffect)(()=>{O("pinchZoom",m),O("touchZoom",m)},[m]),(0,c.useEffect)(()=>O("tapHold",f),[f]),(0,c.useEffect)(()=>{"number"==typeof g&&g!==z&&C((g%360+360)%360)},[g]);const I=(0,c.useRef)(-1);return(0,c.useEffect)(()=>{if(!T||!b||void 0===b.n_clicks)return;if(b.n_clicks===I.current)return;I.current=b.n_clicks;const t=P.current;if(!t)return;const e=b.options||{},n=b.transition||(b.bounds?"flyToBounds":"flyTo"),o=void 0===e.animate?{...e,animate:!1}:e;try{if("setView"===n&&b.center){const e="number"==typeof b.zoom?b.zoom:t.getZoom();t.setView(b.center,e,o)}else if("flyTo"===n&&b.center){const n="number"==typeof b.zoom?b.zoom:t.getZoom();t.flyTo(b.center,n,e)}else"panTo"===n&&b.center?t.panTo(b.center,e):"fitBounds"===n&&b.bounds?t.fitBounds(b.bounds,o):"flyToBounds"===n&&b.bounds?t.flyToBounds(b.bounds,e):"panInsideBounds"===n&&b.bounds?t.panInsideBounds(b.bounds,e):console.warn("dl2.Map.flyTo: incompatible payload for transition=",n,b)}catch(t){console.warn("dl2.Map.flyTo error:",t)}},[b,T]),h().createElement("div",{id:t,ref:k,className:v,style:{height:"100%",width:"100%",...x}},h().createElement(wn.Provider,{value:T?P.current:null},h().createElement(Tn.Provider,{value:{bearing:z,setBearing:M}},T?w:null)))},Cn=({url:t="https://tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:e="© OpenStreetMap contributors",minZoom:n=0,maxZoom:o=19,maxNativeZoom:i,bounds:r,errorTileUrl:s,zIndex:a,subdomains:l,detectRetina:h=!1,tms:d=!1,opacity:u=1,crossOrigin:p})=>{const m=Ln(),f=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!m)return;const c={attribution:e,minZoom:n,maxZoom:o,opacity:u,detectRetina:h,tms:d};void 0!==i&&(c.maxNativeZoom=i),void 0!==r&&(c.bounds=r),void 0!==s&&(c.errorTileUrl=s),void 0!==a&&(c.zIndex=a),void 0!==l&&(c.subdomains=l),void 0!==p&&(c.crossOrigin=p);const g=new We(t,c);return g.addTo(m),f.current=g,()=>{g.remove(),f.current=null}},[m]),(0,c.useEffect)(()=>{f.current&&t&&f.current.setUrl(t)},[t]),(0,c.useEffect)(()=>{const t=f.current;t&&"function"==typeof t.setOpacity&&t.setOpacity(u)},[u]),(0,c.useEffect)(()=>{const t=f.current;t&&"function"==typeof t.setZIndex&&void 0!==a&&t.setZIndex(a)},[a]),null};function An(t){const e=Ln(),n=(0,c.useRef)(null),[o,i]=(0,c.useState)(null);return(0,c.useEffect)(()=>{if(!e)return;const o=t();return o.addTo(e),n.current=o,i(o),()=>{o.remove(),n.current=null,i(null)}},[e]),{layer:o,ref:n}}var Mn=i(711),Sn={};Sn.styleTagTransform=_n(),Sn.setAttributes=pn(),Sn.insert=function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t},Sn.domAPI=dn(),Sn.insertStyleElement=fn(),cn()(Mn.A,Sn),Mn.A&&Mn.A.locals&&Mn.A.locals;const On=Object.freeze({left:0,top:0,width:16,height:16}),In=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Zn=Object.freeze({...On,...In}),Rn=Object.freeze({...Zn,body:"",hidden:!1}),Bn=Object.freeze({width:null,height:null}),Nn=Object.freeze({...Bn,...In}),jn=/[\s,]+/,Dn={...Nn,preserveAspectRatio:""};function Fn(t){const e={...Dn},n=(e,n)=>t.getAttribute(e)||n;var o;return e.width=n("width",null),e.height=n("height",null),e.rotate=function(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function o(t){for(;t<0;)t+=4;return t%4}if(""===n){const e=parseInt(t);return isNaN(e)?0:o(e)}if(n!==t){let e=0;switch(n){case"%":e=25;break;case"deg":e=90}if(e){let i=parseFloat(t.slice(0,t.length-n.length));return isNaN(i)?0:(i/=e,i%1==0?o(i):0)}}return e}(n("rotate","")),o=e,n("flip","").split(jn).forEach(t=>{switch(t.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0}}),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}const Hn=/^[a-z0-9]+(-[a-z0-9]+)*$/,Wn=(t,e,n,o="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;o=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),n=i.pop(),r={provider:i.length>0?i[0]:o,prefix:n,name:t};return e&&!Un(r)?null:r}const r=i[0],s=r.split("-");if(s.length>1){const t={provider:o,prefix:s.shift(),name:s.join("-")};return e&&!Un(t)?null:t}if(n&&""===o){const t={provider:o,prefix:"",name:r};return e&&!Un(t,n)?null:t}return null},Un=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name);function qn(t,e){const n=function(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const o=((t.rotate||0)+(e.rotate||0))%4;return o&&(n.rotate=o),n}(t,e);for(const o in Rn)o in In?o in t&&!(o in n)&&(n[o]=In[o]):o in e?n[o]=e[o]:o in t&&(n[o]=t[o]);return n}function $n(t,e,n){const o=t.icons,i=t.aliases||Object.create(null);let r={};function s(t){r=qn(o[t]||i[t],r)}return s(e),n.forEach(s),qn(t,r)}function Vn(t,e){const n=[];if("object"!=typeof t||"object"!=typeof t.icons)return n;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),n.push(t)});const o=function(t){const e=t.icons,n=t.aliases||Object.create(null),o=Object.create(null);return Object.keys(e).concat(Object.keys(n)).forEach(function t(i){if(e[i])return o[i]=[];if(!(i in o)){o[i]=null;const e=n[i]&&n[i].parent,r=e&&t(e);r&&(o[i]=[e].concat(r))}return o[i]}),o}(t);for(const i in o){const r=o[i];r&&(e(i,$n(t,i,r)),n.push(i))}return n}const Kn={provider:"",aliases:{},not_found:{},...On};function Gn(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Jn(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!Gn(t,Kn))return null;const n=e.icons;for(const t in n){const e=n[t];if(!t||"string"!=typeof e.body||!Gn(e,Rn))return null}const o=e.aliases||Object.create(null);for(const t in o){const e=o[t],i=e.parent;if(!t||"string"!=typeof i||!n[i]&&!o[i]||!Gn(e,Rn))return null}return e}const Yn=Object.create(null);function Xn(t,e){const n=Yn[t]||(Yn[t]=Object.create(null));return n[e]||(n[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}(t,e))}function Qn(t,e){return Jn(e)?Vn(e,(e,n)=>{n?t.icons[e]=n:t.missing.add(e)}):[]}function to(t,e){let n=[];return("string"==typeof t?[t]:Object.keys(Yn)).forEach(t=>{("string"==typeof t&&"string"==typeof e?[e]:Object.keys(Yn[t]||{})).forEach(e=>{const o=Xn(t,e);n=n.concat(Object.keys(o.icons).map(n=>(""!==t?"@"+t+":":"")+e+":"+n))})}),n}let eo=!1;function no(t){return"boolean"==typeof t&&(eo=t),eo}function oo(t){const e="string"==typeof t?Wn(t,!0,eo):t;if(e){const t=Xn(e.provider,e.prefix),n=e.name;return t.icons[n]||(t.missing.has(n)?null:void 0)}}function io(t,e){const n=Wn(t,!0,eo);if(!n)return!1;const o=Xn(n.provider,n.prefix);return e?function(t,e,n){try{if("string"==typeof n.body)return t.icons[e]={...n},!0}catch(t){}return!1}(o,n.name,e):(o.missing.add(n.name),!0)}function ro(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),eo&&!e&&!t.prefix){let e=!1;return Jn(t)&&(t.prefix="",Vn(t,(t,n)=>{io(t,n)&&(e=!0)})),e}const n=t.prefix;return!!Un({prefix:n,name:"a"})&&!!Qn(Xn(e,n),t)}function so(t){return!!oo(t)}function ao(t){const e=oo(t);return e?{...Zn,...e}:e}function lo(t,e){t.forEach(t=>{const n=t.loaderCallbacks;n&&(t.loaderCallbacks=n.filter(t=>t.id!==e))})}let co=0;const ho=Object.create(null);function uo(t,e){ho[t]=e}function po(t){return ho[t]||ho[""]}function mo(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}const fo=Object.create(null),go=["https://api.simplesvg.com","https://api.unisvg.com"],_o=[];for(;go.length>0;)1===go.length||Math.random()>.5?_o.push(go.shift()):_o.push(go.pop());function yo(t,e){const n=mo(e);return null!==n&&(fo[t]=n,!0)}function bo(t){return fo[t]}function vo(){return Object.keys(fo)}fo[""]=mo({resources:["https://api.iconify.design"].concat(_o)});const xo={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function wo(t){const e={...xo,...t};let n=[];function o(){n=n.filter(t=>"pending"===t().status)}return{query:function(t,i,r){const s=function(t,e,n,o){const i=t.resources.length,r=t.random?Math.floor(Math.random()*i):t.index;let s;if(t.random){let e=t.resources.slice(0);for(s=[];e.length>1;){const t=Math.floor(Math.random()*e.length);s.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}s=s.concat(e)}else s=t.resources.slice(r).concat(t.resources.slice(0,r));const a=Date.now();let l,c="pending",h=0,d=null,u=[],p=[];function m(){d&&(clearTimeout(d),d=null)}function f(){"pending"===c&&(c="aborted"),m(),u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}function g(t,e){e&&(p=[]),"function"==typeof t&&p.push(t)}function _(){c="failed",p.forEach(t=>{t(void 0,l)})}function y(){u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}return"function"==typeof o&&p.push(o),setTimeout(function o(){if("pending"!==c)return;m();const i=s.shift();if(void 0===i)return u.length?void(d=setTimeout(()=>{m(),"pending"===c&&(y(),_())},t.timeout)):void _();const r={status:"pending",resource:i,callback:(e,n)=>{!function(e,n,i){const r="success"!==n;switch(u=u.filter(t=>t!==e),c){case"pending":break;case"failed":if(r||!t.dataAfterTimeout)return;break;default:return}if("abort"===n)return l=i,void _();if(r)return l=i,void(u.length||(s.length?o():_()));if(m(),y(),!t.random){const n=t.resources.indexOf(e.resource);-1!==n&&n!==t.index&&(t.index=n)}c="completed",p.forEach(t=>{t(i)})}(r,e,n)}};u.push(r),h++,d=setTimeout(o,t.rotate),n(i,e,r.callback)}),function(){return{startTime:a,payload:e,status:c,queriesSent:h,queriesPending:u.length,subscribe:g,abort:f}}}(e,t,i,(t,e)=>{o(),r&&r(t,e)});return n.push(s),s},find:function(t){return n.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:o}}function Lo(){}const ko=Object.create(null);function Po(t,e,n){let o,i;if("string"==typeof t){const e=po(t);if(!e)return n(void 0,424),Lo;i=e.send;const r=function(t){if(!ko[t]){const e=bo(t);if(!e)return;ko[t]={config:e,redundancy:wo(e)}}return ko[t]}(t);r&&(o=r.redundancy)}else{const e=mo(t);if(e){o=wo(e);const n=po(t.resources?t.resources[0]:"");n&&(i=n.send)}}return o&&i?o.query(e,i,n)().abort:(n(void 0,424),Lo)}function To(){}function Eo(t,e,n){function o(){const n=t.pendingIcons;e.forEach(e=>{n&&n.delete(e),t.icons[e]||t.missing.add(e)})}if(n&&"object"==typeof n)try{if(!Qn(t,n).length)return void o()}catch(t){console.error(t)}o(),function(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const o=t.provider,i=t.prefix;e.forEach(e=>{const r=e.icons,s=r.pending.length;r.pending=r.pending.filter(e=>{if(e.prefix!==i)return!0;const s=e.name;if(t.icons[s])r.loaded.push({provider:o,prefix:i,name:s});else{if(!t.missing.has(s))return n=!0,!0;r.missing.push({provider:o,prefix:i,name:s})}return!1}),r.pending.length!==s&&(n||lo([t],e.id),e.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),e.abort))})}))}(t)}))}(t)}function zo(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}const Co=(t,e)=>{const n=function(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name));let o={provider:"",prefix:"",name:""};return t.forEach(t=>{if(o.name===t.name&&o.prefix===t.prefix&&o.provider===t.provider)return;o=t;const i=t.provider,r=t.prefix,s=t.name,a=n[i]||(n[i]=Object.create(null)),l=a[r]||(a[r]=Xn(i,r));let c;c=s in l.icons?e.loaded:""===r||l.missing.has(s)?e.missing:e.pending;const h={provider:i,prefix:r,name:s};c.push(h)}),e}(function(t,e=!0,n=!1){const o=[];return t.forEach(t=>{const i="string"==typeof t?Wn(t,e,n):t;i&&o.push(i)}),o}(t,!0,no()));if(!n.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(n.loaded,n.missing,n.pending,To)}),()=>{t=!1}}const o=Object.create(null),i=[];let r,s;return n.pending.forEach(t=>{const{provider:e,prefix:n}=t;if(n===s&&e===r)return;r=e,s=n,i.push(Xn(e,n));const a=o[e]||(o[e]=Object.create(null));a[n]||(a[n]=[])}),n.pending.forEach(t=>{const{provider:e,prefix:n,name:i}=t,r=Xn(e,n),s=r.pendingIcons||(r.pendingIcons=new Set);s.has(i)||(s.add(i),o[e][n].push(i))}),i.forEach(t=>{const e=o[t.provider][t.prefix];e.length&&function(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:n}=t,o=t.iconsToLoad;if(delete t.iconsToLoad,!o||!o.length)return;const i=t.loadIcon;if(t.loadIcons&&(o.length>1||!i))return void zo(t.loadIcons(o,n,e),e=>{Eo(t,o,e)});if(i)return void o.forEach(o=>{zo(i(o,n,e),e=>{Eo(t,[o],e?{prefix:n,icons:{[o]:e}}:null)})});const{valid:r,invalid:s}=function(t){const e=[],n=[];return t.forEach(t=>{(t.match(Hn)?e:n).push(t)}),{valid:e,invalid:n}}(o);if(s.length&&Eo(t,s,null),!r.length)return;const a=n.match(Hn)?po(e):null;a?a.prepare(e,n,r).forEach(n=>{Po(e,n,e=>{Eo(t,n.icons,e)})}):Eo(t,r,null)}))}(t,e)}),e?function(t,e,n){const o=co++,i=lo.bind(null,n,o);if(!e.pending.length)return i;const r={id:o,icons:e,callback:t,abort:i};return n.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(r)}),i}(e,n,i):To},Ao=t=>new Promise((e,n)=>{const o="string"==typeof t?Wn(t,!0):t;o?Co([o||t],i=>{if(i.length&&o){const t=oo(o);if(t)return void e({...Zn,...t})}n(t)}):n(t)});function Mo(t){try{const e="string"==typeof t?JSON.parse(t):t;if("string"==typeof e.body)return{...e}}catch(t){}}let So=!1;try{So=0===navigator.vendor.indexOf("Apple")}catch(t){}const Oo=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Io=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Zo(t,e,n){if(1===e)return t;if(n=n||100,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const o=t.split(Oo);if(null===o||!o.length)return t;const i=[];let r=o.shift(),s=Io.test(r);for(;;){if(s){const t=parseFloat(r);isNaN(t)?i.push(r):i.push(Math.ceil(t*e*n)/n)}else i.push(r);if(r=o.shift(),void 0===r)return i.join("");s=!s}}function Ro(t,e){const n={...Zn,...t},o={...Nn,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,o].forEach(t=>{const e=[],n=t.hFlip,o=t.vFlip;let s,a=t.rotate;switch(n?o?a+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):o&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),a<0&&(a-=4*Math.floor(a/4)),a%=4,a){case 1:s=i.height/2+i.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:s=i.width/2+i.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}a%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),e.length&&(r=function(t,e){const n=function(t,e="defs"){let n="";const o=t.indexOf("<"+e);for(;o>=0;){const i=t.indexOf(">",o),r=t.indexOf(""+e);if(-1===i||-1===r)break;const s=t.indexOf(">",r);if(-1===s)break;n+=t.slice(i+1,r).trim(),t=t.slice(0,o).trim()+t.slice(s+1)}return{defs:n,content:t}}(t);return o=n.defs,i=e+n.content+"",o?""+o+" "+i:i;var o,i}(r,''))});const s=o.width,a=o.height,l=i.width,c=i.height;let h,d;null===s?(d=null===a?"1em":"auto"===a?c:a,h=Zo(d,l/c)):(h="auto"===s?l:s,d=null===a?Zo(h,c/l):"auto"===a?c:a);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",h),p("height",d);const m=[i.left,i.top,l,c];return u.viewBox=m.join(" "),{attributes:u,viewBox:m,body:r}}function Bo(t,e){let n=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)n+=" "+t+'="'+e[t]+'"';return'"+t+" "}function No(t){return'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/ /g,"%3E").replace(/\s+/g," ")}(t)}(t)+'")'}let jo=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(t){}})();function Do(t){jo=t}function Fo(){return jo}const Ho={prepare:(t,e,n)=>{const o=[],i=function(t,e){const n=bo(t);if(!n)return 0;let o;if(n.maxURL){let t=0;n.resources.forEach(e=>{const n=e;t=Math.max(t,n.length)});const i=e+".json?icons=";o=n.maxURL-t-n.path.length-i.length}else o=0;return o}(t,e),r="icons";let s={type:r,provider:t,prefix:e,icons:[]},a=0;return n.forEach((n,l)=>{a+=n.length+1,a>=i&&l>0&&(o.push(s),s={type:r,provider:t,prefix:e,icons:[]},a=n.length),s.icons.push(n)}),o.push(s),o},send:(t,e,n)=>{if(!jo)return void n("abort",424);let o=function(t){if("string"==typeof t){const e=bo(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,n=e.icons.join(",");o+=t+".json?"+new URLSearchParams({icons:n}).toString();break}case"custom":{const t=e.uri;o+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void n("abort",400)}let i=503;jo(t+o).then(t=>{const e=t.status;if(200===e)return i=501,t.json();setTimeout(()=>{n(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{n("success",t)}):setTimeout(()=>{404===t?n("abort",t):n("next",i)})}).catch(()=>{n("next",i)})}};function Wo(t,e,n){Xn(n||"",e).loadIcons=t}function Uo(t,e,n){Xn(n||"",e).loadIcon=t}const qo="data-style";let $o="";function Vo(t){$o=t}function Ko(t,e){let n=Array.from(t.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(qo));n||(n=document.createElement("style"),n.setAttribute(qo,qo),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block;margin:auto}"+$o}function Go(){let t;uo("",Ho),no(!0);try{t=window}catch(t){}if(t){if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!ro(t))&&console.error(n)}catch(t){console.error(n)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(const t in e){const n="IconifyProviders["+t+"] is invalid.";try{const o=e[t];if("object"!=typeof o||!o||void 0===o.resources)continue;yo(t,o)||console.error(n)}catch(t){console.error(n)}}}}return{iconLoaded:so,getIcon:ao,listIcons:to,addIcon:io,addCollection:ro,calculateSize:Zo,buildIcon:Ro,iconToHTML:Bo,svgToURL:No,loadIcons:Co,loadIcon:Ao,addAPIProvider:yo,setCustomIconLoader:Uo,setCustomIconsLoader:Wo,appendCustomStyle:Vo,_api:{getAPIConfig:bo,setAPIModule:uo,sendAPIQuery:Po,setFetch:Do,getFetch:Fo,listAPIProviders:vo}}}const Jo={"background-color":"currentColor"},Yo={"background-color":"transparent"},Xo={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Qo={"-webkit-mask":Jo,mask:Jo,background:Yo};for(const t in Qo){const e=Qo[t];for(const n in Xo)e[t+"-"+n]=Xo[n]}function ti(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}let ei;function ni(t){return Array.from(t.childNodes).find(t=>{const e=t.tagName&&t.tagName.toUpperCase();return"SPAN"===e||"SVG"===e})}function oi(t,e){const n=e.icon.data,o=e.customisations,i=Ro(n,o);o.preserveAspectRatio&&(i.attributes.preserveAspectRatio=o.preserveAspectRatio);const r=e.renderedMode;let s;s="svg"===r?function(t){const e=document.createElement("span"),n=t.attributes;let o="";n.width||(o="width: inherit;"),n.height||(o+="height: inherit;"),o&&(n.style=o);const i=Bo(t.body,n);return e.innerHTML=function(t){return void 0===ei&&function(){try{ei=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){ei=null}}(),ei?ei.createHTML(t):t}(i),e.firstChild}(i):function(t,e,n){const o=document.createElement("span");let i=t.body;-1!==i.indexOf("{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const t=this._state,e=this.getAttribute("icon");if(e!==t.icon.value)return void this._iconChanged(e);if(!t.rendered||!this._visible)return;const n=this.getAttribute("mode"),o=Fn(this);t.attrMode===n&&!function(t,e){for(const n in Dn)if(t[n]!==e[n])return!0;return!1}(t.customisations,o)&&ni(this._shadowRoot)||this._renderIcon(t.icon,o,n)}_iconChanged(t){const e=function(t,e){if("object"==typeof t)return{data:Mo(t),value:t};if("string"!=typeof t)return{value:t};if(t.includes("{")){const e=Mo(t);if(e)return{data:e,value:t}}const n=Wn(t,!0,!0);if(!n)return{value:t};const o=oo(n);if(void 0!==o||!n.prefix)return{value:t,name:n,data:o};const i=Co([n],()=>e(t,n,oo(n)));return{value:t,name:n,loading:i}}(t,(t,e,n)=>{const o=this._state;if(o.rendered||this.getAttribute("icon")!==t)return;const i={value:t,name:e,data:n};i.data?this._gotIconData(i):o.icon=i});e.data?this._gotIconData(e):this._state=ii(e,this._state.inline,this._state)}_forceRender(){if(!this._visible){const t=ni(this._shadowRoot);return void(t&&this._shadowRoot.removeChild(t))}this._queueCheck()}_gotIconData(t){this._checkQueued=!1,this._renderIcon(t,Fn(this),this.getAttribute("mode"))}_renderIcon(t,e,n){const o=function(t,e){switch(e){case"svg":case"bg":case"mask":return e}return"style"===e||!So&&-1!==t.indexOf(" {const e=t.some(t=>t.isIntersecting);e!==this._visible&&(this._visible=e,this._forceRender())}),this._observer.observe(this)}catch(t){if(this._observer){try{this._observer.disconnect()}catch(t){}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};i.forEach(t=>{t in r.prototype||Object.defineProperty(r.prototype,t,{get:function(){return this.getAttribute(t)},set:function(e){null!==e?this.setAttribute(t,e):this.removeAttribute(t)}})});const s=Go();for(const t in s)r[t]=r.prototype[t]=s[t];return e.define(t,r),r}()||Go(),{iconLoaded:si,getIcon:ai,listIcons:li,addIcon:ci,addCollection:hi,calculateSize:di,buildIcon:ui,iconToHTML:pi,svgToURL:mi,loadIcons:fi,loadIcon:gi,setCustomIconLoader:_i,setCustomIconsLoader:yi,addAPIProvider:bi,_api:vi}=ri;var xi=i(510);const wi="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==",Li="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",ki=ge.Default.prototype;ki.options={...ki.options,iconUrl:xi,iconRetinaUrl:wi,shadowUrl:Li},delete ki._getIconUrl;const Pi=new ge.Default,Ti={iconUrl:xi,iconRetinaUrl:wi,shadowUrl:Li,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},Ei=(t,e)=>`${t}
`,zi=(t,e,n)=>` `;function Ci(t){const e=t.iconSize||32,n=t.iconAnchor||[e/2,e],o=[0,-e];return t.iconOptions?new Fe(t.iconOptions):t.iconify?new Fe({className:"dl2-div-icon",html:zi(t.iconify,e,t.iconColor),iconSize:[e,e],iconAnchor:n,tooltipAnchor:o,popupAnchor:o}):t.emoji?new Fe({className:"dl2-div-icon",html:Ei(t.emoji,e),iconSize:[e,e],iconAnchor:n,tooltipAnchor:o,popupAnchor:o}):t.icon?new ge({...Ti,...t.icon}):Pi}const Ai=({position:t=[51.505,-.09],icon:e,emoji:n,iconify:o,iconSize:i=32,iconColor:r,iconAnchor:s,iconOptions:a,popup:l,tooltip:d,draggable:u=!1,opacity:p=1,zIndexOffset:m=0,rotationAngle:f=0,rotateWithMap:g=!1,setProps:_,children:y})=>{const b=(0,c.useRef)(0),v=(0,c.useRef)(0),{bearing:x}=En(),w=Ln(),{layer:L,ref:k}=An(()=>{const c=new be(t,{icon:Ci({icon:e,emoji:n,iconify:o,iconSize:i,iconColor:r,iconAnchor:s,iconOptions:a}),draggable:!!u,opacity:p,zIndexOffset:m});return l&&c.bindPopup(l),d&&c.bindTooltip(d,{direction:"top"}),c.on("click",()=>{b.current+=1,_&&_({n_clicks:b.current})}),c.on("dragend",()=>{v.current+=1;const t=c.getLatLng();_&&_({n_drags:v.current,position:[+t.lat.toFixed(6),+t.lng.toFixed(6)]})}),c});return(0,c.useEffect)(()=>{k.current&&k.current.setLatLng(t)},[t]),(0,c.useEffect)(()=>{k.current&&k.current.setIcon(Ci({icon:e,emoji:n,iconify:o,iconSize:i,iconColor:r,iconAnchor:s,iconOptions:a}))},[e,n,o,i,r,s,a]),(0,c.useEffect)(()=>{k.current&&k.current.setOpacity(p)},[p]),(0,c.useEffect)(()=>{k.current&&k.current.setZIndexOffset(m)},[m]),(0,c.useEffect)(()=>{const t=k.current;if(!t)return;const e=()=>{const e=t._icon;if(!e||!w)return;const n=g?f:f-x,o=t.getLatLng(),i=w.latLngToLayerPoint(o),r=parseFloat(e.style.width)||e.offsetWidth||25,s=parseFloat(e.style.height)||e.offsetHeight||41;e.style.transformOrigin=`${r/2}px ${s/2}px`,e.style.transform=`translate3d(${Math.round(i.x)}px, ${Math.round(i.y)}px, 0) rotate(${n}deg)`,e.style.rotate=""};if(e(),t.on("move",e),w)try{w.on("move zoom zoomend viewreset",e)}catch(t){}return()=>{try{t.off("move",e)}catch(t){}if(w)try{w.off("move zoom zoomend viewreset",e)}catch(t){}}},[f,g,x,L,w]),h().createElement(kn.Provider,{value:L},L?y:null)};var Mi=i(775),Si=i.n(Mi);const Oi=t=>"left"===t||"top-left"===t||"bottom-left"===t?0:"right"===t||"top-right"===t||"bottom-right"===t?1:.5,Ii=t=>"top"===t||"top-left"===t||"top-right"===t?0:"bottom"===t||"bottom-left"===t||"bottom-right"===t?1:.5,Zi=(t,e,n)=>[e*Oi(t),n*Ii(t)],Ri=(t,e=7)=>{const n="center"===t?"bottom-right":t,o=Oi(n),i=Ii(n),r={};0===o?(r.left=-e,r.right="auto"):1===o?(r.right=-e,r.left="auto"):(r.left="50%",r.right="auto"),0===i?(r.top=-e,r.bottom="auto"):1===i?(r.bottom=-e,r.top="auto"):(r.top="50%",r.bottom="auto");const s=.5===o?"-50%":"0",a=.5===i?"-50%":"0";return r.transform=`translate(${s}, ${a})`,r};var Bi=i(246),Ni={};Ni.styleTagTransform=_n(),Ni.setAttributes=pn(),Ni.insert=function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t},Ni.domAPI=dn(),Ni.insertStyleElement=fn(),cn()(Bi.A,Ni),Bi.A&&Bi.A.locals&&Bi.A.locals;const ji=[{label:"System",value:"system-ui, sans-serif"},{label:"Inter",value:"Inter, system-ui, sans-serif"},{label:"Helvetica",value:"Helvetica, Arial, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Times",value:'"Times New Roman", Times, serif'},{label:"Courier",value:'"Courier New", monospace'},{label:"Verdana",value:"Verdana, Geneva, sans-serif"},{label:"Impact",value:"Impact, Haettenschweiler, sans-serif"}],Di=400,Fi=({style:t,editing:e,onChange:n,onEdit:o})=>{const i=(0,c.useRef)(null);(0,c.useEffect)(()=>{const t=i.current;t&&(It.disableClickPropagation(t),It.disableScrollPropagation(t))},[]);const r=Number(t.fontWeight)>=600||"bold"===t.fontWeight,s="italic"===t.fontStyle,a=t.backgroundColor&&"transparent"!==t.backgroundColor;return h().createElement("div",{className:"dl2-tm-toolbar",ref:i},h().createElement("select",{className:"dl2-tm-tb-select",title:"Font family",value:t.fontFamily,onChange:t=>n({fontFamily:t.target.value})},ji.map(t=>h().createElement("option",{key:t.label,value:t.value},t.label))),h().createElement("div",{className:"dl2-tm-tb-num"},h().createElement("button",{className:"dl2-tm-tb-step",title:"Smaller",onClick:()=>n({fontSize:Math.max(6,Math.round(t.fontSize-2))})},"−"),h().createElement("input",{className:"dl2-tm-tb-size",type:"number",min:6,max:Di,value:t.fontSize,onChange:t=>{const e=parseInt(t.target.value,10);isNaN(e)||n({fontSize:Math.min(Di,Math.max(6,e))})}}),h().createElement("button",{className:"dl2-tm-tb-step",title:"Larger",onClick:()=>n({fontSize:Math.min(Di,Math.round(t.fontSize+2))})},"+")),h().createElement("span",{className:"dl2-tm-tb-sep"}),h().createElement("button",{className:"dl2-tm-tb-btn"+(r?" active":""),title:"Bold",style:{fontWeight:800},onClick:()=>n({fontWeight:r?400:700})},"B"),h().createElement("button",{className:"dl2-tm-tb-btn"+(s?" active":""),title:"Italic",style:{fontStyle:"italic",fontFamily:"Georgia, serif"},onClick:()=>n({fontStyle:s?"normal":"italic"})},"I"),h().createElement("span",{className:"dl2-tm-tb-sep"}),h().createElement("label",{className:"dl2-tm-tb-swatch",title:"Text color"},h().createElement("span",{className:"dl2-tm-tb-swatch-ink",style:{background:t.color}}),h().createElement("input",{type:"color",value:Hi(t.color),onChange:t=>n({color:t.target.value})}),h().createElement("span",{className:"dl2-tm-tb-swatch-label"},"A")),h().createElement("label",{className:"dl2-tm-tb-swatch"+(a?"":" is-off"),title:"Background color"},h().createElement("span",{className:"dl2-tm-tb-swatch-ink dl2-tm-tb-swatch-bg",style:{background:a?t.backgroundColor:"transparent"}}),h().createElement("input",{type:"color",value:Hi(a?t.backgroundColor:"#000000"),onChange:t=>n({backgroundColor:t.target.value})}),h().createElement("span",{className:"dl2-tm-tb-swatch-label"},"▣")),h().createElement("button",{className:"dl2-tm-tb-btn",title:a?"Remove background":"Add background",onClick:()=>n({backgroundColor:a?"transparent":"rgba(0,0,0,0.55)"})},a?"⌫":"▢"),h().createElement("span",{className:"dl2-tm-tb-sep"}),h().createElement("div",{className:"dl2-tm-tb-num",title:"Rotation (degrees)"},h().createElement("span",{className:"dl2-tm-tb-rot-ico"},"⟳"),h().createElement("input",{className:"dl2-tm-tb-size",type:"number",value:Math.round(t.rotation),onChange:t=>{const e=parseInt(t.target.value,10);isNaN(e)||n({rotation:e})}})),h().createElement("span",{className:"dl2-tm-tb-sep"}),h().createElement("button",{className:"dl2-tm-tb-btn"+(e?" active":""),title:"Edit text",onClick:o},"✎"))},Hi=t=>{if(!t)return"#000000";if(/^#[0-9a-fA-F]{6}$/.test(t))return t;if(/^#[0-9a-fA-F]{3}$/.test(t))return"#"+t.slice(1).split("").map(t=>t+t).join("");try{const e=document.createElement("canvas").getContext("2d");if(e){e.fillStyle=t;const n=e.fillStyle;if(/^#[0-9a-fA-F]{6}$/.test(n))return n}}catch(t){}return"#000000"},Wi=({position:t,text:e="Text",anchor:n="center",color:o="#111827",backgroundColor:i="transparent",fontFamily:r="system-ui, sans-serif",fontSize:s=24,fontWeight:a=600,fontStyle:l="normal",padding:d=6,borderRadius:u=6,rotation:p=0,opacity:m=1,rotateWithMap:f=!1,scaleWithZoom:g=!1,referenceZoom:_,draggable:y=!0,editable:b=!0,selected:v,showToolbar:x=!0,setProps:w})=>{const L=Ln(),{bearing:k}=En(),[P,T]=(0,c.useState)({text:e,anchor:n,color:o,backgroundColor:i,fontFamily:r,fontSize:s,fontWeight:a,fontStyle:l,padding:d,borderRadius:u,rotation:p}),E=(0,c.useRef)(P);E.current=P;const z=(0,c.useRef)({...P}),[C,A]=(0,c.useState)(!1),M=(0,c.useRef)(!1);M.current=C;const[S,O]=(0,c.useState)(1),I=(0,c.useRef)(g);I.current=g;const Z=(0,c.useRef)(null),R=(0,c.useRef)(null),B=(0,c.useRef)(0),N=(0,c.useRef)(0),j=(0,c.useRef)(0),D=(0,c.useRef)(p),F=(0,c.useRef)(f),H=(0,c.useRef)(k),W=(0,c.useRef)(n);D.current=P.rotation,F.current=f,H.current=k,W.current=P.anchor;const U=(0,c.useRef)(null),q=(0,c.useRef)(null);if(!U.current)if(t)U.current=t;else if(L){const t=L.getCenter();U.current=[t.lat,t.lng]}const $=(0,c.useRef)(()=>{}),{layer:V,ref:K}=An(()=>{const t=U.current||[0,0],e=new be(t,{icon:new Fe({className:"dl2-text-marker-icon",html:"",iconSize:[0,0],iconAnchor:[0,0]}),draggable:!!y,bubblingMouseEvents:!1,keyboard:!1});return e.on("click",()=>{B.current+=1,Y({n_clicks:B.current}),G.current||nt(!0,!0)}),e.on("dblclick",()=>{J.current&&ot()}),e.on("dragend",()=>{N.current+=1;const t=e.getLatLng(),n=[+t.lat.toFixed(6),+t.lng.toFixed(6)];q.current=n,Y({n_drags:N.current,position:n})}),e}),G=(0,c.useRef)(v),J=(0,c.useRef)(b);J.current=b;const Y=t=>{Object.keys(t).forEach(e=>{e in z.current&&(z.current[e]=t[e])}),w&&w(t)},[X,Q]=(0,c.useState)(!!v);G.current=X;const tt=(0,c.useRef)(v),et=(0,c.useRef)(!1),nt=(t,e)=>{if(t||(et.current=!1),Q(t),t&&L)try{L.fire("dl2:tm-select",{source:K.current})}catch(t){}e&&(tt.current=t,w&&w({selected:t})),!t&&M.current&&it()};(0,c.useEffect)(()=>{void 0!==v&&v!==tt.current&&(tt.current=v,v||(et.current=!1),Q(v),!v&&M.current&&it())},[v]),(0,c.useEffect)(()=>{if(!L)return;const t=t=>{t&&t.source!==K.current&&G.current&&nt(!1,!0)};return L.on("dl2:tm-select",t),()=>{try{L.off("dl2:tm-select",t)}catch(t){}}},[L]),(0,c.useEffect)(()=>{if(!L)return;const t=()=>{et.current?et.current=!1:M.current?it(!0):G.current&&nt(!1,!0)};return L.on("click",t),()=>{L.off("click",t)}},[L]),(0,c.useEffect)(()=>{const t={text:e,anchor:n,color:o,backgroundColor:i,fontFamily:r,fontSize:s,fontWeight:a,fontStyle:l,padding:d,borderRadius:u,rotation:p},c={};Object.keys(t).forEach(e=>{void 0!==t[e]&&t[e]!==z.current[e]&&(c[e]=t[e],z.current[e]=t[e])}),Object.keys(c).length&&T(t=>({...t,...c}))},[e,n,o,i,r,s,a,l,d,u,p]),(0,c.useEffect)(()=>{K.current&&t&&(q.current&&t[0]===q.current[0]&&t[1]===q.current[1]||(q.current=t,K.current.setLatLng(t),$.current()))},[t]),(0,c.useEffect)(()=>{if(V&&!t&&U.current&&!q.current){q.current=U.current;const[t,e]=U.current;Y({position:[+t.toFixed(6),+e.toFixed(6)]})}},[V]),(0,c.useEffect)(()=>{const t=K.current;t&&t.dragging&&(y&&!M.current?t.dragging.enable():t.dragging.disable())},[y,V]),(0,c.useEffect)(()=>{const t=K.current;if(!t||!L)return;t._icon&&(t._icon.style.width="",t._icon.style.height="");const e=()=>{const e=t._icon;if(!e)return;const n=F.current?D.current:D.current-H.current,[o,i]=Zi(W.current,e.offsetWidth,e.offsetHeight);e.style.marginLeft=-o+"px",e.style.marginTop=-i+"px",e.style.transformOrigin=`${o}px ${i}px`;const r=L.latLngToLayerPoint(t.getLatLng());e.style.transform=`translate3d(${Math.round(r.x)}px, ${Math.round(r.y)}px, 0) rotate(${n}deg)`,e.style.rotate=""};return $.current=e,e(),requestAnimationFrame(e),t.on("move",e),L.on("move zoom zoomend viewreset",e),()=>{try{t.off("move",e)}catch(t){}try{L.off("move zoom zoomend viewreset",e)}catch(t){}}},[V,L]),(0,c.useEffect)(()=>{requestAnimationFrame(()=>$.current())},[V,P.rotation,k,f,P.text,P.fontSize,S,P.anchor,P.padding,P.fontFamily,P.fontWeight,P.backgroundColor]),(0,c.useEffect)(()=>{if(!L)return;"number"==typeof _?Z.current=_:null===Z.current&&(Z.current=L.getZoom());const t=()=>{const t=I.current?Math.pow(2,L.getZoom()-Z.current):1;O(t)};return t(),L.on("zoomend",t),()=>{try{L.off("zoomend",t)}catch(t){}}},[L,g,_]),(0,c.useEffect)(()=>{R.current&&!M.current&&(R.current.textContent=P.text||"")},[P.text,V,X]);const ot=()=>{var t;const e=K.current;if(e){et.current=!1,A(!0),G.current||nt(!0,!0);try{null===(t=e.dragging)||void 0===t||t.disable()}catch(t){}requestAnimationFrame(()=>{const t=R.current;if(!t)return;t.focus();const e=document.createRange();e.selectNodeContents(t);const n=window.getSelection();null==n||n.removeAllRanges(),null==n||n.addRange(e)})}},it=(t=!1)=>{if(!M.current)return;M.current=!1,t&&(et.current=!0);const e=R.current;A(!1);const n=K.current;if(y&&(null==n?void 0:n.dragging))try{n.dragging.enable()}catch(t){}if(!e)return;const o=e.textContent||"";j.current+=1,T(t=>({...t,text:o})),z.current.text=o,Y({text:o,n_edits:j.current})};(0,c.useEffect)(()=>{const t=R.current;if(!t||!C)return;const e=t=>t.stopPropagation(),n=["pointerdown","mousedown","dblclick","wheel","touchstart"];return n.forEach(n=>t.addEventListener(n,e)),()=>n.forEach(n=>t.removeEventListener(n,e))},[C]);const rt=(t,e)=>{var n,o;t.stopPropagation(),t.preventDefault();const i=K.current;if(!i||!L)return;try{null===(n=i.dragging)||void 0===n||n.disable()}catch(t){}try{null===(o=L.dragging)||void 0===o||o.disable()}catch(t){}const r=L.latLngToContainerPoint(i.getLatLng()),s={x:t.clientX,y:t.clientY},a=L.getContainer().getBoundingClientRect(),l=a.left+r.x,c=a.top+r.y,h=E.current.fontSize,d=E.current.rotation,u=i._icon,p=u?u.offsetWidth:0,m=u?u.offsetHeight:0,[f,g]=Zi(W.current,p,m),_=(F.current?D.current:D.current-H.current)*Math.PI/180,b=Math.cos(_),v=Math.sin(_),x=p/2-f,w=m/2-g,k=l+x*b-w*v,P=c+x*v+w*b,C=Math.hypot(s.x-k,s.y-P)||1,A=(t,e)=>180*Math.atan2(e-c,t-l)/Math.PI+90,S=A(s.x,s.y),O=t=>{if("resize"===e){const e=Math.hypot(t.clientX-k,t.clientY-P),n=Math.round(Math.min(Di,Math.max(6,h*(e/C))));T(t=>({...t,fontSize:n}))}else{const e=A(t.clientX,t.clientY)-S;let n=Math.round(d+e);t.shiftKey&&(n=15*Math.round(n/15)),T(t=>({...t,rotation:n})),D.current=n,$.current()}},I=()=>{var t;window.removeEventListener("pointermove",O),window.removeEventListener("pointerup",I);const n=K.current;if(y&&(null==n?void 0:n.dragging)&&!M.current)try{n.dragging.enable()}catch(t){}try{null===(t=L.dragging)||void 0===t||t.enable()}catch(t){}const o=t=>{t.stopPropagation(),document.removeEventListener("click",o,!0)};document.addEventListener("click",o,!0),setTimeout(()=>document.removeEventListener("click",o,!0),80);const i=E.current;"resize"===e?(z.current.fontSize=i.fontSize,Y({fontSize:i.fontSize})):(z.current.rotation=i.rotation,Y({rotation:i.rotation}))};window.addEventListener("pointermove",O),window.addEventListener("pointerup",I)},st=V?V._icon:void 0,at=P.backgroundColor&&"transparent"!==P.backgroundColor,lt={position:"relative",opacity:m,background:at?P.backgroundColor:"transparent",padding:at?`${P.padding}px ${1.6*P.padding}px`:0,borderRadius:at?`${P.borderRadius}px`:0},ct={color:P.color,fontFamily:P.fontFamily,fontSize:P.fontSize*S+"px",fontWeight:P.fontWeight,fontStyle:P.fontStyle,lineHeight:1.15},ht=st?Si().createPortal(h().createElement("div",{className:"dl2-tm-box"+(X?" is-selected":"")+(C?" is-editing":""),style:lt},h().createElement("div",{ref:R,className:"dl2-tm-text"+(C||P.text?"":" is-empty"),style:ct,contentEditable:C,suppressContentEditableWarning:!0,spellCheck:!1,onBlur:C?()=>it(!0):void 0,onKeyDown:C?t=>{"Enter"!==t.key||t.shiftKey?"Escape"===t.key&&(t.preventDefault(),R.current&&(R.current.textContent=E.current.text||""),it()):(t.preventDefault(),it())}:void 0}),X&&!C&&h().createElement(h().Fragment,null,h().createElement("span",{className:"dl2-tm-rotate-line"}),h().createElement("span",{className:"dl2-tm-handle dl2-tm-handle-rotate",title:"Drag to rotate (hold Shift to snap 15°)",onPointerDown:t=>rt(t,"rotate")}),h().createElement("span",{className:"dl2-tm-handle dl2-tm-handle-resize",title:"Drag to resize — this dot also marks the anchor point",style:Ri(P.anchor),onPointerDown:t=>rt(t,"resize")}))),st):null,dt=X&&x&&L?Si().createPortal(h().createElement(Fi,{style:P,editing:C,onChange:t=>{T(e=>({...e,...t})),Y(t)},onEdit:ot}),L.getContainer()):null;return h().createElement(h().Fragment,null,ht,dt)},Ui=({children:t,maxWidth:e=300,minWidth:n=50,closeButton:o=!0,closeOnClick:i,autoClose:r,opened:s})=>{const a=Pn(),[l]=(0,c.useState)(()=>document.createElement("div"));return(0,c.useEffect)(()=>{if(!a)return;const t={maxWidth:e,minWidth:n,closeButton:o};return void 0!==i&&(t.closeOnClick=i),void 0!==r&&(t.autoClose=r),a.bindPopup(l,t),()=>{try{a.unbindPopup()}catch(t){}}},[a,e,n,o,i,r,l]),(0,c.useEffect)(()=>{var t,e,n,o;if(a&&void 0!==s)try{s?null===(e=(t=a).openPopup)||void 0===e||e.call(t):null===(o=(n=a).closePopup)||void 0===o||o.call(n)}catch(t){}},[a,s]),Si().createPortal(t,l)},qi=({children:t,permanent:e=!1,direction:n="auto",opacity:o=.9})=>{const i=Pn(),[r]=(0,c.useState)(()=>document.createElement("div"));return(0,c.useEffect)(()=>{if(i)return i.bindTooltip(r,{permanent:e,direction:n,opacity:o}),()=>{try{i.unbindTooltip()}catch(t){}}},[i,e,n,o,r]),Si().createPortal(t,r)},$i=({positions:t=[],color:e="#3388ff",weight:n=3,opacity:o=1,dashArray:i,interactive:r,setProps:s,children:a})=>{const l=(0,c.useRef)(0),{layer:d,ref:u}=An(()=>{const a=new Le(t,{color:e,weight:n,opacity:o,dashArray:i,interactive:r});return a.on("click",()=>{l.current+=1,s&&s({n_clicks:l.current})}),a});return(0,c.useEffect)(()=>{u.current&&u.current.setLatLngs(t)},[t]),(0,c.useEffect)(()=>{u.current&&u.current.setStyle({color:e,weight:n,opacity:o,dashArray:i})},[e,n,o,i]),h().createElement(kn.Provider,{value:d},d?a:null)},Vi=({positions:t=[],color:e="#3388ff",weight:n=3,opacity:o=1,fillColor:i,fillOpacity:r=.2,setProps:s,children:a})=>{const l=(0,c.useRef)(0),d=()=>({color:e,weight:n,opacity:o,fillColor:i,fillOpacity:r}),{layer:u,ref:p}=An(()=>{const e=new ke(t,d());return e.on("click",()=>{l.current+=1,s&&s({n_clicks:l.current})}),e});return(0,c.useEffect)(()=>{p.current&&p.current.setLatLngs(t)},[t]),(0,c.useEffect)(()=>{p.current&&p.current.setStyle(d())},[e,n,o,i,r]),h().createElement(kn.Provider,{value:u},u?a:null)},Ki=({bounds:t=[[0,0],[0,0]],color:e="#3388ff",weight:n=3,fillColor:o,fillOpacity:i=.2,setProps:r,children:s})=>{const a=(0,c.useRef)(0),l=()=>({color:e,weight:n,fillColor:o,fillOpacity:i}),{layer:d,ref:u}=An(()=>{const e=new Je(t,l());return e.on("click",()=>{a.current+=1,r&&r({n_clicks:a.current})}),e});return(0,c.useEffect)(()=>{u.current&&u.current.setBounds(t)},[t]),(0,c.useEffect)(()=>{u.current&&u.current.setStyle(l())},[e,n,o,i]),h().createElement(kn.Provider,{value:d},d?s:null)},Gi=({center:t=[51.505,-.09],radius:e=100,color:n="#3388ff",weight:o=3,fillColor:i,fillOpacity:r=.2,setProps:s,children:a})=>{const l=(0,c.useRef)(0),d=()=>({color:n,weight:o,fillColor:i,fillOpacity:r}),{layer:u,ref:p}=An(()=>{const n=new we(t,{radius:e,...d()});return n.on("click",()=>{l.current+=1,s&&s({n_clicks:l.current})}),n});return(0,c.useEffect)(()=>{p.current&&p.current.setLatLng(t)},[t]),(0,c.useEffect)(()=>{p.current&&p.current.setRadius(e)},[e]),(0,c.useEffect)(()=>{p.current&&p.current.setStyle(d())},[n,o,i,r]),h().createElement(kn.Provider,{value:u},u?a:null)},Ji=({center:t=[51.505,-.09],radius:e=10,color:n="#3388ff",weight:o=3,fillColor:i,fillOpacity:r=.2,interactive:s,setProps:a,children:l})=>{const d=(0,c.useRef)(0),u=()=>({color:n,weight:o,fillColor:i,fillOpacity:r}),{layer:p,ref:m}=An(()=>{const n=new xe(t,{radius:e,interactive:s,...u()});return n.on("click",()=>{d.current+=1,a&&a({n_clicks:d.current})}),n});return(0,c.useEffect)(()=>{m.current&&m.current.setLatLng(t)},[t]),(0,c.useEffect)(()=>{m.current&&m.current.setRadius(e)},[e]),(0,c.useEffect)(()=>{m.current&&m.current.setStyle(u())},[n,o,i,r]),h().createElement(kn.Provider,{value:p},p?l:null)},Yi=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Xi=new Uint32Array(96);class Qi{static from(t){if(!t||void 0===t.byteLength||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[e,n]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(1!==o)throw new Error(`Got v${o} data when expected v1.`);const i=Yi[15&n];if(!i)throw new Error("Unrecognized array type.");const[r]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new Qi(s,r,i,void 0,t)}constructor(t,e=64,n=Float64Array,o=ArrayBuffer,i){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=n,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const r=Yi.indexOf(this.ArrayType),s=2*t*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${n}.`);if(i)this.data=i,this.ids=new this.IndexArrayType(i,8,t),this.coords=new n(i,8+a+l,2*t),this._pos=2*t,this._finished=!0;else{const i=this.data=new o(8+s+a+l);this.ids=new this.IndexArrayType(i,8,t),this.coords=new n(i,8+a+l,2*t),this._pos=0,this._finished=!1,new Uint8Array(i,0,2).set([219,16+r]),new Uint16Array(i,2,1)[0]=e,new Uint32Array(i,4,1)[0]=t}}add(t,e){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=t,this.coords[this._pos++]=e,n}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return tr(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:r,nodeSize:s}=this;Xi[0]=0,Xi[1]=i.length-1,Xi[2]=0;let a=3;const l=[];for(;a>0;){const c=Xi[--a],h=Xi[--a],d=Xi[--a];if(h-d<=s){for(let s=d;s<=h;s++){const a=r[2*s],c=r[2*s+1];a>=t&&a<=n&&c>=e&&c<=o&&l.push(i[s])}continue}const u=d+h>>1,p=r[2*u],m=r[2*u+1];p>=t&&p<=n&&m>=e&&m<=o&&l.push(i[u]),(0===c?t<=p:e<=m)&&(Xi[a++]=d,Xi[a++]=u-1,Xi[a++]=1-c),(0===c?n>=p:o>=m)&&(Xi[a++]=u+1,Xi[a++]=h,Xi[a++]=1-c)}return l}within(t,e,n){const o=[];return this.withinInto(t,e,n,o),o}withinInto(t,e,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:r,nodeSize:s}=this;Xi[0]=0,Xi[1]=i.length-1,Xi[2]=0;let a=3,l=0;const c=n*n;for(;a>0;){const h=Xi[--a],d=Xi[--a],u=Xi[--a];if(d-u<=s){for(let n=u;n<=d;n++)ir(r[2*n],r[2*n+1],t,e)<=c&&(o[l++]=i[n]);continue}const p=u+d>>1,m=r[2*p],f=r[2*p+1];ir(m,f,t,e)<=c&&(o[l++]=i[p]),(0===h?t-n<=m:e-n<=f)&&(Xi[a++]=u,Xi[a++]=p-1,Xi[a++]=1-h),(0===h?t+n>=m:e+n>=f)&&(Xi[a++]=p+1,Xi[a++]=d,Xi[a++]=1-h)}return l}}function tr(t,e,n,o,i,r){if(i-o<=n)return;const s=o+i>>1;er(t,e,s,o,i,r),tr(t,e,n,o,s-1,1-r),tr(t,e,n,s+1,i,1-r)}function er(t,e,n,o,i,r){for(;i>o;){if(i-o>600){const s=i-o+1,a=n-o+1,l=Math.log(s),c=.5*Math.exp(2*l/3),h=.5*Math.sqrt(l*c*(s-c)/s)*(a-s/2<0?-1:1);er(t,e,n,Math.max(o,Math.floor(n-a*c/s+h)),Math.min(i,Math.floor(n+(s-a)*c/s+h)),r)}const s=e[2*n+r];let a=o,l=i;for(nr(t,e,o,n),e[2*i+r]>s&&nr(t,e,o,i);as;)l--}e[2*o+r]===s?nr(t,e,o,l):(l++,nr(t,e,l,i)),l<=n&&(o=l+1),n<=l&&(i=l-1)}}function nr(t,e,n,o){or(t,n,o),or(e,2*n,2*o),or(e,2*n+1,2*o+1)}function or(t,e,n){const o=t[e];t[e]=t[n],t[n]=o}function ir(t,e,n,o){const i=t-n,r=e-o;return i*i+r*r}const rr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},sr=Math.fround||(ar=new Float32Array(1),t=>(ar[0]=+t,ar[0]));var ar;class lr{constructor(t){this.options=Object.assign(Object.create(rr),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:n,maxZoom:o}=this.options;e&&console.time("total time");const i=`prepare ${t.length} points`;e&&console.time(i),this.points=t;const r=[];for(let e=0;e=n;t--){const n=+Date.now();s=this.trees[t]=this._createTree(this._cluster(s,t)),e&&console.log("z%d: %d clusters in %dms",t,s.numItems,+Date.now()-n)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let n=((t[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[1]));let i=180===t[2]?180:((t[2]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){const t=this.getClusters([n,o,180,r],e),s=this.getClusters([-180,o,i,r],e);return t.concat(s)}const s=this.trees[this._limitZoom(e)],a=s.range(dr(n),ur(r),dr(i),ur(o)),l=s.data,c=[];for(const t of a){const e=this.stride*t;c.push(l[e+5]>1?cr(l,e,this.clusterProps):this.points[l[e+3]])}return c}getChildren(t){const e=this._getOriginId(t),n=this._getOriginZoom(t),o="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(o);const r=i.data;if(e*this.stride>=r.length)throw new Error(o);const s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=r[e*this.stride],l=r[e*this.stride+1],c=i.within(a,l,s),h=[];for(const e of c){const n=e*this.stride;r[n+4]===t&&h.push(r[n+5]>1?cr(r,n,this.clusterProps):this.points[r[n+3]])}if(0===h.length)throw new Error(o);return h}getLeaves(t,e,n){e=e||10,n=n||0;const o=[];return this._appendLeaves(o,t,e,n,0),o}getTile(t,e,n){const o=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:r,radius:s}=this.options,a=s/r,l=(n-a)/i,c=(n+1+a)/i,h={features:[]};return this._addTileFeatures(o.range((e-a)/i,l,(e+1+a)/i,c),o.data,e,n,i,h),0===e&&this._addTileFeatures(o.range(1-a/i,l,1,c),o.data,i,n,i,h),e===i-1&&this._addTileFeatures(o.range(0,l,a/i,c),o.data,-1,n,i,h),h.features.length?h:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}_appendLeaves(t,e,n,o,i){const r=this.getChildren(e);for(const e of r){const r=e.properties;if(r&&r.cluster?i+r.point_count<=o?i+=r.point_count:i=this._appendLeaves(t,r.cluster_id,n,o,i):i1;let l,c,h;if(a)l=hr(e,t,this.clusterProps),c=e[t],h=e[t+1];else{const n=this.points[e[t+3]];l=n.properties;const[o,i]=n.geometry.coordinates;c=dr(o),h=ur(i)}const d={type:1,geometry:[[Math.round(this.options.extent*(c*i-n)),Math.round(this.options.extent*(h*i-o))]],tags:l};let u;u=a||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==u&&(d.id=u),r.features.push(d)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:n,extent:o,reduce:i,minPoints:r}=this.options,s=n/(o*Math.pow(2,e)),a=t.data,l=[],c=this.stride;for(let n=0;ne&&(p+=a[n+5])}if(p>u&&p>=r){let t,r=o*u,s=h*u,m=-1;const f=(n/c<<5)+(e+1)+this.points.length;for(const o of d){const l=o*c;if(a[l+2]<=e)continue;a[l+2]=e;const h=a[l+5];r+=a[l]*h,s+=a[l+1]*h,a[l+4]=f,i&&(t||(t=this._map(a,n,!0),m=this.clusterProps.length,this.clusterProps.push(t)),i(t,this._map(a,l)))}a[n+4]=f,l.push(r/p,s/p,1/0,f,-1,p),i&&l.push(m)}else{for(let t=0;t1)for(const t of d){const n=t*c;if(!(a[n+2]<=e)){a[n+2]=e;for(let t=0;t>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,n){if(t[e+5]>1){const o=this.clusterProps[t[e+6]];return n?Object.assign({},o):o}const o=this.points[t[e+3]].properties,i=this.options.map(o);return n&&i===o?Object.assign({},i):i}}function cr(t,e,n){return{type:"Feature",id:t[e+3],properties:hr(t,e,n),geometry:{type:"Point",coordinates:[(o=t[e],360*(o-.5)),pr(t[e+1])]}};var o}function hr(t,e,n){const o=t[e+5],i=o>=1e4?`${Math.round(o/1e3)}k`:o>=1e3?Math.round(o/100)/10+"k":o,r=t[e+6],s=-1===r?{}:Object.assign({},n[r]);return Object.assign(s,{cluster:!0,cluster_id:t[e+3],point_count:o,point_count_abbreviated:i})}function dr(t){return t/360+.5}function ur(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function pr(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function mr(t){let e=32;return t>=1e3?e=56:t>=100?e=48:t>=10&&(e=40),new Fe({html:`${t}
`,className:"",iconSize:[e,e],iconAnchor:[e/2,e/2]})}function fr(t){if(!t)return null;try{const e=new Function("return ("+t+")")();return"function"==typeof e?e:null}catch(t){return console.warn("dl2.GeoJSON: failed to compile user function",t),null}}const gr=({data:t,style:e,cluster:n=!1,superClusterOptions:o,pointToLayer:i,clusterToLayer:r,hideout:s,zoomToBoundsOnClick:a=!0,spiderfyOnMaxZoom:l=!1,setProps:d,children:u})=>{const p=(0,c.useRef)(0),m=(0,c.useRef)(e);m.current=e;const f=(0,c.useRef)(s);f.current=s;const g=(0,c.useRef)(fr(i)),_=(0,c.useRef)(fr(r));(0,c.useEffect)(()=>{g.current=fr(i)},[i]),(0,c.useEffect)(()=>{_.current=fr(r)},[r]);const y=(0,c.useRef)(null),b=(0,c.useRef)(null),v=()=>{var t;return{hideout:f.current||{},leaflet:rn,map:null===(t=P.current)||void 0===t?void 0:t._map}},x=(t,e)=>{const n=g.current;if(n)try{return n(t,e,v())}catch(t){console.warn("dl2.GeoJSON.pointToLayer threw",t)}return new be(e,{icon:Pi})},w=(t,e,n)=>{const o=_.current;if(o)try{return o(t,e,n,v())}catch(t){console.warn("dl2.GeoJSON.clusterToLayer threw",t)}const i=t.properties.point_count||0;return new be(e,{icon:mr(i)})},L=(t,e)=>{t.on("click",()=>{p.current+=1,d&&d({n_clicks:p.current,clickFeature:e&&e.properties||{}})})},{layer:k,ref:P}=An(()=>new fe),T=()=>{const e=P.current;if(!e)return;const i=e._map;if(i)if(e.clearLayers(),n){const n=(null==t?void 0:t.features)||[],r=n.filter(t=>t&&t.geometry&&"Point"===t.geometry.type),s=n.filter(t=>t&&t.geometry&&"Point"!==t.geometry.type),l={radius:80,minPoints:2,maxZoom:16,minZoom:0,extent:512,...o||{}},c=new lr(l);if(c.load(r),y.current=c,b.current=e,s.length){const t=new Pe({type:"FeatureCollection",features:s},{style:()=>m.current||{},onEachFeature:(t,e)=>L(e,t)});e.addLayer(t)}const h=()=>{if(!e._map)return;e.eachLayer(t=>{t&&t.__dl2_cluster&&e.removeLayer(t)});const t=i.getBounds(),n=[t.getWest(),t.getSouth(),t.getEast(),t.getNorth()],o=Math.round(i.getZoom()),r=c.getClusters(n,o);for(const t of r){const[n,o]=t.geometry.coordinates;let r;if(t.properties&&t.properties.cluster)r=w(t,[o,n],c),r.__dl2_cluster=!0,r.on("click",()=>{const e=t.properties.cluster_id;if(a)try{const t=Math.min(c.getClusterExpansionZoom(e),l.maxZoom+2);i.flyTo([o,n],t,{duration:.4})}catch(t){i.flyTo([o,n],i.getZoom()+2)}d&&d({n_clicks:++p.current,clickFeature:t.properties})});else{const e={type:"Feature",geometry:t.geometry,properties:t.properties};r=x(e,[o,n]),r.__dl2_cluster=!0,L(r,e)}e.addLayer(r)}};e.__dl2_clusterListenersBound||(e.__dl2_clusterListenersBound=!0,i.on("moveend zoomend",h),e.__dl2_clusterRedraw=h),h()}else{if(!t)return;const n=new Pe(t,{style:()=>m.current||{},pointToLayer:(t,e)=>x(t,e),onEachFeature:(t,e)=>L(e,t)});e.addLayer(n)}};return(0,c.useEffect)(()=>{T()},[k,t,e,n,JSON.stringify(o)]),(0,c.useEffect)(()=>{if(n){const t=P.current,e=t&&t.__dl2_clusterRedraw;e&&e()}else T()},[s]),h().createElement(kn.Provider,{value:k},k?u:null)},_r=h().createContext(null);function yr(t){return{addLayer(e){return t(e),this},removeLayer(){return this},hasLayer:()=>!1,getPanes:()=>({})}}function br(t,e,n){return new Proxy({addLayer(e){return t(e),this},removeLayer(t){return e(t),this}},{get(t,e){if(e in t)return t[e];const o=n();if(!o)return;const i=o[e];return"function"==typeof i?i.bind(o):i},has(t,e){if(e in t)return!0;const o=n();return!!o&&e in o}})}const vr=({position:t="topright",collapsed:e=!0,activeBase:n,activeOverlays:o,setProps:i,children:r})=>{const s=Ln(),a=(0,c.useRef)(null);a.current||(a.current=document.createElement("div"));const l=(0,c.useRef)(null),[d,u]=(0,c.useState)([]),[p,m]=(0,c.useState)({overlays:new Map}),[f,g]=(0,c.useState)(!e),_=(0,c.useRef)(void 0),y=(0,c.useRef)(void 0);(0,c.useEffect)(()=>{if(!s)return;const e=new Nt({position:t});return e.onAdd=()=>{const t=a.current;return t.classList.add("leaflet-bar","dl2-layers-control"),It.disableClickPropagation(t),It.disableScrollPropagation(t),t},e.addTo(s),l.current=e,()=>{e.remove(),l.current=null}},[s,t]);const b=(0,c.useCallback)((t,e,n,o)=>(u(i=>i.some(n=>n.name===t&&n.kind===e)?i:[...i,{name:t,kind:e,layer:n,initialChecked:o}]),()=>u(n=>n.filter(n=>!(n.name===t&&n.kind===e)))),[]),v=d.filter(t=>"base"===t.kind),x=d.filter(t=>"overlay"===t.kind);(0,c.useEffect)(()=>{void 0!==n&&n!==_.current&&m(t=>({...t,base:n}))},[n]),(0,c.useEffect)(()=>{o&&[...o].sort().join(",")!==y.current&&m(t=>{const e=new Map;return x.forEach(t=>e.set(t.name,o.includes(t.name))),{...t,overlays:e}})},[o]);const w=(0,c.useMemo)(()=>{let t=null;if(p.base&&v.some(t=>t.name===p.base))t=p.base;else{const e=v.find(t=>t.initialChecked);t=e?e.name:v.length?v[0].name:null}const e=new Set;return x.forEach(t=>{const n=p.overlays.get(t.name);(void 0===n?t.initialChecked:n)&&e.add(t.name)}),{base:t,overlays:e}},[d,p,v,x]);return(0,c.useEffect)(()=>{s&&d.forEach(t=>{const e="base"===t.kind?t.name===w.base:w.overlays.has(t.name),n=!!t.layer._map;e&&!n?s.addLayer(t.layer):!e&&n&&s.removeLayer(t.layer)})},[s,d,w]),(0,c.useEffect)(()=>{if(!i||0===d.length)return;const t=Array.from(w.overlays).sort(),e=t.join(",");w.base===_.current&&e===y.current||(_.current=w.base,y.current=e,i({activeBase:w.base,activeOverlays:t}))},[w,i,d.length]),h().createElement(_r.Provider,{value:b},h().createElement("div",{style:{display:"none"}},r),s&&a.current?Si().createPortal(h().createElement("div",{className:"dl2-layers-ui "+(f?"open":"collapsed"),onMouseEnter:()=>e&&g(!0),onMouseLeave:()=>e&&g(!1)},h().createElement("button",{className:"dl2-layers-handle","aria-label":"Layers"},"☰"),h().createElement("div",{className:"dl2-layers-body"},v.length>0&&h().createElement("section",null,v.map(t=>h().createElement("label",{key:t.name,className:"dl2-layer-row"},h().createElement("input",{type:"radio",name:"dl2-base",checked:w.base===t.name,onChange:()=>{return e=t.name,m(t=>({...t,base:e}));var e}}),h().createElement("span",null,t.name)))),v.length>0&&x.length>0&&h().createElement("hr",{className:"dl2-layers-sep"}),x.length>0&&h().createElement("section",null,x.map(t=>h().createElement("label",{key:t.name,className:"dl2-layer-row"},h().createElement("input",{type:"checkbox",checked:w.overlays.has(t.name),onChange:()=>{return e=t.name,m(t=>{var n,o;const i=new Map(t.overlays),r=null!==(o=null===(n=x.find(t=>t.name===e))||void 0===n?void 0:n.initialChecked)&&void 0!==o&&o,s=i.has(e)?i.get(e):r;return i.set(e,!s),{...t,overlays:i}});var e}}),h().createElement("span",null,t.name)))))),a.current):null)},xr=({name:t="Base",checked:e=!1,children:n})=>{const o=h().useContext(_r),i=(0,c.useRef)(null),r=(0,c.useMemo)(()=>yr(n=>{o&&!i.current&&(i.current=o(t,"base",n,e))}),[t]);return(0,c.useEffect)(()=>()=>{i.current&&i.current(),i.current=null},[]),h().createElement(wn.Provider,{value:r},n)},wr=({name:t="Overlay",checked:e=!1,children:n})=>{const o=h().useContext(_r),i=(0,c.useRef)(null),r=(0,c.useMemo)(()=>yr(n=>{o&&!i.current&&(i.current=o(t,"overlay",n,e))}),[t]);return(0,c.useEffect)(()=>()=>{i.current&&i.current(),i.current=null},[]),h().createElement(wn.Provider,{value:r},n)},Lr={marker:{icon:"mdi:map-marker-plus",label:"Draw a marker (1 click)"},polyline:{icon:"mdi:vector-polyline",label:"Draw a polyline (click vertices, double-click to finish)"},polygon:{icon:"mdi:vector-polygon",label:"Draw a polygon (click vertices, double-click to close)"},rectangle:{icon:"mdi:vector-rectangle",label:"Draw a rectangle (2 corner clicks)"},circle:{icon:"mdi:vector-circle",label:"Draw a circle (center, then radius)"},circlemarker:{icon:"mdi:circle-medium",label:"Draw a circle marker (1 click, fixed radius)"},text:{icon:"mdi:format-text",label:"Add a text caption (click, then type)"}},kr="mdi:vector-square-edit",Pr="Edit layers (drag vertices / markers)",Tr="mdi:delete-outline",Er="Delete layers (click to remove)",zr=["marker","polyline","polygon","rectangle","circle","circlemarker","text"],Cr={color:"#111827",fontSize:18,fontFamily:"system-ui, sans-serif",fontWeight:600},Ar=1609.344,Mr=4046.8564224,Sr=2589988.110336,Or=1e6,Ir=(t,e)=>{if("imperial"===e){const e=3.28084*t;return t>=Ar?`${(t/Ar).toFixed(2)} mi`:`${Math.round(e)} ft`}return t>=1e3?`${(t/1e3).toFixed(2)} km`:`${Math.round(t)} m`},Zr=(t,e)=>"imperial"===e?t>=Sr?`${(t/Sr).toFixed(2)} mi²`:t>=Mr?`${(t/Mr).toFixed(2)} acres`:`${Math.round(10.7639104*t).toLocaleString()} ft²`:t>=Or?`${(t/Or).toFixed(2)} km²`:t>=1e4?`${(t/1e4).toFixed(2)} ha`:`${Math.round(t).toLocaleString()} m²`,Rr=(t,e=6378137)=>{if(!t||t.length<3)return 0;const n=t=>t*Math.PI/180;let o=0;for(let e=0;eString(t).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[t])),Nr=t=>`color:${t.color};font-size:${t.fontSize}px;font-family:${t.fontFamily};font-weight:${t.fontWeight};`,jr=(t,e)=>new Fe({className:"dl2-edit-text-icon",html:`${Br(t)}
`,iconSize:[0,0],iconAnchor:[0,0]}),Dr=t=>{const e=t._icon;e&&(e.style.width="",e.style.height="",e.style.marginLeft=-(e.offsetWidth||0)/2+"px",e.style.marginTop=-(e.offsetHeight||0)/2+"px")},Fr=(t,e,n,o)=>{var i,r,s;const a=e._icon;if(!a)return void requestAnimationFrame(()=>Fr(t,e,n,o));const l=a.querySelector(".dl2-edit-text");if(!l)return;Dr(e);const c=!!(null===(r=null===(i=e.dragging)||void 0===i?void 0:i.enabled)||void 0===r?void 0:r.call(i));try{null===(s=e.dragging)||void 0===s||s.disable()}catch(t){}try{t.doubleClickZoom.disable()}catch(t){}l.classList.add("is-editing"),l.setAttribute("contenteditable","true");const h=t=>t.stopPropagation(),d=["pointerdown","mousedown","dblclick","wheel","touchstart","click"];d.forEach(t=>l.addEventListener(t,h));let u=!1;const p=()=>{var i;if(u)return;u=!0,d.forEach(t=>l.removeEventListener(t,h)),l.removeEventListener("keydown",m),l.removeEventListener("blur",p),l.classList.remove("is-editing"),l.removeAttribute("contenteditable");try{t.doubleClickZoom.enable()}catch(t){}if(c)try{null===(i=e.dragging)||void 0===i||i.enable()}catch(t){}const r=(l.textContent||"").trim();!n||r?(e.feature=e.feature||{type:"Feature",properties:{}},e.feature.properties={...e.feature.properties||{},text:r},Dr(e),o(n?"created":"edited","text",{id:e.feature.properties._dl2_id})):e.remove()},m=t=>{t.stopPropagation(),"Enter"!==t.key||t.shiftKey?"Escape"===t.key&&(t.preventDefault(),l.blur()):(t.preventDefault(),l.blur())};l.addEventListener("keydown",m),l.addEventListener("blur",p),requestAnimationFrame(()=>{l.focus();const t=document.createRange();t.selectNodeContents(l);const e=window.getSelection();null==e||e.removeAllRanges(),null==e||e.addRange(t)})},Hr=new Fe({className:"dl2-vertex-handle",html:"",iconSize:[10,10],iconAnchor:[5,5]}),Wr=new Fe({className:"dl2-vertex-preview",html:"",iconSize:[8,8],iconAnchor:[4,4]}),Ur=({position:t="topleft",draw:e,edit:n,shapeOptions:o={color:"#2f9e44",weight:3,fillOpacity:.2},measurementSystem:i="metric",showMeasurementTooltips:r=!1,drawToolbar:s,editToolbar:a,featureUpdate:l,setProps:d})=>{const u=Ln(),p=(0,c.useRef)(null);p.current||(p.current=document.createElement("div"));const m=(0,c.useRef)(null),[f,g]=(0,c.useState)(null),[_,y]=(0,c.useState)(null),[b,v]=(0,c.useState)(0),x=(0,c.useRef)(0),w=(0,c.useRef)(null),L=(0,c.useRef)(null),k=(0,c.useRef)(null),P=t=>!n||!1!==n[t],T=(0,c.useRef)(i);(0,c.useEffect)(()=>{T.current=i},[i]);const z=(0,c.useRef)(o);(0,c.useEffect)(()=>{z.current=o||{}},[o]);const C=(0,c.useRef)(r);(0,c.useEffect)(()=>{C.current=!!r},[r]);const A=(0,c.useRef)(0);(0,c.useEffect)(()=>{if(!u)return;const e=(new fe).addTo(u);m.current=e;const n=new Nt({position:t});n.onAdd=()=>{const t=p.current;return t.classList.add("leaflet-bar","dl2-edit-control"),It.disableClickPropagation(t),It.disableScrollPropagation(t),t},n.addTo(u);const o=()=>O();return u.on("zoomend",o),()=>{u.off("zoomend",o),n.remove(),e.remove(),m.current=null}},[u,t]),(0,c.useEffect)(()=>{m.current&&m.current.eachLayer(t=>{var e,n;const o=null===(n=null===(e=t.feature)||void 0===e?void 0:e.properties)||void 0===n?void 0:n._dl2_type;o&&I(t,o)})},[i]),(0,c.useEffect)(()=>{m.current&&m.current.eachLayer(t=>{var e,n;const o=null===(n=null===(e=t.feature)||void 0===e?void 0:e.properties)||void 0===n?void 0:n._dl2_type;if(o)if(r)I(t,o);else try{t.unbindTooltip()}catch(t){}})},[r]);const M=(t,e,n)=>{const o="f_"+Math.random().toString(36).slice(2,11);return t.feature=t.feature||{type:"Feature",properties:{}},t.feature.properties={...t.feature.properties||{},_dl2_id:o,_dl2_type:e,_dl2_zoom:u?u.getZoom():void 0,...n||{}},o},S=(t,e)=>{try{if("circle"===e){const e=t.getRadius();return{area_m2:Math.PI*e*e,length_m:0}}if("rectangle"===e||"polygon"===e){const e=t.getLatLngs()[0];return{area_m2:Rr(e),length_m:0}}if("polyline"===e&&u){const e=t.getLatLngs();let n=0;for(let t=1;t{if(!C.current||!u||!m.current)return;const t=u.getZoom();m.current.eachLayer(e=>{var n,o;if(!e.getTooltip||!e.getTooltip())return;const i=null===(o=null===(n=e.feature)||void 0===n?void 0:n.properties)||void 0===o?void 0:o._dl2_zoom;if(void 0!==i)try{t>=i?e.openTooltip():e.closeTooltip()}catch(t){}else try{e.openTooltip()}catch(t){}})},I=(t,e)=>{var n,o;if(!C.current||!u)return;const i=((t,e,n,o)=>{var i,r;let s="";try{if("rectangle"===n||"polygon"===n){const t=e.getLatLngs()[0];s=`Area ${Zr(Rr(t),o)}`}else if("circle"===n){const t=e.getRadius();s=`Radius ${Ir(t,o)} · Area ${Zr(Math.PI*t*t,o)}`}else if("polyline"===n){const n=e.getLatLngs();let i=0;for(let e=1;e${Br(a)} ${s}`:a?`
${Br(a)} `:s})(u,t,e,T.current);if(!i)return;t.unbindTooltip(),t.bindTooltip(i,{permanent:!0,direction:"center",className:"dl2-measurement-tooltip",interactive:!1});const r=null===(o=null===(n=t.feature)||void 0===n?void 0:n.properties)||void 0===o?void 0:o._dl2_zoom;if(void 0!==r&&u.getZoom()
{const o=m.current;if(!o||!d)return;const i=o.toGeoJSON(),r=(i.features||[]).length;v(r),x.current+=1,d({geojson:i,n_drawn:r,lastAction:{type:e,action:t,...n||{}},action:{layer_type:e,type:t,n_actions:x.current,...n||{}}})};(0,c.useEffect)(()=>{const t=m.current;if(!u||!t)return;const e=u._container;if(e&&(e.style.cursor=f?"crosshair":""),d&&d({activeTool:f}),!f)return void(w.current=null);_&&y(null);const n=((t,e)=>{if(!u)return{cleanup:()=>{},action:()=>{}};const n=()=>z.current,o=(t,e)=>{const n=M(t,e);I(t,e);const o=S(t,e);Z("created",e,{id:n,...o})};if("marker"===t){const t=t=>{const n=new be(t.latlng,{icon:Pi});n.addTo(e),o(n,"marker"),g(null)};return u.on("click",t),{cleanup:()=>u.off("click",t),action:t=>"cancel"===t&&g(null)}}if("text"===t){const t=t=>{const o=n(),i={...Cr};o.color&&"#2f9e44"!==o.color&&(i.color=o.color);const r=new be(t.latlng,{icon:jr("",i),bubblingMouseEvents:!1});r.addTo(e),M(r,"text",{kind:"text",text:"",...i}),Fr(u,r,!0,Z),g(null)};return u.on("click",t),{cleanup:()=>u.off("click",t),action:t=>"cancel"===t&&g(null)}}if("circlemarker"===t){const t=t=>{const i=new xe(t.latlng,{...n(),radius:10});i.addTo(e),o(i,"circlemarker"),g(null)};return u.on("click",t),{cleanup:()=>u.off("click",t),action:t=>"cancel"===t&&g(null)}}if("polyline"===t||"polygon"===t){const i="polygon"===t,r=n();let s=null;const a=[];let l=null;const c=u._container,h=document.createElement("div");h.className="dl2-draw-tooltip",h.style.display="none",c.appendChild(h);const d=()=>{var t,e;return s?i?(null===(t=s.getLatLngs()[0])||void 0===t?void 0:t.length)||0:(null===(e=s.getLatLngs())||void 0===e?void 0:e.length)||0:0},p=()=>{var t,e;return s?i?null===(t=s.getLatLngs()[0])||void 0===t?void 0:t.slice(-1)[0]:null===(e=s.getLatLngs())||void 0===e?void 0:e.slice(-1)[0]:null},m=()=>{const t=d();h.textContent=0===t?i?"Click to start drawing the polygon":"Click to start drawing":t<2?"Click for next point":i?"Click first point or double-click to close this shape":"Click for next point — double-click to finish"};m();const f=t=>{const e=new be(t,{icon:Wr,interactive:!1,keyboard:!1});e.addTo(u),a.push(e)},_=t=>{const e=t.containerPoint;if(e&&(h.style.left=e.x+"px",h.style.top=e.y+"px",h.style.display=""),l){const e=p();e&&l.setLatLngs([e,t.latlng])}},y=()=>{h.style.display="none"},b=()=>{l&&(l.removeFrom(u),l=null),a.forEach(t=>t.remove()),a.length=0,h.parentNode&&h.parentNode.removeChild(h)},v=()=>{if(!s)return void g(null);const n=s;s=null,n.removeFrom(u),b(),e.addLayer(n),o(n,t),g(null)},x=()=>{s&&(s.removeFrom(u),s=null),b(),g(null)},w=()=>{if(!s)return;if(i){const t=s.getLatLngs();t[0]&&t[0].length>0&&(t[0].pop(),s.setLatLngs(t))}else{const t=s.getLatLngs();t.length>0&&(t.pop(),s.setLatLngs(t))}const t=a.pop();if(t&&t.remove(),m(),l){const t=p();t?l.setLatLngs([t,t]):(l.removeFrom(u),l=null)}0===d()&&s&&(s.removeFrom(u),s=null)},L=t=>{if(s)if(i){const e=s.getLatLngs();e[0].push(t.latlng),s.setLatLngs(e)}else s.addLatLng(t.latlng);else s=i?new ke([[t.latlng]],r):new Le([t.latlng],r),s.addTo(u),l=new Le([t.latlng,t.latlng],{color:r.color||"#2f9e44",weight:2,dashArray:"5,7",interactive:!1,opacity:.7}),l.addTo(u);f(t.latlng),m()},k=()=>v();return u.doubleClickZoom.disable(),u.on("click",L),u.on("dblclick",k),u.on("pointermove",_),u.on("pointerout",y),{cleanup:()=>{u.off("click",L),u.off("dblclick",k),u.off("pointermove",_),u.off("pointerout",y),u.doubleClickZoom.enable(),s&&(s.removeFrom(u),s=null),b()},action:t=>{"finish"===t?v():"cancel"===t?x():"delete last point"===t&&w()}}}if("rectangle"===t){let t=null,i=null,r=0;const s=u._container,a=document.createElement("div");a.className="dl2-draw-tooltip",a.style.display="none",s.appendChild(a);const l=()=>{a.textContent=t?r>0?`Area ${Zr(r,T.current)} — click to finish`:"Click to set the opposite corner":"Click to set the first corner"};l();const c=e=>{const o=e.containerPoint;if(o&&(a.style.left=o.x+"px",a.style.top=o.y+"px",a.style.display=""),!t)return;const s=new E(t,e.latlng);i?i.setBounds(s):(i=new Je(s,{color:n().color||"#2f9e44",weight:2,dashArray:"5,7",fill:!0,fillOpacity:.1,interactive:!1}),i.addTo(u));const c=s.getNorthWest(),h=s.getNorthEast(),d=s.getSouthWest(),p=u.distance(c,h),m=u.distance(c,d);r=p*m,l()},h=()=>{a.style.display="none"},d=()=>{i&&(i.removeFrom(u),i=null),a.parentNode&&a.parentNode.removeChild(a)},p=()=>{t=null,r=0,d(),g(null)},m=i=>{if(!t)return t=i.latlng,void l();const s=new E(t,i.latlng),a=new Je(s,n());a.addTo(e),o(a,"rectangle"),t=null,r=0,d(),g(null)};return u.on("click",m),u.on("pointermove",c),u.on("pointerout",h),{cleanup:()=>{u.off("click",m),u.off("pointermove",c),u.off("pointerout",h),d()},action:t=>"cancel"===t&&p()}}if("circle"===t){let t=null,i=null,r=null,s=0;const a=u._container,l=document.createElement("div");l.className="dl2-draw-tooltip",l.style.display="none",a.appendChild(l);const c=()=>{l.textContent=t?s>0?`Radius ${Ir(s,T.current)} — click to finish`:"Click to set the radius":"Click to set the center"};c();const h=e=>{const o=e.containerPoint;o&&(l.style.left=o.x+"px",l.style.top=o.y+"px",l.style.display=""),t&&(s=u.distance(t,e.latlng),i?i.setRadius(s):(i=new we(t,{radius:s,color:n().color||"#2f9e44",weight:2,dashArray:"5,7",fill:!0,fillOpacity:.1,interactive:!1}),i.addTo(u)),r?r.setLatLngs([t,e.latlng]):(r=new Le([t,e.latlng],{color:n().color||"#2f9e44",weight:1,dashArray:"3,5",opacity:.55,interactive:!1}),r.addTo(u)),c())},d=()=>{l.style.display="none"},p=()=>{i&&(i.removeFrom(u),i=null),r&&(r.removeFrom(u),r=null),l.parentNode&&l.parentNode.removeChild(l)},m=()=>{t=null,s=0,p(),g(null)},f=i=>{if(!t)return t=i.latlng,void c();const r=u.distance(t,i.latlng),a=new we(t,{...n(),radius:r});a.addTo(e),o(a,"circle"),t=null,s=0,p(),g(null)};return u.on("click",f),u.on("pointermove",h),u.on("pointerout",d),{cleanup:()=>{u.off("click",f),u.off("pointermove",h),u.off("pointerout",d),p()},action:t=>"cancel"===t&&m()}}return{cleanup:()=>{},action:()=>{}}})(f,t);return w.current=n.action,()=>{n.cleanup(),w.current=null,e&&(e.style.cursor="")}},[f]);const R=()=>{const t=m.current;if(!t)return;L.current=t.toGeoJSON();const e=[],n=[],o=t=>{var e,n,o,i;const r=(null===(n=null===(e=t.feature)||void 0===e?void 0:e.properties)||void 0===n?void 0:n._dl2_type)||"shape",s=null===(i=null===(o=t.feature)||void 0===o?void 0:o.properties)||void 0===i?void 0:i._dl2_id;I(t,r);const a=S(t,r);Z("geometry-changed",r,{id:s,...a})};t.eachLayer(t=>{var i,r,s;if((t=>{var n,o,i,r;const s=null===(o=null===(n=t.feature)||void 0===n?void 0:n.properties)||void 0===o?void 0:o._dl2_id,a=(null===(r=null===(i=t.feature)||void 0===i?void 0:i.properties)||void 0===r?void 0:r._dl2_type)||"shape";if(!s)return;const l=t.options.bubblingMouseEvents;t.options.bubblingMouseEvents=!1;const c=t=>{(null==t?void 0:t.originalEvent)&&It.stop(t.originalEvent),A.current+=1,d&&d({featureClick:{id:s,layerType:a,n_clicks:A.current}})};t.on("click",c),e.push({layer:t,h:c}),t._dl2_origBubbling=l})(t),t instanceof be){try{null===(i=t.dragging)||void 0===i||i.enable()}catch(t){}const e=()=>{var e;const n=(null===(e=t.feature)||void 0===e?void 0:e.properties)||{},o=n._dl2_type||"marker",i=n._dl2_id;i&&Z("geometry-changed",o,{id:i,area_m2:0,length_m:0})};if(t.on("dragend",e),t._dl2_onDragEnd=e,"text"===(null===(s=null===(r=t.feature)||void 0===r?void 0:r.properties)||void 0===s?void 0:s.kind)){const e=()=>Fr(u,t,!1,Z);t.on("dblclick",e),t._dl2_onTextDbl=e}}else if(t instanceof we){const e=new be(t.getLatLng(),{icon:Hr,draggable:!0}),i=new be(((t,e)=>{const n=111320*Math.cos(t.lat*Math.PI/180);return isFinite(n)&&0!==n?{lat:t.lat,lng:t.lng+e/n}:t})(t.getLatLng(),t.getRadius()),{icon:Hr,draggable:!0});e.on("drag",()=>{const n=e.getLatLng(),o=t.getLatLng(),r=n.lat-o.lat,s=n.lng-o.lng;t.setLatLng(n);const a=i.getLatLng();i.setLatLng([a.lat+r,a.lng+s])}),i.on("drag",()=>{const e=u.distance(t.getLatLng(),i.getLatLng());e>0&&t.setRadius(e)}),e.on("dragend",()=>o(t)),i.on("dragend",()=>o(t)),e.addTo(u),i.addTo(u),n.push(e,i)}else if(t instanceof Le){const e=t instanceof ke;(e?t.getLatLngs()[0]:t.getLatLngs()).forEach((i,r)=>{const s=new be(i,{icon:Hr,draggable:!0});s._dl2Layer=t,s._dl2Index=r,s.on("drag",()=>{const n=s.getLatLng();if(e){const e=t.getLatLngs().map(t=>t.slice());e[0][r]=n,t.setLatLngs(e)}else{const e=t.getLatLngs().slice();e[r]=n,t.setLatLngs(e)}}),s.on("dragend",()=>o(t)),s.addTo(u),n.push(s)})}}),k.current=()=>{n.forEach(t=>t.remove()),e.forEach(({layer:t,h:e})=>{var n;try{t.off("click",e)}catch(t){}t.options.bubblingMouseEvents=null===(n=t._dl2_origBubbling)||void 0===n||n,delete t._dl2_origBubbling}),t.eachLayer(t=>{var e;if(t instanceof be){try{null===(e=t.dragging)||void 0===e||e.disable()}catch(t){}const n=t._dl2_onDragEnd;if(n)try{t.off("dragend",n)}catch(t){}delete t._dl2_onDragEnd;const o=t._dl2_onTextDbl;if(o)try{t.off("dblclick",o)}catch(t){}delete t._dl2_onTextDbl}})}},B=t=>{const e=m.current;k.current&&(k.current(),k.current=null),!t&&L.current&&e?(e.clearLayers(),new Pe(L.current,{pointToLayer:(t,e)=>{const n=(null==t?void 0:t.properties)||{};if("text"===n.kind){const t={color:n.color||Cr.color,fontSize:n.fontSize||Cr.fontSize,fontFamily:n.fontFamily||Cr.fontFamily,fontWeight:n.fontWeight||Cr.fontWeight},o=new be(e,{icon:jr(n.text||"",t),bubblingMouseEvents:!1});return requestAnimationFrame(()=>Dr(o)),o}return new be(e,{icon:Pi})}}).eachLayer(t=>e.addLayer(t)),Z("cancelled","all")):t&&Z("edited","all"),L.current=null,y(null)};(0,c.useEffect)(()=>{if(u&&m.current&&(d&&d({activeMode:_}),_))return f&&g(null),"edit"===_?R():"remove"===_&&(()=>{const t=m.current;if(!t)return;const e=[],n=n=>{const o=()=>{t.removeLayer(n),Z("deleted","shape")};n.on("click",o),e.push({layer:n,h:o})};t.eachLayer(n);const o=t=>n(t.layer);t.on("layeradd",o),k.current=()=>{t.off("layeradd",o),e.forEach(({layer:t,h:e})=>{try{t.off("click",e)}catch(t){}})}})(),()=>{k.current&&(k.current(),k.current=null,L.current=null)}},[_]);const N=(0,c.useRef)(-1);(0,c.useEffect)(()=>{s&&void 0!==s.n_clicks&&s.n_clicks!==N.current&&(N.current=s.n_clicks,s.mode&&g(s.mode),s.action&&w.current&&w.current(s.action))},[s]);const j=(0,c.useRef)(-1);(0,c.useEffect)(()=>{var t,e;if(!l||void 0===l.n_clicks)return;if(l.n_clicks===j.current)return;j.current=l.n_clicks;const n=(t=>{const e=m.current;if(!e)return null;let n=null;return e.eachLayer(e=>{var o,i;(null===(i=null===(o=e.feature)||void 0===o?void 0:o.properties)||void 0===i?void 0:i._dl2_id)===t&&(n=e)}),n})(l.id),o=m.current;if(!n||!o)return;const i=(null===(e=null===(t=n.feature)||void 0===t?void 0:t.properties)||void 0===e?void 0:e._dl2_type)||"shape";if(l.remove)return o.removeLayer(n),void Z("deleted",i,{id:l.id});if(l.style&&"function"==typeof n.setStyle)try{n.setStyle(l.style)}catch(t){}l.properties&&(n.feature.properties={...n.feature.properties||{},...l.properties},I(n,i));const r=S(n,i);Z("restyled",i,{id:l.id,...r})},[l]);const D=(0,c.useRef)(-1);(0,c.useEffect)(()=>{if(a&&void 0!==a.n_clicks&&a.n_clicks!==D.current&&(D.current=a.n_clicks,a.mode&&y(a.mode),a.action))if("clear all"===a.action){const t=m.current;t&&(t.clearLayers(),Z("cleared","all")),y(null)}else"save"===a.action?B(!0):"cancel"===a.action&&B(!1)},[a]);const F=zr.filter(t=>!e||!1!==e[t]),H=b>0&&(P("edit")||P("remove"));return u&&p.current?Si().createPortal(h().createElement("div",{className:"dl2-edit-ui"},h().createElement("div",{className:"dl2-edit-section"},F.map(t=>h().createElement("button",{key:t,className:"dl2-edit-btn "+(f===t?"active":""),title:Lr[t].label,"aria-pressed":f===t,onClick:()=>g(f===t?null:t)},h().createElement("iconify-icon",{icon:Lr[t].icon,width:"18"})))),H&&h().createElement("div",{className:"dl2-edit-section dl2-edit-section-modify"},P("edit")&&h().createElement("button",{className:"dl2-edit-btn "+("edit"===_?"active":""),title:Pr,"aria-pressed":"edit"===_,onClick:()=>y("edit"===_?null:"edit")},h().createElement("iconify-icon",{icon:kr,width:"18"})),P("remove")&&h().createElement("button",{className:"dl2-edit-btn danger "+("remove"===_?"active":""),title:Er,"aria-pressed":"remove"===_,onClick:()=>y("remove"===_?null:"remove")},h().createElement("iconify-icon",{icon:Tr,width:"18"}))),(f||_)&&h().createElement("div",{className:"dl2-edit-actions"},f&&("polyline"===f||"polygon"===f)&&h().createElement(h().Fragment,null,h().createElement("button",{className:"dl2-edit-action-btn primary",onClick:()=>{var t;return null===(t=w.current)||void 0===t?void 0:t.call(w,"finish")}},"Finish"),h().createElement("button",{className:"dl2-edit-action-btn",onClick:()=>{var t;return null===(t=w.current)||void 0===t?void 0:t.call(w,"delete last point")}},"Delete last point")),f&&h().createElement("button",{className:"dl2-edit-action-btn",onClick:()=>{var t;return null===(t=w.current)||void 0===t?void 0:t.call(w,"cancel")}},"Cancel"),"edit"===_&&h().createElement(h().Fragment,null,h().createElement("button",{className:"dl2-edit-action-btn primary",onClick:()=>B(!0)},"Save"),h().createElement("button",{className:"dl2-edit-action-btn",onClick:()=>B(!1)},"Cancel")),"remove"===_&&h().createElement(h().Fragment,null,h().createElement("button",{className:"dl2-edit-action-btn danger",onClick:()=>{const t=m.current;t&&(t.clearLayers(),Z("cleared","all")),y(null)}},"Clear all"),h().createElement("button",{className:"dl2-edit-action-btn",onClick:()=>B(!1)},"Cancel")))),p.current):null},qr=({position:t="topleft",icon:e="mdi:circle-medium",iconSize:n=18,title:o,n_clicks:i=0,n_dblclicks:r=0,setProps:s})=>{const a=Ln(),l=(0,c.useRef)(null);l.current||(l.current=document.createElement("div"));const d=(0,c.useRef)(i||0),u=(0,c.useRef)(r||0);return(0,c.useEffect)(()=>{if(!a)return;const e=new Nt({position:t});return e.onAdd=()=>{const t=l.current;return t.classList.add("leaflet-bar","dl2-easy-button-container"),It.disableClickPropagation(t),It.disableScrollPropagation(t),t},e.addTo(a),()=>e.remove()},[a,t]),a&&l.current?Si().createPortal(h().createElement("button",{className:"dl2-easy-button",title:o,onClick:()=>{d.current+=1,s&&s({n_clicks:d.current})},onDoubleClick:t=>{t.stopPropagation(),u.current+=1,s&&s({n_dblclicks:u.current})}},h().createElement("iconify-icon",{icon:e,width:n})),l.current):null},$r=256,Vr=t=>`${t.z}/${t.x}/${t.y}`;function Kr(t,e,n,o){return t.replace("{s}","a").replace("{z}",String(e)).replace("{x}",String(n)).replace("{y}",String(o))}function Gr(t,e){const n=t.getZoom(),o=t.project(e,n);return{z:n,x:Math.floor(o.x/$r),y:Math.floor(o.y/$r)}}function Jr(t,e,n,o){return[t.unproject(new P(n*$r,o*$r),e),t.unproject(new P((n+1)*$r,(o+1)*$r),e)]}function Yr(t,e,n,o){const[i,r]=Jr(t,e,n,o);return new E(i,r)}const Xr=({position:t="topleft",tileUrl:e="https://tile.openstreetmap.org/{z}/{x}/{y}.png",selectedTiles:n=[],hoverColor:o="#fa5252",selectedColor:i="#228be6",setProps:r})=>{const s=Ln(),a=(0,c.useRef)(null);a.current||(a.current=document.createElement("div"));const[l,d]=(0,c.useState)(!1),u=(0,c.useRef)(null),p=(0,c.useRef)(new Map),m=(0,c.useRef)(n||[]);m.current=n||[];const f=(0,c.useRef)(e);f.current=e;const g=t=>{const[e,n]=Jr(s,t.z,t.x,t.y);return{...t,url:Kr(f.current,t.z,t.x,t.y),bounds:[+n.lat.toFixed(7),+e.lng.toFixed(7),+e.lat.toFixed(7),+n.lng.toFixed(7)]}};return(0,c.useEffect)(()=>{if(!s)return;const e=new Nt({position:t});return e.onAdd=()=>{const t=a.current;return t.classList.add("leaflet-bar","dl2-tile-selector-control"),It.disableClickPropagation(t),It.disableScrollPropagation(t),t},e.addTo(s),()=>{e.remove(),u.current&&(u.current.remove(),u.current=null),p.current.forEach(t=>t.remove()),p.current.clear()}},[s,t]),(0,c.useEffect)(()=>{if(!s)return;const t=new Set((n||[]).map(Vr));p.current.forEach((e,n)=>{t.has(n)||(e.remove(),p.current.delete(n))}),(n||[]).forEach(t=>{const e=Vr(t);if(!p.current.has(e)){const n=Yr(s,t.z,t.x,t.y),o=new Je(n,{color:i,weight:2,fillColor:i,fillOpacity:.18,interactive:!1});o.addTo(s),p.current.set(e,o)}})},[s,n,i]),(0,c.useEffect)(()=>{var t;if(!s)return;const e=s._container;if(!l)return e.style.cursor="",void(u.current&&(u.current.remove(),u.current=null));e.style.cursor="crosshair",null===(t=s.boxZoom)||void 0===t||t.disable();let n=null,a=null;const c=()=>{a&&(a.remove(),a=null),n=null},h=t=>{var e,n;"Shift"===t.key&&(null===(n=null===(e=s.dragging)||void 0===e?void 0:e.enabled)||void 0===n?void 0:n.call(e))&&s.dragging.disable()},d=t=>{var e,n;"Shift"===t.key&&(null===(n=null===(e=s.dragging)||void 0===e?void 0:e.enable)||void 0===n||n.call(e),c())};document.addEventListener("keydown",h),document.addEventListener("keyup",d);const p=t=>{const e=Gr(s,t.latlng),r=Yr(s,e.z,e.x,e.y);if(u.current?u.current.setBounds(r):u.current=new Je(r,{color:o,weight:2,fill:!1,dashArray:"5 5",interactive:!1}).addTo(s),n){const e=new E(n,t.latlng);a?a.setBounds(e):a=new Je(e,{color:i,weight:1,fillColor:i,fillOpacity:.08,dashArray:"4 4",interactive:!1}).addTo(s)}},f=()=>{u.current&&(u.current.remove(),u.current=null)},_=t=>{t.originalEvent&&t.originalEvent.shiftKey&&(n=t.latlng)},y=t=>{if(!n)return;const e=n,o=t.latlng;c();const i=s.getZoom(),a=s.project(e,i),l=s.project(o,i),h=Math.floor(Math.min(a.x,l.x)/$r),d=Math.floor(Math.max(a.x,l.x)/$r),u=Math.floor(Math.min(a.y,l.y)/$r),p=Math.floor(Math.max(a.y,l.y)/$r),f=m.current.slice(),_=new Set(f.map(Vr));for(let t=h;t<=d;t++)for(let e=u;e<=p;e++){const n={z:i,x:t,y:e},o=Vr(n);_.has(o)||(f.push(g(n)),_.add(o))}m.current=f,r&&r({selectedTiles:f})},b=()=>{n&&c()};document.addEventListener("pointerup",b);const v=t=>{if(t.originalEvent&&t.originalEvent.shiftKey)return;const e=Gr(s,t.latlng),n=Vr(e),o=m.current,i=o.findIndex(t=>Vr(t)===n),a=i>=0?o.filter((t,e)=>e!==i):[...o,g(e)];m.current=a,r&&r({selectedTiles:a})};return s.on("pointermove",p),s.on("pointerout",f),s.on("pointerdown",_),s.on("pointerup",y),s.on("click",v),()=>{var t,n,o;s.off("pointermove",p),s.off("pointerout",f),s.off("pointerdown",_),s.off("pointerup",y),s.off("click",v),document.removeEventListener("keydown",h),document.removeEventListener("keyup",d),document.removeEventListener("pointerup",b),null===(t=s.boxZoom)||void 0===t||t.enable(),null===(o=null===(n=s.dragging)||void 0===n?void 0:n.enable)||void 0===o||o.call(n),e.style.cursor="",c(),u.current&&(u.current.remove(),u.current=null)}},[s,l,o,i]),s&&a.current?Si().createPortal(h().createElement("button",{className:"dl2-tile-selector-btn "+(l?"active":""),title:l?"Exit tile-select mode (click toggles, shift+drag selects a box)":"Select tiles (toggle: click to add/remove, shift+drag to box-select)","aria-pressed":l,onClick:()=>d(!l)},h().createElement("iconify-icon",{icon:"mdi:grid-large",width:"18"})),a.current):null},Qr={ArrowLeft:"rotate-ccw",ArrowRight:"rotate-cw",ArrowUp:"rotate-ccw",ArrowDown:"rotate-cw","mod+ArrowLeft":"pan-left","mod+ArrowRight":"pan-right","mod+ArrowUp":"pan-up","mod+ArrowDown":"pan-down"},ts=({enabled:t=!0,bearingStep:e=5,panStep:n=80,keymap:o,setProps:i})=>{const r=Ln(),{bearing:s,setBearing:a}=En(),l=(0,c.useRef)(s);l.current=s;const h=(0,c.useRef)(e);h.current=e;const d=(0,c.useRef)(n);d.current=n;const u=(0,c.useRef)(t);u.current=t;const p=(0,c.useRef)({...Qr,...o||{}});p.current={...Qr,...o||{}};const m=(0,c.useRef)(0),f=(0,c.useRef)(0);return(0,c.useEffect)(()=>{var t;if(!r)return;try{null===(t=r.keyboard)||void 0===t||t.disable()}catch(t){}const e=t=>{if(!u.current)return;const e=t.target;if(e&&/input|textarea|select/i.test(e.tagName))return;if(null==e?void 0:e.isContentEditable)return;const n=t.metaKey||t.ctrlKey,o=(n?"mod+":"")+t.key,s=p.current[o];if(s){switch(t.preventDefault(),s){case"rotate-cw":a(l.current+h.current),m.current+=1;break;case"rotate-ccw":a(l.current-h.current),m.current+=1;break;case"pan-up":r.panBy([0,-d.current]),f.current+=1;break;case"pan-down":r.panBy([0,d.current]),f.current+=1;break;case"pan-left":r.panBy([-d.current,0]),f.current+=1;break;case"pan-right":r.panBy([d.current,0]),f.current+=1;break;default:return}i&&i({n_rotations:m.current,n_pans:f.current,lastKey:{key:t.key,action:s,modifier:n,ts:Date.now()}})}};return window.addEventListener("keydown",e),()=>{var t;window.removeEventListener("keydown",e);try{null===(t=r.keyboard)||void 0===t||t.enable()}catch(t){}}},[r,a,i]),null},es=({position:t="bottomright",url:e="https://tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:n="",width:o=150,height:i=150,zoomLevelOffset:r=-5,toggleDisplay:s=!0,minimized:a=!1,aimingRectOptions:l={color:"#3388ff",weight:1,fillColor:"#3388ff",fillOpacity:.15,interactive:!1},centerFixed:d,n_clicks:u=0,setProps:p})=>{const m=Ln(),f=(0,c.useRef)(u||0),g=(0,c.useRef)(d);(0,c.useEffect)(()=>{g.current=d},[d]);const _=(0,c.useRef)(null);_.current||(_.current=document.createElement("div"));const y=(0,c.useRef)(null),b=(0,c.useRef)(null),v=(0,c.useRef)(null),x=(0,c.useRef)(null),[w,L]=(0,c.useState)(!!a);if((0,c.useEffect)(()=>{if(!m)return;const e=new Nt({position:t});return e.onAdd=()=>{const t=_.current;return t.classList.add("leaflet-control-minimap"),It.disableClickPropagation(t),It.disableScrollPropagation(t),t},e.addTo(m),()=>e.remove()},[m,t]),(0,c.useEffect)(()=>{if(!m||!y.current||b.current)return;const t=m.getCenter(),o=m.getZoom(),i=new Rt(y.current,{attributionControl:!!n,zoomControl:!1,dragging:!1,scrollWheelZoom:!1,doubleClickZoom:!1,pinchZoom:!1,boxZoom:!1,keyboard:!1});i.setView([t.lat,t.lng],o+r);const s=new We(e,{attribution:n});s.addTo(i),x.current=s;const a=new Je(m.getBounds(),l);a.addTo(i),v.current=a;const c=()=>{var t;const e=null!==(t=g.current)&&void 0!==t?t:m.getCenter(),n=Array.isArray(e)?e[0]:e.lat,o=Array.isArray(e)?e[1]:e.lng;i.setView([n,o],m.getZoom()+r,{animate:!1}),a.setBounds(m.getBounds())};m.on("moveend zoomend",c);const h=()=>{f.current+=1,p&&p({n_clicks:f.current})};return i.on("click",h),b.current=i,requestAnimationFrame(()=>i.invalidateSize()),()=>{m.off("moveend zoomend",c),i.off("click",h),i.remove(),b.current=null,v.current=null,x.current=null}},[m]),(0,c.useEffect)(()=>{x.current&&e&&x.current.setUrl(e)},[e]),(0,c.useEffect)(()=>{L(t=>t===!!a?t:!!a)},[a]),(0,c.useEffect)(()=>{if(!b.current)return;const t=window.setTimeout(()=>{var t;try{null===(t=b.current)||void 0===t||t.invalidateSize()}catch(t){}},220);return()=>window.clearTimeout(t)},[w,o,i]),(0,c.useEffect)(()=>{if(!m||!b.current)return;const t=null!=d?d:m.getCenter(),e=Array.isArray(t)?t[0]:t.lat,n=Array.isArray(t)?t[1]:t.lng;b.current.setView([e,n],m.getZoom()+r,{animate:!1})},[r,d,m]),!m||!_.current)return null;const k=w?{width:24,height:24}:{width:o,height:i};return Si().createPortal(h().createElement("div",{className:`leaflet-control-minimap-wrapper ${w?"minimized":"expanded"} pos-${t}`,style:k},h().createElement("div",{ref:y,className:"leaflet-control-minimap-inner",style:{width:o,height:i,visibility:w?"hidden":"visible"}}),s&&h().createElement("button",{type:"button",className:`leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-${t}`,"aria-label":w?"Show minimap":"Hide minimap","aria-pressed":!w,onClick:t=>{t.stopPropagation();const e=!w;L(e),p&&p({minimized:e})}})),_.current)};class ns extends Nt{constructor(t){super(t),this._attributions={}}onAdd(t){var e,n;const o=document.createElement("div");o.className="leaflet-control-attribution",It.disableClickPropagation(o),this._container=o;for(const o of Object.values(t._layers||{})){const t=null===(n=(e=o).getAttribution)||void 0===n?void 0:n.call(e);t&&this._addAttributionText(t)}return t.on("layeradd",this._onLayerAdd,this),this._update(),o}onRemove(t){t.off("layeradd",this._onLayerAdd,this)}_onLayerAdd(t){var e,n;const o=null===(n=null===(e=t.layer)||void 0===e?void 0:e.getAttribution)||void 0===n?void 0:n.call(e);o&&(this._addAttributionText(o),t.layer.once("remove",()=>this._removeAttributionText(o)))}_addAttributionText(t){t&&(this._attributions[t]=(this._attributions[t]||0)+1,this._update())}_removeAttributionText(t){t&&this._attributions[t]&&(this._attributions[t]--,this._update())}setPrefix(t){return this.options.prefix=t,this._update(),this}_update(){if(!this._map)return;const t=Object.keys(this._attributions).filter(t=>this._attributions[t]),e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' | ')}}const os=({position:t="bottomright",prefix:e})=>{const n=Ln(),o=(0,c.useRef)(null),i=void 0===e?'Leaflet ':!1!==e&&e;return(0,c.useEffect)(()=>{if(!n)return;const e=n.attributionControl;if(e&&"function"==typeof e.remove){try{e.remove()}catch(t){}n.attributionControl=void 0}const r=new ns({position:t,prefix:i});return r.addTo(n),o.current=r,()=>{try{r.remove()}catch(t){}o.current=null}},[n]),(0,c.useEffect)(()=>{const e=o.current;e&&t&&e.setPosition(t)},[t]),(0,c.useEffect)(()=>{const t=o.current;t&&t.setPrefix(i)},[e]),null},is=({children:t})=>{const e=(0,c.useRef)(null),{layer:n}=An(()=>{const t=new me;return e.current=t,t}),o=(0,c.useMemo)(()=>br(t=>{const n=e.current;n&&n.addLayer(t)},t=>{const n=e.current;n&&n.removeLayer(t)},()=>{var t;return(null===(t=e.current)||void 0===t?void 0:t._map)||null}),[]);return h().createElement(wn.Provider,{value:o},n?t:null)},rs=({setProps:t,children:e})=>{const n=(0,c.useRef)(null),o=(0,c.useRef)(0),i=(0,c.useRef)(0),{layer:r}=An(()=>{const e=new fe;return n.current=e,e.on("click",()=>{o.current+=1,t&&t({n_clicks:o.current})}),e.on("layeradd layerremove",()=>{if(t)try{const n=e.toGeoJSON();i.current+=1,t({geojson:n,n_layers:i.current})}catch(t){}}),e}),s=(0,c.useMemo)(()=>br(t=>{const e=n.current;e&&e.addLayer(t)},t=>{const e=n.current;e&&e.removeLayer(t)},()=>{var t;return(null===(t=n.current)||void 0===t?void 0:t._map)||null}),[]);return h().createElement(wn.Provider,{value:s},r?e:null)},ss=({position:t="bottomleft",metric:e=!0,imperial:n=!1,maxWidth:o=100,updateWhenIdle:i=!1})=>{const r=Ln(),s=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!r)return;const a=Nt.Scale;if(!a)return;const l=new a({position:t,metric:e,imperial:n,maxWidth:o,updateWhenIdle:i});return l.addTo(r),s.current=l,()=>{try{l.remove()}catch(t){}s.current=null}},[r,e,n,o,i]),(0,c.useEffect)(()=>{s.current&&t&&s.current.setPosition(t)},[t]),null},as=({position:t="topleft",title:e="Full Screen",titleCancel:n="Exit Full Screen",setProps:o})=>{const i=Ln(),r=(0,c.useRef)(null),s=(0,c.useRef)(0);return(0,c.useEffect)(()=>{if(!i)return;const a=new Nt({position:t});let l=null;const c=()=>!!document.fullscreenElement,h=()=>{l&&(l.title=c()?n:e,l.setAttribute("aria-label",l.title),l.classList.toggle("dl2-fs-active",c()))},d=()=>{h(),o&&o({fullscreen:c()})};return a.onAdd=t=>{const e=document.createElement("div");e.className="leaflet-bar dl2-fullscreen-control";const n=document.createElement("a");return n.href="#",n.className="dl2-fullscreen-button",n.innerHTML=' ',l=n,e.appendChild(n),It.disableClickPropagation(e),It.on(n,"click",e=>{var n,i;It.stop(e),s.current+=1,o&&o({n_clicks:s.current});const r=t._container;r&&(document.fullscreenElement?null===(i=document.exitFullscreen)||void 0===i||i.call(document).catch(()=>{}):null===(n=r.requestFullscreen)||void 0===n||n.call(r).catch(()=>{}))}),document.addEventListener("fullscreenchange",d),h(),e},a.onRemove=()=>{document.removeEventListener("fullscreenchange",d)},a.addTo(i),r.current=a,()=>{try{a.remove()}catch(t){}r.current=null}},[i]),(0,c.useEffect)(()=>{r.current&&t&&r.current.setPosition(t)},[t]),null},ls=({url:t="",bounds:e=[[0,0],[0,0]],opacity:n=1,alt:o,crossOrigin:i,interactive:r=!1,zIndex:s,editable:a=!1,selected:l,rotation:d=0,anchor:u="center",setProps:p})=>{const m=Ln(),f=(0,c.useRef)(null),g=(0,c.useRef)(null),_=(0,c.useRef)(0),y=(0,c.useRef)(0),b=(0,c.useRef)(e),v=(0,c.useRef)(d),x=(0,c.useRef)(u),w=(0,c.useRef)(a),L=(0,c.useRef)(JSON.stringify(e));v.current=d,x.current=u,w.current=a;const[k,P]=(0,c.useState)(!!l),T=(0,c.useRef)(k);T.current=k;const E=(0,c.useRef)(l),z=(0,c.useRef)(()=>{}),C=t=>p&&p(t),A=t=>{if(P(t),E.current=t,t&&m)try{m.fire("dl2:tm-select",{source:f.current})}catch(t){}C({selected:t})};(0,c.useEffect)(()=>{if(!m)return;const l={opacity:n,interactive:r||a};void 0!==o&&(l.alt=o),void 0!==i&&(l.crossOrigin=i),void 0!==s&&(l.zIndex=s);const c=new Re(t,e,l);c.addTo(m),f.current=c,b.current=e,c.on("click",()=>{_.current+=1,C({n_clicks:_.current}),w.current&&!T.current&&A(!0)});const h=()=>{const t=f.current,e=t&&t._image;if(!e||!m)return;const n=b.current,o=n[0][0],i=n[0][1],r=n[1][0],s=n[1][1],a=m.latLngToLayerPoint([r,i]),l=m.latLngToLayerPoint([o,s]),c=Math.abs(l.x-a.x),h=Math.abs(l.y-a.y),d=Oi(x.current)*c,u=Ii(x.current)*h;e.style.transformOrigin=`${d}px ${u}px`,e.style.transform=`translate3d(${Math.round(a.x)}px, ${Math.round(a.y)}px, 0) rotate(${v.current}deg)`;const p=g.current;if(p){const t=m.latLngToContainerPoint([r,i]),e=m.latLngToContainerPoint([o,s]),n=e.x-t.x,a=e.y-t.y;p.style.left=`${t.x}px`,p.style.top=`${t.y}px`,p.style.width=`${n}px`,p.style.height=`${a}px`,p.style.transformOrigin=`${Oi(x.current)*n}px ${Ii(x.current)*a}px`,p.style.transform=`rotate(${v.current}deg)`}};return z.current=h,h(),requestAnimationFrame(h),m.on("move zoom zoomend viewreset",h),()=>{try{m.off("move zoom zoomend viewreset",h)}catch(t){}try{c.remove()}catch(t){}f.current=null}},[m]),(0,c.useEffect)(()=>{const e=f.current;e&&t&&"function"==typeof e.setUrl&&e.setUrl(t)},[t]),(0,c.useEffect)(()=>{const t=f.current;t&&JSON.stringify(e)!==L.current&&(L.current=JSON.stringify(e),b.current=e,"function"==typeof t.setBounds&&t.setBounds(e),z.current())},[e]),(0,c.useEffect)(()=>{const t=f.current;t&&"function"==typeof t.setOpacity&&t.setOpacity(n)},[n]),(0,c.useEffect)(()=>{const t=f.current;t&&"function"==typeof t.setZIndex&&void 0!==s&&t.setZIndex(s)},[s]),(0,c.useEffect)(()=>{z.current()},[d,u,k]),(0,c.useEffect)(()=>{void 0!==l&&l!==E.current&&(E.current=l,P(l))},[l]),(0,c.useEffect)(()=>{if(!m)return;const t=()=>{T.current&&A(!1)};m.on("click",t);const e=t=>{t&&t.source!==f.current&&T.current&&A(!1)};return m.on("dl2:tm-select",e),()=>{m.off("click",t);try{m.off("dl2:tm-select",e)}catch(t){}}},[m]),(0,c.useEffect)(()=>{const t=f.current,e=t&&t._image;e&&(e.classList.toggle("dl2-img-editable-target",!!a),e.style.cursor=a?"move":"")},[a,k]);const M=()=>{const t=b.current,e=[[+t[0][0].toFixed(6),+t[0][1].toFixed(6)],[+t[1][0].toFixed(6),+t[1][1].toFixed(6)]];L.current=JSON.stringify(e),y.current+=1,C({bounds:e,n_transforms:y.current})},S=()=>{const t=e=>{e.stopPropagation(),document.removeEventListener("click",t,!0)};document.addEventListener("click",t,!0),setTimeout(()=>document.removeEventListener("click",t,!0),80)},O=(t,e)=>{var n;if(t.stopPropagation(),t.preventDefault(),!m)return;try{null===(n=m.dragging)||void 0===n||n.disable()}catch(t){}const o=f.current,i=m.getContainer().getBoundingClientRect(),r=b.current,s=r[0][0],a=r[0][1],l=r[1][0],c=r[1][1];if("move"===e){const e=(t,e)=>m.containerPointToLatLng([t-i.left,e-i.top]),n=e(t.clientX,t.clientY);let r=!1;const h=t=>{const i=e(t.clientX,t.clientY),h=i.lat-n.lat,d=i.lng-n.lng;Math.abs(h)+Math.abs(d)>1e-9&&(r=!0);const u=[[s+h,a+d],[l+h,c+d]];b.current=u;try{o.setBounds(u)}catch(t){}z.current()},d=()=>{var t;window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",d);try{null===(t=m.dragging)||void 0===t||t.enable()}catch(t){}r&&(S(),M())};return window.addEventListener("pointermove",h),void window.addEventListener("pointerup",d)}const h=Oi(x.current),d=Ii(x.current),u=l-d*(l-s),p=a+h*(c-a),g=m.latLngToContainerPoint([u,p]),_=i.left+g.x,y=i.top+g.y,w=m.latLngToContainerPoint([l,a]),L=m.latLngToContainerPoint([s,c]),k=i.left+(w.x+L.x)/2,P=i.top+(w.y+L.y)/2,T=Math.hypot(t.clientX-k,t.clientY-P)||1,E=(t,e)=>180*Math.atan2(e-y,t-_)/Math.PI+90,A=E(t.clientX,t.clientY),O=v.current,I=t=>{if("resize"===e){const e=Math.hypot(t.clientX-k,t.clientY-P),n=Math.max(.05,Math.min(40,e/T)),i=[[u+(s-u)*n,p+(a-p)*n],[u+(l-u)*n,p+(c-p)*n]];b.current=i;try{o.setBounds(i)}catch(t){}z.current()}else{let e=Math.round(O+(E(t.clientX,t.clientY)-A));t.shiftKey&&(e=15*Math.round(e/15)),v.current=e,z.current()}},Z=()=>{var t;window.removeEventListener("pointermove",I),window.removeEventListener("pointerup",Z);try{null===(t=m.dragging)||void 0===t||t.enable()}catch(t){}S(),"resize"===e?M():C({rotation:v.current})};window.addEventListener("pointermove",I),window.addEventListener("pointerup",Z)};return m&&a&&k?Si().createPortal(h().createElement("div",{className:"dl2-img-chrome",ref:g},h().createElement("div",{className:"dl2-img-body",title:"Drag to move",onPointerDown:t=>O(t,"move")}),h().createElement("span",{className:"dl2-img-rotate-line"}),h().createElement("span",{className:"dl2-img-handle dl2-img-handle-rotate",title:"Drag to rotate (hold Shift to snap 15°)",onPointerDown:t=>O(t,"rotate")}),h().createElement("span",{className:"dl2-img-handle dl2-img-handle-resize",title:"Drag to resize — this dot also marks the anchor point",style:Ri(u),onPointerDown:t=>O(t,"resize")})),m.getContainer()):null};return l})());
\ No newline at end of file
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.dash_leaflet2=e(require("react"),require("react-dom")):t.dash_leaflet2=e(t.React,t.ReactDOM)}(self,(t,e)=>(()=>{"use strict";var n={81(t,e,n){n.d(e,{A:()=>m});var o=n(601),i=n.n(o),r=n(314),s=n.n(r),a=n(417),l=n.n(a),c=new URL(n(709),n.b),h=new URL(n(510),n.b),d=s()(i()),u=l()(c),p=l()(h);d.push([t.id,`/* required styles */\n\n.leaflet-pane,\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-tile-container,\n.leaflet-pane > svg,\n.leaflet-pane > canvas,\n.leaflet-zoom-box,\n.leaflet-image-layer,\n.leaflet-layer {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\twidth:100%;\n\t}\n.leaflet-container {\n\toverflow: hidden;\n\t}\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\tuser-select: none;\n\t-webkit-user-drag: none;\n\t}\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\n.leaflet-safari .leaflet-tile {\n\timage-rendering: -webkit-optimize-contrast;\n\t}\n/* hack that prevents hw layers "stretching" when loading new tiles */\n.leaflet-safari .leaflet-tile-container {\n\twidth: 1600px;\n\theight: 1600px;\n\t-webkit-transform-origin: 0 0;\n\t}\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\tdisplay: block;\n\t}\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\n.leaflet-container .leaflet-overlay-pane svg {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\t}\n.leaflet-container .leaflet-marker-pane img,\n.leaflet-container .leaflet-shadow-pane img,\n.leaflet-container .leaflet-tile-pane img,\n.leaflet-container img.leaflet-image-layer,\n.leaflet-container .leaflet-tile {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\twidth: auto;\n\tpadding: 0;\n\t}\n.leaflet-container img.leaflet-tile {\n\t/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */\n\tmix-blend-mode: plus-lighter;\n\t}\n\n.leaflet-container.leaflet-touch-zoom {\n\ttouch-action: pan-x pan-y;\n\t}\n.leaflet-container.leaflet-touch-drag {\n\t/* Fallback for FF which doesn't support pinch-zoom */\n\ttouch-action: none;\n\ttouch-action: pinch-zoom;\n}\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\n\ttouch-action: none;\n}\n.leaflet-container {\n\t-webkit-tap-highlight-color: transparent;\n}\n.leaflet-container a {\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\n}\n.leaflet-tile {\n\tvisibility: hidden;\n\t}\n.leaflet-tile-loaded {\n\tvisibility: inherit;\n\t}\n.leaflet-zoom-box {\n\twidth: 0;\n\theight: 0;\n\tbox-sizing: border-box;\n\tz-index: 800;\n\t}\n\n.leaflet-pane { z-index: 400; }\n\n.leaflet-tile-pane { z-index: 200; }\n.leaflet-overlay-pane { z-index: 400; }\n.leaflet-shadow-pane { z-index: 500; }\n.leaflet-marker-pane { z-index: 600; }\n.leaflet-tooltip-pane { z-index: 650; }\n.leaflet-popup-pane { z-index: 700; }\n\n.leaflet-map-pane canvas { z-index: 100; }\n.leaflet-map-pane svg { z-index: 200; }\n\n\n/* control positioning */\n\n.leaflet-control {\n\tposition: relative;\n\tz-index: 800;\n\tpointer-events: auto;\n\t}\n.leaflet-top,\n.leaflet-bottom {\n\tposition: absolute;\n\tz-index: 1000;\n\tpointer-events: none;\n\t}\n.leaflet-top {\n\ttop: 0;\n\t}\n.leaflet-right {\n\tright: 0;\n\t}\n.leaflet-bottom {\n\tbottom: 0;\n\t}\n.leaflet-left {\n\tleft: 0;\n\t}\n.leaflet-control {\n\tfloat: left;\n\tclear: both;\n\t}\n.leaflet-right .leaflet-control {\n\tfloat: right;\n\t}\n.leaflet-top .leaflet-control {\n\tmargin-top: 10px;\n\t}\n.leaflet-bottom .leaflet-control {\n\tmargin-bottom: 10px;\n\t}\n.leaflet-left .leaflet-control {\n\tmargin-left: 10px;\n\t}\n.leaflet-right .leaflet-control {\n\tmargin-right: 10px;\n\t}\n\n\n/* zoom and fade animations */\n\n.leaflet-fade-anim .leaflet-popup {\n\topacity: 0;\n\ttransition: opacity 0.2s linear;\n\t}\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\n\topacity: 1;\n\t}\n.leaflet-zoom-animated {\n\ttransform-origin: 0 0;\n\t}\nsvg.leaflet-zoom-animated {\n\twill-change: transform;\n}\n\n.leaflet-zoom-anim .leaflet-zoom-animated {\n\ttransition: transform 0.25s cubic-bezier(0,0,0.25,1);\n\t}\n.leaflet-zoom-anim .leaflet-tile,\n.leaflet-pan-anim .leaflet-tile {\n\ttransition: none;\n\t}\n\n.leaflet-zoom-anim .leaflet-zoom-hide {\n\tvisibility: hidden;\n\t}\n\n\n/* cursors */\n\n.leaflet-interactive {\n\tcursor: pointer;\n\t}\n.leaflet-grab {\n\tcursor: grab;\n\t}\n.leaflet-crosshair,\n.leaflet-crosshair .leaflet-interactive {\n\tcursor: crosshair;\n\t}\n.leaflet-popup-pane,\n.leaflet-control {\n\tcursor: auto;\n\t}\n.leaflet-dragging .leaflet-grab,\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\n.leaflet-dragging .leaflet-marker-draggable {\n\tcursor: grabbing;\n\t}\n\n/* marker & overlays interactivity */\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-image-layer,\n.leaflet-pane > svg path,\n.leaflet-tile-container {\n\tpointer-events: none;\n\t}\n\n.leaflet-marker-icon.leaflet-interactive,\n.leaflet-image-layer.leaflet-interactive,\n.leaflet-pane > svg path.leaflet-interactive,\nsvg.leaflet-image-layer.leaflet-interactive path {\n\tpointer-events: auto;\n\t}\n\n/* visual tweaks */\n\n.leaflet-container {\n\tbackground: #ddd;\n\toutline-offset: 1px;\n\t}\n.leaflet-container a {\n\tcolor: #0078A8;\n\t}\n/* prevent showing outline-box on Chromium when clicking on a vector with a tooltip */\npath.leaflet-interactive:focus:not(:focus-visible) {\n\toutline: 0;\n\t}\n\n.leaflet-zoom-box {\n\tborder: 2px dotted #38f;\n\tbackground: rgba(255,255,255,0.5);\n\t}\n\n\n/* general typography */\n.leaflet-container {\n\tfont-family: "Helvetica Neue", Arial, Helvetica, sans-serif;\n\tfont-size: 12px;\n\tfont-size: 0.75rem;\n\tline-height: 1.5;\n\t}\n\n\n/* general toolbar styles */\n\n.leaflet-bar {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\n\tborder-radius: 4px;\n\t}\n.leaflet-bar a {\n\tbackground-color: #fff;\n\tborder-bottom: 1px solid #ccc;\n\twidth: 26px;\n\theight: 26px;\n\tline-height: 26px;\n\tdisplay: block;\n\ttext-align: center;\n\ttext-decoration: none;\n\tcolor: black;\n\t}\n.leaflet-bar a,\n.leaflet-control-layers-toggle {\n\tbackground-position: 50% 50%;\n\tbackground-repeat: no-repeat;\n\tdisplay: block;\n\t}\n.leaflet-bar a:hover,\n.leaflet-bar a:focus {\n\tbackground-color: #f4f4f4;\n\t}\n.leaflet-bar a:first-child {\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\t}\n.leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tborder-bottom: none;\n\t}\n.leaflet-bar a.leaflet-disabled {\n\tcursor: default;\n\tbackground-color: #f4f4f4;\n\tcolor: #bbb;\n\t}\n\n.leaflet-touch .leaflet-bar a {\n\twidth: 30px;\n\theight: 30px;\n\tline-height: 30px;\n\t}\n.leaflet-touch .leaflet-bar a:first-child {\n\tborder-top-left-radius: 2px;\n\tborder-top-right-radius: 2px;\n\t}\n.leaflet-touch .leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 2px;\n\tborder-bottom-right-radius: 2px;\n\t}\n\n/* zoom control */\n\n.leaflet-control-zoom-in,\n.leaflet-control-zoom-out {\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\n\ttext-indent: 1px;\n\t}\n\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\n\tfont-size: 22px;\n\t}\n\n\n/* layers control */\n\n.leaflet-control-layers {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\n\tbackground: #fff;\n\tborder-radius: 5px;\n\t}\n.leaflet-control-layers-toggle {\n\tbackground-image: url(${u});\n\twidth: 36px;\n\theight: 36px;\n\t}\n.leaflet-touch .leaflet-control-layers-toggle {\n\twidth: 44px;\n\theight: 44px;\n\t}\n.leaflet-control-layers .leaflet-control-layers-list,\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\n\tdisplay: none;\n\t}\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\n\tdisplay: block;\n\tposition: relative;\n\t}\n.leaflet-control-layers-list {\n\tborder: 0;\n\tmargin: 0;\n\tpadding: 0;\n\t}\n.leaflet-control-layers-expanded {\n\tpadding: 6px 10px 6px 6px;\n\tcolor: #333;\n\tbackground: #fff;\n\t}\n.leaflet-control-layers-scrollbar {\n\toverflow-y: scroll;\n\toverflow-x: hidden;\n\tpadding-right: 5px;\n\t}\n.leaflet-control-layers-selector {\n\tmargin-top: 2px;\n\tposition: relative;\n\ttop: 1px;\n\t}\n.leaflet-control-layers label {\n\tdisplay: block;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\t}\n.leaflet-control-layers-separator {\n\theight: 0;\n\tborder-top: 1px solid #ddd;\n\tmargin: 5px -10px 5px -6px;\n\t}\n\n/* Default icon URLs */\n.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */\n\tbackground-image: url(${p});\n\t}\n\n\n/* attribution and scale controls */\n\n.leaflet-container .leaflet-control-attribution {\n\tbackground: #fff;\n\tbackground: rgba(255, 255, 255, 0.8);\n\tmargin: 0;\n\t}\n.leaflet-control-attribution,\n.leaflet-control-scale-line {\n\tpadding: 0 5px;\n\tcolor: #333;\n\tline-height: 1.4;\n\t}\n.leaflet-control-attribution a {\n\ttext-decoration: none;\n\t}\n.leaflet-control-attribution a:hover,\n.leaflet-control-attribution a:focus {\n\ttext-decoration: underline;\n\t}\n.leaflet-attribution-flag {\n\tdisplay: inline !important;\n\tvertical-align: baseline !important;\n\twidth: 1em;\n\theight: 0.6669em;\n\tmargin-right: 0.277em;\n\t}\n.leaflet-left .leaflet-control-scale {\n\tmargin-left: 5px;\n\t}\n.leaflet-bottom .leaflet-control-scale {\n\tmargin-bottom: 5px;\n\t}\n.leaflet-control-scale-line {\n\tborder: 2px solid #777;\n\tborder-top: none;\n\tline-height: 1.1;\n\tpadding: 2px 5px 1px;\n\twhite-space: nowrap;\n\tbox-sizing: border-box;\n\tbackground: rgba(255, 255, 255, 0.8);\n\ttext-shadow: 1px 1px #fff;\n\t}\n.leaflet-control-scale-line:not(:first-child) {\n\tborder-top: 2px solid #777;\n\tborder-bottom: none;\n\tmargin-top: -2px;\n\t}\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\n\tborder-bottom: 2px solid #777;\n\t}\n\n.leaflet-touch .leaflet-control-attribution,\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tbox-shadow: none;\n\t}\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tborder: 2px solid rgba(0,0,0,0.2);\n\tbackground-clip: padding-box;\n\t}\n\n\n/* popup */\n\n.leaflet-popup {\n\tposition: absolute;\n\ttext-align: center;\n\tmargin-bottom: 20px;\n\t}\n.leaflet-popup-content-wrapper {\n\tpadding: 1px;\n\ttext-align: left;\n\tborder-radius: 12px;\n\t}\n.leaflet-popup-content {\n\tmargin: 13px 24px 13px 20px;\n\tline-height: 1.3;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\tmin-height: 1px;\n\t}\n.leaflet-popup-content p {\n\tmargin: 17px 0;\n\tmargin: 1.3em 0;\n\t}\n.leaflet-popup-tip-container {\n\twidth: 40px;\n\theight: 20px;\n\tposition: absolute;\n\tleft: 50%;\n\tmargin-top: -1px;\n\tmargin-left: -20px;\n\toverflow: hidden;\n\tpointer-events: none;\n\t}\n.leaflet-popup-tip {\n\twidth: 17px;\n\theight: 17px;\n\tpadding: 1px;\n\n\tmargin: -10px auto 0;\n\tpointer-events: auto;\n\n\ttransform: rotate(45deg);\n\t}\n.leaflet-popup-content-wrapper,\n.leaflet-popup-tip {\n\tbackground: white;\n\tcolor: #333;\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\n\t}\n.leaflet-container a.leaflet-popup-close-button {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tborder: none;\n\ttext-align: center;\n\twidth: 24px;\n\theight: 24px;\n\tfont: 16px/24px Tahoma, Verdana, sans-serif;\n\tcolor: #757575;\n\ttext-decoration: none;\n\tbackground: transparent;\n\t}\n.leaflet-container a.leaflet-popup-close-button:hover,\n.leaflet-container a.leaflet-popup-close-button:focus {\n\tcolor: #585858;\n\t}\n.leaflet-popup-scrolled {\n\toverflow: auto;\n\t}\n\n/* div icon */\n\n.leaflet-div-icon {\n\tbackground: #fff;\n\tborder: 1px solid #666;\n\t}\n\n\n/* Tooltip */\n/* Base styles for the element that has a tooltip */\n.leaflet-tooltip {\n\tposition: absolute;\n\tpadding: 6px;\n\tbackground-color: #fff;\n\tborder: 1px solid #fff;\n\tborder-radius: 3px;\n\tcolor: #222;\n\twhite-space: nowrap;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\n\t}\n.leaflet-tooltip.leaflet-interactive {\n\tcursor: pointer;\n\tpointer-events: auto;\n\t}\n.leaflet-tooltip-top:before,\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\tposition: absolute;\n\tpointer-events: none;\n\tborder: 6px solid transparent;\n\tbackground: transparent;\n\tcontent: "";\n\t}\n\n/* Directions */\n\n.leaflet-tooltip-bottom {\n\tmargin-top: 6px;\n}\n.leaflet-tooltip-top {\n\tmargin-top: -6px;\n}\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-top:before {\n\tleft: 50%;\n\tmargin-left: -6px;\n\t}\n.leaflet-tooltip-top:before {\n\tbottom: 0;\n\tmargin-bottom: -12px;\n\tborder-top-color: #fff;\n\t}\n.leaflet-tooltip-bottom:before {\n\ttop: 0;\n\tmargin-top: -12px;\n\tmargin-left: -6px;\n\tborder-bottom-color: #fff;\n\t}\n.leaflet-tooltip-left {\n\tmargin-left: -6px;\n}\n.leaflet-tooltip-right {\n\tmargin-left: 6px;\n}\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\ttop: 50%;\n\tmargin-top: -6px;\n\t}\n.leaflet-tooltip-left:before {\n\tright: 0;\n\tmargin-right: -12px;\n\tborder-left-color: #fff;\n\t}\n.leaflet-tooltip-right:before {\n\tleft: 0;\n\tmargin-left: -12px;\n\tborder-right-color: #fff;\n\t}\n\n/* Printing */\n\n@media print {\n\t/* Prevent printers from removing background-images of controls. */\n\t.leaflet-control {\n\t\t-webkit-print-color-adjust: exact;\n\t\tprint-color-adjust: exact;\n\t}\n}\n`,""]);const m=d},711(t,e,n){n.d(e,{A:()=>a});var o=n(601),i=n.n(o),r=n(314),s=n.n(r)()(i());s.push([t.id,"/* Emoji / Iconify markers use a DivIcon; strip Leaflet's default white box + border. */\n.dl2-div-icon {\n background: transparent;\n border: none;\n}\n.dl2-div-icon iconify-icon {\n vertical-align: top;\n}\n",""]);const a=s},246(t,e,n){n.d(e,{A:()=>a});var o=n(601),i=n.n(o),r=n(314),s=n.n(r)()(i());s.push([t.id,"/* ============================================================================\n * dash-leaflet2 — TextMarker (editable on-map captions)\n *\n * The marker icon element is a 0×0 anchor point; the text box is absolutely\n * positioned inside it (and translated per `anchor`). Selection chrome and the\n * resize / rotate handles live on the box so they rotate with the text; the\n * style toolbar is portaled into the map container and stays axis-aligned.\n * ========================================================================== */\n\n/* The DivIcon shell — sized to its content (NOT 0×0, or Leaflet's drag never gets a\n pointerdown on it). We carry the anchor offset + rotation in the inline transform. */\n.dl2-text-marker-icon {\n background: transparent;\n border: none;\n overflow: visible;\n width: max-content !important;\n height: auto !important;\n}\n\n/* --- the text box (background pill + chrome; fills the icon) -------------- */\n.dl2-tm-box {\n position: relative;\n display: inline-block;\n cursor: move;\n user-select: none;\n -webkit-user-select: none;\n transition: box-shadow 0.12s ease;\n}\n\n.dl2-tm-box.is-selected {\n box-shadow: 0 0 0 1.5px rgba(56, 132, 255, 0.95);\n}\n\n.dl2-tm-box.is-editing {\n cursor: text;\n box-shadow: 0 0 0 1.5px rgba(56, 132, 255, 0.95),\n 0 6px 22px -6px rgba(0, 0, 0, 0.45);\n}\n\n/* --- the editable typography (inner) ------------------------------------- */\n.dl2-tm-text {\n white-space: pre;\n outline: none;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);\n /* A label with no background still needs a hit area for clicks/drags. */\n min-width: 0.5em;\n min-height: 1em;\n}\n\n.dl2-tm-box.is-editing .dl2-tm-text {\n cursor: text;\n user-select: text;\n -webkit-user-select: text;\n}\n\n.dl2-tm-text.is-empty::after {\n content: 'Double-click to edit';\n opacity: 0.45;\n font-style: italic;\n text-shadow: none;\n}\n\n/* --- handles (resize / rotate) ------------------------------------------- */\n.dl2-tm-handle {\n position: absolute;\n width: 12px;\n height: 12px;\n background: #ffffff;\n border: 1.5px solid rgba(56, 132, 255, 0.95);\n border-radius: 50%;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);\n z-index: 2;\n}\n\n.dl2-tm-handle-resize {\n right: -7px;\n bottom: -7px;\n cursor: nwse-resize;\n}\n\n.dl2-tm-handle-rotate {\n left: 50%;\n top: -26px;\n margin-left: -6px;\n cursor: grab;\n background: rgba(56, 132, 255, 0.95);\n border-color: #ffffff;\n}\n.dl2-tm-handle-rotate:active {\n cursor: grabbing;\n}\n\n.dl2-tm-rotate-line {\n position: absolute;\n left: 50%;\n top: -20px;\n width: 1.5px;\n height: 20px;\n margin-left: -0.75px;\n background: rgba(56, 132, 255, 0.95);\n z-index: 1;\n}\n\n/* --- the contextual style toolbar (portaled into the map container) ------- */\n.dl2-tm-toolbar {\n position: absolute;\n top: 12px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 1200;\n display: flex;\n align-items: center;\n gap: 5px;\n padding: 6px 8px;\n border-radius: 12px;\n font-family: system-ui, -apple-system, sans-serif;\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 72%, transparent);\n -webkit-backdrop-filter: blur(20px) saturate(180%);\n backdrop-filter: blur(20px) saturate(180%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 60%, transparent);\n box-shadow: 0 8px 28px -6px rgba(0, 0, 0, 0.28),\n inset 0 1px 0 rgba(255, 255, 255, 0.3);\n color: var(--mantine-color-text, #1a1b1e);\n user-select: none;\n}\n\n.dl2-tm-toolbar button,\n.dl2-tm-toolbar select,\n.dl2-tm-toolbar input {\n font-family: inherit;\n color: inherit;\n}\n\n.dl2-tm-tb-select {\n height: 28px;\n border-radius: 7px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n background: color-mix(in srgb, var(--mantine-color-body, #fff) 60%, transparent);\n padding: 0 6px;\n font-size: 12.5px;\n cursor: pointer;\n max-width: 96px;\n}\n\n.dl2-tm-tb-num {\n display: flex;\n align-items: center;\n gap: 2px;\n height: 28px;\n border-radius: 7px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n background: color-mix(in srgb, var(--mantine-color-body, #fff) 60%, transparent);\n padding: 0 3px;\n}\n\n.dl2-tm-tb-step {\n border: none;\n background: transparent;\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n width: 18px;\n height: 22px;\n border-radius: 5px;\n opacity: 0.75;\n}\n.dl2-tm-tb-step:hover {\n background: rgba(0, 0, 0, 0.08);\n opacity: 1;\n}\n\n.dl2-tm-tb-size {\n width: 40px;\n border: none;\n background: transparent;\n text-align: center;\n font-size: 12.5px;\n -moz-appearance: textfield;\n}\n.dl2-tm-tb-size::-webkit-outer-spin-button,\n.dl2-tm-tb-size::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.dl2-tm-tb-rot-ico {\n font-size: 13px;\n opacity: 0.7;\n padding-left: 3px;\n}\n\n.dl2-tm-tb-btn {\n width: 28px;\n height: 28px;\n border-radius: 7px;\n border: 1px solid transparent;\n background: transparent;\n cursor: pointer;\n font-size: 14px;\n line-height: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.dl2-tm-tb-btn:hover {\n background: rgba(0, 0, 0, 0.08);\n}\n.dl2-tm-tb-btn.active {\n background: rgba(56, 132, 255, 0.18);\n border-color: rgba(56, 132, 255, 0.5);\n color: var(--mantine-color-blue-7, #1c66d6);\n}\n\n.dl2-tm-tb-sep {\n width: 1px;\n height: 20px;\n background: rgba(0, 0, 0, 0.12);\n margin: 0 1px;\n}\n\n/* Color swatch: a labeled tile that opens the native color picker. */\n.dl2-tm-tb-swatch {\n position: relative;\n width: 28px;\n height: 28px;\n border-radius: 7px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n cursor: pointer;\n overflow: hidden;\n display: inline-flex;\n align-items: flex-end;\n justify-content: center;\n}\n.dl2-tm-tb-swatch input[type='color'] {\n position: absolute;\n inset: 0;\n opacity: 0;\n cursor: pointer;\n border: none;\n padding: 0;\n}\n.dl2-tm-tb-swatch-ink {\n position: absolute;\n left: 3px;\n right: 3px;\n top: 3px;\n height: 13px;\n border-radius: 3px;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);\n}\n.dl2-tm-tb-swatch-bg {\n background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),\n linear-gradient(-45deg, #ccc 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, #ccc 75%),\n linear-gradient(-45deg, transparent 75%, #ccc 75%);\n background-size: 8px 8px;\n background-position: 0 0, 0 4px, 4px -4px, -4px 0;\n}\n.dl2-tm-tb-swatch-label {\n position: relative;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n padding-bottom: 2px;\n opacity: 0.8;\n}\n.dl2-tm-tb-swatch.is-off .dl2-tm-tb-swatch-ink {\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);\n}\n",""]);const a=s},366(t,e,n){n.d(e,{A:()=>a});var o=n(601),i=n.n(o),r=n(314),s=n.n(r)()(i());s.push([t.id,"/* ============================================================================\n * dash-leaflet2 — liquid-glass theme for Leaflet UI\n *\n * Apple-style glassmorphism (backdrop-blur + translucent fill + inner top\n * highlight) for tooltips, popups, zoom controls, and attribution. Theme-aware\n * via DMC `--mantine-color-*` CSS variables, with fallbacks so non-DMC apps\n * still get a sensible light/dark look. Loaded after leaflet.css.\n * ========================================================================== */\n\n/* --- STACKING CONTEXT ----------------------------------------------------- */\n/* Leaflet's bundled CSS pushes panes to z-index 200–700 and .leaflet-top /\n .leaflet-bottom (the control containers) to z-index 1000, with no z-index on\n .leaflet-container itself. Those internal z-indexes then compete with anything\n on the page — notably a DMC Popover whose portaled dropdown defaults to\n z-index 300, which gets buried under the map's controls. Setting the\n container to z-index 0 makes it a stacking context that confines all the\n leaflet z-indexes within itself, so popovers / modals / overlays render\n above the map as expected. */\n.leaflet-container {\n z-index: 0;\n}\n\n/* --- TOOLTIP -------------------------------------------------------------- */\n.leaflet-tooltip {\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 62%, transparent);\n -webkit-backdrop-filter: blur(20px) saturate(180%);\n backdrop-filter: blur(20px) saturate(180%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 60%, transparent);\n color: var(--mantine-color-text, #1a1b1e);\n border-radius: 12px;\n padding: 6px 11px;\n font-weight: 500;\n font-size: 12.5px;\n letter-spacing: -0.005em;\n box-shadow:\n 0 6px 24px -4px rgba(0, 0, 0, 0.18),\n inset 0 1px 0 rgba(255, 255, 255, 0.28);\n white-space: nowrap;\n}\n/* Hide leaflet's default ::before tooltip tip — the flat glass card reads\n cleaner and the marker's tooltipAnchor already positions it correctly. */\n.leaflet-tooltip-top::before,\n.leaflet-tooltip-bottom::before,\n.leaflet-tooltip-left::before,\n.leaflet-tooltip-right::before {\n display: none;\n}\n\n/* --- POPUP ---------------------------------------------------------------- */\n/* dl2.Map wraps the leaflet map-pane in a `.dl2-rotation-wrapper` with\n `pointer-events: none` so map drags pass through to the container's pointerdown\n listener. Leaflet's interactive layers (`.leaflet-interactive`,\n `.leaflet-marker-icon.leaflet-interactive`) explicitly set `pointer-events: auto`\n to override that — but Leaflet 2's stock CSS does NOT set it on `.leaflet-popup`,\n so popup content (form widgets etc.) inherits `none` and becomes unclickable\n (clicks fall through and drag the map). Re-enable hit testing on the popup\n here; everything inside inherits `auto`. */\n.leaflet-popup {\n pointer-events: auto;\n}\n.leaflet-popup-content-wrapper {\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 65%, transparent);\n -webkit-backdrop-filter: blur(28px) saturate(180%);\n backdrop-filter: blur(28px) saturate(180%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 60%, transparent);\n color: var(--mantine-color-text, #1a1b1e);\n border-radius: 16px;\n padding: 2px;\n box-shadow:\n 0 12px 36px -6px rgba(0, 0, 0, 0.22),\n inset 0 1px 0 rgba(255, 255, 255, 0.30);\n}\n.leaflet-popup-content {\n margin: 12px 16px;\n font-size: 13px;\n line-height: 1.5;\n}\n.leaflet-popup-tip {\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 65%, transparent);\n -webkit-backdrop-filter: blur(28px) saturate(180%);\n backdrop-filter: blur(28px) saturate(180%);\n box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);\n}\n.leaflet-popup-close-button {\n color: var(--mantine-color-text, #1a1b1e) !important;\n opacity: 0.55;\n font-weight: 500;\n transition: opacity 0.15s;\n}\n.leaflet-popup-close-button:hover {\n opacity: 1;\n background: transparent !important;\n}\n\n/* --- ZOOM CONTROLS -------------------------------------------------------- */\n.leaflet-bar {\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 72%, transparent) !important;\n -webkit-backdrop-filter: blur(16px) saturate(170%);\n backdrop-filter: blur(16px) saturate(170%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 45%, transparent) !important;\n border-radius: 10px !important;\n box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.15);\n overflow: hidden;\n}\n.leaflet-bar a,\n.leaflet-bar a:link {\n background: transparent !important;\n color: var(--mantine-color-text, #1a1b1e) !important;\n border-bottom-color:\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 35%, transparent) !important;\n font-weight: 500;\n}\n.leaflet-bar a:hover {\n background: color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 60%, transparent) !important;\n}\n.leaflet-bar a.leaflet-disabled {\n opacity: 0.4;\n}\n\n/* --- LAYERS CONTROL ------------------------------------------------------- */\n.dl2-layers-control {\n /* The .leaflet-bar background/border come from the rule above; only the inner UI\n sizing needs styling here. */\n overflow: visible;\n}\n.dl2-layers-ui {\n font-size: 13px;\n line-height: 1.3;\n color: var(--mantine-color-text, #1a1b1e);\n}\n.dl2-layers-handle {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n background: transparent;\n border: 0;\n cursor: pointer;\n color: var(--mantine-color-text, #1a1b1e);\n font-size: 16px;\n}\n.dl2-layers-ui.collapsed .dl2-layers-body {\n display: none;\n}\n.dl2-layers-ui.open .dl2-layers-handle {\n display: none;\n}\n.dl2-layers-body {\n padding: 8px 10px 6px 10px;\n min-width: 140px;\n}\n.dl2-layer-row {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 2px 0;\n cursor: pointer;\n user-select: none;\n}\n.dl2-layer-row input {\n accent-color: var(--mantine-color-green-6, #2f9e44);\n margin: 0;\n}\n.dl2-layers-sep {\n border: 0;\n border-top: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 40%, transparent);\n margin: 6px 0;\n}\n\n/* --- EDIT CONTROL --------------------------------------------------------- */\n.dl2-edit-control {\n overflow: visible;\n}\n.dl2-edit-ui {\n position: relative; /* anchors the absolute .dl2-edit-actions fly-out */\n display: flex;\n flex-direction: column;\n padding: 4px;\n gap: 2px;\n}\n.dl2-edit-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--mantine-color-text, #1a1b1e);\n cursor: pointer;\n transition: background 0.12s, color 0.12s;\n}\n.dl2-edit-btn:hover {\n background:\n color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 60%, transparent);\n}\n.dl2-edit-btn.active {\n background:\n color-mix(in srgb, var(--mantine-color-green-6, #2f9e44) 22%, transparent);\n color: var(--mantine-color-green-6, #2f9e44);\n}\n.dl2-edit-btn.danger.active {\n background:\n color-mix(in srgb, var(--mantine-color-red-6, #fa5252) 22%, transparent);\n color: var(--mantine-color-red-6, #fa5252);\n}\n\n/* EditControl: allow the inline sub-toolbar to spill outside the .leaflet-bar's clip. */\n.dl2-edit-control { overflow: visible !important; }\n\n/* Subtle inline separator between Draw and Edit icons in the same column (no boxed section). */\n.dl2-edit-section + .dl2-edit-section {\n border-top: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 50%, transparent);\n margin-top: 4px;\n padding-top: 4px;\n}\n\n/* Contextual sub-toolbar — fly-out anchored to the right of the icon strip\n (matching the dash-leaflet UX), not stacked below it. */\n.dl2-edit-actions {\n position: absolute;\n top: 0;\n left: 100%;\n margin-left: 6px;\n display: flex;\n flex-direction: row;\n gap: 4px;\n padding: 5px 6px;\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 75%, transparent);\n -webkit-backdrop-filter: blur(16px) saturate(170%);\n backdrop-filter: blur(16px) saturate(170%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 45%, transparent);\n border-radius: 10px;\n box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.18);\n white-space: nowrap;\n z-index: 1000;\n}\n.dl2-edit-action-btn {\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 50%, transparent);\n background: transparent;\n color: var(--mantine-color-text, #1a1b1e);\n font-size: 11.5px;\n font-weight: 500;\n padding: 4px 8px;\n border-radius: 6px;\n cursor: pointer;\n line-height: 1.2;\n}\n.dl2-edit-action-btn:hover {\n background:\n color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 60%, transparent);\n}\n.dl2-edit-action-btn.primary {\n background:\n color-mix(in srgb, var(--mantine-color-green-6, #2f9e44) 18%, transparent);\n color: var(--mantine-color-green-6, #2f9e44);\n border-color:\n color-mix(in srgb, var(--mantine-color-green-6, #2f9e44) 40%, transparent);\n}\n.dl2-edit-action-btn.danger {\n background:\n color-mix(in srgb, var(--mantine-color-red-6, #fa5252) 18%, transparent);\n color: var(--mantine-color-red-6, #fa5252);\n border-color:\n color-mix(in srgb, var(--mantine-color-red-6, #fa5252) 40%, transparent);\n}\n\n/* Vertex handle shown on polyline/polygon vertices while in edit mode (draggable). */\n.dl2-vertex-handle {\n background: var(--mantine-color-body, #ffffff);\n border: 2px solid var(--mantine-color-green-6, #2f9e44);\n border-radius: 50%;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);\n cursor: grab;\n}\n.dl2-vertex-handle:active { cursor: grabbing; }\n\n/* Smaller white square shown at each placed vertex WHILE drawing (preview, not edit). */\n.dl2-vertex-preview {\n background: #ffffff;\n border: 1px solid #2f9e44;\n border-radius: 1px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);\n pointer-events: none;\n}\n\n/* Text-caption markers dropped by the EditControl `text` tool. The icon sizes to its\n content (like TextMarker's) so Leaflet's drag can grab it; the inner div is the styled,\n inline-editable caption. */\n.dl2-edit-text-icon {\n background: transparent;\n border: none;\n overflow: visible;\n width: max-content !important;\n height: auto !important;\n}\n.dl2-edit-text {\n white-space: pre;\n cursor: move;\n outline: none;\n line-height: 1.15;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);\n min-width: 0.4em;\n min-height: 1em;\n}\n.dl2-edit-text.is-editing {\n cursor: text;\n user-select: text;\n -webkit-user-select: text;\n box-shadow: 0 0 0 1.5px rgba(56, 132, 255, 0.95), 0 6px 22px -6px rgba(0, 0, 0, 0.45);\n border-radius: 4px;\n padding: 0 2px;\n}\n\n/* --- editable ImageOverlay transform chrome (mirrors the TextMarker handles) --- */\n/* A selection box drawn over the image's screen rect; rotated about the anchor. The chrome\n itself passes pointer events through (only the handles are interactive) so the image body\n still receives drag-to-move. */\n.dl2-img-chrome {\n position: absolute;\n pointer-events: none;\n box-shadow: 0 0 0 1.5px rgba(56, 132, 255, 0.95);\n z-index: 650;\n}\n/* Transparent draggable surface filling the selection box — drag it to move the image\n (the Leaflet image element itself can't be the drag target without breaking the pointer\n stream, so the move grip lives here on the chrome). */\n.dl2-img-body {\n position: absolute;\n inset: 0;\n pointer-events: auto;\n cursor: move;\n z-index: 1;\n}\n.dl2-img-handle {\n position: absolute;\n width: 12px;\n height: 12px;\n background: #ffffff;\n border: 1.5px solid rgba(56, 132, 255, 0.95);\n border-radius: 50%;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);\n pointer-events: auto;\n z-index: 2;\n}\n.dl2-img-handle-resize { cursor: nwse-resize; }\n.dl2-img-handle-rotate {\n left: 50%;\n top: -26px;\n margin-left: -6px;\n cursor: grab;\n background: rgba(56, 132, 255, 0.95);\n border-color: #ffffff;\n}\n.dl2-img-handle-rotate:active { cursor: grabbing; }\n.dl2-img-rotate-line {\n position: absolute;\n left: 50%;\n top: -20px;\n width: 1.5px;\n height: 20px;\n margin-left: -0.75px;\n background: rgba(56, 132, 255, 0.95);\n pointer-events: none;\n}\n.dl2-img-editable .leaflet-image-layer { cursor: move; }\n\n/* Cursor-following guide tooltip that prompts the user during drawing\n (\"Click to start drawing\" → \"Click first point to close this shape\"). */\n.dl2-draw-tooltip {\n position: absolute;\n pointer-events: none;\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 75%, transparent);\n -webkit-backdrop-filter: blur(14px) saturate(170%);\n backdrop-filter: blur(14px) saturate(170%);\n border: 1px solid\n color-mix(in srgb, var(--mantine-color-default-border, rgba(0, 0, 0, 0.12)) 50%, transparent);\n color: var(--mantine-color-text, #1a1b1e);\n border-radius: 8px;\n padding: 4px 9px;\n font-size: 12px;\n font-weight: 500;\n box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15);\n white-space: nowrap;\n z-index: 700;\n transform: translate(12px, -4px); /* offset from cursor */\n}\n\n/* TileSelector — single toggle button (icon strip style, with active highlight). */\n.dl2-tile-selector-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: 0;\n background: transparent;\n color: var(--mantine-color-text, #1a1b1e);\n cursor: pointer;\n transition: background 0.12s, color 0.12s;\n}\n.dl2-tile-selector-btn:hover {\n background:\n color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 60%, transparent);\n}\n.dl2-tile-selector-btn.active {\n background:\n color-mix(in srgb, var(--mantine-color-blue-6, #228be6) 22%, transparent);\n color: var(--mantine-color-blue-6, #228be6);\n}\n\n/* EasyButton — single-button control. Uses .leaflet-bar styling for the container. */\n.dl2-easy-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: 0;\n background: transparent;\n color: var(--mantine-color-text, #1a1b1e);\n cursor: pointer;\n}\n.dl2-easy-button:hover {\n background:\n color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 60%, transparent);\n}\n\n/* --- MEASUREMENT TOOLTIPS (showMeasurementTooltips=True on dl2.EditControl) - */\n/* Permanent labels that follow shapes around. We override the default Leaflet\n tooltip padding/font down to make them less attention-grabbing — they're\n data overlays, not callouts. The optional name is rendered as . Zoom-\n gating is handled in EditControl.tsx (close below the draw zoom). */\n.leaflet-tooltip.dl2-measurement-tooltip {\n font-size: 11px;\n line-height: 1.3;\n padding: 3px 8px !important;\n text-align: center;\n pointer-events: none;\n}\n.leaflet-tooltip.dl2-measurement-tooltip b {\n font-weight: 600;\n color: var(--mantine-color-text, #1a1b1e);\n}\n\n/* --- MINIMAP -------------------------------------------------------------- */\n/* The control container itself uses the .leaflet-bar liquid-glass treatment from\n above for the rounded glass frame + border. The wrapper inside holds the second\n Leaflet map and the corner toggle. When .minimized, the wrapper shrinks to a\n single square so only the toggle button is left visible — clicking it expands. */\n.leaflet-control-minimap {\n overflow: hidden; /* clip the inner Leaflet map to the rounded frame */\n padding: 0;\n}\n.leaflet-control-minimap-wrapper {\n position: relative;\n /* width/height set inline (driven by props + minimized state); transitioned so\n toggling feels physical rather than snapping. */\n transition: width 180ms ease, height 180ms ease;\n}\n.leaflet-control-minimap-inner {\n width: 100%;\n height: 100%;\n /* The Leaflet 2 map mounted into this div renders its own .leaflet-container\n below; nothing more needed here. */\n}\n/* Toggle button: a small chevron the user clicks to collapse/expand. Position-aware\n so the chevron points toward the corner the minimap pins to. Class names mirror\n the dash-leaflet/leaflet-minimap convention. */\n.leaflet-control-minimap-toggle-display {\n position: absolute;\n width: 19px;\n height: 19px;\n border: 0;\n padding: 0;\n cursor: pointer;\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 88%, transparent);\n color: var(--mantine-color-text, #1a1b1e);\n border-radius: 4px;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n transition: background 0.12s;\n /* Two stacked diagonal arrows drawn with a gradient — points in/out of the\n minimap corner depending on `minimized`. */\n}\n.leaflet-control-minimap-toggle-display:hover {\n background: color-mix(in srgb, var(--mantine-color-default-hover, rgba(0, 0, 0, 0.06)) 100%, var(--mantine-color-body, #ffffff));\n}\n.leaflet-control-minimap-toggle-display::before {\n /* Chevron rendered with a single border + rotation — cheap and theme-aware. */\n content: '';\n display: block;\n width: 6px;\n height: 6px;\n border-right: 2px solid currentColor;\n border-bottom: 2px solid currentColor;\n}\n/* Per-corner toggle placement: the toggle button always lives on the side of the\n minimap that faces the main map (so it doesn't peek off-screen). The chevron\n rotates to point INWARD (collapse) when expanded, OUTWARD (expand) when not. */\n.leaflet-control-minimap-toggle-display-bottomright {\n top: 2px;\n left: 2px;\n}\n.leaflet-control-minimap-toggle-display-bottomleft {\n top: 2px;\n right: 2px;\n}\n.leaflet-control-minimap-toggle-display-topright {\n bottom: 2px;\n left: 2px;\n}\n.leaflet-control-minimap-toggle-display-topleft {\n bottom: 2px;\n right: 2px;\n}\n/* Expanded: chevron points toward the corner (collapse direction). */\n.leaflet-control-minimap-wrapper.expanded.pos-bottomright .leaflet-control-minimap-toggle-display::before {\n transform: rotate(135deg); /* points down-right -> toward bottom-right corner */\n margin: -2px 0 0 2px;\n}\n.leaflet-control-minimap-wrapper.expanded.pos-bottomleft .leaflet-control-minimap-toggle-display::before {\n transform: rotate(-135deg);\n margin: -2px 2px 0 0;\n}\n.leaflet-control-minimap-wrapper.expanded.pos-topright .leaflet-control-minimap-toggle-display::before {\n transform: rotate(45deg);\n margin: 2px 0 0 2px;\n}\n.leaflet-control-minimap-wrapper.expanded.pos-topleft .leaflet-control-minimap-toggle-display::before {\n transform: rotate(-45deg);\n margin: 2px 2px 0 0;\n}\n/* Minimized: chevron points AWAY from the corner (expand direction). */\n.leaflet-control-minimap-wrapper.minimized.pos-bottomright .leaflet-control-minimap-toggle-display::before {\n transform: rotate(-45deg);\n}\n.leaflet-control-minimap-wrapper.minimized.pos-bottomleft .leaflet-control-minimap-toggle-display::before {\n transform: rotate(45deg);\n}\n.leaflet-control-minimap-wrapper.minimized.pos-topright .leaflet-control-minimap-toggle-display::before {\n transform: rotate(-135deg);\n}\n.leaflet-control-minimap-wrapper.minimized.pos-topleft .leaflet-control-minimap-toggle-display::before {\n transform: rotate(135deg);\n}\n/* When minimized, the toggle button fills the small wrapper. */\n.leaflet-control-minimap-wrapper.minimized .leaflet-control-minimap-toggle-display {\n inset: 0;\n width: auto;\n height: auto;\n border-radius: 0;\n}\n\n/* --- ATTRIBUTION ---------------------------------------------------------- */\n.leaflet-control-attribution {\n background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 75%, transparent) !important;\n -webkit-backdrop-filter: blur(12px);\n backdrop-filter: blur(12px);\n color: var(--mantine-color-dimmed, #73726c) !important;\n border-radius: 8px 0 0 0;\n font-size: 10.5px;\n padding: 2px 8px;\n}\n.leaflet-control-attribution a {\n color: var(--mantine-color-blue-6, #228be6) !important;\n}\n\n/* --- GEOJSON CLUSTERS ----------------------------------------------------- */\n.dl2-cluster-bubble {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n color: var(--mantine-color-bright, #ffffff);\n font-weight: 600;\n font-size: 13px;\n background: color-mix(in srgb, var(--mantine-color-blue-6, #228be6) 80%, transparent);\n box-shadow:\n 0 4px 14px color-mix(in srgb, var(--mantine-color-blue-9, #1864ab) 38%, transparent),\n inset 0 1px 0 rgba(255, 255, 255, 0.35);\n -webkit-backdrop-filter: blur(10px);\n backdrop-filter: blur(10px);\n cursor: pointer;\n user-select: none;\n transition: transform 120ms ease;\n}\n.dl2-cluster-bubble:hover { transform: scale(1.05); }\n.dl2-cluster-32 { font-size: 11px; }\n.dl2-cluster-40 { font-size: 13px; }\n.dl2-cluster-48 { font-size: 15px; }\n.dl2-cluster-56 { font-size: 17px; }\n\n/* --- FULLSCREEN BUTTON ---------------------------------------------------- */\n.dl2-fullscreen-control { background: transparent; border: 0; }\n.dl2-fullscreen-button {\n display: flex !important;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n color: var(--mantine-color-text, #1a1b1e);\n background: transparent;\n}\n.dl2-fullscreen-button:hover { background: color-mix(in srgb, var(--mantine-color-body, #ffffff) 60%, transparent); }\n.dl2-fullscreen-button.dl2-fs-active { color: var(--mantine-color-blue-6, #228be6); }\n\n",""]);const a=s},314(t){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var a=0;a0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=r),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},417(t){t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},601(t){t.exports=function(t){return t[1]}},72(t){var e=[];function n(t){for(var n=-1,o=0;o0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(o,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113(t){t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},709(t){t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNiIgaGVpZ2h0PSIyNiI+PHBhdGggZmlsbD0iI2I5YjliOSIgZD0ibS4wMzIgMTcuMDU2IDEzLTggMTMgOC0xMyA4eiIvPjxwYXRoIGZpbGw9IiM3MzczNzMiIGQ9Im0uMDMyIDE3LjA1Ni0uMDMyLjkzIDEzIDggMTMtOCAuMDMyLS45My0xMyA4eiIvPjxwYXRoIGZpbGw9IiNjZGNkY2QiIGQ9Im0wIDEzLjA3NiAxMy04IDEzIDgtMTMgOHoiLz48cGF0aCBmaWxsPSIjNzM3MzczIiBkPSJNMCAxMy4wNzZ2LjkxbDEzIDggMTMtOHYtLjkxbC0xMyA4eiIvPjxwYXRoIGZpbGw9IiNlOWU5ZTkiIGZpbGwtb3BhY2l0eT0iLjU4NSIgc3Ryb2tlPSIjNzk3OTc5IiBzdHJva2Utd2lkdGg9Ii4xIiBkPSJtMCA4Ljk4NiAxMy04IDEzIDgtMTMgOC0xMy04Ii8+PHBhdGggZmlsbD0iIzczNzM3MyIgZD0iTTAgOC45ODZ2MWwxMyA4IDEzLTh2LTFsLTEzIDh6Ii8+PC9zdmc+"},510(t){t.exports="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="},295(e){e.exports=t},775(t){t.exports=e}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={id:t,exports:{}};return n[t](r,r.exports,i),r.exports}i.m=n,i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r,s=function(){var t=document.currentScript;if(!t){for(var e=document.getElementsByTagName("script"),n=[],o=0;oos,BaseLayer:()=>xr,Circle:()=>Gi,CircleMarker:()=>Ji,EasyButton:()=>qr,EditControl:()=>Ur,FeatureGroup:()=>rs,FullScreenControl:()=>as,GeoJSON:()=>gr,ImageOverlay:()=>ls,KeyboardControl:()=>ts,LayerGroup:()=>is,LayersControl:()=>vr,Map:()=>zn,Marker:()=>Ai,MiniMap:()=>es,Overlay:()=>wr,Polygon:()=>Vi,Polyline:()=>$i,Popup:()=>Ui,Rectangle:()=>Ki,ScaleControl:()=>ss,TextMarker:()=>Wi,TileLayer:()=>Cn,TileSelector:()=>Xr,Tooltip:()=>qi});var c=i(295),h=i.n(c);let d=0;function u(t){return"_leaflet_id"in t||(t._leaflet_id=++d),t._leaflet_id}function p(t,e,n){let o,i;function r(){o=!1,i&&(s.apply(n,i),i=!1)}function s(...s){o?i=s:(t.apply(n,s),setTimeout(r,e),o=!0)}return s}function m(t,e,n){const o=e[1],i=e[0],r=o-i;return t===o&&n?t:((t-i)%r+r)%r+i}function f(){return!1}function g(t,e){if(!1===e)return t;const n=10**(void 0===e?6:e);return Math.round(t*n)/n}function _(t){return t.trim().split(/\s+/)}function y(t,e){Object.hasOwn(t,"options")||(t.options=t.options?Object.create(t.options):{});for(const n in e)Object.hasOwn(e,n)&&(t.options[n]=e[n]);return t.options}const b=/\{ *([\w_ -]+) *\}/g;function v(t,e){return t.replace(b,(t,n)=>{let o=e[n];if(void 0===o)throw new Error(`No value provided for variable ${t}`);return"function"==typeof o&&(o=o(e)),o})}const x="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";var w={__proto__:null,emptyImageUrl:x,falseFn:f,formatNum:g,get lastId(){return d},setOptions:y,splitWords:_,stamp:u,template:v,throttle:p,wrapNum:m};class L{static extend({statics:t,includes:e,...n}){const o=class extends(this){};Object.setPrototypeOf(o,this);const i=this.prototype,r=o.prototype;if(t&&Object.assign(o,t),Array.isArray(e))for(const t of e)Object.assign(r,t);else e&&Object.assign(r,e);return Object.assign(r,n),r.options&&(r.options=i.options?Object.create(i.options):{},Object.assign(r.options,n.options)),r._initHooks=[],o}static include(t){const e=this.prototype.options;return Object.assign(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this}static setDefaultOptions(t){return y(this.prototype,t),this}static mergeOptions(t){return this.prototype.options??={},Object.assign(this.prototype.options,t),this}static addInitHook(t,...e){const n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks??=[],this.prototype._initHooks.push(n),this}constructor(...t){this._initHooksCalled=!1,y(this),this.initialize&&this.initialize(...t),this.callInitHooks()}initialize(){}callInitHooks(){if(this._initHooksCalled)return;const t=[];let e=this;for(;null!==(e=Object.getPrototypeOf(e));)t.push(e);t.reverse();for(const e of t)for(const t of e._initHooks??[])t.call(this);this._initHooksCalled=!0}}class k extends L{on(t,e,n){if("object"==typeof t)for(const[n,o]of Object.entries(t))this._on(n,o,e);else for(const o of _(t))this._on(o,e,n);return this}off(t,e,n){if(arguments.length)if("object"==typeof t)for(const[n,o]of Object.entries(t))this._off(n,o,e);else{const o=1===arguments.length;for(const i of _(t))o?this._off(i):this._off(i,e,n)}else delete this._events;return this}_on(t,e,n,o){if("function"!=typeof e)return void console.warn("wrong listener type: "+typeof e);if(!1!==this._listens(t,e,n))return;n===this&&(n=void 0);const i={fn:e,ctx:n};o&&(i.once=!0),this._events??={},this._events[t]??=[],this._events[t].push(i)}_off(t,e,n){if(!this._events)return;let o=this._events[t];if(!o)return;if(1===arguments.length){if(this._firingCount)for(const t of o)t.fn=f;return void delete this._events[t]}if("function"!=typeof e)return void console.warn("wrong listener type: "+typeof e);const i=this._listens(t,e,n);if(!1!==i){const e=o[i];this._firingCount&&(e.fn=f,this._events[t]=o=o.slice()),o.splice(i,1)}}fire(t,e,n){if(!this.listens(t,n))return this;const o={...e,type:t,target:this,sourceTarget:e?.sourceTarget||this};if(this._events){const e=this._events[t];if(e){this._firingCount=this._firingCount+1||1;for(const n of e){const e=n.fn;n.once&&this.off(t,e,n.ctx),e.call(n.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this}listens(t,e,n,o){"string"!=typeof t&&console.warn('"string" type argument expected');let i=e;if("function"!=typeof e&&(o=!!e,i=void 0,n=void 0),this._events?.[t]?.length&&!1!==this._listens(t,i,n))return!0;if(o)for(const i of Object.values(this._eventParents??{}))if(i.listens(t,e,n,o))return!0;return!1}_listens(t,e,n){if(!this._events)return!1;const o=this._events[t]??[];if(!e)return!!o.length;n===this&&(n=void 0);const i=o.findIndex(t=>t.fn===e&&t.ctx===n);return-1!==i&&i}once(t,e,n){if("object"==typeof t)for(const[n,o]of Object.entries(t))this._on(n,o,e,!0);else for(const o of _(t))this._on(o,e,n,!0);return this}addEventParent(t){return this._eventParents??={},this._eventParents[u(t)]=t,this}removeEventParent(t){return this._eventParents&&delete this._eventParents[u(t)],this}_propagateEvent(t){for(const e of Object.values(this._eventParents??{}))e.fire(t.type,{propagatedFrom:t.target,...t},!0)}}class P{constructor(t,e,n){if(!P.validate(t,e))throw new Error(`Invalid Point object: (${t}, ${e})`);let o,i;if(t instanceof P)return t;Array.isArray(t)?(o=t[0],i=t[1]):"object"==typeof t&&"x"in t&&"y"in t?(o=t.x,i=t.y):(o=t,i=e),this.x=n?Math.round(o):o,this.y=n?Math.round(i):i}static validate(t,e){return!!(t instanceof P||Array.isArray(t))||!!(t&&"object"==typeof t&&"x"in t&&"y"in t)||!(!t&&0!==t||!e&&0!==e)}clone(){const t=new P(0,0);return t.x=this.x,t.y=this.y,t}add(t){return this.clone()._add(new P(t))}_add(t){return this.x+=t.x,this.y+=t.y,this}subtract(t){return this.clone()._subtract(new P(t))}_subtract(t){return this.x-=t.x,this.y-=t.y,this}divideBy(t){return this.clone()._divideBy(t)}_divideBy(t){return this.x/=t,this.y/=t,this}multiplyBy(t){return this.clone()._multiplyBy(t)}_multiplyBy(t){return this.x*=t,this.y*=t,this}scaleBy(t){return new P(this.x*t.x,this.y*t.y)}unscaleBy(t){return new P(this.x/t.x,this.y/t.y)}round(){return this.clone()._round()}_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}floor(){return this.clone()._floor()}_floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.clone()._ceil()}_ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}trunc(){return this.clone()._trunc()}_trunc(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}distanceTo(t){const e=(t=new P(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)}equals(t){return(t=new P(t)).x===this.x&&t.y===this.y}contains(t){return t=new P(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)}toString(){return`Point(${g(this.x)}, ${g(this.y)})`}}class T{constructor(t,e){if(!t)return;if(t instanceof T)return t;const n=e?[t,e]:t;for(const t of n)this.extend(t)}extend(t){let e,n;if(!t)return this;if(t instanceof P||"number"==typeof t[0]||"x"in t)e=n=new P(t);else if(e=(t=new T(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this}getCenter(t){return new P((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)}getBottomLeft(){return new P(this.min.x,this.max.y)}getTopRight(){return new P(this.max.x,this.min.y)}getTopLeft(){return this.min}getBottomRight(){return this.max}getSize(){return this.max.subtract(this.min)}contains(t){let e,n;return(t="number"==typeof t[0]||t instanceof P?new P(t):new T(t))instanceof T?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y}intersects(t){t=new T(t);const e=this.min,n=this.max,o=t.min,i=t.max,r=i.x>=e.x&&o.x<=n.x,s=i.y>=e.y&&o.y<=n.y;return r&&s}overlaps(t){t=new T(t);const e=this.min,n=this.max,o=t.min,i=t.max,r=i.x>e.x&&o.xe.y&&o.y=e.lat&&i.lat<=n.lat&&o.lng>=e.lng&&i.lng<=n.lng}intersects(t){t=new E(t);const e=this._southWest,n=this._northEast,o=t.getSouthWest(),i=t.getNorthEast(),r=i.lat>=e.lat&&o.lat<=n.lat,s=i.lng>=e.lng&&o.lng<=n.lng;return r&&s}overlaps(t){t=new E(t);const e=this._southWest,n=this._northEast,o=t.getSouthWest(),i=t.getNorthEast(),r=i.lat>e.lat&&o.late.lng&&o.lng{const t=M*Math.PI;return new T([-t,-t],[t,t])})()};class O{constructor(t,e,n,o){if(Array.isArray(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=o}transform(t,e){return this._transform(t.clone(),e)}_transform(t,e){return e||=1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t}untransform(t,e){return e||=1,new P((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}}class I extends A{static code="EPSG:3857";static projection=S;static transformation=(()=>{const t=.5/(Math.PI*S.R);return new O(t,.5,-t,.5)})()}const Z=D("chrome"),R=!Z&&D("safari"),B="undefined"!=typeof orientation||D("mobile"),N="undefined"!=typeof window&&!!window.PointerEvent,j="undefined"!=typeof window&&("ontouchstart"in window||!!window.TouchEvent);function D(t){return"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t)}var F={chrome:Z,safari:R,mobile:B,pointer:N,touch:j||N,touchNative:j,retina:"undefined"!=typeof window&&void 0!==window.devicePixelRatio&&window.devicePixelRatio>1,mac:"undefined"!=typeof navigator&&void 0!==navigator.platform&&navigator.platform.startsWith("Mac"),linux:"undefined"!=typeof navigator&&void 0!==navigator.platform&&navigator.platform.startsWith("Linux")};function H(t){return"string"==typeof t?document.getElementById(t):t}function W(t,e,n){const o=document.createElement(t);return o.className=e??"",n?.appendChild(o),o}function U(t){const e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function q(t){const e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function $(t,e,n){const o=e??new P(0,0);t.style.transform=`translate3d(${o.x}px,${o.y}px,0)${n?` scale(${n})`:""}`}const V=new WeakMap;function K(t,e){V.set(t,e),$(t,e)}function G(t){return V.get(t)??new P(0,0)}const J="undefined"==typeof document?{}:document.documentElement.style,Y=["userSelect","WebkitUserSelect"].find(t=>t in J);let X,Q,tt;function et(){const t=J[Y];"none"!==t&&(X=t,J[Y]="none")}function nt(){void 0!==X&&(J[Y]=X,X=void 0)}function ot(){_t(window,"dragstart",Et)}function it(){bt(window,"dragstart",Et)}function rt(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(st(),Q=t,tt=t.style.outlineStyle,t.style.outlineStyle="none",_t(window,"keydown",st))}function st(){Q&&(Q.style.outlineStyle=tt,Q=void 0,tt=void 0,bt(window,"keydown",st))}function at(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function lt(t){const e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var ct={__proto__:null,create:W,disableImageDrag:ot,disableTextSelection:et,enableImageDrag:it,enableTextSelection:nt,get:H,getPosition:G,getScale:lt,getSizedParentNode:at,preventOutline:rt,restoreOutline:st,setPosition:K,setTransform:$,toBack:q,toFront:U};let ht=new Map,dt=!1;function ut(){dt||(dt=!0,document.addEventListener("pointerdown",pt,{capture:!0}),document.addEventListener("pointermove",mt,{capture:!0}),document.addEventListener("pointerup",ft,{capture:!0}),document.addEventListener("pointercancel",ft,{capture:!0}),ht=new Map)}function pt(t){ht.set(t.pointerId,t)}function mt(t){ht.has(t.pointerId)&&ht.set(t.pointerId,t)}function ft(t){ht.delete(t.pointerId)}function gt(){return[...ht.values()]}function _t(t,e,n,o){if(e&&"object"==typeof e)for(const[o,i]of Object.entries(e))wt(t,o,i,n);else for(const i of _(e))wt(t,i,n,o);return this}const yt="_leaflet_events";function bt(t,e,n,o){if(1===arguments.length)vt(t),delete t[yt];else if(e&&"object"==typeof e)for(const[o,i]of Object.entries(e))Lt(t,o,i,n);else if(e=_(e),2===arguments.length)vt(t,t=>e.includes(t));else for(const i of e)Lt(t,i,n,o);return this}function vt(t,e){for(const n of Object.keys(t[yt]??{})){const o=n.split(/\d/)[0];e&&!e(o)||Lt(t,o,null,null,n)}}const xt={pointerenter:"pointerover",pointerleave:"pointerout",wheel:"undefined"!=typeof window&&!("onwheel"in window)&&"mousewheel"};function wt(t,e,n,o){const i=e+u(n)+(o?`_${u(o)}`:"");if(t[yt]&&t[yt][i])return this;let r=function(e){return n.call(o||t,e||window.event)};const s=r;F.touch&&"dblclick"===e?r=function(t,e){t.addEventListener("dblclick",e);let n,o=0;function i(t){if(1!==t.detail)return void(n=t.detail);if("mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents)return;const e=Ct(t);if(e.some(t=>t instanceof HTMLLabelElement&&t.attributes.for)&&!e.some(t=>t instanceof HTMLInputElement||t instanceof HTMLSelectElement))return;const i=Date.now();i-o<=200?(n++,2===n&&t.target.dispatchEvent(function(t){let e,n={bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed,detail:2,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget,region:t.region};return t instanceof PointerEvent?(n={...n,pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist,pointerType:t.pointerType,isPrimary:t.isPrimary},e=new PointerEvent("dblclick",n)):e=new MouseEvent("dblclick",n),e}(t))):n=1,o=i}return t.addEventListener("click",i),{dblclick:e,simDblclick:i}}(t,r):"addEventListener"in t?"wheel"===e||"mousewheel"===e?t.addEventListener(xt[e]||e,r,{passive:!1}):"pointerenter"===e||"pointerleave"===e?(r=function(e){e??=window.event,Ot(t,e)&&s(e)},t.addEventListener(xt[e],r,!1)):t.addEventListener(e,s,!1):t.attachEvent(`on${e}`,r),t[yt]??={},t[yt][i]=r}function Lt(t,e,n,o,i){i??=e+u(n)+(o?`_${u(o)}`:"");const r=t[yt]&&t[yt][i];if(!r)return this;F.touch&&"dblclick"===e?function(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}(t,r):"removeEventListener"in t?t.removeEventListener(xt[e]||e,r,!1):t.detachEvent(`on${e}`,r),t[yt][i]=null}function kt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Pt(t){return wt(t,"wheel",kt),this}function Tt(t){return _t(t,"pointerdown dblclick contextmenu",kt),t._leaflet_disable_click=!0,this}function Et(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function zt(t){return Et(t),kt(t),this}function Ct(t){return t.composedPath()}function At(t,e){if(!e)return new P(t.clientX,t.clientY);const n=lt(e),o=n.boundingClientRect;return new P((t.clientX-o.left)/n.x-e.clientLeft,(t.clientY-o.top)/n.y-e.clientTop)}function Mt(){const t=window.devicePixelRatio;return F.linux&&F.chrome?t:F.mac?3*t:t>0?2*t:1}function St(t){return t.deltaY&&0===t.deltaMode?-t.deltaY/Mt():t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:(t.deltaX||t.deltaZ,0)}function Ot(t,e){let n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var It={__proto__:null,PointerEvents:{__proto__:null,cleanupPointers:function(){ht.clear()},disablePointerDetection:function(){document.removeEventListener("pointerdown",pt,{capture:!0}),document.removeEventListener("pointermove",mt,{capture:!0}),document.removeEventListener("pointerup",ft,{capture:!0}),document.removeEventListener("pointercancel",ft,{capture:!0}),dt=!1},enablePointerDetection:ut,getPointers:gt},disableClickPropagation:Tt,disableScrollPropagation:Pt,getPointerPosition:At,getPropagationPath:Ct,getWheelDelta:St,getWheelPxFactor:Mt,isExternalTarget:Ot,off:bt,on:_t,preventDefault:Et,stop:zt,stopPropagation:kt};class Zt extends k{run(t,e,n,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=n??.25,this._easeOutPower=1/Math.max(o??.5,.2),this._startPos=G(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()}stop(){this._inProgress&&(this._step(!0),this._complete())}_animate(){this._animId=requestAnimationFrame(this._animate.bind(this)),this._step()}_step(t){const e=+new Date-this._startTime,n=1e3*this._duration;e{const n=(Date.now()-g)/y,r=function(t){return 1-(1-t)**1.5}(n)*_;n<=1?(this._flyToFrame=requestAnimationFrame(b),this._move(this.unproject(o.add(i.subtract(o).multiplyBy(function(t){return a*(m(f)*(p(e=f+h*t)/m(e))-p(f))/d;var e}(r)/c)),s),this.getScaleZoom(a/function(t){return a*(m(f)/m(f+h*t))}(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)};return this._moveStart(!0,n.noMoveStart),b(),this}flyToBounds(t,e){const n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)}setMaxBounds(t){return t=new E(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)}setMinZoom(t){const e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()this.options.maxZoom)?this.setZoom(t):this}panInsideBounds(t,e){this._enforcingBounds=!0;const n=this.getCenter(),o=this._limitCenter(n,this._zoom,new E(t));return n.equals(o)||this.panTo(o,e),this._enforcingBounds=!1,this}panInside(t,e){e??={};const n=new P(e.paddingTopLeft||e.padding||[0,0]),o=new P(e.paddingBottomRight||e.padding||[0,0]),i=this.project(this.getCenter()),r=this.project(t),s=this.getPixelBounds(),a=new T([s.min.add(n),s.max.subtract(o)]),l=a.getSize();if(!a.contains(r)){this._enforcingBounds=!0;const t=r.subtract(a.getCenter()),n=a.extend(r).getSize().subtract(l);i.x+=t.x<0?-n.x:n.x,i.y+=t.y<0?-n.y:n.y,this.panTo(this.unproject(i),e),this._enforcingBounds=!1}return this}invalidateSize(t){if(!this._loaded)return this;t={animate:!1,pan:!0,...!0===t?{animate:!0}:t};const e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;const n=this.getSize(),o=e.divideBy(2).round(),i=n.divideBy(2).round(),r=o.subtract(i);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(this.fire.bind(this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this}stop(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()}locate(t){if(t=this._locateOptions={timeout:1e4,watch:!1,...t},!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;const e=this._handleGeolocationResponse.bind(this),n=this._handleGeolocationError.bind(this);return t.watch?(void 0!==this._locationWatchId&&navigator.geolocation.clearWatch(this._locationWatchId),this._locationWatchId=navigator.geolocation.watchPosition(e,n,t)):navigator.geolocation.getCurrentPosition(e,n,t),this}stopLocate(){return navigator.geolocation?.clearWatch?.(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this}_handleGeolocationError(t){if(!this._container._leaflet_id)return;const e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:`Geolocation error: ${n}.`})}_handleGeolocationResponse(t){if(!this._container._leaflet_id)return;const e=t.coords.latitude,n=t.coords.longitude,o=new z(e,n),i=o.toBounds(2*t.coords.accuracy),r=this._locateOptions;if(r.setView){const t=this.getBoundsZoom(i);this.setView(o,r.maxZoom?Math.min(t,r.maxZoom):t)}const s={latlng:o,bounds:i,timestamp:t.timestamp};for(const e in t.coords)"number"==typeof t.coords[e]&&(s[e]=t.coords[e]);this.fire("locationfound",s)}addHandler(t,e){if(!e)return this;const n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this}remove(){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");delete this._container._leaflet_id,delete this._containerId,void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),this._mapPane.remove(),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(cancelAnimationFrame(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),clearTimeout(this._transitionEndTimer),clearTimeout(this._sizeTimer),this._loaded&&this.fire("unload"),this._destroyAnimProxy();for(const t of Object.values(this._layers))t.remove();for(const t of Object.values(this._panes))t.remove();return this._layers={},this._panes={},delete this._mapPane,delete this._renderer,this}createPane(t,e){const n=W("div","leaflet-pane"+(t?` leaflet-${t.replace("Pane","")}-pane`:""),e||this._mapPane);return t&&(this._panes[t]=n),n}getCenter(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())}getZoom(){return this._zoom}getBounds(){const t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),n=this.unproject(t.getTopRight());return new E(e,n)}getMinZoom(){return this.options.minZoom??this._layersMinZoom??0}getMaxZoom(){return this.options.maxZoom??this._layersMaxZoom??1/0}getBoundsZoom(t,e,n){t=new E(t),n=new P(n??[0,0]);let o=this.getZoom()??0;const i=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=new T(this.project(a,o),this.project(s,o)).getSize(),h=this.options.zoomSnap,d=l.x/c.x,u=l.y/c.y,p=e?Math.max(d,u):Math.min(d,u);return o=this.getScaleZoom(p,o),h&&(o=Math.round(o/(h/100))*(h/100),o=e?Math.ceil(o/h)*h:Math.floor(o/h)*h),Math.max(i,Math.min(r,o))}getSize(){return this._size&&!this._sizeChanged||(this._size=new P(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()}getPixelBounds(t,e){const n=this._getTopLeftPoint(t,e);return new T(n,n.add(this.getSize()))}getPixelOrigin(){return this._checkIfLoaded(),this._pixelOrigin}getPixelWorldBounds(t){return this.options.crs.getProjectedBounds(t??this.getZoom())}getPane(t){return"string"==typeof t?this._panes[t]:t}getPanes(){return this._panes}getContainer(){return this._container}getZoomScale(t,e){const n=this.options.crs;return e??=this._zoom,n.scale(t)/n.scale(e)}getScaleZoom(t,e){const n=this.options.crs;e??=this._zoom;const o=n.zoom(t*n.scale(e));return isNaN(o)?1/0:o}project(t,e){return e??=this._zoom,this.options.crs.latLngToPoint(new z(t),e)}unproject(t,e){return e??=this._zoom,this.options.crs.pointToLatLng(new P(t),e)}layerPointToLatLng(t){const e=new P(t).add(this.getPixelOrigin());return this.unproject(e)}latLngToLayerPoint(t){return this.project(new z(t))._round()._subtract(this.getPixelOrigin())}wrapLatLng(t){return this.options.crs.wrapLatLng(new z(t))}wrapLatLngBounds(t){return this.options.crs.wrapLatLngBounds(new E(t))}distance(t,e){return this.options.crs.distance(new z(t),new z(e))}containerPointToLayerPoint(t){return new P(t).subtract(this._getMapPanePos())}layerPointToContainerPoint(t){return new P(t).add(this._getMapPanePos())}containerPointToLatLng(t){const e=this.containerPointToLayerPoint(new P(t));return this.layerPointToLatLng(e)}latLngToContainerPoint(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(new z(t)))}pointerEventToContainerPoint(t){return At(t,this._container)}pointerEventToLayerPoint(t){return this.containerPointToLayerPoint(this.pointerEventToContainerPoint(t))}pointerEventToLatLng(t){return this.layerPointToLatLng(this.pointerEventToLayerPoint(t))}_initContainer(t){const e=this._container=H(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");_t(e,"scroll",this._onScroll,this),this._containerId=u(e),ut()}_initLayout(){const t=this._container;this._fadeAnimated=this.options.fadeAnimation;const e=["leaflet-container","leaflet-touch"];F.retina&&e.push("leaflet-retina"),F.safari&&e.push("leaflet-safari"),this._fadeAnimated&&e.push("leaflet-fade-anim"),t.classList.add(...e);const{position:n}=getComputedStyle(t);"absolute"!==n&&"relative"!==n&&"fixed"!==n&&"sticky"!==n&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()}_initPanes(){const t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),K(this._mapPane,new P(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(t.markerPane.classList.add("leaflet-zoom-hide"),t.shadowPane.classList.add("leaflet-zoom-hide"))}_resetView(t,e,n){K(this._mapPane,new P(0,0));const o=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");const i=this._zoom!==e;this._moveStart(i,n)._move(t,e)._moveEnd(i),this.fire("viewreset"),o&&this.fire("load")}_moveStart(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this}_move(t,e,n,o){void 0===e&&(e=this._zoom);const i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),o?n?.pinch&&this.fire("zoom",n):((i||n?.pinch)&&this.fire("zoom",n),this.fire("move",n)),this}_moveEnd(t){return t&&this.fire("zoomend"),this.fire("moveend")}_stop(){return cancelAnimationFrame(this._flyToFrame),this._panAnim?.stop(),this}_rawPanBy(t){K(this._mapPane,this._getMapPanePos().subtract(t))}_getZoomSpan(){return this.getMaxZoom()-this.getMinZoom()}_panInsideMaxBounds(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)}_checkIfLoaded(){if(!this._loaded)throw new Error("Set map center and zoom first.")}_initEvents(t){this._targets={},this._targets[u(this._container)]=this,(t?bt:_t)(this._container,"click dblclick pointerdown pointerup pointerover pointerout pointermove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&(t?this._resizeObserver.disconnect():(this._resizeObserver||(this._resizeObserver=new ResizeObserver(this._onResize.bind(this))),this._resizeObserver.observe(this._container))),this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)}_onResize(){cancelAnimationFrame(this._resizeRequest),this._resizeRequest=requestAnimationFrame(()=>{this.invalidateSize({debounceMoveend:!0})})}_onScroll(){this._container.scrollTop=0,this._container.scrollLeft=0}_onMoveEnd(){const t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}_findEventTargets(t,e){let n,o=[],i=t.target||t.srcElement,r=!1;const s="pointerout"===e||"pointerover"===e;for(;i;){if(n=this._targets[u(i)],n&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)){if(s&&!Ot(i,t))break;if(o.push(n),s)break}if(i===this._container)break;i=i.parentNode}return o.length||r||s||!this.listens(e,!0)||(o=[this]),o}_isClickDisabled(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click||!t.parentNode)return!0;t=t.parentNode}}_handleDOMEvent(t){const e=t.target??t.srcElement;if(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))return;const n=t.type;"pointerdown"===n&&rt(e),this._fireDOMEvent(t,n)}static _pointerEvents=["click","dblclick","pointerover","pointerout","contextmenu"];_fireDOMEvent(e,n,o){"click"===n&&this._fireDOMEvent(e,"preclick",o);let i=this._findEventTargets(e,n);if(o&&(i=o.filter(t=>t.listens(n,!0)).concat(i)),!i.length)return;"contextmenu"===n&&Et(e);const r=i[0],s={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){const t=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=t?this.latLngToContainerPoint(r.getLatLng()):this.pointerEventToContainerPoint(e),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=t?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(const e of i)if(e.fire(n,s,!0),s.originalEvent._stopped||!1===e.options.bubblingPointerEvents&&t._pointerEvents.includes(n))return}_draggableMoved(t){return t=t.dragging?.enabled()?t:this,t.dragging?.moved()||this.boxZoom?.moved()}_clearHandlers(){for(const t of this._handlers)t.disable()}whenReady(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this}_getMapPanePos(){return G(this._mapPane)}_moved(){const t=this._getMapPanePos();return t&&!t.equals([0,0])}_getTopLeftPoint(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())}_getNewPixelOrigin(t,e){const n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()}_latLngToNewLayerPoint(t,e,n){const o=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(o)}_latLngBoundsToNewLayerBounds(t,e,n){const o=this._getNewPixelOrigin(n,e);return new T([this.project(t.getSouthWest(),e)._subtract(o),this.project(t.getNorthWest(),e)._subtract(o),this.project(t.getSouthEast(),e)._subtract(o),this.project(t.getNorthEast(),e)._subtract(o)])}_getCenterLayerPoint(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))}_getCenterOffset(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())}_limitCenter(t,e,n){if(!n)return t;const o=this.project(t,e),i=this.getSize().divideBy(2),r=new T(o.subtract(i),o.add(i)),s=this._getBoundsOffset(r,n,e);return Math.abs(s.x)<=1&&Math.abs(s.y)<=1?t:this.unproject(o.add(s),e)}_limitOffset(t,e){if(!e)return t;const n=this.getPixelBounds(),o=new T(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(o,e))}_getBoundsOffset(t,e,n){const o=new T(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),i=o.min.subtract(t.min),r=o.max.subtract(t.max),s=this._rebound(i.x,-r.x),a=this._rebound(i.y,-r.y);return new P(s,a)}_rebound(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))}_limitZoom(t){const e=this.getMinZoom(),n=this.getMaxZoom(),o=this.options.zoomSnap;return o&&(t=Math.round(t/o)*o),Math.max(e,Math.min(n,t))}_onPanTransitionStep(){this.fire("move")}_onPanTransitionEnd(){this._mapPane.classList.remove("leaflet-pan-anim"),this.fire("moveend")}_tryAnimatedPan(t,e){const n=this._getCenterOffset(t)._trunc();return!(!0!==e?.animate&&!this.getSize().contains(n)||(this.panBy(n,e),0))}_createAnimProxy(){this._proxy=W("div","leaflet-proxy leaflet-zoom-animated"),this._panes.mapPane.appendChild(this._proxy),this.on("zoomanim",this._animateProxyZoom,this),this.on("load moveend",this._animMoveEnd,this),_t(this._proxy,"transitionend",this._catchTransitionEnd,this)}_animateProxyZoom(t){const e=this._proxy.style.transform;$(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style.transform&&this._animatingZoom&&this._onZoomTransitionEnd()}_animMoveEnd(){const t=this.getCenter(),e=this.getZoom();$(this._proxy,this.project(t,e),this.getZoomScale(e,1))}_destroyAnimProxy(){this._proxy&&(bt(this._proxy,"transitionend",this._catchTransitionEnd,this),this._proxy.remove(),this.off("zoomanim",this._animateProxyZoom,this),this.off("load moveend",this._animMoveEnd,this),delete this._proxy)}_catchTransitionEnd(t){this._animatingZoom&&t.propertyName.includes("transform")&&this._onZoomTransitionEnd()}_nothingToAnimate(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length}_tryAnimatedZoom(t,e,n){if(this._animatingZoom)return!0;if(n??={},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;const o=this.getZoomScale(e),i=this._getCenterOffset(t)._divideBy(1-1/o);return!(!0!==n.animate&&!this.getSize().contains(i)||(requestAnimationFrame(()=>{this._moveStart(!0,n.noMoveStart??!1)._animateZoom(t,e,!0)}),0))}_animateZoom(t,e,n,o){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,this._mapPane.classList.add("leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._transitionEndTimer=setTimeout(this._onZoomTransitionEnd.bind(this),250))}_onZoomTransitionEnd(){this._animatingZoom&&(this._mapPane?.classList.remove("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))}};const Bt=Rt;class Nt extends L{static{this.setDefaultOptions({position:"topright"})}initialize(t){y(this,t)}getPosition(){return this.options.position}setPosition(t){const e=this._map;return e?.removeControl(this),this.options.position=t,e?.addControl(this),this}getContainer(){return this._container}addTo(t){this.remove(),this._map=t;const e=this._container=this.onAdd(t),n=this.getPosition(),o=t._controlCorners[n];return e.classList.add("leaflet-control"),n.includes("bottom")?o.insertBefore(e,o.firstChild):o.appendChild(e),this._map.on("unload",this.remove,this),this}remove(){return this._map?(this._container.remove(),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this}_refocusOnMap(t){this._map&&t&&(0!==t.screenX||0!==t.screenY)&&this._map.getContainer().focus()}}Rt.include({addControl(t){return t.addTo(this),this},removeControl(t){return t.remove(),this},_initControlPos(){const t=this._controlCorners={},e="leaflet-",n=this._controlContainer=W("div",`${e}control-container`,this._container);function o(o,i){const r=`${e+o} ${e}${i}`;t[o+i]=W("div",r,n)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos(){for(const t of Object.values(this._controlCorners))t.remove();this._controlContainer.remove(),delete this._controlCorners,delete this._controlContainer}});class jt extends Nt{static{this.setDefaultOptions({collapsed:!0,collapseDelay:0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:(t,e,n,o)=>n0)return this._collapseDelayTimeout=setTimeout(()=>{this._container.classList.remove("leaflet-control-layers-expanded")},this.options.collapseDelay),this;this._container.classList.remove("leaflet-control-layers-expanded")}return this}_initLayout(){const t="leaflet-control-layers",e=this._container=W("div",t),n=this.options.collapsed;Tt(e),Pt(e);const o=this._section=W("fieldset",`${t}-list`);n&&(this._map.on("click",this.collapse,this),_t(e,{pointerenter:this._expandSafely,pointerleave:this.collapse},this));const i=this._layersLink=W("a",`${t}-toggle`,e);i.href="#",i.title="Layers",i.setAttribute("role","button"),_t(i,{keydown(t){"Enter"===t.code&&this._expandSafely()},click(t){Et(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=W("div",`${t}-base`,o),this._separator=W("div",`${t}-separator`,o),this._overlaysList=W("div",`${t}-overlays`,o),e.appendChild(o)}_getLayer(t){for(const e of this._layers)if(e&&u(e.layer)===t)return e}_addLayer(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort((t,e)=>this.options.sortFunction(t.layer,e.layer,t.name,e.name)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()}_update(){if(!this._container)return this;this._baseLayersList.replaceChildren(),this._overlaysList.replaceChildren(),this._layerControlInputs=[];let t,e,n=0;for(const o of this._layers)this._addItem(o),e||=o.overlay,t||=!o.overlay,n+=o.overlay?0:1;return this.options.hideSingleBase&&(t=t&&n>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this}_onLayerChange(t){this._handlingClick||this._update();const e=this._getLayer(u(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)}_addItem(t){const e=document.createElement("label"),n=this._map.hasLayer(t.layer),o=document.createElement("input");o.type=t.overlay?"checkbox":"radio",o.className="leaflet-control-layers-selector",o.defaultChecked=n,t.overlay||(o.name=`leaflet-base-layers_${u(this)}`),this._layerControlInputs.push(o),o.layerId=u(t.layer),_t(o,"click",this._onInputClick,this);const i=document.createElement("span");i.innerHTML=` ${t.name}`;const r=document.createElement("span");return e.appendChild(r),r.appendChild(o),r.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e}_onInputClick(t){if(this._preventClick)return;const e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(const t of e){const e=this._getLayer(t.layerId).layer;t.checked?n.push(e):t.checked||o.push(e)}for(const t of o)this._map.hasLayer(t)&&this._map.removeLayer(t);for(const t of n)this._map.hasLayer(t)||this._map.addLayer(t);this._handlingClick=!1,this._refocusOnMap(t)}_checkDisabledLayers(){const t=this._layerControlInputs,e=this._map.getZoom();for(const n of t){const t=this._getLayer(n.layerId).layer;n.disabled=void 0!==t.options.minZoom&&et.options.maxZoom}}_expandIfNotCollapsed(){return this._map&&!this.options.collapsed&&this.expand(),this}_expandSafely(){const t=this._section;this._preventClick=!0,_t(t,"click",Et),this.expand(),setTimeout(()=>{bt(t,"click",Et),this._preventClick=!1})}}class Dt extends Nt{static{this.setDefaultOptions({position:"topleft",zoomInText:'+ ',zoomInTitle:"Zoom in",zoomOutText:'− ',zoomOutTitle:"Zoom out"})}onAdd(t){const e="leaflet-control-zoom",n=W("div",`${e} leaflet-bar`),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,`${e}-in`,n,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,`${e}-out`,n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n}onRemove(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)}disable(){return this._disabled=!0,this._updateDisabled(),this}enable(){return this._disabled=!1,this._updateDisabled(),this}_zoomIn(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))}_createButton(t,e,n,o,i){const r=W("a",n,o);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Tt(r),_t(r,"click",zt),_t(r,"click",i,this),_t(r,"click",this._refocusOnMap,this),r}_updateDisabled(){const t=this._map,e="leaflet-disabled";this._zoomInButton.classList.remove(e),this._zoomOutButton.classList.remove(e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(this._zoomOutButton.classList.add(e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(this._zoomInButton.classList.add(e),this._zoomInButton.setAttribute("aria-disabled","true"))}}Rt.mergeOptions({zoomControl:!0}),Rt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Dt,this.addControl(this.zoomControl))});class Ft extends Nt{static{this.setDefaultOptions({position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1})}onAdd(t){const e="leaflet-control-scale",n=W("div",e),o=this.options;return this._addScales(o,`${e}-line`,n),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n}onRemove(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)}_addScales(t,e,n){t.metric&&(this._mScale=W("div",e,n)),t.imperial&&(this._iScale=W("div",e,n))}_update(){const t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)}_updateScales(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)}_updateMetric(t){const e=this._getRoundNum(t),n=e<1e3?`${e} m`:e/1e3+" km";this._updateScale(this._mScale,n,e/t)}_updateImperial(t){const e=3.2808399*t;let n,o,i;e>5280?(n=e/5280,o=this._getRoundNum(n),this._updateScale(this._iScale,`${o} mi`,o/n)):(i=this._getRoundNum(e),this._updateScale(this._iScale,`${i} ft`,i/e))}_updateScale(t,e,n){t.style.width=`${Math.round(this.options.maxWidth*n)}px`,t.innerHTML=e}_getRoundNum(t){const e=10**(`${Math.floor(t)}`.length-1);let n=t/e;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,e*n}}class Ht extends Nt{static{this.setDefaultOptions({position:"bottomright",prefix:' Leaflet '})}initialize(t){y(this,t),this._attributions={}}onAdd(t){t.attributionControl=this,this._container=W("div","leaflet-control-attribution"),Tt(this._container);for(const e of Object.values(t._layers))e.getAttribution&&this.addAttribution(e.getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container}onRemove(t){t.off("layeradd",this._addAttribution,this)}_addAttribution(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",()=>this.removeAttribution(t.layer.getAttribution())))}setPrefix(t){return this.options.prefix=t,this._update(),this}addAttribution(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this}removeAttribution(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this}_update(){if(!this._map)return;const t=Object.keys(this._attributions).filter(t=>this._attributions[t]),e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' | ')}}Rt.mergeOptions({attributionControl:!0}),Rt.addInitHook(function(){this.options.attributionControl&&(new Ht).addTo(this)}),Nt.Layers=jt,Nt.Zoom=Dt,Nt.Scale=Ft,Nt.Attribution=Ht;class Wt extends L{initialize(t){this._map=t}enable(){return this._enabled||(this._enabled=!0,this.addHooks()),this}disable(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this}enabled(){return!!this._enabled}}Wt.addTo=function(t,e){return t.addHandler(e,this),this};class Ut extends k{static{this.setDefaultOptions({clickTolerance:3})}initialize(t,e,n,o){y(this,o),this._element=t,this._dragStartTarget=e??t,this._preventOutline=n}enable(){this._enabled||(_t(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!0)}disable(){this._enabled&&(Ut._dragging===this&&this.finishDrag(!0),bt(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!1,this._moved=!1)}_onDown(t){if(this._moved=!1,this._element.classList.contains("leaflet-zoom-anim"))return;if(1!==gt().length)return void(Ut._dragging===this&&this.finishDrag());if(Ut._dragging||t.shiftKey||0!==t.button&&"touch"!==t.pointerType)return;if(Ut._dragging=this,this._preventOutline&&rt(this._element),ot(),et(),this._moving)return;this.fire("down");const e=at(this._element);this._startPoint=new P(t.clientX,t.clientY),this._startPos=G(this._element),this._parentScale=lt(e),_t(document,"pointermove",this._onMove,this),_t(document,"pointerup pointercancel",this._onUp,this)}_onMove(t){if(gt().length>1)return void(this._moved=!0);const e=new P(t.clientX,t.clientY)._subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)e&&(n.push(t[i]),o=i);return ol&&(r=s,l=a);l>n&&(e[r]=1,Yt(t,e,n,o,r),Yt(t,e,n,r,i))}let Xt;function Qt(t,e,n,o,i){let r,s,a,l=o?Xt:ee(t,n),c=ee(e,n);for(Xt=c;;){if(!(l|c))return[t,e];if(l&c)return!1;r=l||c,s=te(t,e,r,n,i),a=ee(s,n),r===l?(t=s,l=a):(e=s,c=a)}}function te(t,e,n,o,i){const r=e.x-t.x,s=e.y-t.y,a=o.min,l=o.max;let c,h;return 8&n?(c=t.x+r*(l.y-t.y)/s,h=l.y):4&n?(c=t.x+r*(a.y-t.y)/s,h=a.y):2&n?(c=l.x,h=t.y+s*(l.x-t.x)/r):1&n&&(c=a.x,h=t.y+s*(a.x-t.x)/r),new P(c,h,i)}function ee(t,e){let n=0;return t.xe.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function ne(t,e){const n=e.x-t.x,o=e.y-t.y;return n*n+o*o}function oe(t,e,n,o){let i,r=e.x,s=e.y,a=n.x-r,l=n.y-s;const c=a*a+l*l;return c>0&&(i=((t.x-r)*a+(t.y-s)*l)/c,i>1?(r=n.x,s=n.y):i>0&&(r+=a*i,s+=l*i)),a=t.x-r,l=t.y-s,o?a*a+l*l:new P(r,s)}function ie(t){return!Array.isArray(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function re(t,e){let n,o,i,r,s,a,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");ie(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);let h=new z([0,0]);const d=new E(t);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(h=Vt(t));const u=t.length,p=[];for(n=0;no){l=(r-o)/i,c=[a.x-l*(a.x-s.x),a.y-l*(a.y-s.y)];break}const m=e.unproject(new P(c));return new z([m.lat+h.lat,m.lng+h.lng])}var se={__proto__:null,_getBitCode:ee,_getEdgeIntersection:te,_sqClosestPointOnSegment:oe,clipSegment:Qt,closestPointOnSegment:function(t,e,n){return oe(t,e,n)},isFlat:ie,pointToSegmentDistance:Jt,polylineCenter:re,simplify:Gt};const ae={project:t=>(t=new z(t),new P(t.lng,t.lat)),unproject:t=>(t=new P(t),new z(t.y,t.x)),bounds:new T([-180,-90],[180,90])},le={R:6378137,R_MINOR:6356752.314245179,bounds:new T([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project(t){t=new z(t);const e=Math.PI/180,n=this.R,o=this.R_MINOR/n,i=Math.sqrt(1-o*o);let r=t.lat*e;const s=i*Math.sin(r),a=Math.tan(Math.PI/4-r/2)/((1-s)/(1+s))**(i/2);return r=-n*Math.log(Math.max(a,1e-10)),new P(t.lng*e*n,r)},unproject(t){t=new P(t);const e=180/Math.PI,n=this.R,o=this.R_MINOR/n,i=Math.sqrt(1-o*o),r=Math.exp(-t.y/n);let s=Math.PI/2-2*Math.atan(r);for(let t,e=0,n=.1;e<15&&Math.abs(n)>1e-7;e++)t=i*Math.sin(s),t=((1-t)/(1+t))**(i/2),n=Math.PI/2-2*Math.atan(r*t)-s,s+=n;return new z(s*e,t.x*e/n)}};var ce={__proto__:null,LonLat:ae,Mercator:le,SphericalMercator:S};class he extends A{static code="EPSG:3395";static projection=le;static transformation=(()=>{const t=.5/(Math.PI*le.R);return new O(t,.5,-t,.5)})()}class de extends A{static code="EPSG:4326";static projection=ae;static transformation=new O(1/180,1,-1/180,.5)}class ue extends C{static projection=ae;static transformation=new O(1,0,-1,0);static scale(t){return 2**t}static zoom(t){return Math.log(t)/Math.LN2}static distance(t,e){const n=e.lng-t.lng,o=e.lat-t.lat;return Math.sqrt(n*n+o*o)}static infinite=!0}C.Earth=A,C.EPSG3395=he,C.EPSG3857=I,C.EPSG900913=class extends I{static code="EPSG:900913"},C.EPSG4326=de,C.Simple=ue;class pe extends k{static{this.setDefaultOptions({pane:"overlayPane",attribution:null,bubblingPointerEvents:!0})}addTo(t){return t.addLayer(this),this}remove(){return this.removeFrom(this._map||this._mapToAdd)}removeFrom(t){return t?.removeLayer(this),this}getPane(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)}addInteractiveTarget(t){return this._map._targets[u(t)]=this,this}removeInteractiveTarget(t){return delete this._map._targets[u(t)],this}getAttribution(){return this.options.attribution}_layerAdd(t){const e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){const t=this.getEvents();e.on(t,this),this.once("remove",()=>e.off(t,this))}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}}Rt.include({addLayer(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");const e=u(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer(t){const e=u(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer(t){return u(t)in this._layers},eachLayer(t,e){for(const n of Object.values(this._layers))t.call(e,n);return this},_addLayers(t){t=t?Array.isArray(t)?t:[t]:[];for(const e of t)this.addLayer(e)},_addZoomLimit(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[u(t)]=t,this._updateZoomLevels())},_removeZoomLimit(t){const e=u(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels(){let t=1/0,e=-1/0;const n=this._getZoomSpan();for(const n of Object.values(this._zoomBoundLayers)){const o=n.options;t=Math.min(t,o.minZoom??1/0),e=Math.max(e,o.maxZoom??-1/0)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()this._map.latLngToLayerPoint(t));o.forEach(t=>n.extend(t)),e.push(o)}else t.forEach(t=>this._projectLatlngs(t,e,n))}_clipPoints(){const t=this._renderer._bounds;if(this._parts=[],!this._pxBounds||!this._pxBounds.intersects(t))return;if(this.options.noClip)return void(this._parts=this._rings);const e=this._parts;let n,o,i,r,s,a,l;for(n=0,i=0,r=this._rings.length;n=2&&e[0]instanceof z&&e[0].equals(e[n-1])&&e.pop(),e}_setLatLngs(t){Le.prototype._setLatLngs.call(this,t),ie(this._latlngs)&&(this._latlngs=[this._latlngs])}_defaultShape(){return ie(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]}_clipPoints(){let t=this._renderer._bounds;const e=this.options.weight,n=new P(e,e);if(t=new T(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(const e of this._rings){const n=qt(e,t,!0);n.length&&this._parts.push(n)}}_updatePath(){this._renderer._updatePoly(this,!0)}_containsPoint(t){let e,n,o,i,r,s,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,a=this._parts.length;it.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(c=!c);return c||Le.prototype._containsPoint.call(this,t,!0)}}class Pe extends fe{initialize(t,e){y(this,e),this._layers={},t&&this.addData(t)}addData(t){const e=Array.isArray(t)?t:t.features;if(e){for(const t of e)(t.geometries||t.geometry||t.features||t.coordinates)&&this.addData(t);return this}const n=this.options;if(n.filter&&!n.filter(t))return this;const o=Te(t,n);return o?(o.feature=Oe(t),o.defaultOptions=o.options,this.resetStyle(o),n.onEachFeature&&n.onEachFeature(t,o),this.addLayer(o)):this}resetStyle(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=Object.create(t.defaultOptions),this._setLayerStyle(t,this.options.style),this)}setStyle(t){return this.eachLayer(e=>this._setLayerStyle(e,t))}_setLayerStyle(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}}function Te(t,e){const n="Feature"===t.type?t.geometry:t,o=n?.coordinates,i=[],r=e?.pointToLayer,s=e?.coordsToLatLng??ze;let a,l;if(!o&&!n)return null;switch(n.type){case"Point":return a=s(o),Ee(r,t,a,e);case"MultiPoint":for(const n of o)a=s(n),i.push(Ee(r,t,a,e));return new fe(i);case"LineString":case"MultiLineString":return l=Ce(o,"LineString"===n.type?0:1,s),new Le(l,e);case"Polygon":case"MultiPolygon":return l=Ce(o,"Polygon"===n.type?1:2,s),new ke(l,e);case"GeometryCollection":for(const o of n.geometries){const n=Te({geometry:o,type:"Feature",properties:t.properties},e);n&&i.push(n)}return new fe(i);case"FeatureCollection":for(const t of n.features){const n=Te(t,e);n&&i.push(n)}return new fe(i);default:throw new Error("Invalid GeoJSON object.")}}function Ee(t,e,n,o){return t?t(e,n):new be(n,o?.markersInheritOptions&&o)}function ze(t){return new z(t[1],t[0],t[2])}function Ce(t,e,n){return t.map(t=>e?Ce(t,e-1,n):(n||ze)(t))}function Ae(t,e){return void 0!==(t=new z(t)).alt?[g(t.lng,e),g(t.lat,e),g(t.alt,e)]:[g(t.lng,e),g(t.lat,e)]}function Me(t,e,n,o){const i=t.map(t=>e?Me(t,ie(t)?0:e-1,n,o):Ae(t,o));return!e&&n&&i.length>0&&i.push(i[0].slice()),i}function Se(t,e){return t.feature?{...t.feature,geometry:e}:Oe(e)}function Oe(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}const Ie={toGeoJSON(t){return Se(this,{type:"Point",coordinates:Ae(this.getLatLng(),t)})}};be.include(Ie),we.include(Ie),xe.include(Ie),Le.include({toGeoJSON(t){const e=!ie(this._latlngs);return Se(this,{type:(e?"Multi":"")+"LineString",coordinates:Me(this._latlngs,e?1:0,!1,t)})}}),ke.include({toGeoJSON(t){const e=!ie(this._latlngs),n=e&&!ie(this._latlngs[0]);let o=Me(this._latlngs,n?2:e?1:0,!0,t);return e||(o=[o]),Se(this,{type:(n?"Multi":"")+"Polygon",coordinates:o})}}),me.include({toMultiPoint(t){const e=[];return this.eachLayer(n=>{e.push(n.toGeoJSON(t).geometry.coordinates)}),Se(this,{type:"MultiPoint",coordinates:e})},toGeoJSON(t){const e=this.feature?.geometry?.type;if("MultiPoint"===e)return this.toMultiPoint(t);const n="GeometryCollection"===e,o=[];return this.eachLayer(e=>{if(e.toGeoJSON){const i=e.toGeoJSON(t);if(n)o.push(i.geometry);else{const t=Oe(i);"FeatureCollection"===t.type?o.push.apply(o,t.features):o.push(t)}}}),n?Se(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});class Ze extends pe{static{this.setDefaultOptions({padding:.1,continuous:!1})}initialize(t){y(this,t)}onAdd(){this._container||(this._initContainer(),this._container.classList.add("leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._resizeContainer(),this._onMoveEnd()}onRemove(){this._destroyContainer()}getEvents(){const t={viewreset:this._reset,zoom:this._onZoom,moveend:this._onMoveEnd,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),this.options.continuous&&(t.move=this._onMoveEnd),t}_onAnimZoom(t){this._updateTransform(t.center,t.zoom)}_onZoom(){this._updateTransform(this._map.getCenter(),this._map.getZoom())}_updateTransform(t,e){const n=this._map.getZoomScale(e,this._zoom),o=this._map.getSize().multiplyBy(.5+this.options.padding),i=this._map.project(this._center,e),r=o.multiplyBy(-n).add(i).subtract(this._map._getNewPixelOrigin(t,e));$(this._container,r,n)}_onMoveEnd(t){const e=this.options.padding,n=this._map.getSize(),o=this._map.containerPointToLayerPoint(n.multiplyBy(-e)).round();this._bounds=new T(o,o.add(n.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._updateTransform(this._center,this._zoom),this._onSettled(t),this._resizeContainer()}_reset(){this._onSettled(),this._updateTransform(this._center,this._zoom),this._onViewReset()}_initContainer(){this._container=W("div")}_destroyContainer(){bt(this._container),this._container.remove(),delete this._container}_resizeContainer(){const t=this.options.padding,e=this._map.getSize().multiplyBy(1+2*t).round();return this._container.style.width=`${e.x}px`,this._container.style.height=`${e.y}px`,e}_onZoomEnd(){}_onViewReset(){}_onSettled(){}}class Re extends pe{static{this.setDefaultOptions({opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:"",decoding:"auto"})}initialize(t,e,n){this._url=t,this._bounds=new E(e),y(this,n)}onAdd(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(this._image.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()}onRemove(){this._image.remove(),this.options.interactive&&this.removeInteractiveTarget(this._image)}setOpacity(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this}setStyle(t){return t.opacity&&this.setOpacity(t.opacity),this}bringToFront(){return this._map&&U(this._image),this}bringToBack(){return this._map&&q(this._image),this}setUrl(t){return this._url=t,this._image&&(this._image.src=t),this}setBounds(t){return this._bounds=new E(t),this._map&&this._reset(),this}getEvents(){const t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}getBounds(){return this._bounds}getElement(){return this._image}_initImage(){const t="IMG"===this._url.tagName,e=this._image=t?this._url:W("img");e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(..._(this.options.className)),e.onselectstart=f,e.onpointermove=f,e.onload=this.fire.bind(this,"load"),e.onerror=this._overlayOnError.bind(this),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),e.decoding=this.options.decoding,this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)}_animateZoom(t){const e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;$(this._image,n,e)}_reset(){const t=this._image,e=new T(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();K(t,e.min),t.style.width=`${n.x}px`,t.style.height=`${n.y}px`}_updateOpacity(){this._image.style.opacity=this.options.opacity}_updateZIndex(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)}_overlayOnError(){this.fire("error");const t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}getCenter(){return this._bounds.getCenter()}}class Be extends Re{static{this.setDefaultOptions({autoplay:!0,controls:!1,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0})}_initImage(){const t="VIDEO"===this._url.tagName,e=this._image=t?this._url:W("video");if(e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(..._(this.options.className)),_t(e,"pointerdown",t=>{e.controls&&kt(t)}),e.onloadeddata=this.fire.bind(this,"load"),t){const t=e.getElementsByTagName("source"),n=t.map(t=>t.src);return void(this._url=t.length>0?n:[e.src])}Array.isArray(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.hasOwn(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.controls=!!this.options.controls,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(const t of this._url){const n=W("source");n.src=t,e.appendChild(n)}}}class Ne extends pe{static{this.setDefaultOptions({interactive:!1,offset:[0,0],className:"",pane:void 0,content:""})}initialize(t,e){t instanceof z||Array.isArray(t)?(this._latlng=new z(t),y(this,e)):(y(this,t),this._source=e),this.options.content&&(this._content=this.options.content)}openOn(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this}close(){return this._map?.removeLayer(this),this}toggle(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this}onAdd(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&(this._container.style.opacity=0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&(this._container.style.opacity=1),this.bringToFront(),this.options.interactive&&(this._container.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._container))}onRemove(t){t._fadeAnimated?(this._container.style.opacity=0,this._removeTimeout=setTimeout(()=>this._container.remove(),200)):this._container.remove(),this.options.interactive&&(this._container.classList.remove("leaflet-interactive"),this.removeInteractiveTarget(this._container))}getLatLng(){return this._latlng}setLatLng(t){return this._latlng=new z(t),this._map&&(this._updatePosition(),this._adjustPan()),this}getContent(){return this._content}setContent(t){return this._content=t,this.update(),this}getElement(){return this._container}update(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())}getEvents(){const t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}isOpen(){return!!this._map&&this._map.hasLayer(this)}bringToFront(){return this._map&&U(this._container),this}bringToBack(){return this._map&&q(this._container),this}_prepareOpen(t){let e=this._source;if(!e._map)return!1;if(e instanceof fe){e=null;for(const t of Object.values(this._source._layers))if(t._map){e=t;break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0}_updateContent(){if(!this._content)return;const t=this._contentNode,e="function"==typeof this._content?this._content(this._source??this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}_updatePosition(){if(!this._map)return;const t=this._map.latLngToLayerPoint(this._latlng),e=this._getAnchor();let n=new P(this.options.offset);this._zoomAnimated?K(this._container,t.add(e)):n=n.add(t).add(e);const o=this._containerBottom=-n.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+n.x;this._container.style.bottom=`${o}px`,this._container.style.left=`${i}px`}_getAnchor(){return[0,0]}}Rt.include({_initOverlay(t,e,n,o){let i=e;return i instanceof t||(i=new t(o).setContent(e)),n&&i.setLatLng(n),i}}),pe.include({_initOverlay(t,e,n,o){let i=n;return i instanceof t?(y(i,o),i._source=this):(i=e&&!o?e:new t(o,this),i.setContent(n)),i}});class je extends Ne{static{this.setDefaultOptions({pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,closeButtonLabel:"Close popup",autoClose:!0,closeOnEscapeKey:!0,className:"",trackResize:!0})}openOn(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ne.prototype.openOn.call(this,t)}onAdd(t){Ne.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ve||this._source.on("preclick",kt))}onRemove(t){Ne.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ve||this._source.off("preclick",kt))}getEvents(){const t=Ne.prototype.getEvents.call(this);return(this.options.closeOnClick??this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t}_initLayout(){const t="leaflet-popup",e=this._container=W("div",`${t} ${this.options.className||""} leaflet-zoom-animated`),n=this._wrapper=W("div",`${t}-content-wrapper`,e);if(this._contentNode=W("div",`${t}-content`,n),Tt(e),Pt(this._contentNode),_t(e,"contextmenu",kt),this._tipContainer=W("div",`${t}-tip-container`,e),this._tip=W("div",`${t}-tip`,this._tipContainer),this.options.closeButton){const n=this._closeButton=W("a",`${t}-close-button`,e);n.setAttribute("role","button"),n.setAttribute("aria-label",this.options.closeButtonLabel),n.href="#close",n.innerHTML='× ',_t(n,"click",t=>{Et(t),this.close()})}this.options.trackResize&&(this._resizeObserver=new ResizeObserver(t=>{this._map&&(this._containerWidth=t[0]?.contentRect?.width,this._containerHeight=t[0]?.contentRect?.height,this._updateLayout(),this._updatePosition(),this._adjustPan())}),this._resizeObserver.observe(this._contentNode))}_updateLayout(){const t=this._contentNode,e=t.style;e.maxWidth=`${this.options.maxWidth}px`,e.minWidth=`${this.options.minWidth}px`;const n=this._containerHeight??t.offsetHeight,o=this.options.maxHeight,i="leaflet-popup-scrolled";o&&n>o?(e.height=`${o}px`,t.classList.add(i)):t.classList.remove(i),this._containerWidth=this._container.offsetWidth,this._containerHeight=this._container.offsetHeight}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();K(this._container,e.add(n))}_adjustPan(){if(!this.options.autoPan)return;if(this._map._panAnim?.stop(),this._autopanning)return void(this._autopanning=!1);const t=this._map,e=parseInt(getComputedStyle(this._container).marginBottom,10)||0,n=this._containerHeight+e,o=this._containerWidth,i=new P(this._containerLeft,-n-this._containerBottom);i._add(G(this._container));const r=t.layerPointToContainerPoint(i),s=new P(this.options.autoPanPadding),a=new P(this.options.autoPanPaddingTopLeft??s),l=new P(this.options.autoPanPaddingBottomRight??s),c=t.getSize();let h=0,d=0;r.x+o+l.x>c.x&&(h=r.x+o-c.x+l.x),r.x-h-a.x<0&&(h=r.x-a.x),r.y+n+l.y>c.y&&(d=r.y+n-c.y+l.y),r.y-d-a.y<0&&(d=r.y-a.y),(h||d)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([h,d]))}_getAnchor(){return new P(this._source?._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}Rt.mergeOptions({closePopupOnClick:!0}),Rt.include({openPopup(t,e,n){return this._initOverlay(je,t,e,n).openOn(this),this},closePopup(t){return t=arguments.length?t:this._popup,t?.close(),this}}),pe.include({bindPopup(t,e){return this._popup=this._initOverlay(je,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup(){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(t){return this._popup&&(this instanceof fe||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup(){return this._popup?.close(),this},togglePopup(){return this._popup?.toggle(this),this},isPopupOpen(){return this._popup?.isOpen()??!1},setPopupContent(t){return this._popup?.setContent(t),this},getPopup(){return this._popup},_openPopup(t){if(!this._popup||!this._map)return;zt(t);const e=t.propagatedFrom??t.target;this._popup._source!==e||e instanceof ve?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)},_movePopup(t){this._popup.setLatLng(t.latlng)},_onKeyPress(t){"Enter"===t.originalEvent.code&&this._openPopup(t)}});class De extends Ne{static{this.setDefaultOptions({pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9})}onAdd(t){Ne.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))}onRemove(t){Ne.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))}getEvents(){const t=Ne.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t}_initLayout(){const t=`leaflet-tooltip ${this.options.className||""} leaflet-zoom-${this._zoomAnimated?"animated":"hide"}`;this._contentNode=this._container=W("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id",`leaflet-tooltip-${u(this)}`)}_updateLayout(){}_adjustPan(){}_setPosition(t){let e,n,o=this.options.direction;const i=this._map,r=this._container,s=i.latLngToContainerPoint(i.getCenter()),a=i.layerPointToContainerPoint(t),l=r.offsetWidth,c=r.offsetHeight,h=new P(this.options.offset),d=this._getAnchor();"top"===o?(e=l/2,n=c):"bottom"===o?(e=l/2,n=0):"center"===o?(e=l/2,n=c/2):"right"===o?(e=0,n=c/2):"left"===o?(e=l,n=c/2):a.xthis._addFocusListeners(t)),this._tooltip.options.sticky&&(n.pointermove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t},openTooltip(t){return this._tooltip&&(this instanceof fe||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip(){if(this._tooltip)return this._tooltip.close()},toggleTooltip(){return this._tooltip?.toggle(this),this},isTooltipOpen(){return this._tooltip.isOpen()},setTooltipContent(t){return this._tooltip?.setContent(t),this},getTooltip(){return this._tooltip},_addFocusListeners(t){this.getElement?this._addFocusListenersOnLayer(this,t):this.eachLayer&&this.eachLayer(e=>this._addFocusListenersOnLayer(e,t),this)},_addFocusListenersOnLayer(t,e){const n="function"==typeof t.getElement&&t.getElement();if(n){const o=e?"off":"on";e||(n._leaflet_focus_handler&&bt(n,"focus",n._leaflet_focus_handler,this),n._leaflet_focus_handler=()=>{this._tooltip&&(this._tooltip._source=t,this.openTooltip())}),n._leaflet_focus_handler&&It[o](n,"focus",n._leaflet_focus_handler,this),It[o](n,"blur",this.closeTooltip,this),e&&delete n._leaflet_focus_handler}},_setAriaDescribedByOnLayer(t){const e="function"==typeof t.getElement&&t.getElement();e?.setAttribute?.("aria-describedby",this._tooltip._container.id)},_openTooltip(t){this._tooltip&&this._map&&(this._map.dragging?.moving()?"add"!==t.type||this._moveEndOpensTooltip||(this._moveEndOpensTooltip=!0,this._map.once("moveend",()=>{this._moveEndOpensTooltip=!1,this._openTooltip(t)})):(this._tooltip._source=t.propagatedFrom??t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)))},_moveTooltip(t){let e,n,o=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.pointerEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),o=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(o)}});class Fe extends ge{static{this.setDefaultOptions({iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"})}createIcon(t){const e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(e.replaceChildren(),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){const t=new P(n.bgPos);e.style.backgroundPosition=`${-t.x}px ${-t.y}px`}return this._setIconStyles(e,"icon"),e}createShadow(){return null}}ge.Default=_e;class He extends pe{static{this.setDefaultOptions({tileSize:256,opacity:1,updateWhenIdle:F.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2})}initialize(t){y(this,t)}onAdd(){this._initContainer(),this._levels={},this._tiles={},this._resetView()}beforeAdd(t){t._addZoomLimit(this)}onRemove(t){this._removeAllTiles(),this._container.remove(),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0,clearTimeout(this._pruneTimeout)}bringToFront(){return this._map&&(U(this._container),this._setAutoZIndex(Math.max)),this}bringToBack(){return this._map&&(q(this._container),this._setAutoZIndex(Math.min)),this}getContainer(){return this._container}setOpacity(t){return this.options.opacity=t,this._updateOpacity(),this}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}isLoading(){return this._loading}redraw(){if(this._map){this._removeAllTiles();const t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this}getEvents(){const t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=p(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}createTile(){return document.createElement("div")}getTileSize(){const t=this.options.tileSize;return t instanceof P?t:new P(t,t)}_updateZIndex(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)}_setAutoZIndex(t){const e=this.getPane().children;let n=-t(-1/0,1/0);for(const o of e){const e=o.style.zIndex;o!==this._container&&e&&(n=t(n,+e))}isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())}_updateOpacity(){if(!this._map)return;this._container.style.opacity=this.options.opacity;const t=+new Date;let e=!1,n=!1;for(const o of Object.values(this._tiles??{})){if(!o.current||!o.loaded)continue;const i=Math.min(1,(t-o.loaded)/200);o.el.style.opacity=i,i<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}n&&!this._noPrune&&this._pruneTiles(),e&&(cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this)))}_onOpaqueTile(){}_initContainer(){this._container||(this._container=W("div",`leaflet-layer ${this.options.className??""}`),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))}_updateLevels(){const t=this._tileZoom,e=this.options.maxZoom;if(void 0===t)return;for(let n of Object.keys(this._levels))n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(this._levels[n].el.remove(),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);let n=this._levels[t];const o=this._map;return n||(n=this._levels[t]={},n.el=W("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}_onUpdateLevel(){}_onRemoveLevel(){}_onCreateLevel(){}_pruneTiles(){if(!this._map)return;const t=this._map.getZoom();if(t>this.options.maxZoom||to&&this._retainParent(i,r,s,o))}_retainChildren(t,e,n,o){for(let i=2*t;i<2*t+2;i++)for(let t=2*e;t<2*e+2;t++){const e=new P(i,t);e.z=n+1;const r=this._tileCoordsToKey(e),s=this._tiles[r];s?.active?s.retain=!0:(s?.loaded&&(s.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&i1)this._setView(t,n);else{for(let t=i.min.y;t<=i.max.y;t++)for(let e=i.min.x;e<=i.max.x;e++){const n=new P(e,t);if(n.z=this._tileZoom,!this._isValidTile(n))continue;const o=this._tiles[this._tileCoordsToKey(n)];o?o.current=!0:s.push(n)}if(s.sort((t,e)=>t.distanceTo(r)-e.distanceTo(r)),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));const t=document.createDocumentFragment();for(const e of s)this._addTile(e,t);this._level.el.appendChild(t)}}}_isValidTile(t){const e=this._map.options.crs;if(!e.infinite){const n=this._globalTileRange;if(!e.wrapLng&&(t.xn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;const n=this._tileCoordsToBounds(t);return new E(this.options.bounds).overlaps(n)}_keyToBounds(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))}_tileCoordsToNwSe(t){const e=this._map,n=this.getTileSize(),o=t.scaleBy(n),i=o.add(n);return[e.unproject(o,t.z),e.unproject(i,t.z)]}_tileCoordsToBounds(t){const e=this._tileCoordsToNwSe(t);let n=new E(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n}_tileCoordsToKey(t){return`${t.x}:${t.y}:${t.z}`}_keyToTileCoords(t){const e=t.split(":"),n=new P(+e[0],+e[1]);return n.z=+e[2],n}_removeTile(t){const e=this._tiles[t];e&&(e.el.remove(),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))}_initTile(t){t.classList.add("leaflet-tile");const e=this.getTileSize();t.style.width=`${e.x}px`,t.style.height=`${e.y}px`,t.onselectstart=f,t.onpointermove=f}_addTile(t,e){const n=this._getTilePos(t),o=this._tileCoordsToKey(t),i=this.createTile(this._wrapCoords(t),this._tileReady.bind(this,t));this._initTile(i),this.createTile.length<2&&requestAnimationFrame(this._tileReady.bind(this,t,null,i)),K(i,n),this._tiles[o]={el:i,coords:t,current:!0},e.appendChild(i),this.fire("tileloadstart",{tile:i,coords:t})}_tileReady(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});const o=this._tileCoordsToKey(t);(n=this._tiles[o])&&(n.loaded=+new Date,this._map._fadeAnimated?(n.el.style.opacity=0,cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this))):(n.active=!0,this._pruneTiles()),e||(n.el.classList.add("leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),this._map._fadeAnimated?this._pruneTimeout=setTimeout(this._pruneTiles.bind(this),250):requestAnimationFrame(this._pruneTiles.bind(this))))}_getTilePos(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)}_wrapCoords(t){const e=new P(this._wrapX?m(t.x,this._wrapX):t.x,this._wrapY?m(t.y,this._wrapY):t.y);return e.z=t.z,e}_pxBoundsToTileRange(t){const e=this.getTileSize();return new T(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))}_noTilesToLoad(){return Object.values(this._tiles).every(t=>t.loaded)}}class We extends He{static{this.setDefaultOptions({minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1})}initialize(t,e){if(this._url=t,null===(e=y(this,e)).attribution&&URL.canParse(t)){const n=new URL(t).hostname;["tile.openstreetmap.org","tile.osm.org"].some(t=>n.endsWith(t))&&(e.attribution='© OpenStreetMap contributors')}e.detectRetina&&F.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)}setUrl(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this}createTile(t,e){const n=document.createElement("img");return _t(n,"load",this._tileOnLoad.bind(this,e,n)),_t(n,"error",this._tileOnError.bind(this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n}getTileUrl(t){const e=Object.create(this.options);if(Object.assign(e,{r:F.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()}),this._map&&!this._map.options.crs.infinite){const n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return v(this._url,e)}_tileOnLoad(t,e){t(null,e)}_tileOnError(t,e,n){const o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(n,e)}_onTileRemove(t){t.tile.onload=null}_getZoomForUrl(){let t=this._tileZoom;const e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset}_getSubdomain(t){const e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]}_abortLoading(){let t,e;for(t of Object.keys(this._tiles))if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=f,e.onerror=f,!e.complete)){e.src=x;const n=this._tiles[t].coords;e.remove(),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}}_removeTile(t){const e=this._tiles[t];if(e)return e.el.setAttribute("src",x),He.prototype._removeTile.call(this,t)}_tileReady(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==x))return He.prototype._tileReady.call(this,t,e,n)}_clampZoom(t){return Math.round(He.prototype._clampZoom.call(this,t))}}class Ue extends We{static{this.prototype.defaultWmsParams={service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},this.setDefaultOptions({crs:null,uppercase:!1})}initialize(t,e){this._url=t;const n={...this.defaultWmsParams};for(const t of Object.keys(e))t in this.options||(n[t]=e[t]);const o=(e=y(this,e)).detectRetina&&F.retina?2:1,i=this.getTileSize();n.width=i.x*o,n.height=i.y*o,this.wmsParams=n}onAdd(t){this._crs=this.options.crs??t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);const e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,We.prototype.onAdd.call(this,t)}getTileUrl(t){const e=this._tileCoordsToNwSe(t),n=this._crs,o=new T(n.project(e[0]),n.project(e[1])),i=o.min,r=o.max,s=(this._wmsVersion>=1.3&&this._crs===de?[i.y,i.x,r.y,r.x]:[i.x,i.y,r.x,r.y]).join(","),a=new URL(We.prototype.getTileUrl.call(this,t));for(const[t,e]of Object.entries({...this.wmsParams,bbox:s}))a.searchParams.append(this.options.uppercase?t.toUpperCase():t,e);return a.toString()}setParams(t,e){return Object.assign(this.wmsParams,t),e||this.redraw(),this}}We.WMS=Ue;class qe extends Ze{initialize(t){y(this,{...t,continuous:!1}),u(this),this._layers??={}}onAdd(t){super.onAdd(t),this.on("update",this._updatePaths,this)}onRemove(){super.onRemove(),this.off("update",this._updatePaths,this)}_onZoomEnd(){for(const t of Object.values(this._layers))t._project()}_updatePaths(){for(const t of Object.values(this._layers))t._update()}_onViewReset(){for(const t of Object.values(this._layers))t._reset()}_onSettled(){this._update()}_update(){}}class $e extends qe{static{this.setDefaultOptions({tolerance:0})}getEvents(){const t=qe.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t}_onViewPreReset(){this._postponeUpdatePaths=!0}onAdd(t){qe.prototype.onAdd.call(this,t),this._draw()}onRemove(){qe.prototype.onRemove.call(this),clearTimeout(this._pointerHoverThrottleTimeout)}_initContainer(){const t=this._container=document.createElement("canvas");_t(t,"pointermove",this._onPointerMove,this),_t(t,"click dblclick pointerdown pointerup contextmenu",this._onClick,this),_t(t,"pointerout",this._handlePointerOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")}_destroyContainer(){cancelAnimationFrame(this._redrawRequest),this._redrawRequest=null,delete this._ctx,qe.prototype._destroyContainer.call(this)}_resizeContainer(){const t=qe.prototype._resizeContainer.call(this),e=this._ctxScale=window.devicePixelRatio;this._container.width=e*t.x,this._container.height=e*t.y}_updatePaths(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(const t of Object.values(this._layers))t._update();this._redraw()}}_update(){if(this._map._animatingZoom&&this._bounds)return;const t=this._bounds,e=this._ctxScale;this._ctx.setTransform(e,0,0,e,-t.min.x*e,-t.min.y*e),this.fire("update")}_reset(){qe.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())}_initPath(t){this._updateDashArray(t),this._layers[u(t)]=t;const e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst??=this._drawLast}_addPath(t){this._requestRedraw(t)}_removePath(t){const e=t._order,n=e.next,o=e.prev;n?n.prev=o:this._drawLast=o,o?o.next=n:this._drawFirst=n,delete t._order,delete this._layers[u(t)],this._requestRedraw(t)}_updatePath(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)}_updateStyle(t){this._updateDashArray(t),this._requestRedraw(t)}_updateDashArray(t){if("string"==typeof t.options.dashArray){const e=t.options.dashArray.split(/[, ]+/);t.options._dashArray=e.map(t=>Number(t)).filter(t=>!isNaN(t))}else t.options._dashArray=t.options.dashArray}_requestRedraw(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest??=requestAnimationFrame(this._redraw.bind(this)))}_extendRedrawBounds(t){if(t._pxBounds){const e=(t.options.weight??0)+1;this._redrawBounds??=new T,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}}_redraw(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null}_clear(){const t=this._redrawBounds;if(t){const e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()}_draw(){let t;const e=this._redrawBounds;if(this._ctx.save(),e){const t=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,t.x,t.y),this._ctx.clip()}this._drawing=!0;for(let n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()}_updatePoly(t,e){if(!this._drawing)return;const n=t._parts,o=this._ctx;n.length&&(o.beginPath(),n.forEach(t=>{t.forEach((t,e)=>{o[e?"lineTo":"moveTo"](t.x,t.y)}),e&&o.closePath()}),this._fillStroke(o,t))}_updateCircle(t){if(!this._drawing||t._empty())return;const e=t._point,n=this._ctx,o=Math.max(Math.round(t._radius),1),i=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==i&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(e.x,e.y/i,o,0,2*Math.PI,!1),1!==i&&n.restore(),this._fillStroke(n,t)}_fillStroke(t,e){const n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor??n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&(t.lineDashOffset=Number(n.dashOffset??0),t.setLineDash(n._dashArray??[])),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())}_onClick(t){const e=this._map.pointerEventToLayerPoint(t);let n,o;for(let i=this._drawFirst;i;i=i.next)n=i.layer,n.options.interactive&&n._containsPoint(e)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(n))&&(o=n);this._fireEvent(!!o&&[o],t)}_onPointerMove(t){if(!this._map||this._map.dragging.moving()||this._map._animatingZoom)return;const e=this._map.pointerEventToLayerPoint(t);this._handlePointerHover(t,e)}_handlePointerOut(t){const e=this._hoveredLayer;e&&(this._container.classList.remove("leaflet-interactive"),this._fireEvent([e],t,"pointerout"),this._hoveredLayer=null,this._pointerHoverThrottled=!1)}_handlePointerHover(t,e){if(this._pointerHoverThrottled)return;let n,o;for(let t=this._drawFirst;t;t=t.next)n=t.layer,n.options.interactive&&n._containsPoint(e)&&(o=n);o!==this._hoveredLayer&&(this._handlePointerOut(t),o&&(this._container.classList.add("leaflet-interactive"),this._fireEvent([o],t,"pointerover"),this._hoveredLayer=o)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._pointerHoverThrottled=!0,this._pointerHoverThrottleTimeout=setTimeout(()=>{this._pointerHoverThrottled=!1},32)}_fireEvent(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)}_bringToFront(t){const e=t._order;if(!e)return;const n=e.next,o=e.prev;n&&(n.prev=o,o?o.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}_bringToBack(t){const e=t._order;if(!e)return;const n=e.next,o=e.prev;o&&(o.next=n,n?n.prev=o:o&&(this._drawLast=o),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}function Ve(t,e){return t.flatMap(t=>[...t.map((t,e)=>`${(e?"L":"M")+t.x} ${t.y}`),e?"z":""]).join("")||"M0 0"}const Ke=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)};class Ge extends qe{_initContainer(){this._container=Ke("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ke("g"),this._container.appendChild(this._rootGroup)}_destroyContainer(){qe.prototype._destroyContainer.call(this),delete this._rootGroup,delete this._svgSize}_resizeContainer(){const t=qe.prototype._resizeContainer.call(this);this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,this._container.setAttribute("width",t.x),this._container.setAttribute("height",t.y))}_update(){if(this._map._animatingZoom&&this._bounds)return;const t=this._bounds,e=t.getSize();this._container.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}_initPath(t){const e=t._path=Ke("path");t.options.className&&e.classList.add(..._(t.options.className)),t.options.interactive&&e.classList.add("leaflet-interactive"),this._updateStyle(t),this._layers[u(t)]=t}_addPath(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)}_removePath(t){t._path.remove(),t.removeInteractiveTarget(t._path),delete this._layers[u(t)]}_updatePath(t){t._project(),t._update()}_updateStyle(t){const e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))}_updatePoly(t,e){this._setPath(t,Ve(t._parts,e))}_updateCircle(t){const e=t._point,n=Math.max(Math.round(t._radius),1),o=`a${n},${Math.max(Math.round(t._radiusY),1)||n} 0 1,0 `,i=t._empty()?"M0 0":`M${e.x-n},${e.y}${o}${2*n},0 ${o}${2*-n},0 `;this._setPath(t,i)}_setPath(t,e){t._path.setAttribute("d",e)}_bringToFront(t){U(t._path)}_bringToBack(t){q(t._path)}}Rt.include({getRenderer(t){let e=t.options.renderer??this._getPaneRenderer(t.options.pane)??this.options.renderer??this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer(t){if("overlayPane"===t||void 0===t)return;let e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer(t){return this.options.preferCanvas&&new $e(t)||new Ge(t)}});class Je extends ke{initialize(t,e){ke.prototype.initialize.call(this,this._boundsToLatLngs(t),e)}setBounds(t){return this.setLatLngs(this._boundsToLatLngs(t))}_boundsToLatLngs(t){return[(t=new E(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}Ge.create=Ke,Ge.pointsToPath=Ve,Pe.geometryToLayer=Te,Pe.coordsToLatLng=ze,Pe.coordsToLatLngs=Ce,Pe.latLngToCoords=Ae,Pe.latLngsToCoords=Me,Pe.getFeature=Se,Pe.asFeature=Oe,Rt.mergeOptions({boxZoom:!0});class Ye extends Wt{initialize(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)}addHooks(){_t(this._container,"pointerdown",this._onPointerDown,this)}removeHooks(){bt(this._container,"pointerdown",this._onPointerDown,this)}moved(){return this._moved}_destroy(){this._pane.remove(),delete this._pane}_resetState(){this._resetStateTimeout=0,this._moved=!1}_clearDeferredResetState(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)}_onPointerDown(t){if(!t.shiftKey||0!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),et(),ot(),this._startPoint=this._map.pointerEventToContainerPoint(t),_t(document,{contextmenu:zt,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerMove(t){this._moved||(this._moved=!0,this._box=W("div","leaflet-zoom-box",this._container),this._container.classList.add("leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.pointerEventToContainerPoint(t);const e=new T(this._point,this._startPoint),n=e.getSize();K(this._box,e.min),this._box.style.width=`${n.x}px`,this._box.style.height=`${n.y}px`}_finish(){this._moved&&(this._box.remove(),this._container.classList.remove("leaflet-crosshair")),nt(),it(),bt(document,{contextmenu:zt,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerUp(t){if(0!==t.button)return;if(this._finish(),!this._moved)return;this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(this._resetState.bind(this),0);const e=new E(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}_onKeyDown(t){"Escape"===t.code&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}Rt.addInitHook("addHandler","boxZoom",Ye),Rt.mergeOptions({doubleClickZoom:!0});class Xe extends Wt{addHooks(){this._map.on("dblclick",this._onDoubleClick,this)}removeHooks(){this._map.off("dblclick",this._onDoubleClick,this)}_onDoubleClick(t){const e=this._map,n=e.getZoom(),o=e.options.zoomDelta,i=t.originalEvent.shiftKey?n-o:n+o;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}Rt.addInitHook("addHandler","doubleClickZoom",Xe),Rt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});class Qe extends Wt{addHooks(){if(!this._draggable){const t=this._map;this._draggable=new Ut(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}this._map._container.classList.add("leaflet-grab","leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]}removeHooks(){this._map._container.classList.remove("leaflet-grab","leaflet-touch-drag"),this._draggable.disable()}moved(){return this._draggable?._moved}moving(){return this._draggable?._moving}_onDragStart(){const t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){const t=new E(this._map.options.maxBounds);this._offsetLimit=new T(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])}_onDrag(t){if(this._map.options.inertia){const t=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(t),this._prunePositions(t)}this._map.fire("move",t).fire("drag",t)}_prunePositions(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()}_onZoomEnd(){const t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x}_viscousLimit(t,e){return t-(t-e)*this._viscosity}_onPreDragLimit(){if(!this._viscosity||!this._offsetLimit)return;const t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}_onPreDragWrap(){const t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,o=this._draggable._newPos.x,i=(o-e+n)%t+e-n,r=(o+e+n)%t-e-n,s=Math.abs(i+n){e.panBy(h,{duration:c,easeLinearity:i,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}}Rt.addInitHook("addHandler","dragging",Qe),Rt.mergeOptions({keyboard:!0,keyboardPanDelta:80});class tn extends Wt{static keyCodes={left:["ArrowLeft"],right:["ArrowRight"],down:["ArrowDown"],up:["ArrowUp"],zoomIn:["Equal","NumpadAdd","BracketRight"],zoomOut:["Minus","NumpadSubtract","Digit6","Slash"]};initialize(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)}addHooks(){const t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),t.ariaKeyShortcuts=Object.values(tn.keyCodes).flat().join(" "),_t(t,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)}removeHooks(){this._removeHooks(),bt(this._map._container,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)}_onPointerDown(){if(this._focused)return;const t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,o=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(o,n)}_onFocus(){this._focused=!0,this._map.fire("focus")}_onBlur(){this._focused=!1,this._map.fire("blur")}_setPanDelta(t){const e=this._panKeys={},n=tn.keyCodes;for(const o of n.left)e[o]=[-1*t,0];for(const o of n.right)e[o]=[t,0];for(const o of n.down)e[o]=[0,t];for(const o of n.up)e[o]=[0,-1*t]}_setZoomDelta(t){const e=this._zoomKeys={},n=tn.keyCodes;for(const o of n.zoomIn)e[o]=t;for(const o of n.zoomOut)e[o]=-t}_addHooks(){_t(document,"keydown",this._onKeyDown,this)}_removeHooks(){bt(document,"keydown",this._onKeyDown,this)}_onKeyDown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;const e=t.code,n=this._map;let o;if(e in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(o=this._panKeys[e],t.shiftKey&&(o=new P(o).multiplyBy(3)),n.options.maxBounds&&(o=n._limitOffset(new P(o),n.options.maxBounds)),n.options.worldCopyJump){const t=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(o)));n.panTo(t)}else n.panBy(o)}else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if("Escape"!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}zt(t)}}Rt.addInitHook("addHandler","keyboard",tn),Rt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});class en extends Wt{addHooks(){_t(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0}removeHooks(){bt(this._map._container,"wheel",this._onWheelScroll,this),clearTimeout(this._timer)}_onWheelScroll(t){const e=St(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.pointerEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);const o=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(this._performZoom.bind(this),o),zt(t)}_performZoom(){const t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap??0;t._stop();const o=this._delta/(4*this._map.options.wheelPxPerZoomLevel),i=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,r=n?Math.ceil(i/n)*n:i,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}}Rt.addInitHook("addHandler","scrollWheelZoom",en),Rt.mergeOptions({tapHold:F.safari&&F.mobile,tapTolerance:15});class nn extends Wt{addHooks(){_t(this._map._container,"pointerdown",this._onDown,this)}removeHooks(){bt(this._map._container,"pointerdown",this._onDown,this),clearTimeout(this._holdTimeout)}_onDown(t){clearTimeout(this._holdTimeout),1===gt().length&&"mouse"!==t.pointerType&&(this._startPos=this._newPos=new P(t.clientX,t.clientY),this._holdTimeout=setTimeout(()=>{this._cancel(),this._isTapValid()&&(_t(document,"pointerup",Et),_t(document,"pointerup pointercancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},600),_t(document,"pointerup pointercancel contextmenu",this._cancel,this),_t(document,"pointermove",this._onMove,this))}_cancelClickPrevent=function t(){bt(document,"pointerup",Et),bt(document,"pointerup pointercancel",t)};_cancel(){clearTimeout(this._holdTimeout),bt(document,"pointerup pointercancel contextmenu",this._cancel,this),bt(document,"pointermove",this._onMove,this)}_onMove(t){this._newPos=new P(t.clientX,t.clientY)}_isTapValid(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance}_simulateEvent(t,e){const n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}}Rt.addInitHook("addHandler","tapHold",nn),Rt.mergeOptions({pinchZoom:!0,bounceAtZoomLimits:!0});class on extends Wt{addHooks(){this._map._container.classList.add("leaflet-touch-zoom"),_t(this._map._container,"pointerdown",this._onPointerStart,this)}removeHooks(){this._map._container.classList.remove("leaflet-touch-zoom"),bt(this._map._container,"pointerdown",this._onPointerStart,this)}_onPointerStart(t){const e=this._map,n=gt();if(2!==n.length||e._animatingZoom||this._zooming)return;const o=e.pointerEventToContainerPoint(n[0]),i=e.pointerEventToContainerPoint(n[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.pinchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(o.add(i)._divideBy(2))),this._startDist=o.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),_t(document,"pointermove",this._onPointerMove,this),_t(document,"pointerup pointercancel",this._onPointerEnd,this),Et(t)}_onPointerMove(t){const e=gt();if(2!==e.length||!this._zooming)return;const n=this._map,o=n.pointerEventToContainerPoint(e[0]),i=n.pointerEventToContainerPoint(e[1]),r=o.distanceTo(i)/this._startDist;if(this._zoom=n.getScaleZoom(r,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoomn.getMaxZoom()&&r>1)&&(this._zoom=n._limitZoom(this._zoom)),"center"===n.options.pinchZoom){if(this._center=this._startLatLng,1===r)return}else{const t=o._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===t.x&&0===t.y)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(t),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),cancelAnimationFrame(this._animRequest);const s=n._move.bind(n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=requestAnimationFrame(s.bind(this)),Et(t)}_onPointerEnd(){this._moved&&this._zooming?(this._zooming=!1,cancelAnimationFrame(this._animRequest),bt(document,"pointermove",this._onPointerMove,this),bt(document,"pointerup pointercancel",this._onPointerEnd,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))):this._zooming=!1}}Rt.addInitHook("addHandler","pinchZoom",on),Rt.addInitHook(function(){this.touchZoom=this.pinchZoom,void 0!==this.options.touchZoom&&(console.warn("Map: touchZoom option is deprecated and will be removed in future versions. Use pinchZoom instead."),this.options.pinchZoom=this.options.touchZoom,delete this.options.touchZoom),this.options.pinchZoom?this.pinchZoom.enable():this.pinchZoom.disable()}),Rt.BoxZoom=Ye,Rt.DoubleClickZoom=Xe,Rt.Drag=Qe,Rt.Keyboard=tn,Rt.ScrollWheelZoom=en,Rt.TapHold=nn,Rt.PinchZoom=on,Rt.TouchZoom=on;var rn={__proto__:null,BlanketOverlay:Ze,Bounds:T,Browser:F,CRS:C,Canvas:$e,Circle:we,CircleMarker:xe,Class:L,Control:Nt,DivIcon:Fe,DivOverlay:Ne,DomEvent:It,DomUtil:ct,Draggable:Ut,Evented:k,FeatureGroup:fe,GeoJSON:Pe,GridLayer:He,Handler:Wt,Icon:ge,ImageOverlay:Re,LatLng:z,LatLngBounds:E,Layer:pe,LayerGroup:me,LeafletMap:Bt,LineUtil:se,Map:Rt,Marker:be,Path:ve,Point:P,PolyUtil:Kt,Polygon:ke,Polyline:Le,Popup:je,PosAnimation:Zt,Projection:ce,Rectangle:Je,Renderer:qe,SVG:Ge,SVGOverlay:class extends Re{_initImage(){const t=this._image=this._url;t.classList.add("leaflet-image-layer"),this._zoomAnimated&&t.classList.add("leaflet-zoom-animated"),this.options.className&&t.classList.add(..._(this.options.className)),t.onselectstart=f,t.onpointermove=f}},TileLayer:We,Tooltip:De,Transformation:O,Util:w,VideoOverlay:Be,version:"2.0.0-alpha.1"};const sn=an().L;function an(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==i.g)return i.g;throw new Error("Unable to locate global object.")}an().L=rn,an().L.noConflict=function(){return an().L=sn,this};var ln=i(72),cn=i.n(ln),hn=i(825),dn=i.n(hn),un=i(56),pn=i.n(un),mn=i(540),fn=i.n(mn),gn=i(113),_n=i.n(gn),yn=i(81),bn={};bn.styleTagTransform=_n(),bn.setAttributes=pn(),bn.insert=function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t},bn.domAPI=dn(),bn.insertStyleElement=fn(),cn()(yn.A,bn),yn.A&&yn.A.locals&&yn.A.locals;var vn=i(366),xn={};xn.styleTagTransform=_n(),xn.setAttributes=pn(),xn.insert=function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t},xn.domAPI=dn(),xn.insertStyleElement=fn(),cn()(vn.A,xn),vn.A&&vn.A.locals&&vn.A.locals;const wn=h().createContext(null),Ln=()=>h().useContext(wn),kn=h().createContext(null),Pn=()=>h().useContext(kn),Tn=h().createContext({bearing:0,setBearing:()=>{}}),En=()=>h().useContext(Tn),zn=({id:t,center:e=[51.505,-.09],zoom:n=13,minZoom:o,maxZoom:i,maxBounds:r,zoomControl:s=!0,keyboard:a=!0,dragging:l=!0,scrollWheelZoom:d=!0,doubleClickZoom:u=!0,boxZoom:p=!0,pinchZoom:m=!0,tapHold:f,bearing:g=0,preferCanvas:_=!1,attributionControl:y=!0,flyTo:b,className:v,style:x,children:w,setProps:L})=>{const k=(0,c.useRef)(null),P=(0,c.useRef)(null),[T,E]=(0,c.useState)(!1),[z,C]=(0,c.useState)(g),A=(0,c.useRef)(z);A.current=z;const M=h().useCallback(t=>{const e=(t%360+360)%360;C(e),L&&L({bearing:e})},[L]);(0,c.useEffect)(()=>{if(!T)return;const t=P.current;if(!t)return;const e=t._mapPane,n=t._container;if(!e||!n)return;const o=e.parentElement;if(o&&o.classList.contains("dl2-rotation-wrapper"))return;const i=document.createElement("div");i.className="dl2-rotation-wrapper",i.style.cssText="position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; will-change: transform;",n.insertBefore(i,e),i.appendChild(e);const r=()=>{const t=n.clientWidth,e=n.clientHeight;i.style.transformOrigin=`${t/2}px ${e/2}px`};return r(),t.on("resize",r),()=>{try{t.off("resize",r)}catch(t){}i.contains(e)&&(n.insertBefore(e,i),i.remove())}},[T]),(0,c.useEffect)(()=>{if(!T)return;const t=P.current;if(!t||!t._mapPane)return;const e=t._mapPane.parentElement;e&&e.classList.contains("dl2-rotation-wrapper")&&(e.style.transform=`rotate(${z}deg)`)},[z,T]),(0,c.useEffect)(()=>{if(!k.current||P.current)return;const t={preferCanvas:!!_,attributionControl:!1!==y,zoomControl:!1!==s,keyboard:!1!==a,dragging:!1!==l,scrollWheelZoom:!1!==d,doubleClickZoom:!1!==u,boxZoom:!1!==p,pinchZoom:!1!==m};"boolean"==typeof f&&(t.tapHold=f),"number"==typeof o&&(t.minZoom=o),"number"==typeof i&&(t.maxZoom=i),r&&(t.maxBounds=r);const c=new Rt(k.current,t).setView(e,n);P.current=c,k.current.__dl2_map=c;const h=()=>{if(!L)return;const t=c.getCenter(),e=c.getBounds();L({viewport:{center:[+t.lat.toFixed(6),+t.lng.toFixed(6)],zoom:c.getZoom(),bearing:A.current,bounds:{north:+e.getNorth().toFixed(6),south:+e.getSouth().toFixed(6),east:+e.getEast().toFixed(6),west:+e.getWest().toFixed(6)}}})};c.on("moveend zoomend",h),c.on("click",t=>L&&L({clickData:{latlng:[+t.latlng.lat.toFixed(6),+t.latlng.lng.toFixed(6)]}}));let g=0,b=0;return c.on("movestart",()=>{g+=1,L&&L({n_movestart:g})}),c.on("moveend",()=>{b+=1,L&&L({n_moveend:b})}),E(!0),h(),()=>{c.remove(),P.current=null,k.current&&delete k.current.__dl2_map}},[]);const S=(0,c.useRef)(!1);(0,c.useEffect)(()=>{P.current&&e&&"number"==typeof n&&(S.current?P.current.setView(e,n,{animate:!1}):S.current=!0)},[e,n]),(0,c.useEffect)(()=>{const t=P.current;t&&"number"==typeof o&&"function"==typeof t.setMinZoom&&t.setMinZoom(o)},[o]),(0,c.useEffect)(()=>{const t=P.current;t&&"number"==typeof i&&"function"==typeof t.setMaxZoom&&t.setMaxZoom(i)},[i]),(0,c.useEffect)(()=>{const t=P.current;t&&"function"==typeof t.setMaxBounds&&t.setMaxBounds(r||null)},[r]),(0,c.useEffect)(()=>{const t=P.current;t&&t.keyboard&&(a?t.keyboard.enable():t.keyboard.disable())},[a]);const O=(t,e)=>{const n=P.current;if(!n)return;const o=n[t];o&&"function"==typeof o.enable&&(!1===e?o.disable():o.enable())};(0,c.useEffect)(()=>O("dragging",l),[l]),(0,c.useEffect)(()=>O("scrollWheelZoom",d),[d]),(0,c.useEffect)(()=>O("doubleClickZoom",u),[u]),(0,c.useEffect)(()=>O("boxZoom",p),[p]),(0,c.useEffect)(()=>{O("pinchZoom",m),O("touchZoom",m)},[m]),(0,c.useEffect)(()=>O("tapHold",f),[f]),(0,c.useEffect)(()=>{"number"==typeof g&&g!==z&&C((g%360+360)%360)},[g]);const I=(0,c.useRef)(-1);return(0,c.useEffect)(()=>{if(!T||!b||void 0===b.n_clicks)return;if(b.n_clicks===I.current)return;I.current=b.n_clicks;const t=P.current;if(!t)return;const e=b.options||{},n=b.transition||(b.bounds?"flyToBounds":"flyTo"),o=void 0===e.animate?{...e,animate:!1}:e;try{if("setView"===n&&b.center){const e="number"==typeof b.zoom?b.zoom:t.getZoom();t.setView(b.center,e,o)}else if("flyTo"===n&&b.center){const n="number"==typeof b.zoom?b.zoom:t.getZoom();t.flyTo(b.center,n,e)}else"panTo"===n&&b.center?t.panTo(b.center,e):"fitBounds"===n&&b.bounds?t.fitBounds(b.bounds,o):"flyToBounds"===n&&b.bounds?t.flyToBounds(b.bounds,e):"panInsideBounds"===n&&b.bounds?t.panInsideBounds(b.bounds,e):console.warn("dl2.Map.flyTo: incompatible payload for transition=",n,b)}catch(t){console.warn("dl2.Map.flyTo error:",t)}},[b,T]),h().createElement("div",{id:t,ref:k,className:v,style:{height:"100%",width:"100%",...x}},h().createElement(wn.Provider,{value:T?P.current:null},h().createElement(Tn.Provider,{value:{bearing:z,setBearing:M}},T?w:null)))},Cn=({url:t="https://tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:e="© OpenStreetMap contributors",minZoom:n=0,maxZoom:o=19,maxNativeZoom:i,bounds:r,errorTileUrl:s,zIndex:a,subdomains:l,detectRetina:h=!1,tms:d=!1,opacity:u=1,crossOrigin:p})=>{const m=Ln(),f=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!m)return;const c={attribution:e,minZoom:n,maxZoom:o,opacity:u,detectRetina:h,tms:d};void 0!==i&&(c.maxNativeZoom=i),void 0!==r&&(c.bounds=r),void 0!==s&&(c.errorTileUrl=s),void 0!==a&&(c.zIndex=a),void 0!==l&&(c.subdomains=l),void 0!==p&&(c.crossOrigin=p);const g=new We(t,c);return g.addTo(m),f.current=g,()=>{g.remove(),f.current=null}},[m]),(0,c.useEffect)(()=>{f.current&&t&&f.current.setUrl(t)},[t]),(0,c.useEffect)(()=>{const t=f.current;t&&"function"==typeof t.setOpacity&&t.setOpacity(u)},[u]),(0,c.useEffect)(()=>{const t=f.current;t&&"function"==typeof t.setZIndex&&void 0!==a&&t.setZIndex(a)},[a]),null};function An(t){const e=Ln(),n=(0,c.useRef)(null),[o,i]=(0,c.useState)(null);return(0,c.useEffect)(()=>{if(!e)return;const o=t();return o.addTo(e),n.current=o,i(o),()=>{o.remove(),n.current=null,i(null)}},[e]),{layer:o,ref:n}}var Mn=i(711),Sn={};Sn.styleTagTransform=_n(),Sn.setAttributes=pn(),Sn.insert=function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t},Sn.domAPI=dn(),Sn.insertStyleElement=fn(),cn()(Mn.A,Sn),Mn.A&&Mn.A.locals&&Mn.A.locals;const On=Object.freeze({left:0,top:0,width:16,height:16}),In=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Zn=Object.freeze({...On,...In}),Rn=Object.freeze({...Zn,body:"",hidden:!1}),Bn=Object.freeze({width:null,height:null}),Nn=Object.freeze({...Bn,...In}),jn=/[\s,]+/,Dn={...Nn,preserveAspectRatio:""};function Fn(t){const e={...Dn},n=(e,n)=>t.getAttribute(e)||n;var o;return e.width=n("width",null),e.height=n("height",null),e.rotate=function(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function o(t){for(;t<0;)t+=4;return t%4}if(""===n){const e=parseInt(t);return isNaN(e)?0:o(e)}if(n!==t){let e=0;switch(n){case"%":e=25;break;case"deg":e=90}if(e){let i=parseFloat(t.slice(0,t.length-n.length));return isNaN(i)?0:(i/=e,i%1==0?o(i):0)}}return e}(n("rotate","")),o=e,n("flip","").split(jn).forEach(t=>{switch(t.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0}}),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}const Hn=/^[a-z0-9]+(-[a-z0-9]+)*$/,Wn=(t,e,n,o="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;o=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),n=i.pop(),r={provider:i.length>0?i[0]:o,prefix:n,name:t};return e&&!Un(r)?null:r}const r=i[0],s=r.split("-");if(s.length>1){const t={provider:o,prefix:s.shift(),name:s.join("-")};return e&&!Un(t)?null:t}if(n&&""===o){const t={provider:o,prefix:"",name:r};return e&&!Un(t,n)?null:t}return null},Un=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name);function qn(t,e){const n=function(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const o=((t.rotate||0)+(e.rotate||0))%4;return o&&(n.rotate=o),n}(t,e);for(const o in Rn)o in In?o in t&&!(o in n)&&(n[o]=In[o]):o in e?n[o]=e[o]:o in t&&(n[o]=t[o]);return n}function $n(t,e,n){const o=t.icons,i=t.aliases||Object.create(null);let r={};function s(t){r=qn(o[t]||i[t],r)}return s(e),n.forEach(s),qn(t,r)}function Vn(t,e){const n=[];if("object"!=typeof t||"object"!=typeof t.icons)return n;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),n.push(t)});const o=function(t){const e=t.icons,n=t.aliases||Object.create(null),o=Object.create(null);return Object.keys(e).concat(Object.keys(n)).forEach(function t(i){if(e[i])return o[i]=[];if(!(i in o)){o[i]=null;const e=n[i]&&n[i].parent,r=e&&t(e);r&&(o[i]=[e].concat(r))}return o[i]}),o}(t);for(const i in o){const r=o[i];r&&(e(i,$n(t,i,r)),n.push(i))}return n}const Kn={provider:"",aliases:{},not_found:{},...On};function Gn(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Jn(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!Gn(t,Kn))return null;const n=e.icons;for(const t in n){const e=n[t];if(!t||"string"!=typeof e.body||!Gn(e,Rn))return null}const o=e.aliases||Object.create(null);for(const t in o){const e=o[t],i=e.parent;if(!t||"string"!=typeof i||!n[i]&&!o[i]||!Gn(e,Rn))return null}return e}const Yn=Object.create(null);function Xn(t,e){const n=Yn[t]||(Yn[t]=Object.create(null));return n[e]||(n[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}(t,e))}function Qn(t,e){return Jn(e)?Vn(e,(e,n)=>{n?t.icons[e]=n:t.missing.add(e)}):[]}function to(t,e){let n=[];return("string"==typeof t?[t]:Object.keys(Yn)).forEach(t=>{("string"==typeof t&&"string"==typeof e?[e]:Object.keys(Yn[t]||{})).forEach(e=>{const o=Xn(t,e);n=n.concat(Object.keys(o.icons).map(n=>(""!==t?"@"+t+":":"")+e+":"+n))})}),n}let eo=!1;function no(t){return"boolean"==typeof t&&(eo=t),eo}function oo(t){const e="string"==typeof t?Wn(t,!0,eo):t;if(e){const t=Xn(e.provider,e.prefix),n=e.name;return t.icons[n]||(t.missing.has(n)?null:void 0)}}function io(t,e){const n=Wn(t,!0,eo);if(!n)return!1;const o=Xn(n.provider,n.prefix);return e?function(t,e,n){try{if("string"==typeof n.body)return t.icons[e]={...n},!0}catch(t){}return!1}(o,n.name,e):(o.missing.add(n.name),!0)}function ro(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),eo&&!e&&!t.prefix){let e=!1;return Jn(t)&&(t.prefix="",Vn(t,(t,n)=>{io(t,n)&&(e=!0)})),e}const n=t.prefix;return!!Un({prefix:n,name:"a"})&&!!Qn(Xn(e,n),t)}function so(t){return!!oo(t)}function ao(t){const e=oo(t);return e?{...Zn,...e}:e}function lo(t,e){t.forEach(t=>{const n=t.loaderCallbacks;n&&(t.loaderCallbacks=n.filter(t=>t.id!==e))})}let co=0;const ho=Object.create(null);function uo(t,e){ho[t]=e}function po(t){return ho[t]||ho[""]}function mo(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}const fo=Object.create(null),go=["https://api.simplesvg.com","https://api.unisvg.com"],_o=[];for(;go.length>0;)1===go.length||Math.random()>.5?_o.push(go.shift()):_o.push(go.pop());function yo(t,e){const n=mo(e);return null!==n&&(fo[t]=n,!0)}function bo(t){return fo[t]}function vo(){return Object.keys(fo)}fo[""]=mo({resources:["https://api.iconify.design"].concat(_o)});const xo={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function wo(t){const e={...xo,...t};let n=[];function o(){n=n.filter(t=>"pending"===t().status)}return{query:function(t,i,r){const s=function(t,e,n,o){const i=t.resources.length,r=t.random?Math.floor(Math.random()*i):t.index;let s;if(t.random){let e=t.resources.slice(0);for(s=[];e.length>1;){const t=Math.floor(Math.random()*e.length);s.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}s=s.concat(e)}else s=t.resources.slice(r).concat(t.resources.slice(0,r));const a=Date.now();let l,c="pending",h=0,d=null,u=[],p=[];function m(){d&&(clearTimeout(d),d=null)}function f(){"pending"===c&&(c="aborted"),m(),u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}function g(t,e){e&&(p=[]),"function"==typeof t&&p.push(t)}function _(){c="failed",p.forEach(t=>{t(void 0,l)})}function y(){u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}return"function"==typeof o&&p.push(o),setTimeout(function o(){if("pending"!==c)return;m();const i=s.shift();if(void 0===i)return u.length?void(d=setTimeout(()=>{m(),"pending"===c&&(y(),_())},t.timeout)):void _();const r={status:"pending",resource:i,callback:(e,n)=>{!function(e,n,i){const r="success"!==n;switch(u=u.filter(t=>t!==e),c){case"pending":break;case"failed":if(r||!t.dataAfterTimeout)return;break;default:return}if("abort"===n)return l=i,void _();if(r)return l=i,void(u.length||(s.length?o():_()));if(m(),y(),!t.random){const n=t.resources.indexOf(e.resource);-1!==n&&n!==t.index&&(t.index=n)}c="completed",p.forEach(t=>{t(i)})}(r,e,n)}};u.push(r),h++,d=setTimeout(o,t.rotate),n(i,e,r.callback)}),function(){return{startTime:a,payload:e,status:c,queriesSent:h,queriesPending:u.length,subscribe:g,abort:f}}}(e,t,i,(t,e)=>{o(),r&&r(t,e)});return n.push(s),s},find:function(t){return n.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:o}}function Lo(){}const ko=Object.create(null);function Po(t,e,n){let o,i;if("string"==typeof t){const e=po(t);if(!e)return n(void 0,424),Lo;i=e.send;const r=function(t){if(!ko[t]){const e=bo(t);if(!e)return;ko[t]={config:e,redundancy:wo(e)}}return ko[t]}(t);r&&(o=r.redundancy)}else{const e=mo(t);if(e){o=wo(e);const n=po(t.resources?t.resources[0]:"");n&&(i=n.send)}}return o&&i?o.query(e,i,n)().abort:(n(void 0,424),Lo)}function To(){}function Eo(t,e,n){function o(){const n=t.pendingIcons;e.forEach(e=>{n&&n.delete(e),t.icons[e]||t.missing.add(e)})}if(n&&"object"==typeof n)try{if(!Qn(t,n).length)return void o()}catch(t){console.error(t)}o(),function(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const o=t.provider,i=t.prefix;e.forEach(e=>{const r=e.icons,s=r.pending.length;r.pending=r.pending.filter(e=>{if(e.prefix!==i)return!0;const s=e.name;if(t.icons[s])r.loaded.push({provider:o,prefix:i,name:s});else{if(!t.missing.has(s))return n=!0,!0;r.missing.push({provider:o,prefix:i,name:s})}return!1}),r.pending.length!==s&&(n||lo([t],e.id),e.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),e.abort))})}))}(t)}))}(t)}function zo(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}const Co=(t,e)=>{const n=function(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name));let o={provider:"",prefix:"",name:""};return t.forEach(t=>{if(o.name===t.name&&o.prefix===t.prefix&&o.provider===t.provider)return;o=t;const i=t.provider,r=t.prefix,s=t.name,a=n[i]||(n[i]=Object.create(null)),l=a[r]||(a[r]=Xn(i,r));let c;c=s in l.icons?e.loaded:""===r||l.missing.has(s)?e.missing:e.pending;const h={provider:i,prefix:r,name:s};c.push(h)}),e}(function(t,e=!0,n=!1){const o=[];return t.forEach(t=>{const i="string"==typeof t?Wn(t,e,n):t;i&&o.push(i)}),o}(t,!0,no()));if(!n.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(n.loaded,n.missing,n.pending,To)}),()=>{t=!1}}const o=Object.create(null),i=[];let r,s;return n.pending.forEach(t=>{const{provider:e,prefix:n}=t;if(n===s&&e===r)return;r=e,s=n,i.push(Xn(e,n));const a=o[e]||(o[e]=Object.create(null));a[n]||(a[n]=[])}),n.pending.forEach(t=>{const{provider:e,prefix:n,name:i}=t,r=Xn(e,n),s=r.pendingIcons||(r.pendingIcons=new Set);s.has(i)||(s.add(i),o[e][n].push(i))}),i.forEach(t=>{const e=o[t.provider][t.prefix];e.length&&function(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:n}=t,o=t.iconsToLoad;if(delete t.iconsToLoad,!o||!o.length)return;const i=t.loadIcon;if(t.loadIcons&&(o.length>1||!i))return void zo(t.loadIcons(o,n,e),e=>{Eo(t,o,e)});if(i)return void o.forEach(o=>{zo(i(o,n,e),e=>{Eo(t,[o],e?{prefix:n,icons:{[o]:e}}:null)})});const{valid:r,invalid:s}=function(t){const e=[],n=[];return t.forEach(t=>{(t.match(Hn)?e:n).push(t)}),{valid:e,invalid:n}}(o);if(s.length&&Eo(t,s,null),!r.length)return;const a=n.match(Hn)?po(e):null;a?a.prepare(e,n,r).forEach(n=>{Po(e,n,e=>{Eo(t,n.icons,e)})}):Eo(t,r,null)}))}(t,e)}),e?function(t,e,n){const o=co++,i=lo.bind(null,n,o);if(!e.pending.length)return i;const r={id:o,icons:e,callback:t,abort:i};return n.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(r)}),i}(e,n,i):To},Ao=t=>new Promise((e,n)=>{const o="string"==typeof t?Wn(t,!0):t;o?Co([o||t],i=>{if(i.length&&o){const t=oo(o);if(t)return void e({...Zn,...t})}n(t)}):n(t)});function Mo(t){try{const e="string"==typeof t?JSON.parse(t):t;if("string"==typeof e.body)return{...e}}catch(t){}}let So=!1;try{So=0===navigator.vendor.indexOf("Apple")}catch(t){}const Oo=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Io=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Zo(t,e,n){if(1===e)return t;if(n=n||100,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const o=t.split(Oo);if(null===o||!o.length)return t;const i=[];let r=o.shift(),s=Io.test(r);for(;;){if(s){const t=parseFloat(r);isNaN(t)?i.push(r):i.push(Math.ceil(t*e*n)/n)}else i.push(r);if(r=o.shift(),void 0===r)return i.join("");s=!s}}function Ro(t,e){const n={...Zn,...t},o={...Nn,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,o].forEach(t=>{const e=[],n=t.hFlip,o=t.vFlip;let s,a=t.rotate;switch(n?o?a+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):o&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),a<0&&(a-=4*Math.floor(a/4)),a%=4,a){case 1:s=i.height/2+i.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:s=i.width/2+i.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}a%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),e.length&&(r=function(t,e){const n=function(t,e="defs"){let n="";const o=t.indexOf("<"+e);for(;o>=0;){const i=t.indexOf(">",o),r=t.indexOf(""+e);if(-1===i||-1===r)break;const s=t.indexOf(">",r);if(-1===s)break;n+=t.slice(i+1,r).trim(),t=t.slice(0,o).trim()+t.slice(s+1)}return{defs:n,content:t}}(t);return o=n.defs,i=e+n.content+"",o?""+o+" "+i:i;var o,i}(r,''))});const s=o.width,a=o.height,l=i.width,c=i.height;let h,d;null===s?(d=null===a?"1em":"auto"===a?c:a,h=Zo(d,l/c)):(h="auto"===s?l:s,d=null===a?Zo(h,c/l):"auto"===a?c:a);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",h),p("height",d);const m=[i.left,i.top,l,c];return u.viewBox=m.join(" "),{attributes:u,viewBox:m,body:r}}function Bo(t,e){let n=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)n+=" "+t+'="'+e[t]+'"';return'"+t+" "}function No(t){return'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/ /g,"%3E").replace(/\s+/g," ")}(t)}(t)+'")'}let jo=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(t){}})();function Do(t){jo=t}function Fo(){return jo}const Ho={prepare:(t,e,n)=>{const o=[],i=function(t,e){const n=bo(t);if(!n)return 0;let o;if(n.maxURL){let t=0;n.resources.forEach(e=>{const n=e;t=Math.max(t,n.length)});const i=e+".json?icons=";o=n.maxURL-t-n.path.length-i.length}else o=0;return o}(t,e),r="icons";let s={type:r,provider:t,prefix:e,icons:[]},a=0;return n.forEach((n,l)=>{a+=n.length+1,a>=i&&l>0&&(o.push(s),s={type:r,provider:t,prefix:e,icons:[]},a=n.length),s.icons.push(n)}),o.push(s),o},send:(t,e,n)=>{if(!jo)return void n("abort",424);let o=function(t){if("string"==typeof t){const e=bo(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,n=e.icons.join(",");o+=t+".json?"+new URLSearchParams({icons:n}).toString();break}case"custom":{const t=e.uri;o+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void n("abort",400)}let i=503;jo(t+o).then(t=>{const e=t.status;if(200===e)return i=501,t.json();setTimeout(()=>{n(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{n("success",t)}):setTimeout(()=>{404===t?n("abort",t):n("next",i)})}).catch(()=>{n("next",i)})}};function Wo(t,e,n){Xn(n||"",e).loadIcons=t}function Uo(t,e,n){Xn(n||"",e).loadIcon=t}const qo="data-style";let $o="";function Vo(t){$o=t}function Ko(t,e){let n=Array.from(t.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(qo));n||(n=document.createElement("style"),n.setAttribute(qo,qo),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block;margin:auto}"+$o}function Go(){let t;uo("",Ho),no(!0);try{t=window}catch(t){}if(t){if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!ro(t))&&console.error(n)}catch(t){console.error(n)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(const t in e){const n="IconifyProviders["+t+"] is invalid.";try{const o=e[t];if("object"!=typeof o||!o||void 0===o.resources)continue;yo(t,o)||console.error(n)}catch(t){console.error(n)}}}}return{iconLoaded:so,getIcon:ao,listIcons:to,addIcon:io,addCollection:ro,calculateSize:Zo,buildIcon:Ro,iconToHTML:Bo,svgToURL:No,loadIcons:Co,loadIcon:Ao,addAPIProvider:yo,setCustomIconLoader:Uo,setCustomIconsLoader:Wo,appendCustomStyle:Vo,_api:{getAPIConfig:bo,setAPIModule:uo,sendAPIQuery:Po,setFetch:Do,getFetch:Fo,listAPIProviders:vo}}}const Jo={"background-color":"currentColor"},Yo={"background-color":"transparent"},Xo={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Qo={"-webkit-mask":Jo,mask:Jo,background:Yo};for(const t in Qo){const e=Qo[t];for(const n in Xo)e[t+"-"+n]=Xo[n]}function ti(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}let ei;function ni(t){return Array.from(t.childNodes).find(t=>{const e=t.tagName&&t.tagName.toUpperCase();return"SPAN"===e||"SVG"===e})}function oi(t,e){const n=e.icon.data,o=e.customisations,i=Ro(n,o);o.preserveAspectRatio&&(i.attributes.preserveAspectRatio=o.preserveAspectRatio);const r=e.renderedMode;let s;s="svg"===r?function(t){const e=document.createElement("span"),n=t.attributes;let o="";n.width||(o="width: inherit;"),n.height||(o+="height: inherit;"),o&&(n.style=o);const i=Bo(t.body,n);return e.innerHTML=function(t){return void 0===ei&&function(){try{ei=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){ei=null}}(),ei?ei.createHTML(t):t}(i),e.firstChild}(i):function(t,e,n){const o=document.createElement("span");let i=t.body;-1!==i.indexOf("{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const t=this._state,e=this.getAttribute("icon");if(e!==t.icon.value)return void this._iconChanged(e);if(!t.rendered||!this._visible)return;const n=this.getAttribute("mode"),o=Fn(this);t.attrMode===n&&!function(t,e){for(const n in Dn)if(t[n]!==e[n])return!0;return!1}(t.customisations,o)&&ni(this._shadowRoot)||this._renderIcon(t.icon,o,n)}_iconChanged(t){const e=function(t,e){if("object"==typeof t)return{data:Mo(t),value:t};if("string"!=typeof t)return{value:t};if(t.includes("{")){const e=Mo(t);if(e)return{data:e,value:t}}const n=Wn(t,!0,!0);if(!n)return{value:t};const o=oo(n);if(void 0!==o||!n.prefix)return{value:t,name:n,data:o};const i=Co([n],()=>e(t,n,oo(n)));return{value:t,name:n,loading:i}}(t,(t,e,n)=>{const o=this._state;if(o.rendered||this.getAttribute("icon")!==t)return;const i={value:t,name:e,data:n};i.data?this._gotIconData(i):o.icon=i});e.data?this._gotIconData(e):this._state=ii(e,this._state.inline,this._state)}_forceRender(){if(!this._visible){const t=ni(this._shadowRoot);return void(t&&this._shadowRoot.removeChild(t))}this._queueCheck()}_gotIconData(t){this._checkQueued=!1,this._renderIcon(t,Fn(this),this.getAttribute("mode"))}_renderIcon(t,e,n){const o=function(t,e){switch(e){case"svg":case"bg":case"mask":return e}return"style"===e||!So&&-1!==t.indexOf(" {const e=t.some(t=>t.isIntersecting);e!==this._visible&&(this._visible=e,this._forceRender())}),this._observer.observe(this)}catch(t){if(this._observer){try{this._observer.disconnect()}catch(t){}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};i.forEach(t=>{t in r.prototype||Object.defineProperty(r.prototype,t,{get:function(){return this.getAttribute(t)},set:function(e){null!==e?this.setAttribute(t,e):this.removeAttribute(t)}})});const s=Go();for(const t in s)r[t]=r.prototype[t]=s[t];return e.define(t,r),r}()||Go(),{iconLoaded:si,getIcon:ai,listIcons:li,addIcon:ci,addCollection:hi,calculateSize:di,buildIcon:ui,iconToHTML:pi,svgToURL:mi,loadIcons:fi,loadIcon:gi,setCustomIconLoader:_i,setCustomIconsLoader:yi,addAPIProvider:bi,_api:vi}=ri;var xi=i(510);const wi="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==",Li="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",ki=ge.Default.prototype;ki.options={...ki.options,iconUrl:xi,iconRetinaUrl:wi,shadowUrl:Li},delete ki._getIconUrl;const Pi=new ge.Default,Ti={iconUrl:xi,iconRetinaUrl:wi,shadowUrl:Li,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},Ei=(t,e)=>`${t}
`,zi=(t,e,n)=>` `;function Ci(t){const e=t.iconSize||32,n=t.iconAnchor||[e/2,e],o=[0,-e];return t.iconOptions?new Fe(t.iconOptions):t.iconify?new Fe({className:"dl2-div-icon",html:zi(t.iconify,e,t.iconColor),iconSize:[e,e],iconAnchor:n,tooltipAnchor:o,popupAnchor:o}):t.emoji?new Fe({className:"dl2-div-icon",html:Ei(t.emoji,e),iconSize:[e,e],iconAnchor:n,tooltipAnchor:o,popupAnchor:o}):t.icon?new ge({...Ti,...t.icon}):Pi}const Ai=({position:t=[51.505,-.09],icon:e,emoji:n,iconify:o,iconSize:i=32,iconColor:r,iconAnchor:s,iconOptions:a,popup:l,tooltip:d,draggable:u=!1,opacity:p=1,zIndexOffset:m=0,rotationAngle:f=0,rotateWithMap:g=!1,setProps:_,children:y})=>{const b=(0,c.useRef)(0),v=(0,c.useRef)(0),{bearing:x}=En(),w=Ln(),{layer:L,ref:k}=An(()=>{const c=new be(t,{icon:Ci({icon:e,emoji:n,iconify:o,iconSize:i,iconColor:r,iconAnchor:s,iconOptions:a}),draggable:!!u,opacity:p,zIndexOffset:m});return l&&c.bindPopup(l),d&&c.bindTooltip(d,{direction:"top"}),c.on("click",()=>{b.current+=1,_&&_({n_clicks:b.current})}),c.on("dragend",()=>{v.current+=1;const t=c.getLatLng();_&&_({n_drags:v.current,position:[+t.lat.toFixed(6),+t.lng.toFixed(6)]})}),c});return(0,c.useEffect)(()=>{k.current&&k.current.setLatLng(t)},[t]),(0,c.useEffect)(()=>{k.current&&k.current.setIcon(Ci({icon:e,emoji:n,iconify:o,iconSize:i,iconColor:r,iconAnchor:s,iconOptions:a}))},[e,n,o,i,r,s,a]),(0,c.useEffect)(()=>{k.current&&k.current.setOpacity(p)},[p]),(0,c.useEffect)(()=>{k.current&&k.current.setZIndexOffset(m)},[m]),(0,c.useEffect)(()=>{const t=k.current;if(!t)return;const e=()=>{const e=t._icon;if(!e||!w)return;const n=g?f:f-x,o=t.getLatLng(),i=w.latLngToLayerPoint(o),r=parseFloat(e.style.width)||e.offsetWidth||25,s=parseFloat(e.style.height)||e.offsetHeight||41;e.style.transformOrigin=`${r/2}px ${s/2}px`,e.style.transform=`translate3d(${Math.round(i.x)}px, ${Math.round(i.y)}px, 0) rotate(${n}deg)`,e.style.rotate=""};if(e(),t.on("move",e),w)try{w.on("move zoom zoomend viewreset",e)}catch(t){}return()=>{try{t.off("move",e)}catch(t){}if(w)try{w.off("move zoom zoomend viewreset",e)}catch(t){}}},[f,g,x,L,w]),h().createElement(kn.Provider,{value:L},L?y:null)};var Mi=i(775),Si=i.n(Mi);const Oi=t=>"left"===t||"top-left"===t||"bottom-left"===t?0:"right"===t||"top-right"===t||"bottom-right"===t?1:.5,Ii=t=>"top"===t||"top-left"===t||"top-right"===t?0:"bottom"===t||"bottom-left"===t||"bottom-right"===t?1:.5,Zi=(t,e,n)=>[e*Oi(t),n*Ii(t)],Ri=(t,e=7)=>{const n="center"===t?"bottom-right":t,o=Oi(n),i=Ii(n),r={};0===o?(r.left=-e,r.right="auto"):1===o?(r.right=-e,r.left="auto"):(r.left="50%",r.right="auto"),0===i?(r.top=-e,r.bottom="auto"):1===i?(r.bottom=-e,r.top="auto"):(r.top="50%",r.bottom="auto");const s=.5===o?"-50%":"0",a=.5===i?"-50%":"0";return r.transform=`translate(${s}, ${a})`,r};var Bi=i(246),Ni={};Ni.styleTagTransform=_n(),Ni.setAttributes=pn(),Ni.insert=function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t},Ni.domAPI=dn(),Ni.insertStyleElement=fn(),cn()(Bi.A,Ni),Bi.A&&Bi.A.locals&&Bi.A.locals;const ji=[{label:"System",value:"system-ui, sans-serif"},{label:"Inter",value:"Inter, system-ui, sans-serif"},{label:"Helvetica",value:"Helvetica, Arial, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Times",value:'"Times New Roman", Times, serif'},{label:"Courier",value:'"Courier New", monospace'},{label:"Verdana",value:"Verdana, Geneva, sans-serif"},{label:"Impact",value:"Impact, Haettenschweiler, sans-serif"}],Di=400,Fi=({style:t,editing:e,onChange:n,onEdit:o})=>{const i=(0,c.useRef)(null);(0,c.useEffect)(()=>{const t=i.current;t&&(It.disableClickPropagation(t),It.disableScrollPropagation(t))},[]);const r=Number(t.fontWeight)>=600||"bold"===t.fontWeight,s="italic"===t.fontStyle,a=t.backgroundColor&&"transparent"!==t.backgroundColor;return h().createElement("div",{className:"dl2-tm-toolbar",ref:i},h().createElement("select",{className:"dl2-tm-tb-select",title:"Font family",value:t.fontFamily,onChange:t=>n({fontFamily:t.target.value})},ji.map(t=>h().createElement("option",{key:t.label,value:t.value},t.label))),h().createElement("div",{className:"dl2-tm-tb-num"},h().createElement("button",{className:"dl2-tm-tb-step",title:"Smaller",onClick:()=>n({fontSize:Math.max(6,Math.round(t.fontSize-2))})},"−"),h().createElement("input",{className:"dl2-tm-tb-size",type:"number",min:6,max:Di,value:t.fontSize,onChange:t=>{const e=parseInt(t.target.value,10);isNaN(e)||n({fontSize:Math.min(Di,Math.max(6,e))})}}),h().createElement("button",{className:"dl2-tm-tb-step",title:"Larger",onClick:()=>n({fontSize:Math.min(Di,Math.round(t.fontSize+2))})},"+")),h().createElement("span",{className:"dl2-tm-tb-sep"}),h().createElement("button",{className:"dl2-tm-tb-btn"+(r?" active":""),title:"Bold",style:{fontWeight:800},onClick:()=>n({fontWeight:r?400:700})},"B"),h().createElement("button",{className:"dl2-tm-tb-btn"+(s?" active":""),title:"Italic",style:{fontStyle:"italic",fontFamily:"Georgia, serif"},onClick:()=>n({fontStyle:s?"normal":"italic"})},"I"),h().createElement("span",{className:"dl2-tm-tb-sep"}),h().createElement("label",{className:"dl2-tm-tb-swatch",title:"Text color"},h().createElement("span",{className:"dl2-tm-tb-swatch-ink",style:{background:t.color}}),h().createElement("input",{type:"color",value:Hi(t.color),onChange:t=>n({color:t.target.value})}),h().createElement("span",{className:"dl2-tm-tb-swatch-label"},"A")),h().createElement("label",{className:"dl2-tm-tb-swatch"+(a?"":" is-off"),title:"Background color"},h().createElement("span",{className:"dl2-tm-tb-swatch-ink dl2-tm-tb-swatch-bg",style:{background:a?t.backgroundColor:"transparent"}}),h().createElement("input",{type:"color",value:Hi(a?t.backgroundColor:"#000000"),onChange:t=>n({backgroundColor:t.target.value})}),h().createElement("span",{className:"dl2-tm-tb-swatch-label"},"▣")),h().createElement("button",{className:"dl2-tm-tb-btn",title:a?"Remove background":"Add background",onClick:()=>n({backgroundColor:a?"transparent":"rgba(0,0,0,0.55)"})},a?"⌫":"▢"),h().createElement("span",{className:"dl2-tm-tb-sep"}),h().createElement("div",{className:"dl2-tm-tb-num",title:"Rotation (degrees)"},h().createElement("span",{className:"dl2-tm-tb-rot-ico"},"⟳"),h().createElement("input",{className:"dl2-tm-tb-size",type:"number",value:Math.round(t.rotation),onChange:t=>{const e=parseInt(t.target.value,10);isNaN(e)||n({rotation:e})}})),h().createElement("span",{className:"dl2-tm-tb-sep"}),h().createElement("button",{className:"dl2-tm-tb-btn"+(e?" active":""),title:"Edit text",onClick:o},"✎"))},Hi=t=>{if(!t)return"#000000";if(/^#[0-9a-fA-F]{6}$/.test(t))return t;if(/^#[0-9a-fA-F]{3}$/.test(t))return"#"+t.slice(1).split("").map(t=>t+t).join("");try{const e=document.createElement("canvas").getContext("2d");if(e){e.fillStyle=t;const n=e.fillStyle;if(/^#[0-9a-fA-F]{6}$/.test(n))return n}}catch(t){}return"#000000"},Wi=({position:t,text:e="Text",anchor:n="center",color:o="#111827",backgroundColor:i="transparent",fontFamily:r="system-ui, sans-serif",fontSize:s=24,fontWeight:a=600,fontStyle:l="normal",padding:d=6,borderRadius:u=6,rotation:p=0,opacity:m=1,rotateWithMap:f=!1,scaleWithZoom:g=!1,referenceZoom:_,draggable:y=!0,editable:b=!0,selected:v,showToolbar:x=!0,setProps:w})=>{const L=Ln(),{bearing:k}=En(),[P,T]=(0,c.useState)({text:e,anchor:n,color:o,backgroundColor:i,fontFamily:r,fontSize:s,fontWeight:a,fontStyle:l,padding:d,borderRadius:u,rotation:p}),E=(0,c.useRef)(P);E.current=P;const z=(0,c.useRef)({...P}),[C,A]=(0,c.useState)(!1),M=(0,c.useRef)(!1);M.current=C;const[S,O]=(0,c.useState)(1),I=(0,c.useRef)(g);I.current=g;const Z=(0,c.useRef)(null),R=(0,c.useRef)(null),B=(0,c.useRef)(0),N=(0,c.useRef)(0),j=(0,c.useRef)(0),D=(0,c.useRef)(p),F=(0,c.useRef)(f),H=(0,c.useRef)(k),W=(0,c.useRef)(n);D.current=P.rotation,F.current=f,H.current=k,W.current=P.anchor;const U=(0,c.useRef)(null),q=(0,c.useRef)(null);if(!U.current)if(t)U.current=t;else if(L){const t=L.getCenter();U.current=[t.lat,t.lng]}const $=(0,c.useRef)(()=>{}),{layer:V,ref:K}=An(()=>{const t=U.current||[0,0],e=new be(t,{icon:new Fe({className:"dl2-text-marker-icon",html:"",iconSize:[0,0],iconAnchor:[0,0]}),draggable:!!y,bubblingMouseEvents:!1,keyboard:!1});return e.on("click",()=>{B.current+=1,Y({n_clicks:B.current}),G.current||nt(!0,!0)}),e.on("dblclick",()=>{J.current&&ot()}),e.on("dragend",()=>{N.current+=1;const t=e.getLatLng(),n=[+t.lat.toFixed(6),+t.lng.toFixed(6)];q.current=n,Y({n_drags:N.current,position:n})}),e}),G=(0,c.useRef)(v),J=(0,c.useRef)(b);J.current=b;const Y=t=>{Object.keys(t).forEach(e=>{e in z.current&&(z.current[e]=t[e])}),w&&w(t)},[X,Q]=(0,c.useState)(!!v);G.current=X;const tt=(0,c.useRef)(v),et=(0,c.useRef)(!1),nt=(t,e)=>{if(t||(et.current=!1),Q(t),t&&L)try{L.fire("dl2:tm-select",{source:K.current})}catch(t){}e&&(tt.current=t,w&&w({selected:t})),!t&&M.current&&it()};(0,c.useEffect)(()=>{void 0!==v&&v!==tt.current&&(tt.current=v,v||(et.current=!1),Q(v),!v&&M.current&&it())},[v]),(0,c.useEffect)(()=>{if(!L)return;const t=t=>{t&&t.source!==K.current&&G.current&&nt(!1,!0)};return L.on("dl2:tm-select",t),()=>{try{L.off("dl2:tm-select",t)}catch(t){}}},[L]),(0,c.useEffect)(()=>{if(!L)return;const t=()=>{et.current?et.current=!1:M.current?it(!0):G.current&&nt(!1,!0)};return L.on("click",t),()=>{L.off("click",t)}},[L]),(0,c.useEffect)(()=>{const t={text:e,anchor:n,color:o,backgroundColor:i,fontFamily:r,fontSize:s,fontWeight:a,fontStyle:l,padding:d,borderRadius:u,rotation:p},c={};Object.keys(t).forEach(e=>{void 0!==t[e]&&t[e]!==z.current[e]&&(c[e]=t[e],z.current[e]=t[e])}),Object.keys(c).length&&T(t=>({...t,...c}))},[e,n,o,i,r,s,a,l,d,u,p]),(0,c.useEffect)(()=>{K.current&&t&&(q.current&&t[0]===q.current[0]&&t[1]===q.current[1]||(q.current=t,K.current.setLatLng(t),$.current()))},[t]),(0,c.useEffect)(()=>{if(V&&!t&&U.current&&!q.current){q.current=U.current;const[t,e]=U.current;Y({position:[+t.toFixed(6),+e.toFixed(6)]})}},[V]),(0,c.useEffect)(()=>{const t=K.current;t&&t.dragging&&(y&&!M.current?t.dragging.enable():t.dragging.disable())},[y,V]),(0,c.useEffect)(()=>{const t=K.current;if(!t||!L)return;t._icon&&(t._icon.style.width="",t._icon.style.height="");const e=()=>{const e=t._icon;if(!e)return;const n=F.current?D.current:D.current-H.current,[o,i]=Zi(W.current,e.offsetWidth,e.offsetHeight);e.style.marginLeft=-o+"px",e.style.marginTop=-i+"px",e.style.transformOrigin=`${o}px ${i}px`;const r=L.latLngToLayerPoint(t.getLatLng());e.style.transform=`translate3d(${Math.round(r.x)}px, ${Math.round(r.y)}px, 0) rotate(${n}deg)`,e.style.rotate=""};return $.current=e,e(),requestAnimationFrame(e),t.on("move",e),L.on("move zoom zoomend viewreset",e),()=>{try{t.off("move",e)}catch(t){}try{L.off("move zoom zoomend viewreset",e)}catch(t){}}},[V,L]),(0,c.useEffect)(()=>{requestAnimationFrame(()=>$.current())},[V,P.rotation,k,f,P.text,P.fontSize,S,P.anchor,P.padding,P.fontFamily,P.fontWeight,P.backgroundColor]),(0,c.useEffect)(()=>{if(!L)return;"number"==typeof _?Z.current=_:null===Z.current&&(Z.current=L.getZoom());const t=()=>{const t=I.current?Math.pow(2,L.getZoom()-Z.current):1;O(t)};return t(),L.on("zoomend",t),()=>{try{L.off("zoomend",t)}catch(t){}}},[L,g,_]),(0,c.useEffect)(()=>{R.current&&!M.current&&(R.current.textContent=P.text||"")},[P.text,V,X]);const ot=()=>{var t;const e=K.current;if(e){et.current=!1,A(!0),G.current||nt(!0,!0);try{null===(t=e.dragging)||void 0===t||t.disable()}catch(t){}requestAnimationFrame(()=>{const t=R.current;if(!t)return;t.focus();const e=document.createRange();e.selectNodeContents(t);const n=window.getSelection();null==n||n.removeAllRanges(),null==n||n.addRange(e)})}},it=(t=!1)=>{if(!M.current)return;M.current=!1,t&&(et.current=!0);const e=R.current;A(!1);const n=K.current;if(y&&(null==n?void 0:n.dragging))try{n.dragging.enable()}catch(t){}if(!e)return;const o=e.textContent||"";j.current+=1,T(t=>({...t,text:o})),z.current.text=o,Y({text:o,n_edits:j.current})};(0,c.useEffect)(()=>{const t=R.current;if(!t||!C)return;const e=t=>t.stopPropagation(),n=["pointerdown","mousedown","dblclick","wheel","touchstart"];return n.forEach(n=>t.addEventListener(n,e)),()=>n.forEach(n=>t.removeEventListener(n,e))},[C]);const rt=(t,e)=>{var n,o;t.stopPropagation(),t.preventDefault();const i=K.current;if(!i||!L)return;try{null===(n=i.dragging)||void 0===n||n.disable()}catch(t){}try{null===(o=L.dragging)||void 0===o||o.disable()}catch(t){}const r=L.latLngToContainerPoint(i.getLatLng()),s={x:t.clientX,y:t.clientY},a=L.getContainer().getBoundingClientRect(),l=a.left+r.x,c=a.top+r.y,h=E.current.fontSize,d=E.current.rotation,u=i._icon,p=u?u.offsetWidth:0,m=u?u.offsetHeight:0,[f,g]=Zi(W.current,p,m),_=(F.current?D.current:D.current-H.current)*Math.PI/180,b=Math.cos(_),v=Math.sin(_),x=p/2-f,w=m/2-g,k=l+x*b-w*v,P=c+x*v+w*b,C=Math.hypot(s.x-k,s.y-P)||1,A=(t,e)=>180*Math.atan2(e-c,t-l)/Math.PI+90,S=A(s.x,s.y),O=t=>{if("resize"===e){const e=Math.hypot(t.clientX-k,t.clientY-P),n=Math.round(Math.min(Di,Math.max(6,h*(e/C))));T(t=>({...t,fontSize:n}))}else{const e=A(t.clientX,t.clientY)-S;let n=Math.round(d+e);t.shiftKey&&(n=15*Math.round(n/15)),T(t=>({...t,rotation:n})),D.current=n,$.current()}},I=()=>{var t;window.removeEventListener("pointermove",O),window.removeEventListener("pointerup",I);const n=K.current;if(y&&(null==n?void 0:n.dragging)&&!M.current)try{n.dragging.enable()}catch(t){}try{null===(t=L.dragging)||void 0===t||t.enable()}catch(t){}const o=t=>{t.stopPropagation(),document.removeEventListener("click",o,!0)};document.addEventListener("click",o,!0),setTimeout(()=>document.removeEventListener("click",o,!0),80);const i=E.current;"resize"===e?(z.current.fontSize=i.fontSize,Y({fontSize:i.fontSize})):(z.current.rotation=i.rotation,Y({rotation:i.rotation}))};window.addEventListener("pointermove",O),window.addEventListener("pointerup",I)},st=V?V._icon:void 0,at=P.backgroundColor&&"transparent"!==P.backgroundColor,lt={position:"relative",opacity:m,background:at?P.backgroundColor:"transparent",padding:at?`${P.padding}px ${1.6*P.padding}px`:0,borderRadius:at?`${P.borderRadius}px`:0},ct={color:P.color,fontFamily:P.fontFamily,fontSize:P.fontSize*S+"px",fontWeight:P.fontWeight,fontStyle:P.fontStyle,lineHeight:1.15},ht=st?Si().createPortal(h().createElement("div",{className:"dl2-tm-box"+(X?" is-selected":"")+(C?" is-editing":""),style:lt},h().createElement("div",{ref:R,className:"dl2-tm-text"+(C||P.text?"":" is-empty"),style:ct,contentEditable:C,suppressContentEditableWarning:!0,spellCheck:!1,onBlur:C?()=>it(!0):void 0,onKeyDown:C?t=>{"Enter"!==t.key||t.shiftKey?"Escape"===t.key&&(t.preventDefault(),R.current&&(R.current.textContent=E.current.text||""),it()):(t.preventDefault(),it())}:void 0}),X&&!C&&h().createElement(h().Fragment,null,h().createElement("span",{className:"dl2-tm-rotate-line"}),h().createElement("span",{className:"dl2-tm-handle dl2-tm-handle-rotate",title:"Drag to rotate (hold Shift to snap 15°)",onPointerDown:t=>rt(t,"rotate")}),h().createElement("span",{className:"dl2-tm-handle dl2-tm-handle-resize",title:"Drag to resize — this dot also marks the anchor point",style:Ri(P.anchor),onPointerDown:t=>rt(t,"resize")}))),st):null,dt=X&&x&&L?Si().createPortal(h().createElement(Fi,{style:P,editing:C,onChange:t=>{T(e=>({...e,...t})),Y(t)},onEdit:ot}),L.getContainer()):null;return h().createElement(h().Fragment,null,ht,dt)},Ui=({children:t,maxWidth:e=300,minWidth:n=50,closeButton:o=!0,closeOnClick:i,autoClose:r,opened:s})=>{const a=Pn(),[l]=(0,c.useState)(()=>document.createElement("div"));return(0,c.useEffect)(()=>{if(!a)return;const t={maxWidth:e,minWidth:n,closeButton:o};return void 0!==i&&(t.closeOnClick=i),void 0!==r&&(t.autoClose=r),a.bindPopup(l,t),()=>{try{a.unbindPopup()}catch(t){}}},[a,e,n,o,i,r,l]),(0,c.useEffect)(()=>{var t,e,n,o;if(a&&void 0!==s)try{s?null===(e=(t=a).openPopup)||void 0===e||e.call(t):null===(o=(n=a).closePopup)||void 0===o||o.call(n)}catch(t){}},[a,s]),Si().createPortal(t,l)},qi=({children:t,permanent:e=!1,direction:n="auto",opacity:o=.9})=>{const i=Pn(),[r]=(0,c.useState)(()=>document.createElement("div"));return(0,c.useEffect)(()=>{if(i)return i.bindTooltip(r,{permanent:e,direction:n,opacity:o}),()=>{try{i.unbindTooltip()}catch(t){}}},[i,e,n,o,r]),Si().createPortal(t,r)},$i=({positions:t=[],color:e="#3388ff",weight:n=3,opacity:o=1,dashArray:i,interactive:r,setProps:s,children:a})=>{const l=(0,c.useRef)(0),{layer:d,ref:u}=An(()=>{const a=new Le(t,{color:e,weight:n,opacity:o,dashArray:i,interactive:r});return a.on("click",()=>{l.current+=1,s&&s({n_clicks:l.current})}),a});return(0,c.useEffect)(()=>{u.current&&u.current.setLatLngs(t)},[t]),(0,c.useEffect)(()=>{u.current&&u.current.setStyle({color:e,weight:n,opacity:o,dashArray:i})},[e,n,o,i]),h().createElement(kn.Provider,{value:d},d?a:null)},Vi=({positions:t=[],color:e="#3388ff",weight:n=3,opacity:o=1,fillColor:i,fillOpacity:r=.2,setProps:s,children:a})=>{const l=(0,c.useRef)(0),d=()=>({color:e,weight:n,opacity:o,fillColor:i,fillOpacity:r}),{layer:u,ref:p}=An(()=>{const e=new ke(t,d());return e.on("click",()=>{l.current+=1,s&&s({n_clicks:l.current})}),e});return(0,c.useEffect)(()=>{p.current&&p.current.setLatLngs(t)},[t]),(0,c.useEffect)(()=>{p.current&&p.current.setStyle(d())},[e,n,o,i,r]),h().createElement(kn.Provider,{value:u},u?a:null)},Ki=({bounds:t=[[0,0],[0,0]],color:e="#3388ff",weight:n=3,fillColor:o,fillOpacity:i=.2,setProps:r,children:s})=>{const a=(0,c.useRef)(0),l=()=>({color:e,weight:n,fillColor:o,fillOpacity:i}),{layer:d,ref:u}=An(()=>{const e=new Je(t,l());return e.on("click",()=>{a.current+=1,r&&r({n_clicks:a.current})}),e});return(0,c.useEffect)(()=>{u.current&&u.current.setBounds(t)},[t]),(0,c.useEffect)(()=>{u.current&&u.current.setStyle(l())},[e,n,o,i]),h().createElement(kn.Provider,{value:d},d?s:null)},Gi=({center:t=[51.505,-.09],radius:e=100,color:n="#3388ff",weight:o=3,fillColor:i,fillOpacity:r=.2,setProps:s,children:a})=>{const l=(0,c.useRef)(0),d=()=>({color:n,weight:o,fillColor:i,fillOpacity:r}),{layer:u,ref:p}=An(()=>{const n=new we(t,{radius:e,...d()});return n.on("click",()=>{l.current+=1,s&&s({n_clicks:l.current})}),n});return(0,c.useEffect)(()=>{p.current&&p.current.setLatLng(t)},[t]),(0,c.useEffect)(()=>{p.current&&p.current.setRadius(e)},[e]),(0,c.useEffect)(()=>{p.current&&p.current.setStyle(d())},[n,o,i,r]),h().createElement(kn.Provider,{value:u},u?a:null)},Ji=({center:t=[51.505,-.09],radius:e=10,color:n="#3388ff",weight:o=3,fillColor:i,fillOpacity:r=.2,interactive:s,setProps:a,children:l})=>{const d=(0,c.useRef)(0),u=()=>({color:n,weight:o,fillColor:i,fillOpacity:r}),{layer:p,ref:m}=An(()=>{const n=new xe(t,{radius:e,interactive:s,...u()});return n.on("click",()=>{d.current+=1,a&&a({n_clicks:d.current})}),n});return(0,c.useEffect)(()=>{m.current&&m.current.setLatLng(t)},[t]),(0,c.useEffect)(()=>{m.current&&m.current.setRadius(e)},[e]),(0,c.useEffect)(()=>{m.current&&m.current.setStyle(u())},[n,o,i,r]),h().createElement(kn.Provider,{value:p},p?l:null)},Yi=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Xi=new Uint32Array(96);class Qi{static from(t){if(!t||void 0===t.byteLength||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[e,n]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(1!==o)throw new Error(`Got v${o} data when expected v1.`);const i=Yi[15&n];if(!i)throw new Error("Unrecognized array type.");const[r]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new Qi(s,r,i,void 0,t)}constructor(t,e=64,n=Float64Array,o=ArrayBuffer,i){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=n,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const r=Yi.indexOf(this.ArrayType),s=2*t*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${n}.`);if(i)this.data=i,this.ids=new this.IndexArrayType(i,8,t),this.coords=new n(i,8+a+l,2*t),this._pos=2*t,this._finished=!0;else{const i=this.data=new o(8+s+a+l);this.ids=new this.IndexArrayType(i,8,t),this.coords=new n(i,8+a+l,2*t),this._pos=0,this._finished=!1,new Uint8Array(i,0,2).set([219,16+r]),new Uint16Array(i,2,1)[0]=e,new Uint32Array(i,4,1)[0]=t}}add(t,e){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=t,this.coords[this._pos++]=e,n}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return tr(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:r,nodeSize:s}=this;Xi[0]=0,Xi[1]=i.length-1,Xi[2]=0;let a=3;const l=[];for(;a>0;){const c=Xi[--a],h=Xi[--a],d=Xi[--a];if(h-d<=s){for(let s=d;s<=h;s++){const a=r[2*s],c=r[2*s+1];a>=t&&a<=n&&c>=e&&c<=o&&l.push(i[s])}continue}const u=d+h>>1,p=r[2*u],m=r[2*u+1];p>=t&&p<=n&&m>=e&&m<=o&&l.push(i[u]),(0===c?t<=p:e<=m)&&(Xi[a++]=d,Xi[a++]=u-1,Xi[a++]=1-c),(0===c?n>=p:o>=m)&&(Xi[a++]=u+1,Xi[a++]=h,Xi[a++]=1-c)}return l}within(t,e,n){const o=[];return this.withinInto(t,e,n,o),o}withinInto(t,e,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:r,nodeSize:s}=this;Xi[0]=0,Xi[1]=i.length-1,Xi[2]=0;let a=3,l=0;const c=n*n;for(;a>0;){const h=Xi[--a],d=Xi[--a],u=Xi[--a];if(d-u<=s){for(let n=u;n<=d;n++)ir(r[2*n],r[2*n+1],t,e)<=c&&(o[l++]=i[n]);continue}const p=u+d>>1,m=r[2*p],f=r[2*p+1];ir(m,f,t,e)<=c&&(o[l++]=i[p]),(0===h?t-n<=m:e-n<=f)&&(Xi[a++]=u,Xi[a++]=p-1,Xi[a++]=1-h),(0===h?t+n>=m:e+n>=f)&&(Xi[a++]=p+1,Xi[a++]=d,Xi[a++]=1-h)}return l}}function tr(t,e,n,o,i,r){if(i-o<=n)return;const s=o+i>>1;er(t,e,s,o,i,r),tr(t,e,n,o,s-1,1-r),tr(t,e,n,s+1,i,1-r)}function er(t,e,n,o,i,r){for(;i>o;){if(i-o>600){const s=i-o+1,a=n-o+1,l=Math.log(s),c=.5*Math.exp(2*l/3),h=.5*Math.sqrt(l*c*(s-c)/s)*(a-s/2<0?-1:1);er(t,e,n,Math.max(o,Math.floor(n-a*c/s+h)),Math.min(i,Math.floor(n+(s-a)*c/s+h)),r)}const s=e[2*n+r];let a=o,l=i;for(nr(t,e,o,n),e[2*i+r]>s&&nr(t,e,o,i);as;)l--}e[2*o+r]===s?nr(t,e,o,l):(l++,nr(t,e,l,i)),l<=n&&(o=l+1),n<=l&&(i=l-1)}}function nr(t,e,n,o){or(t,n,o),or(e,2*n,2*o),or(e,2*n+1,2*o+1)}function or(t,e,n){const o=t[e];t[e]=t[n],t[n]=o}function ir(t,e,n,o){const i=t-n,r=e-o;return i*i+r*r}const rr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},sr=Math.fround||(ar=new Float32Array(1),t=>(ar[0]=+t,ar[0]));var ar;class lr{constructor(t){this.options=Object.assign(Object.create(rr),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:n,maxZoom:o}=this.options;e&&console.time("total time");const i=`prepare ${t.length} points`;e&&console.time(i),this.points=t;const r=[];for(let e=0;e=n;t--){const n=+Date.now();s=this.trees[t]=this._createTree(this._cluster(s,t)),e&&console.log("z%d: %d clusters in %dms",t,s.numItems,+Date.now()-n)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let n=((t[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[1]));let i=180===t[2]?180:((t[2]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){const t=this.getClusters([n,o,180,r],e),s=this.getClusters([-180,o,i,r],e);return t.concat(s)}const s=this.trees[this._limitZoom(e)],a=s.range(dr(n),ur(r),dr(i),ur(o)),l=s.data,c=[];for(const t of a){const e=this.stride*t;c.push(l[e+5]>1?cr(l,e,this.clusterProps):this.points[l[e+3]])}return c}getChildren(t){const e=this._getOriginId(t),n=this._getOriginZoom(t),o="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(o);const r=i.data;if(e*this.stride>=r.length)throw new Error(o);const s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=r[e*this.stride],l=r[e*this.stride+1],c=i.within(a,l,s),h=[];for(const e of c){const n=e*this.stride;r[n+4]===t&&h.push(r[n+5]>1?cr(r,n,this.clusterProps):this.points[r[n+3]])}if(0===h.length)throw new Error(o);return h}getLeaves(t,e,n){e=e||10,n=n||0;const o=[];return this._appendLeaves(o,t,e,n,0),o}getTile(t,e,n){const o=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:r,radius:s}=this.options,a=s/r,l=(n-a)/i,c=(n+1+a)/i,h={features:[]};return this._addTileFeatures(o.range((e-a)/i,l,(e+1+a)/i,c),o.data,e,n,i,h),0===e&&this._addTileFeatures(o.range(1-a/i,l,1,c),o.data,i,n,i,h),e===i-1&&this._addTileFeatures(o.range(0,l,a/i,c),o.data,-1,n,i,h),h.features.length?h:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}_appendLeaves(t,e,n,o,i){const r=this.getChildren(e);for(const e of r){const r=e.properties;if(r&&r.cluster?i+r.point_count<=o?i+=r.point_count:i=this._appendLeaves(t,r.cluster_id,n,o,i):i1;let l,c,h;if(a)l=hr(e,t,this.clusterProps),c=e[t],h=e[t+1];else{const n=this.points[e[t+3]];l=n.properties;const[o,i]=n.geometry.coordinates;c=dr(o),h=ur(i)}const d={type:1,geometry:[[Math.round(this.options.extent*(c*i-n)),Math.round(this.options.extent*(h*i-o))]],tags:l};let u;u=a||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==u&&(d.id=u),r.features.push(d)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:n,extent:o,reduce:i,minPoints:r}=this.options,s=n/(o*Math.pow(2,e)),a=t.data,l=[],c=this.stride;for(let n=0;ne&&(p+=a[n+5])}if(p>u&&p>=r){let t,r=o*u,s=h*u,m=-1;const f=(n/c<<5)+(e+1)+this.points.length;for(const o of d){const l=o*c;if(a[l+2]<=e)continue;a[l+2]=e;const h=a[l+5];r+=a[l]*h,s+=a[l+1]*h,a[l+4]=f,i&&(t||(t=this._map(a,n,!0),m=this.clusterProps.length,this.clusterProps.push(t)),i(t,this._map(a,l)))}a[n+4]=f,l.push(r/p,s/p,1/0,f,-1,p),i&&l.push(m)}else{for(let t=0;t1)for(const t of d){const n=t*c;if(!(a[n+2]<=e)){a[n+2]=e;for(let t=0;t>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,n){if(t[e+5]>1){const o=this.clusterProps[t[e+6]];return n?Object.assign({},o):o}const o=this.points[t[e+3]].properties,i=this.options.map(o);return n&&i===o?Object.assign({},i):i}}function cr(t,e,n){return{type:"Feature",id:t[e+3],properties:hr(t,e,n),geometry:{type:"Point",coordinates:[(o=t[e],360*(o-.5)),pr(t[e+1])]}};var o}function hr(t,e,n){const o=t[e+5],i=o>=1e4?`${Math.round(o/1e3)}k`:o>=1e3?Math.round(o/100)/10+"k":o,r=t[e+6],s=-1===r?{}:Object.assign({},n[r]);return Object.assign(s,{cluster:!0,cluster_id:t[e+3],point_count:o,point_count_abbreviated:i})}function dr(t){return t/360+.5}function ur(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function pr(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function mr(t){let e=32;return t>=1e3?e=56:t>=100?e=48:t>=10&&(e=40),new Fe({html:`${t}
`,className:"",iconSize:[e,e],iconAnchor:[e/2,e/2]})}function fr(t){if(!t)return null;try{const e=new Function("return ("+t+")")();return"function"==typeof e?e:null}catch(t){return console.warn("dl2.GeoJSON: failed to compile user function",t),null}}const gr=({data:t,style:e,cluster:n=!1,superClusterOptions:o,pointToLayer:i,clusterToLayer:r,hideout:s,zoomToBoundsOnClick:a=!0,spiderfyOnMaxZoom:l=!1,setProps:d,children:u})=>{const p=(0,c.useRef)(0),m=(0,c.useRef)(e);m.current=e;const f=(0,c.useRef)(s);f.current=s;const g=(0,c.useRef)(fr(i)),_=(0,c.useRef)(fr(r));(0,c.useEffect)(()=>{g.current=fr(i)},[i]),(0,c.useEffect)(()=>{_.current=fr(r)},[r]);const y=(0,c.useRef)(null),b=(0,c.useRef)(null),v=()=>{var t;return{hideout:f.current||{},leaflet:rn,map:null===(t=P.current)||void 0===t?void 0:t._map}},x=(t,e)=>{const n=g.current;if(n)try{return n(t,e,v())}catch(t){console.warn("dl2.GeoJSON.pointToLayer threw",t)}return new be(e,{icon:Pi})},w=(t,e,n)=>{const o=_.current;if(o)try{return o(t,e,n,v())}catch(t){console.warn("dl2.GeoJSON.clusterToLayer threw",t)}const i=t.properties.point_count||0;return new be(e,{icon:mr(i)})},L=(t,e)=>{t.on("click",()=>{p.current+=1,d&&d({n_clicks:p.current,clickFeature:e&&e.properties||{}})})},{layer:k,ref:P}=An(()=>new fe),T=()=>{const e=P.current;if(!e)return;const i=e._map;if(i)if(e.clearLayers(),n){const n=(null==t?void 0:t.features)||[],r=n.filter(t=>t&&t.geometry&&"Point"===t.geometry.type),s=n.filter(t=>t&&t.geometry&&"Point"!==t.geometry.type),l={radius:80,minPoints:2,maxZoom:16,minZoom:0,extent:512,...o||{}},c=new lr(l);if(c.load(r),y.current=c,b.current=e,s.length){const t=new Pe({type:"FeatureCollection",features:s},{style:()=>m.current||{},onEachFeature:(t,e)=>L(e,t)});e.addLayer(t)}const h=()=>{if(!e._map)return;e.eachLayer(t=>{t&&t.__dl2_cluster&&e.removeLayer(t)});const t=i.getBounds(),n=[t.getWest(),t.getSouth(),t.getEast(),t.getNorth()],o=Math.round(i.getZoom()),r=c.getClusters(n,o);for(const t of r){const[n,o]=t.geometry.coordinates;let r;if(t.properties&&t.properties.cluster)r=w(t,[o,n],c),r.__dl2_cluster=!0,r.on("click",()=>{const e=t.properties.cluster_id;if(a)try{const t=Math.min(c.getClusterExpansionZoom(e),l.maxZoom+2);i.flyTo([o,n],t,{duration:.4})}catch(t){i.flyTo([o,n],i.getZoom()+2)}d&&d({n_clicks:++p.current,clickFeature:t.properties})});else{const e={type:"Feature",geometry:t.geometry,properties:t.properties};r=x(e,[o,n]),r.__dl2_cluster=!0,L(r,e)}e.addLayer(r)}};e.__dl2_clusterListenersBound||(e.__dl2_clusterListenersBound=!0,i.on("moveend zoomend",h),e.__dl2_clusterRedraw=h),h()}else{if(!t)return;const n=new Pe(t,{style:()=>m.current||{},pointToLayer:(t,e)=>x(t,e),onEachFeature:(t,e)=>L(e,t)});e.addLayer(n)}};return(0,c.useEffect)(()=>{T()},[k,t,e,n,JSON.stringify(o)]),(0,c.useEffect)(()=>{if(n){const t=P.current,e=t&&t.__dl2_clusterRedraw;e&&e()}else T()},[s]),h().createElement(kn.Provider,{value:k},k?u:null)},_r=h().createContext(null);function yr(t){return{addLayer(e){return t(e),this},removeLayer(){return this},hasLayer:()=>!1,getPanes:()=>({})}}function br(t,e,n){return new Proxy({addLayer(e){return t(e),this},removeLayer(t){return e(t),this}},{get(t,e){if(e in t)return t[e];const o=n();if(!o)return;const i=o[e];return"function"==typeof i?i.bind(o):i},has(t,e){if(e in t)return!0;const o=n();return!!o&&e in o}})}const vr=({position:t="topright",collapsed:e=!0,activeBase:n,activeOverlays:o,setProps:i,children:r})=>{const s=Ln(),a=(0,c.useRef)(null);a.current||(a.current=document.createElement("div"));const l=(0,c.useRef)(null),[d,u]=(0,c.useState)([]),[p,m]=(0,c.useState)({overlays:new Map}),[f,g]=(0,c.useState)(!e),_=(0,c.useRef)(void 0),y=(0,c.useRef)(void 0);(0,c.useEffect)(()=>{if(!s)return;const e=new Nt({position:t});return e.onAdd=()=>{const t=a.current;return t.classList.add("leaflet-bar","dl2-layers-control"),It.disableClickPropagation(t),It.disableScrollPropagation(t),t},e.addTo(s),l.current=e,()=>{e.remove(),l.current=null}},[s,t]);const b=(0,c.useCallback)((t,e,n,o)=>(u(i=>i.some(n=>n.name===t&&n.kind===e)?i:[...i,{name:t,kind:e,layer:n,initialChecked:o}]),()=>u(n=>n.filter(n=>!(n.name===t&&n.kind===e)))),[]),v=d.filter(t=>"base"===t.kind),x=d.filter(t=>"overlay"===t.kind);(0,c.useEffect)(()=>{void 0!==n&&n!==_.current&&m(t=>({...t,base:n}))},[n]),(0,c.useEffect)(()=>{o&&[...o].sort().join(",")!==y.current&&m(t=>{const e=new Map;return x.forEach(t=>e.set(t.name,o.includes(t.name))),{...t,overlays:e}})},[o]);const w=(0,c.useMemo)(()=>{let t=null;if(p.base&&v.some(t=>t.name===p.base))t=p.base;else{const e=v.find(t=>t.initialChecked);t=e?e.name:v.length?v[0].name:null}const e=new Set;return x.forEach(t=>{const n=p.overlays.get(t.name);(void 0===n?t.initialChecked:n)&&e.add(t.name)}),{base:t,overlays:e}},[d,p,v,x]);return(0,c.useEffect)(()=>{s&&d.forEach(t=>{const e="base"===t.kind?t.name===w.base:w.overlays.has(t.name),n=!!t.layer._map;e&&!n?s.addLayer(t.layer):!e&&n&&s.removeLayer(t.layer)})},[s,d,w]),(0,c.useEffect)(()=>{if(!i||0===d.length)return;const t=Array.from(w.overlays).sort(),e=t.join(",");w.base===_.current&&e===y.current||(_.current=w.base,y.current=e,i({activeBase:w.base,activeOverlays:t}))},[w,i,d.length]),h().createElement(_r.Provider,{value:b},h().createElement("div",{style:{display:"none"}},r),s&&a.current?Si().createPortal(h().createElement("div",{className:"dl2-layers-ui "+(f?"open":"collapsed"),onMouseEnter:()=>e&&g(!0),onMouseLeave:()=>e&&g(!1)},h().createElement("button",{className:"dl2-layers-handle","aria-label":"Layers"},"☰"),h().createElement("div",{className:"dl2-layers-body"},v.length>0&&h().createElement("section",null,v.map(t=>h().createElement("label",{key:t.name,className:"dl2-layer-row"},h().createElement("input",{type:"radio",name:"dl2-base",checked:w.base===t.name,onChange:()=>{return e=t.name,m(t=>({...t,base:e}));var e}}),h().createElement("span",null,t.name)))),v.length>0&&x.length>0&&h().createElement("hr",{className:"dl2-layers-sep"}),x.length>0&&h().createElement("section",null,x.map(t=>h().createElement("label",{key:t.name,className:"dl2-layer-row"},h().createElement("input",{type:"checkbox",checked:w.overlays.has(t.name),onChange:()=>{return e=t.name,m(t=>{var n,o;const i=new Map(t.overlays),r=null!==(o=null===(n=x.find(t=>t.name===e))||void 0===n?void 0:n.initialChecked)&&void 0!==o&&o,s=i.has(e)?i.get(e):r;return i.set(e,!s),{...t,overlays:i}});var e}}),h().createElement("span",null,t.name)))))),a.current):null)},xr=({name:t="Base",checked:e=!1,children:n})=>{const o=h().useContext(_r),i=(0,c.useRef)(null),r=(0,c.useMemo)(()=>yr(n=>{o&&!i.current&&(i.current=o(t,"base",n,e))}),[t]);return(0,c.useEffect)(()=>()=>{i.current&&i.current(),i.current=null},[]),h().createElement(wn.Provider,{value:r},n)},wr=({name:t="Overlay",checked:e=!1,children:n})=>{const o=h().useContext(_r),i=(0,c.useRef)(null),r=(0,c.useMemo)(()=>yr(n=>{o&&!i.current&&(i.current=o(t,"overlay",n,e))}),[t]);return(0,c.useEffect)(()=>()=>{i.current&&i.current(),i.current=null},[]),h().createElement(wn.Provider,{value:r},n)},Lr={marker:{icon:"mdi:map-marker-plus",label:"Draw a marker (1 click)"},polyline:{icon:"mdi:vector-polyline",label:"Draw a polyline (click vertices, double-click to finish)"},polygon:{icon:"mdi:vector-polygon",label:"Draw a polygon (click vertices, double-click to close)"},rectangle:{icon:"mdi:vector-rectangle",label:"Draw a rectangle (2 corner clicks)"},circle:{icon:"mdi:vector-circle",label:"Draw a circle (center, then radius)"},circlemarker:{icon:"mdi:circle-medium",label:"Draw a circle marker (1 click, fixed radius)"},text:{icon:"mdi:format-text",label:"Add a text caption (click, then type)"}},kr="mdi:vector-square-edit",Pr="Edit layers (drag vertices / markers)",Tr="mdi:delete-outline",Er="Delete layers (click to remove)",zr=["marker","polyline","polygon","rectangle","circle","circlemarker","text"],Cr={color:"#111827",fontSize:18,fontFamily:"system-ui, sans-serif",fontWeight:600},Ar=1609.344,Mr=4046.8564224,Sr=2589988.110336,Or=1e6,Ir=(t,e)=>{if("imperial"===e){const e=3.28084*t;return t>=Ar?`${(t/Ar).toFixed(2)} mi`:`${Math.round(e)} ft`}return t>=1e3?`${(t/1e3).toFixed(2)} km`:`${Math.round(t)} m`},Zr=(t,e)=>"imperial"===e?t>=Sr?`${(t/Sr).toFixed(2)} mi²`:t>=Mr?`${(t/Mr).toFixed(2)} acres`:`${Math.round(10.7639104*t).toLocaleString()} ft²`:t>=Or?`${(t/Or).toFixed(2)} km²`:t>=1e4?`${(t/1e4).toFixed(2)} ha`:`${Math.round(t).toLocaleString()} m²`,Rr=(t,e=6378137)=>{if(!t||t.length<3)return 0;const n=t=>t*Math.PI/180;let o=0;for(let e=0;eString(t).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[t])),Nr=t=>`color:${t.color};font-size:${t.fontSize}px;font-family:${t.fontFamily};font-weight:${t.fontWeight};`,jr=(t,e)=>new Fe({className:"dl2-edit-text-icon",html:`${Br(t)}
`,iconSize:[0,0],iconAnchor:[0,0]}),Dr=t=>{const e=t._icon;e&&(e.style.width="",e.style.height="",e.style.marginLeft=-(e.offsetWidth||0)/2+"px",e.style.marginTop=-(e.offsetHeight||0)/2+"px")},Fr=(t,e,n,o)=>{var i,r,s;const a=e._icon;if(!a)return void requestAnimationFrame(()=>Fr(t,e,n,o));const l=a.querySelector(".dl2-edit-text");if(!l)return;Dr(e);const c=!!(null===(r=null===(i=e.dragging)||void 0===i?void 0:i.enabled)||void 0===r?void 0:r.call(i));try{null===(s=e.dragging)||void 0===s||s.disable()}catch(t){}try{t.doubleClickZoom.disable()}catch(t){}l.classList.add("is-editing"),l.setAttribute("contenteditable","true");const h=t=>t.stopPropagation(),d=["pointerdown","mousedown","dblclick","wheel","touchstart","click"];d.forEach(t=>l.addEventListener(t,h));let u=!1;const p=()=>{var i;if(u)return;u=!0,d.forEach(t=>l.removeEventListener(t,h)),l.removeEventListener("keydown",m),l.removeEventListener("blur",p),l.classList.remove("is-editing"),l.removeAttribute("contenteditable");try{t.doubleClickZoom.enable()}catch(t){}if(c)try{null===(i=e.dragging)||void 0===i||i.enable()}catch(t){}const r=(l.textContent||"").trim();!n||r?(e.feature=e.feature||{type:"Feature",properties:{}},e.feature.properties={...e.feature.properties||{},text:r},Dr(e),o(n?"created":"edited","text",{id:e.feature.properties._dl2_id})):e.remove()},m=t=>{t.stopPropagation(),"Enter"!==t.key||t.shiftKey?"Escape"===t.key&&(t.preventDefault(),l.blur()):(t.preventDefault(),l.blur())};l.addEventListener("keydown",m),l.addEventListener("blur",p),requestAnimationFrame(()=>{l.focus();const t=document.createRange();t.selectNodeContents(l);const e=window.getSelection();null==e||e.removeAllRanges(),null==e||e.addRange(t)})},Hr=new Fe({className:"dl2-vertex-handle",html:"",iconSize:[10,10],iconAnchor:[5,5]}),Wr=new Fe({className:"dl2-vertex-preview",html:"",iconSize:[8,8],iconAnchor:[4,4]}),Ur=({position:t="topleft",draw:e,edit:n,shapeOptions:o={color:"#2f9e44",weight:3,fillOpacity:.2},measurementSystem:i="metric",showMeasurementTooltips:r=!1,drawToolbar:s,editToolbar:a,featureUpdate:l,setProps:d})=>{const u=Ln(),p=(0,c.useRef)(null);p.current||(p.current=document.createElement("div"));const m=(0,c.useRef)(null),[f,g]=(0,c.useState)(null),[_,y]=(0,c.useState)(null),[b,v]=(0,c.useState)(0),x=(0,c.useRef)(0),w=(0,c.useRef)(null),L=(0,c.useRef)(null),k=(0,c.useRef)(null),P=t=>!n||!1!==n[t],T=(0,c.useRef)(i);(0,c.useEffect)(()=>{T.current=i},[i]);const z=(0,c.useRef)(o);(0,c.useEffect)(()=>{z.current=o||{}},[o]);const C=(0,c.useRef)(r);(0,c.useEffect)(()=>{C.current=!!r},[r]);const A=(0,c.useRef)(0);(0,c.useEffect)(()=>{if(!u)return;const e=(new fe).addTo(u);m.current=e;const n=new Nt({position:t});n.onAdd=()=>{const t=p.current;return t.classList.add("leaflet-bar","dl2-edit-control"),It.disableClickPropagation(t),It.disableScrollPropagation(t),t},n.addTo(u);const o=()=>O();return u.on("zoomend",o),()=>{u.off("zoomend",o),n.remove(),e.remove(),m.current=null}},[u,t]),(0,c.useEffect)(()=>{m.current&&m.current.eachLayer(t=>{var e,n;const o=null===(n=null===(e=t.feature)||void 0===e?void 0:e.properties)||void 0===n?void 0:n._dl2_type;o&&I(t,o)})},[i]),(0,c.useEffect)(()=>{m.current&&m.current.eachLayer(t=>{var e,n;const o=null===(n=null===(e=t.feature)||void 0===e?void 0:e.properties)||void 0===n?void 0:n._dl2_type;if(o)if(r)I(t,o);else try{t.unbindTooltip()}catch(t){}})},[r]);const M=(t,e,n)=>{const o="f_"+Math.random().toString(36).slice(2,11);return t.feature=t.feature||{type:"Feature",properties:{}},t.feature.properties={...t.feature.properties||{},_dl2_id:o,_dl2_type:e,_dl2_zoom:u?u.getZoom():void 0,...n||{}},o},S=(t,e)=>{try{if("circle"===e){const e=t.getRadius();return{area_m2:Math.PI*e*e,length_m:0}}if("rectangle"===e||"polygon"===e){const e=t.getLatLngs()[0];return{area_m2:Rr(e),length_m:0}}if("polyline"===e&&u){const e=t.getLatLngs();let n=0;for(let t=1;t{if(!C.current||!u||!m.current)return;const t=u.getZoom();m.current.eachLayer(e=>{var n,o;if(!e.getTooltip||!e.getTooltip())return;const i=null===(o=null===(n=e.feature)||void 0===n?void 0:n.properties)||void 0===o?void 0:o._dl2_zoom;if(void 0!==i)try{t>=i?e.openTooltip():e.closeTooltip()}catch(t){}else try{e.openTooltip()}catch(t){}})},I=(t,e)=>{var n,o;if(!C.current||!u)return;const i=((t,e,n,o)=>{var i,r;let s="";try{if("rectangle"===n||"polygon"===n){const t=e.getLatLngs()[0];s=`Area ${Zr(Rr(t),o)}`}else if("circle"===n){const t=e.getRadius();s=`Radius ${Ir(t,o)} · Area ${Zr(Math.PI*t*t,o)}`}else if("polyline"===n){const n=e.getLatLngs();let i=0;for(let e=1;e${Br(a)} ${s}`:a?`${Br(a)} `:s})(u,t,e,T.current);if(!i)return;t.unbindTooltip(),t.bindTooltip(i,{permanent:!0,direction:"center",className:"dl2-measurement-tooltip",interactive:!1});const r=null===(o=null===(n=t.feature)||void 0===n?void 0:n.properties)||void 0===o?void 0:o._dl2_zoom;if(void 0!==r&&u.getZoom(){const o=m.current;if(!o||!d)return;const i=o.toGeoJSON(),r=(i.features||[]).length;v(r),x.current+=1,d({geojson:i,n_drawn:r,lastAction:{type:e,action:t,...n||{}},action:{layer_type:e,type:t,n_actions:x.current,...n||{}}})};(0,c.useEffect)(()=>{const t=m.current;if(!u||!t)return;const e=u._container;if(e&&(e.style.cursor=f?"crosshair":""),d&&d({activeTool:f}),!f)return void(w.current=null);_&&y(null);const n=((t,e)=>{if(!u)return{cleanup:()=>{},action:()=>{}};const n=()=>z.current,o=(t,e)=>{const n=M(t,e);I(t,e);const o=S(t,e);Z("created",e,{id:n,...o})};if("marker"===t){const t=t=>{const n=new be(t.latlng,{icon:Pi});n.addTo(e),o(n,"marker"),g(null)};return u.on("click",t),{cleanup:()=>u.off("click",t),action:t=>"cancel"===t&&g(null)}}if("text"===t){const t=t=>{const o=n(),i={...Cr};o.color&&"#2f9e44"!==o.color&&(i.color=o.color);const r=new be(t.latlng,{icon:jr("",i),bubblingMouseEvents:!1});r.addTo(e),M(r,"text",{kind:"text",text:"",...i}),Fr(u,r,!0,Z),g(null)};return u.on("click",t),{cleanup:()=>u.off("click",t),action:t=>"cancel"===t&&g(null)}}if("circlemarker"===t){const t=t=>{const i=new xe(t.latlng,{...n(),radius:10});i.addTo(e),o(i,"circlemarker"),g(null)};return u.on("click",t),{cleanup:()=>u.off("click",t),action:t=>"cancel"===t&&g(null)}}if("polyline"===t||"polygon"===t){const i="polygon"===t,r=n();let s=null;const a=[];let l=null;const c=u._container,h=document.createElement("div");h.className="dl2-draw-tooltip",h.style.display="none",c.appendChild(h);const d=()=>{var t,e;return s?i?(null===(t=s.getLatLngs()[0])||void 0===t?void 0:t.length)||0:(null===(e=s.getLatLngs())||void 0===e?void 0:e.length)||0:0},p=()=>{var t,e;return s?i?null===(t=s.getLatLngs()[0])||void 0===t?void 0:t.slice(-1)[0]:null===(e=s.getLatLngs())||void 0===e?void 0:e.slice(-1)[0]:null},m=()=>{const t=d();h.textContent=0===t?i?"Click to start drawing the polygon":"Click to start drawing":t<2?"Click for next point":i?"Click first point or double-click to close this shape":"Click for next point — double-click to finish"};m();const f=t=>{const e=new be(t,{icon:Wr,interactive:!1,keyboard:!1});e.addTo(u),a.push(e)},_=t=>{const e=t.containerPoint;if(e&&(h.style.left=e.x+"px",h.style.top=e.y+"px",h.style.display=""),l){const e=p();e&&l.setLatLngs([e,t.latlng])}},y=()=>{h.style.display="none"},b=()=>{l&&(l.removeFrom(u),l=null),a.forEach(t=>t.remove()),a.length=0,h.parentNode&&h.parentNode.removeChild(h)},v=()=>{if(!s)return void g(null);const n=s;s=null,n.removeFrom(u),b(),e.addLayer(n),o(n,t),g(null)},x=()=>{s&&(s.removeFrom(u),s=null),b(),g(null)},w=()=>{if(!s)return;if(i){const t=s.getLatLngs();t[0]&&t[0].length>0&&(t[0].pop(),s.setLatLngs(t))}else{const t=s.getLatLngs();t.length>0&&(t.pop(),s.setLatLngs(t))}const t=a.pop();if(t&&t.remove(),m(),l){const t=p();t?l.setLatLngs([t,t]):(l.removeFrom(u),l=null)}0===d()&&s&&(s.removeFrom(u),s=null)},L=t=>{if(s)if(i){const e=s.getLatLngs();e[0].push(t.latlng),s.setLatLngs(e)}else s.addLatLng(t.latlng);else s=i?new ke([[t.latlng]],r):new Le([t.latlng],r),s.addTo(u),l=new Le([t.latlng,t.latlng],{color:r.color||"#2f9e44",weight:2,dashArray:"5,7",interactive:!1,opacity:.7}),l.addTo(u);f(t.latlng),m()},k=()=>v();return u.doubleClickZoom.disable(),u.on("click",L),u.on("dblclick",k),u.on("pointermove",_),u.on("pointerout",y),{cleanup:()=>{u.off("click",L),u.off("dblclick",k),u.off("pointermove",_),u.off("pointerout",y),u.doubleClickZoom.enable(),s&&(s.removeFrom(u),s=null),b()},action:t=>{"finish"===t?v():"cancel"===t?x():"delete last point"===t&&w()}}}if("rectangle"===t){let t=null,i=null,r=0;const s=u._container,a=document.createElement("div");a.className="dl2-draw-tooltip",a.style.display="none",s.appendChild(a);const l=()=>{a.textContent=t?r>0?`Area ${Zr(r,T.current)} — click to finish`:"Click to set the opposite corner":"Click to set the first corner"};l();const c=e=>{const o=e.containerPoint;if(o&&(a.style.left=o.x+"px",a.style.top=o.y+"px",a.style.display=""),!t)return;const s=new E(t,e.latlng);i?i.setBounds(s):(i=new Je(s,{color:n().color||"#2f9e44",weight:2,dashArray:"5,7",fill:!0,fillOpacity:.1,interactive:!1}),i.addTo(u));const c=s.getNorthWest(),h=s.getNorthEast(),d=s.getSouthWest(),p=u.distance(c,h),m=u.distance(c,d);r=p*m,l()},h=()=>{a.style.display="none"},d=()=>{i&&(i.removeFrom(u),i=null),a.parentNode&&a.parentNode.removeChild(a)},p=()=>{t=null,r=0,d(),g(null)},m=i=>{if(!t)return t=i.latlng,void l();const s=new E(t,i.latlng),a=new Je(s,n());a.addTo(e),o(a,"rectangle"),t=null,r=0,d(),g(null)};return u.on("click",m),u.on("pointermove",c),u.on("pointerout",h),{cleanup:()=>{u.off("click",m),u.off("pointermove",c),u.off("pointerout",h),d()},action:t=>"cancel"===t&&p()}}if("circle"===t){let t=null,i=null,r=null,s=0;const a=u._container,l=document.createElement("div");l.className="dl2-draw-tooltip",l.style.display="none",a.appendChild(l);const c=()=>{l.textContent=t?s>0?`Radius ${Ir(s,T.current)} — click to finish`:"Click to set the radius":"Click to set the center"};c();const h=e=>{const o=e.containerPoint;o&&(l.style.left=o.x+"px",l.style.top=o.y+"px",l.style.display=""),t&&(s=u.distance(t,e.latlng),i?i.setRadius(s):(i=new we(t,{radius:s,color:n().color||"#2f9e44",weight:2,dashArray:"5,7",fill:!0,fillOpacity:.1,interactive:!1}),i.addTo(u)),r?r.setLatLngs([t,e.latlng]):(r=new Le([t,e.latlng],{color:n().color||"#2f9e44",weight:1,dashArray:"3,5",opacity:.55,interactive:!1}),r.addTo(u)),c())},d=()=>{l.style.display="none"},p=()=>{i&&(i.removeFrom(u),i=null),r&&(r.removeFrom(u),r=null),l.parentNode&&l.parentNode.removeChild(l)},m=()=>{t=null,s=0,p(),g(null)},f=i=>{if(!t)return t=i.latlng,void c();const r=u.distance(t,i.latlng),a=new we(t,{...n(),radius:r});a.addTo(e),o(a,"circle"),t=null,s=0,p(),g(null)};return u.on("click",f),u.on("pointermove",h),u.on("pointerout",d),{cleanup:()=>{u.off("click",f),u.off("pointermove",h),u.off("pointerout",d),p()},action:t=>"cancel"===t&&m()}}return{cleanup:()=>{},action:()=>{}}})(f,t);return w.current=n.action,()=>{n.cleanup(),w.current=null,e&&(e.style.cursor="")}},[f]);const R=()=>{const t=m.current;if(!t)return;L.current=t.toGeoJSON();const e=[],n=[],o=t=>{var e,n,o,i;const r=(null===(n=null===(e=t.feature)||void 0===e?void 0:e.properties)||void 0===n?void 0:n._dl2_type)||"shape",s=null===(i=null===(o=t.feature)||void 0===o?void 0:o.properties)||void 0===i?void 0:i._dl2_id;I(t,r);const a=S(t,r);Z("geometry-changed",r,{id:s,...a})};t.eachLayer(t=>{var i,r,s;if((t=>{var n,o,i,r;const s=null===(o=null===(n=t.feature)||void 0===n?void 0:n.properties)||void 0===o?void 0:o._dl2_id,a=(null===(r=null===(i=t.feature)||void 0===i?void 0:i.properties)||void 0===r?void 0:r._dl2_type)||"shape";if(!s)return;const l=t.options.bubblingMouseEvents;t.options.bubblingMouseEvents=!1;const c=t=>{(null==t?void 0:t.originalEvent)&&It.stop(t.originalEvent),A.current+=1,d&&d({featureClick:{id:s,layerType:a,n_clicks:A.current}})};t.on("click",c),e.push({layer:t,h:c}),t._dl2_origBubbling=l})(t),t instanceof be){try{null===(i=t.dragging)||void 0===i||i.enable()}catch(t){}const e=()=>{var e;const n=(null===(e=t.feature)||void 0===e?void 0:e.properties)||{},o=n._dl2_type||"marker",i=n._dl2_id;i&&Z("geometry-changed",o,{id:i,area_m2:0,length_m:0})};if(t.on("dragend",e),t._dl2_onDragEnd=e,"text"===(null===(s=null===(r=t.feature)||void 0===r?void 0:r.properties)||void 0===s?void 0:s.kind)){const e=()=>Fr(u,t,!1,Z);t.on("dblclick",e),t._dl2_onTextDbl=e}}else if(t instanceof we){const e=new be(t.getLatLng(),{icon:Hr,draggable:!0}),i=new be(((t,e)=>{const n=111320*Math.cos(t.lat*Math.PI/180);return isFinite(n)&&0!==n?{lat:t.lat,lng:t.lng+e/n}:t})(t.getLatLng(),t.getRadius()),{icon:Hr,draggable:!0});e.on("drag",()=>{const n=e.getLatLng(),o=t.getLatLng(),r=n.lat-o.lat,s=n.lng-o.lng;t.setLatLng(n);const a=i.getLatLng();i.setLatLng([a.lat+r,a.lng+s])}),i.on("drag",()=>{const e=u.distance(t.getLatLng(),i.getLatLng());e>0&&t.setRadius(e)}),e.on("dragend",()=>o(t)),i.on("dragend",()=>o(t)),e.addTo(u),i.addTo(u),n.push(e,i)}else if(t instanceof Le){const e=t instanceof ke;(e?t.getLatLngs()[0]:t.getLatLngs()).forEach((i,r)=>{const s=new be(i,{icon:Hr,draggable:!0});s._dl2Layer=t,s._dl2Index=r,s.on("drag",()=>{const n=s.getLatLng();if(e){const e=t.getLatLngs().map(t=>t.slice());e[0][r]=n,t.setLatLngs(e)}else{const e=t.getLatLngs().slice();e[r]=n,t.setLatLngs(e)}}),s.on("dragend",()=>o(t)),s.addTo(u),n.push(s)})}}),k.current=()=>{n.forEach(t=>t.remove()),e.forEach(({layer:t,h:e})=>{var n;try{t.off("click",e)}catch(t){}t.options.bubblingMouseEvents=null===(n=t._dl2_origBubbling)||void 0===n||n,delete t._dl2_origBubbling}),t.eachLayer(t=>{var e;if(t instanceof be){try{null===(e=t.dragging)||void 0===e||e.disable()}catch(t){}const n=t._dl2_onDragEnd;if(n)try{t.off("dragend",n)}catch(t){}delete t._dl2_onDragEnd;const o=t._dl2_onTextDbl;if(o)try{t.off("dblclick",o)}catch(t){}delete t._dl2_onTextDbl}})}},B=t=>{const e=m.current;k.current&&(k.current(),k.current=null),!t&&L.current&&e?(e.clearLayers(),new Pe(L.current,{pointToLayer:(t,e)=>{const n=(null==t?void 0:t.properties)||{};if("text"===n.kind){const t={color:n.color||Cr.color,fontSize:n.fontSize||Cr.fontSize,fontFamily:n.fontFamily||Cr.fontFamily,fontWeight:n.fontWeight||Cr.fontWeight},o=new be(e,{icon:jr(n.text||"",t),bubblingMouseEvents:!1});return requestAnimationFrame(()=>Dr(o)),o}return new be(e,{icon:Pi})}}).eachLayer(t=>e.addLayer(t)),Z("cancelled","all")):t&&Z("edited","all"),L.current=null,y(null)};(0,c.useEffect)(()=>{if(u&&m.current&&(d&&d({activeMode:_}),_))return f&&g(null),"edit"===_?R():"remove"===_&&(()=>{const t=m.current;if(!t)return;const e=[],n=n=>{const o=()=>{t.removeLayer(n),Z("deleted","shape")};n.on("click",o),e.push({layer:n,h:o})};t.eachLayer(n);const o=t=>n(t.layer);t.on("layeradd",o),k.current=()=>{t.off("layeradd",o),e.forEach(({layer:t,h:e})=>{try{t.off("click",e)}catch(t){}})}})(),()=>{k.current&&(k.current(),k.current=null,L.current=null)}},[_]);const N=(0,c.useRef)(-1);(0,c.useEffect)(()=>{s&&void 0!==s.n_clicks&&s.n_clicks!==N.current&&(N.current=s.n_clicks,s.mode&&g(s.mode),s.action&&w.current&&w.current(s.action))},[s]);const j=(0,c.useRef)(-1);(0,c.useEffect)(()=>{var t,e;if(!l||void 0===l.n_clicks)return;if(l.n_clicks===j.current)return;j.current=l.n_clicks;const n=(t=>{const e=m.current;if(!e)return null;let n=null;return e.eachLayer(e=>{var o,i;(null===(i=null===(o=e.feature)||void 0===o?void 0:o.properties)||void 0===i?void 0:i._dl2_id)===t&&(n=e)}),n})(l.id),o=m.current;if(!n||!o)return;const i=(null===(e=null===(t=n.feature)||void 0===t?void 0:t.properties)||void 0===e?void 0:e._dl2_type)||"shape";if(l.remove)return o.removeLayer(n),void Z("deleted",i,{id:l.id});if(l.style&&"function"==typeof n.setStyle)try{n.setStyle(l.style)}catch(t){}l.properties&&(n.feature.properties={...n.feature.properties||{},...l.properties},I(n,i));const r=S(n,i);Z("restyled",i,{id:l.id,...r})},[l]);const D=(0,c.useRef)(-1);(0,c.useEffect)(()=>{if(a&&void 0!==a.n_clicks&&a.n_clicks!==D.current&&(D.current=a.n_clicks,a.mode&&y(a.mode),a.action))if("clear all"===a.action){const t=m.current;t&&(t.clearLayers(),Z("cleared","all")),y(null)}else"save"===a.action?B(!0):"cancel"===a.action&&B(!1)},[a]);const F=zr.filter(t=>!e||!1!==e[t]),H=b>0&&(P("edit")||P("remove"));return u&&p.current?Si().createPortal(h().createElement("div",{className:"dl2-edit-ui"},h().createElement("div",{className:"dl2-edit-section"},F.map(t=>h().createElement("button",{key:t,className:"dl2-edit-btn "+(f===t?"active":""),title:Lr[t].label,"aria-pressed":f===t,onClick:()=>g(f===t?null:t)},h().createElement("iconify-icon",{icon:Lr[t].icon,width:"18"})))),H&&h().createElement("div",{className:"dl2-edit-section dl2-edit-section-modify"},P("edit")&&h().createElement("button",{className:"dl2-edit-btn "+("edit"===_?"active":""),title:Pr,"aria-pressed":"edit"===_,onClick:()=>y("edit"===_?null:"edit")},h().createElement("iconify-icon",{icon:kr,width:"18"})),P("remove")&&h().createElement("button",{className:"dl2-edit-btn danger "+("remove"===_?"active":""),title:Er,"aria-pressed":"remove"===_,onClick:()=>y("remove"===_?null:"remove")},h().createElement("iconify-icon",{icon:Tr,width:"18"}))),(f||_)&&h().createElement("div",{className:"dl2-edit-actions"},f&&("polyline"===f||"polygon"===f)&&h().createElement(h().Fragment,null,h().createElement("button",{className:"dl2-edit-action-btn primary",onClick:()=>{var t;return null===(t=w.current)||void 0===t?void 0:t.call(w,"finish")}},"Finish"),h().createElement("button",{className:"dl2-edit-action-btn",onClick:()=>{var t;return null===(t=w.current)||void 0===t?void 0:t.call(w,"delete last point")}},"Delete last point")),f&&h().createElement("button",{className:"dl2-edit-action-btn",onClick:()=>{var t;return null===(t=w.current)||void 0===t?void 0:t.call(w,"cancel")}},"Cancel"),"edit"===_&&h().createElement(h().Fragment,null,h().createElement("button",{className:"dl2-edit-action-btn primary",onClick:()=>B(!0)},"Save"),h().createElement("button",{className:"dl2-edit-action-btn",onClick:()=>B(!1)},"Cancel")),"remove"===_&&h().createElement(h().Fragment,null,h().createElement("button",{className:"dl2-edit-action-btn danger",onClick:()=>{const t=m.current;t&&(t.clearLayers(),Z("cleared","all")),y(null)}},"Clear all"),h().createElement("button",{className:"dl2-edit-action-btn",onClick:()=>B(!1)},"Cancel")))),p.current):null},qr=({position:t="topleft",icon:e="mdi:circle-medium",iconSize:n=18,title:o,n_clicks:i=0,n_dblclicks:r=0,setProps:s})=>{const a=Ln(),l=(0,c.useRef)(null);l.current||(l.current=document.createElement("div"));const d=(0,c.useRef)(i||0),u=(0,c.useRef)(r||0);return(0,c.useEffect)(()=>{if(!a)return;const e=new Nt({position:t});return e.onAdd=()=>{const t=l.current;return t.classList.add("leaflet-bar","dl2-easy-button-container"),It.disableClickPropagation(t),It.disableScrollPropagation(t),t},e.addTo(a),()=>e.remove()},[a,t]),a&&l.current?Si().createPortal(h().createElement("button",{className:"dl2-easy-button",title:o,onClick:()=>{d.current+=1,s&&s({n_clicks:d.current})},onDoubleClick:t=>{t.stopPropagation(),u.current+=1,s&&s({n_dblclicks:u.current})}},h().createElement("iconify-icon",{icon:e,width:n})),l.current):null},$r=256,Vr=t=>`${t.z}/${t.x}/${t.y}`;function Kr(t,e,n,o){return t.replace("{s}","a").replace("{z}",String(e)).replace("{x}",String(n)).replace("{y}",String(o))}function Gr(t,e){const n=t.getZoom(),o=t.project(e,n);return{z:n,x:Math.floor(o.x/$r),y:Math.floor(o.y/$r)}}function Jr(t,e,n,o){return[t.unproject(new P(n*$r,o*$r),e),t.unproject(new P((n+1)*$r,(o+1)*$r),e)]}function Yr(t,e,n,o){const[i,r]=Jr(t,e,n,o);return new E(i,r)}const Xr=({position:t="topleft",tileUrl:e="https://tile.openstreetmap.org/{z}/{x}/{y}.png",selectedTiles:n=[],hoverColor:o="#fa5252",selectedColor:i="#228be6",setProps:r})=>{const s=Ln(),a=(0,c.useRef)(null);a.current||(a.current=document.createElement("div"));const[l,d]=(0,c.useState)(!1),u=(0,c.useRef)(null),p=(0,c.useRef)(new Map),m=(0,c.useRef)(n||[]);m.current=n||[];const f=(0,c.useRef)(e);f.current=e;const g=t=>{const[e,n]=Jr(s,t.z,t.x,t.y);return{...t,url:Kr(f.current,t.z,t.x,t.y),bounds:[+n.lat.toFixed(7),+e.lng.toFixed(7),+e.lat.toFixed(7),+n.lng.toFixed(7)]}};return(0,c.useEffect)(()=>{if(!s)return;const e=new Nt({position:t});return e.onAdd=()=>{const t=a.current;return t.classList.add("leaflet-bar","dl2-tile-selector-control"),It.disableClickPropagation(t),It.disableScrollPropagation(t),t},e.addTo(s),()=>{e.remove(),u.current&&(u.current.remove(),u.current=null),p.current.forEach(t=>t.remove()),p.current.clear()}},[s,t]),(0,c.useEffect)(()=>{if(!s)return;const t=new Set((n||[]).map(Vr));p.current.forEach((e,n)=>{t.has(n)||(e.remove(),p.current.delete(n))}),(n||[]).forEach(t=>{const e=Vr(t);if(!p.current.has(e)){const n=Yr(s,t.z,t.x,t.y),o=new Je(n,{color:i,weight:2,fillColor:i,fillOpacity:.18,interactive:!1});o.addTo(s),p.current.set(e,o)}})},[s,n,i]),(0,c.useEffect)(()=>{var t;if(!s)return;const e=s._container;if(!l)return e.style.cursor="",void(u.current&&(u.current.remove(),u.current=null));e.style.cursor="crosshair",null===(t=s.boxZoom)||void 0===t||t.disable();let n=null,a=null;const c=()=>{a&&(a.remove(),a=null),n=null},h=t=>{var e,n;"Shift"===t.key&&(null===(n=null===(e=s.dragging)||void 0===e?void 0:e.enabled)||void 0===n?void 0:n.call(e))&&s.dragging.disable()},d=t=>{var e,n;"Shift"===t.key&&(null===(n=null===(e=s.dragging)||void 0===e?void 0:e.enable)||void 0===n||n.call(e),c())};document.addEventListener("keydown",h),document.addEventListener("keyup",d);const p=t=>{const e=Gr(s,t.latlng),r=Yr(s,e.z,e.x,e.y);if(u.current?u.current.setBounds(r):u.current=new Je(r,{color:o,weight:2,fill:!1,dashArray:"5 5",interactive:!1}).addTo(s),n){const e=new E(n,t.latlng);a?a.setBounds(e):a=new Je(e,{color:i,weight:1,fillColor:i,fillOpacity:.08,dashArray:"4 4",interactive:!1}).addTo(s)}},f=()=>{u.current&&(u.current.remove(),u.current=null)},_=t=>{t.originalEvent&&t.originalEvent.shiftKey&&(n=t.latlng)},y=t=>{if(!n)return;const e=n,o=t.latlng;c();const i=s.getZoom(),a=s.project(e,i),l=s.project(o,i),h=Math.floor(Math.min(a.x,l.x)/$r),d=Math.floor(Math.max(a.x,l.x)/$r),u=Math.floor(Math.min(a.y,l.y)/$r),p=Math.floor(Math.max(a.y,l.y)/$r),f=m.current.slice(),_=new Set(f.map(Vr));for(let t=h;t<=d;t++)for(let e=u;e<=p;e++){const n={z:i,x:t,y:e},o=Vr(n);_.has(o)||(f.push(g(n)),_.add(o))}m.current=f,r&&r({selectedTiles:f})},b=()=>{n&&c()};document.addEventListener("pointerup",b);const v=t=>{if(t.originalEvent&&t.originalEvent.shiftKey)return;const e=Gr(s,t.latlng),n=Vr(e),o=m.current,i=o.findIndex(t=>Vr(t)===n),a=i>=0?o.filter((t,e)=>e!==i):[...o,g(e)];m.current=a,r&&r({selectedTiles:a})};return s.on("pointermove",p),s.on("pointerout",f),s.on("pointerdown",_),s.on("pointerup",y),s.on("click",v),()=>{var t,n,o;s.off("pointermove",p),s.off("pointerout",f),s.off("pointerdown",_),s.off("pointerup",y),s.off("click",v),document.removeEventListener("keydown",h),document.removeEventListener("keyup",d),document.removeEventListener("pointerup",b),null===(t=s.boxZoom)||void 0===t||t.enable(),null===(o=null===(n=s.dragging)||void 0===n?void 0:n.enable)||void 0===o||o.call(n),e.style.cursor="",c(),u.current&&(u.current.remove(),u.current=null)}},[s,l,o,i]),s&&a.current?Si().createPortal(h().createElement("button",{className:"dl2-tile-selector-btn "+(l?"active":""),title:l?"Exit tile-select mode (click toggles, shift+drag selects a box)":"Select tiles (toggle: click to add/remove, shift+drag to box-select)","aria-pressed":l,onClick:()=>d(!l)},h().createElement("iconify-icon",{icon:"mdi:grid-large",width:"18"})),a.current):null},Qr={ArrowLeft:"rotate-ccw",ArrowRight:"rotate-cw",ArrowUp:"rotate-ccw",ArrowDown:"rotate-cw","mod+ArrowLeft":"pan-left","mod+ArrowRight":"pan-right","mod+ArrowUp":"pan-up","mod+ArrowDown":"pan-down"},ts=({enabled:t=!0,bearingStep:e=5,panStep:n=80,keymap:o,setProps:i})=>{const r=Ln(),{bearing:s,setBearing:a}=En(),l=(0,c.useRef)(s);l.current=s;const h=(0,c.useRef)(e);h.current=e;const d=(0,c.useRef)(n);d.current=n;const u=(0,c.useRef)(t);u.current=t;const p=(0,c.useRef)({...Qr,...o||{}});p.current={...Qr,...o||{}};const m=(0,c.useRef)(0),f=(0,c.useRef)(0);return(0,c.useEffect)(()=>{var t;if(!r)return;try{null===(t=r.keyboard)||void 0===t||t.disable()}catch(t){}const e=t=>{if(!u.current)return;const e=t.target;if(e&&/input|textarea|select/i.test(e.tagName))return;if(null==e?void 0:e.isContentEditable)return;const n=t.metaKey||t.ctrlKey,o=(n?"mod+":"")+t.key,s=p.current[o];if(s){switch(t.preventDefault(),s){case"rotate-cw":a(l.current+h.current),m.current+=1;break;case"rotate-ccw":a(l.current-h.current),m.current+=1;break;case"pan-up":r.panBy([0,-d.current]),f.current+=1;break;case"pan-down":r.panBy([0,d.current]),f.current+=1;break;case"pan-left":r.panBy([-d.current,0]),f.current+=1;break;case"pan-right":r.panBy([d.current,0]),f.current+=1;break;default:return}i&&i({n_rotations:m.current,n_pans:f.current,lastKey:{key:t.key,action:s,modifier:n,ts:Date.now()}})}};return window.addEventListener("keydown",e),()=>{var t;window.removeEventListener("keydown",e);try{null===(t=r.keyboard)||void 0===t||t.enable()}catch(t){}}},[r,a,i]),null},es=({position:t="bottomright",url:e="https://tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:n="",width:o=150,height:i=150,zoomLevelOffset:r=-5,toggleDisplay:s=!0,minimized:a=!1,aimingRectOptions:l={color:"#3388ff",weight:1,fillColor:"#3388ff",fillOpacity:.15,interactive:!1},centerFixed:d,n_clicks:u=0,setProps:p})=>{const m=Ln(),f=(0,c.useRef)(u||0),g=(0,c.useRef)(d);(0,c.useEffect)(()=>{g.current=d},[d]);const _=(0,c.useRef)(null);_.current||(_.current=document.createElement("div"));const y=(0,c.useRef)(null),b=(0,c.useRef)(null),v=(0,c.useRef)(null),x=(0,c.useRef)(null),[w,L]=(0,c.useState)(!!a);if((0,c.useEffect)(()=>{if(!m)return;const e=new Nt({position:t});return e.onAdd=()=>{const t=_.current;return t.classList.add("leaflet-control-minimap"),It.disableClickPropagation(t),It.disableScrollPropagation(t),t},e.addTo(m),()=>e.remove()},[m,t]),(0,c.useEffect)(()=>{if(!m||!y.current||b.current)return;const t=m.getCenter(),o=m.getZoom(),i=new Rt(y.current,{attributionControl:!!n,zoomControl:!1,dragging:!1,scrollWheelZoom:!1,doubleClickZoom:!1,pinchZoom:!1,boxZoom:!1,keyboard:!1});i.setView([t.lat,t.lng],o+r);const s=new We(e,{attribution:n});s.addTo(i),x.current=s;const a=new Je(m.getBounds(),l);a.addTo(i),v.current=a;const c=()=>{var t;const e=null!==(t=g.current)&&void 0!==t?t:m.getCenter(),n=Array.isArray(e)?e[0]:e.lat,o=Array.isArray(e)?e[1]:e.lng;i.setView([n,o],m.getZoom()+r,{animate:!1}),a.setBounds(m.getBounds())};m.on("moveend zoomend",c);const h=()=>{f.current+=1,p&&p({n_clicks:f.current})};return i.on("click",h),b.current=i,requestAnimationFrame(()=>i.invalidateSize()),()=>{m.off("moveend zoomend",c),i.off("click",h),i.remove(),b.current=null,v.current=null,x.current=null}},[m]),(0,c.useEffect)(()=>{x.current&&e&&x.current.setUrl(e)},[e]),(0,c.useEffect)(()=>{L(t=>t===!!a?t:!!a)},[a]),(0,c.useEffect)(()=>{if(!b.current)return;const t=window.setTimeout(()=>{var t;try{null===(t=b.current)||void 0===t||t.invalidateSize()}catch(t){}},220);return()=>window.clearTimeout(t)},[w,o,i]),(0,c.useEffect)(()=>{if(!m||!b.current)return;const t=null!=d?d:m.getCenter(),e=Array.isArray(t)?t[0]:t.lat,n=Array.isArray(t)?t[1]:t.lng;b.current.setView([e,n],m.getZoom()+r,{animate:!1})},[r,d,m]),!m||!_.current)return null;const k=w?{width:24,height:24}:{width:o,height:i};return Si().createPortal(h().createElement("div",{className:`leaflet-control-minimap-wrapper ${w?"minimized":"expanded"} pos-${t}`,style:k},h().createElement("div",{ref:y,className:"leaflet-control-minimap-inner",style:{width:o,height:i,visibility:w?"hidden":"visible"}}),s&&h().createElement("button",{type:"button",className:`leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-${t}`,"aria-label":w?"Show minimap":"Hide minimap","aria-pressed":!w,onClick:t=>{t.stopPropagation();const e=!w;L(e),p&&p({minimized:e})}})),_.current)};class ns extends Nt{constructor(t){super(t),this._attributions={}}onAdd(t){var e,n;const o=document.createElement("div");o.className="leaflet-control-attribution",It.disableClickPropagation(o),this._container=o;for(const o of Object.values(t._layers||{})){const t=null===(n=(e=o).getAttribution)||void 0===n?void 0:n.call(e);t&&this._addAttributionText(t)}return t.on("layeradd",this._onLayerAdd,this),this._update(),o}onRemove(t){t.off("layeradd",this._onLayerAdd,this)}_onLayerAdd(t){var e,n;const o=null===(n=null===(e=t.layer)||void 0===e?void 0:e.getAttribution)||void 0===n?void 0:n.call(e);o&&(this._addAttributionText(o),t.layer.once("remove",()=>this._removeAttributionText(o)))}_addAttributionText(t){t&&(this._attributions[t]=(this._attributions[t]||0)+1,this._update())}_removeAttributionText(t){t&&this._attributions[t]&&(this._attributions[t]--,this._update())}setPrefix(t){return this.options.prefix=t,this._update(),this}_update(){if(!this._map)return;const t=Object.keys(this._attributions).filter(t=>this._attributions[t]),e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' | ')}}const os=({position:t="bottomright",prefix:e})=>{const n=Ln(),o=(0,c.useRef)(null),i=void 0===e?'Leaflet ':!1!==e&&e;return(0,c.useEffect)(()=>{if(!n)return;const e=n.attributionControl;if(e&&"function"==typeof e.remove){try{e.remove()}catch(t){}n.attributionControl=void 0}const r=new ns({position:t,prefix:i});return r.addTo(n),o.current=r,()=>{try{r.remove()}catch(t){}o.current=null}},[n]),(0,c.useEffect)(()=>{const e=o.current;e&&t&&e.setPosition(t)},[t]),(0,c.useEffect)(()=>{const t=o.current;t&&t.setPrefix(i)},[e]),null},is=({children:t})=>{const e=(0,c.useRef)(null),{layer:n}=An(()=>{const t=new me;return e.current=t,t}),o=(0,c.useMemo)(()=>br(t=>{const n=e.current;n&&n.addLayer(t)},t=>{const n=e.current;n&&n.removeLayer(t)},()=>{var t;return(null===(t=e.current)||void 0===t?void 0:t._map)||null}),[]);return h().createElement(wn.Provider,{value:o},n?t:null)},rs=({setProps:t,children:e})=>{const n=(0,c.useRef)(null),o=(0,c.useRef)(0),i=(0,c.useRef)(0),{layer:r}=An(()=>{const e=new fe;return n.current=e,e.on("click",()=>{o.current+=1,t&&t({n_clicks:o.current})}),e.on("layeradd layerremove",()=>{if(t)try{const n=e.toGeoJSON();i.current+=1,t({geojson:n,n_layers:i.current})}catch(t){}}),e}),s=(0,c.useMemo)(()=>br(t=>{const e=n.current;e&&e.addLayer(t)},t=>{const e=n.current;e&&e.removeLayer(t)},()=>{var t;return(null===(t=n.current)||void 0===t?void 0:t._map)||null}),[]);return h().createElement(wn.Provider,{value:s},r?e:null)},ss=({position:t="bottomleft",metric:e=!0,imperial:n=!1,maxWidth:o=100,updateWhenIdle:i=!1})=>{const r=Ln(),s=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!r)return;const a=Nt.Scale;if(!a)return;const l=new a({position:t,metric:e,imperial:n,maxWidth:o,updateWhenIdle:i});return l.addTo(r),s.current=l,()=>{try{l.remove()}catch(t){}s.current=null}},[r,e,n,o,i]),(0,c.useEffect)(()=>{s.current&&t&&s.current.setPosition(t)},[t]),null},as=({position:t="topleft",title:e="Full Screen",titleCancel:n="Exit Full Screen",setProps:o})=>{const i=Ln(),r=(0,c.useRef)(null),s=(0,c.useRef)(0);return(0,c.useEffect)(()=>{if(!i)return;const a=new Nt({position:t});let l=null;const c=()=>!!document.fullscreenElement,h=()=>{l&&(l.title=c()?n:e,l.setAttribute("aria-label",l.title),l.classList.toggle("dl2-fs-active",c()))},d=()=>{h(),o&&o({fullscreen:c()})};return a.onAdd=t=>{const e=document.createElement("div");e.className="leaflet-bar dl2-fullscreen-control";const n=document.createElement("a");return n.href="#",n.className="dl2-fullscreen-button",n.innerHTML=' ',l=n,e.appendChild(n),It.disableClickPropagation(e),It.on(n,"click",e=>{var n,i;It.stop(e),s.current+=1,o&&o({n_clicks:s.current});const r=t._container;r&&(document.fullscreenElement?null===(i=document.exitFullscreen)||void 0===i||i.call(document).catch(()=>{}):null===(n=r.requestFullscreen)||void 0===n||n.call(r).catch(()=>{}))}),document.addEventListener("fullscreenchange",d),h(),e},a.onRemove=()=>{document.removeEventListener("fullscreenchange",d)},a.addTo(i),r.current=a,()=>{try{a.remove()}catch(t){}r.current=null}},[i]),(0,c.useEffect)(()=>{r.current&&t&&r.current.setPosition(t)},[t]),null},ls=({url:t="",bounds:e=[[0,0],[0,0]],opacity:n=1,alt:o,crossOrigin:i,interactive:r=!1,zIndex:s,editable:a=!1,selected:l,rotation:d=0,anchor:u="center",setProps:p})=>{const m=Ln(),f=(0,c.useRef)(null),g=(0,c.useRef)(null),_=(0,c.useRef)(0),y=(0,c.useRef)(0),b=(0,c.useRef)(e),v=(0,c.useRef)(d),x=(0,c.useRef)(u),w=(0,c.useRef)(a),L=(0,c.useRef)(JSON.stringify(e));v.current=d,x.current=u,w.current=a;const[k,P]=(0,c.useState)(!!l),T=(0,c.useRef)(k);T.current=k;const E=(0,c.useRef)(l),z=(0,c.useRef)(()=>{}),C=t=>p&&p(t),A=t=>{if(P(t),E.current=t,t&&m)try{m.fire("dl2:tm-select",{source:f.current})}catch(t){}C({selected:t})};(0,c.useEffect)(()=>{if(!m)return;const l={opacity:n,interactive:r||a};void 0!==o&&(l.alt=o),void 0!==i&&(l.crossOrigin=i),void 0!==s&&(l.zIndex=s);const c=new Re(t,e,l);c.addTo(m),f.current=c,b.current=e,c.on("click",()=>{_.current+=1,C({n_clicks:_.current}),w.current&&!T.current&&A(!0)});const h=()=>{const t=f.current,e=t&&t._image;if(!e||!m)return;const n=b.current,o=n[0][0],i=n[0][1],r=n[1][0],s=n[1][1],a=m.latLngToLayerPoint([r,i]),l=m.latLngToLayerPoint([o,s]),c=Math.abs(l.x-a.x),h=Math.abs(l.y-a.y),d=Oi(x.current)*c,u=Ii(x.current)*h;e.style.transformOrigin=`${d}px ${u}px`,e.style.transform=`translate3d(${Math.round(a.x)}px, ${Math.round(a.y)}px, 0) rotate(${v.current}deg)`;const p=g.current;if(p){const t=m.latLngToContainerPoint([r,i]),e=m.latLngToContainerPoint([o,s]),n=e.x-t.x,a=e.y-t.y;p.style.left=`${t.x}px`,p.style.top=`${t.y}px`,p.style.width=`${n}px`,p.style.height=`${a}px`,p.style.transformOrigin=`${Oi(x.current)*n}px ${Ii(x.current)*a}px`,p.style.transform=`rotate(${v.current}deg)`}};return z.current=h,h(),requestAnimationFrame(h),m.on("move zoom zoomend viewreset",h),()=>{try{m.off("move zoom zoomend viewreset",h)}catch(t){}try{c.remove()}catch(t){}f.current=null}},[m]),(0,c.useEffect)(()=>{const e=f.current;e&&t&&"function"==typeof e.setUrl&&e.setUrl(t)},[t]),(0,c.useEffect)(()=>{const t=f.current;t&&JSON.stringify(e)!==L.current&&(L.current=JSON.stringify(e),b.current=e,"function"==typeof t.setBounds&&t.setBounds(e),z.current())},[e]),(0,c.useEffect)(()=>{const t=f.current;t&&"function"==typeof t.setOpacity&&t.setOpacity(n)},[n]),(0,c.useEffect)(()=>{const t=f.current;t&&"function"==typeof t.setZIndex&&void 0!==s&&t.setZIndex(s)},[s]),(0,c.useEffect)(()=>{z.current()},[d,u,k]),(0,c.useEffect)(()=>{void 0!==l&&l!==E.current&&(E.current=l,P(l))},[l]),(0,c.useEffect)(()=>{if(!m)return;const t=()=>{T.current&&A(!1)};m.on("click",t);const e=t=>{t&&t.source!==f.current&&T.current&&A(!1)};return m.on("dl2:tm-select",e),()=>{m.off("click",t);try{m.off("dl2:tm-select",e)}catch(t){}}},[m]),(0,c.useEffect)(()=>{const t=f.current,e=t&&t._image;e&&(e.classList.toggle("dl2-img-editable-target",!!a),e.style.cursor=a?"move":"")},[a,k]);const M=()=>{const t=b.current,e=[[+t[0][0].toFixed(6),+t[0][1].toFixed(6)],[+t[1][0].toFixed(6),+t[1][1].toFixed(6)]];L.current=JSON.stringify(e),y.current+=1,C({bounds:e,n_transforms:y.current})},S=()=>{const t=e=>{e.stopPropagation(),document.removeEventListener("click",t,!0)};document.addEventListener("click",t,!0),setTimeout(()=>document.removeEventListener("click",t,!0),80)},O=(t,e)=>{var n;if(t.stopPropagation(),t.preventDefault(),!m)return;try{null===(n=m.dragging)||void 0===n||n.disable()}catch(t){}const o=f.current,i=m.getContainer().getBoundingClientRect(),r=b.current,s=r[0][0],a=r[0][1],l=r[1][0],c=r[1][1];if("move"===e){const e=(t,e)=>m.containerPointToLatLng([t-i.left,e-i.top]),n=e(t.clientX,t.clientY);let r=!1;const h=t=>{const i=e(t.clientX,t.clientY),h=i.lat-n.lat,d=i.lng-n.lng;Math.abs(h)+Math.abs(d)>1e-9&&(r=!0);const u=[[s+h,a+d],[l+h,c+d]];b.current=u;try{o.setBounds(u)}catch(t){}z.current()},d=()=>{var t;window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",d);try{null===(t=m.dragging)||void 0===t||t.enable()}catch(t){}r&&(S(),M())};return window.addEventListener("pointermove",h),void window.addEventListener("pointerup",d)}const h=Oi(x.current),d=Ii(x.current),u=l-d*(l-s),p=a+h*(c-a),g=m.latLngToContainerPoint([u,p]),_=i.left+g.x,y=i.top+g.y,w=m.latLngToContainerPoint([l,a]),L=m.latLngToContainerPoint([s,c]),k=i.left+(w.x+L.x)/2,P=i.top+(w.y+L.y)/2,T=Math.hypot(t.clientX-k,t.clientY-P)||1,E=(t,e)=>180*Math.atan2(e-y,t-_)/Math.PI+90,A=E(t.clientX,t.clientY),O=v.current,I=t=>{if("resize"===e){const e=Math.hypot(t.clientX-k,t.clientY-P),n=Math.max(.05,Math.min(40,e/T)),i=[[u+(s-u)*n,p+(a-p)*n],[u+(l-u)*n,p+(c-p)*n]];b.current=i;try{o.setBounds(i)}catch(t){}z.current()}else{let e=Math.round(O+(E(t.clientX,t.clientY)-A));t.shiftKey&&(e=15*Math.round(e/15)),v.current=e,z.current()}},Z=()=>{var t;window.removeEventListener("pointermove",I),window.removeEventListener("pointerup",Z);try{null===(t=m.dragging)||void 0===t||t.enable()}catch(t){}S(),"resize"===e?M():C({rotation:v.current})};window.addEventListener("pointermove",I),window.addEventListener("pointerup",Z)};return m&&a&&k?Si().createPortal(h().createElement("div",{className:"dl2-img-chrome",ref:g},h().createElement("div",{className:"dl2-img-body",title:"Drag to move",onPointerDown:t=>O(t,"move")}),h().createElement("span",{className:"dl2-img-rotate-line"}),h().createElement("span",{className:"dl2-img-handle dl2-img-handle-rotate",title:"Drag to rotate (hold Shift to snap 15°)",onPointerDown:t=>O(t,"rotate")}),h().createElement("span",{className:"dl2-img-handle dl2-img-handle-resize",title:"Drag to resize — this dot also marks the anchor point",style:Ri(u),onPointerDown:t=>O(t,"resize")})),m.getContainer()):null};return l})());
\ No newline at end of file
diff --git a/lib/auth.py b/lib/auth.py
index 2047fea..f0a573b 100644
--- a/lib/auth.py
+++ b/lib/auth.py
@@ -29,6 +29,15 @@
satellites on localhost.
CLERK_SATELLITE_DOMAIN "leaflet.2plot.dev" (host only, no scheme)
CLERK_SIGN_UP_URL https://2plot.ai/sign-up
+ CLERK_SATELLITE_SIGN_IN_REDIRECT
+ OPTIONAL (dash-clerk-auth >= 0.9.2). An absolute URL
+ on the PRIMARY that the Sign In button navigates to,
+ with this page carried in ?returnTo=. Read by the
+ package itself, so we do not pass it through. Unset,
+ sign-in falls back to Clerk.redirectToSignIn() with
+ this page forced as the return — the behaviour this
+ site already ships. Only set it once 2plot.ai has a
+ page that honours ?returnTo=.
Admin allowlist (drives /admin/control-board):
ADMIN_EMAILS comma-separated, case-insensitive
@@ -111,8 +120,8 @@ def admin_access_open() -> bool:
unhide any page on the site: falling open there means anyone who guesses
the URL gets a working admin panel.
- `dash-clerk-auth` is not on PyPI (the 0.9.0 build with the satellite fixes
- is vendored across the 2plot network), so it is NOT a dependency here and
+ `dash-clerk-auth` is vendored across the 2plot network rather than resolved
+ from PyPI (1.0.0 is the current build), so it is NOT a dependency here and
`clerk_enabled()` is False on a default deploy. Without this gate the board
would have shipped wide open.
@@ -206,7 +215,7 @@ def register() -> bool:
)
if is_satellite and sat_domain:
- _install_satellite_fixups(sat_domain)
+ _install_satellite_signin_delegation()
print(
f"[auth] Clerk ENABLED (headless; satellite={is_satellite}, "
@@ -215,53 +224,65 @@ def register() -> bool:
return True
-def _install_satellite_fixups(sat_domain: str) -> None:
- """Two satellite fixes for dash-clerk-auth 0.9.0, applied via an index hook.
-
- 1) clerk-js@5 reads ``domain`` as a CONSTRUCTOR option, from the script
- tag's ``data-clerk-domain`` — NOT as a ``load()`` option. The package
- passes the domain only to ``Clerk.load({domain})``, so the hosted loader
- builds the Clerk singleton with no domain and ``load({isSatellite:true})``
- throws "a satellite application needs to specify a domain or a proxyUrl".
- Fix: stamp ``data-clerk-domain`` onto the script tag. This hook runs
- AFTER the package's, so the tag already exists.
-
- 2) The package binds the sign-in button to ``Clerk.openSignIn()`` — a modal
- on the CURRENT domain. On a satellite that POSTs to the satellite FAPI's
- ``/sign_ins`` and 403s ("This operation is not allowed on a satellite
- domain"). Sign-in must redirect to the primary instead. Fix: intercept
- the ``#clerk-login-button`` click in the CAPTURE phase (fires before the
- package's bubble-phase listener, and ``stopImmediatePropagation``
- prevents it) and call ``redirectToSignIn()``.
-
- ``signInForceRedirectUrl`` / ``signUpForceRedirectUrl`` are set to THIS
- page so the primary returns the user here. The deprecated ``redirectUrl``
- prop is ignored by clerk-js@5, so without these the primary would fall
- back to its own default and strand the user on 2plot.ai. Use
- origin+pathname (no query) so stale ``__clerk_*`` handshake params are
- not carried into the next sign-in.
+def _install_satellite_signin_delegation() -> None:
+ """Delegate ``#clerk-login-button`` clicks, for buttons Dash renders LATE.
+
+ This used to be two hand-rolled satellite fixes for dash-clerk-auth 0.9.0.
+ Both are upstream now and the local copies are gone:
+
+ * stamping ``data-clerk-domain`` onto the ClerkJS script tag (clerk-js@5
+ reads ``domain`` as a CONSTRUCTOR option, not a ``load()`` option) —
+ fixed in **0.9.1**;
+ * replacing ``Clerk.openSignIn()`` on a satellite, which POSTs to the
+ satellite FAPI and 403s with "This operation is not allowed on a
+ satellite domain" — fixed in **0.9.2**, which branches to
+ ``buildSatelliteRedirect()`` / ``redirectToSignIn()`` instead.
+
+ What is NOT upstream is *delegation*. The package binds the button by id
+ inside its ``DOMContentLoaded`` handler, once. The header control exists by
+ then (``components.header``, part of the app shell) and works. The sign-in
+ card in :func:`lib.page_visibility.sign_in_layout` does NOT — it is rendered
+ by a page callback when a visitor reaches an ``auth``-tier page, long after
+ that handler ran, so its button would have no listener at all and the click
+ would do nothing.
+
+ So we keep one delegated CAPTURE-phase listener, which catches the button
+ however late it appears. ``stopImmediatePropagation`` means exactly one
+ handler runs even on the header button, where the package's own listener is
+ also attached — deterministic rather than order-dependent.
+
+ The action itself defers to the package: ``buildSatelliteRedirect()`` (its
+ 0.9.2 page-JS surface, which carries the current page in ``?returnTo=``)
+ when a ``satellite_sign_in_redirect`` is configured, else the same
+ ``redirectToSignIn`` call upstream makes. Set
+ ``CLERK_SATELLITE_SIGN_IN_REDIRECT`` to switch this satellite onto the
+ first path; unset, the fallback is the behaviour this site already shipped.
"""
from dash import hooks as _dash_hooks
+ # Unique marker: the guard below keys off it so a second registration (or a
+ # future second index hook) cannot inject this script twice.
+ marker = "dl2-clerk-signin-delegate"
+
signin_js = (
- ""
)
@_dash_hooks.index()
- def _clerk_satellite_fixups(index_string):
- needle = "data-clerk-publishable-key="
- if needle in index_string and "data-clerk-domain=" not in index_string:
- index_string = index_string.replace(
- needle, f'data-clerk-domain="{sat_domain}" {needle}', 1
- )
- if "redirectToSignIn" not in index_string and "