@geowiki/core 0.16.9-dev.9 → 0.16.10

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,7 +648,7 @@ 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;
@@ -664,7 +662,7 @@ var useLocationBulkUpload = (uploadLocations, file, project_id, group_id) => {
664
662
  var useTaskBulkUpload = (uploadTasks, file, project_id) => {
665
663
  return useQuery17({
666
664
  queryKey: [QueryConstants.UploadTasks, uploadTasks, file],
667
- queryFn: () => __async(void 0, null, function* () {
665
+ queryFn: () => __async(null, null, function* () {
668
666
  try {
669
667
  return LocationService.uploadLocationTaskUploadlocationtaskPost({ file, project_id });
670
668
  } catch (error) {
@@ -677,7 +675,7 @@ var useTaskBulkUpload = (uploadTasks, file, project_id) => {
677
675
  var useReviewTaskBulkUpload = (uploadReviewTasks, file, project_id) => {
678
676
  return useQuery17({
679
677
  queryKey: [QueryConstants.UploadReviewTasks, uploadReviewTasks, file],
680
- queryFn: () => __async(void 0, null, function* () {
678
+ queryFn: () => __async(null, null, function* () {
681
679
  try {
682
680
  return LocationService.bulkUploadReviewTasksUploadreviewtasksPost({ file, project_id });
683
681
  } catch (error) {
@@ -710,7 +708,7 @@ import { NewsService } from "@geowiki/api-proxy";
710
708
  var useNews = (lang = "all", skip = 0, take = 100) => {
711
709
  return useQuery19({
712
710
  queryKey: [QueryNames.GetNews, lang, skip, take],
713
- queryFn: () => __async(void 0, null, function* () {
711
+ queryFn: () => __async(null, null, function* () {
714
712
  if (lang == "all") {
715
713
  const res2 = yield NewsService.newsGetExternalNews("", skip, take);
716
714
  return res2.items;
@@ -793,7 +791,7 @@ import { useQuery as useQuery20 } from "@tanstack/react-query";
793
791
  var usePublicationSettings = () => {
794
792
  return useQuery20({
795
793
  queryKey: [QueryNames.GetPublicationSettings],
796
- queryFn: () => __async(void 0, null, function* () {
794
+ queryFn: () => __async(null, null, function* () {
797
795
  var req = yield SettingsService5.settingsGetSiteSettings("Publication");
798
796
  return req;
799
797
  })
@@ -806,7 +804,7 @@ import { keepPreviousData as keepPreviousData5, useQuery as useQuery21 } from "@
806
804
  var useResource = (search = "", sort = "", skip = 0, take = 100) => {
807
805
  return useQuery21({
808
806
  queryKey: [QueryNames.GetResource, search, sort, skip, take],
809
- queryFn: () => __async(void 0, null, function* () {
807
+ queryFn: () => __async(null, null, function* () {
810
808
  if (search !== "") {
811
809
  const data2 = yield ResourceService3.resourceSearch(search);
812
810
  return data2;
@@ -838,7 +836,7 @@ var useResourceFilter = (filter) => {
838
836
  filter.sorting,
839
837
  filter.isFramework
840
838
  ],
841
- queryFn: () => __async(void 0, null, function* () {
839
+ queryFn: () => __async(null, null, function* () {
842
840
  const data = yield ResourceService4.resourceFilter(filter);
843
841
  return data;
844
842
  })
@@ -851,7 +849,7 @@ import { useQuery as useQuery23 } from "@tanstack/react-query";
851
849
  var useResourceType = () => {
852
850
  return useQuery23({
853
851
  queryKey: [QueryNames.GetResourceType],
854
- queryFn: () => __async(void 0, null, function* () {
852
+ queryFn: () => __async(null, null, function* () {
855
853
  var data = yield ResourceService5.resourceGetAvailableResourceType();
856
854
  return data;
857
855
  })
@@ -864,7 +862,7 @@ import { keepPreviousData as keepPreviousData6, useQuery as useQuery24 } from "@
864
862
  var useTopic = () => {
865
863
  return useQuery24({
866
864
  queryKey: [QueryNames.GetTopic],
867
- queryFn: () => __async(void 0, null, function* () {
865
+ queryFn: () => __async(null, null, function* () {
868
866
  var data = yield ResourceService6.resourceGetAvailableTopic();
869
867
  return data;
870
868
  }),
@@ -880,7 +878,7 @@ import { ProfileService } from "@geowiki/api-proxy";
880
878
  var useUserProfileGet = () => {
881
879
  return useQuery25({
882
880
  queryKey: [QueryNames.GetUserProfile],
883
- queryFn: () => __async(void 0, null, function* () {
881
+ queryFn: () => __async(null, null, function* () {
884
882
  var data = yield ProfileService.profileGet();
885
883
  return data;
886
884
  })
@@ -893,7 +891,7 @@ import { UserService } from "@geowiki/api-proxy";
893
891
  var useUsers = (pageIndex, pageSize, filter, sorting) => {
894
892
  return useQuery26({
895
893
  queryKey: [QueryConstants.GetUsers, pageIndex, pageSize, filter, sorting],
896
- queryFn: () => __async(void 0, null, function* () {
894
+ queryFn: () => __async(null, null, function* () {
897
895
  let skip = 0;
898
896
  if (pageIndex > 0) {
899
897
  skip = pageIndex * pageSize;
@@ -913,7 +911,7 @@ var useUsers = (pageIndex, pageSize, filter, sorting) => {
913
911
  import React from "react";
914
912
  function useRenderInfo(name = "Unknown") {
915
913
  const count = React.useRef(0);
916
- const lastRender = React.useRef();
914
+ const lastRender = React.useRef(void 0);
917
915
  const now = Date.now();
918
916
  count.current++;
919
917
  React.useEffect(() => {
@@ -937,7 +935,7 @@ import { useQuery as useQuery27 } from "@tanstack/react-query";
937
935
  var useDefaultSettings = () => {
938
936
  return useQuery27({
939
937
  queryKey: [QueryNames.DefaultSettings],
940
- queryFn: () => __async(void 0, null, function* () {
938
+ queryFn: () => __async(null, null, function* () {
941
939
  const req = yield SettingsService6.settingsGetDefaultSiteSettings();
942
940
  return req;
943
941
  })
@@ -956,7 +954,7 @@ import { useQuery as useQuery28 } from "@tanstack/react-query";
956
954
  var useEmailing = () => {
957
955
  return useQuery28({
958
956
  queryKey: [QueryConstants.GetEmailing],
959
- queryFn: () => __async(void 0, null, function* () {
957
+ queryFn: () => __async(null, null, function* () {
960
958
  const data = yield EmailSettingsService.emailSettingsGet();
961
959
  return data;
962
960
  })
@@ -986,7 +984,7 @@ import { useQuery as useQuery29 } from "@tanstack/react-query";
986
984
  var useFeatures = (providerName, providerKey) => {
987
985
  return useQuery29({
988
986
  queryKey: [QueryConstants.GetFeatures, providerName, providerKey],
989
- queryFn: () => __async(void 0, null, function* () {
987
+ queryFn: () => __async(null, null, function* () {
990
988
  const data = yield FeaturesService.featuresGet(providerName, providerKey);
991
989
  return data;
992
990
  })
@@ -999,7 +997,7 @@ import { UserService as UserService2 } from "@geowiki/api-proxy";
999
997
  var useAssignableRoles = () => {
1000
998
  return useQuery30({
1001
999
  queryKey: [QueryConstants.GetAssignableRoles],
1002
- queryFn: () => __async(void 0, null, function* () {
1000
+ queryFn: () => __async(null, null, function* () {
1003
1001
  const data = yield UserService2.userGetAssignableRoles();
1004
1002
  return data;
1005
1003
  })
@@ -1012,7 +1010,7 @@ import { useQuery as useQuery31 } from "@tanstack/react-query";
1012
1010
  var useUserRoles = ({ userId }) => {
1013
1011
  return useQuery31({
1014
1012
  queryKey: [QueryConstants.GetUserRoles, userId],
1015
- queryFn: () => __async(void 0, null, function* () {
1013
+ queryFn: () => __async(null, null, function* () {
1016
1014
  const data = yield UserService3.userGetRoles(userId);
1017
1015
  return data;
1018
1016
  })
@@ -1027,7 +1025,7 @@ import { useQuery as useQuery32 } from "@tanstack/react-query";
1027
1025
  var usePermissions = (providerName, providerKey) => {
1028
1026
  return useQuery32({
1029
1027
  queryKey: [QueryConstants.GetPermissions, providerName, providerKey],
1030
- queryFn: () => __async(void 0, null, function* () {
1028
+ queryFn: () => __async(null, null, function* () {
1031
1029
  const data = yield PermissionsService.permissionsGet(
1032
1030
  providerName,
1033
1031
  providerKey
@@ -1043,7 +1041,7 @@ import { RoleService } from "@geowiki/api-proxy";
1043
1041
  var useRoles = (pageIndex, pageSize, filter, sorting) => {
1044
1042
  return useQuery33({
1045
1043
  queryKey: [QueryConstants.GetRoles, pageIndex, pageSize, filter, sorting],
1046
- queryFn: () => __async(void 0, null, function* () {
1044
+ queryFn: () => __async(null, null, function* () {
1047
1045
  let skip = 0;
1048
1046
  if (pageIndex > 0) {
1049
1047
  skip = pageIndex * pageSize;
@@ -1065,7 +1063,7 @@ import { useQuery as useQuery34 } from "@tanstack/react-query";
1065
1063
  var useProfile = () => {
1066
1064
  return useQuery34({
1067
1065
  queryKey: [QueryConstants.GetProfile],
1068
- queryFn: () => __async(void 0, null, function* () {
1066
+ queryFn: () => __async(null, null, function* () {
1069
1067
  const data = yield ProfileService2.profileGet();
1070
1068
  return data;
1071
1069
  })
@@ -1078,7 +1076,7 @@ import { TenantService } from "@geowiki/api-proxy";
1078
1076
  var useTenants = (pageIndex, pageSize, filter, sorting) => {
1079
1077
  return useQuery35({
1080
1078
  queryKey: [QueryConstants.GetTenants, pageIndex, pageSize, filter, sorting],
1081
- queryFn: () => __async(void 0, null, function* () {
1079
+ queryFn: () => __async(null, null, function* () {
1082
1080
  let skip = 0;
1083
1081
  if (pageIndex > 0) {
1084
1082
  skip = pageIndex * pageSize;
@@ -1100,7 +1098,7 @@ import { ProjectService as ProjectService3 } from "@geowiki/evoland-api-proxy";
1100
1098
  var useEvolandLabels = (projectId) => {
1101
1099
  return useQuery36({
1102
1100
  queryKey: [QueryNames.GetEvolandLabels, projectId],
1103
- queryFn: () => __async(void 0, null, function* () {
1101
+ queryFn: () => __async(null, null, function* () {
1104
1102
  const data = yield ProjectService3.getLabelsLabelsProjectIdProjectIdGet(projectId);
1105
1103
  return data;
1106
1104
  })
@@ -1114,7 +1112,7 @@ var useLookUp = (ServiceName, params, LookUpsClusterCountries, LookUpsClusterAct
1114
1112
  let result;
1115
1113
  return useQuery37({
1116
1114
  queryKey: [QueryNames.GetLookUp, ServiceName, params],
1117
- queryFn: () => __async(void 0, null, function* () {
1115
+ queryFn: () => __async(null, null, function* () {
1118
1116
  switch (ServiceName) {
1119
1117
  case LookUpsClusterCountries: {
1120
1118
  result = yield ClusterService6.clusterGetCountries(params);
@@ -1154,7 +1152,7 @@ import {
1154
1152
  var useProjects = (fetch2, start = 0, amount = 9) => {
1155
1153
  return useQuery38({
1156
1154
  queryKey: [QueryConstants.GetProjects, fetch2, start, amount],
1157
- queryFn: () => __async(void 0, null, function* () {
1155
+ queryFn: () => __async(null, null, function* () {
1158
1156
  if (fetch2)
1159
1157
  return ProjectService4.listProjectsListprojectsStartidxStartidxAmountAmountGet(
1160
1158
  start,
@@ -1166,7 +1164,7 @@ var useProjects = (fetch2, start = 0, amount = 9) => {
1166
1164
  var useProjectDetails = (projectId, update) => {
1167
1165
  return useQuery38({
1168
1166
  queryKey: [QueryConstants.GetProjectDetails, projectId, update],
1169
- queryFn: () => __async(void 0, null, function* () {
1167
+ queryFn: () => __async(null, null, function* () {
1170
1168
  return ProjectService4.projectInfoProjectinfoProjectIdProjectIdGet(
1171
1169
  projectId
1172
1170
  );
@@ -1176,7 +1174,7 @@ var useProjectDetails = (projectId, update) => {
1176
1174
  var useTasksPerLocation = (data) => {
1177
1175
  return useQuery38({
1178
1176
  queryKey: [QueryConstants.GetTasksPerLocation, data],
1179
- queryFn: () => __async(void 0, null, function* () {
1177
+ queryFn: () => __async(null, null, function* () {
1180
1178
  return ProjectService4.getTasksTasksGet(
1181
1179
  data.locationProjectId,
1182
1180
  data.taskForReview,
@@ -1204,7 +1202,7 @@ var useTasksPerLocation = (data) => {
1204
1202
  var useRandomTasksPerLocation = (data) => {
1205
1203
  return useQuery38({
1206
1204
  queryKey: [QueryConstants.GetTasksPerLocation, data],
1207
- queryFn: () => __async(void 0, null, function* () {
1205
+ queryFn: () => __async(null, null, function* () {
1208
1206
  return ProjectService4.getRandomTaskRandomtaskGet(
1209
1207
  data.locationProjectId,
1210
1208
  data.taskForReview,
@@ -1231,7 +1229,7 @@ var useRandomTasksPerLocation = (data) => {
1231
1229
  var useTaskComments = (taskIds) => {
1232
1230
  return useQuery38({
1233
1231
  queryKey: [QueryConstants.GetTaskComment, taskIds],
1234
- queryFn: () => __async(void 0, null, function* () {
1232
+ queryFn: () => __async(null, null, function* () {
1235
1233
  return TaskService.taskLatestComomentsTasklatestcommentPost({
1236
1234
  task_ids: taskIds
1237
1235
  });
@@ -1241,7 +1239,7 @@ var useTaskComments = (taskIds) => {
1241
1239
  var useGroupsInProject = (projectId, updateGroup) => {
1242
1240
  return useQuery38({
1243
1241
  queryKey: [QueryConstants.GetGroupsInProject, projectId, updateGroup],
1244
- queryFn: () => __async(void 0, null, function* () {
1242
+ queryFn: () => __async(null, null, function* () {
1245
1243
  return ProjectService4.getProjectGroupsProjectgroupsProjectIdProjectIdGet(
1246
1244
  projectId
1247
1245
  );
@@ -1251,7 +1249,7 @@ var useGroupsInProject = (projectId, updateGroup) => {
1251
1249
  var useProjectUsers = (projectId) => {
1252
1250
  return useQuery38({
1253
1251
  queryKey: [QueryConstants.GetProjectUsers, projectId],
1254
- queryFn: () => __async(void 0, null, function* () {
1252
+ queryFn: () => __async(null, null, function* () {
1255
1253
  return ProjectService4.projectAllUsersProjectusersProjectIdProjectIdGet(
1256
1254
  projectId
1257
1255
  );
@@ -1261,7 +1259,7 @@ var useProjectUsers = (projectId) => {
1261
1259
  var useTaskStatusList = () => {
1262
1260
  return useQuery38({
1263
1261
  queryKey: [QueryConstants.GetTaskStatusList],
1264
- queryFn: () => __async(void 0, null, function* () {
1262
+ queryFn: () => __async(null, null, function* () {
1265
1263
  return TaskService.getTaskStatusesTaskstatusesGet();
1266
1264
  })
1267
1265
  });
@@ -1274,7 +1272,7 @@ var useUpdateActiveGroupInProject = (projectId, groupId, update) => {
1274
1272
  groupId,
1275
1273
  update
1276
1274
  ],
1277
- queryFn: () => __async(void 0, null, function* () {
1275
+ queryFn: () => __async(null, null, function* () {
1278
1276
  if (update)
1279
1277
  return ProjectService4.selectProjectGroupProjectselectgroupPost({
1280
1278
  project_id: projectId,
@@ -1286,7 +1284,7 @@ var useUpdateActiveGroupInProject = (projectId, groupId, update) => {
1286
1284
  var useTaskAnnotation = (taskId) => {
1287
1285
  return useQuery38({
1288
1286
  queryKey: [QueryConstants.GetTaskAnnotation, taskId],
1289
- queryFn: () => __async(void 0, null, function* () {
1287
+ queryFn: () => __async(null, null, function* () {
1290
1288
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1291
1289
  return TaskService.getTaskAnnotationAssetTaskannotationTaskIdTaskIdGet(
1292
1290
  taskId
@@ -1297,7 +1295,7 @@ var useTaskAnnotation = (taskId) => {
1297
1295
  var useTaskMultipleAnnotations = (taskId) => {
1298
1296
  return useQuery38({
1299
1297
  queryKey: [QueryConstants.GetTaskMultipleAnnotations, taskId],
1300
- queryFn: () => __async(void 0, null, function* () {
1298
+ queryFn: () => __async(null, null, function* () {
1301
1299
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1302
1300
  return TaskService.getTaskAnnotationAssetsTaskannotationsTaskIdTaskIdGet(
1303
1301
  taskId
@@ -1308,7 +1306,7 @@ var useTaskMultipleAnnotations = (taskId) => {
1308
1306
  var useTaskSavedAnnotations = (taskId) => {
1309
1307
  return useQuery38({
1310
1308
  queryKey: [QueryConstants.GetTaskSavedAnnotations, taskId],
1311
- queryFn: () => __async(void 0, null, function* () {
1309
+ queryFn: () => __async(null, null, function* () {
1312
1310
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1313
1311
  return TaskService.getSavedAnnotationGetsavedannotationTaskIdTaskIdGet(
1314
1312
  taskId
@@ -1319,7 +1317,7 @@ var useTaskSavedAnnotations = (taskId) => {
1319
1317
  var useTaskDelete = (taskId, projectId, deleteTask) => {
1320
1318
  return useQuery38({
1321
1319
  queryKey: [QueryConstants.DeleteTask, taskId, projectId, deleteTask],
1322
- queryFn: () => __async(void 0, null, function* () {
1320
+ queryFn: () => __async(null, null, function* () {
1323
1321
  if (taskId !== null && taskId !== void 0 && taskId !== 0 && deleteTask === true)
1324
1322
  return TaskService.deleteTaskDeletetaskPost({
1325
1323
  project_id: projectId,
@@ -1337,7 +1335,7 @@ var useProjectStatisticsByUser = (projectId, startDate, endDate, filterUserId) =
1337
1335
  endDate,
1338
1336
  filterUserId
1339
1337
  ],
1340
- queryFn: () => __async(void 0, null, function* () {
1338
+ queryFn: () => __async(null, null, function* () {
1341
1339
  return StatisticService.getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateFilterUserIdFilterUserIdGet(
1342
1340
  projectId,
1343
1341
  endDate,
@@ -1356,7 +1354,7 @@ var useContractStatisticsByUser = (projectId, startDate, endDate, filterUserId)
1356
1354
  endDate,
1357
1355
  filterUserId
1358
1356
  ],
1359
- queryFn: () => __async(void 0, null, function* () {
1357
+ queryFn: () => __async(null, null, function* () {
1360
1358
  return StatisticService.getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateFilterUserIdFilterUserIdGet(
1361
1359
  projectId,
1362
1360
  endDate,
@@ -1375,7 +1373,7 @@ var useLatestTaskOnLocation = (locationId, projectId, referenceDate) => {
1375
1373
  projectId,
1376
1374
  referenceDate
1377
1375
  ],
1378
- queryFn: () => __async(void 0, null, function* () {
1376
+ queryFn: () => __async(null, null, function* () {
1379
1377
  return ProjectService4.locationLatestTaskLocationtaskLocationIdLocationIdProjectIdProjectIdReferenceDateReferenceDateGet(
1380
1378
  locationId,
1381
1379
  projectId,
@@ -1387,7 +1385,7 @@ var useLatestTaskOnLocation = (locationId, projectId, referenceDate) => {
1387
1385
  var useAssignProjectToUser = (userRoleRequest, update) => {
1388
1386
  return useQuery38({
1389
1387
  queryKey: [QueryConstants.GetProjectDetails, userRoleRequest, update],
1390
- queryFn: () => __async(void 0, null, function* () {
1388
+ queryFn: () => __async(null, null, function* () {
1391
1389
  if (update)
1392
1390
  return ProjectService4.setUserRoleSetuserrolePost(userRoleRequest);
1393
1391
  }),
@@ -1397,7 +1395,7 @@ var useAssignProjectToUser = (userRoleRequest, update) => {
1397
1395
  var useGetUserProject = (user_id, fetchData) => {
1398
1396
  return useQuery38({
1399
1397
  queryKey: [QueryConstants.GetUserProject, user_id, fetchData],
1400
- queryFn: () => __async(void 0, null, function* () {
1398
+ queryFn: () => __async(null, null, function* () {
1401
1399
  if (fetchData)
1402
1400
  return ProjectService4.getUserRoleProjectGetuserroleprojectUserIdUserIdGet(
1403
1401
  user_id
@@ -1408,7 +1406,7 @@ var useGetUserProject = (user_id, fetchData) => {
1408
1406
  var useUpdateUserDetail = (userDetailRequest, update) => {
1409
1407
  return useQuery38({
1410
1408
  queryKey: [QueryConstants.SetUserDetail, userDetailRequest, update],
1411
- queryFn: () => __async(void 0, null, function* () {
1409
+ queryFn: () => __async(null, null, function* () {
1412
1410
  if (update)
1413
1411
  return ProjectService4.setUserDetailSetuserdetailPost(userDetailRequest);
1414
1412
  })
@@ -1422,7 +1420,7 @@ var useProjectsPointsDownload = (projectId, download, userRole) => {
1422
1420
  download,
1423
1421
  userRole
1424
1422
  ],
1425
- queryFn: () => __async(void 0, null, function* () {
1423
+ queryFn: () => __async(null, null, function* () {
1426
1424
  if (userRole == "admin" && download)
1427
1425
  return ProjectService4.getLocationsSummaryLocationssummaryProjectIdProjectIdGet(
1428
1426
  projectId
@@ -1433,7 +1431,7 @@ var useProjectsPointsDownload = (projectId, download, userRole) => {
1433
1431
  var useQuestionnaire = (projectId) => {
1434
1432
  return useQuery38({
1435
1433
  queryKey: [QueryConstants.GetQuestionnaireForProject, projectId],
1436
- queryFn: () => __async(void 0, null, function* () {
1434
+ queryFn: () => __async(null, null, function* () {
1437
1435
  return QuestionService.getProjectQuestionsAnswersQuestionsAnswersProjectIdProjectIdGet(
1438
1436
  projectId
1439
1437
  );
@@ -1443,7 +1441,7 @@ var useQuestionnaire = (projectId) => {
1443
1441
  var useTaskAnswers = (taskId) => {
1444
1442
  return useQuery38({
1445
1443
  queryKey: [QueryConstants.GetTaskAnswers, taskId],
1446
- queryFn: () => __async(void 0, null, function* () {
1444
+ queryFn: () => __async(null, null, function* () {
1447
1445
  return TaskService.getTaskAnswersTaskanswersTaskIdTaskIdGet(taskId);
1448
1446
  })
1449
1447
  });
@@ -1451,7 +1449,7 @@ var useTaskAnswers = (taskId) => {
1451
1449
  var useProjectResultSet = (download, projectId, is_geo_json) => {
1452
1450
  return useQuery38({
1453
1451
  queryKey: [QueryConstants.GetProjectResultSet, download, projectId, is_geo_json],
1454
- queryFn: () => __async(void 0, null, function* () {
1452
+ queryFn: () => __async(null, null, function* () {
1455
1453
  return ProjectService4.projectResultSetProjectresultsetProjectIdProjectIdIsGeoJsonIsGeoJsonGet(projectId, is_geo_json);
1456
1454
  }),
1457
1455
  enabled: !!download && !!projectId
@@ -1459,38 +1457,30 @@ var useProjectResultSet = (download, projectId, is_geo_json) => {
1459
1457
  };
1460
1458
 
1461
1459
  // src/hooks/useApiImage.tsx
1462
- import { useQuery as useQuery39 } from "@tanstack/react-query";
1460
+ var NO_IMAGE_PLACEHOLDER = "/assets/farmer-cluster/no-image-available.png";
1461
+ var EMPTY_GUID = "00000000-0000-0000-0000-000000000000";
1463
1462
  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
- });
1463
+ if (!imageId || imageId === EMPTY_GUID) return NO_IMAGE_PLACEHOLDER;
1464
+ const { apiUrl, tenantId } = config_default.getState();
1465
+ const params = tenantId ? `__tenant=${tenantId}&id=${imageId}` : `id=${imageId}`;
1466
+ return `${apiUrl}/api/app/file/view?${params}`;
1472
1467
  };
1473
1468
 
1474
1469
  // src/hooks/useCmsImage.tsx
1475
- import { useQuery as useQuery40 } from "@tanstack/react-query";
1470
+ var NO_IMAGE_PLACEHOLDER2 = "/assets/farmer-cluster/no-image-available.png";
1476
1471
  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
- });
1472
+ const cmsUrl = useCmsUrl();
1473
+ if (!imageId) return NO_IMAGE_PLACEHOLDER2;
1474
+ return `${cmsUrl}/media/${imageId}`;
1485
1475
  };
1486
1476
 
1487
1477
  // src/hooks/useClusterGetJoinRequests.ts
1488
1478
  import { ClusterService as ClusterService7 } from "@geowiki/api-proxy";
1489
- import { useQuery as useQuery41 } from "@tanstack/react-query";
1479
+ import { useQuery as useQuery39 } from "@tanstack/react-query";
1490
1480
  var useClusterGetJoinRequests = (clusterId) => {
1491
- return useQuery41({
1481
+ return useQuery39({
1492
1482
  queryKey: [QueryNames.JoinRequests, clusterId],
1493
- queryFn: () => __async(void 0, null, function* () {
1483
+ queryFn: () => __async(null, null, function* () {
1494
1484
  const data = yield ClusterService7.clusterGetJoinRequests(clusterId);
1495
1485
  return data;
1496
1486
  })
@@ -1499,11 +1489,11 @@ var useClusterGetJoinRequests = (clusterId) => {
1499
1489
 
1500
1490
  // src/hooks/useClusterGetNews.ts
1501
1491
  import { ClusterService as ClusterService8 } from "@geowiki/api-proxy";
1502
- import { useQuery as useQuery42 } from "@tanstack/react-query";
1492
+ import { useQuery as useQuery40 } from "@tanstack/react-query";
1503
1493
  var useClusterGetNews = (clusterId, newsId) => {
1504
- return useQuery42({
1494
+ return useQuery40({
1505
1495
  queryKey: [QueryNames.ClusterGetNews, clusterId, newsId],
1506
- queryFn: () => __async(void 0, null, function* () {
1496
+ queryFn: () => __async(null, null, function* () {
1507
1497
  const data = yield ClusterService8.clusterGetNews(clusterId, newsId);
1508
1498
  return data;
1509
1499
  })
@@ -1512,11 +1502,11 @@ var useClusterGetNews = (clusterId, newsId) => {
1512
1502
 
1513
1503
  // src/hooks/useClusterGetNewsNextPreviousStatus.ts
1514
1504
  import { ClusterService as ClusterService9 } from "@geowiki/api-proxy";
1515
- import { useQuery as useQuery43 } from "@tanstack/react-query";
1505
+ import { useQuery as useQuery41 } from "@tanstack/react-query";
1516
1506
  var useClusterGetNewsNextPreviousStatus = (clusterId, newsId) => {
1517
- return useQuery43({
1507
+ return useQuery41({
1518
1508
  queryKey: [QueryNames.ClusterNewsNextPrevious, clusterId, newsId],
1519
- queryFn: () => __async(void 0, null, function* () {
1509
+ queryFn: () => __async(null, null, function* () {
1520
1510
  const data = yield ClusterService9.clusterGetNewsNextPreviousStatus(
1521
1511
  clusterId,
1522
1512
  newsId
@@ -1528,11 +1518,11 @@ var useClusterGetNewsNextPreviousStatus = (clusterId, newsId) => {
1528
1518
 
1529
1519
  // src/hooks/useClusterImages.ts
1530
1520
  import { ClusterService as ClusterService10 } from "@geowiki/api-proxy";
1531
- import { useQuery as useQuery44 } from "@tanstack/react-query";
1521
+ import { useQuery as useQuery42 } from "@tanstack/react-query";
1532
1522
  var useClusterImages = (id) => {
1533
- return useQuery44({
1523
+ return useQuery42({
1534
1524
  queryKey: [QueryNames.ClusterImages, id],
1535
- queryFn: () => __async(void 0, null, function* () {
1525
+ queryFn: () => __async(null, null, function* () {
1536
1526
  const data = yield ClusterService10.clusterGetClusterImages(id);
1537
1527
  return data;
1538
1528
  })
@@ -1541,11 +1531,11 @@ var useClusterImages = (id) => {
1541
1531
 
1542
1532
  // src/hooks/useClusterOverview.ts
1543
1533
  import { ClusterService as ClusterService11 } from "@geowiki/api-proxy";
1544
- import { useQuery as useQuery45 } from "@tanstack/react-query";
1534
+ import { useQuery as useQuery43 } from "@tanstack/react-query";
1545
1535
  var useClusterOverview = (id) => {
1546
- return useQuery45({
1536
+ return useQuery43({
1547
1537
  queryKey: [QueryNames.GetClusterOverview, id],
1548
- queryFn: () => __async(void 0, null, function* () {
1538
+ queryFn: () => __async(null, null, function* () {
1549
1539
  const data = yield ClusterService11.clusterGetClusterOverview(id);
1550
1540
  return data;
1551
1541
  })
@@ -1554,9 +1544,9 @@ var useClusterOverview = (id) => {
1554
1544
 
1555
1545
  // src/hooks/useClusterAllNews.ts
1556
1546
  import { ClusterService as ClusterService12 } from "@geowiki/api-proxy";
1557
- import { useQuery as useQuery46 } from "@tanstack/react-query";
1547
+ import { useQuery as useQuery44 } from "@tanstack/react-query";
1558
1548
  var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status) => {
1559
- return useQuery46({
1549
+ return useQuery44({
1560
1550
  queryKey: [
1561
1551
  QueryNames.ClusterAllNews,
1562
1552
  id,
@@ -1566,7 +1556,7 @@ var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status
1566
1556
  refresh,
1567
1557
  status
1568
1558
  ],
1569
- queryFn: () => __async(void 0, null, function* () {
1559
+ queryFn: () => __async(null, null, function* () {
1570
1560
  const data = yield ClusterService12.clusterGetAllNews(
1571
1561
  id,
1572
1562
  sorting,
@@ -1581,11 +1571,11 @@ var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status
1581
1571
 
1582
1572
  // src/hooks/useNewsFromAllClusters.ts
1583
1573
  import { ClusterService as ClusterService13 } from "@geowiki/api-proxy";
1584
- import { useQuery as useQuery47 } from "@tanstack/react-query";
1574
+ import { useQuery as useQuery45 } from "@tanstack/react-query";
1585
1575
  var useNewsFromAllClusters = (skip = 0, take = 10) => {
1586
- return useQuery47({
1576
+ return useQuery45({
1587
1577
  queryKey: [QueryNames.ClusterAllNews, skip, take],
1588
- queryFn: () => __async(void 0, null, function* () {
1578
+ queryFn: () => __async(null, null, function* () {
1589
1579
  const data = yield ClusterService13.clusterGetAllNewsFromAllClusters(
1590
1580
  "",
1591
1581
  skip,
@@ -1598,11 +1588,11 @@ var useNewsFromAllClusters = (skip = 0, take = 10) => {
1598
1588
 
1599
1589
  // src/hooks/useClusterNewsWithId.ts
1600
1590
  import { ClusterService as ClusterService14 } from "@geowiki/api-proxy";
1601
- import { useQuery as useQuery48 } from "@tanstack/react-query";
1591
+ import { useQuery as useQuery46 } from "@tanstack/react-query";
1602
1592
  var useClusterNewsWithId = (id) => {
1603
- return useQuery48({
1593
+ return useQuery46({
1604
1594
  queryKey: [QueryNames.ClusterNewsWithId, id],
1605
- queryFn: () => __async(void 0, null, function* () {
1595
+ queryFn: () => __async(null, null, function* () {
1606
1596
  const data = yield ClusterService14.clusterGetClusterNewsById(id);
1607
1597
  return data;
1608
1598
  })
@@ -1610,22 +1600,22 @@ var useClusterNewsWithId = (id) => {
1610
1600
  };
1611
1601
 
1612
1602
  // src/hooks/useMapMenuItems.ts
1613
- import { useQuery as useQuery49 } from "@tanstack/react-query";
1603
+ import { useQuery as useQuery47 } from "@tanstack/react-query";
1614
1604
 
1615
1605
  // src/utils/CmsApi.ts
1616
1606
  import {
1617
1607
  QueryApiService,
1618
1608
  SettingsService as SettingsService7
1619
1609
  } from "@geowiki/cms-proxy";
1620
- var getGeoWikiSettings = () => __async(void 0, null, function* () {
1610
+ var getGeoWikiSettings = () => __async(null, null, function* () {
1621
1611
  const req = yield SettingsService7.settingsGetSiteSettings("GeoWiki");
1622
1612
  return req;
1623
1613
  });
1624
- var getDefaultSettings = () => __async(void 0, null, function* () {
1614
+ var getDefaultSettings = () => __async(null, null, function* () {
1625
1615
  const req = yield SettingsService7.settingsGetDefaultSiteSettings();
1626
1616
  return req;
1627
1617
  });
1628
- var getMenus = (displayName) => __async(void 0, null, function* () {
1618
+ var getMenus = (displayName) => __async(null, null, function* () {
1629
1619
  const req = yield getContentWithTypeAndDisplayName(
1630
1620
  "Menu",
1631
1621
  displayName
@@ -1633,7 +1623,7 @@ var getMenus = (displayName) => __async(void 0, null, function* () {
1633
1623
  const menus = req == null ? void 0 : req.items[0];
1634
1624
  return menus;
1635
1625
  });
1636
- var getPageContent = (displayName) => __async(void 0, null, function* () {
1626
+ var getPageContent = (displayName) => __async(null, null, function* () {
1637
1627
  const req = yield getContentWithTypeAndDisplayName(
1638
1628
  "Page",
1639
1629
  displayName
@@ -1641,27 +1631,27 @@ var getPageContent = (displayName) => __async(void 0, null, function* () {
1641
1631
  const page = req == null ? void 0 : req.items[0];
1642
1632
  return page;
1643
1633
  });
1644
- var getContentWithTypeAndDisplayName = (contentType, displayName) => __async(void 0, null, function* () {
1634
+ var getContentWithTypeAndDisplayName = (contentType, displayName) => __async(null, null, function* () {
1645
1635
  return QueryApiService.apiQueryGet(
1646
1636
  "GetContentByTypeAndDisplayText",
1647
1637
  `${JSON.stringify({ contenttype: contentType, displaytext: displayName })}`
1648
1638
  );
1649
1639
  });
1650
- var getContentWithSlug = (slug) => __async(void 0, null, function* () {
1640
+ var getContentWithSlug = (slug) => __async(null, null, function* () {
1651
1641
  const req = yield QueryApiService.apiQueryGet(
1652
1642
  "GetDocumentBySlug",
1653
1643
  `${JSON.stringify({ path: slug })}`
1654
1644
  );
1655
1645
  return req == null ? void 0 : req.items[0];
1656
1646
  });
1657
- var getContentsWithType = (contentType) => __async(void 0, null, function* () {
1647
+ var getContentsWithType = (contentType) => __async(null, null, function* () {
1658
1648
  const req = yield QueryApiService.apiQueryGet(
1659
1649
  "GetContentByType",
1660
1650
  `${JSON.stringify({ contenttype: contentType })}`
1661
1651
  );
1662
1652
  return req == null ? void 0 : req.items;
1663
1653
  });
1664
- var getPageProps = (ctx) => __async(void 0, null, function* () {
1654
+ var getPageProps = (ctx) => __async(null, null, function* () {
1665
1655
  var _a;
1666
1656
  var page = "index";
1667
1657
  const slugs = ctx.query.slug;
@@ -1677,9 +1667,9 @@ var getPageProps = (ctx) => __async(void 0, null, function* () {
1677
1667
 
1678
1668
  // src/hooks/useMapMenuItems.ts
1679
1669
  var useMapMenuItems = () => {
1680
- return useQuery49({
1670
+ return useQuery47({
1681
1671
  queryKey: [QueryNames.MapMenuItems],
1682
- queryFn: () => __async(void 0, null, function* () {
1672
+ queryFn: () => __async(null, null, function* () {
1683
1673
  const req = yield getContentsWithType("MapMenuItem");
1684
1674
  return req;
1685
1675
  })
@@ -1688,11 +1678,11 @@ var useMapMenuItems = () => {
1688
1678
 
1689
1679
  // src/hooks/useClusterLinks.ts
1690
1680
  import { ClusterService as ClusterService15 } from "@geowiki/api-proxy";
1691
- import { useQuery as useQuery50 } from "@tanstack/react-query";
1681
+ import { useQuery as useQuery48 } from "@tanstack/react-query";
1692
1682
  var useClusterLinks = (id) => {
1693
- return useQuery50({
1683
+ return useQuery48({
1694
1684
  queryKey: [QueryNames.GetSocialLinks, id],
1695
- queryFn: () => __async(void 0, null, function* () {
1685
+ queryFn: () => __async(null, null, function* () {
1696
1686
  const data = yield ClusterService15.clusterGetLinksAndPartner(id);
1697
1687
  return data;
1698
1688
  })
@@ -1700,11 +1690,11 @@ var useClusterLinks = (id) => {
1700
1690
  };
1701
1691
 
1702
1692
  // src/hooks/useCmsContentWithType.ts
1703
- import { useQuery as useQuery51 } from "@tanstack/react-query";
1693
+ import { useQuery as useQuery49 } from "@tanstack/react-query";
1704
1694
  var useCmsContentWithType = (contentType) => {
1705
- return useQuery51({
1695
+ return useQuery49({
1706
1696
  queryKey: [QueryNames.GetCmsContentWithType],
1707
- queryFn: () => __async(void 0, null, function* () {
1697
+ queryFn: () => __async(null, null, function* () {
1708
1698
  const req = yield getContentsWithType(contentType);
1709
1699
  return req;
1710
1700
  })
@@ -1713,11 +1703,11 @@ var useCmsContentWithType = (contentType) => {
1713
1703
 
1714
1704
  // src/hooks/useClusterNews.ts
1715
1705
  import { ClusterService as ClusterService16 } from "@geowiki/api-proxy";
1716
- import { useQuery as useQuery52 } from "@tanstack/react-query";
1706
+ import { useQuery as useQuery50 } from "@tanstack/react-query";
1717
1707
  var useClusterNews = (id, sort = "", skip = 0, take = 100) => {
1718
- return useQuery52({
1708
+ return useQuery50({
1719
1709
  queryKey: [QueryNames.ClusterNews, id, sort, skip, take],
1720
- queryFn: () => __async(void 0, null, function* () {
1710
+ queryFn: () => __async(null, null, function* () {
1721
1711
  const data = yield ClusterService16.clusterGetClusterNews(
1722
1712
  id,
1723
1713
  sort,
@@ -1731,11 +1721,11 @@ var useClusterNews = (id, sort = "", skip = 0, take = 100) => {
1731
1721
 
1732
1722
  // src/hooks/useClusterDescription.ts
1733
1723
  import { ClusterService as ClusterService17 } from "@geowiki/api-proxy";
1734
- import { useQuery as useQuery53 } from "@tanstack/react-query";
1724
+ import { useQuery as useQuery51 } from "@tanstack/react-query";
1735
1725
  var useClusterDescription = (id) => {
1736
- return useQuery53({
1726
+ return useQuery51({
1737
1727
  queryKey: [QueryNames.GetClusterDescription, id],
1738
- queryFn: () => __async(void 0, null, function* () {
1728
+ queryFn: () => __async(null, null, function* () {
1739
1729
  const data = yield ClusterService17.clusterGetClusterDescription(id);
1740
1730
  return data;
1741
1731
  })
@@ -1744,11 +1734,11 @@ var useClusterDescription = (id) => {
1744
1734
 
1745
1735
  // src/hooks/useClusterDetails.ts
1746
1736
  import { ClusterService as ClusterService18 } from "@geowiki/api-proxy";
1747
- import { useQuery as useQuery54 } from "@tanstack/react-query";
1737
+ import { useQuery as useQuery52 } from "@tanstack/react-query";
1748
1738
  var useClusterDetails = (id) => {
1749
- return useQuery54({
1739
+ return useQuery52({
1750
1740
  queryKey: [QueryNames.GetClusterDetails, id],
1751
- queryFn: () => __async(void 0, null, function* () {
1741
+ queryFn: () => __async(null, null, function* () {
1752
1742
  const data = yield ClusterService18.clusterGetClusterDetails(id);
1753
1743
  return data;
1754
1744
  })
@@ -1757,11 +1747,11 @@ var useClusterDetails = (id) => {
1757
1747
 
1758
1748
  // src/hooks/useClusterImagesAndVideos.ts
1759
1749
  import { ClusterService as ClusterService19 } from "@geowiki/api-proxy";
1760
- import { useQuery as useQuery55 } from "@tanstack/react-query";
1750
+ import { useQuery as useQuery53 } from "@tanstack/react-query";
1761
1751
  var useClusterImagesAndVideos = (id) => {
1762
- return useQuery55({
1752
+ return useQuery53({
1763
1753
  queryKey: [QueryNames.GetImagesAndVideos, id],
1764
- queryFn: () => __async(void 0, null, function* () {
1754
+ queryFn: () => __async(null, null, function* () {
1765
1755
  const data = yield ClusterService19.clusterGetImagesAndVideos(id);
1766
1756
  return data;
1767
1757
  })
@@ -1769,8 +1759,8 @@ var useClusterImagesAndVideos = (id) => {
1769
1759
  };
1770
1760
 
1771
1761
  // src/hooks/useHost.ts
1772
- import { useQuery as useQuery56 } from "@tanstack/react-query";
1773
- var getHost = () => __async(void 0, null, function* () {
1762
+ import { useQuery as useQuery54 } from "@tanstack/react-query";
1763
+ var getHost = () => __async(null, null, function* () {
1774
1764
  const response = yield fetch("/api/host");
1775
1765
  if (!response.ok) {
1776
1766
  return Promise.reject(null);
@@ -1778,7 +1768,7 @@ var getHost = () => __async(void 0, null, function* () {
1778
1768
  return response.json();
1779
1769
  });
1780
1770
  function useHost() {
1781
- return useQuery56({
1771
+ return useQuery54({
1782
1772
  queryKey: [QueryNames.GetHost],
1783
1773
  queryFn: getHost
1784
1774
  });
@@ -1786,7 +1776,7 @@ function useHost() {
1786
1776
 
1787
1777
  // src/hooks/useHostManagement.ts
1788
1778
  import { useMutation, useQueryClient } from "@tanstack/react-query";
1789
- var createHost = (hostData) => __async(void 0, null, function* () {
1779
+ var createHost = (hostData) => __async(null, null, function* () {
1790
1780
  const response = yield fetch("/api/hosts", {
1791
1781
  method: "POST",
1792
1782
  headers: {
@@ -1799,7 +1789,7 @@ var createHost = (hostData) => __async(void 0, null, function* () {
1799
1789
  }
1800
1790
  return response.json();
1801
1791
  });
1802
- var updateHost = (_a) => __async(void 0, null, function* () {
1792
+ var updateHost = (_a) => __async(null, null, function* () {
1803
1793
  var _b = _a, {
1804
1794
  host
1805
1795
  } = _b, hostData = __objRest(_b, [
@@ -1817,7 +1807,7 @@ var updateHost = (_a) => __async(void 0, null, function* () {
1817
1807
  }
1818
1808
  return response.json();
1819
1809
  });
1820
- var deleteHost = (host) => __async(void 0, null, function* () {
1810
+ var deleteHost = (host) => __async(null, null, function* () {
1821
1811
  const response = yield fetch(`/api/hosts/${host}`, {
1822
1812
  method: "DELETE"
1823
1813
  });
@@ -1863,7 +1853,8 @@ var HostType = /* @__PURE__ */ ((HostType2) => {
1863
1853
 
1864
1854
  // src/utils/ServerHostUtils.ts
1865
1855
  var getHostData = () => {
1866
- return process.env.NODE_ENV === "production" ? [
1856
+ const useProd = process.env.NODE_ENV === "production" || process.env.GEOWIKI_USE_PROD_HOSTS === "true";
1857
+ return useProd ? [
1867
1858
  {
1868
1859
  host: "v2.geo-wiki.org",
1869
1860
  cmsUrl: "https://cms.main.geo-wiki.org"
@@ -1981,21 +1972,21 @@ var getHostData = () => {
1981
1972
  cmsUrl: "https://cms.geowiki.iiasa.ac.at/canopyatlas",
1982
1973
  tenantId: "3a1481ec-90a1-47d0-c34d-70610f97a4e5",
1983
1974
  redirectUrl: "/",
1984
- protectedPaths: ["/map"]
1975
+ protectedPaths: ["/canopy-atlas"]
1985
1976
  },
1986
1977
  {
1987
1978
  host: "canopyatlas.nodes.iiasa.ac.at",
1988
1979
  cmsUrl: "https://cms.geowiki.iiasa.ac.at/canopyatlas",
1989
1980
  tenantId: "3a1481ec-90a1-47d0-c34d-70610f97a4e5",
1990
1981
  redirectUrl: "/",
1991
- protectedPaths: ["/map"]
1982
+ protectedPaths: ["/canopy-atlas"]
1992
1983
  },
1993
1984
  {
1994
1985
  host: "basf.nodes.iiasa.ac.at",
1995
1986
  cmsUrl: "https://cms.main.geo-wiki.org/basf",
1996
1987
  tenantId: "3a16570a-6c13-db58-25f7-1866c09412b7",
1997
1988
  redirectUrl: "/",
1998
- protectedPaths: ["/map"]
1989
+ protectedPaths: ["/canopy-atlas"]
1999
1990
  },
2000
1991
  {
2001
1992
  host: "evo.nodes.iiasa.ac.at",
@@ -2035,6 +2026,13 @@ var getHostData = () => {
2035
2026
  host: "geowiki.local:3000",
2036
2027
  cmsUrl: "https://cms.main.geo-wiki.org"
2037
2028
  },
2029
+ {
2030
+ host: "canopyatlas.local:3000",
2031
+ cmsUrl: "https://cms.geowiki.iiasa.ac.at/canopyatlas",
2032
+ tenantId: "3a1481ec-90a1-47d0-c34d-70610f97a4e5",
2033
+ redirectUrl: "/",
2034
+ protectedPaths: ["/canopy-atlas"]
2035
+ },
2038
2036
  {
2039
2037
  host: "recodo.local:3000",
2040
2038
  cmsUrl: "https://framework.cms.geo-wiki.org"
@@ -2044,6 +2042,12 @@ var getHostData = () => {
2044
2042
  cmsUrl: "https://cms.main.geo-wiki.org/evoland",
2045
2043
  tenantId: "3a0d5d86-5eac-0234-6d1c-eeecdd06739d",
2046
2044
  redirectUrl: "/evoland/projects"
2045
+ },
2046
+ {
2047
+ host: "mowingquest.local:3000",
2048
+ cmsUrl: "https://cms.geowiki.iiasa.ac.at/mowing-quest",
2049
+ tenantId: "3a21f27b-c772-3945-10bb-658707d3670c",
2050
+ redirectUrl: "/"
2047
2051
  }
2048
2052
  ];
2049
2053
  };
@@ -2108,8 +2112,7 @@ var HostService = class {
2108
2112
  * Utility: Check if a path is protected for a host
2109
2113
  */
2110
2114
  static isPathProtected(hostInfo, path) {
2111
- if (!(hostInfo == null ? void 0 : hostInfo.protectedPaths))
2112
- return false;
2115
+ if (!(hostInfo == null ? void 0 : hostInfo.protectedPaths)) return false;
2113
2116
  return hostInfo.protectedPaths.some(
2114
2117
  (protectedPath) => path.startsWith(protectedPath)
2115
2118
  );
@@ -2169,8 +2172,7 @@ var HostService = class {
2169
2172
  * Utility: Get host info for current window location (client-side only)
2170
2173
  */
2171
2174
  static getCurrentHostInfo(hosts) {
2172
- if (typeof window === "undefined")
2173
- return void 0;
2175
+ if (typeof window === "undefined") return void 0;
2174
2176
  return hosts.find((h) => h.host === window.location.host);
2175
2177
  }
2176
2178
  /**
@@ -2405,8 +2407,7 @@ var createI18n = () => {
2405
2407
  let current = "en";
2406
2408
  return {
2407
2409
  locale: (next) => {
2408
- if (next)
2409
- current = next;
2410
+ if (next) current = next;
2410
2411
  return current;
2411
2412
  },
2412
2413
  t: (key) => key
@@ -3064,7 +3065,7 @@ var trackMapEvent = {
3064
3065
 
3065
3066
  // src/auth/AuthContext.tsx
3066
3067
  import { createContext, useContext, useEffect as useEffect4, useMemo as useMemo2 } from "react";
3067
- import { useQuery as useQuery57, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
3068
+ import { useQuery as useQuery55, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
3068
3069
  import { jsx } from "react/jsx-runtime";
3069
3070
  var SESSION_QUERY_KEY = ["geowiki-session"];
3070
3071
  var SessionContext = createContext({
@@ -3093,7 +3094,7 @@ function SessionProvider({
3093
3094
  onSessionChange
3094
3095
  }) {
3095
3096
  const queryClient = useQueryClient2();
3096
- const { data, isLoading } = useQuery57({
3097
+ const { data, isLoading } = useQuery55({
3097
3098
  queryKey: SESSION_QUERY_KEY,
3098
3099
  queryFn: fetchSession,
3099
3100
  initialData: initialSession != null ? initialSession : void 0,
@@ -3155,14 +3156,11 @@ import {
3155
3156
  import { jsx as jsx2 } from "react/jsx-runtime";
3156
3157
  var isBrowser = () => typeof window !== "undefined";
3157
3158
  var queryToSearchParams = (query, target = new URLSearchParams()) => {
3158
- if (!query)
3159
- return target;
3159
+ if (!query) return target;
3160
3160
  for (const [key, value] of Object.entries(query)) {
3161
- if (value === void 0 || value === null)
3162
- continue;
3161
+ if (value === void 0 || value === null) continue;
3163
3162
  if (Array.isArray(value)) {
3164
- for (const v of value)
3165
- target.append(key, String(v));
3163
+ for (const v of value) target.append(key, String(v));
3166
3164
  } else {
3167
3165
  target.set(key, String(value));
3168
3166
  }
@@ -3170,8 +3168,7 @@ var queryToSearchParams = (query, target = new URLSearchParams()) => {
3170
3168
  return target;
3171
3169
  };
3172
3170
  var urlToHref = (url) => {
3173
- if (typeof url === "string")
3174
- return url;
3171
+ if (typeof url === "string") return url;
3175
3172
  const { pathname = "", query, hash } = url;
3176
3173
  const qs = queryToSearchParams(query).toString();
3177
3174
  return `${pathname}${qs ? `?${qs}` : ""}${hash ? `#${hash}` : ""}`;
@@ -3245,15 +3242,11 @@ var DefaultImage = function DefaultImage2(props) {
3245
3242
  ]);
3246
3243
  const resolvedSrc = typeof src === "string" ? src : src == null ? void 0 : src.src;
3247
3244
  const mergedStyle = useMemo3(() => {
3248
- if (!fill && !objectFit && !objectPosition && !style)
3249
- return void 0;
3245
+ if (!fill && !objectFit && !objectPosition && !style) return void 0;
3250
3246
  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;
3247
+ if (fill) Object.assign(out, { position: "absolute", inset: 0, width: "100%", height: "100%" });
3248
+ if (objectFit) out.objectFit = objectFit;
3249
+ if (objectPosition) out.objectPosition = objectPosition;
3257
3250
  return out;
3258
3251
  }, [fill, objectFit, objectPosition, style]);
3259
3252
  return (
@@ -3280,20 +3273,14 @@ var DefaultScript = function DefaultScript2(props) {
3280
3273
  onLoadRef.current = onLoad;
3281
3274
  onErrorRef.current = onError;
3282
3275
  useEffect5(() => {
3283
- if (!src || !isBrowser())
3284
- return;
3276
+ if (!src || !isBrowser()) return;
3285
3277
  const el = document.createElement("script");
3286
3278
  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;
3279
+ if (id) el.id = id;
3280
+ if (async) el.async = true;
3281
+ if (defer) el.defer = true;
3282
+ if (type) el.type = type;
3283
+ if (nonce) el.nonce = nonce;
3297
3284
  el.onload = () => {
3298
3285
  var _a2;
3299
3286
  return (_a2 = onLoadRef.current) == null ? void 0 : _a2.call(onLoadRef);
@@ -3327,8 +3314,7 @@ var parseSearch = (search) => {
3327
3314
  var useLocation2 = () => {
3328
3315
  const [tick, setTick] = useState2(0);
3329
3316
  useEffect5(() => {
3330
- if (!isBrowser())
3331
- return;
3317
+ if (!isBrowser()) return;
3332
3318
  const handler = () => setTick((t) => t + 1);
3333
3319
  window.addEventListener("popstate", handler);
3334
3320
  return () => window.removeEventListener("popstate", handler);
@@ -3349,31 +3335,26 @@ var useLocation2 = () => {
3349
3335
  var useDefaultRouter = () => {
3350
3336
  const loc = useLocation2();
3351
3337
  const query = useMemo3(() => parseSearch(loc.search), [loc.search]);
3352
- const push = useCallback2((url) => __async(void 0, null, function* () {
3353
- if (!isBrowser())
3354
- return false;
3338
+ const push = useCallback2((url) => __async(null, null, function* () {
3339
+ if (!isBrowser()) return false;
3355
3340
  window.history.pushState({}, "", urlToHref(url));
3356
3341
  window.dispatchEvent(new PopStateEvent("popstate"));
3357
3342
  return true;
3358
3343
  }), []);
3359
- const replace = useCallback2((url) => __async(void 0, null, function* () {
3360
- if (!isBrowser())
3361
- return false;
3344
+ const replace = useCallback2((url) => __async(null, null, function* () {
3345
+ if (!isBrowser()) return false;
3362
3346
  window.history.replaceState({}, "", urlToHref(url));
3363
3347
  window.dispatchEvent(new PopStateEvent("popstate"));
3364
3348
  return true;
3365
3349
  }), []);
3366
3350
  const back = useCallback2(() => {
3367
- if (isBrowser())
3368
- window.history.back();
3351
+ if (isBrowser()) window.history.back();
3369
3352
  }, []);
3370
3353
  const forward = useCallback2(() => {
3371
- if (isBrowser())
3372
- window.history.forward();
3354
+ if (isBrowser()) window.history.forward();
3373
3355
  }, []);
3374
3356
  const reload = useCallback2(() => {
3375
- if (isBrowser())
3376
- window.location.reload();
3357
+ if (isBrowser()) window.location.reload();
3377
3358
  }, []);
3378
3359
  return useMemo3(
3379
3360
  () => ({
@@ -3426,7 +3407,7 @@ var useDefaultI18n = () => ({
3426
3407
  t: (key) => key
3427
3408
  });
3428
3409
  var defaultDynamic = (loader, options) => {
3429
- const Lazy = lazy(() => __async(void 0, null, function* () {
3410
+ const Lazy = lazy(() => __async(null, null, function* () {
3430
3411
  return unwrapDefault(yield loader());
3431
3412
  }));
3432
3413
  const Loading = options == null ? void 0 : options.loading;