@ohif/app 3.7.0-beta.1 → 3.7.0-beta.100

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 (66) hide show
  1. package/dist/{917.bundle.06cb87cf1c42b9f20bd2.js → 12.bundle.34050abb042540a90a3a.js} +6 -6
  2. package/dist/{295.bundle.957b1159fec14b9199a1.js → 125.bundle.253395f320b72180da63.js} +6 -6
  3. package/dist/{351.bundle.2d4bc19d8b493879dbbe.js → 181.bundle.169383e9b1a0358b44e8.js} +227 -205
  4. package/dist/{351.css → 181.css} +1 -1
  5. package/dist/{744.bundle.392a124e4ee20ad6a657.js → 19.bundle.eef637102334f1832ba9.js} +246 -385
  6. package/dist/{606.bundle.5d876f5f3dd8287f0a28.js → 202.bundle.96bbb4547a346fe3921f.js} +1420 -750
  7. package/dist/{926.bundle.dbc9d0e591cb9217fda2.js → 220.bundle.f7e1c96c94245e70f2be.js} +990 -400
  8. package/dist/221.bundle.0b9f7401294213262852.js +1723 -0
  9. package/dist/221.css +2 -0
  10. package/dist/{664.bundle.09abae984223969d1bde.js → 23.bundle.e008ad788170f2ed5569.js} +5 -6
  11. package/dist/{976.bundle.2305e2f8244de8ccbaee.js → 236.bundle.7768b3e29b1fd618b9ec.js} +89 -105
  12. package/dist/{55.bundle.5f5e5ef9087b0beee35c.js → 250.bundle.8084960e3318cda37317.js} +52 -36
  13. package/dist/{973.bundle.a51bb5b329263c9e75e2.js → 281.bundle.39cb630582cf8114fd5e.js} +18 -14
  14. package/dist/{82.bundle.da0c036b2e572719dbc5.js → 342.bundle.6edc7ac022b4218ec99f.js} +1776 -482
  15. package/dist/{404.bundle.902c664e3e581335a5d2.js → 359.bundle.a8f6cf2f90fe05fc346d.js} +46 -131
  16. package/dist/{192.bundle.4fee0d418ae32bb7ab30.js → 370.bundle.4e1276530ba7757347f5.js} +113 -99
  17. package/dist/{790.bundle.aa7a8bebec3483d90f3f.js → 410.bundle.5a330214c0c31cbf2551.js} +11 -9
  18. package/dist/{151.bundle.31ea35044218837bf73f.js → 417.bundle.af0a207c29b109f84159.js} +49 -17
  19. package/dist/{569.bundle.0ed8d8178ffd43fe1c34.js → 451.bundle.9fd36f52ff69594f0669.js} +98 -107
  20. package/dist/{581.bundle.360d26f97b37da8faec3.js → 471.bundle.b3d77b83b1593c09a504.js} +78 -98
  21. package/dist/{199.bundle.290ef76d4ab8358e29bb.js → 506.bundle.ac385e382f79bbf4f306.js} +11 -14
  22. package/dist/{531.bundle.2a82fb1d69e5b57cc72b.js → 530.bundle.a03b6f942ace3e1baa1e.js} +726 -447
  23. package/dist/579.css +1 -0
  24. package/dist/{935.bundle.deeffff0e4f7b528e3c3.js → 604.bundle.a51f83e64004bca5f497.js} +2 -3
  25. package/dist/613.bundle.f75fd669ddfe4ecf9c1b.js +532 -0
  26. package/dist/{984.bundle.4e002ef9b3468bddb68b.js → 663.bundle.3863ac49f85320c8ca96.js} +68 -38
  27. package/dist/{205.bundle.b5a473c200dcf2bbcdb4.js → 686.bundle.dccef1f36e4bc79bcc48.js} +6 -6
  28. package/dist/{50.bundle.03f455d441f2138ce49e.js → 687.bundle.ebd1260565c31ab9ad08.js} +218 -9
  29. package/dist/{331.bundle.bd0c13931a21d53086c9.js → 743.bundle.4bfe6e562ffb2c22708f.js} +26281 -21326
  30. package/dist/{728.bundle.d13856835357400fef82.js → 774.bundle.7528cba56a1407357144.js} +95 -64
  31. package/dist/{381.bundle.0905e683605fcbc0895f.js → 775.bundle.2285e7e0e67878948c0d.js} +16 -16
  32. package/dist/{283.bundle.7cf0fabc69d49a8a2c5d.js → 782.bundle.8c17030f76b75035564c.js} +123 -80
  33. package/dist/{642.bundle.89f15ef57fbad2a1019b.js → 814.bundle.cc0ed4fc75cb16e34f02.js} +6 -6
  34. package/dist/{707.bundle.832f50366089fd23e93b.js → 82.bundle.7a89cd8b81eb7e1e5c66.js} +1187 -808
  35. package/dist/{799.bundle.ca18bdf4abe4d9abea26.js → 822.bundle.0545d6dbb49515aa04ee.js} +81 -34
  36. package/dist/831.bundle.83658f62fcc769043605.js +16700 -0
  37. package/dist/{953.bundle.9e3a7225f07336bfcb41.js → 886.bundle.4b3a7f2079d085fdbcb3.js} +34 -29
  38. package/dist/945.min.worker.js +1 -1
  39. package/dist/945.min.worker.js.map +1 -1
  40. package/dist/{270.bundle.4564621556b0f963a004.js → 957.bundle.71558794566041f37a92.js} +7110 -997
  41. package/dist/{208.bundle.29fe1842c33000edc75d.js → 99.bundle.c6876aaaa3ff2f1b08a1.js} +86 -105
  42. package/dist/_redirects +1 -1
  43. package/dist/app-config.js +35 -17
  44. package/dist/app.bundle.css +13 -12
  45. package/dist/{app.bundle.3ad961046deb5f47678a.js → app.bundle.dc0e89948c4f4568fe20.js} +73720 -68191
  46. package/dist/assets/yandex-browser-manifest.json +1 -1
  47. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  48. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  49. package/dist/{dicom-microscopy-viewer.bundle.aa60bdf008c32c39cfd7.js → dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js} +5 -4
  50. package/dist/es6-shim.min.js +3569 -2
  51. package/dist/google.js +8 -7
  52. package/dist/index.html +2 -1
  53. package/dist/{index.worker.1c69152d710fa7b84bce.worker.js → index.worker.e62ecca63f1a2e124230.worker.js} +2 -2
  54. package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +1 -0
  55. package/dist/init-service-worker.js +3 -5
  56. package/dist/oidc-client.min.js +10857 -39
  57. package/dist/polyfill.min.js +184 -1
  58. package/dist/silent-refresh.html +18 -9
  59. package/dist/sw.js +1 -1
  60. package/package.json +20 -22
  61. package/dist/616.bundle.b76c70aeeed8b142593c.js +0 -685
  62. package/dist/780.bundle.fd0f13dc92e9caa0581e.js +0 -4769
  63. package/dist/index.worker.1c69152d710fa7b84bce.worker.js.map +0 -1
  64. /package/dist/{806.css → 19.css} +0 -0
  65. /package/dist/{55.css → 250.css} +0 -0
  66. /package/dist/{707.css → 82.css} +0 -0
@@ -1,11 +1,37 @@
1
1
  "use strict";
