@geowiki/core 0.16.9-dev.9 → 0.16.9

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
@@ -184,8 +184,6 @@ var QueryConstants = {
184
184
  GetTaskMultipleAnnotations: "GetTaskMultipleAnnotations",
185
185
  GetTaskSavedAnnotations: "GetTaskSavedAnnotations",
186
186
  DeleteTask: "DeleteTask",
187
- GetApiImage: "GetApiImage",
188
- GetCmsImage: "GetCmsImage",
189
187
  GetQuestionnaireForProject: "GetQuestionnaireForProject",
190
188
  GetTaskAnswers: "GetTaskAnswers",
191
189
  UploadTasks: "UploadTasks",
@@ -274,7 +272,7 @@ import { ProjectService } from "@geowiki/evoland-api-proxy";
274
272
  var useEvolandWmsLayers = () => {
275
273
  return useQuery2({
276
274
  queryKey: [QueryNames.GetAvailableWmsLayers],
277
- queryFn: () => __async(void 0, null, function* () {
275
+ queryFn: () => __async(null, null, function* () {
278
276
  const data = yield ProjectService.getAvailableLayersAvailablelayersGet();
279
277
  return data;
280
278
  })
@@ -306,7 +304,7 @@ import {
306
304
  var useAppConfig = () => {
307
305
  return useQuery3({
308
306
  queryKey: [QueryConstants.GetAppConfig],
309
- queryFn: () => __async(void 0, null, function* () {
307
+ queryFn: () => __async(null, null, function* () {
310
308
  const data = yield AbpApplicationConfigurationService.abpApplicationConfigurationGet();
311
309
  return data;
312
310
  }),
@@ -321,7 +319,7 @@ import { keepPreviousData, useQuery as useQuery4 } from "@tanstack/react-query";
321
319
  var useAudience = () => {
322
320
  return useQuery4({
323
321
  queryKey: [QueryNames.GetAudience],
324
- queryFn: () => __async(void 0, null, function* () {
322
+ queryFn: () => __async(null, null, function* () {
325
323
  const data = yield ResourceService.resourceGetAvailableAudience();
326
324
  return data;
327
325
  }),
@@ -337,7 +335,7 @@ import { useQuery as useQuery5 } from "@tanstack/react-query";
337
335
  var useCluster = (id) => {
338
336
  return useQuery5({
339
337
  queryKey: [QueryNames.Cluster, id],
340
- queryFn: () => __async(void 0, null, function* () {
338
+ queryFn: () => __async(null, null, function* () {
341
339
  const data = yield ClusterService.clusterGet(id);
342
340
  return data;
343
341
  })
@@ -352,7 +350,7 @@ import { useQuery as useQuery6 } from "@tanstack/react-query";
352
350
  var useClusterFilterSettings = () => {
353
351
  return useQuery6({
354
352
  queryKey: [QueryNames.GetClusterFilterSettings],
355
- queryFn: () => __async(void 0, null, function* () {
353
+ queryFn: () => __async(null, null, function* () {
356
354
  var req = yield SettingsService.settingsGetSiteSettings("ClusterFilter");
357
355
  return req;
358
356
  })
@@ -361,7 +359,7 @@ var useClusterFilterSettings = () => {
361
359
  var useConfigSettings = () => {
362
360
  return useQuery6({
363
361
  queryKey: [QueryNames.GetConfig],
364
- queryFn: () => __async(void 0, null, function* () {
362
+ queryFn: () => __async(null, null, function* () {
365
363
  var req = yield SettingsService.settingsGetSiteSettings("Config");
366
364
  return req;
367
365
  })
@@ -374,7 +372,7 @@ import { useQuery as useQuery7 } from "@tanstack/react-query";
374
372
  var useClusterMapInfo = () => {
375
373
  return useQuery7({
376
374
  queryKey: [QueryNames.GetClusterForMap],
377
- queryFn: () => __async(void 0, null, function* () {
375
+ queryFn: () => __async(null, null, function* () {
378
376
  const data = yield ClusterService2.clusterGetMapInfo();
379
377
  return data;
380
378
  })
@@ -387,7 +385,7 @@ import { keepPreviousData as keepPreviousData2, useQuery as useQuery8 } from "@t
387
385
  var useClusters = (fetchAll = false, sort = "", skip = 0, take = 100) => {
388
386
  return useQuery8({
389
387
  queryKey: [QueryNames.Clusters, skip, take],
390
- queryFn: () => __async(void 0, null, function* () {
388
+ queryFn: () => __async(null, null, function* () {
391
389
  if (fetchAll) {
392
390
  const data = yield ClusterService3.clusterGetAllClusters(
393
391
  sort,
@@ -406,7 +404,7 @@ var useClusters = (fetchAll = false, sort = "", skip = 0, take = 100) => {
406
404
  var useAllNewsFromAllClusters = (sort = "", skip = 0, take = 100) => {
407
405
  return useQuery8({
408
406
  queryKey: [QueryNames.GetFarmerClusterNews, sort, skip, take],
409
- queryFn: () => __async(void 0, null, function* () {
407
+ queryFn: () => __async(null, null, function* () {
410
408
  const data = yield ClusterService3.clusterGetAllNewsFromAllClusters(
411
409
  sort,
412
410
  skip,
@@ -419,7 +417,7 @@ var useAllNewsFromAllClusters = (sort = "", skip = 0, take = 100) => {
419
417
 
420
418
  // src/hooks/useHosts.ts
421
419
  import { useQuery as useQuery9 } from "@tanstack/react-query";
422
- var getHosts = () => __async(void 0, null, function* () {
420
+ var getHosts = () => __async(null, null, function* () {
423
421
  const response = yield fetch("/api/hosts");
424
422
  if (!response.ok) {
425
423
  throw new Error("Failed to fetch hosts");
@@ -459,7 +457,7 @@ import { ClusterService as ClusterService4 } from "@geowiki/api-proxy";
459
457
  var useCountries = (fetchAll = false) => {
460
458
  return useQuery10({
461
459
  queryKey: [QueryNames.GetCountries, fetchAll],
462
- queryFn: () => __async(void 0, null, function* () {
460
+ queryFn: () => __async(null, null, function* () {
463
461
  const data = yield ClusterService4.clusterGetCountries(fetchAll);
464
462
  data.sort((a, b) => {
465
463
  if (!a.country || !b.country) {
@@ -510,7 +508,7 @@ var useFileUrl = () => {
510
508
  var useFileUpload = (formData) => {
511
509
  return useQuery11({
512
510
  queryKey: [QueryNames.FileUpload, formData],
513
- queryFn: () => __async(void 0, null, function* () {
511
+ queryFn: () => __async(null, null, function* () {
514
512
  const data = yield FileService.fileUpload(formData);
515
513
  return data;
516
514
  })
@@ -533,7 +531,7 @@ var useFilterClusters = (filter) => {
533
531
  filter.mainAgriculturalAreas,
534
532
  filter.sort
535
533
  ],
536
- queryFn: () => __async(void 0, null, function* () {
534
+ queryFn: () => __async(null, null, function* () {
537
535
  const data = yield ClusterService5.clusterFilter(filter);
538
536
  return data;
539
537
  })
@@ -546,7 +544,7 @@ import { useQuery as useQuery13 } from "@tanstack/react-query";
546
544
  var useGeoWikiSettings = () => {
547
545
  return useQuery13({
548
546
  queryKey: [QueryNames.GetAppSettings],
549
- queryFn: () => __async(void 0, null, function* () {
547
+ queryFn: () => __async(null, null, function* () {
550
548
  var req = yield SettingsService2.settingsGetSiteSettings("GeoWiki");
551
549
  return req;
552
550
  })
@@ -565,7 +563,7 @@ import { useQuery as useQuery14 } from "@tanstack/react-query";
565
563
  var useIntroTourSettings = () => {
566
564
  return useQuery14({
567
565
  queryKey: [QueryNames.GetIntroTour],
568
- queryFn: () => __async(void 0, null, function* () {
566
+ queryFn: () => __async(null, null, function* () {
569
567
  var req = yield SettingsService3.settingsGetSiteSettings("IntroTour");
570
568
  return req;
571
569
  })
@@ -602,7 +600,7 @@ import { keepPreviousData as keepPreviousData3, useQuery as useQuery15 } from "@
602
600
  var useLanguages = () => {
603
601
  return useQuery15({
604
602
  queryKey: [QueryNames.GetLanguages],
605
- queryFn: () => __async(void 0, null, function* () {
603
+ queryFn: () => __async(null, null, function* () {
606
604
  const data = yield ResourceService2.resourceGetAvailableLanguages();
607
605
  return data;
608
606
  }),
@@ -617,7 +615,7 @@ import { useQuery as useQuery16 } from "@tanstack/react-query";
617
615
  var useLayerInfo = (url, layerName) => {
618
616
  return useQuery16({
619
617
  queryKey: [QueryNames.GetUseLayerInfo, url, layerName],
620
- queryFn: () => __async(void 0, null, function* () {
618
+ queryFn: () => __async(null, null, function* () {
621
619
  var legendUrl = url + "?service=WMS&version=1.1.0&request=GetLegendGraphic&layer=" + layerName + "&format=application/json";
622
620
  var res = yield fetch(legendUrl);
623
621
  var data = yield res.json();
@@ -642,7 +640,7 @@ function useLocation() {
642
640
  var useLocationsForProject = (locationreq) => {
643
641
  return useQuery17({
644
642
  queryKey: [QueryConstants.GetLocations, locationreq],
645
- queryFn: () => __async(void 0, null, function* () {
643
+ queryFn: () => __async(null, null, function* () {
646
644
  return ProjectService2.searchLocationsLocationsPost(locationreq);
647
645
  })
648
646
  });
@@ -650,11 +648,13 @@ var useLocationsForProject = (locationreq) => {
650
648
  var useLocationBulkUpload = (uploadLocations, file, project_id, group_id) => {
651
649
  return useQuery17({
652
650
  queryKey: [QueryConstants.UploadLocations, uploadLocations, file, group_id],
653
- queryFn: () => __async(void 0, null, function* () {
651
+ queryFn: () => __async(null, null, function* () {
654
652
  try {
655
653
  const res = yield LocationService.bulkUploadLocationsUploadlocationsPost({ file, project_id, group_id });
656
654
  return res;
657
655
  } catch (error) {
656
+ console.log(error);
657
+ console.log(error.body);
658
658
  return { data: error.body, isLoading: false, error: true };
659
659
  }
660
660
  }),
@@ -664,7 +664,7 @@ var useLocationBulkUpload = (uploadLocations, file, project_id, group_id) => {
664
664
  var useTaskBulkUpload = (uploadTasks, file, project_id) => {
665
665
  return useQuery17({
666
666
  queryKey: [QueryConstants.UploadTasks, uploadTasks, file],
667
- queryFn: () => __async(void 0, null, function* () {
667
+ queryFn: () => __async(null, null, function* () {
668
668
  try {
669
669
  return LocationService.uploadLocationTaskUploadlocationtaskPost({ file, project_id });
670
670
  } catch (error) {
@@ -677,7 +677,7 @@ var useTaskBulkUpload = (uploadTasks, file, project_id) => {
677
677
  var useReviewTaskBulkUpload = (uploadReviewTasks, file, project_id) => {
678
678
  return useQuery17({
679
679
  queryKey: [QueryConstants.UploadReviewTasks, uploadReviewTasks, file],
680
- queryFn: () => __async(void 0, null, function* () {
680
+ queryFn: () => __async(null, null, function* () {
681
681
  try {
682
682
  return LocationService.bulkUploadReviewTasksUploadreviewtasksPost({ file, project_id });
683
683
  } catch (error) {
@@ -710,7 +710,7 @@ import { NewsService } from "@geowiki/api-proxy";
710
710
  var useNews = (lang = "all", skip = 0, take = 100) => {
711
711
  return useQuery19({
712
712
  queryKey: [QueryNames.GetNews, lang, skip, take],
713
- queryFn: () => __async(void 0, null, function* () {
713
+ queryFn: () => __async(null, null, function* () {
714
714
  if (lang == "all") {
715
715
  const res2 = yield NewsService.newsGetExternalNews("", skip, take);
716
716
  return res2.items;
@@ -793,7 +793,7 @@ import { useQuery as useQuery20 } from "@tanstack/react-query";
793
793
  var usePublicationSettings = () => {
794
794
  return useQuery20({
795
795
  queryKey: [QueryNames.GetPublicationSettings],
796
- queryFn: () => __async(void 0, null, function* () {
796
+ queryFn: () => __async(null, null, function* () {
797
797
  var req = yield SettingsService5.settingsGetSiteSettings("Publication");
798
798
  return req;
799
799
  })
@@ -806,7 +806,7 @@ import { keepPreviousData as keepPreviousData5, useQuery as useQuery21 } from "@
806
806
  var useResource = (search = "", sort = "", skip = 0, take = 100) => {
807
807
  return useQuery21({
808
808
  queryKey: [QueryNames.GetResource, search, sort, skip, take],
809
- queryFn: () => __async(void 0, null, function* () {
809
+ queryFn: () => __async(null, null, function* () {
810
810
  if (search !== "") {
811
811
  const data2 = yield ResourceService3.resourceSearch(search);
812
812
  return data2;
@@ -838,7 +838,7 @@ var useResourceFilter = (filter) => {
838
838
  filter.sorting,
839
839
  filter.isFramework
840
840
  ],
841
- queryFn: () => __async(void 0, null, function* () {
841
+ queryFn: () => __async(null, null, function* () {
842
842
  const data = yield ResourceService4.resourceFilter(filter);
843
843
  return data;
844
844
  })
@@ -851,7 +851,7 @@ import { useQuery as useQuery23 } from "@tanstack/react-query";
851
851
  var useResourceType = () => {
852
852
  return useQuery23({
853
853
  queryKey: [QueryNames.GetResourceType],
854
- queryFn: () => __async(void 0, null, function* () {
854
+ queryFn: () => __async(null, null, function* () {
855
855
  var data = yield ResourceService5.resourceGetAvailableResourceType();
856
856
  return data;
857
857
  })
@@ -864,7 +864,7 @@ import { keepPreviousData as keepPreviousData6, useQuery as useQuery24 } from "@
864
864
  var useTopic = () => {
865
865
  return useQuery24({
866
866
  queryKey: [QueryNames.GetTopic],
867
- queryFn: () => __async(void 0, null, function* () {
867
+ queryFn: () => __async(null, null, function* () {
868
868
  var data = yield ResourceService6.resourceGetAvailableTopic();
869
869
  return data;
870
870
  }),
@@ -880,7 +880,7 @@ import { ProfileService } from "@geowiki/api-proxy";
880
880
  var useUserProfileGet = () => {
881
881
  return useQuery25({
882
882
  queryKey: [QueryNames.GetUserProfile],
883
- queryFn: () => __async(void 0, null, function* () {
883
+ queryFn: () => __async(null, null, function* () {
884
884
  var data = yield ProfileService.profileGet();
885
885
  return data;
886
886
  })
@@ -893,7 +893,7 @@ import { UserService } from "@geowiki/api-proxy";
893
893
  var useUsers = (pageIndex, pageSize, filter, sorting) => {
894
894
  return useQuery26({
895
895
  queryKey: [QueryConstants.GetUsers, pageIndex, pageSize, filter, sorting],
896
- queryFn: () => __async(void 0, null, function* () {
896
+ queryFn: () => __async(null, null, function* () {
897
897
  let skip = 0;
898
898
  if (pageIndex > 0) {
899
899
  skip = pageIndex * pageSize;
@@ -913,7 +913,7 @@ var useUsers = (pageIndex, pageSize, filter, sorting) => {
913
913
  import React from "react";
914
914
  function useRenderInfo(name = "Unknown") {
915
915
  const count = React.useRef(0);
916
- const lastRender = React.useRef();
916
+ const lastRender = React.useRef(void 0);
917
917
  const now = Date.now();
918
918
  count.current++;
919
919
  React.useEffect(() => {
@@ -937,7 +937,7 @@ import { useQuery as useQuery27 } from "@tanstack/react-query";
937
937
  var useDefaultSettings = () => {
938
938
  return useQuery27({
939
939
  queryKey: [QueryNames.DefaultSettings],
940
- queryFn: () => __async(void 0, null, function* () {
940
+ queryFn: () => __async(null, null, function* () {
941
941
  const req = yield SettingsService6.settingsGetDefaultSiteSettings();
942
942
  return req;
943
943
  })
@@ -956,7 +956,7 @@ import { useQuery as useQuery28 } from "@tanstack/react-query";
956
956
  var useEmailing = () => {
957
957
  return useQuery28({
958
958
  queryKey: [QueryConstants.GetEmailing],
959
- queryFn: () => __async(void 0, null, function* () {
959
+ queryFn: () => __async(null, null, function* () {
960
960
  const data = yield EmailSettingsService.emailSettingsGet();
961
961
  return data;
962
962
  })
@@ -986,7 +986,7 @@ import { useQuery as useQuery29 } from "@tanstack/react-query";
986
986
  var useFeatures = (providerName, providerKey) => {
987
987
  return useQuery29({
988
988
  queryKey: [QueryConstants.GetFeatures, providerName, providerKey],
989
- queryFn: () => __async(void 0, null, function* () {
989
+ queryFn: () => __async(null, null, function* () {
990
990
  const data = yield FeaturesService.featuresGet(providerName, providerKey);
991
991
  return data;
992
992
  })
@@ -999,7 +999,7 @@ import { UserService as UserService2 } from "@geowiki/api-proxy";
999
999
  var useAssignableRoles = () => {
1000
1000
  return useQuery30({
1001
1001
  queryKey: [QueryConstants.GetAssignableRoles],
1002
- queryFn: () => __async(void 0, null, function* () {
1002
+ queryFn: () => __async(null, null, function* () {
1003
1003
  const data = yield UserService2.userGetAssignableRoles();
1004
1004
  return data;
1005
1005
  })
@@ -1012,7 +1012,7 @@ import { useQuery as useQuery31 } from "@tanstack/react-query";
1012
1012
  var useUserRoles = ({ userId }) => {
1013
1013
  return useQuery31({
1014
1014
  queryKey: [QueryConstants.GetUserRoles, userId],
1015
- queryFn: () => __async(void 0, null, function* () {
1015
+ queryFn: () => __async(null, null, function* () {
1016
1016
  const data = yield UserService3.userGetRoles(userId);
1017
1017
  return data;
1018
1018
  })
@@ -1027,7 +1027,7 @@ import { useQuery as useQuery32 } from "@tanstack/react-query";
1027
1027
  var usePermissions = (providerName, providerKey) => {
1028
1028
  return useQuery32({
1029
1029
  queryKey: [QueryConstants.GetPermissions, providerName, providerKey],
1030
- queryFn: () => __async(void 0, null, function* () {
1030
+ queryFn: () => __async(null, null, function* () {
1031
1031
  const data = yield PermissionsService.permissionsGet(
1032
1032
  providerName,
1033
1033
  providerKey
@@ -1043,7 +1043,7 @@ import { RoleService } from "@geowiki/api-proxy";
1043
1043
  var useRoles = (pageIndex, pageSize, filter, sorting) => {
1044
1044
  return useQuery33({
1045
1045
  queryKey: [QueryConstants.GetRoles, pageIndex, pageSize, filter, sorting],
1046
- queryFn: () => __async(void 0, null, function* () {
1046
+ queryFn: () => __async(null, null, function* () {
1047
1047
  let skip = 0;
1048
1048
  if (pageIndex > 0) {
1049
1049
  skip = pageIndex * pageSize;
@@ -1065,7 +1065,7 @@ import { useQuery as useQuery34 } from "@tanstack/react-query";
1065
1065
  var useProfile = () => {
1066
1066
  return useQuery34({
1067
1067
  queryKey: [QueryConstants.GetProfile],
1068
- queryFn: () => __async(void 0, null, function* () {
1068
+ queryFn: () => __async(null, null, function* () {
1069
1069
  const data = yield ProfileService2.profileGet();
1070
1070
  return data;
1071
1071
  })
@@ -1078,7 +1078,7 @@ import { TenantService } from "@geowiki/api-proxy";
1078
1078
  var useTenants = (pageIndex, pageSize, filter, sorting) => {
1079
1079
  return useQuery35({
1080
1080
  queryKey: [QueryConstants.GetTenants, pageIndex, pageSize, filter, sorting],
1081
- queryFn: () => __async(void 0, null, function* () {
1081
+ queryFn: () => __async(null, null, function* () {
1082
1082
  let skip = 0;
1083
1083
  if (pageIndex > 0) {
1084
1084
  skip = pageIndex * pageSize;
@@ -1100,7 +1100,7 @@ import { ProjectService as ProjectService3 } from "@geowiki/evoland-api-proxy";
1100
1100
  var useEvolandLabels = (projectId) => {
1101
1101
  return useQuery36({
1102
1102
  queryKey: [QueryNames.GetEvolandLabels, projectId],
1103
- queryFn: () => __async(void 0, null, function* () {
1103
+ queryFn: () => __async(null, null, function* () {
1104
1104
  const data = yield ProjectService3.getLabelsLabelsProjectIdProjectIdGet(projectId);
1105
1105
  return data;
1106
1106
  })
@@ -1114,7 +1114,7 @@ var useLookUp = (ServiceName, params, LookUpsClusterCountries, LookUpsClusterAct
1114
1114
  let result;
1115
1115
  return useQuery37({
1116
1116
  queryKey: [QueryNames.GetLookUp, ServiceName, params],
1117
- queryFn: () => __async(void 0, null, function* () {
1117
+ queryFn: () => __async(null, null, function* () {
1118
1118
  switch (ServiceName) {
1119
1119
  case LookUpsClusterCountries: {
1120
1120
  result = yield ClusterService6.clusterGetCountries(params);
@@ -1154,7 +1154,7 @@ import {
1154
1154
  var useProjects = (fetch2, start = 0, amount = 9) => {
1155
1155
  return useQuery38({
1156
1156
  queryKey: [QueryConstants.GetProjects, fetch2, start, amount],
1157
- queryFn: () => __async(void 0, null, function* () {
1157
+ queryFn: () => __async(null, null, function* () {
1158
1158
  if (fetch2)
1159
1159
  return ProjectService4.listProjectsListprojectsStartidxStartidxAmountAmountGet(
1160
1160
  start,
@@ -1166,7 +1166,7 @@ var useProjects = (fetch2, start = 0, amount = 9) => {
1166
1166
  var useProjectDetails = (projectId, update) => {
1167
1167
  return useQuery38({
1168
1168
  queryKey: [QueryConstants.GetProjectDetails, projectId, update],
1169
- queryFn: () => __async(void 0, null, function* () {
1169
+ queryFn: () => __async(null, null, function* () {
1170
1170
  return ProjectService4.projectInfoProjectinfoProjectIdProjectIdGet(
1171
1171
  projectId
1172
1172
  );
@@ -1176,7 +1176,7 @@ var useProjectDetails = (projectId, update) => {
1176
1176
  var useTasksPerLocation = (data) => {
1177
1177
  return useQuery38({
1178
1178
  queryKey: [QueryConstants.GetTasksPerLocation, data],
1179
- queryFn: () => __async(void 0, null, function* () {
1179
+ queryFn: () => __async(null, null, function* () {
1180
1180
  return ProjectService4.getTasksTasksGet(
1181
1181
  data.locationProjectId,
1182
1182
  data.taskForReview,
@@ -1204,7 +1204,7 @@ var useTasksPerLocation = (data) => {
1204
1204
  var useRandomTasksPerLocation = (data) => {
1205
1205
  return useQuery38({
1206
1206
  queryKey: [QueryConstants.GetTasksPerLocation, data],
1207
- queryFn: () => __async(void 0, null, function* () {
1207
+ queryFn: () => __async(null, null, function* () {
1208
1208
  return ProjectService4.getRandomTaskRandomtaskGet(
1209
1209
  data.locationProjectId,
1210
1210
  data.taskForReview,
@@ -1231,7 +1231,7 @@ var useRandomTasksPerLocation = (data) => {
1231
1231
  var useTaskComments = (taskIds) => {
1232
1232
  return useQuery38({
1233
1233
  queryKey: [QueryConstants.GetTaskComment, taskIds],
1234
- queryFn: () => __async(void 0, null, function* () {
1234
+ queryFn: () => __async(null, null, function* () {
1235
1235
  return TaskService.taskLatestComomentsTasklatestcommentPost({
1236
1236
  task_ids: taskIds
1237
1237
  });
@@ -1241,7 +1241,7 @@ var useTaskComments = (taskIds) => {
1241
1241
  var useGroupsInProject = (projectId, updateGroup) => {
1242
1242
  return useQuery38({
1243
1243
  queryKey: [QueryConstants.GetGroupsInProject, projectId, updateGroup],
1244
- queryFn: () => __async(void 0, null, function* () {
1244
+ queryFn: () => __async(null, null, function* () {
1245
1245
  return ProjectService4.getProjectGroupsProjectgroupsProjectIdProjectIdGet(
1246
1246
  projectId
1247
1247
  );
@@ -1251,7 +1251,7 @@ var useGroupsInProject = (projectId, updateGroup) => {
1251
1251
  var useProjectUsers = (projectId) => {
1252
1252
  return useQuery38({
1253
1253
  queryKey: [QueryConstants.GetProjectUsers, projectId],
1254
- queryFn: () => __async(void 0, null, function* () {
1254
+ queryFn: () => __async(null, null, function* () {
1255
1255
  return ProjectService4.projectAllUsersProjectusersProjectIdProjectIdGet(
1256
1256
  projectId
1257
1257
  );
@@ -1261,7 +1261,7 @@ var useProjectUsers = (projectId) => {
1261
1261
  var useTaskStatusList = () => {
1262
1262
  return useQuery38({
1263
1263
  queryKey: [QueryConstants.GetTaskStatusList],
1264
- queryFn: () => __async(void 0, null, function* () {
1264
+ queryFn: () => __async(null, null, function* () {
1265
1265
  return TaskService.getTaskStatusesTaskstatusesGet();
1266
1266
  })
1267
1267
  });
@@ -1274,7 +1274,7 @@ var useUpdateActiveGroupInProject = (projectId, groupId, update) => {
1274
1274
  groupId,
1275
1275
  update
1276
1276
  ],
1277
- queryFn: () => __async(void 0, null, function* () {
1277
+ queryFn: () => __async(null, null, function* () {
1278
1278
  if (update)
1279
1279
  return ProjectService4.selectProjectGroupProjectselectgroupPost({
1280
1280
  project_id: projectId,
@@ -1286,7 +1286,7 @@ var useUpdateActiveGroupInProject = (projectId, groupId, update) => {
1286
1286
  var useTaskAnnotation = (taskId) => {
1287
1287
  return useQuery38({
1288
1288
  queryKey: [QueryConstants.GetTaskAnnotation, taskId],
1289
- queryFn: () => __async(void 0, null, function* () {
1289
+ queryFn: () => __async(null, null, function* () {
1290
1290
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1291
1291
  return TaskService.getTaskAnnotationAssetTaskannotationTaskIdTaskIdGet(
1292
1292
  taskId
@@ -1297,7 +1297,7 @@ var useTaskAnnotation = (taskId) => {
1297
1297
  var useTaskMultipleAnnotations = (taskId) => {
1298
1298
  return useQuery38({
1299
1299
  queryKey: [QueryConstants.GetTaskMultipleAnnotations, taskId],
1300
- queryFn: () => __async(void 0, null, function* () {
1300
+ queryFn: () => __async(null, null, function* () {
1301
1301
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1302
1302
  return TaskService.getTaskAnnotationAssetsTaskannotationsTaskIdTaskIdGet(
1303
1303
  taskId
@@ -1308,7 +1308,7 @@ var useTaskMultipleAnnotations = (taskId) => {
1308
1308
  var useTaskSavedAnnotations = (taskId) => {
1309
1309
  return useQuery38({
1310
1310
  queryKey: [QueryConstants.GetTaskSavedAnnotations, taskId],
1311
- queryFn: () => __async(void 0, null, function* () {
1311
+ queryFn: () => __async(null, null, function* () {
1312
1312
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1313
1313
  return TaskService.getSavedAnnotationGetsavedannotationTaskIdTaskIdGet(
1314
1314
  taskId
@@ -1319,7 +1319,7 @@ var useTaskSavedAnnotations = (taskId) => {
1319
1319
  var useTaskDelete = (taskId, projectId, deleteTask) => {
1320
1320
  return useQuery38({
1321
1321
  queryKey: [QueryConstants.DeleteTask, taskId, projectId, deleteTask],
1322
- queryFn: () => __async(void 0, null, function* () {
1322
+ queryFn: () => __async(null, null, function* () {
1323
1323
  if (taskId !== null && taskId !== void 0 && taskId !== 0 && deleteTask === true)
1324
1324
  return TaskService.deleteTaskDeletetaskPost({
1325
1325
  project_id: projectId,
@@ -1337,7 +1337,7 @@ var useProjectStatisticsByUser = (projectId, startDate, endDate, filterUserId) =
1337
1337
  endDate,
1338
1338
  filterUserId
1339
1339
  ],
1340
- queryFn: () => __async(void 0, null, function* () {
1340
+ queryFn: () => __async(null, null, function* () {
1341
1341
  return StatisticService.getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateFilterUserIdFilterUserIdGet(
1342
1342
  projectId,
1343
1343
  endDate,
@@ -1356,7 +1356,7 @@ var useContractStatisticsByUser = (projectId, startDate, endDate, filterUserId)
1356
1356
  endDate,
1357
1357
  filterUserId
1358
1358
  ],
1359
- queryFn: () => __async(void 0, null, function* () {
1359
+ queryFn: () => __async(null, null, function* () {
1360
1360
  return StatisticService.getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateFilterUserIdFilterUserIdGet(
1361
1361
  projectId,
1362
1362
  endDate,
@@ -1375,7 +1375,7 @@ var useLatestTaskOnLocation = (locationId, projectId, referenceDate) => {
1375
1375
  projectId,
1376
1376
  referenceDate
1377
1377
  ],
1378
- queryFn: () => __async(void 0, null, function* () {
1378
+ queryFn: () => __async(null, null, function* () {
1379
1379
  return ProjectService4.locationLatestTaskLocationtaskLocationIdLocationIdProjectIdProjectIdReferenceDateReferenceDateGet(
1380
1380
  locationId,
1381
1381
  projectId,
@@ -1387,7 +1387,7 @@ var useLatestTaskOnLocation = (locationId, projectId, referenceDate) => {
1387
1387
  var useAssignProjectToUser = (userRoleRequest, update) => {
1388
1388
  return useQuery38({
1389
1389
  queryKey: [QueryConstants.GetProjectDetails, userRoleRequest, update],
1390
- queryFn: () => __async(void 0, null, function* () {
1390
+ queryFn: () => __async(null, null, function* () {
1391
1391
  if (update)
1392
1392
  return ProjectService4.setUserRoleSetuserrolePost(userRoleRequest);
1393
1393
  }),
@@ -1397,7 +1397,7 @@ var useAssignProjectToUser = (userRoleRequest, update) => {
1397
1397
  var useGetUserProject = (user_id, fetchData) => {
1398
1398
  return useQuery38({
1399
1399
  queryKey: [QueryConstants.GetUserProject, user_id, fetchData],
1400
- queryFn: () => __async(void 0, null, function* () {
1400
+ queryFn: () => __async(null, null, function* () {
1401
1401
  if (fetchData)
1402
1402
  return ProjectService4.getUserRoleProjectGetuserroleprojectUserIdUserIdGet(
1403
1403
  user_id
@@ -1408,7 +1408,7 @@ var useGetUserProject = (user_id, fetchData) => {
1408
1408
  var useUpdateUserDetail = (userDetailRequest, update) => {
1409
1409
  return useQuery38({
1410
1410
  queryKey: [QueryConstants.SetUserDetail, userDetailRequest, update],
1411
- queryFn: () => __async(void 0, null, function* () {
1411
+ queryFn: () => __async(null, null, function* () {
1412
1412
  if (update)
1413
1413
  return ProjectService4.setUserDetailSetuserdetailPost(userDetailRequest);
1414
1414
  })
@@ -1422,7 +1422,7 @@ var useProjectsPointsDownload = (projectId, download, userRole) => {
1422
1422
  download,
1423
1423
  userRole
1424
1424
  ],
1425
- queryFn: () => __async(void 0, null, function* () {
1425
+ queryFn: () => __async(null, null, function* () {
1426
1426
  if (userRole == "admin" && download)
1427
1427
  return ProjectService4.getLocationsSummaryLocationssummaryProjectIdProjectIdGet(
1428
1428
  projectId
@@ -1433,7 +1433,7 @@ var useProjectsPointsDownload = (projectId, download, userRole) => {
1433
1433
  var useQuestionnaire = (projectId) => {
1434
1434
  return useQuery38({
1435
1435
  queryKey: [QueryConstants.GetQuestionnaireForProject, projectId],
1436
- queryFn: () => __async(void 0, null, function* () {
1436
+ queryFn: () => __async(null, null, function* () {
1437
1437
  return QuestionService.getProjectQuestionsAnswersQuestionsAnswersProjectIdProjectIdGet(
1438
1438
  projectId
1439
1439
  );
@@ -1443,7 +1443,7 @@ var useQuestionnaire = (projectId) => {
1443
1443
  var useTaskAnswers = (taskId) => {
1444
1444
  return useQuery38({
1445
1445
  queryKey: [QueryConstants.GetTaskAnswers, taskId],
1446
- queryFn: () => __async(void 0, null, function* () {
1446
+ queryFn: () => __async(null, null, function* () {
1447
1447
  return TaskService.getTaskAnswersTaskanswersTaskIdTaskIdGet(taskId);
1448
1448
  })
1449
1449
  });
@@ -1451,7 +1451,7 @@ var useTaskAnswers = (taskId) => {
1451
1451
  var useProjectResultSet = (download, projectId, is_geo_json) => {
1452
1452
  return useQuery38({
1453
1453
  queryKey: [QueryConstants.GetProjectResultSet, download, projectId, is_geo_json],
1454
- queryFn: () => __async(void 0, null, function* () {
1454
+ queryFn: () => __async(null, null, function* () {
1455
1455
  return ProjectService4.projectResultSetProjectresultsetProjectIdProjectIdIsGeoJsonIsGeoJsonGet(projectId, is_geo_json);
1456
1456
  }),
1457
1457
  enabled: !!download && !!projectId
@@ -1459,38 +1459,30 @@ var useProjectResultSet = (download, projectId, is_geo_json) => {
1459
1459
  };
1460
1460
 
1461
1461
  // src/hooks/useApiImage.tsx
1462
- import { useQuery as useQuery39 } from "@tanstack/react-query";
1462
+ var NO_IMAGE_PLACEHOLDER = "/assets/farmer-cluster/no-image-available.png";
1463
+ var EMPTY_GUID = "00000000-0000-0000-0000-000000000000";
1463
1464
  var useApiImage = (imageId) => {
1464
- return useQuery39({
1465
- queryKey: [QueryConstants.GetApiImage, imageId],
1466
- queryFn: () => __async(void 0, null, function* () {
1467
- const res = yield fetch(`/api/api-image/${imageId}`);
1468
- const data = yield res.json();
1469
- return data.fileUrl;
1470
- })
1471
- });
1465
+ if (!imageId || imageId === EMPTY_GUID) return NO_IMAGE_PLACEHOLDER;
1466
+ const { apiUrl, tenantId } = config_default.getState();
1467
+ const params = tenantId ? `__tenant=${tenantId}&id=${imageId}` : `id=${imageId}`;
1468
+ return `${apiUrl}/api/app/file/view?${params}`;
1472
1469
  };
1473
1470
 
1474
1471
  // src/hooks/useCmsImage.tsx
1475
- import { useQuery as useQuery40 } from "@tanstack/react-query";
1472
+ var NO_IMAGE_PLACEHOLDER2 = "/assets/farmer-cluster/no-image-available.png";
1476
1473
  var useCmsImage = (imageId) => {
1477
- return useQuery40({
1478
- queryKey: [QueryConstants.GetCmsImage, imageId],
1479
- queryFn: () => __async(void 0, null, function* () {
1480
- const res = yield fetch(`/api/cms-image/${imageId}`);
1481
- const data = yield res.json();
1482
- return data.fileUrl;
1483
- })
1484
- });
1474
+ const cmsUrl = useCmsUrl();
1475
+ if (!imageId) return NO_IMAGE_PLACEHOLDER2;
1476
+ return `${cmsUrl}/media/${imageId}`;
1485
1477
  };
1486
1478
 
1487
1479
  // src/hooks/useClusterGetJoinRequests.ts
1488
1480
  import { ClusterService as ClusterService7 } from "@geowiki/api-proxy";
1489
- import { useQuery as useQuery41 } from "@tanstack/react-query";
1481
+ import { useQuery as useQuery39 } from "@tanstack/react-query";
1490
1482
  var useClusterGetJoinRequests = (clusterId) => {
1491
- return useQuery41({
1483
+ return useQuery39({
1492
1484
  queryKey: [QueryNames.JoinRequests, clusterId],
1493
- queryFn: () => __async(void 0, null, function* () {
1485
+ queryFn: () => __async(null, null, function* () {
1494
1486
  const data = yield ClusterService7.clusterGetJoinRequests(clusterId);
1495
1487
  return data;
1496
1488
  })
@@ -1499,11 +1491,11 @@ var useClusterGetJoinRequests = (clusterId) => {
1499
1491
 
1500
1492
  // src/hooks/useClusterGetNews.ts
1501
1493
  import { ClusterService as ClusterService8 } from "@geowiki/api-proxy";
1502
- import { useQuery as useQuery42 } from "@tanstack/react-query";
1494
+ import { useQuery as useQuery40 } from "@tanstack/react-query";
1503
1495
  var useClusterGetNews = (clusterId, newsId) => {
1504
- return useQuery42({
1496
+ return useQuery40({
1505
1497
  queryKey: [QueryNames.ClusterGetNews, clusterId, newsId],
1506
- queryFn: () => __async(void 0, null, function* () {
1498
+ queryFn: () => __async(null, null, function* () {
1507
1499
  const data = yield ClusterService8.clusterGetNews(clusterId, newsId);
1508
1500
  return data;
1509
1501
  })
@@ -1512,11 +1504,11 @@ var useClusterGetNews = (clusterId, newsId) => {
1512
1504
 
1513
1505
  // src/hooks/useClusterGetNewsNextPreviousStatus.ts
1514
1506
  import { ClusterService as ClusterService9 } from "@geowiki/api-proxy";
1515
- import { useQuery as useQuery43 } from "@tanstack/react-query";
1507
+ import { useQuery as useQuery41 } from "@tanstack/react-query";
1516
1508
  var useClusterGetNewsNextPreviousStatus = (clusterId, newsId) => {
1517
- return useQuery43({
1509
+ return useQuery41({
1518
1510
  queryKey: [QueryNames.ClusterNewsNextPrevious, clusterId, newsId],
1519
- queryFn: () => __async(void 0, null, function* () {
1511
+ queryFn: () => __async(null, null, function* () {
1520
1512
  const data = yield ClusterService9.clusterGetNewsNextPreviousStatus(
1521
1513
  clusterId,
1522
1514
  newsId
@@ -1528,11 +1520,11 @@ var useClusterGetNewsNextPreviousStatus = (clusterId, newsId) => {
1528
1520
 
1529
1521
  // src/hooks/useClusterImages.ts
1530
1522
  import { ClusterService as ClusterService10 } from "@geowiki/api-proxy";
1531
- import { useQuery as useQuery44 } from "@tanstack/react-query";
1523
+ import { useQuery as useQuery42 } from "@tanstack/react-query";
1532
1524
  var useClusterImages = (id) => {
1533
- return useQuery44({
1525
+ return useQuery42({
1534
1526
  queryKey: [QueryNames.ClusterImages, id],
1535
- queryFn: () => __async(void 0, null, function* () {
1527
+ queryFn: () => __async(null, null, function* () {
1536
1528
  const data = yield ClusterService10.clusterGetClusterImages(id);
1537
1529
  return data;
1538
1530
  })
@@ -1541,11 +1533,11 @@ var useClusterImages = (id) => {
1541
1533
 
1542
1534
  // src/hooks/useClusterOverview.ts
1543
1535
  import { ClusterService as ClusterService11 } from "@geowiki/api-proxy";
1544
- import { useQuery as useQuery45 } from "@tanstack/react-query";
1536
+ import { useQuery as useQuery43 } from "@tanstack/react-query";
1545
1537
  var useClusterOverview = (id) => {
1546
- return useQuery45({
1538
+ return useQuery43({
1547
1539
  queryKey: [QueryNames.GetClusterOverview, id],
1548
- queryFn: () => __async(void 0, null, function* () {
1540
+ queryFn: () => __async(null, null, function* () {
1549
1541
  const data = yield ClusterService11.clusterGetClusterOverview(id);
1550
1542
  return data;
1551
1543
  })
@@ -1554,9 +1546,9 @@ var useClusterOverview = (id) => {
1554
1546
 
1555
1547
  // src/hooks/useClusterAllNews.ts
1556
1548
  import { ClusterService as ClusterService12 } from "@geowiki/api-proxy";
1557
- import { useQuery as useQuery46 } from "@tanstack/react-query";
1549
+ import { useQuery as useQuery44 } from "@tanstack/react-query";
1558
1550
  var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status) => {
1559
- return useQuery46({
1551
+ return useQuery44({
1560
1552
  queryKey: [
1561
1553
  QueryNames.ClusterAllNews,
1562
1554
  id,
@@ -1566,7 +1558,7 @@ var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status
1566
1558
  refresh,
1567
1559
  status
1568
1560
  ],
1569
- queryFn: () => __async(void 0, null, function* () {
1561
+ queryFn: () => __async(null, null, function* () {
1570
1562
  const data = yield ClusterService12.clusterGetAllNews(
1571
1563
  id,
1572
1564
  sorting,
@@ -1581,11 +1573,11 @@ var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status
1581
1573
 
1582
1574
  // src/hooks/useNewsFromAllClusters.ts
1583
1575
  import { ClusterService as ClusterService13 } from "@geowiki/api-proxy";
1584
- import { useQuery as useQuery47 } from "@tanstack/react-query";
1576
+ import { useQuery as useQuery45 } from "@tanstack/react-query";
1585
1577
  var useNewsFromAllClusters = (skip = 0, take = 10) => {
1586
- return useQuery47({
1578
+ return useQuery45({
1587
1579
  queryKey: [QueryNames.ClusterAllNews, skip, take],
1588
- queryFn: () => __async(void 0, null, function* () {
1580
+ queryFn: () => __async(null, null, function* () {
1589
1581
  const data = yield ClusterService13.clusterGetAllNewsFromAllClusters(
1590
1582
  "",
1591
1583
  skip,
@@ -1598,11 +1590,11 @@ var useNewsFromAllClusters = (skip = 0, take = 10) => {
1598
1590
 
1599
1591
  // src/hooks/useClusterNewsWithId.ts
1600
1592
  import { ClusterService as ClusterService14 } from "@geowiki/api-proxy";
1601
- import { useQuery as useQuery48 } from "@tanstack/react-query";
1593
+ import { useQuery as useQuery46 } from "@tanstack/react-query";
1602
1594
  var useClusterNewsWithId = (id) => {
1603
- return useQuery48({
1595
+ return useQuery46({
1604
1596
  queryKey: [QueryNames.ClusterNewsWithId, id],
1605
- queryFn: () => __async(void 0, null, function* () {
1597
+ queryFn: () => __async(null, null, function* () {
1606
1598
  const data = yield ClusterService14.clusterGetClusterNewsById(id);
1607
1599
  return data;
1608
1600
  })
@@ -1610,22 +1602,22 @@ var useClusterNewsWithId = (id) => {
1610
1602
  };
1611
1603
 
1612
1604
  // src/hooks/useMapMenuItems.ts
1613
- import { useQuery as useQuery49 } from "@tanstack/react-query";
1605
+ import { useQuery as useQuery47 } from "@tanstack/react-query";
1614
1606
 
1615
1607
  // src/utils/CmsApi.ts
1616
1608
  import {
1617
1609
  QueryApiService,
1618
1610
  SettingsService as SettingsService7
1619
1611
  } from "@geowiki/cms-proxy";
1620
- var getGeoWikiSettings = () => __async(void 0, null, function* () {
1612
+ var getGeoWikiSettings = () => __async(null, null, function* () {
1621
1613
  const req = yield SettingsService7.settingsGetSiteSettings("GeoWiki");
1622
1614
  return req;
1623
1615
  });
1624
- var getDefaultSettings = () => __async(void 0, null, function* () {
1616
+ var getDefaultSettings = () => __async(null, null, function* () {
1625
1617
  const req = yield SettingsService7.settingsGetDefaultSiteSettings();
1626
1618
  return req;
1627
1619
  });
1628
- var getMenus = (displayName) => __async(void 0, null, function* () {
1620
+ var getMenus = (displayName) => __async(null, null, function* () {
1629
1621
  const req = yield getContentWithTypeAndDisplayName(
1630
1622
  "Menu",
1631
1623
  displayName
@@ -1633,7 +1625,7 @@ var getMenus = (displayName) => __async(void 0, null, function* () {
1633
1625
  const menus = req == null ? void 0 : req.items[0];
1634
1626
  return menus;
1635
1627
  });
1636
- var getPageContent = (displayName) => __async(void 0, null, function* () {
1628
+ var getPageContent = (displayName) => __async(null, null, function* () {
1637
1629
  const req = yield getContentWithTypeAndDisplayName(
1638
1630
  "Page",
1639
1631
  displayName
@@ -1641,27 +1633,27 @@ var getPageContent = (displayName) => __async(void 0, null, function* () {
1641
1633
  const page = req == null ? void 0 : req.items[0];
1642
1634
  return page;
1643
1635
  });
1644
- var getContentWithTypeAndDisplayName = (contentType, displayName) => __async(void 0, null, function* () {
1636
+ var getContentWithTypeAndDisplayName = (contentType, displayName) => __async(null, null, function* () {
1645
1637
  return QueryApiService.apiQueryGet(
1646
1638
  "GetContentByTypeAndDisplayText",
1647
1639
  `${JSON.stringify({ contenttype: contentType, displaytext: displayName })}`
1648
1640
  );
1649
1641
  });
1650
- var getContentWithSlug = (slug) => __async(void 0, null, function* () {
1642
+ var getContentWithSlug = (slug) => __async(null, null, function* () {
1651
1643
  const req = yield QueryApiService.apiQueryGet(
1652
1644
  "GetDocumentBySlug",
1653
1645
  `${JSON.stringify({ path: slug })}`
1654
1646
  );
1655
1647
  return req == null ? void 0 : req.items[0];
1656
1648
  });
1657
- var getContentsWithType = (contentType) => __async(void 0, null, function* () {
1649
+ var getContentsWithType = (contentType) => __async(null, null, function* () {
1658
1650
  const req = yield QueryApiService.apiQueryGet(
1659
1651
  "GetContentByType",
1660
1652
  `${JSON.stringify({ contenttype: contentType })}`
1661
1653
  );
1662
1654
  return req == null ? void 0 : req.items;
1663
1655
  });
1664
- var getPageProps = (ctx) => __async(void 0, null, function* () {
1656
+ var getPageProps = (ctx) => __async(null, null, function* () {
1665
1657
  var _a;
1666
1658
  var page = "index";
1667
1659
  const slugs = ctx.query.slug;
@@ -1677,9 +1669,9 @@ var getPageProps = (ctx) => __async(void 0, null, function* () {
1677
1669
 
1678
1670
  // src/hooks/useMapMenuItems.ts
1679
1671
  var useMapMenuItems = () => {
1680
- return useQuery49({
1672
+ return useQuery47({
1681
1673
  queryKey: [QueryNames.MapMenuItems],
1682
- queryFn: () => __async(void 0, null, function* () {
1674
+ queryFn: () => __async(null, null, function* () {
1683
1675
  const req = yield getContentsWithType("MapMenuItem");
1684
1676
  return req;
1685
1677
  })
@@ -1688,11 +1680,11 @@ var useMapMenuItems = () => {
1688
1680
 
1689
1681
  // src/hooks/useClusterLinks.ts
1690
1682
  import { ClusterService as ClusterService15 } from "@geowiki/api-proxy";
1691
- import { useQuery as useQuery50 } from "@tanstack/react-query";
1683
+ import { useQuery as useQuery48 } from "@tanstack/react-query";
1692
1684
  var useClusterLinks = (id) => {
1693
- return useQuery50({
1685
+ return useQuery48({
1694
1686
  queryKey: [QueryNames.GetSocialLinks, id],
1695
- queryFn: () => __async(void 0, null, function* () {
1687
+ queryFn: () => __async(null, null, function* () {
1696
1688
  const data = yield ClusterService15.clusterGetLinksAndPartner(id);
1697
1689
  return data;
1698
1690
  })
@@ -1700,11 +1692,11 @@ var useClusterLinks = (id) => {
1700
1692
  };
1701
1693
 
1702
1694
  // src/hooks/useCmsContentWithType.ts
1703
- import { useQuery as useQuery51 } from "@tanstack/react-query";
1695
+ import { useQuery as useQuery49 } from "@tanstack/react-query";
1704
1696
  var useCmsContentWithType = (contentType) => {
1705
- return useQuery51({
1697
+ return useQuery49({
1706
1698
  queryKey: [QueryNames.GetCmsContentWithType],
1707
- queryFn: () => __async(void 0, null, function* () {
1699
+ queryFn: () => __async(null, null, function* () {
1708
1700
  const req = yield getContentsWithType(contentType);
1709
1701
  return req;
1710
1702
  })
@@ -1713,11 +1705,11 @@ var useCmsContentWithType = (contentType) => {
1713
1705
 
1714
1706
  // src/hooks/useClusterNews.ts
1715
1707
  import { ClusterService as ClusterService16 } from "@geowiki/api-proxy";
1716
- import { useQuery as useQuery52 } from "@tanstack/react-query";
1708
+ import { useQuery as useQuery50 } from "@tanstack/react-query";
1717
1709
  var useClusterNews = (id, sort = "", skip = 0, take = 100) => {
1718
- return useQuery52({
1710
+ return useQuery50({
1719
1711
  queryKey: [QueryNames.ClusterNews, id, sort, skip, take],
1720
- queryFn: () => __async(void 0, null, function* () {
1712
+ queryFn: () => __async(null, null, function* () {
1721
1713
  const data = yield ClusterService16.clusterGetClusterNews(
1722
1714
  id,
1723
1715
  sort,
@@ -1731,11 +1723,11 @@ var useClusterNews = (id, sort = "", skip = 0, take = 100) => {
1731
1723
 
1732
1724
  // src/hooks/useClusterDescription.ts
1733
1725
  import { ClusterService as ClusterService17 } from "@geowiki/api-proxy";
1734
- import { useQuery as useQuery53 } from "@tanstack/react-query";
1726
+ import { useQuery as useQuery51 } from "@tanstack/react-query";
1735
1727
  var useClusterDescription = (id) => {
1736
- return useQuery53({
1728
+ return useQuery51({
1737
1729
  queryKey: [QueryNames.GetClusterDescription, id],
1738
- queryFn: () => __async(void 0, null, function* () {
1730
+ queryFn: () => __async(null, null, function* () {
1739
1731
  const data = yield ClusterService17.clusterGetClusterDescription(id);
1740
1732
  return data;
1741
1733
  })
@@ -1744,11 +1736,11 @@ var useClusterDescription = (id) => {
1744
1736
 
1745
1737
  // src/hooks/useClusterDetails.ts
1746
1738
  import { ClusterService as ClusterService18 } from "@geowiki/api-proxy";
1747
- import { useQuery as useQuery54 } from "@tanstack/react-query";
1739
+ import { useQuery as useQuery52 } from "@tanstack/react-query";
1748
1740
  var useClusterDetails = (id) => {
1749
- return useQuery54({
1741
+ return useQuery52({
1750
1742
  queryKey: [QueryNames.GetClusterDetails, id],
1751
- queryFn: () => __async(void 0, null, function* () {
1743
+ queryFn: () => __async(null, null, function* () {
1752
1744
  const data = yield ClusterService18.clusterGetClusterDetails(id);
1753
1745
  return data;
1754
1746
  })
@@ -1757,11 +1749,11 @@ var useClusterDetails = (id) => {
1757
1749
 
1758
1750
  // src/hooks/useClusterImagesAndVideos.ts
1759
1751
  import { ClusterService as ClusterService19 } from "@geowiki/api-proxy";
1760
- import { useQuery as useQuery55 } from "@tanstack/react-query";
1752
+ import { useQuery as useQuery53 } from "@tanstack/react-query";
1761
1753
  var useClusterImagesAndVideos = (id) => {
1762
- return useQuery55({
1754
+ return useQuery53({
1763
1755
  queryKey: [QueryNames.GetImagesAndVideos, id],
1764
- queryFn: () => __async(void 0, null, function* () {
1756
+ queryFn: () => __async(null, null, function* () {
1765
1757
  const data = yield ClusterService19.clusterGetImagesAndVideos(id);
1766
1758
  return data;
1767
1759
  })
@@ -1769,8 +1761,8 @@ var useClusterImagesAndVideos = (id) => {
1769
1761
  };
1770
1762
 
1771
1763
  // src/hooks/useHost.ts
1772
- import { useQuery as useQuery56 } from "@tanstack/react-query";
1773
- var getHost = () => __async(void 0, null, function* () {
1764
+ import { useQuery as useQuery54 } from "@tanstack/react-query";
1765
+ var getHost = () => __async(null, null, function* () {
1774
1766
  const response = yield fetch("/api/host");
1775
1767
  if (!response.ok) {
1776
1768
  return Promise.reject(null);
@@ -1778,7 +1770,7 @@ var getHost = () => __async(void 0, null, function* () {
1778
1770
  return response.json();
1779
1771
  });
1780
1772
  function useHost() {
1781
- return useQuery56({
1773
+ return useQuery54({
1782
1774
  queryKey: [QueryNames.GetHost],
1783
1775
  queryFn: getHost
1784
1776
  });
@@ -1786,7 +1778,7 @@ function useHost() {
1786
1778
 
1787
1779
  // src/hooks/useHostManagement.ts
1788
1780
  import { useMutation, useQueryClient } from "@tanstack/react-query";
1789
- var createHost = (hostData) => __async(void 0, null, function* () {
1781
+ var createHost = (hostData) => __async(null, null, function* () {
1790
1782
  const response = yield fetch("/api/hosts", {
1791
1783
  method: "POST",
1792
1784
  headers: {
@@ -1799,7 +1791,7 @@ var createHost = (hostData) => __async(void 0, null, function* () {
1799
1791
  }
1800
1792
  return response.json();
1801
1793
  });
1802
- var updateHost = (_a) => __async(void 0, null, function* () {
1794
+ var updateHost = (_a) => __async(null, null, function* () {
1803
1795
  var _b = _a, {
1804
1796
  host
1805
1797
  } = _b, hostData = __objRest(_b, [
@@ -1817,7 +1809,7 @@ var updateHost = (_a) => __async(void 0, null, function* () {
1817
1809
  }
1818
1810
  return response.json();
1819
1811
  });
1820
- var deleteHost = (host) => __async(void 0, null, function* () {
1812
+ var deleteHost = (host) => __async(null, null, function* () {
1821
1813
  const response = yield fetch(`/api/hosts/${host}`, {
1822
1814
  method: "DELETE"
1823
1815
  });
@@ -1863,7 +1855,8 @@ var HostType = /* @__PURE__ */ ((HostType2) => {
1863
1855
 
1864
1856
  // src/utils/ServerHostUtils.ts
1865
1857
  var getHostData = () => {
1866
- return process.env.NODE_ENV === "production" ? [
1858
+ const useProd = process.env.NODE_ENV === "production" || process.env.GEOWIKI_USE_PROD_HOSTS === "true";
1859
+ return useProd ? [
1867
1860
  {
1868
1861
  host: "v2.geo-wiki.org",
1869
1862
  cmsUrl: "https://cms.main.geo-wiki.org"
@@ -1981,21 +1974,21 @@ var getHostData = () => {
1981
1974
  cmsUrl: "https://cms.geowiki.iiasa.ac.at/canopyatlas",
1982
1975
  tenantId: "3a1481ec-90a1-47d0-c34d-70610f97a4e5",
1983
1976
  redirectUrl: "/",
1984
- protectedPaths: ["/map"]
1977
+ protectedPaths: ["/canopy-atlas"]
1985
1978
  },
1986
1979
  {
1987
1980
  host: "canopyatlas.nodes.iiasa.ac.at",
1988
1981
  cmsUrl: "https://cms.geowiki.iiasa.ac.at/canopyatlas",
1989
1982
  tenantId: "3a1481ec-90a1-47d0-c34d-70610f97a4e5",
1990
1983
  redirectUrl: "/",
1991
- protectedPaths: ["/map"]
1984
+ protectedPaths: ["/canopy-atlas"]
1992
1985
  },
1993
1986
  {
1994
1987
  host: "basf.nodes.iiasa.ac.at",
1995
1988
  cmsUrl: "https://cms.main.geo-wiki.org/basf",
1996
1989
  tenantId: "3a16570a-6c13-db58-25f7-1866c09412b7",
1997
1990
  redirectUrl: "/",
1998
- protectedPaths: ["/map"]
1991
+ protectedPaths: ["/canopy-atlas"]
1999
1992
  },
2000
1993
  {
2001
1994
  host: "evo.nodes.iiasa.ac.at",
@@ -2035,6 +2028,13 @@ var getHostData = () => {
2035
2028
  host: "geowiki.local:3000",
2036
2029
  cmsUrl: "https://cms.main.geo-wiki.org"
2037
2030
  },
2031
+ {
2032
+ host: "canopyatlas.local:3000",
2033
+ cmsUrl: "https://cms.geowiki.iiasa.ac.at/canopyatlas",
2034
+ tenantId: "3a1481ec-90a1-47d0-c34d-70610f97a4e5",
2035
+ redirectUrl: "/",
2036
+ protectedPaths: ["/canopy-atlas"]
2037
+ },
2038
2038
  {
2039
2039
  host: "recodo.local:3000",
2040
2040
  cmsUrl: "https://framework.cms.geo-wiki.org"
@@ -2044,6 +2044,12 @@ var getHostData = () => {
2044
2044
  cmsUrl: "https://cms.main.geo-wiki.org/evoland",
2045
2045
  tenantId: "3a0d5d86-5eac-0234-6d1c-eeecdd06739d",
2046
2046
  redirectUrl: "/evoland/projects"
2047
+ },
2048
+ {
2049
+ host: "mowingquest.local:3000",
2050
+ cmsUrl: "https://cms.geowiki.iiasa.ac.at/mowing-quest",
2051
+ tenantId: "3a21f27b-c772-3945-10bb-658707d3670c",
2052
+ redirectUrl: "/"
2047
2053
  }
2048
2054
  ];
2049
2055
  };
@@ -2108,8 +2114,7 @@ var HostService = class {
2108
2114
  * Utility: Check if a path is protected for a host
2109
2115
  */
2110
2116
  static isPathProtected(hostInfo, path) {
2111
- if (!(hostInfo == null ? void 0 : hostInfo.protectedPaths))
2112
- return false;
2117
+ if (!(hostInfo == null ? void 0 : hostInfo.protectedPaths)) return false;
2113
2118
  return hostInfo.protectedPaths.some(
2114
2119
  (protectedPath) => path.startsWith(protectedPath)
2115
2120
  );
@@ -2169,8 +2174,7 @@ var HostService = class {
2169
2174
  * Utility: Get host info for current window location (client-side only)
2170
2175
  */
2171
2176
  static getCurrentHostInfo(hosts) {
2172
- if (typeof window === "undefined")
2173
- return void 0;
2177
+ if (typeof window === "undefined") return void 0;
2174
2178
  return hosts.find((h) => h.host === window.location.host);
2175
2179
  }
2176
2180
  /**
@@ -2405,8 +2409,7 @@ var createI18n = () => {
2405
2409
  let current = "en";
2406
2410
  return {
2407
2411
  locale: (next) => {
2408
- if (next)
2409
- current = next;
2412
+ if (next) current = next;
2410
2413
  return current;
2411
2414
  },
2412
2415
  t: (key) => key
@@ -3064,7 +3067,7 @@ var trackMapEvent = {
3064
3067
 
3065
3068
  // src/auth/AuthContext.tsx
3066
3069
  import { createContext, useContext, useEffect as useEffect4, useMemo as useMemo2 } from "react";
3067
- import { useQuery as useQuery57, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
3070
+ import { useQuery as useQuery55, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
3068
3071
  import { jsx } from "react/jsx-runtime";
3069
3072
  var SESSION_QUERY_KEY = ["geowiki-session"];
3070
3073
  var SessionContext = createContext({
@@ -3093,7 +3096,7 @@ function SessionProvider({
3093
3096
  onSessionChange
3094
3097
  }) {
3095
3098
  const queryClient = useQueryClient2();
3096
- const { data, isLoading } = useQuery57({
3099
+ const { data, isLoading } = useQuery55({
3097
3100
  queryKey: SESSION_QUERY_KEY,
3098
3101
  queryFn: fetchSession,
3099
3102
  initialData: initialSession != null ? initialSession : void 0,
@@ -3155,14 +3158,11 @@ import {
3155
3158
  import { jsx as jsx2 } from "react/jsx-runtime";
3156
3159
  var isBrowser = () => typeof window !== "undefined";
3157
3160
  var queryToSearchParams = (query, target = new URLSearchParams()) => {
3158
- if (!query)
3159
- return target;
3161
+ if (!query) return target;
3160
3162
  for (const [key, value] of Object.entries(query)) {
3161
- if (value === void 0 || value === null)
3162
- continue;
3163
+ if (value === void 0 || value === null) continue;
3163
3164
  if (Array.isArray(value)) {
3164
- for (const v of value)
3165
- target.append(key, String(v));
3165
+ for (const v of value) target.append(key, String(v));
3166
3166
  } else {
3167
3167
  target.set(key, String(value));
3168
3168
  }
@@ -3170,8 +3170,7 @@ var queryToSearchParams = (query, target = new URLSearchParams()) => {
3170
3170
  return target;
3171
3171
  };
3172
3172
  var urlToHref = (url) => {
3173
- if (typeof url === "string")
3174
- return url;
3173
+ if (typeof url === "string") return url;
3175
3174
  const { pathname = "", query, hash } = url;
3176
3175
  const qs = queryToSearchParams(query).toString();
3177
3176
  return `${pathname}${qs ? `?${qs}` : ""}${hash ? `#${hash}` : ""}`;
@@ -3245,15 +3244,11 @@ var DefaultImage = function DefaultImage2(props) {
3245
3244
  ]);
3246
3245
  const resolvedSrc = typeof src === "string" ? src : src == null ? void 0 : src.src;
3247
3246
  const mergedStyle = useMemo3(() => {
3248
- if (!fill && !objectFit && !objectPosition && !style)
3249
- return void 0;
3247
+ if (!fill && !objectFit && !objectPosition && !style) return void 0;
3250
3248
  const out = __spreadValues({}, style);
3251
- if (fill)
3252
- Object.assign(out, { position: "absolute", inset: 0, width: "100%", height: "100%" });
3253
- if (objectFit)
3254
- out.objectFit = objectFit;
3255
- if (objectPosition)
3256
- out.objectPosition = objectPosition;
3249
+ if (fill) Object.assign(out, { position: "absolute", inset: 0, width: "100%", height: "100%" });
3250
+ if (objectFit) out.objectFit = objectFit;
3251
+ if (objectPosition) out.objectPosition = objectPosition;
3257
3252
  return out;
3258
3253
  }, [fill, objectFit, objectPosition, style]);
3259
3254
  return (
@@ -3280,20 +3275,14 @@ var DefaultScript = function DefaultScript2(props) {
3280
3275
  onLoadRef.current = onLoad;
3281
3276
  onErrorRef.current = onError;
3282
3277
  useEffect5(() => {
3283
- if (!src || !isBrowser())
3284
- return;
3278
+ if (!src || !isBrowser()) return;
3285
3279
  const el = document.createElement("script");
3286
3280
  el.src = src;
3287
- if (id)
3288
- el.id = id;
3289
- if (async)
3290
- el.async = true;
3291
- if (defer)
3292
- el.defer = true;
3293
- if (type)
3294
- el.type = type;
3295
- if (nonce)
3296
- el.nonce = nonce;
3281
+ if (id) el.id = id;
3282
+ if (async) el.async = true;
3283
+ if (defer) el.defer = true;
3284
+ if (type) el.type = type;
3285
+ if (nonce) el.nonce = nonce;
3297
3286
  el.onload = () => {
3298
3287
  var _a2;
3299
3288
  return (_a2 = onLoadRef.current) == null ? void 0 : _a2.call(onLoadRef);
@@ -3327,8 +3316,7 @@ var parseSearch = (search) => {
3327
3316
  var useLocation2 = () => {
3328
3317
  const [tick, setTick] = useState2(0);
3329
3318
  useEffect5(() => {
3330
- if (!isBrowser())
3331
- return;
3319
+ if (!isBrowser()) return;
3332
3320
  const handler = () => setTick((t) => t + 1);
3333
3321
  window.addEventListener("popstate", handler);
3334
3322
  return () => window.removeEventListener("popstate", handler);
@@ -3349,31 +3337,26 @@ var useLocation2 = () => {
3349
3337
  var useDefaultRouter = () => {
3350
3338
  const loc = useLocation2();
3351
3339
  const query = useMemo3(() => parseSearch(loc.search), [loc.search]);
3352
- const push = useCallback2((url) => __async(void 0, null, function* () {
3353
- if (!isBrowser())
3354
- return false;
3340
+ const push = useCallback2((url) => __async(null, null, function* () {
3341
+ if (!isBrowser()) return false;
3355
3342
  window.history.pushState({}, "", urlToHref(url));
3356
3343
  window.dispatchEvent(new PopStateEvent("popstate"));
3357
3344
  return true;
3358
3345
  }), []);
3359
- const replace = useCallback2((url) => __async(void 0, null, function* () {
3360
- if (!isBrowser())
3361
- return false;
3346
+ const replace = useCallback2((url) => __async(null, null, function* () {
3347
+ if (!isBrowser()) return false;
3362
3348
  window.history.replaceState({}, "", urlToHref(url));
3363
3349
  window.dispatchEvent(new PopStateEvent("popstate"));
3364
3350
  return true;
3365
3351
  }), []);
3366
3352
  const back = useCallback2(() => {
3367
- if (isBrowser())
3368
- window.history.back();
3353
+ if (isBrowser()) window.history.back();
3369
3354
  }, []);
3370
3355
  const forward = useCallback2(() => {
3371
- if (isBrowser())
3372
- window.history.forward();
3356
+ if (isBrowser()) window.history.forward();
3373
3357
  }, []);
3374
3358
  const reload = useCallback2(() => {
3375
- if (isBrowser())
3376
- window.location.reload();
3359
+ if (isBrowser()) window.location.reload();
3377
3360
  }, []);
3378
3361
  return useMemo3(
3379
3362
  () => ({
@@ -3426,7 +3409,7 @@ var useDefaultI18n = () => ({
3426
3409
  t: (key) => key
3427
3410
  });
3428
3411
  var defaultDynamic = (loader, options) => {
3429
- const Lazy = lazy(() => __async(void 0, null, function* () {
3412
+ const Lazy = lazy(() => __async(null, null, function* () {
3430
3413
  return unwrapDefault(yield loader());
3431
3414
  }));
3432
3415
  const Loading = options == null ? void 0 : options.loading;