@trackunit/react-core-hooks 0.2.13 → 0.2.15

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.js CHANGED
@@ -1,2172 +1,158 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import React__default, { useContext, createContext } from 'react';
3
+ import React__default, { createContext, useContext } from 'react';
4
4
  import { useFlags } from 'launchdarkly-react-client-sdk';
5
5
  import { NavigationRuntime, AssetRuntime, CustomFieldRuntime, RestRuntime } from '@trackunit/iris-app-runtime-core';
6
6
  import { useLocation } from 'react-router-dom';
7
7
 
8
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
-
10
- var check = function (it) {
11
- return it && it.Math == Math && it;
12
- };
13
-
14
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
15
- var global$e =
16
- // eslint-disable-next-line es/no-global-this -- safe
17
- check(typeof globalThis == 'object' && globalThis) ||
18
- check(typeof window == 'object' && window) ||
19
- // eslint-disable-next-line no-restricted-globals -- safe
20
- check(typeof self == 'object' && self) ||
21
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
22
- // eslint-disable-next-line no-new-func -- fallback
23
- (function () { return this; })() || Function('return this')();
24
-
25
- var objectGetOwnPropertyDescriptor = {};
26
-
27
- var fails$f = function (exec) {
28
- try {
29
- return !!exec();
30
- } catch (error) {
31
- return true;
32
- }
33
- };
34
-
35
- var fails$e = fails$f;
36
-
37
- // Detect IE8's incomplete defineProperty implementation
38
- var descriptors = !fails$e(function () {
39
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
40
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
41
- });
42
-
43
- var fails$d = fails$f;
44
-
45
- var functionBindNative = !fails$d(function () {
46
- // eslint-disable-next-line es/no-function-prototype-bind -- safe
47
- var test = (function () { /* empty */ }).bind();
48
- // eslint-disable-next-line no-prototype-builtins -- safe
49
- return typeof test != 'function' || test.hasOwnProperty('prototype');
50
- });
51
-
52
- var NATIVE_BIND$1 = functionBindNative;
53
-
54
- var call$9 = Function.prototype.call;
55
-
56
- var functionCall = NATIVE_BIND$1 ? call$9.bind(call$9) : function () {
57
- return call$9.apply(call$9, arguments);
58
- };
59
-
60
- var objectPropertyIsEnumerable = {};
61
-
62
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
63
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
64
- var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
65
-
66
- // Nashorn ~ JDK8 bug
67
- var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
68
-
69
- // `Object.prototype.propertyIsEnumerable` method implementation
70
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
71
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
72
- var descriptor = getOwnPropertyDescriptor$1(this, V);
73
- return !!descriptor && descriptor.enumerable;
74
- } : $propertyIsEnumerable;
75
-
76
- var createPropertyDescriptor$3 = function (bitmap, value) {
77
- return {
78
- enumerable: !(bitmap & 1),
79
- configurable: !(bitmap & 2),
80
- writable: !(bitmap & 4),
81
- value: value
82
- };
83
- };
84
-
85
- var NATIVE_BIND = functionBindNative;
86
-
87
- var FunctionPrototype$1 = Function.prototype;
88
- var call$8 = FunctionPrototype$1.call;
89
- var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$8, call$8);
90
-
91
- var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
92
- return function () {
93
- return call$8.apply(fn, arguments);
94
- };
95
- };
96
-
97
- var uncurryThis$c = functionUncurryThis;
98
-
99
- var toString$4 = uncurryThis$c({}.toString);
100
- var stringSlice$1 = uncurryThis$c(''.slice);
101
-
102
- var classofRaw$2 = function (it) {
103
- return stringSlice$1(toString$4(it), 8, -1);
104
- };
105
-
106
- var uncurryThis$b = functionUncurryThis;
107
- var fails$c = fails$f;
108
- var classof$3 = classofRaw$2;
109
-
110
- var $Object$4 = Object;
111
- var split = uncurryThis$b(''.split);
112
-
113
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
114
- var indexedObject = fails$c(function () {
115
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
116
- // eslint-disable-next-line no-prototype-builtins -- safe
117
- return !$Object$4('z').propertyIsEnumerable(0);
118
- }) ? function (it) {
119
- return classof$3(it) == 'String' ? split(it, '') : $Object$4(it);
120
- } : $Object$4;
121
-
122
- // we can't use just `it == null` since of `document.all` special case
123
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
124
- var isNullOrUndefined$3 = function (it) {
125
- return it === null || it === undefined;
126
- };
127
-
128
- var isNullOrUndefined$2 = isNullOrUndefined$3;
129
-
130
- var $TypeError$7 = TypeError;
131
-
132
- // `RequireObjectCoercible` abstract operation
133
- // https://tc39.es/ecma262/#sec-requireobjectcoercible
134
- var requireObjectCoercible$3 = function (it) {
135
- if (isNullOrUndefined$2(it)) throw $TypeError$7("Can't call method on " + it);
136
- return it;
137
- };
138
-
139
- // toObject with fallback for non-array-like ES3 strings
140
- var IndexedObject$1 = indexedObject;
141
- var requireObjectCoercible$2 = requireObjectCoercible$3;
142
-
143
- var toIndexedObject$5 = function (it) {
144
- return IndexedObject$1(requireObjectCoercible$2(it));
145
- };
146
-
147
- var documentAll$2 = typeof document == 'object' && document.all;
148
-
149
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
150
- var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
151
-
152
- var documentAll_1 = {
153
- all: documentAll$2,
154
- IS_HTMLDDA: IS_HTMLDDA
155
- };
156
-
157
- var $documentAll$1 = documentAll_1;
158
-
159
- var documentAll$1 = $documentAll$1.all;
160
-
161
- // `IsCallable` abstract operation
162
- // https://tc39.es/ecma262/#sec-iscallable
163
- var isCallable$g = $documentAll$1.IS_HTMLDDA ? function (argument) {
164
- return typeof argument == 'function' || argument === documentAll$1;
165
- } : function (argument) {
166
- return typeof argument == 'function';
167
- };
168
-
169
- var isCallable$f = isCallable$g;
170
- var $documentAll = documentAll_1;
171
-
172
- var documentAll = $documentAll.all;
173
-
174
- var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
175
- return typeof it == 'object' ? it !== null : isCallable$f(it) || it === documentAll;
176
- } : function (it) {
177
- return typeof it == 'object' ? it !== null : isCallable$f(it);
178
- };
179
-
180
- var global$d = global$e;
181
- var isCallable$e = isCallable$g;
182
-
183
- var aFunction = function (argument) {
184
- return isCallable$e(argument) ? argument : undefined;
185
- };
186
-
187
- var getBuiltIn$4 = function (namespace, method) {
188
- return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
189
- };
190
-
191
- var uncurryThis$a = functionUncurryThis;
192
-
193
- var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
194
-
195
- var getBuiltIn$3 = getBuiltIn$4;
196
-
197
- var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
198
-
199
- var global$c = global$e;
200
- var userAgent = engineUserAgent;
201
-
202
- var process = global$c.process;
203
- var Deno = global$c.Deno;
204
- var versions = process && process.versions || Deno && Deno.version;
205
- var v8 = versions && versions.v8;
206
- var match, version;
207
-
208
- if (v8) {
209
- match = v8.split('.');
210
- // in old Chrome, versions of V8 isn't V8 = Chrome / 10
211
- // but their correct versions are not interesting for us
212
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
213
- }
214
-
215
- // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
216
- // so check `userAgent` even if `.v8` exists, but 0
217
- if (!version && userAgent) {
218
- match = userAgent.match(/Edge\/(\d+)/);
219
- if (!match || match[1] >= 74) {
220
- match = userAgent.match(/Chrome\/(\d+)/);
221
- if (match) version = +match[1];
222
- }
223
- }
224
-
225
- var engineV8Version = version;
226
-
227
- /* eslint-disable es/no-symbol -- required for testing */
228
-
229
- var V8_VERSION = engineV8Version;
230
- var fails$b = fails$f;
231
-
232
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
233
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$b(function () {
234
- var symbol = Symbol();
235
- // Chrome 38 Symbol has incorrect toString conversion
236
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
237
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
238
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
239
- !Symbol.sham && V8_VERSION && V8_VERSION < 41;
240
- });
241
-
242
- /* eslint-disable es/no-symbol -- required for testing */
243
-
244
- var NATIVE_SYMBOL$1 = symbolConstructorDetection;
245
-
246
- var useSymbolAsUid = NATIVE_SYMBOL$1
247
- && !Symbol.sham
248
- && typeof Symbol.iterator == 'symbol';
249
-
250
- var getBuiltIn$2 = getBuiltIn$4;
251
- var isCallable$d = isCallable$g;
252
- var isPrototypeOf = objectIsPrototypeOf;
253
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
254
-
255
- var $Object$3 = Object;
256
-
257
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
258
- return typeof it == 'symbol';
259
- } : function (it) {
260
- var $Symbol = getBuiltIn$2('Symbol');
261
- return isCallable$d($Symbol) && isPrototypeOf($Symbol.prototype, $Object$3(it));
262
- };
263
-
264
- var $String$3 = String;
265
-
266
- var tryToString$1 = function (argument) {
267
- try {
268
- return $String$3(argument);
269
- } catch (error) {
270
- return 'Object';
271
- }
272
- };
273
-
274
- var isCallable$c = isCallable$g;
275
- var tryToString = tryToString$1;
276
-
277
- var $TypeError$6 = TypeError;
278
-
279
- // `Assert: IsCallable(argument) is true`
280
- var aCallable$1 = function (argument) {
281
- if (isCallable$c(argument)) return argument;
282
- throw $TypeError$6(tryToString(argument) + ' is not a function');
283
- };
284
-
285
- var aCallable = aCallable$1;
286
- var isNullOrUndefined$1 = isNullOrUndefined$3;
287
-
288
- // `GetMethod` abstract operation
289
- // https://tc39.es/ecma262/#sec-getmethod
290
- var getMethod$2 = function (V, P) {
291
- var func = V[P];
292
- return isNullOrUndefined$1(func) ? undefined : aCallable(func);
293
- };
294
-
295
- var call$7 = functionCall;
296
- var isCallable$b = isCallable$g;
297
- var isObject$5 = isObject$6;
298
-
299
- var $TypeError$5 = TypeError;
300
-
301
- // `OrdinaryToPrimitive` abstract operation
302
- // https://tc39.es/ecma262/#sec-ordinarytoprimitive
303
- var ordinaryToPrimitive$1 = function (input, pref) {
304
- var fn, val;
305
- if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$7(fn, input))) return val;
306
- if (isCallable$b(fn = input.valueOf) && !isObject$5(val = call$7(fn, input))) return val;
307
- if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$7(fn, input))) return val;
308
- throw $TypeError$5("Can't convert object to primitive value");
309
- };
310
-
311
- var shared$4 = {exports: {}};
312
-
313
- var global$b = global$e;
314
-
315
- // eslint-disable-next-line es/no-object-defineproperty -- safe
316
- var defineProperty$5 = Object.defineProperty;
317
-
318
- var defineGlobalProperty$3 = function (key, value) {
319
- try {
320
- defineProperty$5(global$b, key, { value: value, configurable: true, writable: true });
321
- } catch (error) {
322
- global$b[key] = value;
323
- } return value;
324
- };
325
-
326
- var global$a = global$e;
327
- var defineGlobalProperty$2 = defineGlobalProperty$3;
328
-
329
- var SHARED = '__core-js_shared__';
330
- var store$3 = global$a[SHARED] || defineGlobalProperty$2(SHARED, {});
331
-
332
- var sharedStore = store$3;
333
-
334
- var store$2 = sharedStore;
335
-
336
- (shared$4.exports = function (key, value) {
337
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
338
- })('versions', []).push({
339
- version: '3.26.1',
340
- mode: 'global',
341
- copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
342
- license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
343
- source: 'https://github.com/zloirock/core-js'
344
- });
345
-
346
- var requireObjectCoercible$1 = requireObjectCoercible$3;
347
-
348
- var $Object$2 = Object;
349
-
350
- // `ToObject` abstract operation
351
- // https://tc39.es/ecma262/#sec-toobject
352
- var toObject$3 = function (argument) {
353
- return $Object$2(requireObjectCoercible$1(argument));
354
- };
355
-
356
- var uncurryThis$9 = functionUncurryThis;
357
- var toObject$2 = toObject$3;
358
-
359
- var hasOwnProperty = uncurryThis$9({}.hasOwnProperty);
360
-
361
- // `HasOwnProperty` abstract operation
362
- // https://tc39.es/ecma262/#sec-hasownproperty
363
- // eslint-disable-next-line es/no-object-hasown -- safe
364
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
365
- return hasOwnProperty(toObject$2(it), key);
366
- };
367
-
368
- var uncurryThis$8 = functionUncurryThis;
369
-
370
- var id = 0;
371
- var postfix = Math.random();
372
- var toString$3 = uncurryThis$8(1.0.toString);
373
-
374
- var uid$2 = function (key) {
375
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
376
- };
377
-
378
- var global$9 = global$e;
379
- var shared$3 = shared$4.exports;
380
- var hasOwn$8 = hasOwnProperty_1;
381
- var uid$1 = uid$2;
382
- var NATIVE_SYMBOL = symbolConstructorDetection;
383
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
384
-
385
- var WellKnownSymbolsStore = shared$3('wks');
386
- var Symbol$1 = global$9.Symbol;
387
- var symbolFor = Symbol$1 && Symbol$1['for'];
388
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
389
-
390
- var wellKnownSymbol$9 = function (name) {
391
- if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
392
- var description = 'Symbol.' + name;
393
- if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
394
- WellKnownSymbolsStore[name] = Symbol$1[name];
395
- } else if (USE_SYMBOL_AS_UID && symbolFor) {
396
- WellKnownSymbolsStore[name] = symbolFor(description);
397
- } else {
398
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
399
- }
400
- } return WellKnownSymbolsStore[name];
401
- };
402
-
403
- var call$6 = functionCall;
404
- var isObject$4 = isObject$6;
405
- var isSymbol$1 = isSymbol$2;
406
- var getMethod$1 = getMethod$2;
407
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
408
- var wellKnownSymbol$8 = wellKnownSymbol$9;
409
-
410
- var $TypeError$4 = TypeError;
411
- var TO_PRIMITIVE = wellKnownSymbol$8('toPrimitive');
412
-
413
- // `ToPrimitive` abstract operation
414
- // https://tc39.es/ecma262/#sec-toprimitive
415
- var toPrimitive$1 = function (input, pref) {
416
- if (!isObject$4(input) || isSymbol$1(input)) return input;
417
- var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
418
- var result;
419
- if (exoticToPrim) {
420
- if (pref === undefined) pref = 'default';
421
- result = call$6(exoticToPrim, input, pref);
422
- if (!isObject$4(result) || isSymbol$1(result)) return result;
423
- throw $TypeError$4("Can't convert object to primitive value");
424
- }
425
- if (pref === undefined) pref = 'number';
426
- return ordinaryToPrimitive(input, pref);
427
- };
428
-
429
- var toPrimitive = toPrimitive$1;
430
- var isSymbol = isSymbol$2;
431
-
432
- // `ToPropertyKey` abstract operation
433
- // https://tc39.es/ecma262/#sec-topropertykey
434
- var toPropertyKey$2 = function (argument) {
435
- var key = toPrimitive(argument, 'string');
436
- return isSymbol(key) ? key : key + '';
437
- };
438
-
439
- var global$8 = global$e;
440
- var isObject$3 = isObject$6;
441
-
442
- var document$1 = global$8.document;
443
- // typeof document.createElement is 'object' in old IE
444
- var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
445
-
446
- var documentCreateElement$2 = function (it) {
447
- return EXISTS$1 ? document$1.createElement(it) : {};
448
- };
449
-
450
- var DESCRIPTORS$9 = descriptors;
451
- var fails$a = fails$f;
452
- var createElement = documentCreateElement$2;
453
-
454
- // Thanks to IE8 for its funny defineProperty
455
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$a(function () {
456
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
457
- return Object.defineProperty(createElement('div'), 'a', {
458
- get: function () { return 7; }
459
- }).a != 7;
460
- });
461
-
462
- var DESCRIPTORS$8 = descriptors;
463
- var call$5 = functionCall;
464
- var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
465
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
466
- var toIndexedObject$4 = toIndexedObject$5;
467
- var toPropertyKey$1 = toPropertyKey$2;
468
- var hasOwn$7 = hasOwnProperty_1;
469
- var IE8_DOM_DEFINE$1 = ie8DomDefine;
470
-
471
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
472
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
473
-
474
- // `Object.getOwnPropertyDescriptor` method
475
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
476
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
477
- O = toIndexedObject$4(O);
478
- P = toPropertyKey$1(P);
479
- if (IE8_DOM_DEFINE$1) try {
480
- return $getOwnPropertyDescriptor$1(O, P);
481
- } catch (error) { /* empty */ }
482
- if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$5(propertyIsEnumerableModule$1.f, O, P), O[P]);
483
- };
484
-
485
- var objectDefineProperty = {};
486
-
487
- var DESCRIPTORS$7 = descriptors;
488
- var fails$9 = fails$f;
489
-
490
- // V8 ~ Chrome 36-
491
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
492
- var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$9(function () {
493
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
494
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
495
- value: 42,
496
- writable: false
497
- }).prototype != 42;
498
- });
499
-
500
- var isObject$2 = isObject$6;
501
-
502
- var $String$2 = String;
503
- var $TypeError$3 = TypeError;
504
-
505
- // `Assert: Type(argument) is Object`
506
- var anObject$8 = function (argument) {
507
- if (isObject$2(argument)) return argument;
508
- throw $TypeError$3($String$2(argument) + ' is not an object');
509
- };
510
-
511
- var DESCRIPTORS$6 = descriptors;
512
- var IE8_DOM_DEFINE = ie8DomDefine;
513
- var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
514
- var anObject$7 = anObject$8;
515
- var toPropertyKey = toPropertyKey$2;
516
-
517
- var $TypeError$2 = TypeError;
518
- // eslint-disable-next-line es/no-object-defineproperty -- safe
519
- var $defineProperty = Object.defineProperty;
520
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
521
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
522
- var ENUMERABLE = 'enumerable';
523
- var CONFIGURABLE$1 = 'configurable';
524
- var WRITABLE = 'writable';
525
-
526
- // `Object.defineProperty` method
527
- // https://tc39.es/ecma262/#sec-object.defineproperty
528
- objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
529
- anObject$7(O);
530
- P = toPropertyKey(P);
531
- anObject$7(Attributes);
532
- if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
533
- var current = $getOwnPropertyDescriptor(O, P);
534
- if (current && current[WRITABLE]) {
535
- O[P] = Attributes.value;
536
- Attributes = {
537
- configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
538
- enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
539
- writable: false
540
- };
541
- }
542
- } return $defineProperty(O, P, Attributes);
543
- } : $defineProperty : function defineProperty(O, P, Attributes) {
544
- anObject$7(O);
545
- P = toPropertyKey(P);
546
- anObject$7(Attributes);
547
- if (IE8_DOM_DEFINE) try {
548
- return $defineProperty(O, P, Attributes);
549
- } catch (error) { /* empty */ }
550
- if ('get' in Attributes || 'set' in Attributes) throw $TypeError$2('Accessors not supported');
551
- if ('value' in Attributes) O[P] = Attributes.value;
552
- return O;
553
- };
554
-
555
- var DESCRIPTORS$5 = descriptors;
556
- var definePropertyModule$3 = objectDefineProperty;
557
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
558
-
559
- var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
560
- return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
561
- } : function (object, key, value) {
562
- object[key] = value;
563
- return object;
564
- };
565
-
566
- var makeBuiltIn$2 = {exports: {}};
567
-
568
- var DESCRIPTORS$4 = descriptors;
569
- var hasOwn$6 = hasOwnProperty_1;
570
-
571
- var FunctionPrototype = Function.prototype;
572
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
573
- var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
574
-
575
- var EXISTS = hasOwn$6(FunctionPrototype, 'name');
576
- // additional protection from minified / mangled / dropped function names
577
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
578
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
579
-
580
- var functionName = {
581
- EXISTS: EXISTS,
582
- PROPER: PROPER,
583
- CONFIGURABLE: CONFIGURABLE
584
- };
585
-
586
- var uncurryThis$7 = functionUncurryThis;
587
- var isCallable$a = isCallable$g;
588
- var store$1 = sharedStore;
589
-
590
- var functionToString = uncurryThis$7(Function.toString);
591
-
592
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
593
- if (!isCallable$a(store$1.inspectSource)) {
594
- store$1.inspectSource = function (it) {
595
- return functionToString(it);
596
- };
597
- }
598
-
599
- var inspectSource$1 = store$1.inspectSource;
600
-
601
- var global$7 = global$e;
602
- var isCallable$9 = isCallable$g;
603
-
604
- var WeakMap$1 = global$7.WeakMap;
605
-
606
- var weakMapBasicDetection = isCallable$9(WeakMap$1) && /native code/.test(String(WeakMap$1));
607
-
608
- var shared$2 = shared$4.exports;
609
- var uid = uid$2;
610
-
611
- var keys = shared$2('keys');
612
-
613
- var sharedKey$3 = function (key) {
614
- return keys[key] || (keys[key] = uid(key));
615
- };
616
-
617
- var hiddenKeys$4 = {};
618
-
619
- var NATIVE_WEAK_MAP = weakMapBasicDetection;
620
- var global$6 = global$e;
621
- var isObject$1 = isObject$6;
622
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
623
- var hasOwn$5 = hasOwnProperty_1;
624
- var shared$1 = sharedStore;
625
- var sharedKey$2 = sharedKey$3;
626
- var hiddenKeys$3 = hiddenKeys$4;
627
-
628
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
629
- var TypeError$1 = global$6.TypeError;
630
- var WeakMap = global$6.WeakMap;
631
- var set, get, has;
632
-
633
- var enforce = function (it) {
634
- return has(it) ? get(it) : set(it, {});
635
- };
636
-
637
- var getterFor = function (TYPE) {
638
- return function (it) {
639
- var state;
640
- if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
641
- throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
642
- } return state;
643
- };
644
- };
645
-
646
- if (NATIVE_WEAK_MAP || shared$1.state) {
647
- var store = shared$1.state || (shared$1.state = new WeakMap());
648
- /* eslint-disable no-self-assign -- prototype methods protection */
649
- store.get = store.get;
650
- store.has = store.has;
651
- store.set = store.set;
652
- /* eslint-enable no-self-assign -- prototype methods protection */
653
- set = function (it, metadata) {
654
- if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
655
- metadata.facade = it;
656
- store.set(it, metadata);
657
- return metadata;
658
- };
659
- get = function (it) {
660
- return store.get(it) || {};
661
- };
662
- has = function (it) {
663
- return store.has(it);
664
- };
665
- } else {
666
- var STATE = sharedKey$2('state');
667
- hiddenKeys$3[STATE] = true;
668
- set = function (it, metadata) {
669
- if (hasOwn$5(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
670
- metadata.facade = it;
671
- createNonEnumerableProperty$4(it, STATE, metadata);
672
- return metadata;
673
- };
674
- get = function (it) {
675
- return hasOwn$5(it, STATE) ? it[STATE] : {};
676
- };
677
- has = function (it) {
678
- return hasOwn$5(it, STATE);
679
- };
680
- }
681
-
682
- var internalState = {
683
- set: set,
684
- get: get,
685
- has: has,
686
- enforce: enforce,
687
- getterFor: getterFor
688
- };
689
-
690
- var fails$8 = fails$f;
691
- var isCallable$8 = isCallable$g;
692
- var hasOwn$4 = hasOwnProperty_1;
693
- var DESCRIPTORS$3 = descriptors;
694
- var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
695
- var inspectSource = inspectSource$1;
696
- var InternalStateModule$1 = internalState;
697
-
698
- var enforceInternalState = InternalStateModule$1.enforce;
699
- var getInternalState$2 = InternalStateModule$1.get;
700
- // eslint-disable-next-line es/no-object-defineproperty -- safe
701
- var defineProperty$4 = Object.defineProperty;
702
-
703
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$8(function () {
704
- return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
705
- });
706
-
707
- var TEMPLATE = String(String).split('String');
708
-
709
- var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
710
- if (String(name).slice(0, 7) === 'Symbol(') {
711
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
712
- }
713
- if (options && options.getter) name = 'get ' + name;
714
- if (options && options.setter) name = 'set ' + name;
715
- if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
716
- if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
717
- else value.name = name;
718
- }
719
- if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
720
- defineProperty$4(value, 'length', { value: options.arity });
721
- }
722
- try {
723
- if (options && hasOwn$4(options, 'constructor') && options.constructor) {
724
- if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
725
- // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
726
- } else if (value.prototype) value.prototype = undefined;
727
- } catch (error) { /* empty */ }
728
- var state = enforceInternalState(value);
729
- if (!hasOwn$4(state, 'source')) {
730
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
731
- } return value;
732
- };
733
-
734
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
735
- // eslint-disable-next-line no-extend-native -- required
736
- Function.prototype.toString = makeBuiltIn$1(function toString() {
737
- return isCallable$8(this) && getInternalState$2(this).source || inspectSource(this);
738
- }, 'toString');
739
-
740
- var isCallable$7 = isCallable$g;
741
- var definePropertyModule$2 = objectDefineProperty;
742
- var makeBuiltIn = makeBuiltIn$2.exports;
743
- var defineGlobalProperty$1 = defineGlobalProperty$3;
744
-
745
- var defineBuiltIn$4 = function (O, key, value, options) {
746
- if (!options) options = {};
747
- var simple = options.enumerable;
748
- var name = options.name !== undefined ? options.name : key;
749
- if (isCallable$7(value)) makeBuiltIn(value, name, options);
750
- if (options.global) {
751
- if (simple) O[key] = value;
752
- else defineGlobalProperty$1(key, value);
753
- } else {
754
- try {
755
- if (!options.unsafe) delete O[key];
756
- else if (O[key]) simple = true;
757
- } catch (error) { /* empty */ }
758
- if (simple) O[key] = value;
759
- else definePropertyModule$2.f(O, key, {
760
- value: value,
761
- enumerable: false,
762
- configurable: !options.nonConfigurable,
763
- writable: !options.nonWritable
764
- });
765
- } return O;
766
- };
767
-
768
- var objectGetOwnPropertyNames = {};
769
-
770
- var ceil = Math.ceil;
771
- var floor = Math.floor;
772
-
773
- // `Math.trunc` method
774
- // https://tc39.es/ecma262/#sec-math.trunc
775
- // eslint-disable-next-line es/no-math-trunc -- safe
776
- var mathTrunc = Math.trunc || function trunc(x) {
777
- var n = +x;
778
- return (n > 0 ? floor : ceil)(n);
779
- };
780
-
781
- var trunc = mathTrunc;
782
-
783
- // `ToIntegerOrInfinity` abstract operation
784
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
785
- var toIntegerOrInfinity$2 = function (argument) {
786
- var number = +argument;
787
- // eslint-disable-next-line no-self-compare -- NaN check
788
- return number !== number || number === 0 ? 0 : trunc(number);
789
- };
790
-
791
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
792
-
793
- var max = Math.max;
794
- var min$1 = Math.min;
795
-
796
- // Helper for a popular repeating case of the spec:
797
- // Let integer be ? ToInteger(index).
798
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
799
- var toAbsoluteIndex$1 = function (index, length) {
800
- var integer = toIntegerOrInfinity$1(index);
801
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
802
- };
803
-
804
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
805
-
806
- var min = Math.min;
807
-
808
- // `ToLength` abstract operation
809
- // https://tc39.es/ecma262/#sec-tolength
810
- var toLength$1 = function (argument) {
811
- return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
812
- };
813
-
814
- var toLength = toLength$1;
815
-
816
- // `LengthOfArrayLike` abstract operation
817
- // https://tc39.es/ecma262/#sec-lengthofarraylike
818
- var lengthOfArrayLike$1 = function (obj) {
819
- return toLength(obj.length);
820
- };
821
-
822
- var toIndexedObject$3 = toIndexedObject$5;
823
- var toAbsoluteIndex = toAbsoluteIndex$1;
824
- var lengthOfArrayLike = lengthOfArrayLike$1;
825
-
826
- // `Array.prototype.{ indexOf, includes }` methods implementation
827
- var createMethod = function (IS_INCLUDES) {
828
- return function ($this, el, fromIndex) {
829
- var O = toIndexedObject$3($this);
830
- var length = lengthOfArrayLike(O);
831
- var index = toAbsoluteIndex(fromIndex, length);
832
- var value;
833
- // Array#includes uses SameValueZero equality algorithm
834
- // eslint-disable-next-line no-self-compare -- NaN check
835
- if (IS_INCLUDES && el != el) while (length > index) {
836
- value = O[index++];
837
- // eslint-disable-next-line no-self-compare -- NaN check
838
- if (value != value) return true;
839
- // Array#indexOf ignores holes, Array#includes - not
840
- } else for (;length > index; index++) {
841
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
842
- } return !IS_INCLUDES && -1;
843
- };
844
- };
845
-
846
- var arrayIncludes = {
847
- // `Array.prototype.includes` method
848
- // https://tc39.es/ecma262/#sec-array.prototype.includes
849
- includes: createMethod(true),
850
- // `Array.prototype.indexOf` method
851
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
852
- indexOf: createMethod(false)
853
- };
854
-
855
- var uncurryThis$6 = functionUncurryThis;
856
- var hasOwn$3 = hasOwnProperty_1;
857
- var toIndexedObject$2 = toIndexedObject$5;
858
- var indexOf$1 = arrayIncludes.indexOf;
859
- var hiddenKeys$2 = hiddenKeys$4;
860
-
861
- var push = uncurryThis$6([].push);
862
-
863
- var objectKeysInternal = function (object, names) {
864
- var O = toIndexedObject$2(object);
865
- var i = 0;
866
- var result = [];
867
- var key;
868
- for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
869
- // Don't enum bug & hidden keys
870
- while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
871
- ~indexOf$1(result, key) || push(result, key);
872
- }
873
- return result;
874
- };
875
-
876
- // IE8- don't enum bug keys
877
- var enumBugKeys$3 = [
878
- 'constructor',
879
- 'hasOwnProperty',
880
- 'isPrototypeOf',
881
- 'propertyIsEnumerable',
882
- 'toLocaleString',
883
- 'toString',
884
- 'valueOf'
885
- ];
886
-
887
- var internalObjectKeys$1 = objectKeysInternal;
888
- var enumBugKeys$2 = enumBugKeys$3;
889
-
890
- var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
891
-
892
- // `Object.getOwnPropertyNames` method
893
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
894
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
895
- objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
896
- return internalObjectKeys$1(O, hiddenKeys$1);
897
- };
898
-
899
- var objectGetOwnPropertySymbols = {};
900
-
901
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
902
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
903
-
904
- var getBuiltIn$1 = getBuiltIn$4;
905
- var uncurryThis$5 = functionUncurryThis;
906
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
907
- var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
908
- var anObject$6 = anObject$8;
909
-
910
- var concat$1 = uncurryThis$5([].concat);
911
-
912
- // all object keys, includes non-enumerable and symbols
913
- var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
914
- var keys = getOwnPropertyNamesModule.f(anObject$6(it));
915
- var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
916
- return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
917
- };
918
-
919
- var hasOwn$2 = hasOwnProperty_1;
920
- var ownKeys = ownKeys$1;
921
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
922
- var definePropertyModule$1 = objectDefineProperty;
923
-
924
- var copyConstructorProperties$1 = function (target, source, exceptions) {
925
- var keys = ownKeys(source);
926
- var defineProperty = definePropertyModule$1.f;
927
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
928
- for (var i = 0; i < keys.length; i++) {
929
- var key = keys[i];
930
- if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
931
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
932
- }
933
- }
934
- };
935
-
936
- var fails$7 = fails$f;
937
- var isCallable$6 = isCallable$g;
938
-
939
- var replacement = /#|\.prototype\./;
940
-
941
- var isForced$1 = function (feature, detection) {
942
- var value = data[normalize(feature)];
943
- return value == POLYFILL ? true
944
- : value == NATIVE ? false
945
- : isCallable$6(detection) ? fails$7(detection)
946
- : !!detection;
947
- };
948
-
949
- var normalize = isForced$1.normalize = function (string) {
950
- return String(string).replace(replacement, '.').toLowerCase();
951
- };
952
-
953
- var data = isForced$1.data = {};
954
- var NATIVE = isForced$1.NATIVE = 'N';
955
- var POLYFILL = isForced$1.POLYFILL = 'P';
956
-
957
- var isForced_1 = isForced$1;
958
-
959
- var global$5 = global$e;
960
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
961
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
962
- var defineBuiltIn$3 = defineBuiltIn$4;
963
- var defineGlobalProperty = defineGlobalProperty$3;
964
- var copyConstructorProperties = copyConstructorProperties$1;
965
- var isForced = isForced_1;
966
-
967
- /*
968
- options.target - name of the target object
969
- options.global - target is the global object
970
- options.stat - export as static methods of target
971
- options.proto - export as prototype methods of target
972
- options.real - real prototype method for the `pure` version
973
- options.forced - export even if the native feature is available
974
- options.bind - bind methods to the target, required for the `pure` version
975
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
976
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
977
- options.sham - add a flag to not completely full polyfills
978
- options.enumerable - export as enumerable property
979
- options.dontCallGetSet - prevent calling a getter on target
980
- options.name - the .name of the function if it does not match the key
981
- */
982
- var _export = function (options, source) {
983
- var TARGET = options.target;
984
- var GLOBAL = options.global;
985
- var STATIC = options.stat;
986
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
987
- if (GLOBAL) {
988
- target = global$5;
989
- } else if (STATIC) {
990
- target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
991
- } else {
992
- target = (global$5[TARGET] || {}).prototype;
993
- }
994
- if (target) for (key in source) {
995
- sourceProperty = source[key];
996
- if (options.dontCallGetSet) {
997
- descriptor = getOwnPropertyDescriptor(target, key);
998
- targetProperty = descriptor && descriptor.value;
999
- } else targetProperty = target[key];
1000
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1001
- // contained in target
1002
- if (!FORCED && targetProperty !== undefined) {
1003
- if (typeof sourceProperty == typeof targetProperty) continue;
1004
- copyConstructorProperties(sourceProperty, targetProperty);
1005
- }
1006
- // add a flag to not completely full polyfills
1007
- if (options.sham || (targetProperty && targetProperty.sham)) {
1008
- createNonEnumerableProperty$3(sourceProperty, 'sham', true);
1009
- }
1010
- defineBuiltIn$3(target, key, sourceProperty, options);
1011
- }
1012
- };
1013
-
1014
- var internalObjectKeys = objectKeysInternal;
1015
- var enumBugKeys$1 = enumBugKeys$3;
1016
-
1017
- // `Object.keys` method
1018
- // https://tc39.es/ecma262/#sec-object.keys
1019
- // eslint-disable-next-line es/no-object-keys -- safe
1020
- var objectKeys$2 = Object.keys || function keys(O) {
1021
- return internalObjectKeys(O, enumBugKeys$1);
1022
- };
1023
-
1024
- var DESCRIPTORS$2 = descriptors;
1025
- var uncurryThis$4 = functionUncurryThis;
1026
- var call$4 = functionCall;
1027
- var fails$6 = fails$f;
1028
- var objectKeys$1 = objectKeys$2;
1029
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1030
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1031
- var toObject$1 = toObject$3;
1032
- var IndexedObject = indexedObject;
1033
-
1034
- // eslint-disable-next-line es/no-object-assign -- safe
1035
- var $assign = Object.assign;
1036
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1037
- var defineProperty$3 = Object.defineProperty;
1038
- var concat = uncurryThis$4([].concat);
1039
-
1040
- // `Object.assign` method
1041
- // https://tc39.es/ecma262/#sec-object.assign
1042
- var objectAssign = !$assign || fails$6(function () {
1043
- // should have correct order of operations (Edge bug)
1044
- if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1045
- enumerable: true,
1046
- get: function () {
1047
- defineProperty$3(this, 'b', {
1048
- value: 3,
1049
- enumerable: false
1050
- });
1051
- }
1052
- }), { b: 2 })).b !== 1) return true;
1053
- // should work with symbols and should have deterministic property order (V8 bug)
1054
- var A = {};
1055
- var B = {};
1056
- // eslint-disable-next-line es/no-symbol -- safe
1057
- var symbol = Symbol();
1058
- var alphabet = 'abcdefghijklmnopqrst';
1059
- A[symbol] = 7;
1060
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1061
- return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1062
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1063
- var T = toObject$1(target);
1064
- var argumentsLength = arguments.length;
1065
- var index = 1;
1066
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1067
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
1068
- while (argumentsLength > index) {
1069
- var S = IndexedObject(arguments[index++]);
1070
- var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1071
- var length = keys.length;
1072
- var j = 0;
1073
- var key;
1074
- while (length > j) {
1075
- key = keys[j++];
1076
- if (!DESCRIPTORS$2 || call$4(propertyIsEnumerable, S, key)) T[key] = S[key];
1077
- }
1078
- } return T;
1079
- } : $assign;
1080
-
1081
- var $$2 = _export;
1082
- var assign = objectAssign;
1083
-
1084
- // `Object.assign` method
1085
- // https://tc39.es/ecma262/#sec-object.assign
1086
- // eslint-disable-next-line es/no-object-assign -- required for testing
1087
- $$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1088
- assign: assign
1089
- });
1090
-
1091
- const AssetSortingContext = /*#__PURE__*/createContext(null);
1092
- const AssetSortingProvider = props => jsx(AssetSortingContext.Provider, Object.assign({}, props));
1093
- const useAssetSorting = () => {
1094
- const context = useContext(AssetSortingContext);
1095
- if (!context) {
1096
- throw new Error("useAssetSorting must be used within a AssetSortingProvider");
1097
- }
1098
- return context;
1099
- };
1100
-
1101
- var objectDefineProperties = {};
1102
-
1103
- var DESCRIPTORS$1 = descriptors;
1104
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1105
- var definePropertyModule = objectDefineProperty;
1106
- var anObject$5 = anObject$8;
1107
- var toIndexedObject$1 = toIndexedObject$5;
1108
- var objectKeys = objectKeys$2;
1109
-
1110
- // `Object.defineProperties` method
1111
- // https://tc39.es/ecma262/#sec-object.defineproperties
1112
- // eslint-disable-next-line es/no-object-defineproperties -- safe
1113
- objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1114
- anObject$5(O);
1115
- var props = toIndexedObject$1(Properties);
1116
- var keys = objectKeys(Properties);
1117
- var length = keys.length;
1118
- var index = 0;
1119
- var key;
1120
- while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1121
- return O;
1122
- };
1123
-
1124
- var getBuiltIn = getBuiltIn$4;
1125
-
1126
- var html$1 = getBuiltIn('document', 'documentElement');
1127
-
1128
- /* global ActiveXObject -- old IE, WSH */
1129
-
1130
- var anObject$4 = anObject$8;
1131
- var definePropertiesModule = objectDefineProperties;
1132
- var enumBugKeys = enumBugKeys$3;
1133
- var hiddenKeys = hiddenKeys$4;
1134
- var html = html$1;
1135
- var documentCreateElement$1 = documentCreateElement$2;
1136
- var sharedKey$1 = sharedKey$3;
1137
-
1138
- var GT = '>';
1139
- var LT = '<';
1140
- var PROTOTYPE = 'prototype';
1141
- var SCRIPT = 'script';
1142
- var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1143
-
1144
- var EmptyConstructor = function () { /* empty */ };
1145
-
1146
- var scriptTag = function (content) {
1147
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1148
- };
1149
-
1150
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1151
- var NullProtoObjectViaActiveX = function (activeXDocument) {
1152
- activeXDocument.write(scriptTag(''));
1153
- activeXDocument.close();
1154
- var temp = activeXDocument.parentWindow.Object;
1155
- activeXDocument = null; // avoid memory leak
1156
- return temp;
1157
- };
1158
-
1159
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
1160
- var NullProtoObjectViaIFrame = function () {
1161
- // Thrash, waste and sodomy: IE GC bug
1162
- var iframe = documentCreateElement$1('iframe');
1163
- var JS = 'java' + SCRIPT + ':';
1164
- var iframeDocument;
1165
- iframe.style.display = 'none';
1166
- html.appendChild(iframe);
1167
- // https://github.com/zloirock/core-js/issues/475
1168
- iframe.src = String(JS);
1169
- iframeDocument = iframe.contentWindow.document;
1170
- iframeDocument.open();
1171
- iframeDocument.write(scriptTag('document.F=Object'));
1172
- iframeDocument.close();
1173
- return iframeDocument.F;
1174
- };
1175
-
1176
- // Check for document.domain and active x support
1177
- // No need to use active x approach when document.domain is not set
1178
- // see https://github.com/es-shims/es5-shim/issues/150
1179
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1180
- // avoid IE GC bug
1181
- var activeXDocument;
1182
- var NullProtoObject = function () {
1183
- try {
1184
- activeXDocument = new ActiveXObject('htmlfile');
1185
- } catch (error) { /* ignore */ }
1186
- NullProtoObject = typeof document != 'undefined'
1187
- ? document.domain && activeXDocument
1188
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1189
- : NullProtoObjectViaIFrame()
1190
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
1191
- var length = enumBugKeys.length;
1192
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1193
- return NullProtoObject();
1194
- };
1195
-
1196
- hiddenKeys[IE_PROTO$1] = true;
1197
-
1198
- // `Object.create` method
1199
- // https://tc39.es/ecma262/#sec-object.create
1200
- // eslint-disable-next-line es/no-object-create -- safe
1201
- var objectCreate = Object.create || function create(O, Properties) {
1202
- var result;
1203
- if (O !== null) {
1204
- EmptyConstructor[PROTOTYPE] = anObject$4(O);
1205
- result = new EmptyConstructor();
1206
- EmptyConstructor[PROTOTYPE] = null;
1207
- // add "__proto__" for Object.getPrototypeOf polyfill
1208
- result[IE_PROTO$1] = O;
1209
- } else result = NullProtoObject();
1210
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1211
- };
1212
-
1213
- var wellKnownSymbol$7 = wellKnownSymbol$9;
1214
- var create$2 = objectCreate;
1215
- var defineProperty$2 = objectDefineProperty.f;
1216
-
1217
- var UNSCOPABLES = wellKnownSymbol$7('unscopables');
1218
- var ArrayPrototype = Array.prototype;
1219
-
1220
- // Array.prototype[@@unscopables]
1221
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1222
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
1223
- defineProperty$2(ArrayPrototype, UNSCOPABLES, {
1224
- configurable: true,
1225
- value: create$2(null)
1226
- });
1227
- }
1228
-
1229
- // add a key to Array.prototype[@@unscopables]
1230
- var addToUnscopables$1 = function (key) {
1231
- ArrayPrototype[UNSCOPABLES][key] = true;
1232
- };
1233
-
1234
- var iterators = {};
1235
-
1236
- var fails$5 = fails$f;
1237
-
1238
- var correctPrototypeGetter = !fails$5(function () {
1239
- function F() { /* empty */ }
1240
- F.prototype.constructor = null;
1241
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1242
- return Object.getPrototypeOf(new F()) !== F.prototype;
1243
- });
1244
-
1245
- var hasOwn$1 = hasOwnProperty_1;
1246
- var isCallable$5 = isCallable$g;
1247
- var toObject = toObject$3;
1248
- var sharedKey = sharedKey$3;
1249
- var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1250
-
1251
- var IE_PROTO = sharedKey('IE_PROTO');
1252
- var $Object$1 = Object;
1253
- var ObjectPrototype = $Object$1.prototype;
1254
-
1255
- // `Object.getPrototypeOf` method
1256
- // https://tc39.es/ecma262/#sec-object.getprototypeof
1257
- // eslint-disable-next-line es/no-object-getprototypeof -- safe
1258
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1259
- var object = toObject(O);
1260
- if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1261
- var constructor = object.constructor;
1262
- if (isCallable$5(constructor) && object instanceof constructor) {
1263
- return constructor.prototype;
1264
- } return object instanceof $Object$1 ? ObjectPrototype : null;
1265
- };
1266
-
1267
- var fails$4 = fails$f;
1268
- var isCallable$4 = isCallable$g;
1269
- var isObject = isObject$6;
1270
- var getPrototypeOf$1 = objectGetPrototypeOf;
1271
- var defineBuiltIn$2 = defineBuiltIn$4;
1272
- var wellKnownSymbol$6 = wellKnownSymbol$9;
1273
-
1274
- var ITERATOR$2 = wellKnownSymbol$6('iterator');
1275
- var BUGGY_SAFARI_ITERATORS$1 = false;
1276
-
1277
- // `%IteratorPrototype%` object
1278
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1279
- var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1280
-
1281
- /* eslint-disable es/no-array-prototype-keys -- safe */
1282
- if ([].keys) {
1283
- arrayIterator = [].keys();
1284
- // Safari 8 has buggy iterators w/o `next`
1285
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1286
- else {
1287
- PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1288
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1289
- }
1290
- }
1291
-
1292
- var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$4(function () {
1293
- var test = {};
1294
- // FF44- legacy iterators case
1295
- return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1296
- });
1297
-
1298
- if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1299
-
1300
- // `%IteratorPrototype%[@@iterator]()` method
1301
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1302
- if (!isCallable$4(IteratorPrototype$2[ITERATOR$2])) {
1303
- defineBuiltIn$2(IteratorPrototype$2, ITERATOR$2, function () {
1304
- return this;
1305
- });
1306
- }
1307
-
1308
- var iteratorsCore = {
1309
- IteratorPrototype: IteratorPrototype$2,
1310
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1311
- };
1312
-
1313
- var defineProperty$1 = objectDefineProperty.f;
1314
- var hasOwn = hasOwnProperty_1;
1315
- var wellKnownSymbol$5 = wellKnownSymbol$9;
1316
-
1317
- var TO_STRING_TAG$3 = wellKnownSymbol$5('toStringTag');
1318
-
1319
- var setToStringTag$2 = function (target, TAG, STATIC) {
1320
- if (target && !STATIC) target = target.prototype;
1321
- if (target && !hasOwn(target, TO_STRING_TAG$3)) {
1322
- defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1323
- }
1324
- };
1325
-
1326
- var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1327
- var create$1 = objectCreate;
1328
- var createPropertyDescriptor = createPropertyDescriptor$3;
1329
- var setToStringTag$1 = setToStringTag$2;
1330
- var Iterators$2 = iterators;
1331
-
1332
- var returnThis$1 = function () { return this; };
1333
-
1334
- var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1335
- var TO_STRING_TAG = NAME + ' Iterator';
1336
- IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1337
- setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
1338
- Iterators$2[TO_STRING_TAG] = returnThis$1;
1339
- return IteratorConstructor;
1340
- };
1341
-
1342
- var isCallable$3 = isCallable$g;
1343
-
1344
- var $String$1 = String;
1345
- var $TypeError$1 = TypeError;
1346
-
1347
- var aPossiblePrototype$1 = function (argument) {
1348
- if (typeof argument == 'object' || isCallable$3(argument)) return argument;
1349
- throw $TypeError$1("Can't set " + $String$1(argument) + ' as a prototype');
1350
- };
1351
-
1352
- /* eslint-disable no-proto -- safe */
1353
-
1354
- var uncurryThis$3 = functionUncurryThis;
1355
- var anObject$3 = anObject$8;
1356
- var aPossiblePrototype = aPossiblePrototype$1;
1357
-
1358
- // `Object.setPrototypeOf` method
1359
- // https://tc39.es/ecma262/#sec-object.setprototypeof
1360
- // Works with __proto__ only. Old v8 can't work with null proto objects.
1361
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
1362
- var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1363
- var CORRECT_SETTER = false;
1364
- var test = {};
1365
- var setter;
1366
- try {
1367
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1368
- setter = uncurryThis$3(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1369
- setter(test, []);
1370
- CORRECT_SETTER = test instanceof Array;
1371
- } catch (error) { /* empty */ }
1372
- return function setPrototypeOf(O, proto) {
1373
- anObject$3(O);
1374
- aPossiblePrototype(proto);
1375
- if (CORRECT_SETTER) setter(O, proto);
1376
- else O.__proto__ = proto;
1377
- return O;
1378
- };
1379
- }() : undefined);
1380
-
1381
- var $$1 = _export;
1382
- var call$3 = functionCall;
1383
- var FunctionName = functionName;
1384
- var isCallable$2 = isCallable$g;
1385
- var createIteratorConstructor = iteratorCreateConstructor;
1386
- var getPrototypeOf = objectGetPrototypeOf;
1387
- var setPrototypeOf = objectSetPrototypeOf;
1388
- var setToStringTag = setToStringTag$2;
1389
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
1390
- var defineBuiltIn$1 = defineBuiltIn$4;
1391
- var wellKnownSymbol$4 = wellKnownSymbol$9;
1392
- var Iterators$1 = iterators;
1393
- var IteratorsCore = iteratorsCore;
1394
-
1395
- var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1396
- var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1397
- var IteratorPrototype = IteratorsCore.IteratorPrototype;
1398
- var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1399
- var ITERATOR$1 = wellKnownSymbol$4('iterator');
1400
- var KEYS = 'keys';
1401
- var VALUES = 'values';
1402
- var ENTRIES = 'entries';
1403
-
1404
- var returnThis = function () { return this; };
1405
-
1406
- var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1407
- createIteratorConstructor(IteratorConstructor, NAME, next);
1408
-
1409
- var getIterationMethod = function (KIND) {
1410
- if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1411
- if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
1412
- switch (KIND) {
1413
- case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1414
- case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1415
- case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1416
- } return function () { return new IteratorConstructor(this); };
1417
- };
1418
-
1419
- var TO_STRING_TAG = NAME + ' Iterator';
1420
- var INCORRECT_VALUES_NAME = false;
1421
- var IterablePrototype = Iterable.prototype;
1422
- var nativeIterator = IterablePrototype[ITERATOR$1]
1423
- || IterablePrototype['@@iterator']
1424
- || DEFAULT && IterablePrototype[DEFAULT];
1425
- var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1426
- var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1427
- var CurrentIteratorPrototype, methods, KEY;
1428
-
1429
- // fix native
1430
- if (anyNativeIterator) {
1431
- CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1432
- if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1433
- if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1434
- if (setPrototypeOf) {
1435
- setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1436
- } else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$1])) {
1437
- defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1438
- }
1439
- }
1440
- // Set @@toStringTag to native iterators
1441
- setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1442
- }
1443
- }
1444
-
1445
- // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1446
- if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1447
- if (CONFIGURABLE_FUNCTION_NAME) {
1448
- createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
1449
- } else {
1450
- INCORRECT_VALUES_NAME = true;
1451
- defaultIterator = function values() { return call$3(nativeIterator, this); };
1452
- }
1453
- }
1454
-
1455
- // export additional methods
1456
- if (DEFAULT) {
1457
- methods = {
1458
- values: getIterationMethod(VALUES),
1459
- keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1460
- entries: getIterationMethod(ENTRIES)
1461
- };
1462
- if (FORCED) for (KEY in methods) {
1463
- if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1464
- defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1465
- }
1466
- } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1467
- }
1468
-
1469
- // define iterator
1470
- if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1471
- defineBuiltIn$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1472
- }
1473
- Iterators$1[NAME] = defaultIterator;
1474
-
1475
- return methods;
1476
- };
1477
-
1478
- // `CreateIterResultObject` abstract operation
1479
- // https://tc39.es/ecma262/#sec-createiterresultobject
1480
- var createIterResultObject$1 = function (value, done) {
1481
- return { value: value, done: done };
1482
- };
1483
-
1484
- var toIndexedObject = toIndexedObject$5;
1485
- var addToUnscopables = addToUnscopables$1;
1486
- var Iterators = iterators;
1487
- var InternalStateModule = internalState;
1488
- var defineProperty = objectDefineProperty.f;
1489
- var defineIterator = iteratorDefine;
1490
- var createIterResultObject = createIterResultObject$1;
1491
- var DESCRIPTORS = descriptors;
1492
-
1493
- var ARRAY_ITERATOR = 'Array Iterator';
1494
- var setInternalState = InternalStateModule.set;
1495
- var getInternalState$1 = InternalStateModule.getterFor(ARRAY_ITERATOR);
1496
-
1497
- // `Array.prototype.entries` method
1498
- // https://tc39.es/ecma262/#sec-array.prototype.entries
1499
- // `Array.prototype.keys` method
1500
- // https://tc39.es/ecma262/#sec-array.prototype.keys
1501
- // `Array.prototype.values` method
1502
- // https://tc39.es/ecma262/#sec-array.prototype.values
1503
- // `Array.prototype[@@iterator]` method
1504
- // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1505
- // `CreateArrayIterator` internal method
1506
- // https://tc39.es/ecma262/#sec-createarrayiterator
1507
- var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1508
- setInternalState(this, {
1509
- type: ARRAY_ITERATOR,
1510
- target: toIndexedObject(iterated), // target
1511
- index: 0, // next index
1512
- kind: kind // kind
1513
- });
1514
- // `%ArrayIteratorPrototype%.next` method
1515
- // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1516
- }, function () {
1517
- var state = getInternalState$1(this);
1518
- var target = state.target;
1519
- var kind = state.kind;
1520
- var index = state.index++;
1521
- if (!target || index >= target.length) {
1522
- state.target = undefined;
1523
- return createIterResultObject(undefined, true);
1524
- }
1525
- if (kind == 'keys') return createIterResultObject(index, false);
1526
- if (kind == 'values') return createIterResultObject(target[index], false);
1527
- return createIterResultObject([index, target[index]], false);
1528
- }, 'values');
1529
-
1530
- // argumentsList[@@iterator] is %ArrayProto_values%
1531
- // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1532
- // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1533
- var values = Iterators.Arguments = Iterators.Array;
1534
-
1535
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1536
- addToUnscopables('keys');
1537
- addToUnscopables('values');
1538
- addToUnscopables('entries');
1539
-
1540
- // V8 ~ Chrome 45- bug
1541
- if (DESCRIPTORS && values.name !== 'values') try {
1542
- defineProperty(values, 'name', { value: 'values' });
1543
- } catch (error) { /* empty */ }
1544
-
1545
- // iterable DOM collections
1546
- // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1547
- var domIterables = {
1548
- CSSRuleList: 0,
1549
- CSSStyleDeclaration: 0,
1550
- CSSValueList: 0,
1551
- ClientRectList: 0,
1552
- DOMRectList: 0,
1553
- DOMStringList: 0,
1554
- DOMTokenList: 1,
1555
- DataTransferItemList: 0,
1556
- FileList: 0,
1557
- HTMLAllCollection: 0,
1558
- HTMLCollection: 0,
1559
- HTMLFormElement: 0,
1560
- HTMLSelectElement: 0,
1561
- MediaList: 0,
1562
- MimeTypeArray: 0,
1563
- NamedNodeMap: 0,
1564
- NodeList: 1,
1565
- PaintRequestList: 0,
1566
- Plugin: 0,
1567
- PluginArray: 0,
1568
- SVGLengthList: 0,
1569
- SVGNumberList: 0,
1570
- SVGPathSegList: 0,
1571
- SVGPointList: 0,
1572
- SVGStringList: 0,
1573
- SVGTransformList: 0,
1574
- SourceBufferList: 0,
1575
- StyleSheetList: 0,
1576
- TextTrackCueList: 0,
1577
- TextTrackList: 0,
1578
- TouchList: 0
1579
- };
1580
-
1581
- // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1582
- var documentCreateElement = documentCreateElement$2;
1583
-
1584
- var classList = documentCreateElement('span').classList;
1585
- var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1586
-
1587
- var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1588
-
1589
- var global$4 = global$e;
1590
- var DOMIterables = domIterables;
1591
- var DOMTokenListPrototype = domTokenListPrototype;
1592
- var ArrayIteratorMethods = es_array_iterator;
1593
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1594
- var wellKnownSymbol$3 = wellKnownSymbol$9;
1595
-
1596
- var ITERATOR = wellKnownSymbol$3('iterator');
1597
- var TO_STRING_TAG$2 = wellKnownSymbol$3('toStringTag');
1598
- var ArrayValues = ArrayIteratorMethods.values;
1599
-
1600
- var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1601
- if (CollectionPrototype) {
1602
- // some Chrome versions have non-configurable methods on DOMTokenList
1603
- if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1604
- createNonEnumerableProperty$1(CollectionPrototype, ITERATOR, ArrayValues);
1605
- } catch (error) {
1606
- CollectionPrototype[ITERATOR] = ArrayValues;
1607
- }
1608
- if (!CollectionPrototype[TO_STRING_TAG$2]) {
1609
- createNonEnumerableProperty$1(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1610
- }
1611
- if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1612
- // some Chrome versions have non-configurable methods on DOMTokenList
1613
- if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1614
- createNonEnumerableProperty$1(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1615
- } catch (error) {
1616
- CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1617
- }
1618
- }
1619
- }
1620
- };
1621
-
1622
- for (var COLLECTION_NAME in DOMIterables) {
1623
- handlePrototype(global$4[COLLECTION_NAME] && global$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
1624
- }
1625
-
1626
- handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1627
-
1628
- const DeveloperSettingsContext = /*#__PURE__*/React.createContext({
1629
- localFeatureFlagsEnabled: false
1630
- });
1631
- const useDeveloperSettings = () => {
1632
- const context = React.useContext(DeveloperSettingsContext);
1633
- if (!context) {
1634
- throw new Error("useDeveloperSettingsContext must be used within DeveloperSettingsProvider");
1635
- }
1636
- return context;
1637
- };
1638
- const DeveloperSettingsProvider = ({
1639
- value,
1640
- children
1641
- }) => {
1642
- const launchdarklyFlags = useFlags();
1643
- const [localFeatureFlagsEnabled, setLocalFeatureFlagsEnabled] = React.useState(false);
1644
- const [localFeatureFlags, setLocalFeatureFlags] = React.useState();
1645
- React.useEffect(() => {
1646
- if (!localFeatureFlagsEnabled) {
1647
- setLocalFeatureFlags(launchdarklyFlags);
1648
- }
1649
- }, [launchdarklyFlags, localFeatureFlagsEnabled]);
1650
- return jsx(DeveloperSettingsContext.Provider, Object.assign({
1651
- value: value !== null && value !== void 0 ? value : {
1652
- localFeatureFlagsEnabled,
1653
- enableLocalFeatureFlags: setLocalFeatureFlagsEnabled,
1654
- localFeatureFlags,
1655
- launchdarklyFlags,
1656
- setFlags: setLocalFeatureFlags
1657
- }
1658
- }, {
1659
- children: children
1660
- }));
1661
- };
1662
-
1663
- const EnvironmentContext = /*#__PURE__*/createContext(null);
1664
- const EnvironmentContextProvider = props => {
1665
- return jsx(EnvironmentContext.Provider, Object.assign({}, props));
1666
- };
1667
- const useEnvironment = () => {
1668
- const context = useContext(EnvironmentContext);
1669
- if (!context) {
1670
- throw new Error("useEnvironment must be used within an EnvironmentContext");
1671
- }
1672
- return context;
1673
- };
1674
-
1675
- const GlobalSelectionContext = /*#__PURE__*/React.createContext(null);
1676
- const useGlobalSelection = () => {
1677
- const context = React.useContext(GlobalSelectionContext);
1678
- if (!context) {
1679
- throw new Error("useGlobalSelection must be used within the GlobalSelectionContext");
1680
- }
1681
- return context;
1682
- };
1683
- const GlobalSelectionProvider = props => jsx(GlobalSelectionContext.Provider, Object.assign({}, props));
1684
-
1685
- var wellKnownSymbol$2 = wellKnownSymbol$9;
1686
-
1687
- var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
1688
- var test = {};
1689
-
1690
- test[TO_STRING_TAG$1] = 'z';
1691
-
1692
- var toStringTagSupport = String(test) === '[object z]';
1693
-
1694
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1695
- var isCallable$1 = isCallable$g;
1696
- var classofRaw$1 = classofRaw$2;
1697
- var wellKnownSymbol$1 = wellKnownSymbol$9;
1698
-
1699
- var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
1700
- var $Object = Object;
1701
-
1702
- // ES3 wrong here
1703
- var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1704
-
1705
- // fallback for IE11 Script Access Denied error
1706
- var tryGet = function (it, key) {
1707
- try {
1708
- return it[key];
1709
- } catch (error) { /* empty */ }
1710
- };
1711
-
1712
- // getting tag from ES6+ `Object.prototype.toString`
1713
- var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1714
- var O, tag, result;
1715
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1716
- // @@toStringTag case
1717
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1718
- // builtinTag case
1719
- : CORRECT_ARGUMENTS ? classofRaw$1(O)
1720
- // ES3 arguments fallback
1721
- : (result = classofRaw$1(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
1722
- };
1723
-
1724
- var classof$1 = classof$2;
1725
-
1726
- var $String = String;
1727
-
1728
- var toString$2 = function (argument) {
1729
- if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1730
- return $String(argument);
1731
- };
1732
-
1733
- var anObject$2 = anObject$8;
1734
-
1735
- // `RegExp.prototype.flags` getter implementation
1736
- // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1737
- var regexpFlags$1 = function () {
1738
- var that = anObject$2(this);
1739
- var result = '';
1740
- if (that.hasIndices) result += 'd';
1741
- if (that.global) result += 'g';
1742
- if (that.ignoreCase) result += 'i';
1743
- if (that.multiline) result += 'm';
1744
- if (that.dotAll) result += 's';
1745
- if (that.unicode) result += 'u';
1746
- if (that.unicodeSets) result += 'v';
1747
- if (that.sticky) result += 'y';
1748
- return result;
1749
- };
1750
-
1751
- var fails$3 = fails$f;
1752
- var global$3 = global$e;
1753
-
1754
- // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1755
- var $RegExp$2 = global$3.RegExp;
1756
-
1757
- var UNSUPPORTED_Y$1 = fails$3(function () {
1758
- var re = $RegExp$2('a', 'y');
1759
- re.lastIndex = 2;
1760
- return re.exec('abcd') != null;
1761
- });
1762
-
1763
- // UC Browser bug
1764
- // https://github.com/zloirock/core-js/issues/1008
1765
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$3(function () {
1766
- return !$RegExp$2('a', 'y').sticky;
1767
- });
1768
-
1769
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$3(function () {
1770
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1771
- var re = $RegExp$2('^r', 'gy');
1772
- re.lastIndex = 2;
1773
- return re.exec('str') != null;
1774
- });
1775
-
1776
- var regexpStickyHelpers = {
1777
- BROKEN_CARET: BROKEN_CARET,
1778
- MISSED_STICKY: MISSED_STICKY,
1779
- UNSUPPORTED_Y: UNSUPPORTED_Y$1
1780
- };
1781
-
1782
- var fails$2 = fails$f;
1783
- var global$2 = global$e;
1784
-
1785
- // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1786
- var $RegExp$1 = global$2.RegExp;
1787
-
1788
- var regexpUnsupportedDotAll = fails$2(function () {
1789
- var re = $RegExp$1('.', 's');
1790
- return !(re.dotAll && re.exec('\n') && re.flags === 's');
1791
- });
1792
-
1793
- var fails$1 = fails$f;
1794
- var global$1 = global$e;
1795
-
1796
- // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1797
- var $RegExp = global$1.RegExp;
1798
-
1799
- var regexpUnsupportedNcg = fails$1(function () {
1800
- var re = $RegExp('(?<a>b)', 'g');
1801
- return re.exec('b').groups.a !== 'b' ||
1802
- 'b'.replace(re, '$<a>c') !== 'bc';
1803
- });
1804
-
1805
- /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1806
- /* eslint-disable regexp/no-useless-quantifier -- testing */
1807
- var call$2 = functionCall;
1808
- var uncurryThis$2 = functionUncurryThis;
1809
- var toString$1 = toString$2;
1810
- var regexpFlags = regexpFlags$1;
1811
- var stickyHelpers = regexpStickyHelpers;
1812
- var shared = shared$4.exports;
1813
- var create = objectCreate;
1814
- var getInternalState = internalState.get;
1815
- var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
1816
- var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1817
-
1818
- var nativeReplace = shared('native-string-replace', String.prototype.replace);
1819
- var nativeExec = RegExp.prototype.exec;
1820
- var patchedExec = nativeExec;
1821
- var charAt = uncurryThis$2(''.charAt);
1822
- var indexOf = uncurryThis$2(''.indexOf);
1823
- var replace = uncurryThis$2(''.replace);
1824
- var stringSlice = uncurryThis$2(''.slice);
1825
-
1826
- var UPDATES_LAST_INDEX_WRONG = (function () {
1827
- var re1 = /a/;
1828
- var re2 = /b*/g;
1829
- call$2(nativeExec, re1, 'a');
1830
- call$2(nativeExec, re2, 'a');
1831
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1832
- })();
1833
-
1834
- var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
1835
-
1836
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
1837
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1838
-
1839
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1840
-
1841
- if (PATCH) {
1842
- patchedExec = function exec(string) {
1843
- var re = this;
1844
- var state = getInternalState(re);
1845
- var str = toString$1(string);
1846
- var raw = state.raw;
1847
- var result, reCopy, lastIndex, match, i, object, group;
1848
-
1849
- if (raw) {
1850
- raw.lastIndex = re.lastIndex;
1851
- result = call$2(patchedExec, raw, str);
1852
- re.lastIndex = raw.lastIndex;
1853
- return result;
1854
- }
1855
-
1856
- var groups = state.groups;
1857
- var sticky = UNSUPPORTED_Y && re.sticky;
1858
- var flags = call$2(regexpFlags, re);
1859
- var source = re.source;
1860
- var charsAdded = 0;
1861
- var strCopy = str;
1862
-
1863
- if (sticky) {
1864
- flags = replace(flags, 'y', '');
1865
- if (indexOf(flags, 'g') === -1) {
1866
- flags += 'g';
1867
- }
1868
-
1869
- strCopy = stringSlice(str, re.lastIndex);
1870
- // Support anchored sticky behavior.
1871
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
1872
- source = '(?: ' + source + ')';
1873
- strCopy = ' ' + strCopy;
1874
- charsAdded++;
1875
- }
1876
- // ^(? + rx + ) is needed, in combination with some str slicing, to
1877
- // simulate the 'y' flag.
1878
- reCopy = new RegExp('^(?:' + source + ')', flags);
1879
- }
1880
-
1881
- if (NPCG_INCLUDED) {
1882
- reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1883
- }
1884
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1885
-
1886
- match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
1887
-
1888
- if (sticky) {
1889
- if (match) {
1890
- match.input = stringSlice(match.input, charsAdded);
1891
- match[0] = stringSlice(match[0], charsAdded);
1892
- match.index = re.lastIndex;
1893
- re.lastIndex += match[0].length;
1894
- } else re.lastIndex = 0;
1895
- } else if (UPDATES_LAST_INDEX_WRONG && match) {
1896
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1897
- }
1898
- if (NPCG_INCLUDED && match && match.length > 1) {
1899
- // Fix browsers whose `exec` methods don't consistently return `undefined`
1900
- // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
1901
- call$2(nativeReplace, match[0], reCopy, function () {
1902
- for (i = 1; i < arguments.length - 2; i++) {
1903
- if (arguments[i] === undefined) match[i] = undefined;
1904
- }
1905
- });
1906
- }
1907
-
1908
- if (match && groups) {
1909
- match.groups = object = create(null);
1910
- for (i = 0; i < groups.length; i++) {
1911
- group = groups[i];
1912
- object[group[0]] = match[group[1]];
1913
- }
1914
- }
1915
-
1916
- return match;
1917
- };
1918
- }
1919
-
1920
- var regexpExec$2 = patchedExec;
1921
-
1922
- var $ = _export;
1923
- var exec = regexpExec$2;
1924
-
1925
- // `RegExp.prototype.exec` method
1926
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1927
- $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
1928
- exec: exec
1929
- });
1930
-
1931
- var classofRaw = classofRaw$2;
1932
- var uncurryThis$1 = functionUncurryThis;
1933
-
1934
- var functionUncurryThisClause = function (fn) {
1935
- // Nashorn bug:
1936
- // https://github.com/zloirock/core-js/issues/1128
1937
- // https://github.com/zloirock/core-js/issues/1130
1938
- if (classofRaw(fn) === 'Function') return uncurryThis$1(fn);
1939
- };
1940
-
1941
- // TODO: Remove from `core-js@4` since it's moved to entry points
1942
-
1943
- var uncurryThis = functionUncurryThisClause;
1944
- var defineBuiltIn = defineBuiltIn$4;
1945
- var regexpExec$1 = regexpExec$2;
1946
- var fails = fails$f;
1947
- var wellKnownSymbol = wellKnownSymbol$9;
1948
- var createNonEnumerableProperty = createNonEnumerableProperty$5;
1949
-
1950
- var SPECIES = wellKnownSymbol('species');
1951
- var RegExpPrototype = RegExp.prototype;
1952
-
1953
- var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
1954
- var SYMBOL = wellKnownSymbol(KEY);
1955
-
1956
- var DELEGATES_TO_SYMBOL = !fails(function () {
1957
- // String methods call symbol-named RegEp methods
1958
- var O = {};
1959
- O[SYMBOL] = function () { return 7; };
1960
- return ''[KEY](O) != 7;
1961
- });
1962
-
1963
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
1964
- // Symbol-named RegExp methods call .exec
1965
- var execCalled = false;
1966
- var re = /a/;
1967
-
1968
- if (KEY === 'split') {
1969
- // We can't use real regex here since it causes deoptimization
1970
- // and serious performance degradation in V8
1971
- // https://github.com/zloirock/core-js/issues/306
1972
- re = {};
1973
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
1974
- // a new one. We need to return the patched regex when creating the new one.
1975
- re.constructor = {};
1976
- re.constructor[SPECIES] = function () { return re; };
1977
- re.flags = '';
1978
- re[SYMBOL] = /./[SYMBOL];
1979
- }
1980
-
1981
- re.exec = function () { execCalled = true; return null; };
1982
-
1983
- re[SYMBOL]('');
1984
- return !execCalled;
1985
- });
1986
-
1987
- if (
1988
- !DELEGATES_TO_SYMBOL ||
1989
- !DELEGATES_TO_EXEC ||
1990
- FORCED
1991
- ) {
1992
- var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);
1993
- var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1994
- var uncurriedNativeMethod = uncurryThis(nativeMethod);
1995
- var $exec = regexp.exec;
1996
- if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
1997
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1998
- // The native String method already delegates to @@method (this
1999
- // polyfilled function), leasing to infinite recursion.
2000
- // We avoid it by directly calling the native @@method method.
2001
- return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
2002
- }
2003
- return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
2004
- }
2005
- return { done: false };
2006
- });
2007
-
2008
- defineBuiltIn(String.prototype, KEY, methods[0]);
2009
- defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
2010
- }
2011
-
2012
- if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
2013
- };
2014
-
2015
- // `SameValue` abstract operation
2016
- // https://tc39.es/ecma262/#sec-samevalue
2017
- // eslint-disable-next-line es/no-object-is -- safe
2018
- var sameValue$1 = Object.is || function is(x, y) {
2019
- // eslint-disable-next-line no-self-compare -- NaN check
2020
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
2021
- };
2022
-
2023
- var call$1 = functionCall;
2024
- var anObject$1 = anObject$8;
2025
- var isCallable = isCallable$g;
2026
- var classof = classofRaw$2;
2027
- var regexpExec = regexpExec$2;
2028
-
2029
- var $TypeError = TypeError;
2030
-
2031
- // `RegExpExec` abstract operation
2032
- // https://tc39.es/ecma262/#sec-regexpexec
2033
- var regexpExecAbstract = function (R, S) {
2034
- var exec = R.exec;
2035
- if (isCallable(exec)) {
2036
- var result = call$1(exec, R, S);
2037
- if (result !== null) anObject$1(result);
2038
- return result;
2039
- }
2040
- if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
2041
- throw $TypeError('RegExp#exec called on incompatible receiver');
2042
- };
2043
-
2044
- var call = functionCall;
2045
- var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2046
- var anObject = anObject$8;
2047
- var isNullOrUndefined = isNullOrUndefined$3;
2048
- var requireObjectCoercible = requireObjectCoercible$3;
2049
- var sameValue = sameValue$1;
2050
- var toString = toString$2;
2051
- var getMethod = getMethod$2;
2052
- var regExpExec = regexpExecAbstract;
2053
-
2054
- // @@search logic
2055
- fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
2056
- return [
2057
- // `String.prototype.search` method
2058
- // https://tc39.es/ecma262/#sec-string.prototype.search
2059
- function search(regexp) {
2060
- var O = requireObjectCoercible(this);
2061
- var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);
2062
- return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
2063
- },
2064
- // `RegExp.prototype[@@search]` method
2065
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
2066
- function (string) {
2067
- var rx = anObject(this);
2068
- var S = toString(string);
2069
- var res = maybeCallNative(nativeSearch, rx, S);
2070
-
2071
- if (res.done) return res.value;
2072
-
2073
- var previousLastIndex = rx.lastIndex;
2074
- if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
2075
- var result = regExpExec(rx, S);
2076
- if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
2077
- return result === null ? -1 : result.index;
2078
- }
2079
- ];
2080
- });
8
+ const AssetSortingContext = createContext(null);
9
+ const AssetSortingProvider = (props) => jsx(AssetSortingContext.Provider, Object.assign({}, props));
10
+ const useAssetSorting = () => {
11
+ const context = useContext(AssetSortingContext);
12
+ if (!context) {
13
+ throw new Error("useAssetSorting must be used within a AssetSortingProvider");
14
+ }
15
+ return context;
16
+ };
17
+
18
+ const DeveloperSettingsContext = React.createContext({
19
+ localFeatureFlagsEnabled: false,
20
+ });
21
+ const useDeveloperSettings = () => {
22
+ const context = React.useContext(DeveloperSettingsContext);
23
+ if (!context) {
24
+ throw new Error("useDeveloperSettingsContext must be used within DeveloperSettingsProvider");
25
+ }
26
+ return context;
27
+ };
28
+ const DeveloperSettingsProvider = ({ value, children }) => {
29
+ const launchdarklyFlags = useFlags();
30
+ const [localFeatureFlagsEnabled, setLocalFeatureFlagsEnabled] = React.useState(false);
31
+ const [localFeatureFlags, setLocalFeatureFlags] = React.useState();
32
+ React.useEffect(() => {
33
+ if (!localFeatureFlagsEnabled) {
34
+ setLocalFeatureFlags(launchdarklyFlags);
35
+ }
36
+ }, [launchdarklyFlags, localFeatureFlagsEnabled]);
37
+ return (jsx(DeveloperSettingsContext.Provider, Object.assign({ value: value !== null && value !== void 0 ? value : {
38
+ localFeatureFlagsEnabled,
39
+ enableLocalFeatureFlags: setLocalFeatureFlagsEnabled,
40
+ localFeatureFlags,
41
+ launchdarklyFlags,
42
+ setFlags: setLocalFeatureFlags,
43
+ } }, { children: children })));
44
+ };
45
+
46
+ const EnvironmentContext = createContext(null);
47
+ const EnvironmentContextProvider = (props) => {
48
+ return jsx(EnvironmentContext.Provider, Object.assign({}, props));
49
+ };
50
+ const useEnvironment = () => {
51
+ const context = useContext(EnvironmentContext);
52
+ if (!context) {
53
+ throw new Error("useEnvironment must be used within an EnvironmentContext");
54
+ }
55
+ return context;
56
+ };
57
+
58
+ const GlobalSelectionContext = React.createContext(null);
59
+ const useGlobalSelection = () => {
60
+ const context = React.useContext(GlobalSelectionContext);
61
+ if (!context) {
62
+ throw new Error("useGlobalSelection must be used within the GlobalSelectionContext");
63
+ }
64
+ return context;
65
+ };
66
+ const GlobalSelectionProvider = (props) => jsx(GlobalSelectionContext.Provider, Object.assign({}, props));
2081
67
 
