@opengeoweb/warnings 9.17.0 → 9.19.0

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/index.esm.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useState, useEffect, useRef } from 'react';
3
3
  import { useDispatch, useSelector } from 'react-redux';
4
- import { Polygons, Share, ExitDomain, Edit, Delete, DrawPolygon, Visibility, Add, Wind, Fog, Lightning, Snow, Rain, TemperatureHigh, TemperatureLow, CoastalEvent, breakpoints, Options, VisibilityOff, Success } from '@opengeoweb/theme';
4
+ import { Polygons, Share, ExitDomain, Edit, Delete, DrawPolygon, Visibility, Add, Wind, Fog, Lightning, Snow, Rain, TemperatureHigh, TemperatureLow, CoastalEvent, breakpoints, Options, Copy, Success, Expire, Remove } from '@opengeoweb/theme';
5
5
  import { uiTypes, uiActions, getSingularDrawtoolDrawLayerId, drawtoolSelectors, layerSelectors, uiSelectors, mapStoreActions, drawtoolActions, layerActions, useSetupDialog } from '@opengeoweb/store';
6
6
  import { defaultPolygon, emptyGeoJSON, MapControlButton, getIcon, rewindGeometry, getGeoJSONPropertyValue, currentlySupportedDrawModes, MapView, MapViewLayer, defaultLayers, getFeatureExtent } from '@opengeoweb/webmap-react';
7
- import { handleOutsideComponentTranslations, useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, LastUpdateTime, StatusTag, ErrorBoundary, pollingIntervalTimeout, isAxiosError as isAxiosError$1 } from '@opengeoweb/shared';
7
+ import { useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, LastUpdateTime, StatusTag, ErrorBoundary, pollingIntervalTimeout, isAxiosError as isAxiosError$1 } from '@opengeoweb/shared';
8
8
  import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware, isAnyOf } from '@reduxjs/toolkit';
9
- import 'i18next';
9
+ import i18n from 'i18next';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import { defaultBbox } from '@opengeoweb/core';
12
12
  import { snackbarActions } from '@opengeoweb/snackbar';
