@rotorsoft/act 2.1.15 → 2.1.16

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/dist/index.cjs CHANGED
@@ -1152,6 +1152,11 @@ function wrapped(schema) {
1152
1152
  return inner ? [inner] : [];
1153
1153
  }
1154
1154
  _chunkLA2BPKNScjs.__name.call(void 0, wrapped, "wrapped");
1155
+ function parts_of(schema) {
1156
+ const def = def_of(schema);
1157
+ return _optionalChain([def, 'optionalAccess', _52 => _52.type]) === "intersection" ? [def.left, def.right] : wrapped(schema);
1158
+ }
1159
+ _chunkLA2BPKNScjs.__name.call(void 0, parts_of, "parts_of");
1155
1160
  function some_layer(schema, test) {
1156
1161
  const seen = /* @__PURE__ */ new Set();
1157
1162
  const visit = /* @__PURE__ */ _chunkLA2BPKNScjs.__name.call(void 0, (s) => {
@@ -1180,7 +1185,7 @@ _chunkLA2BPKNScjs.__name.call(void 0, output_of, "output_of");
1180
1185
 
1181
1186
  // src/internal/date-reviver.ts
1182
1187
  function variant_schema(schema, walk) {
1183
- const shape = _optionalChain([def_of, 'call', _52 => _52(schema), 'optionalAccess', _53 => _53.shape]);
1188
+ const shape = _optionalChain([def_of, 'call', _53 => _53(schema), 'optionalAccess', _54 => _54.shape]);
1184
1189
  if (!shape) {
1185
1190
  const dates = walk(schema);
1186
1191
  return { schema: _nullishCoalesce(dates, () => ( schema)), dated: !!dates };
@@ -1254,7 +1259,7 @@ function build(schema, walk) {
1254
1259
  return variants.some((v) => v.dated) ? _zod2.z.union(variants.map((v) => v.schema)) : void 0;
1255
1260
  }
1256
1261
  case "nullable":
1257
- return _optionalChain([inner, 'call', _54 => _54(), 'optionalAccess', _55 => _55.nullable, 'call', _56 => _56()]);
1262
+ return _optionalChain([inner, 'call', _55 => _55(), 'optionalAccess', _56 => _56.nullable, 'call', _57 => _57()]);
1258
1263
  case "pipe":
1259
1264
  return walk(def.out);
1260
1265
  case "lazy":
@@ -1273,7 +1278,7 @@ _chunkLA2BPKNScjs.__name.call(void 0, build, "build");
1273
1278
  // src/internal/event-sourcing.ts
1274
1279
  var bare_patch = /* @__PURE__ */ _chunkLA2BPKNScjs.__name.call(void 0, (_me, state2, partial) => _actpatch.patch.call(void 0, state2, partial), "bare_patch");
1275
1280
  var value_at = /* @__PURE__ */ _chunkLA2BPKNScjs.__name.call(void 0, (value, path) => path.reduce(
1276
- (at, key) => _optionalChain([at, 'optionalAccess', _57 => _57[key]]),
1281
+ (at, key) => _optionalChain([at, 'optionalAccess', _58 => _58[key]]),
1277
1282
  value
1278
1283
  ), "value_at");
1279
1284
  var check_invariants = /* @__PURE__ */ _chunkLA2BPKNScjs.__name.call(void 0, (target, state2, schema, pii_aware) => {
@@ -1423,11 +1428,11 @@ async function scan(source, opts = {}, callback) {
1423
1428
  return;
1424
1429
  }
1425
1430
  let migrated = event;
1426
- const migration = _optionalChain([event_migrations, 'optionalAccess', _58 => _58[event.name]]);
1431
+ const migration = _optionalChain([event_migrations, 'optionalAccess', _59 => _59[event.name]]);
1427
1432
  if (migration) {
1428
- const revived = _optionalChain([migration_dates, 'access', _59 => _59.get, 'call', _60 => _60(event.name), 'optionalAccess', _61 => _61.safeParse, 'call', _62 => _62(event.data)]);
1433
+ const revived = _optionalChain([migration_dates, 'access', _60 => _60.get, 'call', _61 => _61(event.name), 'optionalAccess', _62 => _62.safeParse, 'call', _63 => _63(event.data)]);
1429
1434
  const old_data = migration.from_schema.parse(
1430
- _optionalChain([revived, 'optionalAccess', _63 => _63.success]) ? revived.data : event.data
1435
+ _optionalChain([revived, 'optionalAccess', _64 => _64.success]) ? revived.data : event.data
1431
1436
  );
1432
1437
  const new_data = migration.migrate(old_data);
1433
1438
  migration.to_schema.parse(new_data);
@@ -1465,7 +1470,7 @@ async function scan(source, opts = {}, callback) {
1465
1470
  // A cause missing from the source has no id in the new
1466
1471
  // log; its old id would name another event there.
1467
1472
  id: _nullishCoalesce(id_map.get(cause.id), () => ( -1)),
1468
- name: _nullishCoalesce(_optionalChain([event_migrations, 'optionalAccess', _64 => _64[cause.name], 'optionalAccess', _65 => _65.to]), () => ( cause.name)),
1473
+ name: _nullishCoalesce(_optionalChain([event_migrations, 'optionalAccess', _65 => _65[cause.name], 'optionalAccess', _66 => _66.to]), () => ( cause.name)),
1469
1474
  stream: stream_rename ? stream_rename(cause.stream) : cause.stream
1470
1475
  }
1471
1476
  }
@@ -1498,9 +1503,9 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1498
1503
  const seeded = time_travel && asOf.limit === void 0 && !asOf.created_after;
1499
1504
  const cached = time_travel ? void 0 : await _chunk3WHD4VPPcjs.cache.call(void 0, ).get(stream);
1500
1505
  const cache_hit = !!cached;
1501
- let state2 = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _66 => _66.state]), () => ( (me.init ? me.init() : {})));
1502
- let patches = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _67 => _67.patches]), () => ( 0));
1503
- let snaps = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _68 => _68.snaps]), () => ( 0));
1506
+ let state2 = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _67 => _67.state]), () => ( (me.init ? me.init() : {})));
1507
+ let patches = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _68 => _68.patches]), () => ( 0));
1508
+ let snaps = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _69 => _69.snaps]), () => ( 0));
1504
1509
  let replayed = 0;