2082
68
  /**
2083
69
  * A react hook for notifying host about location change
2084
70
  *
2085
- */
2086
- const useURLSynchronization = () => {
2087
- const location = useLocation();
2088
- React__default.useEffect(() => {
2089
- const deepLink = {
2090
- path: location.pathname,
2091
- search: location.search,
2092
- hash: location.hash,
2093
- pathname: ""
2094
- };
2095
- NavigationRuntime.setDeepLink(deepLink);
2096
- }, [location]);
71
+ */
72
+ const useURLSynchronization = () => {
73
+ const location = useLocation();
74
+ React__default.useEffect(() => {
75
+ const deepLink = {
76
+ path: location.pathname,
77
+ search: location.search,
78
+ hash: location.hash,
79
+ pathname: "",
80
+ };
81
+ NavigationRuntime.setDeepLink(deepLink);
82
+ }, [location]);
2097
83
  };
2098
84
 
2099
85
  /**
2100
86
  * A hook to expose asset runtime for React components
2101
87
  *
2102
88
  * @returns {UseAssetRuntime} assetRuntime
2103
- */
2104
- const useAssetRuntime = () => {
2105
- return AssetRuntime;
89
+ */
90
+ const useAssetRuntime = () => {
91
+ return AssetRuntime;
2106
92
  };
2107
93
 
2108
94
  /**
2109
95
  * A hook to expose custom field runtime methods
2110
96
  *
2111
97
  * @returns {UseCustomFieldRuntime} CustomFieldRuntime
2112
- */
2113
- const useCustomFieldRuntime = () => {
2114
- return CustomFieldRuntime;
98
+ */
99
+ const useCustomFieldRuntime = () => {
100
+ return CustomFieldRuntime;
2115
101
  };
2116
102
 
2117
103
  /**
2118
104
  * A hook to expose rest runtime to be used in React components
2119
105
  *
2120
106
  * @returns {UseRestRuntime} a RestRuntime
2121
- */
2122
- const useRestRuntime = () => {
2123
- return RestRuntime;
2124
- };
2125
-
2126
- const UserSubscriptionContext = /*#__PURE__*/React.createContext(null);
2127
- const UserSubscriptionProvider = props => {
2128
- return jsx(UserSubscriptionContext.Provider, Object.assign({}, props));
2129
- };
2130
- const useUserSubscription = () => {
2131
- const context = React.useContext(UserSubscriptionContext);
2132
- if (!context) {
2133
- throw new Error("Cannot use useUserSubscription outside UserSubscriptionProvider");
2134
- }
2135
- return context;
2136
- };
2137
-
2138
- const ToastContext = /*#__PURE__*/React.createContext(null);
2139
- const ToastProvider = props => jsx(ToastContext.Provider, Object.assign({}, props));
2140
- const useToast = () => {
2141
- const toastContext = React.useContext(ToastContext);
2142
- if (!toastContext) {
2143
- throw new Error("useToast must be used within the ToastProvider");
2144
- }
2145
- return toastContext;
2146
- };
2147
-
2148
- const TokenContext = /*#__PURE__*/React.createContext(null);
2149
- const useToken = () => {
2150
- const context = React.useContext(TokenContext);
2151
- if (!context) {
2152
- throw new Error("useToken must be used within the TokenContext");
2153
- }
2154
- return context;
2155
- };
2156
- const TokenProvider = props => {
2157
- return jsx(TokenContext.Provider, Object.assign({}, props));
2158
- };
2159
-
2160
- const CurrentUserContext = /*#__PURE__*/React.createContext(null);
2161
- const CurrentUserProvider = props => {
2162
- return jsx(CurrentUserContext.Provider, Object.assign({}, props));
2163
- };
2164
- const useCurrentUser = () => {
2165
- const context = React.useContext(CurrentUserContext);
2166
- if (!context) {
2167
- throw new Error("useCurrentUser must be used within the CurrentUserProvider");
2168
- }
2169
- return context;
107
+ */
108
+ const useRestRuntime = () => {
109
+ return RestRuntime;
110
+ };
111
+
112
+ const UserSubscriptionContext = React.createContext(null);
113
+ const UserSubscriptionProvider = (props) => {
114
+ return jsx(UserSubscriptionContext.Provider, Object.assign({}, props));
115
+ };
116
+ const useUserSubscription = () => {
117
+ const context = React.useContext(UserSubscriptionContext);
118
+ if (!context) {
119
+ throw new Error("Cannot use useUserSubscription outside UserSubscriptionProvider");
120
+ }
121
+ return context;
122
+ };
123
+
124
+ const ToastContext = React.createContext(null);
125
+ const ToastProvider = (props) => jsx(ToastContext.Provider, Object.assign({}, props));
126
+ const useToast = () => {
127
+ const toastContext = React.useContext(ToastContext);
128
+ if (!toastContext) {
129
+ throw new Error("useToast must be used within the ToastProvider");
130
+ }
131
+ return toastContext;
132
+ };
133
+
134
+ const TokenContext = React.createContext(null);
135
+ const useToken = () => {
136
+ const context = React.useContext(TokenContext);
137
+ if (!context) {
138
+ throw new Error("useToken must be used within the TokenContext");
139
+ }
140
+ return context;
141
+ };
142
+ const TokenProvider = (props) => {
143
+ return jsx(TokenContext.Provider, Object.assign({}, props));
144
+ };
145
+
146
+ const CurrentUserContext = React.createContext(null);
147
+ const CurrentUserProvider = (props) => {
148
+ return jsx(CurrentUserContext.Provider, Object.assign({}, props));
149
+ };
150
+ const useCurrentUser = () => {
151
+ const context = React.useContext(CurrentUserContext);
152
+ if (!context) {
153
+ throw new Error("useCurrentUser must be used within the CurrentUserProvider");
154
+ }
155
+ return context;
2170
156
  };
2171
157
 
2172
158
  export { AssetSortingProvider, CurrentUserProvider, DeveloperSettingsContext, DeveloperSettingsProvider, EnvironmentContextProvider, GlobalSelectionProvider, ToastProvider, TokenProvider, UserSubscriptionProvider, useAssetRuntime, useAssetSorting, useCurrentUser, useCustomFieldRuntime, useDeveloperSettings, useEnvironment, useGlobalSelection, useRestRuntime, useToast, useToken, useURLSynchronization, useUserSubscription };