@@ -99,10 +99,6 @@ var en = {
99
99
  "warning-dialog-delete-title": "Delete warning",
100
100
  "warning-dialog-delete-confirm": "Delete",
101
101
  "warning-dialog-delete-description": "Are you sure you want to delete this warning?",
102
- "warning-dialog-ignore-succes": "Warning has been ignored",
103
- "warning-dialog-ignore-title": "Ignore warning",
104
- "warning-dialog-ignore-confirm": "Ignore",
105
- "warning-dialog-ignore-description": "Are you sure you want to ignore this warning?",
106
102
  "warning-save-succes": "Public warning has succesfully been saved!",
107
103
  "warning-publish-succes": "Public warning has succesfully been published!",
108
104
  "warning-editor-user-viewer": "Viewer",
@@ -111,8 +107,11 @@ var en = {
111
107
  "warning-editor-remove-editor": "You are now no longer the editor for this warning",
112
108
  "warning-list-button_create": "Create a warning",
113
109
  "warning-list-button-use": "Use",
114
- "warning-list-button-ignore": "Ignore",
115
110
  "warning-list-button-options": "Options",
111
+ "warning-list-button-duplicate": "Duplicate",
112
+ "warning-list-button-update": "Update",
113
+ "warning-list-button-expire": "Expire",
114
+ "warning-list-button-withdraw": "Withdraw",
116
115
  "warning-list-status-draft": "Drafts",
117
116
  "warning-list-status-published": "Published",
118
117
  "warning-list-status-todo": "Reviews",
@@ -204,10 +203,6 @@ var nl = {
204
203
  "warning-dialog-delete-title": "Waarschuwing verwijderen",
205
204
  "warning-dialog-delete-confirm": "Verwijderen",
206
205
  "warning-dialog-delete-description": "Weet je zeker dat je deze waarschuwing wilt verwijderen?",
207
- "warning-dialog-ignore-succes": "Waarschuwing is genegeerd",
208
- "warning-dialog-ignore-title": "Waarschuwing negeren",
209
- "warning-dialog-ignore-confirm": "Negeren",
210
- "warning-dialog-ignore-description": "Weet je zeker dat je deze waarschuwing wilt negeren?",
211
206
  "warning-save-succes": "Publieke waarschuwing is succesvol opgeslagen!",
212
207
  "warning-publish-succes": "Publieke waarschuwing is succesvol gepubliceerd!",
213
208
  "warning-editor-add-editor": "Je bent nu de editor van deze waarschuwing",
@@ -216,8 +211,11 @@ var nl = {
216
211
  "warning-editor-user-editor": "Editor",
217
212
  "warning-list-button_create": "Maak waarschuwing",
218
213
  "warning-list-button-use": "Gebruik",
219
- "warning-list-button-ignore": "Negeer",
220
214
  "warning-list-button-options": "Opties",
215
+ "warning-list-button-duplicate": "Dupliceren",
216
+ "warning-list-button-update": "Bijwerken",
217
+ "warning-list-button-expire": "Verlopen",
218
+ "warning-list-button-withdraw": "Intrekken",
221
219
  "warning-list-status-draft": "Concepten",
222
220
  "warning-list-status-published": "Gepubliceerd",
223
221
  "warning-list-status-todo": "Te doen",
@@ -309,10 +307,6 @@ var fi = {
309
307
  "warning-dialog-delete-title": "ei käännetty",
310
308
  "warning-dialog-delete-confirm": "ei käännetty",
311
309
  "warning-dialog-delete-description": "ei käännetty",
312
- "warning-dialog-ignore-succes": "ei käännetty",
313
- "warning-dialog-ignore-title": "ei käännetty",
314
- "warning-dialog-ignore-confirm": "ei käännetty",
315
- "warning-dialog-ignore-description": "ei käännetty",
316
310
  "warning-save-succes": "ei käännetty",
317
311
  "warning-publish-succes": "ei käännetty",
318
312
  "warning-editor-user-viewer": "ei käännetty",
@@ -321,8 +315,11 @@ var fi = {
321
315
  "warning-editor-remove-editor": "ei käännetty",
322
316
  "warning-list-button_create": "ei käännetty",
323
317
  "warning-list-button-use": "ei käännetty",
324
- "warning-list-button-ignore": "ei käännetty",
325
318
  "warning-list-button-options": "ei käännetty",
319
+ "warning-list-button-duplicate": "ei käännetty",
320
+ "warning-list-button-update": "ei käännetty",
321
+ "warning-list-button-expire": "ei käännetty",
322
+ "warning-list-button-withdraw": "ei käännetty",
326
323
  "warning-list-status-draft": "ei käännetty",
327
324
  "warning-list-status-published": "ei käännetty",
328
325
  "warning-list-status-todo": "ei käännetty",
@@ -414,10 +411,6 @@ var no = {
414
411
  "warning-dialog-delete-title": "Slett varsel",
415
412
  "warning-dialog-delete-confirm": "Slett",
416
413
  "warning-dialog-delete-description": "Er du sikker på at du vil slette varselet?",
417
- "warning-dialog-ignore-succes": "Varselet er blitt ignorert",
418
- "warning-dialog-ignore-title": "Ignorer varselet",
419
- "warning-dialog-ignore-confirm": "Ignorer",
420
- "warning-dialog-ignore-description": "Er du sikker på at du vil ignorere dette varselet?",
421
414
  "warning-save-succes": "Farevarselet er lagret!",
422
415
  "warning-publish-succes": "Farevarselet er publisert!",
423
416
  "warning-editor-user-viewer": "Visningsmodus",
@@ -426,8 +419,11 @@ var no = {
426
419
  "warning-editor-remove-editor": "Du editerer ikke lenger dette varselet",
427
420
  "warning-list-button_create": "Lag et farevarsel",
428
421
  "warning-list-button-use": "Bruk",
429
- "warning-list-button-ignore": "Ignorer",
430
422
  "warning-list-button-options": "Valg",
423
+ "warning-list-button-duplicate": "Dupliser",
424
+ "warning-list-button-update": "ikke oversatt",
425
+ "warning-list-button-expire": "ikke oversatt",
426
+ "warning-list-button-withdraw": "ikke oversatt",
431
427
  "warning-list-status-draft": "Utkast",
432
428
  "warning-list-status-published": "Publisert",
433
429
  "warning-list-status-todo": "Til sjekk",
@@ -633,378 +629,93 @@ const {
633
629
  });
634
630
  const getWarningFormDirty = createSelector(selectDrawByInstanceId, drawing => (drawing === null || drawing === void 0 ? void 0 : drawing.isFormDirty) || false);
635
631
 
636
- /* *
637
- * Licensed under the Apache License, Version 2.0 (the "License");
638
- * you may not use this file except in compliance with the License.
639
- * You may obtain a copy of the License at
640
- *
641
- * http://www.apache.org/licenses/LICENSE-2.0
642
- *
643
- * Unless required by applicable law or agreed to in writing, software
644
- * distributed under the License is distributed on an "AS IS" BASIS,
645
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
646
- * See the License for the specific language governing permissions and
647
- * limitations under the License.
648
- *
649
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
650
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
651
- * */
652
- const WARN_NAMESPACE = 'warn';
653
- const outsideComponentTranslations = handleOutsideComponentTranslations(warningsTranslations, WARN_NAMESPACE);
654
- const useWarningsTranslation = () => useTranslation(WARN_NAMESPACE);
632
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
655
633
 
656
- /* *
657
- * Licensed under the Apache License, Version 2.0 (the "License");
658
- * you may not use this file except in compliance with the License.
659
- * You may obtain a copy of the License at
660
- *
661
- * http://www.apache.org/licenses/LICENSE-2.0
662
- *
663
- * Unless required by applicable law or agreed to in writing, software
664
- * distributed under the License is distributed on an "AS IS" BASIS,
665
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
666
- * See the License for the specific language governing permissions and
667
- * limitations under the License.
668
- *
669
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
670
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
671
- * */
672
- const confirmationDialogOptions = t => {
673
- return {
674
- cancelLabel: t('close-dialog-cancel'),
675
- title: t('close-draw-dialog-title'),
676
- description: t('close-dialog-description'),
677
- confirmLabel: t('close-dialog-confirm'),
678
- catchOnCancel: true
679
- };
634
+ var check = function (it) {
635
+ return it && it.Math === Math && it;
680
636
  };
681
- const useCloseDrawDialog = ({
682
- mapId,
683
- source
684
- }) => {
685
- const {
686
- t
687
- } = useWarningsTranslation();
688
- const dispatch = useDispatch();
689
- const drawLayerId = getSingularDrawtoolDrawLayerId(mapId);
690
- const drawDialogActiveDrawModeId = useSelector(store => drawtoolSelectors.getActiveDrawModeId(store, drawingDialogType));
691
- const featureLayerContainsGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, drawLayerId));
692
- const dialogError = useSelector(store => uiSelectors.getDialogError(store, drawingDialogType));
693
- const isFormDirty = useSelector(store => getWarningFormDirty(store, drawingDialogType));
694
- const confirmDialog = useConfirmationDialog();
695
- const closeDrawDialog = (skipConfirmationDialog = false) => __awaiter(void 0, void 0, void 0, function* () {
696
- if (isFormDirty && !skipConfirmationDialog) {
697
- const mayProceed = yield confirmDialog(confirmationDialogOptions(t)).then(() => true).catch(() => false);
698
- if (!mayProceed) {
699
- return;
700
- }
701
- }
702
- if (drawDialogActiveDrawModeId) {
703
- // disable the edit layer
704
- dispatch(layerActions.toggleFeatureMode({
705
- layerId: drawLayerId,
706
- isInEditMode: false,
707
- drawMode: ''
708
- }));
709
- // reset active draw tool
710
- dispatch(drawtoolActions.changeDrawToolMode({
711
- drawToolId: drawingDialogType,
712
- drawModeId: drawDialogActiveDrawModeId
713
- }));
714
- }
715
- // close draw dialog
716
- dispatch(uiActions.setActiveMapIdForDialog({
717
- type: drawingDialogType,
718
- mapId,
719
- setOpen: false,
720
- source
721
- }));
722
- // reset all drawings fields
723
- dispatch(drawActions.setDrawValues({
724
- drawingInstanceId: drawingDialogType,
725
- objectName: '',
726
- id: ''
727
- }));
728
- // reset error
729
- if (dialogError) {
730
- dispatch(uiActions.setErrorDialog({
731
- type: drawingDialogType,
732
- error: ''
733
- }));
734
- }
735
- // clear existing geoJSON
736
- if (featureLayerContainsGeoJSON) {
737
- dispatch(mapStoreActions.layerChangeGeojson({
738
- layerId: drawLayerId,
739
- geojson: emptyGeoJSON
740
- }));
741
- }
742
- });
743
- return {
744
- closeDrawDialog
745
- };
637
+
638
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
639
+ var global$i =
640
+ // eslint-disable-next-line es/no-global-this -- safe
641
+ check(typeof globalThis == 'object' && globalThis) ||
642
+ check(typeof window == 'object' && window) ||
643
+ // eslint-disable-next-line no-restricted-globals -- safe
644
+ check(typeof self == 'object' && self) ||
645
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
646
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
647
+ // eslint-disable-next-line no-new-func -- fallback
648
+ (function () { return this; })() || Function('return this')();
649
+
650
+ var objectGetOwnPropertyDescriptor = {};
651
+
652
+ var fails$l = function (exec) {
653
+ try {
654
+ return !!exec();
655
+ } catch (error) {
656
+ return true;
657
+ }
746
658
  };
747
- const useCloseObjectDialog = ({
748
- mapId,
749
- source
750
- }) => {
751
- const dispatch = useDispatch();
752
- const drawLayerId = getSingularDrawtoolDrawLayerId(mapId);
753
- const featureLayerContainsGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, drawLayerId));
754
- const closeObjectDialog = (shouldReset = true) => {
755
- // reset active object
756
- if (shouldReset) {
757
- dispatch(drawActions.setDrawValues({
758
- drawingInstanceId: drawingDialogType,
759
- objectName: '',
760
- id: ''
761
- }));
762
- }
763
- // close object dialog
764
- dispatch(uiActions.setActiveMapIdForDialog({
765
- type: objectDialogType,
766
- mapId,
767
- setOpen: false,
768
- source
769
- }));
770
- if (featureLayerContainsGeoJSON && shouldReset) {
771
- dispatch(mapStoreActions.layerChangeGeojson({
772
- layerId: drawLayerId,
773
- geojson: emptyGeoJSON
774
- }));
775
- }
776
- };
777
- return {
778
- closeObjectDialog
779
- };
659
+
660
+ var fails$k = fails$l;
661
+
662
+ // Detect IE8's incomplete defineProperty implementation
663
+ var descriptors = !fails$k(function () {
664
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
665
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
666
+ });
667
+
668
+ var fails$j = fails$l;
669
+
670
+ var functionBindNative = !fails$j(function () {
671
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
672
+ var test = (function () { /* empty */ }).bind();
673
+ // eslint-disable-next-line no-prototype-builtins -- safe
674
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
675
+ });
676
+
677
+ var NATIVE_BIND$2 = functionBindNative;
678
+
679
+ var call$b = Function.prototype.call;
680
+
681
+ var functionCall = NATIVE_BIND$2 ? call$b.bind(call$b) : function () {
682
+ return call$b.apply(call$b, arguments);
780
683
  };
781
- const useDialogOptions = ({
782
- dialogType
783
- }) => {
784
- const isDialogOpen = useSelector(store => uiSelectors.getisDialogOpen(store, dialogType));
785
- const dialogMapId = useSelector(store => uiSelectors.getDialogMapId(store, dialogType));
786
- const dialogLayerId = getSingularDrawtoolDrawLayerId(dialogMapId);
787
- const hasGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, dialogLayerId));
684
+
685
+ var objectPropertyIsEnumerable = {};
686
+
687
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
688
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
689
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
690
+
691
+ // Nashorn ~ JDK8 bug
692
+ var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
693
+
694
+ // `Object.prototype.propertyIsEnumerable` method implementation
695
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
696
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
697
+ var descriptor = getOwnPropertyDescriptor$2(this, V);
698
+ return !!descriptor && descriptor.enumerable;
699
+ } : $propertyIsEnumerable;
700
+
701
+ var createPropertyDescriptor$4 = function (bitmap, value) {
788
702
  return {
789
- isDialogOpen,
790
- dialogMapId,
791
- hasGeoJSON,
792
- dialogLayerId
703
+ enumerable: !(bitmap & 1),
704
+ configurable: !(bitmap & 2),
705
+ writable: !(bitmap & 4),
706
+ value: value
793
707
  };
794
708
  };
795
- const useObjectDrawDialogAction = ({
796
- mapId,
797
- source
798
- }) => {
799
- const {
800
- t
801
- } = useWarningsTranslation();
802
- const dispatch = useDispatch();
803
- const confirmDialog = useConfirmationDialog();
804
- const currentDrawLayerId = getSingularDrawtoolDrawLayerId(mapId);
805
- // draw selectors
806
- const {
807
- isDialogOpen: isDrawDialogOpen,
808
- hasGeoJSON: drawDialogLayerHasGeoJSON,
809
- dialogLayerId: drawDialogLayerId
810
- } = useDialogOptions({
811
- dialogType: drawingDialogType
812
- });
813
- const drawDialogActiveDrawModeId = useSelector(store => drawtoolSelectors.getActiveDrawModeId(store, drawingDialogType));
814
- const isFormDirty = useSelector(store => getWarningFormDirty(store, drawingDialogType));
815
- // object selectors
816
- const {
817
- isDialogOpen: isObjectDialogOpen,
818
- hasGeoJSON: objectDialogLayerHasGeoJSON,
819
- dialogLayerId: objectDialogLayerId
820
- } = useDialogOptions({
821
- dialogType: objectDialogType
822
- });
823
- const clearGeoJSON = layerId => {
824
- dispatch(mapStoreActions.layerChangeGeojson({
825
- layerId,
826
- geojson: emptyGeoJSON
827
- }));
828
- };
829
- const openObjectDialog = () => __awaiter(void 0, void 0, void 0, function* () {
830
- if (isDrawDialogOpen) {
831
- if (isFormDirty) {
832
- const mayProceed = yield confirmDialog(confirmationDialogOptions(t)).then(() => true).catch(() => false);
833
- if (!mayProceed) {
834
- return;
835
- }
836
- }
837
- if (drawDialogLayerHasGeoJSON) {
838
- clearGeoJSON(drawDialogLayerId);
839
- }
840
- closeDrawDialog(true);
841
- }
842
- // open object dialog
843
- dispatch(uiActions.setActiveMapIdForDialog({
844
- type: objectDialogType,
845
- mapId,
846
- setOpen: true,
847
- source
848
- }));
849
- // move shape to screen
850
- if (isObjectDialogOpen && objectDialogLayerHasGeoJSON) {
851
- // update new shape
852
- dispatch(mapStoreActions.layerSetGeojsonFromLayer({
853
- layerId: currentDrawLayerId,
854
- sourceLayerId: objectDialogLayerId
855
- }));
856
- // remove current shape
857
- clearGeoJSON(objectDialogLayerId);
858
- }
859
- });
860
- const openDrawDialog = newGeoJSON => {
861
- if (isObjectDialogOpen) {
862
- if (objectDialogLayerHasGeoJSON) {
863
- clearGeoJSON(objectDialogLayerId);
864
- }
865
- const shouldResetShape = newGeoJSON === undefined;
866
- closeObjectDialog(shouldResetShape);
867
- }
868
- // open draw dialog
869
- dispatch(uiActions.setActiveMapIdForDialog({
870
- type: drawingDialogType,
871
- mapId,
872
- setOpen: true,
873
- source
874
- }));
875
- // activate draw tool
876
- dispatch(drawtoolActions.updateGeoJSONLayerId({
877
- drawToolId: drawingDialogType,
878
- geoJSONLayerId: currentDrawLayerId
879
- }));
880
- // activate default draw mode
881
- if (!drawDialogActiveDrawModeId && !isDrawDialogOpen) {
882
- dispatch(drawtoolActions.changeDrawToolMode({
883
- drawToolId: drawingDialogType,
884
- drawModeId: defaultPolygon.drawModeId
885
- }));
886
- }
887
- // move shape to screen
888
- if (isDrawDialogOpen && drawDialogLayerHasGeoJSON) {
889
- // update new shape
890
- dispatch(mapStoreActions.layerSetGeojsonFromLayer({
891
- layerId: currentDrawLayerId,
892
- sourceLayerId: drawDialogLayerId
893
- }));
894
- // remove current shape
895
- clearGeoJSON(drawDialogLayerId);
896
- }
897
- if (drawDialogActiveDrawModeId) {
898
- // activate current
899
- dispatch(layerActions.toggleFeatureMode({
900
- layerId: currentDrawLayerId,
901
- isInEditMode: true,
902
- drawMode: drawDialogActiveDrawModeId
903
- }));
904
- // deactivate previous
905
- dispatch(layerActions.toggleFeatureMode({
906
- layerId: drawDialogLayerId,
907
- isInEditMode: false,
908
- drawMode: ''
909
- }));
910
- }
911
- if (newGeoJSON) {
912
- dispatch(mapStoreActions.layerChangeGeojson({
913
- layerId: currentDrawLayerId,
914
- geojson: newGeoJSON
915
- }));
916
- }
917
- };
918
- const {
919
- closeDrawDialog
920
- } = useCloseDrawDialog({
921
- mapId,
922
- source
923
- });
924
- const {
925
- closeObjectDialog
926
- } = useCloseObjectDialog({
927
- mapId,
928
- source
929
- });
930
- return {
931
- closeDrawDialog,
932
- closeObjectDialog,
933
- openObjectDialog,
934
- openDrawDialog
935
- };
936
- };
937
-
938
- /* *
939
- * Licensed under the Apache License, Version 2.0 (the "License");
940
- * you may not use this file except in compliance with the License.
941
- * You may obtain a copy of the License at
942
- *
943
- * http://www.apache.org/licenses/LICENSE-2.0
944
- *
945
- * Unless required by applicable law or agreed to in writing, software
946
- * distributed under the License is distributed on an "AS IS" BASIS,
947
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
948
- * See the License for the specific language governing permissions and
949
- * limitations under the License.
950
- *
951
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
952
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
953
- * */
954
- const ObjectManagerMapButtonConnect = ({
955
- mapId,
956
- source: _source = 'app'
957
- }) => {
958
- const objectDialogMapId = useSelector(store => uiSelectors.getDialogMapId(store, objectDialogType));
959
- const isObjectDialogOpen = useSelector(store => uiSelectors.getisDialogOpen(store, objectDialogType));
960
- const {
961
- openObjectDialog,
962
- closeObjectDialog
963
- } = useObjectDrawDialogAction({
964
- mapId,
965
- source: _source
966
- });
967
- const onClick = () => {
968
- const shouldOpen = objectDialogMapId !== mapId ? true : !isObjectDialogOpen;
969
- shouldOpen ? openObjectDialog() : closeObjectDialog();
970
- };
971
- const isOpen = objectDialogMapId === mapId && isObjectDialogOpen;
972
- return /*#__PURE__*/React__default.createElement(MapControlButton, {
973
- "aria-label": `Object Manager Button for ${mapId}`,
974
- title: "Object Manager",
975
- onClick: onClick,
976
- isActive: isOpen
977
- }, /*#__PURE__*/React__default.createElement(Polygons, null));
978
- };
979
-
980
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
981
-
982
- var fails$l = function (exec) {
983
- try {
984
- return !!exec();
985
- } catch (error) {
986
- return true;
987
- }
988
- };
989
-
990
- var fails$k = fails$l;
991
-
992
- var functionBindNative = !fails$k(function () {
993
- // eslint-disable-next-line es/no-function-prototype-bind -- safe
994
- var test = (function () { /* empty */ }).bind();
995
- // eslint-disable-next-line no-prototype-builtins -- safe
996
- return typeof test != 'function' || test.hasOwnProperty('prototype');
997
- });
998
-
999
- var NATIVE_BIND$2 = functionBindNative;
1000
-
1001
- var FunctionPrototype$2 = Function.prototype;
1002
- var call$b = FunctionPrototype$2.call;
1003
- var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$b, call$b);
1004
-
1005
- var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
1006
- return function () {
1007
- return call$b.apply(fn, arguments);
709
+
710
+ var NATIVE_BIND$1 = functionBindNative;
711
+
712
+ var FunctionPrototype$2 = Function.prototype;
713
+ var call$a = FunctionPrototype$2.call;
714
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$a, call$a);
715
+
716
+ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
717
+ return function () {
718
+ return call$a.apply(fn, arguments);
1008
719
  };
1009
720
  };
1010
721
 
@@ -1018,14 +729,14 @@ var classofRaw$1 = function (it) {
1018
729
  };
1019
730
 
1020
731
  var uncurryThis$h = functionUncurryThis;
1021
- var fails$j = fails$l;
732
+ var fails$i = fails$l;
1022
733
  var classof$6 = classofRaw$1;
1023
734
 
1024
735
  var $Object$4 = Object;
1025
736
  var split = uncurryThis$h(''.split);
1026
737
 
1027
738
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
1028
- var indexedObject = fails$j(function () {
739
+ var indexedObject = fails$i(function () {
1029
740
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
1030
741
  // eslint-disable-next-line no-prototype-builtins -- safe
1031
742
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -1058,128 +769,78 @@ var toIndexedObject$5 = function (it) {
1058
769
  return IndexedObject$2(requireObjectCoercible$5(it));
1059
770
  };
1060
771
 
1061
- var check = function (it) {
1062
- return it && it.Math === Math && it;
772
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
773
+ var documentAll = typeof document == 'object' && document.all;
774
+
775
+ // `IsCallable` abstract operation
776
+ // https://tc39.es/ecma262/#sec-iscallable
777
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
778
+ var isCallable$i = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
779
+ return typeof argument == 'function' || argument === documentAll;
780
+ } : function (argument) {
781
+ return typeof argument == 'function';
1063
782
  };
1064
783
 
1065
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
1066
- var global$i =
1067
- // eslint-disable-next-line es/no-global-this -- safe
1068
- check(typeof globalThis == 'object' && globalThis) ||
1069
- check(typeof window == 'object' && window) ||
1070
- // eslint-disable-next-line no-restricted-globals -- safe
1071
- check(typeof self == 'object' && self) ||
1072
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
1073
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
1074
- // eslint-disable-next-line no-new-func -- fallback
1075
- (function () { return this; })() || Function('return this')();
784
+ var isCallable$h = isCallable$i;
1076
785
 
1077
- var sharedStore = {exports: {}};
786
+ var isObject$a = function (it) {
787
+ return typeof it == 'object' ? it !== null : isCallable$h(it);
788
+ };
1078
789
 
1079
790
  var global$h = global$i;
791
+ var isCallable$g = isCallable$i;
1080
792
 
1081
- // eslint-disable-next-line es/no-object-defineproperty -- safe
1082
- var defineProperty$7 = Object.defineProperty;
793
+ var aFunction = function (argument) {
794
+ return isCallable$g(argument) ? argument : undefined;
795
+ };
1083
796
 
1084
- var defineGlobalProperty$3 = function (key, value) {
1085
- try {
1086
- defineProperty$7(global$h, key, { value: value, configurable: true, writable: true });
1087
- } catch (error) {
1088
- global$h[key] = value;
1089
- } return value;
797
+ var getBuiltIn$5 = function (namespace, method) {
798
+ return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
1090
799
  };
1091
800
 
1092
- var globalThis$1 = global$i;
1093
- var defineGlobalProperty$2 = defineGlobalProperty$3;
801
+ var uncurryThis$g = functionUncurryThis;
1094
802
 
1095
- var SHARED = '__core-js_shared__';
1096
- var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
803
+ var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf);
1097
804
 
1098
- (store$3.versions || (store$3.versions = [])).push({
1099
- version: '3.36.1',
1100
- mode: 'global',
1101
- copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
1102
- license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
1103
- source: 'https://github.com/zloirock/core-js'
1104
- });
805
+ var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
1105
806
 
1106
- var store$2 = sharedStore.exports;
807
+ var global$g = global$i;
808
+ var userAgent = engineUserAgent;
1107
809
 
1108
- var shared$4 = function (key, value) {
1109
- return store$2[key] || (store$2[key] = value || {});
1110
- };
810
+ var process = global$g.process;
811
+ var Deno = global$g.Deno;
812
+ var versions = process && process.versions || Deno && Deno.version;
813
+ var v8 = versions && versions.v8;
814
+ var match, version;
1111
815
 
1112
- var requireObjectCoercible$4 = requireObjectCoercible$6;
816
+ if (v8) {
817
+ match = v8.split('.');
818
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
819
+ // but their correct versions are not interesting for us
820
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
821
+ }
1113
822
 
1114
- var $Object$3 = Object;
1115
-
1116
- // `ToObject` abstract operation
1117
- // https://tc39.es/ecma262/#sec-toobject
1118
- var toObject$5 = function (argument) {
1119
- return $Object$3(requireObjectCoercible$4(argument));
1120
- };
1121
-
1122
- var uncurryThis$g = functionUncurryThis;
1123
- var toObject$4 = toObject$5;
1124
-
1125
- var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
1126
-
1127
- // `HasOwnProperty` abstract operation
1128
- // https://tc39.es/ecma262/#sec-hasownproperty
1129
- // eslint-disable-next-line es/no-object-hasown -- safe
1130
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
1131
- return hasOwnProperty(toObject$4(it), key);
1132
- };
1133
-
1134
- var uncurryThis$f = functionUncurryThis;
1135
-
1136
- var id = 0;
1137
- var postfix = Math.random();
1138
- var toString$8 = uncurryThis$f(1.0.toString);
1139
-
1140
- var uid$2 = function (key) {
1141
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
1142
- };
1143
-
1144
- var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
1145
-
1146
- var global$g = global$i;
1147
- var userAgent = engineUserAgent;
1148
-
1149
- var process = global$g.process;
1150
- var Deno = global$g.Deno;
1151
- var versions = process && process.versions || Deno && Deno.version;
1152
- var v8 = versions && versions.v8;
1153
- var match, version;
1154
-
1155
- if (v8) {
1156
- match = v8.split('.');
1157
- // in old Chrome, versions of V8 isn't V8 = Chrome / 10
1158
- // but their correct versions are not interesting for us
1159
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
1160
- }
1161
-
1162
- // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
1163
- // so check `userAgent` even if `.v8` exists, but 0
1164
- if (!version && userAgent) {
1165
- match = userAgent.match(/Edge\/(\d+)/);
1166
- if (!match || match[1] >= 74) {
1167
- match = userAgent.match(/Chrome\/(\d+)/);
1168
- if (match) version = +match[1];
1169
- }
1170
- }
823
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
824
+ // so check `userAgent` even if `.v8` exists, but 0
825
+ if (!version && userAgent) {
826
+ match = userAgent.match(/Edge\/(\d+)/);
827
+ if (!match || match[1] >= 74) {
828
+ match = userAgent.match(/Chrome\/(\d+)/);
829
+ if (match) version = +match[1];
830
+ }
831
+ }
1171
832
 
1172
833
  var engineV8Version = version;
1173
834
 
1174
835
  /* eslint-disable es/no-symbol -- required for testing */
1175
836
  var V8_VERSION = engineV8Version;
1176
- var fails$i = fails$l;
837
+ var fails$h = fails$l;
1177
838
  var global$f = global$i;
1178
839
 
1179
840
  var $String$5 = global$f.String;
1180
841
 
1181
842
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
1182
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$i(function () {
843
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$h(function () {
1183
844
  var symbol = Symbol('symbol detection');
1184
845
  // Chrome 38 Symbol has incorrect toString conversion
1185
846
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -1197,144 +858,25 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
1197
858
  && !Symbol.sham
1198
859
  && typeof Symbol.iterator == 'symbol';
1199
860
 
1200
- var global$e = global$i;
1201
- var shared$3 = shared$4;
1202
- var hasOwn$a = hasOwnProperty_1;
1203
- var uid$1 = uid$2;
1204
- var NATIVE_SYMBOL$1 = symbolConstructorDetection;
1205
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
1206
-
1207
- var Symbol$2 = global$e.Symbol;
1208
- var WellKnownSymbolsStore = shared$3('wks');
1209
- var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
1210
-
1211
- var wellKnownSymbol$a = function (name) {
1212
- if (!hasOwn$a(WellKnownSymbolsStore, name)) {
1213
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$a(Symbol$2, name)
1214
- ? Symbol$2[name]
1215
- : createWellKnownSymbol('Symbol.' + name);
1216
- } return WellKnownSymbolsStore[name];
1217
- };
1218
-
1219
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
1220
- var documentAll = typeof document == 'object' && document.all;
1221
-
1222
- // `IsCallable` abstract operation
1223
- // https://tc39.es/ecma262/#sec-iscallable
1224
- // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
1225
- var isCallable$i = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
1226
- return typeof argument == 'function' || argument === documentAll;
1227
- } : function (argument) {
1228
- return typeof argument == 'function';
1229
- };
1230
-
1231
- var isCallable$h = isCallable$i;
1232
-
1233
- var isObject$a = function (it) {
1234
- return typeof it == 'object' ? it !== null : isCallable$h(it);
1235
- };
1236
-
1237
- var isObject$9 = isObject$a;
1238
-
1239
- var $String$4 = String;
1240
- var $TypeError$a = TypeError;
1241
-
1242
- // `Assert: Type(argument) is Object`
1243
- var anObject$8 = function (argument) {
1244
- if (isObject$9(argument)) return argument;
1245
- throw new $TypeError$a($String$4(argument) + ' is not an object');
1246
- };
1247
-
1248
- var objectDefineProperties = {};
1249
-
1250
- var fails$h = fails$l;
1251
-
1252
- // Detect IE8's incomplete defineProperty implementation
1253
- var descriptors = !fails$h(function () {
1254
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1255
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
1256
- });
1257
-
1258
- var DESCRIPTORS$c = descriptors;
1259
- var fails$g = fails$l;
1260
-
1261
- // V8 ~ Chrome 36-
1262
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
1263
- var v8PrototypeDefineBug = DESCRIPTORS$c && fails$g(function () {
1264
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1265
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
1266
- value: 42,
1267
- writable: false
1268
- }).prototype !== 42;
1269
- });
1270
-
1271
- var objectDefineProperty = {};
1272
-
1273
- var global$d = global$i;
1274
- var isObject$8 = isObject$a;
1275
-
1276
- var document$1 = global$d.document;
1277
- // typeof document.createElement is 'object' in old IE
1278
- var EXISTS$1 = isObject$8(document$1) && isObject$8(document$1.createElement);
1279
-
1280
- var documentCreateElement$2 = function (it) {
1281
- return EXISTS$1 ? document$1.createElement(it) : {};
1282
- };
1283
-
1284
- var DESCRIPTORS$b = descriptors;
1285
- var fails$f = fails$l;
1286
- var createElement = documentCreateElement$2;
1287
-
1288
- // Thanks to IE8 for its funny defineProperty
1289
- var ie8DomDefine = !DESCRIPTORS$b && !fails$f(function () {
1290
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1291
- return Object.defineProperty(createElement('div'), 'a', {
1292
- get: function () { return 7; }
1293
- }).a !== 7;
1294
- });
1295
-
1296
- var NATIVE_BIND$1 = functionBindNative;
1297
-
1298
- var call$a = Function.prototype.call;
1299
-
1300
- var functionCall = NATIVE_BIND$1 ? call$a.bind(call$a) : function () {
1301
- return call$a.apply(call$a, arguments);
1302
- };
1303
-
1304
- var global$c = global$i;
1305
- var isCallable$g = isCallable$i;
1306
-
1307
- var aFunction = function (argument) {
1308
- return isCallable$g(argument) ? argument : undefined;
1309
- };
1310
-
1311
- var getBuiltIn$5 = function (namespace, method) {
1312
- return arguments.length < 2 ? aFunction(global$c[namespace]) : global$c[namespace] && global$c[namespace][method];
1313
- };
1314
-
1315
- var uncurryThis$e = functionUncurryThis;
1316
-
1317
- var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
1318
-
1319
861
  var getBuiltIn$4 = getBuiltIn$5;
1320
862
  var isCallable$f = isCallable$i;
1321
863
  var isPrototypeOf$2 = objectIsPrototypeOf;
1322
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
864
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
1323
865
 
1324
- var $Object$2 = Object;
866
+ var $Object$3 = Object;
1325
867
 
1326
- var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
868
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
1327
869
  return typeof it == 'symbol';
1328
870
  } : function (it) {
1329
871
  var $Symbol = getBuiltIn$4('Symbol');
1330
- return isCallable$f($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
872
+ return isCallable$f($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$3(it));
1331
873
  };
1332
874
 
1333
- var $String$3 = String;
875
+ var $String$4 = String;
1334
876
 
1335
877
  var tryToString$2 = function (argument) {
1336
878
  try {
1337
- return $String$3(argument);
879
+ return $String$4(argument);
1338
880
  } catch (error) {
1339
881
  return 'Object';
1340
882
  }
@@ -1343,12 +885,12 @@ var tryToString$2 = function (argument) {
1343
885
  var isCallable$e = isCallable$i;
1344
886
  var tryToString$1 = tryToString$2;
1345
887
 
1346
- var $TypeError$9 = TypeError;
888
+ var $TypeError$a = TypeError;
1347
889
 
1348
890
  // `Assert: IsCallable(argument) is true`
1349
891
  var aCallable$3 = function (argument) {
1350
892
  if (isCallable$e(argument)) return argument;
1351
- throw new $TypeError$9(tryToString$1(argument) + ' is not a function');
893
+ throw new $TypeError$a(tryToString$1(argument) + ' is not a function');
1352
894
  };
1353
895
 
1354
896
  var aCallable$2 = aCallable$3;
@@ -1363,41 +905,127 @@ var getMethod$2 = function (V, P) {
1363
905
 
1364
906
  var call$9 = functionCall;
1365
907
  var isCallable$d = isCallable$i;
1366
- var isObject$7 = isObject$a;
908
+ var isObject$9 = isObject$a;
1367
909
 
1368
- var $TypeError$8 = TypeError;
910
+ var $TypeError$9 = TypeError;
1369
911
 
1370
912
  // `OrdinaryToPrimitive` abstract operation
1371
913
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
1372
914
  var ordinaryToPrimitive$1 = function (input, pref) {
1373
915
  var fn, val;
1374
- if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$7(val = call$9(fn, input))) return val;
1375
- if (isCallable$d(fn = input.valueOf) && !isObject$7(val = call$9(fn, input))) return val;
1376
- if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$7(val = call$9(fn, input))) return val;
1377
- throw new $TypeError$8("Can't convert object to primitive value");
916
+ if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$9(val = call$9(fn, input))) return val;
917
+ if (isCallable$d(fn = input.valueOf) && !isObject$9(val = call$9(fn, input))) return val;
918
+ if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$9(val = call$9(fn, input))) return val;
919
+ throw new $TypeError$9("Can't convert object to primitive value");
920
+ };
921
+
922
+ var sharedStore = {exports: {}};
923
+
924
+ var global$e = global$i;
925
+
926
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
927
+ var defineProperty$7 = Object.defineProperty;
928
+
929
+ var defineGlobalProperty$3 = function (key, value) {
930
+ try {
931
+ defineProperty$7(global$e, key, { value: value, configurable: true, writable: true });
932
+ } catch (error) {
933
+ global$e[key] = value;
934
+ } return value;
935
+ };
936
+
937
+ var globalThis$1 = global$i;
938
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
939
+
940
+ var SHARED = '__core-js_shared__';
941
+ var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
942
+
943
+ (store$3.versions || (store$3.versions = [])).push({
944
+ version: '3.37.1',
945
+ mode: 'global',
946
+ copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
947
+ license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
948
+ source: 'https://github.com/zloirock/core-js'
949
+ });
950
+
951
+ var store$2 = sharedStore.exports;
952
+
953
+ var shared$4 = function (key, value) {
954
+ return store$2[key] || (store$2[key] = value || {});
955
+ };
956
+
957
+ var requireObjectCoercible$4 = requireObjectCoercible$6;
958
+
959
+ var $Object$2 = Object;
960
+
961
+ // `ToObject` abstract operation
962
+ // https://tc39.es/ecma262/#sec-toobject
963
+ var toObject$5 = function (argument) {
964
+ return $Object$2(requireObjectCoercible$4(argument));
965
+ };
966
+
967
+ var uncurryThis$f = functionUncurryThis;
968
+ var toObject$4 = toObject$5;
969
+
970
+ var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
971
+
972
+ // `HasOwnProperty` abstract operation
973
+ // https://tc39.es/ecma262/#sec-hasownproperty
974
+ // eslint-disable-next-line es/no-object-hasown -- safe
975
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
976
+ return hasOwnProperty(toObject$4(it), key);
977
+ };
978
+
979
+ var uncurryThis$e = functionUncurryThis;
980
+
981
+ var id = 0;
982
+ var postfix = Math.random();
983
+ var toString$8 = uncurryThis$e(1.0.toString);
984
+
985
+ var uid$2 = function (key) {
986
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
987
+ };
988
+
989
+ var global$d = global$i;
990
+ var shared$3 = shared$4;
991
+ var hasOwn$a = hasOwnProperty_1;
992
+ var uid$1 = uid$2;
993
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
994
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
995
+
996
+ var Symbol$2 = global$d.Symbol;
997
+ var WellKnownSymbolsStore = shared$3('wks');
998
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
999
+
1000
+ var wellKnownSymbol$a = function (name) {
1001
+ if (!hasOwn$a(WellKnownSymbolsStore, name)) {
1002
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$a(Symbol$2, name)
1003
+ ? Symbol$2[name]
1004
+ : createWellKnownSymbol('Symbol.' + name);
1005
+ } return WellKnownSymbolsStore[name];
1378
1006
  };
1379
1007
 
1380
1008
  var call$8 = functionCall;
1381
- var isObject$6 = isObject$a;
1009
+ var isObject$8 = isObject$a;
1382
1010
  var isSymbol$1 = isSymbol$2;
1383
1011
  var getMethod$1 = getMethod$2;
1384
1012
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
1385
1013
  var wellKnownSymbol$9 = wellKnownSymbol$a;
1386
1014
 
1387
- var $TypeError$7 = TypeError;
1015
+ var $TypeError$8 = TypeError;
1388
1016
  var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
1389
1017
 
1390
1018
  // `ToPrimitive` abstract operation
1391
1019
  // https://tc39.es/ecma262/#sec-toprimitive
1392
1020
  var toPrimitive$1 = function (input, pref) {
1393
- if (!isObject$6(input) || isSymbol$1(input)) return input;
1021
+ if (!isObject$8(input) || isSymbol$1(input)) return input;
1394
1022
  var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
1395
1023
  var result;
1396
1024
  if (exoticToPrim) {
1397
1025
  if (pref === undefined) pref = 'default';
1398
1026
  result = call$8(exoticToPrim, input, pref);
1399
- if (!isObject$6(result) || isSymbol$1(result)) return result;
1400
- throw new $TypeError$7("Can't convert object to primitive value");
1027
+ if (!isObject$8(result) || isSymbol$1(result)) return result;
1028
+ throw new $TypeError$8("Can't convert object to primitive value");
1401
1029
  }
1402
1030
  if (pref === undefined) pref = 'number';
1403
1031
  return ordinaryToPrimitive(input, pref);
@@ -1413,29 +1041,101 @@ var toPropertyKey$2 = function (argument) {
1413
1041
  return isSymbol(key) ? key : key + '';
1414
1042
  };
1415
1043
 
1416
- var DESCRIPTORS$a = descriptors;
1417
- var IE8_DOM_DEFINE$1 = ie8DomDefine;
1418
- var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
1419
- var anObject$7 = anObject$8;
1420
- var toPropertyKey$1 = toPropertyKey$2;
1044
+ var global$c = global$i;
1045
+ var isObject$7 = isObject$a;
1046
+
1047
+ var document$1 = global$c.document;
1048
+ // typeof document.createElement is 'object' in old IE
1049
+ var EXISTS$1 = isObject$7(document$1) && isObject$7(document$1.createElement);
1050
+
1051
+ var documentCreateElement$2 = function (it) {
1052
+ return EXISTS$1 ? document$1.createElement(it) : {};
1053
+ };
1054
+
1055
+ var DESCRIPTORS$c = descriptors;
1056
+ var fails$g = fails$l;
1057
+ var createElement = documentCreateElement$2;
1058
+
1059
+ // Thanks to IE8 for its funny defineProperty
1060
+ var ie8DomDefine = !DESCRIPTORS$c && !fails$g(function () {
1061
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1062
+ return Object.defineProperty(createElement('div'), 'a', {
1063
+ get: function () { return 7; }
1064
+ }).a !== 7;
1065
+ });
1066
+
1067
+ var DESCRIPTORS$b = descriptors;
1068
+ var call$7 = functionCall;
1069
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
1070
+ var createPropertyDescriptor$3 = createPropertyDescriptor$4;
1071
+ var toIndexedObject$4 = toIndexedObject$5;
1072
+ var toPropertyKey$1 = toPropertyKey$2;
1073
+ var hasOwn$9 = hasOwnProperty_1;
1074
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
1075
+
1076
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1077
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
1078
+
1079
+ // `Object.getOwnPropertyDescriptor` method
1080
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
1081
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$b ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
1082
+ O = toIndexedObject$4(O);
1083
+ P = toPropertyKey$1(P);
1084
+ if (IE8_DOM_DEFINE$1) try {
1085
+ return $getOwnPropertyDescriptor$1(O, P);
1086
+ } catch (error) { /* empty */ }
1087
+ if (hasOwn$9(O, P)) return createPropertyDescriptor$3(!call$7(propertyIsEnumerableModule$1.f, O, P), O[P]);
1088
+ };
1089
+
1090
+ var objectDefineProperty = {};
1091
+
1092
+ var DESCRIPTORS$a = descriptors;
1093
+ var fails$f = fails$l;
1094
+
1095
+ // V8 ~ Chrome 36-
1096
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
1097
+ var v8PrototypeDefineBug = DESCRIPTORS$a && fails$f(function () {
1098
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1099
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
1100
+ value: 42,
1101
+ writable: false
1102
+ }).prototype !== 42;
1103
+ });
1104
+
1105
+ var isObject$6 = isObject$a;
1106
+
1107
+ var $String$3 = String;
1108
+ var $TypeError$7 = TypeError;
1109
+
1110
+ // `Assert: Type(argument) is Object`
1111
+ var anObject$8 = function (argument) {
1112
+ if (isObject$6(argument)) return argument;
1113
+ throw new $TypeError$7($String$3(argument) + ' is not an object');
1114
+ };
1115
+
1116
+ var DESCRIPTORS$9 = descriptors;
1117
+ var IE8_DOM_DEFINE = ie8DomDefine;
1118
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
1119
+ var anObject$7 = anObject$8;
1120
+ var toPropertyKey = toPropertyKey$2;
1421
1121
 
1422
1122
  var $TypeError$6 = TypeError;
1423
1123
  // eslint-disable-next-line es/no-object-defineproperty -- safe
1424
1124
  var $defineProperty = Object.defineProperty;
1425
1125
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1426
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
1126
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1427
1127
  var ENUMERABLE = 'enumerable';
1428
1128
  var CONFIGURABLE$1 = 'configurable';
1429
1129
  var WRITABLE = 'writable';
1430
1130
 
1431
1131
  // `Object.defineProperty` method
1432
1132
  // https://tc39.es/ecma262/#sec-object.defineproperty
1433
- objectDefineProperty.f = DESCRIPTORS$a ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
1133
+ objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
1434
1134
  anObject$7(O);
1435
- P = toPropertyKey$1(P);
1135
+ P = toPropertyKey(P);
1436
1136
  anObject$7(Attributes);
1437
1137
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
1438
- var current = $getOwnPropertyDescriptor$1(O, P);
1138
+ var current = $getOwnPropertyDescriptor(O, P);
1439
1139
  if (current && current[WRITABLE]) {
1440
1140
  O[P] = Attributes.value;
1441
1141
  Attributes = {
@@ -1447,9 +1147,9 @@ objectDefineProperty.f = DESCRIPTORS$a ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
1447
1147
  } return $defineProperty(O, P, Attributes);
1448
1148
  } : $defineProperty : function defineProperty(O, P, Attributes) {
1449
1149
  anObject$7(O);
1450
- P = toPropertyKey$1(P);
1150
+ P = toPropertyKey(P);
1451
1151
  anObject$7(Attributes);
1452
- if (IE8_DOM_DEFINE$1) try {
1152
+ if (IE8_DOM_DEFINE) try {
1453
1153
  return $defineProperty(O, P, Attributes);
1454
1154
  } catch (error) { /* empty */ }
1455
1155
  if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$6('Accessors not supported');
@@ -1457,161 +1157,58 @@ objectDefineProperty.f = DESCRIPTORS$a ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
1457
1157
  return O;
1458
1158
  };
1459
1159
 
1460
- var ceil = Math.ceil;
1461
- var floor = Math.floor;
1462
-
1463
- // `Math.trunc` method
1464
- // https://tc39.es/ecma262/#sec-math.trunc
1465
- // eslint-disable-next-line es/no-math-trunc -- safe
1466
- var mathTrunc = Math.trunc || function trunc(x) {
1467
- var n = +x;
1468
- return (n > 0 ? floor : ceil)(n);
1469
- };
1470
-
1471
- var trunc = mathTrunc;
1472
-
1473
- // `ToIntegerOrInfinity` abstract operation
1474
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
1475
- var toIntegerOrInfinity$3 = function (argument) {
1476
- var number = +argument;
1477
- // eslint-disable-next-line no-self-compare -- NaN check
1478
- return number !== number || number === 0 ? 0 : trunc(number);
1479
- };
1480
-
1481
- var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
1482
-
1483
- var max = Math.max;
1484
- var min$2 = Math.min;
1485
-
1486
- // Helper for a popular repeating case of the spec:
1487
- // Let integer be ? ToInteger(index).
1488
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
1489
- var toAbsoluteIndex$1 = function (index, length) {
1490
- var integer = toIntegerOrInfinity$2(index);
1491
- return integer < 0 ? max(integer + length, 0) : min$2(integer, length);
1492
- };
1493
-
1494
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
1495
-
1496
- var min$1 = Math.min;
1160
+ var DESCRIPTORS$8 = descriptors;
1161
+ var definePropertyModule$3 = objectDefineProperty;
1162
+ var createPropertyDescriptor$2 = createPropertyDescriptor$4;
1497
1163
 
1498
- // `ToLength` abstract operation
1499
- // https://tc39.es/ecma262/#sec-tolength
1500
- var toLength$2 = function (argument) {
1501
- var len = toIntegerOrInfinity$1(argument);
1502
- return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
1164
+ var createNonEnumerableProperty$8 = DESCRIPTORS$8 ? function (object, key, value) {
1165
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$2(1, value));
1166
+ } : function (object, key, value) {
1167
+ object[key] = value;
1168
+ return object;
1503
1169
  };
1504
1170
 
1505
- var toLength$1 = toLength$2;
1171
+ var makeBuiltIn$3 = {exports: {}};
1506
1172
 
1507
- // `LengthOfArrayLike` abstract operation
1508
- // https://tc39.es/ecma262/#sec-lengthofarraylike
1509
- var lengthOfArrayLike$3 = function (obj) {
1510
- return toLength$1(obj.length);
1511
- };
1173
+ var DESCRIPTORS$7 = descriptors;
1174
+ var hasOwn$8 = hasOwnProperty_1;
1512
1175
 
1513
- var toIndexedObject$4 = toIndexedObject$5;
1514
- var toAbsoluteIndex = toAbsoluteIndex$1;
1515
- var lengthOfArrayLike$2 = lengthOfArrayLike$3;
1176
+ var FunctionPrototype$1 = Function.prototype;
1177
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1178
+ var getDescriptor = DESCRIPTORS$7 && Object.getOwnPropertyDescriptor;
1516
1179
 
1517
- // `Array.prototype.{ indexOf, includes }` methods implementation
1518
- var createMethod$3 = function (IS_INCLUDES) {
1519
- return function ($this, el, fromIndex) {
1520
- var O = toIndexedObject$4($this);
1521
- var length = lengthOfArrayLike$2(O);
1522
- if (length === 0) return !IS_INCLUDES && -1;
1523
- var index = toAbsoluteIndex(fromIndex, length);
1524
- var value;
1525
- // Array#includes uses SameValueZero equality algorithm
1526
- // eslint-disable-next-line no-self-compare -- NaN check
1527
- if (IS_INCLUDES && el !== el) while (length > index) {
1528
- value = O[index++];
1529
- // eslint-disable-next-line no-self-compare -- NaN check
1530
- if (value !== value) return true;
1531
- // Array#indexOf ignores holes, Array#includes - not
1532
- } else for (;length > index; index++) {
1533
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
1534
- } return !IS_INCLUDES && -1;
1535
- };
1536
- };
1180
+ var EXISTS = hasOwn$8(FunctionPrototype$1, 'name');
1181
+ // additional protection from minified / mangled / dropped function names
1182
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
1183
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$7 || (DESCRIPTORS$7 && getDescriptor(FunctionPrototype$1, 'name').configurable));
1537
1184
 
1538
- var arrayIncludes = {
1539
- // `Array.prototype.includes` method
1540
- // https://tc39.es/ecma262/#sec-array.prototype.includes
1541
- includes: createMethod$3(true),
1542
- // `Array.prototype.indexOf` method
1543
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
1544
- indexOf: createMethod$3(false)
1185
+ var functionName = {
1186
+ EXISTS: EXISTS,
1187
+ PROPER: PROPER,
1188
+ CONFIGURABLE: CONFIGURABLE
1545
1189
  };
1546
1190
 
1547
- var hiddenKeys$4 = {};
1548
-
1549
1191
  var uncurryThis$d = functionUncurryThis;
1550
- var hasOwn$9 = hasOwnProperty_1;
1551
- var toIndexedObject$3 = toIndexedObject$5;
1552
- var indexOf$1 = arrayIncludes.indexOf;
1553
- var hiddenKeys$3 = hiddenKeys$4;
1554
-
1555
- var push$1 = uncurryThis$d([].push);
1556
-
1557
- var objectKeysInternal = function (object, names) {
1558
- var O = toIndexedObject$3(object);
1559
- var i = 0;
1560
- var result = [];
1561
- var key;
1562
- for (key in O) !hasOwn$9(hiddenKeys$3, key) && hasOwn$9(O, key) && push$1(result, key);
1563
- // Don't enum bug & hidden keys
1564
- while (names.length > i) if (hasOwn$9(O, key = names[i++])) {
1565
- ~indexOf$1(result, key) || push$1(result, key);
1566
- }
1567
- return result;
1568
- };
1569
-
1570
- // IE8- don't enum bug keys
1571
- var enumBugKeys$3 = [
1572
- 'constructor',
1573
- 'hasOwnProperty',
1574
- 'isPrototypeOf',
1575
- 'propertyIsEnumerable',
1576
- 'toLocaleString',
1577
- 'toString',
1578
- 'valueOf'
1579
- ];
1192
+ var isCallable$c = isCallable$i;
1193
+ var store$1 = sharedStore.exports;
1580
1194
 
1581
- var internalObjectKeys$1 = objectKeysInternal;
1582
- var enumBugKeys$2 = enumBugKeys$3;
1195
+ var functionToString = uncurryThis$d(Function.toString);
1583
1196
 
1584
- // `Object.keys` method
1585
- // https://tc39.es/ecma262/#sec-object.keys
1586
- // eslint-disable-next-line es/no-object-keys -- safe
1587
- var objectKeys$2 = Object.keys || function keys(O) {
1588
- return internalObjectKeys$1(O, enumBugKeys$2);
1589
- };
1197
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
1198
+ if (!isCallable$c(store$1.inspectSource)) {
1199
+ store$1.inspectSource = function (it) {
1200
+ return functionToString(it);
1201
+ };
1202
+ }
1590
1203
 
1591
- var DESCRIPTORS$9 = descriptors;
1592
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1593
- var definePropertyModule$3 = objectDefineProperty;
1594
- var anObject$6 = anObject$8;
1595
- var toIndexedObject$2 = toIndexedObject$5;
1596
- var objectKeys$1 = objectKeys$2;
1204
+ var inspectSource$2 = store$1.inspectSource;
1597
1205
 
1598
- // `Object.defineProperties` method
1599
- // https://tc39.es/ecma262/#sec-object.defineproperties
1600
- // eslint-disable-next-line es/no-object-defineproperties -- safe
1601
- objectDefineProperties.f = DESCRIPTORS$9 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1602
- anObject$6(O);
1603
- var props = toIndexedObject$2(Properties);
1604
- var keys = objectKeys$1(Properties);
1605
- var length = keys.length;
1606
- var index = 0;
1607
- var key;
1608
- while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
1609
- return O;
1610
- };
1206
+ var global$b = global$i;
1207
+ var isCallable$b = isCallable$i;
1611
1208
 
1612
- var getBuiltIn$3 = getBuiltIn$5;
1209
+ var WeakMap$1 = global$b.WeakMap;
1613
1210
 
1614
- var html$1 = getBuiltIn$3('document', 'documentElement');
1211
+ var weakMapBasicDetection = isCallable$b(WeakMap$1) && /native code/.test(String(WeakMap$1));
1615
1212
 
1616
1213
  var shared$2 = shared$4;
1617
1214
  var uid = uid$2;
@@ -1622,157 +1219,25 @@ var sharedKey$3 = function (key) {
1622
1219
  return keys[key] || (keys[key] = uid(key));
1623
1220
  };
1624
1221
 
1625
- /* global ActiveXObject -- old IE, WSH */
1626
- var anObject$5 = anObject$8;
1627
- var definePropertiesModule = objectDefineProperties;
1628
- var enumBugKeys$1 = enumBugKeys$3;
1629
- var hiddenKeys$2 = hiddenKeys$4;
1630
- var html = html$1;
1631
- var documentCreateElement$1 = documentCreateElement$2;
1222
+ var hiddenKeys$4 = {};
1223
+
1224
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
1225
+ var global$a = global$i;
1226
+ var isObject$5 = isObject$a;
1227
+ var createNonEnumerableProperty$7 = createNonEnumerableProperty$8;
1228
+ var hasOwn$7 = hasOwnProperty_1;
1229
+ var shared$1 = sharedStore.exports;
1632
1230
  var sharedKey$2 = sharedKey$3;
1231
+ var hiddenKeys$3 = hiddenKeys$4;
1633
1232
 
1634
- var GT = '>';
1635
- var LT = '<';
1636
- var PROTOTYPE = 'prototype';
1637
- var SCRIPT = 'script';
1638
- var IE_PROTO$1 = sharedKey$2('IE_PROTO');
1233
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
1234
+ var TypeError$1 = global$a.TypeError;
1235
+ var WeakMap = global$a.WeakMap;
1236
+ var set, get, has;
1639
1237
 
1640
- var EmptyConstructor = function () { /* empty */ };
1641
-
1642
- var scriptTag = function (content) {
1643
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1644
- };
1645
-
1646
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1647
- var NullProtoObjectViaActiveX = function (activeXDocument) {
1648
- activeXDocument.write(scriptTag(''));
1649
- activeXDocument.close();
1650
- var temp = activeXDocument.parentWindow.Object;
1651
- activeXDocument = null; // avoid memory leak
1652
- return temp;
1653
- };
1654
-
1655
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
1656
- var NullProtoObjectViaIFrame = function () {
1657
- // Thrash, waste and sodomy: IE GC bug
1658
- var iframe = documentCreateElement$1('iframe');
1659
- var JS = 'java' + SCRIPT + ':';
1660
- var iframeDocument;
1661
- iframe.style.display = 'none';
1662
- html.appendChild(iframe);
1663
- // https://github.com/zloirock/core-js/issues/475
1664
- iframe.src = String(JS);
1665
- iframeDocument = iframe.contentWindow.document;
1666
- iframeDocument.open();
1667
- iframeDocument.write(scriptTag('document.F=Object'));
1668
- iframeDocument.close();
1669
- return iframeDocument.F;
1670
- };
1671
-
1672
- // Check for document.domain and active x support
1673
- // No need to use active x approach when document.domain is not set
1674
- // see https://github.com/es-shims/es5-shim/issues/150
1675
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1676
- // avoid IE GC bug
1677
- var activeXDocument;
1678
- var NullProtoObject = function () {
1679
- try {
1680
- activeXDocument = new ActiveXObject('htmlfile');
1681
- } catch (error) { /* ignore */ }
1682
- NullProtoObject = typeof document != 'undefined'
1683
- ? document.domain && activeXDocument
1684
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1685
- : NullProtoObjectViaIFrame()
1686
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
1687
- var length = enumBugKeys$1.length;
1688
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
1689
- return NullProtoObject();
1690
- };
1691
-
1692
- hiddenKeys$2[IE_PROTO$1] = true;
1693
-
1694
- // `Object.create` method
1695
- // https://tc39.es/ecma262/#sec-object.create
1696
- // eslint-disable-next-line es/no-object-create -- safe
1697
- var objectCreate = Object.create || function create(O, Properties) {
1698
- var result;
1699
- if (O !== null) {
1700
- EmptyConstructor[PROTOTYPE] = anObject$5(O);
1701
- result = new EmptyConstructor();
1702
- EmptyConstructor[PROTOTYPE] = null;
1703
- // add "__proto__" for Object.getPrototypeOf polyfill
1704
- result[IE_PROTO$1] = O;
1705
- } else result = NullProtoObject();
1706
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1707
- };
1708
-
1709
- var wellKnownSymbol$8 = wellKnownSymbol$a;
1710
- var create$2 = objectCreate;
1711
- var defineProperty$6 = objectDefineProperty.f;
1712
-
1713
- var UNSCOPABLES = wellKnownSymbol$8('unscopables');
1714
- var ArrayPrototype = Array.prototype;
1715
-
1716
- // Array.prototype[@@unscopables]
1717
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1718
- if (ArrayPrototype[UNSCOPABLES] === undefined) {
1719
- defineProperty$6(ArrayPrototype, UNSCOPABLES, {
1720
- configurable: true,
1721
- value: create$2(null)
1722
- });
1723
- }
1724
-
1725
- // add a key to Array.prototype[@@unscopables]
1726
- var addToUnscopables$1 = function (key) {
1727
- ArrayPrototype[UNSCOPABLES][key] = true;
1728
- };
1729
-
1730
- var iterators = {};
1731
-
1732
- var global$b = global$i;
1733
- var isCallable$c = isCallable$i;
1734
-
1735
- var WeakMap$1 = global$b.WeakMap;
1736
-
1737
- var weakMapBasicDetection = isCallable$c(WeakMap$1) && /native code/.test(String(WeakMap$1));
1738
-
1739
- var createPropertyDescriptor$4 = function (bitmap, value) {
1740
- return {
1741
- enumerable: !(bitmap & 1),
1742
- configurable: !(bitmap & 2),
1743
- writable: !(bitmap & 4),
1744
- value: value
1745
- };
1746
- };
1747
-
1748
- var DESCRIPTORS$8 = descriptors;
1749
- var definePropertyModule$2 = objectDefineProperty;
1750
- var createPropertyDescriptor$3 = createPropertyDescriptor$4;
1751
-
1752
- var createNonEnumerableProperty$8 = DESCRIPTORS$8 ? function (object, key, value) {
1753
- return definePropertyModule$2.f(object, key, createPropertyDescriptor$3(1, value));
1754
- } : function (object, key, value) {
1755
- object[key] = value;
1756
- return object;
1757
- };
1758
-
1759
- var NATIVE_WEAK_MAP = weakMapBasicDetection;
1760
- var global$a = global$i;
1761
- var isObject$5 = isObject$a;
1762
- var createNonEnumerableProperty$7 = createNonEnumerableProperty$8;
1763
- var hasOwn$8 = hasOwnProperty_1;
1764
- var shared$1 = sharedStore.exports;
1765
- var sharedKey$1 = sharedKey$3;
1766
- var hiddenKeys$1 = hiddenKeys$4;
1767
-
1768
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
1769
- var TypeError$1 = global$a.TypeError;
1770
- var WeakMap = global$a.WeakMap;
1771
- var set, get, has;
1772
-
1773
- var enforce = function (it) {
1774
- return has(it) ? get(it) : set(it, {});
1775
- };
1238
+ var enforce = function (it) {
1239
+ return has(it) ? get(it) : set(it, {});
1240
+ };
1776
1241
 
1777
1242
  var getterFor = function (TYPE) {
1778
1243
  return function (it) {
@@ -1784,38 +1249,38 @@ var getterFor = function (TYPE) {
1784
1249
  };
1785
1250
 
1786
1251
  if (NATIVE_WEAK_MAP || shared$1.state) {
1787
- var store$1 = shared$1.state || (shared$1.state = new WeakMap());
1252
+ var store = shared$1.state || (shared$1.state = new WeakMap());
1788
1253
  /* eslint-disable no-self-assign -- prototype methods protection */
1789
- store$1.get = store$1.get;
1790
- store$1.has = store$1.has;
1791
- store$1.set = store$1.set;
1254
+ store.get = store.get;
1255
+ store.has = store.has;
1256
+ store.set = store.set;
1792
1257
  /* eslint-enable no-self-assign -- prototype methods protection */
1793
1258
  set = function (it, metadata) {
1794
- if (store$1.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
1259
+ if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
1795
1260
  metadata.facade = it;
1796
- store$1.set(it, metadata);
1261
+ store.set(it, metadata);
1797
1262
  return metadata;
1798
1263
  };
1799
1264
  get = function (it) {
1800
- return store$1.get(it) || {};
1265
+ return store.get(it) || {};
1801
1266
  };
1802
1267
  has = function (it) {
1803
- return store$1.has(it);
1268
+ return store.has(it);
1804
1269
  };
1805
1270
  } else {
1806
- var STATE = sharedKey$1('state');
1807
- hiddenKeys$1[STATE] = true;
1271
+ var STATE = sharedKey$2('state');
1272
+ hiddenKeys$3[STATE] = true;
1808
1273
  set = function (it, metadata) {
1809
- if (hasOwn$8(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
1274
+ if (hasOwn$7(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
1810
1275
  metadata.facade = it;
1811
1276
  createNonEnumerableProperty$7(it, STATE, metadata);
1812
1277
  return metadata;
1813
1278
  };
1814
1279
  get = function (it) {
1815
- return hasOwn$8(it, STATE) ? it[STATE] : {};
1280
+ return hasOwn$7(it, STATE) ? it[STATE] : {};
1816
1281
  };
1817
1282
  has = function (it) {
1818
- return hasOwn$8(it, STATE);
1283
+ return hasOwn$7(it, STATE);
1819
1284
  };
1820
1285
  }
1821
1286
 
@@ -1827,87 +1292,11 @@ var internalState = {
1827
1292
  getterFor: getterFor
1828
1293
  };
1829
1294
 
1830
- var objectGetOwnPropertyDescriptor = {};
1831
-
1832
- var objectPropertyIsEnumerable = {};
1833
-
1834
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
1835
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1836
- var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
1837
-
1838
- // Nashorn ~ JDK8 bug
1839
- var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
1840
-
1841
- // `Object.prototype.propertyIsEnumerable` method implementation
1842
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
1843
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
1844
- var descriptor = getOwnPropertyDescriptor$2(this, V);
1845
- return !!descriptor && descriptor.enumerable;
1846
- } : $propertyIsEnumerable;
1847
-
1848
- var DESCRIPTORS$7 = descriptors;
1849
- var call$7 = functionCall;
1850
- var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
1851
- var createPropertyDescriptor$2 = createPropertyDescriptor$4;
1852
- var toIndexedObject$1 = toIndexedObject$5;
1853
- var toPropertyKey = toPropertyKey$2;
1854
- var hasOwn$7 = hasOwnProperty_1;
1855
- var IE8_DOM_DEFINE = ie8DomDefine;
1856
-
1857
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1858
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1859
-
1860
- // `Object.getOwnPropertyDescriptor` method
1861
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
1862
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
1863
- O = toIndexedObject$1(O);
1864
- P = toPropertyKey(P);
1865
- if (IE8_DOM_DEFINE) try {
1866
- return $getOwnPropertyDescriptor(O, P);
1867
- } catch (error) { /* empty */ }
1868
- if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule$1.f, O, P), O[P]);
1869
- };
1870
-
1871
- var makeBuiltIn$3 = {exports: {}};
1872
-
1873
- var DESCRIPTORS$6 = descriptors;
1874
- var hasOwn$6 = hasOwnProperty_1;
1875
-
1876
- var FunctionPrototype$1 = Function.prototype;
1877
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1878
- var getDescriptor = DESCRIPTORS$6 && Object.getOwnPropertyDescriptor;
1879
-
1880
- var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
1881
- // additional protection from minified / mangled / dropped function names
1882
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
1883
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$6 || (DESCRIPTORS$6 && getDescriptor(FunctionPrototype$1, 'name').configurable));
1884
-
1885
- var functionName = {
1886
- EXISTS: EXISTS,
1887
- PROPER: PROPER,
1888
- CONFIGURABLE: CONFIGURABLE
1889
- };
1890
-
1891
1295
  var uncurryThis$c = functionUncurryThis;
1892
- var isCallable$b = isCallable$i;
1893
- var store = sharedStore.exports;
1894
-
1895
- var functionToString = uncurryThis$c(Function.toString);
1896
-
1897
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
1898
- if (!isCallable$b(store.inspectSource)) {
1899
- store.inspectSource = function (it) {
1900
- return functionToString(it);
1901
- };
1902
- }
1903
-
1904
- var inspectSource$2 = store.inspectSource;
1905
-
1906
- var uncurryThis$b = functionUncurryThis;
1907
1296
  var fails$e = fails$l;
1908
1297
  var isCallable$a = isCallable$i;
1909
- var hasOwn$5 = hasOwnProperty_1;
1910
- var DESCRIPTORS$5 = descriptors;
1298
+ var hasOwn$6 = hasOwnProperty_1;
1299
+ var DESCRIPTORS$6 = descriptors;
1911
1300
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
1912
1301
  var inspectSource$1 = inspectSource$2;
1913
1302
  var InternalStateModule$1 = internalState;
@@ -1916,13 +1305,13 @@ var enforceInternalState = InternalStateModule$1.enforce;
1916
1305
  var getInternalState$2 = InternalStateModule$1.get;
1917
1306
  var $String$2 = String;
1918
1307
  // eslint-disable-next-line es/no-object-defineproperty -- safe
1919
- var defineProperty$5 = Object.defineProperty;
1920
- var stringSlice$4 = uncurryThis$b(''.slice);
1921
- var replace$4 = uncurryThis$b(''.replace);
1922
- var join = uncurryThis$b([].join);
1308
+ var defineProperty$6 = Object.defineProperty;
1309
+ var stringSlice$4 = uncurryThis$c(''.slice);
1310
+ var replace$4 = uncurryThis$c(''.replace);
1311
+ var join = uncurryThis$c([].join);
1923
1312
 
1924
- var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$e(function () {
1925
- return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
1313
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$6 && !fails$e(function () {
1314
+ return defineProperty$6(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
1926
1315
  });
1927
1316
 
1928
1317
  var TEMPLATE = String(String).split('String');
@@ -1933,21 +1322,21 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
1933
1322
  }
1934
1323
  if (options && options.getter) name = 'get ' + name;
1935
1324
  if (options && options.setter) name = 'set ' + name;
1936
- if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
1937
- if (DESCRIPTORS$5) defineProperty$5(value, 'name', { value: name, configurable: true });
1325
+ if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
1326
+ if (DESCRIPTORS$6) defineProperty$6(value, 'name', { value: name, configurable: true });
1938
1327
  else value.name = name;
1939
1328
  }
1940
- if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
1941
- defineProperty$5(value, 'length', { value: options.arity });
1329
+ if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
1330
+ defineProperty$6(value, 'length', { value: options.arity });
1942
1331
  }
1943
1332
  try {
1944
- if (options && hasOwn$5(options, 'constructor') && options.constructor) {
1945
- if (DESCRIPTORS$5) defineProperty$5(value, 'prototype', { writable: false });
1333
+ if (options && hasOwn$6(options, 'constructor') && options.constructor) {
1334
+ if (DESCRIPTORS$6) defineProperty$6(value, 'prototype', { writable: false });
1946
1335
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
1947
1336
  } else if (value.prototype) value.prototype = undefined;
1948
1337
  } catch (error) { /* empty */ }
1949
1338
  var state = enforceInternalState(value);
1950
- if (!hasOwn$5(state, 'source')) {
1339
+ if (!hasOwn$6(state, 'source')) {
1951
1340
  state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
1952
1341
  } return value;
1953
1342
  };
@@ -1959,7 +1348,7 @@ Function.prototype.toString = makeBuiltIn$2(function toString() {
1959
1348
  }, 'toString');
1960
1349
 
1961
1350
  var isCallable$9 = isCallable$i;
1962
- var definePropertyModule$1 = objectDefineProperty;
1351
+ var definePropertyModule$2 = objectDefineProperty;
1963
1352
  var makeBuiltIn$1 = makeBuiltIn$3.exports;
1964
1353
  var defineGlobalProperty$1 = defineGlobalProperty$3;
1965
1354
 
@@ -1977,7 +1366,7 @@ var defineBuiltIn$4 = function (O, key, value, options) {
1977
1366
  else if (O[key]) simple = true;
1978
1367
  } catch (error) { /* empty */ }
1979
1368
  if (simple) O[key] = value;
1980
- else definePropertyModule$1.f(O, key, {
1369
+ else definePropertyModule$2.f(O, key, {
1981
1370
  value: value,
1982
1371
  enumerable: false,
1983
1372
  configurable: !options.nonConfigurable,
@@ -1986,138 +1375,798 @@ var defineBuiltIn$4 = function (O, key, value, options) {
1986
1375
  } return O;
1987
1376
  };
1988
1377
 
1989
- var objectGetOwnPropertyNames = {};
1378
+ var objectGetOwnPropertyNames = {};
1379
+
1380
+ var ceil = Math.ceil;
1381
+ var floor = Math.floor;
1382
+
1383
+ // `Math.trunc` method
1384
+ // https://tc39.es/ecma262/#sec-math.trunc
1385
+ // eslint-disable-next-line es/no-math-trunc -- safe
1386
+ var mathTrunc = Math.trunc || function trunc(x) {
1387
+ var n = +x;
1388
+ return (n > 0 ? floor : ceil)(n);
1389
+ };
1390
+
1391
+ var trunc = mathTrunc;
1392
+
1393
+ // `ToIntegerOrInfinity` abstract operation
1394
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
1395
+ var toIntegerOrInfinity$3 = function (argument) {
1396
+ var number = +argument;
1397
+ // eslint-disable-next-line no-self-compare -- NaN check
1398
+ return number !== number || number === 0 ? 0 : trunc(number);
1399
+ };
1400
+
1401
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
1402
+
1403
+ var max = Math.max;
1404
+ var min$2 = Math.min;
1405
+
1406
+ // Helper for a popular repeating case of the spec:
1407
+ // Let integer be ? ToInteger(index).
1408
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
1409
+ var toAbsoluteIndex$1 = function (index, length) {
1410
+ var integer = toIntegerOrInfinity$2(index);
1411
+ return integer < 0 ? max(integer + length, 0) : min$2(integer, length);
1412
+ };
1413
+
1414
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
1415
+
1416
+ var min$1 = Math.min;
1417
+
1418
+ // `ToLength` abstract operation
1419
+ // https://tc39.es/ecma262/#sec-tolength
1420
+ var toLength$2 = function (argument) {
1421
+ var len = toIntegerOrInfinity$1(argument);
1422
+ return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
1423
+ };
1424
+
1425
+ var toLength$1 = toLength$2;
1426
+
1427
+ // `LengthOfArrayLike` abstract operation
1428
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
1429
+ var lengthOfArrayLike$3 = function (obj) {
1430
+ return toLength$1(obj.length);
1431
+ };
1432
+
1433
+ var toIndexedObject$3 = toIndexedObject$5;
1434
+ var toAbsoluteIndex = toAbsoluteIndex$1;
1435
+ var lengthOfArrayLike$2 = lengthOfArrayLike$3;
1436
+
1437
+ // `Array.prototype.{ indexOf, includes }` methods implementation
1438
+ var createMethod$3 = function (IS_INCLUDES) {
1439
+ return function ($this, el, fromIndex) {
1440
+ var O = toIndexedObject$3($this);
1441
+ var length = lengthOfArrayLike$2(O);
1442
+ if (length === 0) return !IS_INCLUDES && -1;
1443
+ var index = toAbsoluteIndex(fromIndex, length);
1444
+ var value;
1445
+ // Array#includes uses SameValueZero equality algorithm
1446
+ // eslint-disable-next-line no-self-compare -- NaN check
1447
+ if (IS_INCLUDES && el !== el) while (length > index) {
1448
+ value = O[index++];
1449
+ // eslint-disable-next-line no-self-compare -- NaN check
1450
+ if (value !== value) return true;
1451
+ // Array#indexOf ignores holes, Array#includes - not
1452
+ } else for (;length > index; index++) {
1453
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
1454
+ } return !IS_INCLUDES && -1;
1455
+ };
1456
+ };
1457
+
1458
+ var arrayIncludes = {
1459
+ // `Array.prototype.includes` method
1460
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
1461
+ includes: createMethod$3(true),
1462
+ // `Array.prototype.indexOf` method
1463
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
1464
+ indexOf: createMethod$3(false)
1465
+ };
1466
+
1467
+ var uncurryThis$b = functionUncurryThis;
1468
+ var hasOwn$5 = hasOwnProperty_1;
1469
+ var toIndexedObject$2 = toIndexedObject$5;
1470
+ var indexOf$1 = arrayIncludes.indexOf;
1471
+ var hiddenKeys$2 = hiddenKeys$4;
1472
+
1473
+ var push$1 = uncurryThis$b([].push);
1474
+
1475
+ var objectKeysInternal = function (object, names) {
1476
+ var O = toIndexedObject$2(object);
1477
+ var i = 0;
1478
+ var result = [];
1479
+ var key;
1480
+ for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push$1(result, key);
1481
+ // Don't enum bug & hidden keys
1482
+ while (names.length > i) if (hasOwn$5(O, key = names[i++])) {
1483
+ ~indexOf$1(result, key) || push$1(result, key);
1484
+ }
1485
+ return result;
1486
+ };
1487
+
1488
+ // IE8- don't enum bug keys
1489
+ var enumBugKeys$3 = [
1490
+ 'constructor',
1491
+ 'hasOwnProperty',
1492
+ 'isPrototypeOf',
1493
+ 'propertyIsEnumerable',
1494
+ 'toLocaleString',
1495
+ 'toString',
1496
+ 'valueOf'
1497
+ ];
1498
+
1499
+ var internalObjectKeys$1 = objectKeysInternal;
1500
+ var enumBugKeys$2 = enumBugKeys$3;
1501
+
1502
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
1503
+
1504
+ // `Object.getOwnPropertyNames` method
1505
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
1506
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1507
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1508
+ return internalObjectKeys$1(O, hiddenKeys$1);
1509
+ };
1510
+
1511
+ var objectGetOwnPropertySymbols = {};
1512
+
1513
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1514
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1515
+
1516
+ var getBuiltIn$3 = getBuiltIn$5;
1517
+ var uncurryThis$a = functionUncurryThis;
1518
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1519
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1520
+ var anObject$6 = anObject$8;
1521
+
1522
+ var concat$1 = uncurryThis$a([].concat);
1523
+
1524
+ // all object keys, includes non-enumerable and symbols
1525
+ var ownKeys$1 = getBuiltIn$3('Reflect', 'ownKeys') || function ownKeys(it) {
1526
+ var keys = getOwnPropertyNamesModule.f(anObject$6(it));
1527
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1528
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1529
+ };
1530
+
1531
+ var hasOwn$4 = hasOwnProperty_1;
1532
+ var ownKeys = ownKeys$1;
1533
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1534
+ var definePropertyModule$1 = objectDefineProperty;
1535
+
1536
+ var copyConstructorProperties$3 = function (target, source, exceptions) {
1537
+ var keys = ownKeys(source);
1538
+ var defineProperty = definePropertyModule$1.f;
1539
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1540
+ for (var i = 0; i < keys.length; i++) {
1541
+ var key = keys[i];
1542
+ if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
1543
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1544
+ }
1545
+ }
1546
+ };
1547
+
1548
+ var fails$d = fails$l;
1549
+ var isCallable$8 = isCallable$i;
1550
+
1551
+ var replacement = /#|\.prototype\./;
1552
+
1553
+ var isForced$1 = function (feature, detection) {
1554
+ var value = data[normalize(feature)];
1555
+ return value === POLYFILL ? true
1556
+ : value === NATIVE ? false
1557
+ : isCallable$8(detection) ? fails$d(detection)
1558
+ : !!detection;
1559
+ };
1560
+
1561
+ var normalize = isForced$1.normalize = function (string) {
1562
+ return String(string).replace(replacement, '.').toLowerCase();
1563
+ };
1564
+
1565
+ var data = isForced$1.data = {};
1566
+ var NATIVE = isForced$1.NATIVE = 'N';
1567
+ var POLYFILL = isForced$1.POLYFILL = 'P';
1568
+
1569
+ var isForced_1 = isForced$1;
1570
+
1571
+ var global$9 = global$i;
1572
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1573
+ var createNonEnumerableProperty$6 = createNonEnumerableProperty$8;
1574
+ var defineBuiltIn$3 = defineBuiltIn$4;
1575
+ var defineGlobalProperty = defineGlobalProperty$3;
1576
+ var copyConstructorProperties$2 = copyConstructorProperties$3;
1577
+ var isForced = isForced_1;
1578
+
1579
+ /*
1580
+ options.target - name of the target object
1581
+ options.global - target is the global object
1582
+ options.stat - export as static methods of target
1583
+ options.proto - export as prototype methods of target
1584
+ options.real - real prototype method for the `pure` version
1585
+ options.forced - export even if the native feature is available
1586
+ options.bind - bind methods to the target, required for the `pure` version
1587
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1588
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
1589
+ options.sham - add a flag to not completely full polyfills
1590
+ options.enumerable - export as enumerable property
1591
+ options.dontCallGetSet - prevent calling a getter on target
1592
+ options.name - the .name of the function if it does not match the key
1593
+ */
1594
+ var _export = function (options, source) {
1595
+ var TARGET = options.target;
1596
+ var GLOBAL = options.global;
1597
+ var STATIC = options.stat;
1598
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1599
+ if (GLOBAL) {
1600
+ target = global$9;
1601
+ } else if (STATIC) {
1602
+ target = global$9[TARGET] || defineGlobalProperty(TARGET, {});
1603
+ } else {
1604
+ target = global$9[TARGET] && global$9[TARGET].prototype;
1605
+ }
1606
+ if (target) for (key in source) {
1607
+ sourceProperty = source[key];
1608
+ if (options.dontCallGetSet) {
1609
+ descriptor = getOwnPropertyDescriptor$1(target, key);
1610
+ targetProperty = descriptor && descriptor.value;
1611
+ } else targetProperty = target[key];
1612
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1613
+ // contained in target
1614
+ if (!FORCED && targetProperty !== undefined) {
1615
+ if (typeof sourceProperty == typeof targetProperty) continue;
1616
+ copyConstructorProperties$2(sourceProperty, targetProperty);
1617
+ }
1618
+ // add a flag to not completely full polyfills
1619
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1620
+ createNonEnumerableProperty$6(sourceProperty, 'sham', true);
1621
+ }
1622
+ defineBuiltIn$3(target, key, sourceProperty, options);
1623
+ }
1624
+ };
1625
+
1626
+ var internalObjectKeys = objectKeysInternal;
1627
+ var enumBugKeys$1 = enumBugKeys$3;
1628
+
1629
+ // `Object.keys` method
1630
+ // https://tc39.es/ecma262/#sec-object.keys
1631
+ // eslint-disable-next-line es/no-object-keys -- safe
1632
+ var objectKeys$2 = Object.keys || function keys(O) {
1633
+ return internalObjectKeys(O, enumBugKeys$1);
1634
+ };
1635
+
1636
+ var DESCRIPTORS$5 = descriptors;
1637
+ var uncurryThis$9 = functionUncurryThis;
1638
+ var call$6 = functionCall;
1639
+ var fails$c = fails$l;
1640
+ var objectKeys$1 = objectKeys$2;
1641
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1642
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1643
+ var toObject$3 = toObject$5;
1644
+ var IndexedObject$1 = indexedObject;
1645
+
1646
+ // eslint-disable-next-line es/no-object-assign -- safe
1647
+ var $assign = Object.assign;
1648
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1649
+ var defineProperty$5 = Object.defineProperty;
1650
+ var concat = uncurryThis$9([].concat);
1651
+
1652
+ // `Object.assign` method
1653
+ // https://tc39.es/ecma262/#sec-object.assign
1654
+ var objectAssign = !$assign || fails$c(function () {
1655
+ // should have correct order of operations (Edge bug)
1656
+ if (DESCRIPTORS$5 && $assign({ b: 1 }, $assign(defineProperty$5({}, 'a', {
1657
+ enumerable: true,
1658
+ get: function () {
1659
+ defineProperty$5(this, 'b', {
1660
+ value: 3,
1661
+ enumerable: false
1662
+ });
1663
+ }
1664
+ }), { b: 2 })).b !== 1) return true;
1665
+ // should work with symbols and should have deterministic property order (V8 bug)
1666
+ var A = {};
1667
+ var B = {};
1668
+ // eslint-disable-next-line es/no-symbol -- safe
1669
+ var symbol = Symbol('assign detection');
1670
+ var alphabet = 'abcdefghijklmnopqrst';
1671
+ A[symbol] = 7;
1672
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1673
+ return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
1674
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1675
+ var T = toObject$3(target);
1676
+ var argumentsLength = arguments.length;
1677
+ var index = 1;
1678
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1679
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1680
+ while (argumentsLength > index) {
1681
+ var S = IndexedObject$1(arguments[index++]);
1682
+ var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1683
+ var length = keys.length;
1684
+ var j = 0;
1685
+ var key;
1686
+ while (length > j) {
1687
+ key = keys[j++];
1688
+ if (!DESCRIPTORS$5 || call$6(propertyIsEnumerable, S, key)) T[key] = S[key];
1689
+ }
1690
+ } return T;
1691
+ } : $assign;
1692
+
1693
+ var $$7 = _export;
1694
+ var assign = objectAssign;
1695
+
1696
+ // `Object.assign` method
1697
+ // https://tc39.es/ecma262/#sec-object.assign
1698
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1699
+ $$7({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1700
+ assign: assign
1701
+ });
1702
+
1703
+ const WARN_NAMESPACE = 'warn';
1704
+ const translateKeyOutsideComponents = (key, params = undefined) => i18n.t(key, Object.assign({
1705
+ ns: [WARN_NAMESPACE]
1706
+ }, params));
1707
+ const useWarningsTranslation = () => useTranslation(WARN_NAMESPACE);
1708
+
1709
+ /* *
1710
+ * Licensed under the Apache License, Version 2.0 (the "License");
1711
+ * you may not use this file except in compliance with the License.
1712
+ * You may obtain a copy of the License at
1713
+ *
1714
+ * http://www.apache.org/licenses/LICENSE-2.0
1715
+ *
1716
+ * Unless required by applicable law or agreed to in writing, software
1717
+ * distributed under the License is distributed on an "AS IS" BASIS,
1718
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1719
+ * See the License for the specific language governing permissions and
1720
+ * limitations under the License.
1721
+ *
1722
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1723
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
1724
+ * */
1725
+ const confirmationDialogOptions = t => {
1726
+ return {
1727
+ cancelLabel: t('close-dialog-cancel'),
1728
+ title: t('close-draw-dialog-title'),
1729
+ description: t('close-dialog-description'),
1730
+ confirmLabel: t('close-dialog-confirm'),
1731
+ catchOnCancel: true
1732
+ };
1733
+ };
1734
+ const useCloseDrawDialog = ({
1735
+ mapId,
1736
+ source
1737
+ }) => {
1738
+ const {
1739
+ t
1740
+ } = useWarningsTranslation();
1741
+ const dispatch = useDispatch();
1742
+ const drawLayerId = getSingularDrawtoolDrawLayerId(mapId);
1743
+ const drawDialogActiveDrawModeId = useSelector(store => drawtoolSelectors.getActiveDrawModeId(store, drawingDialogType));
1744
+ const featureLayerContainsGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, drawLayerId));
1745
+ const dialogError = useSelector(store => uiSelectors.getDialogError(store, drawingDialogType));
1746
+ const isFormDirty = useSelector(store => getWarningFormDirty(store, drawingDialogType));
1747
+ const confirmDialog = useConfirmationDialog();
1748
+ const closeDrawDialog = (skipConfirmationDialog = false) => __awaiter(void 0, void 0, void 0, function* () {
1749
+ if (isFormDirty && !skipConfirmationDialog) {
1750
+ const mayProceed = yield confirmDialog(confirmationDialogOptions(t)).then(() => true).catch(() => false);
1751
+ if (!mayProceed) {
1752
+ return;
1753
+ }
1754
+ }
1755
+ if (drawDialogActiveDrawModeId) {
1756
+ // disable the edit layer
1757
+ dispatch(layerActions.toggleFeatureMode({
1758
+ layerId: drawLayerId,
1759
+ isInEditMode: false,
1760
+ drawMode: ''
1761
+ }));
1762
+ // reset active draw tool
1763
+ dispatch(drawtoolActions.changeDrawToolMode({
1764
+ drawToolId: drawingDialogType,
1765
+ drawModeId: drawDialogActiveDrawModeId
1766
+ }));
1767
+ }
1768
+ // close draw dialog
1769
+ dispatch(uiActions.setActiveMapIdForDialog({
1770
+ type: drawingDialogType,
1771
+ mapId,
1772
+ setOpen: false,
1773
+ source
1774
+ }));
1775
+ // reset all drawings fields
1776
+ dispatch(drawActions.setDrawValues({
1777
+ drawingInstanceId: drawingDialogType,
1778
+ objectName: '',
1779
+ id: ''
1780
+ }));
1781
+ // reset error
1782
+ if (dialogError) {
1783
+ dispatch(uiActions.setErrorDialog({
1784
+ type: drawingDialogType,
1785
+ error: ''
1786
+ }));
1787
+ }
1788
+ // clear existing geoJSON
1789
+ if (featureLayerContainsGeoJSON) {
1790
+ dispatch(mapStoreActions.layerChangeGeojson({
1791
+ layerId: drawLayerId,
1792
+ geojson: emptyGeoJSON
1793
+ }));
1794
+ }
1795
+ });
1796
+ return {
1797
+ closeDrawDialog
1798
+ };
1799
+ };
1800
+ const useCloseObjectDialog = ({
1801
+ mapId,
1802
+ source
1803
+ }) => {
1804
+ const dispatch = useDispatch();
1805
+ const drawLayerId = getSingularDrawtoolDrawLayerId(mapId);
1806
+ const featureLayerContainsGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, drawLayerId));
1807
+ const closeObjectDialog = (shouldReset = true) => {
1808
+ // reset active object
1809
+ if (shouldReset) {
1810
+ dispatch(drawActions.setDrawValues({
1811
+ drawingInstanceId: drawingDialogType,
1812
+ objectName: '',
1813
+ id: ''
1814
+ }));
1815
+ }
1816
+ // close object dialog
1817
+ dispatch(uiActions.setActiveMapIdForDialog({
1818
+ type: objectDialogType,
1819
+ mapId,
1820
+ setOpen: false,
1821
+ source
1822
+ }));
1823
+ if (featureLayerContainsGeoJSON && shouldReset) {
1824
+ dispatch(mapStoreActions.layerChangeGeojson({
1825
+ layerId: drawLayerId,
1826
+ geojson: emptyGeoJSON
1827
+ }));
1828
+ }
1829
+ };
1830
+ return {
1831
+ closeObjectDialog
1832
+ };
1833
+ };
1834
+ const useDialogOptions = ({
1835
+ dialogType
1836
+ }) => {
1837
+ const isDialogOpen = useSelector(store => uiSelectors.getisDialogOpen(store, dialogType));
1838
+ const dialogMapId = useSelector(store => uiSelectors.getDialogMapId(store, dialogType));
1839
+ const dialogLayerId = getSingularDrawtoolDrawLayerId(dialogMapId);
1840
+ const hasGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, dialogLayerId));
1841
+ return {
1842
+ isDialogOpen,
1843
+ dialogMapId,
1844
+ hasGeoJSON,
1845
+ dialogLayerId
1846
+ };
1847
+ };
1848
+ const useObjectDrawDialogAction = ({
1849
+ mapId,
1850
+ source
1851
+ }) => {
1852
+ const {
1853
+ t
1854
+ } = useWarningsTranslation();
1855
+ const dispatch = useDispatch();
1856
+ const confirmDialog = useConfirmationDialog();
1857
+ const currentDrawLayerId = getSingularDrawtoolDrawLayerId(mapId);
1858
+ // draw selectors
1859
+ const {
1860
+ isDialogOpen: isDrawDialogOpen,
1861
+ hasGeoJSON: drawDialogLayerHasGeoJSON,
1862
+ dialogLayerId: drawDialogLayerId
1863
+ } = useDialogOptions({
1864
+ dialogType: drawingDialogType
1865
+ });
1866
+ const drawDialogActiveDrawModeId = useSelector(store => drawtoolSelectors.getActiveDrawModeId(store, drawingDialogType));
1867
+ const isFormDirty = useSelector(store => getWarningFormDirty(store, drawingDialogType));
1868
+ // object selectors
1869
+ const {
1870
+ isDialogOpen: isObjectDialogOpen,
1871
+ hasGeoJSON: objectDialogLayerHasGeoJSON,
1872
+ dialogLayerId: objectDialogLayerId
1873
+ } = useDialogOptions({
1874
+ dialogType: objectDialogType
1875
+ });
1876
+ const clearGeoJSON = layerId => {
1877
+ dispatch(mapStoreActions.layerChangeGeojson({
1878
+ layerId,
1879
+ geojson: emptyGeoJSON
1880
+ }));
1881
+ };
1882
+ const openObjectDialog = () => __awaiter(void 0, void 0, void 0, function* () {
1883
+ if (isDrawDialogOpen) {
1884
+ if (isFormDirty) {
1885
+ const mayProceed = yield confirmDialog(confirmationDialogOptions(t)).then(() => true).catch(() => false);
1886
+ if (!mayProceed) {
1887
+ return;
1888
+ }
1889
+ }
1890
+ if (drawDialogLayerHasGeoJSON) {
1891
+ clearGeoJSON(drawDialogLayerId);
1892
+ }
1893
+ closeDrawDialog(true);
1894
+ }
1895
+ // open object dialog
1896
+ dispatch(uiActions.setActiveMapIdForDialog({
1897
+ type: objectDialogType,
1898
+ mapId,
1899
+ setOpen: true,
1900
+ source
1901
+ }));
1902
+ // move shape to screen
1903
+ if (isObjectDialogOpen && objectDialogLayerHasGeoJSON) {
1904
+ // update new shape
1905
+ dispatch(mapStoreActions.layerSetGeojsonFromLayer({
1906
+ layerId: currentDrawLayerId,
1907
+ sourceLayerId: objectDialogLayerId
1908
+ }));
1909
+ // remove current shape
1910
+ clearGeoJSON(objectDialogLayerId);
1911
+ }
1912
+ });
1913
+ const openDrawDialog = newGeoJSON => {
1914
+ if (isObjectDialogOpen) {
1915
+ if (objectDialogLayerHasGeoJSON) {
1916
+ clearGeoJSON(objectDialogLayerId);
1917
+ }
1918
+ const shouldResetShape = newGeoJSON === undefined;
1919
+ closeObjectDialog(shouldResetShape);
1920
+ }
1921
+ // open draw dialog
1922
+ dispatch(uiActions.setActiveMapIdForDialog({
1923
+ type: drawingDialogType,
1924
+ mapId,
1925
+ setOpen: true,
1926
+ source
1927
+ }));
1928
+ // activate draw tool
1929
+ dispatch(drawtoolActions.updateGeoJSONLayerId({
1930
+ drawToolId: drawingDialogType,
1931
+ geoJSONLayerId: currentDrawLayerId
1932
+ }));
1933
+ // activate default draw mode
1934
+ if (!drawDialogActiveDrawModeId && !isDrawDialogOpen) {
1935
+ dispatch(drawtoolActions.changeDrawToolMode({
1936
+ drawToolId: drawingDialogType,
1937
+ drawModeId: defaultPolygon.drawModeId
1938
+ }));
1939
+ }
1940
+ // move shape to screen
1941
+ if (isDrawDialogOpen && drawDialogLayerHasGeoJSON) {
1942
+ // update new shape
1943
+ dispatch(mapStoreActions.layerSetGeojsonFromLayer({
1944
+ layerId: currentDrawLayerId,
1945
+ sourceLayerId: drawDialogLayerId
1946
+ }));
1947
+ // remove current shape
1948
+ clearGeoJSON(drawDialogLayerId);
1949
+ }
1950
+ if (drawDialogActiveDrawModeId) {
1951
+ // activate current
1952
+ dispatch(layerActions.toggleFeatureMode({
1953
+ layerId: currentDrawLayerId,
1954
+ isInEditMode: true,
1955
+ drawMode: drawDialogActiveDrawModeId
1956
+ }));
1957
+ // deactivate previous
1958
+ dispatch(layerActions.toggleFeatureMode({
1959
+ layerId: drawDialogLayerId,
1960
+ isInEditMode: false,
1961
+ drawMode: ''
1962
+ }));
1963
+ }
1964
+ if (newGeoJSON) {
1965
+ dispatch(mapStoreActions.layerChangeGeojson({
1966
+ layerId: currentDrawLayerId,
1967
+ geojson: newGeoJSON
1968
+ }));
1969
+ }
1970
+ };
1971
+ const {
1972
+ closeDrawDialog
1973
+ } = useCloseDrawDialog({
1974
+ mapId,
1975
+ source
1976
+ });
1977
+ const {
1978
+ closeObjectDialog
1979
+ } = useCloseObjectDialog({
1980
+ mapId,
1981
+ source
1982
+ });
1983
+ return {
1984
+ closeDrawDialog,
1985
+ closeObjectDialog,
1986
+ openObjectDialog,
1987
+ openDrawDialog
1988
+ };
1989
+ };
1990
+
1991
+ /* *
1992
+ * Licensed under the Apache License, Version 2.0 (the "License");
1993
+ * you may not use this file except in compliance with the License.
1994
+ * You may obtain a copy of the License at
1995
+ *
1996
+ * http://www.apache.org/licenses/LICENSE-2.0
1997
+ *
1998
+ * Unless required by applicable law or agreed to in writing, software
1999
+ * distributed under the License is distributed on an "AS IS" BASIS,
2000
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2001
+ * See the License for the specific language governing permissions and
2002
+ * limitations under the License.
2003
+ *
2004
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2005
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
2006
+ * */
2007
+ const ObjectManagerMapButtonConnect = ({
2008
+ mapId,
2009
+ source: _source = 'app'
2010
+ }) => {
2011
+ const objectDialogMapId = useSelector(store => uiSelectors.getDialogMapId(store, objectDialogType));
2012
+ const isObjectDialogOpen = useSelector(store => uiSelectors.getisDialogOpen(store, objectDialogType));
2013
+ const {
2014
+ openObjectDialog,
2015
+ closeObjectDialog
2016
+ } = useObjectDrawDialogAction({
2017
+ mapId,
2018
+ source: _source
2019
+ });
2020
+ const onClick = () => {
2021
+ const shouldOpen = objectDialogMapId !== mapId ? true : !isObjectDialogOpen;
2022
+ shouldOpen ? openObjectDialog() : closeObjectDialog();
2023
+ };
2024
+ const isOpen = objectDialogMapId === mapId && isObjectDialogOpen;
2025
+ return /*#__PURE__*/React__default.createElement(MapControlButton, {
2026
+ "aria-label": `Object Manager Button for ${mapId}`,
2027
+ title: "Object Manager",
2028
+ onClick: onClick,
2029
+ isActive: isOpen
2030
+ }, /*#__PURE__*/React__default.createElement(Polygons, null));
2031
+ };
1990
2032
 
