@moq/net 0.4.8 → 0.22.0
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/README.md +7 -1
- package/announce.d.ts +1 -1
- package/announce.d.ts.map +1 -1
- package/announce.js +1 -1
- package/announce.js.map +1 -1
- package/announced.d.ts +51 -47
- package/announced.d.ts.map +1 -1
- package/announced.js +183 -31
- package/announced.js.map +1 -1
- package/announced.test-util.d.ts +2 -0
- package/announced.test-util.d.ts.map +1 -0
- package/announced.test-util.js +27 -0
- package/announced.test-util.js.map +1 -0
- package/auth.d.ts +64 -0
- package/auth.d.ts.map +1 -0
- package/auth.js +20 -0
- package/auth.js.map +1 -0
- package/auth_gate.d.ts +2 -0
- package/auth_gate.d.ts.map +1 -0
- package/auth_gate.js +24 -0
- package/auth_gate.js.map +1 -0
- package/auth_session.d.ts +49 -0
- package/auth_session.d.ts.map +1 -0
- package/auth_session.js +1097 -0
- package/auth_session.js.map +1 -0
- package/bandwidth.d.ts +129 -25
- package/bandwidth.d.ts.map +1 -1
- package/bandwidth.js +410 -138
- package/bandwidth.js.map +1 -1
- package/bandwidth_api.d.ts +1 -1
- package/bandwidth_api.d.ts.map +1 -1
- package/bandwidth_api.js +1 -1
- package/bandwidth_api.js.map +1 -1
- package/broadcast.d.ts +62 -36
- package/broadcast.d.ts.map +1 -1
- package/broadcast.js +556 -172
- package/broadcast.js.map +1 -1
- package/cache.d.ts +103 -0
- package/cache.d.ts.map +1 -0
- package/cache.js +254 -0
- package/cache.js.map +1 -0
- package/claim.test-util.d.ts +5 -0
- package/claim.test-util.d.ts.map +1 -0
- package/claim.test-util.js +13 -0
- package/claim.test-util.js.map +1 -0
- package/connection/accept.d.ts +20 -12
- package/connection/accept.d.ts.map +1 -1
- package/connection/accept.js +97 -129
- package/connection/accept.js.map +1 -1
- package/connection/browser.d.ts.map +1 -1
- package/connection/browser.js +28 -19
- package/connection/browser.js.map +1 -1
- package/connection/connect.d.ts +119 -23
- package/connection/connect.d.ts.map +1 -1
- package/connection/connect.js +535 -216
- package/connection/connect.js.map +1 -1
- package/connection/dials.d.ts +45 -0
- package/connection/dials.d.ts.map +1 -0
- package/connection/dials.js +109 -0
- package/connection/dials.js.map +1 -0
- package/connection/endpoint.d.ts +60 -0
- package/connection/endpoint.d.ts.map +1 -0
- package/connection/endpoint.js +114 -0
- package/connection/endpoint.js.map +1 -0
- package/connection/forward.d.ts +7 -1
- package/connection/forward.d.ts.map +1 -1
- package/connection/forward.js +265 -80
- package/connection/forward.js.map +1 -1
- package/connection/goaway.d.ts +16 -9
- package/connection/goaway.d.ts.map +1 -1
- package/connection/goaway.js +22 -108
- package/connection/goaway.js.map +1 -1
- package/connection/handshake.d.ts +32 -6
- package/connection/handshake.d.ts.map +1 -1
- package/connection/handshake.js +97 -20
- package/connection/handshake.js.map +1 -1
- package/connection/index.d.ts +3 -6
- package/connection/index.d.ts.map +1 -1
- package/connection/index.js +1 -2
- package/connection/index.js.map +1 -1
- package/connection/liveness.d.ts +14 -0
- package/connection/liveness.d.ts.map +1 -0
- package/connection/liveness.js +30 -0
- package/connection/liveness.js.map +1 -0
- package/connection/pool.d.ts +137 -58
- package/connection/pool.d.ts.map +1 -1
- package/connection/pool.js +281 -117
- package/connection/pool.js.map +1 -1
- package/connection/reload.d.ts +60 -12
- package/connection/reload.d.ts.map +1 -1
- package/connection/reload.js +859 -233
- package/connection/reload.js.map +1 -1
- package/connection/session.d.ts +91 -0
- package/connection/session.d.ts.map +1 -0
- package/connection/session.js +2 -0
- package/connection/session.js.map +1 -0
- package/connection/stats.d.ts +20 -11
- package/connection/stats.d.ts.map +1 -1
- package/connection/stats.js +64 -8
- package/connection/stats.js.map +1 -1
- package/connection/ticker.d.ts +4 -0
- package/connection/ticker.d.ts.map +1 -0
- package/connection/ticker.js +66 -0
- package/connection/ticker.js.map +1 -0
- package/connection/tokens.d.ts +2 -0
- package/connection/tokens.d.ts.map +1 -0
- package/connection/tokens.js +404 -0
- package/connection/tokens.js.map +1 -0
- package/connection/transport.d.ts.map +1 -1
- package/connection/transport.js +4 -4
- package/connection/transport.js.map +1 -1
- package/connection/withdrawal.d.ts +2 -0
- package/connection/withdrawal.d.ts.map +1 -0
- package/connection/withdrawal.js +23 -0
- package/connection/withdrawal.js.map +1 -0
- package/consume.js +213 -46
- package/consume.js.map +1 -1
- package/cover.d.ts +59 -0
- package/cover.d.ts.map +1 -0
- package/cover.js +375 -0
- package/cover.js.map +1 -0
- package/datagram.d.ts +70 -11
- package/datagram.d.ts.map +1 -1
- package/datagram.js +317 -1
- package/datagram.js.map +1 -1
- package/datagram_stream.d.ts +18 -0
- package/datagram_stream.d.ts.map +1 -0
- package/datagram_stream.js +67 -0
- package/datagram_stream.js.map +1 -0
- package/defined.test-util.d.ts +2 -0
- package/defined.test-util.d.ts.map +1 -0
- package/defined.test-util.js +7 -0
- package/defined.test-util.js.map +1 -0
- package/delivered.d.ts +75 -0
- package/delivered.d.ts.map +1 -0
- package/delivered.js +228 -0
- package/delivered.js.map +1 -0
- package/demand.d.ts +173 -0
- package/demand.d.ts.map +1 -0
- package/demand.js +582 -0
- package/demand.js.map +1 -0
- package/drops.d.ts +93 -0
- package/drops.d.ts.map +1 -0
- package/drops.js +283 -0
- package/drops.js.map +1 -0
- package/error.d.ts +120 -21
- package/error.d.ts.map +1 -1
- package/error.js +230 -37
- package/error.js.map +1 -1
- package/errors.d.ts +2 -2
- package/errors.d.ts.map +1 -1
- package/errors.js +2 -2
- package/errors.js.map +1 -1
- package/fill.d.ts +174 -0
- package/fill.d.ts.map +1 -0
- package/fill.js +760 -0
- package/fill.js.map +1 -0
- package/flate/decoder.d.ts +2 -0
- package/flate/decoder.d.ts.map +1 -0
- package/flate/decoder.js +63 -0
- package/flate/decoder.js.map +1 -0
- package/flate/encoder.d.ts +2 -0
- package/flate/encoder.d.ts.map +1 -0
- package/flate/encoder.js +64 -0
- package/flate/encoder.js.map +1 -0
- package/flate/group.d.ts +34 -0
- package/flate/group.d.ts.map +1 -0
- package/flate/group.js +140 -0
- package/flate/group.js.map +1 -0
- package/frame.d.ts +80 -0
- package/frame.d.ts.map +1 -0
- package/frame.js +296 -0
- package/frame.js.map +1 -0
- package/frame.test-util.d.ts +5 -0
- package/frame.test-util.d.ts.map +1 -0
- package/frame.test-util.js +9 -0
- package/frame.test-util.js.map +1 -0
- package/group.d.ts +108 -45
- package/group.d.ts.map +1 -1
- package/group.js +1616 -307
- package/group.js.map +1 -1
- package/group_api.d.ts +7 -0
- package/group_api.d.ts.map +1 -0
- package/group_api.js +7 -0
- package/group_api.js.map +1 -0
- package/hop.d.ts +62 -76
- package/hop.d.ts.map +1 -1
- package/hop.js +92 -64
- package/hop.js.map +1 -1
- package/identity.d.ts +39 -0
- package/identity.d.ts.map +1 -0
- package/identity.js +47 -0
- package/identity.js.map +1 -0
- package/ietf/active_count.d.ts +2 -0
- package/ietf/active_count.d.ts.map +1 -0
- package/ietf/active_count.js +30 -0
- package/ietf/active_count.js.map +1 -0
- package/ietf/aliases.js +69 -35
- package/ietf/aliases.js.map +1 -1
- package/ietf/cluster.d.ts +3 -3
- package/ietf/cluster.js +14 -62
- package/ietf/cluster.js.map +1 -1
- package/ietf/connection.d.ts +1 -31
- package/ietf/connection.d.ts.map +1 -1
- package/ietf/connection.js +305 -143
- package/ietf/connection.js.map +1 -1
- package/ietf/datagram.d.ts +60 -0
- package/ietf/datagram.d.ts.map +1 -0
- package/ietf/datagram.js +152 -0
- package/ietf/datagram.js.map +1 -0
- package/ietf/error.d.ts +3 -3
- package/ietf/error.js +82 -100
- package/ietf/error.js.map +1 -1
- package/ietf/fetch.d.ts +91 -35
- package/ietf/fetch.d.ts.map +1 -1
- package/ietf/fetch.js +172 -93
- package/ietf/fetch.js.map +1 -1
- package/ietf/filter.d.ts +20 -30
- package/ietf/filter.d.ts.map +1 -1
- package/ietf/filter.js +140 -171
- package/ietf/filter.js.map +1 -1
- package/ietf/goaway.d.ts +11 -9
- package/ietf/goaway.d.ts.map +1 -1
- package/ietf/goaway.js +22 -35
- package/ietf/goaway.js.map +1 -1
- package/ietf/hidden.js +1 -1
- package/ietf/hidden.js.map +1 -1
- package/ietf/index.d.ts +2 -14
- package/ietf/index.d.ts.map +1 -1
- package/ietf/index.js +4 -14
- package/ietf/index.js.map +1 -1
- package/ietf/join.d.ts +7 -0
- package/ietf/join.d.ts.map +1 -0
- package/ietf/join.js +234 -0
- package/ietf/join.js.map +1 -0
- package/ietf/message.d.ts +18 -2
- package/ietf/message.d.ts.map +1 -1
- package/ietf/message.js +60 -40
- package/ietf/message.js.map +1 -1
- package/ietf/message.test-util.d.ts +6 -0
- package/ietf/message.test-util.d.ts.map +1 -0
- package/ietf/message.test-util.js +13 -0
- package/ietf/message.test-util.js.map +1 -0
- package/ietf/namespace.d.ts +17 -3
- package/ietf/namespace.d.ts.map +1 -1
- package/ietf/namespace.js +78 -26
- package/ietf/namespace.js.map +1 -1
- package/ietf/object.d.ts +194 -32
- package/ietf/object.d.ts.map +1 -1
- package/ietf/object.js +405 -178
- package/ietf/object.js.map +1 -1
- package/ietf/parameters.d.ts +22 -42
- package/ietf/parameters.d.ts.map +1 -1
- package/ietf/parameters.js +260 -472
- package/ietf/parameters.js.map +1 -1
- package/ietf/priority.d.ts +17 -2
- package/ietf/priority.d.ts.map +1 -1
- package/ietf/priority.js +19 -4
- package/ietf/priority.js.map +1 -1
- package/ietf/properties.d.ts +5 -4
- package/ietf/properties.d.ts.map +1 -1
- package/ietf/properties.js +78 -48
- package/ietf/properties.js.map +1 -1
- package/ietf/publish.d.ts +22 -30
- package/ietf/publish.d.ts.map +1 -1
- package/ietf/publish.js +45 -139
- package/ietf/publish.js.map +1 -1
- package/ietf/publish_namespace.d.ts +46 -69
- package/ietf/publish_namespace.d.ts.map +1 -1
- package/ietf/publish_namespace.js +66 -184
- package/ietf/publish_namespace.js.map +1 -1
- package/ietf/publisher.js +1800 -600
- package/ietf/publisher.js.map +1 -1
- package/ietf/range.d.ts +2 -0
- package/ietf/range.d.ts.map +1 -0
- package/ietf/range.js +222 -0
- package/ietf/range.js.map +1 -0
- package/ietf/request.d.ts +3 -27
- package/ietf/request.d.ts.map +1 -1
- package/ietf/request.js +41 -78
- package/ietf/request.js.map +1 -1
- package/ietf/request_stream.d.ts +1 -6
- package/ietf/request_stream.d.ts.map +1 -1
- package/ietf/request_stream.js +306 -16
- package/ietf/request_stream.js.map +1 -1
- package/ietf/session.d.ts +41 -0
- package/ietf/session.d.ts.map +1 -0
- package/ietf/session.js +65 -0
- package/ietf/session.js.map +1 -0
- package/ietf/setup.d.ts +4 -29
- package/ietf/setup.d.ts.map +1 -1
- package/ietf/setup.js +6 -117
- package/ietf/setup.js.map +1 -1
- package/ietf/setup_options.d.ts +31 -0
- package/ietf/setup_options.d.ts.map +1 -0
- package/ietf/setup_options.js +138 -0
- package/ietf/setup_options.js.map +1 -0
- package/ietf/solicit.js +4 -14
- package/ietf/solicit.js.map +1 -1
- package/ietf/subscribe.d.ts +48 -41
- package/ietf/subscribe.d.ts.map +1 -1
- package/ietf/subscribe.js +118 -239
- package/ietf/subscribe.js.map +1 -1
- package/ietf/subscribe_namespace.d.ts +13 -76
- package/ietf/subscribe_namespace.d.ts.map +1 -1
- package/ietf/subscribe_namespace.js +30 -201
- package/ietf/subscribe_namespace.js.map +1 -1
- package/ietf/subscriber.js +1839 -536
- package/ietf/subscriber.js.map +1 -1
- package/ietf/token.js +105 -27
- package/ietf/token.js.map +1 -1
- package/ietf/track.d.ts +25 -22
- package/ietf/track.d.ts.map +1 -1
- package/ietf/track.js +48 -61
- package/ietf/track.js.map +1 -1
- package/ietf/version.d.ts +13 -42
- package/ietf/version.d.ts.map +1 -1
- package/ietf/version.js +22 -48
- package/ietf/version.js.map +1 -1
- package/implementation.d.ts +2 -0
- package/implementation.d.ts.map +1 -0
- package/implementation.js +5 -0
- package/implementation.js.map +1 -0
- package/index.d.ts +25 -10
- package/index.d.ts.map +1 -1
- package/index.js +19 -6
- package/index.js.map +1 -1
- package/internal.d.ts +1512 -64
- package/internal.d.ts.map +1 -1
- package/internal.js +557 -79
- package/internal.js.map +1 -1
- package/ledger.d.ts +23 -0
- package/ledger.d.ts.map +1 -0
- package/ledger.js +247 -0
- package/ledger.js.map +1 -0
- package/listing.d.ts +132 -0
- package/listing.d.ts.map +1 -0
- package/listing.js +486 -0
- package/listing.js.map +1 -0
- package/lite/announce.d.ts +124 -63
- package/lite/announce.d.ts.map +1 -1
- package/lite/announce.js +384 -158
- package/lite/announce.js.map +1 -1
- package/lite/announce_stream.d.ts +2 -0
- package/lite/announce_stream.d.ts.map +1 -0
- package/lite/announce_stream.js +92 -0
- package/lite/announce_stream.js.map +1 -0
- package/lite/answer.d.ts +22 -0
- package/lite/answer.d.ts.map +1 -0
- package/lite/answer.js +301 -0
- package/lite/answer.js.map +1 -0
- package/lite/auth.d.ts +45 -0
- package/lite/auth.d.ts.map +1 -0
- package/lite/auth.js +204 -0
- package/lite/auth.js.map +1 -0
- package/lite/compat.d.ts +31 -0
- package/lite/compat.d.ts.map +1 -0
- package/lite/compat.js +86 -0
- package/lite/compat.js.map +1 -0
- package/lite/connection.d.ts +1 -45
- package/lite/connection.d.ts.map +1 -1
- package/lite/connection.js +360 -77
- package/lite/connection.js.map +1 -1
- package/lite/datagram-end.d.ts +26 -0
- package/lite/datagram-end.d.ts.map +1 -0
- package/lite/datagram-end.js +30 -0
- package/lite/datagram-end.js.map +1 -0
- package/lite/datagram.d.ts +73 -8
- package/lite/datagram.d.ts.map +1 -1
- package/lite/datagram.js +144 -9
- package/lite/datagram.js.map +1 -1
- package/lite/duration.d.ts +6 -0
- package/lite/duration.d.ts.map +1 -0
- package/lite/duration.js +14 -0
- package/lite/duration.js.map +1 -0
- package/lite/error.d.ts +9 -0
- package/lite/error.d.ts.map +1 -0
- package/lite/error.js +24 -0
- package/lite/error.js.map +1 -0
- package/lite/fills.d.ts +162 -0
- package/lite/fills.d.ts.map +1 -0
- package/lite/fills.js +486 -0
- package/lite/fills.js.map +1 -0
- package/lite/fit.d.ts +49 -0
- package/lite/fit.d.ts.map +1 -0
- package/lite/fit.js +305 -0
- package/lite/fit.js.map +1 -0
- package/lite/goaway.d.ts +1 -1
- package/lite/goaway.d.ts.map +1 -1
- package/lite/goaway.js +5 -13
- package/lite/goaway.js.map +1 -1
- package/lite/group.d.ts +64 -13
- package/lite/group.d.ts.map +1 -1
- package/lite/group.js +108 -30
- package/lite/group.js.map +1 -1
- package/lite/identity.d.ts +25 -0
- package/lite/identity.d.ts.map +1 -0
- package/lite/identity.js +79 -0
- package/lite/identity.js.map +1 -0
- package/lite/index.d.ts +2 -1
- package/lite/index.d.ts.map +1 -1
- package/lite/index.js +2 -1
- package/lite/index.js.map +1 -1
- package/lite/message.d.ts +9 -1
- package/lite/message.d.ts.map +1 -1
- package/lite/message.js +28 -44
- package/lite/message.js.map +1 -1
- package/lite/priority.d.ts +9 -2
- package/lite/priority.d.ts.map +1 -1
- package/lite/priority.js +11 -105
- package/lite/priority.js.map +1 -1
- package/lite/probe.d.ts.map +1 -1
- package/lite/probe.js +9 -0
- package/lite/probe.js.map +1 -1
- package/lite/publisher.d.ts +10 -1
- package/lite/publisher.d.ts.map +1 -1
- package/lite/publisher.js +2548 -437
- package/lite/publisher.js.map +1 -1
- package/lite/routed.d.ts +59 -0
- package/lite/routed.d.ts.map +1 -0
- package/lite/routed.js +564 -0
- package/lite/routed.js.map +1 -0
- package/lite/session.d.ts +1 -27
- package/lite/session.d.ts.map +1 -1
- package/lite/session.js +0 -99
- package/lite/session.js.map +1 -1
- package/lite/setup.d.ts +29 -2
- package/lite/setup.d.ts.map +1 -1
- package/lite/setup.js +95 -21
- package/lite/setup.js.map +1 -1
- package/lite/stream.d.ts +5 -11
- package/lite/stream.d.ts.map +1 -1
- package/lite/stream.js +5 -1
- package/lite/stream.js.map +1 -1
- package/lite/subscribe.d.ts +475 -75
- package/lite/subscribe.d.ts.map +1 -1
- package/lite/subscribe.js +1373 -142
- package/lite/subscribe.js.map +1 -1
- package/lite/subscriber.d.ts +7 -44
- package/lite/subscriber.d.ts.map +1 -1
- package/lite/subscriber.js +3290 -515
- package/lite/subscriber.js.map +1 -1
- package/lite/track.d.ts +24 -9
- package/lite/track.d.ts.map +1 -1
- package/lite/track.js +116 -37
- package/lite/track.js.map +1 -1
- package/lite/tracks.d.ts +55 -0
- package/lite/tracks.d.ts.map +1 -0
- package/lite/tracks.js +114 -0
- package/lite/tracks.js.map +1 -0
- package/lite/version.d.ts +132 -24
- package/lite/version.d.ts.map +1 -1
- package/lite/version.js +378 -33
- package/lite/version.js.map +1 -1
- package/meta.d.ts +77 -0
- package/meta.d.ts.map +1 -0
- package/meta.js +130 -0
- package/meta.js.map +1 -0
- package/meta_api.d.ts +7 -0
- package/meta_api.d.ts.map +1 -0
- package/meta_api.js +7 -0
- package/meta_api.js.map +1 -0
- package/mint.d.ts +28 -0
- package/mint.d.ts.map +1 -0
- package/mint.js +66 -0
- package/mint.js.map +1 -0
- package/open.d.ts +63 -0
- package/open.d.ts.map +1 -0
- package/open.js +250 -0
- package/open.js.map +1 -0
- package/origin.d.ts +392 -140
- package/origin.d.ts.map +1 -1
- package/origin.js +2533 -686
- package/origin.js.map +1 -1
- package/package.json +8 -13
- package/path.d.ts +51 -51
- package/path.d.ts.map +1 -1
- package/path.js +210 -57
- package/path.js.map +1 -1
- package/payload.d.ts +33 -0
- package/payload.d.ts.map +1 -0
- package/payload.js +65 -0
- package/payload.js.map +1 -0
- package/prefix.d.ts +152 -0
- package/prefix.d.ts.map +1 -0
- package/prefix.js +349 -0
- package/prefix.js.map +1 -0
- package/priority.d.ts +8 -0
- package/priority.d.ts.map +1 -0
- package/priority.js +185 -0
- package/priority.js.map +1 -0
- package/queue.d.ts +2 -0
- package/queue.d.ts.map +1 -0
- package/queue.js +46 -0
- package/queue.js.map +1 -0
- package/ranges.d.ts +36 -0
- package/ranges.d.ts.map +1 -0
- package/ranges.js +312 -0
- package/ranges.js.map +1 -0
- package/rescale.d.ts +24 -0
- package/rescale.d.ts.map +1 -0
- package/rescale.js +39 -0
- package/rescale.js.map +1 -0
- package/resume.d.ts +55 -0
- package/resume.d.ts.map +1 -0
- package/resume.js +4173 -0
- package/resume.js.map +1 -0
- package/resume.test-util.d.ts +2 -0
- package/resume.test-util.d.ts.map +1 -0
- package/resume.test-util.js +25 -0
- package/resume.test-util.js.map +1 -0
- package/skips.d.ts +48 -0
- package/skips.d.ts.map +1 -0
- package/skips.js +182 -0
- package/skips.js.map +1 -0
- package/stream.d.ts +75 -37
- package/stream.d.ts.map +1 -1
- package/stream.js +236 -92
- package/stream.js.map +1 -1
- package/subscription.test-util.d.ts +2 -0
- package/subscription.test-util.d.ts.map +1 -0
- package/subscription.test-util.js +49 -0
- package/subscription.test-util.js.map +1 -0
- package/tail.d.ts +23 -14
- package/tail.d.ts.map +1 -1
- package/tail.js +224 -97
- package/tail.js.map +1 -1
- package/time.d.ts +41 -102
- package/time.d.ts.map +1 -1
- package/time.js +129 -91
- package/time.js.map +1 -1
- package/timed.d.ts +21 -0
- package/timed.d.ts.map +1 -0
- package/timed.js +2 -0
- package/timed.js.map +1 -0
- package/track.d.ts +577 -245
- package/track.d.ts.map +1 -1
- package/track.js +7306 -771
- package/track.js.map +1 -1
- package/track_api.d.ts +7 -0
- package/track_api.d.ts.map +1 -0
- package/track_api.js +7 -0
- package/track_api.js.map +1 -0
- package/util/abort.d.ts +1 -0
- package/util/abort.d.ts.map +1 -1
- package/util/abort.js +23 -1
- package/util/abort.js.map +1 -1
- package/util/announce.d.ts +4 -0
- package/util/announce.d.ts.map +1 -0
- package/util/announce.js +11 -0
- package/util/announce.js.map +1 -0
- package/util/bigint.d.ts +3 -0
- package/util/bigint.d.ts.map +1 -0
- package/util/bigint.js +8 -0
- package/util/bigint.js.map +1 -0
- package/util/change.d.ts +12 -0
- package/util/change.d.ts.map +1 -0
- package/util/change.js +18 -0
- package/util/change.js.map +1 -0
- package/util/deadline.d.ts +2 -0
- package/util/deadline.d.ts.map +1 -0
- package/util/deadline.js +108 -0
- package/util/deadline.js.map +1 -0
- package/util/decode_error.d.ts +3 -0
- package/util/decode_error.d.ts.map +1 -0
- package/util/decode_error.js +11 -0
- package/util/decode_error.js.map +1 -0
- package/util/demand.d.ts +8 -0
- package/util/demand.d.ts.map +1 -0
- package/util/demand.js +24 -0
- package/util/demand.js.map +1 -0
- package/util/given_up.d.ts +2 -0
- package/util/given_up.d.ts.map +1 -0
- package/util/given_up.js +101 -0
- package/util/given_up.js.map +1 -0
- package/util/hex.d.ts +6 -0
- package/util/hex.d.ts.map +1 -1
- package/util/hex.js +19 -4
- package/util/hex.js.map +1 -1
- package/util/key.d.ts +15 -0
- package/util/key.d.ts.map +1 -0
- package/util/key.js +38 -0
- package/util/key.js.map +1 -0
- package/util/limits.d.ts +2 -0
- package/util/limits.d.ts.map +1 -0
- package/util/limits.js +76 -0
- package/util/limits.js.map +1 -0
- package/util/observed.d.ts +23 -0
- package/util/observed.d.ts.map +1 -0
- package/util/observed.js +122 -0
- package/util/observed.js.map +1 -0
- package/util/sorted.d.ts +2 -0
- package/util/sorted.d.ts.map +1 -0
- package/util/sorted.js +149 -0
- package/util/sorted.js.map +1 -0
- package/util/timeout.d.ts +2 -1
- package/util/timeout.d.ts.map +1 -1
- package/util/timeout.js +13 -9
- package/util/timeout.js.map +1 -1
- package/util/timer.d.ts +2 -0
- package/util/timer.d.ts.map +1 -0
- package/util/timer.js +19 -0
- package/util/timer.js.map +1 -0
- package/util/utf8.d.ts +2 -0
- package/util/utf8.d.ts.map +1 -1
- package/util/utf8.js +7 -1
- package/util/utf8.js.map +1 -1
- package/util/varint.d.ts.map +1 -1
- package/util/varint.js +8 -1
- package/util/varint.js.map +1 -1
- package/util/watch.d.ts +8 -0
- package/util/watch.d.ts.map +1 -0
- package/util/watch.js +38 -0
- package/util/watch.js.map +1 -0
- package/util/yield.d.ts +2 -0
- package/util/yield.d.ts.map +1 -0
- package/util/yield.js +31 -0
- package/util/yield.js.map +1 -0
- package/varint.d.ts +0 -29
- package/varint.d.ts.map +1 -1
- package/varint.js +7 -28
- package/varint.js.map +1 -1
- package/varint_api.d.ts +7 -0
- package/varint_api.d.ts.map +1 -0
- package/varint_api.js +7 -0
- package/varint_api.js.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +4 -0
- package/version.js.map +1 -0
- package/window.d.ts +570 -0
- package/window.d.ts.map +1 -0
- package/window.js +1677 -0
- package/window.js.map +1 -0
- package/wire.d.ts +145 -30
- package/wire.d.ts.map +1 -1
- package/wire.js +27 -0
- package/wire.js.map +1 -1
- package/connection/established.d.ts +0 -53
- package/connection/established.d.ts.map +0 -1
- package/connection/established.js +0 -2
- package/connection/established.js.map +0 -1
- package/ietf/adapter.d.ts +0 -75
- package/ietf/adapter.d.ts.map +0 -1
- package/ietf/adapter.js +0 -699
- package/ietf/adapter.js.map +0 -1
- package/lite/datagram_stream.d.ts +0 -8
- package/lite/datagram_stream.d.ts.map +0 -1
- package/lite/datagram_stream.js +0 -43
- package/lite/datagram_stream.js.map +0 -1
- package/lite/fetch.d.ts +0 -28
- package/lite/fetch.d.ts.map +0 -1
- package/lite/fetch.js +0 -78
- package/lite/fetch.js.map +0 -1
- package/util/log.d.ts +0 -5
- package/util/log.d.ts.map +0 -1
- package/util/log.js +0 -16
- package/util/log.js.map +0 -1
- package/zod.d.ts +0 -13
- package/zod.d.ts.map +0 -1
- package/zod.js +0 -18
- package/zod.js.map +0 -1
package/resume.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../src/resume.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAA6B,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,SA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AACb,CAAC;AAED;;;GAGG;AACH,SAAS,YAAY,CAAC,IAAU,EAAE,OAAa,EAAE,GAAW;IAC3D,OAAO,CACN,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,KAAK,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM;QACtD,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,IAAI,GAAG;QACzB,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,CAClC,CAAC;AACH,CAAC;AAED,mFAAmF;AACnF,SAAS,SAAS,CAAC,IAAU,EAAE,KAAa,EAAE,GAAW;IACxD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,MAAM,EAAE,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACvD,OAAO,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/D,CAAC","sourcesContent":["/**\n * Serve a front's logical track straight from its routes' copies. Mirrors `model::resume` in\n * `rs/moq-net`.\n *\n * A {@link Front} is one broadcast served through one route at a time: the origin re-sources it\n * when another route of the same identity takes over, since routes with one identity serve one\n * stream and so hold the same groups and frames. A reader of a logical track reads the\n * serving route's copy directly, through its own subscription: nothing is copied, and with one\n * route it is a passthrough.\n *\n * When the front switches, each reader subscribes to the new copy from the newest group it\n * handed out. A replaced copy keeps delivering until the new copy delivers its first group, then\n * is bounded just below it (or at the newest group handed out, if later), so a group only the old\n * route got after the switch is not lost. It is kept while it may still deliver a group under its\n * bound the reader lacks (unread, or still landing within the grace a passed group is waited for),\n * and while a group still read is read from it or may continue from it (it holds that group, or may\n * yet get it). Nothing under the bound is waited for past the reader's budget.\n *\n * A new copy is asked from where the reader got to, so it never has the groups below the reader's\n * local floor that the copies it replaced cached. Lowering that floor asks the newest route for\n * them through a backfill: another copy of that route, bounded to the groups the floor newly\n * covers, and kept like a replaced copy. A switch asks the same way for the groups below where the\n * reader got to that it still lacks, from the lowest one: one late, reordered, or in flight on the\n * replaced route still arrives within the reader's budget, as it would on one cursor.\n *\n * A group carries on across the switch through its {@link Recover}: once its copy stalls while a\n * newer route serves, it continues from the serving route's copy of the same group at the same\n * frame, found in that copy's cache or fetched from it. Once its copy fails, any other copy still\n * holding the group continues it first, since a group's name fixes its content.\n *\n * A group is handed out once however many copies deliver it: the reader skips any key its\n * subscriber already handed out, the same record that keeps a direct reader from taking a\n * re-created group twice.\n *\n * A reader asked for dispositions reports what the serving copy gave up, other than a route\n * failure, once no copy it replaced may still deliver it, and counts it as handed out so no copy\n * serves it later.\n *\n * The logical track ends cleanly once its serving copy does and no group the reader lacks may\n * still land below that end on a copy it replaced. Its `closed` settles, and the reader keeps each\n * copy only while it holds something left to read, as a direct reader keeps its buffer. It follows\n * the route only for the groups still read, so one whose route dies continues from the copy served\n * next, and leaves it once it holds nothing left to read. Its end is the first one any copy\n * declared, which a later mid-group end may refine; a copy declaring another breaks the track's\n * identity, which hurts only its own broadcast, so nothing checks that copies agree.\n *\n * @module\n */\nimport { Duration, Instant, now, sleepUntil } from \"@moq/clock\";\nimport { type Dispose, type Getter, race, Signal } from \"@moq/signals\";\nimport * as broadcast from \"./broadcast.ts\";\nimport { Delivered } from \"./delivered.ts\";\nimport { samePlaced } from \"./demand.ts\";\nimport { NotFound, Retry, retry, SessionError, StreamCode, StreamError, sessionClosed } from \"./error.ts\";\nimport type { Consumer as GroupConsumer } from \"./group.ts\";\nimport {\n\ttype Ask,\n\ttype Coverage,\n\ttype Dispositions,\n\ttype DropRun,\n\ttype Expiry,\n\ttype FoldTerms,\n\tfinalKey,\n\ttype GroupRecover,\n\ttype Held,\n\thooks,\n\tinsertDrops,\n\tinsertRun,\n\ttype Land,\n\tNO_MAX_DELAY,\n\ttype RecoverCause,\n\ttype Recv,\n\ttype Replacement,\n\ttype ResumeShell,\n\ttype ResumeSource,\n\ttype Run,\n\tremoveRun,\n\trunGaps,\n\tsettles,\n\tskipHole,\n\tstaleHole,\n\ttype Within,\n} from \"./internal.ts\";\nimport { grace } from \"./ledger.ts\";\nimport { type Kind, keyOf, type Lister, type Tracks, type TracksEvent } from \"./listing.ts\";\nimport { Skips } from \"./skips.ts\";\nimport type { Timescale } from \"./time.ts\";\nimport * as track from \"./track.ts\";\nimport { max, min, UNBOUNDED } from \"./util/key.ts\";\nimport {\n\tAT_KEYS,\n\tasked,\n\ttype Budget,\n\tEMPTY,\n\tisEmpty,\n\ttype Joining,\n\tliveMillis,\n\tpolicyOf,\n\ttype Resolved,\n\trangesPolicy,\n\trangeTime,\n\tSINCE_ZERO,\n\tsameSpans,\n\tUNHELD,\n\tWindow,\n\twidest,\n\twithPolicy,\n} from \"./window.ts\";\nimport { type Broadcast as BroadcastWire, metaWireOf, registerWire, wireOf } from \"./wire.ts\";\n\n/** A copy claiming the same content with different metadata: refused rather than reinterpreted. */\nclass Incompatible extends Error {\n\tconstructor(name: string) {\n\t\tsuper(`track ${name} changed its properties across routes`);\n\t\tthis.name = \"Incompatible\";\n\t}\n}\n\n/**\n * Whether `err` is the route failing to deliver rather than judging what it carried, so a new copy\n * may fix it. Mirrors the Rust `Error::retryable`.\n *\n * @internal\n */\nexport function routeFailed(err: Error): boolean {\n\treturn retry(err) !== Retry.Never;\n}\n\n// Whether `err` from `source` judges its route rather than the track: a received route that lost\n// the content refuses nothing, and the read waits for the next route. A local broadcast's word is\n// the track's verdict. Mirrors the Rust front's `strands`.\nfunction strands(err: Error, source: Source): boolean {\n\treturn unroutable(err) && !source.local;\n}\n\n// Whether `err` says the route is going away rather than that it gave up on the copy: its\n// answer is no verdict, and the next route is asked. Mirrors the Rust front's `closing`.\nfunction closing(err: Error): boolean {\n\tif (err instanceof StreamError) return err.code === StreamCode.GoingAway || err.code === StreamCode.SessionClosed;\n\treturn err instanceof SessionError || sessionClosed(err);\n}\n\n// A source losing its route to the content: only another route continues it. Mirrors the Rust\n// `Error::unroutable`.\nfunction unroutable(err: Error): boolean {\n\treturn retry(err) === Retry.Reroute;\n}\n\n// A copy's delivery failure says nothing about its content. A terminal track verdict does.\n// Mirrors the Rust `copy_failed`.\nfunction copyFailed(copy: Copy): boolean {\n\tconst error = copy.sub.closed.peek();\n\treturn error instanceof Error && routeFailed(error);\n}\n\n// Whether the copy's route failed, even after its declared end settled, which ends its readers\n// cleanly: a group it closed short may hold more on the route replacing it. Only a route going\n// away counts then: a subscription reset alone leaves the route serving, and nothing replaces\n// it. Mirrors the Rust `route_lost`, whose copies abort after their end only with the session.\nfunction routeLost(copy: Copy): boolean {\n\tconst aborted = hooks.trackAborted(copy.sub);\n\treturn copyFailed(copy) || (aborted !== undefined && closing(aborted));\n}\n\n// Every `track.Info` field, so one added later fails to compile until it is listed here. `ietf` is\n// compared, like Rust's moq-transport `properties`.\nconst INFO_FIELDS = Object.keys({\n\tcompression: true,\n\ttimescale: true,\n\tmaxAge: true,\n\tpriority: true,\n\trefresh: true,\n\tietf: true,\n} satisfies Record<keyof track.Info, true>) as (keyof track.Info)[];\n\n/** Two copies claiming the same content must agree on all of it, like Rust's `Info` equality. */\nfunction compatible(a: track.Info, b: track.Info): boolean {\n\treturn INFO_FIELDS.every((field) => {\n\t\tconst [l, r] = [a[field], b[field]];\n\t\tif (field === \"refresh\") {\n\t\t\tconst [x, y] = [a.refresh.interval, b.refresh.interval];\n\t\t\treturn a.refresh.ratio === b.refresh.ratio && (x === null || y === null ? x === y : x.eq(y));\n\t\t}\n\t\treturn Duration.is(l) && Duration.is(r) ? l.eq(r) : l === r;\n\t});\n}\n\n/**\n * Ask `source` what track `name` is, abandoning the question once `retired` aborts. A caller's\n * `hold` keeps the track wanted until it or `retired` aborts; without one, only until the answer.\n */\nfunction ask(source: Source, name: string, retired: AbortSignal, hold?: AbortSignal): Promise<track.Info> {\n\tif (hold) return source.wire.resolveTrackInfo(name, AbortSignal.any([hold, retired]));\n\tconst query = new AbortController();\n\tconst onRetire = () => query.abort(retired.reason);\n\tif (retired.aborted) onRetire();\n\telse retired.addEventListener(\"abort\", onRetire, { once: true });\n\treturn source.wire.resolveTrackInfo(name, query.signal).finally(() => {\n\t\tretired.removeEventListener(\"abort\", onRetire);\n\t\tquery.abort();\n\t});\n}\n\nlet sources = 0;\n\n/** One route's broadcast, held while the front serves it or a reader still reads a copy of it. */\nclass Source {\n\t/**\n\t * Names this source where it outlives its route, as a front's record of who said what a\n\t * track is: a reference there would keep a retired route's session reachable.\n\t */\n\treadonly id = sources++;\n\treadonly wire: BroadcastWire;\n\t/** What a metadata reader reads of it: its metadata copies where it keeps them apart, else `wire`. */\n\treadonly meta: BroadcastWire;\n\t/** The table's handle this was served from, so serving it again is a no-op. */\n\treadonly from: broadcast.Consumer;\n\t/** The local broadcast rather than a received route: its word on a track is the verdict. */\n\treadonly local: boolean;\n\t#consumer: broadcast.Consumer;\n\t#holds = 0;\n\t#claimLost?: () => boolean;\n\n\tconstructor(from: broadcast.Consumer, local = false, claimLost?: () => boolean) {\n\t\tthis.from = from;\n\t\tthis.local = local;\n\t\tthis.#claimLost = claimLost;\n\t\tthis.#consumer = from.clone();\n\t\tthis.wire = wireOf(this.#consumer);\n\t\tthis.meta = metaWireOf(this.#consumer);\n\t}\n\n\t/**\n\t * Whether this is a lite-07 peer's claim whose identity lost the path: its refusal of a copy\n\t * that delivered nothing is final, since nothing else of its identity answers for it. Mirrors\n\t * the Rust front's `claim_lost`.\n\t */\n\tclaimLost(): boolean {\n\t\treturn this.#claimLost?.() ?? false;\n\t}\n\n\tretain(): void {\n\t\tthis.#holds++;\n\t}\n\n\trelease(): void {\n\t\tif (this.#holds === 0) throw new Error(\"route released more often than retained\");\n\t\tif (--this.#holds === 0) this.#consumer.close();\n\t}\n}\n\n/** What the front says about one logical track: the copy to read now, and how it ended. */\nclass Route {\n\treadonly name: string;\n\t/** Whether it serves the track's metadata copy, which each source keeps apart or not. */\n\treadonly meta: boolean;\n\t/** Bumped whenever `source` changes, so a reader can tell a replacement apart. */\n\tgeneration = 0;\n\t/** The serving route's broadcast; undefined between routes or once the front let go. */\n\tsource?: Source;\n\t/** The last broadcast served, kept between routes: what a replacement must match. */\n\tserved?: Source;\n\t/** No front is left to replace the copy: readers follow it to its end. */\n\tconcluded = false;\n\t/** The front refused the replacement: the track ends with this once the serving copy runs out. */\n\trefusal?: Error;\n\t/**\n\t * The source serving before the replacements that have yet to deliver, held until a copy of\n\t * `source` delivers: a reader arriving meanwhile reads it too, as the readers before it do, so\n\t * a replacement failing first leaves it serving. The Rust front only swaps once one delivers.\n\t */\n\tincumbent?: Source;\n\t/**\n\t * The source a read idles on, having lost the route, and whether its copy delivered first;\n\t * cleared once asked again or replaced.\n\t */\n\t#stranded?: { source: Source; delivered: boolean };\n\t/**\n\t * The source the front is splicing in while its copy's info is in flight: a short close on the\n\t * serving copy waits for it rather than standing. Mirrors the Rust route's `staged`.\n\t */\n\tstaged?: Source;\n\t/** Bumped on every change above, waking parked reads. */\n\treadonly changed = new Signal(0);\n\treadonly readers = new Set<Reader>();\n\t/** What any copy of the track declared skipped, which outlives that copy. */\n\treadonly skips = new Skips();\n\t/** Called once the last reader leaves. */\n\tidle: () => void = () => {};\n\t/** Called once a reader subscribes a copy, or moves one onto a new source. */\n\tcopied: () => void = () => {};\n\n\tconstructor(name: string, meta: boolean) {\n\t\tthis.name = name;\n\t\tthis.meta = meta;\n\t}\n\n\t/** The copy of this track `source` serves. */\n\tview(source: Source): BroadcastWire {\n\t\treturn this.meta ? source.meta : source.wire;\n\t}\n\n\t#bump(): void {\n\t\tthis.changed.update((n) => n + 1);\n\t}\n\n\t/** Serve the track from `source` from now on, subscribing every reader to it. */\n\tserve(source: Source): void {\n\t\t// A refusal ends the track: no later source continues it, compatible or not.\n\t\tif (this.concluded || this.refusal || this.source === source) return;\n\t\tthis.#stranded = undefined;\n\t\tthis.generation++;\n\t\t// An undelivered source hands over the incumbent it held, not itself.\n\t\tif (!this.incumbent) this.#hold(this.source);\n\t\tthis.source = source;\n\t\tthis.served = source;\n\t\tthis.#bump();\n\t\tfor (const reader of [...this.readers]) reader.sync();\n\t}\n\n\t/**\n\t * Serve `to` again in place of `from`, a replacement whose copy failed before delivering, even\n\t * past a refusal or a conclusion: `to` served before it, and concluding only stops a future\n\t * source taking over. Returns whether `to` serves again.\n\t */\n\trevert(from: Source, to: Source): boolean {\n\t\t// A concluded route serves nothing new, but the failed replacement was still its last.\n\t\tif (this.source !== from && !(this.concluded && this.source === undefined)) return false;\n\t\tthis.generation++;\n\t\tthis.#hold(undefined);\n\t\tthis.source = to;\n\t\tthis.served = to;\n\t\tthis.#bump();\n\t\tfor (const reader of [...this.readers]) reader.sync();\n\t\treturn true;\n\t}\n\n\t/**\n\t * Between routes: readers wait for the next one, keeping what they have. The source that served\n\t * stays the incumbent until a later one delivers, as a replacement's would.\n\t */\n\tpark(): void {\n\t\tif (!this.source) {\n\t\t\tif (this.staged) this.unstage(this.staged);\n\t\t\treturn;\n\t\t}\n\t\tthis.staged = undefined;\n\t\tthis.generation++;\n\t\tif (!this.incumbent) this.#hold(this.source);\n\t\tthis.source = undefined;\n\t\tthis.#bump();\n\t}\n\n\t/** The front asks `source` to take over, until {@link unstage} settles it. */\n\tstage(source: Source): void {\n\t\tthis.staged = source;\n\t\tthis.#bump();\n\t}\n\n\t/** The front settled whether `source` takes over, unless a later stage replaced it. */\n\tunstage(source: Source): void {\n\t\tif (this.staged !== source) return;\n\t\tthis.staged = undefined;\n\t\tthis.#bump();\n\t}\n\n\t/**\n\t * A read idles on `source`, which lost the route after its copy `delivered` or not, until the\n\t * table moves: see {@link Front.moved}.\n\t */\n\tstrand(source: Source, delivered: boolean): void {\n\t\tthis.#stranded = { source, delivered };\n\t}\n\n\t/** The read idling on a lost route, which the table moving now ends, if any. */\n\tunstrand(): { source: Source; delivered: boolean } | undefined {\n\t\tconst stranded = this.#stranded;\n\t\tthis.#stranded = undefined;\n\t\treturn stranded;\n\t}\n\n\t/** Subscribe every reader afresh to the source that still serves, once its copy failed. */\n\tresubscribe(): void {\n\t\tif (!this.source) return;\n\t\tthis.generation++;\n\t\tthis.#bump();\n\t\tfor (const reader of [...this.readers]) reader.sync();\n\t}\n\n\t/** End the track once the serving copy runs out, rather than replacing it. */\n\trefuse(err: Error): void {\n\t\tthis.refusal ??= err;\n\t\tthis.#bump();\n\t}\n\n\t/**\n\t * No front will replace the serving copy. Same generation: a reader on the copy keeps it as\n\t * the serving one, while a reader arriving later finds nothing to read.\n\t */\n\tconclude(): void {\n\t\tif (this.concluded) return;\n\t\tthis.concluded = true;\n\t\tthis.staged = undefined;\n\t\tthis.#hold(undefined);\n\t\tthis.source = undefined;\n\t\tthis.#bump();\n\t}\n\n\t/** A copy of `source` delivered: it no longer needs the source it replaced. */\n\tdelivered(source: Source): void {\n\t\tif (source === this.source) this.#hold(undefined);\n\t}\n\n\t#hold(incumbent: Source | undefined): void {\n\t\tincumbent?.retain();\n\t\tthis.incumbent?.release();\n\t\tthis.incumbent = incumbent;\n\t}\n\n\tleave(reader: Reader): void {\n\t\tif (!this.readers.delete(reader) || this.readers.size > 0) return;\n\t\t// Nobody reads the track, so nothing is left to protect from the replacement.\n\t\tthis.#hold(undefined);\n\t\tthis.idle();\n\t}\n}\n\n/** The reader's ranges, and the live joins placed among them, resolved where its copies placed them. */\ninterface Resolution {\n\tfrom: readonly track.Range[];\n\tplaced?: ReadonlyMap<number, bigint>;\n\twindow: Window;\n}\n\n/** A route's copy, as one reader reads it. */\ninterface Copy {\n\tgeneration: number;\n\tsource: Source;\n\tsub: track.Subscriber;\n\t/** Where the subscription was asked to start, so demand updates never ask for less. */\n\tfloor?: bigint;\n\t/**\n\t * A backfill asked from at or below a range's time start under the serving copy's resume point:\n\t * its floor is where it was asked from, not a resume point of its own, so the group holding that\n\t * time, which may lie under it, is read. A backfill of gaps alone owes nothing under its floor.\n\t */\n\tbackfill?: true;\n\t/** The reader's ranges {@link Copy.resolved} are for. */\n\tfrom?: readonly track.Range[];\n\t/**\n\t * Each of those ranges resolved, by index, so clamping never widens one: as the serving copy\n\t * had them when this one was subscribed, until this one resolves them itself.\n\t */\n\tresolved?: (Resolved | undefined)[];\n\t/** Replaced by a newer route. */\n\treplaced: boolean;\n\t/**\n\t * Bounded once the newer copy delivered its first group: nothing past this group is taken\n\t * from it. `null` when that leaves nothing. Unset while it is the only copy still feeding\n\t * groups the newer one may never have.\n\t */\n\tuntil?: bigint | null;\n\t/**\n\t * The group channel ran out: failed, or cleanly with how many groups had arrived on the copy\n\t * by then, since one arriving later is still in flight below its end, which a read still open\n\t * takes.\n\t */\n\tdone?: Error | number;\n\t/**\n\t * When a newer group superseded every group under the bound: the newer copy's first group, or\n\t * the track's end. What the reader still lacks from it is waited for from here, for no longer\n\t * than the reader's budget.\n\t */\n\tsince?: Instant;\n\t/** Groups still read that came from this copy, which keep a replaced copy subscribed. */\n\tlease: number;\n\t/**\n\t * It handed out a group, or got one it holds back for a placement, so a failure is its route\n\t * failing mid-serve rather than refusing.\n\t */\n\tdelivered?: boolean;\n\t/**\n\t * One past the highest group the reader's window dropped from it, which it no longer offers\n\t * though a widened window may name it again: a resume point, as {@link Copy.floor} is.\n\t *\n\t * The Rust reader has no counterpart: its front moves a track only once the old copy ends. This\n\t * one moves as soon as a better route answers, so a replaced copy still delivering can place the\n\t * window after the serving copy subscribed with nothing resolved, offering a group it leaves out.\n\t */\n\tdropped?: bigint;\n\t/**\n\t * The groups {@link Reader.backfillGaps} left it to drain that the reader still lacks, each one\n\t * it held then: once one no longer drains here, or the copy is let go, the serving route is asked\n\t * for it after all.\n\t */\n\tdrains?: Set<bigint>;\n\t/**\n\t * Asked only for groups under the serving copy's resume point, which come as fills or from a\n\t * feed asked below where it started: an ordered read waits on what it still owes there.\n\t */\n\tfills?: true;\n}\n\n/**\n * Subscribe to a route's copy, or to a failed stand-in when that route can no longer serve. A\n * copy parks past the end of a bounded window: the logical reader judges that end across its\n * copies; see {@link Reader.exhausted}.\n */\nfunction subscribe(wire: BroadcastWire, name: string, subscription: track.Subscription): track.Subscriber {\n\ttry {\n\t\treturn hooks.parked(wire.subscribe(name, subscription));\n\t} catch (err) {\n\t\tconst failed = hooks.pendingTrack(name);\n\t\thooks.abortTrack(failed, err instanceof Error ? err : new Error(String(err)));\n\t\treturn hooks.parked(failed.subscribe(subscription));\n\t}\n}\n\n/**\n * Take a copy's next group, in sequence or arrival order. With `dispositions`, a run the copy gives\n * up on the way comes back first; see {@link Dispositions}.\n */\nfunction take(copy: Copy, ordered: boolean, floor?: bigint, dispositions: Dispositions = false, admit?: bigint): Recv {\n\treturn ordered ? hooks.tryNextGroup(copy.sub, floor, admit) : hooks.tryRecvGroup(copy.sub, dispositions);\n}\n\n/** Where `copy` stopped offering the groups below, which only a backfill of its route reads. */\nfunction resumePoint(copy: Pick<Copy, \"floor\" | \"dropped\">): bigint | undefined {\n\treturn copy.dropped === undefined ? copy.floor : max(copy.floor ?? 0n, copy.dropped);\n}\n\n/**\n * The time start of `range` that a copy asked from `floor` raised to it, if any: that copy's\n * resolution says nothing of which group holds it, which only a copy asked from below it places.\n * Mirrors the Rust `raised`.\n */\nfunction raised(range: track.Range | undefined, floor: bigint | undefined): bigint | undefined {\n\tconst start = range && rangeTime(range);\n\treturn floor !== undefined && start !== undefined && start < floor ? start : undefined;\n}\n\n/** The first group past where `copy` was replaced: 0 for one replaced before any group. */\nfunction copyEnd(copy: Pick<Copy, \"until\">): bigint | undefined {\n\tif (copy.until === undefined) return undefined;\n\treturn copy.until === null ? 0n : copy.until + 1n;\n}\n\n/** One reader's subscription to a logical track; see the module docs. */\nclass Reader implements ResumeSource {\n\treadonly route: Route;\n\t#shell: ResumeShell;\n\t/** The route generation last read. */\n\t#generation?: number;\n\t/** The reader's preferences as last mirrored into its copies; see {@link #follow}. */\n\t#mirrored?: track.Subscription;\n\t/**\n\t * Oldest first, except that a backfill goes before the copy of the route it backfills: the last\n\t * one is the serving route's own, when it is subscribed.\n\t */\n\t#copies: Copy[] = [];\n\t/** The reader's ranges, and the {@link #window} they resolved to. */\n\t#resolution?: Resolution;\n\t/** The reader's cursor the copies were last bounded at: a lower start asks for a backfill. */\n\t#bounded: { start: bigint; end?: bigint };\n\t/** The newest group handed out: where a new copy is asked to start. */\n\t#newest?: bigint;\n\t/**\n\t * The skipped run from the start of each key run the cursor keeps out of a gap under the serving\n\t * copy's resume point, recorded as the copies declare it, so it outlives the copy and the cache\n\t * that held it. Only that run, at most two a gap however many routes come and go: the rest is\n\t * asked of the serving route again; see {@link #asking}.\n\t */\n\t#skipped = new Delivered();\n\t/**\n\t * Set once the route changed, so the serving copy's resume point may pass over groups the\n\t * reader lacks. Kept until the gaps are backfilled; see {@link #backfillGaps}.\n\t */\n\t#resumed = false;\n\t/**\n\t * The groups a backfill of route `generation` failed to get, which that route is not asked\n\t * for again until the route or the reader's preferences change: a backfill it refuses would\n\t * only fail again, and asking each read would spin. Mirrors the Rust `Reader::refused`.\n\t */\n\t#refused?: { generation: number; start: bigint; end: bigint };\n\t/** Bumped when this reader subscribes a new copy or a copy's last lease ends, waking its parked reads. */\n\t#changed = new Signal(0);\n\t#dispose: Dispose[] = [];\n\t#closed = false;\n\t/**\n\t * Set once the logical track ended cleanly: the reader drains what its copies hold and follows\n\t * the route only for the groups still read; see {@link #rerouted}. Holds the serving copy's\n\t * largest then, kept once that copy goes.\n\t */\n\t#ended?: { largest?: track.Position; object?: track.Position; ended: true };\n\t/**\n\t * Copies of the routes served after the track ended, newest last, subscribed only while a group\n\t * handed out is still read: they continue it off a route that dies, and hand out nothing.\n\t * Mirrors the Rust `Phase::Finished { routed }`.\n\t */\n\t#rerouted: Copy[] = [];\n\t/**\n\t * The first end any copy declared: the logical track's, whichever copy serves. A copy declaring\n\t * another breaks the track's identity, which hurts only its own broadcast, so nothing checks that\n\t * copies agree.\n\t */\n\t#declared?: track.Position;\n\t/** The subscriber's record of groups handed out, as the last read passed it. */\n\t#delivered = new Delivered();\n\t/** Runs the serving copy gave up and the reader has yet to report; see {@link #tryDrop}. */\n\t#drops: DropRun[] = [];\n\t/** The route's {@link Skips} revision {@link trySkip} last folded in. */\n\t#skipsSeen = 0;\n\t/** The cursor and window {@link trySkip} last folded the route's skips in under. */\n\t#skipsView?: string;\n\t/** Runs of the route's skips folded in and not reported yet, highest first, never more than it holds. */\n\t#skipsQueued: Run[] = [];\n\t/** A copy that declared the track's end ran out cleanly at it, even if since let go. */\n\t#settled = false;\n\t/** Whether groups were ever asked for; until then the reader keeps no replaced copy. */\n\t#groupsRead = false;\n\t/** The groups handed out and still read, which other copies may back; see {@link #backs}. */\n\treadonly out = new Set<Recover>();\n\n\t/**\n\t * What a group moved onto another copy is judged within: this reader's window below its cursor\n\t * cap, not the copy's own subscription, which starts at the switch's boundary. Mirrors the Rust\n\t * `Recover::window`.\n\t */\n\treadonly within: Within;\n\t/** Every group handed out and still open, which ends with the reader. */\n\t#open = new Set<GroupConsumer>();\n\t/** The soonest deadline a read waits on, armed to wake it then. */\n\t#wall?: { at: number; timer: AbortController };\n\t/** Records the properties a copy committed, and which source it came from. */\n\t#record: (info: track.Info, source: Source) => void;\n\t/** The first frame of each group the reader reads whole from, applied to every copy; see `hooks.wholeGroups`. */\n\t#whole?: (key: bigint) => number | undefined;\n\n\t/** `parent` is the newest copy of the reader this one forks, if any. */\n\tconstructor(route: Route, shell: ResumeShell, record: (info: track.Info, source: Source) => void, parent?: Copy) {\n\t\tthis.route = route;\n\t\tthis.#shell = shell;\n\t\tthis.within = {\n\t\t\tcontains: (key) => this.#inWindow(key),\n\t\t\topenFrom: () => this.#window().openFrom(),\n\t\t\tbudget: () => this.#readerBudget(),\n\t\t\tend: () => shell.cursor.peek().end,\n\t\t\tchanged: [shell.cursor, shell.subscription],\n\t\t};\n\t\tthis.#record = record;\n\t\tthis.#mirrored = shell.subscription.peek();\n\t\tthis.#bounded = shell.cursor.peek();\n\t\troute.readers.add(this);\n\t\tthis.#dispose.push(\n\t\t\tshell.subscription.subscribe(() => this.#follow()),\n\t\t\tshell.cursor.subscribe(() => this.#follow()),\n\t\t);\n\t\t// A fork starts on its parent's newest copy, at that copy's generation: the copy keeps its\n\t\t// retained groups even where no route serves the track, between routes or once the front\n\t\t// concluded.\n\t\tif (parent) {\n\t\t\tthis.#generation = parent.generation;\n\t\t\tconst asked: Pick<Copy, \"from\" | \"resolved\"> = {};\n\t\t\tconst copy: Copy = {\n\t\t\t\tgeneration: parent.generation,\n\t\t\t\tsource: parent.source,\n\t\t\t\tsub: parent.sub.fork(this.#wire(asked)),\n\t\t\t\t...asked,\n\t\t\t\treplaced: false,\n\t\t\t\tlease: 0,\n\t\t\t};\n\t\t\tthis.#add(copy);\n\t\t\tthis.#joinIncumbent(copy);\n\t\t}\n\t\t// Subscribed to the serving copy at once, so groups it has now are the reader's even if\n\t\t// the route changes before the first read, and to each copy after.\n\t\tthis.sync();\n\t}\n\n\t/**\n\t * Follow the route: apply the reader's preferences and cursor to its copies, subscribe to a\n\t * new copy, and mark the ones it replaced.\n\t */\n\tsync(): void {\n\t\tif (this.#closed) return;\n\t\tthis.#follow();\n\t\tif (this.#ended) {\n\t\t\tthis.#reroute();\n\t\t\treturn;\n\t\t}\n\t\tconst route = this.route;\n\t\tif (this.#generation === route.generation) return;\n\t\tthis.#generation = route.generation;\n\t\t// What a former route gave up is no verdict on the one that serves now.\n\t\tthis.#drops = [];\n\t\tconst source = route.source;\n\t\tif (!source) return;\n\t\t// The new copy starts at the boundary, so a lower group no replaced copy holds is asked of\n\t\t// its route once a read says which; see #backfillGaps.\n\t\tthis.#resumed = true;\n\t\t// One subscription split at one boundary: the largest group any copy holds, never below one\n\t\t// handed out. The new copy starts there, and each copy it replaces is capped there now, so\n\t\t// it finishes the groups up to it and sends nothing newer.\n\t\tconst boundary = this.#boundary();\n\t\t// Cloned handles share closed, so a returning route reuses its subscription and\n\t\t// leases rather than replaying its cache and retaining another copy per flap. The newest\n\t\t// is the route's own copy, not a backfill of it.\n\t\t// A copy that failed is never reused: the route subscribes afresh after one.\n\t\tconst index = this.#copies.findLastIndex(\n\t\t\t(copy) => copy.source.from.closed === source.from.closed && !(copy.sub.closed.peek() instanceof Error),\n\t\t);\n\t\tconst [returning] = index === -1 ? [] : this.#copies.splice(index, 1);\n\t\tif (boundary !== undefined) {\n\t\t\tfor (const copy of this.#copies) {\n\t\t\t\t// Harvested as it is replaced, so a reader joining now finds its skips too.\n\t\t\t\tif (!copy.replaced) this.#keepSkips(copy);\n\t\t\t\tcopy.replaced = true;\n\t\t\t\tthis.#cap(copy, boundary);\n\t\t\t}\n\t\t} else {\n\t\t\t// Nothing held nor handed out: nothing to split, so the new copy serves it all. Kept and\n\t\t\t// asked for nothing, a copy's subscription would end with the track, and a fetch then\n\t\t\t// landing a later group would read as the whole of it. Only the incumbent's copy stays,\n\t\t\t// uncapped until the new copy delivers (see #observe), as the Rust front splices a\n\t\t\t// replacement only then; the rest go, as the Rust `Reader::sync` drops them.\n\t\t\tconst incumbent = route.incumbent;\n\t\t\tthis.#dropCopies((copy) => copy.source.from.closed !== incumbent?.from.closed);\n\t\t\tfor (const copy of this.#copies) {\n\t\t\t\tif (!copy.replaced) this.#keepSkips(copy);\n\t\t\t\tcopy.replaced = true;\n\t\t\t}\n\t\t}\n\t\tif (returning) {\n\t\t\tconst copy = returning;\n\t\t\tsource.retain();\n\t\t\tcopy.source.release();\n\t\t\tcopy.source = source;\n\t\t\tcopy.generation = route.generation;\n\t\t\tcopy.replaced = false;\n\t\t\tcopy.until = undefined;\n\t\t\tcopy.since = undefined;\n\t\t\tcopy.done = undefined;\n\t\t\tcopy.drains = undefined;\n\t\t\t// Resume where a fresh copy would: a group it buffered while replaced, below the\n\t\t\t// boundary, is the capped copies' to deliver.\n\t\t\tif (boundary !== undefined) copy.floor = max(copy.floor ?? 0n, boundary);\n\t\t\tcopy.backfill = undefined;\n\t\t\tthis.#update(copy);\n\t\t\tthis.#bound(copy);\n\t\t\tthis.#copies.push(copy);\n\t\t\tthis.wake();\n\t\t\troute.copied();\n\t\t\treturn;\n\t\t}\n\t\tconst asked: Pick<Copy, \"floor\" | \"from\" | \"resolved\"> = { floor: boundary };\n\t\tconst serving: Copy = {\n\t\t\tgeneration: route.generation,\n\t\t\tsource,\n\t\t\t// The wire request carries the floor from the first message: some sessions read the\n\t\t\t// demand only once.\n\t\t\tsub: subscribe(route.view(source), route.name, this.#wire(asked)),\n\t\t\t...asked,\n\t\t\treplaced: false,\n\t\t\tlease: 0,\n\t\t};\n\t\tthis.#add(serving);\n\t\tthis.#joinIncumbent(serving);\n\t}\n\n\t/**\n\t * Arriving before the serving copy delivered, read the source it replaced too, as the readers\n\t * before this one still do.\n\t */\n\t#joinIncumbent(serving: Copy): void {\n\t\tconst route = this.route;\n\t\tconst incumbent = route.incumbent;\n\t\tif (!incumbent || serving.source !== route.source) return;\n\t\tif (hooks.latestKey(serving.sub) !== undefined) {\n\t\t\tthis.#delivering(serving);\n\t\t\treturn;\n\t\t}\n\t\tif (this.#copies.some((copy) => copy.source.from.closed === incumbent.from.closed)) return;\n\t\tconst asked: Pick<Copy, \"floor\" | \"from\" | \"resolved\"> = { floor: serving.floor };\n\t\tthis.#add(\n\t\t\t{\n\t\t\t\tgeneration: serving.generation - 1,\n\t\t\t\tsource: incumbent,\n\t\t\t\tsub: subscribe(route.view(incumbent), route.name, this.#wire(asked)),\n\t\t\t\t...asked,\n\t\t\t\treplaced: true,\n\t\t\t\tlease: 0,\n\t\t\t},\n\t\t\tthis.#copies.indexOf(serving),\n\t\t);\n\t}\n\n\t/**\n\t * Once the track ended, subscribe the serving route's copy for the groups still read, from the\n\t * lowest, should the route have moved past the copies the reader holds: their recoveries\n\t * continue there. Nothing is handed out from it, so the reader stays on the copy the track\n\t * ended on.\n\t */\n\t#reroute(): void {\n\t\tconst route = this.route;\n\t\tconst source = route.source;\n\t\tif (source && this.out.size > 0 && !this.copy(route.generation)) {\n\t\t\tlet floor: bigint | undefined;\n\t\t\tfor (const recover of this.out) floor = min(floor ?? recover.key, recover.key);\n\t\t\tconst asked: Pick<Copy, \"floor\" | \"from\" | \"resolved\"> = { floor };\n\t\t\tconst copy: Copy = {\n\t\t\t\tgeneration: route.generation,\n\t\t\t\tsource,\n\t\t\t\tsub: subscribe(route.view(source), route.name, this.#wire(asked)),\n\t\t\t\t...asked,\n\t\t\t\treplaced: false,\n\t\t\t\tlease: 0,\n\t\t\t};\n\t\t\tsource.retain();\n\t\t\tthis.#bound(copy);\n\t\t\tthis.#rerouted.push(copy);\n\t\t}\n\t\tthis.#unroute();\n\t}\n\n\t/**\n\t * Let go of the rerouted copies no group still read needs: each one a newer route superseded,\n\t * and every one once none is read. Once the ended reader holds nothing left to hand out either,\n\t * it leaves the route.\n\t */\n\t#unroute(): void {\n\t\tif (!this.#ended) return;\n\t\tconst newest = this.out.size > 0 ? this.#rerouted.at(-1) : undefined;\n\t\tthis.#rerouted = this.#rerouted.filter((copy) => {\n\t\t\tif (copy === newest || copy.lease > 0) return true;\n\t\t\tthis.#drop(copy);\n\t\t\treturn false;\n\t\t});\n\t\tif (this.out.size === 0 && this.#copies.length === 0) this.route.leave(this);\n\t}\n\n\t/**\n\t * Where a switch splits the subscription: the largest group any copy holds, never below the\n\t * newest handed out. `undefined` while neither exists, when the new copy is asked for the ranges\n\t * as the copies it replaces were, and they go. Mirrors the Rust `Reader::boundary`.\n\t */\n\t#boundary(): bigint | undefined {\n\t\tlet boundary = this.#newest;\n\t\tfor (const copy of this.#copies) {\n\t\t\tconst latest = hooks.latestKey(copy.sub);\n\t\t\tif (latest !== undefined && (boundary === undefined || latest > boundary)) boundary = latest;\n\t\t}\n\t\treturn boundary;\n\t}\n\n\t/**\n\t * Take nothing past group `until` from replaced `copy`, and ask for nothing past it on the wire:\n\t * the copy replacing it starts there. A cap only narrows. Mirrors the Rust `Copy::cap`, by group\n\t * only: a JS switch resumes no group partway, so it has no frame to stop the old copy at.\n\t */\n\t#cap(copy: Copy, until: bigint): void {\n\t\tif (copy.until === null || (copy.until !== undefined && copy.until <= until)) return;\n\t\tcopy.until = until;\n\t\tthis.#update(copy);\n\t\tthis.#bound(copy);\n\t}\n\n\t/** Read `copy` as the newest one, or at `index`, recording the properties it commits. */\n\t#add(copy: Copy, index = this.#copies.length): void {\n\t\tconst { source } = copy;\n\t\tthis.#stamp(copy);\n\t\tsource.retain();\n\t\tthis.#readWhole(copy);\n\t\tthis.#bound(copy);\n\t\tthis.#copies.splice(index, 0, copy);\n\t\tthis.route.copied();\n\t\tconst shell = this.#shell;\n\t\tconst record = this.#record;\n\t\tcopy.sub.info().then(\n\t\t\t(info) => {\n\t\t\t\trecord(info, source);\n\t\t\t\tshell.commit(info);\n\t\t\t},\n\t\t\t() => {\n\t\t\t\t// A terminal refusal before metadata is the subscription's answer too. An info\n\t\t\t\t// reader never polls the group cursor that would otherwise propagate it.\n\t\t\t\tif (this.#shell.info() === undefined) this.#end((copy) => copy.sub.closed.peek());\n\t\t\t},\n\t\t);\n\t\tcopy.sub.finished().then(\n\t\t\t// A copy already let go says nothing more about the track.\n\t\t\t(end) => {\n\t\t\t\tif (!this.#copies.includes(copy)) return;\n\t\t\t\tthis.#declare(end);\n\t\t\t\tthis.#learnEnd();\n\t\t\t},\n\t\t\t() => {},\n\t\t);\n\t\tvoid copy.sub.closed.then(async (closed) => {\n\t\t\t// The serving copy closing cleanly is the logical track's end, once nothing it replaced\n\t\t\t// may still deliver below it.\n\t\t\tif (closed !== null) return;\n\t\t\tfor (;;) {\n\t\t\t\tthis.sync();\n\t\t\t\tif (this.#closed || this.#serving() !== copy || this.#conclude()) return;\n\t\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\t\tconst dispose = this.changed(() => {\n\t\t\t\t\t\tdispose();\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tthis.#changed.update((n) => n + 1);\n\t}\n\n\t/**\n\t * What `copy` is asked for: the reader's own preferences, from its floor and through its\n\t * replacement. Mirrors the Rust `Copy::wire`.\n\t */\n\t#wire(copy: Pick<Copy, \"floor\" | \"until\" | \"from\" | \"resolved\"> & { sub?: track.Subscriber }): track.Subscription {\n\t\tconst preferences = this.#shell.subscription.peek() ?? track.Subscription.default();\n\t\tconst ranges = preferences.ranges ?? [{}];\n\t\tif (copy.sub && copy.from !== undefined && sameSpans(copy.from, ranges)) {\n\t\t\t// A range keeps its first resolution: the copy re-resolves its clamped wire, so its own\n\t\t\t// resolution of a capped or floored request would move the endpoints for good.\n\t\t\tconst own = hooks.servingResolved(copy.sub);\n\t\t\tconst kept = copy.resolved ?? [];\n\t\t\tcopy.resolved = ranges.map((_, index) => kept[index] ?? own[index]);\n\t\t} else if (copy.sub) {\n\t\t\t// Replaced ranges resolve against its cache now, as any subscriber's do.\n\t\t\tcopy.from = ranges;\n\t\t\tcopy.resolved = hooks.resolveRanges(copy.sub, { ...preferences, ranges });\n\t\t} else if (copy.from === undefined || !sameSpans(copy.from, ranges)) {\n\t\t\t// A new copy starts from where the reader's ranges resolved.\n\t\t\tcopy.from = ranges;\n\t\t\tcopy.resolved = this.#window().resolved();\n\t\t}\n\t\t// A live join placed already, here or where the reader's own request came from, is asked\n\t\t// placed, so the copy starts it there and still expires it under its max.\n\t\tconst wire = asked(ranges, copy.floor, copyEnd(copy), copy.resolved ?? [], preferences.placed);\n\t\tconst { placed: _, ...rest } = preferences;\n\t\treturn wire.placed.size > 0\n\t\t\t? { ...rest, ranges: wire.ranges, placed: wire.placed }\n\t\t\t: { ...rest, ranges: wire.ranges };\n\t}\n\n\t/**\n\t * The reader's ranges resolved, a time start or live join where the first copy to place it\n\t * placed it, whatever its failover cap: that bounds what the copy delivers, not where the ranges\n\t * resolve. Kept once placed, past that copy being let go. A range stays as first held, unplaced,\n\t * while its start waits on a copy to place it. A copy resolves a time start against the groups\n\t * it holds, which may place it below where the reader's window did: the window decides what is\n\t * handed out. Mirrors the Rust `Reader::window`.\n\t */\n\t#window(): Window {\n\t\tconst ranges = this.#ranges();\n\t\tconst placed = this.#shell.subscription.peek()?.placed;\n\t\tlet resolution = this.#resolution;\n\t\tif (\n\t\t\t!resolution ||\n\t\t\t(resolution.from !== ranges && !sameSpans(resolution.from, ranges)) ||\n\t\t\t!samePlaced(resolution.placed, placed)\n\t\t) {\n\t\t\tresolution = this.#fresh(ranges);\n\t\t\tthis.#resolution = resolution;\n\t\t}\n\t\tif (resolution.window.settled) return resolution.window;\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (resolution.window.settled) break;\n\t\t\t// A copy whose delivery failed places a time start past its last group as if nothing\n\t\t\t// followed, but the front's next copy continues the track: only that copy knows which\n\t\t\t// group holds it, until the track concludes.\n\t\t\tif (!this.route.concluded && copyFailed(copy)) continue;\n\t\t\tif (!copy.from || !sameSpans(copy.from, ranges)) continue;\n\t\t\t// A closed copy's subscriber is no longer updated, so its own resolution is of the ranges\n\t\t\t// it had then; the one it took when asked for these answers instead.\n\t\t\tconst own = copy.sub.closed.peek() === undefined ? hooks.servingResolved(copy.sub) : (copy.resolved ?? []);\n\t\t\tconst cap = copyEnd(copy);\n\t\t\t// A failover cap at or below where a range starts empties the copy's range, which then\n\t\t\t// says nothing of where the reader's own range starts. One at or below where it ends cut\n\t\t\t// that end short, so it says nothing of where the reader's range ends.\n\t\t\tconst resolved = own.map((at, index) => {\n\t\t\t\t// A copy asked from above a range's time start says nothing of where it starts: a\n\t\t\t\t// backfill asked from below places it; see #backfillGaps.\n\t\t\t\tif (!at || raised(ranges[index], copy.floor) !== undefined) return undefined;\n\t\t\t\tif (cap !== undefined && at.end !== undefined && at.end <= at.start) return undefined;\n\t\t\t\treturn cap === undefined || (at.end !== undefined && at.end < cap) ? at : { ...at, end: undefined };\n\t\t\t});\n\t\t\tthis.#resolve(resolved);\n\t\t}\n\t\treturn resolution.window;\n\t}\n\n\t/**\n\t * A resolution of the reader's `ranges` with nothing placed but a live join already placed where\n\t * its preferences say, as each copy is asked to place it. Mirrors the Rust `mirrored_window`.\n\t */\n\t#fresh(ranges: readonly track.Range[]): Resolution {\n\t\tconst placed = this.#shell.subscription.peek()?.placed;\n\t\tconst joining = (key: bigint): Joining => {\n\t\t\tconst at = placed?.get(Number(key));\n\t\t\treturn at === undefined ? SINCE_ZERO : { at };\n\t\t};\n\t\tconst keyed = ranges.map((range, index) => [BigInt(index), range] as const);\n\t\treturn { from: ranges, placed, window: Window.keyed(keyed, undefined, UNHELD, joining) };\n\t}\n\n\t/**\n\t * The time starts of the unsettled ranges that the serving copy's resume point raised, by key:\n\t * no copy asked from there places them, only a backfill from below. Mirrors the Rust\n\t * `Reader::raised`.\n\t */\n\t#raised(): Map<bigint, bigint> {\n\t\tconst raisedAt = new Map<bigint, bigint>();\n\t\tconst floor = this.#copies.at(-1)?.floor;\n\t\tconst window = this.#resolution?.window;\n\t\tif (floor === undefined || !window || window.settled) return raisedAt;\n\t\tconst ranges = this.#ranges();\n\t\tfor (const key of window.unsettled()) {\n\t\t\tconst time = raised(ranges[Number(key)], floor);\n\t\t\tif (time !== undefined) raisedAt.set(key, time);\n\t\t}\n\t\treturn raisedAt;\n\t}\n\n\t/**\n\t * Place each unsettled {@link #window} range where a copy resolved it, on its own: one whose\n\t * start still waits leaves the rest placed, so a publisher names their starts. Mirrors the Rust\n\t * `Reader::resolve`.\n\t */\n\t#resolve(resolved: readonly (Resolved | undefined)[]): void {\n\t\tconst resolution = this.#resolution;\n\t\tif (!resolution) return;\n\t\tconst placed: [bigint, track.Range][] = [];\n\t\tfor (const key of resolution.window.unsettled()) {\n\t\t\tconst range = resolution.from[Number(key)];\n\t\t\tif (range === undefined) continue;\n\t\t\tconst at = resolved[Number(key)];\n\t\t\tif (!at) {\n\t\t\t\t// A range the copy left unresolved keeps its time start or live join, which only a copy\n\t\t\t\t// can place.\n\t\t\t\tconst unplaced = (rangeTime(range) ?? 0n) > 0n || liveMillis(range) !== undefined;\n\t\t\t\t// Placed as it is: nothing of it waits on a copy.\n\t\t\t\tif (!unplaced || isEmpty(range)) placed.push([key, range]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (range.end !== undefined && at.end === 0n) {\n\t\t\t\tplaced.push([key, EMPTY]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst out: track.Range = {};\n\t\t\t// One that reached back to the oldest group still does, as on a plain reader; a live join\n\t\t\t// starts where the copy placed it.\n\t\t\tif (at.floored) out.start = at.start;\n\t\t\tif (range.end !== undefined) out.end = at.end === undefined ? range.end : at.end - 1n;\n\t\t\tplaced.push([key, out]);\n\t\t}\n\t\tif (placed.length > 0) resolution.window.edit([], placed, undefined, AT_KEYS);\n\t}\n\n\t/** The reader's ranges, as its preferences name them. */\n\t#ranges(): readonly track.Range[] {\n\t\treturn (this.#shell.subscription.peek() ?? track.Subscription.default()).ranges ?? [{}];\n\t}\n\n\t/** Whether the reader's window names `key`; see {@link #window}. */\n\t#inWindow(key: bigint): boolean {\n\t\treturn this.#window().contains(key);\n\t}\n\n\t/**\n\t * Whether the reader's window and cursor name a group from `floor` up to `key` that `delivered`\n\t * lacks and that may yet land on `copy`: one outside the cursor never lands on a copy, nor one\n\t * `copy` declares skipped, nor any on a failed copy, which receives nothing more. Mirrors the\n\t * Rust `Reader::owes_below`.\n\t */\n\t#owesBelow(copy: Copy, floor: bigint, key: bigint, delivered: Delivered): boolean {\n\t\tif (copy.sub.closed.peek() instanceof Error) return false;\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\treturn this.#window()\n\t\t\t.runs(max(floor, cursor.start), min(key, cursor.end ?? key))\n\t\t\t.some((run) =>\n\t\t\t\t[...delivered.gaps(run.start, run.end)].some((gap) => {\n\t\t\t\t\tfor (let at = gap.start; at < gap.end; ) {\n\t\t\t\t\t\tconst past = hooks.holeEnd(copy.sub, at, false);\n\t\t\t\t\t\tif (past === undefined || past <= at) return true;\n\t\t\t\t\t\tat = past;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * Whether a fill other than `next`, the copy an ordered read is about to hand out `key` from,\n\t * still owes a group below `key` that `delivered` lacks, the reader's window and cursor name, and\n\t * the reader or a copy has not recorded skipped, as its own ordered read waits for it: one a fill\n\t * of its route has yet to answer, or its received route's live feed owes within the budget. Each\n\t * fill judges its own drops: another route giving a group up says nothing of this one. Arms that\n\t * read's wakeups, which wake this one. Mirrors the Rust `Reader::fill_owes_below`.\n\t */\n\t#fillOwesBelow(next: Copy, key: bigint, delivered: Delivered): boolean {\n\t\tconst floor = delivered.runEnd(0n) ?? 0n;\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (!copy.fills || copy === next || !this.#feeds(copy)) continue;\n\t\t\tconst start = max(floor, copy.backfill ? cursor.start : max(cursor.start, copy.floor ?? 0n));\n\t\t\tconst end = min(min(key, copyEnd(copy) ?? key), cursor.end ?? key);\n\t\t\tif (start >= end) continue;\n\t\t\tconst skipped = this.skippedIn(start, end);\n\t\t\tfor (const run of this.#window().runs(start, end)) {\n\t\t\t\tfor (const gap of delivered.gaps(run.start, run.end)) {\n\t\t\t\t\tfor (const open of runGaps(skipped, gap.start, gap.end)) {\n\t\t\t\t\t\tif (hooks.owes(copy.sub, open.start, open.end)) return true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t#update(copy: Copy): void {\n\t\t// A closed copy still resolves replaced ranges against the groups it holds, for the window.\n\t\tconst wire = this.#wire(copy);\n\t\tif (copy.sub.closed.peek() === undefined) {\n\t\t\t// Restated, as the reader's ranges were, unless they only retuned a live join's max: a join\n\t\t\t// whose max alone changed is then placed afresh rather than retuned where the copy placed\n\t\t\t// the old one. Mirrors the Rust `Copy::ask_whole`.\n\t\t\tif (this.#shell.retuned()) copy.sub.update(wire);\n\t\t\telse hooks.restateSubscriber(copy.sub, wire);\n\t\t\tthis.#stamp(copy);\n\t\t} else {\n\t\t\t// Its ranges stay as resolved when it closed, but the groups it still holds are picked in\n\t\t\t// the reader's Group Order: each takes the reader's policy, which keeps where it resolved.\n\t\t\t// Mirrors the Rust `Copy::send`, which edits every copy.\n\t\t\tconst policy = rangesPolicy(wire.ranges ?? []);\n\t\t\tconst prefs = hooks.preferences(copy.sub);\n\t\t\tconst held = prefs.held();\n\t\t\tconst add: (readonly [bigint, track.Range])[] = [];\n\t\t\tconst placed = new Map<bigint, bigint>();\n\t\t\tfor (const [index, [key, range]] of [...prefs.entries()].entries()) {\n\t\t\t\tconst at = held[index].placed;\n\t\t\t\tif (at !== undefined) placed.set(key, at);\n\t\t\t\tconst { priority, order } = policyOf(range);\n\t\t\t\tif (priority !== policy.priority || order !== policy.order) add.push([key, withPolicy(range, policy)]);\n\t\t\t}\n\t\t\tif (add.length > 0) hooks.editSubscriber(copy.sub, { retire: [], add, placed });\n\t\t}\n\t}\n\n\t/**\n\t * Note each live join `copy` is asked for as the reader added it, so an answer the copy recorded\n\t * since places it, even one recorded before this subscription. The copy keys its ranges by\n\t * position, as the reader's are ordered. Mirrors the Rust `Copy::stamp`.\n\t */\n\t#stamp(copy: Copy): void {\n\t\tconst since = this.#shell.since().map((tick, index) => [BigInt(index), tick] as const);\n\t\thooks.stampSubscriber(copy.sub, since);\n\t}\n\n\t/**\n\t * Apply the reader's preferences and cursor to every copy once they changed. Their signals\n\t * notify a microtask after a change, so every read applies them first too: a copy then picks\n\t * and judges its groups by what the reader holds now, such as a just-lowered live {@link track.Live.max} or\n\t * replaced ranges, not its last ones. Mirrors the Rust `Reader::sync`.\n\t */\n\t#follow(): void {\n\t\tconst subscription = this.#shell.subscription.peek();\n\t\tif (subscription !== this.#mirrored) {\n\t\t\tthis.#mirrored = subscription;\n\t\t\t// New preferences may ask what a backfill failed to get.\n\t\t\tthis.#refused = undefined;\n\t\t\tfor (const copy of [...this.#copies, ...this.#rerouted]) this.#update(copy);\n\t\t\t// A copy just resolved replaced ranges against its cache, before its failover cap raised\n\t\t\t// them, so the reader takes that resolution now, the newest copy's first.\n\t\t\tconst ranges = this.#ranges();\n\t\t\tif (this.#resolution && !sameSpans(this.#resolution.from, ranges)) {\n\t\t\t\t// The serving copy's resume point may cut off groups the new ranges cover.\n\t\t\t\tthis.#resumed = true;\n\t\t\t\tthis.#resolution = this.#fresh(ranges);\n\t\t\t\tfor (let index = this.#copies.length - 1; index >= 0; index--) {\n\t\t\t\t\tif (this.#resolution.window.settled) break;\n\t\t\t\t\tconst copy = this.#copies[index];\n\t\t\t\t\t// As in #window, a failed copy leaves the placement to the copy continuing the track.\n\t\t\t\t\tif (!this.route.concluded && copyFailed(copy)) continue;\n\t\t\t\t\tif (copy.from && sameSpans(copy.from, ranges)) this.#resolve(copy.resolved ?? []);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\tif (cursor === this.#bounded) return;\n\t\tconst passed = this.#bounded.start;\n\t\tthis.#bounded = cursor;\n\t\tfor (const copy of [...this.#copies, ...this.#rerouted]) this.#bound(copy);\n\t\tif (cursor.start < passed) this.#backfill(cursor.start, passed);\n\t\tif (this.#ended) this.#letGo(this.#delivered);\n\t}\n\n\t/**\n\t * Apply the reader's group cursor to `copy`, never below the copy's own resume point: groups\n\t * under it were handed out by an earlier route, or never owed. A backfill has none: the\n\t * reader's window and what it handed out decide what it takes.\n\t */\n\t#bound(copy: Copy): void {\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\tconst start = copy.backfill ? cursor.start : max(cursor.start, copy.floor ?? 0n);\n\t\tconst replaced = copyEnd(copy);\n\t\tconst end = replaced === undefined ? cursor.end : min(cursor.end ?? replaced, replaced);\n\t\tcopy.sub.withRange({\n\t\t\tstart: { included: start },\n\t\t\tend: end === undefined ? undefined : { excluded: end },\n\t\t});\n\t}\n\n\t/**\n\t * Ask the newest copy's route for the groups from `start` up to `passed` under that copy's\n\t * resume point, which a lowered floor newly covers. The copies that cached them may be gone,\n\t * and that copy never asked for them, so a bounded copy of the same route asks for just those.\n\t * One asked from a `raised` time start also reads the group holding it, under `start`.\n\t */\n\t#backfill(start: bigint, passed: bigint, raised = false): void {\n\t\tconst newest = this.#copies.at(-1);\n\t\tconst resumed = newest && resumePoint(newest);\n\t\tif (this.#closed || this.#ended || !newest || resumed === undefined) return;\n\t\tconst end = min(passed, resumed);\n\t\t// An ordered reader never goes back, nor does any reader past its budget.\n\t\tif (this.#delivered.covers(start, end)) return;\n\t\t// What a backfill of this route already failed to get, it would fail to get again.\n\t\tconst refused = this.#refused;\n\t\tif (refused?.generation === newest.generation && refused.start <= start && end <= refused.end) return;\n\t\t// A floor lowered again asks once. A copy that dropped a group from `start` on no longer\n\t\t// offers it, so it asks for nothing there.\n\t\tconst closed = newest.source.from.closed;\n\t\tconst asks = (copy: Copy) => {\n\t\t\tconst point = resumePoint(copy);\n\t\t\treturn (\n\t\t\t\tcopy.source.from.closed === closed && copy.floor !== undefined && point !== undefined && point <= start\n\t\t\t);\n\t\t};\n\t\tif (this.#copies.some((copy) => asks(copy) && (copyEnd(copy) ?? UNBOUNDED) >= end)) return;\n\t\t// A later resume point widens the route's backfill rather than asking again, so flaps over\n\t\t// a gap keep one per route, reading again one that ran out. Waited for as long as a new one\n\t\t// would be.\n\t\tconst widened = this.#copies\n\t\t\t.slice(0, -1)\n\t\t\t.find((copy) => !(copy.done instanceof Error) && copy.until !== undefined && asks(copy));\n\t\tif (widened) {\n\t\t\twidened.until = end - 1n;\n\t\t\twidened.since = now();\n\t\t\twidened.done = undefined;\n\t\t\twidened.fills = true;\n\t\t\tif (raised) widened.backfill = true;\n\t\t\tthis.#update(widened);\n\t\t\tthis.#bound(widened);\n\t\t\tthis.wake();\n\t\t\treturn;\n\t\t}\n\t\tconst backfill: Pick<Copy, \"floor\" | \"backfill\" | \"until\" | \"from\" | \"resolved\"> = {\n\t\t\tfloor: start,\n\t\t\tbackfill: raised ? true : undefined,\n\t\t\tuntil: end - 1n,\n\t\t};\n\t\tthis.#add(\n\t\t\t{\n\t\t\t\tgeneration: newest.generation,\n\t\t\t\tsource: newest.source,\n\t\t\t\tsub: subscribe(this.route.view(newest.source), this.route.name, this.#wire(backfill)),\n\t\t\t\t...backfill,\n\t\t\t\t// Bounded from the start: everything it may deliver is older than what the reader\n\t\t\t\t// already read, so it is waited for no longer than the reader's budget.\n\t\t\t\treplaced: true,\n\t\t\t\tsince: now(),\n\t\t\t\tlease: 0,\n\t\t\t\tfills: true,\n\t\t\t},\n\t\t\tthis.#copies.length - 1,\n\t\t);\n\t}\n\n\t/**\n\t * Ask the serving route for the groups below its copy's resume point that the reader still\n\t * lacks: a late or reordered one, or one in flight on the route it replaced, as one cursor on\n\t * the logical track would still get. From the lowest gap within the reader's cursor and window,\n\t * which decide what it reads, so groups already handed out are not asked for again below it. A\n\t * gap past the reader's budget was already forgotten as handed out. A lowered cursor asks\n\t * through {@link #backfill} itself. A time start the resume point raised is asked from its time,\n\t * so the backfill places it at the group holding it, as the route would for a plain reader.\n\t * Mirrors the Rust `Reader::backfill_gaps`.\n\t */\n\t#backfillGaps(delivered: Delivered): void {\n\t\tif (!this.#resumed) return;\n\t\tconst window = this.#window();\n\t\tconst raisedAt = this.#raised();\n\t\t// Kept until a copy places the ranges, but those whose start the resume point raised, which\n\t\t// only the backfill places: only then can the gaps they cover be judged.\n\t\tlet floor = window.floor();\n\t\tconst serving = this.#copies.at(-1);\n\t\tconst resumed = serving && resumePoint(serving);\n\t\tif (floor === undefined && raisedAt.size !== window.unsettled().size) {\n\t\t\t// The gaps wait for the other ranges to place, but an owed raised start is asked now: its\n\t\t\t// backfill places it whatever they wait on, and a later ask finds it.\n\t\t\tif (resumed === undefined) return;\n\t\t\tlet start: bigint | undefined;\n\t\t\tfor (const time of raisedAt.values()) {\n\t\t\t\tif (!delivered.covers(time, resumed)) start = start === undefined ? time : min(start, time);\n\t\t\t}\n\t\t\tif (start !== undefined) this.#backfill(start, resumed, true);\n\t\t\treturn;\n\t\t}\n\t\tif (floor === undefined) {\n\t\t\tif (raisedAt.size === 0) return;\n\t\t\tfloor = window.runs()[0]?.start ?? 0n;\n\t\t}\n\t\t// A raised start whose groups from its time the reader already holds or passed owes nothing\n\t\t// under the resume point: placed at its time, it hands out what the group holding it would,\n\t\t// as none under it goes out.\n\t\tconst owed: bigint[] = [];\n\t\tconst placed: (Resolved | undefined)[] = [];\n\t\tconst ranges = this.#ranges();\n\t\tfor (const [key, time] of raisedAt) {\n\t\t\tif (resumed !== undefined && !delivered.covers(time, resumed)) {\n\t\t\t\towed.push(time);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst end = ranges[Number(key)]?.end;\n\t\t\tplaced[Number(key)] = { start: time, end: end === undefined ? undefined : end + 1n, floored: true };\n\t\t}\n\t\tif (placed.length > 0) {\n\t\t\tthis.#resolve(placed);\n\t\t\t// What the starts placed hold of the history a fold took unjudged is owed before the walk\n\t\t\t// below judges the gaps.\n\t\t\tthis.#reopenFolded(delivered);\n\t\t}\n\t\tthis.#resumed = false;\n\t\tif (resumed === undefined) return;\n\t\t// A group a replaced copy drains (see #mayDrain) is that copy's: the serving route is asked\n\t\t// from the lowest one none drains.\n\t\tconst cursor = this.#shell.cursor.peek().start;\n\t\t// Each replaced copy's staleness verdict, taken once for the whole walk.\n\t\tconst taking = new Map(\n\t\t\tthis.#copies.filter((copy) => copy.replaced).map((copy) => [copy, hooks.taking(copy.sub)]),\n\t\t);\n\t\t// The copy left to drain group `key`, if any.\n\t\tconst drains = (key: bigint) =>\n\t\t\tthis.#copies.find((copy) => this.#mayDrain(copy, key, cursor, taking.get(copy)));\n\t\tlet start: bigint | undefined;\n\t\t// Copies an earlier walk left keys to, whose set this walk's keys may now leave unsorted.\n\t\tconst merged = new Set<Copy>();\n\t\tfor (const gap of delivered.gaps(max(floor, cursor), resumed)) {\n\t\t\tlet key = gap.start;\n\t\t\tfor (; key < gap.end; key++) {\n\t\t\t\tconst copy = drains(key);\n\t\t\t\tif (!copy) break;\n\t\t\t\t// Added to what earlier walks left.\n\t\t\t\tif (copy.drains?.size) merged.add(copy);\n\t\t\t\tcopy.drains ??= new Set();\n\t\t\t\tcopy.drains.add(key);\n\t\t\t}\n\t\t\tif (key < gap.end) {\n\t\t\t\tstart = key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Kept ascending, so an ordered read's rescan stops at the group it hands out.\n\t\tfor (const copy of merged) {\n\t\t\tcopy.drains = new Set([...(copy.drains ?? [])].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0)));\n\t\t}\n\t\t// A raised start is asked from its time whatever the local floor, so the backfill places it,\n\t\t// and the group holding it is read once the floor lets it.\n\t\tfor (const time of owed) start = start === undefined ? time : min(start, time);\n\t\tif (start === undefined) return;\n\t\t// The group holding a time start at or past where it is asked from may lie under it.\n\t\tconst from = start;\n\t\tconst raised = this.#ranges().some((range) => {\n\t\t\tconst time = rangeTime(range);\n\t\t\treturn time !== undefined && from <= time && time < resumed;\n\t\t});\n\t\tthis.#backfill(start, resumed, raised);\n\t}\n\n\t/** Wake parked reads, so they look again and let go of what nothing needs. */\n\twake(): void {\n\t\tthis.#changed.update((n) => n + 1);\n\t}\n\n\t/** The newest open copy this reader holds of `source`'s broadcast. */\n\tcopyOn(source: Source): Copy | undefined {\n\t\treturn this.#copies.findLast(\n\t\t\t(copy) => copy.source.from.closed === source.from.closed && copy.sub.closed.peek() === undefined,\n\t\t);\n\t}\n\n\t/**\n\t * The reader's copy of the route at `generation`, if it subscribed one, rather than a backfill of\n\t * it: once the track ended, the one rerouted for the groups still read.\n\t */\n\tcopy(generation: number): Copy | undefined {\n\t\tconst matches = (copy: Copy) => copy.generation === generation;\n\t\treturn this.#copies.findLast(matches) ?? this.#rerouted.findLast(matches);\n\t}\n\n\t/**\n\t * The copies other than `except` whose track still holds group `key` unfailed, newest first: the\n\t * rerouted ones too, which continue a group though they hand none out.\n\t */\n\tholding(key: bigint, except: Copy): Copy[] {\n\t\tconst copies = [...this.#copies, ...this.#rerouted];\n\t\tconst holding: Copy[] = [];\n\t\tfor (let index = copies.length - 1; index >= 0; index--) {\n\t\t\tconst copy = copies[index];\n\t\t\tif (copy !== except && hooks.holdsGroup(copy.sub, key)) holding.push(copy);\n\t\t}\n\t\treturn holding;\n\t}\n\n\tcachedGroup(key: bigint, from = 0): GroupConsumer | undefined {\n\t\tfor (let index = this.#copies.length - 1; index >= 0; index--) {\n\t\t\tconst copy = this.#copies[index];\n\t\t\tconst group = hooks.cachedGroup(copy.sub, key, from);\n\t\t\tif (group) return this.#handOut(copy, group);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\t// A frame's moq-timestamp Object ID follows from the group's content alone, so any copy that\n\t// proves it gives the same answer: read from each copy's cached group, newest copy first,\n\t// never mirrored, since a mirror replays every frame the group holds.\n\tcachedTimedId(key: bigint, index: number, timescale: Timescale): bigint | undefined {\n\t\tfor (let at = this.#copies.length - 1; at >= 0; at--) {\n\t\t\tconst copy = this.#copies[at];\n\t\t\tconst id = copy && hooks.cachedTimedId(copy.sub, key, index, timescale);\n\t\t\tif (id !== undefined) return id;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\t// A group a replaced copy delivered landed all the same, so every copy counts.\n\tlanded(start: bigint, end: bigint): Instant | undefined {\n\t\tlet landed: Instant | undefined;\n\t\tfor (const copy of this.#copies) {\n\t\t\tconst arrived = hooks.landed(copy.sub, start, end);\n\t\t\tif (arrived && (!landed || arrived.gt(landed))) landed = arrived;\n\t\t}\n\t\treturn landed;\n\t}\n\n\tjudgedGroup(key: bigint): GroupConsumer | undefined {\n\t\tfor (let index = this.#copies.length - 1; index >= 0; index--) {\n\t\t\tconst copy = this.#copies[index];\n\t\t\tconst group = hooks.cachedGroup(copy.sub, key);\n\t\t\tif (!group) continue;\n\t\t\t// Judged by the copy it is read from: this reader's own timeline stays empty.\n\t\t\thooks.expireGroup(group, hooks.staleAt(copy.sub, key));\n\t\t\treturn this.#handOut(copy, group);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * `copy` handed out `key`. The serving copy's first group bounds the incumbent copies a switch\n\t * left uncapped, just below it, unless they go (see {@link #delivering}): one a reader joining\n\t * mid-switch reads (see {@link #joinIncumbent}), and one a switch before any group kept. What\n\t * they hold under it may be groups the new route never has, and what is at or above it the new\n\t * route delivers. Never below a group already handed out. A group it replays, already handed\n\t * out, bounds nothing: the incumbent may still hold the next. Nor does a backfill of the\n\t * serving route.\n\t */\n\t#observe(copy: Copy, key: bigint): void {\n\t\tcopy.delivered = true;\n\t\tif (copy.replaced || copy.generation !== this.#generation) return;\n\t\tif (this.#delivering(copy)) return;\n\t\tconst bound = max(this.#newest ?? -1n, key - 1n);\n\t\tfor (const replaced of this.#copies) {\n\t\t\tif (replaced === copy || !replaced.replaced || replaced.until !== undefined) continue;\n\t\t\treplaced.until = bound < 0n ? null : bound;\n\t\t\treplaced.since = now();\n\t\t\tthis.#update(replaced);\n\t\t\tthis.#bound(replaced);\n\t\t}\n\t}\n\n\t/**\n\t * Serving `copy` delivers, which is when the Rust front splices it in. With nothing held nor\n\t * handed out, the replaced copies a switch left uncapped have nothing to drain, so they go, as\n\t * the Rust `Reader::sync` drops them on a switch without a boundary. Whether they went.\n\t */\n\t#delivering(copy: Copy): boolean {\n\t\tthis.route.delivered(copy.source);\n\t\tif (this.#newest !== undefined) return false;\n\t\tif (this.#copies.some((other) => other !== copy && hooks.latestKey(other.sub) !== undefined)) return false;\n\t\tthis.#dropCopies((other) => other.replaced && other.until === undefined);\n\t\treturn true;\n\t}\n\n\t/** Let go of every copy `drops` picks, learning first any end one declared, which outlives it. */\n\t#dropCopies(drops: (copy: Copy) => boolean): void {\n\t\tthis.#learnEnd();\n\t\tthis.#copies = this.#copies.filter((copy) => {\n\t\t\tif (!drops(copy)) return true;\n\t\t\tthis.#drop(copy);\n\t\t\treturn false;\n\t\t});\n\t}\n\n\t#deliverable(copy: Copy, key: bigint, delivered: Delivered): boolean {\n\t\tconst end = copyEnd(copy);\n\t\tif (end !== undefined && key >= end) return false;\n\t\t// A range a copy placed during this read may hold a group a fold counted handed out.\n\t\tif (delivered.unjudged(key) && this.#window().holds(key)) this.#reopenFolded(delivered);\n\t\treturn !delivered.has(key);\n\t}\n\n\t// Whether a copy's next group, `key`, waits for the reader's window to be placed, which decides\n\t// whether it goes out: a failed copy's, until a copy continuing the track places it, and a\n\t// backfill's that no range placed so far holds, since only a placed range bounds the groups under\n\t// the resume point. Mirrors the Rust `Reader::poll_first`.\n\t#waits(copy: Copy, key: bigint): boolean {\n\t\tif (!this.#mayWait(copy)) return false;\n\t\tconst failed = !this.route.concluded && copyFailed(copy);\n\t\tconst window = this.#window();\n\t\treturn window.pending && (failed || !window.holds(key));\n\t}\n\n\t// Whether the hold in `#waits` can apply to a copy at all, so only those peek before taking.\n\t#mayWait(copy: Copy): boolean {\n\t\treturn (!this.route.concluded && copyFailed(copy)) || copy.backfill === true;\n\t}\n\n\ttryGroup(ordered: boolean, delivered: Delivered, dispositions: boolean, admit?: bigint): Recv {\n\t\tthis.#delivered = delivered;\n\t\tthis.sync();\n\t\tthis.#learnEnd();\n\t\tif (this.#closed) return { kind: \"done\" };\n\t\tthis.#groupsRead = true;\n\t\tthis.#reopenFolded(delivered);\n\t\tthis.#reopen();\n\t\tthis.#backfillGaps(delivered);\n\t\tif (dispositions) {\n\t\t\tconst dropped = this.#tryDrop(delivered);\n\t\t\tif (dropped) return dropped;\n\t\t}\n\t\t// The first group any copy holds next: the lowest for an ordered read, else the first in\n\t\t// the subscription's Group Order. A replaced copy's buffered group comes before a later one\n\t\t// the serving copy already has. An arrival read still delivers a lower group that truly\n\t\t// arrives later.\n\t\t// A copy no switch replaced refusing the ranges fails the read before any copy hands out a\n\t\t// group, as the Rust `Reader::poll_first` meets it in the same pass as the groups: the serving\n\t\t// copy, or the last one while the front parks between routes.\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (copy.replaced || !this.#feeds(copy)) continue;\n\t\t\tconst refused = hooks.refused(copy.sub);\n\t\t\tif (refused) return { kind: \"error\", error: refused, refused: true };\n\t\t}\n\t\tlet owing: Copy[];\n\t\tfor (;;) {\n\t\t\tconst first = this.#first(ordered, delivered, admit);\n\t\t\towing = first.owing;\n\t\t\tconst next = first.next;\n\t\t\tif (!next) break;\n\t\t\t// An ordered hand-out passes every key below it: a group a copy was left to drain there, or\n\t\t\t// the candidate itself, that it no longer drains is asked of the serving route first.\n\t\t\tif (ordered && first.key !== undefined) {\n\t\t\t\tconst resumed = this.#resumed;\n\t\t\t\tthis.#rescanDrains(delivered, first.key);\n\t\t\t\tif (this.#resumed && !resumed && this.#window().floor() !== undefined) {\n\t\t\t\t\treturn this.tryGroup(ordered, delivered, dispositions, admit);\n\t\t\t\t}\n\t\t\t\t// The fill's answer, its track giving the group up, or the budget wakes the read.\n\t\t\t\tif (this.#fillOwesBelow(next, first.key, delivered)) return { kind: \"idle\" };\n\t\t\t}\n\t\t\tconst recv = this.#take(next, ordered, dispositions, admit);\n\t\t\tif (recv.kind === \"drop\") {\n\t\t\t\tconst dropped = this.#tryDrop(delivered);\n\t\t\t\tif (dropped) return dropped;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (recv.kind === \"group\") {\n\t\t\t\t// The take may pass the offered group, such as one missing its head, for a later one\n\t\t\t\t// the window leaves out: judge the group it got.\n\t\t\t\tconst key = recv.group.start;\n\t\t\t\tconst deliverable = this.#deliverable(next, key, delivered);\n\t\t\t\tif (!deliverable || !this.#inWindow(key)) {\n\t\t\t\t\tif (deliverable) this.#skip(next, key);\n\t\t\t\t\trecv.group.close();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthis.#observe(next, key);\n\t\t\t\treturn { kind: \"group\", group: this.#handOut(next, recv.group) };\n\t\t\t}\n\t\t\t// The lowest buffered group keeps its place while its copy waits on a hole.\n\t\t\t// A newer copy must not pass it and permanently discard it from sequence order.\n\t\t\tif (ordered && recv.kind === \"idle\") return recv;\n\t\t\tbreak;\n\t\t}\n\t\t// The failed copies holding a group back for a placement, which still report their failure.\n\t\tconst held = new Set<Copy>();\n\t\t// Whether a replaced copy failed this pass, owing the serving route a backfill.\n\t\tlet owed = false;\n\t\t// The serving copy first: it is the one that keeps delivering.\n\t\tfor (let index = this.#copies.length - 1; index >= 0; index--) {\n\t\t\tconst copy = this.#copies[index];\n\t\t\tif (!this.#feeds(copy) || owing.includes(copy)) continue;\n\t\t\tfor (;;) {\n\t\t\t\tconst newest = this.#newest === undefined ? undefined : this.#newest + 1n;\n\t\t\t\t// Its group stays there until placed, but how it ran out is still judged below. It got\n\t\t\t\t// a group, so its route did not refuse the track.\n\t\t\t\tconst peeked = this.#mayWait(copy) ? hooks.peekGroup(copy.sub, ordered, newest) : undefined;\n\t\t\t\tif (peeked !== undefined && this.#waits(copy, peeked)) {\n\t\t\t\t\tcopy.delivered = true;\n\t\t\t\t\theld.add(copy);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst recv = this.#take(copy, ordered, dispositions, admit);\n\t\t\t\tif (recv.kind === \"drop\") {\n\t\t\t\t\tconst dropped = this.#tryDrop(delivered);\n\t\t\t\t\tif (dropped) return dropped;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (recv.kind === \"group\") {\n\t\t\t\t\tconst key = recv.group.start;\n\t\t\t\t\tconst deliverable = this.#deliverable(copy, key, delivered);\n\t\t\t\t\tif (!deliverable || !this.#inWindow(key)) {\n\t\t\t\t\t\tif (deliverable) this.#skip(copy, key);\n\t\t\t\t\t\trecv.group.close();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tthis.#observe(copy, key);\n\t\t\t\t\treturn { kind: \"group\", group: this.#handOut(copy, recv.group) };\n\t\t\t\t}\n\t\t\t\t// Drained: the track ended as the copy did, which is not cleanly when its\n\t\t\t\t// session went away short of the declared end.\n\t\t\t\tif (recv.kind === \"done\") {\n\t\t\t\t\tconst closed = copy.sub.closed.peek();\n\t\t\t\t\tcopy.done = closed instanceof Error ? closed : hooks.arrived(copy.sub);\n\t\t\t\t\tif (!(closed instanceof Error) && hooks.subscriberEnd(copy.sub)) this.#settled = true;\n\t\t\t\t} else if (recv.kind === \"error\") {\n\t\t\t\t\t// A copy still serving that refuses the reader's ranges fails the read until they\n\t\t\t\t\t// change, as the read that met it says, so it is not done; a copy it replaced refusing\n\t\t\t\t\t// leaves the rest to the one now serving. Mirrors the Rust `Reader::poll_first`.\n\t\t\t\t\tif (recv.refused && !copy.replaced) return recv;\n\t\t\t\t\tcopy.done = recv.error;\n\t\t\t\t} else if (this.#drained(copy, delivered)) copy.done = hooks.arrived(copy.sub);\n\t\t\t\t// What a replaced copy that just failed still had to drain is asked of the serving route.\n\t\t\t\tif (copy.replaced && copy.done instanceof Error) {\n\t\t\t\t\tthis.#resumed = true;\n\t\t\t\t\towed = true;\n\t\t\t\t\t// A backfill of the serving route that failed is not asked of that route again.\n\t\t\t\t\tconst end = copyEnd(copy);\n\t\t\t\t\tif (copy.generation === this.#generation && copy.floor !== undefined && end !== undefined) {\n\t\t\t\t\t\tthis.#refused = { generation: copy.generation, start: copy.floor, end };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tconst resumed = this.#resumed;\n\t\t// Nothing to hand out, so a group a copy was left to drain and no longer drains is asked of\n\t\t// the serving route now, as a cursor asks a fill only once it holds nothing to read: a\n\t\t// backlog draining meanwhile costs no rescan per group.\n\t\tthis.#rescanDrains(delivered);\n\t\tthis.#letGo(delivered);\n\t\t// A copy that stopped draining a group, or was let go with one, owes the serving route a\n\t\t// backfill: ask now.\n\t\tif (this.#resumed && !resumed) owed = true;\n\t\t// A replaced copy that failed or was let go with a group to drain this pass owes the\n\t\t// serving route a backfill once the window is placed: ask now, before any end, since its\n\t\t// close already fired and no later group is sure to wake the read. A backfill that failed\n\t\t// is not asked again (`#refused`), so this ends. Mirrors the Rust `Reader::poll_first`.\n\t\tif (owed && this.#resumed && this.#window().floor() !== undefined) {\n\t\t\treturn this.tryGroup(ordered, delivered, dispositions, admit);\n\t\t}\n\t\t// A copy that ran out or was let go no longer holds back a drop.\n\t\tif (dispositions) {\n\t\t\tconst dropped = this.#tryDrop(delivered);\n\t\t\tif (dropped) return dropped;\n\t\t}\n\t\tconst generation = this.route.generation;\n\t\tconst end = this.#end((copy) => {\n\t\t\tif (typeof copy.done === \"number\") return null;\n\t\t\tconst failed = held.has(copy) ? copy.sub.closed.peek() : undefined;\n\t\t\treturn copy.done ?? (failed instanceof Error ? failed : undefined);\n\t\t});\n\t\t// A revert serves the copy the failed replacement capped again, which may hold the next\n\t\t// group already.\n\t\tif (end.kind === \"idle\" && this.route.generation !== generation) {\n\t\t\treturn this.tryGroup(ordered, delivered, dispositions, admit);\n\t\t}\n\t\treturn end;\n\t}\n\n\thasUnreadGroup(start: bigint, end: bigint | undefined, delivered: Delivered): boolean {\n\t\treturn this.#copies.some((copy) => hooks.hasUnreadGroup(copy.sub, start, end, delivered));\n\t}\n\n\t/**\n\t * Whether the reader's bounded {@link #window} has nothing left to deliver, once no replaced\n\t * copy may still deliver a group under its bound: every group of the whole window is handed out\n\t * (in `delivered`) or accounted for, as {@link #accounts} judges. Mirrors the Rust\n\t * `Reader::exhausted`.\n\t */\n\texhausted(delivered: Delivered, ordered: boolean): boolean {\n\t\tconst serving = this.#judging(delivered);\n\t\tif (!serving) return false;\n\t\t// The reader's own window, as its copies placed it: the subscriber's leaves its anchors to them.\n\t\tconst window = this.#window();\n\t\tdelivered.reopen(window);\n\t\tconst end = window.end();\n\t\tif (end === undefined || window.pending) return false;\n\t\tconst gaps = window.runs(window.floor() ?? 0n, end).flatMap((run) => [...delivered.gaps(run.start, run.end)]);\n\t\treturn this.#accounts(serving, delivered, gaps, ordered);\n\t}\n\n\t/**\n\t * Whether every key of `gaps`, which `delivered` lacks, is accounted for, once no replaced copy\n\t * may still deliver a group under its bound; see {@link #accounts}.\n\t */\n\taccounts(delivered: Delivered, gaps: readonly Run[], ordered: boolean): boolean {\n\t\tconst serving = this.#judging(delivered);\n\t\treturn serving !== undefined && this.#accounts(serving, delivered, gaps, ordered);\n\t}\n\n\t/**\n\t * The serving copy, once the reader may judge what is accounted for: a route between copies,\n\t * a backfill still to ask, or a replaced copy that may still deliver leaves nothing to judge.\n\t * Lets go of the copies nothing needs any more either way.\n\t */\n\t#judging(delivered: Delivered): Copy | undefined {\n\t\tthis.sync();\n\t\tif (this.#closed || this.#ended || this.#resumed) return undefined;\n\t\tconst serving = this.#copies.at(-1);\n\t\tif (!serving || serving.replaced || serving.done !== undefined || serving.generation !== this.#generation) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.#letGo(delivered) ? undefined : serving;\n\t}\n\n\t/**\n\t * Whether every key of `gaps`, which `delivered` lacks, is accounted for.\n\t *\n\t * Under the serving copy's resume point, a key the cursor admits was the copies' it replaced, each\n\t * let go once it had nothing more. One it keeps out stays owed, as on one cursor, until a copy held\n\t * now declares it skipped or the asked copy's fills give it up, and the serving route is asked for those no copy does (see\n\t * {@link #ask}), so its answer settles them however many copies came and went. The serving copy\n\t * judges the rest by where it placed the reader's ranges itself: a time a copy held no group for\n\t * places the reader's window at the time itself, wider than any group the serving copy reads.\n\t * Mirrors the Rust `Reader::accounts`.\n\t */\n\t#accounts(serving: Copy, delivered: Delivered, gaps: readonly Run[], ordered: boolean): boolean {\n\t\tconst window = this.#window();\n\t\tif (window.end() === undefined || window.pending) return false;\n\t\tconst resumed = resumePoint(serving) ?? 0n;\n\t\tconst open: Run[] = [];\n\t\tconst above: Run[] = [];\n\t\tfor (const gap of gaps) {\n\t\t\tfor (const run of this.#keptOut(gap, resumed)) {\n\t\t\t\tfor (const unknown of this.#unskipped(run)) insertRun(open, unknown.start, unknown.end);\n\t\t\t}\n\t\t\tconst split = min(max(resumed, gap.start), gap.end);\n\t\t\tif (split < gap.end) above.push({ start: split, end: gap.end });\n\t\t}\n\t\tif (open.length > 0) {\n\t\t\t// What the asked copy's fills gave up is accounted for, as on one cursor.\n\t\t\tlet owed: Run[] = open;\n\t\t\tfor (const gone of this.#ask(open)) owed = removeRun(owed, gone.start, gone.end);\n\t\t\tif (owed.length > 0) return false;\n\t\t}\n\t\treturn hooks.accountsFor(serving.sub, delivered, above, ordered);\n\t}\n\n\t/**\n\t * The parts of `gap` under the serving copy's resume point `resumed` that the cursor keeps out:\n\t * owed, as on one cursor, until a copy declares them skipped. Mirrors the Rust `Reader::kept_out`.\n\t */\n\t#keptOut(gap: Run, resumed: bigint): Run[] {\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\tconst split = min(max(resumed, gap.start), gap.end);\n\t\treturn [\n\t\t\t{ start: gap.start, end: min(split, cursor.start) },\n\t\t\t{ start: cursor.end === undefined ? split : max(cursor.end, gap.start), end: split },\n\t\t].filter((run) => run.start < run.end);\n\t}\n\n\t/** The parts of `run` neither recorded nor declared skipped by a copy held now. */\n\t#unskipped(run: Run): Run[] {\n\t\tconst held = new Delivered();\n\t\tfor (const skip of this.skippedIn(run.start, run.end)) held.addRun(skip.start, skip.end);\n\t\treturn [...held.gaps(run.start, run.end)];\n\t}\n\n\t/**\n\t * Ask the serving route for the hull of `open`, the keys the cursor keeps out that are neither\n\t * recorded nor declared skipped by a copy held now. Its answer settles each such key as it would on one\n\t * cursor: a skip, or a fill that gives it up, accounts for it, while a group or a drop leaves it owed. A copy of that route\n\t * already asked for them, kept by {@link #letGo} until {@link #skipped} records them, asks nothing\n\t * more, so neither a reader waiting on the answer nor one a group holds open asks again. Its\n\t * track may forget a skip it answered before the rest lands, so it asks its fills for those it\n\t * cannot prove, returning the keys of `open` those fills gave up. Mirrors the Rust `Reader::ask`.\n\t */\n\t#ask(open: Run[]): Run[] {\n\t\tconst givenUp: Run[] = [];\n\t\tconst first = open.at(0);\n\t\tconst last = open.at(-1);\n\t\tif (!first || !last) return givenUp;\n\t\tconst keys = { start: first.start, end: last.end };\n\t\tthis.#backfill(keys.start, keys.end);\n\t\tconst serving = this.#copies.at(-1);\n\t\tif (!serving) return givenUp;\n\t\tfor (const copy of this.#copies.slice(0, -1)) {\n\t\t\tconst end = copyEnd(copy);\n\t\t\tif (copyAskedFor(copy, serving, keys.start) && end !== undefined && end >= keys.end) {\n\t\t\t\tfor (const gone of hooks.askUnproven(copy.sub, open)) insertRun(givenUp, gone.start, gone.end);\n\t\t\t}\n\t\t}\n\t\treturn givenUp;\n\t}\n\n\ttryDrop(delivered: Delivered, passing?: bigint): (Recv & { kind: \"drop\" }) | undefined {\n\t\tthis.#delivered = delivered;\n\t\tthis.sync();\n\t\tthis.#learnEnd();\n\t\treturn this.#tryDrop(delivered, passing);\n\t}\n\n\t/**\n\t * The next run the serving copy gave up that `delivered` lacks and no other copy may still\n\t * deliver. Only the serving copy's verdicts count; a copy it replaced may still deliver what\n\t * is under its bound, so a run there waits until that copy no longer feeds. Mirrors the\n\t * Rust `Reader::poll_drop`.\n\t */\n\t#tryDrop(delivered: Delivered, passing = 0n): (Recv & { kind: \"drop\" }) | undefined {\n\t\tif (this.#closed) return undefined;\n\t\t// Below what the reader handed out or passed, no copy's drop is reported, so each copy's\n\t\t// record folds there, even one that hands out nothing while the reader returns gaps.\n\t\tconst at = delivered.runEnd(0n) ?? 0n;\n\t\tfor (const copy of this.#copies) hooks.fold(copy.sub, at);\n\t\tconst serving = this.#serving();\n\t\tif (serving) {\n\t\t\t// A received stale run queued here that a new upstream subscription superseded since is\n\t\t\t// unknown again: the copy no longer holds it.\n\t\t\tfor (const run of this.#drops) {\n\t\t\t\tif (!run.received) continue;\n\t\t\t\tconst held = hooks.staleHeld(serving.sub, run.start, run.end);\n\t\t\t\tfor (const gap of runGaps(held, run.start, run.end))\n\t\t\t\t\tthis.#drops = removeRun(this.#drops, gap.start, gap.end);\n\t\t\t}\n\t\t\tthis.#collectDrops(serving);\n\t\t}\n\t\tthis.#drops = this.#drops.filter((run) => !delivered.covers(run.start, run.end));\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\tconst feeding = this.#feeding(serving);\n\t\tfor (const run of this.#drops) {\n\t\t\tconst end = min(run.end, cursor.end ?? run.end);\n\t\t\tfor (const gap of delivered.gaps(max(run.start, cursor.start), end)) {\n\t\t\t\tconst [open] =\n\t\t\t\t\tgap.start < passing\n\t\t\t\t\t\t? [{ start: gap.start, end: min(gap.end, passing) }]\n\t\t\t\t\t\t: runGaps(feeding, gap.start, gap.end);\n\t\t\t\tif (open) {\n\t\t\t\t\t// Report once without marking it delivered: a late fill may still land.\n\t\t\t\t\tthis.#drops = removeRun(this.#drops, open.start, open.end);\n\t\t\t\t\treturn { kind: \"drop\", ...open, reason: run.reason, maxAge: run.maxAge };\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\t// The groups a copy other than `serving` may still deliver, whose drops wait on it.\n\t#feeding(serving: Copy | undefined): Run[] {\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\tconst feeding: Run[] = [];\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (copy === serving || !this.#feeds(copy)) continue;\n\t\t\t// A backfill owes what the reader's window hands out below its floor too, as #bound reads it.\n\t\t\tconst start = copy.backfill ? cursor.start : max(cursor.start, copy.floor ?? 0n);\n\t\t\tinsertRun(feeding, start, copyEnd(copy) ?? UNBOUNDED);\n\t\t}\n\t\treturn feeding;\n\t}\n\n\t/**\n\t * The first run of `[start, end)` that settles the reader, that no copy may still deliver and\n\t * the reader has not been handed, as `trySkip` and `#tryDrop` would report it: a skip this\n\t * reader kept from a copy it let go, or the serving copy's drop. Mirrors the Rust\n\t * `Reader::next_settled_drop`.\n\t */\n\tnextSettledDrop(start: bigint, end: bigint): DropRun | undefined | \"pending\" {\n\t\tthis.sync();\n\t\tconst delivered = this.#delivered;\n\t\t// Judged after retention, as the drop poll is: a lowered start may need a replaced copy again, so\n\t\t// it feeds.\n\t\tthis.#letGo(delivered);\n\t\t// No route serving yet gave no verdict yet, which is not the same as none; once the front\n\t\t// concluded without one, none comes.\n\t\tconst serving = this.#serving();\n\t\tif (!serving) return this.route.concluded ? undefined : \"pending\";\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\tstart = max(start, cursor.start);\n\t\tend = min(end, cursor.end ?? end);\n\t\tconst feeding = this.#feeding(serving);\n\t\tconst window = this.#window();\n\t\t// The retained skips and the serving copy's drops are walked each from its own cursor, and each\n\t\t// candidate is looked up once and kept until it is judged.\n\t\tlet [skips, drops] = [start, start];\n\t\tlet skip: Run | undefined;\n\t\tlet drop: DropRun | undefined;\n\t\tfor (;;) {\n\t\t\tif (!skip && skips < end) {\n\t\t\t\tskip = this.route.skips.held({ start: skips, end });\n\t\t\t\tskips = end;\n\t\t\t}\n\t\t\t// Only up to the next skip, which goes first, so a walk past many skips never scans the\n\t\t\t// copy's drops beyond each one again.\n\t\t\tconst until = skip ? max(skip.start, drops) : end;\n\t\t\tif (!drop && drops < until) {\n\t\t\t\tconst found = hooks.nextSettledDrop(serving.sub, drops, until);\n\t\t\t\tif (found === \"pending\") return \"pending\";\n\t\t\t\tdrop = found;\n\t\t\t\tdrops = until;\n\t\t\t}\n\t\t\t// The serving copy may never have learned a skip this reader kept, which goes first where\n\t\t\t// both start, as trySkip reports it first.\n\t\t\tlet held: DropRun;\n\t\t\tconst kept = skip !== undefined && !(drop && drop.start < skip.start);\n\t\t\tif (skip && kept) {\n\t\t\t\t[held, skip] = [{ ...skipHole(), ...skip }, undefined];\n\t\t\t} else if (drop) {\n\t\t\t\t// Judged only up to the next skip, so passing a drop that is no verdict never steps over\n\t\t\t\t// that skip. The rest is looked up again. A skip goes whole: whatever it returns settles\n\t\t\t\t// every key it covers, a drop there included.\n\t\t\t\t[held, drop] = [{ ...drop, end: skip ? min(drop.end, skip.start) : drop.end }, undefined];\n\t\t\t} else return undefined;\n\t\t\tlet open: Run | undefined;\n\t\t\t// Within the reader's window, as trySkip clips it.\n\t\t\tif (held.reason === \"skip\") {\n\t\t\t\tfor (const clipped of window.runs(held.start, held.end)) {\n\t\t\t\t\topen = delivered.gaps(clipped.start, clipped.end).next().value;\n\t\t\t\t\tif (open) break;\n\t\t\t\t}\n\t\t\t} else if (!(held.reason === \"drop\" && copyFailed(serving))) {\n\t\t\t\t// A drop from a copy whose route failed is no verdict, as #queueDrop judges it: another\n\t\t\t\t// route may deliver. Mirrors the Rust `route_failed` filter.\n\t\t\t\tfor (const gap of delivered.gaps(held.start, held.end)) {\n\t\t\t\t\topen = runGaps(feeding, gap.start, gap.end)[0];\n\t\t\t\t\tif (open) break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (open) return { ...held, start: open.start, end: open.end };\n\t\t\tif (kept) skips = held.end;\n\t\t\telse drops = held.end;\n\t\t}\n\t}\n\n\t// Queue every run the serving copy gave up since the last call. An ordered read calls it before\n\t// the copy hands out a group too: that hand-out folds the copy's record past the keys below it,\n\t// where it would no longer report a run it gave up there, as the Rust `take_drops_below` finds.\n\t#collectDrops(serving: Copy): void {\n\t\t// Folded in at once: a peer controls how many runs a drain returns. The copy reports each key\n\t\t// once, so they are disjoint.\n\t\tconst runs: DropRun[] = [];\n\t\tfor (let dropped = hooks.tryDrop(serving.sub); dropped; dropped = hooks.tryDrop(serving.sub)) {\n\t\t\tconst run = this.#dropRun(serving, dropped);\n\t\t\tif (run) runs.push(run);\n\t\t}\n\t\truns.sort((a, b) => (a.start < b.start ? -1 : a.start > b.start ? 1 : 0));\n\t\tthis.#drops = insertDrops(this.#drops, runs);\n\t}\n\n\t// Queue a run the serving copy gave up, to report once no other copy may still deliver it.\n\t#queueDrop(serving: Copy, dropped: Recv & { kind: \"drop\" }): void {\n\t\tconst run = this.#dropRun(serving, dropped);\n\t\tif (run) this.#drops = insertDrops(this.#drops, [run]);\n\t}\n\n\t// The run to queue for one the serving copy gave up, if it says anything of the track.\n\t#dropRun(serving: Copy, dropped: Recv & { kind: \"drop\" }): DropRun | undefined {\n\t\t// A copy failing is no verdict: another route or a fill may still deliver the group, and one\n\t\t// it failed while buffered is handed out to continue through its recovery. Only a skip it\n\t\t// failed with, or a stale verdict, says anything of the track.\n\t\tif (dropped.failed && dropped.reason === \"drop\") return undefined;\n\t\tif (dropped.start >= dropped.end) return undefined;\n\t\t// A stale run the copy holds came from its upstream, which a new subscription may supersede.\n\t\tconst received =\n\t\t\tdropped.maxAge !== undefined && hooks.staleHeld(serving.sub, dropped.start, dropped.end).length > 0;\n\t\tconst { start, end, reason, maxAge, cap, refusal } = dropped;\n\t\treturn { start, end, reason, maxAge, cap, received, own: undefined, refusal };\n\t}\n\n\t// Take `copy`'s next group past the newest handed out. Under `dispositions`, the serving copy\n\t// returns first what its budget skips on the way, which is queued, so a publisher hears of it\n\t// before the group, as from a direct reader; only the serving copy's verdicts count. A failed\n\t// group still comes out, to continue through its recovery.\n\t#take(copy: Copy, ordered: boolean, dispositions: boolean, admit?: bigint): Recv {\n\t\tconst newest = this.#newest === undefined ? undefined : this.#newest + 1n;\n\t\tif (ordered && copy === this.#serving()) this.#collectDrops(copy);\n\t\tconst serving = dispositions ? this.#serving() : undefined;\n\t\tconst recv = take(copy, ordered, newest, copy === serving && \"budget\", admit);\n\t\tif (recv.kind === \"drop\" && serving) this.#queueDrop(serving, recv);\n\t\treturn recv;\n\t}\n\n\t// Whether `copy`, bounded where it was replaced, ran out under that bound: its track ended, no\n\t// fill still owes it a group, and it holds nothing there unread. Its subscriber would park on a\n\t// group past the bound instead, as one past a local cap waits for it to rise, but the reader\n\t// moves this bound itself by asking again. Mirrors the Rust arrival cursor ending on a complete\n\t// track. Judged right after a read, which records whether it waits on a fill.\n\t#drained(copy: Copy, delivered: Delivered): boolean {\n\t\tconst end = copyEnd(copy);\n\t\tif (end === undefined || hooks.awaitsFill(copy.sub)) return false;\n\t\tconst start = max(this.#shell.cursor.peek().start, copy.floor ?? 0n);\n\t\treturn hooks.spent(copy.sub, start, end, delivered);\n\t}\n\n\t// A copy that ran out cleanly still takes a group in flight below its end while the read stays\n\t// open, as a cursor still reading it would. One landing on the serving copy may lie under its\n\t// resume point, which is not that copy's to read, and a backfill that already ran out was let\n\t// go: ask its route again. Mirrors the Rust `Reader::poll_first`.\n\t#reopen(): void {\n\t\tconst serving = this.#serving();\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (typeof copy.done !== \"number\" || hooks.arrived(copy.sub) <= copy.done) continue;\n\t\t\tcopy.done = undefined;\n\t\t\tif (copy === serving && !copy.replaced && copy.floor !== undefined) this.#resumed = true;\n\t\t}\n\t}\n\n\t// Re-arm the walk once a group a walk left a copy to drain, which the reader still lacks, no\n\t// longer drains there: evicted, given up as stale, or its copy failed or spent its budget. The\n\t// serving route is then asked for it after all, as a cursor on the track would ask again. Costs\n\t// the groups left to drain, each one a copy holds. Mirrors the Rust `Reader::rescan_drains`.\n\t//\n\t// With `through`, only the groups up to that key, which an ordered read checks before it hands\n\t// it out and passes those below: the copy offering it may hold it without its head, so not\n\t// drain it. Each copy keeps its keys ascending, so this costs the groups handed out since.\n\t#rescanDrains(delivered: Delivered, through?: bigint): void {\n\t\tconst cursor = this.#shell.cursor.peek().start;\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (copy.drains === undefined) continue;\n\t\t\tlet taking: ((key: bigint) => boolean) | undefined;\n\t\t\tlet drains = true;\n\t\t\tfor (const key of copy.drains) {\n\t\t\t\tif (delivered.has(key)) {\n\t\t\t\t\tcopy.drains.delete(key);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (through !== undefined && key > through) break;\n\t\t\t\ttaking ??= hooks.taking(copy.sub);\n\t\t\t\tif (this.#mayDrain(copy, key, cursor, taking)) continue;\n\t\t\t\tdrains = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (drains) continue;\n\t\t\tcopy.drains = undefined;\n\t\t\tthis.#resumed = true;\n\t\t}\n\t}\n\n\t// Whether `copy` drains group `key` for a reader whose cursor starts at `cursor`: replaced and\n\t// still read, holding the group's head under its cap and inside its own ranges, and its read\n\t// `taking` still offers it. A copy that failed or spent its drain budget delivers nothing more,\n\t// even while a read still leases it, and one holding a group without its head may give that\n\t// group up, so neither drains. Mirrors the Rust `Copy::may_drain`.\n\t#mayDrain(copy: Copy, key: bigint, cursor: bigint, taking: ((key: bigint) => boolean) | undefined): boolean {\n\t\treturn (\n\t\t\tcopy.replaced &&\n\t\t\tthis.#feeds(copy) &&\n\t\t\t(copy.backfill ? cursor : max(cursor, copy.floor ?? 0n)) <= key &&\n\t\t\tkey < (copyEnd(copy) ?? UNBOUNDED) &&\n\t\t\ttaking?.(key) === true &&\n\t\t\t!copyFailed(copy) &&\n\t\t\thooks.holdsGroup(copy.sub, key, true)\n\t\t);\n\t}\n\n\t// Whether `copy` may still feed groups: its channel has not run out, and what it holds is\n\t// within the reader's budget, which ends a full budget after a newer group superseded it.\n\t#feeds(copy: Copy): boolean {\n\t\treturn copy.done === undefined && !this.#expired(copy, this.#budget());\n\t}\n\n\t// `copy` gave up `key`, a group outside the reader's window, for good: a widened window asks\n\t// its route again for it.\n\t#skip(copy: Copy, key: bigint): void {\n\t\tcopy.dropped = max(copy.dropped ?? 0n, key + 1n);\n\t}\n\n\t// The copy whose next group is the first deliverable one in the reader's window, dropping any\n\t// it holds next that are not, and the copies whose ordered cursor is left on such a group\n\t// because the window still owes a lower one that may yet land there. First is the lowest for an\n\t// ordered read, else the first in the subscription's Group Order. Mirrors the Rust `poll_first`.\n\t// A group at or past `admit` (ordered reads only) stays next, unjudged.\n\t#first(ordered: boolean, delivered: Delivered, admit?: bigint): { next?: Copy; key?: bigint; owing: Copy[] } {\n\t\tlet first: { copy: Copy; key: bigint } | undefined;\n\t\tconst owing: Copy[] = [];\n\t\tconst floor = ordered ? (delivered.runEnd(0n) ?? 0n) : 0n;\n\t\tconst ascending = ordered || rangesPolicy(this.#shell.subscription.peek()?.ranges ?? []).order === \"ascending\";\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (!this.#feeds(copy)) continue;\n\t\t\tfor (;;) {\n\t\t\t\tconst key = hooks.peekGroup(\n\t\t\t\t\tcopy.sub,\n\t\t\t\t\tordered,\n\t\t\t\t\tthis.#newest === undefined ? undefined : this.#newest + 1n,\n\t\t\t\t);\n\t\t\t\t// At or past `admit`, it stays next, unjudged.\n\t\t\t\tif (key === undefined || this.#waits(copy, key) || (admit !== undefined && key >= admit)) break;\n\t\t\t\tconst deliverable = this.#deliverable(copy, key, delivered);\n\t\t\t\tif (deliverable && this.#inWindow(key)) {\n\t\t\t\t\t// A tie goes to the newer copy, so the serving one hands out its first group and\n\t\t\t\t\t// bounds the copies it replaced.\n\t\t\t\t\tif (!first || (ascending ? key <= first.key : key >= first.key)) first = { copy, key };\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// Skipping an ordered cursor past a group the window still owes below would lose it.\n\t\t\t\tif (ordered && deliverable && this.#owesBelow(copy, floor, key, delivered)) {\n\t\t\t\t\towing.push(copy);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst recv = take(copy, ordered, this.#newest === undefined ? undefined : this.#newest + 1n);\n\t\t\t\tif (recv.kind !== \"group\") break;\n\t\t\t\tif (deliverable) this.#skip(copy, recv.group.start);\n\t\t\t\trecv.group.close();\n\t\t\t}\n\t\t}\n\t\treturn { next: first?.copy, key: first?.key, owing };\n\t}\n\n\t/**\n\t * Whether the track ended, once the serving copy's channel (as `done` reads it) ran out:\n\t * cleanly, or with a verdict a route failure does not excuse.\n\t */\n\t#end(done: (copy: Copy) => Error | null | undefined): Recv & { kind: \"idle\" | \"done\" | \"error\" } {\n\t\tconst route = this.route;\n\t\tconst last = this.#copies.at(-1);\n\t\tconst serving = last?.generation === this.#generation ? last : undefined;\n\t\tconst ended = serving ? done(serving) : undefined;\n\t\t// The serving copy drained a complete track: that is its end, whichever route would\n\t\t// serve it next. Once the track ended, a copy let go held nothing more.\n\t\tif (serving ? ended === null : this.#ended) return this.#conclude() ? { kind: \"done\" } : { kind: \"idle\" };\n\t\tif (ended instanceof Error) {\n\t\t\t// A copy it replaced finished the track and the reader owes nothing below that end:\n\t\t\t// the track ended cleanly whoever serves it now. Mirrors the Rust front. The failing\n\t\t\t// copy's own end, or one whose copy failed short of it, never settled.\n\t\t\tconst end = this.#learnEnd();\n\t\t\tconst owed = max(this.#shell.cursor.peek().start, (this.#newest ?? -1n) + 1n);\n\t\t\tconst settled =\n\t\t\t\tthis.#settled ||\n\t\t\t\tthis.#copies.some(\n\t\t\t\t\t(copy) =>\n\t\t\t\t\t\tcopy !== serving &&\n\t\t\t\t\t\thooks.subscriberEnd(copy.sub) !== undefined &&\n\t\t\t\t\t\thooks.peekLargest(copy.sub).ended &&\n\t\t\t\t\t\t!(copy.sub.closed.peek() instanceof Error),\n\t\t\t\t);\n\t\t\tif (end && settled && finalKey(end) <= owed) return this.#conclude() ? { kind: \"done\" } : { kind: \"idle\" };\n\t\t\tif (serving && this.#revert(serving, ended)) return { kind: \"idle\" };\n\t\t\t// A refusal from a route that still serves is the track's answer.\n\t\t\tif (!routeFailed(ended)) return this.#fail(ended);\n\t\t\tif (route.refusal) return this.#fail(route.refusal);\n\t\t\t// The route that failed it still serves and is not going away, so no move replaces\n\t\t\t// the copy. As in the Rust front, a received route that lost the content judged the\n\t\t\t// route, not the track: the read waits for the next route, since asking the same one\n\t\t\t// again could only replace the withdrawal's cause with a refusal, and that route's\n\t\t\t// news follows on the same session. A local broadcast's word is the track's verdict.\n\t\t\t// Otherwise one that delivered nothing is the route refusing the track, and one that\n\t\t\t// did is subscribed afresh. A concluded route has no front left to move it, so its\n\t\t\t// loss ends the read.\n\t\t\tif (serving && route.source === serving.source && !closing(ended)) {\n\t\t\t\t// Unless a claim whose identity lost the path refused a copy that delivered nothing:\n\t\t\t\t// that refusal stands, and the requester resolves the winner anew.\n\t\t\t\tconst stands = !serving.delivered && serving.source.claimLost();\n\t\t\t\tif (!route.concluded && strands(ended, serving.source) && !stands) {\n\t\t\t\t\troute.strand(serving.source, serving.delivered ?? false);\n\t\t\t\t\treturn { kind: \"idle\" };\n\t\t\t\t}\n\t\t\t\tif (!serving.delivered) {\n\t\t\t\t\troute.refuse(ended);\n\t\t\t\t\treturn this.#fail(ended);\n\t\t\t\t}\n\t\t\t\tif (unroutable(ended)) return this.#fail(ended);\n\t\t\t\troute.resubscribe();\n\t\t\t}\n\t\t}\n\t\t// Refused before any copy fed it: nothing will.\n\t\tif (!last && route.refusal) return this.#fail(route.refusal);\n\t\tif (route.concluded) {\n\t\t\t// No front is left to replace the copy: the track ends as it does.\n\t\t\tif (!serving) return this.#fail(dropped());\n\t\t\tif (ended instanceof Error) return this.#fail(ended);\n\t\t}\n\t\treturn { kind: \"idle\" };\n\t}\n\n\t/**\n\t * A replacement that failed before its copy held a group never ends the track while a copy it\n\t * replaced still feeds it: that copy serves again, and the failure is the replacement refusing\n\t * the track unless its route is going away. Judged by the copy, whatever this reader's window\n\t * took from it, as the Rust front does.\n\t */\n\t#revert(serving: Copy, failed: Error): boolean {\n\t\tif (hooks.latestKey(serving.sub) !== undefined) return false;\n\t\t// One that ran out under its cap still serves once the revert lifts the cap.\n\t\tconst incumbent = this.#copies.findLast(\n\t\t\t(copy) =>\n\t\t\t\tcopy.replaced &&\n\t\t\t\tcopy.source !== serving.source &&\n\t\t\t\t!(copy.done instanceof Error) &&\n\t\t\t\tcopy.sub.closed.peek() === undefined,\n\t\t);\n\t\tif (!incumbent || !this.route.revert(serving.source, incumbent.source)) return false;\n\t\tif (!closing(failed)) {\n\t\t\t// A replacement losing its route judged the route: the replaced copy keeps feeding the\n\t\t\t// read, which asks the replacement again once the table moves, as the Rust front does.\n\t\t\tif (strands(failed, serving.source) && !serving.source.claimLost())\n\t\t\t\tthis.route.strand(serving.source, false);\n\t\t\telse this.route.refuse(failed);\n\t\t}\n\t\treturn true;\n\t}\n\n\t#fail(error: Error): Recv & { kind: \"error\" } {\n\t\tthis.#shell.close(error);\n\t\treturn { kind: \"error\", error };\n\t}\n\n\t/**\n\t * End the logical track cleanly, once its serving copy did and nothing it replaced may still\n\t * deliver a group below that end: settle `closed`, keeping each copy only while it holds\n\t * something left to read. The other channel's backlog stays readable. The reader follows the\n\t * route only for the groups still read, and {@link #unroute} leaves it once it reads and holds\n\t * nothing. Whether the track ended.\n\t */\n\t#conclude(): boolean {\n\t\tif (this.#closed) return false;\n\t\tif (this.#ended) return true;\n\t\t// Learned before any copy that knows it goes.\n\t\tthis.#learnEnd();\n\t\tconst serving = this.#serving();\n\t\tif (serving) this.#boundAtEnd(serving);\n\t\t// A group a copy no longer drains, which no read since has asked of the serving route, and\n\t\t// any walk an earlier pass queued: asked here, since a caller awaiting only the close may\n\t\t// never read, and the end then waits for it as for any copy that may still deliver.\n\t\tthis.#rescanDrains(this.#delivered);\n\t\tif (this.#resumed && this.#window().floor() !== undefined) this.#backfillGaps(this.#delivered);\n\t\tif (this.#letGo(this.#delivered) || this.#closed) return false;\n\t\t// A copy let go with a group to drain: asked the same way, then judged again, since a\n\t\t// backfill a cache answers at once may leave nothing to wait for.\n\t\tif (this.#resumed && this.#window().floor() !== undefined) return this.#conclude();\n\t\tthis.#ended = {\n\t\t\tlargest: serving && hooks.peekLargest(serving.sub).largest,\n\t\t\tobject: serving && hooks.objectLargest(serving.sub),\n\t\t\tended: true,\n\t\t};\n\t\tthis.#shell.close();\n\t\tthis.#letGo(this.#delivered);\n\t\tthis.wake();\n\t\treturn true;\n\t}\n\n\t/**\n\t * Drop the copies nothing needs any more. A replaced one goes by {@link #retains}. One not yet\n\t * replaced stays, even between routes: it is still the newest copy there is, until the track\n\t * ended and it holds nothing left to read. Whether a group the reader lacks may still land on\n\t * a replaced one, which a clean end waits for.\n\t *\n\t * So does the copy of the serving route asked furthest from where {@link #asking} starts: it is\n\t * the ask {@link #accounts} makes, waiting on that route's answer, and letting it go would only\n\t * ask again. Only that one, since every ask starts there: an ask from lower down covers what the\n\t * copies asked before it did, so a range moved again and again keeps one.\n\t */\n\t#letGo(delivered: Delivered): boolean {\n\t\t// An end a copy declared outlives the copy.\n\t\tthis.#learnEnd();\n\t\tif (this.#closed) return false;\n\t\tconst last = this.#copies.at(-1);\n\t\tconst edge = last && hooks.latestKey(last.sub);\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\tconst asking = this.#asking(delivered);\n\t\tlet asked: Copy | undefined;\n\t\tif (asking !== undefined && last && !last.replaced) {\n\t\t\tfor (const copy of this.#copies) {\n\t\t\t\tif (!copy.replaced || !copyAskedFor(copy, last, asking)) continue;\n\t\t\t\tif (!asked || (copyEnd(copy) ?? UNBOUNDED) >= (copyEnd(asked) ?? UNBOUNDED)) asked = copy;\n\t\t\t}\n\t\t}\n\t\tlet waits = false;\n\t\tthis.#copies = this.#copies.filter((copy) => {\n\t\t\tif (!copy.replaced) {\n\t\t\t\tif (!this.#ended || copy.lease > 0) return true;\n\t\t\t\tconst start = max(cursor.start, copy.floor ?? 0n);\n\t\t\t\tif (!hooks.spent(copy.sub, start, undefined, delivered)) return true;\n\t\t\t\t// A group read from a copy it replaced may still continue from it.\n\t\t\t\tif (this.#backs(copy, true, grace(Duration.millis(this.#budget())))) return true;\n\t\t\t} else {\n\t\t\t\tconst retains = this.#retains(copy, delivered, edge);\n\t\t\t\tif (retains === \"wait\") waits = true;\n\t\t\t\tif (retains || copy === asked) return true;\n\t\t\t\t// Let go with a group a walk left it to drain, which it gave up by its own verdict:\n\t\t\t\t// the serving route is asked for it after all, as when the copy's cache loses it.\n\t\t\t\tif ([...(copy.drains ?? [])].some((key) => !delivered.has(key))) this.#resumed = true;\n\t\t\t}\n\t\t\tthis.#drop(copy);\n\t\t\treturn false;\n\t\t});\n\t\tthis.#unroute();\n\t\treturn waits;\n\t}\n\n\t/**\n\t * Where {@link #accounts} asks the serving route from: the first key of a bounded window under\n\t * the serving copy's resume point that `delivered` lacks and the cursor keeps out, past the\n\t * skipped run {@link #skipped} records from the start of each run of them. Records those runs\n\t * first, from what every copy held now declares, so an answer is kept before the cache that holds\n\t * it forgets it. A reader whose cursor keeps nothing out, or that follows one route, pays\n\t * nothing. Mirrors the Rust `Reader::asking`.\n\t */\n\t#asking(delivered: Delivered): bigint | undefined {\n\t\tconst serving = this.#copies.at(-1);\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\tconst window = this.#window();\n\t\tconst resumed = serving && !serving.replaced ? resumePoint(serving) : undefined;\n\t\tif (resumed === undefined || window.end() === undefined || (cursor.start === 0n && cursor.end === undefined)) {\n\t\t\tthis.#skipped = new Delivered();\n\t\t\treturn undefined;\n\t\t}\n\t\tconst kept = new Delivered();\n\t\tlet asking: bigint | undefined;\n\t\tfor (const run of window.runs(window.floor() ?? 0n, resumed)) {\n\t\t\tfor (const gap of delivered.gaps(run.start, run.end)) {\n\t\t\t\tfor (const out of this.#keptOut(gap, resumed)) {\n\t\t\t\t\tconst first = this.skippedIn(out.start, out.end)[0];\n\t\t\t\t\tconst start = first?.start === out.start ? first.end : out.start;\n\t\t\t\t\tif (start > out.start) kept.addRun(out.start, start);\n\t\t\t\t\tif (start < out.end) asking ??= start;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.#skipped = kept;\n\t\treturn asking;\n\t}\n\n\t/**\n\t * How the reader still needs replaced `copy`: `\"wait\"` while a group the reader lacks may still\n\t * land on it, `\"keep\"` while it holds one unread or backs a group handed out. `edge` is the\n\t * newest group the serving copy has.\n\t */\n\t#retains(copy: Copy, delivered: Delivered, edge: bigint | undefined): \"wait\" | \"keep\" | undefined {\n\t\t// Until the first group read, no cached copy needs to be retained.\n\t\tif (!this.#groupsRead) return undefined;\n\t\t// An incumbent not yet bounded may still feed a group the new copy never has.\n\t\tif (copy.until === undefined && copy.done === undefined) return \"wait\";\n\t\tconst end = copyEnd(copy);\n\t\t// Superseded once the serving copy has a group past the bound.\n\t\tif (copy.since === undefined && end !== undefined && edge !== undefined && edge >= end) copy.since = now();\n\t\tconst budget = this.#budget();\n\t\t// One whose wire names every start waits for it to, however long that takes.\n\t\tconst wait = hooks.provenTrack(copy.sub) ? undefined : grace(Duration.millis(budget));\n\t\t// What is under the bound is past the reader's budget a full budget after a newer group\n\t\t// superseded it, landed or not.\n\t\tif (copy.done === undefined && end !== undefined && !this.#expired(copy, budget)) {\n\t\t\tconst cursor = this.#shell.cursor.peek();\n\t\t\t// From where it was asked to start, or else from what it first got. A backfill owes what\n\t\t\t// the reader's window hands out below its floor too.\n\t\t\tconst start = copy.backfill ? cursor.start : max(cursor.start, copy.floor ?? 0n);\n\t\t\tconst floor = copy.floor !== undefined;\n\t\t\t// A group still to land in the reader's window is waited for, as a gap is, but not one a\n\t\t\t// copy declared skipped: its publisher never produced it, so no route will.\n\t\t\tconst lands = (run: { start: bigint; end: bigint }) =>\n\t\t\t\trunGaps(this.skippedIn(run.start, run.end), run.start, run.end).some((open) =>\n\t\t\t\t\thooks.mayLand(copy.sub, { ...open, floor, grace: wait, delivered }),\n\t\t\t\t);\n\t\t\tif (this.#window().runs(start, end).some(lands)) return \"wait\";\n\t\t\tconst owes = copy.fills ? this.#fillOwes(copy, start, end, delivered) : undefined;\n\t\t\tif (owes === \"wait\") return \"wait\";\n\t\t\tif (owes === \"keep\" || hooks.hasUnreadGroup(copy.sub, cursor.start, end, delivered)) return \"keep\";\n\t\t}\n\t\t// Until the serving copy holds a group, a failure of it serves this one again; see #revert.\n\t\t// Only after a group still to land is waited for, so a clean end of the serving copy\n\t\t// waits for it too.\n\t\tconst serving = this.#serving();\n\t\tif (\n\t\t\tserving &&\n\t\t\tserving.source !== copy.source &&\n\t\t\thooks.latestKey(serving.sub) === undefined &&\n\t\t\t!(copy.done instanceof Error)\n\t\t) {\n\t\t\treturn \"keep\";\n\t\t}\n\t\tif (copy.lease > 0) return \"keep\";\n\t\tconst lands = !this.#expired(copy, wait?.asMillis() ?? Number.POSITIVE_INFINITY);\n\t\treturn this.#backs(copy, lands, wait) ? \"keep\" : undefined;\n\t}\n\n\t/**\n\t * How fill `copy` still owes what the reader lacks of `[start, end)` under the serving copy's\n\t * resume point, no copy declared skipped, and its own subscription has not accounted for: those\n\t * come as fills below where the route's feed starts, which `mayLand` never waits for, so letting\n\t * it go would leave them unasked. `\"wait\"` while some of it no other replaced copy still feeds,\n\t * else `\"keep\"`: a replaced copy that runs out without a group leaves it to this fill. Mirrors\n\t * the Rust `Retain::owed`.\n\t */\n\t#fillOwes(copy: Copy, start: bigint, end: bigint, delivered: Delivered): \"wait\" | \"keep\" | undefined {\n\t\tconst serving = this.#copies.at(-1);\n\t\tconst resumed = serving && !serving.replaced ? resumePoint(serving) : undefined;\n\t\tconst until = min(end, resumed ?? 0n);\n\t\tif (start >= until) return undefined;\n\t\tconst lacking: Run[] = [];\n\t\tfor (const run of this.#window().runs(start, until)) {\n\t\t\tfor (const gap of delivered.gaps(run.start, run.end)) {\n\t\t\t\tfor (const run of runGaps(this.skippedIn(gap.start, gap.end), gap.start, gap.end)) lacking.push(run);\n\t\t\t}\n\t\t}\n\t\tif (lacking.length === 0 || hooks.accountsFor(copy.sub, delivered, lacking, false)) return undefined;\n\t\t// A closed fill gets nothing more, so it owes nothing; the caller still keeps it while it holds\n\t\t// an unread group.\n\t\tif (copy.sub.closed.peek() !== undefined) return undefined;\n\t\tconst cursor = this.#shell.cursor.peek();\n\t\tlet unfed = lacking;\n\t\tfor (const other of this.#copies) {\n\t\t\tif (other === copy || !other.replaced || other.fills || !this.#feeds(other)) continue;\n\t\t\tconst fed = { start: max(cursor.start, other.floor ?? 0n), end: copyEnd(other) ?? UNBOUNDED };\n\t\t\tunfed = unfed.flatMap((run) => runGaps([fed], run.start, run.end));\n\t\t}\n\t\treturn unfed.length > 0 ? \"wait\" : \"keep\";\n\t}\n\n\t/**\n\t * Whether `copy` holds a group still read, or may yet get it within `wait` when it `lands`: a\n\t * failure of the copy that group is read from continues here.\n\t */\n\t#backs(copy: Copy, lands: boolean, wait: Duration | undefined): boolean {\n\t\tfor (const recover of this.out) {\n\t\t\tconst key = recover.key;\n\t\t\tif (hooks.holdsGroup(copy.sub, key)) return true;\n\t\t\t// A group at or past where it was asked to start may land even before its first\n\t\t\t// arrival; without a floor, only what follows its first arrival can.\n\t\t\tconst asked = copy.floor !== undefined && (copy.backfill || copy.floor <= key);\n\t\t\tconst land = { start: key, end: key + 1n, floor: asked, grace: wait };\n\t\t\tif (lands && hooks.mayLand(copy.sub, land)) return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * `serving` ended cleanly, so nothing newer supersedes what the copies it replaced still carry\n\t * under their caps: the budget for it runs from now. An incumbent not yet bounded is bounded at\n\t * that end, so a group it still carries below the end is waited for and nothing past it.\n\t */\n\t#boundAtEnd(serving: Copy): void {\n\t\tconst declared = this.#declared;\n\t\tconst until =\n\t\t\tdeclared !== undefined\n\t\t\t\t? finalKey(declared) - 1n\n\t\t\t\t: max(this.#newest ?? -1n, hooks.latestKey(serving.sub) ?? -1n);\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (!copy.replaced) continue;\n\t\t\tcopy.since ??= now();\n\t\t\tif (copy.until !== undefined) continue;\n\t\t\tcopy.until = until < 0n ? null : until;\n\t\t\tthis.#update(copy);\n\t\t\tthis.#bound(copy);\n\t\t}\n\t}\n\n\t/**\n\t * The reader's widest budget in milliseconds, how far behind any group may fall before it is\n\t * skipped, as its own ranges set it: a copy is let go as a whole, so it waits out the widest.\n\t * Mirrors the Rust `Mirrored::widest`.\n\t */\n\t#budget(): number {\n\t\treturn widest(this.#ranges());\n\t}\n\n\t/**\n\t * How long each group stays worth delivering, as the reader's own ranges set it, placed where its\n\t * copies resolved them: the window places a live join as a time start, whose groups still go\n\t * stale past its max. Mirrors the Rust `Reader::budget`.\n\t */\n\t#readerBudget(): Budget {\n\t\tconst window = this.#window();\n\t\tconst ranges = new Map(this.#ranges().map((range, index) => [BigInt(index), range] as const));\n\t\treturn window.budgetOf(ranges);\n\t}\n\n\t/**\n\t * The groups the reader's ranges resolve to and the cap its cursor stops at, undefined while a\n\t * live join waits on a first group. Mirrors the Rust `Recover::window`.\n\t */\n\tcoverage(): Coverage {\n\t\tconst window = this.#window();\n\t\tif (window.pending) return undefined;\n\t\treturn { runs: window.runs(), cap: this.#shell.cursor.peek().end };\n\t}\n\n\t/**\n\t * Whether `within` passed since `copy` was superseded; see {@link Copy.since}. Arms a wakeup\n\t * for then, so a read waiting on the copy looks again.\n\t */\n\t#expired(copy: Copy, within: number): boolean {\n\t\tif (copy.since === undefined) return false;\n\t\t// Plain nanoseconds: an unenforced budget is infinite, which no Duration holds.\n\t\tconst at = copy.since.since(Instant.ZERO).asNanos() + within * 1_000_000;\n\t\tif (now().since(Instant.ZERO).asNanos() >= at) return true;\n\t\tthis.#wakeAt(at);\n\t\treturn false;\n\t}\n\n\t// Wake parked reads at `at`, unless a wakeup is already armed sooner.\n\t#wakeAt(at: number): void {\n\t\tif (this.#closed || !Number.isFinite(at) || (this.#wall && this.#wall.at <= at)) return;\n\t\tthis.#wall?.timer.abort();\n\t\tconst timer = new AbortController();\n\t\tthis.#wall = { at, timer };\n\t\t// A wakeup is never a reason to hold a Node/Bun process open.\n\t\tvoid sleepUntil(Instant.ZERO.saturatingAdd(Duration.nanos(at)), { signal: timer.signal, ref: false }).then(\n\t\t\t() => {\n\t\t\t\tif (timer.signal.aborted) return;\n\t\t\t\tthis.#wall = undefined;\n\t\t\t\tthis.wake();\n\t\t\t},\n\t\t\t() => {},\n\t\t);\n\t}\n\n\t#drop(copy: Copy, abort?: Error): void {\n\t\t// Including what it learned since it was replaced, under its bound or not.\n\t\tthis.#keepSkips(copy);\n\t\tcopy.sub.close(abort);\n\t\tcopy.source.release();\n\t}\n\n\t// Keep every skip `copy` declared on the route, before the reader stops holding it: a skip is the\n\t// content's own. Mirrors the Rust `Skips::learn` calls in `Reader`.\n\t#keepSkips(copy: Copy): void {\n\t\tthis.route.skips.learn(hooks.skippedIn(copy.sub, 0n, UNBOUNDED));\n\t}\n\n\t/**\n\t * The next run of the route's skips within the cursor and the window that `report` has yet to\n\t * report, as it reports it. A skip is the content's own, so no copy holds it back, as one may\n\t * hold back the serving copy's drops. Folds in only the runs added since the last call, or every\n\t * one once the cursor or the window moved. Mirrors the Rust `Reader::poll_skip`.\n\t */\n\ttrySkip(\n\t\treport: (start: bigint, end: bigint) => (Recv & { kind: \"drop\" }) | undefined,\n\t): (Recv & { kind: \"drop\" }) | undefined {\n\t\tthis.sync();\n\t\tif (this.#closed) return undefined;\n\t\tconst { start, end = UNBOUNDED } = this.#shell.cursor.peek();\n\t\tconst window = this.#window();\n\t\tconst view = `${start}:${end}:${window\n\t\t\t.runs(start, end)\n\t\t\t.map((run) => `${run.start}-${run.end}`)\n\t\t\t.join(\",\")}`;\n\t\tconst skips = this.route.skips;\n\t\tconst all = this.#skipsView !== view;\n\t\tconst found = skips.since(this.#skipsSeen, all, start, end);\n\t\t// Highest first, so the lowest is popped and a remainder pushed back without moving the rest.\n\t\tif (all) {\n\t\t\tthis.#skipsQueued = found.reverse();\n\t\t} else if (found.length > 0) {\n\t\t\tconst queued = this.#skipsQueued.reverse();\n\t\t\tfor (const run of found) insertRun(queued, run.start, run.end);\n\t\t\tthis.#skipsQueued = queued.reverse();\n\t\t}\n\t\tthis.#skipsSeen = skips.revision;\n\t\tthis.#skipsView = view;\n\t\tfor (let run = this.#skipsQueued.pop(); run; run = this.#skipsQueued.pop()) {\n\t\t\t// A run forgotten since is unknown again, not skipped.\n\t\t\tconst held = skips.held(run);\n\t\t\tif (!held) continue;\n\t\t\tif (held.end < run.end) this.#skipsQueued.push({ start: held.end, end: run.end });\n\t\t\tconst [clipped] = window.runs(held.start, held.end);\n\t\t\tif (!clipped) continue;\n\t\t\tif (clipped.end < held.end) this.#skipsQueued.push({ start: clipped.end, end: held.end });\n\t\t\tconst reported = report(clipped.start, clipped.end);\n\t\t\tif (!reported) continue;\n\t\t\tif (reported.end < clipped.end) this.#skipsQueued.push({ start: reported.end, end: clipped.end });\n\t\t\treturn reported;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\t#handOut(copy: Copy, group: GroupConsumer): GroupConsumer {\n\t\thooks.settleIfDropping(copy.sub, group.start);\n\t\tthis.#newest = max(this.#newest ?? 0n, group.start);\n\t\t// Another copy holding the group, now or once it lands there, is where a failure continues\n\t\t// it, so it stays while the group is read; see #backs. Recorded even with one copy, since a\n\t\t// later route's copy may come to hold it.\n\t\tconst recover = new Recover(this, group, copy);\n\t\thooks.recoverGroup(group, recover);\n\t\trecover.watch(group);\n\t\t// Closed with the reader, as a direct reader's close reaches the groups it handed out.\n\t\tthis.#open.add(group);\n\t\tvoid hooks.groupClosed(group).then(() => this.#open.delete(group));\n\t\treturn group;\n\t}\n\n\t/** A group handed out ended or moved copies: let go of what nothing needs any more. */\n\tfreed(): void {\n\t\t// Once the track ended, no read may come to let go of a copy.\n\t\tif (this.#ended) this.#letGo(this.#delivered);\n\t\t// A parked read lets go of a replaced copy nothing needs any more.\n\t\tthis.wake();\n\t}\n\n\tchanged(fn: () => void): Dispose {\n\t\tlet fired = false;\n\t\tconst disposes: Dispose[] = [];\n\t\tconst dispose = () => {\n\t\t\tfired = true;\n\t\t\tfor (const close of disposes) close();\n\t\t};\n\t\tconst once = () => {\n\t\t\tif (fired) return;\n\t\t\tdispose();\n\t\t\tfn();\n\t\t};\n\t\tdisposes.push(\n\t\t\tthis.route.changed.changed(once),\n\t\t\tthis.#changed.changed(once),\n\t\t\tthis.route.skips.changed.changed(once),\n\t\t);\n\t\tfor (const copy of this.#copies) disposes.push(hooks.groupChanged(copy.sub, once));\n\t\treturn dispose;\n\t}\n\n\twholeGroups(frameOf: (key: bigint) => number | undefined): void {\n\t\tthis.#whole = frameOf;\n\t\tfor (const copy of this.#copies) this.#readWhole(copy);\n\t}\n\n\t// Have `copy` read whole groups, except one the reader already handed out, as from a copy it\n\t// replaced: that group continues through its recovery, and no copy waits on its head.\n\t#readWhole(copy: Copy): void {\n\t\tconst whole = this.#whole;\n\t\tif (whole) hooks.wholeGroups(copy.sub, (key) => (this.#delivered.has(key) ? undefined : whole(key)));\n\t}\n\n\tforgetPastBudget(delivered: Delivered): void {\n\t\tthis.forgetPast(delivered, { budget: this.#readerBudget(), ranges: this.#placed() });\n\t}\n\n\t// The reader's window once nothing waits on a copy to place a live join.\n\t#placed(): Window | undefined {\n\t\tconst window = this.#window();\n\t\treturn window.pending ? undefined : window;\n\t}\n\n\t// Take back what a fold counted as handed out in `delivered` before any range held it, which the\n\t// reader's ranges, as its copies placed them so far, now owe. Each read does so before it judges\n\t// what the copies hold, since the copies place a range only once a group arrives for it.\n\t#reopenFolded(delivered: Delivered): void {\n\t\tdelivered.reopen(this.#window());\n\t}\n\n\tuntell(start: bigint, end: bigint): void {\n\t\tfor (const copy of this.#copies) hooks.untell(copy.sub, start, end);\n\t}\n\n\t// Judged on the newest copy, but never past a group a replaced copy still feeding the reader,\n\t// or that would under a wider budget, holds unread: as one cursor keeps what it owes, since a\n\t// late group there may be fresh by its own successor on that copy. A widened budget reads an\n\t// expired copy again, so only a copy whose channel ran out is passed over, and only a group\n\t// stale even at the track's max age, which bounds every budget: a lease on the copy never\n\t// holds back the fold for good. Nor past `keep`, an outer reader's own such group.\n\tforgetPast(delivered: Delivered, terms: FoldTerms, keep?: bigint): void {\n\t\tconst newest = this.#copies.at(-1);\n\t\tif (!newest) return;\n\t\tlet kept = keep;\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (copy === newest || !copy.replaced || copy.done !== undefined) continue;\n\t\t\tconst key = hooks.lowestBuffered(copy.sub, delivered, true);\n\t\t\tif (key !== undefined) kept = min(kept ?? key, key);\n\t\t}\n\t\thooks.forgetPastBudget(newest.sub, delivered, terms, kept);\n\t}\n\n\t// The same key is the same group on every copy, so it bounds group `key` whichever copy holds it.\n\tkeyAfter(key: bigint): bigint | undefined {\n\t\tlet after: bigint | undefined;\n\t\tfor (const copy of this.#copies) {\n\t\t\tconst next = hooks.keyAfter(copy.sub, key);\n\t\t\tif (next !== undefined) after = min(after ?? next, next);\n\t\t}\n\t\treturn after;\n\t}\n\n\t// A copy it replaced refusing leaves the rest to the copy now serving. Mirrors the Rust\n\t// `resume::Subscriber::refused`.\n\trefused(): Error | undefined {\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (copy.replaced) continue;\n\t\t\tconst refused = hooks.refused(copy.sub);\n\t\t\tif (refused) return refused;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tlowestBuffered(delivered: Delivered, fresh?: boolean): bigint | undefined {\n\t\tlet lowest: bigint | undefined;\n\t\tfor (const copy of this.#copies) {\n\t\t\tconst key = hooks.lowestBuffered(copy.sub, delivered, fresh);\n\t\t\tif (key !== undefined) lowest = min(lowest ?? key, key);\n\t\t}\n\t\treturn lowest;\n\t}\n\n\tlatest(): bigint | undefined {\n\t\tlet latest: bigint | undefined;\n\t\tfor (const copy of this.#copies) {\n\t\t\tconst key = hooks.latestKey(copy.sub);\n\t\t\tif (key !== undefined && (latest === undefined || key > latest)) latest = key;\n\t\t}\n\t\treturn latest;\n\t}\n\n\t#serving(): Copy | undefined {\n\t\tconst last = this.#copies.at(-1);\n\t\treturn last?.generation === this.#generation ? last : undefined;\n\t}\n\n\t// The logical track's end, learning it from any copy that declared one.\n\t#learnEnd(): track.Position | undefined {\n\t\tfor (const copy of this.#copies) {\n\t\t\tconst end = hooks.subscriberEnd(copy.sub);\n\t\t\tif (end) this.#declare(end);\n\t\t}\n\t\treturn this.#declared;\n\t}\n\n\t// Record `end` as the logical track's end, unless a copy declared one first. A mid-group end\n\t// refines the group boundary it falls just before, as a wire end may.\n\t#declare(end: track.Position): void {\n\t\tif (this.#closed) return;\n\t\tconst declared = this.#declared;\n\t\tif (!declared) {\n\t\t\tthis.#declared = end;\n\t\t\tthis.wake();\n\t\t} else if (declared.frame === 0 && end.frame !== 0 && finalKey(declared) === finalKey(end)) {\n\t\t\tthis.#declared = end;\n\t\t}\n\t}\n\n\tstart(): bigint | \"pending\" | undefined {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving && hooks.sourceStart(serving.sub);\n\t}\n\n\t/** Whether the copy serving now places ranges as its publisher would; see `hooks.placesAsUpstream`. */\n\tplacesAsUpstream(): boolean {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving !== undefined && hooks.placesAsUpstream(serving.sub);\n\t}\n\n\t/** Whether the copy serving now knows where the live feed is; see `hooks.knowsEdge`. */\n\tknowsEdge(): boolean {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving !== undefined && hooks.knowsEdge(serving.sub);\n\t}\n\n\tend(): track.Position | undefined {\n\t\tthis.sync();\n\t\treturn this.#learnEnd();\n\t}\n\n\tskippedBelow(key: bigint): bigint {\n\t\tthis.sync();\n\t\tconst copies = this.#copies.reduce((longest, copy) => max(longest, hooks.skippedBelow(copy.sub, key)), 0n);\n\t\treturn max(copies, this.route.skips.skippedBelow(key));\n\t}\n\n\t/** Whether a route's copy serves the reader now. */\n\tserving(): boolean {\n\t\tthis.sync();\n\t\treturn this.#serving() !== undefined;\n\t}\n\n\t/**\n\t * Ask the serving copy's fills for `unproven`, kept-out keys a containing front's reader owes, as\n\t * that reader asks a plain copy, returning what they gave up, so a key this front's route cannot\n\t * fill ends the outer read too. Mirrors the Rust `Resume::ask_unproven`.\n\t */\n\taskUnproven(unproven: Run[]): Run[] {\n\t\tconst serving = this.#copies.at(-1);\n\t\treturn serving ? hooks.askUnproven(serving.sub, unproven) : [];\n\t}\n\n\t// What the reader recorded or any copy held now declared skipped: a skip is final for the whole\n\t// track, so an outer front reading this one as a copy counts it, and asks for the rest as it would\n\t// of any route.\n\tskippedIn(start: bigint, end: bigint): Run[] {\n\t\tconst skipped = new Delivered();\n\t\tfor (const run of runsIn(this.#skipped, start, end)) skipped.addRun(run.start, run.end);\n\t\tfor (const copy of this.#copies) {\n\t\t\tfor (const run of copySkips(copy, start, end)) skipped.addRun(run.start, run.end);\n\t\t}\n\t\tfor (const run of this.route.skips.skippedIn(start, end)) skipped.addRun(run.start, run.end);\n\t\treturn runsIn(skipped, start, end);\n\t}\n\n\t// A copy this front replaced may still land a group its serving copy never will, so an outer\n\t// front reading this one as a copy waits on every copy still kept, each past where it starts\n\t// and under its bound. Mirrors the Rust `Subscriber::may_land`.\n\t/** Whether the serving route's copy names every start on its wire. */\n\tproven(): boolean {\n\t\tconst serving = this.#serving();\n\t\treturn serving !== undefined && hooks.provenTrack(serving.sub);\n\t}\n\n\towes(start: bigint, end: bigint): boolean {\n\t\tfor (const copy of this.#copies) {\n\t\t\tconst from = copy.backfill || copy.floor === undefined ? start : max(start, copy.floor);\n\t\t\tconst bound = copyEnd(copy);\n\t\t\tconst to = bound === undefined ? end : min(end, bound);\n\t\t\tif (from < to && hooks.owes(copy.sub, from, to)) return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tmayLand(land: Land): boolean {\n\t\tfor (const copy of this.#copies) {\n\t\t\tconst start = copy.backfill || copy.floor === undefined ? land.start : max(land.start, copy.floor);\n\t\t\tconst bound = copyEnd(copy);\n\t\t\tconst end = bound === undefined ? land.end : min(land.end, bound);\n\t\t\tif (start < end && hooks.mayLand(copy.sub, { ...land, start, end })) return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// The serving route's copy holds what its publisher skipped or gave up; any other copy held or\n\t// the route kept, only what was skipped: a replaced copy's drops are that route's own verdict.\n\t// Mirrors the Rust `Reader::hole_end`.\n\tholeEnd(key: bigint, dropped: boolean): bigint | undefined {\n\t\tconst serving = this.#serving();\n\t\tlet end = serving && hooks.holeEnd(serving.sub, key, dropped);\n\t\tfor (const copy of this.#copies) {\n\t\t\tif (copy === serving) continue;\n\t\t\tconst past = hooks.holeEnd(copy.sub, key, false);\n\t\t\tif (past !== undefined) end = max(end ?? past, past);\n\t\t}\n\t\tconst kept = this.route.skips.holeEnd(key);\n\t\treturn kept === undefined ? end : max(end ?? kept, kept);\n\t}\n\n\twholeEnd(key: bigint): bigint | undefined {\n\t\tconst serving = this.#serving();\n\t\treturn serving && hooks.wholeEnd(serving.sub, key);\n\t}\n\n\twholeAround(key: bigint): Run | undefined {\n\t\tconst serving = this.#serving();\n\t\treturn serving && hooks.wholeAround(serving.sub, key);\n\t}\n\n\t// A failed serving copy's own resolution is no placement while the front may still replace it:\n\t// the reader's ranges stay as placed, pending until a copy continuing the track places them.\n\t// Mirrors the Rust reader answering from its window.\n\t#placesNothing(serving: Copy): boolean {\n\t\treturn !this.route.concluded && copyFailed(serving);\n\t}\n\n\t// Each copy asks for the reader's ranges in turn, clamped to its floor and replacement.\n\tstarts(from: bigint): (bigint | undefined)[] | undefined {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\tif (!serving) return undefined;\n\t\tif (!this.#placesNothing(serving)) return hooks.servingStarts(serving.sub, from);\n\t\treturn this.#window().starts(from);\n\t}\n\n\t// Where a live join this reader placed at `placed` starts under `budget` milliseconds, on the\n\t// serving copy, from what its feed vouches for when `vouch`. Mirrors the Rust\n\t// `Subscriber::join_start` on a reader following route copies.\n\tjoinStart(placed: bigint, budget: number, vouch = false): bigint {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving ? hooks.joinStart(serving.sub, placed, budget, vouch) : placed;\n\t}\n\n\t// The first group the serving copy holds from `placed` up that `budget` milliseconds leave\n\t// fresh. Mirrors the Rust `Subscriber::fresh_start` on a reader following route copies.\n\tfreshStart(placed: bigint, budget: number, cap: bigint | undefined): bigint {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving ? hooks.freshStart(serving.sub, placed, budget, cap) : placed;\n\t}\n\n\t// The reader's ranges as its window resolved them, whichever copy serves.\n\tresolved(): (Resolved | undefined)[] {\n\t\tthis.sync();\n\t\treturn this.#window().resolved();\n\t}\n\n\t// The reader's own window, which spans every copy: the serving one starts at the switch's\n\t// boundary, so it leaves out what a replaced copy still delivers below it. Mirrors the Rust\n\t// `Resume::runs`.\n\truns(start: bigint, end: bigint): Run[] {\n\t\tthis.sync();\n\t\treturn this.#window().runs(start, end);\n\t}\n\n\t// The reader's own window, synced, as `runs` reads it. Mirrors the Rust `Resume::with_window`.\n\twindow(): Window {\n\t\tthis.sync();\n\t\treturn this.#window();\n\t}\n\n\t// The reader's ranges covering group `key`, by index, each stale past its own budget: the window\n\t// places a live join as a time start, whose groups still go stale past its max. Mirrors the Rust\n\t// `Reader::covering`.\n\tcovering(key: bigint): [bigint, number][] {\n\t\tthis.sync();\n\t\tconst ranges = this.#ranges();\n\t\treturn this.#window().covering(key, (index) => ranges[Number(index)]);\n\t}\n\n\t// The serving copy's runs leave out the keys below a time start it still waits to place, so its\n\t// barrier holds a gap the group containing that start may lie below.\n\tgapHeld(at: bigint, end: bigint): boolean {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving !== undefined && hooks.gapHeld(serving.sub, at, end);\n\t}\n\n\tservingEnd(): bigint | undefined {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving && hooks.servingEnd(serving.sub);\n\t}\n\n\t/** The first group the logical track's declared end excludes whole, undefined while it is open ended. */\n\tfinalKey(): bigint | undefined {\n\t\tthis.sync();\n\t\tconst end = this.#learnEnd();\n\t\treturn end && finalKey(end);\n\t}\n\n\tasync finished(): Promise<track.Position> {\n\t\tfor (;;) {\n\t\t\tthis.sync();\n\t\t\tconst end = this.#learnEnd();\n\t\t\tif (end) return end;\n\t\t\tconst serving = this.#serving();\n\t\t\tconst failed = serving?.sub.closed.peek();\n\t\t\t// A copy that failed is only the end of the track if no front replaces it, and a\n\t\t\t// refused replacement leaves the refusal as the answer.\n\t\t\tif (serving && failed instanceof Error) {\n\t\t\t\tif (this.#revert(serving, failed)) continue;\n\t\t\t\tif (!routeFailed(failed)) throw failed;\n\t\t\t\tif (this.route.refusal) throw this.route.refusal;\n\t\t\t\tif (this.route.concluded) throw failed;\n\t\t\t}\n\t\t\tif (!serving && this.route.concluded) throw dropped();\n\t\t\tconst closed = this.#shell.closed.peek();\n\t\t\tif (closed instanceof Error) throw closed;\n\t\t\tif (closed !== undefined) throw new Error(\"track closed before its end was known\");\n\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\tconst dispose = this.changed(() => {\n\t\t\t\t\tdispose();\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\n\twatchError(fn: (error: Error) => void): Dispose {\n\t\tlet stop: Dispose = () => {};\n\t\tconst check = () => {\n\t\t\tstop();\n\t\t\tstop = () => {};\n\t\t\tthis.sync();\n\t\t\tconst copy = this.#serving();\n\t\t\tif (copy) stop = hooks.watchSubscriberError(copy.sub, fn);\n\t\t\tconst changed = this.route.changed.changed(check);\n\t\t\tconst previous = stop;\n\t\t\tstop = () => {\n\t\t\t\tprevious();\n\t\t\t\tchanged();\n\t\t\t};\n\t\t};\n\t\tcheck();\n\t\treturn () => stop();\n\t}\n\n\tbufferedLargest(): track.Position | undefined {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving && hooks.bufferedLargest(serving.sub);\n\t}\n\n\t/**\n\t * The group a {@link tryGroup} with nothing to drop would hand out next, without taking it: the\n\t * first any copy offers. A front reading this one as its copy picks across copies by it.\n\t */\n\tpeek(ordered: boolean, delivered: Delivered): bigint | undefined {\n\t\tthis.#delivered = delivered;\n\t\tthis.sync();\n\t\tif (this.#closed) return undefined;\n\t\t// As the take does, so a late group on a copy that ran out is offered here too. A serving\n\t\t// copy it reopens owes a backfill, which the next take asks.\n\t\tthis.#reopen();\n\t\tthis.#reopenFolded(delivered);\n\t\tconst { next } = this.#first(ordered, delivered);\n\t\tif (!next) return undefined;\n\t\treturn hooks.peekGroup(next.sub, ordered, this.#newest === undefined ? undefined : this.#newest + 1n);\n\t}\n\n\t// Of the copies holding the lowest group, servable if any can serve it, so which copy holds a\n\t// group never decides whether it can be served.\n\tlowestHeld(from: bigint, below: bigint, servable: boolean): Held | undefined {\n\t\tlet lowest: Held | undefined;\n\t\tfor (const copy of this.#copies) {\n\t\t\tconst held = hooks.lowestHeld(copy.sub, from, lowest ? lowest.key + 1n : below, servable);\n\t\t\tif (!held) continue;\n\t\t\tif (held.key === lowest?.key) lowest.servable ||= held.servable;\n\t\t\telse lowest = held;\n\t\t}\n\t\treturn lowest;\n\t}\n\n\tobjectLargest(): track.Position | undefined {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving ? hooks.objectLargest(serving.sub) : this.#ended?.object;\n\t}\n\n\tlargestFinished(position: track.Position): boolean {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving !== undefined && hooks.largestFinished(serving.sub, position);\n\t}\n\n\tpeekLargest(): { largest?: track.Position; ended: boolean } {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\treturn serving ? hooks.peekLargest(serving.sub) : (this.#ended ?? { ended: false });\n\t}\n\n\tasync largest(seen: track.Position | undefined): Promise<track.Position | undefined> {\n\t\tfor (;;) {\n\t\t\tthis.sync();\n\t\t\tconst serving = this.#serving();\n\t\t\tconst view = serving ? hooks.peekLargest(serving.sub) : this.#ended;\n\t\t\tconst largest = view?.largest;\n\t\t\tconst { start, end } = this.#shell.cursor.peek();\n\t\t\t// A replacement copy can start below what an earlier one reported.\n\t\t\tif (\n\t\t\t\tlargest &&\n\t\t\t\tlargest.group >= start &&\n\t\t\t\t(end === undefined || largest.group < end) &&\n\t\t\t\t(!seen || largest.group > seen.group || (largest.group === seen.group && largest.frame > seen.frame))\n\t\t\t)\n\t\t\t\treturn largest;\n\t\t\t// A copy failing is its route failing: the logical track's stream ends only with the\n\t\t\t// route, or once the serving copy reaches its end cleanly.\n\t\t\tif (this.#shell.closed.peek() !== undefined) return undefined;\n\t\t\tif (view?.ended && !(serving?.sub.closed.peek() instanceof Error)) return undefined;\n\t\t\tif ((this.route.concluded || this.route.refusal) && (!serving || view?.ended)) return undefined;\n\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\tconst disposes: Dispose[] = [];\n\t\t\t\tconst wake = () => {\n\t\t\t\t\tfor (const dispose of disposes) dispose();\n\t\t\t\t\tresolve();\n\t\t\t\t};\n\t\t\t\tdisposes.push(this.changed(wake), this.#shell.closed.changed(wake), this.#shell.cursor.changed(wake));\n\t\t\t\tif (serving) disposes.push(hooks.largestChanged(serving.sub, wake));\n\t\t\t});\n\t\t}\n\t}\n\n\task(ask: Ask): void {\n\t\tthis.sync();\n\t\tconst serving = this.#serving();\n\t\tif (serving) hooks.askSubscriber(serving.sub, ask);\n\t}\n\n\t// A request outlives the copy it asked: once that copy closes while the logical track is open,\n\t// it asks the copy the route serves next, so only the logical track closing rejects it.\n\t// Mirrors the Rust `Failover`.\n\tasync refresh(signal?: AbortSignal): Promise<void> {\n\t\t// How the copy last asked closed: the track's end once no route serves another.\n\t\tlet failed: unknown;\n\t\tfor (let asked: number | undefined; ; ) {\n\t\t\tthis.sync();\n\t\t\tconst closed = this.#shell.closed.peek();\n\t\t\tif (closed !== undefined) throw closed ?? closedBeforeSent(this.route.name);\n\t\t\tsignal?.throwIfAborted();\n\t\t\tconst generation = this.route.generation;\n\t\t\tif (generation !== asked) {\n\t\t\t\tasked = generation;\n\t\t\t\tconst serving = this.#serving();\n\t\t\t\tif (serving) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn await this.#request(serving, signal);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tif (signal?.aborted) throw err;\n\t\t\t\t\t\tfailed = err;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Nothing served when it was called: the next copy's join asks.\n\t\t\t\tif (failed === undefined) return;\n\t\t\t} else if (this.route.concluded || this.route.refusal) {\n\t\t\t\tthrow failed;\n\t\t\t}\n\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\tconst disposes: Dispose[] = [];\n\t\t\t\tconst wake = () => {\n\t\t\t\t\tfor (const dispose of disposes) dispose();\n\t\t\t\t\tsignal?.removeEventListener(\"abort\", wake);\n\t\t\t\t\tresolve();\n\t\t\t\t};\n\t\t\t\tdisposes.push(this.route.changed.changed(wake), this.#shell.closed.changed(wake));\n\t\t\t\tsignal?.addEventListener(\"abort\", wake, { once: true });\n\t\t\t});\n\t\t}\n\t}\n\n\t// Ask `serving` for a refresh, withdrawing it once the logical track closes.\n\tasync #request(serving: Copy, signal?: AbortSignal): Promise<void> {\n\t\tconst asked = new AbortController();\n\t\tconst abort = () => asked.abort(signal?.reason);\n\t\tsignal?.addEventListener(\"abort\", abort, { once: true });\n\t\tlet dispose: Dispose | undefined;\n\t\tconst ended = new Promise<never>((_, reject) => {\n\t\t\tdispose = this.#shell.closed.changed((closed) => {\n\t\t\t\tif (closed === undefined) return;\n\t\t\t\treject(closed ?? closedBeforeSent(this.route.name));\n\t\t\t\tasked.abort();\n\t\t\t});\n\t\t});\n\t\ttry {\n\t\t\treturn await Promise.race([serving.sub.refresh({ signal: asked.signal }), ended]);\n\t\t} finally {\n\t\t\tsignal?.removeEventListener(\"abort\", abort);\n\t\t\tdispose?.();\n\t\t}\n\t}\n\n\tfork(options?: track.Subscription): track.Subscriber {\n\t\tthis.sync();\n\t\tconst newest = this.#copies.at(-1);\n\t\treturn hooks.resumeSubscriber(\n\t\t\tthis.route.name,\n\t\t\toptions,\n\t\t\t(shell) => new Reader(this.route, shell, this.#record, newest),\n\t\t);\n\t}\n\n\tclose(abort?: Error): void {\n\t\tif (this.#closed) return;\n\t\tthis.#closed = true;\n\t\tthis.#wall?.timer.abort();\n\t\tthis.#wall = undefined;\n\t\tfor (const dispose of this.#dispose) dispose();\n\t\tthis.#dispose = [];\n\t\t// A recovery in flight settles with the group rather than adopting a replacement.\n\t\tfor (const group of this.#open) hooks.releaseGroupReader(group, abort);\n\t\tthis.#open.clear();\n\t\tfor (const copy of [...this.#copies, ...this.#rerouted]) this.#drop(copy, abort);\n\t\tthis.#copies = [];\n\t\tthis.#rerouted = [];\n\t\tthis.route.leave(this);\n\t\t// A read still waiting on the reader looks again and finds it closed.\n\t\tthis.wake();\n\t}\n}\n\n/** A fetch of a group's rest from one route generation. */\ninterface Fetch {\n\tgeneration: number;\n\t/** Set once the fetch settles. */\n\toutcome?: { group: GroupConsumer } | { error: Error };\n\t/** Fires once it settles. */\n\tsettled: Signal<boolean>;\n\t/** Abandon it, closing a group it returns, unless the caller kept that group. */\n\tcancel(): void;\n}\n\nfunction startFetch(\n\tfetchGroup: NonNullable<BroadcastWire[\"fetchGroup\"]>,\n\tname: string,\n\tkey: bigint,\n\tgeneration: number,\n\tsignal: AbortSignal,\n): Fetch {\n\t// Its own controller, so a fetch a later route supersedes stops without ending the recovery.\n\tconst controller = new AbortController();\n\tconst onAbort = () => controller.abort(signal.reason);\n\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\tconst fetch: Fetch = {\n\t\tgeneration,\n\t\tsettled: new Signal(false),\n\t\tcancel: () => {\n\t\t\tsignal.removeEventListener(\"abort\", onAbort);\n\t\t\tcontroller.abort();\n\t\t\tif (fetch.outcome && \"group\" in fetch.outcome) fetch.outcome.group.close();\n\t\t},\n\t};\n\tfetchGroup(name, key, { signal: controller.signal })\n\t\t.then(\n\t\t\t(group) => {\n\t\t\t\t// A copy that already failed continues nothing: that is the route failing again.\n\t\t\t\tconst failed = group.closed.peek();\n\t\t\t\tif (failed instanceof Error) {\n\t\t\t\t\tgroup.close();\n\t\t\t\t\tfetch.outcome = { error: failed };\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfetch.outcome = { group };\n\t\t\t\t// Abandoned while it was out: nobody reads it.\n\t\t\t\tif (controller.signal.aborted) group.close();\n\t\t\t},\n\t\t\t(err: unknown) => {\n\t\t\t\tfetch.outcome = { error: err instanceof Error ? err : new Error(String(err)) };\n\t\t\t},\n\t\t)\n\t\t.finally(() => {\n\t\t\tsignal.removeEventListener(\"abort\", onAbort);\n\t\t\tfetch.settled.set(true);\n\t\t});\n\treturn fetch;\n}\n\n/** Wait for `change`, or throw once `signal` aborts, leaving no listener behind either way. */\nasync function until(change: PromiseLike<unknown>, signal?: AbortSignal): Promise<void> {\n\tsignal?.throwIfAborted();\n\tif (!signal) {\n\t\tawait race([change]);\n\t\treturn;\n\t}\n\tlet onAbort = () => {};\n\tconst abort = new Promise<void>((resolve) => {\n\t\tonAbort = resolve;\n\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t});\n\ttry {\n\t\tawait race([change, abort]);\n\t} finally {\n\t\tsignal.removeEventListener(\"abort\", onAbort);\n\t}\n\tsignal.throwIfAborted();\n}\n\nfunction closedBeforeSent(name: string): Error {\n\treturn new StreamError(StreamCode.Cancel, { message: `track ${name} closed before the refresh was sent` });\n}\n\n/** Why a group a copy closed short ends there: no route holds more of it. */\nfunction standing(): Error {\n\treturn new StreamError(StreamCode.NotFound, { message: \"no route holds more of the group\" });\n}\n\nfunction dropped(): Error {\n\treturn new StreamError(StreamCode.Cancel, { message: \"no route serves the track\" });\n}\n\n/** Carries a group across route changes; see the module docs. */\nclass Recover implements GroupRecover {\n\t#reader: Reader;\n\treadonly key: bigint;\n\t/** The copy being read, whose subscription this group keeps alive while it is read. */\n\t#copy?: Copy;\n\t/** The route generation when `#copy` was acquired; kept separate because `Reader.sync` updates `copy.generation` in place on switch-back. */\n\t#generation: number;\n\t/**\n\t * The group being read came from the reader's own fetch, judged under the reader's own terms, or\n\t * from looking past a copy's too-old verdict once already: its own too old stands, which bounds\n\t * the route to one request more per group.\n\t */\n\t#judged = false;\n\t/** The recovery under way looks past a copy's too-old verdict. */\n\t#excusing = false;\n\n\t/**\n\t * Puts the group on the reader's list of those still read, so the other copies that hold it,\n\t * or may yet get it, stay for a failure to continue from.\n\t */\n\tconstructor(reader: Reader, group: GroupConsumer, copy: Copy) {\n\t\tthis.#reader = reader;\n\t\tthis.key = group.start;\n\t\tthis.#copy = copy;\n\t\tthis.#generation = copy.generation;\n\t\tcopy.lease++;\n\t\treader.out.add(this);\n\t}\n\n\t/**\n\t * Release the copy once the group ends. Called only after the group carries this recovery:\n\t * reading `closed` before then would settle it on a failure recovery could still continue.\n\t */\n\twatch(group: GroupConsumer): void {\n\t\tvoid hooks.groupClosed(group).then(() => this.close());\n\t}\n\n\tclose(): void {\n\t\tthis.#release(this.#reader.out.delete(this));\n\t}\n\n\t// Release the copy being read. `wake` says a parked read may let go of a copy anyway.\n\t#release(wake = false): void {\n\t\tconst copy = this.#copy;\n\t\tthis.#copy = undefined;\n\t\tconst freed = copy !== undefined && --copy.lease === 0;\n\t\tif (wake || freed) this.#reader.freed();\n\t}\n\n\tget changed(): Getter<unknown> {\n\t\treturn this.#reader.route.changed;\n\t}\n\n\twants(cause: RecoverCause): boolean {\n\t\tconst copy = this.#copy;\n\t\tif (!copy) return false;\n\t\tconst route = this.#reader.route;\n\t\tif (cause.kind === \"failed\" && this.#undelivered(cause.error, copy)) return true;\n\t\t// A refusal is terminal: no route continues a short close, which stands.\n\t\tif (cause.kind === \"closed\" && route.refusal) return false;\n\t\t// A stall or a short close on a copy whose route failed, or a short close while the front\n\t\t// stages the copy to replace it, looks to the route replacing it. Mirrors the Rust\n\t\t// `Recover::wants`.\n\t\tif (cause.kind === \"stalled\" && copyFailed(copy)) return true;\n\t\tif (cause.kind === \"closed\" && (routeLost(copy) || route.staged)) return true;\n\t\tif (route.concluded) return true;\n\t\tif (route.generation !== this.#generation) {\n\t\t\t// A route that returned serves the copy being read again, which a stalled group reuses.\n\t\t\t// A group that closed short (e.g. bare FIN at a Position End cap) will not resume on\n\t\t\t// the same subscription, so recover by fetching the remaining frames.\n\t\t\tif (cause.kind === \"closed\" || this.#reader.copy(route.generation) !== copy) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tthis.#generation = route.generation;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Whether `copy` failed delivering the group rather than judging it, so its own route may be\n\t * asked again. Any other failure would repeat on every copy from that route, so only another\n\t * route is asked, which bounds a hostile route to one bad answer per route change.\n\t */\n\t#undelivered(failed: Error, copy: Copy): boolean {\n\t\treturn routeFailed(failed) || copyFailed(copy) || this.#excuses(failed, copy);\n\t}\n\n\t/**\n\t * Whether `err` is a too-old verdict from `copy` that is none on the reader: the reader outgrows\n\t * the budget it was judged under (see {@link #outgrowsJudging}), and the group being read is no\n\t * answer to the reader's own request already. Mirrors the Rust `Recover::excuses`.\n\t */\n\t#excuses(err: Error, copy: Copy): boolean {\n\t\treturn (\n\t\t\terr instanceof StreamError && err.code === StreamCode.Old && !this.#judged && this.#outgrowsJudging(copy)\n\t\t);\n\t}\n\n\t/**\n\t * Whether the reader is wider than the narrowest budget `copy`'s upstream asked, which a group\n\t * it reset or dropped as too old may have been judged under: that verdict settles a reader only as a stale\n\t * drop does (see {@link settles}), and the route still delivers the group to a request under the\n\t * reader's own terms. A cache only makes things faster. Mirrors the Rust\n\t * `Recover::outgrows_judging`.\n\t */\n\t#outgrowsJudging(copy: Copy): boolean {\n\t\tconst judged = hooks.judgedUnder(copy.sub);\n\t\tif (judged === undefined) return false;\n\t\tconst run = { start: this.key, end: this.key + 1n, ...staleHole(judged) };\n\t\treturn !settles(run, this.#reader.within.budget(), this.#reader.coverage());\n\t}\n\n\tasync replace(index: number, cause: RecoverCause, signal: AbortSignal): Promise<Replacement> {\n\t\tlet fetch: Fetch | undefined;\n\t\tlet kept: GroupConsumer | undefined;\n\t\ttry {\n\t\t\tconst replacement = await this.#replace({ index, cause, signal }, (next) => {\n\t\t\t\tfetch?.cancel();\n\t\t\t\tfetch = next;\n\t\t\t});\n\t\t\tkept = replacement.group;\n\t\t\treturn replacement;\n\t\t} finally {\n\t\t\t// A fetch nothing continues from is abandoned, along with whatever it returns.\n\t\t\tif (fetch?.outcome === undefined || !(\"group\" in fetch.outcome) || fetch.outcome.group !== kept)\n\t\t\t\tfetch?.cancel();\n\t\t}\n\t}\n\n\tasync #replace(\n\t\t{ index, cause, signal }: { index: number; cause: RecoverCause; signal: AbortSignal },\n\t\tstarted: (fetch: Fetch) => void,\n\t): Promise<Replacement> {\n\t\tconst reader = this.#reader;\n\t\tconst route = reader.route;\n\t\tconst failed = cause.kind === \"failed\" ? cause.error : undefined;\n\t\tconst closed = cause.kind === \"closed\";\n\t\t// The copy being read delivers no more of the group.\n\t\tconst settled = cause.kind !== \"stalled\";\n\t\tconst reading = this.#copy;\n\t\tthis.#excusing = failed !== undefined && reading !== undefined && this.#excuses(failed, reading);\n\t\tlet fetch: Fetch | undefined;\n\t\tfor (;;) {\n\t\t\tsignal.throwIfAborted();\n\t\t\t// The serving subscription may still deliver a group its route refused to fetch.\n\t\t\tlet landing: PromiseLike<unknown> | undefined;\n\t\t\tlet unwatch: Dispose | undefined;\n\t\t\t// Subscribe the reader to a new route from its newest group, which is this one or\n\t\t\t// later, so that route's subscription may deliver the rest of it.\n\t\t\treader.sync();\n\t\t\tconst current = this.#copy;\n\t\t\tif (!current) throw new Error(\"group closed\");\n\t\t\t// The front refused the route that would continue it: nothing will.\n\t\t\tif (settled && route.refusal) throw route.refusal;\n\t\t\tconst generation = route.generation;\n\t\t\tconst serving = route.source ? reader.copy(generation) : undefined;\n\t\t\tconst waits: Getter<unknown>[] = [route.changed];\n\t\t\t// A failed group continues from any copy still holding it, newest first: its name fixes\n\t\t\t// its content. A stall only moves to the serving copy, so two stalled copies never trade\n\t\t\t// the group back and forth.\n\t\t\tif (failed) {\n\t\t\t\tconst held = reader.holding(this.key, current)[0];\n\t\t\t\tconst cached = held && hooks.cachedGroup(held.sub, this.key, index);\n\t\t\t\tif (cached) return this.#replacement(cached, held);\n\t\t\t\t// A verdict would repeat from the route that gave it.\n\t\t\t\tif (generation === this.#generation && !this.#undelivered(failed, current)) throw failed;\n\t\t\t}\n\t\t\t// An unroutable copy waits for another route rather than asking its own again.\n\t\t\tconst withdrawn = failed !== undefined && generation === this.#generation && unroutable(failed);\n\t\t\tif (!serving) {\n\t\t\t\t// Nothing replaced a copy that closed the group, as when its track parks, so its\n\t\t\t\t// close stands, unless its route failed: then it waits for a route as a failed\n\t\t\t\t// copy does, unless none will come.\n\t\t\t\tif (closed && (!routeLost(current) || route.concluded)) throw standing();\n\t\t\t\t// Nothing serves: a failed copy waits for a route, unless none will come.\n\t\t\t\tif (failed && route.concluded) throw failed;\n\t\t\t} else if (closed && generation === this.#generation) {\n\t\t\t\t// It serves on with no front to replace it, so its close stands, unless its route\n\t\t\t\t// failed or the front stages the copy to replace it: then that one may hold more.\n\t\t\t\tif ((!routeLost(current) && !route.staged) || route.concluded) throw standing();\n\t\t\t} else if (generation !== this.#generation || failed) {\n\t\t\t\t// The serving route gave the group up, which ends it with that route's error however\n\t\t\t\t// a fetch of the rest would answer. A copy that failed dropped its open groups with\n\t\t\t\t// it, and a group the route failed is no verdict either.\n\t\t\t\tconst given = hooks.givenUp(serving.sub, this.key);\n\t\t\t\tif (given.error && !routeFailed(given.error) && !copyFailed(serving)) {\n\t\t\t\t\tif (!this.#excuses(given.error, serving)) throw given.error;\n\t\t\t\t\tthis.#excusing = true;\n\t\t\t\t}\n\t\t\t\twaits.push(...given.changed);\n\t\t\t\t// A newer copy's track caches it: continue from there. On switch-back to the same\n\t\t\t\t// copy (whose group closed short under a Position End cap), skip its cached copy\n\t\t\t\t// and fetch the remaining frames from `index`.\n\t\t\t\tif (!failed && generation !== this.#generation && serving !== current) {\n\t\t\t\t\tconst cached = hooks.cachedGroup(serving.sub, this.key, index);\n\t\t\t\t\tif (cached) return this.#replacement(cached, serving);\n\t\t\t\t}\n\t\t\t\t// Finished history may still continue the group above, and so may a fetch already\n\t\t\t\t// answered below. Otherwise a terminal track verdict ends this wait even while a\n\t\t\t\t// fetch is still unanswered, and asks for nothing more.\n\t\t\t\tconst closed = serving.sub.closed.peek();\n\t\t\t\tconst verdict = closed instanceof Error && !routeFailed(closed) ? closed : undefined;\n\t\t\t\twaits.push(serving.sub.closed);\n\t\t\t\t// Otherwise ask for it, if the route's version can fetch. The subscription may still\n\t\t\t\t// deliver it first. Without FETCH only a copy continues a failed or closed group, and\n\t\t\t\t// none holds it, so it ends as the copy left it.\n\t\t\t\tconst fetchGroup = route.view(serving.source).fetchGroup;\n\t\t\t\tif (!fetchGroup && settled) throw verdict ?? failed ?? standing();\n\t\t\t\tif (fetchGroup && !verdict && !withdrawn && fetch?.generation !== generation) {\n\t\t\t\t\tfetch = startFetch(fetchGroup, route.name, this.key, generation, signal);\n\t\t\t\t\tstarted(fetch);\n\t\t\t\t}\n\t\t\t\t// A fetch from an earlier route answers for that route, not this one.\n\t\t\t\tconst asked = fetch?.generation === generation ? fetch : undefined;\n\t\t\t\tconst outcome = asked?.outcome;\n\t\t\t\t// An answer carries its own expiry; the verdict and the budget only end the wait.\n\t\t\t\tif (outcome && \"group\" in outcome) return this.#replacement(outcome.group, serving, true);\n\t\t\t\tif (verdict) throw verdict;\n\t\t\t\t// Judged within the reader's window, as a moved group is: the serving copy's subscription\n\t\t\t\t// starts at the boundary, past groups in the window that supersede this one.\n\t\t\t\tconst stale = hooks.staleAt(serving.sub, this.key, undefined, reader.within);\n\t\t\t\tif (stale.expired()) throw new StreamError(StreamCode.Old, { message: \"group is past the budget\" });\n\t\t\t\twaits.push(...stale.changed, ...(asked && !asked.outcome ? [asked.settled] : []));\n\t\t\t\t// That route failing too waits for the next one, and a refusal is a verdict only for\n\t\t\t\t// a copy that delivers no more, once the serving subscription will not deliver the\n\t\t\t\t// group either.\n\t\t\t\tif (outcome && settled && !routeFailed(outcome.error) && !copyFailed(serving)) {\n\t\t\t\t\tconst subscription = serving.sub.subscription.peek();\n\t\t\t\t\tconst maxDelay = Duration.millis(widest(subscription?.ranges ?? []));\n\t\t\t\t\tconst land = { start: this.key, end: this.key + 1n, floor: true, grace: grace(maxDelay) };\n\t\t\t\t\tif (generation === this.#generation || !hooks.mayLand(serving.sub, land)) throw outcome.error;\n\t\t\t\t\tlanding = new Promise<void>((resolve) => {\n\t\t\t\t\t\tunwatch = hooks.groupChanged(serving.sub, resolve);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst changed = Signal.race(...waits);\n\t\t\t\tawait until(landing === undefined ? changed : race([changed, landing]), signal);\n\t\t\t} finally {\n\t\t\t\tunwatch?.();\n\t\t\t}\n\t\t}\n\t}\n\n\t#replacement(group: GroupConsumer, copy: Copy, fetched = false): Replacement {\n\t\t// Capture the route generation at selection time: `Reader.sync` may rewrite\n\t\t// `copy.generation` in place on a switch-back before `adopt` runs.\n\t\tconst generation = copy.generation;\n\t\treturn {\n\t\t\tgroup,\n\t\t\texpiry: hooks.staleAt(copy.sub, this.key, undefined, this.#reader.within),\n\t\t\tadopt: () => {\n\t\t\t\t// A later switch must keep this copy subscribed while the recovered group still\n\t\t\t\t// reads it, just like a group handed out from that copy directly. Leased first, so\n\t\t\t\t// letting go of the copies it leaves never drops it.\n\t\t\t\tcopy.lease++;\n\t\t\t\tthis.#release();\n\t\t\t\tthis.#copy = copy;\n\t\t\t\tthis.#generation = generation;\n\t\t\t\tthis.#judged = fetched || this.#excusing;\n\t\t\t\tthis.#excusing = false;\n\t\t\t},\n\t\t\tdiscard: () => group.close(),\n\t\t};\n\t}\n}\n\n/**\n * A fetched group judged by the publisher's max age alone against a reader's copy of its track on\n * the route it came from, as the Rust relay judges a fetch landed in that copy's cache. It opens\n * no subscription, so a fetch-only relay never pulls the track: with no copy, nothing newer is\n * known here, and the group is never stale.\n */\nclass FetchExpiry implements Expiry {\n\treadonly changed: readonly Getter<unknown>[];\n\t#find: () => Copy | undefined;\n\t#key: bigint;\n\t// The copy judging the group. One that closed still judges by what it held, until another opens.\n\t#judging?: { sub: track.Subscriber; expiry: Expiry; unwatch: Dispose[] };\n\t// Bumped whenever the judging copy's verdict may change.\n\t#relay = new Signal(0);\n\t#closed = false;\n\n\tconstructor(find: () => Copy | undefined, copied: Getter<unknown>, key: bigint) {\n\t\tthis.#find = find;\n\t\tthis.#key = key;\n\t\tthis.changed = [copied, this.#relay];\n\t}\n\n\texpired(): boolean {\n\t\tthis.#pick();\n\t\treturn this.#judging?.expiry.expired() ?? false;\n\t}\n\n\tbudget(): number {\n\t\treturn this.#judging?.expiry.budget?.() ?? NO_MAX_DELAY;\n\t}\n\n\taged(budget: number): boolean {\n\t\tthis.#pick();\n\t\treturn this.#judging?.expiry.aged?.(budget) ?? false;\n\t}\n\n\t/** Judge afresh once the group moves to another route: the old route's copy says nothing about it. */\n\tmoved(): void {\n\t\tthis.#unwatch();\n\t\tthis.#judging = undefined;\n\t\tthis.#relay.update((n) => n + 1);\n\t}\n\n\t/** Stop watching the copy, once nobody reads the group. */\n\tclose(): void {\n\t\tthis.#closed = true;\n\t\tthis.#unwatch();\n\t}\n\n\t#pick(): void {\n\t\tconst found = this.#find();\n\t\tif (!found || found.sub === this.#judging?.sub) return;\n\t\tthis.#unwatch();\n\t\tconst expiry = hooks.staleAt(found.sub, this.#key, true);\n\t\tconst bump = () => this.#relay.update((n) => n + 1);\n\t\tconst unwatch = this.#closed ? [] : expiry.changed.map((changed) => changed.subscribe(bump));\n\t\tthis.#judging = { sub: found.sub, expiry, unwatch };\n\t}\n\n\t#unwatch(): void {\n\t\tfor (const dispose of this.#judging?.unwatch ?? []) dispose();\n\t\tif (this.#judging) this.#judging.unwatch = [];\n\t}\n}\n\n/** A logical track: its name, and whether it is the metadata copy. Mirrors the Rust `track::Key`. */\ntype TrackKey = { name: string; meta: boolean };\n\n/**\n * One broadcast served through one route at a time; see the module docs.\n *\n * Its {@link consumer} is the broadcast handed out: every track read through it follows the\n * front's route. The origin calls {@link serve} as routes of the same identity take over, and\n * {@link conclude} once none will: readers then follow the last copy to its end.\n */\nexport class Front {\n\t/** The logical broadcast; closing its last handle concludes the front. */\n\treadonly consumer: broadcast.Consumer;\n\t#source?: Source;\n\t#routes = new Map<string, Route>();\n\t/** The metadata copies' routes, kept apart so no payload reader is ever handed one. */\n\t#metaRoutes = new Map<string, Route>();\n\t/**\n\t * Each track's properties as first committed, and the {@link Source.id} of the source that said\n\t * so: every later copy must match. Kept for the front's lifetime, so it holds no route.\n\t */\n\t#info = new Map<string, { info: track.Info; source: number }>();\n\t/** Bumped whenever the source changes, so an answer from a replaced one is dropped. */\n\t#changed = new Signal(0);\n\t/** Bumped whenever a reader subscribes a copy, which may judge a fetched group; see {@link FetchExpiry}. */\n\t#copied = new Signal(0);\n\t/** Aborted once the current source is replaced, retiring what was asked of it. */\n\t#retire = new AbortController();\n\t#concluded = false;\n\t/** The tracks each source was checked against the recorded properties for; see #verify. */\n\t#verified = new WeakMap<Source, Set<string>>();\n\t/** Whether another identity than the one this front serves wins its path. */\n\t#superseded: () => boolean;\n\n\t/**\n\t * `superseded` says whether another identity than the one the front serves wins its path,\n\t * judged over every route the origin holds: a claim's refusal is then final.\n\t */\n\tconstructor(superseded: () => boolean = () => false) {\n\t\tthis.#superseded = superseded;\n\t\tthis.consumer = makeFrontConsumer(this);\n\t\tvoid this.consumer.closed.then(() => this.conclude());\n\t\tvoid this.#list(wireOf(this.consumer).lister());\n\t}\n\n\t/**\n\t * Answer listings of the front's broadcast with its serving source's listing, while anyone\n\t * lists it. A source of the same identity lists the same tracks, so a takeover shows readers\n\t * only what differs, once the new source's listing synced.\n\t */\n\tasync #list(lister: Lister): Promise<void> {\n\t\tconst closed = this.consumer.closed;\n\t\t// What the front lists, by kind and name, the source being read, and its pending next event.\n\t\ttype Named = { name: string; type: Kind };\n\t\tlet listing:\n\t\t\t| {\n\t\t\t\t\tlisted: Map<string, Named>;\n\t\t\t\t\t/** Tracks an earlier source listed that the current one has yet to list. */\n\t\t\t\t\tstale: Map<string, Named>;\n\t\t\t\t\tsource?: Source;\n\t\t\t\t\treader?: Tracks;\n\t\t\t\t\tnext?: Promise<{ event?: TracksEvent; err?: Error }>;\n\t\t\t }\n\t\t\t| undefined;\n\t\tconst wait = () => race([Signal.race(lister.wanted, this.#changed), closed]);\n\t\tconst stop = () => {\n\t\t\tlisting?.reader?.close();\n\t\t\tlisting = undefined;\n\t\t};\n\t\tconst read = (reader: Tracks): Promise<{ event?: TracksEvent; err?: Error }> =>\n\t\t\treader.next().then(\n\t\t\t\t(event) => ({ event }),\n\t\t\t\t(err: unknown) => ({ err: err instanceof Error ? err : new Error(String(err)) }),\n\t\t\t);\n\t\t// Forwarded as the source reported it, finished or not.\n\t\tconst unlist = (\n\t\t\tlisted: Map<string, Named>,\n\t\t\tstale: Map<string, Named>,\n\t\t\tevent: { kind: \"removed\" | \"finished\"; name: string; type: Kind },\n\t\t) => {\n\t\t\tconst key = keyOf(event.name, event.type);\n\t\t\tstale.delete(key);\n\t\t\tif (!listed.delete(key)) return;\n\t\t\tif (event.kind === \"finished\") lister.finish(event.name, event.type);\n\t\t\telse lister.remove(event.name, event.type);\n\t\t};\n\t\ttry {\n\t\t\tfor (;;) {\n\t\t\t\tif (closed.peek() !== undefined) return;\n\t\t\t\tif (!lister.wanted.peek()) {\n\t\t\t\t\tif (listing) {\n\t\t\t\t\t\tstop();\n\t\t\t\t\t\tlister.clear();\n\t\t\t\t\t}\n\t\t\t\t\tawait wait();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (this.#concluded) {\n\t\t\t\t\t// No route will serve it again, so nothing more will be listed. A source that\n\t\t\t\t\t// closed ended its listing after the tracks it finished last: those go first.\n\t\t\t\t\twhile (listing?.reader && listing.source?.from.closed.peek() !== undefined) {\n\t\t\t\t\t\tconst { event } = await (listing.next ?? read(listing.reader));\n\t\t\t\t\t\tlisting.next = undefined;\n\t\t\t\t\t\tif (!event) break;\n\t\t\t\t\t\tif (event.kind === \"removed\" || event.kind === \"finished\")\n\t\t\t\t\t\t\tunlist(listing.listed, listing.stale, event);\n\t\t\t\t\t}\n\t\t\t\t\tstop();\n\t\t\t\t\tlister.end();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlisting ??= { listed: new Map(), stale: new Map() };\n\t\t\t\tif (listing.source !== this.#source) {\n\t\t\t\t\tlisting.reader?.close();\n\t\t\t\t\tlisting.source = this.#source;\n\t\t\t\t\tlisting.stale = new Map(listing.listed);\n\t\t\t\t\tlisting.next = undefined;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlisting.reader = this.#source?.wire.tracks();\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t// A closing source lists nothing more; the front moves off it soon.\n\t\t\t\t\t\tlisting.reader = undefined;\n\t\t\t\t\t\t// A live one refuses: served through a route claiming a prefix, it names\n\t\t\t\t\t\t// nothing to list. A later reader asks again.\n\t\t\t\t\t\tif (listing.source && listing.source.from.closed.peek() === undefined) {\n\t\t\t\t\t\t\tstop();\n\t\t\t\t\t\t\tlister.abort(err instanceof Error ? err : new Error(String(err)));\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst reader = listing.reader;\n\t\t\t\tif (!reader) {\n\t\t\t\t\tawait wait();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlisting.next ??= read(reader);\n\t\t\t\t// One flat race: nested, the wait's registrations stay pending whenever the event wins.\n\t\t\t\t// What a change or the close settles with is no event, so the loop looks again.\n\t\t\t\tconst result = await race([listing.next, Signal.race(lister.wanted, this.#changed), closed]);\n\t\t\t\tif (typeof result !== \"object\" || result === null) continue;\n\t\t\t\tlisting.next = undefined;\n\t\t\t\t// The source was replaced as its answer arrived: the new source's listing supersedes it.\n\t\t\t\tif (listing.source !== this.#source) continue;\n\t\t\t\tconst { event, err } = result;\n\t\t\t\tif (err) {\n\t\t\t\t\t// Its readers fail, and a later reader asks again.\n\t\t\t\t\tstop();\n\t\t\t\t\tlister.abort(err);\n\t\t\t\t} else if (!event) {\n\t\t\t\t\t// A closing source ended its listing: the front moves to another source, or ends\n\t\t\t\t\t// with it. A live one's handler ended it, as a session does once the peer's\n\t\t\t\t\t// broadcast ended, so the front's listing ends too.\n\t\t\t\t\tif (listing.source?.from.closed.peek() !== undefined) {\n\t\t\t\t\t\tlisting.reader = undefined;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstop();\n\t\t\t\t\t\tlister.end();\n\t\t\t\t\t}\n\t\t\t\t} else if (event.kind === \"added\") {\n\t\t\t\t\tconst key = keyOf(event.name, event.type);\n\t\t\t\t\tif (!listing.stale.delete(key) && !listing.listed.has(key)) {\n\t\t\t\t\t\tlisting.listed.set(key, { name: event.name, type: event.type });\n\t\t\t\t\t\tlister.add(event.name, event);\n\t\t\t\t\t}\n\t\t\t\t} else if (event.kind === \"removed\" || event.kind === \"finished\") {\n\t\t\t\t\tunlist(listing.listed, listing.stale, event);\n\t\t\t\t} else {\n\t\t\t\t\t// What the new source still lacks at its SYNCED is gone.\n\t\t\t\t\tfor (const [key, { name, type }] of listing.stale) {\n\t\t\t\t\t\tlisting.listed.delete(key);\n\t\t\t\t\t\tlister.remove(name, type);\n\t\t\t\t\t}\n\t\t\t\t\tlisting.stale.clear();\n\t\t\t\t\tlister.synced();\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tstop();\n\t\t\tlister.close();\n\t\t}\n\t}\n\n\t/**\n\t * Serve every track from `from` from now on, once each copy proves compatible. `claim` marks a\n\t * lite-07 peer's claim, whose refusal is final once its identity loses the path.\n\t */\n\tserve(from: broadcast.Consumer, local = false, claim = false): void {\n\t\tif (this.#concluded || this.#source?.from === from) return;\n\t\tconst source = new Source(from, local, claim ? this.#superseded : undefined);\n\t\tsource.retain();\n\t\tconst previous = this.#source;\n\t\tthis.#source = source;\n\t\tthis.#retired();\n\t\tfor (const route of this.#everyRoute()) this.#splice(route, source);\n\t\tprevious?.release();\n\t}\n\n\t/**\n\t * The table moved for the path while the same route still wins, with no takeover pending: a\n\t * read stranded on a lost route asks the serving source again, the evidence it waited for.\n\t * Unless the serving source is a claim whose identity lost the path: a read it refused before\n\t * any copy delivered ends with that refusal, as nothing else of its identity answers for it,\n\t * while one that delivered is asked once more and ends on that answer. Mirrors the Rust front's\n\t * `unstrand` and `refuse_stranded`.\n\t */\n\tmoved(): void {\n\t\tconst current = this.#source;\n\t\tif (this.#concluded || !current) return;\n\t\tconst lost = current.claimLost();\n\t\tfor (const route of this.#everyRoute()) {\n\t\t\tconst stranded = route.unstrand();\n\t\t\tif (!stranded) continue;\n\t\t\tif (lost && stranded.source === current && !stranded.delivered) {\n\t\t\t\troute.refuse(new StreamError(StreamCode.Unroutable, { message: \"unroutable\" }));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Read from the serving source: subscribe afresh. Otherwise the read is on a copy the\n\t\t\t// serving source replaced, which takes over again as any handover does.\n\t\t\tif (route.source === current) route.resubscribe();\n\t\t\telse this.#splice(route, current);\n\t\t}\n\t}\n\n\t/** Between routes: readers keep what they have and wait for the next one. */\n\tpark(): void {\n\t\tif (this.#concluded || !this.#source) return;\n\t\tconst previous = this.#source;\n\t\tthis.#source = undefined;\n\t\tthis.#retired();\n\t\tfor (const route of this.#everyRoute()) route.park();\n\t\tprevious.release();\n\t}\n\n\t/** No route will replace the serving one: readers follow it to its end. Idempotent. */\n\tconclude(): void {\n\t\tif (this.#concluded) return;\n\t\tthis.#concluded = true;\n\t\tfor (const route of this.#everyRoute()) route.conclude();\n\t\tthis.#source?.release();\n\t\tthis.#source = undefined;\n\t\tthis.#retired();\n\t}\n\n\t// The source changed: wake what waits on it, and retire what was asked of the old one.\n\t#retired(): void {\n\t\tthis.#changed.update((n) => n + 1);\n\t\tthis.#retire.abort();\n\t\tthis.#retire = new AbortController();\n\t}\n\n\t// Splice `source`'s copy of a track in, once it claims the same content as the copies before.\n\t#splice(route: Route, source: Source): void {\n\t\tconst recorded = this.#info.get(route.name);\n\t\tconst previous = route.served;\n\t\t// The first copy of a track has nothing to match, and the source that said what it is\n\t\t// matches itself.\n\t\tif ((!recorded && !previous) || recorded?.source === source.id) {\n\t\t\troute.serve(source);\n\t\t\treturn;\n\t\t}\n\t\t// The replaced copy keeps feeding the track while the new one answers. One that has not\n\t\t// answered yet is asked too, so a swap racing its first answer is still checked.\n\t\tsource.retain();\n\t\tprevious?.retain();\n\t\troute.stage(source);\n\t\t// Abandoned once another route supersedes this one, releasing both.\n\t\tconst retired = this.#retire.signal;\n\t\tconst expected = recorded\n\t\t\t? Promise.resolve(recorded.info)\n\t\t\t: ask(previous as Source, route.name, retired).then(\n\t\t\t\t\t(info) => {\n\t\t\t\t\t\tthis.#record(route.name, info, previous as Source);\n\t\t\t\t\t\treturn info;\n\t\t\t\t\t},\n\t\t\t\t\t// Its route failing is no answer; a refusal is the track's.\n\t\t\t\t\t(err: unknown) => {\n\t\t\t\t\t\tif (routeFailed(err instanceof Error ? err : new Error(String(err)))) return undefined;\n\t\t\t\t\t\tthrow err;\n\t\t\t\t\t},\n\t\t\t\t);\n\t\tPromise.all([expected, ask(source, route.name, retired)])\n\t\t\t.then(\n\t\t\t\t([expected, info]) => {\n\t\t\t\t\troute.unstage(source);\n\t\t\t\t\tif (this.#source !== source) return;\n\t\t\t\t\t// The copy it replaces never answered, so this one says what the track is.\n\t\t\t\t\tif (!expected) this.#record(route.name, info, source);\n\t\t\t\t\t// A copy claiming the same content with different metadata is refused rather\n\t\t\t\t\t// than reinterpreted.\n\t\t\t\t\tif (!expected || compatible(expected, info)) route.serve(source);\n\t\t\t\t\telse route.refuse(new Incompatible(route.name));\n\t\t\t\t},\n\t\t\t\t(err: unknown) => {\n\t\t\t\t\troute.unstage(source);\n\t\t\t\t\tif (this.#source !== source) return;\n\t\t\t\t\tconst error = err instanceof Error ? err : new Error(String(err));\n\t\t\t\t\t// A route that lost the content leaves the replaced copy feeding the read, which asks\n\t\t\t\t\t// again once the table moves, as the Rust front's refusal does. A route on its way\n\t\t\t\t\t// out is no verdict: the next one is asked.\n\t\t\t\t\tif (strands(error, source)) {\n\t\t\t\t\t\t// A claim whose identity lost the path refuses for good.\n\t\t\t\t\t\tif (source.claimLost()) route.refuse(error);\n\t\t\t\t\t\telse route.strand(source, false);\n\t\t\t\t\t} else if (!routeFailed(error)) route.refuse(error);\n\t\t\t\t},\n\t\t\t)\n\t\t\t.finally(() => {\n\t\t\t\tsource.release();\n\t\t\t\tprevious?.release();\n\t\t\t});\n\t}\n\n\t// Every logical track's route, payload and metadata copies alike.\n\t*#everyRoute(): Iterable<Route> {\n\t\tyield* this.#routes.values();\n\t\tyield* this.#metaRoutes.values();\n\t}\n\n\t#route(name: string, meta: boolean): Route {\n\t\tconst routes = meta ? this.#metaRoutes : this.#routes;\n\t\tlet route = routes.get(name);\n\t\tif (route) return route;\n\t\troute = new Route(name, meta);\n\t\tconst created = route;\n\t\tcreated.idle = () => {\n\t\t\tif (routes.get(name) === created) routes.delete(name);\n\t\t};\n\t\tcreated.copied = () => this.#copied.update((n) => n + 1);\n\t\troutes.set(name, created);\n\t\t// A track whose properties another source already gave is checked like any replacement.\n\t\tif (this.#concluded) created.conclude();\n\t\telse if (this.#source) this.#splice(created, this.#source);\n\t\treturn created;\n\t}\n\n\t// Check `source` claims the same properties for `name` as recorded, once per source: a fetch\n\t// never reads a copy a subscription would refuse.\n\tasync #verify(name: string, source: Source): Promise<void> {\n\t\tconst recorded = this.#info.get(name);\n\t\tif (recorded?.source === source.id) return;\n\t\tlet verified = this.#verified.get(source);\n\t\tif (verified?.has(name)) return;\n\t\tconst retired = this.#retire.signal;\n\t\tawait this.#askServed(name, source, retired);\n\t\tconst info = await ask(source, name, retired);\n\t\t// The first answer says what the track is; later sources have to match it.\n\t\tconst expected = this.#info.get(name);\n\t\tif (!expected) this.#record(name, info, source);\n\t\telse if (!compatible(expected.info, info)) throw new Incompatible(name);\n\t\tverified ??= new Set();\n\t\tverified.add(name);\n\t\tthis.#verified.set(source, verified);\n\t}\n\n\t// A copy a reader still reads says what the track is before `source` does: one logical track\n\t// has one set of properties. Its route failing is no answer; a refusal is the track's.\n\tasync #askServed(name: string, source: Source, retired: AbortSignal): Promise<void> {\n\t\tconst served = this.#routes.get(name)?.served;\n\t\tif (this.#info.has(name) || !served || served === source) return;\n\t\tlet info: track.Info;\n\t\ttry {\n\t\t\tinfo = await ask(served, name, retired);\n\t\t} catch (err) {\n\t\t\tif (routeFailed(err instanceof Error ? err : new Error(String(err)))) return;\n\t\t\tthrow err;\n\t\t}\n\t\tthis.#record(name, info, served);\n\t}\n\n\t#record(name: string, info: track.Info, source: Source): void {\n\t\tif (!this.#info.has(name)) this.#info.set(name, { info, source: source.id });\n\t}\n\n\t/** Subscribe the logical track `name`, or its metadata copy when `meta`. */\n\tsubscribe(name: string, options?: track.Subscription, meta = false): track.Subscriber {\n\t\tif (this.consumer.closed.peek() !== undefined) throw new Error(\"broadcast is closed\");\n\t\tconst route = this.#route(name, meta);\n\t\treturn hooks.resumeSubscriber(\n\t\t\tname,\n\t\t\toptions,\n\t\t\t(shell) => new Reader(route, shell, (info, source) => this.#record(name, info, source)),\n\t\t);\n\t}\n\n\t/** Whether the serving source's datagram metadata comes from an application. */\n\tget localDatagrams(): boolean {\n\t\treturn this.#source?.wire.localDatagrams ?? false;\n\t}\n\n\t/** Whether the serving source keeps a name's stream track and datagram track apart. */\n\tget distinguishesKinds(): boolean {\n\t\treturn this.#source?.wire.distinguishesKinds ?? false;\n\t}\n\n\t/** Whether the serving source already publishes a stream track of this name. */\n\tpublishesTrack(name: string): boolean {\n\t\treturn this.#source?.wire.publishesTrack(name) ?? false;\n\t}\n\n\t/** Join the serving source's live datagram track; it holds no cached route copies. */\n\tdatagrams(name: string): import(\"./datagram.ts\").Consumer {\n\t\tif (!this.#source) throw new NotFound(`datagram track ${name}`);\n\t\treturn this.#source.wire.datagrams(name);\n\t}\n\n\t/** Join an already present datagram track without opening a request. */\n\tliveDatagrams(name: string): import(\"./datagram.ts\").Consumer | undefined {\n\t\treturn this.#source?.wire.liveDatagrams(name);\n\t}\n\n\t// Wait for the source to change, or `signal` to abort.\n\t#next(signal?: AbortSignal): Promise<void> {\n\t\treturn until(Signal.race(this.#changed), signal);\n\t}\n\n\tasync resolveTrackInfo(name: string, hold?: AbortSignal): Promise<track.Info> {\n\t\tfor (;;) {\n\t\t\tconst source = this.#source;\n\t\t\tif (!source) {\n\t\t\t\tif (this.#concluded) throw dropped();\n\t\t\t\tawait this.#next(hold);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tsource.retain();\n\t\t\tconst retired = this.#retire.signal;\n\t\t\tlet info: track.Info;\n\t\t\ttry {\n\t\t\t\tawait this.#askServed(name, source, retired);\n\t\t\t\tinfo = await ask(source, name, retired, hold);\n\t\t\t} catch (err) {\n\t\t\t\t// Another route took over before this one answered: ask it instead.\n\t\t\t\tif (retired.aborted && !hold?.aborted && !this.#concluded) continue;\n\t\t\t\tconst error = err instanceof Error ? err : new Error(String(err));\n\t\t\t\t// The route failed: ask the next one, unless none will come.\n\t\t\t\tif (!routeFailed(error) || this.#concluded || hold?.aborted) throw error;\n\t\t\t\tif (this.#source === source) await this.#next(hold);\n\t\t\t\tcontinue;\n\t\t\t} finally {\n\t\t\t\tsource.release();\n\t\t\t}\n\t\t\tconst recorded = this.#info.get(name);\n\t\t\t// One logical track has one set of properties, whichever route answers.\n\t\t\tif (recorded && !compatible(recorded.info, info)) throw new Incompatible(name);\n\t\t\tthis.#record(name, info, source);\n\t\t\treturn recorded?.info ?? info;\n\t\t}\n\t}\n\n\tlargest(name: string, meta = false, timescale?: Timescale): track.Position | undefined {\n\t\tconst source = this.#source;\n\t\treturn source && (meta ? source.meta : source.wire).largest(name, timescale);\n\t}\n\n\tasync fetchGroup(\n\t\tname: string,\n\t\tkey: bigint,\n\t\toptions?: track.FetchGroupOptions,\n\t\tmeta = false,\n\t): Promise<GroupConsumer> {\n\t\tconst target = { name, meta };\n\t\tconst fetched = await this.#fetch(target, key, options);\n\t\tlet current = fetched.source;\n\t\t// A group fetched over a wire carries no expiry of its own, unlike one a local track\n\t\t// answers: the publisher's max age judges it against a copy of the route it came from.\n\t\tconst judge = new FetchExpiry(() => this.#copyOn(target, current), this.#copied, key);\n\t\tconst expiry = (group: GroupConsumer) => hooks.groupExpiry(group) ?? judge;\n\t\tif (!hooks.groupExpiry(fetched.group)) hooks.expireGroup(fetched.group, judge);\n\t\t// Too old and evicted judge a subscription's delivery, not whether the group exists, so\n\t\t// neither is a verdict on a fetch: one answered from a group still arriving over a\n\t\t// subscription asks the route again for the rest when that delivery gives up on it.\n\t\tconst undelivered = (failed: Error) =>\n\t\t\trouteFailed(failed) ||\n\t\t\t(failed instanceof StreamError && (failed.code === StreamCode.Old || failed.code === StreamCode.Evicted));\n\t\t// Carried across route changes like a subscribed group, but by fetching again: a fetch has\n\t\t// no copy of its own to find the rest in.\n\t\thooks.recoverGroup(fetched.group, {\n\t\t\tchanged: this.#changed,\n\t\t\twants: (cause) => {\n\t\t\t\tif (cause.kind === \"failed\" && undelivered(cause.error)) return true;\n\t\t\t\treturn this.#source !== undefined && this.#source !== current;\n\t\t\t},\n\t\t\treplace: async (_index, cause, signal) => {\n\t\t\t\t// A fetch that failed delivering may ask its own route again; a stalled or closed one,\n\t\t\t\t// one a verdict ended, or one whose route withdrew only moves to another. A withdrawal\n\t\t\t\t// keeps its cause once none will come.\n\t\t\t\tconst failed = cause.kind === \"failed\" ? cause.error : undefined;\n\t\t\t\tconst withdrawn = failed && unroutable(failed) ? failed : undefined;\n\t\t\t\tconst avoid = failed && undelivered(failed) && !withdrawn ? undefined : current;\n\t\t\t\tconst next = await this.#fetch(target, key, { ...options, signal }, avoid, withdrawn);\n\t\t\t\t// The fetch's hold on its route passes to the group on adoption, or goes with the discard.\n\t\t\t\treturn {\n\t\t\t\t\tgroup: next.group,\n\t\t\t\t\texpiry: expiry(next.group),\n\t\t\t\t\tadopt: () => {\n\t\t\t\t\t\tcurrent.release();\n\t\t\t\t\t\tcurrent = next.source;\n\t\t\t\t\t\tjudge.moved();\n\t\t\t\t\t\t// Its fetch may hold its subscription until its reader lets go, and the\n\t\t\t\t\t\t// reader is now `fetched.group`.\n\t\t\t\t\t\tvoid hooks.groupReleased(fetched.group).then(() => next.group.close());\n\t\t\t\t\t},\n\t\t\t\t\tdiscard: () => {\n\t\t\t\t\t\tnext.group.close();\n\t\t\t\t\t\tnext.source.release();\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t},\n\t\t});\n\t\t// Only once the group carries its recovery: reading `closed` or `done` before then would\n\t\t// settle it on a failure recovery could still continue, releasing the route, or ending\n\t\t// the budget's watch, while it is read.\n\t\tvoid hooks.groupClosed(fetched.group).then(() => current.release());\n\t\t// The budget is watched for as long as the group is read, as the fetch's own subscription is.\n\t\tvoid hooks.groupDone(fetched.group).then(() => judge.close());\n\t\treturn fetched.group;\n\t}\n\n\t// The newest open copy of `target` a reader holds of `source`'s broadcast, if any.\n\t#copyOn(target: TrackKey, source: Source): Copy | undefined {\n\t\tconst routes = target.meta ? this.#metaRoutes : this.#routes;\n\t\tfor (const reader of routes.get(target.name)?.readers ?? []) {\n\t\t\tconst copy = reader.copyOn(source);\n\t\t\tif (copy) return copy;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\t// Fetch a group from whichever route serves the track, asking the next one when a route\n\t// fails, and never `avoid`. The source comes back retained for as long as the group is read.\n\t// Once no route will come, it ends with `ended`, or as not found.\n\tasync #fetch(\n\t\ttarget: TrackKey,\n\t\tkey: bigint,\n\t\toptions: track.FetchGroupOptions | undefined,\n\t\tavoid?: Source,\n\t\tended?: Error,\n\t): Promise<{ group: GroupConsumer; source: Source }> {\n\t\tconst { name, meta } = target;\n\t\tfor (;;) {\n\t\t\tconst source = this.#source;\n\t\t\tif (!source || source === avoid) {\n\t\t\t\tif (this.#concluded) throw ended ?? new NotFound(`group ${key}`);\n\t\t\t\tawait this.#next(options?.signal);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tsource.retain();\n\t\t\t// Abandoned once another route takes over, and asked of that one instead.\n\t\t\tconst retired = this.#retire.signal;\n\t\t\tconst signal = options?.signal ? AbortSignal.any([options.signal, retired]) : retired;\n\t\t\tlet refusal: Error | undefined;\n\t\t\ttry {\n\t\t\t\t// Asked alongside the check that the source claims the track's recorded properties,\n\t\t\t\t// rather than a round trip after it: only handing the group out waits for the check.\n\t\t\t\tconst fetchGroup = (meta ? source.meta : source.wire).fetchGroup;\n\t\t\t\tconst ahead = new AbortController();\n\t\t\t\tlet reported: Error | undefined;\n\t\t\t\tconst request: track.FetchGroupOptions & broadcast.FetchFrom = {\n\t\t\t\t\t...options,\n\t\t\t\t\tsignal: AbortSignal.any([signal, ahead.signal]),\n\t\t\t\t\trefused: (error) => {\n\t\t\t\t\t\treported = error;\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\tconst fetching = fetchGroup?.(name, key, request);\n\t\t\t\tfetching?.catch(() => {});\n\t\t\t\ttry {\n\t\t\t\t\tawait until(this.#verify(name, source), signal);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tahead.abort(err);\n\t\t\t\t\tvoid fetching?.then(\n\t\t\t\t\t\t(group) => group.close(),\n\t\t\t\t\t\t() => {},\n\t\t\t\t\t);\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t\tif (!fetching) throw new Error(\"fetch group is not supported by this session's version\");\n\t\t\t\tconst group = await fetching.catch((error) => {\n\t\t\t\t\t// An independent failure while verifying the track may arrive first.\n\t\t\t\t\trefusal = reported;\n\t\t\t\t\tthrow error;\n\t\t\t\t});\n\t\t\t\t// A copy that already failed continues nothing: that is the route failing again.\n\t\t\t\tconst failed = group.closed.peek();\n\t\t\t\tif (failed instanceof Error) {\n\t\t\t\t\tgroup.close();\n\t\t\t\t\tthrow failed;\n\t\t\t\t}\n\t\t\t\treturn { group, source };\n\t\t\t} catch (err) {\n\t\t\t\tsource.release();\n\t\t\t\tif (retired.aborted && !options?.signal?.aborted && !this.#concluded) continue;\n\t\t\t\tif (refusal) {\n\t\t\t\t\t(options as broadcast.FetchFrom | undefined)?.refused?.(refusal);\n\t\t\t\t\tthrow refusal;\n\t\t\t\t}\n\t\t\t\tconst error = err instanceof Error ? err : new Error(String(err));\n\t\t\t\t// The route failed: ask the next one, unless none will come.\n\t\t\t\tif (!routeFailed(error) || this.#concluded || options?.signal?.aborted) throw error;\n\t\t\t\tif (this.#source === source) await this.#next(options?.signal);\n\t\t\t}\n\t\t}\n\t}\n}\n\nlet makeFrontConsumer: (front: Front) => FrontConsumer;\n\n/** A front's logical broadcast: a consumer handle whose tracks follow the front's route. */\nclass FrontConsumer extends broadcast.Consumer {\n\t#front: Front;\n\n\tprivate constructor(front: Front, state?: never) {\n\t\tsuper(state);\n\t\tthis.#front = front;\n\t\tconst view = wireOf(this);\n\t\tconst routed: BroadcastWire = {\n\t\t\t...view,\n\t\t\tdatagrams: (name) => front.datagrams(name),\n\t\t\tliveDatagrams: (name) => front.liveDatagrams(name),\n\t\t\tpublishesTrack: (name) => front.publishesTrack(name),\n\t\t\ttracks: view.tracks,\n\t\t\tlister: view.lister,\n\t\t\tsubscribe: (name, options) => front.subscribe(name, options),\n\t\t\tresolveTrackInfo: (name, hold) => front.resolveTrackInfo(name, hold),\n\t\t\tlargest: (name, timescale) => front.largest(name, false, timescale),\n\t\t\tfetchGroup: (name, key, options) => front.fetchGroup(name, key, options),\n\t\t};\n\t\t// Each route's source decides which copy a metadata reader gets; the front keeps the two\n\t\t// apart either way. Both copies claim the same properties, so info is asked once.\n\t\tconst meta: BroadcastWire = {\n\t\t\t...routed,\n\t\t\tsubscribe: (name, options) => front.subscribe(name, options, true),\n\t\t\tlargest: (name) => front.largest(name, true),\n\t\t\tfetchGroup: (name, key, options) => front.fetchGroup(name, key, options, true),\n\t\t};\n\t\t// Read from the serving source when asked, since the route may change and none serves yet.\n\t\tconst serving = (wire: BroadcastWire): BroadcastWire =>\n\t\t\tObject.defineProperties(wire, {\n\t\t\t\tlocalDatagrams: { get: () => front.localDatagrams, enumerable: true },\n\t\t\t\tdistinguishesKinds: { get: () => front.distinguishesKinds, enumerable: true },\n\t\t\t});\n\t\tserving(meta);\n\t\tregisterWire(this, serving({ ...routed, meta: () => meta }));\n\t}\n\n\tstatic {\n\t\tmakeFrontConsumer = (front) => new FrontConsumer(front);\n\t}\n\n\t// Preserve the subclass, and the front behind it, when a handle is shared.\n\toverride clone(): FrontConsumer {\n\t\treturn new FrontConsumer(this.#front, this.shareState());\n\t}\n}\n\n/** The runs of `held` inside `[start, end)`. */\nfunction runsIn(held: Delivered, start: bigint, end: bigint): Run[] {\n\tconst runs: Run[] = [];\n\tlet at = start;\n\tfor (const gap of held.gaps(start, end)) {\n\t\tif (gap.start > at) runs.push({ start: at, end: gap.start });\n\t\tat = gap.end;\n\t}\n\tif (at < end) runs.push({ start: at, end });\n\treturn runs;\n}\n\n/**\n * Whether `copy` is of `serving`'s route, did not fail, and was asked for group `key`. Mirrors the\n * Rust `Copy::asked_for`.\n */\nfunction copyAskedFor(copy: Copy, serving: Copy, key: bigint): boolean {\n\treturn (\n\t\t!(copy.done instanceof Error) &&\n\t\tcopy.source.from.closed === serving.source.from.closed &&\n\t\t(copy.floor ?? 0n) <= key &&\n\t\tkey < (copyEnd(copy) ?? UNBOUNDED)\n\t);\n}\n\n/** The parts of `[start, end)` under `copy`'s bound that its publisher skipped. */\nfunction copySkips(copy: Copy, start: bigint, end: bigint): Run[] {\n\tconst bound = copyEnd(copy);\n\tconst to = bound === undefined ? end : min(end, bound);\n\treturn start < to ? hooks.skippedIn(copy.sub, start, to) : [];\n}\n"]}
|