aifsmjs 0.5.3 → 0.5.6

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 (58) hide show
  1. package/README.md +8 -4
  2. package/README_ZHTW.md +7 -5
  3. package/dist/chunk-2MME5V4F.cjs +384 -0
  4. package/dist/chunk-2MME5V4F.cjs.map +1 -0
  5. package/dist/chunk-3B2USJ3H.cjs +18 -0
  6. package/dist/chunk-3B2USJ3H.cjs.map +1 -0
  7. package/dist/chunk-A7U7QQL5.js +52 -0
  8. package/dist/chunk-A7U7QQL5.js.map +1 -0
  9. package/dist/chunk-CDK25FTD.cjs +59 -0
  10. package/dist/chunk-CDK25FTD.cjs.map +1 -0
  11. package/dist/chunk-FHTQ7LSQ.cjs +21 -0
  12. package/dist/chunk-FHTQ7LSQ.cjs.map +1 -0
  13. package/dist/chunk-I354FONA.cjs +153 -0
  14. package/dist/chunk-I354FONA.cjs.map +1 -0
  15. package/dist/chunk-JKZAOPQC.js +16 -0
  16. package/dist/chunk-JKZAOPQC.js.map +1 -0
  17. package/dist/chunk-NEJYZAKR.js +19 -0
  18. package/dist/chunk-NEJYZAKR.js.map +1 -0
  19. package/dist/chunk-PZ5AY32C.js +9 -0
  20. package/dist/chunk-PZ5AY32C.js.map +1 -0
  21. package/dist/chunk-Q7SFCCGT.cjs +11 -0
  22. package/dist/chunk-Q7SFCCGT.cjs.map +1 -0
  23. package/dist/chunk-VZCSHTOI.js +374 -0
  24. package/dist/chunk-VZCSHTOI.js.map +1 -0
  25. package/dist/chunk-ZLQ7HZCE.js +142 -0
  26. package/dist/chunk-ZLQ7HZCE.js.map +1 -0
  27. package/dist/effects/index.cjs +8 -14
  28. package/dist/effects/index.cjs.map +1 -1
  29. package/dist/effects/index.js +5 -14
  30. package/dist/effects/index.js.map +1 -1
  31. package/dist/guards/index.cjs +9 -13
  32. package/dist/guards/index.cjs.map +1 -1
  33. package/dist/guards/index.js +8 -12
  34. package/dist/guards/index.js.map +1 -1
  35. package/dist/index.cjs +101 -591
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.js +5 -571
  38. package/dist/index.js.map +1 -1
  39. package/dist/inspect/index.cjs +2 -0
  40. package/dist/inspect/index.cjs.map +1 -1
  41. package/dist/inspect/index.js +2 -0
  42. package/dist/inspect/index.js.map +1 -1
  43. package/dist/pbt/index.cjs +26 -525
  44. package/dist/pbt/index.cjs.map +1 -1
  45. package/dist/pbt/index.d.cts +7 -3
  46. package/dist/pbt/index.d.ts +7 -3
  47. package/dist/pbt/index.js +12 -511
  48. package/dist/pbt/index.js.map +1 -1
  49. package/dist/replay/index.cjs +9 -195
  50. package/dist/replay/index.cjs.map +1 -1
  51. package/dist/replay/index.js +5 -198
  52. package/dist/replay/index.js.map +1 -1
  53. package/dist/timer/index.cjs +30 -9
  54. package/dist/timer/index.cjs.map +1 -1
  55. package/dist/timer/index.js +30 -9
  56. package/dist/timer/index.js.map +1 -1
  57. package/llms-full.txt +165 -8
  58. package/package.json +8 -6
package/dist/index.cjs CHANGED
@@ -1,598 +1,108 @@
1
1
  'use strict';
2
2
 
