xstate 5.0.0-beta.26 → 5.0.0-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/dist/xstate-actions.cjs.js +20 -18
- package/actions/dist/xstate-actions.cjs.mjs +2 -0
- package/actions/dist/xstate-actions.development.cjs.js +20 -18
- package/actions/dist/xstate-actions.development.cjs.mjs +2 -0
- package/actions/dist/xstate-actions.development.esm.js +1 -1
- package/actions/dist/xstate-actions.esm.js +1 -1
- package/actions/dist/xstate-actions.umd.min.js +1 -1
- package/actions/dist/xstate-actions.umd.min.js.map +1 -1
- package/actors/dist/xstate-actors.cjs.js +37 -14
- package/actors/dist/xstate-actors.cjs.mjs +0 -5
- package/actors/dist/xstate-actors.development.cjs.js +37 -14
- package/actors/dist/xstate-actors.development.cjs.mjs +0 -5
- package/actors/dist/xstate-actors.development.esm.js +34 -1
- package/actors/dist/xstate-actors.esm.js +34 -1
- package/actors/dist/xstate-actors.umd.min.js +1 -1
- package/actors/dist/xstate-actors.umd.min.js.map +1 -1
- package/dist/{actions-5943a9db.esm.js → actions-020463e9.esm.js} +76 -532
- package/dist/{actions-cf69419d.development.esm.js → actions-9754d2ca.development.esm.js} +76 -532
- package/dist/{actions-0971b43d.development.cjs.js → actions-ca622922.development.cjs.js} +81 -546
- package/dist/{actions-319cefe7.cjs.js → actions-d1dba4ac.cjs.js} +81 -546
- package/dist/declarations/src/Machine.d.ts +4 -3
- package/dist/declarations/src/State.d.ts +1 -1
- package/dist/declarations/src/StateNode.d.ts +0 -9
- package/dist/declarations/src/actions/assign.d.ts +6 -11
- package/dist/declarations/src/actions/cancel.d.ts +5 -12
- package/dist/declarations/src/actions/choose.d.ts +7 -6
- package/dist/declarations/src/actions/log.d.ts +5 -20
- package/dist/declarations/src/actions/pure.d.ts +9 -8
- package/dist/declarations/src/actions/raise.d.ts +6 -5
- package/dist/declarations/src/actions/send.d.ts +7 -12
- package/dist/declarations/src/actions/stop.d.ts +5 -12
- package/dist/declarations/src/actions.d.ts +2 -0
- package/dist/declarations/src/actors/index.d.ts +0 -20
- package/dist/declarations/src/actors/promise.d.ts +2 -1
- package/dist/declarations/src/constants.d.ts +7 -0
- package/dist/declarations/src/guards.d.ts +2 -2
- package/dist/declarations/src/index.d.ts +14 -14
- package/dist/declarations/src/typegenTypes.d.ts +1 -1
- package/dist/declarations/src/types.d.ts +10 -15
- package/dist/declarations/src/utils.d.ts +1 -2
- package/dist/promise-2ad94e3b.development.esm.js +406 -0
- package/dist/promise-3b7e3357.development.cjs.js +412 -0
- package/dist/promise-5b07c38e.esm.js +406 -0
- package/dist/promise-7a8c1768.cjs.js +412 -0
- package/dist/xstate.cjs.js +78 -102
- package/dist/xstate.development.cjs.js +78 -102
- package/dist/xstate.development.esm.js +6 -30
- package/dist/xstate.esm.js +6 -30
- package/dist/xstate.umd.min.js +1 -1
- package/dist/xstate.umd.min.js.map +1 -1
- package/guards/dist/xstate-guards.cjs.js +6 -6
- package/guards/dist/xstate-guards.development.cjs.js +6 -6
- package/guards/dist/xstate-guards.development.esm.js +1 -1
- package/guards/dist/xstate-guards.esm.js +1 -1
- package/guards/dist/xstate-guards.umd.min.js +1 -1
- package/guards/dist/xstate-guards.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,25 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var guards_dist_xstateGuards = require('../../dist/actions-d1dba4ac.cjs.js');
|
|
6
6
|
require('../../dev/dist/xstate-dev.cjs.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.after =
|
|
11
|
-
exports.assign =
|
|
12
|
-
exports.cancel =
|
|
13
|
-
exports.choose =
|
|
14
|
-
exports.constantPrefixes =
|
|
15
|
-
exports.createInitEvent =
|
|
16
|
-
exports.done =
|
|
17
|
-
exports.doneInvoke =
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
10
|
+
exports.after = guards_dist_xstateGuards.after;
|
|
11
|
+
exports.assign = guards_dist_xstateGuards.assign;
|
|
12
|
+
exports.cancel = guards_dist_xstateGuards.cancel;
|
|
13
|
+
exports.choose = guards_dist_xstateGuards.choose;
|
|
14
|
+
exports.constantPrefixes = guards_dist_xstateGuards.constantPrefixes;
|
|
15
|
+
exports.createInitEvent = guards_dist_xstateGuards.createInitEvent;
|
|
16
|
+
exports.done = guards_dist_xstateGuards.done;
|
|
17
|
+
exports.doneInvoke = guards_dist_xstateGuards.doneInvoke;
|
|
18
|
+
exports.doneInvokeEventType = guards_dist_xstateGuards.doneInvokeEventType;
|
|
19
|
+
exports.error = guards_dist_xstateGuards.error;
|
|
20
|
+
exports.errorEventType = guards_dist_xstateGuards.errorEventType;
|
|
21
|
+
exports.escalate = guards_dist_xstateGuards.escalate;
|
|
22
|
+
exports.forwardTo = guards_dist_xstateGuards.forwardTo;
|
|
23
|
+
exports.log = guards_dist_xstateGuards.log;
|
|
24
|
+
exports.pure = guards_dist_xstateGuards.pure;
|
|
25
|
+
exports.raise = guards_dist_xstateGuards.raise;
|
|
26
|
+
exports.sendParent = guards_dist_xstateGuards.sendParent;
|
|
27
|
+
exports.sendTo = guards_dist_xstateGuards.sendTo;
|
|
28
|
+
exports.stop = guards_dist_xstateGuards.stop;
|
|
@@ -2,25 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var guards_dist_xstateGuards = require('../../dist/actions-ca622922.development.cjs.js');
|
|
6
6
|
require('../../dev/dist/xstate-dev.development.cjs.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.after =
|
|
11
|
-
exports.assign =
|
|
12
|
-
exports.cancel =
|
|
13
|
-
exports.choose =
|
|
14
|
-
exports.constantPrefixes =
|
|
15
|
-
exports.createInitEvent =
|
|
16
|
-
exports.done =
|
|
17
|
-
exports.doneInvoke =
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
10
|
+
exports.after = guards_dist_xstateGuards.after;
|
|
11
|
+
exports.assign = guards_dist_xstateGuards.assign;
|
|
12
|
+
exports.cancel = guards_dist_xstateGuards.cancel;
|
|
13
|
+
exports.choose = guards_dist_xstateGuards.choose;
|
|
14
|
+
exports.constantPrefixes = guards_dist_xstateGuards.constantPrefixes;
|
|
15
|
+
exports.createInitEvent = guards_dist_xstateGuards.createInitEvent;
|
|
16
|
+
exports.done = guards_dist_xstateGuards.done;
|
|
17
|
+
exports.doneInvoke = guards_dist_xstateGuards.doneInvoke;
|
|
18
|
+
exports.doneInvokeEventType = guards_dist_xstateGuards.doneInvokeEventType;
|
|
19
|
+
exports.error = guards_dist_xstateGuards.error;
|
|
20
|
+
exports.errorEventType = guards_dist_xstateGuards.errorEventType;
|
|
21
|
+
exports.escalate = guards_dist_xstateGuards.escalate;
|
|
22
|
+
exports.forwardTo = guards_dist_xstateGuards.forwardTo;
|
|
23
|
+
exports.log = guards_dist_xstateGuards.log;
|
|
24
|
+
exports.pure = guards_dist_xstateGuards.pure;
|
|
25
|
+
exports.raise = guards_dist_xstateGuards.raise;
|
|
26
|
+
exports.sendParent = guards_dist_xstateGuards.sendParent;
|
|
27
|
+
exports.sendTo = guards_dist_xstateGuards.sendTo;
|
|
28
|
+
exports.stop = guards_dist_xstateGuards.stop;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a8 as after, w as assign, L as cancel, M as choose, a7 as constantPrefixes, x as createInitEvent, a9 as done, I as doneInvoke, aa as doneInvokeEventType, a4 as error, ab as errorEventType, ac as escalate, R as forwardTo, O as log, P as pure, Q as raise, T as sendParent, U as sendTo, V as stop } from '../../dist/actions-9754d2ca.development.esm.js';
|
|
2
2
|
import '../../dev/dist/xstate-dev.development.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a8 as after, w as assign, L as cancel, M as choose, a7 as constantPrefixes, x as createInitEvent, a9 as done, I as doneInvoke, aa as doneInvokeEventType, a4 as error, ab as errorEventType, ac as escalate, R as forwardTo, O as log, P as pure, Q as raise, T as sendParent, U as sendTo, V as stop } from '../../dist/actions-020463e9.esm.js';
|
|
2
2
|
import '../../dev/dist/xstate-dev.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).XStateActions={})}(this,(function(t){"use strict";let e=function(t){return t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t}({}),n=function(t){return t.Parent="#_parent",t.Internal="#_internal",t}({});const s=e.After,i=e.DoneState,o=e.ErrorExecution,r=e.ErrorPlatform,c=e.ErrorCustom;var a=Object.freeze({__proto__:null,after:s,doneState:i,errorExecution:o,errorPlatform:r,error:c});const u=".";function h(t,e,s,{to:i,event:o,id:r,delay:c}){const a=e.machine.implementations.delays;if("string"==typeof o)throw new Error(`Only event objects may be used with sendTo; use sendTo({ type: "${o}" }) instead`);const u="function"==typeof o?o(s):o;let h;if("string"==typeof c){const t=a&&a[c];h="function"==typeof t?t(s):t}else h="function"==typeof c?c(s):c;const f="function"==typeof i?i(s):i;let d;if("string"==typeof f){if(d=f===n.Parent?t?.self._parent:f===n.Internal?t?.self:f.startsWith("#_")?e.children[f.slice(2)]:e.children[f],!d)throw new Error(`Unable to send event to actor '${f}' from machine '${e.machine.id}'.`)}else d=f||t?.self;return[e,{to:d,event:u,id:r,delay:h}]}function f(t,e){if("number"==typeof e.delay)return void t.self.delaySend(e);const{to:n,event:s}=e;t.defer((()=>{n.send(s.type===c?{type:`${it(t.self.id)}`,data:s.data}:s)}))}function d(t,e,n){function s(t){}return s.type="xstate.sendTo",s.to=t,s.event=e,s.id=n?.id,s.delay=n?.delay,s.resolve=h,s.execute=f,s}function l(t,e){return d(n.Parent,t,e)}const p=new WeakMap;function y(t,e,n,{sendId:s}){return[e,"function"==typeof s?s(n):s]}function v(t,e){t.self.cancel(e)}class g{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}prepend(t){this._current?this._current={value:t,next:this._current}:this.enqueue(t)}enqueue(t){const e={value:t,next:null};if(this._current)return this._last.next=e,void(this._last=e);this._current=e,this._last=e,this._active&&this.flush()}flush(){for(;this._current;){const t=this._current;this._process(t.value),t===this._current&&(this._current=this._current.next)}this._last=null}}const m="function"==typeof Symbol&&Symbol.observable||"@@observable";function _(t,e){const n=x(t),s=x(e);return"string"==typeof s?"string"==typeof n&&s===n:"string"==typeof n?n in s:Object.keys(n).every((t=>t in s&&_(n[t],s[t])))}function x(t){if("object"==typeof(e=t)&&"value"in e&&"context"in e&&"event"in e)return t.value;var e;if(E(t))return b(t);if("string"!=typeof t)return t;return b(function(t){try{return E(t)?t:t.toString().split(u)}catch(e){throw new Error(`'${t}' is not a valid state path.`)}}(t))}function b(t){if(1===t.length)return t[0];const e={};let n=e;for(let e=0;e<t.length-1;e++)if(e===t.length-2)n[t[e]]=t[e+1];else{const s=n;n={},s[t[e]]=n}return e}function w(t){return[].concat(...t)}function S(t){return void 0===t?[]:function(t){return E(t)?t:[t]}(t)}function E(t){return Array.isArray(t)}const $="xstate.stop";function I(){const t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:window;if(t.__xstate__)return t.__xstate__}const k=t=>{const e=I();e&&e.register(t)};function T(t){setTimeout((()=>{throw t}))}let P=function(t){return t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped",t}({});const j={deferEvents:!0,clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class O{constructor(t,e){this.logic=t,this._state=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new g(this._process.bind(this)),this.delayedEventsMap={},this.observers=new Set,this.logger=void 0,this.status=P.NotStarted,this._parent=void 0,this.ref=void 0,this._actorContext=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const n={...j,...e},{clock:s,logger:i,parent:o,id:r,systemId:c}=n;this.system=o?.system??function(){let t=0;const e=new Map,n=new Map,s=new WeakMap;return{_bookId:()=>"x:"+t++,_register:(t,n)=>(e.set(t,n),t),_unregister:t=>{e.delete(t.sessionId);const i=s.get(t);void 0!==i&&(n.delete(i),s.delete(t))},get:t=>n.get(t),_set:(t,e)=>{const i=n.get(t);if(i&&i!==e)throw new Error(`Actor with system ID '${t}' already exists.`);n.set(t,e),s.set(e,t)}}}(),c&&(this._systemId=c,this.system._set(c,this)),this.sessionId=this.system._bookId(),this.id=r??this.sessionId,this.logger=i,this.clock=s,this._parent=o,this.options=n,this.src=n.src,this.ref=this,this._actorContext={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:t=>{this._deferred.push(t)},system:this.system,stopChild:t=>{if(t._parent!==this)throw new Error(`Cannot stop child actor ${t.id} of ${this.id} because it is not a child`);t._stop()}},this.send=this.send.bind(this),this._initState()}_initState(){this._state=this.options.state?this.logic.restoreState?this.logic.restoreState(this.options.state,this._actorContext):this.options.state:this.logic.getInitialState(this._actorContext,this.options?.input)}update(t){this._state=t;const e=this.getSnapshot();let n;for(;n=this._deferred.shift();)n();for(const t of this.observers)try{t.next?.(e)}catch(t){T(t)}const s=this.logic.getStatus?.(t);switch(s?.status){case"done":this._stopProcedure(),this._complete(),this._doneEvent=st(this.id,s.data),this._parent?.send(this._doneEvent);break;case"error":this._stopProcedure(),this._error(s.data),this._parent?.send(it(this.id,s.data))}}subscribe(t,e,n){const s=function(t,e,n){const s="object"==typeof t,i=s?t:void 0;return{next:(s?t.next:t)?.bind(i),error:(s?t.error:e)?.bind(i),complete:(s?t.complete:n)?.bind(i)}}(t,e,n);if(this.status!==P.Stopped)this.observers.add(s);else try{s.complete?.()}catch(t){T(t)}return{unsubscribe:()=>{this.observers.delete(s)}}}start(){if(this.status===P.Running)return this;this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this.status=P.Running;const t=this.logic.getStatus?.(this._state);switch(t?.status){case"done":this.update(this._state);case"error":return this}if(this.logic.start)try{this.logic.start(this._state,this._actorContext)}catch(t){return this._stopProcedure(),this._error(t),this._parent?.send(it(this.id,t)),this}return this.update(this._state),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let e,n;try{e=this.logic.transition(this._state,t,this._actorContext)}catch(t){n={err:t}}if(n){const{err:t}=n;return this._stopProcedure(),this._error(t),void this._parent?.send(it(this.id,t))}this.update(e),t.type===$&&(this._stopProcedure(),this._complete())}_stop(){return this.status===P.Stopped?this:(this.mailbox.clear(),this.status===P.NotStarted?(this.status=P.Stopped,this):(this.mailbox.enqueue({type:$}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(const t of this.observers)try{t.complete?.()}catch(t){T(t)}this.observers.clear()}_error(t){if(!this.observers.size)return void(this._parent||T(t));let e=!1;for(const n of this.observers){const s=n.error;e||=!s;try{s?.(t)}catch(t){T(t)}}this.observers.clear(),e&&T(t)}_stopProcedure(){if(this.status!==P.Running)return this;for(const t of Object.keys(this.delayedEventsMap))this.clock.clearTimeout(this.delayedEventsMap[t]);return this.mailbox.clear(),this.mailbox=new g(this._process.bind(this)),this.status=P.Stopped,this.system._unregister(this),this}send(t){if("string"==typeof t)throw new Error(`Only event objects may be sent to actors; use .send({ type: "${t}" }) instead`);if(this.status!==P.Stopped){if(this.status!==P.Running&&!this.options.deferEvents)throw new Error(`Event "${t.type}" was sent to uninitialized actor "${this.id}". Make sure .start() is called for this actor, or set { deferEvents: true } in the actor options.\nEvent: ${JSON.stringify(t)}`);this.mailbox.enqueue(t)}}delaySend({event:t,id:e,delay:n,to:s}){const i=this.clock.setTimeout((()=>{s?s.send(t):this.send(t)}),n);e&&(this.delayedEventsMap[e]=i)}cancel(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]}attachDevTools(){const{devTools:t}=this.options;if(t){("function"==typeof t?t:k)(this)}}toJSON(){return{id:this.id}}getPersistedState(){return this.logic.getPersistedState?.(this._state)}[m](){return this}getSnapshot(){return this.logic.getSnapshot?this.logic.getSnapshot(this._state):this._state}}function C(t,e){return new O(t,e)}function M(t,e,n,s){const{machine:i}=s,o="function"==typeof t,r=o?t:i.implementations.guards["string"==typeof t?t:t.type];if(!o&&!r)throw new Error(`Guard '${"string"==typeof t?t:t.type}' is not implemented.'.`);if("function"!=typeof r)return M(r,e,n,s);const c={context:e,event:n,guard:o?void 0:"string"==typeof t?{type:t}:t};if(!("check"in r))return r(c);return r.check(s,c,r)}const A=t=>"atomic"===t.type||"final"===t.type;function D(t){return Object.values(t.states).filter((t=>"history"!==t.type))}function R(t,e){const n=[];let s=t.parent;for(;s&&s!==e;)n.push(s),s=s.parent;return n}function N(t){const e=new Set(t),n=new Set(t),s=q(n);for(const t of e)if("compound"!==t.type||s.get(t)&&s.get(t).length){if("parallel"===t.type)for(const e of D(t))if("history"!==e.type&&!n.has(e))for(const t of V(e))n.add(t)}else V(t).forEach((t=>n.add(t)));for(const t of n){let e=t.parent;for(;e;)n.add(e),e=e.parent}return n}function Q(t,e){const n=e.get(t);if(!n)return{};if("compound"===t.type){const t=n[0];if(!t)return{};if(A(t))return t.key}const s={};for(const t of n)s[t.key]=Q(t,e);return s}function q(t){const e=new Map;for(const n of t)e.has(n)||e.set(n,[]),n.parent&&(e.has(n.parent)||e.set(n.parent,[]),e.get(n.parent).push(n));return e}function z(t,e){return Q(t,q(N(e)))}const J=t=>"#"===t[0];function V(t){const e=new Set;return function n(s){if(!e.has(s))if(e.add(s),"compound"===s.type)for(const i of s.initial.target){for(const n of R(i,t))e.add(n);n(i)}else if("parallel"===s.type)for(const t of D(s))n(t)}(t),[...e]}function W(t,e){if(J(e))return t.machine.getStateNodeById(e);if(!t.states)throw new Error(`Unable to retrieve child state '${e}' from '${t.id}'; no child states exist.`);const n=t.states[e];if(!n)throw new Error(`Child state '${e}' does not exist on '${t.id}'`);return n}function B(t,e){const n=e instanceof U?e.value:x(e);if("string"==typeof n)return[t,t.states[n]];const s=Object.keys(n),i=s.map((e=>W(t,e))).filter(Boolean);return[t.machine.root,t].concat(i,s.reduce(((e,s)=>{const i=W(t,s);if(!i)return e;const o=B(i,n[s]);return e.concat(o)}),[]))}class U{static from(t,e={},n){if(t instanceof U)return t.context!==e?new U({value:t.value,context:e,meta:{},configuration:[],children:{}},n):t;const s=N(B(n.root,t));return new U({value:t,context:e,meta:void 0,configuration:Array.from(s),children:{}},n)}constructor(t,e){this.machine=e,this.tags=void 0,this.value=void 0,this.done=void 0,this.output=void 0,this.error=void 0,this.context=void 0,this.historyValue={},this._internalQueue=void 0,this.configuration=void 0,this.children=void 0,this.context=t.context,this._internalQueue=t._internalQueue??[],this.historyValue=t.historyValue||{},this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration??Array.from(N(B(e.root,t.value))),this.children=t.children,this.value=z(e.root,this.configuration),this.tags=new Set(w(this.configuration.map((t=>t.tags)))),this.done=t.done??!1,this.output=t.output,this.error=t.error}toStrings(t=this.value){if("string"==typeof t)return[t];const e=Object.keys(t);return e.concat(...e.map((e=>this.toStrings(t[e]).map((t=>e+u+t)))))}toJSON(){const{configuration:t,tags:e,machine:n,...s}=this;return{...s,tags:Array.from(e),meta:this.meta}}matches(t){return _(t,this.value)}hasTag(t){return this.tags.has(t)}can(t){const e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some((t=>void 0!==t.target||t.actions.length))}get nextEvents(){return function(t,e,n){let s=p.get(t);return s?e in s||(s[e]=n()):(s={[e]:n()},p.set(t,s)),s[e]}(this,"nextEvents",(()=>[...new Set(w([...this.configuration.map((t=>t.ownEvents))]))]))}get meta(){return this.configuration.reduce(((t,e)=>(void 0!==e.meta&&(t[e.id]=e.meta),t)),{})}}function G(t,e={}){return new U({...t,...e},t.machine)}function X(t,e,n,{actorRef:s}){const i="function"==typeof s?s(n):s,o="string"==typeof i?e.children[i]:i;let r=e.children;return o&&(r={...r},delete r[o.id]),[G(e,{children:r}),o]}function F(t,e){e&&(e.status===P.Running?t.defer((()=>{t.stopChild(e)})):t.stopChild(e))}function H(t,e,n,{value:s,label:i}){return[e,{value:"function"==typeof s?s(n):s,label:i}]}function K({logger:t},{value:e,label:n}){n?t(n,e):t(e)}function L(t,{machine:e,context:n},s,i){return(o,r)=>{const c=((o,r={})=>{const{systemId:c}=r;if("string"==typeof o){const a=function(t){return t?"transition"in t?{src:t,input:void 0}:t:void 0}(e.implementations.actors[o]);if(!a)throw new Error(`Actor logic '${o}' not implemented in machine '${e.id}'`);const u="input"in r?r.input:a.input,h=C(a.src,{id:r.id,parent:t.self,input:"function"==typeof u?u({context:n,event:s,self:t.self}):u,systemId:c});return i[h.id]=h,h}return C(o,{id:r.id,parent:t.self,input:r.input,systemId:c})})(o,r);return i[c.id]=c,t.defer((()=>{if(c.status!==P.Stopped)try{c.start?.()}catch(e){return void t.self.send(it(c.id,e))}})),c}}function Y(t,e,n,{assignment:s}){if(!e.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");const i={},o={context:e.context,event:n.event,action:n.action,spawn:L(t,e,n.event,i),self:t?.self,system:t?.system};let r={};if("function"==typeof s)r=s(o);else for(const t of Object.keys(s)){const e=s[t];r[t]="function"==typeof e?e(o):e}return[G(e,{context:Object.assign({},e.context,r),children:Object.keys(i).length?{...e.children,...i}:e.children})]}function Z(t,e,n,{event:s,id:i,delay:o}){const r=e.machine.implementations.delays;if("string"==typeof s)throw new Error(`Only event objects may be used with raise; use raise({ type: "${s}" }) instead`);const c="function"==typeof s?s(n):s;let a;if("string"==typeof o){const t=r&&r[o];a="function"==typeof t?t(n):t}else a="function"==typeof o?o(n):o;return["number"!=typeof a?G(e,{_internalQueue:e._internalQueue.concat(c)}):e,{event:c,id:i,delay:a}]}function tt(t,e){"number"!=typeof e.delay||t.self.delaySend(e)}function et(t,e,n,{branches:s}){const i=s.find((t=>!t.guard||M(t.guard,e.context,n.event,e)))?.actions;return[e,void 0,S(i)]}function nt(t,e,n,{get:s}){return[e,void 0,S(s({context:n.context,event:n.event}))]}function st(t,n){const s=`${e.DoneInvoke}.${t}`,i={type:s,output:n,toString:()=>s};return i}function it(t,n){const s=`${e.ErrorPlatform}.${t}`,i={type:s,data:n,toString:()=>s};return i}t.after=function(t,n){const s=n?`#${n}`:"";return`${e.After}(${t})${s}`},t.assign=function(t){function e(t){}return e.type="xstate.assign",e.assignment=t,e.resolve=Y,e},t.cancel=function(t){function e(t){}return e.type="xstate.cancel",e.sendId=t,e.resolve=y,e.execute=v,e},t.choose=function(t){function e(t){}return e.type="xstate.choose",e.branches=t,e.resolve=et,e},t.constantPrefixes=a,t.createInitEvent=function(t){return{type:"xstate.init",input:t}},t.done=function(t,n){const s=`${e.DoneState}.${t}`,i={type:s,output:n,toString:()=>s};return i},t.doneInvoke=st,t.error=it,t.escalate=function(t,e){return l((e=>({type:c,data:"function"==typeof t?t(e):t})),e)},t.forwardTo=function(t,e){return d(t,(({event:t})=>t),e)},t.log=function(t=(({context:t,event:e})=>({context:t,event:e})),e){function n(t){}return n.type="xstate.log",n.value=t,n.label=e,n.resolve=H,n.execute=K,n},t.pure=function(t){function e(t){}return e.type="xstate.pure",e.get=t,e.resolve=nt,e},t.raise=function(t,e){function n(t){}return n.type="xstate.raise",n.event=t,n.id=e?.id,n.delay=e?.delay,n.resolve=Z,n.execute=tt,n},t.sendParent=l,t.sendTo=d,t.stop=function(t){function e(t){}return e.type="xstate.stop",e.actorRef=t,e.resolve=X,e.execute=F,e},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).XStateActions={})}(this,(function(t){"use strict";let e=function(t){return t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t}({}),n=function(t){return t.Parent="#_parent",t.Internal="#_internal",t}({});const s=e.After,i=e.DoneState,o=e.ErrorExecution,r=e.ErrorPlatform,c=e.ErrorCustom;var a=Object.freeze({__proto__:null,after:s,doneState:i,errorExecution:o,errorPlatform:r,error:c});const u=".",h="xstate.stop";function f(t,e,s,{to:i,event:o,id:r,delay:c}){const a=e.machine.implementations.delays;if("string"==typeof o)throw new Error(`Only event objects may be used with sendTo; use sendTo({ type: "${o}" }) instead`);const u="function"==typeof o?o(s):o;let h;if("string"==typeof c){const t=a&&a[c];h="function"==typeof t?t(s):t}else h="function"==typeof c?c(s):c;const f="function"==typeof i?i(s):i;let d;if("string"==typeof f){if(d=f===n.Parent?t?.self._parent:f===n.Internal?t?.self:f.startsWith("#_")?e.children[f.slice(2)]:e.children[f],!d)throw new Error(`Unable to send event to actor '${f}' from machine '${e.machine.id}'.`)}else d=f||t?.self;return[e,{to:d,event:u,id:r,delay:h}]}function d(t,e){if("number"==typeof e.delay)return void t.self.delaySend(e);const{to:n,event:s}=e;t.defer((()=>{n.send(s.type===c?{type:`${rt(t.self.id)}`,data:s.data}:s)}))}function l(t,e,n){function s(t){}return s.type="xstate.sendTo",s.to=t,s.event=e,s.id=n?.id,s.delay=n?.delay,s.resolve=f,s.execute=d,s}function p(t,e){return l(n.Parent,t,e)}const y=new WeakMap;function v(t,e,n,{sendId:s}){return[e,"function"==typeof s?s(n):s]}function g(t,e){t.self.cancel(e)}class m{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}prepend(t){this._current?this._current={value:t,next:this._current}:this.enqueue(t)}enqueue(t){const e={value:t,next:null};if(this._current)return this._last.next=e,void(this._last=e);this._current=e,this._last=e,this._active&&this.flush()}flush(){for(;this._current;){const t=this._current;this._process(t.value),t===this._current&&(this._current=this._current.next)}this._last=null}}function _(){const t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:window;if(t.__xstate__)return t.__xstate__}const x=t=>{const e=_();e&&e.register(t)};function b(t){setTimeout((()=>{throw t}))}const w="function"==typeof Symbol&&Symbol.observable||"@@observable";function S(t,e){const n=E(t),s=E(e);return"string"==typeof s?"string"==typeof n&&s===n:"string"==typeof n?n in s:Object.keys(n).every((t=>t in s&&S(n[t],s[t])))}function E(t){if("object"==typeof(e=t)&&"value"in e&&"context"in e&&"event"in e)return t.value;var e;if(T(t))return $(t);if("string"!=typeof t)return t;return $(function(t){try{return T(t)?t:t.toString().split(u)}catch(e){throw new Error(`'${t}' is not a valid state path.`)}}(t))}function $(t){if(1===t.length)return t[0];const e={};let n=e;for(let e=0;e<t.length-1;e++)if(e===t.length-2)n[t[e]]=t[e+1];else{const s=n;n={},s[t[e]]=n}return e}function I(t){return[].concat(...t)}function k(t){return void 0===t?[]:function(t){return T(t)?t:[t]}(t)}function T(t){return Array.isArray(t)}let P=function(t){return t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped",t}({});const j={deferEvents:!0,clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class O{constructor(t,e){this.logic=t,this._state=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new m(this._process.bind(this)),this.delayedEventsMap={},this.observers=new Set,this.logger=void 0,this.status=P.NotStarted,this._parent=void 0,this.ref=void 0,this._actorContext=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const n={...j,...e},{clock:s,logger:i,parent:o,id:r,systemId:c}=n;this.system=o?.system??function(){let t=0;const e=new Map,n=new Map,s=new WeakMap;return{_bookId:()=>"x:"+t++,_register:(t,n)=>(e.set(t,n),t),_unregister:t=>{e.delete(t.sessionId);const i=s.get(t);void 0!==i&&(n.delete(i),s.delete(t))},get:t=>n.get(t),_set:(t,e)=>{const i=n.get(t);if(i&&i!==e)throw new Error(`Actor with system ID '${t}' already exists.`);n.set(t,e),s.set(e,t)}}}(),c&&(this._systemId=c,this.system._set(c,this)),this.sessionId=this.system._bookId(),this.id=r??this.sessionId,this.logger=i,this.clock=s,this._parent=o,this.options=n,this.src=n.src,this.ref=this,this._actorContext={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:t=>{this._deferred.push(t)},system:this.system,stopChild:t=>{if(t._parent!==this)throw new Error(`Cannot stop child actor ${t.id} of ${this.id} because it is not a child`);t._stop()}},this.send=this.send.bind(this),this._initState()}_initState(){this._state=this.options.state?this.logic.restoreState?this.logic.restoreState(this.options.state,this._actorContext):this.options.state:this.logic.getInitialState(this._actorContext,this.options?.input)}update(t){this._state=t;const e=this.getSnapshot();let n;for(;n=this._deferred.shift();)n();for(const t of this.observers)try{t.next?.(e)}catch(t){b(t)}const s=this.logic.getStatus?.(t);switch(s?.status){case"done":this._stopProcedure(),this._complete(),this._doneEvent=it(this.id,s.data),this._parent?.send(this._doneEvent);break;case"error":this._stopProcedure(),this._error(s.data),this._parent?.send(rt(this.id,s.data))}}subscribe(t,e,n){const s=function(t,e,n){const s="object"==typeof t,i=s?t:void 0;return{next:(s?t.next:t)?.bind(i),error:(s?t.error:e)?.bind(i),complete:(s?t.complete:n)?.bind(i)}}(t,e,n);if(this.status!==P.Stopped)this.observers.add(s);else try{s.complete?.()}catch(t){b(t)}return{unsubscribe:()=>{this.observers.delete(s)}}}start(){if(this.status===P.Running)return this;this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this.status=P.Running;const t=this.logic.getStatus?.(this._state);switch(t?.status){case"done":this.update(this._state);case"error":return this}if(this.logic.start)try{this.logic.start(this._state,this._actorContext)}catch(t){return this._stopProcedure(),this._error(t),this._parent?.send(rt(this.id,t)),this}return this.update(this._state),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let e,n;try{e=this.logic.transition(this._state,t,this._actorContext)}catch(t){n={err:t}}if(n){const{err:t}=n;return this._stopProcedure(),this._error(t),void this._parent?.send(rt(this.id,t))}this.update(e),t.type===h&&(this._stopProcedure(),this._complete())}_stop(){return this.status===P.Stopped?this:(this.mailbox.clear(),this.status===P.NotStarted?(this.status=P.Stopped,this):(this.mailbox.enqueue({type:h}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(const t of this.observers)try{t.complete?.()}catch(t){b(t)}this.observers.clear()}_error(t){if(!this.observers.size)return void(this._parent||b(t));let e=!1;for(const n of this.observers){const s=n.error;e||=!s;try{s?.(t)}catch(t){b(t)}}this.observers.clear(),e&&b(t)}_stopProcedure(){if(this.status!==P.Running)return this;for(const t of Object.keys(this.delayedEventsMap))this.clock.clearTimeout(this.delayedEventsMap[t]);return this.mailbox.clear(),this.mailbox=new m(this._process.bind(this)),this.status=P.Stopped,this.system._unregister(this),this}send(t){if("string"==typeof t)throw new Error(`Only event objects may be sent to actors; use .send({ type: "${t}" }) instead`);if(this.status!==P.Stopped){if(this.status!==P.Running&&!this.options.deferEvents)throw new Error(`Event "${t.type}" was sent to uninitialized actor "${this.id}". Make sure .start() is called for this actor, or set { deferEvents: true } in the actor options.\nEvent: ${JSON.stringify(t)}`);this.mailbox.enqueue(t)}}delaySend({event:t,id:e,delay:n,to:s}){const i=this.clock.setTimeout((()=>{s?s.send(t):this.send(t)}),n);e&&(this.delayedEventsMap[e]=i)}cancel(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]}attachDevTools(){const{devTools:t}=this.options;if(t){("function"==typeof t?t:x)(this)}}toJSON(){return{id:this.id}}getPersistedState(){return this.logic.getPersistedState?.(this._state)}[w](){return this}getSnapshot(){return this.logic.getSnapshot?this.logic.getSnapshot(this._state):this._state}}function C(t,e){return new O(t,e)}function M(t,e,n,s){const{machine:i}=s,o="function"==typeof t,r=o?t:i.implementations.guards["string"==typeof t?t:t.type];if(!o&&!r)throw new Error(`Guard '${"string"==typeof t?t:t.type}' is not implemented.'.`);if("function"!=typeof r)return M(r,e,n,s);const c={context:e,event:n,guard:o?void 0:"string"==typeof t?{type:t}:"function"==typeof t.params?{type:t.type,params:t.params({context:e,event:n})}:t};if(!("check"in r))return r(c);return r.check(s,c,r)}const A=t=>"atomic"===t.type||"final"===t.type;function D(t){return Object.values(t.states).filter((t=>"history"!==t.type))}function R(t,e){const n=[];let s=t.parent;for(;s&&s!==e;)n.push(s),s=s.parent;return n}function N(t){const e=new Set(t),n=new Set(t),s=q(n);for(const t of e)if("compound"!==t.type||s.get(t)&&s.get(t).length){if("parallel"===t.type)for(const e of D(t))if("history"!==e.type&&!n.has(e))for(const t of V(e))n.add(t)}else V(t).forEach((t=>n.add(t)));for(const t of n){let e=t.parent;for(;e;)n.add(e),e=e.parent}return n}function Q(t,e){const n=e.get(t);if(!n)return{};if("compound"===t.type){const t=n[0];if(!t)return{};if(A(t))return t.key}const s={};for(const t of n)s[t.key]=Q(t,e);return s}function q(t){const e=new Map;for(const n of t)e.has(n)||e.set(n,[]),n.parent&&(e.has(n.parent)||e.set(n.parent,[]),e.get(n.parent).push(n));return e}function z(t,e){return Q(t,q(N(e)))}const J=t=>"#"===t[0];function V(t){const e=new Set;return function n(s){if(!e.has(s))if(e.add(s),"compound"===s.type)for(const i of s.initial.target){for(const n of R(i,t))e.add(n);n(i)}else if("parallel"===s.type)for(const t of D(s))n(t)}(t),[...e]}function W(t,e){if(J(e))return t.machine.getStateNodeById(e);if(!t.states)throw new Error(`Unable to retrieve child state '${e}' from '${t.id}'; no child states exist.`);const n=t.states[e];if(!n)throw new Error(`Child state '${e}' does not exist on '${t.id}'`);return n}function B(t,e){const n=e instanceof U?e.value:E(e);if("string"==typeof n)return[t,t.states[n]];const s=Object.keys(n),i=s.map((e=>W(t,e))).filter(Boolean);return[t.machine.root,t].concat(i,s.reduce(((e,s)=>{const i=W(t,s);if(!i)return e;const o=B(i,n[s]);return e.concat(o)}),[]))}class U{static from(t,e={},n){if(t instanceof U)return t.context!==e?new U({value:t.value,context:e,meta:{},configuration:[],children:{}},n):t;const s=N(B(n.root,t));return new U({value:t,context:e,meta:void 0,configuration:Array.from(s),children:{}},n)}constructor(t,e){this.machine=e,this.tags=void 0,this.value=void 0,this.done=void 0,this.output=void 0,this.error=void 0,this.context=void 0,this.historyValue={},this._internalQueue=void 0,this.configuration=void 0,this.children=void 0,this.context=t.context,this._internalQueue=t._internalQueue??[],this.historyValue=t.historyValue||{},this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration??Array.from(N(B(e.root,t.value))),this.children=t.children,this.value=z(e.root,this.configuration),this.tags=new Set(I(this.configuration.map((t=>t.tags)))),this.done=t.done??!1,this.output=t.output,this.error=t.error}toStrings(t=this.value){if("string"==typeof t)return[t];const e=Object.keys(t);return e.concat(...e.map((e=>this.toStrings(t[e]).map((t=>e+u+t)))))}toJSON(){const{configuration:t,tags:e,machine:n,...s}=this;return{...s,tags:Array.from(e),meta:this.meta}}matches(t){return S(t,this.value)}hasTag(t){return this.tags.has(t)}can(t){const e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some((t=>void 0!==t.target||t.actions.length))}get nextEvents(){return function(t,e,n){let s=y.get(t);return s?e in s||(s[e]=n()):(s={[e]:n()},y.set(t,s)),s[e]}(this,"nextEvents",(()=>[...new Set(I([...this.configuration.map((t=>t.ownEvents))]))]))}get meta(){return this.configuration.reduce(((t,e)=>(void 0!==e.meta&&(t[e.id]=e.meta),t)),{})}}function G(t,e={}){return new U({...t,...e},t.machine)}function X(t,e,n,{actorRef:s}){const i="function"==typeof s?s(n):s,o="string"==typeof i?e.children[i]:i;let r=e.children;return o&&(r={...r},delete r[o.id]),[G(e,{children:r}),o]}function F(t,e){e&&(e.status===P.Running?t.defer((()=>{t.stopChild(e)})):t.stopChild(e))}function H(t,e,n,{value:s,label:i}){return[e,{value:"function"==typeof s?s(n):s,label:i}]}function K({logger:t},{value:e,label:n}){n?t(n,e):t(e)}function L(t,{machine:e,context:n},s,i){return(o,r)=>{const c=((o,r={})=>{const{systemId:c}=r;if("string"==typeof o){const a=function(t){return t?"transition"in t?{src:t,input:void 0}:t:void 0}(e.implementations.actors[o]);if(!a)throw new Error(`Actor logic '${o}' not implemented in machine '${e.id}'`);const u="input"in r?r.input:a.input,h=C(a.src,{id:r.id,parent:t.self,input:"function"==typeof u?u({context:n,event:s,self:t.self}):u,systemId:c});return i[h.id]=h,h}return C(o,{id:r.id,parent:t.self,input:r.input,systemId:c})})(o,r);return i[c.id]=c,t.defer((()=>{if(c.status!==P.Stopped)try{c.start?.()}catch(e){return void t.self.send(rt(c.id,e))}})),c}}function Y(t,e,n,{assignment:s}){if(!e.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");const i={},o={context:e.context,event:n.event,action:n.action,spawn:L(t,e,n.event,i),self:t?.self,system:t?.system};let r={};if("function"==typeof s)r=s(o);else for(const t of Object.keys(s)){const e=s[t];r[t]="function"==typeof e?e(o):e}return[G(e,{context:Object.assign({},e.context,r),children:Object.keys(i).length?{...e.children,...i}:e.children})]}function Z(t,e,n,{event:s,id:i,delay:o}){const r=e.machine.implementations.delays;if("string"==typeof s)throw new Error(`Only event objects may be used with raise; use raise({ type: "${s}" }) instead`);const c="function"==typeof s?s(n):s;let a;if("string"==typeof o){const t=r&&r[o];a="function"==typeof t?t(n):t}else a="function"==typeof o?o(n):o;return["number"!=typeof a?G(e,{_internalQueue:e._internalQueue.concat(c)}):e,{event:c,id:i,delay:a}]}function tt(t,e){"number"!=typeof e.delay||t.self.delaySend(e)}function et(t,e,n,{branches:s}){const i=s.find((t=>!t.guard||M(t.guard,e.context,n.event,e)))?.actions;return[e,void 0,k(i)]}function nt(t,e,n,{get:s}){return[e,void 0,k(s({context:n.context,event:n.event}))]}function st(t){return`${e.DoneInvoke}.${t}`}function it(t,e){const n=st(t),s={type:n,output:e,toString:()=>n};return s}function ot(t){return`${e.ErrorPlatform}.${t}`}function rt(t,e){const n=ot(t),s={type:n,data:e,toString:()=>n};return s}t.after=function(t,n){const s=n?`#${n}`:"";return`${e.After}(${t})${s}`},t.assign=function(t){function e(t){}return e.type="xstate.assign",e.assignment=t,e.resolve=Y,e},t.cancel=function(t){function e(t){}return e.type="xstate.cancel",e.sendId=t,e.resolve=v,e.execute=g,e},t.choose=function(t){function e(t){}return e.type="xstate.choose",e.branches=t,e.resolve=et,e},t.constantPrefixes=a,t.createInitEvent=function(t){return{type:"xstate.init",input:t}},t.done=function(t,n){const s=`${e.DoneState}.${t}`,i={type:s,output:n,toString:()=>s};return i},t.doneInvoke=it,t.doneInvokeEventType=st,t.error=rt,t.errorEventType=ot,t.escalate=function(t,e){return p((e=>({type:c,data:"function"==typeof t?t(e):t})),e)},t.forwardTo=function(t,e){return l(t,(({event:t})=>t),e)},t.log=function(t=(({context:t,event:e})=>({context:t,event:e})),e){function n(t){}return n.type="xstate.log",n.value=t,n.label=e,n.resolve=H,n.execute=K,n},t.pure=function(t){function e(t){}return e.type="xstate.pure",e.get=t,e.resolve=nt,e},t.raise=function(t,e){function n(t){}return n.type="xstate.raise",n.event=t,n.id=e?.id,n.delay=e?.delay,n.resolve=Z,n.execute=tt,n},t.sendParent=p,t.sendTo=l,t.stop=function(t){function e(t){}return e.type="xstate.stop",e.actorRef=t,e.resolve=X,e.execute=F,e},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=xstate-actions.umd.min.js.map
|