1991
- var internalObjectKeys = objectKeysInternal;
1992
- var enumBugKeys = enumBugKeys$3;
2033
+ var objectDefineProperties = {};
1993
2034
 
1994
- var hiddenKeys = enumBugKeys.concat('length', 'prototype');
2035
+ var DESCRIPTORS$4 = descriptors;
2036
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
2037
+ var definePropertyModule = objectDefineProperty;
2038
+ var anObject$5 = anObject$8;
2039
+ var toIndexedObject$1 = toIndexedObject$5;
2040
+ var objectKeys = objectKeys$2;
1995
2041
 
1996
- // `Object.getOwnPropertyNames` method
1997
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
1998
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1999
- objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
2000
- return internalObjectKeys(O, hiddenKeys);
2042
+ // `Object.defineProperties` method
2043
+ // https://tc39.es/ecma262/#sec-object.defineproperties
2044
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
2045
+ objectDefineProperties.f = DESCRIPTORS$4 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
2046
+ anObject$5(O);
2047
+ var props = toIndexedObject$1(Properties);
2048
+ var keys = objectKeys(Properties);
2049
+ var length = keys.length;
2050
+ var index = 0;
2051
+ var key;
2052
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
2053
+ return O;
2001
2054
  };
2002
2055
 
2003
- var objectGetOwnPropertySymbols = {};
2056
+ var getBuiltIn$2 = getBuiltIn$5;
2004
2057
 
