@entur-partner/app-shell 2.4.6 → 2.4.8

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.
@@ -7,328 +7,53 @@ import { assertIsDefined } from '@entur-partner/util';
7
7
  import { getColorForEnvironment, Environment, OrganisationDropDown } from '@entur-partner/common';
8
8
  import createAuth0Client from '@auth0/auth0-spa-js';
9
9
 
10
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
11
- try {
12
- var info = gen[key](arg);
13
- var value = info.value;
14
- } catch (error) {
15
- reject(error);
16
- return;
17
- }
18
-
19
- if (info.done) {
20
- resolve(value);
21
- } else {
22
- Promise.resolve(value).then(_next, _throw);
23
- }
24
- }
25
-
26
- function _asyncToGenerator(fn) {
27
- return function () {
28
- var self = this,
29
- args = arguments;
30
- return new Promise(function (resolve, reject) {
31
- var gen = fn.apply(self, args);
32
-
33
- function _next(value) {
34
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
35
- }
36
-
37
- function _throw(err) {
38
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
39
- }
10
+ function _regeneratorRuntime() {
11
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
40
12
 
41
- _next(undefined);
42
- });
43
- };
44
- }
45
-
46
- function _extends() {
47
- _extends = Object.assign || function (target) {
48
- for (var i = 1; i < arguments.length; i++) {
49
- var source = arguments[i];
50
-
51
- for (var key in source) {
52
- if (Object.prototype.hasOwnProperty.call(source, key)) {
53
- target[key] = source[key];
54
- }
55
- }
56
- }
57
-
58
- return target;
13
+ _regeneratorRuntime = function () {
14
+ return exports;
59
15
  };
60
16
 
61
- return _extends.apply(this, arguments);
62
- }
63
-
64
- function _objectWithoutPropertiesLoose(source, excluded) {
65
- if (source == null) return {};
66
- var target = {};
67
- var sourceKeys = Object.keys(source);
68
- var key, i;
69
-
70
- for (i = 0; i < sourceKeys.length; i++) {
71
- key = sourceKeys[i];
72
- if (excluded.indexOf(key) >= 0) continue;
73
- target[key] = source[key];
17
+ var exports = {},
18
+ Op = Object.prototype,
19
+ hasOwn = Op.hasOwnProperty,
20
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
21
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
22
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
23
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
24
+
25
+ function define(obj, key, value) {
26
+ return Object.defineProperty(obj, key, {
27
+ value: value,
28
+ enumerable: !0,
29
+ configurable: !0,
30
+ writable: !0
31
+ }), obj[key];
74
32
  }
75
33
 
76
- return target;
77
- }
78
-
79
- var runtime = {exports: {}};
80
-
81
- /**
82
- * Copyright (c) 2014-present, Facebook, Inc.
83
- *
84
- * This source code is licensed under the MIT license found in the
85
- * LICENSE file in the root directory of this source tree.
86
- */
87
-
88
- (function (module) {
89
- var runtime = /*#__PURE__*/function (exports) {
90
-
91
- var Op = Object.prototype;
92
- var hasOwn = Op.hasOwnProperty;
93
- var undefined$1; // More compressible than void 0.
94
-
95
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
96
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
97
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
98
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
99
-
100
- function define(obj, key, value) {
101
- Object.defineProperty(obj, key, {
102
- value: value,
103
- enumerable: true,
104
- configurable: true,
105
- writable: true
106
- });
107
- return obj[key];
108
- }
109
-
110
- try {
111
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
112
- define({}, "");
113
- } catch (err) {
114
- define = function define(obj, key, value) {
115
- return obj[key] = value;
116
- };
117
- }
118
-
119
- function wrap(innerFn, outerFn, self, tryLocsList) {
120
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
121
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
122
- var generator = Object.create(protoGenerator.prototype);
123
- var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
124
- // .throw, and .return methods.
125
-
126
- generator._invoke = makeInvokeMethod(innerFn, self, context);
127
- return generator;
128
- }
129
-
130
- exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
131
- // record like context.tryEntries[i].completion. This interface could
132
- // have been (and was previously) designed to take a closure to be
133
- // invoked without arguments, but in all the cases we care about we
134
- // already have an existing method we want to call, so there's no need
135
- // to create a new function object. We can even get away with assuming
136
- // the method takes exactly one argument, since that happens to be true
137
- // in every case, so we don't have to touch the arguments object. The
138
- // only additional allocation required is the completion record, which
139
- // has a stable shape and so hopefully should be cheap to allocate.
140
-
141
- function tryCatch(fn, obj, arg) {
142
- try {
143
- return {
144
- type: "normal",
145
- arg: fn.call(obj, arg)
146
- };
147
- } catch (err) {
148
- return {
149
- type: "throw",
150
- arg: err
151
- };
152
- }
153
- }
154
-
155
- var GenStateSuspendedStart = "suspendedStart";
156
- var GenStateSuspendedYield = "suspendedYield";
157
- var GenStateExecuting = "executing";
158
- var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
159
- // breaking out of the dispatch switch statement.
160
-
161
- var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
162
- // .constructor.prototype properties for functions that return Generator
163
- // objects. For full spec compliance, you may wish to configure your
164
- // minifier not to mangle the names of these two functions.
165
-
166
- function Generator() {}
167
-
168
- function GeneratorFunction() {}
169
-
170
- function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
171
- // don't natively support it.
172
-
173
-
174
- var IteratorPrototype = {};
175
- define(IteratorPrototype, iteratorSymbol, function () {
176
- return this;
177
- });
178
- var getProto = Object.getPrototypeOf;
179
- var NativeIteratorPrototype = getProto && /*#__PURE__*/getProto( /*#__PURE__*/getProto( /*#__PURE__*/values([])));
180
-
181
- if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
182
- // This environment has a native %IteratorPrototype%; use it instead
183
- // of the polyfill.
184
- IteratorPrototype = NativeIteratorPrototype;
185
- }
186
-
187
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = /*#__PURE__*/Object.create(IteratorPrototype);
188
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
189
- define(Gp, "constructor", GeneratorFunctionPrototype);
190
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
191
- GeneratorFunction.displayName = /*#__PURE__*/define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
192
- // Iterator interface in terms of a single ._invoke method.
193
-
194
- function defineIteratorMethods(prototype) {
195
- ["next", "throw", "return"].forEach(function (method) {
196
- define(prototype, method, function (arg) {
197
- return this._invoke(method, arg);
198
- });
199
- });
200
- }
201
-
202
- exports.isGeneratorFunction = function (genFun) {
203
- var ctor = typeof genFun === "function" && genFun.constructor;
204
- return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
205
- // do is to check its .name property.
206
- (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
207
- };
208
-
209
- exports.mark = function (genFun) {
210
- if (Object.setPrototypeOf) {
211
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
212
- } else {
213
- genFun.__proto__ = GeneratorFunctionPrototype;
214
- define(genFun, toStringTagSymbol, "GeneratorFunction");
215
- }
216
-
217
- genFun.prototype = Object.create(Gp);
218
- return genFun;
219
- }; // Within the body of any async function, `await x` is transformed to
220
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
221
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
222
- // meant to be awaited.
223
-
224
-
225
- exports.awrap = function (arg) {
226
- return {
227
- __await: arg
228
- };
229
- };
230
-
231
- function AsyncIterator(generator, PromiseImpl) {
232
- function invoke(method, arg, resolve, reject) {
233
- var record = tryCatch(generator[method], generator, arg);
234
-
235
- if (record.type === "throw") {
236
- reject(record.arg);
237
- } else {
238
- var result = record.arg;
239
- var value = result.value;
240
-
241
- if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
242
- return PromiseImpl.resolve(value.__await).then(function (value) {
243
- invoke("next", value, resolve, reject);
244
- }, function (err) {
245
- invoke("throw", err, resolve, reject);
246
- });
247
- }
248
-
249
- return PromiseImpl.resolve(value).then(function (unwrapped) {
250
- // When a yielded Promise is resolved, its final value becomes
251
- // the .value of the Promise<{value,done}> result for the
252
- // current iteration.
253
- result.value = unwrapped;
254
- resolve(result);
255
- }, function (error) {
256
- // If a rejected Promise was yielded, throw the rejection back
257
- // into the async generator function so it can be handled there.
258
- return invoke("throw", error, resolve, reject);
259
- });
260
- }
261
- }
262
-
263
- var previousPromise;
264
-
265
- function enqueue(method, arg) {
266
- function callInvokeWithMethodAndArg() {
267
- return new PromiseImpl(function (resolve, reject) {
268
- invoke(method, arg, resolve, reject);
269
- });
270
- }
271
-
272
- return previousPromise = // If enqueue has been called before, then we want to wait until
273
- // all previous Promises have been resolved before calling invoke,
274
- // so that results are always delivered in the correct order. If
275
- // enqueue has not been called before, then it is important to
276
- // call invoke immediately, without waiting on a callback to fire,
277
- // so that the async generator function has the opportunity to do
278
- // any necessary setup in a predictable way. This predictability
279
- // is why the Promise constructor synchronously invokes its
280
- // executor callback, and why async functions synchronously
281
- // execute code before the first await. Since we implement simple
282
- // async functions in terms of async generators, it is especially
283
- // important to get this right, even though it requires care.
284
- previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
285
- // invocations of the iterator.
286
- callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
287
- } // Define the unified helper method that is used to implement .next,
288
- // .throw, and .return (see defineIteratorMethods).
289
-
290
-
291
- this._invoke = enqueue;
292
- }
293
-
294
- defineIteratorMethods(AsyncIterator.prototype);
295
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
296
- return this;
297
- });
298
- exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
299
- // AsyncIterator objects; they just return a Promise for the value of
300
- // the final result produced by the iterator.
301
-
302
- exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
303
- if (PromiseImpl === void 0) PromiseImpl = Promise;
304
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
305
- return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
306
- : iter.next().then(function (result) {
307
- return result.done ? result.value : iter.next();
308
- });
34
+ try {
35
+ define({}, "");
36
+ } catch (err) {
37
+ define = function (obj, key, value) {
38
+ return obj[key] = value;
309
39
  };
40
+ }
310
41
 
311
- function makeInvokeMethod(innerFn, self, context) {
312
- var state = GenStateSuspendedStart;
313
- return function invoke(method, arg) {
314
- if (state === GenStateExecuting) {
315
- throw new Error("Generator is already running");
316
- }
317
-
318
- if (state === GenStateCompleted) {
319
- if (method === "throw") {
320
- throw arg;
321
- } // Be forgiving, per 25.3.3.3.3 of the spec:
322
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
323
-
324
-
42
+ function wrap(innerFn, outerFn, self, tryLocsList) {
43
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
44
+ generator = Object.create(protoGenerator.prototype),
45
+ context = new Context(tryLocsList || []);
46
+ return generator._invoke = function (innerFn, self, context) {
47
+ var state = "suspendedStart";
48
+ return function (method, arg) {
49
+ if ("executing" === state) throw new Error("Generator is already running");
50
+
51
+ if ("completed" === state) {
52
+ if ("throw" === method) throw arg;
325
53
  return doneResult();
326
54
  }
327
55
 
328
- context.method = method;
329
- context.arg = arg;
330
-
331
- while (true) {
56
+ for (context.method = method, context.arg = arg;;) {
332
57
  var delegate = context.delegate;
333
58
 
334
59
  if (delegate) {
@@ -340,471 +65,360 @@ var runtime = {exports: {}};
340
65
  }
341
66
  }
342
67
 
343
- if (context.method === "next") {
344
- // Setting context._sent for legacy support of Babel's
345
- // function.sent implementation.
346
- context.sent = context._sent = context.arg;
347
- } else if (context.method === "throw") {
348
- if (state === GenStateSuspendedStart) {
349
- state = GenStateCompleted;
350
- throw context.arg;
351
- }
352
-
68
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
69
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
353
70
  context.dispatchException(context.arg);
354
- } else if (context.method === "return") {
355
- context.abrupt("return", context.arg);
356
- }
357
-
358
- state = GenStateExecuting;
71
+ } else "return" === context.method && context.abrupt("return", context.arg);
72
+ state = "executing";
359
73
  var record = tryCatch(innerFn, self, context);
360
74
 
361
- if (record.type === "normal") {
362
- // If an exception is thrown from innerFn, we leave state ===
363
- // GenStateExecuting and loop back for another invocation.
364
- state = context.done ? GenStateCompleted : GenStateSuspendedYield;
365
-
366
- if (record.arg === ContinueSentinel) {
367
- continue;
368
- }
369
-
75
+ if ("normal" === record.type) {
76
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
370
77
  return {
371
78
  value: record.arg,
372
79
  done: context.done
373
80
  };
374
- } else if (record.type === "throw") {
375
- state = GenStateCompleted; // Dispatch the exception by looping back around to the
376
- // context.dispatchException(context.arg) call above.
377
-
378
- context.method = "throw";
379
- context.arg = record.arg;
380
- }
381
- }
382
- };
383
- } // Call delegate.iterator[context.method](context.arg) and handle the
384
- // result, either by returning a { value, done } result from the
385
- // delegate iterator, or by modifying context.method and context.arg,
386
- // setting context.delegate to null, and returning the ContinueSentinel.
387
-
388
-
389
- function maybeInvokeDelegate(delegate, context) {
390
- var method = delegate.iterator[context.method];
391
-
392
- if (method === undefined$1) {
393
- // A .throw or .return when the delegate iterator has no .throw
394
- // method always terminates the yield* loop.
395
- context.delegate = null;
396
-
397
- if (context.method === "throw") {
398
- // Note: ["return"] must be used for ES3 parsing compatibility.
399
- if (delegate.iterator["return"]) {
400
- // If the delegate iterator has a return method, give it a
401
- // chance to clean up.
402
- context.method = "return";
403
- context.arg = undefined$1;
404
- maybeInvokeDelegate(delegate, context);
405
-
406
- if (context.method === "throw") {
407
- // If maybeInvokeDelegate(context) changed context.method from
408
- // "return" to "throw", let that override the TypeError below.
409
- return ContinueSentinel;
410
- }
411
81
  }
412
82
 
413
- context.method = "throw";
414
- context.arg = new TypeError("The iterator does not provide a 'throw' method");
83
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
415
84
  }
85
+ };
86
+ }(innerFn, self, context), generator;
87
+ }
416
88
 
417
- return ContinueSentinel;
418
- }
419
-
420
- var record = tryCatch(method, delegate.iterator, context.arg);
421
-
422
- if (record.type === "throw") {
423
- context.method = "throw";
424
- context.arg = record.arg;
425
- context.delegate = null;
426
- return ContinueSentinel;
427
- }
428
-
429
- var info = record.arg;
430
-
431
- if (!info) {
432
- context.method = "throw";
433
- context.arg = new TypeError("iterator result is not an object");
434
- context.delegate = null;
435
- return ContinueSentinel;
436
- }
437
-
438
- if (info.done) {
439
- // Assign the result of the finished delegate to the temporary
440
- // variable specified by delegate.resultName (see delegateYield).
441
- context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
442
-
443
- context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
444
- // exception, let the outer generator proceed normally. If
445
- // context.method was "next", forget context.arg since it has been
446
- // "consumed" by the delegate iterator. If context.method was
447
- // "return", allow the original .return call to continue in the
448
- // outer generator.
449
-
450
- if (context.method !== "return") {
451
- context.method = "next";
452
- context.arg = undefined$1;
453
- }
454
- } else {
455
- // Re-yield the result returned by the delegate method.
456
- return info;
457
- } // The delegate iterator is finished, so forget it and continue with
458
- // the outer generator.
89
+ function tryCatch(fn, obj, arg) {
90
+ try {
91
+ return {
92
+ type: "normal",
93
+ arg: fn.call(obj, arg)
94
+ };
95
+ } catch (err) {
96
+ return {
97
+ type: "throw",
98
+ arg: err
99
+ };
100
+ }
101
+ }
459
102
 
103
+ exports.wrap = wrap;
104
+ var ContinueSentinel = {};
460
105
 
461
- context.delegate = null;
462
- return ContinueSentinel;
463
- } // Define Generator.prototype.{next,throw,return} in terms of the
464
- // unified ._invoke helper method.
106
+ function Generator() {}
465
107
 
108
+ function GeneratorFunction() {}
466
109
 
467
- defineIteratorMethods(Gp);
468
- define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
469
- // @@iterator function is called on it. Some browsers' implementations of the
470
- // iterator prototype chain incorrectly implement this, causing the Generator
471
- // object to not be returned from this call. This ensures that doesn't happen.
472
- // See https://github.com/facebook/regenerator/issues/274 for more details.
110
+ function GeneratorFunctionPrototype() {}
473
111
 
474
- define(Gp, iteratorSymbol, function () {
475
- return this;
476
- });
477
- define(Gp, "toString", function () {
478
- return "[object Generator]";
112
+ var IteratorPrototype = {};
113
+ define(IteratorPrototype, iteratorSymbol, function () {
114
+ return this;
115
+ });
116
+ var getProto = Object.getPrototypeOf,
117
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
118
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
119
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
120
+
121
+ function defineIteratorMethods(prototype) {
122
+ ["next", "throw", "return"].forEach(function (method) {
123
+ define(prototype, method, function (arg) {
124
+ return this._invoke(method, arg);
125
+ });
479
126
  });
127
+ }
480
128
 
481
- function pushTryEntry(locs) {
482
- var entry = {
483
- tryLoc: locs[0]
484
- };
485
-
486
- if (1 in locs) {
487
- entry.catchLoc = locs[1];
488
- }
489
-
490
- if (2 in locs) {
491
- entry.finallyLoc = locs[2];
492
- entry.afterLoc = locs[3];
129
+ function AsyncIterator(generator, PromiseImpl) {
130
+ function invoke(method, arg, resolve, reject) {
131
+ var record = tryCatch(generator[method], generator, arg);
132
+
133
+ if ("throw" !== record.type) {
134
+ var result = record.arg,
135
+ value = result.value;
136
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
137
+ invoke("next", value, resolve, reject);
138
+ }, function (err) {
139
+ invoke("throw", err, resolve, reject);
140
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
141
+ result.value = unwrapped, resolve(result);
142
+ }, function (error) {
143
+ return invoke("throw", error, resolve, reject);
144
+ });
493
145
  }
494
146
 
495
- this.tryEntries.push(entry);
496
- }
497
-
498
- function resetTryEntry(entry) {
499
- var record = entry.completion || {};
500
- record.type = "normal";
501
- delete record.arg;
502
- entry.completion = record;
503
- }
504
-
505
- function Context(tryLocsList) {
506
- // The root entry object (effectively a try statement without a catch
507
- // or a finally block) gives us a place to store values thrown from
508
- // locations where there is no enclosing try statement.
509
- this.tryEntries = [{
510
- tryLoc: "root"
511
- }];
512
- tryLocsList.forEach(pushTryEntry, this);
513
- this.reset(true);
147
+ reject(record.arg);
514
148
  }
515
149
 
516
- exports.keys = function (object) {
517
- var keys = [];
150
+ var previousPromise;
518
151
 
519
- for (var key in object) {
520
- keys.push(key);
152
+ this._invoke = function (method, arg) {
153
+ function callInvokeWithMethodAndArg() {
154
+ return new PromiseImpl(function (resolve, reject) {
155
+ invoke(method, arg, resolve, reject);
156
+ });
521
157
  }
522
158
 
523
- keys.reverse(); // Rather than returning an object with a next method, we keep
524
- // things simple and return the next function itself.
525
-
526
- return function next() {
527
- while (keys.length) {
528
- var key = keys.pop();
529
-
530
- if (key in object) {
531
- next.value = key;
532
- next.done = false;
533
- return next;
534
- }
535
- } // To avoid creating an additional object, we just hang the .value
536
- // and .done properties off the next function object itself. This
537
- // also ensures that the minifier will not anonymize the function.
538
-
539
-
540
- next.done = true;
541
- return next;
542
- };
159
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
543
160
  };
161
+ }
544
162
 
545
- function values(iterable) {
546
- if (iterable) {
547
- var iteratorMethod = iterable[iteratorSymbol];
548
-
549
- if (iteratorMethod) {
550
- return iteratorMethod.call(iterable);
551
- }
552
-
553
- if (typeof iterable.next === "function") {
554
- return iterable;
555
- }
556
-
557
- if (!isNaN(iterable.length)) {
558
- var i = -1,
559
- next = function next() {
560
- while (++i < iterable.length) {
561
- if (hasOwn.call(iterable, i)) {
562
- next.value = iterable[i];
563
- next.done = false;
564
- return next;
565
- }
566
- }
567
-
568
- next.value = undefined$1;
569
- next.done = true;
570
- return next;
571
- };
572
-
573
- return next.next = next;
574
- }
575
- } // Return an iterator with no values.
163
+ function maybeInvokeDelegate(delegate, context) {
164
+ var method = delegate.iterator[context.method];
576
165
 
166
+ if (undefined === method) {
167
+ if (context.delegate = null, "throw" === context.method) {
168
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
169
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
170
+ }
577
171
 
578
- return {
579
- next: doneResult
580
- };
172
+ return ContinueSentinel;
581
173
  }
582
174
 
583
- exports.values = values;
175
+ var record = tryCatch(method, delegate.iterator, context.arg);
176
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
177
+ var info = record.arg;
178
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
179
+ }
584
180
 
585
- function doneResult() {
586
- return {
587
- value: undefined$1,
588
- done: true
589
- };
590
- }
181
+ function pushTryEntry(locs) {
182
+ var entry = {
183
+ tryLoc: locs[0]
184
+ };
185
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
186
+ }
591
187
 
592
- Context.prototype = {
593
- constructor: Context,
594
- reset: function reset(skipTempReset) {
595
- this.prev = 0;
596
- this.next = 0; // Resetting context._sent for legacy support of Babel's
597
- // function.sent implementation.
598
-
599
- this.sent = this._sent = undefined$1;
600
- this.done = false;
601
- this.delegate = null;
602
- this.method = "next";
603
- this.arg = undefined$1;
604
- this.tryEntries.forEach(resetTryEntry);
605
-
606
- if (!skipTempReset) {
607
- for (var name in this) {
608
- // Not sure about the optimal order of these conditions:
609
- if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
610
- this[name] = undefined$1;
611
- }
612
- }
613
- }
614
- },
615
- stop: function stop() {
616
- this.done = true;
617
- var rootEntry = this.tryEntries[0];
618
- var rootRecord = rootEntry.completion;
188
+ function resetTryEntry(entry) {
189
+ var record = entry.completion || {};
190
+ record.type = "normal", delete record.arg, entry.completion = record;
191
+ }
619
192
 
620
- if (rootRecord.type === "throw") {
621
- throw rootRecord.arg;
622
- }
193
+ function Context(tryLocsList) {
194
+ this.tryEntries = [{
195
+ tryLoc: "root"
196
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
197
+ }
623
198
 
624
- return this.rval;
625
- },
626
- dispatchException: function dispatchException(exception) {
627
- if (this.done) {
628
- throw exception;
629
- }
199
+ function values(iterable) {
200
+ if (iterable) {
201
+ var iteratorMethod = iterable[iteratorSymbol];
202
+ if (iteratorMethod) return iteratorMethod.call(iterable);
203
+ if ("function" == typeof iterable.next) return iterable;
630
204
 
631
- var context = this;
205
+ if (!isNaN(iterable.length)) {
206
+ var i = -1,
207
+ next = function next() {
208
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
632
209
 
633
- function handle(loc, caught) {
634
- record.type = "throw";
635
- record.arg = exception;
636
- context.next = loc;
210
+ return next.value = undefined, next.done = !0, next;
211
+ };
637
212
 
638
- if (caught) {
639
- // If the dispatched exception was caught by a catch block,
640
- // then let that catch block handle the exception normally.
641
- context.method = "next";
642
- context.arg = undefined$1;
643
- }
213
+ return next.next = next;
214
+ }
215
+ }
644
216
 
645
- return !!caught;
646
- }
217
+ return {
218
+ next: doneResult
219
+ };
220
+ }
647
221
 
648
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
649
- var entry = this.tryEntries[i];
650
- var record = entry.completion;
222
+ function doneResult() {
223
+ return {
224
+ value: undefined,
225
+ done: !0
226
+ };
227
+ }
651
228
 
652
- if (entry.tryLoc === "root") {
653
- // Exception thrown outside of any try block that could handle
654
- // it, so set the completion value of the entire function to
655
- // throw the exception.
656
- return handle("end");
657
- }
229
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
230
+ var ctor = "function" == typeof genFun && genFun.constructor;
231
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
232
+ }, exports.mark = function (genFun) {
233
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
234
+ }, exports.awrap = function (arg) {
235
+ return {
236
+ __await: arg
237
+ };
238
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
239
+ return this;
240
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
241
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
242
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
243
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
244
+ return result.done ? result.value : iter.next();
245
+ });
246
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
247
+ return this;
248
+ }), define(Gp, "toString", function () {
249
+ return "[object Generator]";
250
+ }), exports.keys = function (object) {
251
+ var keys = [];
252
+
253
+ for (var key in object) keys.push(key);
254
+
255
+ return keys.reverse(), function next() {
256
+ for (; keys.length;) {
257
+ var key = keys.pop();
258
+ if (key in object) return next.value = key, next.done = !1, next;
259
+ }
658
260
 
659
- if (entry.tryLoc <= this.prev) {
660
- var hasCatch = hasOwn.call(entry, "catchLoc");
661
- var hasFinally = hasOwn.call(entry, "finallyLoc");
261
+ return next.done = !0, next;
262
+ };
263
+ }, exports.values = values, Context.prototype = {
264
+ constructor: Context,
265
+ reset: function (skipTempReset) {
266
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
267
+ },
268
+ stop: function () {
269
+ this.done = !0;
270
+ var rootRecord = this.tryEntries[0].completion;
271
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
272
+ return this.rval;
273
+ },
274
+ dispatchException: function (exception) {
275
+ if (this.done) throw exception;
276
+ var context = this;
662
277
 
663
- if (hasCatch && hasFinally) {
664
- if (this.prev < entry.catchLoc) {
665
- return handle(entry.catchLoc, true);
666
- } else if (this.prev < entry.finallyLoc) {
667
- return handle(entry.finallyLoc);
668
- }
669
- } else if (hasCatch) {
670
- if (this.prev < entry.catchLoc) {
671
- return handle(entry.catchLoc, true);
672
- }
673
- } else if (hasFinally) {
674
- if (this.prev < entry.finallyLoc) {
675
- return handle(entry.finallyLoc);
676
- }
677
- } else {
678
- throw new Error("try statement without catch or finally");
679
- }
680
- }
681
- }
682
- },
683
- abrupt: function abrupt(type, arg) {
684
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
685
- var entry = this.tryEntries[i];
278
+ function handle(loc, caught) {
279
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
280
+ }
686
281
 
687
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
688
- var finallyEntry = entry;
689
- break;
282
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
283
+ var entry = this.tryEntries[i],
284
+ record = entry.completion;
285
+ if ("root" === entry.tryLoc) return handle("end");
286
+
287
+ if (entry.tryLoc <= this.prev) {
288
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
289
+ hasFinally = hasOwn.call(entry, "finallyLoc");
290
+
291
+ if (hasCatch && hasFinally) {
292
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
293
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
294
+ } else if (hasCatch) {
295
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
296
+ } else {
297
+ if (!hasFinally) throw new Error("try statement without catch or finally");
298
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
690
299
  }
691
300
  }
301
+ }
302
+ },
303
+ abrupt: function (type, arg) {
304
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
305
+ var entry = this.tryEntries[i];
692
306
 
693
- if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
694
- // Ignore the finally entry if control is not jumping to a
695
- // location outside the try/catch block.
696
- finallyEntry = null;
307
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
308
+ var finallyEntry = entry;
309
+ break;
697
310
  }
311
+ }
698
312
 
699
- var record = finallyEntry ? finallyEntry.completion : {};
700
- record.type = type;
701
- record.arg = arg;
313
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
314
+ var record = finallyEntry ? finallyEntry.completion : {};
315
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
316
+ },
317
+ complete: function (record, afterLoc) {
318
+ if ("throw" === record.type) throw record.arg;
319
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
320
+ },
321
+ finish: function (finallyLoc) {
322
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
323
+ var entry = this.tryEntries[i];
324
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
325
+ }
326
+ },
327
+ catch: function (tryLoc) {
328
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
329
+ var entry = this.tryEntries[i];
702
330
 
703
- if (finallyEntry) {
704
- this.method = "next";
705
- this.next = finallyEntry.finallyLoc;
706
- return ContinueSentinel;
707
- }
331
+ if (entry.tryLoc === tryLoc) {
332
+ var record = entry.completion;
708
333
 
709
- return this.complete(record);
710
- },
711
- complete: function complete(record, afterLoc) {
712
- if (record.type === "throw") {
713
- throw record.arg;
714
- }
334
+ if ("throw" === record.type) {
335
+ var thrown = record.arg;
336
+ resetTryEntry(entry);
337
+ }
715
338
 
716
- if (record.type === "break" || record.type === "continue") {
717
- this.next = record.arg;
718
- } else if (record.type === "return") {
719
- this.rval = this.arg = record.arg;
720
- this.method = "return";
721
- this.next = "end";
722
- } else if (record.type === "normal" && afterLoc) {
723
- this.next = afterLoc;
339
+ return thrown;
724
340
  }
341
+ }
725
342
 
726
- return ContinueSentinel;
727
- },
728
- finish: function finish(finallyLoc) {
729
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
730
- var entry = this.tryEntries[i];
343
+ throw new Error("illegal catch attempt");
344
+ },
345
+ delegateYield: function (iterable, resultName, nextLoc) {
346
+ return this.delegate = {
347
+ iterator: values(iterable),
348
+ resultName: resultName,
349
+ nextLoc: nextLoc
350
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
351
+ }
352
+ }, exports;
353
+ }
731
354
 
732
- if (entry.finallyLoc === finallyLoc) {
733
- this.complete(entry.completion, entry.afterLoc);
734
- resetTryEntry(entry);
735
- return ContinueSentinel;
736
- }
737
- }
738
- },
739
- "catch": function _catch(tryLoc) {
740
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
741
- var entry = this.tryEntries[i];
355
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
356
+ try {
357
+ var info = gen[key](arg);
358
+ var value = info.value;
359
+ } catch (error) {
360
+ reject(error);
361
+ return;
362
+ }
742
363
 
743
- if (entry.tryLoc === tryLoc) {
744
- var record = entry.completion;
364
+ if (info.done) {
365
+ resolve(value);
366
+ } else {
367
+ Promise.resolve(value).then(_next, _throw);
368
+ }
369
+ }
745
370
 
746
- if (record.type === "throw") {
747
- var thrown = record.arg;
748
- resetTryEntry(entry);
749
- }
371
+ function _asyncToGenerator(fn) {
372
+ return function () {
373
+ var self = this,
374
+ args = arguments;
375
+ return new Promise(function (resolve, reject) {
376
+ var gen = fn.apply(self, args);
750
377
 
751
- return thrown;
752
- }
753
- } // The context.catch method must only be called with a location
754
- // argument that corresponds to a known catch block.
378
+ function _next(value) {
379
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
380
+ }
755
381
 
382
+ function _throw(err) {
383
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
384
+ }
756
385
 
757
- throw new Error("illegal catch attempt");
758
- },
759
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
760
- this.delegate = {
761
- iterator: values(iterable),
762
- resultName: resultName,
763
- nextLoc: nextLoc
764
- };
386
+ _next(undefined);
387
+ });
388
+ };
389
+ }
765
390
 