3
- // src/fsm/types.ts
4
- var RESET_EVENT_TYPE = "@@aifsmjs/RESET";
3
+ var chunk2MME5V4F_cjs = require('./chunk-2MME5V4F.cjs');
4
+ var chunkI354FONA_cjs = require('./chunk-I354FONA.cjs');
5
+ require('./chunk-3B2USJ3H.cjs');
6
+ var chunkCDK25FTD_cjs = require('./chunk-CDK25FTD.cjs');
7
+ require('./chunk-Q7SFCCGT.cjs');
5
8
 
6
- // src/fsm/evaluator.ts
7
- var UnknownGuardError = class extends Error {
8
- guardName;
9
- constructor(guardName) {
10
- super(`aifsmjs: guard "${guardName}" not found in implementations.guards`);
11
- this.name = "UnknownGuardError";
12
- this.guardName = guardName;
13
- }
14
- };
15
- var AsyncGuardError = class extends Error {
16
- guardName;
17
- constructor(guardName) {
18
- super(
19
- `aifsmjs: guard "${guardName}" must be sync; received a Promise. Async guards break determinism and replay. Move I/O into an effect.`
20
- );
21
- this.name = "AsyncGuardError";
22
- this.guardName = guardName;
23
- }
24
- };
25
- function isAsyncGuardFn(fn) {
26
- if (typeof fn !== "function") return false;
27
- return fn.constructor?.name === "AsyncFunction";
28
- }
29
- function isThenable(x) {
30
- return x !== null && (typeof x === "object" || typeof x === "function") && typeof x.then === "function";
31
- }
32
- function resolveGuard(ref, impl) {
33
- if (typeof ref === "function") return ref;
34
- const fn = impl.guards?.[ref];
35
- if (!fn) throw new UnknownGuardError(ref);
36
- return fn;
37
- }
38
- function evalGuard(ref, context, event, impl, value) {
39
- const fn = resolveGuard(ref, impl);
40
- const guardName = typeof ref === "string" ? ref : fn.name || "<inline>";
41
- if (isAsyncGuardFn(fn)) {
42
- throw new AsyncGuardError(guardName);
43
- }
44
- const args = { context, event };
45
- const guardsMap = impl.guards;
46
- if (guardsMap) args.guards = guardsMap;
47
- if (value !== void 0) args.value = value;
48
- const result = fn(args);
49
- if (isThenable(result)) {
50
- throw new AsyncGuardError(guardName);
51
- }
52
- return result;
53
- }
54
9
 
55
- // src/fsm/resolver.ts
56
- function normalizeTransition(entry) {
57
- return typeof entry === "string" ? { target: entry } : entry;
58
- }
59
- function normalizeTransitions(entry) {
60
- if (entry === void 0) return [];
61
- if (Array.isArray(entry)) {
62
- return entry.some((t) => typeof t === "string") ? entry.map((t) => normalizeTransition(t)) : entry;
63
- }
64
- return [normalizeTransition(entry)];
65
- }
66
- function resolveTransitions(def, stateValue, eventType) {
67
- const state = def.states[stateValue];
68
- if (!state || !state.on) return [];
69
- return normalizeTransitions(state.on[eventType]);
70
- }
71
10
 
