@geowiki/map 0.16.9-dev.14 → 0.16.9-dev.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  useEvolandStore,
39
39
  useMapLayerStore,
40
40
  useMapStore
41
- } from "./chunk-3LCQXIYM.mjs";
41
+ } from "./chunk-7CQUEXPM.mjs";
42
42
 
43
43
  // src/Components/CanvasImage.tsx
44
44
  var CanvasImage = () => {
@@ -224,10 +224,8 @@ var BingLayer = class extends L3.TileLayer {
224
224
  for (let i = z4; i > 0; i--) {
225
225
  let digit = 0;
226
226
  const mask = 1 << i - 1;
227
- if ((x & mask) !== 0)
228
- digit += 1;
229
- if ((y & mask) !== 0)
230
- digit += 2;
227
+ if ((x & mask) !== 0) digit += 1;
228
+ if ((y & mask) !== 0) digit += 2;
231
229
  quad = quad + digit;
232
230
  }
233
231
  return quad;
@@ -241,8 +239,7 @@ var BingLayer = class extends L3.TileLayer {
241
239
  }
242
240
  loadMetadata() {
243
241
  var _a;
244
- if (this.metaRequested)
245
- return;
242
+ if (this.metaRequested) return;
246
243
  this.metaRequested = true;
247
244
  const _this = this;
248
245
  const cbid = "_bing_metadata_" + L3.Util.stamp(this);
@@ -250,8 +247,7 @@ var BingLayer = class extends L3.TileLayer {
250
247
  var _a2;
251
248
  window[cbid] = void 0;
252
249
  const e = document.getElementById(cbid);
253
- if (e)
254
- (_a2 = e.parentNode) == null ? void 0 : _a2.removeChild(e);
250
+ if (e) (_a2 = e.parentNode) == null ? void 0 : _a2.removeChild(e);
255
251
  if (meta.errorDetails) {
256
252
  console.log(meta.errorDetails);
257
253
  return;
@@ -295,8 +291,7 @@ var BingLayer = class extends L3.TileLayer {
295
291
  this._update();
296
292
  }
297
293
  _update() {
298
- if (this._url === null || !this._map)
299
- return;
294
+ if (this._url === null || !this._map) return;
300
295
  this._update_attribution();
301
296
  super._update();
302
297
  }
@@ -458,8 +453,7 @@ var useMapControlStore = create2((set) => ({
458
453
  })),
459
454
  toggleControlOpen: (id) => set((state) => {
460
455
  const targetControl = state.controls.find((c) => c.id === id);
461
- if (!targetControl)
462
- return state;
456
+ if (!targetControl) return state;
463
457
  const targetPosition = targetControl.position;
464
458
  const shouldOpenTarget = !targetControl.isOpen;
465
459
  const updatedControls = state.controls.map((control) => {
@@ -645,7 +639,7 @@ import { jsx as jsx10 } from "react/jsx-runtime";
645
639
  var constructLegendUrl = (baseUrl, layer, format, style) => {
646
640
  return `${baseUrl}?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=${format}&LAYER=${layer}&STYLE=${style}&legend_options=dpi:150`;
647
641
  };
648
- var fetchLegendData = (baseUrl, layerName, format, style) => __async(void 0, null, function* () {
642
+ var fetchLegendData = (baseUrl, layerName, format, style) => __async(null, null, function* () {
649
643
  const legendGraphicUrl = constructLegendUrl(
650
644
  baseUrl,
651
645
  layerName,
@@ -1462,10 +1456,8 @@ var LayerSwitcher = memo2(() => {
1462
1456
  },
1463
1457
  [openHoverCardId]
1464
1458
  );
1465
- if (error)
1466
- return /* @__PURE__ */ jsx14("div", { children: "Error loading map layers" });
1467
- if (isLoading)
1468
- return /* @__PURE__ */ jsx14("div", { children: "Loading layers..." });
1459
+ if (error) return /* @__PURE__ */ jsx14("div", { children: "Error loading map layers" });
1460
+ if (isLoading) return /* @__PURE__ */ jsx14("div", { children: "Loading layers..." });
1469
1461
  const mapMenus = parseMapMenuItems(mapMenuItems);
1470
1462
  const hasRegularLayers = (mapMenus == null ? void 0 : mapMenus.length) > 0;
1471
1463
  const hasCustomLayers = customLayers.length > 0;
@@ -1947,8 +1939,7 @@ var MapControlContainer = memo3(() => {
1947
1939
  }, [controls]);
1948
1940
  return /* @__PURE__ */ jsx18(TooltipProvider, { children: /* @__PURE__ */ jsx18(Fragment6, { children: Object.entries(POSITION_CLASSES).map(([position, className]) => {
1949
1941
  const positionControls = controlsByPosition[position] || [];
1950
- if (positionControls.length === 0)
1951
- return null;
1942
+ if (positionControls.length === 0) return null;
1952
1943
  return /* @__PURE__ */ jsx18(
1953
1944
  PositionGroup,
1954
1945
  {
@@ -1975,8 +1966,7 @@ var BasicMap = () => {
1975
1966
  ((_f = (_e = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _e.Longitude) == null ? void 0 : _f.Text) || 16.3738
1976
1967
  ];
1977
1968
  useRenderInfo("BasicMap");
1978
- if (isSettingsLoading)
1979
- return /* @__PURE__ */ jsx19(LoaderFull, {});
1969
+ if (isSettingsLoading) return /* @__PURE__ */ jsx19(LoaderFull, {});
1980
1970
  return /* @__PURE__ */ jsx19(Fragment7, { children: /* @__PURE__ */ jsxs12(
1981
1971
  MapContainer2,
1982
1972
  {
@@ -2048,8 +2038,7 @@ var useSelectedPixelStore = create3((set) => ({
2048
2038
  set((state) => {
2049
2039
  var _a;
2050
2040
  const feat = (_a = geoJson.features[0]) == null ? void 0 : _a.id;
2051
- if (!feat)
2052
- return state;
2041
+ if (!feat) return state;
2053
2042
  const existing = state.data.some(
2054
2043
  (item) => item.features[0].id === geoJson.features[0].id
2055
2044
  );
@@ -2722,7 +2711,7 @@ var BasfSelect = () => {
2722
2711
  [selectedItems]
2723
2712
  );
2724
2713
  const onSubmit = useCallback4(
2725
- (data) => __async(void 0, null, function* () {
2714
+ (data) => __async(null, null, function* () {
2726
2715
  setIsSubmitting(true);
2727
2716
  try {
2728
2717
  if (checkIfItemExists(data)) {
@@ -2832,8 +2821,7 @@ function PolylineMeasureControl() {
2832
2821
  const controlRef = useRef4(null);
2833
2822
  const [active, setActive] = useState6(false);
2834
2823
  useEffect8(() => {
2835
- if (!map)
2836
- return;
2824
+ if (!map) return;
2837
2825
  controlRef.current = L5.control.polylineMeasure({
2838
2826
  position: "topright",
2839
2827
  unit: "metres",
@@ -2854,8 +2842,7 @@ function PolylineMeasureControl() {
2854
2842
  };
2855
2843
  }, [map]);
2856
2844
  const togglePolylineMeasure = () => {
2857
- if (!controlRef.current)
2858
- return;
2845
+ if (!controlRef.current) return;
2859
2846
  if (!controlRef.current._measureControl) {
2860
2847
  console.warn("Measurement control not properly initialized");
2861
2848
  return;
@@ -2871,8 +2858,7 @@ function PolylineMeasureControl() {
2871
2858
  }
2872
2859
  };
2873
2860
  const clearMeasurements = () => {
2874
- if (!controlRef.current)
2875
- return;
2861
+ if (!controlRef.current) return;
2876
2862
  controlRef.current._clearAllMeasurements();
2877
2863
  trackMapEvent2.measurementTool("clear");
2878
2864
  };
@@ -2981,8 +2967,7 @@ var BasfMapComponent = (_a) => {
2981
2967
  Number((_i = (_h = (_g = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _g.Longitude) == null ? void 0 : _h.Text) != null ? _i : 16.3738)
2982
2968
  ];
2983
2969
  const steps = (_k = (_j = mapSettings == null ? void 0 : mapSettings.MapSettings) == null ? void 0 : _j.TourSteps) == null ? void 0 : _k.Text;
2984
- if (isSettingsLoading)
2985
- return /* @__PURE__ */ jsx30(LoaderFull2, {});
2970
+ if (isSettingsLoading) return /* @__PURE__ */ jsx30(LoaderFull2, {});
2986
2971
  return /* @__PURE__ */ jsx30(Fragment10, { children: /* @__PURE__ */ jsxs19(
2987
2972
  MapContainer3,
2988
2973
  __spreadProps(__spreadValues({
@@ -3052,7 +3037,7 @@ var GeoTreesDownloadContent = () => {
3052
3037
  }
3053
3038
  }, [session, setValue]);
3054
3039
  useEffect10(() => {
3055
- const fetchCountries = () => __async(void 0, null, function* () {
3040
+ const fetchCountries = () => __async(null, null, function* () {
3056
3041
  try {
3057
3042
  const response = yield fetch(
3058
3043
  `${baseUrl}/api/plots/get-available-countries`,
@@ -3068,7 +3053,7 @@ var GeoTreesDownloadContent = () => {
3068
3053
  console.error("Error fetching countries:", error);
3069
3054
  }
3070
3055
  });
3071
- const fetchVersions = () => __async(void 0, null, function* () {
3056
+ const fetchVersions = () => __async(null, null, function* () {
3072
3057
  try {
3073
3058
  const response = yield fetch(
3074
3059
  `${baseUrl}/api/plots/available-versions`,
@@ -3322,8 +3307,7 @@ var ScaleControl3 = ({
3322
3307
  const [scale, setScale] = useState8("");
3323
3308
  useEffect11(() => {
3324
3309
  const updateScale = () => {
3325
- if (!map)
3326
- return;
3310
+ if (!map) return;
3327
3311
  const center = map.getCenter();
3328
3312
  const zoom = map.getZoom();
3329
3313
  const metersPerPixel = 156543.03392 * Math.cos(center.lat * Math.PI / 180) / Math.pow(2, zoom);
@@ -3339,8 +3323,7 @@ var ScaleControl3 = ({
3339
3323
  map.off("moveend", updateScale);
3340
3324
  };
3341
3325
  }, [map]);
3342
- if (!scale)
3343
- return null;
3326
+ if (!scale) return null;
3344
3327
  return /* @__PURE__ */ jsx32(
3345
3328
  "div",
3346
3329
  {
@@ -3943,7 +3926,7 @@ var GeoTreesExternalLayer = forwardRef3(
3943
3926
  const externalUrl = `${API_URL}/api/external/google-sheet-geojson`;
3944
3927
  const { isLoading, error, data } = useQuery2({
3945
3928
  queryKey: ["geoTreesExternal", externalUrl],
3946
- queryFn: () => __async(void 0, null, function* () {
3929
+ queryFn: () => __async(null, null, function* () {
3947
3930
  if (!API_URL) {
3948
3931
  throw new Error("NEXT_PUBLIC_GEO_TREE_API_URL is not configured");
3949
3932
  }
@@ -3975,8 +3958,7 @@ var GeoTreesExternalLayer = forwardRef3(
3975
3958
  );
3976
3959
  const addGeoTreesLayer = useCallback5(() => {
3977
3960
  var _a2;
3978
- if (!data)
3979
- return;
3961
+ if (!data) return;
3980
3962
  const layerId = "geotrees-external-layer";
3981
3963
  if (hasLayerBeenAdded(layerId) || existingLayer || hasAddedLayer.current) {
3982
3964
  console.warn("GEO-TREES BRM layer already exists, skipping addition", {
@@ -3989,8 +3971,7 @@ var GeoTreesExternalLayer = forwardRef3(
3989
3971
  const filteredFeatures = ((_a2 = data.features) == null ? void 0 : _a2.filter((feature) => {
3990
3972
  var _a3;
3991
3973
  const status = (_a3 = feature.properties) == null ? void 0 : _a3.Status;
3992
- if (!status)
3993
- return true;
3974
+ if (!status) return true;
3994
3975
  const statusKey = getStatusFromRaw(status);
3995
3976
  return statusKey ? statusFilter[statusKey] : true;
3996
3977
  })) || [];
@@ -4058,12 +4039,9 @@ var GeoTreesExternalLayer = forwardRef3(
4058
4039
  addGeoTreesLayer();
4059
4040
  }
4060
4041
  }, [data, autoAdd, existingLayer, addGeoTreesLayer, hasLayerBeenAdded]);
4061
- if (error)
4062
- return /* @__PURE__ */ jsx36(ErrorDisplay, { error });
4063
- if (isLoading)
4064
- return /* @__PURE__ */ jsx36(LoadingDisplay, {});
4065
- if (!((_a = data == null ? void 0 : data.features) == null ? void 0 : _a.length))
4066
- return /* @__PURE__ */ jsx36(EmptyStateDisplay, {});
4042
+ if (error) return /* @__PURE__ */ jsx36(ErrorDisplay, { error });
4043
+ if (isLoading) return /* @__PURE__ */ jsx36(LoadingDisplay, {});
4044
+ if (!((_a = data == null ? void 0 : data.features) == null ? void 0 : _a.length)) return /* @__PURE__ */ jsx36(EmptyStateDisplay, {});
4067
4045
  return null;
4068
4046
  }
4069
4047
  );
@@ -4114,8 +4092,7 @@ var GeoTreesMap = () => {
4114
4092
  "Error loading map settings: ",
4115
4093
  error.message
4116
4094
  ] }) });
4117
- if (isSettingsLoading)
4118
- return /* @__PURE__ */ jsx37(LoaderFull3, { showInCenter: false });
4095
+ if (isSettingsLoading) return /* @__PURE__ */ jsx37(LoaderFull3, { showInCenter: false });
4119
4096
  const zoom = (_c = (_b = (_a = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _a.Zoom) == null ? void 0 : _b.Value) != null ? _c : 12;
4120
4097
  const center = [
4121
4098
  (_f = (_e = (_d = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _d.Latitude) == null ? void 0 : _e.Text) != null ? _f : 48.2082,
@@ -4182,8 +4159,7 @@ var useAreaSelect = ({
4182
4159
  const rectangleRef = useRef7(null);
4183
4160
  useEffect15(() => {
4184
4161
  var _a;
4185
- if (!map.selectArea)
4186
- return;
4162
+ if (!map.selectArea) return;
4187
4163
  (_a = map.selectArea) == null ? void 0 : _a.setControlKey(false);
4188
4164
  if (!rectangleRef.current) {
4189
4165
  rectangleRef.current = new Rectangle(
@@ -4196,8 +4172,7 @@ var useAreaSelect = ({
4196
4172
  }
4197
4173
  const handleAreaSelected = (e) => {
4198
4174
  var _a2, _b, _c;
4199
- if (!e.bounds)
4200
- return;
4175
+ if (!e.bounds) return;
4201
4176
  const boundsString = e.bounds.toBBoxString();
4202
4177
  if (onAreaSelected) {
4203
4178
  onAreaSelected(boundsString);
@@ -4270,9 +4245,8 @@ import { jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
4270
4245
  var CanopyAtlasDownload = () => {
4271
4246
  const [format, setFormat] = useState10("shape-zip");
4272
4247
  const { bbox } = useAreaSelectStore();
4273
- const handleDownload = () => __async(void 0, null, function* () {
4274
- if (!bbox)
4275
- return;
4248
+ const handleDownload = () => __async(null, null, function* () {
4249
+ if (!bbox) return;
4276
4250
  const params = {
4277
4251
  request: "GetFeature",
4278
4252
  service: "WFS",
@@ -4287,8 +4261,7 @@ var CanopyAtlasDownload = () => {
4287
4261
  const wfsUrl = baseUrl + L7.Util.getParamString(params, baseUrl, true);
4288
4262
  try {
4289
4263
  const response = yield fetch(wfsUrl);
4290
- if (!response.ok)
4291
- throw new Error("Download failed");
4264
+ if (!response.ok) throw new Error("Download failed");
4292
4265
  const blob = yield response.blob();
4293
4266
  const url = window.URL.createObjectURL(blob);
4294
4267
  const a = document.createElement("a");
@@ -4470,20 +4443,15 @@ var CanopyFilter = memo11(({ onFilterChange }) => {
4470
4443
  localStorage.setItem(STORAGE_KEY, JSON.stringify(updatedFilters));
4471
4444
  onFilterChange(updatedFilters);
4472
4445
  };
4473
- const handleDownload = () => __async(void 0, null, function* () {
4446
+ const handleDownload = () => __async(null, null, function* () {
4474
4447
  const cqlFilters = [];
4475
- if (filters.biome)
4476
- cqlFilters.push(`biome='${filters.biome}'`);
4477
- if (filters.realm)
4478
- cqlFilters.push(`realm='${filters.realm}'`);
4479
- if (filters.access)
4480
- cqlFilters.push(`access='${filters.access}'`);
4448
+ if (filters.biome) cqlFilters.push(`biome='${filters.biome}'`);
4449
+ if (filters.realm) cqlFilters.push(`realm='${filters.realm}'`);
4450
+ if (filters.access) cqlFilters.push(`access='${filters.access}'`);
4481
4451
  if (filters.idunique)
4482
4452
  cqlFilters.push(`IDunique LIKE '%${filters.idunique}%'`);
4483
- if (filters.minyear)
4484
- cqlFilters.push(`minyear>=${filters.minyear}`);
4485
- if (filters.maxyear)
4486
- cqlFilters.push(`minyear<=${filters.maxyear}`);
4453
+ if (filters.minyear) cqlFilters.push(`minyear>=${filters.minyear}`);
4454
+ if (filters.maxyear) cqlFilters.push(`minyear<=${filters.maxyear}`);
4487
4455
  const params = __spreadValues({
4488
4456
  request: "GetFeature",
4489
4457
  service: "WFS",
@@ -4497,8 +4465,7 @@ var CanopyFilter = memo11(({ onFilterChange }) => {
4497
4465
  const wfsUrl = baseUrl + L8.Util.getParamString(params, baseUrl, true);
4498
4466
  try {
4499
4467
  const response = yield fetch(wfsUrl);
4500
- if (!response.ok)
4501
- throw new Error("Download failed");
4468
+ if (!response.ok) throw new Error("Download failed");
4502
4469
  const blob = yield response.blob();
4503
4470
  const url = window.URL.createObjectURL(blob);
4504
4471
  const a = document.createElement("a");
@@ -4732,10 +4699,8 @@ var constructCqlFilter = (filterParams) => {
4732
4699
  return "";
4733
4700
  }
4734
4701
  let _a = filterParams || {}, { minyear, maxyear } = _a, rest = __objRest(_a, ["minyear", "maxyear"]);
4735
- if (Array.isArray(minyear))
4736
- minyear = minyear[0];
4737
- if (Array.isArray(maxyear))
4738
- maxyear = maxyear[0];
4702
+ if (Array.isArray(minyear)) minyear = minyear[0];
4703
+ if (Array.isArray(maxyear)) maxyear = maxyear[0];
4739
4704
  const cqlExpressions = [];
4740
4705
  if (minyear && maxyear) {
4741
4706
  cqlExpressions.push(
@@ -4842,16 +4807,14 @@ var formatPropertyValue = (value, propertyName) => {
4842
4807
  return value.toString();
4843
4808
  };
4844
4809
  var createDefaultPopupContent = (feature, propertyNames) => {
4845
- if (!feature.properties)
4846
- return "";
4810
+ if (!feature.properties) return "";
4847
4811
  const propertiesToShow = (propertyNames == null ? void 0 : propertyNames.length) ? propertyNames : DEFAULT_POPUP_PROPERTIES;
4848
4812
  const properties = Object.entries(feature.properties).filter(([key]) => propertiesToShow.includes(key)).sort((a, b) => {
4849
4813
  const indexA = propertiesToShow.indexOf(a[0]);
4850
4814
  const indexB = propertiesToShow.indexOf(b[0]);
4851
4815
  return indexA - indexB;
4852
4816
  });
4853
- if (properties.length === 0)
4854
- return "";
4817
+ if (properties.length === 0) return "";
4855
4818
  return `
4856
4819
  <div class="leaflet-popup-content-wrapper" style="background-color: #fff; padding: 0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.15);">
4857
4820
  <div style="width: 100%; overflow-y: auto;">
@@ -4922,7 +4885,7 @@ var openDatabase = () => {
4922
4885
  };
4923
4886
  });
4924
4887
  };
4925
- var storeInIndexedDB = (key, data) => __async(void 0, null, function* () {
4888
+ var storeInIndexedDB = (key, data) => __async(null, null, function* () {
4926
4889
  try {
4927
4890
  const db = yield openDatabase();
4928
4891
  const transaction = db.transaction(STORE_NAME, "readwrite");
@@ -4941,7 +4904,7 @@ var storeInIndexedDB = (key, data) => __async(void 0, null, function* () {
4941
4904
  console.warn("Failed to store data in IndexedDB:", e);
4942
4905
  }
4943
4906
  });
4944
- var getFromIndexedDB = (key) => __async(void 0, null, function* () {
4907
+ var getFromIndexedDB = (key) => __async(null, null, function* () {
4945
4908
  try {
4946
4909
  const db = yield openDatabase();
4947
4910
  const transaction = db.transaction(STORE_NAME, "readonly");
@@ -4963,7 +4926,7 @@ var getFromIndexedDB = (key) => __async(void 0, null, function* () {
4963
4926
  return null;
4964
4927
  }
4965
4928
  });
4966
- var cleanupIndexedDB = () => __async(void 0, null, function* () {
4929
+ var cleanupIndexedDB = () => __async(null, null, function* () {
4967
4930
  try {
4968
4931
  const db = yield openDatabase();
4969
4932
  const transaction = db.transaction(STORE_NAME, "readwrite");
@@ -5013,8 +4976,7 @@ var WfsLayer = ({
5013
4976
  }
5014
4977
  });
5015
4978
  const stableFilterParams = useMemo4(() => {
5016
- if (!filterParams)
5017
- return null;
4979
+ if (!filterParams) return null;
5018
4980
  return JSON.stringify(filterParams);
5019
4981
  }, [filterParams]);
5020
4982
  const queryKey = useMemo4(() => {
@@ -5036,7 +4998,7 @@ var WfsLayer = ({
5036
4998
  }, [url, layerName, filterParams, useServerFiltering]);
5037
4999
  const { data: geoJsonData, error } = useQuery3({
5038
5000
  queryKey,
5039
- queryFn: () => __async(void 0, null, function* () {
5001
+ queryFn: () => __async(null, null, function* () {
5040
5002
  mapStore.setIsLoading(true);
5041
5003
  const wfsUrl = constructWfsUrl();
5042
5004
  const storageKey = `wfs-data-${queryKey.join("-")}`;
@@ -5101,8 +5063,7 @@ var WfsLayer = ({
5101
5063
  const getFeatureStyle = useCallback6(
5102
5064
  (feature) => {
5103
5065
  var _a2;
5104
- if (!feature)
5105
- return defaultStyle;
5066
+ if (!feature) return defaultStyle;
5106
5067
  const featureId = ((_a2 = feature.id) == null ? void 0 : _a2.toString()) || JSON.stringify(feature.properties);
5107
5068
  return featureId === selectedFeatureId ? highlightStyle : defaultStyle;
5108
5069
  },
@@ -5113,8 +5074,7 @@ var WfsLayer = ({
5113
5074
  var _a2;
5114
5075
  const featureId = ((_a2 = feature.id) == null ? void 0 : _a2.toString()) || JSON.stringify(feature.properties);
5115
5076
  layerRef.current[featureId] = layer;
5116
- if (!popupOptions || !feature.properties)
5117
- return;
5077
+ if (!popupOptions || !feature.properties) return;
5118
5078
  let popupContent;
5119
5079
  if (popupOptions.renderContent) {
5120
5080
  popupContent = popupOptions.renderContent(feature);
@@ -5159,8 +5119,7 @@ var WfsLayer = ({
5159
5119
  []
5160
5120
  );
5161
5121
  const filteredGeoJson = useMemo4(() => {
5162
- if (!geoJsonData)
5163
- return null;
5122
+ if (!geoJsonData) return null;
5164
5123
  if (useServerFiltering || !filterParams || Object.keys(filterParams).length === 0) {
5165
5124
  return geoJsonData;
5166
5125
  }
@@ -5397,15 +5356,14 @@ import { Fragment as Fragment16, jsx as jsx42, jsxs as jsxs29 } from "react/jsx-
5397
5356
  var CanopyMap = () => {
5398
5357
  var _a, _b, _c, _d, _e, _f;
5399
5358
  const { data: mapSettings, isLoading: isSettingsLoading } = useMapSettings4();
5400
- const mapRef = useRef10();
5359
+ const mapRef = useRef10(void 0);
5401
5360
  const zoom = ((_b = (_a = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _a.Zoom) == null ? void 0 : _b.Value) || 5;
5402
5361
  const center = [
5403
5362
  ((_d = (_c = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _c.Latitude) == null ? void 0 : _d.Text) || 48.2082,
5404
5363
  ((_f = (_e = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _e.Longitude) == null ? void 0 : _f.Text) || 16.3738
5405
5364
  ];
5406
5365
  useRenderInfo2("BasicMap");
5407
- if (isSettingsLoading)
5408
- return /* @__PURE__ */ jsx42(LoaderFull4, { showInCenter: false });
5366
+ if (isSettingsLoading) return /* @__PURE__ */ jsx42(LoaderFull4, { showInCenter: false });
5409
5367
  return /* @__PURE__ */ jsx42(Fragment16, { children: /* @__PURE__ */ jsxs29(
5410
5368
  MapContainer5,
5411
5369
  {
@@ -5529,7 +5487,7 @@ var BasfLeftPanel = () => {
5529
5487
  [selectedItems]
5530
5488
  );
5531
5489
  const onSubmit = useCallback8(
5532
- (data) => __async(void 0, null, function* () {
5490
+ (data) => __async(null, null, function* () {
5533
5491
  setIsSubmitting(true);
5534
5492
  try {
5535
5493
  if (checkIfItemExists(data)) {
@@ -5632,8 +5590,7 @@ var WaybackTimelineMap = (props) => {
5632
5590
  return null;
5633
5591
  }
5634
5592
  useEffect19(() => {
5635
- if (props.mapping)
5636
- setWAYBACK_SNAPSHOTS(props.mapping);
5593
+ if (props.mapping) setWAYBACK_SNAPSHOTS(props.mapping);
5637
5594
  }, [props.mapping]);
5638
5595
  const west = parseFloat(searchParams.get("xmin"));
5639
5596
  const south = parseFloat(searchParams.get("ymin"));
@@ -6039,7 +5996,7 @@ var LayerItem2 = memo13(
6039
5996
  }
6040
5997
  );
6041
5998
  LayerItem2.displayName = "LayerItem";
6042
- var LayerSwitcher2 = memo13(({ mapMenuItems, customLayers }) => {
5999
+ var LayerSwitcher2 = memo13((({ mapMenuItems, customLayers }) => {
6043
6000
  const store = useMapLayerStore2();
6044
6001
  const [openHoverCardId, setOpenHoverCardId] = useState16(null);
6045
6002
  useEffect20(() => {
@@ -6095,8 +6052,7 @@ var LayerSwitcher2 = memo13(({ mapMenuItems, customLayers }) => {
6095
6052
  ) !== -1,
6096
6053
  onToggle: () => {
6097
6054
  handleToggle(layer);
6098
- if (layer.ontoggle)
6099
- layer.ontoggle();
6055
+ if (layer.ontoggle) layer.ontoggle();
6100
6056
  },
6101
6057
  openHoverCardId,
6102
6058
  onInfoClick: handleInfoClick
@@ -6152,7 +6108,7 @@ var LayerSwitcher2 = memo13(({ mapMenuItems, customLayers }) => {
6152
6108
  ] })
6153
6109
  ] }, menu.id);
6154
6110
  }) });
6155
- });
6111
+ }));
6156
6112
  LayerSwitcher2.displayName = "LayerSwitcher";
6157
6113
 
6158
6114
  // src/Components/Generic/Map/MapControlToolbar.tsx
@@ -6167,21 +6123,15 @@ import {
6167
6123
  // ../../node_modules/clsx/dist/clsx.mjs
6168
6124
  function r(e) {
6169
6125
  var t, f, n = "";
6170
- if ("string" == typeof e || "number" == typeof e)
6171
- n += e;
6172
- else if ("object" == typeof e)
6173
- if (Array.isArray(e)) {
6174
- var o = e.length;
6175
- for (t = 0; t < o; t++)
6176
- e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
6177
- } else
6178
- for (f in e)
6179
- e[f] && (n && (n += " "), n += f);
6126
+ if ("string" == typeof e || "number" == typeof e) n += e;
6127
+ else if ("object" == typeof e) if (Array.isArray(e)) {
6128
+ var o = e.length;
6129
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
6130
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
6180
6131
  return n;
6181
6132
  }
6182
6133
  function clsx() {
6183
- for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++)
6184
- (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
6134
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
6185
6135
  return n;
6186
6136
  }
6187
6137
 
@@ -6562,7 +6512,7 @@ var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
6562
6512
  var fractionRegex = /^\d+\/\d+$/;
6563
6513
  var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
6564
6514
  var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
6565
- var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))/;
6515
+ var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
6566
6516
  var shadowRegex = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
6567
6517
  function isLength(value) {
6568
6518
  return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value) || isArbitraryLength(value);
@@ -6662,8 +6612,11 @@ function getDefaultConfig() {
6662
6612
  var getOverflow = function getOverflow2() {
6663
6613
  return ["auto", "hidden", "clip", "visible", "scroll"];
6664
6614
  };
6665
- var getSpacingWithAuto = function getSpacingWithAuto2() {
6666
- return ["auto", spacing];
6615
+ var getSpacingWithAutoAndArbitrary = function getSpacingWithAutoAndArbitrary2() {
6616
+ return ["auto", isArbitraryValue, spacing];
6617
+ };
6618
+ var getSpacingWithArbitrary = function getSpacingWithArbitrary2() {
6619
+ return [isArbitraryValue, spacing];
6667
6620
  };
6668
6621
  var getLengthWithEmpty = function getLengthWithEmpty2() {
6669
6622
  return ["", isLength];
@@ -6700,29 +6653,29 @@ function getDefaultConfig() {
6700
6653
  theme: {
6701
6654
  colors: [isAny],
6702
6655
  spacing: [isLength],
6703
- blur: ["none", "", isTshirtSize, isArbitraryLength],
6656
+ blur: ["none", "", isTshirtSize, isArbitraryValue],
6704
6657
  brightness: getNumber(),
6705
6658
  borderColor: [colors],
6706
- borderRadius: ["none", "", "full", isTshirtSize, isArbitraryLength],
6707
- borderSpacing: [spacing],
6659
+ borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
6660
+ borderSpacing: getSpacingWithArbitrary(),
6708
6661
  borderWidth: getLengthWithEmpty(),
6709
6662
  contrast: getNumber(),
6710
6663
  grayscale: getZeroAndEmpty(),
6711
6664
  hueRotate: getNumberAndArbitrary(),
6712
6665
  invert: getZeroAndEmpty(),
6713
- gap: [spacing],
6666
+ gap: getSpacingWithArbitrary(),
6714
6667
  gradientColorStops: [colors],
6715
6668
  gradientColorStopPositions: [isPercent, isArbitraryLength],
6716
- inset: getSpacingWithAuto(),
6717
- margin: getSpacingWithAuto(),
6669
+ inset: getSpacingWithAutoAndArbitrary(),
6670
+ margin: getSpacingWithAutoAndArbitrary(),
6718
6671
  opacity: getNumber(),
6719
- padding: [spacing],
6672
+ padding: getSpacingWithArbitrary(),
6720
6673
  saturate: getNumber(),
6721
6674
  scale: getNumber(),
6722
6675
  sepia: getZeroAndEmpty(),
6723
6676
  skew: getNumberAndArbitrary(),
6724
- space: [spacing],
6725
- translate: [spacing]
6677
+ space: getSpacingWithArbitrary(),
6678
+ translate: getSpacingWithArbitrary()
6726
6679
  },
6727
6680
  classGroups: {
6728
6681
  // Layout
@@ -6946,7 +6899,7 @@ function getDefaultConfig() {
6946
6899
  * @see https://tailwindcss.com/docs/flex-basis
6947
6900
  */
6948
6901
  basis: [{
6949
- basis: [spacing]
6902
+ basis: getSpacingWithAutoAndArbitrary()
6950
6903
  }],
6951
6904
  /**
6952
6905
  * Flex Direction
@@ -7003,7 +6956,7 @@ function getDefaultConfig() {
7003
6956
  */
7004
6957
  "col-start-end": [{
7005
6958
  col: ["auto", {
7006
- span: [isInteger]
6959
+ span: ["full", isInteger]
7007
6960
  }, isArbitraryValue]
7008
6961
  }],
7009
6962
  /**
@@ -7312,14 +7265,14 @@ function getDefaultConfig() {
7312
7265
  * @see https://tailwindcss.com/docs/width
7313
7266
  */
7314
7267
  w: [{
7315
- w: ["auto", "min", "max", "fit", spacing]
7268
+ w: ["auto", "min", "max", "fit", isArbitraryValue, spacing]
7316
7269
  }],
7317
7270
  /**
7318
7271
  * Min-Width
7319
7272
  * @see https://tailwindcss.com/docs/min-width
7320
7273
  */
7321
7274
  "min-w": [{
7322
- "min-w": ["min", "max", "fit", isLength]
7275
+ "min-w": ["min", "max", "fit", isArbitraryValue, isLength]
7323
7276
  }],
7324
7277
  /**
7325
7278
  * Max-Width
@@ -7328,28 +7281,28 @@ function getDefaultConfig() {
7328
7281
  "max-w": [{
7329
7282
  "max-w": ["0", "none", "full", "min", "max", "fit", "prose", {
7330
7283
  screen: [isTshirtSize]
7331
- }, isTshirtSize, isArbitraryLength]
7284
+ }, isTshirtSize, isArbitraryValue]
7332
7285
  }],
7333
7286
  /**
7334
7287
  * Height
7335
7288
  * @see https://tailwindcss.com/docs/height
7336
7289
  */
7337
7290
  h: [{
7338
- h: [spacing, "auto", "min", "max", "fit"]
7291
+ h: [isArbitraryValue, spacing, "auto", "min", "max", "fit"]
7339
7292
  }],
7340
7293
  /**
7341
7294
  * Min-Height
7342
7295
  * @see https://tailwindcss.com/docs/min-height
7343
7296
  */
7344
7297
  "min-h": [{
7345
- "min-h": ["min", "max", "fit", isLength]
7298
+ "min-h": ["min", "max", "fit", isArbitraryValue, isLength]
7346
7299
  }],
7347
7300
  /**
7348
7301
  * Max-Height
7349
7302
  * @see https://tailwindcss.com/docs/max-height
7350
7303
  */
7351
7304
  "max-h": [{
7352
- "max-h": [spacing, "min", "max", "fit"]
7305
+ "max-h": [isArbitraryValue, spacing, "min", "max", "fit"]
7353
7306
  }],
7354
7307
  // Typography
7355
7308
  /**
@@ -7418,7 +7371,7 @@ function getDefaultConfig() {
7418
7371
  * @see https://tailwindcss.com/docs/letter-spacing
7419
7372
  */
7420
7373
  tracking: [{
7421
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryLength]
7374
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
7422
7375
  }],
7423
7376
  /**
7424
7377
  * Line Clamp
@@ -7432,7 +7385,7 @@ function getDefaultConfig() {
7432
7385
  * @see https://tailwindcss.com/docs/line-height
7433
7386
  */
7434
7387
  leading: [{
7435
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength]
7388
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isArbitraryValue, isLength]
7436
7389
  }],
7437
7390
  /**
7438
7391
  * List Style Image
@@ -7515,7 +7468,7 @@ function getDefaultConfig() {
7515
7468
  * @see https://tailwindcss.com/docs/text-underline-offset
7516
7469
  */
7517
7470
  "underline-offset": [{
7518
- "underline-offset": ["auto", isLength]
7471
+ "underline-offset": ["auto", isArbitraryValue, isLength]
7519
7472
  }],
7520
7473
  /**
7521
7474
  * Text Decoration Color
@@ -7539,14 +7492,14 @@ function getDefaultConfig() {
7539
7492
  * @see https://tailwindcss.com/docs/text-indent
7540
7493
  */
7541
7494
  indent: [{
7542
- indent: [spacing]
7495
+ indent: getSpacingWithArbitrary()
7543
7496
  }],
7544
7497
  /**
7545
7498
  * Vertical Alignment
7546
7499
  * @see https://tailwindcss.com/docs/vertical-align
7547
7500
  */
7548
7501
  "vertical-align": [{
7549
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryLength]
7502
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
7550
7503
  }],
7551
7504
  /**
7552
7505
  * Whitespace
@@ -7976,7 +7929,7 @@ function getDefaultConfig() {
7976
7929
  * @see https://tailwindcss.com/docs/outline-offset
7977
7930
  */
7978
7931
  "outline-offset": [{
7979
- "outline-offset": [isLength]
7932
+ "outline-offset": [isArbitraryValue, isLength]
7980
7933
  }],
7981
7934
  /**
7982
7935
  * Outline Width
@@ -8055,7 +8008,7 @@ function getDefaultConfig() {
8055
8008
  opacity: [opacity]
8056
8009
  }],
8057
8010
  /**
8058
- * Mix Beldn Mode
8011
+ * Mix Blend Mode
8059
8012
  * @see https://tailwindcss.com/docs/mix-blend-mode
8060
8013
  */
8061
8014
  "mix-blend": [{
@@ -8414,126 +8367,126 @@ function getDefaultConfig() {
8414
8367
  * @see https://tailwindcss.com/docs/scroll-margin
8415
8368
  */
8416
8369
  "scroll-m": [{
8417
- "scroll-m": [spacing]
8370
+ "scroll-m": getSpacingWithArbitrary()
8418
8371
  }],
8419
8372
  /**
8420
8373
  * Scroll Margin X
8421
8374
  * @see https://tailwindcss.com/docs/scroll-margin
8422
8375
  */
8423
8376
  "scroll-mx": [{
8424
- "scroll-mx": [spacing]
8377
+ "scroll-mx": getSpacingWithArbitrary()
8425
8378
  }],
8426
8379
  /**
8427
8380
  * Scroll Margin Y
8428
8381
  * @see https://tailwindcss.com/docs/scroll-margin
8429
8382
  */
8430
8383
  "scroll-my": [{
8431
- "scroll-my": [spacing]
8384
+ "scroll-my": getSpacingWithArbitrary()
8432
8385
  }],
8433
8386
  /**
8434
8387
  * Scroll Margin Start
8435
8388
  * @see https://tailwindcss.com/docs/scroll-margin
8436
8389
  */
8437
8390
  "scroll-ms": [{
8438
- "scroll-ms": [spacing]
8391
+ "scroll-ms": getSpacingWithArbitrary()
8439
8392
  }],
8440
8393
  /**
8441
8394
  * Scroll Margin End
8442
8395
  * @see https://tailwindcss.com/docs/scroll-margin
8443
8396
  */
8444
8397
  "scroll-me": [{
8445
- "scroll-me": [spacing]
8398
+ "scroll-me": getSpacingWithArbitrary()
8446
8399
  }],
8447
8400
  /**
8448
8401
  * Scroll Margin Top
8449
8402
  * @see https://tailwindcss.com/docs/scroll-margin
8450
8403
  */
8451
8404
  "scroll-mt": [{
8452
- "scroll-mt": [spacing]
8405
+ "scroll-mt": getSpacingWithArbitrary()
8453
8406
  }],
8454
8407
  /**
8455
8408
  * Scroll Margin Right
8456
8409
  * @see https://tailwindcss.com/docs/scroll-margin
8457
8410
  */
8458
8411
  "scroll-mr": [{
8459
- "scroll-mr": [spacing]
8412
+ "scroll-mr": getSpacingWithArbitrary()
8460
8413
  }],
8461
8414
  /**
8462
8415
  * Scroll Margin Bottom
8463
8416
  * @see https://tailwindcss.com/docs/scroll-margin
8464
8417
  */
8465
8418
  "scroll-mb": [{
8466
- "scroll-mb": [spacing]
8419
+ "scroll-mb": getSpacingWithArbitrary()
8467
8420
  }],
8468
8421
  /**
8469
8422
  * Scroll Margin Left
8470
8423
  * @see https://tailwindcss.com/docs/scroll-margin
8471
8424
  */
8472
8425
  "scroll-ml": [{
8473
- "scroll-ml": [spacing]
8426
+ "scroll-ml": getSpacingWithArbitrary()
8474
8427
  }],
8475
8428
  /**
8476
8429
  * Scroll Padding
8477
8430
  * @see https://tailwindcss.com/docs/scroll-padding
8478
8431
  */
8479
8432
  "scroll-p": [{
8480
- "scroll-p": [spacing]
8433
+ "scroll-p": getSpacingWithArbitrary()
8481
8434
  }],
8482
8435
  /**
8483
8436
  * Scroll Padding X
8484
8437
  * @see https://tailwindcss.com/docs/scroll-padding
8485
8438
  */
8486
8439
  "scroll-px": [{
8487
- "scroll-px": [spacing]
8440
+ "scroll-px": getSpacingWithArbitrary()
8488
8441
  }],
8489
8442
  /**
8490
8443
  * Scroll Padding Y
8491
8444
  * @see https://tailwindcss.com/docs/scroll-padding
8492
8445
  */
8493
8446
  "scroll-py": [{
8494
- "scroll-py": [spacing]
8447
+ "scroll-py": getSpacingWithArbitrary()
8495
8448
  }],
8496
8449
  /**
8497
8450
  * Scroll Padding Start
8498
8451
  * @see https://tailwindcss.com/docs/scroll-padding
8499
8452
  */
8500
8453
  "scroll-ps": [{
8501
- "scroll-ps": [spacing]
8454
+ "scroll-ps": getSpacingWithArbitrary()
8502
8455
  }],
8503
8456
  /**
8504
8457
  * Scroll Padding End
8505
8458
  * @see https://tailwindcss.com/docs/scroll-padding
8506
8459
  */
8507
8460
  "scroll-pe": [{
8508
- "scroll-pe": [spacing]
8461
+ "scroll-pe": getSpacingWithArbitrary()
8509
8462
  }],
8510
8463
  /**
8511
8464
  * Scroll Padding Top
8512
8465
  * @see https://tailwindcss.com/docs/scroll-padding
8513
8466
  */
8514
8467
  "scroll-pt": [{
8515
- "scroll-pt": [spacing]
8468
+ "scroll-pt": getSpacingWithArbitrary()
8516
8469
  }],
8517
8470
  /**
8518
8471
  * Scroll Padding Right
8519
8472
  * @see https://tailwindcss.com/docs/scroll-padding
8520
8473
  */
8521
8474
  "scroll-pr": [{
8522
- "scroll-pr": [spacing]
8475
+ "scroll-pr": getSpacingWithArbitrary()
8523
8476
  }],
8524
8477
  /**
8525
8478
  * Scroll Padding Bottom
8526
8479
  * @see https://tailwindcss.com/docs/scroll-padding
8527
8480
  */
8528
8481
  "scroll-pb": [{
8529
- "scroll-pb": [spacing]
8482
+ "scroll-pb": getSpacingWithArbitrary()
8530
8483
  }],
8531
8484
  /**
8532
8485
  * Scroll Padding Left
8533
8486
  * @see https://tailwindcss.com/docs/scroll-padding
8534
8487
  */
8535
8488
  "scroll-pl": [{
8536
- "scroll-pl": [spacing]
8489
+ "scroll-pl": getSpacingWithArbitrary()
8537
8490
  }],
8538
8491
  /**
8539
8492
  * Scroll Snap Align
@@ -8796,8 +8749,7 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
8796
8749
  const map = mapRef.current;
8797
8750
  const changeMapProjection = () => {
8798
8751
  var _a;
8799
- if (!mapRef.current)
8800
- return;
8752
+ if (!mapRef.current) return;
8801
8753
  const map2 = mapRef.current;
8802
8754
  const currentProjection = (_a = map2.getProjection()) == null ? void 0 : _a.type;
8803
8755
  const newProjection = currentProjection === "mercator" ? "globe" : "mercator";
@@ -8806,28 +8758,24 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
8806
8758
  });
8807
8759
  };
8808
8760
  const zoomIn = () => {
8809
- if (!mapRef.current)
8810
- return;
8761
+ if (!mapRef.current) return;
8811
8762
  const map2 = mapRef.current;
8812
8763
  map2.zoomIn();
8813
8764
  return map2.getBounds();
8814
8765
  };
8815
8766
  const zoomOut = () => {
8816
- if (!mapRef.current)
8817
- return;
8767
+ if (!mapRef.current) return;
8818
8768
  const map2 = mapRef.current;
8819
8769
  map2.zoomOut();
8820
8770
  return map2.getBounds();
8821
8771
  };
8822
8772
  function getLayersByPattern(pattern) {
8823
- if (!mapRef.current)
8824
- return;
8773
+ if (!mapRef.current) return;
8825
8774
  const map2 = mapRef.current;
8826
8775
  return map2 == null ? void 0 : map2.getStyle().layers.filter((layer) => pattern.test(layer.id)).map((layer) => layer.id);
8827
8776
  }
8828
8777
  const handleToggle = (layerId) => {
8829
- if (!mapRef.current)
8830
- return;
8778
+ if (!mapRef.current) return;
8831
8779
  const map2 = mapRef.current;
8832
8780
  const layers = getLayersByPattern(new RegExp(layerId));
8833
8781
  layers == null ? void 0 : layers.forEach((id) => {
@@ -8955,7 +8903,7 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
8955
8903
  return control;
8956
8904
  }));
8957
8905
  };
8958
- const loadSvgImage = (color) => __async(void 0, null, function* () {
8906
+ const loadSvgImage = (color) => __async(null, null, function* () {
8959
8907
  let svgText = renderToStaticMarkup(
8960
8908
  /* @__PURE__ */ jsx48(MapPinIcon3, { className: "w-6 h-6" })
8961
8909
  );
@@ -8967,17 +8915,15 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
8967
8915
  yield img.decode();
8968
8916
  return img;
8969
8917
  });
8970
- const updatePinImage = (source) => __async(void 0, null, function* () {
8918
+ const updatePinImage = (source) => __async(null, null, function* () {
8971
8919
  const img = yield loadSvgImage(source.style.pin_color);
8972
8920
  const imgName = `${source.name}-pin`;
8973
- if (map == null ? void 0 : map.hasImage(imgName))
8974
- map == null ? void 0 : map.removeImage(imgName);
8921
+ if (map == null ? void 0 : map.hasImage(imgName)) map == null ? void 0 : map.removeImage(imgName);
8975
8922
  map == null ? void 0 : map.addImage(imgName, img);
8976
8923
  });
8977
8924
  const updateClusterColors = (source) => {
8978
8925
  const layerId = `${source.name}-cluster-circles`;
8979
- if (!(map == null ? void 0 : map.getLayer(layerId)))
8980
- return;
8926
+ if (!(map == null ? void 0 : map.getLayer(layerId))) return;
8981
8927
  const current = map == null ? void 0 : map.getPaintProperty(layerId, "circle-color");
8982
8928
  if (current !== source.style.cluster_color) {
8983
8929
  map == null ? void 0 : map.setPaintProperty(layerId, "circle-color", source.style.cluster_color);
@@ -9022,9 +8968,8 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
9022
8968
  }
9023
8969
  };
9024
8970
  const loadSourceData = () => {
9025
- if ((sourceData == null ? void 0 : sourceData.length) == 0)
9026
- return;
9027
- sourceData == null ? void 0 : sourceData.forEach((source) => __async(void 0, null, function* () {
8971
+ if ((sourceData == null ? void 0 : sourceData.length) == 0) return;
8972
+ sourceData == null ? void 0 : sourceData.forEach((source) => __async(null, null, function* () {
9028
8973
  const existing_data = map == null ? void 0 : map.getSource(source.name);
9029
8974
  if (!existing_data) {
9030
8975
  if (source.is_cluster) {
@@ -9148,12 +9093,9 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
9148
9093
  }));
9149
9094
  };
9150
9095
  useEffect21(() => {
9151
- if (typeof mapContainer === "function")
9152
- return;
9153
- if (!(mapContainer == null ? void 0 : mapContainer.current))
9154
- return;
9155
- if (!sourceData)
9156
- return;
9096
+ if (typeof mapContainer === "function") return;
9097
+ if (!(mapContainer == null ? void 0 : mapContainer.current)) return;
9098
+ if (!sourceData) return;
9157
9099
  const map2 = new maplibregl.Map({
9158
9100
  container: mapContainer == null ? void 0 : mapContainer.current,
9159
9101
  style: {
@@ -9186,7 +9128,7 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
9186
9128
  map2.scrollZoom.disable();
9187
9129
  mapRef.current.getContainer().addEventListener("mouseenter", () => map2.scrollZoom.enable());
9188
9130
  mapRef.current.getContainer().addEventListener("mouseleave", () => map2.scrollZoom.disable());
9189
- map2.on("load", () => __async(void 0, null, function* () {
9131
+ map2.on("load", () => __async(null, null, function* () {
9190
9132
  changeMapProjection();
9191
9133
  }));
9192
9134
  return () => {
@@ -9195,8 +9137,7 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
9195
9137
  };
9196
9138
  }, []);
9197
9139
  useEffect21(() => {
9198
- if (!map)
9199
- return;
9140
+ if (!map) return;
9200
9141
  const init = () => {
9201
9142
  loadBaseLayers();
9202
9143
  };
@@ -9211,16 +9152,14 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
9211
9152
  if (map.isStyleLoaded()) {
9212
9153
  init();
9213
9154
  map.on("zoomend", zoom);
9214
- } else
9215
- map.once("load", () => {
9216
- init();
9217
- map.on("zoomend", zoom);
9218
- });
9155
+ } else map.once("load", () => {
9156
+ init();
9157
+ map.on("zoomend", zoom);
9158
+ });
9219
9159
  }, [map]);
9220
9160
  useEffect21(() => {
9221
9161
  var _a, _b, _c;
9222
- if (!map || !sourceData)
9223
- return;
9162
+ if (!map || !sourceData) return;
9224
9163
  if (map.isStyleLoaded()) {
9225
9164
  loadSourceData();
9226
9165
  return;
@@ -9260,16 +9199,13 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
9260
9199
  };
9261
9200
  }, [sourceData]);
9262
9201
  useEffect21(() => {
9263
- if (!map || !sourceData)
9264
- return;
9202
+ if (!map || !sourceData) return;
9265
9203
  sourceData.forEach((source) => {
9266
9204
  const source_layer = map.getSource(source.name);
9267
- if (source_layer)
9268
- source_layer.setData(source.data);
9205
+ if (source_layer) source_layer.setData(source.data);
9269
9206
  });
9270
9207
  }, [sourceData]);
9271
- if (!sourceData)
9272
- return;
9208
+ if (!sourceData) return;
9273
9209
  return /* @__PURE__ */ jsxs35("div", { className: "relative", style: { width: "100%", height: "100%" }, children: [
9274
9210
  /* @__PURE__ */ jsx48("div", { ref: mapContainer, className: "w-full h-full" }),
9275
9211
  /* @__PURE__ */ jsx48(MapControlToolbar, { controls: mapControl, onToggleControl: (id) => toggleControl(id) })
@@ -9280,7 +9216,7 @@ var MapLibre = forwardRef5(({ baseLayers, customLayers, mapControls, sourceData,
9280
9216
  import { Suspense, lazy, useEffect as useEffect22, useState as useState18 } from "react";
9281
9217
  import { jsx as jsx49 } from "react/jsx-runtime";
9282
9218
  var MapComponent = lazy(
9283
- () => import("./GeoWikiMap-G2JPQNTZ.mjs").then((m) => ({ default: m.GeoWikiMap }))
9219
+ () => import("./GeoWikiMap-3QTU7AVR.mjs").then((m) => ({ default: m.GeoWikiMap }))
9284
9220
  );
9285
9221
  var ClientOnlyMap = ({ children }) => {
9286
9222
  const [isClient, setIsClient] = useState18(false);