766
- if (this.method === "next") {
767
- // Deliberately forget the last sent value so that we don't
768
- // accidentally pass it on to the delegate.
769
- this.arg = undefined$1;
770
- }
391
+ function _extends() {
392
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
393
+ for (var i = 1; i < arguments.length; i++) {
394
+ var source = arguments[i];
771
395
 
772
- return ContinueSentinel;
396
+ for (var key in source) {
397
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
398
+ target[key] = source[key];
399
+ }
773
400
  }
774
- }; // Regardless of whether this script is executing as a CommonJS module
775
- // or not, return the runtime object so that we can declare the variable
776
- // regeneratorRuntime in the outer scope, which allows this module to be
777
- // injected easily by `bin/regenerator --include-runtime script.js`.
401
+ }
778
402
 
779
- return exports;
780
- }( // If this script is executing as a CommonJS module, use module.exports
781
- // as the regeneratorRuntime namespace. Otherwise create a new empty
782
- // object. Either way, the resulting object will be used to initialize
783
- // the regeneratorRuntime variable at the top of this file.
784
- module.exports );
403
+ return target;
404
+ };
405
+ return _extends.apply(this, arguments);
406
+ }
785
407
 
786
- try {
787
- regeneratorRuntime = runtime;
788
- } catch (accidentalStrictMode) {
789
- // This module should not be running in strict mode, so the above
790
- // assignment should always work unless something is misconfigured. Just
791
- // in case runtime.js accidentally runs in strict mode, in modern engines
792
- // we can explicitly access globalThis. In older engines we can escape
793
- // strict mode using a global Function call. This could conceivably fail
794
- // if a Content Security Policy forbids using Function, but in that case
795
- // the proper solution is to fix the accidental strict mode problem. If
796
- // you've misconfigured your bundler to force strict mode and applied a
797
- // CSP to forbid Function, and you're not willing to fix either of those
798
- // problems, please detail your unique predicament in a GitHub issue.
799
- if (typeof globalThis === "object") {
800
- globalThis.regeneratorRuntime = runtime;
801
- } else {
802
- Function("r", "regeneratorRuntime = r")(runtime);
803
- }
408
+ function _objectWithoutPropertiesLoose(source, excluded) {
409
+ if (source == null) return {};
410
+ var target = {};
411
+ var sourceKeys = Object.keys(source);
412
+ var key, i;
413
+
414
+ for (i = 0; i < sourceKeys.length; i++) {
415
+ key = sourceKeys[i];
416
+ if (excluded.indexOf(key) >= 0) continue;
417
+ target[key] = source[key];
804
418
  }
805
- })(runtime);
806
419
 