2
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[531],{
2
+ (self["webpackChunk"] = self["webpackChunk"] || []).push([[530],{
3
3
 
4
- /***/ 38531:
5
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
4
+ /***/ 44530:
5
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
+
7
+
8
+ // EXPORTS
9
+ __webpack_require__.d(__webpack_exports__, {
10
+ eO: () => (/* reexport */ useMachine)
11
+ });
6
12
 
13
+ // UNUSED EXPORTS: createActorContext, shallowEqual, useActor, useInterpret, useSelector, useSpawn
7
14
 
8
- var __assign = (this && this.__assign) || function () {
15
+ // EXTERNAL MODULE: ../../../node_modules/react/index.js
16
+ var react = __webpack_require__(43001);
17
+ // EXTERNAL MODULE: ../../../node_modules/use-sync-external-store/shim/with-selector.js
18
+ var with_selector = __webpack_require__(56901);
19
+ // EXTERNAL MODULE: ../../../node_modules/xstate/es/index.js + 22 modules
20
+ var es = __webpack_require__(261);
21
+ // EXTERNAL MODULE: ../../../node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js
22
+ var use_isomorphic_layout_effect_browser_esm = __webpack_require__(89067);
23
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useConstant.js
24
+
25
+ function useConstant_useConstant(fn) {
26
+ var ref = react.useRef();
27
+ if (!ref.current) {
28
+ ref.current = { v: fn() };
29
+ }
30
+ return ref.current.v;
31
+ }
32
+
33
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useInterpret.js
34
+ var __assign = (undefined && undefined.__assign) || function () {
9
35
  __assign = Object.assign || function(t) {
10
36
  for (var s, i = 1, n = arguments.length; i < n; i++) {
11
37
  s = arguments[i];
@@ -16,7 +42,7 @@ var __assign = (this && this.__assign) || function () {
16
42
  };
17
43
  return __assign.apply(this, arguments);
18
44
  };
19
- var __rest = (this && this.__rest) || function (s, e) {
45
+ var __rest = (undefined && undefined.__rest) || function (s, e) {
20
46
  var t = {};
21
47
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
22
48
  t[p] = s[p];
@@ -27,7 +53,7 @@ var __rest = (this && this.__rest) || function (s, e) {
27
53
  }
28
54
  return t;
29
55
  };
30
- var __read = (this && this.__read) || function (o, n) {
56
+ var __read = (undefined && undefined.__read) || function (o, n) {
31
57
  var m = typeof Symbol === "function" && o[Symbol.iterator];
32
58
  if (!m) return o;
33
59
  var i = m.call(o), r, ar = [], e;
@@ -43,105 +69,174 @@ var __read = (this && this.__read) || function (o, n) {
43
69
  }
44
70
  return ar;
45
71
  };
46
- Object.defineProperty(exports, "__esModule", ({ value: true }));
47
- var react_1 = __webpack_require__(32735);
48
- var xstate_1 = __webpack_require__(87519);
49
- var defaultOptions = {
50
- immediate: false
51
- };
52
- function useMachine(machine, options) {
53
- if (options === void 0) { options = defaultOptions; }
54
- var context = options.context, guards = options.guards, actions = options.actions, activities = options.activities, services = options.services, delays = options.delays, immediate = options.immediate, rehydratedState = options.state, interpreterOptions = __rest(options, ["context", "guards", "actions", "activities", "services", "delays", "immediate", "state"]);
55
- var machineConfig = {
56
- context: context,
57
- guards: guards,
58
- actions: actions,
59
- activities: activities,
60
- services: services,
61
- delays: delays
62
- };
63
- // Reference the machine
64
- var machineRef = react_1.useRef(null);
65
- // Create the machine only once
66
- // See https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily
67
- if (machineRef.current === null) {
68
- machineRef.current = machine.withConfig(machineConfig, __assign(__assign({}, machine.context), context));
69
- }
70
- // Reference the service
71
- var serviceRef = react_1.useRef(null);
72
- // Create the service only once
73
- if (serviceRef.current === null) {
74
- serviceRef.current = xstate_1.interpret(machineRef.current, interpreterOptions).onTransition(function (state) {
75
- // Update the current machine state when a transition occurs
76
- if (state.changed) {
77
- setCurrent(state);
78
- }
79
- });
80
- }
81
- var service = serviceRef.current;
82
- // Make sure actions and services are kept updated when they change.
72
+
73
+
74
+
75
+
76
+ function useIdleInterpreter(getMachine, options) {
77
+ var machine = useConstant_useConstant(function () {
78
+ return typeof getMachine === 'function' ? getMachine() : getMachine;
79
+ });
80
+ if (false) { var _a, initialMachine; }
81
+ 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 () {
83
+ var machineConfig = {
84
+ context: context,
85
+ guards: guards,
86
+ actions: actions,
87
+ activities: activities,
88
+ services: services,
89
+ delays: delays
90
+ };
91
+ var machineWithConfig = machine.withConfig(machineConfig, function () { return (__assign(__assign({}, machine.context), context)); });
92
+ return (0,es/* interpret */.kJ)(machineWithConfig, interpreterOptions);
93
+ });
94
+ // Make sure options are kept updated when they change.
83
95
  // This mutation assignment is safe because the service instance is only used
84
96
  // in one place -- this hook's caller.
85
- react_1.useEffect(function () {
97
+ (0,use_isomorphic_layout_effect_browser_esm/* default */.Z)(function () {
86
98
  Object.assign(service.machine.options.actions, actions);
87
- }, [actions]);
88
- react_1.useEffect(function () {
99
+ Object.assign(service.machine.options.guards, guards);
100
+ Object.assign(service.machine.options.activities, activities);
89
101
  Object.assign(service.machine.options.services, services);
90
- }, [services]);
91
- // Keep track of the current machine state
92
- var initialState = rehydratedState
93
- ? xstate_1.State.create(rehydratedState)
94
- : service.initialState;
95
- var _a = __read(react_1.useState(function () { return initialState; }), 2), current = _a[0], setCurrent = _a[1];
96
- // Start service immediately (before mount) if specified in options
97
- if (immediate) {
98
- service.start();
99
- }
100
- react_1.useEffect(function () {
101
- // Start the service when the component mounts.
102
- // Note: the service will start only if it hasn't started already.
103
- //
104
- // If a rehydrated state was provided, use the resolved `initialState`.
105
- service.start(rehydratedState ? initialState : undefined);
106
- return function () {
107
- // Stop the service when the component unmounts
108
- service.stop();
109
- };
110
- }, []);
111
- return [current, service.send, service];
102
+ Object.assign(service.machine.options.delays, delays);
103
+ }, [actions, guards, activities, services, delays]);
104
+ return service;
112
105
  }
113
- exports.useMachine = useMachine;
114
- function useService(service) {
115
- var _a = __read(react_1.useState(service.state), 2), current = _a[0], setCurrent = _a[1];
116
- react_1.useEffect(function () {
117
- // Set to current service state as there is a possibility
118
- // of a transition occurring between the initial useState()
119
- // initialization and useEffect() commit.
120
- setCurrent(service.state);
121
- var listener = function (state) {
122
- if (state.changed) {
123
- setCurrent(state);
124
- }
125
- };
126
- var sub = service.subscribe(listener);
106
+ function useInterpret_useInterpret(getMachine) {
107
+ var _a = [];
108
+ for (var _i = 1; _i < arguments.length; _i++) {
109
+ _a[_i - 1] = arguments[_i];
110
+ }
111
+ var _b = __read(_a, 2), _c = _b[0], options = _c === void 0 ? {} : _c, observerOrListener = _b[1];
112
+ var service = useIdleInterpreter(getMachine, options);
113
+ useEffect(function () {
114
+ if (!observerOrListener) {
115
+ return;
116
+ }
117
+ var sub = service.subscribe(toObserver(observerOrListener));
127
118
  return function () {
128
119
  sub.unsubscribe();
129
120
  };
130
- }, [service]);
131
- return [current, service.send, service];
121
+ }, [observerOrListener]);
122
+ useEffect(function () {
123
+ var rehydratedState = options.state;
124
+ service.start(rehydratedState ? State.create(rehydratedState) : undefined);
125
+ return function () {
126
+ service.stop();
127
+ service.status = InterpreterStatus.NotStarted;
128
+ };
129
+ }, []);
130
+ return service;
132
131
  }
133
- exports.useService = useService;
134
- var useActor_1 = __webpack_require__(7283);
135
- exports.useActor = useActor_1.useActor;
136
- //# sourceMappingURL=index.js.map
137
-
138
- /***/ }),
139
132
 
140
- /***/ 7283:
141
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
133
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/utils.js
134
+ var utils_read = (undefined && undefined.__read) || function (o, n) {
135
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
136
+ if (!m) return o;
137
+ var i = m.call(o), r, ar = [], e;
138
+ try {
139
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
140
+ }
141
+ catch (error) { e = { error: error }; }
142
+ finally {
143
+ try {
144
+ if (r && !r.done && (m = i["return"])) m.call(i);
145
+ }
146
+ finally { if (e) throw e.error; }
147
+ }
148
+ return ar;
149
+ };
150
+ var __values = (undefined && undefined.__values) || function(o) {
151
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
152
+ if (m) return m.call(o);
153
+ if (o && typeof o.length === "number") return {
154
+ next: function () {
155
+ if (o && i >= o.length) o = void 0;
156
+ return { value: o && o[i++], done: !o };
157
+ }
158
+ };
159
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
160
+ };
142
161
 
162
+ function partition(items, predicate) {
163
+ var e_1, _a;
164
+ var _b = utils_read([[], []], 2), truthy = _b[0], falsy = _b[1];
165
+ try {
166
+ for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
167
+ var item = items_1_1.value;
168
+ if (predicate(item)) {
169
+ truthy.push(item);
170
+ }
171
+ else {
172
+ falsy.push(item);
173
+ }
174
+ }
175
+ }
176
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
177
+ finally {
178
+ try {
179
+ if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
180
+ }
181
+ finally { if (e_1) throw e_1.error; }
182
+ }
183
+ return [truthy, falsy];
184
+ }
185
+ function utils_getServiceSnapshot(service) {
186
+ return service.status !== 0
187
+ ? service.getSnapshot()
188
+ : service.machine.initialState;
189
+ }
190
+ // From https://github.com/reduxjs/react-redux/blob/master/src/utils/shallowEqual.ts
191
+ function is(x, y) {
192
+ if (x === y) {
193
+ return x !== 0 || y !== 0 || 1 / x === 1 / y;
194
+ }
195
+ else {
196
+ return x !== x && y !== y;
197
+ }
198
+ }
199
+ function shallowEqual(objA, objB) {
200
+ if (is(objA, objB))
201
+ return true;
202
+ if (typeof objA !== 'object' ||
203
+ objA === null ||
204
+ typeof objB !== 'object' ||
205
+ objB === null) {
206
+ return false;
207
+ }
208
+ var keysA = Object.keys(objA);
209
+ var keysB = Object.keys(objB);
210
+ if (keysA.length !== keysB.length)
211
+ return false;
212
+ for (var i = 0; i < keysA.length; i++) {
213
+ if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) ||
214
+ !is(objA[keysA[i]], objB[keysA[i]])) {
215
+ return false;
216
+ }
217
+ }
218
+ return true;
219
+ }
220
+ function utils_isService(actor) {
221
+ return 'state' in actor && 'machine' in actor;
222
+ }
223
+ function utils_isInterpreterStateEqual(service, prevState, nextState) {
224
+ if (service.status === es/* InterpreterStatus */.TM.NotStarted) {
225
+ return true;
226
+ }
227
+ // Only change the current state if:
228
+ // - the incoming state is the "live" initial state (since it might have new actors)
229
+ // - OR the incoming state actually changed.
230
+ //
231
+ // The "live" initial state will have .changed === undefined.
232
+ var initialStateChanged = nextState.changed === undefined &&
233
+ (Object.keys(nextState.children).length > 0 ||
234
+ typeof prevState.changed === 'boolean');
235
+ return !(nextState.changed || initialStateChanged);
236
+ }
143
237
 
144
- var __read = (this && this.__read) || function (o, n) {
238
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useMachine.js
239
+ var useMachine_read = (undefined && undefined.__read) || function (o, n) {
145
240
  var m = typeof Symbol === "function" && o[Symbol.iterator];
146
241
  if (!m) return o;
147
242
  var i = m.call(o), r, ar = [], e;
@@ -157,126 +252,306 @@ var __read = (this && this.__read) || function (o, n) {
157
252
  }
158
253
  return ar;
159
254
  };
160
- Object.defineProperty(exports, "__esModule", ({ value: true }));
161
- var react_1 = __webpack_require__(32735);
162
- function useActor(actor) {
163
- var _a = __read(react_1.useState(undefined), 2), current = _a[0], setCurrent = _a[1];
164
- var actorRef = react_1.useRef(actor);
165
- react_1.useEffect(function () {
166
- if (actor) {
167
- actorRef.current = actor;
168
- var sub_1 = actor.subscribe(setCurrent);
169
- return function () {
170
- sub_1.unsubscribe();
171
- };
255
+
256
+
257
+
258
+
259
+
260
+ function identity(a) {
261
+ return a;
262
+ }
263
+ function useMachine(getMachine) {
264
+ var _a = [];
265
+ for (var _i = 1; _i < arguments.length; _i++) {
266
+ _a[_i - 1] = arguments[_i];
267
+ }
268
+ var _b = useMachine_read(_a, 1), _c = _b[0], options = _c === void 0 ? {} : _c;
269
+ // using `useIdleInterpreter` allows us to subscribe to the service *before* we start it
270
+ // so we don't miss any notifications
271
+ var service = useIdleInterpreter(getMachine, options);
272
+ var getSnapshot = (0,react.useCallback)(function () {
273
+ if (service.status === es/* InterpreterStatus */.TM.NotStarted) {
274
+ return (options.state
275
+ ? es/* State */.ZM.create(options.state)
276
+ : service.machine.initialState);
277
+ }
278
+ return service.getSnapshot();
279
+ }, [service]);
280
+ var isEqual = (0,react.useCallback)(function (prevState, nextState) {
281
+ return utils_isInterpreterStateEqual(service, prevState, nextState);
282
+ }, [service]);
283
+ var subscribe = (0,react.useCallback)(function (handleStoreChange) {
284
+ var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;
285
+ return unsubscribe;
286
+ }, [service]);
287
+ var storeSnapshot = (0,with_selector.useSyncExternalStoreWithSelector)(subscribe, getSnapshot, getSnapshot, identity, isEqual);
288
+ (0,react.useEffect)(function () {
289
+ var rehydratedState = options.state;
290
+ service.start(rehydratedState ? es/* State */.ZM.create(rehydratedState) : undefined);
291
+ return function () {
292
+ service.stop();
293
+ service.status = es/* InterpreterStatus */.TM.NotStarted;
294
+ };
295
+ }, []);
296
+ return [storeSnapshot, service.send, service];
297
+ }
298
+
299
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useActor.js
300
+
301
+
302
+
303
+
304
+
305
+ function useActor_identity(a) {
306
+ return a;
307
+ }
308
+ function useActor_isActorWithState(actorRef) {
309
+ return 'state' in actorRef;
310
+ }
311
+ function isDeferredActor(actorRef) {
312
+ return 'deferred' in actorRef;
313
+ }
314
+ function defaultGetSnapshot(actorRef) {
315
+ return 'getSnapshot' in actorRef
316
+ ? isService(actorRef)
317
+ ? getServiceSnapshot(actorRef)
318
+ : actorRef.getSnapshot()
319
+ : useActor_isActorWithState(actorRef)
320
+ ? actorRef.state
321
+ : undefined;
322
+ }
323
+ function useActor(actorRef, getSnapshot) {
324
+ if (getSnapshot === void 0) { getSnapshot = defaultGetSnapshot; }
325
+ var actorRefRef = useRef(actorRef);
326
+ var deferredEventsRef = useRef([]);
327
+ var subscribe = useCallback(function (handleStoreChange) {
328
+ var unsubscribe = actorRef.subscribe(handleStoreChange).unsubscribe;
329
+ return unsubscribe;
330
+ }, [actorRef]);
331
+ var boundGetSnapshot = useCallback(function () { return getSnapshot(actorRef); }, [actorRef, getSnapshot]);
332
+ var isEqual = useCallback(function (prevState, nextState) {
333
+ if (isService(actorRef)) {
334
+ return isInterpreterStateEqual(actorRef, prevState, nextState);
335
+ }
336
+ return prevState === nextState;
337
+ }, [actorRef]);
338
+ var storeSnapshot = useSyncExternalStoreWithSelector(subscribe, boundGetSnapshot, boundGetSnapshot, useActor_identity, isEqual);
339
+ var send = useConstant(function () { return function () {
340
+ var args = [];
341
+ for (var _i = 0; _i < arguments.length; _i++) {
342
+ args[_i] = arguments[_i];
343
+ }
344
+ var event = args[0];
345
+ if (false) {}
346
+ var currentActorRef = actorRefRef.current;
347
+ // If the previous actor is a deferred actor,
348
+ // queue the events so that they can be replayed
349
+ // on the non-deferred actor.
350
+ if (isDeferredActor(currentActorRef) && currentActorRef.deferred) {
351
+ deferredEventsRef.current.push(event);
352
+ }
353
+ else {
354
+ currentActorRef.send(event);
355
+ }
356
+ }; });
357
+ useIsomorphicLayoutEffect(function () {
358
+ actorRefRef.current = actorRef;
359
+ // Dequeue deferred events from the previous deferred actorRef
360
+ while (deferredEventsRef.current.length > 0) {
361
+ var deferredEvent = deferredEventsRef.current.shift();
362
+ actorRef.send(deferredEvent);
363
+ }
364
+ }, [actorRef]);
365
+ return [storeSnapshot, send];
366
+ }
367
+
368
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useSelector.js
369
+
370
+
371
+
372
+
373
+ var defaultCompare = function (a, b) { return a === b; };
374
+ var useSelector_defaultGetSnapshot = function (a, initialStateCacheRef) {
375
+ if (isService(a)) {
376
+ // A status of 0 = interpreter not started
377
+ if (a.status === 0 && initialStateCacheRef.current) {
378
+ return initialStateCacheRef.current;
172
379
  }
380
+ var snapshot = getServiceSnapshot(a);
381
+ initialStateCacheRef.current = a.status === 0 ? snapshot : null;
382
+ return snapshot;
383
+ }
384
+ return isActorWithState(a) ? a.state : undefined;
385
+ };
386
+ function useSelector(actor, selector, compare, getSnapshot) {
387
+ if (compare === void 0) { compare = defaultCompare; }
388
+ var initialStateCacheRef = useRef(null);
389
+ var subscribe = useCallback(function (handleStoreChange) {
390
+ var unsubscribe = actor.subscribe(handleStoreChange).unsubscribe;
391
+ return unsubscribe;
173
392
  }, [actor]);
174
- return [current, actorRef.current ? actorRef.current.send : function () { return void 0; }];
393
+ var boundGetSnapshot = useCallback(function () {
394
+ if (getSnapshot) {
395
+ return getSnapshot(actor);
396
+ }
397
+ return useSelector_defaultGetSnapshot(actor, initialStateCacheRef);
398
+ }, [actor, getSnapshot]);
399
+ var selectedSnapshot = useSyncExternalStoreWithSelector(subscribe, boundGetSnapshot, boundGetSnapshot, selector, compare);
400
+ return selectedSnapshot;
401
+ }
402
+
403
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useSpawn.js
404
+
405
+
406
+ /**
407
+ * React hook that spawns an `ActorRef` with the specified `behavior`.
408
+ * The returned `ActorRef` can be used with the `useActor(actorRef)` hook.
409
+ *
410
+ * @param behavior The actor behavior to spawn
411
+ * @returns An ActorRef with the specified `behavior`
412
+ */
413
+ function useSpawn(behavior) {
414
+ var actorRef = useConstant(function () {
415
+ return spawnBehavior(behavior);
416
+ });
417
+ return actorRef;
418
+ }
419
+
420
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/createActorContext.js
421
+ var createActorContext_assign = (undefined && undefined.__assign) || function () {
422
+ createActorContext_assign = Object.assign || function(t) {
423
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
424
+ s = arguments[i];
425
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
426
+ t[p] = s[p];
427
+ }
428
+ return t;
429
+ };
430
+ return createActorContext_assign.apply(this, arguments);
431
+ };
432
+
433
+
434
+
435
+
436
+ function createActorContext(machine, interpreterOptions, observerOrListener) {
437
+ var ReactContext = React.createContext(null);
438
+ var OriginalProvider = ReactContext.Provider;
439
+ function Provider(_a) {
440
+ 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);
442
+ return React.createElement(OriginalProvider, { value: actor }, children);
443
+ }
444
+ Provider.displayName = "ActorProvider(".concat(machine.id, ")");
445
+ function useContext() {
446
+ var actor = React.useContext(ReactContext);
447
+ if (!actor) {
448
+ throw new Error("You used a hook from \"".concat(Provider.displayName, "\" but it's not inside a <").concat(Provider.displayName, "> component."));
449
+ }
450
+ return actor;
451
+ }
452
+ function useActor() {
453
+ var actor = useContext();
454
+ return useActorUnbound(actor);
455
+ }
456
+ function useSelector(selector, compare) {
457
+ var actor = useContext();
458
+ return useSelectorUnbound(actor, selector, compare);
459
+ }
460
+ return {
461
+ Provider: Provider,
462
+ useActorRef: useContext,
463
+ useActor: useActor,
464
+ useSelector: useSelector
465
+ };
175
466
  }
176
- exports.useActor = useActor;
177
- //# sourceMappingURL=useActor.js.map
467
+
468
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/index.js
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+ /***/ }),
479
+
480
+ /***/ 17145:
481
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
482
+
483
+ /**
484
+ * @license React
485
+ * use-sync-external-store-shim.production.min.js
486
+ *
487
+ * Copyright (c) Facebook, Inc. and its affiliates.
488
+ *
489
+ * This source code is licensed under the MIT license found in the
490
+ * LICENSE file in the root directory of this source tree.
491
+ */
492
+ var e=__webpack_require__(43001);function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}
493
+ function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;
494
+
178
495
 
179
496
  /***/ }),
180
497
 
181
- /***/ 87519:
498
+ /***/ 1594:
499
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
500
+
501
+ /**
502
+ * @license React
503
+ * use-sync-external-store-shim/with-selector.production.min.js
504
+ *
505
+ * Copyright (c) Facebook, Inc. and its affiliates.
506
+ *
507
+ * This source code is licensed under the MIT license found in the
508
+ * LICENSE file in the root directory of this source tree.
509
+ */
510
+ var h=__webpack_require__(43001),n=__webpack_require__(75011);function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
511
+ exports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);
512
+ u(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};
513
+
514
+
515
+ /***/ }),
516
+
517
+ /***/ 75011:
518
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
519
+
520
+
521
+
522
+ if (true) {
523
+ module.exports = __webpack_require__(17145);
524
+ } else {}
525
+
526
+
527
+ /***/ }),
528
+
529
+ /***/ 56901:
530
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
531
+
532
+
533
+
534
+ if (true) {
535
+ module.exports = __webpack_require__(1594);
536
+ } else {}
537
+
538
+
539
+ /***/ }),
540
+
541
+ /***/ 261:
182
542
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
183
543
 