2005
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
2006
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
2058
+ var html$1 = getBuiltIn$2('document', 'documentElement');
2007
2059
 
2008
- var getBuiltIn$2 = getBuiltIn$5;
2009
- var uncurryThis$a = functionUncurryThis;
2010
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
2011
- var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
2060
+ /* global ActiveXObject -- old IE, WSH */
2012
2061
  var anObject$4 = anObject$8;
2062
+ var definePropertiesModule = objectDefineProperties;
2063
+ var enumBugKeys = enumBugKeys$3;
2064
+ var hiddenKeys = hiddenKeys$4;
2065
+ var html = html$1;
2066
+ var documentCreateElement$1 = documentCreateElement$2;
2067
+ var sharedKey$1 = sharedKey$3;
2013
2068
 
2014
- var concat$1 = uncurryThis$a([].concat);
2015
-
2016
- // all object keys, includes non-enumerable and symbols
2017
- var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
2018
- var keys = getOwnPropertyNamesModule.f(anObject$4(it));
2019
- var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
2020
- return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
2021
- };
2069
+ var GT = '>';
2070
+ var LT = '<';
2071
+ var PROTOTYPE = 'prototype';
2072
+ var SCRIPT = 'script';
2073
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
2022
2074
 
2023
- var hasOwn$4 = hasOwnProperty_1;
2024
- var ownKeys = ownKeys$1;
2025
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
2026
- var definePropertyModule = objectDefineProperty;
2075
+ var EmptyConstructor = function () { /* empty */ };
2027
2076
 
2028
- var copyConstructorProperties$3 = function (target, source, exceptions) {
2029
- var keys = ownKeys(source);
2030
- var defineProperty = definePropertyModule.f;
2031
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
2032
- for (var i = 0; i < keys.length; i++) {
2033
- var key = keys[i];
2034
- if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
2035
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
2036
- }
2037
- }
2077
+ var scriptTag = function (content) {
2078
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
2038
2079
  };
2039
2080
 
2040
- var fails$d = fails$l;
2041
- var isCallable$8 = isCallable$i;
2042
-
2043
- var replacement = /#|\.prototype\./;
2081
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
2082
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
2083
+ activeXDocument.write(scriptTag(''));
2084
+ activeXDocument.close();
2085
+ var temp = activeXDocument.parentWindow.Object;
2086
+ activeXDocument = null; // avoid memory leak
2087
+ return temp;
2088
+ };
2044
2089
 
2045
- var isForced$1 = function (feature, detection) {
2046
- var value = data[normalize(feature)];
2047
- return value === POLYFILL ? true
2048
- : value === NATIVE ? false
2049
- : isCallable$8(detection) ? fails$d(detection)
2050
- : !!detection;
2090
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
2091
+ var NullProtoObjectViaIFrame = function () {
2092
+ // Thrash, waste and sodomy: IE GC bug
2093
+ var iframe = documentCreateElement$1('iframe');
2094
+ var JS = 'java' + SCRIPT + ':';
2095
+ var iframeDocument;
2096
+ iframe.style.display = 'none';
2097
+ html.appendChild(iframe);
2098
+ // https://github.com/zloirock/core-js/issues/475
2099
+ iframe.src = String(JS);
2100
+ iframeDocument = iframe.contentWindow.document;
2101
+ iframeDocument.open();
2102
+ iframeDocument.write(scriptTag('document.F=Object'));
2103
+ iframeDocument.close();
2104
+ return iframeDocument.F;
2051
2105
  };
2052
2106
 
2053
- var normalize = isForced$1.normalize = function (string) {
2054
- return String(string).replace(replacement, '.').toLowerCase();
2107
+ // Check for document.domain and active x support
2108
+ // No need to use active x approach when document.domain is not set
2109
+ // see https://github.com/es-shims/es5-shim/issues/150
2110
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
2111
+ // avoid IE GC bug
2112
+ var activeXDocument;
2113
+ var NullProtoObject = function () {
2114
+ try {
2115
+ activeXDocument = new ActiveXObject('htmlfile');
2116
+ } catch (error) { /* ignore */ }
2117
+ NullProtoObject = typeof document != 'undefined'
2118
+ ? document.domain && activeXDocument
2119
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
2120
+ : NullProtoObjectViaIFrame()
2121
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
2122
+ var length = enumBugKeys.length;
2123
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
2124
+ return NullProtoObject();
2055
2125
  };
2056
2126
 
2057
- var data = isForced$1.data = {};
2058
- var NATIVE = isForced$1.NATIVE = 'N';
2059
- var POLYFILL = isForced$1.POLYFILL = 'P';
2127
+ hiddenKeys[IE_PROTO$1] = true;
2060
2128
 
2061
- var isForced_1 = isForced$1;
2129
+ // `Object.create` method
2130
+ // https://tc39.es/ecma262/#sec-object.create
2131
+ // eslint-disable-next-line es/no-object-create -- safe
2132
+ var objectCreate = Object.create || function create(O, Properties) {
2133
+ var result;
2134
+ if (O !== null) {
2135
+ EmptyConstructor[PROTOTYPE] = anObject$4(O);
2136
+ result = new EmptyConstructor();
2137
+ EmptyConstructor[PROTOTYPE] = null;
2138
+ // add "__proto__" for Object.getPrototypeOf polyfill
2139
+ result[IE_PROTO$1] = O;
2140
+ } else result = NullProtoObject();
2141
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
2142
+ };
2062
2143
 
2063
- var global$9 = global$i;
2064
- var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
2065
- var createNonEnumerableProperty$6 = createNonEnumerableProperty$8;
2066
- var defineBuiltIn$3 = defineBuiltIn$4;
2067
- var defineGlobalProperty = defineGlobalProperty$3;
2068
- var copyConstructorProperties$2 = copyConstructorProperties$3;
2069
- var isForced = isForced_1;
2144
+ var wellKnownSymbol$8 = wellKnownSymbol$a;
2145
+ var create$2 = objectCreate;
2146
+ var defineProperty$4 = objectDefineProperty.f;
2070
2147
 
2071
- /*
2072
- options.target - name of the target object
2073
- options.global - target is the global object
2074
- options.stat - export as static methods of target
2075
- options.proto - export as prototype methods of target
2076
- options.real - real prototype method for the `pure` version
2077
- options.forced - export even if the native feature is available
2078
- options.bind - bind methods to the target, required for the `pure` version
2079
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
2080
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
2081
- options.sham - add a flag to not completely full polyfills
2082
- options.enumerable - export as enumerable property
2083
- options.dontCallGetSet - prevent calling a getter on target
2084
- options.name - the .name of the function if it does not match the key
2085
- */
2086
- var _export = function (options, source) {
2087
- var TARGET = options.target;
2088
- var GLOBAL = options.global;
2089
- var STATIC = options.stat;
2090
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
2091
- if (GLOBAL) {
2092
- target = global$9;
2093
- } else if (STATIC) {
2094
- target = global$9[TARGET] || defineGlobalProperty(TARGET, {});
2095
- } else {
2096
- target = global$9[TARGET] && global$9[TARGET].prototype;
2097
- }
2098
- if (target) for (key in source) {
2099
- sourceProperty = source[key];
2100
- if (options.dontCallGetSet) {
2101
- descriptor = getOwnPropertyDescriptor$1(target, key);
2102
- targetProperty = descriptor && descriptor.value;
2103
- } else targetProperty = target[key];
2104
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
2105
- // contained in target
2106
- if (!FORCED && targetProperty !== undefined) {
2107
- if (typeof sourceProperty == typeof targetProperty) continue;
2108
- copyConstructorProperties$2(sourceProperty, targetProperty);
2109
- }
2110
- // add a flag to not completely full polyfills
2111
- if (options.sham || (targetProperty && targetProperty.sham)) {
2112
- createNonEnumerableProperty$6(sourceProperty, 'sham', true);
2113
- }
2114
- defineBuiltIn$3(target, key, sourceProperty, options);
2115
- }
2148
+ var UNSCOPABLES = wellKnownSymbol$8('unscopables');
2149
+ var ArrayPrototype = Array.prototype;
2150
+
2151
+ // Array.prototype[@@unscopables]
2152
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2153
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
2154
+ defineProperty$4(ArrayPrototype, UNSCOPABLES, {
2155
+ configurable: true,
2156
+ value: create$2(null)
2157
+ });
2158
+ }
2159
+
2160
+ // add a key to Array.prototype[@@unscopables]
2161
+ var addToUnscopables$1 = function (key) {
2162
+ ArrayPrototype[UNSCOPABLES][key] = true;
2116
2163
  };
2117
2164
 
2118
- var fails$c = fails$l;
2165
+ var iterators = {};
2166
+
2167
+ var fails$b = fails$l;
2119
2168
 
2120
- var correctPrototypeGetter = !fails$c(function () {
2169
+ var correctPrototypeGetter = !fails$b(function () {
2121
2170
  function F() { /* empty */ }
2122
2171
  F.prototype.constructor = null;
2123
2172
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -2126,7 +2175,7 @@ var correctPrototypeGetter = !fails$c(function () {
2126
2175
 
2127
2176
  var hasOwn$3 = hasOwnProperty_1;
2128
2177
  var isCallable$7 = isCallable$i;
2129
- var toObject$3 = toObject$5;
2178
+ var toObject$2 = toObject$5;
2130
2179
  var sharedKey = sharedKey$3;
2131
2180
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
2132
2181
 
@@ -2138,7 +2187,7 @@ var ObjectPrototype = $Object$1.prototype;
2138
2187
  // https://tc39.es/ecma262/#sec-object.getprototypeof
2139
2188
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
2140
2189
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
2141
- var object = toObject$3(O);
2190
+ var object = toObject$2(O);
2142
2191
  if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
2143
2192
  var constructor = object.constructor;
2144
2193
  if (isCallable$7(constructor) && object instanceof constructor) {
@@ -2146,7 +2195,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
2146
2195
  } return object instanceof $Object$1 ? ObjectPrototype : null;
2147
2196
  };
2148
2197
 
2149
- var fails$b = fails$l;
2198
+ var fails$a = fails$l;
2150
2199
  var isCallable$6 = isCallable$i;
2151
2200
  var isObject$4 = isObject$a;
2152
2201
  var getPrototypeOf$1 = objectGetPrototypeOf;
@@ -2171,7 +2220,7 @@ if ([].keys) {
2171
2220
  }
2172
2221
  }
2173
2222
 
2174
- var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$b(function () {
2223
+ var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$a(function () {
2175
2224
  var test = {};
2176
2225
  // FF44- legacy iterators case
2177
2226
  return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
@@ -2192,7 +2241,7 @@ var iteratorsCore = {
2192
2241
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
2193
2242
  };
2194
2243
 
2195
- var defineProperty$4 = objectDefineProperty.f;
2244
+ var defineProperty$3 = objectDefineProperty.f;
2196
2245
  var hasOwn$2 = hasOwnProperty_1;
2197
2246
  var wellKnownSymbol$6 = wellKnownSymbol$a;
2198
2247
 
@@ -2201,7 +2250,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol$6('toStringTag');
2201
2250
  var setToStringTag$3 = function (target, TAG, STATIC) {
2202
2251
  if (target && !STATIC) target = target.prototype;
2203
2252
  if (target && !hasOwn$2(target, TO_STRING_TAG$2)) {
2204
- defineProperty$4(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
2253
+ defineProperty$3(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
2205
2254
  }
2206
2255
  };
2207
2256
 
@@ -2221,13 +2270,13 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
2221
2270
  return IteratorConstructor;
2222
2271
  };
2223
2272
 
2224
- var uncurryThis$9 = functionUncurryThis;
2273
+ var uncurryThis$8 = functionUncurryThis;
2225
2274
  var aCallable$1 = aCallable$3;
2226
2275
 
2227
2276
  var functionUncurryThisAccessor = function (object, key, method) {
2228
2277
  try {
2229
2278
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2230
- return uncurryThis$9(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
2279
+ return uncurryThis$8(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
2231
2280
  } catch (error) { /* empty */ }
2232
2281
  };
2233
2282
 
@@ -2276,8 +2325,8 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
2276
2325
  };
2277
2326
  }() : undefined);
2278
2327
 
2279
- var $$7 = _export;
2280
- var call$6 = functionCall;
2328
+ var $$6 = _export;
2329
+ var call$5 = functionCall;
2281
2330
  var FunctionName = functionName;
2282
2331
  var isCallable$5 = isCallable$i;
2283
2332
  var createIteratorConstructor = iteratorCreateConstructor;
@@ -2349,7 +2398,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
2349
2398
  createNonEnumerableProperty$5(IterablePrototype, 'name', VALUES);
2350
2399
  } else {
2351
2400
  INCORRECT_VALUES_NAME = true;
2352
- defaultIterator = function values() { return call$6(nativeIterator, this); };
2401
+ defaultIterator = function values() { return call$5(nativeIterator, this); };
2353
2402
  }
2354
2403
  }
2355
2404
 
@@ -2364,7 +2413,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
2364
2413
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
2365
2414
  defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
2366
2415
  }
2367
- } else $$7({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
2416
+ } else $$6({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
2368
2417
  }
2369
2418
 
2370
2419
  // define iterator
@@ -2386,10 +2435,10 @@ var toIndexedObject = toIndexedObject$5;
2386
2435
  var addToUnscopables = addToUnscopables$1;
2387
2436
  var Iterators = iterators;
2388
2437
  var InternalStateModule = internalState;
2389
- var defineProperty$3 = objectDefineProperty.f;
2438
+ var defineProperty$2 = objectDefineProperty.f;
2390
2439
  var defineIterator = iteratorDefine;
2391
2440
  var createIterResultObject = createIterResultObject$1;
2392
- var DESCRIPTORS$4 = descriptors;
2441
+ var DESCRIPTORS$3 = descriptors;
2393
2442
 
2394
2443
  var ARRAY_ITERATOR = 'Array Iterator';
2395
2444
  var setInternalState = InternalStateModule.set;
@@ -2439,77 +2488,10 @@ addToUnscopables('values');
2439
2488
  addToUnscopables('entries');
2440
2489
 
2441
2490
  // V8 ~ Chrome 45- bug
2442
- if (DESCRIPTORS$4 && values.name !== 'values') try {
2443
- defineProperty$3(values, 'name', { value: 'values' });
2491
+ if (DESCRIPTORS$3 && values.name !== 'values') try {
2492
+ defineProperty$2(values, 'name', { value: 'values' });
2444
2493
  } catch (error) { /* empty */ }
2445
2494
 
2446
- var DESCRIPTORS$3 = descriptors;
2447
- var uncurryThis$8 = functionUncurryThis;
2448
- var call$5 = functionCall;
2449
- var fails$a = fails$l;
2450
- var objectKeys = objectKeys$2;
2451
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
2452
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
2453
- var toObject$2 = toObject$5;
2454
- var IndexedObject$1 = indexedObject;
2455
-
2456
- // eslint-disable-next-line es/no-object-assign -- safe
2457
- var $assign = Object.assign;
2458
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
2459
- var defineProperty$2 = Object.defineProperty;
2460
- var concat = uncurryThis$8([].concat);
2461
-
2462
- // `Object.assign` method
2463
- // https://tc39.es/ecma262/#sec-object.assign
2464
- var objectAssign = !$assign || fails$a(function () {
2465
- // should have correct order of operations (Edge bug)
2466
- if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
2467
- enumerable: true,
2468
- get: function () {
2469
- defineProperty$2(this, 'b', {
2470
- value: 3,
2471
- enumerable: false
2472
- });
2473
- }
2474
- }), { b: 2 })).b !== 1) return true;
2475
- // should work with symbols and should have deterministic property order (V8 bug)
2476
- var A = {};
2477
- var B = {};
2478
- // eslint-disable-next-line es/no-symbol -- safe
2479
- var symbol = Symbol('assign detection');
2480
- var alphabet = 'abcdefghijklmnopqrst';
2481
- A[symbol] = 7;
2482
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
2483
- return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
2484
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
2485
- var T = toObject$2(target);
2486
- var argumentsLength = arguments.length;
2487
- var index = 1;
2488
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
2489
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
2490
- while (argumentsLength > index) {
2491
- var S = IndexedObject$1(arguments[index++]);
2492
- var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
2493
- var length = keys.length;
2494
- var j = 0;
2495
- var key;
2496
- while (length > j) {
2497
- key = keys[j++];
2498
- if (!DESCRIPTORS$3 || call$5(propertyIsEnumerable, S, key)) T[key] = S[key];
2499
- }
2500
- } return T;
2501
- } : $assign;
2502
-
2503
- var $$6 = _export;
2504
- var assign = objectAssign;
2505
-
2506
- // `Object.assign` method
2507
- // https://tc39.es/ecma262/#sec-object.assign
2508
- // eslint-disable-next-line es/no-object-assign -- required for testing
2509
- $$6({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
2510
- assign: assign
2511
- });
2512
-
2513
2495
  // iterable DOM collections
2514
2496
  // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
2515
2497
  var domIterables = {
@@ -3390,8 +3372,8 @@ const slice = createSlice({
3390
3372
  } = action.payload;
3391
3373
  if (draft.selectedPublicWarningId) {
3392
3374
  const currentWarning = warnings.find(warning => warning.id === draft.selectedPublicWarningId);
3393
- if (((_a = draft.publicWarning) === null || _a === void 0 ? void 0 : _a.editor) !== (currentWarning === null || currentWarning === void 0 ? void 0 : currentWarning.editor)) {
3394
- draft.publicWarning.editor = currentWarning === null || currentWarning === void 0 ? void 0 : currentWarning.editor;
3375
+ if (currentWarning && ((_a = draft.publicWarning) === null || _a === void 0 ? void 0 : _a.editor) !== currentWarning.editor) {
3376
+ draft.publicWarning.editor = currentWarning.editor;
3395
3377
  // if form is in edit mode show warning
3396
3378
  if (draft.formState === '') {
3397
3379
  draft.error = {
@@ -3576,9 +3558,6 @@ const ObjectManagerConnect = ({
3576
3558
  objectName
3577
3559
  });
3578
3560
  };
3579
- if (!isDialogOpen) {
3580
- return null;
3581
- }
3582
3561
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ObjectManager, {
3583
3562
  title: `${t('object-manager-title')} ${mapId}`,
3584
3563
  bounds: bounds,
@@ -4810,7 +4789,8 @@ var warningListJSON = [
4810
4789
  domain: "public",
4811
4790
  warningProposalSource: "PASCAL-ECMWF-EPS",
4812
4791
  authority: "KNMI",
4813
- type: 1
4792
+ type: 1,
4793
+ probability: 30
4814
4794
  }
4815
4795
  },
4816
4796
  {
@@ -5329,6 +5309,128 @@ var warningListJSON = [
5329
5309
  type: 1
5330
5310
  }
5331
5311
  },
5312
+ {
5313
+ id: "f1e8981e-937c-11ee-a1bf-003kmdidki9",
5314
+ lastUpdatedTime: "2024-05-28T09:45:33Z",
5315
+ status: "DRAFT_PUBLISHED",
5316
+ warningDetail: {
5317
+ id: "f1e8981e-937c-11ee-a1bf-003kmdidki9",
5318
+ phenomenon: "wind",
5319
+ geoJSON: {
5320
+ type: "FeatureCollection",
5321
+ features: [
5322
+ {
5323
+ type: "Feature",
5324
+ geometry: {
5325
+ type: "Polygon",
5326
+ coordinates: [
5327
+ [
5328
+ [
5329
+ 5.5,
5330
+ 52.9
5331
+ ],
5332
+ [
5333
+ 5.5,
5334
+ 53
5335
+ ],
5336
+ [
5337
+ 5.4,
5338
+ 53.1
5339
+ ],
5340
+ [
5341
+ 5.3,
5342
+ 53
5343
+ ],
5344
+ [
5345
+ 5.3,
5346
+ 52.9
5347
+ ],
5348
+ [
5349
+ 5.4,
5350
+ 52.8
5351
+ ],
5352
+ [
5353
+ 5.5,
5354
+ 52.9
5355
+ ]
5356
+ ]
5357
+ ]
5358
+ },
5359
+ properties: {
5360
+ fill: "#fae21e",
5361
+ stroke: "#fae21e",
5362
+ "fill-opacity": 0.2,
5363
+ "stroke-width": 2,
5364
+ selectionType: "poly",
5365
+ warning_level: "1",
5366
+ "stroke-opacity": 1
5367
+ }
5368
+ }
5369
+ ]
5370
+ },
5371
+ validFrom: "2024-05-28T09:45:28Z",
5372
+ probability: 30,
5373
+ linked_to_id: "14f7903a-937d-11ee-b619-0ab3cf8a98c1",
5374
+ warning_handle_uuid: "exampleid"
5375
+ }
5376
+ },
5377
+ {
5378
+ id: "550c2b5e-937d-11ee-a1bf-dki2883ke",
5379
+ lastUpdatedTime: "2024-05-27T14:48:20Z",
5380
+ status: "DRAFT_PUBLISHED",
5381
+ editor: "user.name",
5382
+ warningDetail: {
5383
+ id: "550c2b5e-937d-11ee-a1bf-dki2883ke",
5384
+ phenomenon: "lowTemp",
5385
+ geoJSON: {
5386
+ type: "FeatureCollection",
5387
+ features: [
5388
+ {
5389
+ type: "Feature",
5390
+ geometry: {
5391
+ type: "Polygon",
5392
+ coordinates: [
5393
+ [
5394
+ [
5395
+ 5.0950448864466225,
5396
+ 53.492000941975654
5397
+ ],
5398
+ [
5399
+ 4.280148780801422,
5400
+ 52.46455621916433
5401
+ ],
5402
+ [
5403
+ 6.878229305858475,
5404
+ 52.98133263853793
5405
+ ],
5406
+ [
5407
+ 5.0950448864466225,
5408
+ 53.492000941975654
5409
+ ]
5410
+ ]
5411
+ ]
5412
+ },
5413
+ properties: {
5414
+ fill: "#ff7800",
5415
+ stroke: "#ff7800",
5416
+ "fill-opacity": 0.2,
5417
+ "stroke-width": 2,
5418
+ selectionType: "poly",
5419
+ "stroke-opacity": 1
5420
+ }
5421
+ }
5422
+ ]
5423
+ },
5424
+ validFrom: "2024-05-28T14:48:09Z",
5425
+ validUntil: "2024-05-28T18:48:09Z",
5426
+ level: "moderate",
5427
+ probability: 30,
5428
+ descriptionOriginal: "This is the original description",
5429
+ descriptionTranslation: "This is the translation",
5430
+ linked_to_id: "20f54a8a-937d-11ee-b619-0ab3cf8a98c1",
5431
+ warning_handle_uuid: "exampleid"
5432
+ }
5433
+ },
5332
5434
  {
5333
5435
  id: "550c2b5e-937d-11ee-a1bf-0ab3cf8a98c1",
5334
5436
  lastUpdatedTime: "2023-12-05T14:48:20Z",
@@ -5503,6 +5605,8 @@ var warningListJSON = [
5503
5605
  lastUpdatedTime: "2023-12-05T14:47:19Z",
5504
5606
  status: "PUBLISHED",
5505
5607
  warningDetail: {
5608
+ id: "30fe2e4c-937d-11ee-b3d1-0ab3cf8a98c1",
5609
+ warning_handle_uuid: "exampleid",
5506
5610
  phenomenon: "snowIce",
5507
5611
  geoJSON: {
5508
5612
  type: "FeatureCollection",
@@ -5546,14 +5650,19 @@ var warningListJSON = [
5546
5650
  validFrom: "2023-12-05T14:47:03Z",
5547
5651
  validUntil: "2023-12-18T16:47:03Z",
5548
5652
  level: "severe",
5549
- probability: 70
5653
+ probability: 70,
5654
+ descriptionOriginal: "storm",
5655
+ descriptionTranslation: "storm"
5550
5656
  }
5551
5657
  },
5552
5658
  {
5553
5659
  id: "20f54a8a-937d-11ee-b619-0ab3cf8a98c1",
5554
5660
  lastUpdatedTime: "2023-12-05T14:46:52Z",
5555
5661
  status: "PUBLISHED",
5662
+ editor: "other.user",
5556
5663
  warningDetail: {
5664
+ id: "20f54a8a-937d-11ee-b619-0ab3cf8a98c1",
5665
+ warning_handle_uuid: "exampleid",
5557
5666
  phenomenon: "lowTemp",
5558
5667
  geoJSON: {
5559
5668
  type: "FeatureCollection",
@@ -5597,7 +5706,9 @@ var warningListJSON = [
5597
5706
  validFrom: "2023-12-05T14:46:39Z",
5598
5707
  validUntil: "2023-12-07T20:48:39Z",
5599
5708
  level: "moderate",
5600
- probability: 80
5709
+ probability: 80,
5710
+ descriptionOriginal: "cold",
5711
+ descriptionTranslation: "cold"
5601
5712
  }
5602
5713
  },
5603
5714
  {
@@ -5605,6 +5716,8 @@ var warningListJSON = [
5605
5716
  lastUpdatedTime: "2023-12-05T14:46:32Z",
5606
5717
  status: "PUBLISHED",
5607
5718
  warningDetail: {
5719
+ id: "14f7903a-937d-11ee-b619-0ab3cf8a98c1",
5720
+ warning_handle_uuid: "exampleid",
5608
5721
  phenomenon: "wind",
5609
5722
  geoJSON: {
5610
5723
  type: "FeatureCollection",
@@ -5648,7 +5761,9 @@ var warningListJSON = [
5648
5761
  validFrom: "2023-12-06T14:46:19Z",
5649
5762
  validUntil: "2023-12-06T20:46:19Z",
5650
5763
  level: "severe",
5651
- probability: 30
5764
+ probability: 30,
5765
+ descriptionOriginal: "windy",
5766
+ descriptionTranslation: "windy"
5652
5767
  }
5653
5768
  },
5654
5769
  {
@@ -6574,9 +6689,6 @@ const DrawingToolConnect = ({
6574
6689
  };
6575
6690
  // eslint-disable-next-line react-hooks/exhaustive-deps
6576
6691
  }, []);
6577
- if (!isDialogOpen) {
6578
- return null;
6579
- }
6580
6692
  return /*#__PURE__*/React.createElement(DrawingTool, {
6581
6693
  bounds: bounds,
6582
6694
  isOpen: isDialogOpen,
@@ -8512,10 +8624,11 @@ const PublicWarningsFormConnect = ({
8512
8624
  }));
8513
8625
  };
8514
8626
  const saveForm = newFormValues => {
8627
+ const status = newFormValues.linked_to_id ? 'DRAFT_PUBLISHED' : 'DRAFT';
8515
8628
  dispatch(publicWarningFormActions.saveWarning({
8516
8629
  publicWarning: {
8517
8630
  warningDetail: newFormValues,
8518
- status: 'DRAFT',
8631
+ status,
8519
8632
  editor: auth === null || auth === void 0 ? void 0 : auth.username
8520
8633
  }
8521
8634
  }));
@@ -8648,13 +8761,10 @@ const PublicWarningsFormDialogConnect = ({
8648
8761
  }
8649
8762
  onCloseDialog();
8650
8763
  });
8651
- if (!isDialogOpen) {
8652
- return null;
8653
- }
8654
8764
  // Readonly also in case you are not creating a new warning and you are not set as the editor
8655
8765
  const isReadOnly = formAction === 'readonly' || !isEditor && publicWarningStatus !== undefined;
8656
8766
  // Only show toggle if in draft status
8657
- const shouldHideFormToggleMode = publicWarningStatus !== 'DRAFT';
8767
+ const shouldHideFormToggleMode = publicWarningStatus !== 'DRAFT' && publicWarningStatus !== 'DRAFT_PUBLISHED';
8658
8768
  return /*#__PURE__*/React__default.createElement(PublicWarningsFormDialog, {
8659
8769
  isOpen: isDialogOpen,
8660
8770
  onClose: closeDialog,
@@ -8673,21 +8783,9 @@ const PublicWarningsFormDialogConnect = ({
8673
8783
  }));
8674
8784
  };
8675
8785
 
8676
- const getStatus = status => {
8677
- switch (status) {
8678
- case 'DRAFT':
8679
- return outsideComponentTranslations['warning-list-status-draft'];
8680
- case 'PUBLISHED':
8681
- return outsideComponentTranslations['warning-list-status-published'];
8682
- case 'TODO':
8683
- return outsideComponentTranslations['warning-list-status-todo'];
8684
- default:
8685
- return outsideComponentTranslations['warning-list-status-expired'];
8686
- }
8687
- };
8688
8786
  const sortWarningsOnStatus = warnings => {
8689
8787
  return warnings.reduce((allWarnings, warning) => {
8690
- if (warning.status === 'DRAFT') {
8788
+ if (warning.status === 'DRAFT' || warning.status === 'DRAFT_PUBLISHED') {
8691
8789
  return Object.assign(Object.assign({}, allWarnings), {
8692
8790
  draft: allWarnings === null || allWarnings === void 0 ? void 0 : allWarnings.draft.concat(warning)
8693
8791
  });
@@ -8715,17 +8813,85 @@ const sortWarningsOnStatus = warnings => {
8715
8813
  expired: []
8716
8814
  });
8717
8815
  };
8718
- const getWarningWithoutId = warning => {
8816
+ const getWarningWithLinkedToId = warning => {
8817
+ const {
8818
+ id,
8819
+ warningDetail
8820
+ } = warning;
8821
+ const cleanWarningDetail = __rest(warningDetail, ["id"]);
8822
+ return Object.assign(Object.assign({}, warning), {
8823
+ warningDetail: Object.assign(Object.assign({}, cleanWarningDetail), {
8824
+ linked_to_id: id
8825
+ }),
8826
+ status: 'DRAFT_PUBLISHED'
8827
+ });
8828
+ };
8829
+ const getWarningWithProposalId = warning => {
8719
8830
  const {
8720
8831
  id,
8721
8832
  warningDetail
8722
8833
  } = warning,
8723
8834
  fullWarning = __rest(warning, ["id", "warningDetail"]);
8724
8835
  const cleanWarningDetail = __rest(warningDetail, ["id"]);
8836
+ return Object.assign(Object.assign({}, fullWarning), {
8837
+ warningDetail: Object.assign(Object.assign({}, cleanWarningDetail), {
8838
+ proposal_id: id
8839
+ })
8840
+ });
8841
+ };
8842
+ const getWarningWithoutIdStatusEditor = warning => {
8843
+ const {
8844
+ id,
8845
+ warningDetail,
8846
+ status,
8847
+ editor
8848
+ } = warning,
8849
+ fullWarning = __rest(warning, ["id", "warningDetail", "status", "editor"]);
8850
+ const cleanWarningDetail = __rest(warningDetail, ["id", "linked_to_id", "proposal_id", "warning_handle_uuid"]);
8725
8851
  return Object.assign(Object.assign({}, fullWarning), {
8726
8852
  warningDetail: cleanWarningDetail
8727
8853
  });
8728
8854
  };
8855
+ const getStatusIcon = warning => {
8856
+ const getStatusTag = (content, color, icon = null) => ( /*#__PURE__*/React__default.createElement(StatusTag, {
8857
+ content: content,
8858
+ color: color,
8859
+ sx: {
8860
+ width: 'inherit',
8861
+ height: '16px',
8862
+ marginRight: 2
8863
+ },
8864
+ icon: icon
8865
+ }));
8866
+ switch (warning.status) {
8867
+ case 'TODO':
8868
+ return null;
8869
+ case 'DRAFT':
8870
+ return /*#__PURE__*/React__default.createElement(Box, {
8871
+ sx: {
8872
+ height: '16px',
8873
+ padding: '0px',
8874
+ display: 'flex',
8875
+ alignItems: 'center',
8876
+ justifyContent: 'center',
8877
+ color: 'geowebColors.iconButtons.flat.default.color'
8878
+ }
8879
+ }, /*#__PURE__*/React__default.createElement(Edit, null));
8880
+ case 'DRAFT_PUBLISHED':
8881
+ return getStatusTag('Pub', 'green', /*#__PURE__*/React__default.createElement(Edit, {
8882
+ sx: {
8883
+ width: 20,
8884
+ height: 20,
8885
+ marginTop: '3px'
8886
+ }
8887
+ }));
8888
+ case 'PUBLISHED':
8889
+ return getStatusTag('Pub', 'green');
8890
+ case 'EXPIRED':
8891
+ default:
8892
+ return getStatusTag('Exp', 'grey');
8893
+ }
8894
+ };
8729
8895
  const WarningListHeaderContent = _a => {
8730
8896
  var {
8731
8897
  title,
@@ -8794,43 +8960,73 @@ const WarningsOnStatus = ({
8794
8960
  onSelectWarning: _onSelectWarning = () => {},
8795
8961
  onEditWarning: _onEditWarning = () => {},
8796
8962
  onDeleteWarning: _onDeleteWarning = () => {},
8797
- onIgnoreWarning: _onIgnoreWarning = () => {}
8963
+ onDeleteReviewWarning: _onDeleteReviewWarning = () => {}
8798
8964
  }) => {
8799
8965
  const {
8800
8966
  t
8801
8967
  } = useWarningsTranslation();
8802
- const headerText = `${warnings.length} ${getStatus(status)}`;
8803
- const onClickWarning = warning => () => _onSelectWarning(warning);
8804
- const onClickEditWarning = warning => () => _onEditWarning(warning);
8805
- const onClickDeleteWarning = warningId => () => _onDeleteWarning(warningId);
8806
- const onClickUseWarning = warning => () => {
8807
- _onEditWarning(getWarningWithoutId(warning));
8968
+ const getStatus = status => {
8969
+ switch (status) {
8970
+ case 'DRAFT':
8971
+ return t('warning-list-status-draft');
8972
+ case 'PUBLISHED':
8973
+ return t('warning-list-status-published');
8974
+ case 'TODO':
8975
+ return t('warning-list-status-todo');
8976
+ default:
8977
+ return t('warning-list-status-expired');
8978
+ }
8808
8979
  };
8809
- const onClickIgnoreWarning = warning => () => _onIgnoreWarning(warning);
8980
+ const headerText = `${warnings.length} ${getStatus(status)}`;
8810
8981
  const getMenuItems = warning => {
8811
- if (status === 'DRAFT') {
8812
- return [{
8813
- text: t('object-manager-button-edit'),
8814
- action: onClickEditWarning(warning),
8815
- icon: /*#__PURE__*/React__default.createElement(Edit, null)
8816
- }, {
8817
- text: t('object-manager-button-delete'),
8818
- action: onClickDeleteWarning(warning.id),
8819
- icon: /*#__PURE__*/React__default.createElement(Delete, null)
8820
- }];
8821
- }
8822
- if (status === 'TODO') {
8823
- return [{
8824
- text: t('warning-list-button-ignore'),
8825
- action: onClickIgnoreWarning(warning),
8826
- icon: /*#__PURE__*/React__default.createElement(VisibilityOff, null)
8827
- }, {
8828
- text: t('warning-list-button-use'),
8829
- action: onClickUseWarning(warning),
8830
- icon: /*#__PURE__*/React__default.createElement(Success, null)
8831
- }];
8832
- }
8833
- return [];
8982
+ const duplicate = {
8983
+ text: t('warning-list-button-duplicate'),
8984
+ action: () => _onEditWarning(getWarningWithoutIdStatusEditor(warning)),
8985
+ icon: /*#__PURE__*/React__default.createElement(Copy, null)
8986
+ };
8987
+ switch (status) {
8988
+ case 'PUBLISHED':
8989
+ return [{
8990
+ text: t('warning-list-button-update'),
8991
+ action: () => _onEditWarning(getWarningWithLinkedToId(warning)),
8992
+ icon: /*#__PURE__*/React__default.createElement(Edit, null)
8993
+ }, duplicate, {
8994
+ text: t('warning-list-button-expire'),
8995
+ action: () => null,
8996
+ icon: /*#__PURE__*/React__default.createElement(Expire, null),
8997
+ isDisabled: true
8998
+ }, {
8999
+ text: t('warning-list-button-withdraw'),
9000
+ action: () => null,
9001
+ icon: /*#__PURE__*/React__default.createElement(Remove, null),
9002
+ isDisabled: true
9003
+ }];
9004
+ case 'EXPIRED':
9005
+ return [duplicate];
9006
+ case 'DRAFT':
9007
+ case 'DRAFT_PUBLISHED':
9008
+ return [{
9009
+ text: t('object-manager-button-edit'),
9010
+ action: () => _onEditWarning(warning),
9011
+ icon: /*#__PURE__*/React__default.createElement(Edit, null)
9012
+ }, duplicate, {
9013
+ text: t('object-manager-button-delete'),
9014
+ action: () => _onDeleteWarning(warning.id),
9015
+ icon: /*#__PURE__*/React__default.createElement(Delete, null)
9016
+ }];
9017
+ case 'TODO':
9018
+ return [{
9019
+ text: t('warning-list-button-use'),
9020
+ action: () => _onEditWarning(getWarningWithProposalId(warning)),
9021
+ icon: /*#__PURE__*/React__default.createElement(Success, null)
9022
+ }, {
9023
+ text: t('object-manager-button-delete'),
9024
+ action: () => _onDeleteReviewWarning(warning),
9025
+ icon: /*#__PURE__*/React__default.createElement(Delete, null)
9026
+ }];
9027
+ default:
9028
+ return [];
9029
+ }
8834
9030
  };
8835
9031
  return /*#__PURE__*/React__default.createElement(Box, {
8836
9032
  sx: {
@@ -8859,18 +9055,14 @@ const WarningsOnStatus = ({
8859
9055
  borderWidth: activeWarningId === warning.id ? '1px' : '1px',
8860
9056
  borderStyle: 'solid'
8861
9057
  },
8862
- secondaryAction: status !== 'EXPIRED' ? ( /*#__PURE__*/React__default.createElement(ToggleMenu, {
9058
+ secondaryAction: /*#__PURE__*/React__default.createElement(ToggleMenu, {
8863
9059
  menuTitle: t('warning-list-button-options'),
8864
9060
  tooltipTitle: t('warning-list-button-options'),
8865
9061
  menuPosition: "bottom",
8866
9062
  "aria-label": t('warning-list-button-options'),
8867
9063
  menuItems: getMenuItems(warning),
8868
9064
  buttonIcon: /*#__PURE__*/React__default.createElement(Options, null)
8869
- })) : ( /*#__PURE__*/React__default.createElement(Box, {
8870
- sx: {
8871
- width: 24
8872
- }
8873
- }))
9065
+ })
8874
9066
  }, /*#__PURE__*/React__default.createElement(ListItemButton, {
8875
9067
  sx: {
8876
9068
  height: '100%',
@@ -8884,7 +9076,7 @@ const WarningsOnStatus = ({
8884
9076
  }
8885
9077
  }
8886
9078
  },
8887
- onClick: onClickWarning(warning),
9079
+ onClick: () => _onSelectWarning(warning),
8888
9080
  "aria-label": `warning item for ${warning.id}`,
8889
9081
  selected: activeWarningId === warning.id
8890
9082
  }, /*#__PURE__*/React__default.createElement(Grid, {
@@ -8944,38 +9136,20 @@ const WarningsOnStatus = ({
8944
9136
  title: t('warning-list-header-status'),
8945
9137
  status: status,
8946
9138
  width: 96
8947
- }, status === 'DRAFT' ? ( /*#__PURE__*/React__default.createElement(Box, {
9139
+ }, /*#__PURE__*/React__default.createElement(Box, {
8948
9140
  sx: {
8949
- position: 'relative',
8950
- right: 12
9141
+ position: 'relative'
8951
9142
  }
8952
- }, warning.editor && ( /*#__PURE__*/React__default.createElement(Box, {
9143
+ }, getStatusIcon(warning), warning.editor && ( /*#__PURE__*/React__default.createElement(Box, {
8953
9144
  sx: {
8954
9145
  width: '16px',
8955
9146
  position: 'absolute',
8956
9147
  top: '1px',
8957
- right: '-25px'
9148
+ right: '-12px'
8958
9149
  }
8959
9150
  }, /*#__PURE__*/React__default.createElement(WarningAvatar, {
8960
9151
  editor: warning.editor
8961
- }))), /*#__PURE__*/React__default.createElement(Button, {
8962
- sx: {
8963
- height: '16px',
8964
- padding: '0px',
8965
- '& .MuiSvgIcon-root': {
8966
- marginRight: '-2px'
8967
- }
8968
- },
8969
- variant: "flat",
8970
- startIcon: /*#__PURE__*/React__default.createElement(Edit, null)
8971
- }, t('warning-list-header-draft')))) : ( /*#__PURE__*/React__default.createElement(StatusTag, {
8972
- content: status.toLowerCase(),
8973
- color: status === 'EXPIRED' ? 'grey' : 'green',
8974
- sx: {
8975
- width: 66,
8976
- height: '16px'
8977
- }
8978
- }))))));
9152
+ }))))))));
8979
9153
  }))));
8980
9154
  };
8981
9155
  const PublicWarningList = ({
@@ -8989,7 +9163,7 @@ const PublicWarningList = ({
8989
9163
  onCreateWarning: _onCreateWarning = () => {},
8990
9164
  onDeleteWarning: _onDeleteWarning2 = () => {},
8991
9165
  onRefetchWarnings: _onRefetchWarnings = () => {},
8992
- onIgnoreWarning: _onIgnoreWarning2 = () => {}
9166
+ onDeleteReviewWarning: _onDeleteReviewWarning2 = () => {}
8993
9167
  }) => {
8994
9168
  const {
8995
9169
  t
@@ -9083,7 +9257,7 @@ const PublicWarningList = ({
9083
9257
  onSelectWarning: _onSelectWarning2,
9084
9258
  onEditWarning: _onEditWarning2,
9085
9259
  onDeleteWarning: _onDeleteWarning2,
9086
- onIgnoreWarning: _onIgnoreWarning2,
9260
+ onDeleteReviewWarning: _onDeleteReviewWarning2,
9087
9261
  activeWarningId: _selectedPublicWarningId
9088
9262
  }), /*#__PURE__*/React__default.createElement(WarningsOnStatus, {
9089
9263
  status: "DRAFT",
@@ -9091,7 +9265,7 @@ const PublicWarningList = ({
9091
9265
  onSelectWarning: _onSelectWarning2,
9092
9266
  onEditWarning: _onEditWarning2,
9093
9267
  onDeleteWarning: _onDeleteWarning2,
9094
- onIgnoreWarning: _onIgnoreWarning2,
9268
+ onDeleteReviewWarning: _onDeleteReviewWarning2,
9095
9269
  activeWarningId: _selectedPublicWarningId
9096
9270
  }), /*#__PURE__*/React__default.createElement(WarningsOnStatus, {
9097
9271
  status: "PUBLISHED",
@@ -9099,7 +9273,7 @@ const PublicWarningList = ({
9099
9273
  onSelectWarning: _onSelectWarning2,
9100
9274
  onEditWarning: _onEditWarning2,
9101
9275
  onDeleteWarning: _onDeleteWarning2,
9102
- onIgnoreWarning: _onIgnoreWarning2,
9276
+ onDeleteReviewWarning: _onDeleteReviewWarning2,
9103
9277
  activeWarningId: _selectedPublicWarningId
9104
9278
  }), /*#__PURE__*/React__default.createElement(WarningsOnStatus, {
9105
9279
  status: "EXPIRED",
@@ -9107,7 +9281,7 @@ const PublicWarningList = ({
9107
9281
  onSelectWarning: _onSelectWarning2,
9108
9282
  onEditWarning: _onEditWarning2,
9109
9283
  onDeleteWarning: _onDeleteWarning2,
9110
- onIgnoreWarning: _onIgnoreWarning2,
9284
+ onDeleteReviewWarning: _onDeleteReviewWarning2,
9111
9285
  activeWarningId: _selectedPublicWarningId
9112
9286
  }))));
9113
9287
  };
@@ -9315,16 +9489,16 @@ const PublicWarningListConnect = () => {
9315
9489
  callback: () => onRemoveSuccess(warningId, t('warning-dialog-delete-succes'))
9316
9490
  });
9317
9491
  };
9318
- const ignoreWarning = warning => {
9492
+ const deleteReviewWarning = warning => {
9319
9493
  const ignoredWarning = Object.assign(Object.assign({}, warning), {
9320
9494
  status: 'IGNORED'
9321
9495
  });
9322
9496
  setConfirmDialogOptions({
9323
- confirmLabel: t('warning-dialog-ignore-confirm'),
9324
- title: t('warning-dialog-ignore-title'),
9325
- description: t('warning-dialog-ignore-description'),
9497
+ confirmLabel: t('warning-dialog-delete-confirm'),
9498
+ title: t('warning-dialog-delete-title'),
9499
+ description: t('warning-dialog-delete-description'),
9326
9500
  request: () => warningsApi.updateWarning(ignoredWarning.id, ignoredWarning),
9327
- callback: () => onRemoveSuccess(ignoredWarning.id, t('warning-dialog-ignore-succes'))
9501
+ callback: () => onRemoveSuccess(ignoredWarning.id, t('warning-dialog-delete-succes'))
9328
9502
  });
9329
9503
  };
9330
9504
  const onRemoveSuccess = (warningId, snackbarMessage) => {
@@ -9355,7 +9529,7 @@ const PublicWarningListConnect = () => {
9355
9529
  onCreateWarning: createWarning,
9356
9530
  onEditWarning: editWarning,
9357
9531
  onDeleteWarning: deleteWarning,
9358
- onIgnoreWarning: ignoreWarning,
9532
+ onDeleteReviewWarning: deleteReviewWarning,
9359
9533
  selectedPublicWarningId: selectedPublicWarningId,
9360
9534
  lastUpdatedTime: lastUpdatedTime,
9361
9535
  onRefetchWarnings: fetchWarnings
@@ -9412,7 +9586,7 @@ const componentsLookUp = (payload, apiProps) => {
9412
9586
  };
9413
9587
 
9414
9588
  const getErrorMessage = error => isAxiosError(error) ? getAxiosErrorMessage(error) : error.message;
9415
- const getToggleEditorSuccessMessage = isEditor => outsideComponentTranslations[isEditor ? 'warning-editor-add-editor' : 'warning-editor-remove-editor'];
9589
+ const getToggleEditorSuccessMessage = isEditor => translateKeyOutsideComponents(isEditor ? 'warning-editor-add-editor' : 'warning-editor-remove-editor');
9416
9590
  const publicWarningFormListener = createListenerMiddleware();
9417
9591
  publicWarningFormListener.startListening({
9418
9592
  actionCreator: publicWarningFormActions.toggleEditorWarning,
@@ -9454,7 +9628,7 @@ publicWarningFormListener.startListening({
9454
9628
  const publishedWarning = yield saveOrUpdateWarning(publicWarning);
9455
9629
  listenerApi.dispatch(publicWarningFormActions.publishWarningSuccess({
9456
9630
  publicWarning: publishedWarning,
9457
- message: outsideComponentTranslations['warning-publish-succes']
9631
+ message: translateKeyOutsideComponents('warning-publish-succes')
9458
9632
  }));
9459
9633
  listenerApi.dispatch(uiActions.setToggleOpenDialog({
9460
9634
  type: publicWarningDialogType,
@@ -9479,7 +9653,7 @@ publicWarningFormListener.startListening({
9479
9653
  const savedWarning = yield saveOrUpdateWarning(publicWarning);
9480
9654
  listenerApi.dispatch(publicWarningFormActions.saveWarningSuccess({
9481
9655
  publicWarning: savedWarning,
9482
- message: outsideComponentTranslations['warning-save-succes']
9656
+ message: translateKeyOutsideComponents('warning-save-succes')
9483
9657
  }));
9484
9658
  } catch (error) {
9485
9659
  const isDialogOpen = uiSelectors.getisDialogOpen(listenerApi.getState(), publicWarningDialogType);
@@ -9621,7 +9795,7 @@ publicWarningsListener.startListening({
9621
9795
  * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9622
9796
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
9623
9797
  * */
9624
- const getSnackbarMessage = (objectName, id) => id ? `Object "${objectName}" ${outsideComponentTranslations['update-succes']}!` : `Object "${objectName}" ${outsideComponentTranslations['save-succes']}!`;
9798
+ const getSnackbarMessage = (objectName, id) => id ? `Object "${objectName}" ${translateKeyOutsideComponents('update-succes')}!` : `Object "${objectName}" ${translateKeyOutsideComponents('save-succes')}!`;
9625
9799
  const drawingsListener = createListenerMiddleware();
9626
9800
  drawingsListener.startListening({
9627
9801
  actionCreator: drawActions.submitDrawValues,