@opengeoweb/snackbar 9.33.1-spike-ol.6 → 9.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +512 -2555
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -26,2572 +26,530 @@ var snackbarTranslations = {
|
|
|
26
26
|
nl: nl
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var check = function (it) {
|
|
32
|
-
return it && it.Math === Math && it;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
36
|
-
var globalThis_1 =
|
|
37
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
38
|
-
check(typeof globalThis == 'object' && globalThis) ||
|
|
39
|
-
check(typeof window == 'object' && window) ||
|
|
40
|
-
// eslint-disable-next-line no-restricted-globals -- safe
|
|
41
|
-
check(typeof self == 'object' && self) ||
|
|
42
|
-
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
43
|
-
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
44
|
-
// eslint-disable-next-line no-new-func -- fallback
|
|
45
|
-
(function () { return this; })() || Function('return this')();
|
|
46
|
-
|
|
47
|
-
var objectGetOwnPropertyDescriptor = {};
|
|
48
|
-
|
|
49
|
-
var fails$c = function (exec) {
|
|
50
|
-
try {
|
|
51
|
-
return !!exec();
|
|
52
|
-
} catch (error) {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
var fails$b = fails$c;
|
|
58
|
-
|
|
59
|
-
// Detect IE8's incomplete defineProperty implementation
|
|
60
|
-
var descriptors = !fails$b(function () {
|
|
61
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
62
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
var fails$a = fails$c;
|
|
66
|
-
|
|
67
|
-
var functionBindNative = !fails$a(function () {
|
|
68
|
-
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
69
|
-
var test = (function () { /* empty */ }).bind();
|
|
70
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
71
|
-
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
var NATIVE_BIND$3 = functionBindNative;
|
|
75
|
-
|
|
76
|
-
var call$d = Function.prototype.call;
|
|
77
|
-
|
|
78
|
-
var functionCall = NATIVE_BIND$3 ? call$d.bind(call$d) : function () {
|
|
79
|
-
return call$d.apply(call$d, arguments);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
var objectPropertyIsEnumerable = {};
|
|
83
|
-
|
|
84
|
-
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
85
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
86
|
-
var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
|
|
87
|
-
|
|
88
|
-
// Nashorn ~ JDK8 bug
|
|
89
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
90
|
-
|
|
91
|
-
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
92
|
-
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
93
|
-
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
94
|
-
var descriptor = getOwnPropertyDescriptor$2(this, V);
|
|
95
|
-
return !!descriptor && descriptor.enumerable;
|
|
96
|
-
} : $propertyIsEnumerable;
|
|
97
|
-
|
|
98
|
-
var createPropertyDescriptor$2 = function (bitmap, value) {
|
|
99
|
-
return {
|
|
100
|
-
enumerable: !(bitmap & 1),
|
|
101
|
-
configurable: !(bitmap & 2),
|
|
102
|
-
writable: !(bitmap & 4),
|
|
103
|
-
value: value
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
var NATIVE_BIND$2 = functionBindNative;
|
|
108
|
-
|
|
109
|
-
var FunctionPrototype$2 = Function.prototype;
|
|
110
|
-
var call$c = FunctionPrototype$2.call;
|
|
111
|
-
var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$c, call$c);
|
|
112
|
-
|
|
113
|
-
var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
|
|
114
|
-
return function () {
|
|
115
|
-
return call$c.apply(fn, arguments);
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
var uncurryThis$e = functionUncurryThis;
|
|
120
|
-
|
|
121
|
-
var toString$2 = uncurryThis$e({}.toString);
|
|
122
|
-
var stringSlice$1 = uncurryThis$e(''.slice);
|
|
123
|
-
|
|
124
|
-
var classofRaw$2 = function (it) {
|
|
125
|
-
return stringSlice$1(toString$2(it), 8, -1);
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
var uncurryThis$d = functionUncurryThis;
|
|
129
|
-
var fails$9 = fails$c;
|
|
130
|
-
var classof$5 = classofRaw$2;
|
|
131
|
-
|
|
132
|
-
var $Object$3 = Object;
|
|
133
|
-
var split = uncurryThis$d(''.split);
|
|
134
|
-
|
|
135
|
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
136
|
-
var indexedObject = fails$9(function () {
|
|
137
|
-
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
138
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
139
|
-
return !$Object$3('z').propertyIsEnumerable(0);
|
|
140
|
-
}) ? function (it) {
|
|
141
|
-
return classof$5(it) === 'String' ? split(it, '') : $Object$3(it);
|
|
142
|
-
} : $Object$3;
|
|
143
|
-
|
|
144
|
-
// we can't use just `it == null` since of `document.all` special case
|
|
145
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
146
|
-
var isNullOrUndefined$4 = function (it) {
|
|
147
|
-
return it === null || it === undefined;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
var isNullOrUndefined$3 = isNullOrUndefined$4;
|
|
151
|
-
|
|
152
|
-
var $TypeError$c = TypeError;
|
|
153
|
-
|
|
154
|
-
// `RequireObjectCoercible` abstract operation
|
|
155
|
-
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
156
|
-
var requireObjectCoercible$3 = function (it) {
|
|
157
|
-
if (isNullOrUndefined$3(it)) throw new $TypeError$c("Can't call method on " + it);
|
|
158
|
-
return it;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
// toObject with fallback for non-array-like ES3 strings
|
|
162
|
-
var IndexedObject$1 = indexedObject;
|
|
163
|
-
var requireObjectCoercible$2 = requireObjectCoercible$3;
|
|
164
|
-
|
|
165
|
-
var toIndexedObject$3 = function (it) {
|
|
166
|
-
return IndexedObject$1(requireObjectCoercible$2(it));
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
170
|
-
var documentAll = typeof document == 'object' && document.all;
|
|
171
|
-
|
|
172
|
-
// `IsCallable` abstract operation
|
|
173
|
-
// https://tc39.es/ecma262/#sec-iscallable
|
|
174
|
-
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
175
|
-
var isCallable$g = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
176
|
-
return typeof argument == 'function' || argument === documentAll;
|
|
177
|
-
} : function (argument) {
|
|
178
|
-
return typeof argument == 'function';
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
var isCallable$f = isCallable$g;
|
|
182
|
-
|
|
183
|
-
var isObject$9 = function (it) {
|
|
184
|
-
return typeof it == 'object' ? it !== null : isCallable$f(it);
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
var globalThis$i = globalThis_1;
|
|
188
|
-
var isCallable$e = isCallable$g;
|
|
189
|
-
|
|
190
|
-
var aFunction = function (argument) {
|
|
191
|
-
return isCallable$e(argument) ? argument : undefined;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
var getBuiltIn$7 = function (namespace, method) {
|
|
195
|
-
return arguments.length < 2 ? aFunction(globalThis$i[namespace]) : globalThis$i[namespace] && globalThis$i[namespace][method];
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
var uncurryThis$c = functionUncurryThis;
|
|
199
|
-
|
|
200
|
-
var objectIsPrototypeOf = uncurryThis$c({}.isPrototypeOf);
|
|
201
|
-
|
|
202
|
-
var globalThis$h = globalThis_1;
|
|
203
|
-
|
|
204
|
-
var navigator = globalThis$h.navigator;
|
|
205
|
-
var userAgent$5 = navigator && navigator.userAgent;
|
|
206
|
-
|
|
207
|
-
var environmentUserAgent = userAgent$5 ? String(userAgent$5) : '';
|
|
208
|
-
|
|
209
|
-
var globalThis$g = globalThis_1;
|
|
210
|
-
var userAgent$4 = environmentUserAgent;
|
|
211
|
-
|
|
212
|
-
var process$3 = globalThis$g.process;
|
|
213
|
-
var Deno$1 = globalThis$g.Deno;
|
|
214
|
-
var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
|
|
215
|
-
var v8 = versions && versions.v8;
|
|
216
|
-
var match, version;
|
|
217
|
-
|
|
218
|
-
if (v8) {
|
|
219
|
-
match = v8.split('.');
|
|
220
|
-
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
221
|
-
// but their correct versions are not interesting for us
|
|
222
|
-
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
226
|
-
// so check `userAgent` even if `.v8` exists, but 0
|
|
227
|
-
if (!version && userAgent$4) {
|
|
228
|
-
match = userAgent$4.match(/Edge\/(\d+)/);
|
|
229
|
-
if (!match || match[1] >= 74) {
|
|
230
|
-
match = userAgent$4.match(/Chrome\/(\d+)/);
|
|
231
|
-
if (match) version = +match[1];
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
var environmentV8Version = version;
|
|
236
|
-
|
|
237
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
238
|
-
var V8_VERSION$1 = environmentV8Version;
|
|
239
|
-
var fails$8 = fails$c;
|
|
240
|
-
var globalThis$f = globalThis_1;
|
|
241
|
-
|
|
242
|
-
var $String$5 = globalThis$f.String;
|
|
243
|
-
|
|
244
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
245
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$8(function () {
|
|
246
|
-
var symbol = Symbol('symbol detection');
|
|
247
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
248
|
-
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
249
|
-
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
250
|
-
// of course, fail.
|
|
251
|
-
return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
252
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
253
|
-
!Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
257
|
-
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
258
|
-
|
|
259
|
-
var useSymbolAsUid = NATIVE_SYMBOL$1 &&
|
|
260
|
-
!Symbol.sham &&
|
|
261
|
-
typeof Symbol.iterator == 'symbol';
|
|
262
|
-
|
|
263
|
-
var getBuiltIn$6 = getBuiltIn$7;
|
|
264
|
-
var isCallable$d = isCallable$g;
|
|
265
|
-
var isPrototypeOf$3 = objectIsPrototypeOf;
|
|
266
|
-
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
267
|
-
|
|
268
|
-
var $Object$2 = Object;
|
|
269
|
-
|
|
270
|
-
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
271
|
-
return typeof it == 'symbol';
|
|
272
|
-
} : function (it) {
|
|
273
|
-
var $Symbol = getBuiltIn$6('Symbol');
|
|
274
|
-
return isCallable$d($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$2(it));
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
var $String$4 = String;
|
|
278
|
-
|
|
279
|
-
var tryToString$4 = function (argument) {
|
|
280
|
-
try {
|
|
281
|
-
return $String$4(argument);
|
|
282
|
-
} catch (error) {
|
|
283
|
-
return 'Object';
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
var isCallable$c = isCallable$g;
|
|
288
|
-
var tryToString$3 = tryToString$4;
|
|
289
|
-
|
|
290
|
-
var $TypeError$b = TypeError;
|
|
291
|
-
|
|
292
|
-
// `Assert: IsCallable(argument) is true`
|
|
293
|
-
var aCallable$8 = function (argument) {
|
|
294
|
-
if (isCallable$c(argument)) return argument;
|
|
295
|
-
throw new $TypeError$b(tryToString$3(argument) + ' is not a function');
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
var aCallable$7 = aCallable$8;
|
|
299
|
-
var isNullOrUndefined$2 = isNullOrUndefined$4;
|
|
300
|
-
|
|
301
|
-
// `GetMethod` abstract operation
|
|
302
|
-
// https://tc39.es/ecma262/#sec-getmethod
|
|
303
|
-
var getMethod$3 = function (V, P) {
|
|
304
|
-
var func = V[P];
|
|
305
|
-
return isNullOrUndefined$2(func) ? undefined : aCallable$7(func);
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
var call$b = functionCall;
|
|
309
|
-
var isCallable$b = isCallable$g;
|
|
310
|
-
var isObject$8 = isObject$9;
|
|
311
|
-
|
|
312
|
-
var $TypeError$a = TypeError;
|
|
313
|
-
|
|
314
|
-
// `OrdinaryToPrimitive` abstract operation
|
|
315
|
-
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
316
|
-
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
317
|
-
var fn, val;
|
|
318
|
-
if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$8(val = call$b(fn, input))) return val;
|
|
319
|
-
if (isCallable$b(fn = input.valueOf) && !isObject$8(val = call$b(fn, input))) return val;
|
|
320
|
-
if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$8(val = call$b(fn, input))) return val;
|
|
321
|
-
throw new $TypeError$a("Can't convert object to primitive value");
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
var sharedStore = {exports: {}};
|
|
325
|
-
|
|
326
|
-
var globalThis$e = globalThis_1;
|
|
327
|
-
|
|
328
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
329
|
-
var defineProperty$4 = Object.defineProperty;
|
|
330
|
-
|
|
331
|
-
var defineGlobalProperty$3 = function (key, value) {
|
|
332
|
-
try {
|
|
333
|
-
defineProperty$4(globalThis$e, key, { value: value, configurable: true, writable: true });
|
|
334
|
-
} catch (error) {
|
|
335
|
-
globalThis$e[key] = value;
|
|
336
|
-
} return value;
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
var globalThis$d = globalThis_1;
|
|
340
|
-
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
341
|
-
|
|
342
|
-
var SHARED = '__core-js_shared__';
|
|
343
|
-
var store$3 = sharedStore.exports = globalThis$d[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
344
|
-
|
|
345
|
-
(store$3.versions || (store$3.versions = [])).push({
|
|
346
|
-
version: '3.39.0',
|
|
347
|
-
mode: 'global',
|
|
348
|
-
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
349
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE',
|
|
350
|
-
source: 'https://github.com/zloirock/core-js'
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
var sharedStoreExports = sharedStore.exports;
|
|
354
|
-
|
|
355
|
-
var store$2 = sharedStoreExports;
|
|
356
|
-
|
|
357
|
-
var shared$3 = function (key, value) {
|
|
358
|
-
return store$2[key] || (store$2[key] = value || {});
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
var requireObjectCoercible$1 = requireObjectCoercible$3;
|
|
362
|
-
|
|
363
|
-
var $Object$1 = Object;
|
|
364
|
-
|
|
365
|
-
// `ToObject` abstract operation
|
|
366
|
-
// https://tc39.es/ecma262/#sec-toobject
|
|
367
|
-
var toObject$2 = function (argument) {
|
|
368
|
-
return $Object$1(requireObjectCoercible$1(argument));
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
var uncurryThis$b = functionUncurryThis;
|
|
372
|
-
var toObject$1 = toObject$2;
|
|
373
|
-
|
|
374
|
-
var hasOwnProperty = uncurryThis$b({}.hasOwnProperty);
|
|
375
|
-
|
|
376
|
-
// `HasOwnProperty` abstract operation
|
|
377
|
-
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
378
|
-
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
379
|
-
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
380
|
-
return hasOwnProperty(toObject$1(it), key);
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
var uncurryThis$a = functionUncurryThis;
|
|
384
|
-
|
|
385
|
-
var id = 0;
|
|
386
|
-
var postfix = Math.random();
|
|
387
|
-
var toString$1 = uncurryThis$a(1.0.toString);
|
|
388
|
-
|
|
389
|
-
var uid$2 = function (key) {
|
|
390
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
var globalThis$c = globalThis_1;
|
|
394
|
-
var shared$2 = shared$3;
|
|
395
|
-
var hasOwn$9 = hasOwnProperty_1;
|
|
396
|
-
var uid$1 = uid$2;
|
|
397
|
-
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
398
|
-
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
399
|
-
|
|
400
|
-
var Symbol$1 = globalThis$c.Symbol;
|
|
401
|
-
var WellKnownSymbolsStore = shared$2('wks');
|
|
402
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
403
|
-
|
|
404
|
-
var wellKnownSymbol$a = function (name) {
|
|
405
|
-
if (!hasOwn$9(WellKnownSymbolsStore, name)) {
|
|
406
|
-
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)
|
|
407
|
-
? Symbol$1[name]
|
|
408
|
-
: createWellKnownSymbol('Symbol.' + name);
|
|
409
|
-
} return WellKnownSymbolsStore[name];
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
var call$a = functionCall;
|
|
413
|
-
var isObject$7 = isObject$9;
|
|
414
|
-
var isSymbol$1 = isSymbol$2;
|
|
415
|
-
var getMethod$2 = getMethod$3;
|
|
416
|
-
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
417
|
-
var wellKnownSymbol$9 = wellKnownSymbol$a;
|
|
418
|
-
|
|
419
|
-
var $TypeError$9 = TypeError;
|
|
420
|
-
var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
|
|
421
|
-
|
|
422
|
-
// `ToPrimitive` abstract operation
|
|
423
|
-
// https://tc39.es/ecma262/#sec-toprimitive
|
|
424
|
-
var toPrimitive$1 = function (input, pref) {
|
|
425
|
-
if (!isObject$7(input) || isSymbol$1(input)) return input;
|
|
426
|
-
var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
|
|
427
|
-
var result;
|
|
428
|
-
if (exoticToPrim) {
|
|
429
|
-
if (pref === undefined) pref = 'default';
|
|
430
|
-
result = call$a(exoticToPrim, input, pref);
|
|
431
|
-
if (!isObject$7(result) || isSymbol$1(result)) return result;
|
|
432
|
-
throw new $TypeError$9("Can't convert object to primitive value");
|
|
433
|
-
}
|
|
434
|
-
if (pref === undefined) pref = 'number';
|
|
435
|
-
return ordinaryToPrimitive(input, pref);
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
var toPrimitive = toPrimitive$1;
|
|
439
|
-
var isSymbol = isSymbol$2;
|
|
440
|
-
|
|
441
|
-
// `ToPropertyKey` abstract operation
|
|
442
|
-
// https://tc39.es/ecma262/#sec-topropertykey
|
|
443
|
-
var toPropertyKey$2 = function (argument) {
|
|
444
|
-
var key = toPrimitive(argument, 'string');
|
|
445
|
-
return isSymbol(key) ? key : key + '';
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
var globalThis$b = globalThis_1;
|
|
449
|
-
var isObject$6 = isObject$9;
|
|
450
|
-
|
|
451
|
-
var document$3 = globalThis$b.document;
|
|
452
|
-
// typeof document.createElement is 'object' in old IE
|
|
453
|
-
var EXISTS$1 = isObject$6(document$3) && isObject$6(document$3.createElement);
|
|
454
|
-
|
|
455
|
-
var documentCreateElement = function (it) {
|
|
456
|
-
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
457
|
-
};
|
|
458
|
-
|
|
459
|
-
var DESCRIPTORS$9 = descriptors;
|
|
460
|
-
var fails$7 = fails$c;
|
|
461
|
-
var createElement$1 = documentCreateElement;
|
|
462
|
-
|
|
463
|
-
// Thanks to IE8 for its funny defineProperty
|
|
464
|
-
var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
|
|
465
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
466
|
-
return Object.defineProperty(createElement$1('div'), 'a', {
|
|
467
|
-
get: function () { return 7; }
|
|
468
|
-
}).a !== 7;
|
|
469
|
-
});
|
|
470
|
-
|
|
471
|
-
var DESCRIPTORS$8 = descriptors;
|
|
472
|
-
var call$9 = functionCall;
|
|
473
|
-
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
474
|
-
var createPropertyDescriptor$1 = createPropertyDescriptor$2;
|
|
475
|
-
var toIndexedObject$2 = toIndexedObject$3;
|
|
476
|
-
var toPropertyKey$1 = toPropertyKey$2;
|
|
477
|
-
var hasOwn$8 = hasOwnProperty_1;
|
|
478
|
-
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
479
|
-
|
|
480
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
481
|
-
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
482
|
-
|
|
483
|
-
// `Object.getOwnPropertyDescriptor` method
|
|
484
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
485
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
486
|
-
O = toIndexedObject$2(O);
|
|
487
|
-
P = toPropertyKey$1(P);
|
|
488
|
-
if (IE8_DOM_DEFINE$1) try {
|
|
489
|
-
return $getOwnPropertyDescriptor$1(O, P);
|
|
490
|
-
} catch (error) { /* empty */ }
|
|
491
|
-
if (hasOwn$8(O, P)) return createPropertyDescriptor$1(!call$9(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
492
|
-
};
|
|
493
|
-
|
|
494
|
-
var objectDefineProperty = {};
|
|
495
|
-
|
|
496
|
-
var DESCRIPTORS$7 = descriptors;
|
|
497
|
-
var fails$6 = fails$c;
|
|
498
|
-
|
|
499
|
-
// V8 ~ Chrome 36-
|
|
500
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
501
|
-
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
|
|
502
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
503
|
-
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
504
|
-
value: 42,
|
|
505
|
-
writable: false
|
|
506
|
-
}).prototype !== 42;
|
|
507
|
-
});
|
|
508
|
-
|
|
509
|
-
var isObject$5 = isObject$9;
|
|
510
|
-
|
|
511
|
-
var $String$3 = String;
|
|
512
|
-
var $TypeError$8 = TypeError;
|
|
513
|
-
|
|
514
|
-
// `Assert: Type(argument) is Object`
|
|
515
|
-
var anObject$9 = function (argument) {
|
|
516
|
-
if (isObject$5(argument)) return argument;
|
|
517
|
-
throw new $TypeError$8($String$3(argument) + ' is not an object');
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
var DESCRIPTORS$6 = descriptors;
|
|
521
|
-
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
522
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
523
|
-
var anObject$8 = anObject$9;
|
|
524
|
-
var toPropertyKey = toPropertyKey$2;
|
|
525
|
-
|
|
526
|
-
var $TypeError$7 = TypeError;
|
|
527
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
528
|
-
var $defineProperty = Object.defineProperty;
|
|
529
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
530
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
531
|
-
var ENUMERABLE = 'enumerable';
|
|
532
|
-
var CONFIGURABLE$1 = 'configurable';
|
|
533
|
-
var WRITABLE = 'writable';
|
|
534
|
-
|
|
535
|
-
// `Object.defineProperty` method
|
|
536
|
-
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
537
|
-
objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
|
|
538
|
-
anObject$8(O);
|
|
539
|
-
P = toPropertyKey(P);
|
|
540
|
-
anObject$8(Attributes);
|
|
541
|
-
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
542
|
-
var current = $getOwnPropertyDescriptor(O, P);
|
|
543
|
-
if (current && current[WRITABLE]) {
|
|
544
|
-
O[P] = Attributes.value;
|
|
545
|
-
Attributes = {
|
|
546
|
-
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
547
|
-
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
548
|
-
writable: false
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
} return $defineProperty(O, P, Attributes);
|
|
552
|
-
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
553
|
-
anObject$8(O);
|
|
554
|
-
P = toPropertyKey(P);
|
|
555
|
-
anObject$8(Attributes);
|
|
556
|
-
if (IE8_DOM_DEFINE) try {
|
|
557
|
-
return $defineProperty(O, P, Attributes);
|
|
558
|
-
} catch (error) { /* empty */ }
|
|
559
|
-
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$7('Accessors not supported');
|
|
560
|
-
if ('value' in Attributes) O[P] = Attributes.value;
|
|
561
|
-
return O;
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
var DESCRIPTORS$5 = descriptors;
|
|
565
|
-
var definePropertyModule$2 = objectDefineProperty;
|
|
566
|
-
var createPropertyDescriptor = createPropertyDescriptor$2;
|
|
567
|
-
|
|
568
|
-
var createNonEnumerableProperty$2 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
569
|
-
return definePropertyModule$2.f(object, key, createPropertyDescriptor(1, value));
|
|
570
|
-
} : function (object, key, value) {
|
|
571
|
-
object[key] = value;
|
|
572
|
-
return object;
|
|
573
|
-
};
|
|
574
|
-
|
|
575
|
-
var makeBuiltIn$3 = {exports: {}};
|
|
576
|
-
|
|
577
|
-
var DESCRIPTORS$4 = descriptors;
|
|
578
|
-
var hasOwn$7 = hasOwnProperty_1;
|
|
579
|
-
|
|
580
|
-
var FunctionPrototype$1 = Function.prototype;
|
|
581
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
582
|
-
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
583
|
-
|
|
584
|
-
var EXISTS = hasOwn$7(FunctionPrototype$1, 'name');
|
|
585
|
-
// additional protection from minified / mangled / dropped function names
|
|
586
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
587
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
588
|
-
|
|
589
|
-
var functionName = {
|
|
590
|
-
EXISTS: EXISTS,
|
|
591
|
-
PROPER: PROPER,
|
|
592
|
-
CONFIGURABLE: CONFIGURABLE
|
|
593
|
-
};
|
|
594
|
-
|
|
595
|
-
var uncurryThis$9 = functionUncurryThis;
|
|
596
|
-
var isCallable$a = isCallable$g;
|
|
597
|
-
var store$1 = sharedStoreExports;
|
|
598
|
-
|
|
599
|
-
var functionToString = uncurryThis$9(Function.toString);
|
|
600
|
-
|
|
601
|
-
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
602
|
-
if (!isCallable$a(store$1.inspectSource)) {
|
|
603
|
-
store$1.inspectSource = function (it) {
|
|
604
|
-
return functionToString(it);
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
var inspectSource$3 = store$1.inspectSource;
|
|
609
|
-
|
|
610
|
-
var globalThis$a = globalThis_1;
|
|
611
|
-
var isCallable$9 = isCallable$g;
|
|
612
|
-
|
|
613
|
-
var WeakMap$1 = globalThis$a.WeakMap;
|
|
614
|
-
|
|
615
|
-
var weakMapBasicDetection = isCallable$9(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
616
|
-
|
|
617
|
-
var shared$1 = shared$3;
|
|
618
|
-
var uid = uid$2;
|
|
619
|
-
|
|
620
|
-
var keys = shared$1('keys');
|
|
621
|
-
|
|
622
|
-
var sharedKey$1 = function (key) {
|
|
623
|
-
return keys[key] || (keys[key] = uid(key));
|
|
624
|
-
};
|
|
625
|
-
|
|
626
|
-
var hiddenKeys$3 = {};
|
|
627
|
-
|
|
628
|
-
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
629
|
-
var globalThis$9 = globalThis_1;
|
|
630
|
-
var isObject$4 = isObject$9;
|
|
631
|
-
var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
|
|
632
|
-
var hasOwn$6 = hasOwnProperty_1;
|
|
633
|
-
var shared = sharedStoreExports;
|
|
634
|
-
var sharedKey = sharedKey$1;
|
|
635
|
-
var hiddenKeys$2 = hiddenKeys$3;
|
|
636
|
-
|
|
637
|
-
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
638
|
-
var TypeError$2 = globalThis$9.TypeError;
|
|
639
|
-
var WeakMap = globalThis$9.WeakMap;
|
|
640
|
-
var set$1, get, has;
|
|
641
|
-
|
|
642
|
-
var enforce = function (it) {
|
|
643
|
-
return has(it) ? get(it) : set$1(it, {});
|
|
644
|
-
};
|
|
645
|
-
|
|
646
|
-
var getterFor = function (TYPE) {
|
|
647
|
-
return function (it) {
|
|
648
|
-
var state;
|
|
649
|
-
if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
|
|
650
|
-
throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
651
|
-
} return state;
|
|
652
|
-
};
|
|
653
|
-
};
|
|
654
|
-
|
|
655
|
-
if (NATIVE_WEAK_MAP || shared.state) {
|
|
656
|
-
var store = shared.state || (shared.state = new WeakMap());
|
|
657
|
-
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
658
|
-
store.get = store.get;
|
|
659
|
-
store.has = store.has;
|
|
660
|
-
store.set = store.set;
|
|
661
|
-
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
662
|
-
set$1 = function (it, metadata) {
|
|
663
|
-
if (store.has(it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
664
|
-
metadata.facade = it;
|
|
665
|
-
store.set(it, metadata);
|
|
666
|
-
return metadata;
|
|
667
|
-
};
|
|
668
|
-
get = function (it) {
|
|
669
|
-
return store.get(it) || {};
|
|
670
|
-
};
|
|
671
|
-
has = function (it) {
|
|
672
|
-
return store.has(it);
|
|
673
|
-
};
|
|
674
|
-
} else {
|
|
675
|
-
var STATE = sharedKey('state');
|
|
676
|
-
hiddenKeys$2[STATE] = true;
|
|
677
|
-
set$1 = function (it, metadata) {
|
|
678
|
-
if (hasOwn$6(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
679
|
-
metadata.facade = it;
|
|
680
|
-
createNonEnumerableProperty$1(it, STATE, metadata);
|
|
681
|
-
return metadata;
|
|
682
|
-
};
|
|
683
|
-
get = function (it) {
|
|
684
|
-
return hasOwn$6(it, STATE) ? it[STATE] : {};
|
|
685
|
-
};
|
|
686
|
-
has = function (it) {
|
|
687
|
-
return hasOwn$6(it, STATE);
|
|
688
|
-
};
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
var internalState = {
|
|
692
|
-
set: set$1,
|
|
693
|
-
get: get,
|
|
694
|
-
has: has,
|
|
695
|
-
enforce: enforce,
|
|
696
|
-
getterFor: getterFor
|
|
697
|
-
};
|
|
698
|
-
|
|
699
|
-
var uncurryThis$8 = functionUncurryThis;
|
|
700
|
-
var fails$5 = fails$c;
|
|
701
|
-
var isCallable$8 = isCallable$g;
|
|
702
|
-
var hasOwn$5 = hasOwnProperty_1;
|
|
703
|
-
var DESCRIPTORS$3 = descriptors;
|
|
704
|
-
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
705
|
-
var inspectSource$2 = inspectSource$3;
|
|
706
|
-
var InternalStateModule$1 = internalState;
|
|
707
|
-
|
|
708
|
-
var enforceInternalState = InternalStateModule$1.enforce;
|
|
709
|
-
var getInternalState = InternalStateModule$1.get;
|
|
710
|
-
var $String$2 = String;
|
|
711
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
712
|
-
var defineProperty$3 = Object.defineProperty;
|
|
713
|
-
var stringSlice = uncurryThis$8(''.slice);
|
|
714
|
-
var replace = uncurryThis$8(''.replace);
|
|
715
|
-
var join = uncurryThis$8([].join);
|
|
716
|
-
|
|
717
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$5(function () {
|
|
718
|
-
return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
719
|
-
});
|
|
720
|
-
|
|
721
|
-
var TEMPLATE = String(String).split('String');
|
|
722
|
-
|
|
723
|
-
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
724
|
-
if (stringSlice($String$2(name), 0, 7) === 'Symbol(') {
|
|
725
|
-
name = '[' + replace($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
726
|
-
}
|
|
727
|
-
if (options && options.getter) name = 'get ' + name;
|
|
728
|
-
if (options && options.setter) name = 'set ' + name;
|
|
729
|
-
if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
730
|
-
if (DESCRIPTORS$3) defineProperty$3(value, 'name', { value: name, configurable: true });
|
|
731
|
-
else value.name = name;
|
|
732
|
-
}
|
|
733
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
|
|
734
|
-
defineProperty$3(value, 'length', { value: options.arity });
|
|
735
|
-
}
|
|
736
|
-
try {
|
|
737
|
-
if (options && hasOwn$5(options, 'constructor') && options.constructor) {
|
|
738
|
-
if (DESCRIPTORS$3) defineProperty$3(value, 'prototype', { writable: false });
|
|
739
|
-
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
740
|
-
} else if (value.prototype) value.prototype = undefined;
|
|
741
|
-
} catch (error) { /* empty */ }
|
|
742
|
-
var state = enforceInternalState(value);
|
|
743
|
-
if (!hasOwn$5(state, 'source')) {
|
|
744
|
-
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
745
|
-
} return value;
|
|
746
|
-
};
|
|
747
|
-
|
|
748
|
-
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
749
|
-
// eslint-disable-next-line no-extend-native -- required
|
|
750
|
-
Function.prototype.toString = makeBuiltIn$2(function toString() {
|
|
751
|
-
return isCallable$8(this) && getInternalState(this).source || inspectSource$2(this);
|
|
752
|
-
}, 'toString');
|
|
753
|
-
|
|
754
|
-
var makeBuiltInExports = makeBuiltIn$3.exports;
|
|
755
|
-
|
|
756
|
-
var isCallable$7 = isCallable$g;
|
|
757
|
-
var definePropertyModule$1 = objectDefineProperty;
|
|
758
|
-
var makeBuiltIn$1 = makeBuiltInExports;
|
|
759
|
-
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
760
|
-
|
|
761
|
-
var defineBuiltIn$4 = function (O, key, value, options) {
|
|
762
|
-
if (!options) options = {};
|
|
763
|
-
var simple = options.enumerable;
|
|
764
|
-
var name = options.name !== undefined ? options.name : key;
|
|
765
|
-
if (isCallable$7(value)) makeBuiltIn$1(value, name, options);
|
|
766
|
-
if (options.global) {
|
|
767
|
-
if (simple) O[key] = value;
|
|
768
|
-
else defineGlobalProperty$1(key, value);
|
|
769
|
-
} else {
|
|
770
|
-
try {
|
|
771
|
-
if (!options.unsafe) delete O[key];
|
|
772
|
-
else if (O[key]) simple = true;
|
|
773
|
-
} catch (error) { /* empty */ }
|
|
774
|
-
if (simple) O[key] = value;
|
|
775
|
-
else definePropertyModule$1.f(O, key, {
|
|
776
|
-
value: value,
|
|
777
|
-
enumerable: false,
|
|
778
|
-
configurable: !options.nonConfigurable,
|
|
779
|
-
writable: !options.nonWritable
|
|
780
|
-
});
|
|
781
|
-
} return O;
|
|
782
|
-
};
|
|
783
|
-
|
|
784
|
-
var objectGetOwnPropertyNames = {};
|
|
785
|
-
|
|
786
|
-
var ceil = Math.ceil;
|
|
787
|
-
var floor = Math.floor;
|
|
788
|
-
|
|
789
|
-
// `Math.trunc` method
|
|
790
|
-
// https://tc39.es/ecma262/#sec-math.trunc
|
|
791
|
-
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
792
|
-
var mathTrunc = Math.trunc || function trunc(x) {
|
|
793
|
-
var n = +x;
|
|
794
|
-
return (n > 0 ? floor : ceil)(n);
|
|
795
|
-
};
|
|
796
|
-
|
|
797
|
-
var trunc = mathTrunc;
|
|
798
|
-
|
|
799
|
-
// `ToIntegerOrInfinity` abstract operation
|
|
800
|
-
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
801
|
-
var toIntegerOrInfinity$2 = function (argument) {
|
|
802
|
-
var number = +argument;
|
|
803
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
804
|
-
return number !== number || number === 0 ? 0 : trunc(number);
|
|
805
|
-
};
|
|
806
|
-
|
|
807
|
-
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
808
|
-
|
|
809
|
-
var max = Math.max;
|
|
810
|
-
var min$1 = Math.min;
|
|
811
|
-
|
|
812
|
-
// Helper for a popular repeating case of the spec:
|
|
813
|
-
// Let integer be ? ToInteger(index).
|
|
814
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
815
|
-
var toAbsoluteIndex$1 = function (index, length) {
|
|
816
|
-
var integer = toIntegerOrInfinity$1(index);
|
|
817
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
818
|
-
};
|
|
819
|
-
|
|
820
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
821
|
-
|
|
822
|
-
var min = Math.min;
|
|
823
|
-
|
|
824
|
-
// `ToLength` abstract operation
|
|
825
|
-
// https://tc39.es/ecma262/#sec-tolength
|
|
826
|
-
var toLength$1 = function (argument) {
|
|
827
|
-
var len = toIntegerOrInfinity(argument);
|
|
828
|
-
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
829
|
-
};
|
|
830
|
-
|
|
831
|
-
var toLength = toLength$1;
|
|
832
|
-
|
|
833
|
-
// `LengthOfArrayLike` abstract operation
|
|
834
|
-
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
835
|
-
var lengthOfArrayLike$2 = function (obj) {
|
|
836
|
-
return toLength(obj.length);
|
|
837
|
-
};
|
|
838
|
-
|
|
839
|
-
var toIndexedObject$1 = toIndexedObject$3;
|
|
840
|
-
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
841
|
-
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
842
|
-
|
|
843
|
-
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
844
|
-
var createMethod = function (IS_INCLUDES) {
|
|
845
|
-
return function ($this, el, fromIndex) {
|
|
846
|
-
var O = toIndexedObject$1($this);
|
|
847
|
-
var length = lengthOfArrayLike$1(O);
|
|
848
|
-
if (length === 0) return !IS_INCLUDES && -1;
|
|
849
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
|
850
|
-
var value;
|
|
851
|
-
// Array#includes uses SameValueZero equality algorithm
|
|
852
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
853
|
-
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
854
|
-
value = O[index++];
|
|
855
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
856
|
-
if (value !== value) return true;
|
|
857
|
-
// Array#indexOf ignores holes, Array#includes - not
|
|
858
|
-
} else for (;length > index; index++) {
|
|
859
|
-
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
860
|
-
} return !IS_INCLUDES && -1;
|
|
861
|
-
};
|
|
862
|
-
};
|
|
863
|
-
|
|
864
|
-
var arrayIncludes = {
|
|
865
|
-
// `Array.prototype.includes` method
|
|
866
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
867
|
-
includes: createMethod(true),
|
|
868
|
-
// `Array.prototype.indexOf` method
|
|
869
|
-
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
870
|
-
indexOf: createMethod(false)
|
|
871
|
-
};
|
|
872
|
-
|
|
873
|
-
var uncurryThis$7 = functionUncurryThis;
|
|
874
|
-
var hasOwn$4 = hasOwnProperty_1;
|
|
875
|
-
var toIndexedObject = toIndexedObject$3;
|
|
876
|
-
var indexOf = arrayIncludes.indexOf;
|
|
877
|
-
var hiddenKeys$1 = hiddenKeys$3;
|
|
878
|
-
|
|
879
|
-
var push = uncurryThis$7([].push);
|
|
880
|
-
|
|
881
|
-
var objectKeysInternal = function (object, names) {
|
|
882
|
-
var O = toIndexedObject(object);
|
|
883
|
-
var i = 0;
|
|
884
|
-
var result = [];
|
|
885
|
-
var key;
|
|
886
|
-
for (key in O) !hasOwn$4(hiddenKeys$1, key) && hasOwn$4(O, key) && push(result, key);
|
|
887
|
-
// Don't enum bug & hidden keys
|
|
888
|
-
while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
|
|
889
|
-
~indexOf(result, key) || push(result, key);
|
|
890
|
-
}
|
|
891
|
-
return result;
|
|
892
|
-
};
|
|
893
|
-
|
|
894
|
-
// IE8- don't enum bug keys
|
|
895
|
-
var enumBugKeys$2 = [
|
|
896
|
-
'constructor',
|
|
897
|
-
'hasOwnProperty',
|
|
898
|
-
'isPrototypeOf',
|
|
899
|
-
'propertyIsEnumerable',
|
|
900
|
-
'toLocaleString',
|
|
901
|
-
'toString',
|
|
902
|
-
'valueOf'
|
|
903
|
-
];
|
|
904
|
-
|
|
905
|
-
var internalObjectKeys$1 = objectKeysInternal;
|
|
906
|
-
var enumBugKeys$1 = enumBugKeys$2;
|
|
907
|
-
|
|
908
|
-
var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
|
|
909
|
-
|
|
910
|
-
// `Object.getOwnPropertyNames` method
|
|
911
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
912
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
913
|
-
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
914
|
-
return internalObjectKeys$1(O, hiddenKeys);
|
|
915
|
-
};
|
|
916
|
-
|
|
917
|
-
var objectGetOwnPropertySymbols = {};
|
|
918
|
-
|
|
919
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
920
|
-
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
921
|
-
|
|
922
|
-
var getBuiltIn$5 = getBuiltIn$7;
|
|
923
|
-
var uncurryThis$6 = functionUncurryThis;
|
|
924
|
-
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
925
|
-
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
926
|
-
var anObject$7 = anObject$9;
|
|
927
|
-
|
|
928
|
-
var concat$1 = uncurryThis$6([].concat);
|
|
929
|
-
|
|
930
|
-
// all object keys, includes non-enumerable and symbols
|
|
931
|
-
var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
932
|
-
var keys = getOwnPropertyNamesModule.f(anObject$7(it));
|
|
933
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
934
|
-
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
935
|
-
};
|
|
936
|
-
|
|
937
|
-
var hasOwn$3 = hasOwnProperty_1;
|
|
938
|
-
var ownKeys = ownKeys$1;
|
|
939
|
-
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
940
|
-
var definePropertyModule = objectDefineProperty;
|
|
941
|
-
|
|
942
|
-
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
943
|
-
var keys = ownKeys(source);
|
|
944
|
-
var defineProperty = definePropertyModule.f;
|
|
945
|
-
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
946
|
-
for (var i = 0; i < keys.length; i++) {
|
|
947
|
-
var key = keys[i];
|
|
948
|
-
if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
|
|
949
|
-
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
};
|
|
953
|
-
|
|
954
|
-
var fails$4 = fails$c;
|
|
955
|
-
var isCallable$6 = isCallable$g;
|
|
956
|
-
|
|
957
|
-
var replacement = /#|\.prototype\./;
|
|
958
|
-
|
|
959
|
-
var isForced$2 = function (feature, detection) {
|
|
960
|
-
var value = data[normalize(feature)];
|
|
961
|
-
return value === POLYFILL ? true
|
|
962
|
-
: value === NATIVE ? false
|
|
963
|
-
: isCallable$6(detection) ? fails$4(detection)
|
|
964
|
-
: !!detection;
|
|
965
|
-
};
|
|
966
|
-
|
|
967
|
-
var normalize = isForced$2.normalize = function (string) {
|
|
968
|
-
return String(string).replace(replacement, '.').toLowerCase();
|
|
969
|
-
};
|
|
970
|
-
|
|
971
|
-
var data = isForced$2.data = {};
|
|
972
|
-
var NATIVE = isForced$2.NATIVE = 'N';
|
|
973
|
-
var POLYFILL = isForced$2.POLYFILL = 'P';
|
|
974
|
-
|
|
975
|
-
var isForced_1 = isForced$2;
|
|
976
|
-
|
|
977
|
-
var globalThis$8 = globalThis_1;
|
|
978
|
-
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
979
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$2;
|
|
980
|
-
var defineBuiltIn$3 = defineBuiltIn$4;
|
|
981
|
-
var defineGlobalProperty = defineGlobalProperty$3;
|
|
982
|
-
var copyConstructorProperties = copyConstructorProperties$1;
|
|
983
|
-
var isForced$1 = isForced_1;
|
|
984
|
-
|
|
985
|
-
/*
|
|
986
|
-
options.target - name of the target object
|
|
987
|
-
options.global - target is the global object
|
|
988
|
-
options.stat - export as static methods of target
|
|
989
|
-
options.proto - export as prototype methods of target
|
|
990
|
-
options.real - real prototype method for the `pure` version
|
|
991
|
-
options.forced - export even if the native feature is available
|
|
992
|
-
options.bind - bind methods to the target, required for the `pure` version
|
|
993
|
-
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
994
|
-
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
995
|
-
options.sham - add a flag to not completely full polyfills
|
|
996
|
-
options.enumerable - export as enumerable property
|
|
997
|
-
options.dontCallGetSet - prevent calling a getter on target
|
|
998
|
-
options.name - the .name of the function if it does not match the key
|
|
999
|
-
*/
|
|
1000
|
-
var _export = function (options, source) {
|
|
1001
|
-
var TARGET = options.target;
|
|
1002
|
-
var GLOBAL = options.global;
|
|
1003
|
-
var STATIC = options.stat;
|
|
1004
|
-
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1005
|
-
if (GLOBAL) {
|
|
1006
|
-
target = globalThis$8;
|
|
1007
|
-
} else if (STATIC) {
|
|
1008
|
-
target = globalThis$8[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1009
|
-
} else {
|
|
1010
|
-
target = globalThis$8[TARGET] && globalThis$8[TARGET].prototype;
|
|
1011
|
-
}
|
|
1012
|
-
if (target) for (key in source) {
|
|
1013
|
-
sourceProperty = source[key];
|
|
1014
|
-
if (options.dontCallGetSet) {
|
|
1015
|
-
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
1016
|
-
targetProperty = descriptor && descriptor.value;
|
|
1017
|
-
} else targetProperty = target[key];
|
|
1018
|
-
FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1019
|
-
// contained in target
|
|
1020
|
-
if (!FORCED && targetProperty !== undefined) {
|
|
1021
|
-
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1022
|
-
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1023
|
-
}
|
|
1024
|
-
// add a flag to not completely full polyfills
|
|
1025
|
-
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1026
|
-
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
1027
|
-
}
|
|
1028
|
-
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
1029
|
-
}
|
|
1030
|
-
};
|
|
1031
|
-
|
|
1032
|
-
var internalObjectKeys = objectKeysInternal;
|
|
1033
|
-
var enumBugKeys = enumBugKeys$2;
|
|
1034
|
-
|
|
1035
|
-
// `Object.keys` method
|
|
1036
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
1037
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1038
|
-
var objectKeys$1 = Object.keys || function keys(O) {
|
|
1039
|
-
return internalObjectKeys(O, enumBugKeys);
|
|
1040
|
-
};
|
|
1041
|
-
|
|
1042
|
-
var DESCRIPTORS$2 = descriptors;
|
|
1043
|
-
var uncurryThis$5 = functionUncurryThis;
|
|
1044
|
-
var call$8 = functionCall;
|
|
1045
|
-
var fails$3 = fails$c;
|
|
1046
|
-
var objectKeys = objectKeys$1;
|
|
1047
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1048
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1049
|
-
var toObject = toObject$2;
|
|
1050
|
-
var IndexedObject = indexedObject;
|
|
1051
|
-
|
|
1052
|
-
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1053
|
-
var $assign = Object.assign;
|
|
1054
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1055
|
-
var defineProperty$2 = Object.defineProperty;
|
|
1056
|
-
var concat = uncurryThis$5([].concat);
|
|
1057
|
-
|
|
1058
|
-
// `Object.assign` method
|
|
1059
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1060
|
-
var objectAssign = !$assign || fails$3(function () {
|
|
1061
|
-
// should have correct order of operations (Edge bug)
|
|
1062
|
-
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
|
|
1063
|
-
enumerable: true,
|
|
1064
|
-
get: function () {
|
|
1065
|
-
defineProperty$2(this, 'b', {
|
|
1066
|
-
value: 3,
|
|
1067
|
-
enumerable: false
|
|
1068
|
-
});
|
|
1069
|
-
}
|
|
1070
|
-
}), { b: 2 })).b !== 1) return true;
|
|
1071
|
-
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1072
|
-
var A = {};
|
|
1073
|
-
var B = {};
|
|
1074
|
-
// eslint-disable-next-line es/no-symbol -- safe
|
|
1075
|
-
var symbol = Symbol('assign detection');
|
|
1076
|
-
var alphabet = 'abcdefghijklmnopqrst';
|
|
1077
|
-
A[symbol] = 7;
|
|
1078
|
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1079
|
-
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1080
|
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1081
|
-
var T = toObject(target);
|
|
1082
|
-
var argumentsLength = arguments.length;
|
|
1083
|
-
var index = 1;
|
|
1084
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1085
|
-
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1086
|
-
while (argumentsLength > index) {
|
|
1087
|
-
var S = IndexedObject(arguments[index++]);
|
|
1088
|
-
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1089
|
-
var length = keys.length;
|
|
1090
|
-
var j = 0;
|
|
1091
|
-
var key;
|
|
1092
|
-
while (length > j) {
|
|
1093
|
-
key = keys[j++];
|
|
1094
|
-
if (!DESCRIPTORS$2 || call$8(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1095
|
-
}
|
|
1096
|
-
} return T;
|
|
1097
|
-
} : $assign;
|
|
1098
|
-
|
|
1099
|
-
var $$6 = _export;
|
|
1100
|
-
var assign = objectAssign;
|
|
1101
|
-
|
|
1102
|
-
// `Object.assign` method
|
|
1103
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1104
|
-
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1105
|
-
$$6({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1106
|
-
assign: assign
|
|
1107
|
-
});
|
|
1108
|
-
|
|
1109
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
1110
|
-
if (null == r) return {};
|
|
1111
|
-
var t = {};
|
|
1112
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
1113
|
-
if (e.indexOf(n) >= 0) continue;
|
|
1114
|
-
t[n] = r[n];
|
|
1115
|
-
}
|
|
1116
|
-
return t;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
/* *
|
|
1120
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1121
|
-
* you may not use this file except in compliance with the License.
|
|
1122
|
-
* You may obtain a copy of the License at
|
|
1123
|
-
*
|
|
1124
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1125
|
-
*
|
|
1126
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1127
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1128
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1129
|
-
* See the License for the specific language governing permissions and
|
|
1130
|
-
* limitations under the License.
|
|
1131
|
-
*
|
|
1132
|
-
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1133
|
-
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
1134
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1135
|
-
* */
|
|
1136
|
-
const SNACKBAR_NAMESPACE = 'snackbar';
|
|
1137
|
-
const WORKSPACE_NAMESPACE = 'workspace';
|
|
1138
|
-
const WARN_NAMESPACE = 'warn';
|
|
1139
|
-
const LAYER_SELECT_NAMESPACE = 'layerselect';
|
|
1140
|
-
const AUTH_NAMESPACE = 'auth';
|
|
1141
|
-
const useSnackbarTranslation = () => useTranslation([SNACKBAR_NAMESPACE, WORKSPACE_NAMESPACE, WARN_NAMESPACE, LAYER_SELECT_NAMESPACE, AUTH_NAMESPACE], {
|
|
1142
|
-
nsMode: 'fallback'
|
|
1143
|
-
});
|
|
1144
|
-
|
|
1145
|
-
/* *
|
|
1146
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1147
|
-
* you may not use this file except in compliance with the License.
|
|
1148
|
-
* You may obtain a copy of the License at
|
|
1149
|
-
*
|
|
1150
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1151
|
-
*
|
|
1152
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1153
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1154
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1155
|
-
* See the License for the specific language governing permissions and
|
|
1156
|
-
* limitations under the License.
|
|
1157
|
-
*
|
|
1158
|
-
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1159
|
-
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1160
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1161
|
-
* */
|
|
1162
|
-
const snackbarAdapter = createEntityAdapter();
|
|
1163
|
-
const initialState = snackbarAdapter.getInitialState();
|
|
1164
|
-
const slice = createSlice({
|
|
1165
|
-
initialState,
|
|
1166
|
-
name: 'snackbar',
|
|
1167
|
-
reducers: {
|
|
1168
|
-
// To open the snackbar call this action
|
|
1169
|
-
openSnackbar: (
|
|
1170
|
-
// eslint-disable-next-line no-unused-vars
|
|
1171
|
-
draft,
|
|
1172
|
-
// eslint-disable-next-line no-unused-vars
|
|
1173
|
-
action) => {},
|
|
1174
|
-
// triggerOpenSnackbarByListener is triggered by the listener to open the snackbar after the current snackbars have all been closed
|
|
1175
|
-
// DO NOT CALL THIS ACTION DIRECTLY!
|
|
1176
|
-
triggerOpenSnackbarByListener: (draft, action) => {
|
|
1177
|
-
const {
|
|
1178
|
-
snackbarContent
|
|
1179
|
-
} = action.payload;
|
|
1180
|
-
// Ensure we have an id before proceeding
|
|
1181
|
-
if (snackbarContent.id === undefined) {
|
|
1182
|
-
return;
|
|
1183
|
-
}
|
|
1184
|
-
snackbarAdapter.setOne(draft, snackbarContent);
|
|
1185
|
-
},
|
|
1186
|
-
closeSnackbar: draft => {
|
|
1187
|
-
snackbarAdapter.removeAll(draft);
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
});
|
|
1191
|
-
const {
|
|
1192
|
-
reducer
|
|
1193
|
-
} = slice;
|
|
1194
|
-
const snackbarActions = slice.actions;
|
|
1195
|
-
|
|
1196
|
-
/* *
|
|
1197
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1198
|
-
* you may not use this file except in compliance with the License.
|
|
1199
|
-
* You may obtain a copy of the License at
|
|
1200
|
-
*
|
|
1201
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1202
|
-
*
|
|
1203
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1204
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1205
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1206
|
-
* See the License for the specific language governing permissions and
|
|
1207
|
-
* limitations under the License.
|
|
1208
|
-
*
|
|
1209
|
-
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1210
|
-
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1211
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1212
|
-
* */
|
|
1213
|
-
const getSnackbarStore = store => {
|
|
1214
|
-
if (store && store.snackbar) {
|
|
1215
|
-
return store.snackbar;
|
|
1216
|
-
}
|
|
1217
|
-
return null;
|
|
1218
|
-
};
|
|
1219
|
-
const {
|
|
1220
|
-
selectAll: getCurrentSnackbarMessages
|
|
1221
|
-
} = snackbarAdapter.getSelectors(state => {
|
|
1222
|
-
var _state$snackbar;
|
|
1223
|
-
return (_state$snackbar = state == null ? void 0 : state.snackbar) != null ? _state$snackbar : {
|
|
1224
|
-
entities: {},
|
|
1225
|
-
ids: []
|
|
1226
|
-
};
|
|
1227
|
-
});
|
|
1228
|
-
const getFirstSnackbarMessage = createSelector(getCurrentSnackbarMessages, currentMessages => {
|
|
1229
|
-
return currentMessages.length > 0 ? currentMessages[0] : undefined;
|
|
1230
|
-
});
|
|
1231
|
-
|
|
1232
|
-
var selectors = /*#__PURE__*/Object.freeze({
|
|
1233
|
-
__proto__: null,
|
|
1234
|
-
getCurrentSnackbarMessages: getCurrentSnackbarMessages,
|
|
1235
|
-
getFirstSnackbarMessage: getFirstSnackbarMessage,
|
|
1236
|
-
getSnackbarStore: getSnackbarStore
|
|
1237
|
-
});
|
|
1238
|
-
|
|
1239
|
-
/* *
|
|
1240
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1241
|
-
* you may not use this file except in compliance with the License.
|
|
1242
|
-
* You may obtain a copy of the License at
|
|
1243
|
-
*
|
|
1244
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1245
|
-
*
|
|
1246
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1247
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1248
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1249
|
-
* See the License for the specific language governing permissions and
|
|
1250
|
-
* limitations under the License.
|
|
1251
|
-
*
|
|
1252
|
-
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1253
|
-
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1254
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1255
|
-
* */
|
|
1256
|
-
var SnackbarMessageType;
|
|
1257
|
-
(function (SnackbarMessageType) {
|
|
1258
|
-
SnackbarMessageType["TRANSLATABLE_MESSAGE"] = "TRANSLATABLE_MESSAGE";
|
|
1259
|
-
SnackbarMessageType["VERBATIM_MESSAGE"] = "VERBATIM_MESSAGE";
|
|
1260
|
-
})(SnackbarMessageType || (SnackbarMessageType = {}));
|
|
1261
|
-
|
|
1262
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
1263
|
-
__proto__: null,
|
|
1264
|
-
get SnackbarMessageType () { return SnackbarMessageType; }
|
|
1265
|
-
});
|
|
1266
|
-
|
|
1267
|
-
/* global Bun, Deno -- detection */
|
|
1268
|
-
var globalThis$7 = globalThis_1;
|
|
1269
|
-
var userAgent$3 = environmentUserAgent;
|
|
1270
|
-
var classof$4 = classofRaw$2;
|
|
1271
|
-
|
|
1272
|
-
var userAgentStartsWith = function (string) {
|
|
1273
|
-
return userAgent$3.slice(0, string.length) === string;
|
|
1274
|
-
};
|
|
1275
|
-
|
|
1276
|
-
var environment = (function () {
|
|
1277
|
-
if (userAgentStartsWith('Bun/')) return 'BUN';
|
|
1278
|
-
if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
|
|
1279
|
-
if (userAgentStartsWith('Deno/')) return 'DENO';
|
|
1280
|
-
if (userAgentStartsWith('Node.js/')) return 'NODE';
|
|
1281
|
-
if (globalThis$7.Bun && typeof Bun.version == 'string') return 'BUN';
|
|
1282
|
-
if (globalThis$7.Deno && typeof Deno.version == 'object') return 'DENO';
|
|
1283
|
-
if (classof$4(globalThis$7.process) === 'process') return 'NODE';
|
|
1284
|
-
if (globalThis$7.window && globalThis$7.document) return 'BROWSER';
|
|
1285
|
-
return 'REST';
|
|
1286
|
-
})();
|
|
1287
|
-
|
|
1288
|
-
var ENVIRONMENT$1 = environment;
|
|
1289
|
-
|
|
1290
|
-
var environmentIsNode = ENVIRONMENT$1 === 'NODE';
|
|
1291
|
-
|
|
1292
|
-
var uncurryThis$4 = functionUncurryThis;
|
|
1293
|
-
var aCallable$6 = aCallable$8;
|
|
1294
|
-
|
|
1295
|
-
var functionUncurryThisAccessor = function (object, key, method) {
|
|
1296
|
-
try {
|
|
1297
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1298
|
-
return uncurryThis$4(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1299
|
-
} catch (error) { /* empty */ }
|
|
1300
|
-
};
|
|
1301
|
-
|
|
1302
|
-
var isObject$3 = isObject$9;
|
|
1303
|
-
|
|
1304
|
-
var isPossiblePrototype$1 = function (argument) {
|
|
1305
|
-
return isObject$3(argument) || argument === null;
|
|
1306
|
-
};
|
|
1307
|
-
|
|
1308
|
-
var isPossiblePrototype = isPossiblePrototype$1;
|
|
1309
|
-
|
|
1310
|
-
var $String$1 = String;
|
|
1311
|
-
var $TypeError$6 = TypeError;
|
|
1312
|
-
|
|
1313
|
-
var aPossiblePrototype$1 = function (argument) {
|
|
1314
|
-
if (isPossiblePrototype(argument)) return argument;
|
|
1315
|
-
throw new $TypeError$6("Can't set " + $String$1(argument) + ' as a prototype');
|
|
1316
|
-
};
|
|
1317
|
-
|
|
1318
|
-
/* eslint-disable no-proto -- safe */
|
|
1319
|
-
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1320
|
-
var isObject$2 = isObject$9;
|
|
1321
|
-
var requireObjectCoercible = requireObjectCoercible$3;
|
|
1322
|
-
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1323
|
-
|
|
1324
|
-
// `Object.setPrototypeOf` method
|
|
1325
|
-
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1326
|
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1327
|
-
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
1328
|
-
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1329
|
-
var CORRECT_SETTER = false;
|
|
1330
|
-
var test = {};
|
|
1331
|
-
var setter;
|
|
1332
|
-
try {
|
|
1333
|
-
setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
1334
|
-
setter(test, []);
|
|
1335
|
-
CORRECT_SETTER = test instanceof Array;
|
|
1336
|
-
} catch (error) { /* empty */ }
|
|
1337
|
-
return function setPrototypeOf(O, proto) {
|
|
1338
|
-
requireObjectCoercible(O);
|
|
1339
|
-
aPossiblePrototype(proto);
|
|
1340
|
-
if (!isObject$2(O)) return O;
|
|
1341
|
-
if (CORRECT_SETTER) setter(O, proto);
|
|
1342
|
-
else O.__proto__ = proto;
|
|
1343
|
-
return O;
|
|
1344
|
-
};
|
|
1345
|
-
}() : undefined);
|
|
1346
|
-
|
|
1347
|
-
var defineProperty$1 = objectDefineProperty.f;
|
|
1348
|
-
var hasOwn$2 = hasOwnProperty_1;
|
|
1349
|
-
var wellKnownSymbol$8 = wellKnownSymbol$a;
|
|
1350
|
-
|
|
1351
|
-
var TO_STRING_TAG$2 = wellKnownSymbol$8('toStringTag');
|
|
1352
|
-
|
|
1353
|
-
var setToStringTag$1 = function (target, TAG, STATIC) {
|
|
1354
|
-
if (target && !STATIC) target = target.prototype;
|
|
1355
|
-
if (target && !hasOwn$2(target, TO_STRING_TAG$2)) {
|
|
1356
|
-
defineProperty$1(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
|
|
1357
|
-
}
|
|
1358
|
-
};
|
|
1359
|
-
|
|
1360
|
-
var makeBuiltIn = makeBuiltInExports;
|
|
1361
|
-
var defineProperty = objectDefineProperty;
|
|
1362
|
-
|
|
1363
|
-
var defineBuiltInAccessor$1 = function (target, name, descriptor) {
|
|
1364
|
-
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
|
|
1365
|
-
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
|
|
1366
|
-
return defineProperty.f(target, name, descriptor);
|
|
1367
|
-
};
|
|
1368
|
-
|
|
1369
|
-
var getBuiltIn$4 = getBuiltIn$7;
|
|
1370
|
-
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
1371
|
-
var wellKnownSymbol$7 = wellKnownSymbol$a;
|
|
1372
|
-
var DESCRIPTORS$1 = descriptors;
|
|
1373
|
-
|
|
1374
|
-
var SPECIES$2 = wellKnownSymbol$7('species');
|
|
1375
|
-
|
|
1376
|
-
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
1377
|
-
var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
|
|
1378
|
-
|
|
1379
|
-
if (DESCRIPTORS$1 && Constructor && !Constructor[SPECIES$2]) {
|
|
1380
|
-
defineBuiltInAccessor(Constructor, SPECIES$2, {
|
|
1381
|
-
configurable: true,
|
|
1382
|
-
get: function () { return this; }
|
|
1383
|
-
});
|
|
1384
|
-
}
|
|
1385
|
-
};
|
|
1386
|
-
|
|
1387
|
-
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
1388
|
-
|
|
1389
|
-
var $TypeError$5 = TypeError;
|
|
1390
|
-
|
|
1391
|
-
var anInstance$1 = function (it, Prototype) {
|
|
1392
|
-
if (isPrototypeOf$2(Prototype, it)) return it;
|
|
1393
|
-
throw new $TypeError$5('Incorrect invocation');
|
|
1394
|
-
};
|
|
1395
|
-
|
|
1396
|
-
var wellKnownSymbol$6 = wellKnownSymbol$a;
|
|
1397
|
-
|
|
1398
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$6('toStringTag');
|
|
1399
|
-
var test = {};
|
|
1400
|
-
|
|
1401
|
-
test[TO_STRING_TAG$1] = 'z';
|
|
1402
|
-
|
|
1403
|
-
var toStringTagSupport = String(test) === '[object z]';
|
|
1404
|
-
|
|
1405
|
-
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1406
|
-
var isCallable$5 = isCallable$g;
|
|
1407
|
-
var classofRaw$1 = classofRaw$2;
|
|
1408
|
-
var wellKnownSymbol$5 = wellKnownSymbol$a;
|
|
1409
|
-
|
|
1410
|
-
var TO_STRING_TAG = wellKnownSymbol$5('toStringTag');
|
|
1411
|
-
var $Object = Object;
|
|
1412
|
-
|
|
1413
|
-
// ES3 wrong here
|
|
1414
|
-
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
|
|
1415
|
-
|
|
1416
|
-
// fallback for IE11 Script Access Denied error
|
|
1417
|
-
var tryGet = function (it, key) {
|
|
1418
|
-
try {
|
|
1419
|
-
return it[key];
|
|
1420
|
-
} catch (error) { /* empty */ }
|
|
1421
|
-
};
|
|
1422
|
-
|
|
1423
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
|
1424
|
-
var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
1425
|
-
var O, tag, result;
|
|
1426
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1427
|
-
// @@toStringTag case
|
|
1428
|
-
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
1429
|
-
// builtinTag case
|
|
1430
|
-
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
1431
|
-
// ES3 arguments fallback
|
|
1432
|
-
: (result = classofRaw$1(O)) === 'Object' && isCallable$5(O.callee) ? 'Arguments' : result;
|
|
1433
|
-
};
|
|
1434
|
-
|
|
1435
|
-
var uncurryThis$3 = functionUncurryThis;
|
|
1436
|
-
var fails$2 = fails$c;
|
|
1437
|
-
var isCallable$4 = isCallable$g;
|
|
1438
|
-
var classof$2 = classof$3;
|
|
1439
|
-
var getBuiltIn$3 = getBuiltIn$7;
|
|
1440
|
-
var inspectSource$1 = inspectSource$3;
|
|
1441
|
-
|
|
1442
|
-
var noop = function () { /* empty */ };
|
|
1443
|
-
var construct = getBuiltIn$3('Reflect', 'construct');
|
|
1444
|
-
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1445
|
-
var exec = uncurryThis$3(constructorRegExp.exec);
|
|
1446
|
-
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
1447
|
-
|
|
1448
|
-
var isConstructorModern = function isConstructor(argument) {
|
|
1449
|
-
if (!isCallable$4(argument)) return false;
|
|
1450
|
-
try {
|
|
1451
|
-
construct(noop, [], argument);
|
|
1452
|
-
return true;
|
|
1453
|
-
} catch (error) {
|
|
1454
|
-
return false;
|
|
1455
|
-
}
|
|
1456
|
-
};
|
|
1457
|
-
|
|
1458
|
-
var isConstructorLegacy = function isConstructor(argument) {
|
|
1459
|
-
if (!isCallable$4(argument)) return false;
|
|
1460
|
-
switch (classof$2(argument)) {
|
|
1461
|
-
case 'AsyncFunction':
|
|
1462
|
-
case 'GeneratorFunction':
|
|
1463
|
-
case 'AsyncGeneratorFunction': return false;
|
|
1464
|
-
}
|
|
1465
|
-
try {
|
|
1466
|
-
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1467
|
-
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1468
|
-
// (for example, `DOMQuad` and similar in FF41-)
|
|
1469
|
-
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
|
|
1470
|
-
} catch (error) {
|
|
1471
|
-
return true;
|
|
1472
|
-
}
|
|
1473
|
-
};
|
|
1474
|
-
|
|
1475
|
-
isConstructorLegacy.sham = true;
|
|
1476
|
-
|
|
1477
|
-
// `IsConstructor` abstract operation
|
|
1478
|
-
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1479
|
-
var isConstructor$1 = !construct || fails$2(function () {
|
|
1480
|
-
var called;
|
|
1481
|
-
return isConstructorModern(isConstructorModern.call)
|
|
1482
|
-
|| !isConstructorModern(Object)
|
|
1483
|
-
|| !isConstructorModern(function () { called = true; })
|
|
1484
|
-
|| called;
|
|
1485
|
-
}) ? isConstructorLegacy : isConstructorModern;
|
|
1486
|
-
|
|
1487
|
-
var isConstructor = isConstructor$1;
|
|
1488
|
-
var tryToString$2 = tryToString$4;
|
|
1489
|
-
|
|
1490
|
-
var $TypeError$4 = TypeError;
|
|
1491
|
-
|
|
1492
|
-
// `Assert: IsConstructor(argument) is true`
|
|
1493
|
-
var aConstructor$1 = function (argument) {
|
|
1494
|
-
if (isConstructor(argument)) return argument;
|
|
1495
|
-
throw new $TypeError$4(tryToString$2(argument) + ' is not a constructor');
|
|
1496
|
-
};
|
|
1497
|
-
|
|
1498
|
-
var anObject$6 = anObject$9;
|
|
1499
|
-
var aConstructor = aConstructor$1;
|
|
1500
|
-
var isNullOrUndefined$1 = isNullOrUndefined$4;
|
|
1501
|
-
var wellKnownSymbol$4 = wellKnownSymbol$a;
|
|
1502
|
-
|
|
1503
|
-
var SPECIES$1 = wellKnownSymbol$4('species');
|
|
1504
|
-
|
|
1505
|
-
// `SpeciesConstructor` abstract operation
|
|
1506
|
-
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
1507
|
-
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
1508
|
-
var C = anObject$6(O).constructor;
|
|
1509
|
-
var S;
|
|
1510
|
-
return C === undefined || isNullOrUndefined$1(S = anObject$6(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
|
|
1511
|
-
};
|
|
1512
|
-
|
|
1513
|
-
var NATIVE_BIND$1 = functionBindNative;
|
|
1514
|
-
|
|
1515
|
-
var FunctionPrototype = Function.prototype;
|
|
1516
|
-
var apply$1 = FunctionPrototype.apply;
|
|
1517
|
-
var call$7 = FunctionPrototype.call;
|
|
1518
|
-
|
|
1519
|
-
// eslint-disable-next-line es/no-reflect -- safe
|
|
1520
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$1) : function () {
|
|
1521
|
-
return call$7.apply(apply$1, arguments);
|
|
1522
|
-
});
|
|
1523
|
-
|
|
1524
|
-
var classofRaw = classofRaw$2;
|
|
1525
|
-
var uncurryThis$2 = functionUncurryThis;
|
|
1526
|
-
|
|
1527
|
-
var functionUncurryThisClause = function (fn) {
|
|
1528
|
-
// Nashorn bug:
|
|
1529
|
-
// https://github.com/zloirock/core-js/issues/1128
|
|
1530
|
-
// https://github.com/zloirock/core-js/issues/1130
|
|
1531
|
-
if (classofRaw(fn) === 'Function') return uncurryThis$2(fn);
|
|
1532
|
-
};
|
|
1533
|
-
|
|
1534
|
-
var uncurryThis$1 = functionUncurryThisClause;
|
|
1535
|
-
var aCallable$5 = aCallable$8;
|
|
1536
|
-
var NATIVE_BIND = functionBindNative;
|
|
1537
|
-
|
|
1538
|
-
var bind$4 = uncurryThis$1(uncurryThis$1.bind);
|
|
1539
|
-
|
|
1540
|
-
// optional / simple context binding
|
|
1541
|
-
var functionBindContext = function (fn, that) {
|
|
1542
|
-
aCallable$5(fn);
|
|
1543
|
-
return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
|
|
1544
|
-
return fn.apply(that, arguments);
|
|
1545
|
-
};
|
|
1546
|
-
};
|
|
1547
|
-
|
|
1548
|
-
var getBuiltIn$2 = getBuiltIn$7;
|
|
1549
|
-
|
|
1550
|
-
var html$1 = getBuiltIn$2('document', 'documentElement');
|
|
1551
|
-
|
|
1552
|
-
var uncurryThis = functionUncurryThis;
|
|
1553
|
-
|
|
1554
|
-
var arraySlice$1 = uncurryThis([].slice);
|
|
1555
|
-
|
|
1556
|
-
var $TypeError$3 = TypeError;
|
|
1557
|
-
|
|
1558
|
-
var validateArgumentsLength$1 = function (passed, required) {
|
|
1559
|
-
if (passed < required) throw new $TypeError$3('Not enough arguments');
|
|
1560
|
-
return passed;
|
|
1561
|
-
};
|
|
1562
|
-
|
|
1563
|
-
var userAgent$2 = environmentUserAgent;
|
|
1564
|
-
|
|
1565
|
-
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
1566
|
-
var environmentIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
1567
|
-
|
|
1568
|
-
var globalThis$6 = globalThis_1;
|
|
1569
|
-
var apply = functionApply;
|
|
1570
|
-
var bind$3 = functionBindContext;
|
|
1571
|
-
var isCallable$3 = isCallable$g;
|
|
1572
|
-
var hasOwn$1 = hasOwnProperty_1;
|
|
1573
|
-
var fails$1 = fails$c;
|
|
1574
|
-
var html = html$1;
|
|
1575
|
-
var arraySlice = arraySlice$1;
|
|
1576
|
-
var createElement = documentCreateElement;
|
|
1577
|
-
var validateArgumentsLength = validateArgumentsLength$1;
|
|
1578
|
-
var IS_IOS$1 = environmentIsIos;
|
|
1579
|
-
var IS_NODE$2 = environmentIsNode;
|
|
1580
|
-
|
|
1581
|
-
var set = globalThis$6.setImmediate;
|
|
1582
|
-
var clear = globalThis$6.clearImmediate;
|
|
1583
|
-
var process$2 = globalThis$6.process;
|
|
1584
|
-
var Dispatch = globalThis$6.Dispatch;
|
|
1585
|
-
var Function$1 = globalThis$6.Function;
|
|
1586
|
-
var MessageChannel = globalThis$6.MessageChannel;
|
|
1587
|
-
var String$1 = globalThis$6.String;
|
|
1588
|
-
var counter = 0;
|
|
1589
|
-
var queue$2 = {};
|
|
1590
|
-
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
1591
|
-
var $location, defer, channel, port;
|
|
1592
|
-
|
|
1593
|
-
fails$1(function () {
|
|
1594
|
-
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
1595
|
-
$location = globalThis$6.location;
|
|
1596
|
-
});
|
|
1597
|
-
|
|
1598
|
-
var run = function (id) {
|
|
1599
|
-
if (hasOwn$1(queue$2, id)) {
|
|
1600
|
-
var fn = queue$2[id];
|
|
1601
|
-
delete queue$2[id];
|
|
1602
|
-
fn();
|
|
1603
|
-
}
|
|
1604
|
-
};
|
|
1605
|
-
|
|
1606
|
-
var runner = function (id) {
|
|
1607
|
-
return function () {
|
|
1608
|
-
run(id);
|
|
1609
|
-
};
|
|
1610
|
-
};
|
|
1611
|
-
|
|
1612
|
-
var eventListener = function (event) {
|
|
1613
|
-
run(event.data);
|
|
1614
|
-
};
|
|
1615
|
-
|
|
1616
|
-
var globalPostMessageDefer = function (id) {
|
|
1617
|
-
// old engines have not location.origin
|
|
1618
|
-
globalThis$6.postMessage(String$1(id), $location.protocol + '//' + $location.host);
|
|
1619
|
-
};
|
|
1620
|
-
|
|
1621
|
-
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
1622
|
-
if (!set || !clear) {
|
|
1623
|
-
set = function setImmediate(handler) {
|
|
1624
|
-
validateArgumentsLength(arguments.length, 1);
|
|
1625
|
-
var fn = isCallable$3(handler) ? handler : Function$1(handler);
|
|
1626
|
-
var args = arraySlice(arguments, 1);
|
|
1627
|
-
queue$2[++counter] = function () {
|
|
1628
|
-
apply(fn, undefined, args);
|
|
1629
|
-
};
|
|
1630
|
-
defer(counter);
|
|
1631
|
-
return counter;
|
|
1632
|
-
};
|
|
1633
|
-
clear = function clearImmediate(id) {
|
|
1634
|
-
delete queue$2[id];
|
|
1635
|
-
};
|
|
1636
|
-
// Node.js 0.8-
|
|
1637
|
-
if (IS_NODE$2) {
|
|
1638
|
-
defer = function (id) {
|
|
1639
|
-
process$2.nextTick(runner(id));
|
|
1640
|
-
};
|
|
1641
|
-
// Sphere (JS game engine) Dispatch API
|
|
1642
|
-
} else if (Dispatch && Dispatch.now) {
|
|
1643
|
-
defer = function (id) {
|
|
1644
|
-
Dispatch.now(runner(id));
|
|
1645
|
-
};
|
|
1646
|
-
// Browsers with MessageChannel, includes WebWorkers
|
|
1647
|
-
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
1648
|
-
} else if (MessageChannel && !IS_IOS$1) {
|
|
1649
|
-
channel = new MessageChannel();
|
|
1650
|
-
port = channel.port2;
|
|
1651
|
-
channel.port1.onmessage = eventListener;
|
|
1652
|
-
defer = bind$3(port.postMessage, port);
|
|
1653
|
-
// Browsers with postMessage, skip WebWorkers
|
|
1654
|
-
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1655
|
-
} else if (
|
|
1656
|
-
globalThis$6.addEventListener &&
|
|
1657
|
-
isCallable$3(globalThis$6.postMessage) &&
|
|
1658
|
-
!globalThis$6.importScripts &&
|
|
1659
|
-
$location && $location.protocol !== 'file:' &&
|
|
1660
|
-
!fails$1(globalPostMessageDefer)
|
|
1661
|
-
) {
|
|
1662
|
-
defer = globalPostMessageDefer;
|
|
1663
|
-
globalThis$6.addEventListener('message', eventListener, false);
|
|
1664
|
-
// IE8-
|
|
1665
|
-
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
1666
|
-
defer = function (id) {
|
|
1667
|
-
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
1668
|
-
html.removeChild(this);
|
|
1669
|
-
run(id);
|
|
1670
|
-
};
|
|
1671
|
-
};
|
|
1672
|
-
// Rest old browsers
|
|
1673
|
-
} else {
|
|
1674
|
-
defer = function (id) {
|
|
1675
|
-
setTimeout(runner(id), 0);
|
|
1676
|
-
};
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
|
|
1680
|
-
var task$1 = {
|
|
1681
|
-
set: set,
|
|
1682
|
-
clear: clear
|
|
1683
|
-
};
|
|
1684
|
-
|
|
1685
|
-
var globalThis$5 = globalThis_1;
|
|
1686
|
-
var DESCRIPTORS = descriptors;
|
|
1687
|
-
|
|
1688
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1689
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
1690
|
-
|
|
1691
|
-
// Avoid NodeJS experimental warning
|
|
1692
|
-
var safeGetBuiltIn$1 = function (name) {
|
|
1693
|
-
if (!DESCRIPTORS) return globalThis$5[name];
|
|
1694
|
-
var descriptor = getOwnPropertyDescriptor(globalThis$5, name);
|
|
1695
|
-
return descriptor && descriptor.value;
|
|
1696
|
-
};
|
|
1697
|
-
|
|
1698
|
-
var Queue$2 = function () {
|
|
1699
|
-
this.head = null;
|
|
1700
|
-
this.tail = null;
|
|
1701
|
-
};
|
|
1702
|
-
|
|
1703
|
-
Queue$2.prototype = {
|
|
1704
|
-
add: function (item) {
|
|
1705
|
-
var entry = { item: item, next: null };
|
|
1706
|
-
var tail = this.tail;
|
|
1707
|
-
if (tail) tail.next = entry;
|
|
1708
|
-
else this.head = entry;
|
|
1709
|
-
this.tail = entry;
|
|
1710
|
-
},
|
|
1711
|
-
get: function () {
|
|
1712
|
-
var entry = this.head;
|
|
1713
|
-
if (entry) {
|
|
1714
|
-
var next = this.head = entry.next;
|
|
1715
|
-
if (next === null) this.tail = null;
|
|
1716
|
-
return entry.item;
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
};
|
|
1720
|
-
|
|
1721
|
-
var queue$1 = Queue$2;
|
|
1722
|
-
|
|
1723
|
-
var userAgent$1 = environmentUserAgent;
|
|
1724
|
-
|
|
1725
|
-
var environmentIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
|
|
1726
|
-
|
|
1727
|
-
var userAgent = environmentUserAgent;
|
|
1728
|
-
|
|
1729
|
-
var environmentIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
1730
|
-
|
|
1731
|
-
var globalThis$4 = globalThis_1;
|
|
1732
|
-
var safeGetBuiltIn = safeGetBuiltIn$1;
|
|
1733
|
-
var bind$2 = functionBindContext;
|
|
1734
|
-
var macrotask = task$1.set;
|
|
1735
|
-
var Queue$1 = queue$1;
|
|
1736
|
-
var IS_IOS = environmentIsIos;
|
|
1737
|
-
var IS_IOS_PEBBLE = environmentIsIosPebble;
|
|
1738
|
-
var IS_WEBOS_WEBKIT = environmentIsWebosWebkit;
|
|
1739
|
-
var IS_NODE$1 = environmentIsNode;
|
|
1740
|
-
|
|
1741
|
-
var MutationObserver = globalThis$4.MutationObserver || globalThis$4.WebKitMutationObserver;
|
|
1742
|
-
var document$2 = globalThis$4.document;
|
|
1743
|
-
var process$1 = globalThis$4.process;
|
|
1744
|
-
var Promise$1 = globalThis$4.Promise;
|
|
1745
|
-
var microtask$1 = safeGetBuiltIn('queueMicrotask');
|
|
1746
|
-
var notify$1, toggle, node, promise, then;
|
|
1747
|
-
|
|
1748
|
-
// modern engines have queueMicrotask method
|
|
1749
|
-
if (!microtask$1) {
|
|
1750
|
-
var queue = new Queue$1();
|
|
1751
|
-
|
|
1752
|
-
var flush = function () {
|
|
1753
|
-
var parent, fn;
|
|
1754
|
-
if (IS_NODE$1 && (parent = process$1.domain)) parent.exit();
|
|
1755
|
-
while (fn = queue.get()) try {
|
|
1756
|
-
fn();
|
|
1757
|
-
} catch (error) {
|
|
1758
|
-
if (queue.head) notify$1();
|
|
1759
|
-
throw error;
|
|
1760
|
-
}
|
|
1761
|
-
if (parent) parent.enter();
|
|
1762
|
-
};
|
|
1763
|
-
|
|
1764
|
-
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
1765
|
-
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
|
|
1766
|
-
if (!IS_IOS && !IS_NODE$1 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
|
|
1767
|
-
toggle = true;
|
|
1768
|
-
node = document$2.createTextNode('');
|
|
1769
|
-
new MutationObserver(flush).observe(node, { characterData: true });
|
|
1770
|
-
notify$1 = function () {
|
|
1771
|
-
node.data = toggle = !toggle;
|
|
1772
|
-
};
|
|
1773
|
-
// environments with maybe non-completely correct, but existent Promise
|
|
1774
|
-
} else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
|
|
1775
|
-
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
1776
|
-
promise = Promise$1.resolve(undefined);
|
|
1777
|
-
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
1778
|
-
promise.constructor = Promise$1;
|
|
1779
|
-
then = bind$2(promise.then, promise);
|
|
1780
|
-
notify$1 = function () {
|
|
1781
|
-
then(flush);
|
|
1782
|
-
};
|
|
1783
|
-
// Node.js without promises
|
|
1784
|
-
} else if (IS_NODE$1) {
|
|
1785
|
-
notify$1 = function () {
|
|
1786
|
-
process$1.nextTick(flush);
|
|
1787
|
-
};
|
|
1788
|
-
// for other environments - macrotask based on:
|
|
1789
|
-
// - setImmediate
|
|
1790
|
-
// - MessageChannel
|
|
1791
|
-
// - window.postMessage
|
|
1792
|
-
// - onreadystatechange
|
|
1793
|
-
// - setTimeout
|
|
1794
|
-
} else {
|
|
1795
|
-
// `webpack` dev server bug on IE global methods - use bind(fn, global)
|
|
1796
|
-
macrotask = bind$2(macrotask, globalThis$4);
|
|
1797
|
-
notify$1 = function () {
|
|
1798
|
-
macrotask(flush);
|
|
1799
|
-
};
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
microtask$1 = function (fn) {
|
|
1803
|
-
if (!queue.head) notify$1();
|
|
1804
|
-
queue.add(fn);
|
|
1805
|
-
};
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
var microtask_1 = microtask$1;
|
|
1809
|
-
|
|
1810
|
-
var hostReportErrors$1 = function (a, b) {
|
|
1811
|
-
try {
|
|
1812
|
-
// eslint-disable-next-line no-console -- safe
|
|
1813
|
-
arguments.length === 1 ? console.error(a) : console.error(a, b);
|
|
1814
|
-
} catch (error) { /* empty */ }
|
|
1815
|
-
};
|
|
1816
|
-
|
|
1817
|
-
var perform$3 = function (exec) {
|
|
1818
|
-
try {
|
|
1819
|
-
return { error: false, value: exec() };
|
|
1820
|
-
} catch (error) {
|
|
1821
|
-
return { error: true, value: error };
|
|
1822
|
-
}
|
|
1823
|
-
};
|
|
1824
|
-
|
|
1825
|
-
var globalThis$3 = globalThis_1;
|
|
1826
|
-
|
|
1827
|
-
var promiseNativeConstructor = globalThis$3.Promise;
|
|
1828
|
-
|
|
1829
|
-
var globalThis$2 = globalThis_1;
|
|
1830
|
-
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
1831
|
-
var isCallable$2 = isCallable$g;
|
|
1832
|
-
var isForced = isForced_1;
|
|
1833
|
-
var inspectSource = inspectSource$3;
|
|
1834
|
-
var wellKnownSymbol$3 = wellKnownSymbol$a;
|
|
1835
|
-
var ENVIRONMENT = environment;
|
|
1836
|
-
var V8_VERSION = environmentV8Version;
|
|
1837
|
-
|
|
1838
|
-
NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
|
|
1839
|
-
var SPECIES = wellKnownSymbol$3('species');
|
|
1840
|
-
var SUBCLASSING = false;
|
|
1841
|
-
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$2(globalThis$2.PromiseRejectionEvent);
|
|
1842
|
-
|
|
1843
|
-
var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
|
|
1844
|
-
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
|
|
1845
|
-
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
|
|
1846
|
-
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
1847
|
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
1848
|
-
// We can't detect it synchronously, so just check versions
|
|
1849
|
-
if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
|
|
1850
|
-
// We can't use @@species feature detection in V8 since it causes
|
|
1851
|
-
// deoptimization and performance degradation
|
|
1852
|
-
// https://github.com/zloirock/core-js/issues/679
|
|
1853
|
-
if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
|
|
1854
|
-
// Detect correctness of subclassing with @@species support
|
|
1855
|
-
var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
|
|
1856
|
-
var FakePromise = function (exec) {
|
|
1857
|
-
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
1858
|
-
};
|
|
1859
|
-
var constructor = promise.constructor = {};
|
|
1860
|
-
constructor[SPECIES] = FakePromise;
|
|
1861
|
-
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
1862
|
-
if (!SUBCLASSING) return true;
|
|
1863
|
-
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
1864
|
-
} return !GLOBAL_CORE_JS_PROMISE && (ENVIRONMENT === 'BROWSER' || ENVIRONMENT === 'DENO') && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
1865
|
-
});
|
|
1866
|
-
|
|
1867
|
-
var promiseConstructorDetection = {
|
|
1868
|
-
CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
|
|
1869
|
-
REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
|
|
1870
|
-
SUBCLASSING: SUBCLASSING
|
|
1871
|
-
};
|
|
1872
|
-
|
|
1873
|
-
var newPromiseCapability$2 = {};
|
|
1874
|
-
|
|
1875
|
-
var aCallable$4 = aCallable$8;
|
|
1876
|
-
|
|
1877
|
-
var $TypeError$2 = TypeError;
|
|
1878
|
-
|
|
1879
|
-
var PromiseCapability = function (C) {
|
|
1880
|
-
var resolve, reject;
|
|
1881
|
-
this.promise = new C(function ($$resolve, $$reject) {
|
|
1882
|
-
if (resolve !== undefined || reject !== undefined) throw new $TypeError$2('Bad Promise constructor');
|
|
1883
|
-
resolve = $$resolve;
|
|
1884
|
-
reject = $$reject;
|
|
1885
|
-
});
|
|
1886
|
-
this.resolve = aCallable$4(resolve);
|
|
1887
|
-
this.reject = aCallable$4(reject);
|
|
1888
|
-
};
|
|
1889
|
-
|
|
1890
|
-
// `NewPromiseCapability` abstract operation
|
|
1891
|
-
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
1892
|
-
newPromiseCapability$2.f = function (C) {
|
|
1893
|
-
return new PromiseCapability(C);
|
|
1894
|
-
};
|
|
1895
|
-
|
|
1896
|
-
var $$5 = _export;
|
|
1897
|
-
var IS_NODE = environmentIsNode;
|
|
1898
|
-
var globalThis$1 = globalThis_1;
|
|
1899
|
-
var call$6 = functionCall;
|
|
1900
|
-
var defineBuiltIn$2 = defineBuiltIn$4;
|
|
1901
|
-
var setPrototypeOf = objectSetPrototypeOf;
|
|
1902
|
-
var setToStringTag = setToStringTag$1;
|
|
1903
|
-
var setSpecies = setSpecies$1;
|
|
1904
|
-
var aCallable$3 = aCallable$8;
|
|
1905
|
-
var isCallable$1 = isCallable$g;
|
|
1906
|
-
var isObject$1 = isObject$9;
|
|
1907
|
-
var anInstance = anInstance$1;
|
|
1908
|
-
var speciesConstructor = speciesConstructor$1;
|
|
1909
|
-
var task = task$1.set;
|
|
1910
|
-
var microtask = microtask_1;
|
|
1911
|
-
var hostReportErrors = hostReportErrors$1;
|
|
1912
|
-
var perform$2 = perform$3;
|
|
1913
|
-
var Queue = queue$1;
|
|
1914
|
-
var InternalStateModule = internalState;
|
|
1915
|
-
var NativePromiseConstructor$2 = promiseNativeConstructor;
|
|
1916
|
-
var PromiseConstructorDetection = promiseConstructorDetection;
|
|
1917
|
-
var newPromiseCapabilityModule$3 = newPromiseCapability$2;
|
|
1918
|
-
|
|
1919
|
-
var PROMISE = 'Promise';
|
|
1920
|
-
var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
|
|
1921
|
-
var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
|
|
1922
|
-
var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
|
|
1923
|
-
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
1924
|
-
var setInternalState = InternalStateModule.set;
|
|
1925
|
-
var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
|
|
1926
|
-
var PromiseConstructor = NativePromiseConstructor$2;
|
|
1927
|
-
var PromisePrototype = NativePromisePrototype$1;
|
|
1928
|
-
var TypeError$1 = globalThis$1.TypeError;
|
|
1929
|
-
var document$1 = globalThis$1.document;
|
|
1930
|
-
var process = globalThis$1.process;
|
|
1931
|
-
var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
|
|
1932
|
-
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
1933
|
-
|
|
1934
|
-
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && globalThis$1.dispatchEvent);
|
|
1935
|
-
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
1936
|
-
var REJECTION_HANDLED = 'rejectionhandled';
|
|
1937
|
-
var PENDING = 0;
|
|
1938
|
-
var FULFILLED = 1;
|
|
1939
|
-
var REJECTED = 2;
|
|
1940
|
-
var HANDLED = 1;
|
|
1941
|
-
var UNHANDLED = 2;
|
|
1942
|
-
|
|
1943
|
-
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
1944
|
-
|
|
1945
|
-
// helpers
|
|
1946
|
-
var isThenable = function (it) {
|
|
1947
|
-
var then;
|
|
1948
|
-
return isObject$1(it) && isCallable$1(then = it.then) ? then : false;
|
|
1949
|
-
};
|
|
1950
|
-
|
|
1951
|
-
var callReaction = function (reaction, state) {
|
|
1952
|
-
var value = state.value;
|
|
1953
|
-
var ok = state.state === FULFILLED;
|
|
1954
|
-
var handler = ok ? reaction.ok : reaction.fail;
|
|
1955
|
-
var resolve = reaction.resolve;
|
|
1956
|
-
var reject = reaction.reject;
|
|
1957
|
-
var domain = reaction.domain;
|
|
1958
|
-
var result, then, exited;
|
|
1959
|
-
try {
|
|
1960
|
-
if (handler) {
|
|
1961
|
-
if (!ok) {
|
|
1962
|
-
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
1963
|
-
state.rejection = HANDLED;
|
|
1964
|
-
}
|
|
1965
|
-
if (handler === true) result = value;
|
|
1966
|
-
else {
|
|
1967
|
-
if (domain) domain.enter();
|
|
1968
|
-
result = handler(value); // can throw
|
|
1969
|
-
if (domain) {
|
|
1970
|
-
domain.exit();
|
|
1971
|
-
exited = true;
|
|
1972
|
-
}
|
|
1973
|
-
}
|
|
1974
|
-
if (result === reaction.promise) {
|
|
1975
|
-
reject(new TypeError$1('Promise-chain cycle'));
|
|
1976
|
-
} else if (then = isThenable(result)) {
|
|
1977
|
-
call$6(then, result, resolve, reject);
|
|
1978
|
-
} else resolve(result);
|
|
1979
|
-
} else reject(value);
|
|
1980
|
-
} catch (error) {
|
|
1981
|
-
if (domain && !exited) domain.exit();
|
|
1982
|
-
reject(error);
|
|
1983
|
-
}
|
|
1984
|
-
};
|
|
1985
|
-
|
|
1986
|
-
var notify = function (state, isReject) {
|
|
1987
|
-
if (state.notified) return;
|
|
1988
|
-
state.notified = true;
|
|
1989
|
-
microtask(function () {
|
|
1990
|
-
var reactions = state.reactions;
|
|
1991
|
-
var reaction;
|
|
1992
|
-
while (reaction = reactions.get()) {
|
|
1993
|
-
callReaction(reaction, state);
|
|
1994
|
-
}
|
|
1995
|
-
state.notified = false;
|
|
1996
|
-
if (isReject && !state.rejection) onUnhandled(state);
|
|
1997
|
-
});
|
|
1998
|
-
};
|
|
1999
|
-
|
|
2000
|
-
var dispatchEvent = function (name, promise, reason) {
|
|
2001
|
-
var event, handler;
|
|
2002
|
-
if (DISPATCH_EVENT) {
|
|
2003
|
-
event = document$1.createEvent('Event');
|
|
2004
|
-
event.promise = promise;
|
|
2005
|
-
event.reason = reason;
|
|
2006
|
-
event.initEvent(name, false, true);
|
|
2007
|
-
globalThis$1.dispatchEvent(event);
|
|
2008
|
-
} else event = { promise: promise, reason: reason };
|
|
2009
|
-
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis$1['on' + name])) handler(event);
|
|
2010
|
-
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
2011
|
-
};
|
|
2012
|
-
|
|
2013
|
-
var onUnhandled = function (state) {
|
|
2014
|
-
call$6(task, globalThis$1, function () {
|
|
2015
|
-
var promise = state.facade;
|
|
2016
|
-
var value = state.value;
|
|
2017
|
-
var IS_UNHANDLED = isUnhandled(state);
|
|
2018
|
-
var result;
|
|
2019
|
-
if (IS_UNHANDLED) {
|
|
2020
|
-
result = perform$2(function () {
|
|
2021
|
-
if (IS_NODE) {
|
|
2022
|
-
process.emit('unhandledRejection', value, promise);
|
|
2023
|
-
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
2024
|
-
});
|
|
2025
|
-
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
2026
|
-
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
2027
|
-
if (result.error) throw result.value;
|
|
2028
|
-
}
|
|
2029
|
-
});
|
|
2030
|
-
};
|
|
2031
|
-
|
|
2032
|
-
var isUnhandled = function (state) {
|
|
2033
|
-
return state.rejection !== HANDLED && !state.parent;
|
|
2034
|
-
};
|
|
2035
|
-
|
|
2036
|
-
var onHandleUnhandled = function (state) {
|
|
2037
|
-
call$6(task, globalThis$1, function () {
|
|
2038
|
-
var promise = state.facade;
|
|
2039
|
-
if (IS_NODE) {
|
|
2040
|
-
process.emit('rejectionHandled', promise);
|
|
2041
|
-
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
2042
|
-
});
|
|
2043
|
-
};
|
|
2044
|
-
|
|
2045
|
-
var bind$1 = function (fn, state, unwrap) {
|
|
2046
|
-
return function (value) {
|
|
2047
|
-
fn(state, value, unwrap);
|
|
2048
|
-
};
|
|
2049
|
-
};
|
|
2050
|
-
|
|
2051
|
-
var internalReject = function (state, value, unwrap) {
|
|
2052
|
-
if (state.done) return;
|
|
2053
|
-
state.done = true;
|
|
2054
|
-
if (unwrap) state = unwrap;
|
|
2055
|
-
state.value = value;
|
|
2056
|
-
state.state = REJECTED;
|
|
2057
|
-
notify(state, true);
|
|
2058
|
-
};
|
|
2059
|
-
|
|
2060
|
-
var internalResolve = function (state, value, unwrap) {
|
|
2061
|
-
if (state.done) return;
|
|
2062
|
-
state.done = true;
|
|
2063
|
-
if (unwrap) state = unwrap;
|
|
2064
|
-
try {
|
|
2065
|
-
if (state.facade === value) throw new TypeError$1("Promise can't be resolved itself");
|
|
2066
|
-
var then = isThenable(value);
|
|
2067
|
-
if (then) {
|
|
2068
|
-
microtask(function () {
|
|
2069
|
-
var wrapper = { done: false };
|
|
2070
|
-
try {
|
|
2071
|
-
call$6(then, value,
|
|
2072
|
-
bind$1(internalResolve, wrapper, state),
|
|
2073
|
-
bind$1(internalReject, wrapper, state)
|
|
2074
|
-
);
|
|
2075
|
-
} catch (error) {
|
|
2076
|
-
internalReject(wrapper, error, state);
|
|
2077
|
-
}
|
|
2078
|
-
});
|
|
2079
|
-
} else {
|
|
2080
|
-
state.value = value;
|
|
2081
|
-
state.state = FULFILLED;
|
|
2082
|
-
notify(state, false);
|
|
2083
|
-
}
|
|
2084
|
-
} catch (error) {
|
|
2085
|
-
internalReject({ done: false }, error, state);
|
|
2086
|
-
}
|
|
2087
|
-
};
|
|
2088
|
-
|
|
2089
|
-
// constructor polyfill
|
|
2090
|
-
if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
2091
|
-
// 25.4.3.1 Promise(executor)
|
|
2092
|
-
PromiseConstructor = function Promise(executor) {
|
|
2093
|
-
anInstance(this, PromisePrototype);
|
|
2094
|
-
aCallable$3(executor);
|
|
2095
|
-
call$6(Internal, this);
|
|
2096
|
-
var state = getInternalPromiseState(this);
|
|
2097
|
-
try {
|
|
2098
|
-
executor(bind$1(internalResolve, state), bind$1(internalReject, state));
|
|
2099
|
-
} catch (error) {
|
|
2100
|
-
internalReject(state, error);
|
|
2101
|
-
}
|
|
2102
|
-
};
|
|
2103
|
-
|
|
2104
|
-
PromisePrototype = PromiseConstructor.prototype;
|
|
2105
|
-
|
|
2106
|
-
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
2107
|
-
Internal = function Promise(executor) {
|
|
2108
|
-
setInternalState(this, {
|
|
2109
|
-
type: PROMISE,
|
|
2110
|
-
done: false,
|
|
2111
|
-
notified: false,
|
|
2112
|
-
parent: false,
|
|
2113
|
-
reactions: new Queue(),
|
|
2114
|
-
rejection: false,
|
|
2115
|
-
state: PENDING,
|
|
2116
|
-
value: null
|
|
2117
|
-
});
|
|
2118
|
-
};
|
|
2119
|
-
|
|
2120
|
-
// `Promise.prototype.then` method
|
|
2121
|
-
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
2122
|
-
Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
2123
|
-
var state = getInternalPromiseState(this);
|
|
2124
|
-
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
2125
|
-
state.parent = true;
|
|
2126
|
-
reaction.ok = isCallable$1(onFulfilled) ? onFulfilled : true;
|
|
2127
|
-
reaction.fail = isCallable$1(onRejected) && onRejected;
|
|
2128
|
-
reaction.domain = IS_NODE ? process.domain : undefined;
|
|
2129
|
-
if (state.state === PENDING) state.reactions.add(reaction);
|
|
2130
|
-
else microtask(function () {
|
|
2131
|
-
callReaction(reaction, state);
|
|
2132
|
-
});
|
|
2133
|
-
return reaction.promise;
|
|
2134
|
-
});
|
|
2135
|
-
|
|
2136
|
-
OwnPromiseCapability = function () {
|
|
2137
|
-
var promise = new Internal();
|
|
2138
|
-
var state = getInternalPromiseState(promise);
|
|
2139
|
-
this.promise = promise;
|
|
2140
|
-
this.resolve = bind$1(internalResolve, state);
|
|
2141
|
-
this.reject = bind$1(internalReject, state);
|
|
2142
|
-
};
|
|
2143
|
-
|
|
2144
|
-
newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
|
|
2145
|
-
return C === PromiseConstructor || C === PromiseWrapper
|
|
2146
|
-
? new OwnPromiseCapability(C)
|
|
2147
|
-
: newGenericPromiseCapability(C);
|
|
2148
|
-
};
|
|
2149
|
-
|
|
2150
|
-
if (isCallable$1(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
|
|
2151
|
-
nativeThen = NativePromisePrototype$1.then;
|
|
2152
|
-
|
|
2153
|
-
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
2154
|
-
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
2155
|
-
defineBuiltIn$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
2156
|
-
var that = this;
|
|
2157
|
-
return new PromiseConstructor(function (resolve, reject) {
|
|
2158
|
-
call$6(nativeThen, that, resolve, reject);
|
|
2159
|
-
}).then(onFulfilled, onRejected);
|
|
2160
|
-
// https://github.com/zloirock/core-js/issues/640
|
|
2161
|
-
}, { unsafe: true });
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
// make `.constructor === Promise` work for native promise-based APIs
|
|
2165
|
-
try {
|
|
2166
|
-
delete NativePromisePrototype$1.constructor;
|
|
2167
|
-
} catch (error) { /* empty */ }
|
|
2168
|
-
|
|
2169
|
-
// make `instanceof Promise` work for native promise-based APIs
|
|
2170
|
-
if (setPrototypeOf) {
|
|
2171
|
-
setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2174
|
-
}
|
|
2175
|
-
|
|
2176
|
-
// `Promise` constructor
|
|
2177
|
-
// https://tc39.es/ecma262/#sec-promise-executor
|
|
2178
|
-
$$5({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
|
|
2179
|
-
Promise: PromiseConstructor
|
|
2180
|
-
});
|
|
2181
|
-
|
|
2182
|
-
setToStringTag(PromiseConstructor, PROMISE, false);
|
|
2183
|
-
setSpecies(PROMISE);
|
|
2184
|
-
|
|
2185
|
-
var iterators = {};
|
|
2186
|
-
|
|
2187
|
-
var wellKnownSymbol$2 = wellKnownSymbol$a;
|
|
2188
|
-
var Iterators$1 = iterators;
|
|
2189
|
-
|
|
2190
|
-
var ITERATOR$2 = wellKnownSymbol$2('iterator');
|
|
2191
|
-
var ArrayPrototype = Array.prototype;
|
|
2192
|
-
|
|
2193
|
-
// check on default Array iterator
|
|
2194
|
-
var isArrayIteratorMethod$1 = function (it) {
|
|
2195
|
-
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
2196
|
-
};
|
|
2197
|
-
|
|
2198
|
-
var classof$1 = classof$3;
|
|
2199
|
-
var getMethod$1 = getMethod$3;
|
|
2200
|
-
var isNullOrUndefined = isNullOrUndefined$4;
|
|
2201
|
-
var Iterators = iterators;
|
|
2202
|
-
var wellKnownSymbol$1 = wellKnownSymbol$a;
|
|
2203
|
-
|
|
2204
|
-
var ITERATOR$1 = wellKnownSymbol$1('iterator');
|
|
2205
|
-
|
|
2206
|
-
var getIteratorMethod$2 = function (it) {
|
|
2207
|
-
if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
|
|
2208
|
-
|| getMethod$1(it, '@@iterator')
|
|
2209
|
-
|| Iterators[classof$1(it)];
|
|
2210
|
-
};
|
|
2211
|
-
|
|
2212
|
-
var call$5 = functionCall;
|
|
2213
|
-
var aCallable$2 = aCallable$8;
|
|
2214
|
-
var anObject$5 = anObject$9;
|
|
2215
|
-
var tryToString$1 = tryToString$4;
|
|
2216
|
-
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
2217
|
-
|
|
2218
|
-
var $TypeError$1 = TypeError;
|
|
2219
|
-
|
|
2220
|
-
var getIterator$1 = function (argument, usingIterator) {
|
|
2221
|
-
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
2222
|
-
if (aCallable$2(iteratorMethod)) return anObject$5(call$5(iteratorMethod, argument));
|
|
2223
|
-
throw new $TypeError$1(tryToString$1(argument) + ' is not iterable');
|
|
2224
|
-
};
|
|
2225
|
-
|
|
2226
|
-
var call$4 = functionCall;
|
|
2227
|
-
var anObject$4 = anObject$9;
|
|
2228
|
-
var getMethod = getMethod$3;
|
|
2229
|
-
|
|
2230
|
-
var iteratorClose$1 = function (iterator, kind, value) {
|
|
2231
|
-
var innerResult, innerError;
|
|
2232
|
-
anObject$4(iterator);
|
|
29
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
2233
30
|
try {
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
}
|
|
2239
|
-
innerResult = call$4(innerResult, iterator);
|
|
2240
|
-
} catch (error) {
|
|
2241
|
-
innerError = true;
|
|
2242
|
-
innerResult = error;
|
|
31
|
+
var i = n[a](c),
|
|
32
|
+
u = i.value;
|
|
33
|
+
} catch (n) {
|
|
34
|
+
return void e(n);
|
|
2243
35
|
}
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
return
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
var
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
var $TypeError = TypeError;
|
|
2262
|
-
|
|
2263
|
-
var Result = function (stopped, result) {
|
|
2264
|
-
this.stopped = stopped;
|
|
2265
|
-
this.result = result;
|
|
2266
|
-
};
|
|
2267
|
-
|
|
2268
|
-
var ResultPrototype = Result.prototype;
|
|
2269
|
-
|
|
2270
|
-
var iterate$2 = function (iterable, unboundFunction, options) {
|
|
2271
|
-
var that = options && options.that;
|
|
2272
|
-
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
2273
|
-
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
2274
|
-
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
2275
|
-
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
2276
|
-
var fn = bind(unboundFunction, that);
|
|
2277
|
-
var iterator, iterFn, index, length, result, next, step;
|
|
2278
|
-
|
|
2279
|
-
var stop = function (condition) {
|
|
2280
|
-
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
2281
|
-
return new Result(true, condition);
|
|
2282
|
-
};
|
|
2283
|
-
|
|
2284
|
-
var callFn = function (value) {
|
|
2285
|
-
if (AS_ENTRIES) {
|
|
2286
|
-
anObject$3(value);
|
|
2287
|
-
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
2288
|
-
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
36
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
37
|
+
}
|
|
38
|
+
function _asyncToGenerator(n) {
|
|
39
|
+
return function () {
|
|
40
|
+
var t = this,
|
|
41
|
+
e = arguments;
|
|
42
|
+
return new Promise(function (r, o) {
|
|
43
|
+
var a = n.apply(t, e);
|
|
44
|
+
function _next(n) {
|
|
45
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
46
|
+
}
|
|
47
|
+
function _throw(n) {
|
|
48
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
49
|
+
}
|
|
50
|
+
_next(void 0);
|
|
51
|
+
});
|
|
2289
52
|
};
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
|
|
2298
|
-
// optimisation for array iterators
|
|
2299
|
-
if (isArrayIteratorMethod(iterFn)) {
|
|
2300
|
-
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
2301
|
-
result = callFn(iterable[index]);
|
|
2302
|
-
if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
|
|
2303
|
-
} return new Result(false);
|
|
2304
|
-
}
|
|
2305
|
-
iterator = getIterator(iterable, iterFn);
|
|
53
|
+
}
|
|
54
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
55
|
+
if (null == r) return {};
|
|
56
|
+
var t = {};
|
|
57
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
58
|
+
if (e.indexOf(n) >= 0) continue;
|
|
59
|
+
t[n] = r[n];
|
|
2306
60
|
}
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
} catch (error) {
|
|
2313
|
-
iteratorClose(iterator, 'throw', error);
|
|
2314
|
-
}
|
|
2315
|
-
if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result;
|
|
2316
|
-
} return new Result(false);
|
|
2317
|
-
};
|
|
2318
|
-
|
|
2319
|
-
var wellKnownSymbol = wellKnownSymbol$a;
|
|
2320
|
-
|
|
2321
|
-
var ITERATOR = wellKnownSymbol('iterator');
|
|
2322
|
-
var SAFE_CLOSING = false;
|
|
2323
|
-
|
|
2324
|
-
try {
|
|
2325
|
-
var called = 0;
|
|
2326
|
-
var iteratorWithReturn = {
|
|
2327
|
-
next: function () {
|
|
2328
|
-
return { done: !!called++ };
|
|
2329
|
-
},
|
|
2330
|
-
'return': function () {
|
|
2331
|
-
SAFE_CLOSING = true;
|
|
2332
|
-
}
|
|
2333
|
-
};
|
|
2334
|
-
iteratorWithReturn[ITERATOR] = function () {
|
|
2335
|
-
return this;
|
|
61
|
+
return t;
|
|
62
|
+
}
|
|
63
|
+
function _regeneratorRuntime() {
|
|
64
|
+
_regeneratorRuntime = function () {
|
|
65
|
+
return e;
|
|
2336
66
|
};
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
67
|
+
var t,
|
|
68
|
+
e = {},
|
|
69
|
+
r = Object.prototype,
|
|
70
|
+
n = r.hasOwnProperty,
|
|
71
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
72
|
+
t[e] = r.value;
|
|
73
|
+
},
|
|
74
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
75
|
+
a = i.iterator || "@@iterator",
|
|
76
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
77
|
+
u = i.toStringTag || "@@toStringTag";
|
|
78
|
+
function define(t, e, r) {
|
|
79
|
+
return Object.defineProperty(t, e, {
|
|
80
|
+
value: r,
|
|
81
|
+
enumerable: !0,
|
|
82
|
+
configurable: !0,
|
|
83
|
+
writable: !0
|
|
84
|
+
}), t[e];
|
|
85
|
+
}
|
|
2346
86
|
try {
|
|
2347
|
-
|
|
2348
|
-
|
|
87
|
+
define({}, "");
|
|
88
|
+
} catch (t) {
|
|
89
|
+
define = function (t, e, r) {
|
|
90
|
+
return t[e] = r;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function wrap(t, e, r, n) {
|
|
94
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
95
|
+
a = Object.create(i.prototype),
|
|
96
|
+
c = new Context(n || []);
|
|
97
|
+
return o(a, "_invoke", {
|
|
98
|
+
value: makeInvokeMethod(t, r, c)
|
|
99
|
+
}), a;
|
|
100
|
+
}
|
|
101
|
+
function tryCatch(t, e, r) {
|
|
102
|
+
try {
|
|
2349
103
|
return {
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
}
|
|
104
|
+
type: "normal",
|
|
105
|
+
arg: t.call(e, r)
|
|
2353
106
|
};
|
|
2354
|
-
}
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
};
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
var
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
}
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
var
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
var
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
var resolve = capability.resolve;
|
|
2383
|
-
var reject = capability.reject;
|
|
2384
|
-
var result = perform$1(function () {
|
|
2385
|
-
var $promiseResolve = aCallable$1(C.resolve);
|
|
2386
|
-
var values = [];
|
|
2387
|
-
var counter = 0;
|
|
2388
|
-
var remaining = 1;
|
|
2389
|
-
iterate$1(iterable, function (promise) {
|
|
2390
|
-
var index = counter++;
|
|
2391
|
-
var alreadyCalled = false;
|
|
2392
|
-
remaining++;
|
|
2393
|
-
call$2($promiseResolve, C, promise).then(function (value) {
|
|
2394
|
-
if (alreadyCalled) return;
|
|
2395
|
-
alreadyCalled = true;
|
|
2396
|
-
values[index] = value;
|
|
2397
|
-
--remaining || resolve(values);
|
|
2398
|
-
}, reject);
|
|
107
|
+
} catch (t) {
|
|
108
|
+
return {
|
|
109
|
+
type: "throw",
|
|
110
|
+
arg: t
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
e.wrap = wrap;
|
|
115
|
+
var h = "suspendedStart",
|
|
116
|
+
l = "suspendedYield",
|
|
117
|
+
f = "executing",
|
|
118
|
+
s = "completed",
|
|
119
|
+
y = {};
|
|
120
|
+
function Generator() {}
|
|
121
|
+
function GeneratorFunction() {}
|
|
122
|
+
function GeneratorFunctionPrototype() {}
|
|
123
|
+
var p = {};
|
|
124
|
+
define(p, a, function () {
|
|
125
|
+
return this;
|
|
126
|
+
});
|
|
127
|
+
var d = Object.getPrototypeOf,
|
|
128
|
+
v = d && d(d(values([])));
|
|
129
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
130
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
131
|
+
function defineIteratorMethods(t) {
|
|
132
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
133
|
+
define(t, e, function (t) {
|
|
134
|
+
return this._invoke(e, t);
|
|
2399
135
|
});
|
|
2400
|
-
--remaining || resolve(values);
|
|
2401
136
|
});
|
|
2402
|
-
if (result.error) reject(result.value);
|
|
2403
|
-
return capability.promise;
|
|
2404
137
|
}
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
var
|
|
2408
|
-
|
|
2409
|
-
var
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
138
|
+
function AsyncIterator(t, e) {
|
|
139
|
+
function invoke(r, o, i, a) {
|
|
140
|
+
var c = tryCatch(t[r], t, o);
|
|
141
|
+
if ("throw" !== c.type) {
|
|
142
|
+
var u = c.arg,
|
|
143
|
+
h = u.value;
|
|
144
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
145
|
+
invoke("next", t, i, a);
|
|
146
|
+
}, function (t) {
|
|
147
|
+
invoke("throw", t, i, a);
|
|
148
|
+
}) : e.resolve(h).then(function (t) {
|
|
149
|
+
u.value = t, i(u);
|
|
150
|
+
}, function (t) {
|
|
151
|
+
return invoke("throw", t, i, a);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
a(c.arg);
|
|
155
|
+
}
|
|
156
|
+
var r;
|
|
157
|
+
o(this, "_invoke", {
|
|
158
|
+
value: function (t, n) {
|
|
159
|
+
function callInvokeWithMethodAndArg() {
|
|
160
|
+
return new e(function (e, r) {
|
|
161
|
+
invoke(t, n, e, r);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
165
|
+
}
|
|
166
|
+
});
|
|
2421
167
|
}
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
if (
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
168
|
+
function makeInvokeMethod(e, r, n) {
|
|
169
|
+
var o = h;
|
|
170
|
+
return function (i, a) {
|
|
171
|
+
if (o === f) throw Error("Generator is already running");
|
|
172
|
+
if (o === s) {
|
|
173
|
+
if ("throw" === i) throw a;
|
|
174
|
+
return {
|
|
175
|
+
value: t,
|
|
176
|
+
done: !0
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
for (n.method = i, n.arg = a;;) {
|
|
180
|
+
var c = n.delegate;
|
|
181
|
+
if (c) {
|
|
182
|
+
var u = maybeInvokeDelegate(c, n);
|
|
183
|
+
if (u) {
|
|
184
|
+
if (u === y) continue;
|
|
185
|
+
return u;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
189
|
+
if (o === h) throw o = s, n.arg;
|
|
190
|
+
n.dispatchException(n.arg);
|
|
191
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
192
|
+
o = f;
|
|
193
|
+
var p = tryCatch(e, r, n);
|
|
194
|
+
if ("normal" === p.type) {
|
|
195
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
196
|
+
return {
|
|
197
|
+
value: p.arg,
|
|
198
|
+
done: n.done
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
2429
204
|
}
|
|
205
|
+
function maybeInvokeDelegate(e, r) {
|
|
206
|
+
var n = r.method,
|
|
207
|
+
o = e.iterator[n];
|
|
208
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
209
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
210
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
211
|
+
var a = i.arg;
|
|
212
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
213
|
+
}
|
|
214
|
+
function pushTryEntry(t) {
|
|
215
|
+
var e = {
|
|
216
|
+
tryLoc: t[0]
|
|
217
|
+
};
|
|
218
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
219
|
+
}
|
|
220
|
+
function resetTryEntry(t) {
|
|
221
|
+
var e = t.completion || {};
|
|
222
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
223
|
+
}
|
|
224
|
+
function Context(t) {
|
|
225
|
+
this.tryEntries = [{
|
|
226
|
+
tryLoc: "root"
|
|
227
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
228
|
+
}
|
|
229
|
+
function values(e) {
|
|
230
|
+
if (e || "" === e) {
|
|
231
|
+
var r = e[a];
|
|
232
|
+
if (r) return r.call(e);
|
|
233
|
+
if ("function" == typeof e.next) return e;
|
|
234
|
+
if (!isNaN(e.length)) {
|
|
235
|
+
var o = -1,
|
|
236
|
+
i = function next() {
|
|
237
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
238
|
+
return next.value = t, next.done = !0, next;
|
|
239
|
+
};
|
|
240
|
+
return i.next = i;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
244
|
+
}
|
|
245
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
246
|
+
value: GeneratorFunctionPrototype,
|
|
247
|
+
configurable: !0
|
|
248
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
249
|
+
value: GeneratorFunction,
|
|
250
|
+
configurable: !0
|
|
251
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
252
|
+
var e = "function" == typeof t && t.constructor;
|
|
253
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
254
|
+
}, e.mark = function (t) {
|
|
255
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
256
|
+
}, e.awrap = function (t) {
|
|
257
|
+
return {
|
|
258
|
+
__await: t
|
|
259
|
+
};
|
|
260
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
261
|
+
return this;
|
|
262
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
263
|
+
void 0 === i && (i = Promise);
|
|
264
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
265
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
266
|
+
return t.done ? t.value : a.next();
|
|
267
|
+
});
|
|
268
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
269
|
+
return this;
|
|
270
|
+
}), define(g, "toString", function () {
|
|
271
|
+
return "[object Generator]";
|
|
272
|
+
}), e.keys = function (t) {
|
|
273
|
+
var e = Object(t),
|
|
274
|
+
r = [];
|
|
275
|
+
for (var n in e) r.push(n);
|
|
276
|
+
return r.reverse(), function next() {
|
|
277
|
+
for (; r.length;) {
|
|
278
|
+
var t = r.pop();
|
|
279
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
280
|
+
}
|
|
281
|
+
return next.done = !0, next;
|
|
282
|
+
};
|
|
283
|
+
}, e.values = values, Context.prototype = {
|
|
284
|
+
constructor: Context,
|
|
285
|
+
reset: function (e) {
|
|
286
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
287
|
+
},
|
|
288
|
+
stop: function () {
|
|
289
|
+
this.done = !0;
|
|
290
|
+
var t = this.tryEntries[0].completion;
|
|
291
|
+
if ("throw" === t.type) throw t.arg;
|
|
292
|
+
return this.rval;
|
|
293
|
+
},
|
|
294
|
+
dispatchException: function (e) {
|
|
295
|
+
if (this.done) throw e;
|
|
296
|
+
var r = this;
|
|
297
|
+
function handle(n, o) {
|
|
298
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
299
|
+
}
|
|
300
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
301
|
+
var i = this.tryEntries[o],
|
|
302
|
+
a = i.completion;
|
|
303
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
304
|
+
if (i.tryLoc <= this.prev) {
|
|
305
|
+
var c = n.call(i, "catchLoc"),
|
|
306
|
+
u = n.call(i, "finallyLoc");
|
|
307
|
+
if (c && u) {
|
|
308
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
309
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
310
|
+
} else if (c) {
|
|
311
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
312
|
+
} else {
|
|
313
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
314
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
abrupt: function (t, e) {
|
|
320
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
321
|
+
var o = this.tryEntries[r];
|
|
322
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
323
|
+
var i = o;
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
328
|
+
var a = i ? i.completion : {};
|
|
329
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
330
|
+
},
|
|
331
|
+
complete: function (t, e) {
|
|
332
|
+
if ("throw" === t.type) throw t.arg;
|
|
333
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
334
|
+
},
|
|
335
|
+
finish: function (t) {
|
|
336
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
337
|
+
var r = this.tryEntries[e];
|
|
338
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
catch: function (t) {
|
|
342
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
343
|
+
var r = this.tryEntries[e];
|
|
344
|
+
if (r.tryLoc === t) {
|
|
345
|
+
var n = r.completion;
|
|
346
|
+
if ("throw" === n.type) {
|
|
347
|
+
var o = n.arg;
|
|
348
|
+
resetTryEntry(r);
|
|
349
|
+
}
|
|
350
|
+
return o;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
throw Error("illegal catch attempt");
|
|
354
|
+
},
|
|
355
|
+
delegateYield: function (e, r, n) {
|
|
356
|
+
return this.delegate = {
|
|
357
|
+
iterator: values(e),
|
|
358
|
+
resultName: r,
|
|
359
|
+
nextLoc: n
|
|
360
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
361
|
+
}
|
|
362
|
+
}, e;
|
|
2430
363
|
}
|
|
2431
364
|
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
365
|
+
/* *
|
|
366
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
367
|
+
* you may not use this file except in compliance with the License.
|
|
368
|
+
* You may obtain a copy of the License at
|
|
369
|
+
*
|
|
370
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
371
|
+
*
|
|
372
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
373
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
374
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
375
|
+
* See the License for the specific language governing permissions and
|
|
376
|
+
* limitations under the License.
|
|
377
|
+
*
|
|
378
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
379
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
380
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
381
|
+
* */
|
|
382
|
+
var SNACKBAR_NAMESPACE = 'snackbar';
|
|
383
|
+
var WORKSPACE_NAMESPACE = 'workspace';
|
|
384
|
+
var WARN_NAMESPACE = 'warn';
|
|
385
|
+
var LAYER_SELECT_NAMESPACE = 'layerselect';
|
|
386
|
+
var AUTH_NAMESPACE = 'auth';
|
|
387
|
+
var useSnackbarTranslation = function useSnackbarTranslation() {
|
|
388
|
+
return useTranslation([SNACKBAR_NAMESPACE, WORKSPACE_NAMESPACE, WARN_NAMESPACE, LAYER_SELECT_NAMESPACE, AUTH_NAMESPACE], {
|
|
389
|
+
nsMode: 'fallback'
|
|
390
|
+
});
|
|
391
|
+
};
|
|
2439
392
|
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
393
|
+
/* *
|
|
394
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
395
|
+
* you may not use this file except in compliance with the License.
|
|
396
|
+
* You may obtain a copy of the License at
|
|
397
|
+
*
|
|
398
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
399
|
+
*
|
|
400
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
401
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
402
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
403
|
+
* See the License for the specific language governing permissions and
|
|
404
|
+
* limitations under the License.
|
|
405
|
+
*
|
|
406
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
407
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
408
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
409
|
+
* */
|
|
410
|
+
var snackbarAdapter = createEntityAdapter();
|
|
411
|
+
var initialState = snackbarAdapter.getInitialState();
|
|
412
|
+
var slice = createSlice({
|
|
413
|
+
initialState: initialState,
|
|
414
|
+
name: 'snackbar',
|
|
415
|
+
reducers: {
|
|
416
|
+
// To open the snackbar call this action
|
|
417
|
+
openSnackbar: function openSnackbar(
|
|
418
|
+
// eslint-disable-next-line no-unused-vars
|
|
419
|
+
draft,
|
|
420
|
+
// eslint-disable-next-line no-unused-vars
|
|
421
|
+
action) {},
|
|
422
|
+
// triggerOpenSnackbarByListener is triggered by the listener to open the snackbar after the current snackbars have all been closed
|
|
423
|
+
// DO NOT CALL THIS ACTION DIRECTLY!
|
|
424
|
+
triggerOpenSnackbarByListener: function triggerOpenSnackbarByListener(draft, action) {
|
|
425
|
+
var snackbarContent = action.payload.snackbarContent;
|
|
426
|
+
// Ensure we have an id before proceeding
|
|
427
|
+
if (snackbarContent.id === undefined) {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
snackbarAdapter.setOne(draft, snackbarContent);
|
|
431
|
+
},
|
|
432
|
+
closeSnackbar: function closeSnackbar(draft) {
|
|
433
|
+
snackbarAdapter.removeAll(draft);
|
|
434
|
+
}
|
|
2455
435
|
}
|
|
2456
436
|
});
|
|
437
|
+
var reducer = slice.reducer;
|
|
438
|
+
var snackbarActions = slice.actions;
|
|
2457
439
|
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
440
|
+
/* *
|
|
441
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
442
|
+
* you may not use this file except in compliance with the License.
|
|
443
|
+
* You may obtain a copy of the License at
|
|
444
|
+
*
|
|
445
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
446
|
+
*
|
|
447
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
448
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
449
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
450
|
+
* See the License for the specific language governing permissions and
|
|
451
|
+
* limitations under the License.
|
|
452
|
+
*
|
|
453
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
454
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
455
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
456
|
+
* */
|
|
457
|
+
var getSnackbarStore = function getSnackbarStore(store) {
|
|
458
|
+
if (store && store.snackbar) {
|
|
459
|
+
return store.snackbar;
|
|
2470
460
|
}
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
var anObject$2 = anObject$9;
|
|
2474
|
-
var isObject = isObject$9;
|
|
2475
|
-
var newPromiseCapability = newPromiseCapability$2;
|
|
2476
|
-
|
|
2477
|
-
var promiseResolve$1 = function (C, x) {
|
|
2478
|
-
anObject$2(C);
|
|
2479
|
-
if (isObject(x) && x.constructor === C) return x;
|
|
2480
|
-
var promiseCapability = newPromiseCapability.f(C);
|
|
2481
|
-
var resolve = promiseCapability.resolve;
|
|
2482
|
-
resolve(x);
|
|
2483
|
-
return promiseCapability.promise;
|
|
461
|
+
return null;
|
|
2484
462
|
};
|
|
2485
|
-
|
|
2486
|
-
var $
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
$({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
2496
|
-
resolve: function resolve(x) {
|
|
2497
|
-
return promiseResolve(this, x);
|
|
2498
|
-
}
|
|
463
|
+
var _snackbarAdapter$getS = snackbarAdapter.getSelectors(function (state) {
|
|
464
|
+
var _state$snackbar;
|
|
465
|
+
return (_state$snackbar = state == null ? void 0 : state.snackbar) != null ? _state$snackbar : {
|
|
466
|
+
entities: {},
|
|
467
|
+
ids: []
|
|
468
|
+
};
|
|
469
|
+
}),
|
|
470
|
+
getCurrentSnackbarMessages = _snackbarAdapter$getS.selectAll;
|
|
471
|
+
var getFirstSnackbarMessage = createSelector(getCurrentSnackbarMessages, function (currentMessages) {
|
|
472
|
+
return currentMessages.length > 0 ? currentMessages[0] : undefined;
|
|
2499
473
|
});
|
|
2500
474
|
|
|
2501
|
-
var
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
return $String(argument);
|
|
2508
|
-
};
|
|
2509
|
-
|
|
2510
|
-
var anObject$1 = anObject$9;
|
|
2511
|
-
|
|
2512
|
-
// `RegExp.prototype.flags` getter implementation
|
|
2513
|
-
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
2514
|
-
var regexpFlags = function () {
|
|
2515
|
-
var that = anObject$1(this);
|
|
2516
|
-
var result = '';
|
|
2517
|
-
if (that.hasIndices) result += 'd';
|
|
2518
|
-
if (that.global) result += 'g';
|
|
2519
|
-
if (that.ignoreCase) result += 'i';
|
|
2520
|
-
if (that.multiline) result += 'm';
|
|
2521
|
-
if (that.dotAll) result += 's';
|
|
2522
|
-
if (that.unicode) result += 'u';
|
|
2523
|
-
if (that.unicodeSets) result += 'v';
|
|
2524
|
-
if (that.sticky) result += 'y';
|
|
2525
|
-
return result;
|
|
2526
|
-
};
|
|
2527
|
-
|
|
2528
|
-
var call = functionCall;
|
|
2529
|
-
var hasOwn = hasOwnProperty_1;
|
|
2530
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
2531
|
-
var regExpFlags = regexpFlags;
|
|
2532
|
-
|
|
2533
|
-
var RegExpPrototype$1 = RegExp.prototype;
|
|
2534
|
-
|
|
2535
|
-
var regexpGetFlags = function (R) {
|
|
2536
|
-
var flags = R.flags;
|
|
2537
|
-
return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
|
|
2538
|
-
? call(regExpFlags, R) : flags;
|
|
2539
|
-
};
|
|
2540
|
-
|
|
2541
|
-
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
2542
|
-
var defineBuiltIn = defineBuiltIn$4;
|
|
2543
|
-
var anObject = anObject$9;
|
|
2544
|
-
var $toString = toString;
|
|
2545
|
-
var fails = fails$c;
|
|
2546
|
-
var getRegExpFlags = regexpGetFlags;
|
|
2547
|
-
|
|
2548
|
-
var TO_STRING = 'toString';
|
|
2549
|
-
var RegExpPrototype = RegExp.prototype;
|
|
2550
|
-
var nativeToString = RegExpPrototype[TO_STRING];
|
|
475
|
+
var selectors = /*#__PURE__*/Object.freeze({
|
|
476
|
+
__proto__: null,
|
|
477
|
+
getCurrentSnackbarMessages: getCurrentSnackbarMessages,
|
|
478
|
+
getFirstSnackbarMessage: getFirstSnackbarMessage,
|
|
479
|
+
getSnackbarStore: getSnackbarStore
|
|
480
|
+
});
|
|
2551
481
|
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
482
|
+
/* *
|
|
483
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
484
|
+
* you may not use this file except in compliance with the License.
|
|
485
|
+
* You may obtain a copy of the License at
|
|
486
|
+
*
|
|
487
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
488
|
+
*
|
|
489
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
490
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
491
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
492
|
+
* See the License for the specific language governing permissions and
|
|
493
|
+
* limitations under the License.
|
|
494
|
+
*
|
|
495
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
496
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
497
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
498
|
+
* */
|
|
499
|
+
var SnackbarMessageType;
|
|
500
|
+
(function (SnackbarMessageType) {
|
|
501
|
+
SnackbarMessageType["TRANSLATABLE_MESSAGE"] = "TRANSLATABLE_MESSAGE";
|
|
502
|
+
SnackbarMessageType["VERBATIM_MESSAGE"] = "VERBATIM_MESSAGE";
|
|
503
|
+
})(SnackbarMessageType || (SnackbarMessageType = {}));
|
|
2555
504
|
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
var R = anObject(this);
|
|
2561
|
-
var pattern = $toString(R.source);
|
|
2562
|
-
var flags = $toString(getRegExpFlags(R));
|
|
2563
|
-
return '/' + pattern + '/' + flags;
|
|
2564
|
-
}, { unsafe: true });
|
|
2565
|
-
}
|
|
505
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
506
|
+
__proto__: null,
|
|
507
|
+
get SnackbarMessageType () { return SnackbarMessageType; }
|
|
508
|
+
});
|
|
2566
509
|
|
|
2567
|
-
|
|
2568
|
-
|
|
510
|
+
var hideTime = 4000;
|
|
511
|
+
var snackbarListener = createListenerMiddleware();
|
|
2569
512
|
snackbarListener.startListening({
|
|
2570
513
|
actionCreator: snackbarActions.openSnackbar,
|
|
2571
|
-
effect:
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
514
|
+
effect: function () {
|
|
515
|
+
var _effect = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, listenerApi) {
|
|
516
|
+
var payload, currentSnackbarMessages, id, currentSnackbarMessagesOpen;
|
|
517
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
518
|
+
while (1) switch (_context.prev = _context.next) {
|
|
519
|
+
case 0:
|
|
520
|
+
payload = _ref.payload;
|
|
521
|
+
listenerApi.cancelActiveListeners();
|
|
522
|
+
currentSnackbarMessages = getCurrentSnackbarMessages(listenerApi.getState()); // If there are currently opened snackbars we need to close these first
|
|
523
|
+
if (currentSnackbarMessages.length) {
|
|
524
|
+
listenerApi.dispatch(snackbarActions.closeSnackbar());
|
|
525
|
+
}
|
|
526
|
+
// Generate a unique id
|
|
527
|
+
id = "snackbar" + Date.now().toString();
|
|
528
|
+
listenerApi.dispatch(snackbarActions.triggerOpenSnackbarByListener({
|
|
529
|
+
snackbarContent: {
|
|
530
|
+
message: payload,
|
|
531
|
+
id: id
|
|
532
|
+
}
|
|
533
|
+
}));
|
|
534
|
+
// If no new snackbar is triggered cancelling this listener, hide the snackbar after X seconds
|
|
535
|
+
_context.next = 8;
|
|
536
|
+
return listenerApi.delay(hideTime);
|
|
537
|
+
case 8:
|
|
538
|
+
currentSnackbarMessagesOpen = getCurrentSnackbarMessages(listenerApi.getState());
|
|
539
|
+
if (currentSnackbarMessagesOpen.length) {
|
|
540
|
+
listenerApi.dispatch(snackbarActions.closeSnackbar());
|
|
541
|
+
}
|
|
542
|
+
case 10:
|
|
543
|
+
case "end":
|
|
544
|
+
return _context.stop();
|
|
545
|
+
}
|
|
546
|
+
}, _callee);
|
|
2587
547
|
}));
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
const currentSnackbarMessagesOpen = getCurrentSnackbarMessages(listenerApi.getState());
|
|
2591
|
-
if (currentSnackbarMessagesOpen.length) {
|
|
2592
|
-
listenerApi.dispatch(snackbarActions.closeSnackbar());
|
|
548
|
+
function effect(_x, _x2) {
|
|
549
|
+
return _effect.apply(this, arguments);
|
|
2593
550
|
}
|
|
2594
|
-
|
|
551
|
+
return effect;
|
|
552
|
+
}()
|
|
2595
553
|
});
|
|
2596
554
|
|
|
2597
555
|
/* *
|
|
@@ -2611,7 +569,7 @@ snackbarListener.startListening({
|
|
|
2611
569
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2612
570
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2613
571
|
* */
|
|
2614
|
-
|
|
572
|
+
var snackbarModuleConfig = {
|
|
2615
573
|
id: 'snackbar-module',
|
|
2616
574
|
reducersMap: {
|
|
2617
575
|
snackbar: reducer
|
|
@@ -2619,26 +577,23 @@ const snackbarModuleConfig = {
|
|
|
2619
577
|
middlewares: [snackbarListener.middleware]
|
|
2620
578
|
};
|
|
2621
579
|
|
|
2622
|
-
|
|
2623
|
-
|
|
580
|
+
var _excluded = ["children", "isOpen", "onCloseSnackbar", "id", "snackbarMessage"];
|
|
581
|
+
var getMessageString = function getMessageString(t, snackbarMessage) {
|
|
2624
582
|
if (!snackbarMessage) {
|
|
2625
583
|
return '';
|
|
2626
584
|
}
|
|
2627
585
|
return snackbarMessage.type === SnackbarMessageType.TRANSLATABLE_MESSAGE ? t(snackbarMessage.key, snackbarMessage.params) : snackbarMessage.message;
|
|
2628
586
|
};
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
snackbarMessage
|
|
2636
|
-
} = _ref,
|
|
587
|
+
var SnackbarWrapper = function SnackbarWrapper(_ref) {
|
|
588
|
+
var children = _ref.children,
|
|
589
|
+
isOpen = _ref.isOpen,
|
|
590
|
+
onCloseSnackbar = _ref.onCloseSnackbar,
|
|
591
|
+
id = _ref.id,
|
|
592
|
+
snackbarMessage = _ref.snackbarMessage,
|
|
2637
593
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
2638
|
-
|
|
2639
|
-
t
|
|
2640
|
-
|
|
2641
|
-
const messageString = getMessageString(t, snackbarMessage);
|
|
594
|
+
var _useSnackbarTranslati = useSnackbarTranslation(),
|
|
595
|
+
t = _useSnackbarTranslati.t;
|
|
596
|
+
var messageString = getMessageString(t, snackbarMessage);
|
|
2642
597
|
return jsxs(Fragment, {
|
|
2643
598
|
children: [children, jsx(Snackbar, Object.assign({
|
|
2644
599
|
message: messageString,
|
|
@@ -2670,12 +625,14 @@ const SnackbarWrapper = _ref => {
|
|
|
2670
625
|
});
|
|
2671
626
|
};
|
|
2672
627
|
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
628
|
+
var SnackbarWrapperConnect = withEggs([snackbarModuleConfig])(function (props) {
|
|
629
|
+
var dispatch = useDispatch();
|
|
630
|
+
var onCloseSnackbar = function onCloseSnackbar() {
|
|
2676
631
|
dispatch(snackbarActions.closeSnackbar());
|
|
2677
632
|
};
|
|
2678
|
-
|
|
633
|
+
var currentSnackbarMessage = useSelector(function (store) {
|
|
634
|
+
return getFirstSnackbarMessage(store);
|
|
635
|
+
});
|
|
2679
636
|
return jsx(SnackbarWrapper, Object.assign({
|
|
2680
637
|
isOpen: !!currentSnackbarMessage,
|
|
2681
638
|
onCloseSnackbar: onCloseSnackbar,
|