1505
1510
  let event;
1506
1511
  await _chunk3WHD4VPPcjs.store.call(void 0, ).query(
@@ -1521,7 +1526,7 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1521
1526
  `Skipping unknown event "${String(event.name)}" on stream "${stream}" (id=${event.id}) \u2014 no reducer in state "${me.name}"`
1522
1527
  );
1523
1528
  }
1524
- _optionalChain([callback, 'optionalCall', _69 => _69({
1529
+ _optionalChain([callback, 'optionalCall', _70 => _70({
1525
1530
  event,
1526
1531
  state: state2,
1527
1532
  version: event.version,
@@ -1545,7 +1550,7 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1545
1550
  ) : time_travel ? asOf : { with_snaps: true }
1546
1551
  }
1547
1552
  );
1548
- const head_is_tombstone = _optionalChain([event, 'optionalAccess', _70 => _70.name]) === _chunkLA2BPKNScjs.TOMBSTONE_EVENT;
1553
+ const head_is_tombstone = _optionalChain([event, 'optionalAccess', _71 => _71.name]) === _chunkLA2BPKNScjs.TOMBSTONE_EVENT;
1549
1554
  if (replayed > 0 && !time_travel && event && !me.pii_aware && !head_is_tombstone) {
1550
1555
  await cache_put(stream, {
1551
1556
  stream,
@@ -1559,9 +1564,9 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1559
1564
  return {
1560
1565
  event,
1561
1566
  state: state2,
1562
- version: _nullishCoalesce(_nullishCoalesce(_optionalChain([event, 'optionalAccess', _71 => _71.version]), () => ( _optionalChain([cached, 'optionalAccess', _72 => _72.version]))), () => ( -1)),
1567
+ version: _nullishCoalesce(_nullishCoalesce(_optionalChain([event, 'optionalAccess', _72 => _72.version]), () => ( _optionalChain([cached, 'optionalAccess', _73 => _73.version]))), () => ( -1)),
1563
1568
  // Captured with `state`, so consumers never race a separate cache lookup.
1564
- id: _nullishCoalesce(_nullishCoalesce(_optionalChain([event, 'optionalAccess', _73 => _73.id]), () => ( _optionalChain([cached, 'optionalAccess', _74 => _74.event_id]))), () => ( -1)),
1569
+ id: _nullishCoalesce(_nullishCoalesce(_optionalChain([event, 'optionalAccess', _74 => _74.id]), () => ( _optionalChain([cached, 'optionalAccess', _75 => _75.event_id]))), () => ( -1)),
1565
1570
  patches,
1566
1571
  snaps,
1567
1572
  cache_hit,
@@ -1589,7 +1594,7 @@ async function load_others(loads, payload, own, actor, patch_fn, refuse) {
1589
1594
  void 0,
1590
1595
  patch_fn
1591
1596
  );
1592
- if (_optionalChain([snapshot, 'access', _75 => _75.event, 'optionalAccess', _76 => _76.name]) === _chunkLA2BPKNScjs.TOMBSTONE_EVENT)
1597
+ if (_optionalChain([snapshot, 'access', _76 => _76.event, 'optionalAccess', _77 => _77.name]) === _chunkLA2BPKNScjs.TOMBSTONE_EVENT)
1593
1598
  throw new (0, _chunkLA2BPKNScjs.StreamClosedError)(stream);
1594
1599
  return {
1595
1600
  state: l.state,
@@ -1605,12 +1610,12 @@ _chunkLA2BPKNScjs.__name.call(void 0, load_others, "load_others");
1605
1610
  async function action(me, action2, target, payload, options, patch_fn = bare_patch) {
1606
1611
  const { stream, expectedVersion, actor } = target;
1607
1612
  if (!stream) throw new Error("Missing target stream");
1608
- const reactingTo = _optionalChain([options, 'optionalAccess', _77 => _77.reactingTo]);
1609
- const correlator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _78 => _78.correlator]), () => ( default_correlator));
1613
+ const reactingTo = _optionalChain([options, 'optionalAccess', _78 => _78.reactingTo]);
1614
+ const correlator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _79 => _79.correlator]), () => ( default_correlator));
1610
1615
  const validated = _chunk3WHD4VPPcjs.validate.call(void 0, action2, payload, me.actions[action2]);
1611
- const opts = _optionalChain([me, 'access', _79 => _79.options, 'optionalAccess', _80 => _80[action2]]);
1612
- const max_retries = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _81 => _81.maxRetries]), () => ( 0));
1613
- const loads = _nullishCoalesce(_optionalChain([me, 'access', _82 => _82.loads, 'optionalAccess', _83 => _83[action2]]), () => ( []));
1616
+ const opts = _optionalChain([me, 'access', _80 => _80.options, 'optionalAccess', _81 => _81[action2]]);
1617
+ const max_retries = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _82 => _82.maxRetries]), () => ( 0));
1618
+ const loads = _nullishCoalesce(_optionalChain([me, 'access', _83 => _83.loads, 'optionalAccess', _84 => _84[action2]]), () => ( []));
1614
1619
  for (let attempt = 0; ; attempt++) {
1615
1620
  try {
1616
1621
  const snapshot = await load(
@@ -1619,7 +1624,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1619
1624
  void 0,
1620
1625
  patch_fn
1621
1626
  );
1622
- if (_optionalChain([snapshot, 'access', _84 => _84.event, 'optionalAccess', _85 => _85.name]) === _chunkLA2BPKNScjs.TOMBSTONE_EVENT)
1627
+ if (_optionalChain([snapshot, 'access', _85 => _85.event, 'optionalAccess', _86 => _86.name]) === _chunkLA2BPKNScjs.TOMBSTONE_EVENT)
1623
1628
  throw new (0, _chunkLA2BPKNScjs.StreamClosedError)(stream);
1624
1629
  const own = {
1625
1630
  state: me,
@@ -1643,9 +1648,9 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1643
1648
  )
1644
1649
  ) : [];
1645
1650
  const loaded = Object.fromEntries(
1646
- others.map((p, i) => [loads[i].name, _optionalChain([p, 'optionalAccess', _86 => _86.snapshot, 'access', _87 => _87.state])])
1651
+ others.map((p, i) => [loads[i].name, _optionalChain([p, 'optionalAccess', _87 => _87.snapshot, 'access', _88 => _88.state])])
1647
1652
  );
1648
- for (const { holds, description } of _nullishCoalesce(_optionalChain([me, 'access', _88 => _88.requires, 'optionalAccess', _89 => _89[action2]]), () => ( [])))
1653
+ for (const { holds, description } of _nullishCoalesce(_optionalChain([me, 'access', _89 => _89.requires, 'optionalAccess', _90 => _90[action2]]), () => ( [])))
1649
1654
  if (!holds(validated, snapshot.state, actor, loaded))
1650
1655
  throw new (0, _chunkLA2BPKNScjs.PreconditionError)(
1651
1656
  action2,
@@ -1677,10 +1682,10 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1677
1682
  `Action "${action2}" appends only to the streams it loads; it must append an event to its own stream too`
1678
1683
  );
1679
1684
  const appends = [own, ...others].filter(
1680
- (p) => !!_optionalChain([p, 'optionalAccess', _90 => _90.events, 'access', _91 => _91.length])
1685
+ (p) => !!_optionalChain([p, 'optionalAccess', _91 => _91.events, 'access', _92 => _92.length])
1681
1686
  );
1682
1687
  const meta = {
1683
- correlation: _optionalChain([reactingTo, 'optionalAccess', _92 => _92.meta, 'access', _93 => _93.correlation]) || correlator({
1688
+ correlation: _optionalChain([reactingTo, 'optionalAccess', _93 => _93.meta, 'access', _94 => _94.correlation]) || correlator({
1684
1689
  action: action2,
1685
1690
  state: me.name,
1686
1691
  stream,
@@ -1758,13 +1763,13 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1758
1763
  };
1759
1764
  });
1760
1765
  const last = appended.at(-1);
1761
- const snap_event = _optionalChain([owner, 'access', _94 => _94.snap, 'optionalCall', _95 => _95(last)]) ? await snap(last) : void 0;
1766
+ const snap_event = _optionalChain([owner, 'access', _95 => _95.snap, 'optionalCall', _96 => _96(last)]) ? await snap(last) : void 0;
1762
1767
  if (!owner.pii_aware)
1763
1768
  void cache_put(append.stream, {
1764
1769
  stream: append.stream,
1765
1770
  state: last.state,
1766
- version: _nullishCoalesce(_optionalChain([snap_event, 'optionalAccess', _96 => _96.version]), () => ( last.event.version)),
1767
- event_id: _nullishCoalesce(_optionalChain([snap_event, 'optionalAccess', _97 => _97.id]), () => ( last.event.id)),
1771
+ version: _nullishCoalesce(_optionalChain([snap_event, 'optionalAccess', _97 => _97.version]), () => ( last.event.version)),
1772
+ event_id: _nullishCoalesce(_optionalChain([snap_event, 'optionalAccess', _98 => _98.id]), () => ( last.event.id)),
1768
1773
  patches: snap_event ? 0 : last.patches,
1769
1774
  snaps: snap_event ? last.snaps + 1 : last.snaps
1770
1775
  });
@@ -1780,7 +1785,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1780
1785
  if (!(error instanceof _chunkLA2BPKNScjs.ConcurrencyError)) throw error;
1781
1786
  if (expectedVersion !== void 0 && error.stream === stream) throw error;
1782
1787
  if (attempt >= max_retries) throw error;
1783
- if (_optionalChain([opts, 'optionalAccess', _98 => _98.backoff])) {
1788
+ if (_optionalChain([opts, 'optionalAccess', _99 => _99.backoff])) {
1784
1789
  const delay_ms = compute_backoff_delay(attempt, opts.backoff);
1785
1790
  if (delay_ms > 0) await _chunk3WHD4VPPcjs.sleep.call(void 0, delay_ms);
1786
1791
  }
@@ -1836,9 +1841,9 @@ var as_of_marker = /* @__PURE__ */ _chunkLA2BPKNScjs.__name.call(void 0, (asOf)
1836
1841
  return parts.length ? ` (as-of ${parts.join(" ")})` : " (as-of)";
1837
1842
  }, "as_of_marker");
1838
1843
  var traced = /* @__PURE__ */ _chunkLA2BPKNScjs.__name.call(void 0, (inner, exit, entry) => (async (...args) => {
1839
- _optionalChain([entry, 'optionalCall', _99 => _99(...args)]);
1844
+ _optionalChain([entry, 'optionalCall', _100 => _100(...args)]);
1840
1845
  const result = await inner(...args);
1841
- _optionalChain([exit, 'optionalCall', _100 => _100(result, ...args)]);
1846
+ _optionalChain([exit, 'optionalCall', _101 => _101(result, ...args)]);
1842
1847
  return result;
1843
1848
  }), "traced");
1844
1849
  function build_es(logger, correlator = default_correlator, patch_fn = bare_patch) {
@@ -1847,7 +1852,7 @@ function build_es(logger, correlator = default_correlator, patch_fn = bare_patch
1847
1852
  action_name,
1848
1853
  target,
1849
1854
  payload,
1850
- { ...options, correlator: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _101 => _101.correlator]), () => ( correlator)) },
1855
+ { ...options, correlator: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _102 => _102.correlator]), () => ( correlator)) },
1851
1856
  patch_fn
