@ohif/app 3.13.0-beta.2 → 3.13.0-beta.21

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.
Files changed (70) hide show
  1. package/dist/{1459.bundle.cd67aea5d65062345894.js → 1459.bundle.2f3d935de1ef66d49c9b.js} +5 -6
  2. package/dist/{147.bundle.37d627289453cb6c3937.js → 147.bundle.15c3dffbc73dab1085f5.js} +6 -5
  3. package/dist/{1608.bundle.0687c661f1c9edfb3b8a.js → 1608.bundle.7a4a3b49cae10f6ba2cf.js} +8 -8
  4. package/dist/{1927.bundle.3050588e95f43cf57cdd.js → 1927.bundle.be67b3aafe238ca9f191.js} +27 -38
  5. package/dist/{1933.bundle.03d69f1ec49e31942aa9.js → 1933.bundle.1b74cba28c11aaa349c1.js} +15 -16
  6. package/dist/{2018.bundle.0cc66d90549a02692f83.js → 2018.bundle.330c371c2152bc79a68e.js} +18 -19
  7. package/dist/{6347.bundle.784c48912700f281de1d.js → 2031.bundle.a17bc2d85cef3a9fea57.js} +13 -314
  8. package/dist/{2108.bundle.e84aa8d858d8c4f2413e.js → 2108.bundle.f1ef8e8746eb3936bb47.js} +567 -556
  9. package/dist/{213.bundle.c270b9cbfef1c3a6deeb.js → 213.bundle.83766bfd0ad91206ba20.js} +3 -5
  10. package/dist/{2424.bundle.9a15ea93fa8dfa6a6c29.js → 2424.bundle.8d41a94526449b9c27f2.js} +3 -5
  11. package/dist/{2516.bundle.1ea0988d309a757bb6da.js → 2516.bundle.f62228e9a800de8d4b31.js} +6 -6
  12. package/dist/{2701.bundle.12bd01a80a9f8ea4cd94.js → 2701.bundle.8abdc7f6578c00d4539f.js} +6 -6
  13. package/dist/{2842.bundle.860b9f10fcdd9656947a.js → 2816.bundle.838fa4d72921c026083c.js} +827 -2240
  14. package/dist/{3081.bundle.9c9d169bf2b4ac6e987f.js → 3081.bundle.69c2ed88c1fc66671e82.js} +237 -176
  15. package/dist/{1730.bundle.1a3a3ac5087af5ee5cf5.js → 3138.bundle.536017116b2a48fe8f59.js} +10 -304
  16. package/dist/{3461.bundle.375dd4b31216c8ef6b0c.js → 3461.bundle.b1c56af281517014477c.js} +19 -23
  17. package/dist/{4202.bundle.5a0f8e4004c5d8a68548.js → 4202.bundle.dd592e5575b8e302689a.js} +4 -4
  18. package/dist/{4019.bundle.83a604779f7da0101ced.js → 4287.bundle.571587a1d29d54203175.js} +237 -202
  19. package/dist/{5462.bundle.21beddaca145b7465c72.js → 4406.bundle.573d234b4641d23cf8db.js} +1083 -1308
  20. package/dist/{1403.bundle.3368c0f92547bc8b3148.js → 4507.bundle.2943a08dea2a96095e86.js} +10 -305
  21. package/dist/{4819.bundle.2ab7a41dbade682bcee9.js → 4819.bundle.b817d46688ec00d46826.js} +25 -26
  22. package/dist/{4775.bundle.cb49c11c62965c2807ef.js → 5015.bundle.ea7e3b295cd3ef134df2.js} +27 -331
  23. package/dist/{5028.bundle.82318fd632945aba4f27.js → 5028.bundle.b75c0bb0fa9a490055bd.js} +7 -9
  24. package/dist/{5261.bundle.6e1a017f8f1027557f5b.js → 5261.bundle.2655560097e9250eac44.js} +412 -345
  25. package/dist/{5457.bundle.e9733e0dc7c3ae46ea42.js → 5457.bundle.ea0a729d0bb45314d5ca.js} +16 -23
  26. package/dist/{5485.bundle.6603ea8ac3b639703e4d.js → 5485.bundle.8248a4caa4411103e190.js} +14 -29
  27. package/dist/{5491.bundle.2e01dd7ad29e4cc01bc1.js → 5491.bundle.4866d2ecb20dd089e071.js} +54 -51
  28. package/dist/{5802.bundle.3bf5e6b3ab330a594a47.js → 5802.bundle.70600f8f701ac920b932.js} +74 -16
  29. package/dist/5802.css +1 -1
  30. package/dist/{5830.bundle.b073c265c4fcea1afff3.js → 5830.bundle.791019deddd536980a11.js} +3 -3
  31. package/dist/{5858.bundle.ff6b340cf7457db76a1a.js → 5858.bundle.466e58128de344ab53f3.js} +90 -86
  32. package/dist/{6027.bundle.3e52391c5f4432911512.js → 6027.bundle.b9a666f05ac57e742979.js} +3 -5
  33. package/dist/{997.bundle.822b33e561263084e18c.js → 6280.bundle.6574101421b8a4ab6777.js} +1532 -952
  34. package/dist/{6354.bundle.c387737dc09c9cab4ff2.js → 6354.bundle.d8a592b03e9a5b7a66c2.js} +102 -96
  35. package/dist/{6376.bundle.9cb74d7bc08476e2f1a7.js → 6376.bundle.839c708f2fc41e76ee58.js} +6 -6
  36. package/dist/{6409.bundle.b36048896cb11c8571fb.js → 6409.bundle.24edbaa283b7c521b8f7.js} +73 -73
  37. package/dist/6939.bundle.41fbdef87597b5172ec6.js +3 -3
  38. package/dist/{7159.bundle.a5991a5d4f0dd8f1c95f.js → 7159.bundle.fb9df255868960f69765.js} +7 -5
  39. package/dist/{7190.bundle.e8f0193e0e06472f795c.js → 7190.bundle.6314b558746e394aeb0e.js} +40 -40
  40. package/dist/{732.bundle.6978ac30a1e36abf06db.js → 732.bundle.ea6f9d8504e37e01a208.js} +5 -13
  41. package/dist/{7431.bundle.b01791d10e6cf9f503b0.js → 7431.bundle.e6f5f5835a3c49e2309c.js} +28 -28
  42. package/dist/{7639.bundle.831b85eb99f966cefcb2.js → 7639.bundle.2e179ab85c66a6def98f.js} +3 -5
  43. package/dist/7758.bundle.c8d106364298e7d288f0.js +3 -3
  44. package/dist/{8094.bundle.5c44190a325ac23e3e5c.js → 8094.bundle.148a66619607e37cbf19.js} +3 -4
  45. package/dist/{8305.bundle.437d4dd008a2139dc96a.js → 8305.bundle.e621bc861f8c16092e7c.js} +9 -11
  46. package/dist/{6163.bundle.77ac55484671ce6159e6.js → 8499.bundle.59df69e1919739d6e444.js} +5 -300
  47. package/dist/8499.css +2 -0
  48. package/dist/{85.bundle.503f33be60625a46580d.js → 85.bundle.14430d53b13d7ff9f8a8.js} +3 -5
  49. package/dist/{8558.bundle.71c7bf070f41c6647704.js → 8558.bundle.288aabeb7473ee9d7312.js} +11 -309
  50. package/dist/{8583.bundle.4cb5dea918f010b8e56b.js → 8583.bundle.d0773ead34455cfa28d7.js} +16 -19
  51. package/dist/{4410.bundle.c5224cd7d6238a7d4660.js → 8665.bundle.056dcd3e86743de2526c.js} +3456 -1444
  52. package/dist/{9195.bundle.5c13bd1aef828d802142.js → 9195.bundle.902ab556e8909fa878a1.js} +95 -113
  53. package/dist/{7412.bundle.fab1742191b7fe937330.js → 9205.bundle.dca4f040999d069f1cc5.js} +3378 -1074
  54. package/dist/{3584.bundle.8cc0750425513433e9cc.js → 933.bundle.c8f45e1f380ad5a34e07.js} +264 -2219
  55. package/dist/{9845.bundle.255e7c7f7a88193b4e47.js → 9845.bundle.d52e8993eb5cde995219.js} +6 -6
  56. package/dist/{9862.bundle.3a8958a82c572015d25d.js → 9862.bundle.4704bce0c5b039dfdec3.js} +6 -4
  57. package/dist/{9927.bundle.9fdb8b442eb22aa97e73.js → 9927.bundle.006c8d2dda07109c4749.js} +3 -5
  58. package/dist/{app.bundle.7777a62215a4f90957f2.js → app.bundle.38dca800f336facdb28b.js} +65533 -64635
  59. package/dist/app.bundle.css +3 -3
  60. package/dist/{compute.bundle.64280c7af19ff567465f.js → compute.bundle.6bc9d64acadd16a85f59.js} +10 -22
  61. package/dist/{histogram-worker.bundle.d4e40a8018d2698b072e.js → histogram-worker.bundle.5b679ce4142c803c80a4.js} +11 -23
  62. package/dist/index.html +1 -1
  63. package/dist/{interpolation.bundle.c70cb95d164dc494e6dc.js → interpolation.bundle.072a28b303f2dbafe05c.js} +14 -26
  64. package/dist/{polySeg.bundle.a5aa9130b4191253c410.js → polySeg.bundle.41c40b57dd1b265fb425.js} +8 -20
  65. package/dist/sw.js +1 -1
  66. package/package.json +22 -21
  67. package/dist/3343.bundle.d7578ce8f75d158c0bab.js +0 -297
  68. /package/dist/{1730.css → 3138.css} +0 -0
  69. /package/dist/{3343.css → 4972.css} +0 -0
  70. /package/dist/{6163.css → 7829.css} +0 -0
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[5261],{
3
3
 
4
- /***/ 95261:
5
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4
+ /***/ 95261
5
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6
6
 
7
7
 
8
8
  // EXPORTS
@@ -22,7 +22,7 @@ var es = __webpack_require__(70574);
22
22
  var use_isomorphic_layout_effect_browser_esm = __webpack_require__(57321);
23
23
  ;// ../../../node_modules/@xstate/react/es/useConstant.js
24
24
 
25
- function useConstant_useConstant(fn) {
25
+ function useConstant(fn) {
26
26
  var ref = react.useRef();
27
27
  if (!ref.current) {
28
28
  ref.current = { v: fn() };
@@ -31,6 +31,10 @@ function useConstant_useConstant(fn) {
31
31
  }
32
32
 
33
33
  ;// ../../../node_modules/@xstate/react/es/useInterpret.js
34
+ /* unused harmony import specifier */ var useEffect;
35
+ /* unused harmony import specifier */ var toObserver;
36
+ /* unused harmony import specifier */ var State;
37
+ /* unused harmony import specifier */ var InterpreterStatus;
34
38
  var __assign = (undefined && undefined.__assign) || function () {
35
39
  __assign = Object.assign || function(t) {
36
40
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -74,12 +78,13 @@ var __read = (undefined && undefined.__read) || function (o, n) {
74
78
 
75
79
 
76
80
  function useIdleInterpreter(getMachine, options) {
77
- var machine = useConstant_useConstant(function () {
81
+ var machine = useConstant(function () {
78
82
  return typeof getMachine === 'function' ? getMachine() : getMachine;
79
83
  });
80
- if (false) { var _a, initialMachine; }
84
+ if (false) // removed by dead control flow
85
+ { var _a, initialMachine; }
81
86
  var context = options.context, guards = options.guards, actions = options.actions, activities = options.activities, services = options.services, delays = options.delays, rehydratedState = options.state, interpreterOptions = __rest(options, ["context", "guards", "actions", "activities", "services", "delays", "state"]);
82
- var service = useConstant_useConstant(function () {
87
+ var service = useConstant(function () {
83
88
  var machineConfig = {
84
89
  context: context,
85
90
  guards: guards,
@@ -103,7 +108,7 @@ function useIdleInterpreter(getMachine, options) {
103
108
  }, [actions, guards, activities, services, delays]);
104
109
  return service;
105
110
  }
106
- function useInterpret_useInterpret(getMachine) {
111
+ function useInterpret(getMachine) {
107
112
  var _a = [];
108
113
  for (var _i = 1; _i < arguments.length; _i++) {
109
114
  _a[_i - 1] = arguments[_i];
@@ -182,7 +187,7 @@ function partition(items, predicate) {
182
187
  }
183
188
  return [truthy, falsy];
184
189
  }
185
- function utils_getServiceSnapshot(service) {
190
+ function getServiceSnapshot(service) {
186
191
  return service.status !== 0
187
192
  ? service.getSnapshot()
188
193
  : service.machine.initialState;
@@ -217,10 +222,10 @@ function shallowEqual(objA, objB) {
217
222
  }
218
223
  return true;
219
224
  }
220
- function utils_isService(actor) {
225
+ function isService(actor) {
221
226
  return 'state' in actor && 'machine' in actor;
222
227
  }
223
- function utils_isInterpreterStateEqual(service, prevState, nextState) {
228
+ function isInterpreterStateEqual(service, prevState, nextState) {
224
229
  if (service.status === es/* InterpreterStatus */.vy.NotStarted) {
225
230
  return true;
226
231
  }
@@ -278,7 +283,7 @@ function useMachine(getMachine) {
278
283
  return service.getSnapshot();
279
284
  }, [service]);
280
285
  var isEqual = (0,react.useCallback)(function (prevState, nextState) {
281
- return utils_isInterpreterStateEqual(service, prevState, nextState);
286
+ return isInterpreterStateEqual(service, prevState, nextState);
282
287
  }, [service]);
283
288
  var subscribe = (0,react.useCallback)(function (handleStoreChange) {
284
289
  var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;
@@ -297,6 +302,14 @@ function useMachine(getMachine) {
297
302
  }
298
303
 
299
304
  ;// ../../../node_modules/@xstate/react/es/useActor.js
305
+ /* unused harmony import specifier */ var useRef;
306
+ /* unused harmony import specifier */ var useCallback;
307
+ /* unused harmony import specifier */ var useIsomorphicLayoutEffect;
308
+ /* unused harmony import specifier */ var useActor_useConstant;
309
+ /* unused harmony import specifier */ var useSyncExternalStoreWithSelector;
310
+ /* unused harmony import specifier */ var useActor_isService;
311
+ /* unused harmony import specifier */ var useActor_getServiceSnapshot;
312
+ /* unused harmony import specifier */ var useActor_isInterpreterStateEqual;
300
313
 
301
314
 
302
315
 
@@ -305,7 +318,7 @@ function useMachine(getMachine) {
305
318
  function useActor_identity(a) {
306
319
  return a;
307
320
  }
308
- function useActor_isActorWithState(actorRef) {
321
+ function isActorWithState(actorRef) {
309
322
  return 'state' in actorRef;
310
323
  }
311
324
  function isDeferredActor(actorRef) {
@@ -313,10 +326,10 @@ function isDeferredActor(actorRef) {
313
326
  }
314
327
  function defaultGetSnapshot(actorRef) {
315
328
  return 'getSnapshot' in actorRef
316
- ? isService(actorRef)
317
- ? getServiceSnapshot(actorRef)
329
+ ? useActor_isService(actorRef)
330
+ ? useActor_getServiceSnapshot(actorRef)
318
331
  : actorRef.getSnapshot()
319
- : useActor_isActorWithState(actorRef)
332
+ : isActorWithState(actorRef)
320
333
  ? actorRef.state
321
334
  : undefined;
322
335
  }
@@ -330,19 +343,20 @@ function useActor(actorRef, getSnapshot) {
330
343
  }, [actorRef]);
331
344
  var boundGetSnapshot = useCallback(function () { return getSnapshot(actorRef); }, [actorRef, getSnapshot]);
332
345
  var isEqual = useCallback(function (prevState, nextState) {
333
- if (isService(actorRef)) {
334
- return isInterpreterStateEqual(actorRef, prevState, nextState);
346
+ if (useActor_isService(actorRef)) {
347
+ return useActor_isInterpreterStateEqual(actorRef, prevState, nextState);
335
348
  }
336
349
  return prevState === nextState;
337
350
  }, [actorRef]);
338
351
  var storeSnapshot = useSyncExternalStoreWithSelector(subscribe, boundGetSnapshot, boundGetSnapshot, useActor_identity, isEqual);
339
- var send = useConstant(function () { return function () {
352
+ var send = useActor_useConstant(function () { return function () {
340
353
  var args = [];
341
354
  for (var _i = 0; _i < arguments.length; _i++) {
342
355
  args[_i] = arguments[_i];
343
356
  }
344
357
  var event = args[0];
345
- if (false) {}
358
+ if (false) // removed by dead control flow
359
+ {}
346
360
  var currentActorRef = actorRefRef.current;
347
361
  // If the previous actor is a deferred actor,
348
362
  // queue the events so that they can be replayed
@@ -366,41 +380,49 @@ function useActor(actorRef, getSnapshot) {
366
380
  }
367
381
 
368
382
  ;// ../../../node_modules/@xstate/react/es/useSelector.js
383
+ /* unused harmony import specifier */ var useSelector_useRef;
384
+ /* unused harmony import specifier */ var useSelector_useCallback;
385
+ /* unused harmony import specifier */ var useSelector_useSyncExternalStoreWithSelector;
386
+ /* unused harmony import specifier */ var useSelector_isActorWithState;
387
+ /* unused harmony import specifier */ var useSelector_isService;
388
+ /* unused harmony import specifier */ var useSelector_getServiceSnapshot;
369
389
 
370
390
 
371
391
 
372
392
 
373
393
  var defaultCompare = function (a, b) { return a === b; };
374
394
  var useSelector_defaultGetSnapshot = function (a, initialStateCacheRef) {
375
- if (isService(a)) {
395
+ if (useSelector_isService(a)) {
376
396
  // A status of 0 = interpreter not started
377
397
  if (a.status === 0 && initialStateCacheRef.current) {
378
398
  return initialStateCacheRef.current;
379
399
  }
380
- var snapshot = getServiceSnapshot(a);
400
+ var snapshot = useSelector_getServiceSnapshot(a);
381
401
  initialStateCacheRef.current = a.status === 0 ? snapshot : null;
382
402
  return snapshot;
383
403
  }
384
- return isActorWithState(a) ? a.state : undefined;
404
+ return useSelector_isActorWithState(a) ? a.state : undefined;
385
405
  };
386
406
  function useSelector(actor, selector, compare, getSnapshot) {
387
407
  if (compare === void 0) { compare = defaultCompare; }
388
- var initialStateCacheRef = useRef(null);
389
- var subscribe = useCallback(function (handleStoreChange) {
408
+ var initialStateCacheRef = useSelector_useRef(null);
409
+ var subscribe = useSelector_useCallback(function (handleStoreChange) {
390
410
  var unsubscribe = actor.subscribe(handleStoreChange).unsubscribe;
391
411
  return unsubscribe;
392
412
  }, [actor]);
393
- var boundGetSnapshot = useCallback(function () {
413
+ var boundGetSnapshot = useSelector_useCallback(function () {
394
414
  if (getSnapshot) {
395
415
  return getSnapshot(actor);
396
416
  }
397
417
  return useSelector_defaultGetSnapshot(actor, initialStateCacheRef);
398
418
  }, [actor, getSnapshot]);
399
- var selectedSnapshot = useSyncExternalStoreWithSelector(subscribe, boundGetSnapshot, boundGetSnapshot, selector, compare);
419
+ var selectedSnapshot = useSelector_useSyncExternalStoreWithSelector(subscribe, boundGetSnapshot, boundGetSnapshot, selector, compare);
400
420
  return selectedSnapshot;
401
421
  }
402
422
 
403
423
  ;// ../../../node_modules/@xstate/react/es/useSpawn.js
424
+ /* unused harmony import specifier */ var spawnBehavior;
425
+ /* unused harmony import specifier */ var useSpawn_useConstant;
404
426
 
405
427
 
406
428
  /**
@@ -411,13 +433,17 @@ function useSelector(actor, selector, compare, getSnapshot) {
411
433
  * @returns An ActorRef with the specified `behavior`
412
434
  */
413
435
  function useSpawn(behavior) {
414
- var actorRef = useConstant(function () {
436
+ var actorRef = useSpawn_useConstant(function () {
415
437
  return spawnBehavior(behavior);
416
438
  });
417
439
  return actorRef;
418
440
  }
419
441
 
420
442
  ;// ../../../node_modules/@xstate/react/es/createActorContext.js
443
+ /* unused harmony import specifier */ var React;
444
+ /* unused harmony import specifier */ var createActorContext_useInterpret;
445
+ /* unused harmony import specifier */ var useActorUnbound;
446
+ /* unused harmony import specifier */ var useSelectorUnbound;
421
447
  var createActorContext_assign = (undefined && undefined.__assign) || function () {
422
448
  createActorContext_assign = Object.assign || function(t) {
423
449
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -438,7 +464,7 @@ function createActorContext(machine, interpreterOptions, observerOrListener) {
438
464
  var OriginalProvider = ReactContext.Provider;
439
465
  function Provider(_a) {
440
466
  var children = _a.children, _b = _a.machine, providedMachine = _b === void 0 ? machine : _b, options = _a.options;
441
- var actor = useInterpret(providedMachine, createActorContext_assign(createActorContext_assign({}, interpreterOptions), options), observerOrListener);
467
+ var actor = createActorContext_useInterpret(providedMachine, createActorContext_assign(createActorContext_assign({}, interpreterOptions), options), observerOrListener);
442
468
  return React.createElement(OriginalProvider, { value: actor }, children);
443
469
  }
444
470
  Provider.displayName = "ActorProvider(".concat(machine.id, ")");
@@ -475,17 +501,17 @@ function createActorContext(machine, interpreterOptions, observerOrListener) {
475
501
 
476
502
 
477
503
 
478
- /***/ }),
504
+ /***/ },
479
505
 
480
- /***/ 70574:
481
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
506
+ /***/ 70574
507
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
482
508
 
483
509
 
484
510
  // EXPORTS
485
511
  __webpack_require__.d(__webpack_exports__, {
486
512
  vy: () => (/* reexport */ InterpreterStatus),
487
513
  u5: () => (/* reexport */ Machine),
488
- Uw: () => (/* reexport */ State_State),
514
+ Uw: () => (/* reexport */ State),
489
515
  kp: () => (/* binding */ es_assign),
490
516
  U4: () => (/* reexport */ interpret)
491
517
  });
@@ -508,15 +534,15 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
508
534
  PERFORMANCE OF THIS SOFTWARE.
509
535
  ***************************************************************************** */
510
536
 
511
- var _tslib_assign = function() {
512
- _tslib_assign = Object.assign || function __assign(t) {
537
+ var __assign = function() {
538
+ __assign = Object.assign || function __assign(t) {
513
539
  for (var s, i = 1, n = arguments.length; i < n; i++) {
514
540
  s = arguments[i];
515
541
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
516
542
  }
517
543
  return t;
518
544
  };
519
- return _tslib_assign.apply(this, arguments);
545
+ return __assign.apply(this, arguments);
520
546
  };
521
547
 
522
548
  function __rest(s, e) {
@@ -531,7 +557,7 @@ function __rest(s, e) {
531
557
  return t;
532
558
  }
533
559
 
534
- function _tslib_values(o) {
560
+ function __values(o) {
535
561
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
536
562
  if (m) return m.call(o);
537
563
  if (o && typeof o.length === "number") return {
@@ -543,7 +569,7 @@ function _tslib_values(o) {
543
569
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
544
570
  }
545
571
 
546
- function _tslib_read(o, n) {
572
+ function __read(o, n) {
547
573
  var m = typeof Symbol === "function" && o[Symbol.iterator];
548
574
  if (!m) return o;
549
575
  var i = m.call(o), r, ar = [], e;
@@ -560,7 +586,7 @@ function _tslib_read(o, n) {
560
586
  return ar;
561
587
  }
562
588
 
563
- function _tslib_spreadArray(to, from, pack) {
589
+ function __spreadArray(to, from, pack) {
564
590
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
565
591
  if (ar || !(i in from)) {
566
592
  if (!ar) ar = Array.prototype.slice.call(from, 0, i);
@@ -573,7 +599,7 @@ function _tslib_spreadArray(to, from, pack) {
573
599
 
574
600
 
575
601
  ;// ../../../node_modules/xstate/es/types.js
576
- var types_ActionTypes;
602
+ var ActionTypes;
577
603
 
578
604
  (function (ActionTypes) {
579
605
  ActionTypes["Start"] = "xstate.start";
@@ -596,38 +622,38 @@ var types_ActionTypes;
596
622
  ActionTypes["Update"] = "xstate.update";
597
623
  ActionTypes["Pure"] = "xstate.pure";
598
624
  ActionTypes["Choose"] = "xstate.choose";
599
- })(types_ActionTypes || (types_ActionTypes = {}));
625
+ })(ActionTypes || (ActionTypes = {}));
600
626
 
601
- var types_SpecialTargets;
627
+ var SpecialTargets;
602
628
 
603
629
  (function (SpecialTargets) {
604
630
  SpecialTargets["Parent"] = "#_parent";
605
631
  SpecialTargets["Internal"] = "#_internal";
606
- })(types_SpecialTargets || (types_SpecialTargets = {}));
632
+ })(SpecialTargets || (SpecialTargets = {}));
607
633
 
608
634
 
609
635
 
610
636
  ;// ../../../node_modules/xstate/es/actionTypes.js
611
637
 
612
638
 
613
- var start = types_ActionTypes.Start;
614
- var stop = types_ActionTypes.Stop;
615
- var raise = types_ActionTypes.Raise;
616
- var send = types_ActionTypes.Send;
617
- var cancel = types_ActionTypes.Cancel;
618
- var nullEvent = types_ActionTypes.NullEvent;
619
- var actionTypes_assign = types_ActionTypes.Assign;
620
- var after = types_ActionTypes.After;
621
- var doneState = types_ActionTypes.DoneState;
622
- var log = types_ActionTypes.Log;
623
- var init = types_ActionTypes.Init;
624
- var invoke = types_ActionTypes.Invoke;
625
- var errorExecution = types_ActionTypes.ErrorExecution;
626
- var errorPlatform = types_ActionTypes.ErrorPlatform;
627
- var actionTypes_error = types_ActionTypes.ErrorCustom;
628
- var actionTypes_update = types_ActionTypes.Update;
629
- var choose = types_ActionTypes.Choose;
630
- var pure = types_ActionTypes.Pure;
639
+ var start = ActionTypes.Start;
640
+ var stop = ActionTypes.Stop;
641
+ var raise = ActionTypes.Raise;
642
+ var send = ActionTypes.Send;
643
+ var cancel = ActionTypes.Cancel;
644
+ var nullEvent = ActionTypes.NullEvent;
645
+ var actionTypes_assign = ActionTypes.Assign;
646
+ var after = ActionTypes.After;
647
+ var doneState = ActionTypes.DoneState;
648
+ var log = ActionTypes.Log;
649
+ var init = ActionTypes.Init;
650
+ var invoke = ActionTypes.Invoke;
651
+ var errorExecution = ActionTypes.ErrorExecution;
652
+ var errorPlatform = ActionTypes.ErrorPlatform;
653
+ var error = ActionTypes.ErrorCustom;
654
+ var update = ActionTypes.Update;
655
+ var choose = ActionTypes.Choose;
656
+ var pure = ActionTypes.Pure;
631
657
 
632
658
 
633
659
 
@@ -640,11 +666,12 @@ var TARGETLESS_KEY = '';
640
666
 
641
667
 
642
668
  ;// ../../../node_modules/xstate/es/environment.js
643
- var environment_IS_PRODUCTION = "production" === 'production';
669
+ var IS_PRODUCTION = "production" === 'production';
644
670
 
645
671
 
646
672
 
647
673
  ;// ../../../node_modules/xstate/es/utils.js
674
+ /* unused harmony import specifier */ var utils_values;
648
675
 
649
676
 
650
677
 
@@ -655,7 +682,7 @@ var _a;
655
682
  function keys(value) {
656
683
  return Object.keys(value);
657
684
  }
658
- function utils_matchesState(parentStateId, childStateId, delimiter) {
685
+ function matchesState(parentStateId, childStateId, delimiter) {
659
686
  if (delimiter === void 0) {
660
687
  delimiter = STATE_DELIMITER;
661
688
  }
@@ -663,8 +690,8 @@ function utils_matchesState(parentStateId, childStateId, delimiter) {
663
690
  var parentStateValue = toStateValue(parentStateId, delimiter);
664
691
  var childStateValue = toStateValue(childStateId, delimiter);
665
692
 
666
- if (utils_isString(childStateValue)) {
667
- if (utils_isString(parentStateValue)) {
693
+ if (isString(childStateValue)) {
694
+ if (isString(parentStateValue)) {
668
695
  return childStateValue === parentStateValue;
669
696
  } // Parent more specific than child
670
697
 
@@ -672,7 +699,7 @@ function utils_matchesState(parentStateId, childStateId, delimiter) {
672
699
  return false;
673
700
  }
674
701
 
675
- if (utils_isString(parentStateValue)) {
702
+ if (isString(parentStateValue)) {
676
703
  return parentStateValue in childStateValue;
677
704
  }
678
705
 
@@ -681,19 +708,19 @@ function utils_matchesState(parentStateId, childStateId, delimiter) {
681
708
  return false;
682
709
  }
683
710
 
684
- return utils_matchesState(parentStateValue[key], childStateValue[key]);
711
+ return matchesState(parentStateValue[key], childStateValue[key]);
685
712
  });
686
713
  }
687
714
  function getEventType(event) {
688
715
  try {
689
- return utils_isString(event) || typeof event === 'number' ? "".concat(event) : event.type;
716
+ return isString(event) || typeof event === 'number' ? "".concat(event) : event.type;
690
717
  } catch (e) {
691
718
  throw new Error('Events must be strings or objects with a string event.type property.');
692
719
  }
693
720
  }
694
721
  function getActionType(action) {
695
722
  try {
696
- return utils_isString(action) || typeof action === 'number' ? "".concat(action) : utils_isFunction(action) ? action.name : action.type;
723
+ return isString(action) || typeof action === 'number' ? "".concat(action) : isFunction(action) ? action.name : action.type;
697
724
  } catch (e) {
698
725
  throw new Error('Actions must be strings or objects with a string action.type property.');
699
726
  }
@@ -764,7 +791,7 @@ function mapFilterValues(collection, iteratee, predicate) {
764
791
  var result = {};
765
792
 
766
793
  try {
767
- for (var _b = _tslib_values(Object.keys(collection)), _c = _b.next(); !_c.done; _c = _b.next()) {
794
+ for (var _b = __values(Object.keys(collection)), _c = _b.next(); !_c.done; _c = _b.next()) {
768
795
  var key = _c.value;
769
796
  var item = collection[key];
770
797
 
@@ -800,7 +827,7 @@ var path = function (props) {
800
827
  var result = object;
801
828
 
802
829
  try {
803
- for (var props_1 = _tslib_values(props), props_1_1 = props_1.next(); !props_1_1.done; props_1_1 = props_1.next()) {
830
+ for (var props_1 = __values(props), props_1_1 = props_1.next(); !props_1_1.done; props_1_1 = props_1.next()) {
804
831
  var prop = props_1_1.value;
805
832
  result = result[prop];
806
833
  }
@@ -831,7 +858,7 @@ function nestedPath(props, accessorProp) {
831
858
  var result = object;
832
859
 
833
860
  try {
834
- for (var props_2 = _tslib_values(props), props_2_1 = props_2.next(); !props_2_1.done; props_2_1 = props_2.next()) {
861
+ for (var props_2 = __values(props), props_2_1 = props_2.next(); !props_2_1.done; props_2_1 = props_2.next()) {
835
862
  var prop = props_2_1.value;
836
863
  result = result[accessorProp][prop];
837
864
  }
@@ -855,7 +882,7 @@ function toStatePaths(stateValue) {
855
882
  return [[]];
856
883
  }
857
884
 
858
- if (utils_isString(stateValue)) {
885
+ if (isString(stateValue)) {
859
886
  return [[stateValue]];
860
887
  }
861
888
 
@@ -882,7 +909,7 @@ function pathsToStateValue(paths) {
882
909
  }
883
910
 
884
911
  try {
885
- for (var paths_1 = __values(paths), paths_1_1 = paths_1.next(); !paths_1_1.done; paths_1_1 = paths_1.next()) {
912
+ for (var paths_1 = utils_values(paths), paths_1_1 = paths_1.next(); !paths_1_1.done; paths_1_1 = paths_1.next()) {
886
913
  var currentPath = paths_1_1.value;
887
914
  var marker = result; // tslint:disable-next-line:prefer-for-of
888
915
 
@@ -915,7 +942,7 @@ function pathsToStateValue(paths) {
915
942
  function flatten(array) {
916
943
  var _a;
917
944
 
918
- return (_a = []).concat.apply(_a, _tslib_spreadArray([], _tslib_read(array), false));
945
+ return (_a = []).concat.apply(_a, __spreadArray([], __read(array), false));
919
946
  }
920
947
  function toArrayStrict(value) {
921
948
  if (isArray(value)) {
@@ -934,18 +961,18 @@ function toArray(value) {
934
961
  function mapContext(mapper, context, _event) {
935
962
  var e_5, _a;
936
963
 
937
- if (utils_isFunction(mapper)) {
964
+ if (isFunction(mapper)) {
938
965
  return mapper(context, _event.data);
939
966
  }
940
967
 
941
968
  var result = {};
942
969
 
943
970
  try {
944
- for (var _b = _tslib_values(Object.keys(mapper)), _c = _b.next(); !_c.done; _c = _b.next()) {
971
+ for (var _b = __values(Object.keys(mapper)), _c = _b.next(); !_c.done; _c = _b.next()) {
945
972
  var key = _c.value;
946
973
  var subMapper = mapper[key];
947
974
 
948
- if (utils_isFunction(subMapper)) {
975
+ if (isFunction(subMapper)) {
949
976
  result[key] = subMapper(context, _event.data);
950
977
  } else {
951
978
  result[key] = subMapper;
@@ -974,7 +1001,7 @@ function isPromiseLike(value) {
974
1001
  } // Check if shape matches the Promise/A+ specification for a "thenable".
975
1002
 
976
1003
 
977
- if (value !== null && (utils_isFunction(value) || typeof value === 'object') && utils_isFunction(value.then)) {
1004
+ if (value !== null && (isFunction(value) || typeof value === 'object') && isFunction(value.then)) {
978
1005
  return true;
979
1006
  }
980
1007
 
@@ -986,12 +1013,12 @@ function isBehavior(value) {
986
1013
  function partition(items, predicate) {
987
1014
  var e_6, _a;
988
1015
 
989
- var _b = _tslib_read([[], []], 2),
1016
+ var _b = __read([[], []], 2),
990
1017
  truthy = _b[0],
991
1018
  falsy = _b[1];
992
1019
 
993
1020
  try {
994
- for (var items_1 = _tslib_values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
1021
+ for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
995
1022
  var item = items_1_1.value;
996
1023
 
997
1024
  if (predicate(item)) {
@@ -1020,7 +1047,7 @@ function updateHistoryStates(hist, stateValue) {
1020
1047
  return undefined;
1021
1048
  }
1022
1049
 
1023
- var subStateValue = (utils_isString(stateValue) ? undefined : stateValue[key]) || (subHist ? subHist.current : undefined);
1050
+ var subStateValue = (isString(stateValue) ? undefined : stateValue[key]) || (subHist ? subHist.current : undefined);
1024
1051
 
1025
1052
  if (!subStateValue) {
1026
1053
  return undefined;
@@ -1039,8 +1066,8 @@ function updateHistoryValue(hist, stateValue) {
1039
1066
  };
1040
1067
  }
1041
1068
  function updateContext(context, _event, assignActions, state) {
1042
- if (!environment_IS_PRODUCTION) {
1043
- utils_warn(!!context, 'Attempting to update undefined context');
1069
+ if (!IS_PRODUCTION) {
1070
+ warn(!!context, 'Attempting to update undefined context');
1044
1071
  }
1045
1072
 
1046
1073
  var updatedContext = context ? assignActions.reduce(function (acc, assignAction) {
@@ -1054,14 +1081,14 @@ function updateContext(context, _event, assignActions, state) {
1054
1081
  };
1055
1082
  var partialUpdate = {};
1056
1083
 
1057
- if (utils_isFunction(assignment)) {
1084
+ if (isFunction(assignment)) {
1058
1085
  partialUpdate = assignment(acc, _event.data, meta);
1059
1086
  } else {
1060
1087
  try {
1061
- for (var _b = _tslib_values(Object.keys(assignment)), _c = _b.next(); !_c.done; _c = _b.next()) {
1088
+ for (var _b = __values(Object.keys(assignment)), _c = _b.next(); !_c.done; _c = _b.next()) {
1062
1089
  var key = _c.value;
1063
1090
  var propAssignment = assignment[key];
1064
- partialUpdate[key] = utils_isFunction(propAssignment) ? propAssignment(acc, _event.data, meta) : propAssignment;
1091
+ partialUpdate[key] = isFunction(propAssignment) ? propAssignment(acc, _event.data, meta) : propAssignment;
1065
1092
  }
1066
1093
  } catch (e_7_1) {
1067
1094
  e_7 = {
@@ -1081,10 +1108,10 @@ function updateContext(context, _event, assignActions, state) {
1081
1108
  return updatedContext;
1082
1109
  } // tslint:disable-next-line:no-empty
1083
1110
 
1084
- var utils_warn = function () {};
1111
+ var warn = function () {};
1085
1112
 
1086
- if (!environment_IS_PRODUCTION) {
1087
- utils_warn = function (condition, message) {
1113
+ if (!IS_PRODUCTION) {
1114
+ warn = function (condition, message) {
1088
1115
  var error = condition instanceof Error ? condition : undefined;
1089
1116
 
1090
1117
  if (!error && condition) {
@@ -1107,10 +1134,10 @@ function isArray(value) {
1107
1134
  return Array.isArray(value);
1108
1135
  } // tslint:disable-next-line:ban-types
1109
1136
 
1110
- function utils_isFunction(value) {
1137
+ function isFunction(value) {
1111
1138
  return typeof value === 'function';
1112
1139
  }
1113
- function utils_isString(value) {
1140
+ function isString(value) {
1114
1141
  return typeof value === 'string';
1115
1142
  }
1116
1143
  function toGuard(condition, guardMap) {
@@ -1118,7 +1145,7 @@ function toGuard(condition, guardMap) {
1118
1145
  return undefined;
1119
1146
  }
1120
1147
 
1121
- if (utils_isString(condition)) {
1148
+ if (isString(condition)) {
1122
1149
  return {
1123
1150
  type: DEFAULT_GUARD_TYPE,
1124
1151
  name: condition,
@@ -1126,7 +1153,7 @@ function toGuard(condition, guardMap) {
1126
1153
  };
1127
1154
  }
1128
1155
 
1129
- if (utils_isFunction(condition)) {
1156
+ if (isFunction(condition)) {
1130
1157
  return {
1131
1158
  type: DEFAULT_GUARD_TYPE,
1132
1159
  name: condition.name,
@@ -1138,7 +1165,7 @@ function toGuard(condition, guardMap) {
1138
1165
  }
1139
1166
  function isObservable(value) {
1140
1167
  try {
1141
- return 'subscribe' in value && utils_isFunction(value.subscribe);
1168
+ return 'subscribe' in value && isFunction(value.subscribe);
1142
1169
  } catch (e) {
1143
1170
  return false;
1144
1171
  }
@@ -1152,13 +1179,13 @@ var interopSymbols = (_a = {}, _a[symbolObservable] = function () {
1152
1179
  }, _a[Symbol.observable] = function () {
1153
1180
  return this;
1154
1181
  }, _a);
1155
- function utils_isMachine(value) {
1182
+ function isMachine(value) {
1156
1183
  return !!value && '__xstatenode' in value;
1157
1184
  }
1158
1185
  function isActor(value) {
1159
1186
  return !!value && typeof value.send === 'function';
1160
1187
  }
1161
- var utils_uniqueId = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
1188
+ var uniqueId = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
1162
1189
  var currentId = 0;
1163
1190
  return function () {
1164
1191
  currentId++;
@@ -1167,8 +1194,8 @@ var utils_uniqueId = /*#__PURE__*/(/* unused pure expression or super */ null &&
1167
1194
  }()));
1168
1195
  function toEventObject(event, payload // id?: TEvent['type']
1169
1196
  ) {
1170
- if (utils_isString(event) || typeof event === 'number') {
1171
- return _tslib_assign({
1197
+ if (isString(event) || typeof event === 'number') {
1198
+ return __assign({
1172
1199
  type: event
1173
1200
  }, payload);
1174
1201
  }
@@ -1176,12 +1203,12 @@ function toEventObject(event, payload // id?: TEvent['type']
1176
1203
  return event;
1177
1204
  }
1178
1205
  function toSCXMLEvent(event, scxmlEvent) {
1179
- if (!utils_isString(event) && '$$type' in event && event.$$type === 'scxml') {
1206
+ if (!isString(event) && '$$type' in event && event.$$type === 'scxml') {
1180
1207
  return event;
1181
1208
  }
1182
1209
 
1183
1210
  var eventObject = toEventObject(event);
1184
- return _tslib_assign({
1211
+ return __assign({
1185
1212
  name: eventObject.type,
1186
1213
  data: eventObject,
1187
1214
  $$type: 'scxml',
@@ -1190,14 +1217,14 @@ function toSCXMLEvent(event, scxmlEvent) {
1190
1217
  }
1191
1218
  function toTransitionConfigArray(event, configLike) {
1192
1219
  var transitions = toArrayStrict(configLike).map(function (transitionLike) {
1193
- if (typeof transitionLike === 'undefined' || typeof transitionLike === 'string' || utils_isMachine(transitionLike)) {
1220
+ if (typeof transitionLike === 'undefined' || typeof transitionLike === 'string' || isMachine(transitionLike)) {
1194
1221
  return {
1195
1222
  target: transitionLike,
1196
1223
  event: event
1197
1224
  };
1198
1225
  }
1199
1226
 
1200
- return _tslib_assign(_tslib_assign({}, transitionLike), {
1227
+ return __assign(__assign({}, transitionLike), {
1201
1228
  event: event
1202
1229
  });
1203
1230
  });
@@ -1211,7 +1238,7 @@ function normalizeTarget(target) {
1211
1238
  return toArray(target);
1212
1239
  }
1213
1240
  function reportUnhandledExceptionOnInvocation(originalError, currentError, id) {
1214
- if (!environment_IS_PRODUCTION) {
1241
+ if (!IS_PRODUCTION) {
1215
1242
  var originalStackTrace = originalError.stack ? " Stacktrace was '".concat(originalError.stack, "'") : '';
1216
1243
 
1217
1244
  if (originalError === currentError) {
@@ -1268,12 +1295,22 @@ function createInvokeId(stateNodeId, index) {
1268
1295
  return "".concat(stateNodeId, ":invocation[").concat(index, "]");
1269
1296
  }
1270
1297
  function isRaisableAction(action) {
1271
- return (action.type === raise || action.type === send && action.to === types_SpecialTargets.Internal) && typeof action.delay !== 'number';
1298
+ return (action.type === raise || action.type === send && action.to === SpecialTargets.Internal) && typeof action.delay !== 'number';
1272
1299
  }
1273
1300
 
1274
1301
 
1275
1302
 
1276
1303
  ;// ../../../node_modules/xstate/es/actions.js
1304
+ /* unused harmony import specifier */ var actions_assign;
1305
+ /* unused harmony import specifier */ var actions_spreadArray;
1306
+ /* unused harmony import specifier */ var actions_read;
1307
+ /* unused harmony import specifier */ var actions_SpecialTargets;
1308
+ /* unused harmony import specifier */ var actions_ActionTypes;
1309
+ /* unused harmony import specifier */ var actions_update;
1310
+ /* unused harmony import specifier */ var log$1;
1311
+ /* unused harmony import specifier */ var error$1;
1312
+ /* unused harmony import specifier */ var actions_isFunction;
1313
+ /* unused harmony import specifier */ var actions_IS_PRODUCTION;
1277
1314
 
1278
1315
 
1279
1316
 
@@ -1291,10 +1328,10 @@ function getActionFunction(actionType, actionFunctionMap) {
1291
1328
  function toActionObject(action, actionFunctionMap) {
1292
1329
  var actionObject;
1293
1330
 
1294
- if (utils_isString(action) || typeof action === 'number') {
1331
+ if (isString(action) || typeof action === 'number') {
1295
1332
  var exec = getActionFunction(action, actionFunctionMap);
1296
1333
 
1297
- if (utils_isFunction(exec)) {
1334
+ if (isFunction(exec)) {
1298
1335
  actionObject = {
1299
1336
  type: action,
1300
1337
  exec: exec
@@ -1307,7 +1344,7 @@ function toActionObject(action, actionFunctionMap) {
1307
1344
  exec: undefined
1308
1345
  };
1309
1346
  }
1310
- } else if (utils_isFunction(action)) {
1347
+ } else if (isFunction(action)) {
1311
1348
  actionObject = {
1312
1349
  // Convert action to string if unnamed
1313
1350
  type: action.name || action.toString(),
@@ -1316,13 +1353,13 @@ function toActionObject(action, actionFunctionMap) {
1316
1353
  } else {
1317
1354
  var exec = getActionFunction(action.type, actionFunctionMap);
1318
1355
 
1319
- if (utils_isFunction(exec)) {
1320
- actionObject = _tslib_assign(_tslib_assign({}, action), {
1356
+ if (isFunction(exec)) {
1357
+ actionObject = __assign(__assign({}, action), {
1321
1358
  exec: exec
1322
1359
  });
1323
1360
  } else if (exec) {
1324
1361
  var actionType = exec.type || action.type;
1325
- actionObject = _tslib_assign(_tslib_assign(_tslib_assign({}, exec), action), {
1362
+ actionObject = __assign(__assign(__assign({}, exec), action), {
1326
1363
  type: actionType
1327
1364
  });
1328
1365
  } else {
@@ -1344,8 +1381,8 @@ var toActionObjects = function (action, actionFunctionMap) {
1344
1381
  };
1345
1382
  function toActivityDefinition(action) {
1346
1383
  var actionObject = toActionObject(action);
1347
- return _tslib_assign(_tslib_assign({
1348
- id: utils_isString(action) ? action : actionObject.id
1384
+ return __assign(__assign({
1385
+ id: isString(action) ? action : actionObject.id
1349
1386
  }, actionObject), {
1350
1387
  type: actionObject.type
1351
1388
  });
@@ -1369,17 +1406,17 @@ function resolveRaise(action, ctx, _event, delaysMap) {
1369
1406
  var meta = {
1370
1407
  _event: _event
1371
1408
  };
1372
- var resolvedEvent = toSCXMLEvent(utils_isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1409
+ var resolvedEvent = toSCXMLEvent(isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1373
1410
  var resolvedDelay;
1374
1411
 
1375
- if (utils_isString(action.delay)) {
1412
+ if (isString(action.delay)) {
1376
1413
  var configDelay = delaysMap && delaysMap[action.delay];
1377
- resolvedDelay = utils_isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1414
+ resolvedDelay = isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1378
1415
  } else {
1379
- resolvedDelay = utils_isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1416
+ resolvedDelay = isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1380
1417
  }
1381
1418
 
1382
- return _tslib_assign(_tslib_assign({}, action), {
1419
+ return __assign(__assign({}, action), {
1383
1420
  type: raise,
1384
1421
  _event: resolvedEvent,
1385
1422
  delay: resolvedDelay
@@ -1402,11 +1439,11 @@ function actions_send(event, options) {
1402
1439
  return {
1403
1440
  to: options ? options.to : undefined,
1404
1441
  type: send,
1405
- event: utils_isFunction(event) ? event : toEventObject(event),
1442
+ event: isFunction(event) ? event : toEventObject(event),
1406
1443
  delay: options ? options.delay : undefined,
1407
1444
  // TODO: don't auto-generate IDs here like that
1408
1445
  // there is too big chance of the ID collision
1409
- id: options && options.id !== undefined ? options.id : utils_isFunction(event) ? event.name : getEventType(event)
1446
+ id: options && options.id !== undefined ? options.id : isFunction(event) ? event.name : getEventType(event)
1410
1447
  };
1411
1448
  }
1412
1449
  function resolveSend(action, ctx, _event, delaysMap) {
@@ -1414,18 +1451,18 @@ function resolveSend(action, ctx, _event, delaysMap) {
1414
1451
  _event: _event
1415
1452
  }; // TODO: helper function for resolving Expr
1416
1453
 
1417
- var resolvedEvent = toSCXMLEvent(utils_isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1454
+ var resolvedEvent = toSCXMLEvent(isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1418
1455
  var resolvedDelay;
1419
1456
 
1420
- if (utils_isString(action.delay)) {
1457
+ if (isString(action.delay)) {
1421
1458
  var configDelay = delaysMap && delaysMap[action.delay];
1422
- resolvedDelay = utils_isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1459
+ resolvedDelay = isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1423
1460
  } else {
1424
- resolvedDelay = utils_isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1461
+ resolvedDelay = isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1425
1462
  }
1426
1463
 
1427
- var resolvedTarget = utils_isFunction(action.to) ? action.to(ctx, _event.data, meta) : action.to;
1428
- return _tslib_assign(_tslib_assign({}, action), {
1464
+ var resolvedTarget = isFunction(action.to) ? action.to(ctx, _event.data, meta) : action.to;
1465
+ return __assign(__assign({}, action), {
1429
1466
  to: resolvedTarget,
1430
1467
  _event: resolvedEvent,
1431
1468
  event: resolvedEvent.data,
@@ -1440,8 +1477,8 @@ function resolveSend(action, ctx, _event, delaysMap) {
1440
1477
  */
1441
1478
 
1442
1479
  function sendParent(event, options) {
1443
- return actions_send(event, __assign(__assign({}, options), {
1444
- to: SpecialTargets.Parent
1480
+ return actions_send(event, actions_assign(actions_assign({}, options), {
1481
+ to: actions_SpecialTargets.Parent
1445
1482
  }));
1446
1483
  }
1447
1484
  /**
@@ -1454,7 +1491,7 @@ function sendParent(event, options) {
1454
1491
  */
1455
1492
 
1456
1493
  function sendTo(actor, event, options) {
1457
- return actions_send(event, __assign(__assign({}, options), {
1494
+ return actions_send(event, actions_assign(actions_assign({}, options), {
1458
1495
  to: actor
1459
1496
  }));
1460
1497
  }
@@ -1463,7 +1500,7 @@ function sendTo(actor, event, options) {
1463
1500
  */
1464
1501
 
1465
1502
  function sendUpdate() {
1466
- return sendParent(update);
1503
+ return sendParent(actions_update);
1467
1504
  }
1468
1505
  /**
1469
1506
  * Sends an event back to the sender of the original event.
@@ -1473,7 +1510,7 @@ function sendUpdate() {
1473
1510
  */
1474
1511
 
1475
1512
  function respond(event, options) {
1476
- return actions_send(event, __assign(__assign({}, options), {
1513
+ return actions_send(event, actions_assign(actions_assign({}, options), {
1477
1514
  to: function (_, __, _a) {
1478
1515
  var _event = _a._event;
1479
1516
  return _event.origin; // TODO: handle when _event.origin is undefined
@@ -1509,8 +1546,8 @@ function actions_log(expr, label) {
1509
1546
  };
1510
1547
  }
1511
1548
  var resolveLog = function (action, ctx, _event) {
1512
- return _tslib_assign(_tslib_assign({}, action), {
1513
- value: utils_isString(action.expr) ? action.expr : action.expr(ctx, _event.data, {
1549
+ return __assign(__assign({}, action), {
1550
+ value: isString(action.expr) ? action.expr : action.expr(ctx, _event.data, {
1514
1551
  _event: _event
1515
1552
  })
1516
1553
  });
@@ -1538,7 +1575,7 @@ var actions_cancel = function (sendId) {
1538
1575
  function actions_start(activity) {
1539
1576
  var activityDef = toActivityDefinition(activity);
1540
1577
  return {
1541
- type: types_ActionTypes.Start,
1578
+ type: ActionTypes.Start,
1542
1579
  activity: activityDef,
1543
1580
  exec: undefined
1544
1581
  };
@@ -1550,20 +1587,20 @@ function actions_start(activity) {
1550
1587
  */
1551
1588
 
1552
1589
  function actions_stop(actorRef) {
1553
- var activity = utils_isFunction(actorRef) ? actorRef : toActivityDefinition(actorRef);
1590
+ var activity = isFunction(actorRef) ? actorRef : toActivityDefinition(actorRef);
1554
1591
  return {
1555
- type: types_ActionTypes.Stop,
1592
+ type: ActionTypes.Stop,
1556
1593
  activity: activity,
1557
1594
  exec: undefined
1558
1595
  };
1559
1596
  }
1560
1597
  function resolveStop(action, context, _event) {
1561
- var actorRefOrString = utils_isFunction(action.activity) ? action.activity(context, _event.data) : action.activity;
1598
+ var actorRefOrString = isFunction(action.activity) ? action.activity(context, _event.data) : action.activity;
1562
1599
  var resolvedActorRef = typeof actorRefOrString === 'string' ? {
1563
1600
  id: actorRefOrString
1564
1601
  } : actorRefOrString;
1565
1602
  var actionObject = {
1566
- type: types_ActionTypes.Stop,
1603
+ type: ActionTypes.Stop,
1567
1604
  activity: resolvedActorRef
1568
1605
  };
1569
1606
  return actionObject;
@@ -1574,7 +1611,7 @@ function resolveStop(action, context, _event) {
1574
1611
  * @param assignment An object that represents the partial context to update.
1575
1612
  */
1576
1613
 
1577
- var actions_assign = function (assignment) {
1614
+ var es_actions_assign = function (assignment) {
1578
1615
  return {
1579
1616
  type: actionTypes_assign,
1580
1617
  assignment: assignment
@@ -1593,7 +1630,7 @@ function isActionObject(action) {
1593
1630
 
1594
1631
  function actions_after(delayRef, id) {
1595
1632
  var idSuffix = id ? "#".concat(id) : '';
1596
- return "".concat(types_ActionTypes.After, "(").concat(delayRef, ")").concat(idSuffix);
1633
+ return "".concat(ActionTypes.After, "(").concat(delayRef, ")").concat(idSuffix);
1597
1634
  }
1598
1635
  /**
1599
1636
  * Returns an event that represents that a final state node
@@ -1604,7 +1641,7 @@ function actions_after(delayRef, id) {
1604
1641
  */
1605
1642
 
1606
1643
  function done(id, data) {
1607
- var type = "".concat(types_ActionTypes.DoneState, ".").concat(id);
1644
+ var type = "".concat(ActionTypes.DoneState, ".").concat(id);
1608
1645
  var eventObject = {
1609
1646
  type: type,
1610
1647
  data: data
@@ -1626,8 +1663,8 @@ function done(id, data) {
1626
1663
  * @param data The data to pass into the event
1627
1664
  */
1628
1665
 
1629
- function actions_doneInvoke(id, data) {
1630
- var type = "".concat(types_ActionTypes.DoneInvoke, ".").concat(id);
1666
+ function doneInvoke(id, data) {
1667
+ var type = "".concat(ActionTypes.DoneInvoke, ".").concat(id);
1631
1668
  var eventObject = {
1632
1669
  type: type,
1633
1670
  data: data
@@ -1640,7 +1677,7 @@ function actions_doneInvoke(id, data) {
1640
1677
  return eventObject;
1641
1678
  }
1642
1679
  function actions_error(id, data) {
1643
- var type = "".concat(types_ActionTypes.ErrorPlatform, ".").concat(id);
1680
+ var type = "".concat(ActionTypes.ErrorPlatform, ".").concat(id);
1644
1681
  var eventObject = {
1645
1682
  type: type,
1646
1683
  data: data
@@ -1654,7 +1691,7 @@ function actions_error(id, data) {
1654
1691
  }
1655
1692
  function actions_pure(getActions) {
1656
1693
  return {
1657
- type: ActionTypes.Pure,
1694
+ type: actions_ActionTypes.Pure,
1658
1695
  get: getActions
1659
1696
  };
1660
1697
  }
@@ -1666,7 +1703,7 @@ function actions_pure(getActions) {
1666
1703
  */
1667
1704
 
1668
1705
  function forwardTo(target, options) {
1669
- if (!IS_PRODUCTION && (!target || typeof target === 'function')) {
1706
+ if (!actions_IS_PRODUCTION && (!target || typeof target === 'function')) {
1670
1707
  var originalTarget_1 = target;
1671
1708
 
1672
1709
  target = function () {
@@ -1676,7 +1713,7 @@ function forwardTo(target, options) {
1676
1713
  args[_i] = arguments[_i];
1677
1714
  }
1678
1715
 
1679
- var resolvedTarget = typeof originalTarget_1 === 'function' ? originalTarget_1.apply(void 0, __spreadArray([], __read(args), false)) : originalTarget_1;
1716
+ var resolvedTarget = typeof originalTarget_1 === 'function' ? originalTarget_1.apply(void 0, actions_spreadArray([], actions_read(args), false)) : originalTarget_1;
1680
1717
 
1681
1718
  if (!resolvedTarget) {
1682
1719
  throw new Error("Attempted to forward event to undefined actor. This risks an infinite loop in the sender.");
@@ -1688,7 +1725,7 @@ function forwardTo(target, options) {
1688
1725
 
1689
1726
  return actions_send(function (_, event) {
1690
1727
  return event;
1691
- }, __assign(__assign({}, options), {
1728
+ }, actions_assign(actions_assign({}, options), {
1692
1729
  to: target
1693
1730
  }));
1694
1731
  }
@@ -1704,15 +1741,15 @@ function escalate(errorData, options) {
1704
1741
  return sendParent(function (context, event, meta) {
1705
1742
  return {
1706
1743
  type: error$1,
1707
- data: isFunction(errorData) ? errorData(context, event, meta) : errorData
1744
+ data: actions_isFunction(errorData) ? errorData(context, event, meta) : errorData
1708
1745
  };
1709
- }, __assign(__assign({}, options), {
1710
- to: SpecialTargets.Parent
1746
+ }, actions_assign(actions_assign({}, options), {
1747
+ to: actions_SpecialTargets.Parent
1711
1748
  }));
1712
1749
  }
1713
1750
  function actions_choose(conds) {
1714
1751
  return {
1715
- type: ActionTypes.Choose,
1752
+ type: actions_ActionTypes.Choose,
1716
1753
  conds: conds
1717
1754
  };
1718
1755
  }
@@ -1723,7 +1760,7 @@ var pluckAssigns = function (actionBlocks) {
1723
1760
  var assignActions = [];
1724
1761
 
1725
1762
  try {
1726
- for (var actionBlocks_1 = _tslib_values(actionBlocks), actionBlocks_1_1 = actionBlocks_1.next(); !actionBlocks_1_1.done; actionBlocks_1_1 = actionBlocks_1.next()) {
1763
+ for (var actionBlocks_1 = __values(actionBlocks), actionBlocks_1_1 = actionBlocks_1.next(); !actionBlocks_1_1.done; actionBlocks_1_1 = actionBlocks_1.next()) {
1727
1764
  var block = actionBlocks_1_1.value;
1728
1765
  var i = 0;
1729
1766
 
@@ -1780,14 +1817,14 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1780
1817
  case send:
1781
1818
  var sendAction = resolveSend(actionObject, updatedContext, _event, machine.options.delays); // TODO: fix ActionTypes.Init
1782
1819
 
1783
- if (!environment_IS_PRODUCTION) {
1820
+ if (!IS_PRODUCTION) {
1784
1821
  var configuredDelay = actionObject.delay; // warn after resolving as we can create better contextual message here
1785
1822
 
1786
- utils_warn(!utils_isString(configuredDelay) || typeof sendAction.delay === 'number', // tslint:disable-next-line:max-line-length
1823
+ warn(!isString(configuredDelay) || typeof sendAction.delay === 'number', // tslint:disable-next-line:max-line-length
1787
1824
  "No delay reference for delay expression '".concat(configuredDelay, "' was found on machine '").concat(machine.id, "'"));
1788
1825
  }
1789
1826
 
1790
- if (predictableExec && sendAction.to !== types_SpecialTargets.Internal) {
1827
+ if (predictableExec && sendAction.to !== SpecialTargets.Internal) {
1791
1828
  if (blockType === 'entry') {
1792
1829
  deferredToBlockEnd.push(sendAction);
1793
1830
  } else {
@@ -1816,7 +1853,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1816
1853
  return [];
1817
1854
  }
1818
1855
 
1819
- var _b = _tslib_read(resolveActions(machine, currentState, updatedContext, _event, [{
1856
+ var _b = __read(resolveActions(machine, currentState, updatedContext, _event, [{
1820
1857
  type: blockType,
1821
1858
  actions: toActionObjects(toArray(matchedActions), machine.options.actions)
1822
1859
  }], predictableExec, preserveActionOrder), 2),
@@ -1836,7 +1873,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1836
1873
  return [];
1837
1874
  }
1838
1875
 
1839
- var _c = _tslib_read(resolveActions(machine, currentState, updatedContext, _event, [{
1876
+ var _c = __read(resolveActions(machine, currentState, updatedContext, _event, [{
1840
1877
  type: blockType,
1841
1878
  actions: toActionObjects(toArray(matchedActions), machine.options.actions)
1842
1879
  }], predictableExec, preserveActionOrder), 2),
@@ -1871,7 +1908,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1871
1908
  } else if (exec_1 && preservedContexts) {
1872
1909
  var contextIndex_1 = preservedContexts.length - 1;
1873
1910
 
1874
- var wrapped = _tslib_assign(_tslib_assign({}, resolvedActionObject), {
1911
+ var wrapped = __assign(__assign({}, resolvedActionObject), {
1875
1912
  exec: function (_ctx) {
1876
1913
  var args = [];
1877
1914
 
@@ -1879,7 +1916,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1879
1916
  args[_i - 1] = arguments[_i];
1880
1917
  }
1881
1918
 
1882
- exec_1.apply(void 0, _tslib_spreadArray([preservedContexts[contextIndex_1]], _tslib_read(args), false));
1919
+ exec_1.apply(void 0, __spreadArray([preservedContexts[contextIndex_1]], __read(args), false));
1883
1920
  }
1884
1921
  });
1885
1922
 
@@ -1896,7 +1933,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1896
1933
  var resolvedActions = [];
1897
1934
 
1898
1935
  try {
1899
- for (var _b = _tslib_values(block.actions), _c = _b.next(); !_c.done; _c = _b.next()) {
1936
+ for (var _b = __values(block.actions), _c = _b.next(); !_c.done; _c = _b.next()) {
1900
1937
  var action = _c.value;
1901
1938
  var resolved = handleAction(block.type, action);
1902
1939
 
@@ -1941,7 +1978,7 @@ var provide = function (service, fn) {
1941
1978
  serviceStack.pop();
1942
1979
  return result;
1943
1980
  };
1944
- var serviceScope_consume = function (fn) {
1981
+ var consume = function (fn) {
1945
1982
  return fn(serviceStack[serviceStack.length - 1]);
1946
1983
  };
1947
1984
 
@@ -1992,17 +2029,17 @@ function createInvocableActor(invokeDefinition, machine, context, _event) {
1992
2029
  var invokeSrc = toInvokeSource(invokeDefinition.src);
1993
2030
  var serviceCreator = (_a = machine === null || machine === void 0 ? void 0 : machine.options.services) === null || _a === void 0 ? void 0 : _a[invokeSrc.type];
1994
2031
  var resolvedData = invokeDefinition.data ? mapContext(invokeDefinition.data, context, _event) : undefined;
1995
- var tempActor = serviceCreator ? Actor_createDeferredActor(serviceCreator, invokeDefinition.id, resolvedData) : createNullActor(invokeDefinition.id); // @ts-ignore
2032
+ var tempActor = serviceCreator ? createDeferredActor(serviceCreator, invokeDefinition.id, resolvedData) : createNullActor(invokeDefinition.id); // @ts-ignore
1996
2033
 
1997
2034
  tempActor.meta = invokeDefinition;
1998
2035
  return tempActor;
1999
2036
  }
2000
- function Actor_createDeferredActor(entity, id, data) {
2037
+ function createDeferredActor(entity, id, data) {
2001
2038
  var tempActor = createNullActor(id); // @ts-ignore
2002
2039
 
2003
2040
  tempActor.deferred = true;
2004
2041
 
2005
- if (utils_isMachine(entity)) {
2042
+ if (isMachine(entity)) {
2006
2043
  // "mute" the existing service scope so potential spawned actors within the `.initialState` stay deferred here
2007
2044
  var initialState_1 = tempActor.state = provide(undefined, function () {
2008
2045
  return (data ? entity.withContext(data) : entity).initialState;
@@ -2029,7 +2066,7 @@ function isSpawnedActor(item) {
2029
2066
  function toActorRef(actorRefLike) {
2030
2067
  var _a;
2031
2068
 
2032
- return _tslib_assign((_a = {
2069
+ return __assign((_a = {
2033
2070
  subscribe: function () {
2034
2071
  return {
2035
2072
  unsubscribe: function () {
@@ -2083,7 +2120,7 @@ function getConfiguration(prevStateNodes, stateNodes) {
2083
2120
 
2084
2121
  try {
2085
2122
  // add all ancestors
2086
- for (var configuration_1 = _tslib_values(configuration), configuration_1_1 = configuration_1.next(); !configuration_1_1.done; configuration_1_1 = configuration_1.next()) {
2123
+ for (var configuration_1 = __values(configuration), configuration_1_1 = configuration_1.next(); !configuration_1_1.done; configuration_1_1 = configuration_1.next()) {
2087
2124
  var s = configuration_1_1.value;
2088
2125
  var m = s.parent;
2089
2126
 
@@ -2108,7 +2145,7 @@ function getConfiguration(prevStateNodes, stateNodes) {
2108
2145
 
2109
2146
  try {
2110
2147
  // add descendants
2111
- for (var configuration_2 = _tslib_values(configuration), configuration_2_1 = configuration_2.next(); !configuration_2_1.done; configuration_2_1 = configuration_2.next()) {
2148
+ for (var configuration_2 = __values(configuration), configuration_2_1 = configuration_2.next(); !configuration_2_1.done; configuration_2_1 = configuration_2.next()) {
2112
2149
  var s = configuration_2_1.value; // if previously active, add existing child nodes
2113
2150
 
2114
2151
  if (s.type === 'compound' && (!adjList.get(s) || !adjList.get(s).length)) {
@@ -2124,7 +2161,7 @@ function getConfiguration(prevStateNodes, stateNodes) {
2124
2161
  } else {
2125
2162
  if (s.type === 'parallel') {
2126
2163
  try {
2127
- for (var _e = (e_3 = void 0, _tslib_values(getChildren(s))), _f = _e.next(); !_f.done; _f = _e.next()) {
2164
+ for (var _e = (e_3 = void 0, __values(getChildren(s))), _f = _e.next(); !_f.done; _f = _e.next()) {
2128
2165
  var child = _f.value;
2129
2166
 
2130
2167
  if (!configuration.has(child)) {
@@ -2169,7 +2206,7 @@ function getConfiguration(prevStateNodes, stateNodes) {
2169
2206
 
2170
2207
  try {
2171
2208
  // add all ancestors
2172
- for (var configuration_3 = _tslib_values(configuration), configuration_3_1 = configuration_3.next(); !configuration_3_1.done; configuration_3_1 = configuration_3.next()) {
2209
+ for (var configuration_3 = __values(configuration), configuration_3_1 = configuration_3.next(); !configuration_3_1.done; configuration_3_1 = configuration_3.next()) {
2173
2210
  var s = configuration_3_1.value;
2174
2211
  var m = s.parent;
2175
2212
 
@@ -2225,7 +2262,7 @@ function getAdjList(configuration) {
2225
2262
  var adjList = new Map();
2226
2263
 
2227
2264
  try {
2228
- for (var configuration_4 = _tslib_values(configuration), configuration_4_1 = configuration_4.next(); !configuration_4_1.done; configuration_4_1 = configuration_4.next()) {
2265
+ for (var configuration_4 = __values(configuration), configuration_4_1 = configuration_4.next(); !configuration_4_1.done; configuration_4_1 = configuration_4.next()) {
2229
2266
  var s = configuration_4_1.value;
2230
2267
 
2231
2268
  if (!adjList.has(s)) {
@@ -2272,7 +2309,7 @@ function has(iterable, item) {
2272
2309
  return false; // TODO: fix
2273
2310
  }
2274
2311
  function nextEvents(configuration) {
2275
- return _tslib_spreadArray([], _tslib_read(new Set(flatten(_tslib_spreadArray([], _tslib_read(configuration.map(function (sn) {
2312
+ return __spreadArray([], __read(new Set(flatten(__spreadArray([], __read(configuration.map(function (sn) {
2276
2313
  return sn.ownEvents;
2277
2314
  })), false)))), false);
2278
2315
  }
@@ -2329,7 +2366,7 @@ function stateValuesEqual(a, b) {
2329
2366
  return false;
2330
2367
  }
2331
2368
 
2332
- if (utils_isString(a) || utils_isString(b)) {
2369
+ if (isString(a) || isString(b)) {
2333
2370
  return a === b;
2334
2371
  }
2335
2372
 
@@ -2354,7 +2391,7 @@ var isState = (/* unused pure expression or super */ null && (isStateConfig));
2354
2391
  function bindActionToState(action, state) {
2355
2392
  var exec = action.exec;
2356
2393
 
2357
- var boundAction = _tslib_assign(_tslib_assign({}, action), {
2394
+ var boundAction = __assign(__assign({}, action), {
2358
2395
  exec: exec !== undefined ? function () {
2359
2396
  return exec(state.context, state.event, {
2360
2397
  action: action,
@@ -2367,7 +2404,7 @@ function bindActionToState(action, state) {
2367
2404
  return boundAction;
2368
2405
  }
2369
2406
 
2370
- var State_State =
2407
+ var State =
2371
2408
  /*#__PURE__*/
2372
2409
 
2373
2410
  /** @class */
@@ -2522,12 +2559,12 @@ function () {
2522
2559
  delimiter = '.';
2523
2560
  }
2524
2561
 
2525
- if (utils_isString(stateValue)) {
2562
+ if (isString(stateValue)) {
2526
2563
  return [stateValue];
2527
2564
  }
2528
2565
 
2529
2566
  var valueKeys = Object.keys(stateValue);
2530
- return valueKeys.concat.apply(valueKeys, _tslib_spreadArray([], _tslib_read(valueKeys.map(function (key) {
2567
+ return valueKeys.concat.apply(valueKeys, __spreadArray([], __read(valueKeys.map(function (key) {
2531
2568
  return _this.toStrings(stateValue[key], delimiter).map(function (s) {
2532
2569
  return key + delimiter + s;
2533
2570
  });
@@ -2542,13 +2579,13 @@ function () {
2542
2579
  _a.machine;
2543
2580
  var jsonValues = __rest(_a, ["configuration", "transitions", "tags", "machine"]);
2544
2581
 
2545
- return _tslib_assign(_tslib_assign({}, jsonValues), {
2582
+ return __assign(__assign({}, jsonValues), {
2546
2583
  tags: Array.from(tags)
2547
2584
  });
2548
2585
  };
2549
2586
 
2550
2587
  State.prototype.matches = function (parentStateValue) {
2551
- return utils_matchesState(parentStateValue, this.value);
2588
+ return matchesState(parentStateValue, this.value);
2552
2589
  };
2553
2590
  /**
2554
2591
  * Whether the current state configuration has a state node with the specified `tag`.
@@ -2572,8 +2609,8 @@ function () {
2572
2609
  State.prototype.can = function (event) {
2573
2610
  var _a;
2574
2611
 
2575
- if (environment_IS_PRODUCTION) {
2576
- utils_warn(!!this.machine, "state.can(...) used outside of a machine-created State object; this will always return false.");
2612
+ if (IS_PRODUCTION) {
2613
+ warn(!!this.machine, "state.can(...) used outside of a machine-created State object; this will always return false.");
2577
2614
  }
2578
2615
 
2579
2616
  var transitionData = (_a = this.machine) === null || _a === void 0 ? void 0 : _a.getTransitionData(this, event);
@@ -2604,7 +2641,7 @@ function () {
2604
2641
  this.processingEvent = false;
2605
2642
  this.queue = [];
2606
2643
  this.initialized = false;
2607
- this.options = _tslib_assign(_tslib_assign({}, defaultOptions), options);
2644
+ this.options = __assign(__assign({}, defaultOptions), options);
2608
2645
  }
2609
2646
 
2610
2647
  Scheduler.prototype.initialize = function (callback) {
@@ -2706,11 +2743,11 @@ function getGlobal() {
2706
2743
  return window;
2707
2744
  }
2708
2745
 
2709
- if (typeof __webpack_require__.g !== 'undefined') {
2710
- return __webpack_require__.g;
2746
+ if (typeof globalThis !== 'undefined') {
2747
+ return globalThis;
2711
2748
  }
2712
2749
 
2713
- if (!environment_IS_PRODUCTION) {
2750
+ if (!IS_PRODUCTION) {
2714
2751
  console.warn('XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues');
2715
2752
  }
2716
2753
  }
@@ -2740,6 +2777,8 @@ function registerService(service) {
2740
2777
 
2741
2778
 
2742
2779
  ;// ../../../node_modules/xstate/es/behaviors.js
2780
+ /* unused harmony import specifier */ var behaviors_doneInvoke;
2781
+ /* unused harmony import specifier */ var behaviors_error;
2743
2782
 
2744
2783
 
2745
2784
 
@@ -2772,7 +2811,7 @@ function fromPromise(promiseFn) {
2772
2811
 
2773
2812
  switch (event.type) {
2774
2813
  case 'fulfill':
2775
- parent === null || parent === void 0 ? void 0 : parent.send(doneInvoke(id, event.data));
2814
+ parent === null || parent === void 0 ? void 0 : parent.send(behaviors_doneInvoke(id, event.data));
2776
2815
  return {
2777
2816
  error: undefined,
2778
2817
  data: event.data,
@@ -2780,7 +2819,7 @@ function fromPromise(promiseFn) {
2780
2819
  };
2781
2820
 
2782
2821
  case 'reject':
2783
- parent === null || parent === void 0 ? void 0 : parent.send(error(id, event.error));
2822
+ parent === null || parent === void 0 ? void 0 : parent.send(behaviors_error(id, event.error));
2784
2823
  observers.forEach(function (observer) {
2785
2824
  observer.error(event.error);
2786
2825
  });
@@ -2873,6 +2912,15 @@ function spawnBehavior(behavior, options) {
2873
2912
 
2874
2913
 
2875
2914
  ;// ../../../node_modules/xstate/es/interpreter.js
2915
+ /* unused harmony import specifier */ var interpreter_assign;
2916
+ /* unused harmony import specifier */ var interpreter_IS_PRODUCTION;
2917
+ /* unused harmony import specifier */ var interpreter_isString;
2918
+ /* unused harmony import specifier */ var interpreter_uniqueId;
2919
+ /* unused harmony import specifier */ var interpreter_isMachine;
2920
+ /* unused harmony import specifier */ var interpreter_isFunction;
2921
+ /* unused harmony import specifier */ var interpreter_warn;
2922
+ /* unused harmony import specifier */ var interpreter_createDeferredActor;
2923
+ /* unused harmony import specifier */ var interpreter_consume;
2876
2924
 
2877
2925
 
2878
2926
 
@@ -2960,8 +3008,8 @@ function () {
2960
3008
 
2961
3009
  if (_this.status === InterpreterStatus.Stopped) {
2962
3010
  // do nothing
2963
- if (!environment_IS_PRODUCTION) {
2964
- utils_warn(false, "Event \"".concat(_event.name, "\" was sent to stopped service \"").concat(_this.machine.id, "\". This service has already reached its final state, and will not transition.\nEvent: ").concat(JSON.stringify(_event.data)));
3011
+ if (!IS_PRODUCTION) {
3012
+ warn(false, "Event \"".concat(_event.name, "\" was sent to stopped service \"").concat(_this.machine.id, "\". This service has already reached its final state, and will not transition.\nEvent: ").concat(JSON.stringify(_event.data)));
2965
3013
  }
2966
3014
 
2967
3015
  return _this.state;
@@ -2986,8 +3034,8 @@ function () {
2986
3034
  };
2987
3035
 
2988
3036
  this.sendTo = function (event, to, immediate) {
2989
- var isParent = _this.parent && (to === types_SpecialTargets.Parent || _this.parent.id === to);
2990
- var target = isParent ? _this.parent : utils_isString(to) ? to === types_SpecialTargets.Internal ? _this : _this.children.get(to) || registry.get(to) : isActor(to) ? to : undefined;
3037
+ var isParent = _this.parent && (to === SpecialTargets.Parent || _this.parent.id === to);
3038
+ var target = isParent ? _this.parent : isString(to) ? to === SpecialTargets.Internal ? _this : _this.children.get(to) || registry.get(to) : isActor(to) ? to : undefined;
2991
3039
 
2992
3040
  if (!target) {
2993
3041
  if (!isParent) {
@@ -2995,8 +3043,8 @@ function () {
2995
3043
  } // tslint:disable-next-line:no-console
2996
3044
 
2997
3045
 
2998
- if (!environment_IS_PRODUCTION) {
2999
- utils_warn(false, "Service '".concat(_this.id, "' has no parent: unable to send event ").concat(event.type));
3046
+ if (!IS_PRODUCTION) {
3047
+ warn(false, "Service '".concat(_this.id, "' has no parent: unable to send event ").concat(event.type));
3000
3048
  }
3001
3049
 
3002
3050
  return;
@@ -3008,8 +3056,8 @@ function () {
3008
3056
  if (_this.status !== InterpreterStatus.Stopped || _this.parent !== target || // we need to send events to the parent from exit handlers of a machine that reached its final state
3009
3057
  _this.state.done) {
3010
3058
  // Send SCXML events to machines
3011
- var scxmlEvent = _tslib_assign(_tslib_assign({}, event), {
3012
- name: event.name === actionTypes_error ? "".concat(actions_error(_this.id)) : event.name,
3059
+ var scxmlEvent = __assign(__assign({}, event), {
3060
+ name: event.name === error ? "".concat(actions_error(_this.id)) : event.name,
3013
3061
  origin: _this.sessionId
3014
3062
  });
3015
3063
 
@@ -3035,7 +3083,7 @@ function () {
3035
3083
  }
3036
3084
 
3037
3085
  var actionOrExec = action.exec || getActionFunction(action.type, actionFunctionMap);
3038
- var exec = utils_isFunction(actionOrExec) ? actionOrExec : actionOrExec ? actionOrExec.exec : action.exec;
3086
+ var exec = isFunction(actionOrExec) ? actionOrExec : actionOrExec ? actionOrExec.exec : action.exec;
3039
3087
 
3040
3088
  if (exec) {
3041
3089
  try {
@@ -3108,14 +3156,14 @@ function () {
3108
3156
  } // Invoked services
3109
3157
 
3110
3158
 
3111
- if (activity.type === types_ActionTypes.Invoke) {
3159
+ if (activity.type === ActionTypes.Invoke) {
3112
3160
  var invokeSource = toInvokeSource(activity.src);
3113
3161
  var serviceCreator = _this.machine.options.services ? _this.machine.options.services[invokeSource.type] : undefined;
3114
3162
  var id = activity.id,
3115
3163
  data = activity.data;
3116
3164
 
3117
- if (!environment_IS_PRODUCTION) {
3118
- utils_warn(!('forward' in activity), // tslint:disable-next-line:max-line-length
3165
+ if (!IS_PRODUCTION) {
3166
+ warn(!('forward' in activity), // tslint:disable-next-line:max-line-length
3119
3167
  "`forward` property is deprecated (found in invocation of '".concat(activity.src, "' in in machine '").concat(_this.machine.id, "'). ") + "Please use `autoForward` instead.");
3120
3168
  }
3121
3169
 
@@ -3123,8 +3171,8 @@ function () {
3123
3171
 
3124
3172
  if (!serviceCreator) {
3125
3173
  // tslint:disable-next-line:no-console
3126
- if (!environment_IS_PRODUCTION) {
3127
- utils_warn(false, "No service found for invocation '".concat(activity.src, "' in machine '").concat(_this.machine.id, "'."));
3174
+ if (!IS_PRODUCTION) {
3175
+ warn(false, "No service found for invocation '".concat(activity.src, "' in machine '").concat(_this.machine.id, "'."));
3128
3176
  }
3129
3177
 
3130
3178
  return;
@@ -3137,7 +3185,7 @@ function () {
3137
3185
  return;
3138
3186
  }
3139
3187
 
3140
- var source = utils_isFunction(serviceCreator) ? serviceCreator(context, _event.data, {
3188
+ var source = isFunction(serviceCreator) ? serviceCreator(context, _event.data, {
3141
3189
  data: resolvedData,
3142
3190
  src: invokeSource,
3143
3191
  meta: activity.meta
@@ -3150,7 +3198,7 @@ function () {
3150
3198
 
3151
3199
  var options = void 0;
3152
3200
 
3153
- if (utils_isMachine(source)) {
3201
+ if (isMachine(source)) {
3154
3202
  source = resolvedData ? source.withContext(resolvedData) : source;
3155
3203
  options = {
3156
3204
  autoForward: autoForward
@@ -3186,15 +3234,15 @@ function () {
3186
3234
  break;
3187
3235
 
3188
3236
  default:
3189
- if (!environment_IS_PRODUCTION) {
3190
- utils_warn(false, "No implementation found for action type '".concat(action.type, "'"));
3237
+ if (!IS_PRODUCTION) {
3238
+ warn(false, "No implementation found for action type '".concat(action.type, "'"));
3191
3239
  }
3192
3240
 
3193
3241
  break;
3194
3242
  }
3195
3243
  };
3196
3244
 
3197
- var resolvedOptions = _tslib_assign(_tslib_assign({}, Interpreter.defaultOptions), options);
3245
+ var resolvedOptions = __assign(__assign({}, Interpreter.defaultOptions), options);
3198
3246
 
3199
3247
  var clock = resolvedOptions.clock,
3200
3248
  logger = resolvedOptions.logger,
@@ -3233,8 +3281,8 @@ function () {
3233
3281
  * @deprecated Use `.getSnapshot()` instead.
3234
3282
  */
3235
3283
  get: function () {
3236
- if (!environment_IS_PRODUCTION) {
3237
- utils_warn(this.status !== InterpreterStatus.NotStarted, "Attempted to read state from uninitialized service '".concat(this.id, "'. Make sure the service is started first."));
3284
+ if (!IS_PRODUCTION) {
3285
+ warn(this.status !== InterpreterStatus.NotStarted, "Attempted to read state from uninitialized service '".concat(this.id, "'. Make sure the service is started first."));
3238
3286
  }
3239
3287
 
3240
3288
  return this._state;
@@ -3253,7 +3301,7 @@ function () {
3253
3301
  var e_1, _a;
3254
3302
 
3255
3303
  try {
3256
- for (var _b = _tslib_values(state.actions), _c = _b.next(); !_c.done; _c = _b.next()) {
3304
+ for (var _b = __values(state.actions), _c = _b.next(); !_c.done; _c = _b.next()) {
3257
3305
  var action = _c.value;
3258
3306
  this.exec(action, state, actionsConfig);
3259
3307
  }
@@ -3304,7 +3352,7 @@ function () {
3304
3352
 
3305
3353
  if (state.event) {
3306
3354
  try {
3307
- for (var _e = _tslib_values(this.eventListeners), _f = _e.next(); !_f.done; _f = _e.next()) {
3355
+ for (var _e = __values(this.eventListeners), _f = _e.next(); !_f.done; _f = _e.next()) {
3308
3356
  var listener = _f.value;
3309
3357
  listener(state.event);
3310
3358
  }
@@ -3322,7 +3370,7 @@ function () {
3322
3370
  }
3323
3371
 
3324
3372
  try {
3325
- for (var _g = _tslib_values(this.listeners), _h = _g.next(); !_h.done; _h = _g.next()) {
3373
+ for (var _g = __values(this.listeners), _h = _g.next(); !_h.done; _h = _g.next()) {
3326
3374
  var listener = _h.value;
3327
3375
  listener(state, state.event);
3328
3376
  }
@@ -3339,7 +3387,7 @@ function () {
3339
3387
  }
3340
3388
 
3341
3389
  try {
3342
- for (var _j = _tslib_values(this.contextListeners), _k = _j.next(); !_k.done; _k = _j.next()) {
3390
+ for (var _j = __values(this.contextListeners), _k = _j.next(); !_k.done; _k = _j.next()) {
3343
3391
  var contextListener = _k.value;
3344
3392
  contextListener(this.state.context, this.state.history ? this.state.history.context : undefined);
3345
3393
  }
@@ -3361,10 +3409,10 @@ function () {
3361
3409
  return sn.type === 'final' && sn.parent === _this.machine;
3362
3410
  });
3363
3411
  var doneData = finalChildStateNode && finalChildStateNode.doneData ? mapContext(finalChildStateNode.doneData, state.context, _event) : undefined;
3364
- this._doneEvent = actions_doneInvoke(this.id, doneData);
3412
+ this._doneEvent = doneInvoke(this.id, doneData);
3365
3413
 
3366
3414
  try {
3367
- for (var _l = _tslib_values(this.doneListeners), _m = _l.next(); !_m.done; _m = _l.next()) {
3415
+ for (var _l = __values(this.doneListeners), _m = _l.next(); !_m.done; _m = _l.next()) {
3368
3416
  var listener = _m.value;
3369
3417
  listener(this._doneEvent);
3370
3418
  }
@@ -3535,7 +3583,7 @@ function () {
3535
3583
  this.initialized = true;
3536
3584
  this.status = InterpreterStatus.Running;
3537
3585
  var resolvedState = initialState === undefined ? this.initialState : provide(this, function () {
3538
- return isStateConfig(initialState) ? _this.machine.resolveState(initialState) : _this.machine.resolveState(State_State.from(initialState, _this.machine.context));
3586
+ return isStateConfig(initialState) ? _this.machine.resolveState(initialState) : _this.machine.resolveState(State.from(initialState, _this.machine.context));
3539
3587
  });
3540
3588
 
3541
3589
  if (this.options.devTools) {
@@ -3551,7 +3599,7 @@ function () {
3551
3599
  Interpreter.prototype._stopChildren = function () {
3552
3600
  // TODO: think about converting those to actions
3553
3601
  this.children.forEach(function (child) {
3554
- if (utils_isFunction(child.stop)) {
3602
+ if (isFunction(child.stop)) {
3555
3603
  child.stop();
3556
3604
  }
3557
3605
  });
@@ -3562,7 +3610,7 @@ function () {
3562
3610
  var e_6, _a, e_7, _b, e_8, _c, e_9, _d, e_10, _e;
3563
3611
 
3564
3612
  try {
3565
- for (var _f = _tslib_values(this.listeners), _g = _f.next(); !_g.done; _g = _f.next()) {
3613
+ for (var _f = __values(this.listeners), _g = _f.next(); !_g.done; _g = _f.next()) {
3566
3614
  var listener = _g.value;
3567
3615
  this.listeners.delete(listener);
3568
3616
  }
@@ -3579,7 +3627,7 @@ function () {
3579
3627
  }
3580
3628
 
3581
3629
  try {
3582
- for (var _h = _tslib_values(this.stopListeners), _j = _h.next(); !_j.done; _j = _h.next()) {
3630
+ for (var _h = __values(this.stopListeners), _j = _h.next(); !_j.done; _j = _h.next()) {
3583
3631
  var listener = _j.value; // call listener, then remove
3584
3632
 
3585
3633
  listener();
@@ -3598,7 +3646,7 @@ function () {
3598
3646
  }
3599
3647
 
3600
3648
  try {
3601
- for (var _k = _tslib_values(this.contextListeners), _l = _k.next(); !_l.done; _l = _k.next()) {
3649
+ for (var _k = __values(this.contextListeners), _l = _k.next(); !_l.done; _l = _k.next()) {
3602
3650
  var listener = _l.value;
3603
3651
  this.contextListeners.delete(listener);
3604
3652
  }
@@ -3615,7 +3663,7 @@ function () {
3615
3663
  }
3616
3664
 
3617
3665
  try {
3618
- for (var _m = _tslib_values(this.doneListeners), _o = _m.next(); !_o.done; _o = _m.next()) {
3666
+ for (var _m = __values(this.doneListeners), _o = _m.next(); !_o.done; _o = _m.next()) {
3619
3667
  var listener = _o.value;
3620
3668
  this.doneListeners.delete(listener);
3621
3669
  }
@@ -3643,7 +3691,7 @@ function () {
3643
3691
  try {
3644
3692
  // we are going to stop within the current sync frame
3645
3693
  // so we can safely just cancel this here as nothing async should be fired anyway
3646
- for (var _p = _tslib_values(Object.keys(this.delayedEventsMap)), _q = _p.next(); !_q.done; _q = _p.next()) {
3694
+ for (var _p = __values(Object.keys(this.delayedEventsMap)), _q = _p.next(); !_q.done; _q = _p.next()) {
3647
3695
  var key = _q.value;
3648
3696
  this.clock.clearTimeout(this.delayedEventsMap[key]);
3649
3697
  }
@@ -3695,20 +3743,20 @@ function () {
3695
3743
  });
3696
3744
 
3697
3745
  var nextState = provide(_this, function () {
3698
- var exitActions = flatten(_tslib_spreadArray([], _tslib_read(_this.state.configuration), false).sort(function (a, b) {
3746
+ var exitActions = flatten(__spreadArray([], __read(_this.state.configuration), false).sort(function (a, b) {
3699
3747
  return b.order - a.order;
3700
3748
  }).map(function (stateNode) {
3701
3749
  return toActionObjects(stateNode.onExit, _this.machine.options.actions);
3702
3750
  }));
3703
3751
 
3704
- var _a = _tslib_read(resolveActions(_this.machine, _this.state, _this.state.context, _event, [{
3752
+ var _a = __read(resolveActions(_this.machine, _this.state, _this.state.context, _event, [{
3705
3753
  type: 'exit',
3706
3754
  actions: exitActions
3707
3755
  }], _this.machine.config.predictableActionArguments ? _this._exec : undefined, _this.machine.config.predictableActionArguments || _this.machine.config.preserveActionOrder), 2),
3708
3756
  resolvedActions = _a[0],
3709
3757
  updatedContext = _a[1];
3710
3758
 
3711
- var newState = new State_State({
3759
+ var newState = new State({
3712
3760
  value: _this.state.value,
3713
3761
  context: updatedContext,
3714
3762
  _event: _event,
@@ -3745,8 +3793,8 @@ function () {
3745
3793
 
3746
3794
  if (this.status === InterpreterStatus.NotStarted && this.options.deferEvents) {
3747
3795
  // tslint:disable-next-line:no-console
3748
- if (!environment_IS_PRODUCTION) {
3749
- utils_warn(false, "".concat(events.length, " event(s) were sent to uninitialized service \"").concat(this.machine.id, "\" and are deferred. Make sure .start() is called for this service.\nEvent: ").concat(JSON.stringify(event)));
3796
+ if (!IS_PRODUCTION) {
3797
+ warn(false, "".concat(events.length, " event(s) were sent to uninitialized service \"").concat(this.machine.id, "\" and are deferred. Make sure .start() is called for this service.\nEvent: ").concat(JSON.stringify(event)));
3750
3798
  }
3751
3799
  } else if (this.status !== InterpreterStatus.Running) {
3752
3800
  throw new Error( // tslint:disable-next-line:max-line-length
@@ -3773,14 +3821,14 @@ function () {
3773
3821
  nextState = provide(_this, function () {
3774
3822
  return _this.machine.transition(nextState, _event, undefined, exec || undefined);
3775
3823
  });
3776
- batchedActions.push.apply(batchedActions, _tslib_spreadArray([], _tslib_read(_this.machine.config.predictableActionArguments ? nextState.actions : nextState.actions.map(function (a) {
3824
+ batchedActions.push.apply(batchedActions, __spreadArray([], __read(_this.machine.config.predictableActionArguments ? nextState.actions : nextState.actions.map(function (a) {
3777
3825
  return bindActionToState(a, nextState);
3778
3826
  })), false));
3779
3827
  batchChanged = batchChanged || !!nextState.changed;
3780
3828
  };
3781
3829
 
3782
3830
  try {
3783
- for (var events_1 = _tslib_values(events), events_1_1 = events_1.next(); !events_1_1.done; events_1_1 = events_1.next()) {
3831
+ for (var events_1 = __values(events), events_1_1 = events_1.next(); !events_1_1.done; events_1_1 = events_1.next()) {
3784
3832
  var event_1 = events_1_1.value;
3785
3833
 
3786
3834
  _loop_1(event_1);
@@ -3851,7 +3899,7 @@ function () {
3851
3899
  var e_12, _a;
3852
3900
 
3853
3901
  try {
3854
- for (var _b = _tslib_values(this.forwardTo), _c = _b.next(); !_c.done; _c = _b.next()) {
3902
+ for (var _b = __values(this.forwardTo), _c = _b.next(); !_c.done; _c = _b.next()) {
3855
3903
  var id = _c.value;
3856
3904
  var child = this.children.get(id);
3857
3905
 
@@ -3922,26 +3970,26 @@ function () {
3922
3970
 
3923
3971
  this.removeChild(childId);
3924
3972
 
3925
- if (utils_isFunction(child.stop)) {
3973
+ if (isFunction(child.stop)) {
3926
3974
  child.stop();
3927
3975
  }
3928
3976
  };
3929
3977
 
3930
3978
  Interpreter.prototype.spawn = function (entity, name, options) {
3931
3979
  if (this.status !== InterpreterStatus.Running) {
3932
- return Actor_createDeferredActor(entity, name);
3980
+ return createDeferredActor(entity, name);
3933
3981
  }
3934
3982
 
3935
3983
  if (isPromiseLike(entity)) {
3936
3984
  return this.spawnPromise(Promise.resolve(entity), name);
3937
- } else if (utils_isFunction(entity)) {
3985
+ } else if (isFunction(entity)) {
3938
3986
  return this.spawnCallback(entity, name);
3939
3987
  } else if (isSpawnedActor(entity)) {
3940
3988
  return this.spawnActor(entity, name);
3941
3989
  } else if (isObservable(entity)) {
3942
3990
  return this.spawnObservable(entity, name);
3943
- } else if (utils_isMachine(entity)) {
3944
- return this.spawnMachine(entity, _tslib_assign(_tslib_assign({}, options), {
3991
+ } else if (isMachine(entity)) {
3992
+ return this.spawnMachine(entity, __assign(__assign({}, options), {
3945
3993
  id: name
3946
3994
  }));
3947
3995
  } else if (isBehavior(entity)) {
@@ -3958,16 +4006,16 @@ function () {
3958
4006
  options = {};
3959
4007
  }
3960
4008
 
3961
- var childService = new Interpreter(machine, _tslib_assign(_tslib_assign({}, this.options), {
4009
+ var childService = new Interpreter(machine, __assign(__assign({}, this.options), {
3962
4010
  parent: this,
3963
4011
  id: options.id || machine.id
3964
4012
  }));
3965
4013
 
3966
- var resolvedOptions = _tslib_assign(_tslib_assign({}, DEFAULT_SPAWN_OPTIONS), options);
4014
+ var resolvedOptions = __assign(__assign({}, DEFAULT_SPAWN_OPTIONS), options);
3967
4015
 
3968
4016
  if (resolvedOptions.sync) {
3969
4017
  childService.onTransition(function (state) {
3970
- _this.send(actionTypes_update, {
4018
+ _this.send(update, {
3971
4019
  state: state,
3972
4020
  id: childService.id
3973
4021
  });
@@ -4013,7 +4061,7 @@ function () {
4013
4061
 
4014
4062
  _this.removeChild(id);
4015
4063
 
4016
- _this.send(toSCXMLEvent(actions_doneInvoke(id, response), {
4064
+ _this.send(toSCXMLEvent(doneInvoke(id, response), {
4017
4065
  origin: id
4018
4066
  }));
4019
4067
  }
@@ -4156,7 +4204,7 @@ function () {
4156
4204
  stop: function () {
4157
4205
  canceled = true;
4158
4206
 
4159
- if (utils_isFunction(callbackStop)) {
4207
+ if (isFunction(callbackStop)) {
4160
4208
  callbackStop();
4161
4209
  }
4162
4210
  },
@@ -4196,7 +4244,7 @@ function () {
4196
4244
  }, function () {
4197
4245
  _this.removeChild(id);
4198
4246
 
4199
- _this.send(toSCXMLEvent(actions_doneInvoke(id), {
4247
+ _this.send(toSCXMLEvent(doneInvoke(id), {
4200
4248
  origin: id
4201
4249
  }));
4202
4250
  });
@@ -4235,8 +4283,8 @@ function () {
4235
4283
  var implementation = this.machine.options && this.machine.options.activities ? this.machine.options.activities[activity.type] : undefined;
4236
4284
 
4237
4285
  if (!implementation) {
4238
- if (!environment_IS_PRODUCTION) {
4239
- utils_warn(false, "No implementation found for activity '".concat(activity.type, "'"));
4286
+ if (!IS_PRODUCTION) {
4287
+ warn(false, "No implementation found for activity '".concat(activity.type, "'"));
4240
4288
  } // tslint:disable-next-line:no-console
4241
4289
 
4242
4290
 
@@ -4283,7 +4331,7 @@ function () {
4283
4331
  if (this.options.devTools && global) {
4284
4332
  if (global.__REDUX_DEVTOOLS_EXTENSION__) {
4285
4333
  var devToolsOptions = typeof this.options.devTools === 'object' ? this.options.devTools : undefined;
4286
- this.devTools = global.__REDUX_DEVTOOLS_EXTENSION__.connect(_tslib_assign(_tslib_assign({
4334
+ this.devTools = global.__REDUX_DEVTOOLS_EXTENSION__.connect(__assign(__assign({
4287
4335
  name: this.id,
4288
4336
  autoPause: true,
4289
4337
  stateSanitizer: function (state) {
@@ -4294,7 +4342,7 @@ function () {
4294
4342
  };
4295
4343
  }
4296
4344
  }, devToolsOptions), {
4297
- features: _tslib_assign({
4345
+ features: __assign({
4298
4346
  jump: false,
4299
4347
  skip: false
4300
4348
  }, devToolsOptions ? devToolsOptions.features : undefined)
@@ -4351,29 +4399,29 @@ function () {
4351
4399
  }();
4352
4400
 
4353
4401
  var resolveSpawnOptions = function (nameOrOptions) {
4354
- if (isString(nameOrOptions)) {
4355
- return __assign(__assign({}, DEFAULT_SPAWN_OPTIONS), {
4402
+ if (interpreter_isString(nameOrOptions)) {
4403
+ return interpreter_assign(interpreter_assign({}, DEFAULT_SPAWN_OPTIONS), {
4356
4404
  name: nameOrOptions
4357
4405
  });
4358
4406
  }
4359
4407
 
4360
- return __assign(__assign(__assign({}, DEFAULT_SPAWN_OPTIONS), {
4361
- name: uniqueId()
4408
+ return interpreter_assign(interpreter_assign(interpreter_assign({}, DEFAULT_SPAWN_OPTIONS), {
4409
+ name: interpreter_uniqueId()
4362
4410
  }), nameOrOptions);
4363
4411
  };
4364
4412
 
4365
4413
  function spawn(entity, nameOrOptions) {
4366
4414
  var resolvedOptions = resolveSpawnOptions(nameOrOptions);
4367
- return consume(function (service) {
4368
- if (!IS_PRODUCTION) {
4369
- var isLazyEntity = isMachine(entity) || isFunction(entity);
4370
- warn(!!service || isLazyEntity, "Attempted to spawn an Actor (ID: \"".concat(isMachine(entity) ? entity.id : 'undefined', "\") outside of a service. This will have no effect."));
4415
+ return interpreter_consume(function (service) {
4416
+ if (!interpreter_IS_PRODUCTION) {
4417
+ var isLazyEntity = interpreter_isMachine(entity) || interpreter_isFunction(entity);
4418
+ interpreter_warn(!!service || isLazyEntity, "Attempted to spawn an Actor (ID: \"".concat(interpreter_isMachine(entity) ? entity.id : 'undefined', "\") outside of a service. This will have no effect."));
4371
4419
  }
4372
4420
 
4373
4421
  if (service) {
4374
4422
  return service.spawn(entity, resolvedOptions.name, resolvedOptions);
4375
4423
  } else {
4376
- return createDeferredActor(entity, resolvedOptions.name);
4424
+ return interpreter_createDeferredActor(entity, resolvedOptions.name);
4377
4425
  }
4378
4426
  });
4379
4427
  }
@@ -4415,7 +4463,7 @@ function invokeUtils_toInvokeSource(src) {
4415
4463
  return src;
4416
4464
  }
4417
4465
  function toInvokeDefinition(invokeConfig) {
4418
- return _tslib_assign(_tslib_assign({
4466
+ return __assign(__assign({
4419
4467
  type: invoke
4420
4468
  }, invokeConfig), {
4421
4469
  toJSON: function () {
@@ -4423,7 +4471,7 @@ function toInvokeDefinition(invokeConfig) {
4423
4471
  invokeConfig.onError;
4424
4472
  var invokeDef = __rest(invokeConfig, ["onDone", "onError"]);
4425
4473
 
4426
- return _tslib_assign(_tslib_assign({}, invokeDef), {
4474
+ return __assign(__assign({}, invokeDef), {
4427
4475
  type: invoke,
4428
4476
  src: invokeUtils_toInvokeSource(invokeConfig.src)
4429
4477
  });
@@ -4466,13 +4514,13 @@ var createDefaultOptions = function () {
4466
4514
 
4467
4515
  var validateArrayifiedTransitions = function (stateNode, event, transitions) {
4468
4516
  var hasNonLastUnguardedTarget = transitions.slice(0, -1).some(function (transition) {
4469
- return !('cond' in transition) && !('in' in transition) && (utils_isString(transition.target) || utils_isMachine(transition.target));
4517
+ return !('cond' in transition) && !('in' in transition) && (isString(transition.target) || isMachine(transition.target));
4470
4518
  });
4471
4519
  var eventText = event === NULL_EVENT ? 'the transient event' : "event '".concat(event, "'");
4472
- utils_warn(!hasNonLastUnguardedTarget, "One or more transitions for ".concat(eventText, " on state '").concat(stateNode.id, "' are unreachable. ") + "Make sure that the default transition is the last one defined.");
4520
+ warn(!hasNonLastUnguardedTarget, "One or more transitions for ".concat(eventText, " on state '").concat(stateNode.id, "' are unreachable. ") + "Make sure that the default transition is the last one defined.");
4473
4521
  };
4474
4522
 
4475
- var StateNode_StateNode =
4523
+ var StateNode =
4476
4524
  /*#__PURE__*/
4477
4525
 
4478
4526
  /** @class */
@@ -4521,14 +4569,14 @@ function () {
4521
4569
  this.machine = this.parent ? this.parent.machine : this;
4522
4570
  this.path = this.parent ? this.parent.path.concat(this.key) : [];
4523
4571
  this.delimiter = this.config.delimiter || (this.parent ? this.parent.delimiter : STATE_DELIMITER);
4524
- this.id = this.config.id || _tslib_spreadArray([this.machine.key], _tslib_read(this.path), false).join(this.delimiter);
4572
+ this.id = this.config.id || __spreadArray([this.machine.key], __read(this.path), false).join(this.delimiter);
4525
4573
  this.version = this.parent ? this.parent.version : this.config.version;
4526
4574
  this.type = this.config.type || (this.config.parallel ? 'parallel' : this.config.states && Object.keys(this.config.states).length ? 'compound' : this.config.history ? 'history' : 'atomic');
4527
4575
  this.schema = this.parent ? this.machine.schema : (_a = this.config.schema) !== null && _a !== void 0 ? _a : {};
4528
4576
  this.description = this.config.description;
4529
4577
 
4530
- if (!environment_IS_PRODUCTION) {
4531
- utils_warn(!('parallel' in this.config), "The \"parallel\" property is deprecated and will be removed in version 4.1. ".concat(this.config.parallel ? "Replace with `type: 'parallel'`" : "Use `type: '".concat(this.type, "'`"), " in the config for state node '").concat(this.id, "' instead."));
4578
+ if (!IS_PRODUCTION) {
4579
+ warn(!('parallel' in this.config), "The \"parallel\" property is deprecated and will be removed in version 4.1. ".concat(this.config.parallel ? "Replace with `type: 'parallel'`" : "Use `type: '".concat(this.type, "'`"), " in the config for state node '").concat(this.id, "' instead."));
4532
4580
  }
4533
4581
 
4534
4582
  this.initial = this.config.initial;
@@ -4539,7 +4587,7 @@ function () {
4539
4587
  parent: _this,
4540
4588
  key: key
4541
4589
  });
4542
- Object.assign(_this.idMap, _tslib_assign((_a = {}, _a[stateNode.id] = stateNode, _a), stateNode.idMap));
4590
+ Object.assign(_this.idMap, __assign((_a = {}, _a[stateNode.id] = stateNode, _a), stateNode.idMap));
4543
4591
  return stateNode;
4544
4592
  }) : EMPTY_OBJECT; // Document order
4545
4593
 
@@ -4551,7 +4599,7 @@ function () {
4551
4599
  stateNode.order = order++;
4552
4600
 
4553
4601
  try {
4554
- for (var _b = _tslib_values(getAllChildren(stateNode)), _c = _b.next(); !_c.done; _c = _b.next()) {
4602
+ for (var _b = __values(getAllChildren(stateNode)), _c = _b.next(); !_c.done; _c = _b.next()) {
4555
4603
  var child = _c.value;
4556
4604
  dfs(child);
4557
4605
  }
@@ -4589,30 +4637,30 @@ function () {
4589
4637
  this.invoke = toArray(this.config.invoke).map(function (invokeConfig, i) {
4590
4638
  var _a, _b;
4591
4639
 
4592
- if (utils_isMachine(invokeConfig)) {
4640
+ if (isMachine(invokeConfig)) {
4593
4641
  var invokeId = createInvokeId(_this.id, i);
4594
- _this.machine.options.services = _tslib_assign((_a = {}, _a[invokeId] = invokeConfig, _a), _this.machine.options.services);
4642
+ _this.machine.options.services = __assign((_a = {}, _a[invokeId] = invokeConfig, _a), _this.machine.options.services);
4595
4643
  return toInvokeDefinition({
4596
4644
  src: invokeId,
4597
4645
  id: invokeId
4598
4646
  });
4599
- } else if (utils_isString(invokeConfig.src)) {
4647
+ } else if (isString(invokeConfig.src)) {
4600
4648
  var invokeId = invokeConfig.id || createInvokeId(_this.id, i);
4601
- return toInvokeDefinition(_tslib_assign(_tslib_assign({}, invokeConfig), {
4649
+ return toInvokeDefinition(__assign(__assign({}, invokeConfig), {
4602
4650
  id: invokeId,
4603
4651
  src: invokeConfig.src
4604
4652
  }));
4605
- } else if (utils_isMachine(invokeConfig.src) || utils_isFunction(invokeConfig.src)) {
4653
+ } else if (isMachine(invokeConfig.src) || isFunction(invokeConfig.src)) {
4606
4654
  var invokeId = invokeConfig.id || createInvokeId(_this.id, i);
4607
- _this.machine.options.services = _tslib_assign((_b = {}, _b[invokeId] = invokeConfig.src, _b), _this.machine.options.services);
4608
- return toInvokeDefinition(_tslib_assign(_tslib_assign({
4655
+ _this.machine.options.services = __assign((_b = {}, _b[invokeId] = invokeConfig.src, _b), _this.machine.options.services);
4656
+ return toInvokeDefinition(__assign(__assign({
4609
4657
  id: invokeId
4610
4658
  }, invokeConfig), {
4611
4659
  src: invokeId
4612
4660
  }));
4613
4661
  } else {
4614
4662
  var invokeSource = invokeConfig.src;
4615
- return toInvokeDefinition(_tslib_assign(_tslib_assign({
4663
+ return toInvokeDefinition(__assign(__assign({
4616
4664
  id: createInvokeId(_this.id, i)
4617
4665
  }, invokeConfig), {
4618
4666
  src: invokeSource
@@ -4655,11 +4703,11 @@ function () {
4655
4703
  services = _a.services,
4656
4704
  delays = _a.delays;
4657
4705
  return new StateNode(this.config, {
4658
- actions: _tslib_assign(_tslib_assign({}, actions), options.actions),
4659
- activities: _tslib_assign(_tslib_assign({}, activities), options.activities),
4660
- guards: _tslib_assign(_tslib_assign({}, guards), options.guards),
4661
- services: _tslib_assign(_tslib_assign({}, services), options.services),
4662
- delays: _tslib_assign(_tslib_assign({}, delays), options.delays)
4706
+ actions: __assign(__assign({}, actions), options.actions),
4707
+ activities: __assign(__assign({}, activities), options.activities),
4708
+ guards: __assign(__assign({}, guards), options.guards),
4709
+ services: __assign(__assign({}, services), options.services),
4710
+ delays: __assign(__assign({}, delays), options.delays)
4663
4711
  }, context !== null && context !== void 0 ? context : this.context);
4664
4712
  };
4665
4713
  /**
@@ -4675,7 +4723,7 @@ function () {
4675
4723
 
4676
4724
  Object.defineProperty(StateNode.prototype, "context", {
4677
4725
  get: function () {
4678
- return utils_isFunction(this._context) ? this._context() : this._context;
4726
+ return isFunction(this._context) ? this._context() : this._context;
4679
4727
  },
4680
4728
  enumerable: false,
4681
4729
  configurable: true
@@ -4783,7 +4831,7 @@ function () {
4783
4831
  }
4784
4832
 
4785
4833
  var mutateEntryExit = function (delay, i) {
4786
- var delayRef = utils_isFunction(delay) ? "".concat(_this.id, ":delay[").concat(i, "]") : delay;
4834
+ var delayRef = isFunction(delay) ? "".concat(_this.id, ":delay[").concat(i, "]") : delay;
4787
4835
  var eventType = actions_after(delayRef, _this.id);
4788
4836
 
4789
4837
  _this.onEntry.push(actions_send(eventType, {
@@ -4797,18 +4845,18 @@ function () {
4797
4845
 
4798
4846
  var delayedTransitions = isArray(afterConfig) ? afterConfig.map(function (transition, i) {
4799
4847
  var eventType = mutateEntryExit(transition.delay, i);
4800
- return _tslib_assign(_tslib_assign({}, transition), {
4848
+ return __assign(__assign({}, transition), {
4801
4849
  event: eventType
4802
4850
  });
4803
4851
  }) : flatten(Object.keys(afterConfig).map(function (delay, i) {
4804
4852
  var configTransition = afterConfig[delay];
4805
- var resolvedTransition = utils_isString(configTransition) ? {
4853
+ var resolvedTransition = isString(configTransition) ? {
4806
4854
  target: configTransition
4807
4855
  } : configTransition;
4808
4856
  var resolvedDelay = !isNaN(+delay) ? +delay : delay;
4809
4857
  var eventType = mutateEntryExit(resolvedDelay, i);
4810
4858
  return toArray(resolvedTransition).map(function (transition) {
4811
- return _tslib_assign(_tslib_assign({}, transition), {
4859
+ return __assign(__assign({}, transition), {
4812
4860
  event: eventType,
4813
4861
  delay: resolvedDelay
4814
4862
  });
@@ -4816,7 +4864,7 @@ function () {
4816
4864
  }));
4817
4865
  return delayedTransitions.map(function (delayedTransition) {
4818
4866
  var delay = delayedTransition.delay;
4819
- return _tslib_assign(_tslib_assign({}, _this.formatTransition(delayedTransition)), {
4867
+ return __assign(__assign({}, _this.formatTransition(delayedTransition)), {
4820
4868
  delay: delay
4821
4869
  });
4822
4870
  });
@@ -4837,16 +4885,16 @@ function () {
4837
4885
  return [];
4838
4886
  }
4839
4887
 
4840
- var stateValue = state instanceof State_State ? state.value : toStateValue(state, this.delimiter);
4888
+ var stateValue = state instanceof State ? state.value : toStateValue(state, this.delimiter);
4841
4889
 
4842
- if (utils_isString(stateValue)) {
4890
+ if (isString(stateValue)) {
4843
4891
  var initialStateValue = this.getStateNode(stateValue).initial;
4844
4892
  return initialStateValue !== undefined ? this.getStateNodes((_a = {}, _a[stateValue] = initialStateValue, _a)) : [this, this.states[stateValue]];
4845
4893
  }
4846
4894
 
4847
4895
  var subStateKeys = Object.keys(stateValue);
4848
4896
  var subStateNodes = [this];
4849
- subStateNodes.push.apply(subStateNodes, _tslib_spreadArray([], _tslib_read(flatten(subStateKeys.map(function (subStateKey) {
4897
+ subStateNodes.push.apply(subStateNodes, __spreadArray([], __read(flatten(subStateKeys.map(function (subStateKey) {
4850
4898
  return _this.getStateNode(subStateKey).getStateNodes(stateValue[subStateKey]);
4851
4899
  }))), false));
4852
4900
  return subStateNodes;
@@ -4872,9 +4920,9 @@ function () {
4872
4920
 
4873
4921
 
4874
4922
  StateNode.prototype.resolveState = function (state) {
4875
- var stateFromConfig = state instanceof State_State ? state : State_State.create(state);
4923
+ var stateFromConfig = state instanceof State ? state : State.create(state);
4876
4924
  var configuration = Array.from(getConfiguration([], this.getStateNodes(stateFromConfig.value)));
4877
- return new State_State(_tslib_assign(_tslib_assign({}, stateFromConfig), {
4925
+ return new State(__assign(__assign({}, stateFromConfig), {
4878
4926
  value: this.resolve(stateFromConfig.value),
4879
4927
  configuration: configuration,
4880
4928
  done: isInFinalState(configuration, this),
@@ -4913,7 +4961,7 @@ function () {
4913
4961
  var transitionMap = {};
4914
4962
 
4915
4963
  try {
4916
- for (var _b = _tslib_values(Object.keys(stateValue)), _c = _b.next(); !_c.done; _c = _b.next()) {
4964
+ for (var _b = __values(Object.keys(stateValue)), _c = _b.next(); !_c.done; _c = _b.next()) {
4917
4965
  var subStateKey = _c.value;
4918
4966
  var subStateValue = stateValue[subStateKey];
4919
4967
 
@@ -4973,7 +5021,7 @@ function () {
4973
5021
 
4974
5022
  StateNode.prototype._transition = function (stateValue, state, _event) {
4975
5023
  // leaf node
4976
- if (utils_isString(stateValue)) {
5024
+ if (isString(stateValue)) {
4977
5025
  return this.transitionLeafNode(stateValue, state, _event);
4978
5026
  } // hierarchical node
4979
5027
 
@@ -5001,14 +5049,14 @@ function () {
5001
5049
  var selectedTransition;
5002
5050
 
5003
5051
  try {
5004
- for (var _b = _tslib_values(this.getCandidates(eventName)), _c = _b.next(); !_c.done; _c = _b.next()) {
5052
+ for (var _b = __values(this.getCandidates(eventName)), _c = _b.next(); !_c.done; _c = _b.next()) {
5005
5053
  var candidate = _c.value;
5006
5054
  var cond = candidate.cond,
5007
5055
  stateIn = candidate.in;
5008
5056
  var resolvedContext = state.context;
5009
- var isInState = stateIn ? utils_isString(stateIn) && isStateId(stateIn) ? // Check if in state by ID
5057
+ var isInState = stateIn ? isString(stateIn) && isStateId(stateIn) ? // Check if in state by ID
5010
5058
  state.matches(toStateValue(this.getStateNodeById(stateIn).path, this.delimiter)) : // Check if in state by relative grandparent
5011
- utils_matchesState(toStateValue(stateIn, this.delimiter), path(this.path.slice(0, -2))(state.value)) : true;
5059
+ matchesState(toStateValue(stateIn, this.delimiter), path(this.path.slice(0, -2))(state.value)) : true;
5012
5060
  var guardPassed = false;
5013
5061
 
5014
5062
  try {
@@ -5022,7 +5070,7 @@ function () {
5022
5070
  nextStateNodes = candidate.target;
5023
5071
  }
5024
5072
 
5025
- actions.push.apply(actions, _tslib_spreadArray([], _tslib_read(candidate.actions), false));
5073
+ actions.push.apply(actions, __spreadArray([], __read(candidate.actions), false));
5026
5074
  selectedTransition = candidate;
5027
5075
  break;
5028
5076
  }
@@ -5104,7 +5152,7 @@ function () {
5104
5152
  var entrySet = new Set();
5105
5153
 
5106
5154
  try {
5107
- for (var _c = _tslib_values(Array.from(resolvedConfig).sort(function (a, b) {
5155
+ for (var _c = __values(Array.from(resolvedConfig).sort(function (a, b) {
5108
5156
  return a.order - b.order;
5109
5157
  })), _d = _c.next(); !_d.done; _d = _c.next()) {
5110
5158
  var sn = _d.value;
@@ -5126,7 +5174,7 @@ function () {
5126
5174
  }
5127
5175
 
5128
5176
  try {
5129
- for (var prevConfig_1 = _tslib_values(prevConfig), prevConfig_1_1 = prevConfig_1.next(); !prevConfig_1_1.done; prevConfig_1_1 = prevConfig_1.next()) {
5177
+ for (var prevConfig_1 = __values(prevConfig), prevConfig_1_1 = prevConfig_1.next(); !prevConfig_1_1.done; prevConfig_1_1 = prevConfig_1.next()) {
5130
5178
  var sn = prevConfig_1_1.value;
5131
5179
 
5132
5180
  if (!has(resolvedConfig, sn) || has(transition.exitSet, sn.parent)) {
@@ -5186,7 +5234,7 @@ function () {
5186
5234
  });
5187
5235
  return {
5188
5236
  type: 'entry',
5189
- actions: toActionObjects(predictableExec ? _tslib_spreadArray(_tslib_spreadArray([], _tslib_read(entryActions), false), _tslib_read(invokeActions), false) : _tslib_spreadArray(_tslib_spreadArray([], _tslib_read(invokeActions), false), _tslib_read(entryActions), false), _this.machine.options.actions)
5237
+ actions: toActionObjects(predictableExec ? __spreadArray(__spreadArray([], __read(entryActions), false), __read(invokeActions), false) : __spreadArray(__spreadArray([], __read(invokeActions), false), __read(entryActions), false), _this.machine.options.actions)
5190
5238
  };
5191
5239
  }).concat({
5192
5240
  type: 'state_done',
@@ -5197,7 +5245,7 @@ function () {
5197
5245
  var exitActions = Array.from(exitStates).map(function (stateNode) {
5198
5246
  return {
5199
5247
  type: 'exit',
5200
- actions: toActionObjects(_tslib_spreadArray(_tslib_spreadArray([], _tslib_read(stateNode.onExit), false), _tslib_read(stateNode.activities.map(function (activity) {
5248
+ actions: toActionObjects(__spreadArray(__spreadArray([], __read(stateNode.onExit), false), __read(stateNode.activities.map(function (activity) {
5201
5249
  return actions_stop(activity);
5202
5250
  })), false), _this.machine.options.actions)
5203
5251
  };
@@ -5208,7 +5256,7 @@ function () {
5208
5256
  }).concat(entryActions);
5209
5257
 
5210
5258
  if (isDone) {
5211
- var stopActions = toActionObjects(flatten(_tslib_spreadArray([], _tslib_read(resolvedConfig), false).sort(function (a, b) {
5259
+ var stopActions = toActionObjects(flatten(__spreadArray([], __read(resolvedConfig), false).sort(function (a, b) {
5212
5260
  return b.order - a.order;
5213
5261
  }).map(function (stateNode) {
5214
5262
  return stateNode.onExit;
@@ -5241,15 +5289,15 @@ function () {
5241
5289
 
5242
5290
  var currentState;
5243
5291
 
5244
- if (state instanceof State_State) {
5245
- currentState = context === undefined ? state : this.resolveState(State_State.from(state, context));
5292
+ if (state instanceof State) {
5293
+ currentState = context === undefined ? state : this.resolveState(State.from(state, context));
5246
5294
  } else {
5247
- var resolvedStateValue = utils_isString(state) ? this.resolve(pathToStateValue(this.getResolvedPath(state))) : this.resolve(state);
5295
+ var resolvedStateValue = isString(state) ? this.resolve(pathToStateValue(this.getResolvedPath(state))) : this.resolve(state);
5248
5296
  var resolvedContext = context !== null && context !== void 0 ? context : this.machine.context;
5249
- currentState = this.resolveState(State_State.from(resolvedStateValue, resolvedContext));
5297
+ currentState = this.resolveState(State.from(resolvedStateValue, resolvedContext));
5250
5298
  }
5251
5299
 
5252
- if (!environment_IS_PRODUCTION && _event.name === WILDCARD) {
5300
+ if (!IS_PRODUCTION && _event.name === WILDCARD) {
5253
5301
  throw new Error("An event cannot have the wildcard type ('".concat(WILDCARD, "')"));
5254
5302
  }
5255
5303
 
@@ -5268,7 +5316,7 @@ function () {
5268
5316
  };
5269
5317
  var prevConfig = getConfiguration([], this.getStateNodes(currentState.value));
5270
5318
  var resolvedConfig = stateTransition.configuration.length ? getConfiguration(prevConfig, stateTransition.configuration) : prevConfig;
5271
- stateTransition.configuration = _tslib_spreadArray([], _tslib_read(resolvedConfig), false);
5319
+ stateTransition.configuration = __spreadArray([], __read(resolvedConfig), false);
5272
5320
  return this.resolveTransition(stateTransition, currentState, currentState.context, exec, _event);
5273
5321
  };
5274
5322
 
@@ -5282,7 +5330,7 @@ function () {
5282
5330
  state._event = originalEvent;
5283
5331
  state.event = originalEvent.data;
5284
5332
 
5285
- (_a = state.actions).unshift.apply(_a, _tslib_spreadArray([], _tslib_read(currentActions), false));
5333
+ (_a = state.actions).unshift.apply(_a, __spreadArray([], __read(currentActions), false));
5286
5334
 
5287
5335
  return state;
5288
5336
  };
@@ -5306,14 +5354,14 @@ function () {
5306
5354
  var resolvedStateValue = willTransition ? getValue(this.machine, configuration) : undefined;
5307
5355
  var historyValue = currentState ? currentState.historyValue ? currentState.historyValue : stateTransition.source ? this.machine.historyValue(currentState.value) : undefined : undefined;
5308
5356
  var actionBlocks = this.getActions(new Set(resolvedConfiguration), isDone, stateTransition, context, _event, currentState, predictableExec);
5309
- var activities = currentState ? _tslib_assign({}, currentState.activities) : {};
5357
+ var activities = currentState ? __assign({}, currentState.activities) : {};
5310
5358
 
5311
5359
  try {
5312
- for (var actionBlocks_1 = _tslib_values(actionBlocks), actionBlocks_1_1 = actionBlocks_1.next(); !actionBlocks_1_1.done; actionBlocks_1_1 = actionBlocks_1.next()) {
5360
+ for (var actionBlocks_1 = __values(actionBlocks), actionBlocks_1_1 = actionBlocks_1.next(); !actionBlocks_1_1.done; actionBlocks_1_1 = actionBlocks_1.next()) {
5313
5361
  var block = actionBlocks_1_1.value;
5314
5362
 
5315
5363
  try {
5316
- for (var _c = (e_7 = void 0, _tslib_values(block.actions)), _d = _c.next(); !_d.done; _d = _c.next()) {
5364
+ for (var _c = (e_7 = void 0, __values(block.actions)), _d = _c.next(); !_d.done; _d = _c.next()) {
5317
5365
  var action = _d.value;
5318
5366
 
5319
5367
  if (action.type === start) {
@@ -5346,11 +5394,11 @@ function () {
5346
5394
  }
5347
5395
  }
5348
5396
 
5349
- var _e = _tslib_read(resolveActions(this, currentState, context, _event, actionBlocks, predictableExec, this.machine.config.predictableActionArguments || this.machine.config.preserveActionOrder), 2),
5397
+ var _e = __read(resolveActions(this, currentState, context, _event, actionBlocks, predictableExec, this.machine.config.predictableActionArguments || this.machine.config.preserveActionOrder), 2),
5350
5398
  resolvedActions = _e[0],
5351
5399
  updatedContext = _e[1];
5352
5400
 
5353
- var _f = _tslib_read(partition(resolvedActions, isRaisableAction), 2),
5401
+ var _f = __read(partition(resolvedActions, isRaisableAction), 2),
5354
5402
  raisedEvents = _f[0],
5355
5403
  nonRaisedActions = _f[1];
5356
5404
 
@@ -5362,8 +5410,8 @@ function () {
5362
5410
  var children = invokeActions.reduce(function (acc, action) {
5363
5411
  acc[action.activity.id] = createInvocableActor(action.activity, _this.machine, updatedContext, _event);
5364
5412
  return acc;
5365
- }, currentState ? _tslib_assign({}, currentState.children) : {});
5366
- var nextState = new State_State({
5413
+ }, currentState ? __assign({}, currentState.children) : {});
5414
+ var nextState = new State({
5367
5415
  value: resolvedStateValue || currentState.value,
5368
5416
  context: updatedContext,
5369
5417
  _event: _event,
@@ -5382,7 +5430,7 @@ function () {
5382
5430
  machine: this
5383
5431
  });
5384
5432
  var didUpdateContext = context !== updatedContext;
5385
- nextState.changed = _event.name === actionTypes_update || didUpdateContext; // Dispose of penultimate histories to prevent memory leaks
5433
+ nextState.changed = _event.name === update || didUpdateContext; // Dispose of penultimate histories to prevent memory leaks
5386
5434
 
5387
5435
  var history = nextState.history;
5388
5436
 
@@ -5527,7 +5575,7 @@ function () {
5527
5575
  });
5528
5576
 
5529
5577
  case 'compound':
5530
- if (utils_isString(stateValue)) {
5578
+ if (isString(stateValue)) {
5531
5579
  var subStateNode = this.getStateNode(stateValue);
5532
5580
 
5533
5581
  if (subStateNode.type === 'parallel' || subStateNode.type === 'compound') {
@@ -5640,7 +5688,7 @@ function () {
5640
5688
  if (this.type === 'history') {
5641
5689
  var historyConfig = this.config;
5642
5690
 
5643
- if (utils_isString(historyConfig.target)) {
5691
+ if (isString(historyConfig.target)) {
5644
5692
  target = isStateId(historyConfig.target) ? pathToStateValue(this.machine.getStateNodeById(historyConfig.target).path.slice(this.path.length - 1)) : historyConfig.target;
5645
5693
  } else {
5646
5694
  target = historyConfig.target;
@@ -5678,8 +5726,8 @@ function () {
5678
5726
 
5679
5727
 
5680
5728
  if (this.type === 'compound' && !this.initial) {
5681
- if (!environment_IS_PRODUCTION) {
5682
- utils_warn(false, "Compound state node '".concat(this.id, "' has no initial state."));
5729
+ if (!IS_PRODUCTION) {
5730
+ warn(false, "Compound state node '".concat(this.id, "' has no initial state."));
5683
5731
  }
5684
5732
 
5685
5733
  return [this];
@@ -5705,7 +5753,7 @@ function () {
5705
5753
  return [this];
5706
5754
  }
5707
5755
 
5708
- var _a = _tslib_read(relativePath),
5756
+ var _a = __read(relativePath),
5709
5757
  stateKey = _a[0],
5710
5758
  childStatePath = _a.slice(1);
5711
5759
 
@@ -5738,7 +5786,7 @@ function () {
5738
5786
  return stateNode.historyValue();
5739
5787
  }
5740
5788
 
5741
- var subStateValue = utils_isString(relativeStateValue) ? undefined : relativeStateValue[key];
5789
+ var subStateValue = isString(relativeStateValue) ? undefined : relativeStateValue[key];
5742
5790
  return stateNode.historyValue(subStateValue || stateNode.initialStateValue);
5743
5791
  }, function (stateNode) {
5744
5792
  return !stateNode.history;
@@ -5771,7 +5819,7 @@ function () {
5771
5819
 
5772
5820
  var subHistoryValue = nestedPath(parent.path, 'states')(historyValue).current;
5773
5821
 
5774
- if (utils_isString(subHistoryValue)) {
5822
+ if (isString(subHistoryValue)) {
5775
5823
  return [parent.getStateNode(subHistoryValue)];
5776
5824
  }
5777
5825
 
@@ -5811,13 +5859,13 @@ function () {
5811
5859
 
5812
5860
  if (states) {
5813
5861
  try {
5814
- for (var _c = _tslib_values(Object.keys(states)), _d = _c.next(); !_d.done; _d = _c.next()) {
5862
+ for (var _c = __values(Object.keys(states)), _d = _c.next(); !_d.done; _d = _c.next()) {
5815
5863
  var stateId = _d.value;
5816
5864
  var state = states[stateId];
5817
5865
 
5818
5866
  if (state.states) {
5819
5867
  try {
5820
- for (var _e = (e_9 = void 0, _tslib_values(state.events)), _f = _e.next(); !_f.done; _f = _e.next()) {
5868
+ for (var _e = (e_9 = void 0, __values(state.events)), _f = _e.next(); !_f.done; _f = _e.next()) {
5821
5869
  var event_1 = _f.value;
5822
5870
  events.add("".concat(event_1));
5823
5871
  }
@@ -5879,7 +5927,7 @@ function () {
5879
5927
  }
5880
5928
 
5881
5929
  return _target.map(function (target) {
5882
- if (!utils_isString(target)) {
5930
+ if (!isString(target)) {
5883
5931
  return target;
5884
5932
  }
5885
5933
 
@@ -5911,12 +5959,12 @@ function () {
5911
5959
 
5912
5960
  var normalizedTarget = normalizeTarget(transitionConfig.target);
5913
5961
  var internal = 'internal' in transitionConfig ? transitionConfig.internal : normalizedTarget ? normalizedTarget.some(function (_target) {
5914
- return utils_isString(_target) && _target[0] === _this.delimiter;
5962
+ return isString(_target) && _target[0] === _this.delimiter;
5915
5963
  }) : true;
5916
5964
  var guards = this.machine.options.guards;
5917
5965
  var target = this.resolveTarget(normalizedTarget);
5918
5966
 
5919
- var transition = _tslib_assign(_tslib_assign({}, transitionConfig), {
5967
+ var transition = __assign(__assign({}, transitionConfig), {
5920
5968
  actions: toActionObjects(toArray(transitionConfig.actions)),
5921
5969
  cond: toGuard(transitionConfig.cond, guards),
5922
5970
  target: target,
@@ -5924,7 +5972,7 @@ function () {
5924
5972
  internal: internal,
5925
5973
  eventType: transitionConfig.event,
5926
5974
  toJSON: function () {
5927
- return _tslib_assign(_tslib_assign({}, transition), {
5975
+ return __assign(__assign({}, transition), {
5928
5976
  target: transition.target ? transition.target.map(function (t) {
5929
5977
  return "#".concat(t.id);
5930
5978
  }) : undefined,
@@ -5955,13 +6003,13 @@ function () {
5955
6003
  strictTransitionConfigs_1 = __rest(_b, [typeof _c === "symbol" ? _c : _c + ""]);
5956
6004
 
5957
6005
  onConfig = flatten(Object.keys(strictTransitionConfigs_1).map(function (key) {
5958
- if (!environment_IS_PRODUCTION && key === NULL_EVENT) {
5959
- utils_warn(false, "Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. " + "Please check the `on` configuration for \"#".concat(_this.id, "\"."));
6006
+ if (!IS_PRODUCTION && key === NULL_EVENT) {
6007
+ warn(false, "Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. " + "Please check the `on` configuration for \"#".concat(_this.id, "\"."));
5960
6008
  }
5961
6009
 
5962
6010
  var transitionConfigArray = toTransitionConfigArray(key, strictTransitionConfigs_1[key]);
5963
6011
 
5964
- if (!environment_IS_PRODUCTION) {
6012
+ if (!IS_PRODUCTION) {
5965
6013
  validateArrayifiedTransitions(_this, key, transitionConfigArray);
5966
6014
  }
5967
6015
 
@@ -5972,32 +6020,32 @@ function () {
5972
6020
  var eventlessConfig = this.config.always ? toTransitionConfigArray('', this.config.always) : [];
5973
6021
  var doneConfig = this.config.onDone ? toTransitionConfigArray(String(done(this.id)), this.config.onDone) : [];
5974
6022
 
5975
- if (!environment_IS_PRODUCTION) {
5976
- utils_warn(!(this.config.onDone && !this.parent), "Root nodes cannot have an \".onDone\" transition. Please check the config of \"".concat(this.id, "\"."));
6023
+ if (!IS_PRODUCTION) {
6024
+ warn(!(this.config.onDone && !this.parent), "Root nodes cannot have an \".onDone\" transition. Please check the config of \"".concat(this.id, "\"."));
5977
6025
  }
5978
6026
 
5979
6027
  var invokeConfig = flatten(this.invoke.map(function (invokeDef) {
5980
6028
  var settleTransitions = [];
5981
6029
 
5982
6030
  if (invokeDef.onDone) {
5983
- settleTransitions.push.apply(settleTransitions, _tslib_spreadArray([], _tslib_read(toTransitionConfigArray(String(actions_doneInvoke(invokeDef.id)), invokeDef.onDone)), false));
6031
+ settleTransitions.push.apply(settleTransitions, __spreadArray([], __read(toTransitionConfigArray(String(doneInvoke(invokeDef.id)), invokeDef.onDone)), false));
5984
6032
  }
5985
6033
 
5986
6034
  if (invokeDef.onError) {
5987
- settleTransitions.push.apply(settleTransitions, _tslib_spreadArray([], _tslib_read(toTransitionConfigArray(String(actions_error(invokeDef.id)), invokeDef.onError)), false));
6035
+ settleTransitions.push.apply(settleTransitions, __spreadArray([], __read(toTransitionConfigArray(String(actions_error(invokeDef.id)), invokeDef.onError)), false));
5988
6036
  }
5989
6037
 
5990
6038
  return settleTransitions;
5991
6039
  }));
5992
6040
  var delayedTransitions = this.after;
5993
- var formattedTransitions = flatten(_tslib_spreadArray(_tslib_spreadArray(_tslib_spreadArray(_tslib_spreadArray([], _tslib_read(doneConfig), false), _tslib_read(invokeConfig), false), _tslib_read(onConfig), false), _tslib_read(eventlessConfig), false).map(function (transitionConfig) {
6041
+ var formattedTransitions = flatten(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(doneConfig), false), __read(invokeConfig), false), __read(onConfig), false), __read(eventlessConfig), false).map(function (transitionConfig) {
5994
6042
  return toArray(transitionConfig).map(function (transition) {
5995
6043
  return _this.formatTransition(transition);
5996
6044
  });
5997
6045
  }));
5998
6046
 
5999
6047
  try {
6000
- for (var delayedTransitions_1 = _tslib_values(delayedTransitions), delayedTransitions_1_1 = delayedTransitions_1.next(); !delayedTransitions_1_1.done; delayedTransitions_1_1 = delayedTransitions_1.next()) {
6048
+ for (var delayedTransitions_1 = __values(delayedTransitions), delayedTransitions_1_1 = delayedTransitions_1.next(); !delayedTransitions_1_1.done; delayedTransitions_1_1 = delayedTransitions_1.next()) {
6001
6049
  var delayedTransition = delayedTransitions_1_1.value;
6002
6050
  formattedTransitions.push(delayedTransition);
6003
6051
  }
@@ -6022,6 +6070,8 @@ function () {
6022
6070
 
6023
6071
 
6024
6072
  ;// ../../../node_modules/xstate/es/Machine.js
6073
+ /* unused harmony import specifier */ var Machine_StateNode;
6074
+ /* unused harmony import specifier */ var Machine_IS_PRODUCTION;
6025
6075
 
6026
6076
 
6027
6077
 
@@ -6031,20 +6081,22 @@ function Machine(config, options, initialContext) {
6031
6081
  initialContext = config.context;
6032
6082
  }
6033
6083
 
6034
- return new StateNode_StateNode(config, options, initialContext);
6084
+ return new StateNode(config, options, initialContext);
6035
6085
  }
6036
6086
  function createMachine(config, options) {
6037
- if (!IS_PRODUCTION && !('predictableActionArguments' in config) && !warned) {
6087
+ if (!Machine_IS_PRODUCTION && !('predictableActionArguments' in config) && !warned) {
6038
6088
  warned = true;
6039
6089
  console.warn('It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html');
6040
6090
  }
6041
6091
 
6042
- return new StateNode(config, options);
6092
+ return new Machine_StateNode(config, options);
6043
6093
  }
6044
6094
 
6045
6095
 
6046
6096
 
6047
6097
  ;// ../../../node_modules/xstate/es/mapState.js
6098
+ /* unused harmony import specifier */ var mapState_values;
6099
+ /* unused harmony import specifier */ var mapState_matchesState;
6048
6100
 
6049
6101
 
6050
6102
 
@@ -6054,10 +6106,10 @@ function mapState(stateMap, stateId) {
6054
6106
  var foundStateId;
6055
6107
 
6056
6108
  try {
6057
- for (var _b = __values(Object.keys(stateMap)), _c = _b.next(); !_c.done; _c = _b.next()) {
6109
+ for (var _b = mapState_values(Object.keys(stateMap)), _c = _b.next(); !_c.done; _c = _b.next()) {
6058
6110
  var mappedStateId = _c.value;
6059
6111
 
6060
- if (matchesState(mappedStateId, stateId) && (!foundStateId || stateId.length > foundStateId.length)) {
6112
+ if (mapState_matchesState(mappedStateId, stateId) && (!foundStateId || stateId.length > foundStateId.length)) {
6061
6113
  foundStateId = mappedStateId;
6062
6114
  }
6063
6115
  }
@@ -6079,17 +6131,20 @@ function mapState(stateMap, stateId) {
6079
6131
 
6080
6132
 
6081
6133
  ;// ../../../node_modules/xstate/es/match.js
6134
+ /* unused harmony import specifier */ var match_values;
6135
+ /* unused harmony import specifier */ var match_read;
6136
+ /* unused harmony import specifier */ var match_State;
6082
6137
 
6083
6138
 
6084
6139
 
6085
6140
  function matchState(state, patterns, defaultValue) {
6086
6141
  var e_1, _a;
6087
6142
 
6088
- var resolvedState = State.from(state, state instanceof State ? state.context : undefined);
6143
+ var resolvedState = match_State.from(state, state instanceof match_State ? state.context : undefined);
6089
6144
 
6090
6145
  try {
6091
- for (var patterns_1 = __values(patterns), patterns_1_1 = patterns_1.next(); !patterns_1_1.done; patterns_1_1 = patterns_1.next()) {
6092
- var _b = __read(patterns_1_1.value, 2),
6146
+ for (var patterns_1 = match_values(patterns), patterns_1_1 = patterns_1.next(); !patterns_1_1.done; patterns_1_1 = patterns_1.next()) {
6147
+ var _b = match_read(patterns_1_1.value, 2),
6093
6148
  stateValue = _b[0],
6094
6149
  getValue = _b[1];
6095
6150
 
@@ -6123,6 +6178,18 @@ var t = (/* unused pure expression or super */ null && (createSchema));
6123
6178
 
6124
6179
 
6125
6180
  ;// ../../../node_modules/xstate/es/index.js
6181
+ /* unused harmony import specifier */ var cancel$1;
6182
+ /* unused harmony import specifier */ var send$1;
6183
+ /* unused harmony import specifier */ var sendTo$1;
6184
+ /* unused harmony import specifier */ var sendParent$1;
6185
+ /* unused harmony import specifier */ var sendUpdate$1;
6186
+ /* unused harmony import specifier */ var forwardTo$1;
6187
+ /* unused harmony import specifier */ var doneInvoke$1;
6188
+ /* unused harmony import specifier */ var raise$1;
6189
+ /* unused harmony import specifier */ var es_log$1;
6190
+ /* unused harmony import specifier */ var pure$1;
6191
+ /* unused harmony import specifier */ var choose$1;
6192
+ /* unused harmony import specifier */ var stop$1;
6126
6193
 
6127
6194
 
6128
6195
 
@@ -6138,7 +6205,7 @@ var t = (/* unused pure expression or super */ null && (createSchema));
6138
6205
 
6139
6206
 
6140
6207
 
6141
- var es_assign = actions_assign,
6208
+ var es_assign = es_actions_assign,
6142
6209
  es_cancel = (/* unused pure expression or super */ null && (cancel$1)),
6143
6210
  es_send = (/* unused pure expression or super */ null && (send$1)),
6144
6211
  es_sendTo = (/* unused pure expression or super */ null && (sendTo$1)),
@@ -6147,7 +6214,7 @@ var es_assign = actions_assign,
6147
6214
  es_forwardTo = (/* unused pure expression or super */ null && (forwardTo$1)),
6148
6215
  es_doneInvoke = (/* unused pure expression or super */ null && (doneInvoke$1)),
6149
6216
  es_raise = (/* unused pure expression or super */ null && (raise$1)),
6150
- es_log = (/* unused pure expression or super */ null && (log$1)),
6217
+ es_log = (/* unused pure expression or super */ null && (es_log$1)),
6151
6218
  es_pure = (/* unused pure expression or super */ null && (pure$1)),
6152
6219
  es_choose = (/* unused pure expression or super */ null && (choose$1)),
6153
6220
  es_stop = (/* unused pure expression or super */ null && (stop$1));
@@ -6155,6 +6222,6 @@ var es_assign = actions_assign,
6155
6222
 
6156
6223
 
6157
6224
 
6158
- /***/ })
6225
+ /***/ }
6159
6226
 
6160
6227
  }]);