72
- // src/effects/enqueuer.ts
73
- function createEnqueuer(sink) {
74
- return Object.freeze({
75
- effect(type, payload) {
76
- if (payload === void 0) {
77
- sink.push(Object.freeze({ type }));
78
- } else {
79
- sink.push(Object.freeze({ type, payload }));
80
- }
81
- }
82
- });
83
- }
84
-
85
- // src/fsm/snapshot.ts
86
- var IS_DEV = typeof process !== "undefined" && typeof process.env !== "undefined" && process.env.NODE_ENV !== "production";
87
- function isPlainObject(value) {
88
- if (value === null || typeof value !== "object") return false;
89
- const proto = Object.getPrototypeOf(value);
90
- return proto === Object.prototype || proto === null;
91
- }
92
- function deepFreeze(value) {
93
- if (value === null || typeof value !== "object") return value;
94
- if (Object.isFrozen(value)) return value;
95
- Object.freeze(value);
96
- if (Array.isArray(value)) {
97
- for (const item of value) deepFreeze(item);
98
- } else if (isPlainObject(value)) {
99
- for (const key of Object.keys(value)) {
100
- deepFreeze(value[key]);
101
- }
102
- }
103
- return value;
104
- }
105
- function freezeSnapshot(snap) {
106
- return IS_DEV ? deepFreeze(snap) : Object.freeze(snap);
107
- }
108
- function createSnapshot(args) {
109
- return freezeSnapshot({
110
- value: args.value,
111
- context: args.context,
112
- status: args.status ?? "active"
113
- });
114
- }
115
-
116
- // src/fsm/updater.ts
117
- function isPlainRecord(value) {
118
- if (value === null || typeof value !== "object") return false;
119
- const proto = Object.getPrototypeOf(value);
120
- return proto === Object.prototype || proto === null;
121
- }
122
- function assign(updater) {
123
- return ({ context, event }) => updater({ context, event });
124
- }
125
- function mergeContext(current, patch) {
126
- if (patch === void 0 || patch === null) return current;
127
- if (isPlainRecord(current) && isPlainRecord(patch)) {
128
- return { ...current, ...patch };
129
- }
130
- return patch;
131
- }
132
-
133
- // src/fsm/lifecycle.ts
134
- var UnknownActionError = class extends Error {
135
- actionName;
136
- constructor(actionName) {
137
- super(`aifsmjs: action "${actionName}" not found in implementations.actions`);
138
- this.name = "UnknownActionError";
139
- this.actionName = actionName;
140
- }
141
- };
142
- function resolveAction(ref, impl) {
143
- if (typeof ref === "function") return ref;
144
- const fn = impl.actions?.[ref];
145
- if (!fn) throw new UnknownActionError(ref);
146
- return fn;
147
- }
148
- function runActions(refs, ctx, event, impl, effectSink) {
149
- if (!refs || refs.length === 0) return ctx;
150
- const enqueue = createEnqueuer(effectSink);
151
- let current = ctx;
152
- for (const ref of refs) {
153
- const fn = resolveAction(ref, impl);
154
- const patch = fn({ context: current, event, enqueue });
155
- current = mergeContext(current, patch);
156
- }
157
- return current;
158
- }
159
- function pickTransition(candidates, ctx, event, impl, value) {
160
- for (const t of candidates) {
161
- if (!t.guard) return t;
162
- if (evalGuard(t.guard, ctx, event, impl, value)) return t;
163
- }
164
- return void 0;
165
- }
166
- function step(def, snapshot, event, impl) {
167
- if (snapshot.status === "final") {
168
- return Object.freeze({ snapshot, effects: [], changed: false });
169
- }
170
- const state = def.states[snapshot.value];
171
- if (!state) {
172
- return Object.freeze({ snapshot, effects: [], changed: false });
173
- }
174
- const candidateList = normalizeTransitions(state.on?.[event.type]);
175
- const chosen = pickTransition(candidateList, snapshot.context, event, impl, snapshot.value);
176
- if (!chosen) {
177
- return Object.freeze({ snapshot, effects: [], changed: false });
178
- }
179
- const isExternal = chosen.target !== void 0;
180
- const nextStateValue = chosen.target ?? snapshot.value;
181
- const nextState = def.states[nextStateValue];
182
- const effectSink = [];
183
- let ctx = snapshot.context;
184
- if (isExternal) {
185
- ctx = runActions(state.exit, ctx, event, impl, effectSink);
186
- }
187
- ctx = runActions(chosen.actions, ctx, event, impl, effectSink);
188
- if (isExternal && nextState) {
189
- ctx = runActions(nextState.entry, ctx, event, impl, effectSink);
190
- }
191
- const status = nextState?.final === true ? "final" : "active";
192
- const nextSnapshot = freezeSnapshot({
193
- value: nextStateValue,
194
- context: ctx,
195
- status
196
- });
197
- return Object.freeze({
198
- snapshot: nextSnapshot,
199
- effects: Object.freeze(effectSink.slice()),
200
- changed: true
201
- });
202
- }
203
-
204
- // src/fsm/runtime.ts
205
- var RuntimeDisposedError = class extends Error {
206
- constructor() {
207
- super("aifsmjs: runtime has been disposed; send()/reset() are not allowed");
208
- this.name = "RuntimeDisposedError";
209
- }
210
- };
211
- var SubMachineError = class extends Error {
212
- parentState;
213
- phase;
214
- cause;
215
- constructor(parentState, phase, cause) {
216
- super(`aifsmjs: sub-machine ${phase} failed at parent state "${parentState}"`, { cause });
217
- this.name = "SubMachineError";
218
- this.parentState = parentState;
219
- this.phase = phase;
220
- this.cause = cause;
221
- }
222
- };
223
- var RESET_EVENT = Object.freeze({ type: RESET_EVENT_TYPE });
224
- function composeMiddleware(middleware) {
225
- return (ctx, finalNext) => {
226
- let index = -1;
227
- const dispatch = (i) => {
228
- if (i <= index) throw new Error("aifsmjs: next() called multiple times in middleware");
229
- index = i;
230
- const fn = middleware[i];
231
- if (!fn) {
232
- finalNext();
233
- return;
234
- }
235
- fn(ctx, () => dispatch(i + 1));
236
- };
237
- dispatch(0);
238
- };
239
- }
240
- function createRuntime(def, impl, opts = {}) {
241
- let snapshot = initialSnapshot(def);
242
- const listeners = /* @__PURE__ */ new Set();
243
- const middlewareChain = opts.middleware && opts.middleware.length > 0 ? composeMiddleware(opts.middleware) : void 0;
244
- const shouldDispatch = opts.dispatchEffects !== false;
245
- const controller = new AbortController();
246
- let disposed = false;
247
- let childRuntime;
248
- let childAbortCleanup;
249
- const eventListeners = {
250
- transition: /* @__PURE__ */ new Set(),
251
- error: /* @__PURE__ */ new Set(),
252
- dispose: /* @__PURE__ */ new Set()
253
- };
254
- const externalAbortCleanups = /* @__PURE__ */ new Set();
255
- function emit(type, payload) {
256
- for (const fn of eventListeners[type]) fn(payload);
257
- }
258
- function notify(committed) {
259
- const captured = committed ?? snapshot;
260
- for (const l of listeners) l(captured);
261
- }
262
- function runMiddleware(prev, event, effects, changed) {
263
- if (!middlewareChain) return;
264
- middlewareChain(deepFreeze({ prev, next: snapshot, event, effects, changed }), () => {
265
- });
266
- }
267
- function dispatchEffects(effects, context, event) {
268
- if (!impl.effects || effects.length === 0) return;
269
- for (const eff of effects) {
270
- const handler = impl.effects[eff.type];
271
- if (!handler) continue;
272
- const r = handler(eff, { context, event, signal: controller.signal });
273
- if (r instanceof Promise) {
274
- r.catch((err) => {
275
- emit("error", { error: err, event });
276
- });
277
- }
278
- }
279
- }
280
- function wireChildAbort(child) {
281
- if (controller.signal.aborted) {
282
- try {
283
- child.dispose();
284
- } catch {
285
- }
286
- return () => {
287
- };
288
- }
289
- const onAbort = () => {
290
- try {
291
- child.dispose();
292
- } catch {
293
- }
294
- };
295
- controller.signal.addEventListener("abort", onAbort, { once: true });
296
- return () => controller.signal.removeEventListener("abort", onAbort);
297
- }
298
- function findChosenIsExternal(value, event, context) {
299
- const state = def.states[value];
300
- if (!state?.on) return false;
301
- const list = normalizeTransitions(state.on[event.type]);
302
- if (list.length === 0) return false;
303
- for (const t of list) {
304
- if (!t.guard || evalGuard(t.guard, context, event, impl, value)) {
305
- return t.target !== void 0;
306
- }
307
- }
308
- return false;
309
- }
310
- function applySubLifecycle(prevValue, nextValue) {
311
- const prevStateDef = def.states[prevValue];
312
- const nextStateDef = def.states[nextValue];
313
- if (prevStateDef?.sub !== void 0 && childRuntime !== void 0) {
314
- const child = childRuntime;
315
- childRuntime = void 0;
316
- childAbortCleanup?.();
317
- childAbortCleanup = void 0;
318
- try {
319
- child.dispose();
320
- } catch (cause) {
321
- throw new SubMachineError(prevValue, "dispose", cause);
322
- }
323
- }
324
- if (nextStateDef?.sub !== void 0) {
325
- let newChild;
326
- try {
327
- newChild = createRuntime(nextStateDef.sub, nextStateDef.subImpl ?? {});
328
- } catch (cause) {
329
- throw new SubMachineError(nextValue, "init", cause);
330
- }
331
- childRuntime = newChild;
332
- childAbortCleanup = wireChildAbort(newChild);
333
- }
334
- }
335
- function send(event) {
336
- if (disposed) throw new RuntimeDisposedError();
337
- const prev = snapshot;
338
- const result = step(def, prev, event, impl);
339
- const isExternal = result.changed && (prev.value !== result.snapshot.value || findChosenIsExternal(prev.value, event, prev.context));
340
- if (result.changed && isExternal) applySubLifecycle(prev.value, result.snapshot.value);
341
- snapshot = result.snapshot;
342
- const committed = result.snapshot;
343
- runMiddleware(prev, event, result.effects, result.changed);
344
- if (shouldDispatch) dispatchEffects(result.effects, committed.context, event);
345
- if (result.changed) {
346
- notify(committed);
347
- emit("transition", {
348
- prev,
349
- next: committed,
350
- event,
351
- effects: result.effects,
352
- changed: true
353
- });
354
- }
355
- return snapshot;
356
- }
357
- function reset(event) {
358
- if (disposed) throw new RuntimeDisposedError();
359
- const prev = snapshot;
360
- const nextSnap = initialSnapshot(def);
361
- const changed = prev.value !== nextSnap.value;
362
- if (childRuntime) {
363
- const child = childRuntime;
364
- childRuntime = void 0;
365
- childAbortCleanup?.();
366
- childAbortCleanup = void 0;
367
- try {
368
- child.dispose();
369
- } catch (cause) {
370
- throw new SubMachineError(prev.value, "dispose", cause);
371
- }
372
- }
373
- const initStateDef = def.states[nextSnap.value];
374
- if (initStateDef?.sub) {
375
- let newChild;
376
- try {
377
- newChild = createRuntime(initStateDef.sub, initStateDef.subImpl ?? {});
378
- } catch (cause) {
379
- throw new SubMachineError(nextSnap.value, "init", cause);
380
- }
381
- childRuntime = newChild;
382
- childAbortCleanup = wireChildAbort(newChild);
383
- }
384
- snapshot = nextSnap;
385
- const triggerEvent = event ?? RESET_EVENT;
386
- runMiddleware(prev, triggerEvent, [], changed);
387
- if (changed) {
388
- notify();
389
- emit("transition", {
390
- prev,
391
- next: snapshot,
392
- event: triggerEvent,
393
- effects: [],
394
- changed: true
395
- });
396
- }
397
- return snapshot;
398
- }
399
- function can(event) {
400
- if (disposed || snapshot.status === "final") return false;
401
- const state = def.states[snapshot.value];
402
- if (!state) return false;
403
- const list = normalizeTransitions(state.on?.[event.type]);
404
- if (list.length === 0) return false;
405
- for (const t of list) {
406
- if (!t.guard) return true;
407
- if (evalGuard(t.guard, snapshot.context, event, impl, snapshot.value)) return true;
408
- }
409
- return false;
410
- }
411
- function on(type, listener, options) {
412
- if (disposed || options?.signal?.aborted) return () => {
413
- };
414
- const target = eventListeners[type];
415
- let detachAbort;
416
- const cleanup = () => {
417
- target.delete(wrapped);
418
- if (detachAbort) {
419
- detachAbort();
420
- externalAbortCleanups.delete(detachAbort);
421
- }
422
- };
423
- let wrapped = listener;
424
- if (options?.once) {
425
- wrapped = (payload) => {
426
- cleanup();
427
- listener(payload);
428
- };
429
- }
430
- target.add(wrapped);
431
- const signal = options?.signal;
432
- if (signal) {
433
- const onAbort = () => cleanup();
434
- signal.addEventListener("abort", onAbort, { once: true });
435
- detachAbort = () => signal.removeEventListener("abort", onAbort);
436
- externalAbortCleanups.add(detachAbort);
437
- }
438
- return cleanup;
439
- }
440
- function dispose() {
441
- if (disposed) return;
442
- disposed = true;
443
- if (childRuntime) {
444
- childAbortCleanup?.();
445
- childAbortCleanup = void 0;
446
- try {
447
- childRuntime.dispose();
448
- } catch {
449
- }
450
- childRuntime = void 0;
451
- }
452
- controller.abort();
453
- listeners.clear();
454
- emit("dispose", void 0);
455
- for (const set of Object.values(eventListeners)) set.clear();
456
- for (const cleanup of externalAbortCleanups) cleanup();
457
- externalAbortCleanups.clear();
458
- }
459
- const runtime = {
460
- getSnapshot: () => snapshot,
461
- snapshot: () => snapshot,
462
- send,
463
- can,
464
- reset,
465
- dispose,
466
- on,
467
- get disposed() {
468
- return disposed;
469
- },
470
- get signal() {
471
- return controller.signal;
472
- },
473
- subscribe(listener) {
474
- if (disposed) return () => {
475
- };
476
- listeners.add(listener);
477
- return () => listeners.delete(listener);
478
- },
479
- subRuntime: () => childRuntime,
480
- onTransition: (handler, options) => on("transition", handler, options)
481
- };
482
- const bootStateDef = def.states[snapshot.value];
483
- if (bootStateDef?.sub) {
484
- let newChild;
485
- try {
486
- newChild = createRuntime(bootStateDef.sub, bootStateDef.subImpl ?? {});
487
- } catch (cause) {
488
- throw new SubMachineError(snapshot.value, "init", cause);
489
- }
490
- childRuntime = newChild;
491
- childAbortCleanup = wireChildAbort(newChild);
492
- }
493
- return runtime;
494
- }
495
-
496
- // src/fsm/definition.ts
497
- var InvalidDefinitionError = class extends Error {
498
- constructor(message) {
499
- super(`aifsmjs: ${message}`);
500
- this.name = "InvalidDefinitionError";
501
- }
502
- };
503
- function validateDefinition(def) {
504
- if (!def.id || typeof def.id !== "string") {
505
- throw new InvalidDefinitionError("definition must have a non-empty string `id`");
506
- }
507
- if (!def.states || typeof def.states !== "object") {
508
- throw new InvalidDefinitionError("definition must have a `states` object");
509
- }
510
- const stateKeys = Object.keys(def.states);
511
- if (stateKeys.length === 0) {
512
- throw new InvalidDefinitionError("`states` must declare at least one state");
513
- }
514
- if (!def.initial || !stateKeys.includes(def.initial)) {
515
- throw new InvalidDefinitionError(
516
- `\`initial\` "${String(def.initial)}" is not declared in states (${stateKeys.join(", ")})`
517
- );
518
- }
519
- for (const [stateName, stateDef] of Object.entries(def.states)) {
520
- if (stateDef.sub !== void 0) {
521
- const sub = stateDef.sub;
522
- const subStates = sub.states;
523
- if (typeof sub !== "object" || sub === null || typeof subStates !== "object" || subStates === null || typeof sub.initial !== "string") {
524
- throw new InvalidDefinitionError(
525
- `state "${stateName}".sub is not a valid sub-machine definition (missing states or initial)`
526
- );
527
- }
528
- }
529
- if (!stateDef.on) continue;
530
- for (const [evtType, entry] of Object.entries(stateDef.on)) {
531
- const transitions = normalizeTransitions(entry);
532
- for (const t of transitions) {
533
- if (t.target !== void 0 && !stateKeys.includes(t.target)) {
534
- throw new InvalidDefinitionError(
535
- `transition ${stateName} -[${evtType}]-> "${String(t.target)}" targets an unknown state`
536
- );
537
- }
538
- if (t.guard !== void 0 && isAsyncGuardFn(t.guard)) {
539
- throw new InvalidDefinitionError(
540
- `transition ${stateName} -[${evtType}]-> uses an async guard. Guards must be sync; move I/O into an effect.`
541
- );
542
- }
543
- }
544
- }
545
- }
546
- }
547
- function defineMachine(def) {
548
- const normalized = !("context" in def) ? { ...def, context: {} } : def;
549
- validateDefinition(normalized);
550
- return normalized;
551
- }
552
- function setup() {
553
- return {
554
- defineMachine: (def) => {
555
- const cast = !("context" in def) ? { ...def, context: {} } : def;
556
- validateDefinition(cast);
557
- return cast;
558
- }
559
- };
560
- }
561
- function initialSnapshot(def) {
562
- const isFinal = def.states[def.initial]?.final === true;
563
- return freezeSnapshot({
564
- value: def.initial,
565
- context: def.context,
566
- status: isFinal ? "final" : "active"
567
- });
568
- }
569
- function createMachine(def, impl, opts) {
570
- return createRuntime(defineMachine(def), impl, opts ?? {});
571
- }
572
-
573
- exports.AsyncGuardError = AsyncGuardError;
574
- exports.InvalidDefinitionError = InvalidDefinitionError;
575
- exports.RESET_EVENT_TYPE = RESET_EVENT_TYPE;
576
- exports.RuntimeDisposedError = RuntimeDisposedError;
577
- exports.SubMachineError = SubMachineError;
578
- exports.UnknownActionError = UnknownActionError;
579
- exports.UnknownGuardError = UnknownGuardError;
580
- exports.assign = assign;
581
- exports.createMachine = createMachine;
582
- exports.createRuntime = createRuntime;
583
- exports.createSnapshot = createSnapshot;
584
- exports.deepFreeze = deepFreeze;
585
- exports.defineMachine = defineMachine;
586
- exports.evalGuard = evalGuard;
587
- exports.freezeSnapshot = freezeSnapshot;
588
- exports.initialSnapshot = initialSnapshot;
589
- exports.isAsyncGuardFn = isAsyncGuardFn;
590
- exports.mergeContext = mergeContext;
591
- exports.normalizeTransition = normalizeTransition;
592
- exports.normalizeTransitions = normalizeTransitions;
593
- exports.resolveGuard = resolveGuard;
594
- exports.resolveTransitions = resolveTransitions;
595
- exports.setup = setup;
596
- exports.step = step;
11
+ Object.defineProperty(exports, "InvalidDefinitionError", {
12
+ enumerable: true,
13
+ get: function () { return chunk2MME5V4F_cjs.InvalidDefinitionError; }
14
+ });
15
+ Object.defineProperty(exports, "RESET_EVENT_TYPE", {
16
+ enumerable: true,
17
+ get: function () { return chunk2MME5V4F_cjs.RESET_EVENT_TYPE; }
18
+ });
19
+ Object.defineProperty(exports, "RuntimeDisposedError", {
20
+ enumerable: true,
21
+ get: function () { return chunk2MME5V4F_cjs.RuntimeDisposedError; }
22
+ });
23
+ Object.defineProperty(exports, "SubMachineError", {
24
+ enumerable: true,
25
+ get: function () { return chunk2MME5V4F_cjs.SubMachineError; }
26
+ });
27
+ Object.defineProperty(exports, "createMachine", {
28
+ enumerable: true,
29
+ get: function () { return chunk2MME5V4F_cjs.createMachine; }
30
+ });
31
+ Object.defineProperty(exports, "createRuntime", {
32
+ enumerable: true,
33
+ get: function () { return chunk2MME5V4F_cjs.createRuntime; }
34
+ });
35
+ Object.defineProperty(exports, "defineMachine", {
36
+ enumerable: true,
37
+ get: function () { return chunk2MME5V4F_cjs.defineMachine; }
38
+ });
39
+ Object.defineProperty(exports, "initialSnapshot", {
40
+ enumerable: true,
41
+ get: function () { return chunk2MME5V4F_cjs.initialSnapshot; }
42
+ });
43
+ Object.defineProperty(exports, "setup", {
44
+ enumerable: true,
45
+ get: function () { return chunk2MME5V4F_cjs.setup; }
46
+ });
47
+ Object.defineProperty(exports, "UnknownActionError", {
48
+ enumerable: true,
49
+ get: function () { return chunkI354FONA_cjs.UnknownActionError; }
50
+ });
51
+ Object.defineProperty(exports, "assign", {
52
+ enumerable: true,
53
+ get: function () { return chunkI354FONA_cjs.assign; }
54
+ });
55
+ Object.defineProperty(exports, "createSnapshot", {
56
+ enumerable: true,
57
+ get: function () { return chunkI354FONA_cjs.createSnapshot; }
58
+ });
59
+ Object.defineProperty(exports, "deepFreeze", {
60
+ enumerable: true,
61
+ get: function () { return chunkI354FONA_cjs.deepFreeze; }
62
+ });
63
+ Object.defineProperty(exports, "freezeSnapshot", {
64
+ enumerable: true,
65
+ get: function () { return chunkI354FONA_cjs.freezeSnapshot; }
66
+ });
67
+ Object.defineProperty(exports, "mergeContext", {
68
+ enumerable: true,
69
+ get: function () { return chunkI354FONA_cjs.mergeContext; }
70
+ });
71
+ Object.defineProperty(exports, "normalizeTransition", {
72
+ enumerable: true,
73
+ get: function () { return chunkI354FONA_cjs.normalizeTransition; }
74
+ });
75
+ Object.defineProperty(exports, "normalizeTransitions", {
76
+ enumerable: true,
77
+ get: function () { return chunkI354FONA_cjs.normalizeTransitions; }
78
+ });
79
+ Object.defineProperty(exports, "resolveTransitions", {
80
+ enumerable: true,
81
+ get: function () { return chunkI354FONA_cjs.resolveTransitions; }
82
+ });
83
+ Object.defineProperty(exports, "step", {
84
+ enumerable: true,
85
+ get: function () { return chunkI354FONA_cjs.step; }
86
+ });
87
+ Object.defineProperty(exports, "AsyncGuardError", {
88
+ enumerable: true,
89
+ get: function () { return chunkCDK25FTD_cjs.AsyncGuardError; }
90
+ });
91
+ Object.defineProperty(exports, "UnknownGuardError", {
92
+ enumerable: true,
93
+ get: function () { return chunkCDK25FTD_cjs.UnknownGuardError; }
94
+ });
95
+ Object.defineProperty(exports, "evalGuard", {
96
+ enumerable: true,
97
+ get: function () { return chunkCDK25FTD_cjs.evalGuard; }
98
+ });
99
+ Object.defineProperty(exports, "isAsyncGuardFn", {
100
+ enumerable: true,
101
+ get: function () { return chunkCDK25FTD_cjs.isAsyncGuardFn; }
102
+ });
103
+ Object.defineProperty(exports, "resolveGuard", {
104
+ enumerable: true,
105
+ get: function () { return chunkCDK25FTD_cjs.resolveGuard; }
106
+ });
597
107
  //# sourceMappingURL=index.cjs.map
598
108
  //# sourceMappingURL=index.cjs.map