1852
1857
  ), "bound_action");
1853
1858
  const bound_load = /* @__PURE__ */ _chunkLA2BPKNScjs.__name.call(void 0, (me, target, callback) => load(me, target, callback, patch_fn), "bound_load");
@@ -1922,7 +1927,7 @@ function build_drain(logger) {
1922
1927
  subscribe: logger.level !== "trace" ? subscribe : traced(subscribe, (result, streams) => {
1923
1928
  if (!result.subscribed) return;
1924
1929
  const lanes = new Set(streams.map((s) => _nullishCoalesce(s.lane, () => ( "default"))));
1925
- const uniform_lane = lanes.size === 1 ? _optionalChain([streams, 'access', _102 => _102[0], 'optionalAccess', _103 => _103.lane]) : void 0;
1930
+ const uniform_lane = lanes.size === 1 ? _optionalChain([streams, 'access', _103 => _103[0], 'optionalAccess', _104 => _104.lane]) : void 0;
1926
1931
  const data = streams.map(
1927
1932
  ({ stream, lane }) => uniform_lane || !lane || lane === "default" ? hue(C_STREAM, stream) : `${hue(C_STREAM, stream)}${dim(`[${lane}]`)}`
1928
1933
  ).join(" ");
@@ -1935,7 +1940,7 @@ function build_drain(logger) {
1935
1940
  _chunkLA2BPKNScjs.__name.call(void 0, build_drain, "build_drain");
1936
1941
  function trace_cycle(logger, leased, fetched, handled, acked, blocked) {
1937
1942
  if (logger.level !== "trace" || !leased.length) return;
1938
- const lane = _optionalChain([leased, 'access', _104 => _104[0], 'optionalAccess', _105 => _105.lane]);
1943
+ const lane = _optionalChain([leased, 'access', _105 => _105[0], 'optionalAccess', _106 => _106.lane]);
1939
1944
  const fetch_by_stream = new Map(fetched.map((f) => [f.stream, f]));
1940
1945
  const acked_by_stream = new Map(acked.map((a) => [a.stream, a.at]));
1941
1946
  const blocked_by_stream = new Map(blocked.map((b) => [b.stream, b.error]));
@@ -1944,8 +1949,8 @@ function trace_cycle(logger, leased, fetched, handled, acked, blocked) {
1944
1949
  );
1945
1950
  const detail = leased.map(({ stream, at, retry }) => {
1946
1951
  const f = fetch_by_stream.get(stream);
1947
- const key = _optionalChain([f, 'optionalAccess', _106 => _106.source]) ? `${hue(C_STREAM, stream)}${dim(`<-${f.source}`)}` : hue(C_STREAM, stream);
1948
- const events = _optionalChain([f, 'optionalAccess', _107 => _107.events, 'access', _108 => _108.length]) ? ` ${dim(
1952
+ const key = _optionalChain([f, 'optionalAccess', _107 => _107.source]) ? `${hue(C_STREAM, stream)}${dim(`<-${f.source}`)}` : hue(C_STREAM, stream);
1953
+ const events = _optionalChain([f, 'optionalAccess', _108 => _108.events, 'access', _109 => _109.length]) ? ` ${dim(
1949
1954
  `[${f.events.map(({ id, name }) => `#${id} ${String(name)}`).join(", ")}]`
1950
1955
  )}` : "";
1951
1956
  const acked_at = acked_by_stream.get(stream);
@@ -1974,7 +1979,7 @@ _chunkLA2BPKNScjs.__name.call(void 0, trace_cycle, "trace_cycle");
1974
1979
 
1975
1980
  // src/internal/drain-cycle.ts
1976
1981
  function budget_exhausted(lease, options, store_failing) {
1977
- if (store_failing || !_optionalChain([options, 'optionalAccess', _109 => _109.blockOnError]) || lease.retry <= options.maxRetries)
1982
+ if (store_failing || !_optionalChain([options, 'optionalAccess', _110 => _110.blockOnError]) || lease.retry <= options.maxRetries)
1978
1983
  return void 0;
1979
1984
  const error = `Blocking ${lease.stream} after ${lease.retry} claims with no acknowledged progress \u2014 the retry budget (${options.maxRetries}) was spent without the handler ever reporting an error. That means every attempt lost its lease before it could ack: move the reaction to a lane whose leaseMillis covers the handler, then unblock the stream.`;
1980
1985
  _chunk3WHD4VPPcjs.log.call(void 0, ).error(error);
@@ -2042,7 +2047,7 @@ async function run_drain_cycle(deps, cycle) {
2042
2047
  const fetched = await ops.fetch(leased, eventLimit);
2043
2048
  const fetch_map = /* @__PURE__ */ new Map();
2044
2049
  const fetch_window_at = fetched.reduce(
2045
- (max, { at, events }) => Math.max(max, _optionalChain([events, 'access', _110 => _110.at, 'call', _111 => _111(-1), 'optionalAccess', _112 => _112.id]) || at),
2050
+ (max, { at, events }) => Math.max(max, _optionalChain([events, 'access', _111 => _111.at, 'call', _112 => _112(-1), 'optionalAccess', _113 => _113.id]) || at),
2046
2051
  0
2047
2052
  );
2048
2053
  for (const f of fetched) {
@@ -2106,11 +2111,11 @@ async function run_drain_cycle(deps, cycle) {
2106
2111
  deps.logger
2107
2112
  )
2108
2113
  );
2109
- const at = _optionalChain([entry, 'access', _113 => _113.fetch, 'access', _114 => _114.events, 'access', _115 => _115.at, 'call', _116 => _116(-1), 'optionalAccess', _117 => _117.id]) || fetch_window_at;
2114
+ const at = _optionalChain([entry, 'access', _114 => _114.fetch, 'access', _115 => _115.events, 'access', _116 => _116.at, 'call', _117 => _117(-1), 'optionalAccess', _118 => _118.id]) || fetch_window_at;
2110
2115
  const { payloads } = entry;
2111
2116
  const exhausted = budget_exhausted(
2112
2117
  lease,
2113
- _optionalChain([payloads, 'access', _118 => _118[0], 'optionalAccess', _119 => _119.options]),
2118
+ _optionalChain([payloads, 'access', _119 => _119[0], 'optionalAccess', _120 => _120.options]),
2114
2119
  store_failing
2115
2120
  );
2116
2121
  if (exhausted) return Promise.resolve(exhausted);
@@ -2200,7 +2205,7 @@ var DrainController = (_class3 = class {
2200
2205
  }
2201
2206
  /** This lane's configured lease, or `undefined`; the shutdown grace basis. */
2202
2207
  get lease_millis() {
2203
- return _optionalChain([this, 'access', _120 => _120._deps, 'access', _121 => _121.defaults, 'optionalAccess', _122 => _122.leaseMillis]);
2208
+ return _optionalChain([this, 'access', _121 => _121._deps, 'access', _122 => _122.defaults, 'optionalAccess', _123 => _123.leaseMillis]);
2204
2209
  }
2205
2210
  get lane() {
2206
2211
  return this._deps.lane;
@@ -2329,11 +2334,11 @@ var CloseSignal = class extends Error {
2329
2334
  constructor(opts) {
2330
2335
  super("reaction requested close");
2331
2336
  this.name = "CloseSignal";
2332
- this.stream = _optionalChain([opts, 'optionalAccess', _123 => _123.stream]);
2333
- this.archive = _optionalChain([opts, 'optionalAccess', _124 => _124.archive]);
2334
- this.at = _optionalChain([opts, 'optionalAccess', _125 => _125.at]);
2335
- this.before = _optionalChain([opts, 'optionalAccess', _126 => _126.before]);
2336
- this.defer = _optionalChain([opts, 'optionalAccess', _127 => _127.defer]);
2337
+ this.stream = _optionalChain([opts, 'optionalAccess', _124 => _124.stream]);
2338
+ this.archive = _optionalChain([opts, 'optionalAccess', _125 => _125.archive]);
2339
+ this.at = _optionalChain([opts, 'optionalAccess', _126 => _126.at]);
2340
+ this.before = _optionalChain([opts, 'optionalAccess', _127 => _127.before]);
2341
+ this.defer = _optionalChain([opts, 'optionalAccess', _128 => _128.defer]);
2337
2342
  }
2338
2343
  };
2339
2344
  function build_handle(deps) {
@@ -2387,7 +2392,7 @@ function build_handle(deps) {
2387
2392
  // Advance to the live head the handler evaluated against (when
2388
2393
  // provided) so the close-cycle guard sees this reaction caught up.
2389
2394
  acked_at: _nullishCoalesce(error.at, () => ( event.id)),
2390
- defer: _optionalChain([error, 'access', _128 => _128.defer, 'optionalAccess', _129 => _129.getTime, 'call', _130 => _130()]),
2395
+ defer: _optionalChain([error, 'access', _129 => _129.defer, 'optionalAccess', _130 => _130.getTime, 'call', _131 => _131()]),
2391
2396
  // Close the signalled stream (the autoclose reaction's aggregate,
2392
2397
  // which differs from its synthetic lease stream); a self-closing
2393
2398
  // user reaction omits it and closes its own lease stream. A
@@ -2520,7 +2525,7 @@ function synthesize_autoclose_reactions(registry, states, read_window) {
2520
2525
  };
2521
2526
  const key = `__autoclose_${st.name}`;
2522
2527
  for (const event_name of Object.keys(st.events)) {
2523
- _optionalChain([registry, 'access', _131 => _131.events, 'access', _132 => _132[event_name], 'optionalAccess', _133 => _133.reactions, 'access', _134 => _134.set, 'call', _135 => _135(
2528
+ _optionalChain([registry, 'access', _132 => _132.events, 'access', _133 => _133[event_name], 'optionalAccess', _134 => _134.reactions, 'access', _135 => _135.set, 'call', _136 => _136(
2524
2529
  key,
2525
2530
  reaction
2526
2531
  )]);
@@ -2581,7 +2586,7 @@ async function run_close_cycle(targets, deps) {
2581
2586
  () => run_full_closes(full, target_map, deps, skipped)
2582
2587
  );
2583
2588
  const retired = [...truncated.entries()].filter(([, r]) => r.committed.name === _chunkLA2BPKNScjs.TOMBSTONE_EVENT).map(([stream]) => stream);
2584
- if (retired.length) _optionalChain([deps, 'access', _136 => _136.forget_subscribed, 'optionalCall', _137 => _137(retired)]);
2589
+ if (retired.length) _optionalChain([deps, 'access', _137 => _137.forget_subscribed, 'optionalCall', _138 => _138(retired)]);
2585
2590
  for (const [stream, entry] of windowed_result) truncated.set(stream, entry);
2586
2591
  return { truncated, skipped };
2587
2592
  }
@@ -2603,7 +2608,7 @@ async function run_full_closes(full, target_map, deps, skipped) {
2603
2608
  const info = stream_info.get(target.stream);
2604
2609
  if (!info) continue;
2605
2610
  const owner = deps.event_to_state.get(info.last_event_name);
2606
- if (_optionalChain([owner, 'optionalAccess', _138 => _138.pii_aware])) {
2611
+ if (_optionalChain([owner, 'optionalAccess', _139 => _139.pii_aware])) {
2607
2612
  deps.logger.error(
2608
2613
  `Refusing to close "${target.stream}" with restart: state "${owner.name}" carries sensitive fields, so a restart seed would persist redacted values while deleting the originals. Close it without restart to retire the stream, or leave it open.`
2609
2614
  );
@@ -2734,8 +2739,8 @@ async function scan_stream_heads(streams) {
2734
2739
  const true_heads = await _chunk3WHD4VPPcjs.store.call(void 0, ).query_stats(streams, {});
2735
2740
  const out = /* @__PURE__ */ new Map();
2736
2741
  for (const [stream, { head }] of domain_heads) {
2737
- const marker_head = _optionalChain([stats, 'access', _139 => _139.get, 'call', _140 => _140(stream), 'optionalAccess', _141 => _141.head]);
2738
- const interrupted = _optionalChain([marker_head, 'optionalAccess', _142 => _142.name]) === _chunkLA2BPKNScjs.TOMBSTONE_EVENT;
2742
+ const marker_head = _optionalChain([stats, 'access', _140 => _140.get, 'call', _141 => _141(stream), 'optionalAccess', _142 => _142.head]);
2743
+ const interrupted = _optionalChain([marker_head, 'optionalAccess', _143 => _143.name]) === _chunkLA2BPKNScjs.TOMBSTONE_EVENT;
2739
2744
  out.set(stream, {
2740
2745
  max_id: head.id,
2741
2746
  version: true_heads.get(stream).head.version,
@@ -2806,7 +2811,7 @@ _chunkLA2BPKNScjs.__name.call(void 0, guard_with_tombstones, "guard_with_tombsto
2806
2811
  async function load_restart_seeds(guarded, target_map, stream_info, event_to_state, load2, logger) {
2807
2812
  const seed_states = /* @__PURE__ */ new Map();
2808
2813
  await Promise.all(
2809
- guarded.filter((s) => _optionalChain([target_map, 'access', _143 => _143.get, 'call', _144 => _144(s), 'optionalAccess', _145 => _145.restart])).map(async (stream) => {
2814
+ guarded.filter((s) => _optionalChain([target_map, 'access', _144 => _144.get, 'call', _145 => _145(s), 'optionalAccess', _146 => _146.restart])).map(async (stream) => {
2810
2815
  const last_event_name = stream_info.get(stream).last_event_name;
2811
2816
  const owner_state = event_to_state.get(last_event_name);
2812
2817
  if (!owner_state) {
@@ -2824,7 +2829,7 @@ async function load_restart_seeds(guarded, target_map, stream_info, event_to_sta
2824
2829
  _chunkLA2BPKNScjs.__name.call(void 0, load_restart_seeds, "load_restart_seeds");
2825
2830
  async function run_archive_callbacks(guarded, target_map) {
2826
2831
  for (const stream of guarded) {
2827
- const archive_fn = _optionalChain([target_map, 'access', _146 => _146.get, 'call', _147 => _147(stream), 'optionalAccess', _148 => _148.archive]);
2832
+ const archive_fn = _optionalChain([target_map, 'access', _147 => _147.get, 'call', _148 => _148(stream), 'optionalAccess', _149 => _149.archive]);
2828
2833
  if (archive_fn) await archive_fn();
2829
2834
  }
2830
2835
  }
@@ -2832,7 +2837,7 @@ _chunkLA2BPKNScjs.__name.call(void 0, run_archive_callbacks, "run_archive_callba
2832
2837
  async function heads_still_guarded(guarded, guard_events, skipped) {
2833
2838
  const heads = await _chunk3WHD4VPPcjs.store.call(void 0, ).query_stats(guarded, {});
2834
2839
  return guarded.filter((stream) => {
2835
- if (_optionalChain([heads, 'access', _149 => _149.get, 'call', _150 => _150(stream), 'optionalAccess', _151 => _151.head, 'access', _152 => _152.id]) === guard_events.get(stream).id)
2840
+ if (_optionalChain([heads, 'access', _150 => _150.get, 'call', _151 => _151(stream), 'optionalAccess', _152 => _152.head, 'access', _153 => _153.id]) === guard_events.get(stream).id)
2836
2841
  return true;
2837
2842
  skipped.push(stream);
2838
2843
  return false;
@@ -2985,7 +2990,7 @@ var CorrelateCycle = (_class5 = class {
2985
2990
  lane
2986
2991
  });
2987
2992
  }
2988
- await _optionalChain([this, 'access', _153 => _153._on_init, 'optionalCall', _154 => _154()]);
2993
+ await _optionalChain([this, 'access', _154 => _154._on_init, 'optionalCall', _155 => _155()]);
2989
2994
  }
2990
2995
  /**
2991
2996
  * Replace the log with no pass in flight, then cold-start: a pass that
@@ -3110,8 +3115,8 @@ var CorrelateCycle = (_class5 = class {
3110
3115
  correlated_at: void 0
3111
3116
  };
3112
3117
  const seen_in_scan = correlated.has(resolved.target);
3113
- const held_lane = _nullishCoalesce((seen_in_scan ? entry.lane : _optionalChain([recorded, 'optionalAccess', _155 => _155.lane])), () => ( _chunkLA2BPKNScjs.DEFAULT_LANE));
3114
- const held_priority = seen_in_scan ? entry.priority : _optionalChain([recorded, 'optionalAccess', _156 => _156.priority]);
3118
+ const held_lane = _nullishCoalesce((seen_in_scan ? entry.lane : _optionalChain([recorded, 'optionalAccess', _156 => _156.lane])), () => ( _chunkLA2BPKNScjs.DEFAULT_LANE));
3119
+ const held_priority = seen_in_scan ? entry.priority : _optionalChain([recorded, 'optionalAccess', _157 => _157.priority]);
3115
3120
  const resolved_lane = _nullishCoalesce(lane, () => ( _chunkLA2BPKNScjs.DEFAULT_LANE));
3116
3121
  if (held_priority === priority && held_lane !== resolved_lane)
3117
3122
  report_lane_conflict(
@@ -3166,7 +3171,7 @@ var CorrelateCycle = (_class5 = class {
3166
3171
  ).length;
3167
3172
  this._checkpoint = last_id;
3168
3173
  for (const { stream, priority, lane } of streams) {
3169
- if (_optionalChain([correlated, 'access', _157 => _157.get, 'call', _158 => _158(stream), 'optionalAccess', _159 => _159.upgraded]))
3174
+ if (_optionalChain([correlated, 'access', _158 => _158.get, 'call', _159 => _159(stream), 'optionalAccess', _160 => _160.upgraded]))
3170
3175
  this._dynamic_subscriptions.set(stream, {
3171
3176
  priority,
3172
3177
  lane
@@ -3413,7 +3418,7 @@ var SettleLoop = (_class6 = class {
3413
3418
  this._pending = true;
3414
3419
  return;
3415
3420
  }
3416
- const delay = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _160 => _160.debounceMs]), () => ( this._default_debounce_ms));
3421
+ const delay = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _161 => _161.debounceMs]), () => ( this._default_debounce_ms));
3417
3422
  const due = Date.now() + delay;
3418
3423
  if (this._timer) {
3419
3424
  if (due >= this._due) return;
@@ -3663,7 +3668,7 @@ var Act = (_class7 = class {
3663
3668
  // Apps that declare no lanes pass no lane filter to `claim`.
3664
3669
  _build_drain_controllers(options, lanes, handle, handle_batch) {
3665
3670
  const all_lanes = this._declared_lanes;
3666
- const only_set = _optionalChain([options, 'access', _161 => _161.onlyLanes, 'optionalAccess', _162 => _162.length]) ? new Set(options.onlyLanes) : void 0;
3671
+ const only_set = _optionalChain([options, 'access', _162 => _162.onlyLanes, 'optionalAccess', _163 => _163.length]) ? new Set(options.onlyLanes) : void 0;
3667
3672
  const active_lanes = only_set ? all_lanes.filter((n) => only_set.has(n)) : all_lanes;
3668
3673
  const single_default_lane = lanes.length === 0;
3669
3674
  const controllers = /* @__PURE__ */ new Map();
@@ -3700,7 +3705,7 @@ var Act = (_class7 = class {
3700
3705
  leaseMillis: cfg.leaseMillis
3701
3706
  }
3702
3707
  });
3703
- if (_optionalChain([cfg, 'optionalAccess', _163 => _163.cycleMs]) !== void 0 && this._drain)
3708
+ if (_optionalChain([cfg, 'optionalAccess', _164 => _164.cycleMs]) !== void 0 && this._drain)
3704
3709
  controller.start(cfg.cycleMs);
3705
3710
  controllers.set(name, controller);
3706
3711
  }
@@ -3752,7 +3757,7 @@ var Act = (_class7 = class {
3752
3757
  await walk_streams(_chunk3WHD4VPPcjs.store.call(void 0, ), (pos) => {
3753
3758
  if (pos.deferred_at === void 0 || pos.deferred_at <= now) return;
3754
3759
  const controller = this._drain_controllers.get(_nullishCoalesce(pos.lane, () => ( "default")));
3755
- _optionalChain([controller, 'optionalAccess', _164 => _164.seed_defer, 'call', _165 => _165(pos.stream, pos.deferred_at)]);
3760
+ _optionalChain([controller, 'optionalAccess', _165 => _165.seed_defer, 'call', _166 => _166(pos.stream, pos.deferred_at)]);
3756
3761
  });
3757
3762
  }
3758
3763
  _build_settle(options) {
@@ -3793,7 +3798,7 @@ var Act = (_class7 = class {
3793
3798
  for (const c of this._drain_controllers.values()) c.stop();
3794
3799
  const disposer = await this._notify_disposer;
3795
3800
  if (disposer) await disposer();
3796
- await this._await_inflight(_optionalChain([options, 'optionalAccess', _166 => _166.graceMs]));
3801
+ await this._await_inflight(_optionalChain([options, 'optionalAccess', _167 => _167.graceMs]));
3797
3802
  await this._scoped(() => this._correlate.release_correlation());
3798
3803
  this._emitter.removeAllListeners();
3799
3804
  })();
@@ -3890,8 +3895,8 @@ var Act = (_class7 = class {
3890
3895
  * @see {@link ValidationError}, {@link PreconditionError}, {@link ConcurrencyError}
3891
3896
  */
3892
3897
  async do(action2, target, payload, options) {
3893
- const reacting_to = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _167 => _167.reactingTo]), () => ( _chunk3WHD4VPPcjs.current_reacting.call(void 0, )));
3894
- const do_options = reacting_to === _optionalChain([options, 'optionalAccess', _168 => _168.reactingTo]) ? options : { ...options, reactingTo: reacting_to };
3898
+ const reacting_to = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _168 => _168.reactingTo]), () => ( _chunk3WHD4VPPcjs.current_reacting.call(void 0, )));
3899
+ const do_options = reacting_to === _optionalChain([options, 'optionalAccess', _169 => _169.reactingTo]) ? options : { ...options, reactingTo: reacting_to };
3895
3900
  return this._scoped(async () => {
3896
3901
  const snapshots = await this._es.action(
3897
3902
  this.registry.actions[action2],
@@ -3969,7 +3974,7 @@ var Act = (_class7 = class {
3969
3974
  const gated = this.registry.query_gate(e.name)(e);
3970
3975
  if (!first) first = gated;
3971
3976
  last = gated;
3972
- _optionalChain([callback, 'optionalCall', _169 => _169(gated)]);
3977
+ _optionalChain([callback, 'optionalCall', _170 => _170(gated)]);
3973
3978
  }, query);
3974
3979
  return { first, last, count };
3975
3980
  });
@@ -4090,7 +4095,7 @@ var Act = (_class7 = class {
4090
4095
  }
4091
4096
  if (to_arm.size === 0) return false;
4092
4097
  this._correlate.arm();
4093
- for (const lane of to_arm) _optionalChain([this, 'access', _170 => _170._drain_controllers, 'access', _171 => _171.get, 'call', _172 => _172(lane), 'optionalAccess', _173 => _173.arm, 'call', _174 => _174()]);
4098
+ for (const lane of to_arm) _optionalChain([this, 'access', _171 => _171._drain_controllers, 'access', _172 => _172.get, 'call', _173 => _173(lane), 'optionalAccess', _174 => _174.arm, 'call', _175 => _175()]);
4094
4099
  return true;
4095
4100
  }
4096
4101
  // In parallel, so a slow lane never holds up a fast one.
@@ -4213,7 +4218,7 @@ var Act = (_class7 = class {
4213
4218
  // and an extra clear costs one head load per stream.
4214
4219
  _reset_folds() {
4215
4220
  for (const handler of this._batch_handlers.values())
4216
- _optionalChain([handler, 'access', _175 => _175[FOLD_RESET], 'optionalCall', _176 => _176()]);
4221
+ _optionalChain([handler, 'access', _176 => _176[FOLD_RESET], 'optionalCall', _177 => _177()]);
4217
4222
  }
4218
4223
  /**
4219
4224
  * Reset reaction stream watermarks and settle them, replaying their
@@ -4385,7 +4390,7 @@ var Act = (_class7 = class {
4385
4390
  (p) => {
4386
4391
  positions.push(p);
4387
4392
  },
4388
- { blocked: true, after: _optionalChain([options, 'optionalAccess', _177 => _177.after]), limit: _optionalChain([options, 'optionalAccess', _178 => _178.limit]) }
4393
+ { blocked: true, after: _optionalChain([options, 'optionalAccess', _178 => _178.after]), limit: _optionalChain([options, 'optionalAccess', _179 => _179.limit]) }
4389
4394
  );
4390
4395
  return positions;
4391
4396
  });
@@ -4780,9 +4785,9 @@ function reaction_on(event, events, builder) {
4780
4785
  // `maxRetries`/`backoff`/`blockOnError` throws ZodError at build,
4781
4786
  // not a NaN gate on the first retry.
4782
4787
  options: _chunk3WHD4VPPcjs.check.call(void 0, "reaction", {
4783
- blockOnError: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _179 => _179.blockOnError]), () => ( _chunk3WHD4VPPcjs.DEFAULT_BLOCK_ON_ERROR)),
4784
- maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _180 => _180.maxRetries]), () => ( _chunk3WHD4VPPcjs.DEFAULT_MAX_RETRIES)),
4785
- backoff: _optionalChain([options, 'optionalAccess', _181 => _181.backoff])
4788
+ blockOnError: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _180 => _180.blockOnError]), () => ( _chunk3WHD4VPPcjs.DEFAULT_BLOCK_ON_ERROR)),
4789
+ maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _181 => _181.maxRetries]), () => ( _chunk3WHD4VPPcjs.DEFAULT_MAX_RETRIES)),
4790
+ backoff: _optionalChain([options, 'optionalAccess', _182 => _182.backoff])
4786
4791
  })
4787
4792
  };
4788
4793
  },
@@ -4804,24 +4809,19 @@ _chunkLA2BPKNScjs.__name.call(void 0, reaction_on, "reaction_on");
4804
4809
  var SENSITIVE = /* @__PURE__ */ Symbol.for("act.sensitive");
4805
4810
  var is_pii = /* @__PURE__ */ _chunkLA2BPKNScjs.__name.call(void 0, (schema) => some_layer(schema, (def) => def[SENSITIVE] === true), "is_pii");
4806
4811
  function pii_schemas(schema) {
4812
+ const fields = {};
4807
4813
  const shape = schema.shape;
4808
4814
  if (shape && typeof shape === "object") {
4809
- const fields = {};
4810
4815
  for (const key of Object.keys(shape))
4811
4816
  if (is_pii(shape[key])) fields[key] = shape[key];
4812
4817
  return fields;
4813
4818
  }
4814
4819
  const options = schema.options;
4815
- if (Array.isArray(options)) {
4816
- const fields = {};
4817
- for (const option of options)
4818
- for (const [key, field] of Object.entries(
4819
- pii_schemas(option)
4820
- ))
4821
- fields[key] ??= field;
4822
- return fields;
4823
- }
4824
- return {};
4820
+ const parts = Array.isArray(options) ? options : parts_of(schema);
4821
+ for (const part of parts)
4822
+ for (const [key, field] of Object.entries(pii_schemas(part)))
4823
+ fields[key] ??= field;
4824
+ return fields;
4825
4825
  }
4826
4826
  _chunkLA2BPKNScjs.__name.call(void 0, pii_schemas, "pii_schemas");
4827
4827
 
@@ -4955,7 +4955,7 @@ function build_events(registry, states, lanes, owners) {
4955
4955
  }
4956
4956
  _chunkLA2BPKNScjs.__name.call(void 0, build_events, "build_events");
4957
4957
  function reads_as_string(schema) {
4958
- const type = _optionalChain([def_of, 'call', _182 => _182(output_of(schema)), 'optionalAccess', _183 => _183.type]);
4958
+ const type = _optionalChain([def_of, 'call', _183 => _183(output_of(schema)), 'optionalAccess', _184 => _184.type]);
4959
4959
  return type === "string" || type === "transform";
4960
4960
  }
4961
4961
  _chunkLA2BPKNScjs.__name.call(void 0, reads_as_string, "reads_as_string");
@@ -5015,7 +5015,7 @@ function act() {
5015
5015
  let _built = false;
5016
5016
  const read_wrap = /* @__PURE__ */ _chunkLA2BPKNScjs.__name.call(void 0, (original) => {
5017
5017
  const wrapped2 = /* @__PURE__ */ _chunkLA2BPKNScjs.__name.call(void 0, async (events, stream) => {
5018
- const read = events.map((e) => _nullishCoalesce(_optionalChain([_hr, 'access', _184 => _184.get, 'call', _185 => _185(e.name), 'optionalCall', _186 => _186(e)]), () => ( e)));
5018
+ const read = events.map((e) => _nullishCoalesce(_optionalChain([_hr, 'access', _185 => _185.get, 'call', _186 => _186(e.name), 'optionalCall', _187 => _187(e)]), () => ( e)));
5019
5019
  return original(read, stream);
5020
5020
  }, "wrapped");
5021
5021
  const reset = original[FOLD_RESET];
@@ -5056,7 +5056,7 @@ function act() {
5056
5056
  });
5057
5057
  }
5058
5058
  for (const [action_name, handler] of Object.entries(state2.on)) {
5059
- const static_target = _optionalChain([handler, 'optionalAccess', _187 => _187._static_emit]);
5059
+ const static_target = _optionalChain([handler, 'optionalAccess', _188 => _188._static_emit]);
5060
5060
  if (static_target && deprecated.has(static_target)) {
5061
5061
  const current = current_version_of(static_target, event_names);
5062
5062
  throw new Error(
@@ -5128,7 +5128,7 @@ function act() {
5128
5128
  `State projection "${proj.target}" of "${fold.name}" is missing events ${missing.join(", ")} \u2014 pass every partial of the state to .of()`
5129
5129
  );
5130
5130
  const claimed = fold_specs.find((s) => s.target === proj.target);
5131
- if (_optionalChain([claimed, 'optionalAccess', _188 => _188.projection]) === proj) continue;
5131
+ if (_optionalChain([claimed, 'optionalAccess', _189 => _189.projection]) === proj) continue;
5132
5132
  if (batch_handlers.has(proj.target) || claimed)
5133
5133
  throw new Error(
5134
5134
  `Duplicate projection target "${proj.target}" \u2014 a target is served by one batch handler or one state projection, never both`
@@ -5162,7 +5162,7 @@ function act() {
5162
5162
  `Action "${action2}" loads "${l.state.name}", which is not registered \u2014 add it via withState/withSlice before build()`
5163
5163
  );
5164
5164
  const deprecated = l.events.find(
5165
- (e) => _optionalChain([_de, 'access', _189 => _189.get, 'call', _190 => _190(registered.name), 'optionalAccess', _191 => _191.has, 'call', _192 => _192(e)])
5165
+ (e) => _optionalChain([_de, 'access', _190 => _190.get, 'call', _191 => _191(registered.name), 'optionalAccess', _192 => _192.has, 'call', _193 => _193(e)])
5166
5166
  );
5167
5167
  if (deprecated)
5168
5168
  throw new Error(