184
- // ESM COMPAT FLAG
185
- __webpack_require__.r(__webpack_exports__);
186
544
 
187
545
  // EXPORTS
188
546
  __webpack_require__.d(__webpack_exports__, {
189
- ActionTypes: () => (/* reexport */ ActionTypes),
190
- Interpreter: () => (/* reexport */ Interpreter),
191
- InterpreterStatus: () => (/* reexport */ InterpreterStatus),
192
- Machine: () => (/* reexport */ Machine),
193
- SpecialTargets: () => (/* reexport */ SpecialTargets),
194
- State: () => (/* reexport */ State),
195
- StateNode: () => (/* reexport */ StateNode),
196
- actions: () => (/* reexport */ actions_namespaceObject),
197
- assign: () => (/* binding */ es_assign),
198
- createMachine: () => (/* reexport */ createMachine),
199
- createSchema: () => (/* reexport */ createSchema),
200
- doneInvoke: () => (/* binding */ es_doneInvoke),
201
- forwardTo: () => (/* binding */ es_forwardTo),
202
- interpret: () => (/* reexport */ interpret),
203
- mapState: () => (/* reexport */ mapState),
204
- matchState: () => (/* reexport */ matchState),
205
- matchesState: () => (/* reexport */ matchesState),
206
- raise: () => (/* binding */ es_raise),
207
- send: () => (/* binding */ es_send),
208
- sendParent: () => (/* binding */ es_sendParent),
209
- sendTo: () => (/* binding */ es_sendTo),
210
- sendUpdate: () => (/* binding */ es_sendUpdate),
211
- spawn: () => (/* reexport */ spawn),
212
- spawnBehavior: () => (/* reexport */ spawnBehavior),
213
- t: () => (/* reexport */ t),
214
- toActorRef: () => (/* reexport */ toActorRef),
215
- toEventObject: () => (/* reexport */ toEventObject),
216
- toObserver: () => (/* reexport */ toObserver),
217
- toSCXMLEvent: () => (/* reexport */ toSCXMLEvent)
547
+ TM: () => (/* reexport */ InterpreterStatus),
548
+ J: () => (/* reexport */ Machine),
549
+ ZM: () => (/* reexport */ State_State),
550
+ f0: () => (/* binding */ es_assign),
551
+ kJ: () => (/* reexport */ interpret)
218
552
  });
219
553
 
220
- // NAMESPACE OBJECT: ../../../node_modules/xstate/es/actionTypes.js
221
- var actionTypes_namespaceObject = {};
222
- __webpack_require__.r(actionTypes_namespaceObject);
223
- __webpack_require__.d(actionTypes_namespaceObject, {
224
- after: () => (after),
225
- assign: () => (actionTypes_assign),
226
- cancel: () => (cancel),
227
- choose: () => (choose),
228
- doneState: () => (doneState),
229
- error: () => (actionTypes_error),
230
- errorExecution: () => (errorExecution),
231
- errorPlatform: () => (errorPlatform),
232
- init: () => (init),
233
- invoke: () => (invoke),
234
- log: () => (log),
235
- nullEvent: () => (nullEvent),
236
- pure: () => (pure),
237
- raise: () => (raise),
238
- send: () => (send),
239
- start: () => (start),
240
- stop: () => (stop),
241
- update: () => (update)
242
- });
243
-
244
- // NAMESPACE OBJECT: ../../../node_modules/xstate/es/actions.js
245
- var actions_namespaceObject = {};
246
- __webpack_require__.r(actions_namespaceObject);
247
- __webpack_require__.d(actions_namespaceObject, {
248
- actionTypes: () => (actionTypes_namespaceObject),
249
- after: () => (actions_after),
250
- assign: () => (actions_assign),
251
- cancel: () => (actions_cancel),
252
- choose: () => (actions_choose),
253
- done: () => (done),
254
- doneInvoke: () => (actions_doneInvoke),
255
- error: () => (actions_error),
256
- escalate: () => (escalate),
257
- forwardTo: () => (forwardTo),
258
- getActionFunction: () => (getActionFunction),
259
- initEvent: () => (initEvent),
260
- isActionObject: () => (isActionObject),
261
- log: () => (actions_log),
262
- pure: () => (actions_pure),
263
- raise: () => (actions_raise),
264
- resolveActions: () => (resolveActions),
265
- resolveLog: () => (resolveLog),
266
- resolveRaise: () => (resolveRaise),
267
- resolveSend: () => (resolveSend),
268
- resolveStop: () => (resolveStop),
269
- respond: () => (respond),
270
- send: () => (actions_send),
271
- sendParent: () => (sendParent),
272
- sendTo: () => (sendTo),
273
- sendUpdate: () => (sendUpdate),
274
- start: () => (actions_start),
275
- stop: () => (actions_stop),
276
- toActionObject: () => (toActionObject),
277
- toActionObjects: () => (toActionObjects),
278
- toActivityDefinition: () => (toActivityDefinition)
279
- });
554
+ // UNUSED EXPORTS: ActionTypes, Interpreter, SpecialTargets, StateNode, actions, choose, createMachine, createSchema, doneInvoke, forwardTo, log, mapState, matchState, matchesState, pure, raise, send, sendParent, sendTo, sendUpdate, spawn, spawnBehavior, stop, t, toActorRef, toEventObject, toObserver, toSCXMLEvent
280
555
 
281
556
  ;// CONCATENATED MODULE: ../../../node_modules/xstate/es/_virtual/_tslib.js
282
557
  /*! *****************************************************************************
@@ -294,15 +569,15 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
294
569
  PERFORMANCE OF THIS SOFTWARE.
295
570
  ***************************************************************************** */
296
571
 