807
- var _regeneratorRuntime = runtime.exports;
420
+ return target;
421
+ }
808
422
 
809
423
  var initialState$1 = {
810
424
  status: 'AUTHENTICATING'
@@ -873,9 +487,9 @@ var AuthProvider = function AuthProvider(_ref) {
873
487
 
874
488
  useEffect(function () {
875
489
  var initAuth0 = /*#__PURE__*/function () {
876
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
490
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
877
491
  var client, route, postLoginRoute, isAuthenticated, auth0User, token, user;
878
- return _regeneratorRuntime.wrap(function _callee$(_context) {
492
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
879
493
  while (1) {
880
494
  switch (_context.prev = _context.next) {
881
495
  case 0:
@@ -955,10 +569,10 @@ var AuthProvider = function AuthProvider(_ref) {
955
569
  }();
956
570
 
957
571
  initAuth0()["catch"]( /*#__PURE__*/function () {
958
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(error) {
572
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(error) {
959
573
  var _localStorage$getItem, lastRetryEpochSeconds, nowEpochSeconds, timeSinceLastRetry, minimumTimeForRetry;
960
574
 
961
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
575
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
962
576
  while (1) {
963
577
  switch (_context2.prev = _context2.next) {
964
578
  case 0:
@@ -1023,10 +637,10 @@ var AuthProvider = function AuthProvider(_ref) {
1023
637
  };
1024
638
 
1025
639
  var login = /*#__PURE__*/function () {
1026
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(redirectUri) {
640
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(redirectUri) {
1027
641
  var _window, location;
1028
642
 
1029
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
643
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1030
644
  while (1) {
1031
645
  switch (_context3.prev = _context3.next) {
1032
646
  case 0:
@@ -1055,8 +669,8 @@ var AuthProvider = function AuthProvider(_ref) {
1055
669
  }();
1056
670
 
1057
671
  var getToken = /*#__PURE__*/function () {
1058
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(options) {
1059
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
672
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(options) {
673
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1060
674
  while (1) {
1061
675
  switch (_context4.prev = _context4.next) {
1062
676
  case 0:
@@ -1402,9 +1016,9 @@ var OrganisationSelector = function OrganisationSelector(_ref) {
1402
1016
 
1403
1017
  useEffect(function () {
1404
1018
  var fetchOrganisations = /*#__PURE__*/function () {
1405
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
1019
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1406
1020
  var token, organisations;
1407
- return _regeneratorRuntime.wrap(function _callee$(_context) {
1021
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1408
1022
  while (1) {
1409
1023
  switch (_context.prev = _context.next) {
1410
1024
  case 0: