@opengeoweb/warnings 9.25.0 → 9.25.3

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,9 +1,9 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useDispatch, useSelector } from 'react-redux';
3
- 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';
3
+ import { Polygons, Share, ExitDomain, Edit, Delete, DrawPolygon, Visibility, Add, Wind, Fog, Lightning, Snow, Rain, TemperatureHigh, TemperatureLow, CoastalEvent, breakpoints, Close, Options, Copy, Success, Expire, Remove } from '@opengeoweb/theme';
4
4
  import { uiTypes, uiActions, getSingularDrawtoolDrawLayerId, drawtoolSelectors, layerSelectors, uiSelectors, mapStoreActions, drawtoolActions, layerActions, useSetupDialog } from '@opengeoweb/store';
5
5
  import { defaultPolygon, emptyGeoJSON, MapControlButton, getIcon, rewindGeometry, getGeoJSONPropertyValue, currentlySupportedDrawModes, MapView, MapViewLayer, defaultLayers, getFeatureExtent } from '@opengeoweb/webmap-react';
6
- import { SHARED_NAMESPACE, useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, CustomToggleButton, Filter, LastUpdateTime, StatusTag, ErrorBoundary, pollingIntervalTimeout, isAxiosError as isAxiosError$1 } from '@opengeoweb/shared';
6
+ import { SHARED_NAMESPACE, useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, CustomToggleButton, Filter, getPosition, FilterChip, FilterListItem, LastUpdateTime, StatusTag, ErrorBoundary, pollingIntervalTimeout, isAxiosError as isAxiosError$1 } from '@opengeoweb/shared';
7
7
  import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware, isAnyOf } from '@reduxjs/toolkit';
8
8
  import i18n from 'i18next';
9
9
  import { useTranslation } from 'react-i18next';