297
- var __assign = function() {
298
- __assign = Object.assign || function __assign(t) {
572
+ var _tslib_assign = function() {
573
+ _tslib_assign = Object.assign || function __assign(t) {
299
574
  for (var s, i = 1, n = arguments.length; i < n; i++) {
300
575
  s = arguments[i];
301
576
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
302
577
  }
303
578
  return t;
304
579
  };
305
- return __assign.apply(this, arguments);
580
+ return _tslib_assign.apply(this, arguments);
306
581
  };
307
582
 
308
583
  function __rest(s, e) {
@@ -329,7 +604,7 @@ function _tslib_values(o) {
329
604
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
330
605
  }
331
606
 
332
- function __read(o, n) {
607
+ function _tslib_read(o, n) {
333
608
  var m = typeof Symbol === "function" && o[Symbol.iterator];
334
609
  if (!m) return o;
335
610
  var i = m.call(o), r, ar = [], e;
@@ -346,7 +621,7 @@ function __read(o, n) {
346
621
  return ar;
347
622
  }
348
623
 
349
- function __spreadArray(to, from, pack) {
624
+ function _tslib_spreadArray(to, from, pack) {
350
625
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
351
626
  if (ar || !(i in from)) {
352
627
  if (!ar) ar = Array.prototype.slice.call(from, 0, i);
@@ -359,7 +634,7 @@ function __spreadArray(to, from, pack) {
359
634
 
360
635
 
361
636
  ;// CONCATENATED MODULE: ../../../node_modules/xstate/es/types.js
362
- var ActionTypes;
637
+ var types_ActionTypes;
363
638
 
364
639
  (function (ActionTypes) {
365
640
  ActionTypes["Start"] = "xstate.start";
@@ -382,38 +657,38 @@ var ActionTypes;
382
657
  ActionTypes["Update"] = "xstate.update";
383
658
  ActionTypes["Pure"] = "xstate.pure";
384
659
  ActionTypes["Choose"] = "xstate.choose";
385
- })(ActionTypes || (ActionTypes = {}));
660
+ })(types_ActionTypes || (types_ActionTypes = {}));
386
661
 
387
- var SpecialTargets;
662
+ var types_SpecialTargets;
388
663
 
389
664
  (function (SpecialTargets) {
390
665
  SpecialTargets["Parent"] = "#_parent";
391
666
  SpecialTargets["Internal"] = "#_internal";
392
- })(SpecialTargets || (SpecialTargets = {}));
667
+ })(types_SpecialTargets || (types_SpecialTargets = {}));
393
668
 
394
669
 
395
670
 
396
671
  ;// CONCATENATED MODULE: ../../../node_modules/xstate/es/actionTypes.js
397
672
 
398
673
 
399
- var start = ActionTypes.Start;
400
- var stop = ActionTypes.Stop;
401
- var raise = ActionTypes.Raise;
402
- var send = ActionTypes.Send;
403
- var cancel = ActionTypes.Cancel;
404
- var nullEvent = ActionTypes.NullEvent;
405
- var actionTypes_assign = ActionTypes.Assign;
406
- var after = ActionTypes.After;
407
- var doneState = ActionTypes.DoneState;
408
- var log = ActionTypes.Log;
409
- var init = ActionTypes.Init;
410
- var invoke = ActionTypes.Invoke;
411
- var errorExecution = ActionTypes.ErrorExecution;
412
- var errorPlatform = ActionTypes.ErrorPlatform;
413
- var actionTypes_error = ActionTypes.ErrorCustom;
414
- var update = ActionTypes.Update;
415
- var choose = ActionTypes.Choose;
416
- var pure = ActionTypes.Pure;
674
+ var start = types_ActionTypes.Start;
675
+ var stop = types_ActionTypes.Stop;
676
+ var raise = types_ActionTypes.Raise;
677
+ var send = types_ActionTypes.Send;
678
+ var cancel = types_ActionTypes.Cancel;
679
+ var nullEvent = types_ActionTypes.NullEvent;
680
+ var actionTypes_assign = types_ActionTypes.Assign;
681
+ var after = types_ActionTypes.After;
682
+ var doneState = types_ActionTypes.DoneState;
683
+ var log = types_ActionTypes.Log;
684
+ var init = types_ActionTypes.Init;
685
+ var invoke = types_ActionTypes.Invoke;
686
+ var errorExecution = types_ActionTypes.ErrorExecution;
687
+ var errorPlatform = types_ActionTypes.ErrorPlatform;
688
+ var actionTypes_error = types_ActionTypes.ErrorCustom;
689
+ var actionTypes_update = types_ActionTypes.Update;
690
+ var choose = types_ActionTypes.Choose;
691
+ var pure = types_ActionTypes.Pure;
417
692
 
418
693
 
419
694
 
@@ -426,7 +701,7 @@ var TARGETLESS_KEY = '';
426
701
 
427
702
 
428
703
  ;// CONCATENATED MODULE: ../../../node_modules/xstate/es/environment.js
429
- var IS_PRODUCTION = "production" === 'production';
704
+ var environment_IS_PRODUCTION = "production" === 'production';
430
705
 
431
706
 
432
707
 
@@ -441,7 +716,7 @@ var _a;
441
716
  function keys(value) {
442
717
  return Object.keys(value);
443
718
  }
444
- function matchesState(parentStateId, childStateId, delimiter) {
719
+ function utils_matchesState(parentStateId, childStateId, delimiter) {
445
720
  if (delimiter === void 0) {
446
721
  delimiter = STATE_DELIMITER;
447
722
  }
@@ -449,8 +724,8 @@ function matchesState(parentStateId, childStateId, delimiter) {
449
724
  var parentStateValue = toStateValue(parentStateId, delimiter);
450
725
  var childStateValue = toStateValue(childStateId, delimiter);
451
726
 
452
- if (isString(childStateValue)) {
453
- if (isString(parentStateValue)) {
727
+ if (utils_isString(childStateValue)) {
728
+ if (utils_isString(parentStateValue)) {
454
729
  return childStateValue === parentStateValue;
455
730
  } // Parent more specific than child
456
731
 
@@ -458,7 +733,7 @@ function matchesState(parentStateId, childStateId, delimiter) {
458
733
  return false;
459
734
  }
460
735
 
461
- if (isString(parentStateValue)) {
736
+ if (utils_isString(parentStateValue)) {
462
737
  return parentStateValue in childStateValue;
463
738
  }
464
739
 
@@ -467,19 +742,19 @@ function matchesState(parentStateId, childStateId, delimiter) {
467
742
  return false;
468
743
  }
469
744
 
470
- return matchesState(parentStateValue[key], childStateValue[key]);
745
+ return utils_matchesState(parentStateValue[key], childStateValue[key]);
471
746
  });
472
747
  }
473
748
  function getEventType(event) {
474
749
  try {
475
- return isString(event) || typeof event === 'number' ? "".concat(event) : event.type;
750
+ return utils_isString(event) || typeof event === 'number' ? "".concat(event) : event.type;
476
751
  } catch (e) {
477
752
  throw new Error('Events must be strings or objects with a string event.type property.');
478
753
  }
479
754
  }
480
755
  function getActionType(action) {
481
756
  try {
482
- return isString(action) || typeof action === 'number' ? "".concat(action) : isFunction(action) ? action.name : action.type;
757
+ return utils_isString(action) || typeof action === 'number' ? "".concat(action) : utils_isFunction(action) ? action.name : action.type;
483
758
  } catch (e) {
484
759
  throw new Error('Actions must be strings or objects with a string action.type property.');
485
760
  }
@@ -641,7 +916,7 @@ function toStatePaths(stateValue) {
641
916
  return [[]];
642
917
  }
643
918
 
644
- if (isString(stateValue)) {
919
+ if (utils_isString(stateValue)) {
645
920
  return [[stateValue]];
646
921
  }
647
922
 
@@ -701,7 +976,7 @@ function pathsToStateValue(paths) {
701
976
  function flatten(array) {
702
977
  var _a;
703
978
 
704
- return (_a = []).concat.apply(_a, __spreadArray([], __read(array), false));
979
+ return (_a = []).concat.apply(_a, _tslib_spreadArray([], _tslib_read(array), false));
705
980
  }
706
981
  function toArrayStrict(value) {
707
982
  if (isArray(value)) {
@@ -720,7 +995,7 @@ function toArray(value) {
720
995
  function mapContext(mapper, context, _event) {
721
996
  var e_5, _a;
722
997
 
723
- if (isFunction(mapper)) {
998
+ if (utils_isFunction(mapper)) {
724
999
  return mapper(context, _event.data);
725
1000
  }
726
1001
 
@@ -731,7 +1006,7 @@ function mapContext(mapper, context, _event) {
731
1006
  var key = _c.value;
732
1007
  var subMapper = mapper[key];
733
1008
 
734
- if (isFunction(subMapper)) {
1009
+ if (utils_isFunction(subMapper)) {
735
1010
  result[key] = subMapper(context, _event.data);
736
1011
  } else {
737
1012
  result[key] = subMapper;
@@ -760,7 +1035,7 @@ function isPromiseLike(value) {
760
1035
  } // Check if shape matches the Promise/A+ specification for a "thenable".
761
1036
 
762
1037
 
763
- if (value !== null && (isFunction(value) || typeof value === 'object') && isFunction(value.then)) {
1038
+ if (value !== null && (utils_isFunction(value) || typeof value === 'object') && utils_isFunction(value.then)) {
764
1039
  return true;
765
1040
  }
766
1041
 
@@ -772,7 +1047,7 @@ function isBehavior(value) {
772
1047
  function partition(items, predicate) {
773
1048
  var e_6, _a;
774
1049
 
775
- var _b = __read([[], []], 2),
1050
+ var _b = _tslib_read([[], []], 2),
776
1051
  truthy = _b[0],
777
1052
  falsy = _b[1];
778
1053
 
@@ -806,7 +1081,7 @@ function updateHistoryStates(hist, stateValue) {
806
1081
  return undefined;
807
1082
  }
808
1083
 
809
- var subStateValue = (isString(stateValue) ? undefined : stateValue[key]) || (subHist ? subHist.current : undefined);
1084
+ var subStateValue = (utils_isString(stateValue) ? undefined : stateValue[key]) || (subHist ? subHist.current : undefined);
810
1085
 
811
1086
  if (!subStateValue) {
812
1087
  return undefined;
@@ -825,8 +1100,8 @@ function updateHistoryValue(hist, stateValue) {
825
1100
  };
826
1101
  }
827
1102
  function updateContext(context, _event, assignActions, state) {
828
- if (!IS_PRODUCTION) {
829
- warn(!!context, 'Attempting to update undefined context');
1103
+ if (!environment_IS_PRODUCTION) {
1104
+ utils_warn(!!context, 'Attempting to update undefined context');
830
1105
  }
831
1106
 
832
1107
  var updatedContext = context ? assignActions.reduce(function (acc, assignAction) {
@@ -840,14 +1115,14 @@ function updateContext(context, _event, assignActions, state) {
840
1115
  };
841
1116
  var partialUpdate = {};
842
1117
 
843
- if (isFunction(assignment)) {
1118
+ if (utils_isFunction(assignment)) {
844
1119
  partialUpdate = assignment(acc, _event.data, meta);
845
1120
  } else {
846
1121
  try {
847
1122
  for (var _b = _tslib_values(Object.keys(assignment)), _c = _b.next(); !_c.done; _c = _b.next()) {
848
1123
  var key = _c.value;
849
1124
  var propAssignment = assignment[key];
850
- partialUpdate[key] = isFunction(propAssignment) ? propAssignment(acc, _event.data, meta) : propAssignment;
1125
+ partialUpdate[key] = utils_isFunction(propAssignment) ? propAssignment(acc, _event.data, meta) : propAssignment;
851
1126
  }
852
1127
  } catch (e_7_1) {
853
1128
  e_7 = {
@@ -867,10 +1142,10 @@ function updateContext(context, _event, assignActions, state) {
867
1142
  return updatedContext;
868
1143
  } // tslint:disable-next-line:no-empty
869
1144
 
870
- var warn = function () {};
1145
+ var utils_warn = function () {};
871
1146
 
872
- if (!IS_PRODUCTION) {
873
- warn = function (condition, message) {
1147
+ if (!environment_IS_PRODUCTION) {
1148
+ utils_warn = function (condition, message) {
874
1149
  var error = condition instanceof Error ? condition : undefined;
875
1150
 
876
1151
  if (!error && condition) {
@@ -893,10 +1168,10 @@ function isArray(value) {
893
1168
  return Array.isArray(value);
894
1169
  } // tslint:disable-next-line:ban-types
895
1170
 
896
- function isFunction(value) {
1171
+ function utils_isFunction(value) {
897
1172
  return typeof value === 'function';
898
1173
  }
899
- function isString(value) {
1174
+ function utils_isString(value) {
900
1175
  return typeof value === 'string';
901
1176
  }
902
1177
  function toGuard(condition, guardMap) {
@@ -904,7 +1179,7 @@ function toGuard(condition, guardMap) {
904
1179
  return undefined;
905
1180
  }
906
1181
 
907
- if (isString(condition)) {
1182
+ if (utils_isString(condition)) {
908
1183
  return {
909
1184
  type: DEFAULT_GUARD_TYPE,
910
1185
  name: condition,
@@ -912,7 +1187,7 @@ function toGuard(condition, guardMap) {
912
1187
  };
913
1188
  }
914
1189
 
915
- if (isFunction(condition)) {
1190
+ if (utils_isFunction(condition)) {
916
1191
  return {
917
1192
  type: DEFAULT_GUARD_TYPE,
918
1193
  name: condition.name,
@@ -924,7 +1199,7 @@ function toGuard(condition, guardMap) {
924
1199
  }
925
1200
  function isObservable(value) {
926
1201
  try {
927
- return 'subscribe' in value && isFunction(value.subscribe);
1202
+ return 'subscribe' in value && utils_isFunction(value.subscribe);
928
1203
  } catch (e) {
929
1204
  return false;
930
1205
  }
@@ -938,23 +1213,23 @@ var interopSymbols = (_a = {}, _a[symbolObservable] = function () {
938
1213
  }, _a[Symbol.observable] = function () {
939
1214
  return this;
940
1215
  }, _a);
941
- function isMachine(value) {
1216
+ function utils_isMachine(value) {
942
1217
  return !!value && '__xstatenode' in value;
943
1218
  }
944
1219
  function isActor(value) {
945
1220
  return !!value && typeof value.send === 'function';
946
1221
  }
947
- var uniqueId = /*#__PURE__*/function () {
1222
+ var utils_uniqueId = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
948
1223
  var currentId = 0;
949
1224
  return function () {
950
1225
  currentId++;
951
1226
  return currentId.toString(16);
952
1227
  };
953
- }();
1228
+ }()));
954
1229
  function toEventObject(event, payload // id?: TEvent['type']
955
1230
  ) {
956
- if (isString(event) || typeof event === 'number') {
957
- return __assign({
1231
+ if (utils_isString(event) || typeof event === 'number') {
1232
+ return _tslib_assign({
958
1233
  type: event
959
1234
  }, payload);
960
1235
  }
@@ -962,12 +1237,12 @@ function toEventObject(event, payload // id?: TEvent['type']
962
1237
  return event;
963
1238
  }
964
1239
  function toSCXMLEvent(event, scxmlEvent) {
965
- if (!isString(event) && '$$type' in event && event.$$type === 'scxml') {
1240
+ if (!utils_isString(event) && '$$type' in event && event.$$type === 'scxml') {
966
1241
  return event;
967
1242
  }
968
1243
 
969
1244
  var eventObject = toEventObject(event);
970
- return __assign({
1245
+ return _tslib_assign({
971
1246
  name: eventObject.type,
972
1247
  data: eventObject,
973
1248
  $$type: 'scxml',
@@ -976,14 +1251,14 @@ function toSCXMLEvent(event, scxmlEvent) {
976
1251
  }
977
1252
  function toTransitionConfigArray(event, configLike) {
978
1253
  var transitions = toArrayStrict(configLike).map(function (transitionLike) {
979
- if (typeof transitionLike === 'undefined' || typeof transitionLike === 'string' || isMachine(transitionLike)) {
1254
+ if (typeof transitionLike === 'undefined' || typeof transitionLike === 'string' || utils_isMachine(transitionLike)) {
980
1255
  return {
981
1256
  target: transitionLike,
982
1257
  event: event
983
1258
  };
984
1259
  }
985
1260
 
986
- return __assign(__assign({}, transitionLike), {
1261
+ return _tslib_assign(_tslib_assign({}, transitionLike), {
987
1262
  event: event
988
1263
  });
989
1264
  });
@@ -997,7 +1272,7 @@ function normalizeTarget(target) {
997
1272
  return toArray(target);
998
1273
  }
999
1274
  function reportUnhandledExceptionOnInvocation(originalError, currentError, id) {
1000
- if (!IS_PRODUCTION) {
1275
+ if (!environment_IS_PRODUCTION) {
1001
1276
  var originalStackTrace = originalError.stack ? " Stacktrace was '".concat(originalError.stack, "'") : '';
1002
1277
 
1003
1278
  if (originalError === currentError) {
@@ -1054,7 +1329,7 @@ function createInvokeId(stateNodeId, index) {
1054
1329
  return "".concat(stateNodeId, ":invocation[").concat(index, "]");
1055
1330
  }
1056
1331
  function isRaisableAction(action) {
1057
- return (action.type === raise || action.type === send && action.to === SpecialTargets.Internal) && typeof action.delay !== 'number';
1332
+ return (action.type === raise || action.type === send && action.to === types_SpecialTargets.Internal) && typeof action.delay !== 'number';
1058
1333
  }
1059
1334
 
1060
1335
 
@@ -1077,10 +1352,10 @@ function getActionFunction(actionType, actionFunctionMap) {
1077
1352
  function toActionObject(action, actionFunctionMap) {
1078
1353
  var actionObject;
1079
1354
 
1080
- if (isString(action) || typeof action === 'number') {
1355
+ if (utils_isString(action) || typeof action === 'number') {
1081
1356
  var exec = getActionFunction(action, actionFunctionMap);
1082
1357
 
1083
- if (isFunction(exec)) {
1358
+ if (utils_isFunction(exec)) {
1084
1359
  actionObject = {
1085
1360
  type: action,
1086
1361
  exec: exec
@@ -1093,7 +1368,7 @@ function toActionObject(action, actionFunctionMap) {
1093
1368
  exec: undefined
1094
1369
  };
1095
1370
  }
1096
- } else if (isFunction(action)) {
1371
+ } else if (utils_isFunction(action)) {
1097
1372
  actionObject = {
1098
1373
  // Convert action to string if unnamed
1099
1374
  type: action.name || action.toString(),
@@ -1102,13 +1377,13 @@ function toActionObject(action, actionFunctionMap) {
1102
1377
  } else {
1103
1378
  var exec = getActionFunction(action.type, actionFunctionMap);
1104
1379
 
1105
- if (isFunction(exec)) {
1106
- actionObject = __assign(__assign({}, action), {
1380
+ if (utils_isFunction(exec)) {
1381
+ actionObject = _tslib_assign(_tslib_assign({}, action), {
1107
1382
  exec: exec
1108
1383
  });
1109
1384
  } else if (exec) {
1110
1385
  var actionType = exec.type || action.type;
1111
- actionObject = __assign(__assign(__assign({}, exec), action), {
1386
+ actionObject = _tslib_assign(_tslib_assign(_tslib_assign({}, exec), action), {
1112
1387
  type: actionType
1113
1388
  });
1114
1389
  } else {
@@ -1130,8 +1405,8 @@ var toActionObjects = function (action, actionFunctionMap) {
1130
1405
  };
1131
1406
  function toActivityDefinition(action) {
1132
1407
  var actionObject = toActionObject(action);
1133
- return __assign(__assign({
1134
- id: isString(action) ? action : actionObject.id
1408
+ return _tslib_assign(_tslib_assign({
1409
+ id: utils_isString(action) ? action : actionObject.id
1135
1410
  }, actionObject), {
1136
1411
  type: actionObject.type
1137
1412
  });
@@ -1155,17 +1430,17 @@ function resolveRaise(action, ctx, _event, delaysMap) {
1155
1430
  var meta = {
1156
1431
  _event: _event
1157
1432
  };
1158
- var resolvedEvent = toSCXMLEvent(isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1433
+ var resolvedEvent = toSCXMLEvent(utils_isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1159
1434
  var resolvedDelay;
1160
1435
 
1161
- if (isString(action.delay)) {
1436
+ if (utils_isString(action.delay)) {
1162
1437
  var configDelay = delaysMap && delaysMap[action.delay];
1163
- resolvedDelay = isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1438
+ resolvedDelay = utils_isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1164
1439
  } else {
1165
- resolvedDelay = isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1440
+ resolvedDelay = utils_isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1166
1441
  }
1167
1442
 
1168
- return __assign(__assign({}, action), {
1443
+ return _tslib_assign(_tslib_assign({}, action), {
1169
1444
  type: raise,
1170
1445
  _event: resolvedEvent,
1171
1446
  delay: resolvedDelay
@@ -1188,11 +1463,11 @@ function actions_send(event, options) {
1188
1463
  return {
1189
1464
  to: options ? options.to : undefined,
1190
1465
  type: send,
1191
- event: isFunction(event) ? event : toEventObject(event),
1466
+ event: utils_isFunction(event) ? event : toEventObject(event),
1192
1467
  delay: options ? options.delay : undefined,
1193
1468
  // TODO: don't auto-generate IDs here like that
1194
1469
  // there is too big chance of the ID collision
1195
- id: options && options.id !== undefined ? options.id : isFunction(event) ? event.name : getEventType(event)
1470
+ id: options && options.id !== undefined ? options.id : utils_isFunction(event) ? event.name : getEventType(event)
1196
1471
  };
1197
1472
  }
1198
1473
  function resolveSend(action, ctx, _event, delaysMap) {
@@ -1200,18 +1475,18 @@ function resolveSend(action, ctx, _event, delaysMap) {
1200
1475
  _event: _event
1201
1476
  }; // TODO: helper function for resolving Expr
1202
1477
 
1203
- var resolvedEvent = toSCXMLEvent(isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1478
+ var resolvedEvent = toSCXMLEvent(utils_isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1204
1479
  var resolvedDelay;
1205
1480
 
1206
- if (isString(action.delay)) {
1481
+ if (utils_isString(action.delay)) {
1207
1482
  var configDelay = delaysMap && delaysMap[action.delay];
1208
- resolvedDelay = isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1483
+ resolvedDelay = utils_isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1209
1484
  } else {
1210
- resolvedDelay = isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1485
+ resolvedDelay = utils_isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1211
1486
  }
1212
1487
 
1213
- var resolvedTarget = isFunction(action.to) ? action.to(ctx, _event.data, meta) : action.to;
1214
- return __assign(__assign({}, action), {
1488
+ var resolvedTarget = utils_isFunction(action.to) ? action.to(ctx, _event.data, meta) : action.to;
1489
+ return _tslib_assign(_tslib_assign({}, action), {
1215
1490
  to: resolvedTarget,
1216
1491
  _event: resolvedEvent,
1217
1492
  event: resolvedEvent.data,
@@ -1289,14 +1564,14 @@ function actions_log(expr, label) {
1289
1564
  }
1290
1565
 
1291
1566
  return {
1292
- type: log,
1567
+ type: log$1,
1293
1568
  label: label,
1294
1569
  expr: expr
1295
1570
  };
1296
1571
  }
1297
1572
  var resolveLog = function (action, ctx, _event) {
1298
- return __assign(__assign({}, action), {
1299
- value: isString(action.expr) ? action.expr : action.expr(ctx, _event.data, {
1573
+ return _tslib_assign(_tslib_assign({}, action), {
1574
+ value: utils_isString(action.expr) ? action.expr : action.expr(ctx, _event.data, {
1300
1575
  _event: _event
1301
1576
  })
1302
1577
  });
@@ -1324,7 +1599,7 @@ var actions_cancel = function (sendId) {
1324
1599
  function actions_start(activity) {
1325
1600
  var activityDef = toActivityDefinition(activity);
1326
1601
  return {
1327
- type: ActionTypes.Start,
1602
+ type: types_ActionTypes.Start,
1328
1603
  activity: activityDef,
1329
1604
  exec: undefined
1330
1605
  };
@@ -1336,20 +1611,20 @@ function actions_start(activity) {
1336
1611
  */
1337
1612
 
1338
1613
  function actions_stop(actorRef) {
1339
- var activity = isFunction(actorRef) ? actorRef : toActivityDefinition(actorRef);
1614
+ var activity = utils_isFunction(actorRef) ? actorRef : toActivityDefinition(actorRef);
1340
1615
  return {
1341
- type: ActionTypes.Stop,
1616
+ type: types_ActionTypes.Stop,
1342
1617
  activity: activity,
1343
1618
  exec: undefined
1344
1619
  };
1345
1620
  }
1346
1621
  function resolveStop(action, context, _event) {
1347
- var actorRefOrString = isFunction(action.activity) ? action.activity(context, _event.data) : action.activity;
1622
+ var actorRefOrString = utils_isFunction(action.activity) ? action.activity(context, _event.data) : action.activity;
1348
1623
  var resolvedActorRef = typeof actorRefOrString === 'string' ? {
1349
1624
  id: actorRefOrString
1350
1625
  } : actorRefOrString;
1351
1626
  var actionObject = {
1352
- type: ActionTypes.Stop,
1627
+ type: types_ActionTypes.Stop,
1353
1628
  activity: resolvedActorRef
1354
1629
  };
1355
1630
  return actionObject;
@@ -1379,7 +1654,7 @@ function isActionObject(action) {
1379
1654
 
1380
1655
  function actions_after(delayRef, id) {
1381
1656
  var idSuffix = id ? "#".concat(id) : '';
1382
- return "".concat(ActionTypes.After, "(").concat(delayRef, ")").concat(idSuffix);
1657
+ return "".concat(types_ActionTypes.After, "(").concat(delayRef, ")").concat(idSuffix);
1383
1658
  }
1384
1659
  /**
1385
1660
  * Returns an event that represents that a final state node
@@ -1390,7 +1665,7 @@ function actions_after(delayRef, id) {
1390
1665
  */
1391
1666
 
1392
1667
  function done(id, data) {
1393
- var type = "".concat(ActionTypes.DoneState, ".").concat(id);
1668
+ var type = "".concat(types_ActionTypes.DoneState, ".").concat(id);
1394
1669
  var eventObject = {
1395
1670
  type: type,
1396
1671
  data: data
@@ -1413,7 +1688,7 @@ function done(id, data) {
1413
1688
  */
1414
1689
 
1415
1690
  function actions_doneInvoke(id, data) {
1416
- var type = "".concat(ActionTypes.DoneInvoke, ".").concat(id);
1691
+ var type = "".concat(types_ActionTypes.DoneInvoke, ".").concat(id);
1417
1692
  var eventObject = {
1418
1693
  type: type,
1419
1694
  data: data
@@ -1426,7 +1701,7 @@ function actions_doneInvoke(id, data) {
1426
1701
  return eventObject;
1427
1702
  }
1428
1703
  function actions_error(id, data) {
1429
- var type = "".concat(ActionTypes.ErrorPlatform, ".").concat(id);
1704
+ var type = "".concat(types_ActionTypes.ErrorPlatform, ".").concat(id);
1430
1705
  var eventObject = {
1431
1706
  type: type,
1432
1707
  data: data
@@ -1489,7 +1764,7 @@ function forwardTo(target, options) {
1489
1764
  function escalate(errorData, options) {
1490
1765
  return sendParent(function (context, event, meta) {
1491
1766
  return {
1492
- type: actionTypes_error,
1767
+ type: error$1,
1493
1768
  data: isFunction(errorData) ? errorData(context, event, meta) : errorData
1494
1769
  };
1495
1770
  }, __assign(__assign({}, options), {
@@ -1566,14 +1841,14 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1566
1841
  case send:
1567
1842
  var sendAction = resolveSend(actionObject, updatedContext, _event, machine.options.delays); // TODO: fix ActionTypes.Init
1568
1843
 
1569
- if (!IS_PRODUCTION) {
1844
+ if (!environment_IS_PRODUCTION) {
1570
1845
  var configuredDelay = actionObject.delay; // warn after resolving as we can create better contextual message here
1571
1846
 
1572
- warn(!isString(configuredDelay) || typeof sendAction.delay === 'number', // tslint:disable-next-line:max-line-length
1847
+ utils_warn(!utils_isString(configuredDelay) || typeof sendAction.delay === 'number', // tslint:disable-next-line:max-line-length
1573
1848
  "No delay reference for delay expression '".concat(configuredDelay, "' was found on machine '").concat(machine.id, "'"));
1574
1849
  }
1575
1850
 
1576
- if (predictableExec && sendAction.to !== SpecialTargets.Internal) {
1851
+ if (predictableExec && sendAction.to !== types_SpecialTargets.Internal) {
1577
1852
  if (blockType === 'entry') {
1578
1853
  deferredToBlockEnd.push(sendAction);
1579
1854
  } else {
@@ -1602,7 +1877,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1602
1877
  return [];
1603
1878
  }
1604
1879
 
1605
- var _b = __read(resolveActions(machine, currentState, updatedContext, _event, [{
1880
+ var _b = _tslib_read(resolveActions(machine, currentState, updatedContext, _event, [{
1606
1881
  type: blockType,
1607
1882
  actions: toActionObjects(toArray(matchedActions), machine.options.actions)
1608
1883
  }], predictableExec, preserveActionOrder), 2),
@@ -1622,7 +1897,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1622
1897
  return [];
1623
1898
  }
1624
1899
 
1625
- var _c = __read(resolveActions(machine, currentState, updatedContext, _event, [{
1900
+ var _c = _tslib_read(resolveActions(machine, currentState, updatedContext, _event, [{
1626
1901
  type: blockType,
1627
1902
  actions: toActionObjects(toArray(matchedActions), machine.options.actions)
1628
1903
  }], predictableExec, preserveActionOrder), 2),
@@ -1657,7 +1932,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1657
1932
  } else if (exec_1 && preservedContexts) {
1658
1933
  var contextIndex_1 = preservedContexts.length - 1;
1659
1934
 
1660
- var wrapped = __assign(__assign({}, resolvedActionObject), {
1935
+ var wrapped = _tslib_assign(_tslib_assign({}, resolvedActionObject), {
1661
1936
  exec: function (_ctx) {
1662
1937
  var args = [];
1663
1938
 
@@ -1665,7 +1940,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1665
1940
  args[_i - 1] = arguments[_i];
1666
1941
  }
1667
1942
 
1668
- exec_1.apply(void 0, __spreadArray([preservedContexts[contextIndex_1]], __read(args), false));
1943
+ exec_1.apply(void 0, _tslib_spreadArray([preservedContexts[contextIndex_1]], _tslib_read(args), false));
1669
1944
  }
1670
1945
  });
1671
1946
 
@@ -1727,7 +2002,7 @@ var provide = function (service, fn) {
1727
2002
  serviceStack.pop();
1728
2003
  return result;
1729
2004
  };
1730
- var consume = function (fn) {
2005
+ var serviceScope_consume = function (fn) {
1731
2006
  return fn(serviceStack[serviceStack.length - 1]);
1732
2007
  };
1733
2008
 
@@ -1778,17 +2053,17 @@ function createInvocableActor(invokeDefinition, machine, context, _event) {
1778
2053
  var invokeSrc = toInvokeSource(invokeDefinition.src);
1779
2054
  var serviceCreator = (_a = machine === null || machine === void 0 ? void 0 : machine.options.services) === null || _a === void 0 ? void 0 : _a[invokeSrc.type];
1780
2055
  var resolvedData = invokeDefinition.data ? mapContext(invokeDefinition.data, context, _event) : undefined;
1781
- var tempActor = serviceCreator ? createDeferredActor(serviceCreator, invokeDefinition.id, resolvedData) : createNullActor(invokeDefinition.id); // @ts-ignore
2056
+ var tempActor = serviceCreator ? Actor_createDeferredActor(serviceCreator, invokeDefinition.id, resolvedData) : createNullActor(invokeDefinition.id); // @ts-ignore
1782
2057
 
1783
2058
  tempActor.meta = invokeDefinition;
1784
2059
  return tempActor;
1785
2060
  }
1786
- function createDeferredActor(entity, id, data) {
2061
+ function Actor_createDeferredActor(entity, id, data) {
1787
2062
  var tempActor = createNullActor(id); // @ts-ignore
1788
2063
 
1789
2064
  tempActor.deferred = true;
1790
2065
 
1791
- if (isMachine(entity)) {
2066
+ if (utils_isMachine(entity)) {
1792
2067
  // "mute" the existing service scope so potential spawned actors within the `.initialState` stay deferred here
1793
2068
  var initialState_1 = tempActor.state = provide(undefined, function () {
1794
2069
  return (data ? entity.withContext(data) : entity).initialState;
@@ -1815,7 +2090,7 @@ function isSpawnedActor(item) {
1815
2090
  function toActorRef(actorRefLike) {
1816
2091
  var _a;
1817
2092
 
1818
- return __assign((_a = {
2093
+ return _tslib_assign((_a = {
1819
2094
  subscribe: function () {
1820
2095
  return {
1821
2096
  unsubscribe: function () {
@@ -2058,7 +2333,7 @@ function has(iterable, item) {
2058
2333
  return false; // TODO: fix
2059
2334
  }
2060
2335
  function nextEvents(configuration) {
2061
- return __spreadArray([], __read(new Set(flatten(__spreadArray([], __read(configuration.map(function (sn) {
2336
+ return _tslib_spreadArray([], _tslib_read(new Set(flatten(_tslib_spreadArray([], _tslib_read(configuration.map(function (sn) {
2062
2337
  return sn.ownEvents;
2063
2338
  })), false)))), false);
2064
2339
  }
@@ -2115,7 +2390,7 @@ function stateValuesEqual(a, b) {
2115
2390
  return false;
2116
2391
  }
2117
2392
 
2118
- if (isString(a) || isString(b)) {
2393
+ if (utils_isString(a) || utils_isString(b)) {
2119
2394
  return a === b;
2120
2395
  }
2121
2396
 
@@ -2140,7 +2415,7 @@ var isState = (/* unused pure expression or super */ null && (isStateConfig));
2140
2415
  function bindActionToState(action, state) {
2141
2416
  var exec = action.exec;
2142
2417
 
2143
- var boundAction = __assign(__assign({}, action), {
2418
+ var boundAction = _tslib_assign(_tslib_assign({}, action), {
2144
2419
  exec: exec !== undefined ? function () {
2145
2420
  return exec(state.context, state.event, {
2146
2421
  action: action,
@@ -2153,7 +2428,7 @@ function bindActionToState(action, state) {
2153
2428
  return boundAction;
2154
2429
  }
2155
2430
 
2156
- var State =
2431
+ var State_State =
2157
2432
  /*#__PURE__*/
2158
2433
 
2159
2434
  /** @class */
@@ -2308,12 +2583,12 @@ function () {
2308
2583
  delimiter = '.';
2309
2584
  }
2310
2585
 
2311
- if (isString(stateValue)) {
2586
+ if (utils_isString(stateValue)) {
2312
2587
  return [stateValue];
2313
2588
  }
2314
2589
 
2315
2590
  var valueKeys = Object.keys(stateValue);
2316
- return valueKeys.concat.apply(valueKeys, __spreadArray([], __read(valueKeys.map(function (key) {
2591
+ return valueKeys.concat.apply(valueKeys, _tslib_spreadArray([], _tslib_read(valueKeys.map(function (key) {
2317
2592
  return _this.toStrings(stateValue[key], delimiter).map(function (s) {
2318
2593
  return key + delimiter + s;
2319
2594
  });
@@ -2328,13 +2603,13 @@ function () {
2328
2603
  _a.machine;
2329
2604
  var jsonValues = __rest(_a, ["configuration", "transitions", "tags", "machine"]);
2330
2605
 
2331
- return __assign(__assign({}, jsonValues), {
2606
+ return _tslib_assign(_tslib_assign({}, jsonValues), {
2332
2607
  tags: Array.from(tags)
2333
2608
  });
2334
2609
  };
2335
2610
 
2336
2611
  State.prototype.matches = function (parentStateValue) {
2337
- return matchesState(parentStateValue, this.value);
2612
+ return utils_matchesState(parentStateValue, this.value);
2338
2613
  };
2339
2614
  /**
2340
2615
  * Whether the current state configuration has a state node with the specified `tag`.
@@ -2358,8 +2633,8 @@ function () {
2358
2633
  State.prototype.can = function (event) {
2359
2634
  var _a;
2360
2635
 
2361
- if (IS_PRODUCTION) {
2362
- warn(!!this.machine, "state.can(...) used outside of a machine-created State object; this will always return false.");
2636
+ if (environment_IS_PRODUCTION) {
2637
+ utils_warn(!!this.machine, "state.can(...) used outside of a machine-created State object; this will always return false.");
2363
2638
  }
2364
2639
 
2365
2640
  var transitionData = (_a = this.machine) === null || _a === void 0 ? void 0 : _a.getTransitionData(this, event);
@@ -2390,7 +2665,7 @@ function () {
2390
2665
  this.processingEvent = false;
2391
2666
  this.queue = [];
2392
2667
  this.initialized = false;
2393
- this.options = __assign(__assign({}, defaultOptions), options);
2668
+ this.options = _tslib_assign(_tslib_assign({}, defaultOptions), options);
2394
2669
  }
2395
2670
 
2396
2671
  Scheduler.prototype.initialize = function (callback) {
@@ -2496,7 +2771,7 @@ function getGlobal() {
2496
2771
  return __webpack_require__.g;
2497
2772
  }
2498
2773
 
2499
- if (!IS_PRODUCTION) {
2774
+ if (!environment_IS_PRODUCTION) {
2500
2775
  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');
2501
2776
  }
2502
2777
  }
@@ -2746,8 +3021,8 @@ function () {
2746
3021
 
2747
3022
  if (_this.status === InterpreterStatus.Stopped) {
2748
3023
  // do nothing
2749
- if (!IS_PRODUCTION) {
2750
- 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)));
3024
+ if (!environment_IS_PRODUCTION) {
3025
+ 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)));
2751
3026
  }
2752
3027
 
2753
3028
  return _this.state;
@@ -2772,8 +3047,8 @@ function () {
2772
3047
  };
2773
3048
 
2774
3049
  this.sendTo = function (event, to, immediate) {
2775
- var isParent = _this.parent && (to === SpecialTargets.Parent || _this.parent.id === to);
2776
- var target = isParent ? _this.parent : isString(to) ? to === SpecialTargets.Internal ? _this : _this.children.get(to) || registry.get(to) : isActor(to) ? to : undefined;
3050
+ var isParent = _this.parent && (to === types_SpecialTargets.Parent || _this.parent.id === to);
3051
+ var target = isParent ? _this.parent : utils_isString(to) ? to === types_SpecialTargets.Internal ? _this : _this.children.get(to) || registry.get(to) : isActor(to) ? to : undefined;
2777
3052
 
2778
3053
  if (!target) {
2779
3054
  if (!isParent) {
@@ -2781,8 +3056,8 @@ function () {
2781
3056
  } // tslint:disable-next-line:no-console
2782
3057
 
2783
3058
 
2784
- if (!IS_PRODUCTION) {
2785
- warn(false, "Service '".concat(_this.id, "' has no parent: unable to send event ").concat(event.type));
3059
+ if (!environment_IS_PRODUCTION) {
3060
+ utils_warn(false, "Service '".concat(_this.id, "' has no parent: unable to send event ").concat(event.type));
2786
3061
  }
2787
3062
 
2788
3063
  return;
@@ -2794,7 +3069,7 @@ function () {
2794
3069
  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
2795
3070
  _this.state.done) {
2796
3071
  // Send SCXML events to machines
2797
- var scxmlEvent = __assign(__assign({}, event), {
3072
+ var scxmlEvent = _tslib_assign(_tslib_assign({}, event), {
2798
3073
  name: event.name === actionTypes_error ? "".concat(actions_error(_this.id)) : event.name,
2799
3074
  origin: _this.sessionId
2800
3075
  });
@@ -2821,7 +3096,7 @@ function () {
2821
3096
  }
2822
3097
 
2823
3098
  var actionOrExec = action.exec || getActionFunction(action.type, actionFunctionMap);
2824
- var exec = isFunction(actionOrExec) ? actionOrExec : actionOrExec ? actionOrExec.exec : action.exec;
3099
+ var exec = utils_isFunction(actionOrExec) ? actionOrExec : actionOrExec ? actionOrExec.exec : action.exec;
2825
3100
 
2826
3101
  if (exec) {
2827
3102
  try {
@@ -2894,14 +3169,14 @@ function () {
2894
3169
  } // Invoked services
2895
3170
 
2896
3171
 
2897
- if (activity.type === ActionTypes.Invoke) {
3172
+ if (activity.type === types_ActionTypes.Invoke) {
2898
3173
  var invokeSource = toInvokeSource(activity.src);
2899
3174
  var serviceCreator = _this.machine.options.services ? _this.machine.options.services[invokeSource.type] : undefined;
2900
3175
  var id = activity.id,
2901
3176
  data = activity.data;
2902
3177
 
2903
- if (!IS_PRODUCTION) {
2904
- warn(!('forward' in activity), // tslint:disable-next-line:max-line-length
3178
+ if (!environment_IS_PRODUCTION) {
3179
+ utils_warn(!('forward' in activity), // tslint:disable-next-line:max-line-length
2905
3180
  "`forward` property is deprecated (found in invocation of '".concat(activity.src, "' in in machine '").concat(_this.machine.id, "'). ") + "Please use `autoForward` instead.");
2906
3181
  }
2907
3182
 
@@ -2909,8 +3184,8 @@ function () {
2909
3184
 
2910
3185
  if (!serviceCreator) {
2911
3186
  // tslint:disable-next-line:no-console
2912
- if (!IS_PRODUCTION) {
2913
- warn(false, "No service found for invocation '".concat(activity.src, "' in machine '").concat(_this.machine.id, "'."));
3187
+ if (!environment_IS_PRODUCTION) {
3188
+ utils_warn(false, "No service found for invocation '".concat(activity.src, "' in machine '").concat(_this.machine.id, "'."));
2914
3189
  }
2915
3190
 
2916
3191
  return;
@@ -2923,7 +3198,7 @@ function () {
2923
3198
  return;
2924
3199
  }
2925
3200
 
2926
- var source = isFunction(serviceCreator) ? serviceCreator(context, _event.data, {
3201
+ var source = utils_isFunction(serviceCreator) ? serviceCreator(context, _event.data, {
2927
3202
  data: resolvedData,
2928
3203
  src: invokeSource,
2929
3204
  meta: activity.meta
@@ -2936,7 +3211,7 @@ function () {
2936
3211
 
2937
3212
  var options = void 0;
2938
3213
 
2939
- if (isMachine(source)) {
3214
+ if (utils_isMachine(source)) {
2940
3215
  source = resolvedData ? source.withContext(resolvedData) : source;
2941
3216
  options = {
2942
3217
  autoForward: autoForward
@@ -2972,15 +3247,15 @@ function () {
2972
3247
  break;
2973
3248
 
2974
3249
  default:
2975
- if (!IS_PRODUCTION) {
2976
- warn(false, "No implementation found for action type '".concat(action.type, "'"));
3250
+ if (!environment_IS_PRODUCTION) {
3251
+ utils_warn(false, "No implementation found for action type '".concat(action.type, "'"));
2977
3252
  }
2978
3253
 
2979
3254
  break;
2980
3255
  }
2981
3256
  };
2982
3257
 
2983
- var resolvedOptions = __assign(__assign({}, Interpreter.defaultOptions), options);
3258
+ var resolvedOptions = _tslib_assign(_tslib_assign({}, Interpreter.defaultOptions), options);
2984
3259
 
2985
3260
  var clock = resolvedOptions.clock,
2986
3261
  logger = resolvedOptions.logger,
@@ -3019,8 +3294,8 @@ function () {
3019
3294
  * @deprecated Use `.getSnapshot()` instead.
3020
3295
  */
3021
3296
  get: function () {
3022
- if (!IS_PRODUCTION) {
3023
- warn(this.status !== InterpreterStatus.NotStarted, "Attempted to read state from uninitialized service '".concat(this.id, "'. Make sure the service is started first."));
3297
+ if (!environment_IS_PRODUCTION) {
3298
+ utils_warn(this.status !== InterpreterStatus.NotStarted, "Attempted to read state from uninitialized service '".concat(this.id, "'. Make sure the service is started first."));
3024
3299
  }
3025
3300
 
3026
3301
  return this._state;
@@ -3321,7 +3596,7 @@ function () {
3321
3596
  this.initialized = true;
3322
3597
  this.status = InterpreterStatus.Running;
3323
3598
  var resolvedState = initialState === undefined ? this.initialState : provide(this, function () {
3324
- return isStateConfig(initialState) ? _this.machine.resolveState(initialState) : _this.machine.resolveState(State.from(initialState, _this.machine.context));
3599
+ return isStateConfig(initialState) ? _this.machine.resolveState(initialState) : _this.machine.resolveState(State_State.from(initialState, _this.machine.context));
3325
3600
  });
3326
3601
 
3327
3602
  if (this.options.devTools) {
@@ -3337,7 +3612,7 @@ function () {
3337
3612
  Interpreter.prototype._stopChildren = function () {
3338
3613
  // TODO: think about converting those to actions
3339
3614
  this.children.forEach(function (child) {
3340
- if (isFunction(child.stop)) {
3615
+ if (utils_isFunction(child.stop)) {
3341
3616
  child.stop();
3342
3617
  }
3343
3618
  });
@@ -3475,20 +3750,20 @@ function () {
3475
3750
  });
3476
3751
 
3477
3752
  var nextState = provide(_this, function () {
3478
- var exitActions = flatten(__spreadArray([], __read(_this.state.configuration), false).sort(function (a, b) {
3753
+ var exitActions = flatten(_tslib_spreadArray([], _tslib_read(_this.state.configuration), false).sort(function (a, b) {
3479
3754
  return b.order - a.order;
3480
3755
  }).map(function (stateNode) {
3481
3756
  return toActionObjects(stateNode.onExit, _this.machine.options.actions);
3482
3757
  }));
3483
3758
 
3484
- var _a = __read(resolveActions(_this.machine, _this.state, _this.state.context, _event, [{
3759
+ var _a = _tslib_read(resolveActions(_this.machine, _this.state, _this.state.context, _event, [{
3485
3760
  type: 'exit',
3486
3761
  actions: exitActions
3487
3762
  }], _this.machine.config.predictableActionArguments ? _this._exec : undefined, _this.machine.config.predictableActionArguments || _this.machine.config.preserveActionOrder), 2),
3488
3763
  resolvedActions = _a[0],
3489
3764
  updatedContext = _a[1];
3490
3765
 
3491
- var newState = new State({
3766
+ var newState = new State_State({
3492
3767
  value: _this.state.value,
3493
3768
  context: updatedContext,
3494
3769
  _event: _event,
@@ -3525,8 +3800,8 @@ function () {
3525
3800
 
3526
3801
  if (this.status === InterpreterStatus.NotStarted && this.options.deferEvents) {
3527
3802
  // tslint:disable-next-line:no-console
3528
- if (!IS_PRODUCTION) {
3529
- 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)));
3803
+ if (!environment_IS_PRODUCTION) {
3804
+ 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)));
3530
3805
  }
3531
3806
  } else if (this.status !== InterpreterStatus.Running) {
3532
3807
  throw new Error( // tslint:disable-next-line:max-line-length
@@ -3553,7 +3828,7 @@ function () {
3553
3828
  nextState = provide(_this, function () {
3554
3829
  return _this.machine.transition(nextState, _event, undefined, exec || undefined);
3555
3830
  });
3556
- batchedActions.push.apply(batchedActions, __spreadArray([], __read(_this.machine.config.predictableActionArguments ? nextState.actions : nextState.actions.map(function (a) {
3831
+ batchedActions.push.apply(batchedActions, _tslib_spreadArray([], _tslib_read(_this.machine.config.predictableActionArguments ? nextState.actions : nextState.actions.map(function (a) {
3557
3832
  return bindActionToState(a, nextState);
3558
3833
  })), false));
3559
3834
  batchChanged = batchChanged || !!nextState.changed;
@@ -3702,26 +3977,26 @@ function () {
3702
3977
 
3703
3978
  this.removeChild(childId);
3704
3979
 
3705
- if (isFunction(child.stop)) {
3980
+ if (utils_isFunction(child.stop)) {
3706
3981
  child.stop();
3707
3982
  }
3708
3983
  };
3709
3984
 
3710
3985
  Interpreter.prototype.spawn = function (entity, name, options) {
3711
3986
  if (this.status !== InterpreterStatus.Running) {
3712
- return createDeferredActor(entity, name);
3987
+ return Actor_createDeferredActor(entity, name);
3713
3988
  }
3714
3989
 
3715
3990
  if (isPromiseLike(entity)) {
3716
3991
  return this.spawnPromise(Promise.resolve(entity), name);
3717
- } else if (isFunction(entity)) {
3992
+ } else if (utils_isFunction(entity)) {
3718
3993
  return this.spawnCallback(entity, name);
3719
3994
  } else if (isSpawnedActor(entity)) {
3720
3995
  return this.spawnActor(entity, name);
3721
3996
  } else if (isObservable(entity)) {
3722
3997
  return this.spawnObservable(entity, name);
3723
- } else if (isMachine(entity)) {
3724
- return this.spawnMachine(entity, __assign(__assign({}, options), {
3998
+ } else if (utils_isMachine(entity)) {
3999
+ return this.spawnMachine(entity, _tslib_assign(_tslib_assign({}, options), {
3725
4000
  id: name
3726
4001
  }));
3727
4002
  } else if (isBehavior(entity)) {
@@ -3738,16 +4013,16 @@ function () {
3738
4013
  options = {};
3739
4014
  }
3740
4015
 
3741
- var childService = new Interpreter(machine, __assign(__assign({}, this.options), {
4016
+ var childService = new Interpreter(machine, _tslib_assign(_tslib_assign({}, this.options), {
3742
4017
  parent: this,
3743
4018
  id: options.id || machine.id
3744
4019
  }));
3745
4020
 
3746
- var resolvedOptions = __assign(__assign({}, DEFAULT_SPAWN_OPTIONS), options);
4021
+ var resolvedOptions = _tslib_assign(_tslib_assign({}, DEFAULT_SPAWN_OPTIONS), options);
3747
4022
 
3748
4023
  if (resolvedOptions.sync) {
3749
4024
  childService.onTransition(function (state) {
3750
- _this.send(update, {
4025
+ _this.send(actionTypes_update, {
3751
4026
  state: state,
3752
4027
  id: childService.id
3753
4028
  });
@@ -3936,7 +4211,7 @@ function () {
3936
4211
  stop: function () {
3937
4212
  canceled = true;
3938
4213
 
3939
- if (isFunction(callbackStop)) {
4214
+ if (utils_isFunction(callbackStop)) {
3940
4215
  callbackStop();
3941
4216
  }
3942
4217
  },
@@ -4015,8 +4290,8 @@ function () {
4015
4290
  var implementation = this.machine.options && this.machine.options.activities ? this.machine.options.activities[activity.type] : undefined;
4016
4291
 
4017
4292
  if (!implementation) {
4018
- if (!IS_PRODUCTION) {
4019
- warn(false, "No implementation found for activity '".concat(activity.type, "'"));
4293
+ if (!environment_IS_PRODUCTION) {
4294
+ utils_warn(false, "No implementation found for activity '".concat(activity.type, "'"));
4020
4295
  } // tslint:disable-next-line:no-console
4021
4296
 
4022
4297
 
@@ -4063,7 +4338,7 @@ function () {
4063
4338
  if (this.options.devTools && global) {
4064
4339
  if (global.__REDUX_DEVTOOLS_EXTENSION__) {
4065
4340
  var devToolsOptions = typeof this.options.devTools === 'object' ? this.options.devTools : undefined;
4066
- this.devTools = global.__REDUX_DEVTOOLS_EXTENSION__.connect(__assign(__assign({
4341
+ this.devTools = global.__REDUX_DEVTOOLS_EXTENSION__.connect(_tslib_assign(_tslib_assign({
4067
4342
  name: this.id,
4068
4343
  autoPause: true,
4069
4344
  stateSanitizer: function (state) {
@@ -4074,7 +4349,7 @@ function () {
4074
4349
  };
4075
4350
  }
4076
4351
  }, devToolsOptions), {
4077
- features: __assign({
4352
+ features: _tslib_assign({
4078
4353
  jump: false,
4079
4354
  skip: false
4080
4355
  }, devToolsOptions ? devToolsOptions.features : undefined)
@@ -4195,7 +4470,7 @@ function invokeUtils_toInvokeSource(src) {
4195
4470
  return src;
4196
4471
  }
4197
4472
  function toInvokeDefinition(invokeConfig) {
4198
- return __assign(__assign({
4473
+ return _tslib_assign(_tslib_assign({
4199
4474
  type: invoke
4200
4475
  }, invokeConfig), {
4201
4476
  toJSON: function () {
@@ -4203,7 +4478,7 @@ function toInvokeDefinition(invokeConfig) {
4203
4478
  invokeConfig.onError;
4204
4479
  var invokeDef = __rest(invokeConfig, ["onDone", "onError"]);
4205
4480
 
4206
- return __assign(__assign({}, invokeDef), {
4481
+ return _tslib_assign(_tslib_assign({}, invokeDef), {
4207
4482
  type: invoke,
4208
4483
  src: invokeUtils_toInvokeSource(invokeConfig.src)
4209
4484
  });
@@ -4246,13 +4521,13 @@ var createDefaultOptions = function () {
4246
4521
 
4247
4522
  var validateArrayifiedTransitions = function (stateNode, event, transitions) {
4248
4523
  var hasNonLastUnguardedTarget = transitions.slice(0, -1).some(function (transition) {
4249
- return !('cond' in transition) && !('in' in transition) && (isString(transition.target) || isMachine(transition.target));
4524
+ return !('cond' in transition) && !('in' in transition) && (utils_isString(transition.target) || utils_isMachine(transition.target));
4250
4525
  });
4251
4526
  var eventText = event === NULL_EVENT ? 'the transient event' : "event '".concat(event, "'");
4252
- 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.");
4527
+ 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.");
4253
4528
  };
4254
4529
 
4255
- var StateNode =
4530
+ var StateNode_StateNode =
4256
4531
  /*#__PURE__*/
4257
4532
 
4258
4533
  /** @class */
@@ -4301,14 +4576,14 @@ function () {
4301
4576
  this.machine = this.parent ? this.parent.machine : this;
4302
4577
  this.path = this.parent ? this.parent.path.concat(this.key) : [];
4303
4578
  this.delimiter = this.config.delimiter || (this.parent ? this.parent.delimiter : STATE_DELIMITER);
4304
- this.id = this.config.id || __spreadArray([this.machine.key], __read(this.path), false).join(this.delimiter);
4579
+ this.id = this.config.id || _tslib_spreadArray([this.machine.key], _tslib_read(this.path), false).join(this.delimiter);
4305
4580
  this.version = this.parent ? this.parent.version : this.config.version;
4306
4581
  this.type = this.config.type || (this.config.parallel ? 'parallel' : this.config.states && Object.keys(this.config.states).length ? 'compound' : this.config.history ? 'history' : 'atomic');
4307
4582
  this.schema = this.parent ? this.machine.schema : (_a = this.config.schema) !== null && _a !== void 0 ? _a : {};
4308
4583
  this.description = this.config.description;
4309
4584
 
4310
- if (!IS_PRODUCTION) {
4311
- 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."));
4585
+ if (!environment_IS_PRODUCTION) {
4586
+ 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."));
4312
4587
  }
4313
4588
 
4314
4589
  this.initial = this.config.initial;
@@ -4319,7 +4594,7 @@ function () {
4319
4594
  parent: _this,
4320
4595
  key: key
4321
4596
  });
4322
- Object.assign(_this.idMap, __assign((_a = {}, _a[stateNode.id] = stateNode, _a), stateNode.idMap));
4597
+ Object.assign(_this.idMap, _tslib_assign((_a = {}, _a[stateNode.id] = stateNode, _a), stateNode.idMap));
4323
4598
  return stateNode;
4324
4599
  }) : EMPTY_OBJECT; // Document order
4325
4600
 
@@ -4369,30 +4644,30 @@ function () {
4369
4644
  this.invoke = toArray(this.config.invoke).map(function (invokeConfig, i) {
4370
4645
  var _a, _b;
4371
4646
 
4372
- if (isMachine(invokeConfig)) {
4647
+ if (utils_isMachine(invokeConfig)) {
4373
4648
  var invokeId = createInvokeId(_this.id, i);
4374
- _this.machine.options.services = __assign((_a = {}, _a[invokeId] = invokeConfig, _a), _this.machine.options.services);
4649
+ _this.machine.options.services = _tslib_assign((_a = {}, _a[invokeId] = invokeConfig, _a), _this.machine.options.services);
4375
4650
  return toInvokeDefinition({
4376
4651
  src: invokeId,
4377
4652
  id: invokeId
4378
4653
  });
4379
- } else if (isString(invokeConfig.src)) {
4654
+ } else if (utils_isString(invokeConfig.src)) {
4380
4655
  var invokeId = invokeConfig.id || createInvokeId(_this.id, i);
4381
- return toInvokeDefinition(__assign(__assign({}, invokeConfig), {
4656
+ return toInvokeDefinition(_tslib_assign(_tslib_assign({}, invokeConfig), {
4382
4657
  id: invokeId,
4383
4658
  src: invokeConfig.src
4384
4659
  }));
4385
- } else if (isMachine(invokeConfig.src) || isFunction(invokeConfig.src)) {
4660
+ } else if (utils_isMachine(invokeConfig.src) || utils_isFunction(invokeConfig.src)) {
4386
4661
  var invokeId = invokeConfig.id || createInvokeId(_this.id, i);
4387
- _this.machine.options.services = __assign((_b = {}, _b[invokeId] = invokeConfig.src, _b), _this.machine.options.services);
4388
- return toInvokeDefinition(__assign(__assign({
4662
+ _this.machine.options.services = _tslib_assign((_b = {}, _b[invokeId] = invokeConfig.src, _b), _this.machine.options.services);
4663
+ return toInvokeDefinition(_tslib_assign(_tslib_assign({
4389
4664
  id: invokeId
4390
4665
  }, invokeConfig), {
4391
4666
  src: invokeId
4392
4667
  }));
4393
4668
  } else {
4394
4669
  var invokeSource = invokeConfig.src;
4395
- return toInvokeDefinition(__assign(__assign({
4670
+ return toInvokeDefinition(_tslib_assign(_tslib_assign({
4396
4671
  id: createInvokeId(_this.id, i)
4397
4672
  }, invokeConfig), {
4398
4673
  src: invokeSource
@@ -4435,11 +4710,11 @@ function () {
4435
4710
  services = _a.services,
4436
4711
  delays = _a.delays;
4437
4712
  return new StateNode(this.config, {
4438
- actions: __assign(__assign({}, actions), options.actions),
4439
- activities: __assign(__assign({}, activities), options.activities),
4440
- guards: __assign(__assign({}, guards), options.guards),
4441
- services: __assign(__assign({}, services), options.services),
4442
- delays: __assign(__assign({}, delays), options.delays)
4713
+ actions: _tslib_assign(_tslib_assign({}, actions), options.actions),
4714
+ activities: _tslib_assign(_tslib_assign({}, activities), options.activities),
4715
+ guards: _tslib_assign(_tslib_assign({}, guards), options.guards),
4716
+ services: _tslib_assign(_tslib_assign({}, services), options.services),
4717
+ delays: _tslib_assign(_tslib_assign({}, delays), options.delays)
4443
4718
  }, context !== null && context !== void 0 ? context : this.context);
4444
4719
  };
4445
4720
  /**
@@ -4455,7 +4730,7 @@ function () {
4455
4730
 
4456
4731
  Object.defineProperty(StateNode.prototype, "context", {
4457
4732
  get: function () {
4458
- return isFunction(this._context) ? this._context() : this._context;
4733
+ return utils_isFunction(this._context) ? this._context() : this._context;
4459
4734
  },
4460
4735
  enumerable: false,
4461
4736
  configurable: true
@@ -4563,7 +4838,7 @@ function () {
4563
4838
  }
4564
4839
 
4565
4840
  var mutateEntryExit = function (delay, i) {
4566
- var delayRef = isFunction(delay) ? "".concat(_this.id, ":delay[").concat(i, "]") : delay;
4841
+ var delayRef = utils_isFunction(delay) ? "".concat(_this.id, ":delay[").concat(i, "]") : delay;
4567
4842
  var eventType = actions_after(delayRef, _this.id);
4568
4843
 
4569
4844
  _this.onEntry.push(actions_send(eventType, {
@@ -4577,18 +4852,18 @@ function () {
4577
4852
 
4578
4853
  var delayedTransitions = isArray(afterConfig) ? afterConfig.map(function (transition, i) {
4579
4854
  var eventType = mutateEntryExit(transition.delay, i);
4580
- return __assign(__assign({}, transition), {
4855
+ return _tslib_assign(_tslib_assign({}, transition), {
4581
4856
  event: eventType
4582
4857
  });
4583
4858
  }) : flatten(Object.keys(afterConfig).map(function (delay, i) {
4584
4859
  var configTransition = afterConfig[delay];
4585
- var resolvedTransition = isString(configTransition) ? {
4860
+ var resolvedTransition = utils_isString(configTransition) ? {
4586
4861
  target: configTransition
4587
4862
  } : configTransition;
4588
4863
  var resolvedDelay = !isNaN(+delay) ? +delay : delay;
4589
4864
  var eventType = mutateEntryExit(resolvedDelay, i);
4590
4865
  return toArray(resolvedTransition).map(function (transition) {
4591
- return __assign(__assign({}, transition), {
4866
+ return _tslib_assign(_tslib_assign({}, transition), {
4592
4867
  event: eventType,
4593
4868
  delay: resolvedDelay
4594
4869
  });
@@ -4596,7 +4871,7 @@ function () {
4596
4871
  }));
4597
4872
  return delayedTransitions.map(function (delayedTransition) {
4598
4873
  var delay = delayedTransition.delay;
4599
- return __assign(__assign({}, _this.formatTransition(delayedTransition)), {
4874
+ return _tslib_assign(_tslib_assign({}, _this.formatTransition(delayedTransition)), {
4600
4875
  delay: delay
4601
4876
  });
4602
4877
  });
@@ -4617,16 +4892,16 @@ function () {
4617
4892
  return [];
4618
4893
  }
4619
4894
 
4620
- var stateValue = state instanceof State ? state.value : toStateValue(state, this.delimiter);
4895
+ var stateValue = state instanceof State_State ? state.value : toStateValue(state, this.delimiter);
4621
4896
 
4622
- if (isString(stateValue)) {
4897
+ if (utils_isString(stateValue)) {
4623
4898
  var initialStateValue = this.getStateNode(stateValue).initial;
4624
4899
  return initialStateValue !== undefined ? this.getStateNodes((_a = {}, _a[stateValue] = initialStateValue, _a)) : [this, this.states[stateValue]];
4625
4900
  }
4626
4901
 
4627
4902
  var subStateKeys = Object.keys(stateValue);
4628
4903
  var subStateNodes = [this];
4629
- subStateNodes.push.apply(subStateNodes, __spreadArray([], __read(flatten(subStateKeys.map(function (subStateKey) {
4904
+ subStateNodes.push.apply(subStateNodes, _tslib_spreadArray([], _tslib_read(flatten(subStateKeys.map(function (subStateKey) {
4630
4905
  return _this.getStateNode(subStateKey).getStateNodes(stateValue[subStateKey]);
4631
4906
  }))), false));
4632
4907
  return subStateNodes;
@@ -4652,9 +4927,9 @@ function () {
4652
4927
 
4653
4928
 
4654
4929
  StateNode.prototype.resolveState = function (state) {
4655
- var stateFromConfig = state instanceof State ? state : State.create(state);
4930
+ var stateFromConfig = state instanceof State_State ? state : State_State.create(state);
4656
4931
  var configuration = Array.from(getConfiguration([], this.getStateNodes(stateFromConfig.value)));
4657
- return new State(__assign(__assign({}, stateFromConfig), {
4932
+ return new State_State(_tslib_assign(_tslib_assign({}, stateFromConfig), {
4658
4933
  value: this.resolve(stateFromConfig.value),
4659
4934
  configuration: configuration,
4660
4935
  done: isInFinalState(configuration, this),
@@ -4753,7 +5028,7 @@ function () {
4753
5028
 
4754
5029
  StateNode.prototype._transition = function (stateValue, state, _event) {
4755
5030
  // leaf node
4756
- if (isString(stateValue)) {
5031
+ if (utils_isString(stateValue)) {
4757
5032
  return this.transitionLeafNode(stateValue, state, _event);
4758
5033
  } // hierarchical node
4759
5034
 
@@ -4786,9 +5061,9 @@ function () {
4786
5061
  var cond = candidate.cond,
4787
5062
  stateIn = candidate.in;
4788
5063
  var resolvedContext = state.context;
4789
- var isInState = stateIn ? isString(stateIn) && isStateId(stateIn) ? // Check if in state by ID
5064
+ var isInState = stateIn ? utils_isString(stateIn) && isStateId(stateIn) ? // Check if in state by ID
4790
5065
  state.matches(toStateValue(this.getStateNodeById(stateIn).path, this.delimiter)) : // Check if in state by relative grandparent
4791
- matchesState(toStateValue(stateIn, this.delimiter), path(this.path.slice(0, -2))(state.value)) : true;
5066
+ utils_matchesState(toStateValue(stateIn, this.delimiter), path(this.path.slice(0, -2))(state.value)) : true;
4792
5067
  var guardPassed = false;
4793
5068
 
4794
5069
  try {
@@ -4802,7 +5077,7 @@ function () {
4802
5077
  nextStateNodes = candidate.target;
4803
5078
  }
4804
5079
 
4805
- actions.push.apply(actions, __spreadArray([], __read(candidate.actions), false));
5080
+ actions.push.apply(actions, _tslib_spreadArray([], _tslib_read(candidate.actions), false));
4806
5081
  selectedTransition = candidate;
4807
5082
  break;
4808
5083
  }
@@ -4966,7 +5241,7 @@ function () {
4966
5241
  });
4967
5242
  return {
4968
5243
  type: 'entry',
4969
- actions: toActionObjects(predictableExec ? __spreadArray(__spreadArray([], __read(entryActions), false), __read(invokeActions), false) : __spreadArray(__spreadArray([], __read(invokeActions), false), __read(entryActions), false), _this.machine.options.actions)
5244
+ 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)
4970
5245
  };
4971
5246
  }).concat({
4972
5247
  type: 'state_done',
@@ -4977,7 +5252,7 @@ function () {
4977
5252
  var exitActions = Array.from(exitStates).map(function (stateNode) {
4978
5253
  return {
4979
5254
  type: 'exit',
4980
- actions: toActionObjects(__spreadArray(__spreadArray([], __read(stateNode.onExit), false), __read(stateNode.activities.map(function (activity) {
5255
+ actions: toActionObjects(_tslib_spreadArray(_tslib_spreadArray([], _tslib_read(stateNode.onExit), false), _tslib_read(stateNode.activities.map(function (activity) {
4981
5256
  return actions_stop(activity);
4982
5257
  })), false), _this.machine.options.actions)
4983
5258
  };
@@ -4988,7 +5263,7 @@ function () {
4988
5263
  }).concat(entryActions);
4989
5264
 
4990
5265
  if (isDone) {
4991
- var stopActions = toActionObjects(flatten(__spreadArray([], __read(resolvedConfig), false).sort(function (a, b) {
5266
+ var stopActions = toActionObjects(flatten(_tslib_spreadArray([], _tslib_read(resolvedConfig), false).sort(function (a, b) {
4992
5267
  return b.order - a.order;
4993
5268
  }).map(function (stateNode) {
4994
5269
  return stateNode.onExit;
@@ -5021,15 +5296,15 @@ function () {
5021
5296
 
5022
5297
  var currentState;
5023
5298
 
5024
- if (state instanceof State) {
5025
- currentState = context === undefined ? state : this.resolveState(State.from(state, context));
5299
+ if (state instanceof State_State) {
5300
+ currentState = context === undefined ? state : this.resolveState(State_State.from(state, context));
5026
5301
  } else {
5027
- var resolvedStateValue = isString(state) ? this.resolve(pathToStateValue(this.getResolvedPath(state))) : this.resolve(state);
5302
+ var resolvedStateValue = utils_isString(state) ? this.resolve(pathToStateValue(this.getResolvedPath(state))) : this.resolve(state);
5028
5303
  var resolvedContext = context !== null && context !== void 0 ? context : this.machine.context;
5029
- currentState = this.resolveState(State.from(resolvedStateValue, resolvedContext));
5304
+ currentState = this.resolveState(State_State.from(resolvedStateValue, resolvedContext));
5030
5305
  }
5031
5306
 
5032
- if (!IS_PRODUCTION && _event.name === WILDCARD) {
5307
+ if (!environment_IS_PRODUCTION && _event.name === WILDCARD) {
5033
5308
  throw new Error("An event cannot have the wildcard type ('".concat(WILDCARD, "')"));
5034
5309
  }
5035
5310
 
@@ -5048,7 +5323,7 @@ function () {
5048
5323
  };
5049
5324
  var prevConfig = getConfiguration([], this.getStateNodes(currentState.value));
5050
5325
  var resolvedConfig = stateTransition.configuration.length ? getConfiguration(prevConfig, stateTransition.configuration) : prevConfig;
5051
- stateTransition.configuration = __spreadArray([], __read(resolvedConfig), false);
5326
+ stateTransition.configuration = _tslib_spreadArray([], _tslib_read(resolvedConfig), false);
5052
5327
  return this.resolveTransition(stateTransition, currentState, currentState.context, exec, _event);
5053
5328
  };
5054
5329
 
@@ -5062,7 +5337,7 @@ function () {
5062
5337
  state._event = originalEvent;
5063
5338
  state.event = originalEvent.data;
5064
5339
 
5065
- (_a = state.actions).unshift.apply(_a, __spreadArray([], __read(currentActions), false));
5340
+ (_a = state.actions).unshift.apply(_a, _tslib_spreadArray([], _tslib_read(currentActions), false));
5066
5341
 
5067
5342
  return state;
5068
5343
  };
@@ -5086,7 +5361,7 @@ function () {
5086
5361
  var resolvedStateValue = willTransition ? getValue(this.machine, configuration) : undefined;
5087
5362
  var historyValue = currentState ? currentState.historyValue ? currentState.historyValue : stateTransition.source ? this.machine.historyValue(currentState.value) : undefined : undefined;
5088
5363
  var actionBlocks = this.getActions(new Set(resolvedConfiguration), isDone, stateTransition, context, _event, currentState, predictableExec);
5089
- var activities = currentState ? __assign({}, currentState.activities) : {};
5364
+ var activities = currentState ? _tslib_assign({}, currentState.activities) : {};
5090
5365
 
5091
5366
  try {
5092
5367
  for (var actionBlocks_1 = _tslib_values(actionBlocks), actionBlocks_1_1 = actionBlocks_1.next(); !actionBlocks_1_1.done; actionBlocks_1_1 = actionBlocks_1.next()) {
@@ -5126,11 +5401,11 @@ function () {
5126
5401
  }
5127
5402
  }
5128
5403
 
5129
- var _e = __read(resolveActions(this, currentState, context, _event, actionBlocks, predictableExec, this.machine.config.predictableActionArguments || this.machine.config.preserveActionOrder), 2),
5404
+ var _e = _tslib_read(resolveActions(this, currentState, context, _event, actionBlocks, predictableExec, this.machine.config.predictableActionArguments || this.machine.config.preserveActionOrder), 2),
5130
5405
  resolvedActions = _e[0],
5131
5406
  updatedContext = _e[1];
5132
5407
 
5133
- var _f = __read(partition(resolvedActions, isRaisableAction), 2),
5408
+ var _f = _tslib_read(partition(resolvedActions, isRaisableAction), 2),
5134
5409
  raisedEvents = _f[0],
5135
5410
  nonRaisedActions = _f[1];
5136
5411
 
@@ -5142,8 +5417,8 @@ function () {
5142
5417
  var children = invokeActions.reduce(function (acc, action) {
5143
5418
  acc[action.activity.id] = createInvocableActor(action.activity, _this.machine, updatedContext, _event);
5144
5419
  return acc;
5145
- }, currentState ? __assign({}, currentState.children) : {});
5146
- var nextState = new State({
5420
+ }, currentState ? _tslib_assign({}, currentState.children) : {});
5421
+ var nextState = new State_State({
5147
5422
  value: resolvedStateValue || currentState.value,
5148
5423
  context: updatedContext,
5149
5424
  _event: _event,
@@ -5162,7 +5437,7 @@ function () {
5162
5437
  machine: this
5163
5438
  });
5164
5439
  var didUpdateContext = context !== updatedContext;
5165
- nextState.changed = _event.name === update || didUpdateContext; // Dispose of penultimate histories to prevent memory leaks
5440
+ nextState.changed = _event.name === actionTypes_update || didUpdateContext; // Dispose of penultimate histories to prevent memory leaks
5166
5441
 
5167
5442
  var history = nextState.history;
5168
5443
 
@@ -5307,7 +5582,7 @@ function () {
5307
5582
  });
5308
5583
 
5309
5584
  case 'compound':
5310
- if (isString(stateValue)) {
5585
+ if (utils_isString(stateValue)) {
5311
5586
  var subStateNode = this.getStateNode(stateValue);
5312
5587
 
5313
5588
  if (subStateNode.type === 'parallel' || subStateNode.type === 'compound') {
@@ -5420,7 +5695,7 @@ function () {
5420
5695
  if (this.type === 'history') {
5421
5696
  var historyConfig = this.config;
5422
5697
 
5423
- if (isString(historyConfig.target)) {
5698
+ if (utils_isString(historyConfig.target)) {
5424
5699
  target = isStateId(historyConfig.target) ? pathToStateValue(this.machine.getStateNodeById(historyConfig.target).path.slice(this.path.length - 1)) : historyConfig.target;
5425
5700
  } else {
5426
5701
  target = historyConfig.target;
@@ -5458,8 +5733,8 @@ function () {
5458
5733
 
5459
5734
 
5460
5735
  if (this.type === 'compound' && !this.initial) {
5461
- if (!IS_PRODUCTION) {
5462
- warn(false, "Compound state node '".concat(this.id, "' has no initial state."));
5736
+ if (!environment_IS_PRODUCTION) {
5737
+ utils_warn(false, "Compound state node '".concat(this.id, "' has no initial state."));
5463
5738
  }
5464
5739
 
5465
5740
  return [this];
@@ -5485,7 +5760,7 @@ function () {
5485
5760
  return [this];
5486
5761
  }
5487
5762
 
5488
- var _a = __read(relativePath),
5763
+ var _a = _tslib_read(relativePath),
5489
5764
  stateKey = _a[0],
5490
5765
  childStatePath = _a.slice(1);
5491
5766
 
@@ -5518,7 +5793,7 @@ function () {
5518
5793
  return stateNode.historyValue();
5519
5794
  }
5520
5795
 
5521
- var subStateValue = isString(relativeStateValue) ? undefined : relativeStateValue[key];
5796
+ var subStateValue = utils_isString(relativeStateValue) ? undefined : relativeStateValue[key];
5522
5797
  return stateNode.historyValue(subStateValue || stateNode.initialStateValue);
5523
5798
  }, function (stateNode) {
5524
5799
  return !stateNode.history;
@@ -5551,7 +5826,7 @@ function () {
5551
5826
 
5552
5827
  var subHistoryValue = nestedPath(parent.path, 'states')(historyValue).current;
5553
5828
 
5554
- if (isString(subHistoryValue)) {
5829
+ if (utils_isString(subHistoryValue)) {
5555
5830
  return [parent.getStateNode(subHistoryValue)];
5556
5831
  }
5557
5832
 
@@ -5659,7 +5934,7 @@ function () {
5659
5934
  }
5660
5935
 
5661
5936
  return _target.map(function (target) {
5662
- if (!isString(target)) {
5937
+ if (!utils_isString(target)) {
5663
5938
  return target;
5664
5939
  }
5665
5940
 
@@ -5691,12 +5966,12 @@ function () {
5691
5966
 
5692
5967
  var normalizedTarget = normalizeTarget(transitionConfig.target);
5693
5968
  var internal = 'internal' in transitionConfig ? transitionConfig.internal : normalizedTarget ? normalizedTarget.some(function (_target) {
5694
- return isString(_target) && _target[0] === _this.delimiter;
5969
+ return utils_isString(_target) && _target[0] === _this.delimiter;
5695
5970
  }) : true;
5696
5971
  var guards = this.machine.options.guards;
5697
5972
  var target = this.resolveTarget(normalizedTarget);
5698
5973
 
5699
- var transition = __assign(__assign({}, transitionConfig), {
5974
+ var transition = _tslib_assign(_tslib_assign({}, transitionConfig), {
5700
5975
  actions: toActionObjects(toArray(transitionConfig.actions)),
5701
5976
  cond: toGuard(transitionConfig.cond, guards),
5702
5977
  target: target,
@@ -5704,7 +5979,7 @@ function () {
5704
5979
  internal: internal,
5705
5980
  eventType: transitionConfig.event,
5706
5981
  toJSON: function () {
5707
- return __assign(__assign({}, transition), {
5982
+ return _tslib_assign(_tslib_assign({}, transition), {
5708
5983
  target: transition.target ? transition.target.map(function (t) {
5709
5984
  return "#".concat(t.id);
5710
5985
  }) : undefined,
@@ -5735,13 +6010,13 @@ function () {
5735
6010
  strictTransitionConfigs_1 = __rest(_b, [typeof _c === "symbol" ? _c : _c + ""]);
5736
6011
 
5737
6012
  onConfig = flatten(Object.keys(strictTransitionConfigs_1).map(function (key) {
5738
- if (!IS_PRODUCTION && key === NULL_EVENT) {
5739
- 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, "\"."));
6013
+ if (!environment_IS_PRODUCTION && key === NULL_EVENT) {
6014
+ 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, "\"."));
5740
6015
  }
5741
6016
 
5742
6017
  var transitionConfigArray = toTransitionConfigArray(key, strictTransitionConfigs_1[key]);
5743
6018
 
5744
- if (!IS_PRODUCTION) {
6019
+ if (!environment_IS_PRODUCTION) {
5745
6020
  validateArrayifiedTransitions(_this, key, transitionConfigArray);
5746
6021
  }
5747
6022
 
@@ -5752,25 +6027,25 @@ function () {
5752
6027
  var eventlessConfig = this.config.always ? toTransitionConfigArray('', this.config.always) : [];
5753
6028
  var doneConfig = this.config.onDone ? toTransitionConfigArray(String(done(this.id)), this.config.onDone) : [];
5754
6029
 
5755
- if (!IS_PRODUCTION) {
5756
- warn(!(this.config.onDone && !this.parent), "Root nodes cannot have an \".onDone\" transition. Please check the config of \"".concat(this.id, "\"."));
6030
+ if (!environment_IS_PRODUCTION) {
6031
+ utils_warn(!(this.config.onDone && !this.parent), "Root nodes cannot have an \".onDone\" transition. Please check the config of \"".concat(this.id, "\"."));
5757
6032
  }
5758
6033
 
5759
6034
  var invokeConfig = flatten(this.invoke.map(function (invokeDef) {
5760
6035
  var settleTransitions = [];
5761
6036
 
5762
6037
  if (invokeDef.onDone) {
5763
- settleTransitions.push.apply(settleTransitions, __spreadArray([], __read(toTransitionConfigArray(String(actions_doneInvoke(invokeDef.id)), invokeDef.onDone)), false));
6038
+ settleTransitions.push.apply(settleTransitions, _tslib_spreadArray([], _tslib_read(toTransitionConfigArray(String(actions_doneInvoke(invokeDef.id)), invokeDef.onDone)), false));
5764
6039
  }
5765
6040
 
5766
6041
  if (invokeDef.onError) {
5767
- settleTransitions.push.apply(settleTransitions, __spreadArray([], __read(toTransitionConfigArray(String(actions_error(invokeDef.id)), invokeDef.onError)), false));
6042
+ settleTransitions.push.apply(settleTransitions, _tslib_spreadArray([], _tslib_read(toTransitionConfigArray(String(actions_error(invokeDef.id)), invokeDef.onError)), false));
5768
6043
  }
5769
6044
 
5770
6045
  return settleTransitions;
5771
6046
  }));
5772
6047
  var delayedTransitions = this.after;
5773
- var formattedTransitions = flatten(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(doneConfig), false), __read(invokeConfig), false), __read(onConfig), false), __read(eventlessConfig), false).map(function (transitionConfig) {
6048
+ 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) {
5774
6049
  return toArray(transitionConfig).map(function (transition) {
5775
6050
  return _this.formatTransition(transition);
5776
6051
  });
@@ -5811,7 +6086,7 @@ function Machine(config, options, initialContext) {
5811
6086
  initialContext = config.context;
5812
6087
  }
5813
6088
 
5814
- return new StateNode(config, options, initialContext);
6089
+ return new StateNode_StateNode(config, options, initialContext);
5815
6090
  }
5816
6091
  function createMachine(config, options) {
5817
6092
  if (!IS_PRODUCTION && !('predictableActionArguments' in config) && !warned) {
@@ -5834,7 +6109,7 @@ function mapState(stateMap, stateId) {
5834
6109
  var foundStateId;
5835
6110
 
5836
6111
  try {
5837
- for (var _b = _tslib_values(Object.keys(stateMap)), _c = _b.next(); !_c.done; _c = _b.next()) {
6112
+ for (var _b = __values(Object.keys(stateMap)), _c = _b.next(); !_c.done; _c = _b.next()) {
5838
6113
  var mappedStateId = _c.value;
5839
6114
 
5840
6115
  if (matchesState(mappedStateId, stateId) && (!foundStateId || stateId.length > foundStateId.length)) {
@@ -5868,7 +6143,7 @@ function matchState(state, patterns, defaultValue) {
5868
6143
  var resolvedState = State.from(state, state instanceof State ? state.context : undefined);
5869
6144
 
5870
6145
  try {
5871
- for (var patterns_1 = _tslib_values(patterns), patterns_1_1 = patterns_1.next(); !patterns_1_1.done; patterns_1_1 = patterns_1.next()) {
6146
+ for (var patterns_1 = __values(patterns), patterns_1_1 = patterns_1.next(); !patterns_1_1.done; patterns_1_1 = patterns_1.next()) {
5872
6147
  var _b = __read(patterns_1_1.value, 2),
5873
6148
  stateValue = _b[0],
5874
6149
  getValue = _b[1];
@@ -5898,7 +6173,7 @@ function matchState(state, patterns, defaultValue) {
5898
6173
  function createSchema(schema) {
5899
6174
  return schema;
5900
6175
  }
5901
- var t = createSchema;
6176
+ var t = (/* unused pure expression or super */ null && (createSchema));
5902
6177
 
5903
6178
 
5904
6179
 
@@ -5919,13 +6194,17 @@ var t = createSchema;
5919
6194
 
5920
6195
 
5921
6196
  var es_assign = actions_assign,
5922
- es_send = actions_send,
5923
- es_sendTo = sendTo,
5924
- es_sendParent = sendParent,
5925
- es_sendUpdate = sendUpdate,
5926
- es_forwardTo = forwardTo,
5927
- es_doneInvoke = actions_doneInvoke,
5928
- es_raise = actions_raise;
6197
+ es_send = (/* unused pure expression or super */ null && (send$1)),
6198
+ es_sendTo = (/* unused pure expression or super */ null && (sendTo$1)),
6199
+ es_sendParent = (/* unused pure expression or super */ null && (sendParent$1)),
6200
+ es_sendUpdate = (/* unused pure expression or super */ null && (sendUpdate$1)),
6201
+ es_forwardTo = (/* unused pure expression or super */ null && (forwardTo$1)),
6202
+ es_doneInvoke = (/* unused pure expression or super */ null && (doneInvoke$1)),
6203
+ es_raise = (/* unused pure expression or super */ null && (raise$1)),
6204
+ es_log = (/* unused pure expression or super */ null && (log$1)),
6205
+ es_pure = (/* unused pure expression or super */ null && (pure$1)),
6206
+ es_choose = (/* unused pure expression or super */ null && (choose$1)),
6207
+ es_stop = (/* unused pure expression or super */ null && (stop$1));
5929
6208
 
5930
6209
 
5931
6210