@@ -12,7 +12,7 @@ import { FORM_FIELDS_NAMESPACE, ReactHookFormHiddenInput, isValidGeoJsonCoordina
12
12
  import { snackbarActions } from '@opengeoweb/snackbar';
13
13
  import * as React from 'react';
14
14
  import React__default, { useState, useEffect, useRef } from 'react';
15
- import { styled, Box, Typography, ListItem, Grid, Paper, ListItemButton, Stack, LinearProgress, Button, FormHelperText, MenuItem, Tabs, Tab, Card, CardContent, ListItemIcon, CircularProgress, List } from '@mui/material';
15
+ import { styled, Box, Typography, ListItem, Grid, Paper, ListItemButton, Stack, LinearProgress, Button, FormHelperText, MenuItem, Tabs, Tab, Card, CardContent, ListItemIcon, CircularProgress, Menu, DialogTitle, DialogContent, Switch, List } from '@mui/material';
16
16
  import { VariableSizeList } from 'react-window';
17
17
  import AutoSizer from 'react-virtualized-auto-sizer';
18
18
  import { getApi, createApiInstance, createNonAuthApiInstance, createFakeApiInstance, ApiProvider } from '@opengeoweb/api';
@@ -132,10 +132,17 @@ var en = {
132
132
  "area-object-loader-no-areas-objects": "No areas or objects found",
133
133
  objects: "Objects",
134
134
  areas: "Areas",
135
- "filter-turn-on": "Turn filter on",
136
- "filter-turn-off": "Turn filter off",
137
135
  "filter-select-all": "Select all",
138
136
  "filter-no-results": "No results",
137
+ "filter-all": "All",
138
+ "filter-options": "Filter options",
139
+ "filter-show-all": "Show all",
140
+ "filter-hide-all": "Hide all",
141
+ "filter-incident": "Incidents",
142
+ "filter-domain": "Domains",
143
+ "filter-phenomenon": "Phenomena",
144
+ "filter-level": "Levels",
145
+ "filter-source": "Sources",
139
146
  "error-title-retry": "Try again"
140
147
  };
141
148
  var nl = {
@@ -238,7 +245,7 @@ var nl = {
238
245
  "warning-list-header-end-time": "Eindtijd",
239
246
  "warning-list-header-domain": "Domein",
240
247
  "warning-list-header-phenomenon": "Fenomeen",
241
- "warning-list-header-level": "Hoogte",
248
+ "warning-list-header-level": "Niveau",
242
249
  "warning-list-header-status": "Status",
243
250
  "warning-list-header-draft": "CONCEPT",
244
251
  "area-object-loader-title": "Gebieden & Objecten toevoegen",
@@ -247,10 +254,17 @@ var nl = {
247
254
  "area-object-loader-no-areas-objects": "Geen gebieden of objecten gevonden",
248
255
  objects: "Objecten",
249
256
  areas: "Gebieden",
250
- "filter-turn-on": "Zet filter aan",
251
- "filter-turn-off": "Zet filter uit",
252
257
  "filter-select-all": "Selecteer alles",
253
258
  "filter-no-results": "Geen resultaten",
259
+ "filter-all": "Alle",
260
+ "filter-options": "Filter opties",
261
+ "filter-show-all": "Alles tonen",
262
+ "filter-hide-all": "Alles verbergen",
263
+ "filter-incident": "Incidenten",
264
+ "filter-domain": "Domeinen",
265
+ "filter-phenomenon": "Fenomenen",
266
+ "filter-level": "Niveaus",
267
+ "filter-source": "Bronnen",
254
268
  "error-title-retry": "Probeer opnieuw"
255
269
  };
256
270
  var fi = {
@@ -362,10 +376,17 @@ var fi = {
362
376
  "area-object-loader-no-areas-objects": "ei käännetty",
363
377
  objects: "ei käännetty",
364
378
  areas: "ei käännetty",
365
- "filter-turn-on": "ei käännetty",
366
- "filter-turn-off": "ei käännetty",
367
379
  "filter-select-all": "ei käännetty",
368
380
  "filter-no-results": "ei käännetty",
381
+ "filter-all": "Kaikki",
382
+ "filter-options": "ei käännetty",
383
+ "filter-show-all": "ei käännetty",
384
+ "filter-hide-all": "ei käännetty",
385
+ "filter-incident": "ei käännetty",
386
+ "filter-domain": "ei käännetty",
387
+ "filter-phenomenon": "ei käännetty",
388
+ "filter-level": "ei käännetty",
389
+ "filter-source": "ei käännetty",
369
390
  "error-title-retry": "Yritä uudelleen"
370
391
  };
371
392
  var no = {
@@ -477,10 +498,17 @@ var no = {
477
498
  "area-object-loader-no-areas-objects": "Ingen områder eller objekter funnet",
478
499
  objects: "Objekter",
479
500
  areas: "Områder",
480
- "filter-turn-on": "Skru på filter",
481
- "filter-turn-off": "Skru av filter",
482
501
  "filter-select-all": "Velg alle",
483
502
  "filter-no-results": "Ingen resultat",
503
+ "filter-all": "Alle",
504
+ "filter-options": "ikke oversatt",
505
+ "filter-show-all": "ikke oversatt",
506
+ "filter-hide-all": "ikke oversatt",
507
+ "filter-incident": "ikke oversatt",
508
+ "filter-domain": "ikke oversatt",
509
+ "filter-phenomenon": "ikke oversatt",
510
+ "filter-level": "ikke oversatt",
511
+ "filter-source": "ikke oversatt",
484
512
  "error-title-retry": "Prøv igjen"
485
513
  };
486
514
  var warningsTranslations = {
@@ -510,7 +538,7 @@ var global$o =
510
538
 
511
539
  var objectGetOwnPropertyDescriptor = {};
512
540
 
513
- var fails$p = function (exec) {
541
+ var fails$q = function (exec) {
514
542
  try {
515
543
  return !!exec();
516
544
  } catch (error) {
@@ -518,17 +546,17 @@ var fails$p = function (exec) {
518
546
  }
519
547
  };
520
548
 
521
- var fails$o = fails$p;
549
+ var fails$p = fails$q;
522
550
 
523
551
  // Detect IE8's incomplete defineProperty implementation
524
- var descriptors = !fails$o(function () {
552
+ var descriptors = !fails$p(function () {
525
553
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
526
554
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
527
555
  });
528
556
 
529
- var fails$n = fails$p;
557
+ var fails$o = fails$q;
530
558
 
531
- var functionBindNative = !fails$n(function () {
559
+ var functionBindNative = !fails$o(function () {
532
560
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
533
561
  var test = (function () { /* empty */ }).bind();
534
562
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -580,24 +608,24 @@ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
580
608
  };
581
609
  };
582
610
 
583
- var uncurryThis$m = functionUncurryThis;
611
+ var uncurryThis$n = functionUncurryThis;
584
612
 
585
- var toString$b = uncurryThis$m({}.toString);
586
- var stringSlice$5 = uncurryThis$m(''.slice);
613
+ var toString$c = uncurryThis$n({}.toString);
614
+ var stringSlice$5 = uncurryThis$n(''.slice);
587
615
 
588
616
  var classofRaw$2 = function (it) {
589
- return stringSlice$5(toString$b(it), 8, -1);
617
+ return stringSlice$5(toString$c(it), 8, -1);
590
618
  };
591
619
 
592
- var uncurryThis$l = functionUncurryThis;
593
- var fails$m = fails$p;
620
+ var uncurryThis$m = functionUncurryThis;
621
+ var fails$n = fails$q;
594
622
  var classof$8 = classofRaw$2;
595
623
 
596
624
  var $Object$4 = Object;
597
- var split = uncurryThis$l(''.split);
625
+ var split = uncurryThis$m(''.split);
598
626
 
599
627
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
600
- var indexedObject = fails$m(function () {
628
+ var indexedObject = fails$n(function () {
601
629
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
602
630
  // eslint-disable-next-line no-prototype-builtins -- safe
603
631
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -613,12 +641,12 @@ var isNullOrUndefined$6 = function (it) {
613
641
 
614
642
  var isNullOrUndefined$5 = isNullOrUndefined$6;
615
643
 
616
- var $TypeError$h = TypeError;
644
+ var $TypeError$i = TypeError;
617
645
 
618
646
  // `RequireObjectCoercible` abstract operation
619
647
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
620
648
  var requireObjectCoercible$8 = function (it) {
621
- if (isNullOrUndefined$5(it)) throw new $TypeError$h("Can't call method on " + it);
649
+ if (isNullOrUndefined$5(it)) throw new $TypeError$i("Can't call method on " + it);
622
650
  return it;
623
651
  };
624
652
 
@@ -659,14 +687,14 @@ var getBuiltIn$9 = function (namespace, method) {
659
687
  return arguments.length < 2 ? aFunction(global$n[namespace]) : global$n[namespace] && global$n[namespace][method];
660
688
  };
661
689
 
662
- var uncurryThis$k = functionUncurryThis;
690
+ var uncurryThis$l = functionUncurryThis;
663
691
 
664
- var objectIsPrototypeOf = uncurryThis$k({}.isPrototypeOf);
692
+ var objectIsPrototypeOf = uncurryThis$l({}.isPrototypeOf);
665
693
 
666
694
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
667
695
 
668
696
  var global$m = global$o;
669
- var userAgent$3 = engineUserAgent;
697
+ var userAgent$5 = engineUserAgent;
670
698
 
671
699
  var process$3 = global$m.process;
672
700
  var Deno$1 = global$m.Deno;
@@ -683,10 +711,10 @@ if (v8) {
683
711
 
684
712
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
685
713
  // so check `userAgent` even if `.v8` exists, but 0
686
- if (!version && userAgent$3) {
687
- match = userAgent$3.match(/Edge\/(\d+)/);
714
+ if (!version && userAgent$5) {
715
+ match = userAgent$5.match(/Edge\/(\d+)/);
688
716
  if (!match || match[1] >= 74) {
689
- match = userAgent$3.match(/Chrome\/(\d+)/);
717
+ match = userAgent$5.match(/Chrome\/(\d+)/);
690
718
  if (match) version = +match[1];
691
719
  }
692
720
  }
@@ -695,13 +723,13 @@ var engineV8Version = version;
695
723
 
696
724
  /* eslint-disable es/no-symbol -- required for testing */
697
725
  var V8_VERSION$1 = engineV8Version;
698
- var fails$l = fails$p;
726
+ var fails$m = fails$q;
699
727
  var global$l = global$o;
700
728
 
701
729
  var $String$5 = global$l.String;
702
730
 
703
731
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
704
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$l(function () {
732
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$m(function () {
705
733
  var symbol = Symbol('symbol detection');
706
734
  // Chrome 38 Symbol has incorrect toString conversion
707
735
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -735,7 +763,7 @@ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
735
763
 
736
764
  var $String$4 = String;
737
765
 
738
- var tryToString$4 = function (argument) {
766
+ var tryToString$5 = function (argument) {
739
767
  try {
740
768
  return $String$4(argument);
741
769
  } catch (error) {
@@ -744,31 +772,31 @@ var tryToString$4 = function (argument) {
744
772
  };
745
773
 
746
774
  var isCallable$j = isCallable$n;
747
- var tryToString$3 = tryToString$4;
775
+ var tryToString$4 = tryToString$5;
748
776
 
749
- var $TypeError$g = TypeError;
777
+ var $TypeError$h = TypeError;
750
778
 
751
779
  // `Assert: IsCallable(argument) is true`
752
- var aCallable$9 = function (argument) {
780
+ var aCallable$a = function (argument) {
753
781
  if (isCallable$j(argument)) return argument;
754
- throw new $TypeError$g(tryToString$3(argument) + ' is not a function');
782
+ throw new $TypeError$h(tryToString$4(argument) + ' is not a function');
755
783
  };
756
784
 
757
- var aCallable$8 = aCallable$9;
785
+ var aCallable$9 = aCallable$a;
758
786
  var isNullOrUndefined$4 = isNullOrUndefined$6;
759
787
 
760
788
  // `GetMethod` abstract operation
761
789
  // https://tc39.es/ecma262/#sec-getmethod
762
790
  var getMethod$5 = function (V, P) {
763
791
  var func = V[P];
764
- return isNullOrUndefined$4(func) ? undefined : aCallable$8(func);
792
+ return isNullOrUndefined$4(func) ? undefined : aCallable$9(func);
765
793
  };
766
794
 
767
795
  var call$g = functionCall;
768
796
  var isCallable$i = isCallable$n;
769
797
  var isObject$c = isObject$d;
770
798
 
771
- var $TypeError$f = TypeError;
799
+ var $TypeError$g = TypeError;
772
800
 
773
801
  // `OrdinaryToPrimitive` abstract operation
774
802
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
@@ -777,7 +805,7 @@ var ordinaryToPrimitive$1 = function (input, pref) {
777
805
  if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$c(val = call$g(fn, input))) return val;
778
806
  if (isCallable$i(fn = input.valueOf) && !isObject$c(val = call$g(fn, input))) return val;
779
807
  if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$c(val = call$g(fn, input))) return val;
780
- throw new $TypeError$f("Can't convert object to primitive value");
808
+ throw new $TypeError$g("Can't convert object to primitive value");
781
809
  };
782
810
 
783
811
  var sharedStore = {exports: {}};
@@ -823,30 +851,30 @@ var $Object$2 = Object;
823
851
 
824
852
  // `ToObject` abstract operation
825
853
  // https://tc39.es/ecma262/#sec-toobject
826
- var toObject$5 = function (argument) {
854
+ var toObject$6 = function (argument) {
827
855
  return $Object$2(requireObjectCoercible$6(argument));
828
856
  };
829
857
 
830
- var uncurryThis$j = functionUncurryThis;
831
- var toObject$4 = toObject$5;
858
+ var uncurryThis$k = functionUncurryThis;
859
+ var toObject$5 = toObject$6;
832
860
 
833
- var hasOwnProperty = uncurryThis$j({}.hasOwnProperty);
861
+ var hasOwnProperty = uncurryThis$k({}.hasOwnProperty);
834
862
 
835
863
  // `HasOwnProperty` abstract operation
836
864
  // https://tc39.es/ecma262/#sec-hasownproperty
837
865
  // eslint-disable-next-line es/no-object-hasown -- safe
838
866
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
839
- return hasOwnProperty(toObject$4(it), key);
867
+ return hasOwnProperty(toObject$5(it), key);
840
868
  };
841
869
 
842
- var uncurryThis$i = functionUncurryThis;
870
+ var uncurryThis$j = functionUncurryThis;
843
871
 
844
872
  var id = 0;
845
873
  var postfix = Math.random();
846
- var toString$a = uncurryThis$i(1.0.toString);
874
+ var toString$b = uncurryThis$j(1.0.toString);
847
875
 
848
876
  var uid$2 = function (key) {
849
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$a(++id + postfix, 36);
877
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$b(++id + postfix, 36);
850
878
  };
851
879
 
852
880
  var global$j = global$o;
@@ -875,7 +903,7 @@ var getMethod$4 = getMethod$5;
875
903
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
876
904
  var wellKnownSymbol$g = wellKnownSymbol$h;
877
905
 
878
- var $TypeError$e = TypeError;
906
+ var $TypeError$f = TypeError;
879
907
  var TO_PRIMITIVE = wellKnownSymbol$g('toPrimitive');
880
908
 
881
909
  // `ToPrimitive` abstract operation
@@ -888,7 +916,7 @@ var toPrimitive$1 = function (input, pref) {
888
916
  if (pref === undefined) pref = 'default';
889
917
  result = call$f(exoticToPrim, input, pref);
890
918
  if (!isObject$b(result) || isSymbol$1(result)) return result;
891
- throw new $TypeError$e("Can't convert object to primitive value");
919
+ throw new $TypeError$f("Can't convert object to primitive value");
892
920
  }
893
921
  if (pref === undefined) pref = 'number';
894
922
  return ordinaryToPrimitive(input, pref);
@@ -916,11 +944,11 @@ var documentCreateElement$2 = function (it) {
916
944
  };
917
945
 
918
946
  var DESCRIPTORS$e = descriptors;
919
- var fails$k = fails$p;
947
+ var fails$l = fails$q;
920
948
  var createElement$1 = documentCreateElement$2;
921
949
 
922
950
  // Thanks to IE8 for its funny defineProperty
923
- var ie8DomDefine = !DESCRIPTORS$e && !fails$k(function () {
951
+ var ie8DomDefine = !DESCRIPTORS$e && !fails$l(function () {
924
952
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
925
953
  return Object.defineProperty(createElement$1('div'), 'a', {
926
954
  get: function () { return 7; }
@@ -953,11 +981,11 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$d ? $getOwnPropertyDescriptor$1 :
953
981
  var objectDefineProperty = {};
954
982
 
955
983
  var DESCRIPTORS$c = descriptors;
956
- var fails$j = fails$p;
984
+ var fails$k = fails$q;
957
985
 
958
986
  // V8 ~ Chrome 36-
959
987
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
960
- var v8PrototypeDefineBug = DESCRIPTORS$c && fails$j(function () {
988
+ var v8PrototypeDefineBug = DESCRIPTORS$c && fails$k(function () {
961
989
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
962
990
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
963
991
  value: 42,
@@ -968,12 +996,12 @@ var v8PrototypeDefineBug = DESCRIPTORS$c && fails$j(function () {
968
996
  var isObject$9 = isObject$d;
969
997
 
970
998
  var $String$3 = String;
971
- var $TypeError$d = TypeError;
999
+ var $TypeError$e = TypeError;
972
1000
 
973
1001
  // `Assert: Type(argument) is Object`
974
1002
  var anObject$d = function (argument) {
975
1003
  if (isObject$9(argument)) return argument;
976
- throw new $TypeError$d($String$3(argument) + ' is not an object');
1004
+ throw new $TypeError$e($String$3(argument) + ' is not an object');
977
1005
  };
978
1006
 
979
1007
  var DESCRIPTORS$b = descriptors;
@@ -982,7 +1010,7 @@ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
982
1010
  var anObject$c = anObject$d;
983
1011
  var toPropertyKey = toPropertyKey$2;
984
1012
 
985
- var $TypeError$c = TypeError;
1013
+ var $TypeError$d = TypeError;
986
1014
  // eslint-disable-next-line es/no-object-defineproperty -- safe
987
1015
  var $defineProperty = Object.defineProperty;
988
1016
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -1015,7 +1043,7 @@ objectDefineProperty.f = DESCRIPTORS$b ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
1015
1043
  if (IE8_DOM_DEFINE) try {
1016
1044
  return $defineProperty(O, P, Attributes);
1017
1045
  } catch (error) { /* empty */ }
1018
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$c('Accessors not supported');
1046
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$d('Accessors not supported');
1019
1047
  if ('value' in Attributes) O[P] = Attributes.value;
1020
1048
  return O;
1021
1049
  };
@@ -1051,11 +1079,11 @@ var functionName = {
1051
1079
  CONFIGURABLE: CONFIGURABLE
1052
1080
  };
1053
1081
 
1054
- var uncurryThis$h = functionUncurryThis;
1082
+ var uncurryThis$i = functionUncurryThis;
1055
1083
  var isCallable$h = isCallable$n;
1056
1084
  var store$1 = sharedStoreExports;
1057
1085
 
1058
- var functionToString = uncurryThis$h(Function.toString);
1086
+ var functionToString = uncurryThis$i(Function.toString);
1059
1087
 
1060
1088
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
1061
1089
  if (!isCallable$h(store$1.inspectSource)) {
@@ -1155,8 +1183,8 @@ var internalState = {
1155
1183
  getterFor: getterFor
1156
1184
  };
1157
1185
 
1158
- var uncurryThis$g = functionUncurryThis;
1159
- var fails$i = fails$p;
1186
+ var uncurryThis$h = functionUncurryThis;
1187
+ var fails$j = fails$q;
1160
1188
  var isCallable$f = isCallable$n;
1161
1189
  var hasOwn$7 = hasOwnProperty_1;
1162
1190
  var DESCRIPTORS$8 = descriptors;
@@ -1169,11 +1197,11 @@ var getInternalState$2 = InternalStateModule$2.get;
1169
1197
  var $String$2 = String;
1170
1198
  // eslint-disable-next-line es/no-object-defineproperty -- safe
1171
1199
  var defineProperty$6 = Object.defineProperty;
1172
- var stringSlice$4 = uncurryThis$g(''.slice);
1173
- var replace$4 = uncurryThis$g(''.replace);
1174
- var join = uncurryThis$g([].join);
1200
+ var stringSlice$4 = uncurryThis$h(''.slice);
1201
+ var replace$4 = uncurryThis$h(''.replace);
1202
+ var join = uncurryThis$h([].join);
1175
1203
 
1176
- var CONFIGURABLE_LENGTH = DESCRIPTORS$8 && !fails$i(function () {
1204
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$8 && !fails$j(function () {
1177
1205
  return defineProperty$6(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
1178
1206
  });
1179
1207
 
@@ -1243,14 +1271,14 @@ var defineBuiltIn$7 = function (O, key, value, options) {
1243
1271
  var objectGetOwnPropertyNames = {};
1244
1272
 
1245
1273
  var ceil = Math.ceil;
1246
- var floor = Math.floor;
1274
+ var floor$1 = Math.floor;
1247
1275
 
1248
1276
  // `Math.trunc` method
1249
1277
  // https://tc39.es/ecma262/#sec-math.trunc
1250
1278
  // eslint-disable-next-line es/no-math-trunc -- safe
1251
1279
  var mathTrunc = Math.trunc || function trunc(x) {
1252
1280
  var n = +x;
1253
- return (n > 0 ? floor : ceil)(n);
1281
+ return (n > 0 ? floor$1 : ceil)(n);
1254
1282
  };
1255
1283
 
1256
1284
  var trunc = mathTrunc;
@@ -1291,19 +1319,19 @@ var toLength$1 = toLength$2;
1291
1319
 
1292
1320
  // `LengthOfArrayLike` abstract operation
1293
1321
  // https://tc39.es/ecma262/#sec-lengthofarraylike
1294
- var lengthOfArrayLike$4 = function (obj) {
1322
+ var lengthOfArrayLike$5 = function (obj) {
1295
1323
  return toLength$1(obj.length);
1296
1324
  };
1297
1325
 
1298
1326
  var toIndexedObject$3 = toIndexedObject$5;
1299
1327
  var toAbsoluteIndex = toAbsoluteIndex$1;
1300
- var lengthOfArrayLike$3 = lengthOfArrayLike$4;
1328
+ var lengthOfArrayLike$4 = lengthOfArrayLike$5;
1301
1329
 
1302
1330
  // `Array.prototype.{ indexOf, includes }` methods implementation
1303
1331
  var createMethod$3 = function (IS_INCLUDES) {
1304
1332
  return function ($this, el, fromIndex) {
1305
1333
  var O = toIndexedObject$3($this);
1306
- var length = lengthOfArrayLike$3(O);
1334
+ var length = lengthOfArrayLike$4(O);
1307
1335
  if (length === 0) return !IS_INCLUDES && -1;
1308
1336
  var index = toAbsoluteIndex(fromIndex, length);
1309
1337
  var value;
@@ -1329,23 +1357,23 @@ var arrayIncludes = {
1329
1357
  indexOf: createMethod$3(false)
1330
1358
  };
1331
1359
 
1332
- var uncurryThis$f = functionUncurryThis;
1360
+ var uncurryThis$g = functionUncurryThis;
1333
1361
  var hasOwn$6 = hasOwnProperty_1;
1334
1362
  var toIndexedObject$2 = toIndexedObject$5;
1335
1363
  var indexOf$1 = arrayIncludes.indexOf;
1336
1364
  var hiddenKeys$2 = hiddenKeys$4;
1337
1365
 
1338
- var push$1 = uncurryThis$f([].push);
1366
+ var push$2 = uncurryThis$g([].push);
1339
1367
 
1340
1368
  var objectKeysInternal = function (object, names) {
1341
1369
  var O = toIndexedObject$2(object);
1342
1370
  var i = 0;
1343
1371
  var result = [];
1344
1372
  var key;
1345
- for (key in O) !hasOwn$6(hiddenKeys$2, key) && hasOwn$6(O, key) && push$1(result, key);
1373
+ for (key in O) !hasOwn$6(hiddenKeys$2, key) && hasOwn$6(O, key) && push$2(result, key);
1346
1374
  // Don't enum bug & hidden keys
1347
1375
  while (names.length > i) if (hasOwn$6(O, key = names[i++])) {
1348
- ~indexOf$1(result, key) || push$1(result, key);
1376
+ ~indexOf$1(result, key) || push$2(result, key);
1349
1377
  }
1350
1378
  return result;
1351
1379
  };
@@ -1379,12 +1407,12 @@ var objectGetOwnPropertySymbols = {};
1379
1407
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1380
1408
 
1381
1409
  var getBuiltIn$7 = getBuiltIn$9;
1382
- var uncurryThis$e = functionUncurryThis;
1410
+ var uncurryThis$f = functionUncurryThis;
1383
1411
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1384
1412
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1385
1413
  var anObject$b = anObject$d;
1386
1414
 
1387
- var concat$1 = uncurryThis$e([].concat);
1415
+ var concat$1 = uncurryThis$f([].concat);
1388
1416
 
1389
1417
  // all object keys, includes non-enumerable and symbols
1390
1418
  var ownKeys$1 = getBuiltIn$7('Reflect', 'ownKeys') || function ownKeys(it) {
@@ -1410,7 +1438,7 @@ var copyConstructorProperties$3 = function (target, source, exceptions) {
1410
1438
  }
1411
1439
  };
1412
1440
 
1413
- var fails$h = fails$p;
1441
+ var fails$i = fails$q;
1414
1442
  var isCallable$d = isCallable$n;
1415
1443
 
1416
1444
  var replacement = /#|\.prototype\./;
@@ -1419,7 +1447,7 @@ var isForced$2 = function (feature, detection) {
1419
1447
  var value = data[normalize(feature)];
1420
1448
  return value === POLYFILL ? true
1421
1449
  : value === NATIVE ? false
1422
- : isCallable$d(detection) ? fails$h(detection)
1450
+ : isCallable$d(detection) ? fails$i(detection)
1423
1451
  : !!detection;
1424
1452
  };
1425
1453
 
@@ -1499,24 +1527,24 @@ var objectKeys$2 = Object.keys || function keys(O) {
1499
1527
  };
1500
1528
 
1501
1529
  var DESCRIPTORS$7 = descriptors;
1502
- var uncurryThis$d = functionUncurryThis;
1530
+ var uncurryThis$e = functionUncurryThis;
1503
1531
  var call$d = functionCall;
1504
- var fails$g = fails$p;
1532
+ var fails$h = fails$q;
1505
1533
  var objectKeys$1 = objectKeys$2;
1506
1534
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1507
1535
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1508
- var toObject$3 = toObject$5;
1536
+ var toObject$4 = toObject$6;
1509
1537
  var IndexedObject$1 = indexedObject;
1510
1538
 
1511
1539
  // eslint-disable-next-line es/no-object-assign -- safe
1512
1540
  var $assign = Object.assign;
1513
1541
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1514
1542
  var defineProperty$5 = Object.defineProperty;
1515
- var concat = uncurryThis$d([].concat);
1543
+ var concat = uncurryThis$e([].concat);
1516
1544
 
1517
1545
  // `Object.assign` method
1518
1546
  // https://tc39.es/ecma262/#sec-object.assign
1519
- var objectAssign = !$assign || fails$g(function () {
1547
+ var objectAssign = !$assign || fails$h(function () {
1520
1548
  // should have correct order of operations (Edge bug)
1521
1549
  if (DESCRIPTORS$7 && $assign({ b: 1 }, $assign(defineProperty$5({}, 'a', {
1522
1550
  enumerable: true,
@@ -1537,7 +1565,7 @@ var objectAssign = !$assign || fails$g(function () {
1537
1565
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1538
1566
  return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
1539
1567
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1540
- var T = toObject$3(target);
1568
+ var T = toObject$4(target);
1541
1569
  var argumentsLength = arguments.length;
1542
1570
  var index = 1;
1543
1571
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
@@ -1555,13 +1583,13 @@ var objectAssign = !$assign || fails$g(function () {
1555
1583
  } return T;
1556
1584
  } : $assign;
1557
1585
 
1558
- var $$h = _export;
1586
+ var $$i = _export;
1559
1587
  var assign = objectAssign;
1560
1588
 
1561
1589
  // `Object.assign` method
1562
1590
  // https://tc39.es/ecma262/#sec-object.assign
1563
1591
  // eslint-disable-next-line es/no-object-assign -- required for testing
1564
- $$h({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1592
+ $$i({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1565
1593
  assign: assign
1566
1594
  });
1567
1595
 
@@ -1624,6 +1652,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
1624
1652
  *
1625
1653
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1626
1654
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
1655
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1627
1656
  * */
1628
1657
  const objectDialogType = uiTypes.DialogTypes.ObjectManager;
1629
1658
  const drawingDialogType = uiTypes.DialogTypes.DrawingTool;
@@ -1644,6 +1673,7 @@ const areaObjectLoaderType = uiTypes.DialogTypes.AreaObjectLoader;
1644
1673
  *
1645
1674
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1646
1675
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
1676
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1647
1677
  * */
1648
1678
  const drawAdapter = createEntityAdapter({
1649
1679
  selectId: draw => draw.drawingInstanceId
@@ -1740,6 +1770,7 @@ const drawActions = slice$2.actions;
1740
1770
  *
1741
1771
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1742
1772
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
1773
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1743
1774
  * */
1744
1775
  const {
1745
1776
  selectById: selectDrawByInstanceId
@@ -1774,6 +1805,7 @@ const useWarningsTranslation = () => useTranslation(ns);
1774
1805
  *
1775
1806
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1776
1807
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
1808
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1777
1809
  * */
1778
1810
  const confirmationDialogOptions = t => {
1779
1811
  return {
@@ -2203,9 +2235,9 @@ var addToUnscopables$2 = function (key) {
2203
2235
 
2204
2236
  var iterators = {};
2205
2237
 
2206
- var fails$f = fails$p;
2238
+ var fails$g = fails$q;
2207
2239
 
2208
- var correctPrototypeGetter = !fails$f(function () {
2240
+ var correctPrototypeGetter = !fails$g(function () {
2209
2241
  function F() { /* empty */ }
2210
2242
  F.prototype.constructor = null;
2211
2243
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -2214,7 +2246,7 @@ var correctPrototypeGetter = !fails$f(function () {
2214
2246
 
2215
2247
  var hasOwn$4 = hasOwnProperty_1;
2216
2248
  var isCallable$c = isCallable$n;
2217
- var toObject$2 = toObject$5;
2249
+ var toObject$3 = toObject$6;
2218
2250
  var sharedKey = sharedKey$3;
2219
2251
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
2220
2252
 
@@ -2226,7 +2258,7 @@ var ObjectPrototype = $Object$1.prototype;
2226
2258
  // https://tc39.es/ecma262/#sec-object.getprototypeof
2227
2259
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
2228
2260
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
2229
- var object = toObject$2(O);
2261
+ var object = toObject$3(O);
2230
2262
  if (hasOwn$4(object, IE_PROTO)) return object[IE_PROTO];
2231
2263
  var constructor = object.constructor;
2232
2264
  if (isCallable$c(constructor) && object instanceof constructor) {
@@ -2234,7 +2266,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
2234
2266
  } return object instanceof $Object$1 ? ObjectPrototype : null;
2235
2267
  };
2236
2268
 
2237
- var fails$e = fails$p;
2269
+ var fails$f = fails$q;
2238
2270
  var isCallable$b = isCallable$n;
2239
2271
  var isObject$7 = isObject$d;
2240
2272
  var getPrototypeOf$1 = objectGetPrototypeOf;
@@ -2259,7 +2291,7 @@ if ([].keys) {
2259
2291
  }
2260
2292
  }
2261
2293
 
2262
- var NEW_ITERATOR_PROTOTYPE = !isObject$7(IteratorPrototype$2) || fails$e(function () {
2294
+ var NEW_ITERATOR_PROTOTYPE = !isObject$7(IteratorPrototype$2) || fails$f(function () {
2263
2295
  var test = {};
2264
2296
  // FF44- legacy iterators case
2265
2297
  return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
@@ -2309,13 +2341,13 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
2309
2341
  return IteratorConstructor;
2310
2342
  };
2311
2343
 
2312
- var uncurryThis$c = functionUncurryThis;
2313
- var aCallable$7 = aCallable$9;
2344
+ var uncurryThis$d = functionUncurryThis;
2345
+ var aCallable$8 = aCallable$a;
2314
2346
 
2315
2347
  var functionUncurryThisAccessor = function (object, key, method) {
2316
2348
  try {
2317
2349
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2318
- return uncurryThis$c(aCallable$7(Object.getOwnPropertyDescriptor(object, key)[method]));
2350
+ return uncurryThis$d(aCallable$8(Object.getOwnPropertyDescriptor(object, key)[method]));
2319
2351
  } catch (error) { /* empty */ }
2320
2352
  };
2321
2353
 
@@ -2328,11 +2360,11 @@ var isPossiblePrototype$1 = function (argument) {
2328
2360
  var isPossiblePrototype = isPossiblePrototype$1;
2329
2361
 
2330
2362
  var $String$1 = String;
2331
- var $TypeError$b = TypeError;
2363
+ var $TypeError$c = TypeError;
2332
2364
 
2333
2365
  var aPossiblePrototype$1 = function (argument) {
2334
2366
  if (isPossiblePrototype(argument)) return argument;
2335
- throw new $TypeError$b("Can't set " + $String$1(argument) + ' as a prototype');
2367
+ throw new $TypeError$c("Can't set " + $String$1(argument) + ' as a prototype');
2336
2368
  };
2337
2369
 
2338
2370
  /* eslint-disable no-proto -- safe */
@@ -2364,7 +2396,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
2364
2396
  };
2365
2397
  }() : undefined);
2366
2398
 
2367
- var $$g = _export;
2399
+ var $$h = _export;
2368
2400
  var call$c = functionCall;
2369
2401
  var FunctionName = functionName;
2370
2402
  var isCallable$a = isCallable$n;
@@ -2452,7 +2484,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
2452
2484
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
2453
2485
  defineBuiltIn$4(IterablePrototype, KEY, methods[KEY]);
2454
2486
  }
2455
- } else $$g({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
2487
+ } else $$h({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
2456
2488
  }
2457
2489
 
2458
2490
  // define iterator
@@ -2624,7 +2656,7 @@ var isArray$1 = Array.isArray || function isArray(argument) {
2624
2656
  var DESCRIPTORS$4 = descriptors;
2625
2657
  var isArray = isArray$1;
2626
2658
 
2627
- var $TypeError$a = TypeError;
2659
+ var $TypeError$b = TypeError;
2628
2660
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2629
2661
  var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
2630
2662
 
@@ -2642,28 +2674,28 @@ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$4 && !function () {
2642
2674
 
2643
2675
  var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
2644
2676
  if (isArray(O) && !getOwnPropertyDescriptor$1(O, 'length').writable) {
2645
- throw new $TypeError$a('Cannot set read only .length');
2677
+ throw new $TypeError$b('Cannot set read only .length');
2646
2678
  } return O.length = length;
2647
2679
  } : function (O, length) {
2648
2680
  return O.length = length;
2649
2681
  };
2650
2682
 
2651
- var $TypeError$9 = TypeError;
2683
+ var $TypeError$a = TypeError;
2652
2684
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
2653
2685
 
2654
2686
  var doesNotExceedSafeInteger$1 = function (it) {
2655
- if (it > MAX_SAFE_INTEGER) throw $TypeError$9('Maximum allowed index exceeded');
2687
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$a('Maximum allowed index exceeded');
2656
2688
  return it;
2657
2689
  };
2658
2690
 
2659
- var $$f = _export;
2660
- var toObject$1 = toObject$5;
2661
- var lengthOfArrayLike$2 = lengthOfArrayLike$4;
2691
+ var $$g = _export;
2692
+ var toObject$2 = toObject$6;
2693
+ var lengthOfArrayLike$3 = lengthOfArrayLike$5;
2662
2694
  var setArrayLength = arraySetLength;
2663
2695
  var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
2664
- var fails$d = fails$p;
2696
+ var fails$e = fails$q;
2665
2697
 
2666
- var INCORRECT_TO_LENGTH = fails$d(function () {
2698
+ var INCORRECT_TO_LENGTH = fails$e(function () {
2667
2699
  return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
2668
2700
  });
2669
2701
 
@@ -2678,15 +2710,15 @@ var properErrorOnNonWritableLength = function () {
2678
2710
  }
2679
2711
  };
2680
2712
 
2681
- var FORCED$3 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
2713
+ var FORCED$4 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
2682
2714
 
2683
2715
  // `Array.prototype.push` method
2684
2716
  // https://tc39.es/ecma262/#sec-array.prototype.push
2685
- $$f({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {
2717
+ $$g({ target: 'Array', proto: true, arity: 1, forced: FORCED$4 }, {
2686
2718
  // eslint-disable-next-line no-unused-vars -- required for `.length`
2687
2719
  push: function push(item) {
2688
- var O = toObject$1(this);
2689
- var len = lengthOfArrayLike$2(O);
2720
+ var O = toObject$2(this);
2721
+ var len = lengthOfArrayLike$3(O);
2690
2722
  var argCount = arguments.length;
2691
2723
  doesNotExceedSafeInteger(len + argCount);
2692
2724
  for (var i = 0; i < argCount; i++) {
@@ -2713,6 +2745,7 @@ $$f({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {
2713
2745
  *
2714
2746
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2715
2747
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
2748
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2716
2749
  * */
2717
2750
  const DATE_FORMAT_HEADER = 'EEEE, MMMM dd';
2718
2751
 
@@ -3127,6 +3160,7 @@ const ObjectManager = ({
3127
3160
  *
3128
3161
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3129
3162
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
3163
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3130
3164
  * */
3131
3165
  const API_NAME = 'warnings';
3132
3166
  const getIdFromUrl = url => {
@@ -3258,9 +3292,397 @@ const ConfirmDeleteDialog = ({
3258
3292
  *
3259
3293
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3260
3294
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
3295
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3261
3296
  * */
3262
3297
  const publicWarningDialogType = uiTypes.DialogTypes.PublicWarnings;
3263
3298
 
3299
+ var $$f = _export;
3300
+ var $includes = arrayIncludes.includes;
3301
+ var fails$d = fails$q;
3302
+ var addToUnscopables = addToUnscopables$2;
3303
+
3304
+ // FF99+ bug
3305
+ var BROKEN_ON_SPARSE = fails$d(function () {
3306
+ // eslint-disable-next-line es/no-array-prototype-includes -- detection
3307
+ return !Array(1).includes();
3308
+ });
3309
+
3310
+ // `Array.prototype.includes` method
3311
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
3312
+ $$f({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
3313
+ includes: function includes(el /* , fromIndex = 0 */) {
3314
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
3315
+ }
3316
+ });
3317
+
3318
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3319
+ addToUnscopables('includes');
3320
+
3321
+ var isObject$4 = isObject$d;
3322
+ var classof$6 = classofRaw$2;
3323
+ var wellKnownSymbol$a = wellKnownSymbol$h;
3324
+
3325
+ var MATCH$1 = wellKnownSymbol$a('match');
3326
+
3327
+ // `IsRegExp` abstract operation
3328
+ // https://tc39.es/ecma262/#sec-isregexp
3329
+ var isRegexp = function (it) {
3330
+ var isRegExp;
3331
+ return isObject$4(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$6(it) === 'RegExp');
3332
+ };
3333
+
3334
+ var isRegExp = isRegexp;
3335
+
3336
+ var $TypeError$9 = TypeError;
3337
+
3338
+ var notARegexp = function (it) {
3339
+ if (isRegExp(it)) {
3340
+ throw new $TypeError$9("The method doesn't accept regular expressions");
3341
+ } return it;
3342
+ };
3343
+
3344
+ var wellKnownSymbol$9 = wellKnownSymbol$h;
3345
+
3346
+ var TO_STRING_TAG$1 = wellKnownSymbol$9('toStringTag');
3347
+ var test$1 = {};
3348
+
3349
+ test$1[TO_STRING_TAG$1] = 'z';
3350
+
3351
+ var toStringTagSupport = String(test$1) === '[object z]';
3352
+
3353
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
3354
+ var isCallable$9 = isCallable$n;
3355
+ var classofRaw$1 = classofRaw$2;
3356
+ var wellKnownSymbol$8 = wellKnownSymbol$h;
3357
+
3358
+ var TO_STRING_TAG = wellKnownSymbol$8('toStringTag');
3359
+ var $Object = Object;
3360
+
3361
+ // ES3 wrong here
3362
+ var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
3363
+
3364
+ // fallback for IE11 Script Access Denied error
3365
+ var tryGet = function (it, key) {
3366
+ try {
3367
+ return it[key];
3368
+ } catch (error) { /* empty */ }
3369
+ };
3370
+
3371
+ // getting tag from ES6+ `Object.prototype.toString`
3372
+ var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
3373
+ var O, tag, result;
3374
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
3375
+ // @@toStringTag case
3376
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
3377
+ // builtinTag case
3378
+ : CORRECT_ARGUMENTS ? classofRaw$1(O)
3379
+ // ES3 arguments fallback
3380
+ : (result = classofRaw$1(O)) === 'Object' && isCallable$9(O.callee) ? 'Arguments' : result;
3381
+ };
3382
+
3383
+ var classof$4 = classof$5;
3384
+
3385
+ var $String = String;
3386
+
3387
+ var toString$a = function (argument) {
3388
+ if (classof$4(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
3389
+ return $String(argument);
3390
+ };
3391
+
3392
+ var wellKnownSymbol$7 = wellKnownSymbol$h;
3393
+
3394
+ var MATCH = wellKnownSymbol$7('match');
3395
+
3396
+ var correctIsRegexpLogic = function (METHOD_NAME) {
3397
+ var regexp = /./;
3398
+ try {
3399
+ '/./'[METHOD_NAME](regexp);
3400
+ } catch (error1) {
3401
+ try {
3402
+ regexp[MATCH] = false;
3403
+ return '/./'[METHOD_NAME](regexp);
3404
+ } catch (error2) { /* empty */ }
3405
+ } return false;
3406
+ };
3407
+
3408
+ var $$e = _export;
3409
+ var uncurryThis$c = functionUncurryThis;
3410
+ var notARegExp = notARegexp;
3411
+ var requireObjectCoercible$4 = requireObjectCoercible$8;
3412
+ var toString$9 = toString$a;
3413
+ var correctIsRegExpLogic = correctIsRegexpLogic;
3414
+
3415
+ var stringIndexOf = uncurryThis$c(''.indexOf);
3416
+
3417
+ // `String.prototype.includes` method
3418
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
3419
+ $$e({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
3420
+ includes: function includes(searchString /* , position = 0 */) {
3421
+ return !!~stringIndexOf(
3422
+ toString$9(requireObjectCoercible$4(this)),
3423
+ toString$9(notARegExp(searchString)),
3424
+ arguments.length > 1 ? arguments[1] : undefined
3425
+ );
3426
+ }
3427
+ });
3428
+
3429
+ var aCallable$7 = aCallable$a;
3430
+ var toObject$1 = toObject$6;
3431
+ var IndexedObject = indexedObject;
3432
+ var lengthOfArrayLike$2 = lengthOfArrayLike$5;
3433
+
3434
+ var $TypeError$8 = TypeError;
3435
+
3436
+ var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
3437
+
3438
+ // `Array.prototype.{ reduce, reduceRight }` methods implementation
3439
+ var createMethod$2 = function (IS_RIGHT) {
3440
+ return function (that, callbackfn, argumentsLength, memo) {
3441
+ var O = toObject$1(that);
3442
+ var self = IndexedObject(O);
3443
+ var length = lengthOfArrayLike$2(O);
3444
+ aCallable$7(callbackfn);
3445
+ if (length === 0 && argumentsLength < 2) throw new $TypeError$8(REDUCE_EMPTY);
3446
+ var index = IS_RIGHT ? length - 1 : 0;
3447
+ var i = IS_RIGHT ? -1 : 1;
3448
+ if (argumentsLength < 2) while (true) {
3449
+ if (index in self) {
3450
+ memo = self[index];
3451
+ index += i;
3452
+ break;
3453
+ }
3454
+ index += i;
3455
+ if (IS_RIGHT ? index < 0 : length <= index) {
3456
+ throw new $TypeError$8(REDUCE_EMPTY);
3457
+ }
3458
+ }
3459
+ for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
3460
+ memo = callbackfn(memo, self[index], index, O);
3461
+ }
3462
+ return memo;
3463
+ };
3464
+ };
3465
+
3466
+ var arrayReduce = {
3467
+ // `Array.prototype.reduce` method
3468
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
3469
+ left: createMethod$2(false),
3470
+ // `Array.prototype.reduceRight` method
3471
+ // https://tc39.es/ecma262/#sec-array.prototype.reduceright
3472
+ right: createMethod$2(true)
3473
+ };
3474
+
3475
+ var fails$c = fails$q;
3476
+
3477
+ var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
3478
+ var method = [][METHOD_NAME];
3479
+ return !!method && fails$c(function () {
3480
+ // eslint-disable-next-line no-useless-call -- required for testing
3481
+ method.call(null, argument || function () { return 1; }, 1);
3482
+ });
3483
+ };
3484
+
3485
+ var global$d = global$o;
3486
+ var classof$3 = classofRaw$2;
3487
+
3488
+ var engineIsNode = classof$3(global$d.process) === 'process';
3489
+
3490
+ var $$d = _export;
3491
+ var $reduce = arrayReduce.left;
3492
+ var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
3493
+ var CHROME_VERSION = engineV8Version;
3494
+ var IS_NODE$4 = engineIsNode;
3495
+
3496
+ // Chrome 80-82 has a critical bug
3497
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
3498
+ var CHROME_BUG = !IS_NODE$4 && CHROME_VERSION > 79 && CHROME_VERSION < 83;
3499
+ var FORCED$3 = CHROME_BUG || !arrayMethodIsStrict$1('reduce');
3500
+
3501
+ // `Array.prototype.reduce` method
3502
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
3503
+ $$d({ target: 'Array', proto: true, forced: FORCED$3 }, {
3504
+ reduce: function reduce(callbackfn /* , initialValue */) {
3505
+ var length = arguments.length;
3506
+ return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
3507
+ }
3508
+ });
3509
+
3510
+ var tryToString$3 = tryToString$5;
3511
+
3512
+ var $TypeError$7 = TypeError;
3513
+
3514
+ var deletePropertyOrThrow$1 = function (O, P) {
3515
+ if (!delete O[P]) throw new $TypeError$7('Cannot delete property ' + tryToString$3(P) + ' of ' + tryToString$3(O));
3516
+ };
3517
+
3518
+ var uncurryThis$b = functionUncurryThis;
3519
+
3520
+ var arraySlice$2 = uncurryThis$b([].slice);
3521
+
3522
+ var arraySlice$1 = arraySlice$2;
3523
+
3524
+ var floor = Math.floor;
3525
+
3526
+ var sort = function (array, comparefn) {
3527
+ var length = array.length;
3528
+
3529
+ if (length < 8) {
3530
+ // insertion sort
3531
+ var i = 1;
3532
+ var element, j;
3533
+
3534
+ while (i < length) {
3535
+ j = i;
3536
+ element = array[i];
3537
+ while (j && comparefn(array[j - 1], element) > 0) {
3538
+ array[j] = array[--j];
3539
+ }
3540
+ if (j !== i++) array[j] = element;
3541
+ }
3542
+ } else {
3543
+ // merge sort
3544
+ var middle = floor(length / 2);
3545
+ var left = sort(arraySlice$1(array, 0, middle), comparefn);
3546
+ var right = sort(arraySlice$1(array, middle), comparefn);
3547
+ var llength = left.length;
3548
+ var rlength = right.length;
3549
+ var lindex = 0;
3550
+ var rindex = 0;
3551
+
3552
+ while (lindex < llength || rindex < rlength) {
3553
+ array[lindex + rindex] = (lindex < llength && rindex < rlength)
3554
+ ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
3555
+ : lindex < llength ? left[lindex++] : right[rindex++];
3556
+ }
3557
+ }
3558
+
3559
+ return array;
3560
+ };
3561
+
3562
+ var arraySort = sort;
3563
+
3564
+ var userAgent$4 = engineUserAgent;
3565
+
3566
+ var firefox = userAgent$4.match(/firefox\/(\d+)/i);
3567
+
3568
+ var engineFfVersion = !!firefox && +firefox[1];
3569
+
3570
+ var UA = engineUserAgent;
3571
+
3572
+ var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
3573
+
3574
+ var userAgent$3 = engineUserAgent;
3575
+
3576
+ var webkit = userAgent$3.match(/AppleWebKit\/(\d+)\./);
3577
+
3578
+ var engineWebkitVersion = !!webkit && +webkit[1];
3579
+
3580
+ var $$c = _export;
3581
+ var uncurryThis$a = functionUncurryThis;
3582
+ var aCallable$6 = aCallable$a;
3583
+ var toObject = toObject$6;
3584
+ var lengthOfArrayLike$1 = lengthOfArrayLike$5;
3585
+ var deletePropertyOrThrow = deletePropertyOrThrow$1;
3586
+ var toString$8 = toString$a;
3587
+ var fails$b = fails$q;
3588
+ var internalSort = arraySort;
3589
+ var arrayMethodIsStrict = arrayMethodIsStrict$2;
3590
+ var FF = engineFfVersion;
3591
+ var IE_OR_EDGE = engineIsIeOrEdge;
3592
+ var V8 = engineV8Version;
3593
+ var WEBKIT = engineWebkitVersion;
3594
+
3595
+ var test = [];
3596
+ var nativeSort = uncurryThis$a(test.sort);
3597
+ var push$1 = uncurryThis$a(test.push);
3598
+
3599
+ // IE8-
3600
+ var FAILS_ON_UNDEFINED = fails$b(function () {
3601
+ test.sort(undefined);
3602
+ });
3603
+ // V8 bug
3604
+ var FAILS_ON_NULL = fails$b(function () {
3605
+ test.sort(null);
3606
+ });
3607
+ // Old WebKit
3608
+ var STRICT_METHOD = arrayMethodIsStrict('sort');
3609
+
3610
+ var STABLE_SORT = !fails$b(function () {
3611
+ // feature detection can be too slow, so check engines versions
3612
+ if (V8) return V8 < 70;
3613
+ if (FF && FF > 3) return;
3614
+ if (IE_OR_EDGE) return true;
3615
+ if (WEBKIT) return WEBKIT < 603;
3616
+
3617
+ var result = '';
3618
+ var code, chr, value, index;
3619
+
3620
+ // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
3621
+ for (code = 65; code < 76; code++) {
3622
+ chr = String.fromCharCode(code);
3623
+
3624
+ switch (code) {
3625
+ case 66: case 69: case 70: case 72: value = 3; break;
3626
+ case 68: case 71: value = 4; break;
3627
+ default: value = 2;
3628
+ }
3629
+
3630
+ for (index = 0; index < 47; index++) {
3631
+ test.push({ k: chr + index, v: value });
3632
+ }
3633
+ }
3634
+
3635
+ test.sort(function (a, b) { return b.v - a.v; });
3636
+
3637
+ for (index = 0; index < test.length; index++) {
3638
+ chr = test[index].k.charAt(0);
3639
+ if (result.charAt(result.length - 1) !== chr) result += chr;
3640
+ }
3641
+
3642
+ return result !== 'DGBEFHACIJK';
3643
+ });
3644
+
3645
+ var FORCED$2 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
3646
+
3647
+ var getSortCompare = function (comparefn) {
3648
+ return function (x, y) {
3649
+ if (y === undefined) return -1;
3650
+ if (x === undefined) return 1;
3651
+ if (comparefn !== undefined) return +comparefn(x, y) || 0;
3652
+ return toString$8(x) > toString$8(y) ? 1 : -1;
3653
+ };
3654
+ };
3655
+
3656
+ // `Array.prototype.sort` method
3657
+ // https://tc39.es/ecma262/#sec-array.prototype.sort
3658
+ $$c({ target: 'Array', proto: true, forced: FORCED$2 }, {
3659
+ sort: function sort(comparefn) {
3660
+ if (comparefn !== undefined) aCallable$6(comparefn);
3661
+
3662
+ var array = toObject(this);
3663
+
3664
+ if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
3665
+
3666
+ var items = [];
3667
+ var arrayLength = lengthOfArrayLike$1(array);
3668
+ var itemsLength, index;
3669
+
3670
+ for (index = 0; index < arrayLength; index++) {
3671
+ if (index in array) push$1(items, array[index]);
3672
+ }
3673
+
3674
+ internalSort(items, getSortCompare(comparefn));
3675
+
3676
+ itemsLength = lengthOfArrayLike$1(items);
3677
+ index = 0;
3678
+
3679
+ while (index < itemsLength) array[index] = items[index++];
3680
+ while (index < arrayLength) deletePropertyOrThrow(array, index++);
3681
+
3682
+ return array;
3683
+ }
3684
+ });
3685
+
3264
3686
  /* *
3265
3687
  * Licensed under the Apache License, Version 2.0 (the "License");
3266
3688
  * you may not use this file except in compliance with the License.
@@ -3274,16 +3696,125 @@ const publicWarningDialogType = uiTypes.DialogTypes.PublicWarnings;
3274
3696
  * See the License for the specific language governing permissions and
3275
3697
  * limitations under the License.
3276
3698
  *
3277
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3278
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
3699
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3700
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
3701
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3279
3702
  * */
3703
+ const emptyFilter = {
3704
+ id: 'empty',
3705
+ name: '(not specified)',
3706
+ checked: true
3707
+ };
3708
+ const defaultFilters = [{
3709
+ key: 'incident',
3710
+ translationKey: 'filter-incident'
3711
+ }, {
3712
+ key: 'domain',
3713
+ translationKey: 'filter-domain'
3714
+ }, {
3715
+ key: 'phenomenon',
3716
+ translationKey: 'filter-phenomenon'
3717
+ }, {
3718
+ key: 'level',
3719
+ translationKey: 'filter-level'
3720
+ }, {
3721
+ key: 'warningProposalSource',
3722
+ translationKey: 'filter-source'
3723
+ }];
3724
+ const getFiltersFromWarnings = warnings => {
3725
+ if (!warnings || !warnings.length) {
3726
+ // return default list
3727
+ return defaultFilters.map(({
3728
+ key,
3729
+ translationKey
3730
+ }) => {
3731
+ return {
3732
+ id: key,
3733
+ translationKey,
3734
+ filterList: []
3735
+ };
3736
+ });
3737
+ }
3738
+ const filledFilters = defaultFilters.map(({
3739
+ key,
3740
+ translationKey
3741
+ }) => {
3742
+ const filterOptions = [];
3743
+ warnings.forEach(warning => {
3744
+ const name = warning.warningDetail[key];
3745
+ if (name && filterOptions.findIndex(option => option.filter.name === name) === -1) {
3746
+ const filter = {
3747
+ id: name,
3748
+ name,
3749
+ checked: true
3750
+ };
3751
+ filterOptions.push({
3752
+ filter
3753
+ });
3754
+ }
3755
+ });
3756
+ // add option for empty
3757
+ filterOptions.push({
3758
+ filter: emptyFilter
3759
+ });
3760
+ // sort alphabetically
3761
+ const filtersSorted = [...filterOptions].sort((a, b) => a.filter.name.localeCompare(b.filter.name));
3762
+ return {
3763
+ id: key,
3764
+ translationKey,
3765
+ filterList: filtersSorted
3766
+ };
3767
+ });
3768
+ return filledFilters;
3769
+ };
3770
+ const isWarningMatchingFilter = (filters, filterId, warningDetailValue) => {
3771
+ return filters.some(filter => filter.filterId === filterId && filter.optionId === warningDetailValue) || !warningDetailValue && filters.some(filter => filter.filterId === filterId && filter.optionId === emptyFilter.id);
3772
+ };
3773
+ const getUpdatedFilters = (filters, newFilters) => {
3774
+ return filters.ids.reduce((list, id) => {
3775
+ var _a;
3776
+ const existingFilterList = (_a = filters.entities[id]) === null || _a === void 0 ? void 0 : _a.filterList;
3777
+ const newFilter = newFilters.find(filter => filter.id === id);
3778
+ if (newFilter && existingFilterList) {
3779
+ const updatedFilterList = getUpdatedFilterList(existingFilterList, newFilter.filterList);
3780
+ list.push({
3781
+ id,
3782
+ changes: Object.assign(Object.assign({}, newFilter), {
3783
+ filterList: updatedFilterList
3784
+ })
3785
+ });
3786
+ }
3787
+ return list;
3788
+ }, []);
3789
+ };
3790
+ const getUpdatedFilterList = (oldList, newList) => {
3791
+ const updatedList = [];
3792
+ // if the item existed already, keep its state
3793
+ oldList.forEach(oldListItem => {
3794
+ if (newList.some(newListItem => newListItem.filter.id === oldListItem.filter.id)) {
3795
+ updatedList.push(oldListItem);
3796
+ }
3797
+ });
3798
+ // if the item did not exist yet, add it
3799
+ newList.forEach(newListItem => {
3800
+ if (oldList.every(oldListItem => oldListItem.filter.id !== newListItem.filter.id)) {
3801
+ updatedList.push(newListItem);
3802
+ }
3803
+ });
3804
+ // sort alphabetically
3805
+ const sortedList = [...updatedList].sort((a, b) => a.filter.name.localeCompare(b.filter.name));
3806
+ return sortedList;
3807
+ };
3808
+
3280
3809
  const publicWarningsAdapter = createEntityAdapter({
3281
3810
  selectId: warning => warning.id
3282
3811
  });
3812
+ const warningListFilterAdapter = createEntityAdapter();
3283
3813
  const initialState$1 = {
3284
3814
  warnings: publicWarningsAdapter.getInitialState(),
3285
3815
  isLoading: true,
3286
- lastUpdatedTime: ''
3816
+ lastUpdatedTime: '',
3817
+ filters: warningListFilterAdapter.getInitialState()
3287
3818
  };
3288
3819
  const slice$1 = createSlice({
3289
3820
  initialState: initialState$1,
@@ -3308,6 +3839,68 @@ const slice$1 = createSlice({
3308
3839
  } = action.payload;
3309
3840
  draft.isLoading = false;
3310
3841
  draft.error = error;
3842
+ },
3843
+ setWarningListFilters: (draft, action) => {
3844
+ const {
3845
+ warnings
3846
+ } = action.payload;
3847
+ // Generate new filters based on the provided warnings
3848
+ const newFilters = getFiltersFromWarnings(warnings);
3849
+ // Update existing filters
3850
+ const updates = getUpdatedFilters(draft.filters, newFilters);
3851
+ warningListFilterAdapter.updateMany(draft.filters, updates);
3852
+ // Add any new filters that didn't exist before
3853
+ const newFiltersToAdd = newFilters.filter(filter => !draft.filters.ids.includes(filter.id));
3854
+ warningListFilterAdapter.upsertMany(draft.filters, newFiltersToAdd);
3855
+ },
3856
+ toggleFilter: (draft, action) => {
3857
+ const {
3858
+ filterId,
3859
+ isChecked
3860
+ } = action.payload;
3861
+ if (!draft.filters.entities[filterId]) {
3862
+ return;
3863
+ }
3864
+ draft.filters.entities[filterId].filterList.forEach((_, index) => {
3865
+ draft.filters.entities[filterId].filterList[index].filter.checked = !isChecked;
3866
+ });
3867
+ },
3868
+ toggleOption: (draft, action) => {
3869
+ const {
3870
+ filterId,
3871
+ optionId
3872
+ } = action.payload;
3873
+ if (!draft.filters.entities[filterId]) {
3874
+ return;
3875
+ }
3876
+ const index = draft.filters.entities[filterId].filterList.findIndex(option => option.filter.id === optionId);
3877
+ if (index === -1) {
3878
+ return;
3879
+ }
3880
+ draft.filters.entities[filterId].filterList[index].filter.checked = !draft.filters.entities[filterId].filterList[index].filter.checked;
3881
+ },
3882
+ enableOnlyOneFilterOption: (draft, action) => {
3883
+ const {
3884
+ filterId,
3885
+ optionId
3886
+ } = action.payload;
3887
+ if (!draft.filters.entities[filterId]) {
3888
+ return;
3889
+ }
3890
+ draft.filters.entities[filterId].filterList.forEach((_, index) => {
3891
+ const newStatus = draft.filters.entities[filterId].filterList[index].filter.id === optionId;
3892
+ draft.filters.entities[filterId].filterList[index].filter.checked = newStatus;
3893
+ });
3894
+ },
3895
+ toggleAllFilters: (draft, action) => {
3896
+ const {
3897
+ isChecked
3898
+ } = action.payload;
3899
+ draft.filters.ids.forEach(id => {
3900
+ draft.filters.entities[id].filterList.forEach((_, index) => {
3901
+ draft.filters.entities[id].filterList[index].filter.checked = !isChecked;
3902
+ });
3903
+ });
3311
3904
  }
3312
3905
  }
3313
3906
  });
@@ -3331,6 +3924,7 @@ const publicWarningActions = slice$1.actions;
3331
3924
  *
3332
3925
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3333
3926
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
3927
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3334
3928
  * */
3335
3929
  const TAKEOVER_MESSAGE = 'You are no longer the editor of this warning';
3336
3930
  const initialState = {};
@@ -3717,8 +4311,8 @@ var proxyAccessor$1 = function (Target, Source, key) {
3717
4311
  });
3718
4312
  };
3719
4313
 
3720
- var isCallable$9 = isCallable$n;
3721
- var isObject$4 = isObject$d;
4314
+ var isCallable$8 = isCallable$n;
4315
+ var isObject$3 = isObject$d;
3722
4316
  var setPrototypeOf$2 = objectSetPrototypeOf;
3723
4317
 
3724
4318
  // makes subclassing work correct for wrapped built-ins
@@ -3728,83 +4322,35 @@ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
3728
4322
  // it can work only with native `setPrototypeOf`
3729
4323
  setPrototypeOf$2 &&
3730
4324
  // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
3731
- isCallable$9(NewTarget = dummy.constructor) &&
4325
+ isCallable$8(NewTarget = dummy.constructor) &&
3732
4326
  NewTarget !== Wrapper &&
3733
- isObject$4(NewTargetPrototype = NewTarget.prototype) &&
4327
+ isObject$3(NewTargetPrototype = NewTarget.prototype) &&
3734
4328
  NewTargetPrototype !== Wrapper.prototype
3735
4329
  ) setPrototypeOf$2($this, NewTargetPrototype);
3736
4330
  return $this;
3737
4331
  };
3738
4332
 
3739
- var wellKnownSymbol$a = wellKnownSymbol$h;
3740
-
3741
- var TO_STRING_TAG$1 = wellKnownSymbol$a('toStringTag');
3742
- var test = {};
3743
-
3744
- test[TO_STRING_TAG$1] = 'z';
3745
-
3746
- var toStringTagSupport = String(test) === '[object z]';
3747
-
3748
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
3749
- var isCallable$8 = isCallable$n;
3750
- var classofRaw$1 = classofRaw$2;
3751
- var wellKnownSymbol$9 = wellKnownSymbol$h;
3752
-
3753
- var TO_STRING_TAG = wellKnownSymbol$9('toStringTag');
3754
- var $Object = Object;
3755
-
3756
- // ES3 wrong here
3757
- var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
3758
-
3759
- // fallback for IE11 Script Access Denied error
3760
- var tryGet = function (it, key) {
3761
- try {
3762
- return it[key];
3763
- } catch (error) { /* empty */ }
3764
- };
3765
-
3766
- // getting tag from ES6+ `Object.prototype.toString`
3767
- var classof$6 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
3768
- var O, tag, result;
3769
- return it === undefined ? 'Undefined' : it === null ? 'Null'
3770
- // @@toStringTag case
3771
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
3772
- // builtinTag case
3773
- : CORRECT_ARGUMENTS ? classofRaw$1(O)
3774
- // ES3 arguments fallback
3775
- : (result = classofRaw$1(O)) === 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
3776
- };
3777
-
3778
- var classof$5 = classof$6;
3779
-
3780
- var $String = String;
3781
-
3782
- var toString$9 = function (argument) {
3783
- if (classof$5(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
3784
- return $String(argument);
3785
- };
3786
-
3787
- var toString$8 = toString$9;
4333
+ var toString$7 = toString$a;
3788
4334
 
3789
4335
  var normalizeStringArgument$1 = function (argument, $default) {
3790
- return argument === undefined ? arguments.length < 2 ? '' : $default : toString$8(argument);
4336
+ return argument === undefined ? arguments.length < 2 ? '' : $default : toString$7(argument);
3791
4337
  };
3792
4338
 
3793
- var isObject$3 = isObject$d;
4339
+ var isObject$2 = isObject$d;
3794
4340
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
3795
4341
 
3796
4342
  // `InstallErrorCause` abstract operation
3797
4343
  // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
3798
4344
  var installErrorCause$1 = function (O, options) {
3799
- if (isObject$3(options) && 'cause' in options) {
4345
+ if (isObject$2(options) && 'cause' in options) {
3800
4346
  createNonEnumerableProperty$3(O, 'cause', options.cause);
3801
4347
  }
3802
4348
  };
3803
4349
 
3804
- var uncurryThis$b = functionUncurryThis;
4350
+ var uncurryThis$9 = functionUncurryThis;
3805
4351
 
3806
4352
  var $Error = Error;
3807
- var replace$3 = uncurryThis$b(''.replace);
4353
+ var replace$3 = uncurryThis$9(''.replace);
3808
4354
 
3809
4355
  var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
3810
4356
  // eslint-disable-next-line redos/no-vulnerable -- safe
@@ -3817,10 +4363,10 @@ var errorStackClear = function (stack, dropEntries) {
3817
4363
  } return stack;
3818
4364
  };
3819
4365
 
3820
- var fails$c = fails$p;
4366
+ var fails$a = fails$q;
3821
4367
  var createPropertyDescriptor = createPropertyDescriptor$4;
3822
4368
 
3823
- var errorStackInstallable = !fails$c(function () {
4369
+ var errorStackInstallable = !fails$a(function () {
3824
4370
  var error = new Error('a');
3825
4371
  if (!('stack' in error)) return true;
3826
4372
  // eslint-disable-next-line es/no-object-defineproperty -- safe
@@ -3907,28 +4453,28 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
3907
4453
  };
3908
4454
 
3909
4455
  /* eslint-disable no-unused-vars -- required for functions `.length` */
3910
- var $$e = _export;
3911
- var global$d = global$o;
4456
+ var $$b = _export;
4457
+ var global$c = global$o;
3912
4458
  var apply$1 = functionApply;
3913
4459
  var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
3914
4460
 
3915
4461
  var WEB_ASSEMBLY = 'WebAssembly';
3916
- var WebAssembly = global$d[WEB_ASSEMBLY];
4462
+ var WebAssembly = global$c[WEB_ASSEMBLY];
3917
4463
 
3918
4464
  // eslint-disable-next-line es/no-error-cause -- feature detection
3919
- var FORCED$2 = new Error('e', { cause: 7 }).cause !== 7;
4465
+ var FORCED$1 = new Error('e', { cause: 7 }).cause !== 7;
3920
4466
 
3921
4467
  var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
3922
4468
  var O = {};
3923
- O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$2);
3924
- $$e({ global: true, constructor: true, arity: 1, forced: FORCED$2 }, O);
4469
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$1);
4470
+ $$b({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
3925
4471
  };
3926
4472
 
3927
4473
  var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
3928
4474
  if (WebAssembly && WebAssembly[ERROR_NAME]) {
3929
4475
  var O = {};
3930
- O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$2);
3931
- $$e({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$2 }, O);
4476
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$1);
4477
+ $$b({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
3932
4478
  }
3933
4479
  };
3934
4480
 
@@ -3964,28 +4510,6 @@ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
3964
4510
  return function RuntimeError(message) { return apply$1(init, this, arguments); };
3965
4511
  });
3966
4512
 
3967
- var $$d = _export;
3968
- var $includes = arrayIncludes.includes;
3969
- var fails$b = fails$p;
3970
- var addToUnscopables = addToUnscopables$2;
3971
-
3972
- // FF99+ bug
3973
- var BROKEN_ON_SPARSE = fails$b(function () {
3974
- // eslint-disable-next-line es/no-array-prototype-includes -- detection
3975
- return !Array(1).includes();
3976
- });
3977
-
3978
- // `Array.prototype.includes` method
3979
- // https://tc39.es/ecma262/#sec-array.prototype.includes
3980
- $$d({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
3981
- includes: function includes(el /* , fromIndex = 0 */) {
3982
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
3983
- }
3984
- });
3985
-
3986
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3987
- addToUnscopables('includes');
3988
-
3989
4513
  var anObject$8 = anObject$d;
3990
4514
 
3991
4515
  // `RegExp.prototype.flags` getter implementation
@@ -4004,13 +4528,13 @@ var regexpFlags$1 = function () {
4004
4528
  return result;
4005
4529
  };
4006
4530
 
4007
- var fails$a = fails$p;
4008
- var global$c = global$o;
4531
+ var fails$9 = fails$q;
4532
+ var global$b = global$o;
4009
4533
 
4010
4534
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
4011
- var $RegExp$2 = global$c.RegExp;
4535
+ var $RegExp$2 = global$b.RegExp;
4012
4536
 
4013
- var UNSUPPORTED_Y$2 = fails$a(function () {
4537
+ var UNSUPPORTED_Y$2 = fails$9(function () {
4014
4538
  var re = $RegExp$2('a', 'y');
4015
4539
  re.lastIndex = 2;
4016
4540
  return re.exec('abcd') !== null;
@@ -4018,11 +4542,11 @@ var UNSUPPORTED_Y$2 = fails$a(function () {
4018
4542
 
4019
4543
  // UC Browser bug
4020
4544
  // https://github.com/zloirock/core-js/issues/1008
4021
- var MISSED_STICKY = UNSUPPORTED_Y$2 || fails$a(function () {
4545
+ var MISSED_STICKY = UNSUPPORTED_Y$2 || fails$9(function () {
4022
4546
  return !$RegExp$2('a', 'y').sticky;
4023
4547
  });
4024
4548
 
4025
- var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$a(function () {
4549
+ var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$9(function () {
4026
4550
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
4027
4551
  var re = $RegExp$2('^r', 'gy');
4028
4552
  re.lastIndex = 2;
@@ -4035,24 +4559,24 @@ var regexpStickyHelpers = {
4035
4559
  UNSUPPORTED_Y: UNSUPPORTED_Y$2
4036
4560
  };
4037
4561
 
4038
- var fails$9 = fails$p;
4039
- var global$b = global$o;
4562
+ var fails$8 = fails$q;
4563
+ var global$a = global$o;
4040
4564
 
4041
4565
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
4042
- var $RegExp$1 = global$b.RegExp;
4566
+ var $RegExp$1 = global$a.RegExp;
4043
4567
 
4044
- var regexpUnsupportedDotAll = fails$9(function () {
4568
+ var regexpUnsupportedDotAll = fails$8(function () {
4045
4569
  var re = $RegExp$1('.', 's');
4046
4570
  return !(re.dotAll && re.test('\n') && re.flags === 's');
4047
4571
  });
4048
4572
 
4049
- var fails$8 = fails$p;
4050
- var global$a = global$o;
4573
+ var fails$7 = fails$q;
4574
+ var global$9 = global$o;
4051
4575
 
4052
4576
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
4053
- var $RegExp = global$a.RegExp;
4577
+ var $RegExp = global$9.RegExp;
4054
4578
 
4055
- var regexpUnsupportedNcg = fails$8(function () {
4579
+ var regexpUnsupportedNcg = fails$7(function () {
4056
4580
  var re = $RegExp('(?<a>b)', 'g');
4057
4581
  return re.exec('b').groups.a !== 'b' ||
4058
4582
  'b'.replace(re, '$<a>c') !== 'bc';
@@ -4061,8 +4585,8 @@ var regexpUnsupportedNcg = fails$8(function () {
4061
4585
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
4062
4586
  /* eslint-disable regexp/no-useless-quantifier -- testing */
4063
4587
  var call$a = functionCall;
4064
- var uncurryThis$a = functionUncurryThis;
4065
- var toString$7 = toString$9;
4588
+ var uncurryThis$8 = functionUncurryThis;
4589
+ var toString$6 = toString$a;
4066
4590
  var regexpFlags = regexpFlags$1;
4067
4591
  var stickyHelpers$1 = regexpStickyHelpers;
4068
4592
  var shared = shared$4;
@@ -4074,10 +4598,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
4074
4598
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
4075
4599
  var nativeExec = RegExp.prototype.exec;
4076
4600
  var patchedExec = nativeExec;
4077
- var charAt$2 = uncurryThis$a(''.charAt);
4078
- var indexOf = uncurryThis$a(''.indexOf);
4079
- var replace$2 = uncurryThis$a(''.replace);
4080
- var stringSlice$3 = uncurryThis$a(''.slice);
4601
+ var charAt$2 = uncurryThis$8(''.charAt);
4602
+ var indexOf = uncurryThis$8(''.indexOf);
4603
+ var replace$2 = uncurryThis$8(''.replace);
4604
+ var stringSlice$3 = uncurryThis$8(''.slice);
4081
4605
 
4082
4606
  var UPDATES_LAST_INDEX_WRONG = (function () {
4083
4607
  var re1 = /a/;
@@ -4098,7 +4622,7 @@ if (PATCH) {
4098
4622
  patchedExec = function exec(string) {
4099
4623
  var re = this;
4100
4624
  var state = getInternalState(re);
4101
- var str = toString$7(string);
4625
+ var str = toString$6(string);
4102
4626
  var raw = state.raw;
4103
4627
  var result, reCopy, lastIndex, match, i, object, group;
4104
4628
 
@@ -4172,76 +4696,16 @@ if (PATCH) {
4172
4696
  return match;
4173
4697
  };
4174
4698
  }
4175
-
4176
- var regexpExec$2 = patchedExec;
4177
-
4178
- var $$c = _export;
4179
- var exec$2 = regexpExec$2;
4180
-
4181
- // `RegExp.prototype.exec` method
4182
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
4183
- $$c({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
4184
- exec: exec$2
4185
- });
4186
-
4187
- var isObject$2 = isObject$d;
4188
- var classof$4 = classofRaw$2;
4189
- var wellKnownSymbol$8 = wellKnownSymbol$h;
4190
-
4191
- var MATCH$1 = wellKnownSymbol$8('match');
4192
-
4193
- // `IsRegExp` abstract operation
4194
- // https://tc39.es/ecma262/#sec-isregexp
4195
- var isRegexp = function (it) {
4196
- var isRegExp;
4197
- return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$4(it) === 'RegExp');
4198
- };
4199
-
4200
- var isRegExp = isRegexp;
4201
-
4202
- var $TypeError$8 = TypeError;
4203
-
4204
- var notARegexp = function (it) {
4205
- if (isRegExp(it)) {
4206
- throw new $TypeError$8("The method doesn't accept regular expressions");
4207
- } return it;
4208
- };
4209
-
4210
- var wellKnownSymbol$7 = wellKnownSymbol$h;
4211
-
4212
- var MATCH = wellKnownSymbol$7('match');
4213
-
4214
- var correctIsRegexpLogic = function (METHOD_NAME) {
4215
- var regexp = /./;
4216
- try {
4217
- '/./'[METHOD_NAME](regexp);
4218
- } catch (error1) {
4219
- try {
4220
- regexp[MATCH] = false;
4221
- return '/./'[METHOD_NAME](regexp);
4222
- } catch (error2) { /* empty */ }
4223
- } return false;
4224
- };
4225
-
4226
- var $$b = _export;
4227
- var uncurryThis$9 = functionUncurryThis;
4228
- var notARegExp = notARegexp;
4229
- var requireObjectCoercible$4 = requireObjectCoercible$8;
4230
- var toString$6 = toString$9;
4231
- var correctIsRegExpLogic = correctIsRegexpLogic;
4232
-
4233
- var stringIndexOf = uncurryThis$9(''.indexOf);
4234
-
4235
- // `String.prototype.includes` method
4236
- // https://tc39.es/ecma262/#sec-string.prototype.includes
4237
- $$b({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
4238
- includes: function includes(searchString /* , position = 0 */) {
4239
- return !!~stringIndexOf(
4240
- toString$6(requireObjectCoercible$4(this)),
4241
- toString$6(notARegExp(searchString)),
4242
- arguments.length > 1 ? arguments[1] : undefined
4243
- );
4244
- }
4699
+
4700
+ var regexpExec$2 = patchedExec;
4701
+
4702
+ var $$a = _export;
4703
+ var exec$2 = regexpExec$2;
4704
+
4705
+ // `RegExp.prototype.exec` method
4706
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
4707
+ $$a({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
4708
+ exec: exec$2
4245
4709
  });
4246
4710
 
4247
4711
  // TODO: Remove from `core-js@4` since it's moved to entry points
@@ -4249,7 +4713,7 @@ $$b({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }
4249
4713
  var call$9 = functionCall;
4250
4714
  var defineBuiltIn$3 = defineBuiltIn$7;
4251
4715
  var regexpExec$1 = regexpExec$2;
4252
- var fails$7 = fails$p;
4716
+ var fails$6 = fails$q;
4253
4717
  var wellKnownSymbol$6 = wellKnownSymbol$h;
4254
4718
  var createNonEnumerableProperty = createNonEnumerableProperty$8;
4255
4719
 
@@ -4259,14 +4723,14 @@ var RegExpPrototype = RegExp.prototype;
4259
4723
  var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
4260
4724
  var SYMBOL = wellKnownSymbol$6(KEY);
4261
4725
 
4262
- var DELEGATES_TO_SYMBOL = !fails$7(function () {
4726
+ var DELEGATES_TO_SYMBOL = !fails$6(function () {
4263
4727
  // String methods call symbol-named RegExp methods
4264
4728
  var O = {};
4265
4729
  O[SYMBOL] = function () { return 7; };
4266
4730
  return ''[KEY](O) !== 7;
4267
4731
  });
4268
4732
 
4269
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$7(function () {
4733
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$6(function () {
4270
4734
  // Symbol-named RegExp methods call .exec
4271
4735
  var execCalled = false;
4272
4736
  var re = /a/;
@@ -4331,10 +4795,10 @@ var sameValue$1 = Object.is || function is(x, y) {
4331
4795
  var call$8 = functionCall;
4332
4796
  var anObject$7 = anObject$d;
4333
4797
  var isCallable$7 = isCallable$n;
4334
- var classof$3 = classofRaw$2;
4798
+ var classof$2 = classofRaw$2;
4335
4799
  var regexpExec = regexpExec$2;
4336
4800
 
4337
- var $TypeError$7 = TypeError;
4801
+ var $TypeError$6 = TypeError;
4338
4802
 
4339
4803
  // `RegExpExec` abstract operation
4340
4804
  // https://tc39.es/ecma262/#sec-regexpexec
@@ -4345,8 +4809,8 @@ var regexpExecAbstract = function (R, S) {
4345
4809
  if (result !== null) anObject$7(result);
4346
4810
  return result;
4347
4811
  }
4348
- if (classof$3(R) === 'RegExp') return call$8(regexpExec, R, S);
4349
- throw new $TypeError$7('RegExp#exec called on incompatible receiver');
4812
+ if (classof$2(R) === 'RegExp') return call$8(regexpExec, R, S);
4813
+ throw new $TypeError$6('RegExp#exec called on incompatible receiver');
4350
4814
  };
4351
4815
 
4352
4816
  var call$7 = functionCall;
@@ -4355,7 +4819,7 @@ var anObject$6 = anObject$d;
4355
4819
  var isNullOrUndefined$3 = isNullOrUndefined$6;
4356
4820
  var requireObjectCoercible$3 = requireObjectCoercible$8;
4357
4821
  var sameValue = sameValue$1;
4358
- var toString$5 = toString$9;
4822
+ var toString$5 = toString$a;
4359
4823
  var getMethod$3 = getMethod$5;
4360
4824
  var regExpExec$1 = regexpExecAbstract;
4361
4825
 
@@ -4387,17 +4851,17 @@ fixRegExpWellKnownSymbolLogic$1('search', function (SEARCH, nativeSearch, maybeC
4387
4851
  ];
4388
4852
  });
4389
4853
 
4390
- var uncurryThis$8 = functionUncurryThis;
4391
- var fails$6 = fails$p;
4854
+ var uncurryThis$7 = functionUncurryThis;
4855
+ var fails$5 = fails$q;
4392
4856
  var isCallable$6 = isCallable$n;
4393
- var classof$2 = classof$6;
4857
+ var classof$1 = classof$5;
4394
4858
  var getBuiltIn$4 = getBuiltIn$9;
4395
4859
  var inspectSource$1 = inspectSource$3;
4396
4860
 
4397
4861
  var noop = function () { /* empty */ };
4398
4862
  var construct = getBuiltIn$4('Reflect', 'construct');
4399
4863
  var constructorRegExp = /^\s*(?:class|function)\b/;
4400
- var exec$1 = uncurryThis$8(constructorRegExp.exec);
4864
+ var exec$1 = uncurryThis$7(constructorRegExp.exec);
4401
4865
  var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
4402
4866
 
4403
4867
  var isConstructorModern = function isConstructor(argument) {
@@ -4412,7 +4876,7 @@ var isConstructorModern = function isConstructor(argument) {
4412
4876
 
4413
4877
  var isConstructorLegacy = function isConstructor(argument) {
4414
4878
  if (!isCallable$6(argument)) return false;
4415
- switch (classof$2(argument)) {
4879
+ switch (classof$1(argument)) {
4416
4880
  case 'AsyncFunction':
4417
4881
  case 'GeneratorFunction':
4418
4882
  case 'AsyncGeneratorFunction': return false;
@@ -4431,7 +4895,7 @@ isConstructorLegacy.sham = true;
4431
4895
 
4432
4896
  // `IsConstructor` abstract operation
4433
4897
  // https://tc39.es/ecma262/#sec-isconstructor
4434
- var isConstructor$1 = !construct || fails$6(function () {
4898
+ var isConstructor$1 = !construct || fails$5(function () {
4435
4899
  var called;
4436
4900
  return isConstructorModern(isConstructorModern.call)
4437
4901
  || !isConstructorModern(Object)
@@ -4440,14 +4904,14 @@ var isConstructor$1 = !construct || fails$6(function () {
4440
4904
  }) ? isConstructorLegacy : isConstructorModern;
4441
4905
 
4442
4906
  var isConstructor = isConstructor$1;
4443
- var tryToString$2 = tryToString$4;
4907
+ var tryToString$2 = tryToString$5;
4444
4908
 
4445
- var $TypeError$6 = TypeError;
4909
+ var $TypeError$5 = TypeError;
4446
4910
 
4447
4911
  // `Assert: IsConstructor(argument) is true`
4448
4912
  var aConstructor$1 = function (argument) {
4449
4913
  if (isConstructor(argument)) return argument;
4450
- throw new $TypeError$6(tryToString$2(argument) + ' is not a constructor');
4914
+ throw new $TypeError$5(tryToString$2(argument) + ' is not a constructor');
4451
4915
  };
4452
4916
 
4453
4917
  var anObject$5 = anObject$d;
@@ -4465,16 +4929,16 @@ var speciesConstructor$3 = function (O, defaultConstructor) {
4465
4929
  return C === undefined || isNullOrUndefined$2(S = anObject$5(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
4466
4930
  };
4467
4931
 
4468
- var uncurryThis$7 = functionUncurryThis;
4932
+ var uncurryThis$6 = functionUncurryThis;
4469
4933
  var toIntegerOrInfinity = toIntegerOrInfinity$3;
4470
- var toString$4 = toString$9;
4934
+ var toString$4 = toString$a;
4471
4935
  var requireObjectCoercible$2 = requireObjectCoercible$8;
4472
4936
 
4473
- var charAt$1 = uncurryThis$7(''.charAt);
4474
- var charCodeAt = uncurryThis$7(''.charCodeAt);
4475
- var stringSlice$2 = uncurryThis$7(''.slice);
4937
+ var charAt$1 = uncurryThis$6(''.charAt);
4938
+ var charCodeAt = uncurryThis$6(''.charCodeAt);
4939
+ var stringSlice$2 = uncurryThis$6(''.slice);
4476
4940
 
4477
- var createMethod$2 = function (CONVERT_TO_STRING) {
4941
+ var createMethod$1 = function (CONVERT_TO_STRING) {
4478
4942
  return function ($this, pos) {
4479
4943
  var S = toString$4(requireObjectCoercible$2($this));
4480
4944
  var position = toIntegerOrInfinity(pos);
@@ -4496,10 +4960,10 @@ var createMethod$2 = function (CONVERT_TO_STRING) {
4496
4960
  var stringMultibyte = {
4497
4961
  // `String.prototype.codePointAt` method
4498
4962
  // https://tc39.es/ecma262/#sec-string.prototype.codepointat
4499
- codeAt: createMethod$2(false),
4963
+ codeAt: createMethod$1(false),
4500
4964
  // `String.prototype.at` method
4501
4965
  // https://github.com/mathiasbynens/String.prototype.at
4502
- charAt: createMethod$2(true)
4966
+ charAt: createMethod$1(true)
4503
4967
  };
4504
4968
 
4505
4969
  var charAt = stringMultibyte.charAt;
@@ -4511,7 +4975,7 @@ var advanceStringIndex$1 = function (S, index, unicode) {
4511
4975
  };
4512
4976
 
4513
4977
  var call$6 = functionCall;
4514
- var uncurryThis$6 = functionUncurryThis;
4978
+ var uncurryThis$5 = functionUncurryThis;
4515
4979
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
4516
4980
  var anObject$4 = anObject$d;
4517
4981
  var isNullOrUndefined$1 = isNullOrUndefined$6;
@@ -4519,21 +4983,21 @@ var requireObjectCoercible$1 = requireObjectCoercible$8;
4519
4983
  var speciesConstructor$2 = speciesConstructor$3;
4520
4984
  var advanceStringIndex = advanceStringIndex$1;
4521
4985
  var toLength = toLength$2;
4522
- var toString$3 = toString$9;
4986
+ var toString$3 = toString$a;
4523
4987
  var getMethod$2 = getMethod$5;
4524
4988
  var regExpExec = regexpExecAbstract;
4525
4989
  var stickyHelpers = regexpStickyHelpers;
4526
- var fails$5 = fails$p;
4990
+ var fails$4 = fails$q;
4527
4991
 
4528
4992
  var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
4529
4993
  var MAX_UINT32 = 0xFFFFFFFF;
4530
4994
  var min = Math.min;
4531
- var push = uncurryThis$6([].push);
4532
- var stringSlice$1 = uncurryThis$6(''.slice);
4995
+ var push = uncurryThis$5([].push);
4996
+ var stringSlice$1 = uncurryThis$5(''.slice);
4533
4997
 
4534
4998
  // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
4535
4999
  // Weex JS has frozen built-in prototypes, so use try / catch wrapper
4536
- var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$5(function () {
5000
+ var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$4(function () {
4537
5001
  // eslint-disable-next-line regexp/no-empty-group -- required for testing
4538
5002
  var re = /(?:)/;
4539
5003
  var originalExec = re.exec;
@@ -4625,17 +5089,17 @@ fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNa
4625
5089
  var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
4626
5090
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
4627
5091
 
4628
- var uncurryThis$5 = functionUncurryThis;
5092
+ var uncurryThis$4 = functionUncurryThis;
4629
5093
  var requireObjectCoercible = requireObjectCoercible$8;
4630
- var toString$2 = toString$9;
5094
+ var toString$2 = toString$a;
4631
5095
  var whitespaces$2 = whitespaces$3;
4632
5096
 
4633
- var replace$1 = uncurryThis$5(''.replace);
5097
+ var replace$1 = uncurryThis$4(''.replace);
4634
5098
  var ltrim = RegExp('^[' + whitespaces$2 + ']+');
4635
5099
  var rtrim = RegExp('(^|[^' + whitespaces$2 + '])[' + whitespaces$2 + ']+$');
4636
5100
 
4637
5101
  // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
4638
- var createMethod$1 = function (TYPE) {
5102
+ var createMethod = function (TYPE) {
4639
5103
  return function ($this) {
4640
5104
  var string = toString$2(requireObjectCoercible($this));
4641
5105
  if (TYPE & 1) string = replace$1(string, ltrim, '');
@@ -4647,17 +5111,17 @@ var createMethod$1 = function (TYPE) {
4647
5111
  var stringTrim = {
4648
5112
  // `String.prototype.{ trimLeft, trimStart }` methods
4649
5113
  // https://tc39.es/ecma262/#sec-string.prototype.trimstart
4650
- start: createMethod$1(1),
5114
+ start: createMethod(1),
4651
5115
  // `String.prototype.{ trimRight, trimEnd }` methods
4652
5116
  // https://tc39.es/ecma262/#sec-string.prototype.trimend
4653
- end: createMethod$1(2),
5117
+ end: createMethod(2),
4654
5118
  // `String.prototype.trim` method
4655
5119
  // https://tc39.es/ecma262/#sec-string.prototype.trim
4656
- trim: createMethod$1(3)
5120
+ trim: createMethod(3)
4657
5121
  };
4658
5122
 
4659
5123
  var PROPER_FUNCTION_NAME = functionName.PROPER;
4660
- var fails$4 = fails$p;
5124
+ var fails$3 = fails$q;
4661
5125
  var whitespaces$1 = whitespaces$3;
4662
5126
 
4663
5127
  var non = '\u200B\u0085\u180E';
@@ -4665,20 +5129,20 @@ var non = '\u200B\u0085\u180E';
4665
5129
  // check that a method works with the correct list
4666
5130
  // of whitespaces and has a correct name
4667
5131
  var stringTrimForced = function (METHOD_NAME) {
4668
- return fails$4(function () {
5132
+ return fails$3(function () {
4669
5133
  return !!whitespaces$1[METHOD_NAME]()
4670
5134
  || non[METHOD_NAME]() !== non
4671
5135
  || (PROPER_FUNCTION_NAME && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
4672
5136
  });
4673
5137
  };
4674
5138
 
4675
- var $$a = _export;
5139
+ var $$9 = _export;
4676
5140
  var $trim = stringTrim.trim;
4677
5141
  var forcedStringTrimMethod = stringTrimForced;
4678
5142
 
4679
5143
  // `String.prototype.trim` method
4680
5144
  // https://tc39.es/ecma262/#sec-string.prototype.trim
4681
- $$a({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
5145
+ $$9({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
4682
5146
  trim: function trim() {
4683
5147
  return $trim(this);
4684
5148
  }
@@ -7762,7 +8226,7 @@ var warningListJSON = [
7762
8226
  phenomenon: "wind",
7763
8227
  areas: [
7764
8228
  {
7765
- objectName: "test name",
8229
+ objectName: "wind test name",
7766
8230
  geoJSON: {
7767
8231
  type: "FeatureCollection",
7768
8232
  features: [
@@ -7866,7 +8330,7 @@ var warningListJSON = [
7866
8330
  phenomenon: "highTemp",
7867
8331
  areas: [
7868
8332
  {
7869
- objectName: "test name",
8333
+ objectName: "high temp test name",
7870
8334
  geoJSON: {
7871
8335
  type: "FeatureCollection",
7872
8336
  features: [
@@ -9016,6 +9480,7 @@ var warningListJSON = [
9016
9480
  *
9017
9481
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9018
9482
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
9483
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9019
9484
  * */
9020
9485
  const drawingList = drawingListJSON;
9021
9486
  const drawingsListFullContent = drawingsListFullContentJSON;
@@ -9264,35 +9729,35 @@ const DrawingTool = ({
9264
9729
  }));
9265
9730
  };
9266
9731
 
9267
- var global$9 = global$o;
9268
- var fails$3 = fails$p;
9269
- var uncurryThis$4 = functionUncurryThis;
9270
- var toString$1 = toString$9;
9732
+ var global$8 = global$o;
9733
+ var fails$2 = fails$q;
9734
+ var uncurryThis$3 = functionUncurryThis;
9735
+ var toString$1 = toString$a;
9271
9736
  var trim = stringTrim.trim;
9272
9737
  var whitespaces = whitespaces$3;
9273
9738
 
9274
- var $parseInt$1 = global$9.parseInt;
9275
- var Symbol$1 = global$9.Symbol;
9739
+ var $parseInt$1 = global$8.parseInt;
9740
+ var Symbol$1 = global$8.Symbol;
9276
9741
  var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
9277
9742
  var hex = /^[+-]?0x/i;
9278
- var exec = uncurryThis$4(hex.exec);
9279
- var FORCED$1 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
9743
+ var exec = uncurryThis$3(hex.exec);
9744
+ var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
9280
9745
  // MS Edge 18- broken with boxed symbols
9281
- || (ITERATOR$3 && !fails$3(function () { $parseInt$1(Object(ITERATOR$3)); }));
9746
+ || (ITERATOR$3 && !fails$2(function () { $parseInt$1(Object(ITERATOR$3)); }));
9282
9747
 
9283
9748
  // `parseInt` method
9284
9749
  // https://tc39.es/ecma262/#sec-parseint-string-radix
9285
- var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
9750
+ var numberParseInt = FORCED ? function parseInt(string, radix) {
9286
9751
  var S = trim(toString$1(string));
9287
9752
  return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
9288
9753
  } : $parseInt$1;
9289
9754
 
9290
- var $$9 = _export;
9755
+ var $$8 = _export;
9291
9756
  var $parseInt = numberParseInt;
9292
9757
 
9293
9758
  // `parseInt` method
9294
9759
  // https://tc39.es/ecma262/#sec-parseint-string-radix
9295
- $$9({ global: true, forced: parseInt !== $parseInt }, {
9760
+ $$8({ global: true, forced: parseInt !== $parseInt }, {
9296
9761
  parseInt: $parseInt
9297
9762
  });
9298
9763
 
@@ -9311,6 +9776,7 @@ $$9({ global: true, forced: parseInt !== $parseInt }, {
9311
9776
  *
9312
9777
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9313
9778
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
9779
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9314
9780
  * */
9315
9781
  const useFormDirty = ({
9316
9782
  isDirty,
@@ -9955,87 +10421,6 @@ const PublicWarningsFormDialog = ({
9955
10421
  }));
9956
10422
  };
9957
10423
 
9958
- var aCallable$6 = aCallable$9;
9959
- var toObject = toObject$5;
9960
- var IndexedObject = indexedObject;
9961
- var lengthOfArrayLike$1 = lengthOfArrayLike$4;
9962
-
9963
- var $TypeError$5 = TypeError;
9964
-
9965
- var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
9966
-
9967
- // `Array.prototype.{ reduce, reduceRight }` methods implementation
9968
- var createMethod = function (IS_RIGHT) {
9969
- return function (that, callbackfn, argumentsLength, memo) {
9970
- var O = toObject(that);
9971
- var self = IndexedObject(O);
9972
- var length = lengthOfArrayLike$1(O);
9973
- aCallable$6(callbackfn);
9974
- if (length === 0 && argumentsLength < 2) throw new $TypeError$5(REDUCE_EMPTY);
9975
- var index = IS_RIGHT ? length - 1 : 0;
9976
- var i = IS_RIGHT ? -1 : 1;
9977
- if (argumentsLength < 2) while (true) {
9978
- if (index in self) {
9979
- memo = self[index];
9980
- index += i;
9981
- break;
9982
- }
9983
- index += i;
9984
- if (IS_RIGHT ? index < 0 : length <= index) {
9985
- throw new $TypeError$5(REDUCE_EMPTY);
9986
- }
9987
- }
9988
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
9989
- memo = callbackfn(memo, self[index], index, O);
9990
- }
9991
- return memo;
9992
- };
9993
- };
9994
-
9995
- var arrayReduce = {
9996
- // `Array.prototype.reduce` method
9997
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
9998
- left: createMethod(false),
9999
- // `Array.prototype.reduceRight` method
10000
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
10001
- right: createMethod(true)
10002
- };
10003
-
10004
- var fails$2 = fails$p;
10005
-
10006
- var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
10007
- var method = [][METHOD_NAME];
10008
- return !!method && fails$2(function () {
10009
- // eslint-disable-next-line no-useless-call -- required for testing
10010
- method.call(null, argument || function () { return 1; }, 1);
10011
- });
10012
- };
10013
-
10014
- var global$8 = global$o;
10015
- var classof$1 = classofRaw$2;
10016
-
10017
- var engineIsNode = classof$1(global$8.process) === 'process';
10018
-
10019
- var $$8 = _export;
10020
- var $reduce = arrayReduce.left;
10021
- var arrayMethodIsStrict = arrayMethodIsStrict$1;
10022
- var CHROME_VERSION = engineV8Version;
10023
- var IS_NODE$4 = engineIsNode;
10024
-
10025
- // Chrome 80-82 has a critical bug
10026
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
10027
- var CHROME_BUG = !IS_NODE$4 && CHROME_VERSION > 79 && CHROME_VERSION < 83;
10028
- var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
10029
-
10030
- // `Array.prototype.reduce` method
10031
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
10032
- $$8({ target: 'Array', proto: true, forced: FORCED }, {
10033
- reduce: function reduce(callbackfn /* , initialValue */) {
10034
- var length = arguments.length;
10035
- return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
10036
- }
10037
- });
10038
-
10039
10424
  function a11yProps(index) {
10040
10425
  return {
10041
10426
  id: `tab-${index}`,
@@ -10871,7 +11256,8 @@ const Form = ({
10871
11256
  formState: {
10872
11257
  dirtyFields
10873
11258
  },
10874
- getValues
11259
+ getValues,
11260
+ setValue
10875
11261
  } = useFormContext();
10876
11262
  const {
10877
11263
  toggleIsDraft,
@@ -10910,10 +11296,19 @@ const Form = ({
10910
11296
  reset(getEmptyPublicWarning());
10911
11297
  setWarningGeoJSONFeature(undefined);
10912
11298
  };
11299
+ const publicWarningId = publicWarningDetails === null || publicWarningDetails === void 0 ? void 0 : publicWarningDetails.id;
10913
11300
  React.useEffect(() => {
10914
11301
  // sync redux with react-hook-form
10915
11302
  reset(getFormData(publicWarningDetails, object));
10916
- }, [object, reset, publicWarningDetails]);
11303
+ // eslint-disable-next-line react-hooks/exhaustive-deps
11304
+ }, [publicWarningId]);
11305
+ const areas = publicWarningDetails === null || publicWarningDetails === void 0 ? void 0 : publicWarningDetails.areas;
11306
+ React.useEffect(() => {
11307
+ // sync redux with react-hook-form
11308
+ if (areas) {
11309
+ setValue('areas', areas);
11310
+ }
11311
+ }, [areas, setValue]);
10917
11312
  React.useEffect(() => {
10918
11313
  // sync drawing on map with selected warning
10919
11314
  setWarningGeoJSONFeature(initialPublicWarningArea);
@@ -11173,6 +11568,7 @@ const PublicWarningsForm = props => {
11173
11568
  *
11174
11569
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11175
11570
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
11571
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
11176
11572
  * */
11177
11573
  const getPublicWarningStore = store => {
11178
11574
  if (store && store.publicWarningForm) {
@@ -11307,20 +11703,20 @@ var anInstance$1 = function (it, Prototype) {
11307
11703
  };
11308
11704
 
11309
11705
  var classofRaw = classofRaw$2;
11310
- var uncurryThis$3 = functionUncurryThis;
11706
+ var uncurryThis$2 = functionUncurryThis;
11311
11707
 
11312
11708
  var functionUncurryThisClause = function (fn) {
11313
11709
  // Nashorn bug:
11314
11710
  // https://github.com/zloirock/core-js/issues/1128
11315
11711
  // https://github.com/zloirock/core-js/issues/1130
11316
- if (classofRaw(fn) === 'Function') return uncurryThis$3(fn);
11712
+ if (classofRaw(fn) === 'Function') return uncurryThis$2(fn);
11317
11713
  };
11318
11714
 
11319
- var uncurryThis$2 = functionUncurryThisClause;
11320
- var aCallable$5 = aCallable$9;
11715
+ var uncurryThis$1 = functionUncurryThisClause;
11716
+ var aCallable$5 = aCallable$a;
11321
11717
  var NATIVE_BIND = functionBindNative;
11322
11718
 
11323
- var bind$4 = uncurryThis$2(uncurryThis$2.bind);
11719
+ var bind$4 = uncurryThis$1(uncurryThis$1.bind);
11324
11720
 
11325
11721
  // optional / simple context binding
11326
11722
  var functionBindContext = function (fn, that) {
@@ -11330,10 +11726,6 @@ var functionBindContext = function (fn, that) {
11330
11726
  };
11331
11727
  };
11332
11728
 
11333
- var uncurryThis$1 = functionUncurryThis;
11334
-
11335
- var arraySlice$1 = uncurryThis$1([].slice);
11336
-
11337
11729
  var $TypeError$3 = TypeError;
11338
11730
 
11339
11731
  var validateArgumentsLength$1 = function (passed, required) {
@@ -11351,9 +11743,9 @@ var apply = functionApply;
11351
11743
  var bind$3 = functionBindContext;
11352
11744
  var isCallable$5 = isCallable$n;
11353
11745
  var hasOwn$1 = hasOwnProperty_1;
11354
- var fails$1 = fails$p;
11746
+ var fails$1 = fails$q;
11355
11747
  var html = html$2;
11356
- var arraySlice = arraySlice$1;
11748
+ var arraySlice = arraySlice$2;
11357
11749
  var createElement = documentCreateElement$2;
11358
11750
  var validateArgumentsLength = validateArgumentsLength$1;
11359
11751
  var IS_IOS$1 = engineIsIos;
@@ -11664,7 +12056,7 @@ var promiseConstructorDetection = {
11664
12056
 
11665
12057
  var newPromiseCapability$2 = {};
11666
12058
 
11667
- var aCallable$4 = aCallable$9;
12059
+ var aCallable$4 = aCallable$a;
11668
12060
 
11669
12061
  var $TypeError$2 = TypeError;
11670
12062
 
@@ -11693,7 +12085,7 @@ var defineBuiltIn$2 = defineBuiltIn$7;
11693
12085
  var setPrototypeOf = objectSetPrototypeOf;
11694
12086
  var setToStringTag = setToStringTag$4;
11695
12087
  var setSpecies = setSpecies$1;
11696
- var aCallable$3 = aCallable$9;
12088
+ var aCallable$3 = aCallable$a;
11697
12089
  var isCallable$3 = isCallable$n;
11698
12090
  var isObject$1 = isObject$d;
11699
12091
  var anInstance = anInstance$1;
@@ -11983,7 +12375,7 @@ var isArrayIteratorMethod$1 = function (it) {
11983
12375
  return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
11984
12376
  };
11985
12377
 
11986
- var classof = classof$6;
12378
+ var classof = classof$5;
11987
12379
  var getMethod$1 = getMethod$5;
11988
12380
  var isNullOrUndefined = isNullOrUndefined$6;
11989
12381
  var Iterators = iterators;
@@ -11998,9 +12390,9 @@ var getIteratorMethod$2 = function (it) {
11998
12390
  };
11999
12391
 
12000
12392
  var call$4 = functionCall;
12001
- var aCallable$2 = aCallable$9;
12393
+ var aCallable$2 = aCallable$a;
12002
12394
  var anObject$3 = anObject$d;
12003
- var tryToString$1 = tryToString$4;
12395
+ var tryToString$1 = tryToString$5;
12004
12396
  var getIteratorMethod$1 = getIteratorMethod$2;
12005
12397
 
12006
12398
  var $TypeError$1 = TypeError;
@@ -12038,9 +12430,9 @@ var iteratorClose$1 = function (iterator, kind, value) {
12038
12430
  var bind = functionBindContext;
12039
12431
  var call$2 = functionCall;
12040
12432
  var anObject$1 = anObject$d;
12041
- var tryToString = tryToString$4;
12433
+ var tryToString = tryToString$5;
12042
12434
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
12043
- var lengthOfArrayLike = lengthOfArrayLike$4;
12435
+ var lengthOfArrayLike = lengthOfArrayLike$5;
12044
12436
  var isPrototypeOf$1 = objectIsPrototypeOf;
12045
12437
  var getIterator = getIterator$1;
12046
12438
  var getIteratorMethod = getIteratorMethod$2;
@@ -12155,7 +12547,7 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
12155
12547
 
12156
12548
  var $$6 = _export;
12157
12549
  var call$1 = functionCall;
12158
- var aCallable$1 = aCallable$9;
12550
+ var aCallable$1 = aCallable$a;
12159
12551
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
12160
12552
  var perform$1 = perform$3;
12161
12553
  var iterate$1 = iterate$2;
@@ -12219,7 +12611,7 @@ if (isCallable$2(NativePromiseConstructor$1)) {
12219
12611
 
12220
12612
  var $$4 = _export;
12221
12613
  var call = functionCall;
12222
- var aCallable = aCallable$9;
12614
+ var aCallable = aCallable$a;
12223
12615
  var newPromiseCapabilityModule$1 = newPromiseCapability$2;
12224
12616
  var perform = perform$3;
12225
12617
  var iterate = iterate$2;
@@ -12288,7 +12680,7 @@ $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
12288
12680
 
12289
12681
  var $$1 = _export;
12290
12682
  var NativePromiseConstructor = promiseNativeConstructor;
12291
- var fails = fails$p;
12683
+ var fails = fails$q;
12292
12684
  var getBuiltIn = getBuiltIn$9;
12293
12685
  var isCallable$1 = isCallable$n;
12294
12686
  var speciesConstructor = speciesConstructor$3;
@@ -13042,6 +13434,261 @@ const PublicWarningsFormDialogConnect = ({
13042
13434
  });
13043
13435
  };
13044
13436
 
13437
+ const actionButton = amount => {
13438
+ return jsxs(Grid, Object.assign({
13439
+ container: true,
13440
+ alignItems: "center",
13441
+ style: {
13442
+ marginRight: '8px',
13443
+ minWidth: '36px'
13444
+ }
13445
+ }, {
13446
+ children: [jsx(Options, {}), jsx(Typography, Object.assign({
13447
+ variant: "body2",
13448
+ sx: {
13449
+ paddingLeft: 0.5
13450
+ }
13451
+ }, {
13452
+ children: amount > 0 && amount
13453
+ }))]
13454
+ }));
13455
+ };
13456
+ const FilterChipWithOptions = ({
13457
+ id,
13458
+ translationKey,
13459
+ handleClick,
13460
+ filterList: _filterList = []
13461
+ }) => {
13462
+ const {
13463
+ t
13464
+ } = useWarningsTranslation();
13465
+ const [anchorEl, setAnchorEl] = React.useState(undefined);
13466
+ const [isOpen, setIsOpen] = React.useState(false);
13467
+ const {
13468
+ anchorOrigin,
13469
+ transformOrigin
13470
+ } = getPosition('bottom');
13471
+ const initialResult = {
13472
+ isAllSelected: true,
13473
+ selectedFiltersAmount: 0,
13474
+ isDisabled: false
13475
+ };
13476
+ const {
13477
+ isAllSelected,
13478
+ selectedFiltersAmount,
13479
+ isDisabled
13480
+ } = _filterList.reduce((accumulatedResult, filterItem) => {
13481
+ const result = Object.assign({}, accumulatedResult);
13482
+ const isEmptyFilter = filterItem.filter.id === emptyFilter.id;
13483
+ const isOnlyFilter = _filterList.length === 1 && isEmptyFilter;
13484
+ if (!filterItem.filter.checked) {
13485
+ result.isAllSelected = false;
13486
+ if (isOnlyFilter) {
13487
+ result.isDisabled = true;
13488
+ }
13489
+ } else if (isOnlyFilter) {
13490
+ result.isDisabled = true;
13491
+ } else {
13492
+ result.selectedFiltersAmount += 1;
13493
+ }
13494
+ return result;
13495
+ }, initialResult);
13496
+ const isAnyFilterSelected = selectedFiltersAmount > 0;
13497
+ const showDisabled = _filterList.length === 0 || isDisabled;
13498
+ const label = t(translationKey);
13499
+ const onClickOptions = () => {
13500
+ setIsOpen(!isOpen);
13501
+ };
13502
+ const onSelectAll = () => {
13503
+ handleClick && handleClick(id, isAllSelected);
13504
+ };
13505
+ const handleClose = event => {
13506
+ event.stopPropagation();
13507
+ setIsOpen(false);
13508
+ };
13509
+ React.useEffect(() => {
13510
+ setAnchorEl(document.getElementById(id));
13511
+ }, [id]);
13512
+ return jsxs(Fragment, {
13513
+ children: [jsx(CustomTooltip, Object.assign({
13514
+ title: showDisabled ? t('filter-no-results') : t('filter-options'),
13515
+ placement: "bottom"
13516
+ }, {
13517
+ children: jsx("span", Object.assign({
13518
+ style: {
13519
+ margin: 0
13520
+ }
13521
+ }, {
13522
+ children: jsx(FilterChip, {
13523
+ id: id,
13524
+ label: label,
13525
+ onAction: onClickOptions,
13526
+ actionIcon: actionButton(selectedFiltersAmount),
13527
+ isSelected: isAnyFilterSelected,
13528
+ handleClick: onClickOptions,
13529
+ isDisabled: showDisabled,
13530
+ size: "medium"
13531
+ })
13532
+ }))
13533
+ })), jsxs(Menu, Object.assign({
13534
+ title: label,
13535
+ anchorEl: anchorEl,
13536
+ open: isOpen,
13537
+ onClose: handleClose,
13538
+ anchorOrigin: anchorOrigin,
13539
+ transformOrigin: transformOrigin,
13540
+ BackdropProps: {
13541
+ style: {
13542
+ opacity: 0,
13543
+ transition: 'none'
13544
+ }
13545
+ },
13546
+ sx: {
13547
+ padding: 3
13548
+ }
13549
+ }, {
13550
+ children: [jsxs(DialogTitle, Object.assign({
13551
+ id: "dialog-title",
13552
+ sx: {
13553
+ zIndex: 1,
13554
+ padding: '8px 18px 16px 24px',
13555
+ display: 'flex',
13556
+ justifyContent: 'space-between',
13557
+ alignItems: 'center'
13558
+ }
13559
+ }, {
13560
+ children: [jsx(Typography, Object.assign({
13561
+ sx: {
13562
+ fontSize: '20px',
13563
+ fontWeight: 500,
13564
+ paddingRight: 1
13565
+ },
13566
+ "data-testid": "customDialog-title",
13567
+ component: "span"
13568
+ }, {
13569
+ children: label
13570
+ })), jsx(CustomIconButton, Object.assign({
13571
+ "aria-label": t('close-dialog-confirm'),
13572
+ onClick: handleClose,
13573
+ sx: {
13574
+ '&.MuiIconButton-root': {
13575
+ color: 'geowebColors.greys.accessible'
13576
+ }
13577
+ }
13578
+ }, {
13579
+ children: jsx(Close, {})
13580
+ }))]
13581
+ })), jsxs(DialogContent, Object.assign({
13582
+ sx: {
13583
+ padding: '0px 24px 16px 24px'
13584
+ }
13585
+ }, {
13586
+ children: [jsxs(Grid, Object.assign({
13587
+ container: true,
13588
+ justifyContent: "space-between",
13589
+ alignItems: "center"
13590
+ }, {
13591
+ children: [t('filter-select-all'), jsx(Switch, {
13592
+ inputProps: {
13593
+ 'aria-label': t('filter-select-all')
13594
+ },
13595
+ checked: isAllSelected,
13596
+ onChange: onSelectAll,
13597
+ sx: {
13598
+ marginRight: '-12px'
13599
+ }
13600
+ })]
13601
+ })), jsx(Box, Object.assign({
13602
+ sx: {
13603
+ marginLeft: '-12px'
13604
+ }
13605
+ }, {
13606
+ children: _filterList.map(filterItem => jsx(FilterListItem, Object.assign({}, filterItem), filterItem.filter.id))
13607
+ }))]
13608
+ }))]
13609
+ }))]
13610
+ });
13611
+ };
13612
+
13613
+ const FilterChipWithOptionsConnect = ({
13614
+ filter
13615
+ }) => {
13616
+ const dispatch = useDispatch();
13617
+ const toggleFilter = React.useCallback((filterId, isChecked) => {
13618
+ dispatch(publicWarningActions.toggleFilter({
13619
+ filterId,
13620
+ isChecked
13621
+ }));
13622
+ }, [dispatch]);
13623
+ const toggleOption = React.useCallback((filterId, optionId) => {
13624
+ dispatch(publicWarningActions.toggleOption({
13625
+ filterId,
13626
+ optionId
13627
+ }));
13628
+ }, [dispatch]);
13629
+ const enableOnlyOneFilterOption = React.useCallback((filterId, optionId) => {
13630
+ dispatch(publicWarningActions.enableOnlyOneFilterOption({
13631
+ filterId,
13632
+ optionId
13633
+ }));
13634
+ }, [dispatch]);
13635
+ const filterListWithActions = filter.filterList.map(option => {
13636
+ return Object.assign(Object.assign({}, option), {
13637
+ toggleFilter: () => toggleOption(filter.id, option.filter.id),
13638
+ enableOnlyOneFilter: () => enableOnlyOneFilterOption(filter.id, option.filter.id)
13639
+ });
13640
+ });
13641
+ return jsx(FilterChipWithOptions, Object.assign({}, filter, {
13642
+ handleClick: toggleFilter,
13643
+ filterList: filterListWithActions
13644
+ }));
13645
+ };
13646
+
13647
+ const FilterList = ({
13648
+ filters: _filters = [],
13649
+ onClickAll: _onClickAll = () => {},
13650
+ isAllSelected: _isAllSelected = true
13651
+ }) => {
13652
+ const {
13653
+ t
13654
+ } = useWarningsTranslation();
13655
+ return jsxs(Stack, Object.assign({
13656
+ direction: "row",
13657
+ spacing: 1,
13658
+ sx: {
13659
+ display: 'block',
13660
+ '.MuiChip-root': {
13661
+ margin: 0,
13662
+ marginRight: 1,
13663
+ marginBottom: 1
13664
+ }
13665
+ }
13666
+ }, {
13667
+ children: [jsx(CustomTooltip, Object.assign({
13668
+ title: _isAllSelected ? t('filter-hide-all') : t('filter-show-all'),
13669
+ placement: "bottom"
13670
+ }, {
13671
+ children: jsx("span", Object.assign({
13672
+ style: {
13673
+ margin: 0
13674
+ }
13675
+ }, {
13676
+ children: jsx(FilterChip, {
13677
+ id: "all",
13678
+ label: t('filter-all'),
13679
+ isSelected: _isAllSelected,
13680
+ handleClick: () => _onClickAll(_isAllSelected),
13681
+ size: "medium"
13682
+ })
13683
+ }))
13684
+ })), _filters.map(filter => {
13685
+ return jsx(FilterChipWithOptionsConnect, {
13686
+ filter: filter
13687
+ }, filter.id);
13688
+ })]
13689
+ }));
13690
+ };
13691
+
13045
13692
  const sortWarningsOnStatus = warnings => {
13046
13693
  return warnings.reduce((allWarnings, warning) => {
13047
13694
  if (warning.status === 'DRAFT' || warning.status === 'DRAFT_PUBLISHED') {
@@ -13458,6 +14105,7 @@ const WarningsOnStatus = ({
13458
14105
  };
13459
14106
  const PublicWarningList = ({
13460
14107
  warnings,
14108
+ filters,
13461
14109
  isLoading: _isLoading = false,
13462
14110
  error,
13463
14111
  selectedPublicWarningId: _selectedPublicWarningId = '',
@@ -13467,7 +14115,9 @@ const PublicWarningList = ({
13467
14115
  onCreateWarning: _onCreateWarning = () => {},
13468
14116
  onDeleteWarning: _onDeleteWarning2 = () => {},
13469
14117
  onRefetchWarnings: _onRefetchWarnings = () => {},
13470
- onDeleteReviewWarning: _onDeleteReviewWarning2 = () => {}
14118
+ onDeleteReviewWarning: _onDeleteReviewWarning2 = () => {},
14119
+ onClickAllChip: _onClickAllChip = () => {},
14120
+ isAllChipSelected: _isAllChipSelected = true
13471
14121
  }) => {
13472
14122
  const {
13473
14123
  t
@@ -13483,22 +14133,37 @@ const PublicWarningList = ({
13483
14133
  },
13484
14134
  "data-testid": "publicWarningList"
13485
14135
  }, {
13486
- children: [jsx(Grid, Object.assign({
13487
- container: true,
13488
- justifyContent: "flex-end"
14136
+ children: [jsxs(Grid, Object.assign({
14137
+ container: true
13489
14138
  }, {
13490
- children: jsx(Button, Object.assign({
13491
- variant: "primary",
13492
- onClick: _onCreateWarning,
13493
- sx: {
13494
- textTransform: 'initial',
13495
- marginBottom: '8px',
13496
- fontSize: '12px',
13497
- height: '32px'
13498
- }
14139
+ children: [jsx(Grid, Object.assign({
14140
+ item: true,
14141
+ xs: 12,
14142
+ sm: true
13499
14143
  }, {
13500
- children: t('warning-list-button_create')
13501
- }))
14144
+ children: jsx(FilterList, {
14145
+ filters: filters,
14146
+ isAllSelected: _isAllChipSelected,
14147
+ onClickAll: _onClickAllChip
14148
+ })
14149
+ })), jsx(Grid, Object.assign({
14150
+ item: true,
14151
+ xs: "auto"
14152
+ }, {
14153
+ children: jsx(Button, Object.assign({
14154
+ variant: "primary",
14155
+ onClick: _onCreateWarning,
14156
+ sx: {
14157
+ textTransform: 'initial',
14158
+ marginBottom: '8px',
14159
+ fontSize: '12px',
14160
+ height: '32px',
14161
+ whiteSpace: 'nowrap'
14162
+ }
14163
+ }, {
14164
+ children: t('warning-list-button_create')
14165
+ }))
14166
+ }))]
13502
14167
  })), error && jsx(AlertBanner, {
13503
14168
  title: error.message,
13504
14169
  shouldClose: true
@@ -13609,7 +14274,7 @@ var uncurryThis = functionUncurryThis;
13609
14274
  var hasOwn = hasOwnProperty_1;
13610
14275
  var isCallable = isCallable$n;
13611
14276
  var isPrototypeOf = objectIsPrototypeOf;
13612
- var toString = toString$9;
14277
+ var toString = toString$a;
13613
14278
  var defineBuiltInAccessor = defineBuiltInAccessor$2;
13614
14279
  var copyConstructorProperties = copyConstructorProperties$3;
13615
14280
 
@@ -13659,22 +14324,6 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
13659
14324
  });
13660
14325
  }
13661
14326
 
13662
- /* *
13663
- * Licensed under the Apache License, Version 2.0 (the "License");
13664
- * you may not use this file except in compliance with the License.
13665
- * You may obtain a copy of the License at
13666
- *
13667
- * http://www.apache.org/licenses/LICENSE-2.0
13668
- *
13669
- * Unless required by applicable law or agreed to in writing, software
13670
- * distributed under the License is distributed on an "AS IS" BASIS,
13671
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13672
- * See the License for the specific language governing permissions and
13673
- * limitations under the License.
13674
- *
13675
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13676
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
13677
- * */
13678
14327
  const getPublicWarningsStore = store => {
13679
14328
  if (store && store.publicWarnings) {
13680
14329
  return store.publicWarnings;
@@ -13693,6 +14342,43 @@ const {
13693
14342
  const isPublicWarningsLoading = createSelector(getPublicWarningsStore, store => (store === null || store === void 0 ? void 0 : store.isLoading) || false);
13694
14343
  const getPublicWarningsError = createSelector(getPublicWarningsStore, store => store === null || store === void 0 ? void 0 : store.error);
13695
14344
  const getPublicWarningsLastUpdatedTime = createSelector(getPublicWarningsStore, store => store === null || store === void 0 ? void 0 : store.lastUpdatedTime);
14345
+ const {
14346
+ selectAll: selectAllFilters,
14347
+ selectIds: selectAllFilterIds
14348
+ } = warningListFilterAdapter.getSelectors(state => {
14349
+ var _a, _b;
14350
+ return (_b = (_a = state === null || state === void 0 ? void 0 : state.publicWarnings) === null || _a === void 0 ? void 0 : _a.filters) !== null && _b !== void 0 ? _b : {
14351
+ entities: {},
14352
+ ids: []
14353
+ };
14354
+ });
14355
+ const getIsAllSelected = createSelector(selectAllFilters, filters => {
14356
+ const result = filters.findIndex(filter => filter.filterList.findIndex(option => option.filter.checked === false) !== -1) === -1;
14357
+ return result;
14358
+ });
14359
+ const getSelectedFilterOptions = createSelector(selectAllFilters, filters => {
14360
+ const selectedOptions = [];
14361
+ filters.forEach(filter => {
14362
+ filter.filterList.forEach(option => {
14363
+ if (option.filter.checked === true) {
14364
+ selectedOptions.push({
14365
+ filterId: filter.id,
14366
+ optionId: option.filter.id
14367
+ });
14368
+ }
14369
+ });
14370
+ });
14371
+ return selectedOptions;
14372
+ });
14373
+ const getFilteredWarnings = createSelector(selectAllPublicWarnings, getIsAllSelected, getSelectedFilterOptions, selectAllFilterIds, (warnings, isAllSelected, filters, filterIds) => {
14374
+ if (isAllSelected) {
14375
+ return warnings;
14376
+ }
14377
+ const result = warnings.filter(({
14378
+ warningDetail
14379
+ }) => filterIds.every(key => isWarningMatchingFilter(filters, key, warningDetail[key])));
14380
+ return result;
14381
+ });
13696
14382
 
13697
14383
  const ConfirmDeleteWarningDialog = ({
13698
14384
  onClose: _onClose = () => {},
@@ -13763,6 +14449,9 @@ const PublicWarningListConnect = () => {
13763
14449
  auth
13764
14450
  } = useAuthenticationContext();
13765
14451
  const [confirmDialogOptions, setConfirmDialogOptions] = React__default.useState(undefined);
14452
+ const filters = useSelector(selectAllFilters);
14453
+ const isAllChipSelected = useSelector(getIsAllSelected);
14454
+ const filteredWarnings = useSelector(getFilteredWarnings);
13766
14455
  const warnings = useSelector(selectAllPublicWarnings);
13767
14456
  const selectedPublicWarningId = useSelector(getSelectedPublicWarningId);
13768
14457
  const isLoading = useSelector(isPublicWarningsLoading);
@@ -13847,13 +14536,24 @@ const PublicWarningListConnect = () => {
13847
14536
  const fetchWarnings = React__default.useCallback(() => {
13848
14537
  dispatch(publicWarningActions.fetchWarnings());
13849
14538
  }, [dispatch]);
14539
+ const onClickAllChip = React__default.useCallback(isChecked => {
14540
+ dispatch(publicWarningActions.toggleAllFilters({
14541
+ isChecked
14542
+ }));
14543
+ }, [dispatch]);
13850
14544
  React__default.useEffect(() => {
13851
14545
  // fetch warnings on mount
13852
14546
  fetchWarnings();
13853
14547
  }, [fetchWarnings]);
14548
+ React__default.useEffect(() => {
14549
+ // update filters when warnings change
14550
+ dispatch(publicWarningActions.setWarningListFilters({
14551
+ warnings
14552
+ }));
14553
+ }, [dispatch, warnings]);
13854
14554
  return jsxs(Fragment, {
13855
14555
  children: [jsx(PublicWarningList, {
13856
- warnings: warnings,
14556
+ warnings: filteredWarnings,
13857
14557
  isLoading: isLoading,
13858
14558
  error: error,
13859
14559
  onSelectWarning: selectWarning,
@@ -13863,7 +14563,10 @@ const PublicWarningListConnect = () => {
13863
14563
  onDeleteReviewWarning: deleteReviewWarning,
13864
14564
  selectedPublicWarningId: selectedPublicWarningId,
13865
14565
  lastUpdatedTime: lastUpdatedTime,
13866
- onRefetchWarnings: fetchWarnings
14566
+ onRefetchWarnings: fetchWarnings,
14567
+ filters: filters,
14568
+ isAllChipSelected: isAllChipSelected,
14569
+ onClickAllChip: onClickAllChip
13867
14570
  }), confirmDialogOptions && jsx(ConfirmDeleteWarningDialog, {
13868
14571
  onClose: () => setConfirmDialogOptions(undefined),
13869
14572
  title: confirmDialogOptions.title,
@@ -14103,6 +14806,7 @@ publicWarningFormListener.startListening({
14103
14806
  *
14104
14807
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14105
14808
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
14809
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
14106
14810
  * */
14107
14811
  const getLastUpdatedTimeFormatted = () => dateUtils.dateToString(dateUtils.utc(), dateUtils.DATE_FORMAT_HOURS);
14108
14812
  const publicWarningsListener = createListenerMiddleware();
@@ -14158,6 +14862,7 @@ publicWarningsListener.startListening({
14158
14862
  *
14159
14863
  * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14160
14864
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
14865
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
14161
14866
  * */
14162
14867
  const getSnackbarMessage = (objectName, id) => id ? `Object "${objectName}" ${translateKeyOutsideComponents('update-succes')}!` : `Object "${objectName}" ${translateKeyOutsideComponents('save-succes')}!`;
14163
14868
  const drawingsListener = createListenerMiddleware();
@@ -14230,6 +14935,7 @@ drawingsListener.startListening({
14230
14935
  *
14231
14936
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14232
14937
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
14938
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
14233
14939
  * */
14234
14940
  const drawingModuleConfig = {
14235
14941
  id: 'drawing-module',