effect 2.0.0-next.37 → 2.0.0-next.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1696) hide show
  1. package/Bigint/dist/effect-Bigint.cjs.dev.js +5 -5
  2. package/Bigint/dist/effect-Bigint.cjs.prod.js +5 -5
  3. package/Bigint/dist/effect-Bigint.esm.js +346 -5
  4. package/Boolean/dist/effect-Boolean.cjs.dev.js +5 -5
  5. package/Boolean/dist/effect-Boolean.cjs.prod.js +5 -5
  6. package/Boolean/dist/effect-Boolean.esm.js +230 -5
  7. package/Brand/dist/effect-Brand.cjs.dev.js +20 -20
  8. package/Brand/dist/effect-Brand.cjs.prod.js +20 -20
  9. package/Brand/dist/effect-Brand.esm.js +204 -20
  10. package/Cache/dist/effect-Cache.cjs.dev.js +72 -72
  11. package/Cache/dist/effect-Cache.cjs.prod.js +72 -72
  12. package/Cache/dist/effect-Cache.esm.js +111 -74
  13. package/Cause/dist/effect-Cause.cjs.dev.js +32 -32
  14. package/Cause/dist/effect-Cause.cjs.prod.js +32 -32
  15. package/Cause/dist/effect-Cause.esm.js +668 -33
  16. package/Channel/dist/effect-Channel.cjs.dev.js +105 -105
  17. package/Channel/dist/effect-Channel.cjs.prod.js +105 -105
  18. package/Channel/dist/effect-Channel.esm.js +1001 -107
  19. package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.dev.js +3 -3
  20. package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.prod.js +3 -3
  21. package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.esm.js +112 -3
  22. package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.dev.js +3 -3
  23. package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.prod.js +3 -3
  24. package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.esm.js +60 -3
  25. package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.dev.js +3 -3
  26. package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.prod.js +3 -3
  27. package/ChannelMergeState/dist/effect-ChannelMergeState.esm.js +101 -3
  28. package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.dev.js +3 -3
  29. package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.prod.js +3 -3
  30. package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.esm.js +84 -3
  31. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +89 -89
  32. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +89 -89
  33. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.esm.js +47 -91
  34. package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.dev.js +3 -3
  35. package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.prod.js +3 -3
  36. package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.esm.js +84 -3
  37. package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.dev.js +3 -3
  38. package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.prod.js +3 -3
  39. package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.esm.js +83 -3
  40. package/Chunk/dist/effect-Chunk.cjs.dev.js +20 -20
  41. package/Chunk/dist/effect-Chunk.cjs.prod.js +20 -20
  42. package/Chunk/dist/effect-Chunk.esm.js +1084 -20
  43. package/Clock/dist/effect-Clock.cjs.dev.js +40 -40
  44. package/Clock/dist/effect-Clock.cjs.prod.js +40 -40
  45. package/Clock/dist/effect-Clock.esm.js +78 -42
  46. package/Config/dist/effect-Config.cjs.dev.js +36 -36
  47. package/Config/dist/effect-Config.cjs.prod.js +36 -36
  48. package/Config/dist/effect-Config.esm.js +321 -37
  49. package/ConfigError/dist/effect-ConfigError.cjs.dev.js +21 -21
  50. package/ConfigError/dist/effect-ConfigError.cjs.prod.js +21 -21
  51. package/ConfigError/dist/effect-ConfigError.esm.js +185 -21
  52. package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +38 -38
  53. package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +38 -38
  54. package/ConfigProvider/dist/effect-ConfigProvider.esm.js +198 -39
  55. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +24 -24
  56. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +24 -24
  57. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.esm.js +70 -24
  58. package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +22 -22
  59. package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +22 -22
  60. package/ConfigSecret/dist/effect-ConfigSecret.esm.js +63 -22
  61. package/Console/dist/effect-Console.cjs.dev.js +81 -81
  62. package/Console/dist/effect-Console.cjs.prod.js +81 -81
  63. package/Console/dist/effect-Console.esm.js +154 -83
  64. package/Context/dist/effect-Context.cjs.dev.js +17 -17
  65. package/Context/dist/effect-Context.cjs.prod.js +17 -17
  66. package/Context/dist/effect-Context.esm.js +295 -17
  67. package/Data/dist/effect-Data.cjs.dev.js +7 -7
  68. package/Data/dist/effect-Data.cjs.prod.js +7 -7
  69. package/Data/dist/effect-Data.esm.js +163 -7
  70. package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +40 -40
  71. package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +40 -40
  72. package/DefaultServices/dist/effect-DefaultServices.esm.js +24 -42
  73. package/Deferred/dist/effect-Deferred.cjs.dev.js +32 -32
  74. package/Deferred/dist/effect-Deferred.cjs.prod.js +32 -32
  75. package/Deferred/dist/effect-Deferred.esm.js +206 -33
  76. package/Differ/dist/effect-Differ.cjs.dev.js +25 -25
  77. package/Differ/dist/effect-Differ.cjs.prod.js +25 -25
  78. package/Differ/dist/effect-Differ.esm.js +137 -26
  79. package/Duration/dist/effect-Duration.cjs.dev.js +17 -16
  80. package/Duration/dist/effect-Duration.cjs.mjs +1 -0
  81. package/Duration/dist/effect-Duration.cjs.prod.js +17 -16
  82. package/Duration/dist/effect-Duration.esm.js +438 -16
  83. package/Effect/dist/effect-Effect.cjs.dev.js +87 -87
  84. package/Effect/dist/effect-Effect.cjs.prod.js +87 -87
  85. package/Effect/dist/effect-Effect.esm.js +3093 -89
  86. package/Effectable/dist/effect-Effectable.cjs.dev.js +10 -10
  87. package/Effectable/dist/effect-Effectable.cjs.prod.js +10 -10
  88. package/Effectable/dist/effect-Effectable.esm.js +77 -10
  89. package/Either/dist/effect-Either.cjs.dev.js +13 -13
  90. package/Either/dist/effect-Either.cjs.prod.js +13 -13
  91. package/Either/dist/effect-Either.esm.js +442 -13
  92. package/Encoding/dist/effect-Encoding.cjs.dev.js +14 -14
  93. package/Encoding/dist/effect-Encoding.cjs.prod.js +14 -14
  94. package/Encoding/dist/effect-Encoding.esm.js +123 -14
  95. package/Equal/dist/effect-Equal.cjs.dev.js +6 -6
  96. package/Equal/dist/effect-Equal.cjs.prod.js +6 -6
  97. package/Equal/dist/effect-Equal.esm.js +57 -6
  98. package/Equivalence/dist/effect-Equivalence.cjs.dev.js +2 -2
  99. package/Equivalence/dist/effect-Equivalence.cjs.prod.js +2 -2
  100. package/Equivalence/dist/effect-Equivalence.esm.js +196 -2
  101. package/Error/dist/effect-Error.cjs.dev.js +89 -89
  102. package/Error/dist/effect-Error.cjs.prod.js +89 -89
  103. package/Error/dist/effect-Error.esm.js +47 -91
  104. package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.dev.js +2 -2
  105. package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.prod.js +2 -2
  106. package/ExecutionStrategy/dist/effect-ExecutionStrategy.esm.js +99 -2
  107. package/Exit/dist/effect-Exit.cjs.dev.js +32 -32
  108. package/Exit/dist/effect-Exit.cjs.prod.js +32 -32
  109. package/Exit/dist/effect-Exit.esm.js +332 -33
  110. package/Fiber/dist/effect-Fiber.cjs.dev.js +75 -75
  111. package/Fiber/dist/effect-Fiber.cjs.prod.js +75 -75
  112. package/Fiber/dist/effect-Fiber.esm.js +423 -77
  113. package/FiberId/dist/effect-FiberId.cjs.dev.js +19 -19
  114. package/FiberId/dist/effect-FiberId.cjs.prod.js +19 -19
  115. package/FiberId/dist/effect-FiberId.esm.js +161 -20
  116. package/FiberRef/dist/effect-FiberRef.cjs.dev.js +73 -73
  117. package/FiberRef/dist/effect-FiberRef.cjs.prod.js +73 -73
  118. package/FiberRef/dist/effect-FiberRef.esm.js +289 -75
  119. package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +33 -33
  120. package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +33 -33
  121. package/FiberRefs/dist/effect-FiberRefs.esm.js +107 -34
  122. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +34 -34
  123. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +34 -34
  124. package/FiberRefsPatch/dist/effect-FiberRefsPatch.esm.js +76 -35
  125. package/FiberStatus/dist/effect-FiberStatus.cjs.dev.js +7 -7
  126. package/FiberStatus/dist/effect-FiberStatus.cjs.prod.js +7 -7
  127. package/FiberStatus/dist/effect-FiberStatus.esm.js +89 -7
  128. package/Function/dist/effect-Function.cjs.dev.js +1 -1
  129. package/Function/dist/effect-Function.cjs.prod.js +1 -1
  130. package/Function/dist/effect-Function.esm.js +492 -1
  131. package/GlobalValue/dist/effect-GlobalValue.cjs.dev.js +1 -1
  132. package/GlobalValue/dist/effect-GlobalValue.cjs.prod.js +1 -1
  133. package/GlobalValue/dist/effect-GlobalValue.esm.js +20 -1
  134. package/GroupBy/dist/effect-GroupBy.cjs.dev.js +106 -106
  135. package/GroupBy/dist/effect-GroupBy.cjs.prod.js +106 -106
  136. package/GroupBy/dist/effect-GroupBy.esm.js +63 -108
  137. package/Hash/dist/effect-Hash.cjs.dev.js +5 -5
  138. package/Hash/dist/effect-Hash.cjs.prod.js +5 -5
  139. package/Hash/dist/effect-Hash.esm.js +164 -5
  140. package/HashMap/dist/effect-HashMap.cjs.dev.js +17 -17
  141. package/HashMap/dist/effect-HashMap.cjs.prod.js +17 -17
  142. package/HashMap/dist/effect-HashMap.esm.js +287 -18
  143. package/HashSet/dist/effect-HashSet.cjs.dev.js +17 -17
  144. package/HashSet/dist/effect-HashSet.cjs.prod.js +17 -17
  145. package/HashSet/dist/effect-HashSet.esm.js +227 -18
  146. package/Hub/dist/effect-Hub.cjs.dev.js +72 -72
  147. package/Hub/dist/effect-Hub.cjs.prod.js +72 -72
  148. package/Hub/dist/effect-Hub.esm.js +148 -74
  149. package/Inspectable/dist/effect-Inspectable.cjs.dev.js +1 -1
  150. package/Inspectable/dist/effect-Inspectable.cjs.prod.js +1 -1
  151. package/Inspectable/dist/effect-Inspectable.esm.js +38 -1
  152. package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +73 -73
  153. package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +73 -73
  154. package/KeyedPool/dist/effect-KeyedPool.esm.js +104 -75
  155. package/Layer/dist/effect-Layer.cjs.dev.js +81 -81
  156. package/Layer/dist/effect-Layer.cjs.prod.js +81 -81
  157. package/Layer/dist/effect-Layer.esm.js +557 -83
  158. package/List/dist/effect-List.cjs.dev.js +21 -21
  159. package/List/dist/effect-List.cjs.prod.js +21 -21
  160. package/List/dist/effect-List.esm.js +816 -21
  161. package/LogLevel/dist/effect-LogLevel.cjs.dev.js +32 -32
  162. package/LogLevel/dist/effect-LogLevel.cjs.prod.js +32 -32
  163. package/LogLevel/dist/effect-LogLevel.esm.js +202 -33
  164. package/LogSpan/dist/effect-LogSpan.cjs.dev.js +1 -1
  165. package/LogSpan/dist/effect-LogSpan.cjs.prod.js +1 -1
  166. package/LogSpan/dist/effect-LogSpan.esm.js +24 -1
  167. package/Logger/dist/effect-Logger.cjs.dev.js +83 -83
  168. package/Logger/dist/effect-Logger.cjs.prod.js +83 -83
  169. package/Logger/dist/effect-Logger.esm.js +198 -85
  170. package/Metric/dist/effect-Metric.cjs.dev.js +69 -69
  171. package/Metric/dist/effect-Metric.cjs.prod.js +69 -69
  172. package/Metric/dist/effect-Metric.esm.js +395 -71
  173. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +22 -22
  174. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +22 -22
  175. package/MetricBoundaries/dist/effect-MetricBoundaries.esm.js +52 -22
  176. package/MetricHook/dist/effect-MetricHook.cjs.dev.js +26 -26
  177. package/MetricHook/dist/effect-MetricHook.cjs.prod.js +26 -26
  178. package/MetricHook/dist/effect-MetricHook.esm.js +68 -27
  179. package/MetricKey/dist/effect-MetricKey.cjs.dev.js +22 -22
  180. package/MetricKey/dist/effect-MetricKey.cjs.prod.js +22 -22
  181. package/MetricKey/dist/effect-MetricKey.esm.js +104 -23
  182. package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +18 -18
  183. package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +18 -18
  184. package/MetricKeyType/dist/effect-MetricKeyType.esm.js +147 -18
  185. package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +9 -9
  186. package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +9 -9
  187. package/MetricLabel/dist/effect-MetricLabel.esm.js +41 -9
  188. package/MetricPair/dist/effect-MetricPair.cjs.dev.js +3 -3
  189. package/MetricPair/dist/effect-MetricPair.cjs.prod.js +3 -3
  190. package/MetricPair/dist/effect-MetricPair.esm.js +38 -3
  191. package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +75 -75
  192. package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +75 -75
  193. package/MetricPolling/dist/effect-MetricPolling.esm.js +84 -77
  194. package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +32 -32
  195. package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +32 -32
  196. package/MetricRegistry/dist/effect-MetricRegistry.esm.js +28 -33
  197. package/MetricState/dist/effect-MetricState.cjs.dev.js +9 -9
  198. package/MetricState/dist/effect-MetricState.cjs.prod.js +9 -9
  199. package/MetricState/dist/effect-MetricState.esm.js +151 -9
  200. package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +19 -19
  201. package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +19 -19
  202. package/MutableHashMap/dist/effect-MutableHashMap.esm.js +128 -20
  203. package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +20 -20
  204. package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +20 -20
  205. package/MutableHashSet/dist/effect-MutableHashSet.esm.js +90 -21
  206. package/MutableList/dist/effect-MutableList.cjs.dev.js +4 -4
  207. package/MutableList/dist/effect-MutableList.cjs.prod.js +4 -4
  208. package/MutableList/dist/effect-MutableList.esm.js +264 -4
  209. package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +22 -22
  210. package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +22 -22
  211. package/MutableQueue/dist/effect-MutableQueue.esm.js +187 -22
  212. package/MutableRef/dist/effect-MutableRef.cjs.dev.js +9 -9
  213. package/MutableRef/dist/effect-MutableRef.cjs.prod.js +9 -9
  214. package/MutableRef/dist/effect-MutableRef.esm.js +156 -9
  215. package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.dev.js +1 -1
  216. package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.prod.js +1 -1
  217. package/NonEmptyIterable/dist/effect-NonEmptyIterable.esm.js +28 -1
  218. package/Number/dist/effect-Number.cjs.dev.js +5 -5
  219. package/Number/dist/effect-Number.cjs.prod.js +5 -5
  220. package/Number/dist/effect-Number.esm.js +369 -5
  221. package/Option/dist/effect-Option.cjs.dev.js +15 -15
  222. package/Option/dist/effect-Option.cjs.prod.js +15 -15
  223. package/Option/dist/effect-Option.esm.js +1071 -15
  224. package/Order/dist/effect-Order.cjs.dev.js +2 -2
  225. package/Order/dist/effect-Order.cjs.prod.js +2 -2
  226. package/Order/dist/effect-Order.esm.js +263 -2
  227. package/Ordering/dist/effect-Ordering.cjs.dev.js +2 -2
  228. package/Ordering/dist/effect-Ordering.cjs.prod.js +2 -2
  229. package/Ordering/dist/effect-Ordering.esm.js +88 -2
  230. package/Pipeable/dist/effect-Pipeable.cjs.dev.js +1 -1
  231. package/Pipeable/dist/effect-Pipeable.cjs.prod.js +1 -1
  232. package/Pipeable/dist/effect-Pipeable.esm.js +44 -1
  233. package/Pool/dist/effect-Pool.cjs.dev.js +73 -73
  234. package/Pool/dist/effect-Pool.cjs.prod.js +73 -73
  235. package/Pool/dist/effect-Pool.esm.js +104 -75
  236. package/Predicate/dist/effect-Predicate.cjs.dev.js +2 -2
  237. package/Predicate/dist/effect-Predicate.cjs.prod.js +2 -2
  238. package/Predicate/dist/effect-Predicate.esm.js +634 -2
  239. package/Queue/dist/effect-Queue.cjs.dev.js +72 -72
  240. package/Queue/dist/effect-Queue.cjs.prod.js +72 -72
  241. package/Queue/dist/effect-Queue.esm.js +328 -74
  242. package/Random/dist/effect-Random.cjs.dev.js +40 -40
  243. package/Random/dist/effect-Random.cjs.prod.js +40 -40
  244. package/Random/dist/effect-Random.esm.js +83 -42
  245. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +19 -19
  246. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +19 -19
  247. package/ReadonlyArray/dist/effect-ReadonlyArray.esm.js +1445 -19
  248. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +17 -17
  249. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +17 -17
  250. package/ReadonlyRecord/dist/effect-ReadonlyRecord.esm.js +518 -17
  251. package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +21 -21
  252. package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +21 -21
  253. package/RedBlackTree/dist/effect-RedBlackTree.esm.js +314 -22
  254. package/Ref/dist/effect-Ref.cjs.dev.js +32 -32
  255. package/Ref/dist/effect-Ref.cjs.prod.js +32 -32
  256. package/Ref/dist/effect-Ref.esm.js +111 -33
  257. package/Reloadable/dist/effect-Reloadable.cjs.dev.js +82 -82
  258. package/Reloadable/dist/effect-Reloadable.cjs.prod.js +82 -82
  259. package/Reloadable/dist/effect-Reloadable.esm.js +88 -84
  260. package/Request/dist/effect-Request.cjs.dev.js +72 -72
  261. package/Request/dist/effect-Request.cjs.prod.js +72 -72
  262. package/Request/dist/effect-Request.esm.js +160 -74
  263. package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +89 -89
  264. package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +89 -89
  265. package/RequestBlock/dist/effect-RequestBlock.esm.js +103 -91
  266. package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +89 -89
  267. package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +89 -89
  268. package/RequestResolver/dist/effect-RequestResolver.esm.js +191 -91
  269. package/Resource/dist/effect-Resource.cjs.dev.js +77 -77
  270. package/Resource/dist/effect-Resource.cjs.prod.js +77 -77
  271. package/Resource/dist/effect-Resource.esm.js +70 -79
  272. package/Runtime/dist/effect-Runtime.cjs.dev.js +77 -77
  273. package/Runtime/dist/effect-Runtime.cjs.prod.js +77 -77
  274. package/Runtime/dist/effect-Runtime.esm.js +157 -79
  275. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +83 -83
  276. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +83 -83
  277. package/RuntimeFlags/dist/effect-RuntimeFlags.esm.js +305 -85
  278. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +26 -26
  279. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +26 -26
  280. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.esm.js +158 -27
  281. package/STM/dist/effect-STM.cjs.dev.js +110 -110
  282. package/STM/dist/effect-STM.cjs.prod.js +110 -110
  283. package/STM/dist/effect-STM.esm.js +1193 -112
  284. package/Schedule/dist/effect-Schedule.cjs.dev.js +55 -55
  285. package/Schedule/dist/effect-Schedule.cjs.prod.js +55 -55
  286. package/Schedule/dist/effect-Schedule.esm.js +957 -57
  287. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +24 -24
  288. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +24 -24
  289. package/ScheduleDecision/dist/effect-ScheduleDecision.esm.js +48 -24
  290. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +17 -17
  291. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +17 -17
  292. package/ScheduleInterval/dist/effect-ScheduleInterval.esm.js +130 -17
  293. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +23 -23
  294. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +23 -23
  295. package/ScheduleIntervals/dist/effect-ScheduleIntervals.esm.js +105 -23
  296. package/Scheduler/dist/effect-Scheduler.cjs.dev.js +32 -32
  297. package/Scheduler/dist/effect-Scheduler.cjs.prod.js +32 -32
  298. package/Scheduler/dist/effect-Scheduler.esm.js +326 -34
  299. package/Scope/dist/effect-Scope.cjs.dev.js +69 -69
  300. package/Scope/dist/effect-Scope.cjs.prod.js +69 -69
  301. package/Scope/dist/effect-Scope.esm.js +117 -71
  302. package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +73 -73
  303. package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +73 -73
  304. package/ScopedCache/dist/effect-ScopedCache.esm.js +52 -75
  305. package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +77 -77
  306. package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +77 -77
  307. package/ScopedRef/dist/effect-ScopedRef.esm.js +71 -79
  308. package/Sink/dist/effect-Sink.cjs.dev.js +99 -99
  309. package/Sink/dist/effect-Sink.cjs.prod.js +99 -99
  310. package/Sink/dist/effect-Sink.esm.js +997 -101
  311. package/SortedMap/dist/effect-SortedMap.cjs.dev.js +22 -22
  312. package/SortedMap/dist/effect-SortedMap.cjs.prod.js +22 -22
  313. package/SortedMap/dist/effect-SortedMap.esm.js +168 -23
  314. package/SortedSet/dist/effect-SortedSet.cjs.dev.js +22 -22
  315. package/SortedSet/dist/effect-SortedSet.cjs.prod.js +22 -22
  316. package/SortedSet/dist/effect-SortedSet.esm.js +263 -23
  317. package/Stream/dist/effect-Stream.cjs.dev.js +106 -106
  318. package/Stream/dist/effect-Stream.cjs.prod.js +106 -106
  319. package/Stream/dist/effect-Stream.esm.js +2879 -108
  320. package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.dev.js +2 -2
  321. package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.prod.js +2 -2
  322. package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.esm.js +97 -2
  323. package/String/dist/effect-String.cjs.dev.js +17 -17
  324. package/String/dist/effect-String.cjs.prod.js +17 -17
  325. package/String/dist/effect-String.esm.js +600 -17
  326. package/Struct/dist/effect-Struct.cjs.dev.js +4 -4
  327. package/Struct/dist/effect-Struct.cjs.prod.js +4 -4
  328. package/Struct/dist/effect-Struct.esm.js +125 -4
  329. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +106 -106
  330. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +106 -106
  331. package/SubscriptionRef/dist/effect-SubscriptionRef.esm.js +160 -108
  332. package/Supervisor/dist/effect-Supervisor.cjs.dev.js +83 -83
  333. package/Supervisor/dist/effect-Supervisor.cjs.prod.js +83 -83
  334. package/Supervisor/dist/effect-Supervisor.esm.js +148 -85
  335. package/Symbol/dist/effect-Symbol.cjs.dev.js +4 -4
  336. package/Symbol/dist/effect-Symbol.cjs.prod.js +4 -4
  337. package/Symbol/dist/effect-Symbol.esm.js +30 -4
  338. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +76 -76
  339. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +76 -76
  340. package/SynchronizedRef/dist/effect-SynchronizedRef.esm.js +160 -78
  341. package/TArray/dist/effect-TArray.cjs.dev.js +112 -112
  342. package/TArray/dist/effect-TArray.cjs.prod.js +112 -112
  343. package/TArray/dist/effect-TArray.esm.js +367 -114
  344. package/TDeferred/dist/effect-TDeferred.cjs.dev.js +111 -111
  345. package/TDeferred/dist/effect-TDeferred.cjs.prod.js +111 -111
  346. package/TDeferred/dist/effect-TDeferred.esm.js +63 -113
  347. package/THub/dist/effect-THub.cjs.dev.js +113 -113
  348. package/THub/dist/effect-THub.cjs.prod.js +113 -113
  349. package/THub/dist/effect-THub.esm.js +157 -115
  350. package/TMap/dist/effect-TMap.cjs.dev.js +114 -114
  351. package/TMap/dist/effect-TMap.cjs.prod.js +114 -114
  352. package/TMap/dist/effect-TMap.esm.js +373 -116
  353. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +111 -111
  354. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +111 -111
  355. package/TPriorityQueue/dist/effect-TPriorityQueue.esm.js +184 -113
  356. package/TQueue/dist/effect-TQueue.cjs.dev.js +113 -113
  357. package/TQueue/dist/effect-TQueue.cjs.prod.js +113 -113
  358. package/TQueue/dist/effect-TQueue.esm.js +293 -115
  359. package/TRandom/dist/effect-TRandom.cjs.dev.js +112 -112
  360. package/TRandom/dist/effect-TRandom.cjs.prod.js +112 -112
  361. package/TRandom/dist/effect-TRandom.esm.js +93 -114
  362. package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +110 -110
  363. package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +110 -110
  364. package/TReentrantLock/dist/effect-TReentrantLock.esm.js +199 -112
  365. package/TRef/dist/effect-TRef.cjs.dev.js +110 -110
  366. package/TRef/dist/effect-TRef.cjs.prod.js +110 -110
  367. package/TRef/dist/effect-TRef.esm.js +116 -112
  368. package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +112 -112
  369. package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +112 -112
  370. package/TSemaphore/dist/effect-TSemaphore.esm.js +97 -114
  371. package/TSet/dist/effect-TSet.cjs.dev.js +114 -114
  372. package/TSet/dist/effect-TSet.cjs.prod.js +114 -114
  373. package/TSet/dist/effect-TSet.esm.js +268 -116
  374. package/Take/dist/effect-Take.cjs.dev.js +89 -89
  375. package/Take/dist/effect-Take.cjs.prod.js +89 -89
  376. package/Take/dist/effect-Take.esm.js +190 -91
  377. package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +25 -25
  378. package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +25 -25
  379. package/TestAnnotation/dist/effect-TestAnnotation.esm.js +111 -26
  380. package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.dev.js +2 -2
  381. package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.prod.js +2 -2
  382. package/TestAnnotationMap/dist/effect-TestAnnotationMap.esm.js +101 -2
  383. package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +57 -57
  384. package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +57 -57
  385. package/TestAnnotations/dist/effect-TestAnnotations.esm.js +83 -59
  386. package/TestClock/dist/effect-TestClock.cjs.dev.js +85 -85
  387. package/TestClock/dist/effect-TestClock.cjs.prod.js +85 -85
  388. package/TestClock/dist/effect-TestClock.esm.js +411 -87
  389. package/TestConfig/dist/effect-TestConfig.cjs.dev.js +18 -18
  390. package/TestConfig/dist/effect-TestConfig.cjs.prod.js +18 -18
  391. package/TestConfig/dist/effect-TestConfig.esm.js +27 -18
  392. package/TestContext/dist/effect-TestContext.cjs.dev.js +96 -96
  393. package/TestContext/dist/effect-TestContext.cjs.prod.js +96 -96
  394. package/TestContext/dist/effect-TestContext.esm.js +29 -98
  395. package/TestLive/dist/effect-TestLive.cjs.dev.js +40 -40
  396. package/TestLive/dist/effect-TestLive.cjs.prod.js +40 -40
  397. package/TestLive/dist/effect-TestLive.esm.js +48 -42
  398. package/TestServices/dist/effect-TestServices.cjs.dev.js +94 -94
  399. package/TestServices/dist/effect-TestServices.cjs.prod.js +94 -94
  400. package/TestServices/dist/effect-TestServices.esm.js +269 -96
  401. package/TestSized/dist/effect-TestSized.cjs.dev.js +32 -32
  402. package/TestSized/dist/effect-TestSized.cjs.prod.js +32 -32
  403. package/TestSized/dist/effect-TestSized.esm.js +50 -33
  404. package/Tracer/dist/effect-Tracer.cjs.dev.js +40 -40
  405. package/Tracer/dist/effect-Tracer.cjs.prod.js +40 -40
  406. package/Tracer/dist/effect-Tracer.esm.js +68 -42
  407. package/Tuple/dist/effect-Tuple.cjs.dev.js +4 -4
  408. package/Tuple/dist/effect-Tuple.cjs.prod.js +4 -4
  409. package/Tuple/dist/effect-Tuple.esm.js +173 -4
  410. package/Unify/dist/effect-Unify.cjs.dev.js +2 -2
  411. package/Unify/dist/effect-Unify.cjs.prod.js +2 -2
  412. package/Unify/dist/effect-Unify.esm.js +40 -2
  413. package/Utils/dist/effect-Utils.cjs.dev.js +3 -3
  414. package/Utils/dist/effect-Utils.cjs.prod.js +3 -3
  415. package/Utils/dist/effect-Utils.esm.js +352 -3
  416. package/dist/Bigint-0ebd807c.cjs.dev.js +392 -0
  417. package/dist/Bigint-912c77f3.cjs.prod.js +392 -0
  418. package/dist/Boolean-97839b78.cjs.prod.js +264 -0
  419. package/dist/Boolean-f0bc3abf.cjs.dev.js +264 -0
  420. package/dist/Brand-93578f43.cjs.prod.js +224 -0
  421. package/dist/Brand-b238487d.cjs.dev.js +224 -0
  422. package/dist/Cache-1688e584.cjs.dev.js +127 -0
  423. package/dist/Cache-8f2f2b55.cjs.prod.js +127 -0
  424. package/dist/Cause-384e2165.cjs.prod.js +791 -0
  425. package/dist/Cause-96c29074.cjs.dev.js +791 -0
  426. package/dist/Channel-2ce019f1.cjs.prod.js +1217 -0
  427. package/dist/Channel-544108d2.cjs.dev.js +1217 -0
  428. package/dist/ChannelChildExecutorDecision-168278f6.cjs.prod.js +136 -0
  429. package/dist/ChannelChildExecutorDecision-b0e715de.cjs.dev.js +136 -0
  430. package/dist/ChannelMergeDecision-9c266aeb.cjs.prod.js +78 -0
  431. package/dist/ChannelMergeDecision-eeaf4779.cjs.dev.js +78 -0
  432. package/dist/ChannelMergeState-4366d090.cjs.prod.js +125 -0
  433. package/dist/ChannelMergeState-abce1d88.cjs.dev.js +125 -0
  434. package/dist/ChannelMergeStrategy-6193b8e0.cjs.prod.js +104 -0
  435. package/dist/ChannelMergeStrategy-e7ddbb7a.cjs.dev.js +104 -0
  436. package/dist/ChannelSingleProducerAsyncInput-62f4749c.cjs.dev.js +55 -0
  437. package/dist/ChannelSingleProducerAsyncInput-6e0084c3.cjs.prod.js +55 -0
  438. package/dist/ChannelUpstreamPullRequest-1ca7d2bd.cjs.dev.js +104 -0
  439. package/dist/ChannelUpstreamPullRequest-208751c3.cjs.prod.js +104 -0
  440. package/dist/ChannelUpstreamPullStrategy-266b5a77.cjs.prod.js +103 -0
  441. package/dist/ChannelUpstreamPullStrategy-ec57dc70.cjs.dev.js +103 -0
  442. package/dist/Chunk-6cf5a8e6.cjs.prod.js +1248 -0
  443. package/dist/Chunk-bd290b8e.cjs.dev.js +1248 -0
  444. package/dist/Clock-09ecce0a.cjs.prod.js +97 -0
  445. package/dist/Clock-bec722c1.cjs.dev.js +97 -0
  446. package/dist/Config-85ae6286.cjs.prod.js +393 -0
  447. package/dist/Config-dc58cf69.cjs.dev.js +393 -0
  448. package/dist/ConfigError-c1f762d2.cjs.dev.js +225 -0
  449. package/dist/ConfigError-cee682fa.cjs.prod.js +225 -0
  450. package/dist/ConfigProvider-8341a5f5.cjs.prod.js +240 -0
  451. package/dist/ConfigProvider-de45b085.cjs.dev.js +240 -0
  452. package/dist/ConfigProviderPathPatch-52422b32.cjs.prod.js +86 -0
  453. package/dist/ConfigProviderPathPatch-d22442e3.cjs.dev.js +86 -0
  454. package/dist/ConfigSecret-c76717e8.cjs.dev.js +83 -0
  455. package/dist/ConfigSecret-ebab2ae7.cjs.prod.js +83 -0
  456. package/dist/Console-150b7b40.cjs.prod.js +271 -0
  457. package/dist/Console-4825ee9f.cjs.dev.js +271 -0
  458. package/dist/Context-25a49952.cjs.prod.js +327 -0
  459. package/dist/Context-3c9e986b.cjs.dev.js +327 -0
  460. package/dist/Context-96739709.cjs.dev.js +222 -0
  461. package/dist/Context-f958cabc.cjs.prod.js +222 -0
  462. package/dist/Data-07dc27f1.cjs.prod.js +237 -0
  463. package/dist/Data-85559fb3.cjs.dev.js +237 -0
  464. package/dist/DefaultServices-d5740d37.cjs.dev.js +34 -0
  465. package/dist/DefaultServices-df7495bb.cjs.prod.js +34 -0
  466. package/dist/Deferred-5d5c886c.cjs.dev.js +253 -0
  467. package/dist/Deferred-9d825b3b.cjs.prod.js +253 -0
  468. package/dist/Differ-0122f60e.cjs.dev.js +992 -0
  469. package/dist/Differ-0bd34066.cjs.prod.js +992 -0
  470. package/dist/Duration-0bc08d03.cjs.prod.js +508 -0
  471. package/dist/Duration-604874d1.cjs.dev.js +508 -0
  472. package/dist/Effect-1442090f.cjs.prod.js +3740 -0
  473. package/dist/Effect-6e9780e6.cjs.dev.js +3740 -0
  474. package/dist/Effectable-04f3cd30.cjs.dev.js +99 -0
  475. package/dist/Effectable-8997112d.cjs.prod.js +99 -0
  476. package/dist/Effectable-a6403e5f.cjs.dev.js +181 -0
  477. package/dist/Effectable-f867d1cb.cjs.prod.js +181 -0
  478. package/dist/Either-3fab3796.cjs.prod.js +502 -0
  479. package/dist/Either-9c349424.cjs.dev.js +178 -0
  480. package/dist/Either-a806809d.cjs.dev.js +502 -0
  481. package/dist/Either-d03d5f05.cjs.prod.js +178 -0
  482. package/dist/Encoding-0cab52d5.cjs.prod.js +309 -0
  483. package/dist/Encoding-d993b1b0.cjs.dev.js +309 -0
  484. package/dist/Equal-281b6ca8.cjs.dev.js +71 -0
  485. package/dist/Equal-ce9977a8.cjs.prod.js +71 -0
  486. package/dist/Equivalence-0bc84518.cjs.prod.js +238 -0
  487. package/dist/Equivalence-de7a0d51.cjs.dev.js +238 -0
  488. package/dist/Error-5ab157f2.cjs.dev.js +57 -0
  489. package/dist/Error-e9d25c53.cjs.prod.js +57 -0
  490. package/dist/ExecutionStrategy-89fbe735.cjs.dev.js +180 -0
  491. package/dist/ExecutionStrategy-dc778180.cjs.prod.js +180 -0
  492. package/dist/Exit-5691142c.cjs.prod.js +408 -0
  493. package/dist/Exit-a23874e1.cjs.dev.js +408 -0
  494. package/dist/Fiber-6432d5f7.cjs.dev.js +521 -0
  495. package/dist/Fiber-e61b3c65.cjs.prod.js +521 -0
  496. package/dist/FiberId-929dcce4.cjs.dev.js +443 -0
  497. package/dist/FiberId-b79e8047.cjs.prod.js +443 -0
  498. package/dist/FiberRef-1db44a9b.cjs.dev.js +385 -0
  499. package/dist/FiberRef-efb4a3ac.cjs.prod.js +385 -0
  500. package/dist/FiberRefs-43bfd8b9.cjs.dev.js +135 -0
  501. package/dist/FiberRefs-4cb171f7.cjs.prod.js +135 -0
  502. package/dist/FiberRefsPatch-5236f61e.cjs.dev.js +90 -0
  503. package/dist/FiberRefsPatch-cb847553.cjs.prod.js +90 -0
  504. package/dist/FiberStatus-b82dad24.cjs.prod.js +197 -0
  505. package/dist/FiberStatus-bac7d58d.cjs.dev.js +197 -0
  506. package/dist/Function-2e6b0cda.cjs.prod.js +538 -0
  507. package/dist/Function-41ce433d.cjs.dev.js +538 -0
  508. package/dist/GlobalValue-81ab6908.cjs.dev.js +28 -0
  509. package/dist/GlobalValue-cb645c99.cjs.prod.js +28 -0
  510. package/dist/GroupBy-8a8149b4.cjs.dev.js +79 -0
  511. package/dist/GroupBy-b74084af.cjs.prod.js +79 -0
  512. package/dist/Hash-1bd73210.cjs.prod.js +192 -0
  513. package/dist/Hash-bd154268.cjs.dev.js +192 -0
  514. package/dist/HashMap-12668911.cjs.prod.js +361 -0
  515. package/dist/HashMap-68e290b6.cjs.dev.js +361 -0
  516. package/dist/HashSet-6978c08e.cjs.dev.js +283 -0
  517. package/dist/HashSet-6fe62df2.cjs.prod.js +965 -0
  518. package/dist/HashSet-c40a52b1.cjs.prod.js +283 -0
  519. package/dist/HashSet-ece2cfe8.cjs.dev.js +965 -0
  520. package/dist/Hub-6e64debd.cjs.prod.js +1280 -0
  521. package/dist/Hub-74834668.cjs.dev.js +1280 -0
  522. package/dist/Inspectable-3c4a0f5d.cjs.prod.js +50 -0
  523. package/dist/Inspectable-ac929af4.cjs.dev.js +50 -0
  524. package/dist/KeyedPool-b05481e9.cjs.dev.js +282 -0
  525. package/dist/KeyedPool-cd8abf95.cjs.prod.js +282 -0
  526. package/dist/Layer-297269fd.cjs.prod.js +687 -0
  527. package/dist/Layer-c69f3fdc.cjs.dev.js +687 -0
  528. package/dist/List-c6ea7efe.cjs.dev.js +912 -0
  529. package/dist/List-d9775087.cjs.prod.js +912 -0
  530. package/dist/LogLevel-99f64f82.cjs.dev.js +240 -0
  531. package/dist/LogLevel-e9848e15.cjs.prod.js +240 -0
  532. package/dist/LogSpan-c905a192.cjs.prod.js +46 -0
  533. package/dist/LogSpan-e345ba58.cjs.dev.js +46 -0
  534. package/dist/Logger-680763c7.cjs.dev.js +275 -0
  535. package/dist/Logger-7a664cc3.cjs.prod.js +275 -0
  536. package/dist/Metric-09d012ff.cjs.dev.js +488 -0
  537. package/dist/Metric-b7563a68.cjs.prod.js +488 -0
  538. package/dist/MetricBoundaries-cf5df220.cjs.prod.js +68 -0
  539. package/dist/MetricBoundaries-f5f5aae1.cjs.dev.js +68 -0
  540. package/dist/MetricHook-3104e93b.cjs.dev.js +90 -0
  541. package/dist/MetricHook-efd05d72.cjs.prod.js +90 -0
  542. package/dist/MetricKey-9cfcaec8.cjs.prod.js +130 -0
  543. package/dist/MetricKey-c3ba437e.cjs.dev.js +130 -0
  544. package/dist/MetricKeyType-6d2d9036.cjs.prod.js +187 -0
  545. package/dist/MetricKeyType-c1d7ebe8.cjs.dev.js +187 -0
  546. package/dist/MetricLabel-6a1886c6.cjs.dev.js +53 -0
  547. package/dist/MetricLabel-7e1d569e.cjs.prod.js +53 -0
  548. package/dist/MetricPair-658ab13d.cjs.dev.js +50 -0
  549. package/dist/MetricPair-aec13967.cjs.prod.js +50 -0
  550. package/dist/MetricPolling-5af0ff67.cjs.dev.js +177 -0
  551. package/dist/MetricPolling-a0a4e798.cjs.prod.js +177 -0
  552. package/dist/MetricRegistry-e4af936b.cjs.dev.js +38 -0
  553. package/dist/MetricRegistry-ff6df283.cjs.prod.js +38 -0
  554. package/dist/MetricState-b65340a4.cjs.dev.js +191 -0
  555. package/dist/MetricState-bd6a5001.cjs.prod.js +191 -0
  556. package/dist/MutableHashMap-74e83e84.cjs.dev.js +154 -0
  557. package/dist/MutableHashMap-95493edb.cjs.prod.js +154 -0
  558. package/dist/MutableHashSet-780dfd63.cjs.prod.js +110 -0
  559. package/dist/MutableHashSet-ec8d7cc4.cjs.dev.js +110 -0
  560. package/dist/MutableList-58124ef2.cjs.dev.js +296 -0
  561. package/dist/MutableList-732af09a.cjs.prod.js +296 -0
  562. package/dist/MutableQueue-0e9f2466.cjs.dev.js +215 -0
  563. package/dist/MutableQueue-f8aba856.cjs.prod.js +215 -0
  564. package/dist/MutableRef-4a2f1f23.cjs.prod.js +194 -0
  565. package/dist/MutableRef-724c4082.cjs.dev.js +194 -0
  566. package/dist/NonEmptyIterable-418cef14.cjs.prod.js +36 -0
  567. package/dist/NonEmptyIterable-bb452f41.cjs.dev.js +36 -0
  568. package/dist/Number-588f6483.cjs.dev.js +417 -0
  569. package/dist/Number-cb2ba2e8.cjs.prod.js +417 -0
  570. package/dist/Option-02025c86.cjs.prod.js +1198 -0
  571. package/dist/Option-03997d77.cjs.dev.js +1198 -0
  572. package/dist/Order-28bdebd2.cjs.dev.js +321 -0
  573. package/dist/Order-8a112bfb.cjs.prod.js +321 -0
  574. package/dist/Ordering-60bf9127.cjs.prod.js +104 -0
  575. package/dist/Ordering-b955b746.cjs.dev.js +104 -0
  576. package/dist/Pipeable-4698db72.cjs.dev.js +52 -0
  577. package/dist/Pipeable-d3ec6711.cjs.prod.js +52 -0
  578. package/dist/Pool-54389592.cjs.prod.js +122 -0
  579. package/dist/Pool-fe1b506a.cjs.dev.js +122 -0
  580. package/dist/Predicate-9e859c9c.cjs.dev.js +718 -0
  581. package/dist/Predicate-daa86e61.cjs.prod.js +718 -0
  582. package/dist/Queue-5f954287.cjs.prod.js +394 -0
  583. package/dist/Queue-8d082fe4.cjs.dev.js +394 -0
  584. package/dist/Random-35304046.cjs.dev.js +104 -0
  585. package/dist/Random-b4709b6a.cjs.prod.js +104 -0
  586. package/dist/ReadonlyArray-48949ee7.cjs.dev.js +1721 -0
  587. package/dist/ReadonlyArray-8157f697.cjs.prod.js +1721 -0
  588. package/dist/ReadonlyArray-9a1474f6.cjs.dev.js +10 -0
  589. package/dist/ReadonlyArray-f9ed7a05.cjs.prod.js +10 -0
  590. package/dist/ReadonlyRecord-605a625b.cjs.dev.js +568 -0
  591. package/dist/ReadonlyRecord-8db8bada.cjs.prod.js +568 -0
  592. package/dist/RedBlackTree-e6bd147c.cjs.dev.js +1669 -0
  593. package/dist/RedBlackTree-eb41ea8a.cjs.prod.js +1669 -0
  594. package/dist/Ref-30e5ee58.cjs.prod.js +282 -0
  595. package/dist/Ref-af783b72.cjs.dev.js +282 -0
  596. package/dist/Reloadable-2b8ba75d.cjs.prod.js +169 -0
  597. package/dist/Reloadable-b01c9297.cjs.dev.js +169 -0
  598. package/dist/Request-53592fe4.cjs.prod.js +190 -0
  599. package/dist/Request-d3b63af6.cjs.dev.js +190 -0
  600. package/dist/RequestBlock-1aa4c3bd.cjs.dev.js +124 -0
  601. package/dist/RequestBlock-8c3b51d1.cjs.prod.js +124 -0
  602. package/dist/RequestResolver-133197d5.cjs.prod.js +233 -0
  603. package/dist/RequestResolver-86c21b80.cjs.dev.js +233 -0
  604. package/dist/Resource-2530fe45.cjs.prod.js +118 -0
  605. package/dist/Resource-e50b4b25.cjs.dev.js +118 -0
  606. package/dist/Runtime-0d643f0c.cjs.prod.js +191 -0
  607. package/dist/Runtime-c4b887ff.cjs.dev.js +191 -0
  608. package/dist/RuntimeFlags-9d8fac5a.cjs.prod.js +381 -0
  609. package/dist/RuntimeFlags-f67e3984.cjs.dev.js +381 -0
  610. package/dist/RuntimeFlagsPatch-130e990c.cjs.dev.js +411 -0
  611. package/dist/RuntimeFlagsPatch-5570758d.cjs.prod.js +411 -0
  612. package/dist/STM-23270be2.cjs.prod.js +1447 -0
  613. package/dist/STM-5a4c9921.cjs.dev.js +1447 -0
  614. package/dist/Schedule-0444792d.cjs.prod.js +1159 -0
  615. package/dist/Schedule-b6c7b49a.cjs.dev.js +1159 -0
  616. package/dist/ScheduleDecision-369f2d2b.cjs.prod.js +106 -0
  617. package/dist/ScheduleDecision-ba8d0e87.cjs.dev.js +106 -0
  618. package/dist/ScheduleInterval-51f42533.cjs.dev.js +244 -0
  619. package/dist/ScheduleInterval-78037484.cjs.prod.js +244 -0
  620. package/dist/ScheduleIntervals-b0bfcf3b.cjs.dev.js +265 -0
  621. package/dist/ScheduleIntervals-db13140c.cjs.prod.js +265 -0
  622. package/dist/Scheduler-819ee02a.cjs.prod.js +358 -0
  623. package/dist/Scheduler-d080442d.cjs.dev.js +358 -0
  624. package/dist/Scope-311c7eb9.cjs.prod.js +143 -0
  625. package/dist/Scope-6ba9ec6d.cjs.dev.js +143 -0
  626. package/dist/ScopedCache-3f58b125.cjs.dev.js +467 -0
  627. package/dist/ScopedCache-8f99505c.cjs.prod.js +467 -0
  628. package/dist/ScopedRef-7946d287.cjs.prod.js +87 -0
  629. package/dist/ScopedRef-b92e1633.cjs.dev.js +87 -0
  630. package/dist/Sink-9f13da17.cjs.dev.js +1215 -0
  631. package/dist/Sink-9f82fc3b.cjs.prod.js +1215 -0
  632. package/dist/SortedMap-bb3311c3.cjs.prod.js +210 -0
  633. package/dist/SortedMap-f452cc44.cjs.dev.js +210 -0
  634. package/dist/SortedSet-424670fe.cjs.prod.js +311 -0
  635. package/dist/SortedSet-f90b14a2.cjs.dev.js +311 -0
  636. package/dist/Stream-14325ecb.cjs.dev.js +3469 -0
  637. package/dist/Stream-cf262c16.cjs.prod.js +3469 -0
  638. package/dist/StreamHaltStrategy-07f544a6.cjs.prod.js +214 -0
  639. package/dist/StreamHaltStrategy-66a53f66.cjs.dev.js +214 -0
  640. package/dist/String-23b18ca9.cjs.prod.js +694 -0
  641. package/dist/String-830aaa3e.cjs.dev.js +694 -0
  642. package/dist/Struct-14648d76.cjs.dev.js +141 -0
  643. package/dist/Struct-c6b00f29.cjs.prod.js +141 -0
  644. package/dist/SubscriptionRef-aa7bdc5f.cjs.prod.js +269 -0
  645. package/dist/SubscriptionRef-d3c1aa07.cjs.dev.js +269 -0
  646. package/dist/Supervisor-21087253.cjs.prod.js +170 -0
  647. package/dist/Supervisor-40dd7ce5.cjs.dev.js +170 -0
  648. package/dist/Symbol-55d0b3d8.cjs.prod.js +40 -0
  649. package/dist/Symbol-5d74a5f2.cjs.dev.js +40 -0
  650. package/dist/SynchronizedRef-3181eb0a.cjs.dev.js +212 -0
  651. package/dist/SynchronizedRef-c6e0884b.cjs.prod.js +212 -0
  652. package/dist/TArray-6767b4bd.cjs.prod.js +455 -0
  653. package/dist/TArray-a0a4c6e6.cjs.dev.js +455 -0
  654. package/dist/TDeferred-a9839479.cjs.prod.js +129 -0
  655. package/dist/TDeferred-ac2c4025.cjs.dev.js +129 -0
  656. package/dist/THub-25b77864.cjs.prod.js +570 -0
  657. package/dist/THub-38053ae1.cjs.dev.js +570 -0
  658. package/dist/TMap-91505efa.cjs.prod.js +463 -0
  659. package/dist/TMap-de8ac080.cjs.dev.js +463 -0
  660. package/dist/TPriorityQueue-00b65d1a.cjs.prod.js +381 -0
  661. package/dist/TPriorityQueue-96ff0e15.cjs.dev.js +381 -0
  662. package/dist/TQueue-5e242ca2.cjs.prod.js +353 -0
  663. package/dist/TQueue-707762bf.cjs.dev.js +353 -0
  664. package/dist/TRandom-5eb21d23.cjs.dev.js +203 -0
  665. package/dist/TRandom-ec9c7bf7.cjs.prod.js +203 -0
  666. package/dist/TReentrantLock-1b77d76f.cjs.dev.js +456 -0
  667. package/dist/TReentrantLock-c5a8401e.cjs.prod.js +456 -0
  668. package/dist/TRef-b87580d7.cjs.prod.js +152 -0
  669. package/dist/TRef-cf2e8ad7.cjs.dev.js +152 -0
  670. package/dist/TSemaphore-29503416.cjs.prod.js +197 -0
  671. package/dist/TSemaphore-50edec08.cjs.dev.js +197 -0
  672. package/dist/TSet-3c2568e9.cjs.prod.js +444 -0
  673. package/dist/TSet-bb4775ca.cjs.dev.js +444 -0
  674. package/dist/Take-684c9901.cjs.dev.js +236 -0
  675. package/dist/Take-b4c91438.cjs.prod.js +236 -0
  676. package/dist/TestAnnotation-73be7a68.cjs.dev.js +135 -0
  677. package/dist/TestAnnotation-b9b93d03.cjs.prod.js +135 -0
  678. package/dist/TestAnnotationMap-80c87410.cjs.dev.js +125 -0
  679. package/dist/TestAnnotationMap-e946bab5.cjs.prod.js +125 -0
  680. package/dist/TestAnnotations-5db95828.cjs.prod.js +97 -0
  681. package/dist/TestAnnotations-733b39ef.cjs.dev.js +97 -0
  682. package/dist/TestClock-89a36b89.cjs.prod.js +581 -0
  683. package/dist/TestClock-e2773846.cjs.dev.js +581 -0
  684. package/dist/TestConfig-1a73e844.cjs.prod.js +37 -0
  685. package/dist/TestConfig-e5ffa946.cjs.dev.js +37 -0
  686. package/dist/TestContext-3328163e.cjs.dev.js +41 -0
  687. package/dist/TestContext-917bf305.cjs.prod.js +41 -0
  688. package/dist/TestLive-465ad3ef.cjs.dev.js +60 -0
  689. package/dist/TestLive-f3232ac4.cjs.prod.js +60 -0
  690. package/dist/TestServices-605f726e.cjs.prod.js +341 -0
  691. package/dist/TestServices-921e5c42.cjs.dev.js +341 -0
  692. package/dist/TestSized-6c1abc21.cjs.dev.js +64 -0
  693. package/dist/TestSized-a9a87d64.cjs.prod.js +64 -0
  694. package/dist/Tracer-d06d0b61.cjs.prod.js +81 -0
  695. package/dist/Tracer-da182c8c.cjs.dev.js +81 -0
  696. package/dist/Tuple-27ecf3a1.cjs.prod.js +199 -0
  697. package/dist/Tuple-75d2a389.cjs.dev.js +199 -0
  698. package/dist/Unify-99be0499.cjs.dev.js +48 -0
  699. package/dist/Unify-e86fd412.cjs.prod.js +48 -0
  700. package/dist/Utils-864e1d48.cjs.prod.js +370 -0
  701. package/dist/Utils-b0c14d1b.cjs.dev.js +370 -0
  702. package/dist/boundaries-03c7494a.cjs.dev.js +54 -0
  703. package/dist/boundaries-5d1a46e1.cjs.prod.js +54 -0
  704. package/dist/cache-6cdc31f7.cjs.dev.js +523 -0
  705. package/dist/cache-ab7bbfbd.cjs.prod.js +523 -0
  706. package/dist/childExecutorDecision-2b30946c.cjs.prod.js +98 -0
  707. package/dist/childExecutorDecision-ad3db696.cjs.dev.js +98 -0
  708. package/dist/circular-4cb0b79d.cjs.dev.js +341 -0
  709. package/dist/circular-5b3558d9.cjs.prod.js +341 -0
  710. package/dist/circular-78011d6b.cjs.dev.js +107 -0
  711. package/dist/circular-81b4c556.cjs.prod.js +107 -0
  712. package/dist/config-10f2a1d1.cjs.dev.js +474 -0
  713. package/dist/config-78feb1ac.cjs.prod.js +474 -0
  714. package/dist/configError-1686533e.cjs.dev.js +323 -0
  715. package/dist/configError-6a3652f8.cjs.prod.js +323 -0
  716. package/dist/configProvider-2b177eac.cjs.prod.js +447 -0
  717. package/dist/configProvider-e2eb112d.cjs.dev.js +447 -0
  718. package/dist/configSecret-5812fa69.cjs.dev.js +74 -0
  719. package/dist/configSecret-ecb6c5b3.cjs.prod.js +74 -0
  720. package/dist/core-4ced6e17.cjs.prod.js +1072 -0
  721. package/dist/core-ac668be0.cjs.dev.js +3502 -0
  722. package/dist/core-c2eb171a.cjs.prod.js +3502 -0
  723. package/dist/core-d9eea905.cjs.dev.js +1072 -0
  724. package/dist/core-effect-a9b8ee08.cjs.dev.js +1030 -0
  725. package/dist/core-effect-bf806dd9.cjs.prod.js +1030 -0
  726. package/dist/dataSource-abccc876.cjs.prod.js +74 -0
  727. package/dist/dataSource-d5f79f4e.cjs.dev.js +74 -0
  728. package/dist/declarations/src/Bigint.d.ts +22 -22
  729. package/dist/declarations/src/Boolean.d.ts +15 -15
  730. package/dist/declarations/src/Brand.d.ts +20 -20
  731. package/dist/declarations/src/Cache.d.ts +14 -14
  732. package/dist/declarations/src/Cause.d.ts +81 -81
  733. package/dist/declarations/src/Channel.d.ts +117 -117
  734. package/dist/declarations/src/ChannelChildExecutorDecision.d.ts +16 -16
  735. package/dist/declarations/src/ChannelMergeDecision.d.ts +11 -11
  736. package/dist/declarations/src/ChannelMergeState.d.ts +17 -17
  737. package/dist/declarations/src/ChannelMergeStrategy.d.ts +13 -13
  738. package/dist/declarations/src/ChannelSingleProducerAsyncInput.d.ts +5 -5
  739. package/dist/declarations/src/ChannelUpstreamPullRequest.d.ts +13 -13
  740. package/dist/declarations/src/ChannelUpstreamPullStrategy.d.ts +13 -13
  741. package/dist/declarations/src/Chunk.d.ts +84 -84
  742. package/dist/declarations/src/Clock.d.ts +13 -13
  743. package/dist/declarations/src/Config.d.ts +40 -40
  744. package/dist/declarations/src/ConfigError.d.ts +31 -31
  745. package/dist/declarations/src/ConfigProvider.d.ts +27 -27
  746. package/dist/declarations/src/ConfigProviderPathPatch.d.ts +11 -11
  747. package/dist/declarations/src/ConfigSecret.d.ts +12 -12
  748. package/dist/declarations/src/Console.d.ts +26 -26
  749. package/dist/declarations/src/Context.d.ts +24 -24
  750. package/dist/declarations/src/Data.d.ts +22 -22
  751. package/dist/declarations/src/DefaultServices.d.ts +4 -4
  752. package/dist/declarations/src/Deferred.d.ts +26 -26
  753. package/dist/declarations/src/Differ.d.ts +34 -34
  754. package/dist/declarations/src/Duration.d.ts +42 -37
  755. package/dist/declarations/src/Duration.d.ts.map +1 -1
  756. package/dist/declarations/src/Effect.d.ts +351 -351
  757. package/dist/declarations/src/Effectable.d.ts +16 -16
  758. package/dist/declarations/src/Either.d.ts +35 -35
  759. package/dist/declarations/src/Encoding.d.ts +15 -15
  760. package/dist/declarations/src/Equal.d.ts +6 -6
  761. package/dist/declarations/src/Equivalence.d.ts +20 -20
  762. package/dist/declarations/src/Error.d.ts +4 -4
  763. package/dist/declarations/src/ExecutionStrategy.d.ts +12 -12
  764. package/dist/declarations/src/Exit.d.ts +41 -41
  765. package/dist/declarations/src/Fiber.d.ts +57 -57
  766. package/dist/declarations/src/FiberId.d.ts +23 -23
  767. package/dist/declarations/src/FiberRef.d.ts +49 -49
  768. package/dist/declarations/src/FiberRefs.d.ts +14 -14
  769. package/dist/declarations/src/FiberRefsPatch.d.ts +11 -11
  770. package/dist/declarations/src/FiberStatus.d.ts +14 -14
  771. package/dist/declarations/src/Function.d.ts +24 -24
  772. package/dist/declarations/src/GlobalValue.d.ts +1 -1
  773. package/dist/declarations/src/GroupBy.d.ts +9 -9
  774. package/dist/declarations/src/HKT.d.ts +5 -5
  775. package/dist/declarations/src/Hash.d.ts +12 -12
  776. package/dist/declarations/src/HashMap.d.ts +37 -37
  777. package/dist/declarations/src/HashSet.d.ts +28 -28
  778. package/dist/declarations/src/Hub.d.ts +16 -16
  779. package/dist/declarations/src/Inspectable.d.ts +6 -6
  780. package/dist/declarations/src/KeyedPool.d.ts +12 -12
  781. package/dist/declarations/src/Layer.d.ts +70 -70
  782. package/dist/declarations/src/List.d.ts +50 -50
  783. package/dist/declarations/src/LogLevel.d.ts +27 -27
  784. package/dist/declarations/src/LogSpan.d.ts +3 -3
  785. package/dist/declarations/src/Logger.d.ts +33 -33
  786. package/dist/declarations/src/Metric.d.ts +55 -55
  787. package/dist/declarations/src/MetricBoundaries.d.ts +8 -8
  788. package/dist/declarations/src/MetricHook.d.ts +20 -20
  789. package/dist/declarations/src/MetricKey.d.ts +21 -21
  790. package/dist/declarations/src/MetricKeyType.d.ts +35 -35
  791. package/dist/declarations/src/MetricLabel.d.ts +6 -6
  792. package/dist/declarations/src/MetricPair.d.ts +8 -8
  793. package/dist/declarations/src/MetricPolling.d.ts +11 -11
  794. package/dist/declarations/src/MetricRegistry.d.ts +5 -5
  795. package/dist/declarations/src/MetricState.d.ts +33 -33
  796. package/dist/declarations/src/MutableHashMap.d.ts +12 -12
  797. package/dist/declarations/src/MutableHashSet.d.ts +9 -9
  798. package/dist/declarations/src/MutableList.d.ts +13 -13
  799. package/dist/declarations/src/MutableQueue.d.ts +16 -16
  800. package/dist/declarations/src/MutableRef.d.ts +18 -18
  801. package/dist/declarations/src/NonEmptyIterable.d.ts +4 -4
  802. package/dist/declarations/src/Number.d.ts +22 -22
  803. package/dist/declarations/src/Option.d.ts +69 -69
  804. package/dist/declarations/src/Order.d.ts +28 -28
  805. package/dist/declarations/src/Ordering.d.ts +7 -7
  806. package/dist/declarations/src/Pipeable.d.ts +3 -3
  807. package/dist/declarations/src/Pool.d.ts +11 -11
  808. package/dist/declarations/src/Predicate.d.ts +42 -42
  809. package/dist/declarations/src/Queue.d.ts +44 -44
  810. package/dist/declarations/src/Random.d.ts +11 -11
  811. package/dist/declarations/src/ReadonlyArray.d.ts +139 -139
  812. package/dist/declarations/src/ReadonlyRecord.d.ts +25 -25
  813. package/dist/declarations/src/RedBlackTree.d.ts +40 -40
  814. package/dist/declarations/src/Ref.d.ts +20 -20
  815. package/dist/declarations/src/Reloadable.d.ts +13 -13
  816. package/dist/declarations/src/Request.d.ts +29 -29
  817. package/dist/declarations/src/RequestBlock.d.ts +16 -16
  818. package/dist/declarations/src/RequestResolver.d.ts +23 -23
  819. package/dist/declarations/src/Resource.d.ts +10 -10
  820. package/dist/declarations/src/Runtime.d.ts +22 -22
  821. package/dist/declarations/src/RuntimeFlags.d.ts +38 -38
  822. package/dist/declarations/src/RuntimeFlagsPatch.d.ts +18 -18
  823. package/dist/declarations/src/STM.d.ts +140 -140
  824. package/dist/declarations/src/Schedule.d.ts +106 -106
  825. package/dist/declarations/src/ScheduleDecision.d.ts +8 -8
  826. package/dist/declarations/src/ScheduleInterval.d.ts +16 -16
  827. package/dist/declarations/src/ScheduleIntervals.d.ts +14 -14
  828. package/dist/declarations/src/Scheduler.d.ts +34 -34
  829. package/dist/declarations/src/Scope.d.ts +18 -18
  830. package/dist/declarations/src/ScopedCache.d.ts +9 -9
  831. package/dist/declarations/src/ScopedRef.d.ts +10 -10
  832. package/dist/declarations/src/Sink.d.ts +115 -115
  833. package/dist/declarations/src/SortedMap.d.ts +21 -21
  834. package/dist/declarations/src/SortedSet.d.ts +24 -24
  835. package/dist/declarations/src/Stream.d.ts +303 -303
  836. package/dist/declarations/src/StreamEmit.d.ts +3 -3
  837. package/dist/declarations/src/StreamHaltStrategy.d.ts +16 -16
  838. package/dist/declarations/src/String.d.ts +50 -50
  839. package/dist/declarations/src/Struct.d.ts +6 -6
  840. package/dist/declarations/src/SubscriptionRef.d.ts +27 -27
  841. package/dist/declarations/src/Supervisor.d.ts +23 -23
  842. package/dist/declarations/src/Symbol.d.ts +3 -3
  843. package/dist/declarations/src/SynchronizedRef.d.ts +28 -28
  844. package/dist/declarations/src/TArray.d.ts +46 -46
  845. package/dist/declarations/src/TDeferred.d.ts +12 -12
  846. package/dist/declarations/src/THub.d.ts +18 -18
  847. package/dist/declarations/src/TMap.d.ts +46 -46
  848. package/dist/declarations/src/TPriorityQueue.d.ts +23 -23
  849. package/dist/declarations/src/TQueue.d.ts +36 -36
  850. package/dist/declarations/src/TRandom.d.ts +12 -12
  851. package/dist/declarations/src/TReentrantLock.d.ts +24 -24
  852. package/dist/declarations/src/TRef.d.ts +19 -19
  853. package/dist/declarations/src/TSemaphore.d.ts +17 -17
  854. package/dist/declarations/src/TSet.d.ts +35 -35
  855. package/dist/declarations/src/Take.d.ts +25 -25
  856. package/dist/declarations/src/TestAnnotation.d.ts +12 -12
  857. package/dist/declarations/src/TestAnnotationMap.d.ts +11 -11
  858. package/dist/declarations/src/TestAnnotations.d.ts +7 -7
  859. package/dist/declarations/src/TestClock.d.ts +16 -16
  860. package/dist/declarations/src/TestConfig.d.ts +4 -4
  861. package/dist/declarations/src/TestContext.d.ts +3 -3
  862. package/dist/declarations/src/TestLive.d.ts +6 -6
  863. package/dist/declarations/src/TestServices.d.ts +35 -35
  864. package/dist/declarations/src/TestSized.d.ts +7 -7
  865. package/dist/declarations/src/Tracer.d.ts +13 -13
  866. package/dist/declarations/src/Tuple.d.ts +12 -12
  867. package/dist/declarations/src/Types.d.ts +10 -10
  868. package/dist/declarations/src/Unify.d.ts +9 -9
  869. package/dist/declarations/src/Utils.d.ts +29 -29
  870. package/dist/declarations/src/index.d.ts +169 -141
  871. package/dist/declarations/src/index.d.ts.map +1 -1
  872. package/dist/defaultServices-4112c0c9.cjs.prod.js +388 -0
  873. package/dist/defaultServices-60c753dc.cjs.dev.js +388 -0
  874. package/dist/effect.cjs.dev.js +199 -193
  875. package/dist/effect.cjs.mjs +7 -1
  876. package/dist/effect.cjs.prod.js +199 -193
  877. package/dist/effect.esm.js +283 -197
  878. package/dist/fiber-90ffaf8c.cjs.prod.js +411 -0
  879. package/dist/fiber-da1a207c.cjs.dev.js +411 -0
  880. package/dist/fiberRefs-64c35250.cjs.prod.js +181 -0
  881. package/dist/fiberRefs-a7e00f7e.cjs.dev.js +181 -0
  882. package/dist/fiberRuntime-1c369a47.cjs.prod.js +3012 -0
  883. package/dist/fiberRuntime-e9680313.cjs.dev.js +3012 -0
  884. package/dist/groupBy-0cc85afb.cjs.prod.js +216 -0
  885. package/dist/groupBy-b204a881.cjs.dev.js +216 -0
  886. package/dist/hook-6c7550dc.cjs.prod.js +371 -0
  887. package/dist/hook-822704ea.cjs.dev.js +371 -0
  888. package/dist/key-330b98b1.cjs.prod.js +79 -0
  889. package/dist/key-a474fc0d.cjs.dev.js +79 -0
  890. package/dist/keyType-1e916ae2.cjs.dev.js +236 -0
  891. package/dist/keyType-8460e792.cjs.prod.js +236 -0
  892. package/dist/label-246fb11d.cjs.dev.js +44 -0
  893. package/dist/label-3e143765.cjs.prod.js +44 -0
  894. package/dist/layer-ae8eefad.cjs.dev.js +658 -0
  895. package/dist/layer-ffacc2c5.cjs.prod.js +658 -0
  896. package/dist/mergeDecision-e457a76b.cjs.dev.js +86 -0
  897. package/dist/mergeDecision-e483c280.cjs.prod.js +86 -0
  898. package/dist/mergeState-83204f38.cjs.dev.js +109 -0
  899. package/dist/mergeState-dba66248.cjs.prod.js +109 -0
  900. package/dist/mergeStrategy-845a1279.cjs.prod.js +72 -0
  901. package/dist/mergeStrategy-b19dc19a.cjs.dev.js +72 -0
  902. package/dist/pair-08a8685e.cjs.dev.js +42 -0
  903. package/dist/pair-e5443c93.cjs.prod.js +42 -0
  904. package/dist/patch-4671ab7f.cjs.dev.js +132 -0
  905. package/dist/patch-f27e9f08.cjs.prod.js +132 -0
  906. package/dist/pathPatch-ded405f6.cjs.prod.js +90 -0
  907. package/dist/pathPatch-e46d4168.cjs.dev.js +90 -0
  908. package/dist/pool-3f16af61.cjs.dev.js +278 -0
  909. package/dist/pool-59a31f55.cjs.prod.js +278 -0
  910. package/dist/query-193d0a89.cjs.dev.js +104 -0
  911. package/dist/query-fe4a82d6.cjs.prod.js +104 -0
  912. package/dist/queue-04ae7ec7.cjs.dev.js +538 -0
  913. package/dist/queue-b81aee38.cjs.prod.js +538 -0
  914. package/dist/registry-29905dcc.cjs.prod.js +114 -0
  915. package/dist/registry-c883cf52.cjs.dev.js +114 -0
  916. package/dist/runtime-3ae98f19.cjs.dev.js +288 -0
  917. package/dist/runtime-8c3f1bd3.cjs.prod.js +288 -0
  918. package/dist/schedule-479d8fcc.cjs.dev.js +956 -0
  919. package/dist/schedule-7e30db2d.cjs.prod.js +956 -0
  920. package/dist/scopedRef-16d9d192.cjs.dev.js +55 -0
  921. package/dist/scopedRef-40b5bb82.cjs.prod.js +55 -0
  922. package/dist/singleProducerAsyncInput-552122e6.cjs.dev.js +193 -0
  923. package/dist/singleProducerAsyncInput-c5ff73b7.cjs.prod.js +193 -0
  924. package/dist/sink-16a1a901.cjs.dev.js +3094 -0
  925. package/dist/sink-c9ae7558.cjs.prod.js +3094 -0
  926. package/dist/state-0d29362f.cjs.prod.js +227 -0
  927. package/dist/state-8a8a647c.cjs.dev.js +227 -0
  928. package/dist/stm-44f045e5.cjs.dev.js +678 -0
  929. package/dist/stm-59af7e62.cjs.prod.js +678 -0
  930. package/dist/stream-84a13e23.cjs.dev.js +3645 -0
  931. package/dist/stream-8acbee57.cjs.prod.js +3645 -0
  932. package/dist/synchronizedRef-58a64ffe.cjs.dev.js +62 -0
  933. package/dist/synchronizedRef-6cfe9354.cjs.prod.js +62 -0
  934. package/dist/tArray-a690480d.cjs.prod.js +330 -0
  935. package/dist/tArray-c0a3d1e2.cjs.dev.js +330 -0
  936. package/dist/tMap-1c1b10c4.cjs.dev.js +535 -0
  937. package/dist/tMap-8dfc92f5.cjs.prod.js +535 -0
  938. package/dist/tQueue-48a29f8b.cjs.prod.js +367 -0
  939. package/dist/tQueue-aaec000f.cjs.dev.js +367 -0
  940. package/dist/tRef-1df89632.cjs.dev.js +133 -0
  941. package/dist/tRef-cc473a9f.cjs.prod.js +133 -0
  942. package/dist/take-906e6ef4.cjs.prod.js +152 -0
  943. package/dist/take-e1c6b82a.cjs.dev.js +152 -0
  944. package/dist/upstreamPullRequest-705e868d.cjs.prod.js +79 -0
  945. package/dist/upstreamPullRequest-c08f06a4.cjs.dev.js +79 -0
  946. package/dist/upstreamPullStrategy-0ccf2960.cjs.dev.js +81 -0
  947. package/dist/upstreamPullStrategy-34452db1.cjs.prod.js +81 -0
  948. package/internal/Context.esm.js +208 -0
  949. package/internal/Data.esm.js +49 -0
  950. package/internal/Differ/ChunkPatch.esm.js +131 -0
  951. package/internal/Differ/ContextPatch.esm.js +158 -0
  952. package/internal/Differ/HashMapPatch.esm.js +133 -0
  953. package/internal/Differ/HashSetPatch.esm.js +107 -0
  954. package/internal/Differ/OrPatch.esm.js +196 -0
  955. package/internal/Differ.esm.js +130 -0
  956. package/internal/Effectable.esm.js +89 -0
  957. package/internal/Either.esm.js +95 -0
  958. package/internal/Encoding/Base64.esm.js +74 -0
  959. package/internal/Encoding/Base64Url.esm.js +24 -0
  960. package/internal/Encoding/Common.esm.js +21 -0
  961. package/internal/Encoding/Hex.esm.js +55 -0
  962. package/internal/HashMap/array.esm.js +51 -0
  963. package/internal/HashMap/bitwise.esm.js +34 -0
  964. package/internal/HashMap/config.esm.js +16 -0
  965. package/internal/HashMap/keySet.esm.js +8 -0
  966. package/internal/HashMap/node.esm.js +253 -0
  967. package/internal/HashMap.esm.js +366 -0
  968. package/internal/HashSet.esm.js +211 -0
  969. package/internal/Option.esm.js +75 -0
  970. package/internal/ReadonlyArray.esm.js +8 -0
  971. package/internal/RedBlackTree/iterator.esm.js +204 -0
  972. package/internal/RedBlackTree/node.esm.js +43 -0
  973. package/internal/RedBlackTree.esm.js +1042 -0
  974. package/internal/Stack.esm.js +9 -0
  975. package/internal/blockedRequests.esm.js +365 -0
  976. package/internal/cache.esm.js +514 -0
  977. package/internal/cause.esm.js +1067 -0
  978. package/internal/channel/channelExecutor.esm.js +692 -0
  979. package/internal/channel/channelState.esm.js +78 -0
  980. package/internal/channel/childExecutorDecision.esm.js +71 -0
  981. package/internal/channel/continuation.esm.js +58 -0
  982. package/internal/channel/mergeDecision.esm.js +69 -0
  983. package/internal/channel/mergeState.esm.js +82 -0
  984. package/internal/channel/mergeStrategy.esm.js +55 -0
  985. package/internal/channel/singleProducerAsyncInput.esm.js +191 -0
  986. package/internal/channel/subexecutor.esm.js +153 -0
  987. package/internal/channel/upstreamPullRequest.esm.js +62 -0
  988. package/internal/channel/upstreamPullStrategy.esm.js +62 -0
  989. package/internal/channel.esm.js +648 -0
  990. package/internal/clock.esm.js +82 -0
  991. package/internal/completedRequestMap.esm.js +7 -0
  992. package/internal/concurrency.esm.js +47 -0
  993. package/internal/config.esm.js +374 -0
  994. package/internal/configError.esm.js +276 -0
  995. package/internal/configProvider/pathPatch.esm.js +83 -0
  996. package/internal/configProvider.esm.js +365 -0
  997. package/internal/configSecret.esm.js +66 -0
  998. package/internal/console.esm.js +72 -0
  999. package/internal/core-effect.esm.js +875 -0
  1000. package/internal/core-stream.esm.js +293 -0
  1001. package/internal/core.esm.js +1745 -0
  1002. package/internal/dataSource.esm.js +61 -0
  1003. package/internal/defaultServices/console.esm.js +96 -0
  1004. package/internal/defaultServices.esm.js +84 -0
  1005. package/internal/deferred.esm.js +37 -0
  1006. package/internal/effect/circular.esm.js +314 -0
  1007. package/internal/executionStrategy.esm.js +61 -0
  1008. package/internal/fiber.esm.js +257 -0
  1009. package/internal/fiberId.esm.js +243 -0
  1010. package/internal/fiberMessage.esm.js +54 -0
  1011. package/internal/fiberRefs/patch.esm.js +127 -0
  1012. package/internal/fiberRefs.esm.js +169 -0
  1013. package/internal/fiberRuntime.esm.js +2003 -0
  1014. package/internal/fiberScope.esm.js +58 -0
  1015. package/internal/fiberStatus.esm.js +89 -0
  1016. package/internal/groupBy.esm.js +208 -0
  1017. package/internal/hub.esm.js +1102 -0
  1018. package/internal/keyedPool.esm.js +161 -0
  1019. package/internal/layer/circular.esm.js +84 -0
  1020. package/internal/layer.esm.js +552 -0
  1021. package/internal/logSpan.esm.js +15 -0
  1022. package/internal/logger-circular.esm.js +21 -0
  1023. package/internal/logger.esm.js +213 -0
  1024. package/internal/metric/boundaries.esm.js +48 -0
  1025. package/internal/metric/hook.esm.js +362 -0
  1026. package/internal/metric/key.esm.js +68 -0
  1027. package/internal/metric/keyType.esm.js +218 -0
  1028. package/internal/metric/label.esm.js +40 -0
  1029. package/internal/metric/pair.esm.js +38 -0
  1030. package/internal/metric/polling.esm.js +74 -0
  1031. package/internal/metric/registry.esm.js +111 -0
  1032. package/internal/metric/state.esm.js +209 -0
  1033. package/internal/metric.esm.js +204 -0
  1034. package/internal/opCodes/cause.esm.js +31 -0
  1035. package/internal/opCodes/channel.esm.js +71 -0
  1036. package/internal/opCodes/channelChildExecutorDecision.esm.js +16 -0
  1037. package/internal/opCodes/channelMergeDecision.esm.js +11 -0
  1038. package/internal/opCodes/channelMergeState.esm.js +16 -0
  1039. package/internal/opCodes/channelMergeStrategy.esm.js +11 -0
  1040. package/internal/opCodes/channelState.esm.js +21 -0
  1041. package/internal/opCodes/channelUpstreamPullRequest.esm.js +11 -0
  1042. package/internal/opCodes/channelUpstreamPullStrategy.esm.js +11 -0
  1043. package/internal/opCodes/config.esm.js +56 -0
  1044. package/internal/opCodes/configError.esm.js +31 -0
  1045. package/internal/opCodes/continuation.esm.js +11 -0
  1046. package/internal/opCodes/deferred.esm.js +11 -0
  1047. package/internal/opCodes/effect.esm.js +71 -0
  1048. package/internal/opCodes/layer.esm.js +46 -0
  1049. package/internal/opCodes/streamHaltStrategy.esm.js +21 -0
  1050. package/internal/pool.esm.js +271 -0
  1051. package/internal/query.esm.js +100 -0
  1052. package/internal/queue.esm.js +505 -0
  1053. package/internal/random.esm.js +58 -0
  1054. package/internal/ref.esm.js +121 -0
  1055. package/internal/reloadable.esm.js +62 -0
  1056. package/internal/request.esm.js +81 -0
  1057. package/internal/resource.esm.js +35 -0
  1058. package/internal/ringBuffer.esm.js +56 -0
  1059. package/internal/runtime.esm.js +268 -0
  1060. package/internal/runtimeFlags.esm.js +137 -0
  1061. package/internal/runtimeFlagsPatch.esm.js +57 -0
  1062. package/internal/schedule/decision.esm.js +45 -0
  1063. package/internal/schedule/interval.esm.js +85 -0
  1064. package/internal/schedule/intervals.esm.js +135 -0
  1065. package/internal/schedule.esm.js +844 -0
  1066. package/internal/scopedCache.esm.js +406 -0
  1067. package/internal/scopedRef.esm.js +49 -0
  1068. package/internal/singleShotGen.esm.js +30 -0
  1069. package/internal/sink.esm.js +918 -0
  1070. package/internal/stm/core.esm.js +553 -0
  1071. package/internal/stm/opCodes/stm.esm.js +56 -0
  1072. package/internal/stm/opCodes/stmState.esm.js +16 -0
  1073. package/internal/stm/opCodes/strategy.esm.js +16 -0
  1074. package/internal/stm/opCodes/tExit.esm.js +26 -0
  1075. package/internal/stm/opCodes/tryCommit.esm.js +11 -0
  1076. package/internal/stm/stm/entry.esm.js +47 -0
  1077. package/internal/stm/stm/journal.esm.js +96 -0
  1078. package/internal/stm/stm/stmState.esm.js +104 -0
  1079. package/internal/stm/stm/tExit.esm.js +113 -0
  1080. package/internal/stm/stm/tryCommit.esm.js +25 -0
  1081. package/internal/stm/stm/txnId.esm.js +15 -0
  1082. package/internal/stm/stm/versioned.esm.js +8 -0
  1083. package/internal/stm/stm.esm.js +584 -0
  1084. package/internal/stm/tArray.esm.js +287 -0
  1085. package/internal/stm/tDeferred.esm.js +49 -0
  1086. package/internal/stm/tHub.esm.js +381 -0
  1087. package/internal/stm/tMap.esm.js +492 -0
  1088. package/internal/stm/tPriorityQueue.esm.js +156 -0
  1089. package/internal/stm/tQueue.esm.js +317 -0
  1090. package/internal/stm/tRandom.esm.js +89 -0
  1091. package/internal/stm/tReentrantLock.esm.js +216 -0
  1092. package/internal/stm/tRef.esm.js +117 -0
  1093. package/internal/stm/tSemaphore.esm.js +73 -0
  1094. package/internal/stm/tSet.esm.js +113 -0
  1095. package/internal/stream/debounceState.esm.js +39 -0
  1096. package/internal/stream/emit.esm.js +51 -0
  1097. package/internal/stream/haltStrategy.esm.js +74 -0
  1098. package/internal/stream/handoff.esm.js +79 -0
  1099. package/internal/stream/handoffSignal.esm.js +40 -0
  1100. package/internal/stream/pull.esm.js +10 -0
  1101. package/internal/stream/sinkEndReason.esm.js +27 -0
  1102. package/internal/stream/zipAllState.esm.js +65 -0
  1103. package/internal/stream/zipChunksState.esm.js +41 -0
  1104. package/internal/stream.esm.js +2984 -0
  1105. package/internal/string-utils.esm.js +66 -0
  1106. package/internal/subscriptionRef.esm.js +65 -0
  1107. package/internal/supervisor/patch.esm.js +156 -0
  1108. package/internal/supervisor.esm.js +204 -0
  1109. package/internal/synchronizedRef.esm.js +53 -0
  1110. package/internal/take.esm.js +130 -0
  1111. package/internal/testing/suspendedWarningData.esm.js +66 -0
  1112. package/internal/testing/warningData.esm.js +75 -0
  1113. package/internal/timeout.esm.js +22 -0
  1114. package/internal/tracer.esm.js +61 -0
  1115. package/package.json +700 -554
  1116. package/dist/Bigint-1c684209.esm.js +0 -370
  1117. package/dist/Bigint-504df838.cjs.dev.js +0 -392
  1118. package/dist/Bigint-d1a7e44e.cjs.prod.js +0 -392
  1119. package/dist/Boolean-7513c999.cjs.prod.js +0 -264
  1120. package/dist/Boolean-9427fc24.cjs.dev.js +0 -264
  1121. package/dist/Boolean-f564d31a.esm.js +0 -248
  1122. package/dist/Brand-c3918667.cjs.dev.js +0 -224
  1123. package/dist/Brand-fa4e9f22.esm.js +0 -215
  1124. package/dist/Brand-ff4af468.cjs.prod.js +0 -224
  1125. package/dist/Cache-447337f2.esm.js +0 -120
  1126. package/dist/Cache-4b4ea2b3.cjs.prod.js +0 -127
  1127. package/dist/Cache-62ebdae3.cjs.dev.js +0 -127
  1128. package/dist/Cause-8be0b9a6.esm.js +0 -730
  1129. package/dist/Cause-b769f517.cjs.prod.js +0 -791
  1130. package/dist/Cause-d77e20dc.cjs.dev.js +0 -791
  1131. package/dist/Channel-2039c280.cjs.dev.js +0 -1217
  1132. package/dist/Channel-806a0a5a.esm.js +0 -1109
  1133. package/dist/Channel-dcff73a4.cjs.prod.js +0 -1217
  1134. package/dist/ChannelChildExecutorDecision-2d3c20b1.esm.js +0 -125
  1135. package/dist/ChannelChildExecutorDecision-adce4b58.cjs.dev.js +0 -136
  1136. package/dist/ChannelChildExecutorDecision-fc90c987.cjs.prod.js +0 -136
  1137. package/dist/ChannelMergeDecision-39e12893.cjs.prod.js +0 -78
  1138. package/dist/ChannelMergeDecision-4488ba22.esm.js +0 -70
  1139. package/dist/ChannelMergeDecision-f05da806.cjs.dev.js +0 -78
  1140. package/dist/ChannelMergeState-65723a71.cjs.dev.js +0 -125
  1141. package/dist/ChannelMergeState-937282d2.esm.js +0 -114
  1142. package/dist/ChannelMergeState-ab626a77.cjs.prod.js +0 -125
  1143. package/dist/ChannelMergeStrategy-c2f956a9.esm.js +0 -95
  1144. package/dist/ChannelMergeStrategy-d5bdc89d.cjs.prod.js +0 -104
  1145. package/dist/ChannelMergeStrategy-d956e3fa.cjs.dev.js +0 -104
  1146. package/dist/ChannelSingleProducerAsyncInput-00708a29.esm.js +0 -52
  1147. package/dist/ChannelSingleProducerAsyncInput-90f3b171.cjs.prod.js +0 -55
  1148. package/dist/ChannelSingleProducerAsyncInput-ecc79242.cjs.dev.js +0 -55
  1149. package/dist/ChannelUpstreamPullRequest-011526e6.esm.js +0 -95
  1150. package/dist/ChannelUpstreamPullRequest-6a610523.cjs.dev.js +0 -104
  1151. package/dist/ChannelUpstreamPullRequest-d7413c53.cjs.prod.js +0 -104
  1152. package/dist/ChannelUpstreamPullStrategy-0af49b72.esm.js +0 -94
  1153. package/dist/ChannelUpstreamPullStrategy-6e0a338e.cjs.prod.js +0 -103
  1154. package/dist/ChannelUpstreamPullStrategy-90ec240c.cjs.dev.js +0 -103
  1155. package/dist/Chunk-937f4423.cjs.dev.js +0 -1248
  1156. package/dist/Chunk-98371336.esm.js +0 -1167
  1157. package/dist/Chunk-f001938d.cjs.prod.js +0 -1248
  1158. package/dist/Clock-27c1110d.cjs.prod.js +0 -97
  1159. package/dist/Clock-589e9dc5.cjs.dev.js +0 -97
  1160. package/dist/Clock-ab907687.esm.js +0 -88
  1161. package/dist/Config-50e56bbd.cjs.prod.js +0 -393
  1162. package/dist/Config-7e7f7335.cjs.dev.js +0 -393
  1163. package/dist/Config-a3a06665.esm.js +0 -358
  1164. package/dist/ConfigError-5801d561.esm.js +0 -206
  1165. package/dist/ConfigError-684b6267.cjs.dev.js +0 -225
  1166. package/dist/ConfigError-f5303a19.cjs.prod.js +0 -225
  1167. package/dist/ConfigProvider-0aeb6513.esm.js +0 -220
  1168. package/dist/ConfigProvider-b47b08f3.cjs.dev.js +0 -240
  1169. package/dist/ConfigProvider-e278c5f7.cjs.prod.js +0 -240
  1170. package/dist/ConfigProviderPathPatch-78826e8c.cjs.dev.js +0 -86
  1171. package/dist/ConfigProviderPathPatch-97b52760.esm.js +0 -79
  1172. package/dist/ConfigProviderPathPatch-bb5f5228.cjs.prod.js +0 -86
  1173. package/dist/ConfigSecret-2db4c372.cjs.prod.js +0 -83
  1174. package/dist/ConfigSecret-646df696.esm.js +0 -74
  1175. package/dist/ConfigSecret-a10a12aa.cjs.dev.js +0 -83
  1176. package/dist/Console-b92ceaf0.esm.js +0 -247
  1177. package/dist/Console-d4590f3a.cjs.prod.js +0 -271
  1178. package/dist/Console-f063615c.cjs.dev.js +0 -271
  1179. package/dist/Context-119d62eb.cjs.prod.js +0 -327
  1180. package/dist/Context-231e9c1b.cjs.prod.js +0 -222
  1181. package/dist/Context-48179faa.esm.js +0 -312
  1182. package/dist/Context-5099940c.cjs.dev.js +0 -222
  1183. package/dist/Context-fcee7bba.esm.js +0 -208
  1184. package/dist/Context-fdaa5c44.cjs.dev.js +0 -327
  1185. package/dist/Data-3389525f.cjs.dev.js +0 -237
  1186. package/dist/Data-815a1868.cjs.prod.js +0 -237
  1187. package/dist/Data-bad1ffeb.esm.js +0 -224
  1188. package/dist/DefaultServices-848d6929.cjs.dev.js +0 -34
  1189. package/dist/DefaultServices-8c298120.esm.js +0 -30
  1190. package/dist/DefaultServices-9ea98d30.cjs.prod.js +0 -34
  1191. package/dist/Deferred-143efa7b.cjs.dev.js +0 -253
  1192. package/dist/Deferred-554d3588.esm.js +0 -230
  1193. package/dist/Deferred-77579e00.cjs.prod.js +0 -253
  1194. package/dist/Differ-0069a8c0.cjs.dev.js +0 -992
  1195. package/dist/Differ-3be1df41.esm.js +0 -975
  1196. package/dist/Differ-cbfa45cb.cjs.prod.js +0 -992
  1197. package/dist/Duration-205d0b80.cjs.prod.js +0 -500
  1198. package/dist/Duration-5e9f2327.esm.js +0 -467
  1199. package/dist/Duration-8b174e0b.cjs.dev.js +0 -500
  1200. package/dist/Effect-6713972b.cjs.prod.js +0 -3740
  1201. package/dist/Effect-d362f43a.cjs.dev.js +0 -3740
  1202. package/dist/Effect-d5910dae.esm.js +0 -3417
  1203. package/dist/Effectable-2c8e8441.cjs.prod.js +0 -99
  1204. package/dist/Effectable-954172fc.cjs.prod.js +0 -181
  1205. package/dist/Effectable-a76b6aa1.esm.js +0 -158
  1206. package/dist/Effectable-bc017f96.cjs.dev.js +0 -99
  1207. package/dist/Effectable-e85a1847.cjs.dev.js +0 -181
  1208. package/dist/Effectable-ec9e4204.esm.js +0 -89
  1209. package/dist/Either-09270bbc.esm.js +0 -473
  1210. package/dist/Either-34ce9059.cjs.dev.js +0 -178
  1211. package/dist/Either-41cb7522.cjs.prod.js +0 -178
  1212. package/dist/Either-ae722a9e.cjs.dev.js +0 -502
  1213. package/dist/Either-be9c40b9.esm.js +0 -163
  1214. package/dist/Either-d995ebb4.cjs.prod.js +0 -502
  1215. package/dist/Encoding-0d990bbf.esm.js +0 -295
  1216. package/dist/Encoding-39f7d9a8.cjs.dev.js +0 -309
  1217. package/dist/Encoding-82d009b9.cjs.prod.js +0 -309
  1218. package/dist/Equal-7d4ae7e7.esm.js +0 -65
  1219. package/dist/Equal-8654b1af.cjs.dev.js +0 -71
  1220. package/dist/Equal-ed1e8c3c.cjs.prod.js +0 -71
  1221. package/dist/Equivalence-87295c78.cjs.prod.js +0 -238
  1222. package/dist/Equivalence-a4b5f56d.cjs.dev.js +0 -238
  1223. package/dist/Equivalence-e5c9cba4.esm.js +0 -218
  1224. package/dist/Error-7e84d828.esm.js +0 -53
  1225. package/dist/Error-be89adc9.cjs.prod.js +0 -57
  1226. package/dist/Error-e1ceeea7.cjs.dev.js +0 -57
  1227. package/dist/ExecutionStrategy-080f0b2b.cjs.prod.js +0 -180
  1228. package/dist/ExecutionStrategy-c6f7c490.esm.js +0 -168
  1229. package/dist/ExecutionStrategy-cd9204b4.cjs.dev.js +0 -180
  1230. package/dist/Exit-7a385294.cjs.dev.js +0 -408
  1231. package/dist/Exit-e31718e3.esm.js +0 -371
  1232. package/dist/Exit-eb04f98e.cjs.prod.js +0 -408
  1233. package/dist/Fiber-1a996e3f.cjs.dev.js +0 -521
  1234. package/dist/Fiber-38517971.esm.js +0 -473
  1235. package/dist/Fiber-a7306b77.cjs.prod.js +0 -521
  1236. package/dist/FiberId-3b23bc04.cjs.dev.js +0 -443
  1237. package/dist/FiberId-556ab9ef.esm.js +0 -422
  1238. package/dist/FiberId-95c92b7e.cjs.prod.js +0 -443
  1239. package/dist/FiberRef-6f63843b.cjs.prod.js +0 -385
  1240. package/dist/FiberRef-912b6248.cjs.dev.js +0 -385
  1241. package/dist/FiberRef-b81d5a7e.esm.js +0 -338
  1242. package/dist/FiberRefs-1a6a1b5f.cjs.prod.js +0 -135
  1243. package/dist/FiberRefs-44fda74a.cjs.dev.js +0 -135
  1244. package/dist/FiberRefs-a6ab4b8d.esm.js +0 -122
  1245. package/dist/FiberRefsPatch-549967e3.cjs.prod.js +0 -90
  1246. package/dist/FiberRefsPatch-56f10acc.cjs.dev.js +0 -90
  1247. package/dist/FiberRefsPatch-f84453c3.esm.js +0 -84
  1248. package/dist/FiberStatus-90291b8c.esm.js +0 -187
  1249. package/dist/FiberStatus-db497d70.cjs.dev.js +0 -197
  1250. package/dist/FiberStatus-ff18b445.cjs.prod.js +0 -197
  1251. package/dist/Function-52fb7d21.esm.js +0 -516
  1252. package/dist/Function-8336aeeb.cjs.prod.js +0 -538
  1253. package/dist/Function-fd10bde3.cjs.dev.js +0 -538
  1254. package/dist/GlobalValue-00457222.cjs.dev.js +0 -28
  1255. package/dist/GlobalValue-c5f1e8e5.esm.js +0 -25
  1256. package/dist/GlobalValue-f65cc41d.cjs.prod.js +0 -28
  1257. package/dist/GroupBy-cabfa667.cjs.dev.js +0 -79
  1258. package/dist/GroupBy-d0ad2148.cjs.prod.js +0 -79
  1259. package/dist/GroupBy-eef333fa.esm.js +0 -72
  1260. package/dist/HKT-1990744d.esm.js +0 -5
  1261. package/dist/Hash-039222d1.esm.js +0 -179
  1262. package/dist/Hash-2171bcec.cjs.prod.js +0 -192
  1263. package/dist/Hash-9d5502e5.cjs.dev.js +0 -192
  1264. package/dist/HashMap-2604a8b0.cjs.prod.js +0 -361
  1265. package/dist/HashMap-e644e23b.esm.js +0 -327
  1266. package/dist/HashMap-ee35ace5.cjs.dev.js +0 -361
  1267. package/dist/HashSet-206ea53b.cjs.dev.js +0 -965
  1268. package/dist/HashSet-286fb998.cjs.prod.js +0 -965
  1269. package/dist/HashSet-43b520e9.cjs.dev.js +0 -283
  1270. package/dist/HashSet-99f1529e.cjs.prod.js +0 -283
  1271. package/dist/HashSet-d051e0ea.esm.js +0 -907
  1272. package/dist/HashSet-dff2542b.esm.js +0 -256
  1273. package/dist/Hub-4223bb07.cjs.prod.js +0 -1280
  1274. package/dist/Hub-9f3d5c5d.esm.js +0 -1264
  1275. package/dist/Hub-dd9d70e7.cjs.dev.js +0 -1280
  1276. package/dist/Inspectable-46a7668e.cjs.prod.js +0 -50
  1277. package/dist/Inspectable-654412c2.cjs.dev.js +0 -50
  1278. package/dist/Inspectable-bda84223.esm.js +0 -45
  1279. package/dist/KeyedPool-0b5851a2.cjs.prod.js +0 -282
  1280. package/dist/KeyedPool-50b8f75b.esm.js +0 -273
  1281. package/dist/KeyedPool-8b979aac.cjs.dev.js +0 -282
  1282. package/dist/Layer-11122c64.cjs.dev.js +0 -687
  1283. package/dist/Layer-79fa5f4a.cjs.prod.js +0 -687
  1284. package/dist/Layer-f7be72db.esm.js +0 -623
  1285. package/dist/List-48f2b78f.cjs.prod.js +0 -912
  1286. package/dist/List-95e1e081.cjs.dev.js +0 -912
  1287. package/dist/List-c066a506.esm.js +0 -865
  1288. package/dist/LogLevel-2e6b00c7.esm.js +0 -222
  1289. package/dist/LogLevel-a609dd63.cjs.prod.js +0 -240
  1290. package/dist/LogLevel-c14e29fb.cjs.dev.js +0 -240
  1291. package/dist/LogSpan-c216a78b.cjs.prod.js +0 -46
  1292. package/dist/LogSpan-cd4b8f34.cjs.dev.js +0 -46
  1293. package/dist/LogSpan-e5cf11a5.esm.js +0 -42
  1294. package/dist/Logger-029fccab.cjs.prod.js +0 -275
  1295. package/dist/Logger-28d5e7ff.cjs.dev.js +0 -275
  1296. package/dist/Logger-52ffeafa.esm.js +0 -246
  1297. package/dist/Metric-2b4867b2.cjs.dev.js +0 -488
  1298. package/dist/Metric-cd4dfaba.cjs.prod.js +0 -488
  1299. package/dist/Metric-f2c8888b.esm.js +0 -442
  1300. package/dist/MetricBoundaries-8ef331f0.cjs.dev.js +0 -68
  1301. package/dist/MetricBoundaries-9707829f.esm.js +0 -61
  1302. package/dist/MetricBoundaries-fc377a5e.cjs.prod.js +0 -68
  1303. package/dist/MetricHook-74ebef65.esm.js +0 -80
  1304. package/dist/MetricHook-9d1ff9f5.cjs.prod.js +0 -90
  1305. package/dist/MetricHook-ebd34eea.cjs.dev.js +0 -90
  1306. package/dist/MetricKey-7536999c.cjs.dev.js +0 -130
  1307. package/dist/MetricKey-d96ef128.cjs.prod.js +0 -130
  1308. package/dist/MetricKey-fb261d1b.esm.js +0 -118
  1309. package/dist/MetricKeyType-637f6694.cjs.prod.js +0 -187
  1310. package/dist/MetricKeyType-6a10f955.esm.js +0 -168
  1311. package/dist/MetricKeyType-ed70a508.cjs.dev.js +0 -187
  1312. package/dist/MetricLabel-30df73d1.esm.js +0 -48
  1313. package/dist/MetricLabel-b6a3c628.cjs.prod.js +0 -53
  1314. package/dist/MetricLabel-e6d1cb96.cjs.dev.js +0 -53
  1315. package/dist/MetricPair-5f5f6f1b.esm.js +0 -45
  1316. package/dist/MetricPair-a1551790.cjs.prod.js +0 -50
  1317. package/dist/MetricPair-f1f0edbd.cjs.dev.js +0 -50
  1318. package/dist/MetricPolling-258af71e.esm.js +0 -167
  1319. package/dist/MetricPolling-b2accbbd.cjs.dev.js +0 -177
  1320. package/dist/MetricPolling-c6caba9d.cjs.prod.js +0 -177
  1321. package/dist/MetricRegistry-2ae45fdf.cjs.dev.js +0 -38
  1322. package/dist/MetricRegistry-44d3af51.esm.js +0 -34
  1323. package/dist/MetricRegistry-d61eb47d.cjs.prod.js +0 -38
  1324. package/dist/MetricState-a3499d98.cjs.prod.js +0 -191
  1325. package/dist/MetricState-cd7a1775.cjs.dev.js +0 -191
  1326. package/dist/MetricState-d4fcb7d0.esm.js +0 -172
  1327. package/dist/MutableHashMap-b3ab7261.esm.js +0 -142
  1328. package/dist/MutableHashMap-d6cb38d9.cjs.prod.js +0 -154
  1329. package/dist/MutableHashMap-f08d01f5.cjs.dev.js +0 -154
  1330. package/dist/MutableHashSet-9e2ea672.cjs.dev.js +0 -110
  1331. package/dist/MutableHashSet-ec9f7a0b.esm.js +0 -101
  1332. package/dist/MutableHashSet-fa860611.cjs.prod.js +0 -110
  1333. package/dist/MutableList-4ef847b7.cjs.prod.js +0 -296
  1334. package/dist/MutableList-85cf4e37.cjs.dev.js +0 -296
  1335. package/dist/MutableList-8c671944.esm.js +0 -281
  1336. package/dist/MutableQueue-3dfd5fea.cjs.dev.js +0 -215
  1337. package/dist/MutableQueue-416dfcd9.cjs.prod.js +0 -215
  1338. package/dist/MutableQueue-54a4b584.esm.js +0 -202
  1339. package/dist/MutableRef-82c6fe46.cjs.prod.js +0 -194
  1340. package/dist/MutableRef-cb4d2fc0.esm.js +0 -176
  1341. package/dist/MutableRef-ef31c15d.cjs.dev.js +0 -194
  1342. package/dist/NonEmptyIterable-26ed16e4.cjs.prod.js +0 -36
  1343. package/dist/NonEmptyIterable-7ef320e0.esm.js +0 -33
  1344. package/dist/NonEmptyIterable-b064c1af.cjs.dev.js +0 -36
  1345. package/dist/Number-d021c8f9.cjs.prod.js +0 -417
  1346. package/dist/Number-dc454336.esm.js +0 -394
  1347. package/dist/Number-dddf713e.cjs.dev.js +0 -417
  1348. package/dist/Option-1d073850.esm.js +0 -1135
  1349. package/dist/Option-837ae0da.cjs.dev.js +0 -1198
  1350. package/dist/Option-b07f2b1d.cjs.prod.js +0 -1198
  1351. package/dist/Order-2f11aa24.esm.js +0 -293
  1352. package/dist/Order-2f785421.cjs.prod.js +0 -321
  1353. package/dist/Order-cbf22e18.cjs.dev.js +0 -321
  1354. package/dist/Ordering-9892085c.esm.js +0 -97
  1355. package/dist/Ordering-e20427cc.cjs.dev.js +0 -104
  1356. package/dist/Ordering-f3e378ef.cjs.prod.js +0 -104
  1357. package/dist/Pipeable-856ddd7c.cjs.prod.js +0 -52
  1358. package/dist/Pipeable-ef202667.cjs.dev.js +0 -52
  1359. package/dist/Pipeable-fe51dc02.esm.js +0 -49
  1360. package/dist/Pool-68590a64.cjs.dev.js +0 -122
  1361. package/dist/Pool-718f79ff.cjs.prod.js +0 -122
  1362. package/dist/Pool-cdfcfabe.esm.js +0 -114
  1363. package/dist/Predicate-52271838.esm.js +0 -677
  1364. package/dist/Predicate-54d8c8de.cjs.dev.js +0 -718
  1365. package/dist/Predicate-a3fd4088.cjs.prod.js +0 -718
  1366. package/dist/Queue-48d0b9d4.cjs.dev.js +0 -394
  1367. package/dist/Queue-9f8579c0.cjs.prod.js +0 -394
  1368. package/dist/Queue-bbebbeda.esm.js +0 -362
  1369. package/dist/Random-0bdc1bcb.cjs.prod.js +0 -104
  1370. package/dist/Random-14987953.esm.js +0 -94
  1371. package/dist/Random-f495bcbc.cjs.dev.js +0 -104
  1372. package/dist/ReadonlyArray-199ff80e.esm.js +0 -1584
  1373. package/dist/ReadonlyArray-3b1a15d8.cjs.dev.js +0 -10
  1374. package/dist/ReadonlyArray-6fbc78a1.cjs.prod.js +0 -1721
  1375. package/dist/ReadonlyArray-84c71385.esm.js +0 -8
  1376. package/dist/ReadonlyArray-885e80a2.cjs.dev.js +0 -1721
  1377. package/dist/ReadonlyArray-8adb9a46.cjs.prod.js +0 -10
  1378. package/dist/ReadonlyRecord-4969b34f.cjs.prod.js +0 -568
  1379. package/dist/ReadonlyRecord-c1f5d048.esm.js +0 -544
  1380. package/dist/ReadonlyRecord-c6dc7deb.cjs.dev.js +0 -568
  1381. package/dist/RedBlackTree-22839235.esm.js +0 -1632
  1382. package/dist/RedBlackTree-59192950.cjs.prod.js +0 -1669
  1383. package/dist/RedBlackTree-98a93ec6.cjs.dev.js +0 -1669
  1384. package/dist/Ref-88c1d56d.cjs.prod.js +0 -282
  1385. package/dist/Ref-8d85fc7a.cjs.dev.js +0 -282
  1386. package/dist/Ref-9a9de951.esm.js +0 -248
  1387. package/dist/Reloadable-10cfae17.esm.js +0 -159
  1388. package/dist/Reloadable-3ca716d9.cjs.prod.js +0 -169
  1389. package/dist/Reloadable-65bf6783.cjs.dev.js +0 -169
  1390. package/dist/Request-5b794c27.cjs.dev.js +0 -190
  1391. package/dist/Request-6d646956.cjs.prod.js +0 -190
  1392. package/dist/Request-9f0b571a.esm.js +0 -175
  1393. package/dist/RequestBlock-15e7d048.cjs.prod.js +0 -124
  1394. package/dist/RequestBlock-6105623d.esm.js +0 -114
  1395. package/dist/RequestBlock-ec5299d4.cjs.dev.js +0 -124
  1396. package/dist/RequestResolver-10227a7b.esm.js +0 -213
  1397. package/dist/RequestResolver-a3fe9b72.cjs.prod.js +0 -233
  1398. package/dist/RequestResolver-bc7e6050.cjs.dev.js +0 -233
  1399. package/dist/Resource-966460b5.cjs.dev.js +0 -118
  1400. package/dist/Resource-9f1084b9.cjs.prod.js +0 -118
  1401. package/dist/Resource-afd128d6.esm.js +0 -111
  1402. package/dist/Runtime-15bf8fcd.cjs.prod.js +0 -191
  1403. package/dist/Runtime-1a63e954.cjs.dev.js +0 -191
  1404. package/dist/Runtime-4f6fc384.esm.js +0 -175
  1405. package/dist/RuntimeFlags-4d3b4ba7.esm.js +0 -344
  1406. package/dist/RuntimeFlags-a43dcce7.cjs.dev.js +0 -381
  1407. package/dist/RuntimeFlags-ef10d73a.cjs.prod.js +0 -381
  1408. package/dist/RuntimeFlagsPatch-0c131e8e.cjs.dev.js +0 -411
  1409. package/dist/RuntimeFlagsPatch-a1da6096.esm.js +0 -365
  1410. package/dist/RuntimeFlagsPatch-bfdf133d.cjs.prod.js +0 -411
  1411. package/dist/STM-2bdad2bd.cjs.dev.js +0 -1447
  1412. package/dist/STM-55e91604.esm.js +0 -1321
  1413. package/dist/STM-e6749b84.cjs.prod.js +0 -1447
  1414. package/dist/Schedule-35a9436e.cjs.prod.js +0 -1159
  1415. package/dist/Schedule-d9b0f037.cjs.dev.js +0 -1159
  1416. package/dist/Schedule-da001b13.esm.js +0 -1059
  1417. package/dist/ScheduleDecision-2ab823c2.cjs.dev.js +0 -106
  1418. package/dist/ScheduleDecision-369cf2a1.cjs.prod.js +0 -106
  1419. package/dist/ScheduleDecision-e794f66d.esm.js +0 -99
  1420. package/dist/ScheduleInterval-2db9be83.cjs.dev.js +0 -244
  1421. package/dist/ScheduleInterval-3e9b8eca.cjs.prod.js +0 -244
  1422. package/dist/ScheduleInterval-94e80ec4.esm.js +0 -229
  1423. package/dist/ScheduleIntervals-ab412802.cjs.dev.js +0 -265
  1424. package/dist/ScheduleIntervals-e6ed15fa.cjs.prod.js +0 -265
  1425. package/dist/ScheduleIntervals-ef5cd7c5.esm.js +0 -252
  1426. package/dist/Scheduler-44f252da.cjs.prod.js +0 -358
  1427. package/dist/Scheduler-6122a3ee.cjs.dev.js +0 -358
  1428. package/dist/Scheduler-d2f7e5c7.esm.js +0 -343
  1429. package/dist/Scope-0ffde3bb.esm.js +0 -131
  1430. package/dist/Scope-326194e2.cjs.prod.js +0 -143
  1431. package/dist/Scope-3cf29072.cjs.dev.js +0 -143
  1432. package/dist/ScopedCache-01a07a6d.cjs.prod.js +0 -467
  1433. package/dist/ScopedCache-77c605e8.cjs.dev.js +0 -467
  1434. package/dist/ScopedCache-9c558fd1.esm.js +0 -462
  1435. package/dist/ScopedRef-2f0e2b33.cjs.dev.js +0 -87
  1436. package/dist/ScopedRef-5c29a8a2.cjs.prod.js +0 -87
  1437. package/dist/ScopedRef-dd8a823e.esm.js +0 -80
  1438. package/dist/Sink-923b4ad8.esm.js +0 -1107
  1439. package/dist/Sink-c4ca577a.cjs.prod.js +0 -1215
  1440. package/dist/Sink-fa1f105b.cjs.dev.js +0 -1215
  1441. package/dist/SortedMap-44f47d83.esm.js +0 -190
  1442. package/dist/SortedMap-abf39a75.cjs.prod.js +0 -210
  1443. package/dist/SortedMap-b04da739.cjs.dev.js +0 -210
  1444. package/dist/SortedSet-3339ea7f.esm.js +0 -288
  1445. package/dist/SortedSet-4efa4f05.cjs.dev.js +0 -311
  1446. package/dist/SortedSet-b588ac70.cjs.prod.js +0 -311
  1447. package/dist/Stack-765c2298.esm.js +0 -9
  1448. package/dist/Stream-1d51d0be.esm.js +0 -3175
  1449. package/dist/Stream-55dd689b.cjs.prod.js +0 -3469
  1450. package/dist/Stream-b1eaedfc.cjs.dev.js +0 -3469
  1451. package/dist/StreamEmit-bd696ab0.esm.js +0 -5
  1452. package/dist/StreamHaltStrategy-292ed375.cjs.dev.js +0 -214
  1453. package/dist/StreamHaltStrategy-506d4abb.cjs.prod.js +0 -214
  1454. package/dist/StreamHaltStrategy-9864a080.esm.js +0 -201
  1455. package/dist/String-9702a941.cjs.dev.js +0 -694
  1456. package/dist/String-ba45d520.esm.js +0 -648
  1457. package/dist/String-fa7c1c88.cjs.prod.js +0 -694
  1458. package/dist/Struct-3d8b2a81.cjs.prod.js +0 -141
  1459. package/dist/Struct-62f329c0.cjs.dev.js +0 -141
  1460. package/dist/Struct-8bc142d1.esm.js +0 -134
  1461. package/dist/SubscriptionRef-1eb76544.cjs.prod.js +0 -269
  1462. package/dist/SubscriptionRef-33b302b6.esm.js +0 -245
  1463. package/dist/SubscriptionRef-faf570c5.cjs.dev.js +0 -269
  1464. package/dist/Supervisor-34de9985.cjs.dev.js +0 -170
  1465. package/dist/Supervisor-3706300f.cjs.prod.js +0 -170
  1466. package/dist/Supervisor-5b9943cf.esm.js +0 -160
  1467. package/dist/Symbol-9ad0bde8.esm.js +0 -36
  1468. package/dist/Symbol-e3ea5627.cjs.dev.js +0 -40
  1469. package/dist/Symbol-e5af99ce.cjs.prod.js +0 -40
  1470. package/dist/SynchronizedRef-01f585dc.cjs.prod.js +0 -212
  1471. package/dist/SynchronizedRef-c389137f.esm.js +0 -187
  1472. package/dist/SynchronizedRef-cda883b7.cjs.dev.js +0 -212
  1473. package/dist/TArray-1200bf6a.esm.js +0 -412
  1474. package/dist/TArray-97bc3f87.cjs.prod.js +0 -455
  1475. package/dist/TArray-9bd73c38.cjs.dev.js +0 -455
  1476. package/dist/TDeferred-875fd41c.esm.js +0 -120
  1477. package/dist/TDeferred-bf21b756.cjs.prod.js +0 -129
  1478. package/dist/TDeferred-f97247d3.cjs.dev.js +0 -129
  1479. package/dist/THub-917198c0.esm.js +0 -553
  1480. package/dist/THub-c4a3e52c.cjs.dev.js +0 -570
  1481. package/dist/THub-d9d3b223.cjs.prod.js +0 -570
  1482. package/dist/TMap-459696e5.cjs.dev.js +0 -463
  1483. package/dist/TMap-786b8508.esm.js +0 -419
  1484. package/dist/TMap-a6aab3c3.cjs.prod.js +0 -463
  1485. package/dist/TPriorityQueue-31c32afb.esm.js +0 -360
  1486. package/dist/TPriorityQueue-918056c3.cjs.prod.js +0 -381
  1487. package/dist/TPriorityQueue-e8429066.cjs.dev.js +0 -381
  1488. package/dist/TQueue-adee58b8.esm.js +0 -324
  1489. package/dist/TQueue-b9593214.cjs.prod.js +0 -353
  1490. package/dist/TQueue-d1c8153e.cjs.dev.js +0 -353
  1491. package/dist/TRandom-65721a5b.cjs.prod.js +0 -203
  1492. package/dist/TRandom-677ba64f.esm.js +0 -192
  1493. package/dist/TRandom-79057bd9.cjs.dev.js +0 -203
  1494. package/dist/TReentrantLock-0dbd6074.cjs.prod.js +0 -456
  1495. package/dist/TReentrantLock-164c0898.cjs.dev.js +0 -456
  1496. package/dist/TReentrantLock-65156c11.esm.js +0 -435
  1497. package/dist/TRef-4a45f5af.cjs.dev.js +0 -152
  1498. package/dist/TRef-edd5ff88.esm.js +0 -135
  1499. package/dist/TRef-ff8497e4.cjs.prod.js +0 -152
  1500. package/dist/TSemaphore-1f5dc074.cjs.dev.js +0 -197
  1501. package/dist/TSemaphore-bccebfec.esm.js +0 -183
  1502. package/dist/TSemaphore-d1096593.cjs.prod.js +0 -197
  1503. package/dist/TSet-0f61d448.cjs.prod.js +0 -444
  1504. package/dist/TSet-48903882.cjs.dev.js +0 -444
  1505. package/dist/TSet-bd3a1de2.esm.js +0 -412
  1506. package/dist/Take-1e6b1ba3.esm.js +0 -214
  1507. package/dist/Take-7797160f.cjs.dev.js +0 -236
  1508. package/dist/Take-d245cc08.cjs.prod.js +0 -236
  1509. package/dist/TestAnnotation-5b23b64a.cjs.prod.js +0 -135
  1510. package/dist/TestAnnotation-c2b6bb64.esm.js +0 -124
  1511. package/dist/TestAnnotation-ca7ea5d9.cjs.dev.js +0 -135
  1512. package/dist/TestAnnotationMap-5ef91d33.cjs.prod.js +0 -125
  1513. package/dist/TestAnnotationMap-83b0e761.cjs.dev.js +0 -125
  1514. package/dist/TestAnnotationMap-d180214b.esm.js +0 -114
  1515. package/dist/TestAnnotations-758011e7.cjs.prod.js +0 -97
  1516. package/dist/TestAnnotations-89733ab7.cjs.dev.js +0 -97
  1517. package/dist/TestAnnotations-cf445345.esm.js +0 -91
  1518. package/dist/TestClock-0a012f75.esm.js +0 -565
  1519. package/dist/TestClock-0abac759.cjs.prod.js +0 -581
  1520. package/dist/TestClock-3bdb0c0b.cjs.dev.js +0 -581
  1521. package/dist/TestConfig-3f48c7f2.cjs.prod.js +0 -37
  1522. package/dist/TestConfig-e52495c3.esm.js +0 -33
  1523. package/dist/TestConfig-ff283076.cjs.dev.js +0 -37
  1524. package/dist/TestContext-64f40523.esm.js +0 -36
  1525. package/dist/TestContext-7a6420d3.cjs.prod.js +0 -41
  1526. package/dist/TestContext-b44d97ae.cjs.dev.js +0 -41
  1527. package/dist/TestLive-64c62bfe.cjs.dev.js +0 -60
  1528. package/dist/TestLive-906c173d.cjs.prod.js +0 -60
  1529. package/dist/TestLive-bfab4add.esm.js +0 -55
  1530. package/dist/TestServices-844e305d.esm.js +0 -306
  1531. package/dist/TestServices-944b625c.cjs.prod.js +0 -341
  1532. package/dist/TestServices-f8c51bbd.cjs.dev.js +0 -341
  1533. package/dist/TestSized-0fa739ff.cjs.prod.js +0 -64
  1534. package/dist/TestSized-3a0fa658.esm.js +0 -58
  1535. package/dist/TestSized-955a228e.cjs.dev.js +0 -64
  1536. package/dist/Tracer-1610aba4.cjs.dev.js +0 -81
  1537. package/dist/Tracer-700da80a.cjs.prod.js +0 -81
  1538. package/dist/Tracer-b07052e2.esm.js +0 -75
  1539. package/dist/Tuple-1fa12d6e.esm.js +0 -187
  1540. package/dist/Tuple-73682170.cjs.prod.js +0 -199
  1541. package/dist/Tuple-9822259f.cjs.dev.js +0 -199
  1542. package/dist/Types-be3804ad.esm.js +0 -5
  1543. package/dist/Unify-150ebcee.cjs.dev.js +0 -48
  1544. package/dist/Unify-77f78d08.cjs.prod.js +0 -48
  1545. package/dist/Unify-9d27a1f3.esm.js +0 -45
  1546. package/dist/Utils-32587b0c.cjs.dev.js +0 -370
  1547. package/dist/Utils-6484334f.cjs.prod.js +0 -370
  1548. package/dist/Utils-657e8bfa.esm.js +0 -362
  1549. package/dist/boundaries-6bacf30a.cjs.prod.js +0 -54
  1550. package/dist/boundaries-8475a9b4.esm.js +0 -48
  1551. package/dist/boundaries-c6f4c3da.cjs.dev.js +0 -54
  1552. package/dist/cache-2fa366f0.esm.js +0 -514
  1553. package/dist/cache-7b578624.cjs.prod.js +0 -523
  1554. package/dist/cache-8db60799.cjs.dev.js +0 -523
  1555. package/dist/childExecutorDecision-49f0f19c.esm.js +0 -85
  1556. package/dist/childExecutorDecision-744cd5fb.cjs.prod.js +0 -98
  1557. package/dist/childExecutorDecision-c1c3b8b6.cjs.dev.js +0 -98
  1558. package/dist/circular-1dfea59d.cjs.prod.js +0 -107
  1559. package/dist/circular-3ebc9b78.esm.js +0 -82
  1560. package/dist/circular-604e98e5.cjs.prod.js +0 -341
  1561. package/dist/circular-8088cc19.cjs.dev.js +0 -341
  1562. package/dist/circular-cff58c30.esm.js +0 -311
  1563. package/dist/circular-e5da795a.cjs.dev.js +0 -107
  1564. package/dist/config-05de256b.cjs.dev.js +0 -474
  1565. package/dist/config-3003c43a.cjs.prod.js +0 -474
  1566. package/dist/config-64a67e36.esm.js +0 -428
  1567. package/dist/configError-84c0742e.esm.js +0 -305
  1568. package/dist/configError-a7c4fcc2.cjs.dev.js +0 -323
  1569. package/dist/configError-b3dd6ec2.cjs.prod.js +0 -323
  1570. package/dist/configProvider-35a1a3c7.cjs.prod.js +0 -447
  1571. package/dist/configProvider-56d1b842.cjs.dev.js +0 -447
  1572. package/dist/configProvider-cd15d971.esm.js +0 -428
  1573. package/dist/configSecret-18ba6f6e.cjs.dev.js +0 -74
  1574. package/dist/configSecret-3dd7ab72.cjs.prod.js +0 -74
  1575. package/dist/configSecret-793e52b4.esm.js +0 -66
  1576. package/dist/core-01c0ed9d.cjs.prod.js +0 -1072
  1577. package/dist/core-218f7617.cjs.prod.js +0 -3502
  1578. package/dist/core-5346c1e5.cjs.dev.js +0 -1072
  1579. package/dist/core-9276b625.esm.js +0 -1032
  1580. package/dist/core-9f5f0dc2.esm.js +0 -3225
  1581. package/dist/core-bedc63fe.cjs.dev.js +0 -3502
  1582. package/dist/core-effect-a839563d.cjs.dev.js +0 -1030
  1583. package/dist/core-effect-e762d50b.esm.js +0 -902
  1584. package/dist/core-effect-fea8dde9.cjs.prod.js +0 -1030
  1585. package/dist/dataSource-43c62f8e.esm.js +0 -60
  1586. package/dist/dataSource-8ab8a0ec.cjs.dev.js +0 -74
  1587. package/dist/dataSource-cc1edaa1.cjs.prod.js +0 -74
  1588. package/dist/defaultServices-1d4f144a.cjs.prod.js +0 -388
  1589. package/dist/defaultServices-1f1298e8.cjs.dev.js +0 -388
  1590. package/dist/defaultServices-86214de4.esm.js +0 -359
  1591. package/dist/fiber-1511340a.esm.js +0 -363
  1592. package/dist/fiber-18f7cf87.cjs.dev.js +0 -411
  1593. package/dist/fiber-957d5291.cjs.prod.js +0 -411
  1594. package/dist/fiberRefs-76ecbcfd.cjs.dev.js +0 -181
  1595. package/dist/fiberRefs-b32de18b.esm.js +0 -169
  1596. package/dist/fiberRefs-f0429b31.cjs.prod.js +0 -181
  1597. package/dist/fiberRuntime-233db874.cjs.dev.js +0 -3012
  1598. package/dist/fiberRuntime-5e42f85c.cjs.prod.js +0 -3012
  1599. package/dist/fiberRuntime-98f09d31.esm.js +0 -2857
  1600. package/dist/groupBy-36e6ca3f.cjs.prod.js +0 -216
  1601. package/dist/groupBy-3a32c4b6.cjs.dev.js +0 -216
  1602. package/dist/groupBy-8d753c19.esm.js +0 -206
  1603. package/dist/hook-8fc9006f.esm.js +0 -362
  1604. package/dist/hook-e169b712.cjs.prod.js +0 -371
  1605. package/dist/hook-fe9f948d.cjs.dev.js +0 -371
  1606. package/dist/key-215ea6fd.esm.js +0 -68
  1607. package/dist/key-4824d1ad.cjs.prod.js +0 -79
  1608. package/dist/key-d8dc829b.cjs.dev.js +0 -79
  1609. package/dist/keyType-c980adcc.cjs.dev.js +0 -236
  1610. package/dist/keyType-d85714ed.cjs.prod.js +0 -236
  1611. package/dist/keyType-fefd9ef8.esm.js +0 -218
  1612. package/dist/label-14b7d517.cjs.dev.js +0 -44
  1613. package/dist/label-5cb21441.esm.js +0 -40
  1614. package/dist/label-e78b2f8f.cjs.prod.js +0 -44
  1615. package/dist/layer-3da5a933.cjs.prod.js +0 -658
  1616. package/dist/layer-e1d1db03.cjs.dev.js +0 -658
  1617. package/dist/layer-f8ec8454.esm.js +0 -596
  1618. package/dist/mergeDecision-32146c34.esm.js +0 -78
  1619. package/dist/mergeDecision-75feaab3.cjs.dev.js +0 -86
  1620. package/dist/mergeDecision-a1822db2.cjs.prod.js +0 -86
  1621. package/dist/mergeState-21728f0b.esm.js +0 -96
  1622. package/dist/mergeState-2c24c562.cjs.prod.js +0 -109
  1623. package/dist/mergeState-e9aa09b9.cjs.dev.js +0 -109
  1624. package/dist/mergeStrategy-84dd9011.esm.js +0 -64
  1625. package/dist/mergeStrategy-8fe47c7e.cjs.dev.js +0 -72
  1626. package/dist/mergeStrategy-909bebb0.cjs.prod.js +0 -72
  1627. package/dist/pair-67530b23.cjs.dev.js +0 -42
  1628. package/dist/pair-cb46f77c.esm.js +0 -38
  1629. package/dist/pair-fb591d12.cjs.prod.js +0 -42
  1630. package/dist/patch-99e8591b.esm.js +0 -127
  1631. package/dist/patch-cdcb5e42.cjs.dev.js +0 -132
  1632. package/dist/patch-f440dab6.cjs.prod.js +0 -132
  1633. package/dist/pathPatch-5ac830c8.esm.js +0 -83
  1634. package/dist/pathPatch-75afe967.cjs.dev.js +0 -90
  1635. package/dist/pathPatch-775a0838.cjs.prod.js +0 -90
  1636. package/dist/pool-0da00d67.cjs.prod.js +0 -278
  1637. package/dist/pool-54820a71.esm.js +0 -271
  1638. package/dist/pool-bfa5c974.cjs.dev.js +0 -278
  1639. package/dist/query-1685a476.esm.js +0 -97
  1640. package/dist/query-3ab8cd4e.cjs.prod.js +0 -104
  1641. package/dist/query-68bb7c45.cjs.dev.js +0 -104
  1642. package/dist/queue-499cacee.cjs.prod.js +0 -538
  1643. package/dist/queue-b79c472d.esm.js +0 -505
  1644. package/dist/queue-bf262207.cjs.dev.js +0 -538
  1645. package/dist/registry-38f0ed9d.esm.js +0 -111
  1646. package/dist/registry-6f465b2f.cjs.prod.js +0 -114
  1647. package/dist/registry-dfe7ed01.cjs.dev.js +0 -114
  1648. package/dist/runtime-5b7472d5.cjs.dev.js +0 -288
  1649. package/dist/runtime-68e90981.cjs.prod.js +0 -288
  1650. package/dist/runtime-f91ca239.esm.js +0 -266
  1651. package/dist/schedule-0d31f4cc.esm.js +0 -843
  1652. package/dist/schedule-616cf1b8.cjs.prod.js +0 -956
  1653. package/dist/schedule-d3f9b258.cjs.dev.js +0 -956
  1654. package/dist/scopedRef-5e59cf54.cjs.prod.js +0 -55
  1655. package/dist/scopedRef-730d8d35.cjs.dev.js +0 -55
  1656. package/dist/scopedRef-e54a3d93.esm.js +0 -49
  1657. package/dist/singleProducerAsyncInput-6508b7f1.cjs.dev.js +0 -193
  1658. package/dist/singleProducerAsyncInput-c67ef1c6.esm.js +0 -191
  1659. package/dist/singleProducerAsyncInput-d3225b4e.cjs.prod.js +0 -193
  1660. package/dist/sink-05d54662.cjs.prod.js +0 -3094
  1661. package/dist/sink-3105a90f.cjs.dev.js +0 -3094
  1662. package/dist/sink-3f26fc31.esm.js +0 -2877
  1663. package/dist/state-38610229.esm.js +0 -209
  1664. package/dist/state-6d974829.cjs.dev.js +0 -227
  1665. package/dist/state-abef4d59.cjs.prod.js +0 -227
  1666. package/dist/stm-43c3b262.cjs.dev.js +0 -678
  1667. package/dist/stm-d01a804c.esm.js +0 -582
  1668. package/dist/stm-e1200304.cjs.prod.js +0 -678
  1669. package/dist/stream-3ebec4f3.cjs.prod.js +0 -3649
  1670. package/dist/stream-9270c6b1.esm.js +0 -3355
  1671. package/dist/stream-b819c5b3.cjs.dev.js +0 -3649
  1672. package/dist/synchronizedRef-5bbb64b2.cjs.prod.js +0 -62
  1673. package/dist/synchronizedRef-e9682c8e.cjs.dev.js +0 -62
  1674. package/dist/synchronizedRef-f7077a5f.esm.js +0 -53
  1675. package/dist/tArray-0d2e8fae.cjs.dev.js +0 -330
  1676. package/dist/tArray-442d22a4.cjs.prod.js +0 -330
  1677. package/dist/tArray-fa2759e8.esm.js +0 -287
  1678. package/dist/tMap-2a001015.cjs.prod.js +0 -535
  1679. package/dist/tMap-2a98e9a7.esm.js +0 -492
  1680. package/dist/tMap-2fd8c9e6.cjs.dev.js +0 -535
  1681. package/dist/tQueue-13f8f402.esm.js +0 -331
  1682. package/dist/tQueue-84a0d0eb.cjs.dev.js +0 -367
  1683. package/dist/tQueue-e2e96d1f.cjs.prod.js +0 -367
  1684. package/dist/tRef-4772a528.cjs.prod.js +0 -133
  1685. package/dist/tRef-b5d0cc28.esm.js +0 -115
  1686. package/dist/tRef-bbbdd134.cjs.dev.js +0 -133
  1687. package/dist/take-68ed448f.cjs.dev.js +0 -152
  1688. package/dist/take-7c168e8e.esm.js +0 -130
  1689. package/dist/take-d293f721.cjs.prod.js +0 -152
  1690. package/dist/timeout-4180303d.esm.js +0 -22
  1691. package/dist/upstreamPullRequest-be86e51c.esm.js +0 -71
  1692. package/dist/upstreamPullRequest-d2eaf7f5.cjs.prod.js +0 -79
  1693. package/dist/upstreamPullRequest-f986731f.cjs.dev.js +0 -79
  1694. package/dist/upstreamPullStrategy-08e7185f.cjs.prod.js +0 -81
  1695. package/dist/upstreamPullStrategy-29c0b698.cjs.dev.js +0 -81
  1696. package/dist/upstreamPullStrategy-d1505fa4.esm.js +0 -71
@@ -0,0 +1,2984 @@
1
+ import { flipCauseOption, failureOrCause, map as map$3, isInterrupted, die as die$2, IllegalArgumentException, RuntimeException, isDieType, isRuntimeException, squash } from '../Cause/dist/effect-Cause.esm.js';
2
+ import { Done, Await } from '../ChannelMergeDecision/dist/effect-ChannelMergeDecision.esm.js';
3
+ import { empty as empty$1, isNonEmpty, of, map as map$2, range as range$1, unsafeFromArray, reduceRight, prepend as prepend$1, isEmpty, dropWhile as dropWhile$1, filter as filter$1, filterMap as filterMap$1, filterMapWhile as filterMapWhile$1, findFirst, fromIterable as fromIterable$1, flatMap as flatMap$3, takeWhile as takeWhile$1, take as take$3, drop as drop$1, appendAll, unsafeLast, zipWith as zipWith$2, reduce, append, last as last$1, splitWhere, head as head$1, mapAccum as mapAccum$1, make as make$7, unsafeGet as unsafeGet$1, flatten as flatten$2, isChunk, splitAt, takeRight as takeRight$1 } from '../Chunk/dist/effect-Chunk.esm.js';
4
+ import { sleep, currentTimeMillis } from '../Clock/dist/effect-Clock.esm.js';
5
+ import { add, unsafeGet } from '../Context/dist/effect-Context.esm.js';
6
+ import { make as make$4, succeed as succeed$2, await as _await, failCause as failCause$3, poll, fail as fail$4 } from '../Deferred/dist/effect-Deferred.esm.js';
7
+ import { toMillis, millis, greaterThan, zero } from '../Duration/dist/effect-Duration.esm.js';
8
+ import { acquireRelease as acquireRelease$1, all, when as when$1, flatMap as flatMap$2, zipRight as zipRight$1, succeed as succeed$1, map as map$1, forkScoped, scope, runtime, match as match$1, sync as sync$1, as as as$1, unit as unit$2, onError as onError$1, tap as tap$1, gen, suspend as suspend$1, transplant, die as die$1, dieSync as dieSync$1, dieMessage as dieMessage$1, makeSemaphore, matchCauseEffect, flatten as flatten$1, forEach, catchAllCause as catchAllCause$2, dropUntil as dropUntil$1, dropWhile as dropWhile$2, context as context$1, fail as fail$3, failSync as failSync$1, failCause as failCause$4, failCauseSync as failCauseSync$1, findFirst as findFirst$1, tryPromise, promise, isEffect, mapError as mapError$1, zip as zip$1, never as never$1, orDie as orDie$1, matchEffect, scoped as scoped$1, asUnit, forkDaemon, ensuring as ensuring$2, timeoutFail as timeoutFail$1, timeoutFailCause as timeoutFailCause$1, runSync, catchTags as catchTags$1, tapErrorCause as tapErrorCause$1, runPromise, withSpanScoped, raceWith, zipWith as zipWith$1, forkIn, reduce as reduce$1, catchSomeCause as catchSomeCause$1, orElse as orElse$2, zipLeft as zipLeft$1, catchAll as catchAll$2, asSome, succeedNone, fork } from '../Effect/dist/effect-Effect.esm.js';
9
+ import { match, left, right } from '../Either/dist/effect-Either.esm.js';
10
+ import { equals } from '../Equal/dist/effect-Equal.esm.js';
11
+ import { match as match$3, failCause as failCause$2, fail as fail$2, isSuccess, succeed as succeed$4, unit as unit$3, isFailure } from '../Exit/dist/effect-Exit.esm.js';
12
+ import { join, interrupt, poll as poll$1 } from '../Fiber/dist/effect-Fiber.esm.js';
13
+ import { dual, pipe, identity, constTrue } from '../Function/dist/effect-Function.esm.js';
14
+ import { bounded as bounded$1, subscribe, shutdown as shutdown$1 } from '../Hub/dist/effect-Hub.esm.js';
15
+ import { build, context as context$2, merge as merge$1 } from '../Layer/dist/effect-Layer.esm.js';
16
+ import { none, some as some$1, match as match$2, getOrElse, map as map$4, isSome, isNone } from '../Option/dist/effect-Option.esm.js';
17
+ import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
18
+ import { take as take$2, shutdown, bounded, dropping, sliding as sliding$1, isShutdown, takeBetween, offerAll, offer as offer$1, unbounded } from '../Queue/dist/effect-Queue.esm.js';
19
+ import { make as make$2, getAndSet, set, get, update, modify } from '../Ref/dist/effect-Ref.esm.js';
20
+ import { runPromiseExit } from '../Runtime/dist/effect-Runtime.esm.js';
21
+ import { forever as forever$1, driver, spaced } from '../Schedule/dist/effect-Schedule.esm.js';
22
+ import { make as make$6, close, use } from '../Scope/dist/effect-Scope.esm.js';
23
+ import { Both } from '../StreamHaltStrategy/dist/effect-StreamHaltStrategy.esm.js';
24
+ import { unwrap as unwrap$1, zipRight as zipRight$2, pipeToOrFail, unwrapScoped as unwrapScoped$1, concatMap, writeChunk, drain as drain$1, identityChannel, ensuring as ensuring$1, mapOut, mapOutEffectPar, repeated, interruptWhen as interruptWhen$1, interruptWhenDeferred as interruptWhenDeferred$1, mapOutEffect, mapError as mapError$2, mapErrorCause as mapErrorCause$1, mergeWith as mergeWith$1, orDieWith as orDieWith$1, orElse as orElse$1, catchAll as catchAll$1, runDrain as runDrain$1, scoped as scoped$2, toPull as toPull$1, fromInput as fromInput$1, mergeMap, writeAll } from './channel.esm.js';
25
+ import { run as run$1, runScoped as runScoped$1 } from './channel/channelExecutor.esm.js';
26
+ import { BufferSliding } from './channel/mergeStrategy.esm.js';
27
+ import { make as make$5 } from './channel/singleProducerAsyncInput.esm.js';
28
+ import { readWithCause, flatMap as flatMap$1, fromEffect as fromEffect$1, write, failCause as failCause$1, unit as unit$1, pipeTo, collectElements, fail as fail$1, catchAllCause as catchAllCause$1, readWith, suspend as suspend$2, succeedNow, ensuringWith as ensuringWith$1, succeed as succeed$3, provideContext as provideContext$1, foldCauseChannel, embedInput, sync as sync$2 } from './core-stream.esm.js';
29
+ import { RingBuffer } from './ringBuffer.esm.js';
30
+ import { toChannel as toChannel$1, collectAllN, mkString as mkString$1, foldSink, collectLeftover, zipRight as zipRight$3, fromEffect as fromEffect$2, fail as fail$5, fromChannel as fromChannel$1, collectAll, count, drain as drain$2, fold, foldEffect, forEach as forEach$1, forEachChunk, forEachWhile, head, last, sum } from './sink.esm.js';
31
+ import { OP_CURRENT, OP_PREVIOUS, current, OP_NOT_STARTED, notStarted, previous } from './stream/debounceState.esm.js';
32
+ import { make as make$3 } from './stream/emit.esm.js';
33
+ import { fromInput } from './stream/haltStrategy.esm.js';
34
+ import { make as make$1, offer, take as take$1 } from './stream/handoff.esm.js';
35
+ import { emit, halt, end, OP_END, OP_HALT, OP_EMIT } from './stream/handoffSignal.esm.js';
36
+ import { end as end$1, failCause as failCause$5 } from './stream/pull.esm.js';
37
+ import { ScheduleEnd, OP_SCHEDULE_END, UpstreamEnd, OP_UPSTREAM_END } from './stream/sinkEndReason.esm.js';
38
+ import { PullBoth, OP_PULL_RIGHT, DrainLeft, PullRight, OP_PULL_LEFT, DrainRight, PullLeft, OP_PULL_BOTH, OP_DRAIN_RIGHT, OP_DRAIN_LEFT } from './stream/zipAllState.esm.js';
39
+ import { PullBoth as PullBoth$1, OP_PULL_RIGHT as OP_PULL_RIGHT$1, PullRight as PullRight$1, PullLeft as PullLeft$1, OP_PULL_LEFT as OP_PULL_LEFT$1, OP_PULL_BOTH as OP_PULL_BOTH$1 } from './stream/zipChunksState.esm.js';
40
+ import { done, match as match$4, chunk, failCause as failCause$6, end as end$2, fromPull as fromPull$1, of as of$1 } from './take.esm.js';
41
+
42
+ /** @internal */
43
+ const StreamSymbolKey = "effect/Stream";
44
+
45
+ /** @internal */
46
+ const StreamTypeId = /*#__PURE__*/Symbol.for(StreamSymbolKey);
47
+
48
+ /** @internal */
49
+ const streamVariance = {
50
+ _R: _ => _,
51
+ _E: _ => _,
52
+ _A: _ => _
53
+ };
54
+
55
+ /** @internal */
56
+ class StreamImpl {
57
+ [StreamTypeId] = streamVariance;
58
+ constructor(channel) {
59
+ this.channel = channel;
60
+ }
61
+ pipe() {
62
+ return pipeArguments(this, arguments);
63
+ }
64
+ }
65
+
66
+ /** @internal */
67
+ const isStream = u => typeof u === "object" && u != null && StreamTypeId in u || isEffect(u);
68
+
69
+ /** @internal */
70
+ const DefaultChunkSize = 4096;
71
+
72
+ /** @internal */
73
+ const acquireRelease = (acquire, release) => scoped(acquireRelease$1(acquire, release));
74
+
75
+ /** @internal */
76
+ const aggregate = /*#__PURE__*/dual(2, (self, sink) => aggregateWithin(self, sink, forever$1));
77
+
78
+ /** @internal */
79
+ const aggregateWithin = /*#__PURE__*/dual(3, (self, sink, schedule) => filterMap(aggregateWithinEither(self, sink, schedule), _ => match(_, {
80
+ onLeft: none,
81
+ onRight: some$1
82
+ })));
83
+
84
+ /** @internal */
85
+ const aggregateWithinEither = /*#__PURE__*/dual(3, (self, sink, schedule) => {
86
+ const layer = all([make$1(), make$2(ScheduleEnd), make$2(empty$1()), driver(schedule), make$2(false), make$2(false)]);
87
+ return pipe(fromEffect(layer), flatMap(([handoff, sinkEndReason, sinkLeftovers, scheduleDriver, consumed, endAfterEmit]) => {
88
+ const handoffProducer = readWithCause({
89
+ onInput: input => flatMap$1(fromEffect$1(pipe(handoff, offer(emit(input)), when$1(() => isNonEmpty(input)))), () => handoffProducer),
90
+ onFailure: cause => fromEffect$1(offer(handoff, halt(cause))),
91
+ onDone: () => fromEffect$1(offer(handoff, end(UpstreamEnd)))
92
+ });
93
+ const handoffConsumer = pipe(getAndSet(sinkLeftovers, empty$1()), flatMap$2(leftovers => {
94
+ if (isNonEmpty(leftovers)) {
95
+ return pipe(set(consumed, true), zipRight$1(succeed$1(pipe(write(leftovers), flatMap$1(() => handoffConsumer)))));
96
+ }
97
+ return pipe(take$1(handoff), map$1(signal => {
98
+ switch (signal._tag) {
99
+ case OP_EMIT:
100
+ {
101
+ return pipe(fromEffect$1(set(consumed, true)), zipRight$2(write(signal.elements)), zipRight$2(fromEffect$1(get(endAfterEmit))), flatMap$1(bool => bool ? unit$1 : handoffConsumer));
102
+ }
103
+ case OP_HALT:
104
+ {
105
+ return failCause$1(signal.cause);
106
+ }
107
+ case OP_END:
108
+ {
109
+ if (signal.reason._tag === OP_SCHEDULE_END) {
110
+ return pipe(get(consumed), map$1(bool => bool ? fromEffect$1(pipe(set(sinkEndReason, ScheduleEnd), zipRight$1(set(endAfterEmit, true)))) : pipe(fromEffect$1(pipe(set(sinkEndReason, ScheduleEnd), zipRight$1(set(endAfterEmit, true)))), flatMap$1(() => handoffConsumer))), unwrap$1);
111
+ }
112
+ return pipe(set(sinkEndReason, signal.reason), zipRight$1(set(endAfterEmit, true)), fromEffect$1);
113
+ }
114
+ }
115
+ }));
116
+ }), unwrap$1);
117
+ const timeout = lastB => scheduleDriver.next(lastB);
118
+ const scheduledAggregator = (sinkFiber, scheduleFiber, scope) => {
119
+ const forkSink = pipe(set(consumed, false), zipRight$1(set(endAfterEmit, false)), zipRight$1(pipe(handoffConsumer, pipeToOrFail(toChannel$1(sink)), collectElements, run$1, forkIn(scope))));
120
+ const handleSide = (leftovers, b, c) => pipe(set(sinkLeftovers, flatten$2(leftovers)), zipRight$1(map$1(get(sinkEndReason), reason => {
121
+ switch (reason._tag) {
122
+ case OP_SCHEDULE_END:
123
+ {
124
+ return pipe(all([get(consumed), forkSink, pipe(timeout(some$1(b)), forkIn(scope))]), map$1(([wasConsumed, sinkFiber, scheduleFiber]) => {
125
+ const toWrite = pipe(c, match$2({
126
+ onNone: () => of(right(b)),
127
+ onSome: c => make$7(right(b), left(c))
128
+ }));
129
+ if (wasConsumed) {
130
+ return pipe(write(toWrite), flatMap$1(() => scheduledAggregator(sinkFiber, scheduleFiber, scope)));
131
+ }
132
+ return scheduledAggregator(sinkFiber, scheduleFiber, scope);
133
+ }), unwrap$1);
134
+ }
135
+ case OP_UPSTREAM_END:
136
+ {
137
+ return pipe(get(consumed), map$1(wasConsumed => wasConsumed ? write(of(right(b))) : unit$1), unwrap$1);
138
+ }
139
+ }
140
+ })), unwrap$1);
141
+ return unwrap$1(raceWith(join(sinkFiber), join(scheduleFiber), {
142
+ onSelfDone: (sinkExit, _) => pipe(interrupt(scheduleFiber), zipRight$1(pipe(suspend$1(() => sinkExit), map$1(([leftovers, b]) => handleSide(leftovers, b, none()))))),
143
+ onOtherDone: (scheduleExit, _) => matchCauseEffect(suspend$1(() => scheduleExit), {
144
+ onFailure: cause => match(failureOrCause(cause), {
145
+ onLeft: () => pipe(handoff, offer(end(ScheduleEnd)), forkDaemon, zipRight$1(pipe(join(sinkFiber), map$1(([leftovers, b]) => handleSide(leftovers, b, none()))))),
146
+ onRight: cause => pipe(handoff, offer(halt(cause)), forkDaemon, zipRight$1(pipe(join(sinkFiber), map$1(([leftovers, b]) => handleSide(leftovers, b, none())))))
147
+ }),
148
+ onSuccess: c => pipe(handoff, offer(end(ScheduleEnd)), forkDaemon, zipRight$1(pipe(join(sinkFiber), map$1(([leftovers, b]) => handleSide(leftovers, b, some$1(c))))))
149
+ })
150
+ }));
151
+ };
152
+ return unwrapScoped(pipe(self, toChannel, pipeTo(handoffProducer), run$1, forkScoped, zipRight$1(pipe(handoffConsumer, pipeToOrFail(toChannel$1(sink)), collectElements, run$1, forkScoped, flatMap$2(sinkFiber => pipe(forkScoped(timeout(none())), flatMap$2(scheduleFiber => pipe(scope, map$1(scope => new StreamImpl(scheduledAggregator(sinkFiber, scheduleFiber, scope)))))))))));
153
+ }));
154
+ });
155
+
156
+ /** @internal */
157
+ const as = /*#__PURE__*/dual(2, (self, value) => map(self, () => value));
158
+
159
+ /** @internal */
160
+ const _async = (register, outputBuffer = 16) => asyncOption(cb => {
161
+ register(cb);
162
+ return none();
163
+ }, outputBuffer);
164
+
165
+ /** @internal */
166
+ const asyncEffect = (register, outputBuffer = 16) => pipe(acquireRelease$1(bounded(outputBuffer), queue => shutdown(queue)), flatMap$2(output => pipe(runtime(), flatMap$2(runtime => pipe(register(make$3(k => pipe(fromPull$1(k), flatMap$2(take => offer$1(output, take)), asUnit, runPromiseExit(runtime)).then(exit => {
167
+ if (isFailure(exit)) {
168
+ if (!isInterrupted(exit.cause)) {
169
+ throw squash(exit.cause);
170
+ }
171
+ }
172
+ }))), map$1(() => {
173
+ const loop = pipe(take$2(output), flatMap$2(done), match$1({
174
+ onFailure: maybeError => pipe(fromEffect$1(shutdown(output)), zipRight$2(match$2(maybeError, {
175
+ onNone: () => unit$1,
176
+ onSome: fail$1
177
+ }))),
178
+ onSuccess: chunk => pipe(write(chunk), flatMap$1(() => loop))
179
+ }), unwrap$1);
180
+ return loop;
181
+ }))))), unwrapScoped$1, fromChannel);
182
+
183
+ /** @internal */
184
+ const asyncInterrupt = (register, outputBuffer = 16) => pipe(acquireRelease$1(bounded(outputBuffer), queue => shutdown(queue)), flatMap$2(output => pipe(runtime(), flatMap$2(runtime => pipe(sync$1(() => register(make$3(k => pipe(fromPull$1(k), flatMap$2(take => offer$1(output, take)), asUnit, runPromiseExit(runtime)).then(exit => {
185
+ if (isFailure(exit)) {
186
+ if (!isInterrupted(exit.cause)) {
187
+ throw squash(exit.cause);
188
+ }
189
+ }
190
+ })))), map$1(match({
191
+ onLeft: canceler => {
192
+ const loop = pipe(take$2(output), flatMap$2(done), match$1({
193
+ onFailure: maybeError => zipRight$2(fromEffect$1(shutdown(output)), match$2(maybeError, {
194
+ onNone: () => unit$1,
195
+ onSome: fail$1
196
+ })),
197
+ onSuccess: chunk => pipe(write(chunk), flatMap$1(() => loop))
198
+ }), unwrap$1);
199
+ return pipe(fromChannel(loop), ensuring(canceler));
200
+ },
201
+ onRight: stream => unwrap(pipe(shutdown(output), as$1(stream)))
202
+ })))))), unwrapScoped);
203
+
204
+ /** @internal */
205
+ const asyncOption = (register, outputBuffer = 16) => asyncInterrupt(emit => match$2(register(emit), {
206
+ onNone: () => left(unit$2),
207
+ onSome: right
208
+ }), outputBuffer);
209
+
210
+ /** @internal */
211
+ const asyncScoped = (register, outputBuffer = 16) => pipe(acquireRelease$1(bounded(outputBuffer), queue => shutdown(queue)), flatMap$2(output => pipe(runtime(), flatMap$2(runtime => pipe(register(make$3(k => pipe(fromPull$1(k), flatMap$2(take => offer$1(output, take)), asUnit, runPromiseExit(runtime)).then(exit => {
212
+ if (isFailure(exit)) {
213
+ if (!isInterrupted(exit.cause)) {
214
+ throw squash(exit.cause);
215
+ }
216
+ }
217
+ }))), zipRight$1(make$2(false)), flatMap$2(ref => pipe(get(ref), map$1(isDone => isDone ? end$1() : pipe(take$2(output), flatMap$2(done), onError$1(() => pipe(set(ref, true), zipRight$1(shutdown(output)))))))))))), scoped, flatMap(repeatEffectChunkOption));
218
+
219
+ /** @internal */
220
+ const branchAfter = /*#__PURE__*/dual(3, (self, n, f) => suspend(() => {
221
+ const buffering = acc => readWith({
222
+ onInput: input => {
223
+ const nextSize = acc.length + input.length;
224
+ if (nextSize >= n) {
225
+ const [b1, b2] = pipe(input, splitAt(n - acc.length));
226
+ return running(pipe(acc, appendAll(b1)), b2);
227
+ }
228
+ return buffering(pipe(acc, appendAll(input)));
229
+ },
230
+ onFailure: fail$1,
231
+ onDone: () => running(acc, empty$1())
232
+ });
233
+ const running = (prefix, leftover) => pipeTo(zipRight$2(write(leftover), identityChannel()), toChannel(f(prefix)));
234
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(buffering(empty$1()))));
235
+ }));
236
+
237
+ /** @internal */
238
+ const broadcast = /*#__PURE__*/dual(3, (self, n, maximumLag) => pipe(self, broadcastedQueues(n, maximumLag), map$1(tuple => tuple.map(queue => flattenTake(fromQueue(queue, {
239
+ shutdown: true
240
+ }))))));
241
+
242
+ /** @internal */
243
+ const broadcastDynamic = /*#__PURE__*/dual(2, (self, maximumLag) => pipe(self, broadcastedQueuesDynamic(maximumLag), map$1(effect => flattenTake(flatMap(scoped(effect), fromQueue)))));
244
+
245
+ /** @internal */
246
+ const broadcastedQueues = /*#__PURE__*/dual(3, (self, n, maximumLag) => flatMap$2(bounded$1(maximumLag), hub => pipe(all(Array.from({
247
+ length: n
248
+ }, () => subscribe(hub))), tap$1(() => forkScoped(runIntoHubScoped(self, hub))))));
249
+
250
+ /** @internal */
251
+ const broadcastedQueuesDynamic = /*#__PURE__*/dual(2, (self, maximumLag) => map$1(toHub(self, maximumLag), subscribe));
252
+
253
+ /** @internal */
254
+ const buffer = /*#__PURE__*/dual(2, (self, options) => {
255
+ if (options.capacity === "unbounded") {
256
+ return bufferUnbounded(self);
257
+ } else if (options.strategy === "dropping") {
258
+ return bufferDropping(self, options.capacity);
259
+ } else if (options.strategy === "sliding") {
260
+ return bufferSliding(self, options.capacity);
261
+ }
262
+ const queue = toQueueOfElements(self, options);
263
+ return new StreamImpl(unwrapScoped$1(map$1(queue, queue => {
264
+ const process = pipe(fromEffect$1(take$2(queue)), flatMap$1(match$3({
265
+ onFailure: cause => pipe(flipCauseOption(cause), match$2({
266
+ onNone: () => unit$1,
267
+ onSome: failCause$1
268
+ })),
269
+ onSuccess: value => flatMap$1(write(of(value)), () => process)
270
+ })));
271
+ return process;
272
+ })));
273
+ });
274
+
275
+ /** @internal */
276
+ const bufferChunks = /*#__PURE__*/dual(2, (self, options) => {
277
+ if (options.strategy === "dropping") {
278
+ return bufferChunksDropping(self, options.capacity);
279
+ } else if (options.strategy === "sliding") {
280
+ return bufferChunksSliding(self, options.capacity);
281
+ }
282
+ const queue = toQueue(self, options);
283
+ return new StreamImpl(unwrapScoped$1(map$1(queue, queue => {
284
+ const process = pipe(fromEffect$1(take$2(queue)), flatMap$1(match$4({
285
+ onEnd: () => unit$1,
286
+ onFailure: failCause$1,
287
+ onSuccess: value => pipe(write(value), flatMap$1(() => process))
288
+ })));
289
+ return process;
290
+ })));
291
+ });
292
+ const bufferChunksDropping = /*#__PURE__*/dual(2, (self, capacity) => {
293
+ const queue = acquireRelease$1(dropping(capacity), queue => shutdown(queue));
294
+ return new StreamImpl(bufferSignal(queue, toChannel(self)));
295
+ });
296
+ const bufferChunksSliding = /*#__PURE__*/dual(2, (self, capacity) => {
297
+ const queue = acquireRelease$1(sliding$1(capacity), queue => shutdown(queue));
298
+ return new StreamImpl(bufferSignal(queue, toChannel(self)));
299
+ });
300
+ const bufferDropping = /*#__PURE__*/dual(2, (self, capacity) => {
301
+ const queue = acquireRelease$1(dropping(capacity), queue => shutdown(queue));
302
+ return new StreamImpl(bufferSignal(queue, toChannel(rechunk(1)(self))));
303
+ });
304
+ const bufferSliding = /*#__PURE__*/dual(2, (self, capacity) => {
305
+ const queue = acquireRelease$1(sliding$1(capacity), queue => shutdown(queue));
306
+ return new StreamImpl(bufferSignal(queue, toChannel(pipe(self, rechunk(1)))));
307
+ });
308
+ const bufferUnbounded = self => {
309
+ const queue = toQueue(self, {
310
+ strategy: "unbounded"
311
+ });
312
+ return new StreamImpl(unwrapScoped$1(map$1(queue, queue => {
313
+ const process = pipe(fromEffect$1(take$2(queue)), flatMap$1(match$4({
314
+ onEnd: () => unit$1,
315
+ onFailure: failCause$1,
316
+ onSuccess: value => flatMap$1(write(value), () => process)
317
+ })));
318
+ return process;
319
+ })));
320
+ };
321
+
322
+ /** @internal */
323
+ const bufferSignal = (scoped, bufferChannel) => {
324
+ const producer = (queue, ref) => {
325
+ const terminate = take => pipe(get(ref), tap$1(_await), zipRight$1(make$4()), flatMap$2(deferred => pipe(offer$1(queue, [take, deferred]), zipRight$1(set(ref, deferred)), zipRight$1(_await(deferred)))), asUnit, fromEffect$1);
326
+ return readWithCause({
327
+ onInput: input => pipe(make$4(), flatMap$2(deferred => pipe(offer$1(queue, [chunk(input), deferred]), flatMap$2(added => pipe(set(ref, deferred), when$1(() => added))))), asUnit, fromEffect$1, flatMap$1(() => producer(queue, ref))),
328
+ onFailure: error => terminate(failCause$6(error)),
329
+ onDone: () => terminate(end$2)
330
+ });
331
+ };
332
+ const consumer = queue => {
333
+ const process = pipe(fromEffect$1(take$2(queue)), flatMap$1(([take, deferred]) => zipRight$2(fromEffect$1(succeed$2(deferred, void 0)), match$4(take, {
334
+ onEnd: () => unit$1,
335
+ onFailure: failCause$1,
336
+ onSuccess: value => pipe(write(value), flatMap$1(() => process))
337
+ }))));
338
+ return process;
339
+ };
340
+ return unwrapScoped$1(pipe(scoped, flatMap$2(queue => pipe(make$4(), tap$1(start => succeed$2(start, void 0)), flatMap$2(start => pipe(make$2(start), flatMap$2(ref => pipe(bufferChannel, pipeTo(producer(queue, ref)), runScoped$1, forkScoped)), as$1(consumer(queue))))))));
341
+ };
342
+
343
+ /** @internal */
344
+ const catchAll = /*#__PURE__*/dual(2, (self, f) => catchAllCause(self, cause => match(failureOrCause(cause), {
345
+ onLeft: f,
346
+ onRight: failCause
347
+ })));
348
+
349
+ /** @internal */
350
+ const catchAllCause = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), catchAllCause$1(cause => toChannel(f(cause))))));
351
+
352
+ /** @internal */
353
+ const catchSome = /*#__PURE__*/dual(2, (self, pf) => pipe(self, catchAll(error => pipe(pf(error), getOrElse(() => fail(error))))));
354
+
355
+ /** @internal */
356
+ const catchSomeCause = /*#__PURE__*/dual(2, (self, pf) => pipe(self, catchAllCause(cause => pipe(pf(cause), getOrElse(() => failCause(cause))))));
357
+
358
+ /* @internal */
359
+ const catchTag = /*#__PURE__*/dual(3, (self, k, f) => catchAll(self, e => {
360
+ if ("_tag" in e && e["_tag"] === k) {
361
+ return f(e);
362
+ }
363
+ return fail(e);
364
+ }));
365
+
366
+ /** @internal */
367
+ const catchTags = /*#__PURE__*/dual(2, (self, cases) => catchAll(self, e => {
368
+ const keys = Object.keys(cases);
369
+ if ("_tag" in e && keys.includes(e["_tag"])) {
370
+ return cases[e["_tag"]](e);
371
+ }
372
+ return fail(e);
373
+ }));
374
+
375
+ /** @internal */
376
+ const changes = self => pipe(self, changesWith((x, y) => equals(y)(x)));
377
+
378
+ /** @internal */
379
+ const changesWith = /*#__PURE__*/dual(2, (self, f) => {
380
+ const writer = last => readWithCause({
381
+ onInput: input => {
382
+ const [newLast, newChunk] = reduce(input, [last, empty$1()], ([option, outputs], output) => {
383
+ if (isSome(option) && f(option.value, output)) {
384
+ return [some$1(output), outputs];
385
+ }
386
+ return [some$1(output), pipe(outputs, append(output))];
387
+ });
388
+ return flatMap$1(write(newChunk), () => writer(newLast));
389
+ },
390
+ onFailure: failCause$1,
391
+ onDone: () => unit$1
392
+ });
393
+ return new StreamImpl(pipe(toChannel(self), pipeTo(writer(none()))));
394
+ });
395
+
396
+ /** @internal */
397
+ const changesWithEffect = /*#__PURE__*/dual(2, (self, f) => {
398
+ const writer = last => readWithCause({
399
+ onInput: input => pipe(input, reduce$1([last, empty$1()], ([option, outputs], output) => {
400
+ if (isSome(option)) {
401
+ return pipe(f(option.value, output), map$1(bool => bool ? [some$1(output), outputs] : [some$1(output), pipe(outputs, append(output))]));
402
+ }
403
+ return succeed$1([some$1(output), pipe(outputs, append(output))]);
404
+ }), fromEffect$1, flatMap$1(([newLast, newChunk]) => pipe(write(newChunk), flatMap$1(() => writer(newLast))))),
405
+ onFailure: failCause$1,
406
+ onDone: () => unit$1
407
+ });
408
+ return new StreamImpl(pipe(toChannel(self), pipeTo(writer(none()))));
409
+ });
410
+
411
+ /** @internal */
412
+ const chunks = self => pipe(self, mapChunks(of));
413
+
414
+ /** @internal */
415
+ const chunksWith = /*#__PURE__*/dual(2, (self, f) => flattenChunks(f(chunks(self))));
416
+ const unsome = effect => catchAll$2(asSome(effect), o => o._tag === "None" ? succeedNone : fail$3(o.value));
417
+
418
+ /** @internal */
419
+ const combine = /*#__PURE__*/dual(4, (self, that, s, f) => {
420
+ const producer = (handoff, latch) => pipe(fromEffect$1(take$1(latch)), zipRight$2(readWithCause({
421
+ onInput: input => flatMap$1(fromEffect$1(pipe(handoff, offer(succeed$4(input)))), () => producer(handoff, latch)),
422
+ onFailure: cause => fromEffect$1(offer(handoff, failCause$2(pipe(cause, map$3(some$1))))),
423
+ onDone: () => flatMap$1(fromEffect$1(offer(handoff, fail$2(none()))), () => producer(handoff, latch))
424
+ })));
425
+ return new StreamImpl(unwrapScoped$1(gen(function* ($) {
426
+ const left = yield* $(make$1());
427
+ const right = yield* $(make$1());
428
+ const latchL = yield* $(make$1());
429
+ const latchR = yield* $(make$1());
430
+ yield* $(toChannel(self), concatMap(writeChunk), pipeTo(producer(left, latchL)), runScoped$1, forkScoped);
431
+ yield* $(toChannel(that), concatMap(writeChunk), pipeTo(producer(right, latchR)), runScoped$1, forkScoped);
432
+ const pullLeft = pipe(latchL, offer(void 0),
433
+ // TODO: remove
434
+ zipRight$1(pipe(take$1(left), flatMap$2(exit => suspend$1(() => exit)))));
435
+ const pullRight = pipe(latchR, offer(void 0),
436
+ // TODO: remove
437
+ zipRight$1(pipe(take$1(right), flatMap$2(exit => suspend$1(() => exit)))));
438
+ return toChannel(unfoldEffect(s, s => flatMap$2(f(s, pullLeft, pullRight), unsome)));
439
+ })));
440
+ });
441
+
442
+ /** @internal */
443
+ const combineChunks = /*#__PURE__*/dual(4, (self, that, s, f) => {
444
+ const producer = (handoff, latch) => zipRight$2(fromEffect$1(take$1(latch)), readWithCause({
445
+ onInput: input => flatMap$1(fromEffect$1(pipe(handoff, offer(chunk(input)))), () => producer(handoff, latch)),
446
+ onFailure: cause => fromEffect$1(offer(handoff, failCause$6(cause))),
447
+ onDone: () => fromEffect$1(offer(handoff, end$2))
448
+ }));
449
+ return new StreamImpl(pipe(all([make$1(), make$1(), make$1(), make$1()]), tap$1(([left, _, latchL]) => pipe(toChannel(self), pipeTo(producer(left, latchL)), runScoped$1, forkScoped)), tap$1(([_, right, __, latchR]) => pipe(toChannel(that), pipeTo(producer(right, latchR)), runScoped$1, forkScoped)), map$1(([left, right, latchL, latchR]) => {
450
+ const pullLeft = pipe(latchL, offer(void 0), zipRight$1(pipe(take$1(left), flatMap$2(done))));
451
+ const pullRight = pipe(latchR, offer(void 0), zipRight$1(pipe(take$1(right), flatMap$2(done))));
452
+ return toChannel(unfoldChunkEffect(s, s => flatMap$2(f(s, pullLeft, pullRight), unsome)));
453
+ }), unwrapScoped$1));
454
+ });
455
+
456
+ /** @internal */
457
+ const concat = /*#__PURE__*/dual(2, (self, that) => new StreamImpl(pipe(toChannel(self), zipRight$2(toChannel(that)))));
458
+
459
+ /** @internal */
460
+ const concatAll = streams => suspend(() => pipe(streams, reduce(empty, (x, y) => concat(y)(x))));
461
+
462
+ /** @internal */
463
+ const cross = /*#__PURE__*/dual(2, (self, that) => pipe(self, crossWith(that, (a, a2) => [a, a2])));
464
+
465
+ /** @internal */
466
+ const crossLeft = /*#__PURE__*/dual(2, (self, that) => pipe(self, crossWith(that, (a, _) => a)));
467
+
468
+ /** @internal */
469
+ const crossRight = /*#__PURE__*/dual(2, (self, that) => flatMap(self, () => that));
470
+
471
+ /** @internal */
472
+ const crossWith = /*#__PURE__*/dual(3, (self, that, f) => pipe(self, flatMap(a => pipe(that, map(b => f(a, b))))));
473
+
474
+ /** @internal */
475
+ const debounce = /*#__PURE__*/dual(2, (self, duration) => pipe(make$5(), flatMap$2(input => transplant(grafter => pipe(make$1(), map$1(handoff => {
476
+ const enqueue = last => pipe(sleep(duration), as$1(last), fork, grafter, map$1(fiber => consumer(previous(fiber))));
477
+ const producer = readWithCause({
478
+ onInput: input => match$2(last$1(input), {
479
+ onNone: () => producer,
480
+ onSome: last => flatMap$1(fromEffect$1(offer(handoff, emit(of(last)))), () => producer)
481
+ }),
482
+ onFailure: cause => fromEffect$1(offer(handoff, halt(cause))),
483
+ onDone: () => fromEffect$1(offer(handoff, end(UpstreamEnd)))
484
+ });
485
+ const consumer = state => {
486
+ switch (state._tag) {
487
+ case OP_NOT_STARTED:
488
+ {
489
+ return pipe(take$1(handoff), map$1(signal => {
490
+ switch (signal._tag) {
491
+ case OP_EMIT:
492
+ {
493
+ return unwrap$1(enqueue(signal.elements));
494
+ }
495
+ case OP_HALT:
496
+ {
497
+ return failCause$1(signal.cause);
498
+ }
499
+ case OP_END:
500
+ {
501
+ return unit$1;
502
+ }
503
+ }
504
+ }), unwrap$1);
505
+ }
506
+ case OP_PREVIOUS:
507
+ {
508
+ return unwrap$1(raceWith(join(state.fiber), take$1(handoff), {
509
+ onSelfDone: (leftExit, current$1) => match$3(leftExit, {
510
+ onFailure: cause => pipe(interrupt(current$1), as$1(failCause$1(cause))),
511
+ onSuccess: chunk => succeed$1(pipe(write(chunk), flatMap$1(() => consumer(current(current$1)))))
512
+ }),
513
+ onOtherDone: (rightExit, previous) => match$3(rightExit, {
514
+ onFailure: cause => pipe(interrupt(previous), as$1(failCause$1(cause))),
515
+ onSuccess: signal => {
516
+ switch (signal._tag) {
517
+ case OP_EMIT:
518
+ {
519
+ return pipe(interrupt(previous), zipRight$1(enqueue(signal.elements)));
520
+ }
521
+ case OP_HALT:
522
+ {
523
+ return pipe(interrupt(previous), as$1(failCause$1(signal.cause)));
524
+ }
525
+ case OP_END:
526
+ {
527
+ return pipe(join(previous), map$1(chunk => pipe(write(chunk), zipRight$2(unit$1))));
528
+ }
529
+ }
530
+ }
531
+ })
532
+ }));
533
+ }
534
+ case OP_CURRENT:
535
+ {
536
+ return pipe(join(state.fiber), map$1(signal => {
537
+ switch (signal._tag) {
538
+ case OP_EMIT:
539
+ {
540
+ return unwrap$1(enqueue(signal.elements));
541
+ }
542
+ case OP_HALT:
543
+ {
544
+ return failCause$1(signal.cause);
545
+ }
546
+ case OP_END:
547
+ {
548
+ return unit$1;
549
+ }
550
+ }
551
+ }), unwrap$1);
552
+ }
553
+ }
554
+ };
555
+ const debounceChannel = pipe(fromInput$1(input), pipeTo(producer), run$1, forkScoped, as$1(pipe(consumer(notStarted), embedInput(input))), unwrapScoped$1);
556
+ return new StreamImpl(pipe(toChannel(self), pipeTo(debounceChannel)));
557
+ })))), unwrap));
558
+
559
+ /** @internal */
560
+ const die = defect => fromEffect(die$1(defect));
561
+
562
+ /** @internal */
563
+ const dieSync = evaluate => fromEffect(dieSync$1(evaluate));
564
+
565
+ /** @internal */
566
+ const dieMessage = message => fromEffect(dieMessage$1(message));
567
+
568
+ /** @internal */
569
+ const distributedWith = /*#__PURE__*/dual(2, (self, options) => pipe(make$4(), flatMap$2(deferred => pipe(self, distributedWithDynamic({
570
+ maximumLag: options.maximumLag,
571
+ decide: a => flatMap$2(_await(deferred), f => f(a))
572
+ }), flatMap$2(next => pipe(all(map$2(range$1(0, options.size - 1), id => map$1(next, ([key, queue]) => [[key, id], queue]))), map$1(unsafeFromArray), flatMap$2(entries => {
573
+ const [mappings, queues] = reduceRight(entries, [new Map(), empty$1()], ([mappings, queues], [mapping, queue]) => [mappings.set(mapping[0], mapping[1]), pipe(queues, prepend$1(queue))]);
574
+ return pipe(succeed$2(deferred, a => map$1(options.decide(a), f => key => pipe(f(mappings.get(key))))), as$1(Array.from(queues)));
575
+ })))))));
576
+
577
+ /** @internal */
578
+ const distributedWithDynamicId = {
579
+ ref: 0
580
+ };
581
+ const newDistributedWithDynamicId = () => {
582
+ const current = distributedWithDynamicId.ref;
583
+ distributedWithDynamicId.ref = current + 1;
584
+ return current;
585
+ };
586
+
587
+ /** @internal */
588
+ const distributedWithDynamic = /*#__PURE__*/dual(2, (self, options) => distributedWithDynamicCallback(self, options.maximumLag, options.decide, () => unit$2));
589
+ const distributedWithDynamicCallback = /*#__PURE__*/dual(4, (self, maximumLag, decide, done) => pipe(acquireRelease$1(make$2(new Map()), (ref, _) => pipe(get(ref), flatMap$2(queues => pipe(queues.values(), forEach(shutdown))))), flatMap$2(queuesRef => gen(function* ($) {
590
+ const offer = a => pipe(decide(a), flatMap$2(shouldProcess => pipe(get(queuesRef), flatMap$2(queues => pipe(queues.entries(), reduce$1(empty$1(), (acc, [id, queue]) => {
591
+ if (shouldProcess(id)) {
592
+ return pipe(offer$1(queue, succeed$4(a)), matchCauseEffect({
593
+ onFailure: cause =>
594
+ // Ignore all downstream queues that were shut
595
+ // down and remove them later
596
+ isInterrupted(cause) ? succeed$1(pipe(acc, prepend$1(id))) : failCause$4(cause),
597
+ onSuccess: () => succeed$1(acc)
598
+ }));
599
+ }
600
+ return succeed$1(acc);
601
+ }), flatMap$2(ids => {
602
+ if (isNonEmpty(ids)) {
603
+ return pipe(update(queuesRef, map => {
604
+ for (const id of ids) {
605
+ map.delete(id);
606
+ }
607
+ return map;
608
+ }));
609
+ }
610
+ return unit$2;
611
+ }))))), asUnit);
612
+ const queuesLock = yield* $(makeSemaphore(1));
613
+ const newQueue = yield* $(make$2(pipe(bounded(maximumLag), flatMap$2(queue => {
614
+ const id = newDistributedWithDynamicId();
615
+ return pipe(update(queuesRef, map => map.set(id, queue)), as$1([id, queue]));
616
+ }))));
617
+ const finalize = endTake =>
618
+ // Make sure that no queues are currently being added
619
+ queuesLock.withPermits(1)(pipe(set(newQueue, pipe(
620
+ // All newly created queues should end immediately
621
+ bounded(1), tap$1(queue => offer$1(queue, endTake)), flatMap$2(queue => {
622
+ const id = newDistributedWithDynamicId();
623
+ return pipe(update(queuesRef, map => map.set(id, queue)), as$1([id, queue]));
624
+ }))), zipRight$1(pipe(get(queuesRef), flatMap$2(map => pipe(fromIterable$1(map.values()), forEach(queue => pipe(offer$1(queue, endTake), catchSomeCause$1(cause => isInterrupted(cause) ? some$1(unit$2) : none()))))))), zipRight$1(done(endTake)), asUnit));
625
+ yield* $(self, runForEachScoped(offer), matchCauseEffect({
626
+ onFailure: cause => finalize(failCause$2(pipe(cause, map$3(some$1)))),
627
+ onSuccess: () => finalize(fail$2(none()))
628
+ }), forkScoped);
629
+ return queuesLock.withPermits(1)(flatten$1(get(newQueue)));
630
+ }))));
631
+
632
+ /** @internal */
633
+ const drain = self => new StreamImpl(drain$1(toChannel(self)));
634
+
635
+ /** @internal */
636
+ const drainFork = /*#__PURE__*/dual(2, (self, that) => pipe(fromEffect(make$4()), flatMap(backgroundDied => pipe(scoped(pipe(that, runForEachScoped(() => unit$2), catchAllCause$2(cause => failCause$3(backgroundDied, cause)), forkScoped)), crossRight(pipe(self, interruptWhenDeferred(backgroundDied)))))));
637
+
638
+ /** @internal */
639
+ const drop = /*#__PURE__*/dual(2, (self, n) => {
640
+ const loop = r => readWith({
641
+ onInput: input => {
642
+ const dropped = pipe(input, drop$1(r));
643
+ const leftover = Math.max(0, r - input.length);
644
+ const more = isEmpty(input) || leftover > 0;
645
+ if (more) {
646
+ return loop(leftover);
647
+ }
648
+ return pipe(write(dropped), zipRight$2(identityChannel()));
649
+ },
650
+ onFailure: fail$1,
651
+ onDone: () => unit$1
652
+ });
653
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop(n))));
654
+ });
655
+
656
+ /** @internal */
657
+ const dropRight = /*#__PURE__*/dual(2, (self, n) => {
658
+ if (n <= 0) {
659
+ return identityStream();
660
+ }
661
+ return suspend(() => {
662
+ const queue = new RingBuffer(n);
663
+ const reader = readWith({
664
+ onInput: input => {
665
+ const outputs = pipe(input, filterMap$1(elem => {
666
+ const head = queue.head();
667
+ queue.put(elem);
668
+ return head;
669
+ }));
670
+ return pipe(write(outputs), flatMap$1(() => reader));
671
+ },
672
+ onFailure: fail$1,
673
+ onDone: () => unit$1
674
+ });
675
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(reader)));
676
+ });
677
+ });
678
+
679
+ /** @internal */
680
+ const dropUntil = /*#__PURE__*/dual(2, (self, predicate) => drop(dropWhile(self, a => !predicate(a)), 1));
681
+
682
+ /** @internal */
683
+ const dropUntilEffect = /*#__PURE__*/dual(2, (self, predicate) => {
684
+ const loop = readWith({
685
+ onInput: input => pipe(dropUntil$1(input, predicate), map$1(unsafeFromArray), map$1(leftover => {
686
+ const more = isEmpty(leftover);
687
+ if (more) {
688
+ return suspend$2(() => loop);
689
+ }
690
+ return pipe(write(leftover), zipRight$2(identityChannel()));
691
+ }), unwrap$1),
692
+ onFailure: fail$1,
693
+ onDone: () => unit$1
694
+ });
695
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop)));
696
+ });
697
+
698
+ /** @internal */
699
+ const dropWhile = /*#__PURE__*/dual(2, (self, predicate) => {
700
+ const loop = readWith({
701
+ onInput: input => {
702
+ const output = dropWhile$1(input, predicate);
703
+ if (isEmpty(output)) {
704
+ return suspend$2(() => loop);
705
+ }
706
+ return zipRight$2(write(output), identityChannel());
707
+ },
708
+ onFailure: fail$1,
709
+ onDone: succeedNow
710
+ });
711
+ return new StreamImpl(pipeToOrFail(toChannel(self), loop));
712
+ });
713
+
714
+ /** @internal */
715
+ const dropWhileEffect = /*#__PURE__*/dual(2, (self, predicate) => {
716
+ const loop = readWith({
717
+ onInput: input => pipe(dropWhile$2(input, predicate), map$1(unsafeFromArray), map$1(leftover => {
718
+ const more = isEmpty(leftover);
719
+ if (more) {
720
+ return suspend$2(() => loop);
721
+ }
722
+ return zipRight$2(write(leftover), identityChannel());
723
+ }), unwrap$1),
724
+ onFailure: fail$1,
725
+ onDone: () => unit$1
726
+ });
727
+ return new StreamImpl(pipeToOrFail(toChannel(self), loop));
728
+ });
729
+
730
+ /** @internal */
731
+ const either = self => pipe(self, map(right), catchAll(error => make(left(error))));
732
+
733
+ /** @internal */
734
+ const empty = /*#__PURE__*/new StreamImpl( /*#__PURE__*/write( /*#__PURE__*/empty$1()));
735
+
736
+ /** @internal */
737
+ const ensuring = /*#__PURE__*/dual(2, (self, finalizer) => new StreamImpl(pipe(toChannel(self), ensuring$1(finalizer))));
738
+
739
+ /** @internal */
740
+ const ensuringWith = /*#__PURE__*/dual(2, (self, finalizer) => new StreamImpl(ensuringWith$1(toChannel(self), finalizer)));
741
+
742
+ /** @internal */
743
+ const context = () => fromEffect(context$1());
744
+
745
+ /** @internal */
746
+ const contextWith = f => pipe(context(), map(f));
747
+
748
+ /** @internal */
749
+ const contextWithEffect = f => pipe(context(), mapEffectSequential(f));
750
+
751
+ /** @internal */
752
+ const contextWithStream = f => pipe(context(), flatMap(f));
753
+
754
+ /** @internal */
755
+ const execute = effect => drain(fromEffect(effect));
756
+
757
+ /** @internal */
758
+ const fail = error => fromEffectOption(fail$3(some$1(error)));
759
+
760
+ /** @internal */
761
+ const failSync = evaluate => fromEffectOption(failSync$1(() => some$1(evaluate())));
762
+
763
+ /** @internal */
764
+ const failCause = cause => fromEffect(failCause$4(cause));
765
+
766
+ /** @internal */
767
+ const failCauseSync = evaluate => fromEffect(failCauseSync$1(evaluate));
768
+
769
+ /** @internal */
770
+ const filter = /*#__PURE__*/dual(2, (self, predicate) => mapChunks(self, filter$1(predicate)));
771
+
772
+ /** @internal */
773
+ const filterEffect = /*#__PURE__*/dual(2, (self, f) => {
774
+ const loop = iterator => {
775
+ const next = iterator.next();
776
+ if (next.done) {
777
+ return readWithCause({
778
+ onInput: input => loop(input[Symbol.iterator]()),
779
+ onFailure: failCause$1,
780
+ onDone: succeed$3
781
+ });
782
+ } else {
783
+ return pipe(f(next.value), map$1(bool => bool ? pipe(write(of(next.value)), flatMap$1(() => loop(iterator))) : loop(iterator)), unwrap$1);
784
+ }
785
+ };
786
+ return new StreamImpl(suspend$2(() => pipe(toChannel(self), pipeTo(loop(empty$1()[Symbol.iterator]())))));
787
+ });
788
+
789
+ /** @internal */
790
+ const filterMap = /*#__PURE__*/dual(2, (self, pf) => mapChunks(self, filterMap$1(pf)));
791
+
792
+ /** @internal */
793
+ const filterMapEffect = /*#__PURE__*/dual(2, (self, pf) => suspend(() => {
794
+ const loop = iterator => {
795
+ const next = iterator.next();
796
+ if (next.done) {
797
+ return readWithCause({
798
+ onInput: input => loop(input[Symbol.iterator]()),
799
+ onFailure: failCause$1,
800
+ onDone: succeed$3
801
+ });
802
+ } else {
803
+ return pipe(pf(next.value), match$2({
804
+ onNone: () => sync$1(() => loop(iterator)),
805
+ onSome: map$1(a2 => flatMap$1(write(of(a2)), () => loop(iterator)))
806
+ }), unwrap$1);
807
+ }
808
+ };
809
+ return new StreamImpl(pipe(toChannel(self), pipeTo(loop(empty$1()[Symbol.iterator]()))));
810
+ }));
811
+
812
+ /** @internal */
813
+ const filterMapWhile = /*#__PURE__*/dual(2, (self, pf) => {
814
+ const loop = readWith({
815
+ onInput: input => {
816
+ const mapped = filterMapWhile$1(input, pf);
817
+ if (mapped.length === input.length) {
818
+ return pipe(write(mapped), flatMap$1(() => loop));
819
+ }
820
+ return write(mapped);
821
+ },
822
+ onFailure: fail$1,
823
+ onDone: succeed$3
824
+ });
825
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop)));
826
+ });
827
+
828
+ /** @internal */
829
+ const filterMapWhileEffect = /*#__PURE__*/dual(2, (self, pf) => suspend(() => {
830
+ const loop = iterator => {
831
+ const next = iterator.next();
832
+ if (next.done) {
833
+ return readWithCause({
834
+ onInput: input => loop(input[Symbol.iterator]()),
835
+ onFailure: failCause$1,
836
+ onDone: succeed$3
837
+ });
838
+ } else {
839
+ return unwrap$1(match$2(pf(next.value), {
840
+ onNone: () => succeed$1(unit$1),
841
+ onSome: map$1(a2 => flatMap$1(write(of(a2)), () => loop(iterator)))
842
+ }));
843
+ }
844
+ };
845
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop(empty$1()[Symbol.iterator]()))));
846
+ }));
847
+
848
+ /** @internal */
849
+ const finalizer = finalizer => acquireRelease(unit$2, () => finalizer);
850
+
851
+ /** @internal */
852
+ const find = /*#__PURE__*/dual(2, (self, predicate) => {
853
+ const loop = readWith({
854
+ onInput: input => match$2(findFirst(input, predicate), {
855
+ onNone: () => loop,
856
+ onSome: n => write(of(n))
857
+ }),
858
+ onFailure: fail$1,
859
+ onDone: () => unit$1
860
+ });
861
+ return new StreamImpl(pipe(toChannel(self), pipeTo(loop)));
862
+ });
863
+
864
+ /** @internal */
865
+ const findEffect = /*#__PURE__*/dual(2, (self, predicate) => {
866
+ const loop = readWith({
867
+ onInput: input => pipe(findFirst$1(input, predicate), map$1(match$2({
868
+ onNone: () => loop,
869
+ onSome: n => write(of(n))
870
+ })), unwrap$1),
871
+ onFailure: fail$1,
872
+ onDone: () => unit$1
873
+ });
874
+ return new StreamImpl(pipe(toChannel(self), pipeTo(loop)));
875
+ });
876
+
877
+ /** @internal */
878
+ const flatMap = /*#__PURE__*/dual(args => typeof args[0] !== "function", (self, f, options) => {
879
+ const bufferSize = options?.bufferSize ?? 16;
880
+ if (options?.switch) {
881
+ return matchConcurrency(options?.concurrency, () => flatMapParSwitchBuffer(self, 1, bufferSize, f), n => flatMapParSwitchBuffer(self, n, bufferSize, f));
882
+ }
883
+ return matchConcurrency(options?.concurrency, () => new StreamImpl(concatMap(toChannel(self), as => pipe(as, map$2(a => toChannel(f(a))), reduce(unit$1, (left, right) => pipe(left, zipRight$2(right)))))), n => new StreamImpl(pipe(toChannel(self), concatMap(writeChunk), mergeMap(out => toChannel(f(out)), {
884
+ concurrency: n,
885
+ bufferSize
886
+ }))));
887
+ });
888
+
889
+ /** @internal */
890
+ const matchConcurrency = (concurrency, sequential, bounded) => {
891
+ switch (concurrency) {
892
+ case undefined:
893
+ return sequential();
894
+ case "unbounded":
895
+ return bounded(Number.POSITIVE_INFINITY);
896
+ default:
897
+ return concurrency > 1 ? bounded(concurrency) : sequential();
898
+ }
899
+ };
900
+ const flatMapParSwitchBuffer = /*#__PURE__*/dual(4, (self, n, bufferSize, f) => new StreamImpl(pipe(toChannel(self), concatMap(writeChunk), mergeMap(out => toChannel(f(out)), {
901
+ concurrency: n,
902
+ mergeStrategy: BufferSliding(),
903
+ bufferSize
904
+ }))));
905
+
906
+ /** @internal */
907
+ const flatten = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => flatMap(self, identity, options));
908
+
909
+ /** @internal */
910
+ const flattenChunks = self => {
911
+ const flatten = readWithCause({
912
+ onInput: chunks => flatMap$1(writeChunk(chunks), () => flatten),
913
+ onFailure: failCause$1,
914
+ onDone: () => unit$1
915
+ });
916
+ return new StreamImpl(pipe(toChannel(self), pipeTo(flatten)));
917
+ };
918
+
919
+ /** @internal */
920
+ const flattenEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => options?.unordered ? flatMap(self, a => fromEffect(a), {
921
+ concurrency: options.concurrency
922
+ }) : matchConcurrency(options?.concurrency, () => mapEffectSequential(self, identity), n => new StreamImpl(pipe(toChannel(self), concatMap(writeChunk), mapOutEffectPar(identity, n), mapOut(of)))));
923
+
924
+ /** @internal */
925
+ const flattenExitOption = self => {
926
+ const processChunk = (chunk, cont) => {
927
+ const [toEmit, rest] = pipe(chunk, splitWhere(exit => !isSuccess(exit)));
928
+ const next = pipe(head$1(rest), match$2({
929
+ onNone: () => cont,
930
+ onSome: match$3({
931
+ onFailure: cause => match$2(flipCauseOption(cause), {
932
+ onNone: () => unit$1,
933
+ onSome: failCause$1
934
+ }),
935
+ onSuccess: () => unit$1
936
+ })
937
+ }));
938
+ return pipe(write(pipe(toEmit, filterMap$1(exit => isSuccess(exit) ? some$1(exit.value) : none()))), flatMap$1(() => next));
939
+ };
940
+ const process = readWithCause({
941
+ onInput: chunk => processChunk(chunk, process),
942
+ onFailure: cause => failCause$1(cause),
943
+ onDone: () => unit$1
944
+ });
945
+ return new StreamImpl(pipe(toChannel(self), pipeTo(process)));
946
+ };
947
+
948
+ /** @internal */
949
+ const flattenIterables = self => pipe(self, map(fromIterable$1), flattenChunks);
950
+
951
+ /** @internal */
952
+ const flattenTake = self => flattenChunks(flattenExitOption(pipe(self, map(take => take.exit))));
953
+
954
+ /** @internal */
955
+ const forever = self => new StreamImpl(repeated(toChannel(self)));
956
+
957
+ /** @internal */
958
+ const fromAsyncIterable = (iterable, onError) => pipe(acquireRelease$1(sync$1(() => iterable[Symbol.asyncIterator]()), iterator => iterator.return ? promise(async () => iterator.return()) : unit$2), map$1(iterator => repeatEffectOption(pipe(tryPromise({
959
+ try: async () => iterator.next(),
960
+ catch: reason => some$1(onError(reason))
961
+ }), flatMap$2(result => result.done ? fail$3(none()) : succeed$1(result.value))))), unwrapScoped);
962
+
963
+ /** @internal */
964
+ const fromChannel = channel => new StreamImpl(channel);
965
+
966
+ /** @internal */
967
+ const toChannel = stream => {
968
+ if (isEffect(stream)) {
969
+ return toChannel(fromEffect(stream));
970
+ }
971
+ return stream.channel;
972
+ };
973
+
974
+ /** @internal */
975
+ const fromChunk = chunk => new StreamImpl(isEmpty(chunk) ? unit$1 : write(chunk));
976
+
977
+ /** @internal */
978
+ const fromChunkHub = (hub, options) => {
979
+ if (options?.scoped) {
980
+ const effect = map$1(subscribe(hub), fromChunkQueue);
981
+ return options.shutdown ? map$1(effect, ensuring(shutdown$1(hub))) : effect;
982
+ }
983
+ const stream = flatMap(scoped(subscribe(hub)), fromChunkQueue);
984
+ return options?.shutdown ? ensuring(stream, shutdown$1(hub)) : stream;
985
+ };
986
+
987
+ /** @internal */
988
+ const fromChunkQueue = (queue, options) => pipe(take$2(queue), catchAllCause$2(cause => pipe(isShutdown(queue), flatMap$2(isShutdown => isShutdown && isInterrupted(cause) ? end$1() : failCause$5(cause)))), repeatEffectChunkOption, options?.shutdown ? ensuring(shutdown(queue)) : identity);
989
+
990
+ /** @internal */
991
+ const fromChunks = (...chunks) => pipe(fromIterable(chunks), flatMap(fromChunk));
992
+
993
+ /** @internal */
994
+ const fromEffect = effect => pipe(effect, mapError$1(some$1), fromEffectOption);
995
+
996
+ /** @internal */
997
+ const fromEffectOption = effect => new StreamImpl(unwrap$1(match$1(effect, {
998
+ onFailure: match$2({
999
+ onNone: () => unit$1,
1000
+ onSome: fail$1
1001
+ }),
1002
+ onSuccess: a => write(of(a))
1003
+ })));
1004
+
1005
+ /** @internal */
1006
+ const fromHub = (hub, options) => {
1007
+ const maxChunkSize = options?.maxChunkSize ?? DefaultChunkSize;
1008
+ if (options?.scoped) {
1009
+ const effect = map$1(subscribe(hub), queue => fromQueue(queue, {
1010
+ maxChunkSize,
1011
+ shutdown: true
1012
+ }));
1013
+ return options.shutdown ? map$1(effect, ensuring(shutdown$1(hub))) : effect;
1014
+ }
1015
+ const stream = flatMap(scoped(subscribe(hub)), queue => fromQueue(queue, {
1016
+ maxChunkSize
1017
+ }));
1018
+ return options?.shutdown ? ensuring(stream, shutdown$1(hub)) : stream;
1019
+ };
1020
+
1021
+ /** @internal */
1022
+ const fromIterable = iterable => suspend(() => isChunk(iterable) ? fromChunk(iterable) : fromIteratorSucceed(iterable[Symbol.iterator]()));
1023
+
1024
+ /** @internal */
1025
+ const fromIterableEffect = effect => pipe(effect, map$1(fromIterable), unwrap);
1026
+
1027
+ /** @internal */
1028
+ const fromIteratorSucceed = (iterator, maxChunkSize = DefaultChunkSize) => {
1029
+ return pipe(sync$1(() => {
1030
+ let builder = [];
1031
+ const loop = iterator => pipe(sync$1(() => {
1032
+ let next = iterator.next();
1033
+ if (maxChunkSize === 1) {
1034
+ if (next.done) {
1035
+ return unit$1;
1036
+ }
1037
+ return pipe(write(of(next.value)), flatMap$1(() => loop(iterator)));
1038
+ }
1039
+ builder = [];
1040
+ let count = 0;
1041
+ while (count < maxChunkSize && !next.done) {
1042
+ builder.push(next.value);
1043
+ next = iterator.next();
1044
+ count = count + 1;
1045
+ }
1046
+ if (count > 0) {
1047
+ return pipe(write(unsafeFromArray(builder)), flatMap$1(() => loop(iterator)));
1048
+ }
1049
+ return unit$1;
1050
+ }), unwrap$1);
1051
+ return new StreamImpl(loop(iterator));
1052
+ }), unwrap);
1053
+ };
1054
+
1055
+ /** @internal */
1056
+ const fromPull = effect => pipe(effect, map$1(repeatEffectChunkOption), unwrapScoped);
1057
+
1058
+ /** @internal */
1059
+ const fromQueue = (queue, options) => pipe(takeBetween(queue, 1, options?.maxChunkSize ?? DefaultChunkSize), catchAllCause$2(cause => pipe(isShutdown(queue), flatMap$2(isShutdown => isShutdown && isInterrupted(cause) ? end$1() : failCause$5(cause)))), repeatEffectChunkOption, options?.shutdown ? ensuring(shutdown(queue)) : identity);
1060
+
1061
+ /** @internal */
1062
+ const fromSchedule = schedule => pipe(driver(schedule), map$1(driver => repeatEffectOption(driver.next(void 0))), unwrap);
1063
+
1064
+ /** @internal */
1065
+ const fromReadableStream = (evaluate, onError) => unwrapScoped(map$1(acquireRelease$1(sync$1(() => evaluate().getReader()), reader => promise(() => reader.cancel())), reader => repeatEffectOption(flatMap$2(tryPromise({
1066
+ try: () => reader.read(),
1067
+ catch: reason => some$1(onError(reason))
1068
+ }), ({
1069
+ done,
1070
+ value
1071
+ }) => done ? fail$3(none()) : succeed$1(value)))));
1072
+
1073
+ /** @internal */
1074
+ const fromReadableStreamByob = (evaluate, onError, allocSize = 4096) => unwrapScoped(map$1(acquireRelease$1(sync$1(() => evaluate().getReader({
1075
+ mode: "byob"
1076
+ })), reader => promise(() => reader.cancel())), reader => catchAll(forever(readChunkStreamByobReader(reader, onError, allocSize)), error => typeof error === "object" && error !== null && "_tag" in error && error._tag === "EOF" ? empty : fail(error))));
1077
+ const readChunkStreamByobReader = (reader, onError, size) => {
1078
+ const buffer = new ArrayBuffer(size);
1079
+ return paginateEffect(0, offset => flatMap$2(tryPromise({
1080
+ try: () => reader.read(new Uint8Array(buffer, offset, buffer.byteLength - offset)),
1081
+ catch: reason => onError(reason)
1082
+ }), ({
1083
+ done,
1084
+ value
1085
+ }) => {
1086
+ if (done) {
1087
+ return fail$3({
1088
+ _tag: "EOF"
1089
+ });
1090
+ }
1091
+ const newOffset = offset + value.byteLength;
1092
+ return succeed$1([value, newOffset >= buffer.byteLength ? none() : some$1(newOffset)]);
1093
+ }));
1094
+ };
1095
+
1096
+ /** @internal */
1097
+ const groupAdjacentBy = /*#__PURE__*/dual(2, (self, f) => {
1098
+ const groupAdjacentByChunk = (state, chunk) => {
1099
+ if (isEmpty(chunk)) {
1100
+ return [state, empty$1()];
1101
+ }
1102
+ const builder = [];
1103
+ let from = 0;
1104
+ let until = 0;
1105
+ let key = undefined;
1106
+ let previousChunk = empty$1();
1107
+ switch (state._tag) {
1108
+ case "Some":
1109
+ {
1110
+ const tuple = state.value;
1111
+ key = tuple[0];
1112
+ let loop = true;
1113
+ while (loop && until < chunk.length) {
1114
+ const input = unsafeGet$1(chunk, until);
1115
+ const updatedKey = f(input);
1116
+ if (!equals(key, updatedKey)) {
1117
+ builder.push([key, unsafeFromArray(Array.from(tuple[1]).slice(from, until))]);
1118
+ key = updatedKey;
1119
+ from = until;
1120
+ loop = false;
1121
+ }
1122
+ until = until + 1;
1123
+ }
1124
+ if (loop) {
1125
+ previousChunk = tuple[1];
1126
+ }
1127
+ break;
1128
+ }
1129
+ case "None":
1130
+ {
1131
+ key = f(unsafeGet$1(chunk, until));
1132
+ until = until + 1;
1133
+ break;
1134
+ }
1135
+ }
1136
+ while (until < chunk.length) {
1137
+ const input = unsafeGet$1(chunk, until);
1138
+ const updatedKey = f(input);
1139
+ if (!equals(key, updatedKey)) {
1140
+ builder.push([key, unsafeFromArray(Array.from(chunk).slice(from, until))]);
1141
+ key = updatedKey;
1142
+ from = until;
1143
+ }
1144
+ until = until + 1;
1145
+ }
1146
+ const nonEmptyChunk = appendAll(previousChunk, unsafeFromArray(Array.from(chunk).slice(from, until)));
1147
+ const output = unsafeFromArray(builder);
1148
+ return [some$1([key, nonEmptyChunk]), output];
1149
+ };
1150
+ const groupAdjacent = state => readWithCause({
1151
+ onInput: input => {
1152
+ const [updatedState, output] = groupAdjacentByChunk(state, input);
1153
+ return isEmpty(output) ? groupAdjacent(updatedState) : flatMap$1(write(output), () => groupAdjacent(updatedState));
1154
+ },
1155
+ onFailure: cause => match$2(state, {
1156
+ onNone: () => failCause$1(cause),
1157
+ onSome: output => flatMap$1(write(of(output)), () => failCause$1(cause))
1158
+ }),
1159
+ onDone: done => match$2(state, {
1160
+ onNone: () => succeedNow(done),
1161
+ onSome: output => flatMap$1(write(of(output)), () => succeedNow(done))
1162
+ })
1163
+ });
1164
+ return new StreamImpl(pipeToOrFail(toChannel(self), groupAdjacent(none())));
1165
+ });
1166
+
1167
+ /** @internal */
1168
+ const grouped = /*#__PURE__*/dual(2, (self, chunkSize) => pipe(self, rechunk(chunkSize), chunks));
1169
+
1170
+ /** @internal */
1171
+ const groupedWithin = /*#__PURE__*/dual(3, (self, chunkSize, duration) => aggregateWithin(self, collectAllN(chunkSize), spaced(duration)));
1172
+
1173
+ /** @internal */
1174
+ const haltWhen = /*#__PURE__*/dual(2, (self, effect) => {
1175
+ const writer = fiber => pipe(poll$1(fiber), map$1(match$2({
1176
+ onNone: () => readWith({
1177
+ onInput: input => flatMap$1(write(input), () => writer(fiber)),
1178
+ onFailure: fail$1,
1179
+ onDone: () => unit$1
1180
+ }),
1181
+ onSome: match$3({
1182
+ onFailure: failCause$1,
1183
+ onSuccess: () => unit$1
1184
+ })
1185
+ })), unwrap$1);
1186
+ return new StreamImpl(pipe(forkScoped(effect), map$1(fiber => pipe(toChannel(self), pipeTo(writer(fiber)))), unwrapScoped$1));
1187
+ });
1188
+
1189
+ /** @internal */
1190
+ const haltAfter = /*#__PURE__*/dual(2, (self, duration) => pipe(self, haltWhen(sleep(duration))));
1191
+
1192
+ /** @internal */
1193
+ const haltWhenDeferred = /*#__PURE__*/dual(2, (self, deferred) => {
1194
+ const writer = pipe(poll(deferred), map$1(match$2({
1195
+ onNone: () => readWith({
1196
+ onInput: input => pipe(write(input), flatMap$1(() => writer)),
1197
+ onFailure: fail$1,
1198
+ onDone: () => unit$1
1199
+ }),
1200
+ onSome: effect => unwrap$1(match$1(effect, {
1201
+ onFailure: fail$1,
1202
+ onSuccess: () => unit$1
1203
+ }))
1204
+ })), unwrap$1);
1205
+ return new StreamImpl(pipe(toChannel(self), pipeTo(writer)));
1206
+ });
1207
+
1208
+ /** @internal */
1209
+ const identityStream = () => new StreamImpl(identityChannel());
1210
+
1211
+ /** @internal */
1212
+ const interleave = /*#__PURE__*/dual(2, (self, that) => pipe(self, interleaveWith(that, forever(make(true, false)))));
1213
+
1214
+ /** @internal */
1215
+ const interleaveWith = /*#__PURE__*/dual(3, (self, that, decider) => {
1216
+ const producer = handoff => readWithCause({
1217
+ onInput: value => flatMap$1(fromEffect$1(offer(handoff, of$1(value))), () => producer(handoff)),
1218
+ onFailure: cause => fromEffect$1(offer(handoff, failCause$6(cause))),
1219
+ onDone: () => fromEffect$1(offer(handoff, end$2))
1220
+ });
1221
+ return new StreamImpl(unwrapScoped$1(pipe(make$1(), zip$1(make$1()), tap$1(([left]) => pipe(toChannel(self), concatMap(writeChunk), pipeTo(producer(left)), runScoped$1, forkScoped)), tap$1(([_, right]) => pipe(toChannel(that), concatMap(writeChunk), pipeTo(producer(right)), runScoped$1, forkScoped)), map$1(([left, right]) => {
1222
+ const process = (leftDone, rightDone) => readWithCause({
1223
+ onInput: bool => {
1224
+ if (bool && !leftDone) {
1225
+ return pipe(fromEffect$1(take$1(left)), flatMap$1(match$4({
1226
+ onEnd: () => rightDone ? unit$1 : process(true, rightDone),
1227
+ onFailure: failCause$1,
1228
+ onSuccess: chunk => pipe(write(chunk), flatMap$1(() => process(leftDone, rightDone)))
1229
+ })));
1230
+ }
1231
+ if (!bool && !rightDone) {
1232
+ return pipe(fromEffect$1(take$1(right)), flatMap$1(match$4({
1233
+ onEnd: () => leftDone ? unit$1 : process(leftDone, true),
1234
+ onFailure: failCause$1,
1235
+ onSuccess: chunk => pipe(write(chunk), flatMap$1(() => process(leftDone, rightDone)))
1236
+ })));
1237
+ }
1238
+ return process(leftDone, rightDone);
1239
+ },
1240
+ onFailure: failCause$1,
1241
+ onDone: () => unit$1
1242
+ });
1243
+ return pipe(toChannel(decider), concatMap(writeChunk), pipeTo(process(false, false)));
1244
+ }))));
1245
+ });
1246
+
1247
+ /** @internal */
1248
+ const intersperse = /*#__PURE__*/dual(2, (self, element) => new StreamImpl(pipe(toChannel(self), pipeToOrFail(suspend$2(() => {
1249
+ const writer = isFirst => readWithCause({
1250
+ onInput: chunk => {
1251
+ const builder = [];
1252
+ let flagResult = isFirst;
1253
+ for (const output of chunk) {
1254
+ if (flagResult) {
1255
+ flagResult = false;
1256
+ builder.push(output);
1257
+ } else {
1258
+ builder.push(element);
1259
+ builder.push(output);
1260
+ }
1261
+ }
1262
+ return pipe(write(unsafeFromArray(builder)), flatMap$1(() => writer(flagResult)));
1263
+ },
1264
+ onFailure: failCause$1,
1265
+ onDone: () => unit$1
1266
+ });
1267
+ return writer(true);
1268
+ })))));
1269
+
1270
+ /** @internal */
1271
+ const intersperseAffixes = /*#__PURE__*/dual(2, (self, {
1272
+ end,
1273
+ middle,
1274
+ start
1275
+ }) => pipe(make(start), concat(pipe(self, intersperse(middle))), concat(make(end))));
1276
+
1277
+ /** @internal */
1278
+ const interruptAfter = /*#__PURE__*/dual(2, (self, duration) => pipe(self, interruptWhen(sleep(duration))));
1279
+
1280
+ /** @internal */
1281
+ const interruptWhen = /*#__PURE__*/dual(2, (self, effect) => new StreamImpl(pipe(toChannel(self), interruptWhen$1(effect))));
1282
+
1283
+ /** @internal */
1284
+ const interruptWhenDeferred = /*#__PURE__*/dual(2, (self, deferred) => new StreamImpl(pipe(toChannel(self), interruptWhenDeferred$1(deferred))));
1285
+
1286
+ /** @internal */
1287
+ const iterate = (value, next) => unfold(value, a => some$1([a, next(a)]));
1288
+
1289
+ /** @internal */
1290
+ const make = (...as) => fromIterable(as);
1291
+
1292
+ /** @internal */
1293
+ const map = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), mapOut(map$2(f)))));
1294
+
1295
+ /** @internal */
1296
+ const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => {
1297
+ const accumulator = s => readWith({
1298
+ onInput: input => {
1299
+ const [nextS, chunk] = mapAccum$1(input, s, f);
1300
+ return flatMap$1(write(chunk), () => accumulator(nextS));
1301
+ },
1302
+ onFailure: fail$1,
1303
+ onDone: () => unit$1
1304
+ });
1305
+ return new StreamImpl(pipe(toChannel(self), pipeTo(accumulator(s))));
1306
+ });
1307
+
1308
+ /** @internal */
1309
+ const mapAccumEffect = /*#__PURE__*/dual(3, (self, s, f) => suspend(() => {
1310
+ const accumulator = s => readWith({
1311
+ onInput: input => pipe(suspend$1(() => {
1312
+ const outputs = [];
1313
+ const emit = output => sync$1(() => {
1314
+ outputs.push(output);
1315
+ });
1316
+ return pipe(input, reduce$1(s, (s, a) => pipe(f(s, a), flatMap$2(([s, a]) => pipe(emit(a), as$1(s))))), match$1({
1317
+ onFailure: error => {
1318
+ if (outputs.length !== 0) {
1319
+ return zipRight$2(write(unsafeFromArray(outputs)), fail$1(error));
1320
+ }
1321
+ return fail$1(error);
1322
+ },
1323
+ onSuccess: s => flatMap$1(write(unsafeFromArray(outputs)), () => accumulator(s))
1324
+ }));
1325
+ }), unwrap$1),
1326
+ onFailure: fail$1,
1327
+ onDone: () => unit$1
1328
+ });
1329
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(accumulator(s))));
1330
+ }));
1331
+
1332
+ /** @internal */
1333
+ const mapBoth = /*#__PURE__*/dual(2, (self, options) => pipe(self, mapError(options.onFailure), map(options.onSuccess)));
1334
+
1335
+ /** @internal */
1336
+ const mapChunks = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), mapOut(f))));
1337
+
1338
+ /** @internal */
1339
+ const mapChunksEffect = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), mapOutEffect(f))));
1340
+
1341
+ /** @internal */
1342
+ const mapConcat = /*#__PURE__*/dual(2, (self, f) => pipe(self, mapConcatChunk(a => fromIterable$1(f(a)))));
1343
+
1344
+ /** @internal */
1345
+ const mapConcatChunk = /*#__PURE__*/dual(2, (self, f) => pipe(self, mapChunks(flatMap$3(f))));
1346
+
1347
+ /** @internal */
1348
+ const mapConcatChunkEffect = /*#__PURE__*/dual(2, (self, f) => pipe(self, mapEffectSequential(f), mapConcatChunk(identity)));
1349
+
1350
+ /** @internal */
1351
+ const mapConcatEffect = /*#__PURE__*/dual(2, (self, f) => pipe(self, mapEffectSequential(a => pipe(f(a), map$1(fromIterable$1))), mapConcatChunk(identity)));
1352
+
1353
+ /** @internal */
1354
+ const mapEffectSequential = /*#__PURE__*/dual(2, (self, f) => {
1355
+ const loop = iterator => {
1356
+ const next = iterator.next();
1357
+ if (next.done) {
1358
+ return readWithCause({
1359
+ onInput: elem => loop(elem[Symbol.iterator]()),
1360
+ onFailure: failCause$1,
1361
+ onDone: succeed$3
1362
+ });
1363
+ } else {
1364
+ const value = next.value;
1365
+ return unwrap$1(map$1(f(value), a2 => flatMap$1(write(of(a2)), () => loop(iterator))));
1366
+ }
1367
+ };
1368
+ return new StreamImpl(pipe(toChannel(self), pipeTo(suspend$2(() => loop(empty$1()[Symbol.iterator]())))));
1369
+ });
1370
+
1371
+ /** @internal */
1372
+ const mapEffectPar = /*#__PURE__*/dual(3, (self, n, f) => new StreamImpl(pipe(toChannel(self), concatMap(writeChunk), mapOutEffectPar(f, n), mapOut(of))));
1373
+
1374
+ /** @internal */
1375
+ const mapError = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), mapError$2(f))));
1376
+
1377
+ /** @internal */
1378
+ const mapErrorCause = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), mapErrorCause$1(f))));
1379
+
1380
+ /** @internal */
1381
+ const merge = /*#__PURE__*/dual(args => isStream(args[1]), (self, that, options) => mergeWith(self, that, {
1382
+ onSelf: identity,
1383
+ onOther: identity,
1384
+ haltStrategy: options?.haltStrategy
1385
+ }));
1386
+
1387
+ /** @internal */
1388
+ const mergeAll = /*#__PURE__*/dual(args => Symbol.iterator in args[0], (streams, options) => flatten(fromIterable(streams), options));
1389
+
1390
+ /** @internal */
1391
+ const mergeEither = /*#__PURE__*/dual(2, (self, that) => mergeWith(self, that, {
1392
+ onSelf: left,
1393
+ onOther: right
1394
+ }));
1395
+
1396
+ /** @internal */
1397
+ const mergeLeft = /*#__PURE__*/dual(2, (self, that) => pipe(self, merge(drain(that))));
1398
+
1399
+ /** @internal */
1400
+ const mergeRight = /*#__PURE__*/dual(2, (self, that) => pipe(drain(self), merge(that)));
1401
+
1402
+ /** @internal */
1403
+ const mergeWith = /*#__PURE__*/dual(3, (self, other, options) => {
1404
+ const strategy = options.haltStrategy ? fromInput(options.haltStrategy) : Both;
1405
+ const handler = terminate => exit => terminate || !isSuccess(exit) ?
1406
+ // TODO: remove
1407
+ Done(suspend$1(() => exit)) : Await(exit => suspend$1(() => exit));
1408
+ return new StreamImpl(mergeWith$1(toChannel(map(self, options.onSelf)), {
1409
+ other: toChannel(map(other, options.onOther)),
1410
+ onSelfDone: handler(strategy._tag === "Either" || strategy._tag === "Left"),
1411
+ onOtherDone: handler(strategy._tag === "Either" || strategy._tag === "Right")
1412
+ }));
1413
+ });
1414
+
1415
+ /** @internal */
1416
+ const mkString = self => run(self, mkString$1);
1417
+
1418
+ /** @internal */
1419
+ const never = /*#__PURE__*/fromEffect(never$1);
1420
+
1421
+ /** @internal */
1422
+ const onError = /*#__PURE__*/dual(2, (self, cleanup) => pipe(self, catchAllCause(cause => fromEffect(pipe(cleanup(cause), zipRight$1(failCause$4(cause)))))));
1423
+
1424
+ /** @internal */
1425
+ const onDone = /*#__PURE__*/dual(2, (self, cleanup) => new StreamImpl(pipe(toChannel(self), ensuringWith$1(exit => isSuccess(exit) ? cleanup() : unit$2))));
1426
+
1427
+ /** @internal */
1428
+ const orDie = self => pipe(self, orDieWith(identity));
1429
+
1430
+ /** @internal */
1431
+ const orDieWith = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), orDieWith$1(f))));
1432
+
1433
+ /** @internal */
1434
+ const orElse = /*#__PURE__*/dual(2, (self, that) => new StreamImpl(pipe(toChannel(self), orElse$1(() => toChannel(that())))));
1435
+
1436
+ /** @internal */
1437
+ const orElseEither = /*#__PURE__*/dual(2, (self, that) => pipe(self, map(left), orElse(() => pipe(that(), map(right)))));
1438
+
1439
+ /** @internal */
1440
+ const orElseFail = /*#__PURE__*/dual(2, (self, error) => pipe(self, orElse(() => failSync(error))));
1441
+
1442
+ /** @internal */
1443
+ const orElseIfEmpty = /*#__PURE__*/dual(2, (self, element) => pipe(self, orElseIfEmptyChunk(() => of(element()))));
1444
+
1445
+ /** @internal */
1446
+ const orElseIfEmptyChunk = /*#__PURE__*/dual(2, (self, chunk) => pipe(self, orElseIfEmptyStream(() => new StreamImpl(write(chunk())))));
1447
+
1448
+ /** @internal */
1449
+ const orElseIfEmptyStream = /*#__PURE__*/dual(2, (self, stream) => {
1450
+ const writer = readWith({
1451
+ onInput: input => {
1452
+ if (isEmpty(input)) {
1453
+ return suspend$2(() => writer);
1454
+ }
1455
+ return pipe(write(input), zipRight$2(identityChannel()));
1456
+ },
1457
+ onFailure: fail$1,
1458
+ onDone: () => suspend$2(() => toChannel(stream()))
1459
+ });
1460
+ return new StreamImpl(pipe(toChannel(self), pipeTo(writer)));
1461
+ });
1462
+
1463
+ /** @internal */
1464
+ const orElseSucceed = /*#__PURE__*/dual(2, (self, value) => pipe(self, orElse(() => sync(value))));
1465
+
1466
+ /** @internal */
1467
+ const paginate = (s, f) => paginateChunk(s, s => {
1468
+ const page = f(s);
1469
+ return [of(page[0]), page[1]];
1470
+ });
1471
+
1472
+ /** @internal */
1473
+ const paginateChunk = (s, f) => {
1474
+ const loop = s => {
1475
+ const page = f(s);
1476
+ return match$2(page[1], {
1477
+ onNone: () => zipRight$2(write(page[0]), unit$1),
1478
+ onSome: s => flatMap$1(write(page[0]), () => loop(s))
1479
+ });
1480
+ };
1481
+ return new StreamImpl(suspend$2(() => loop(s)));
1482
+ };
1483
+
1484
+ /** @internal */
1485
+ const paginateChunkEffect = (s, f) => {
1486
+ const loop = s => unwrap$1(map$1(f(s), ([chunk, option]) => match$2(option, {
1487
+ onNone: () => zipRight$2(write(chunk), unit$1),
1488
+ onSome: s => flatMap$1(write(chunk), () => loop(s))
1489
+ })));
1490
+ return new StreamImpl(suspend$2(() => loop(s)));
1491
+ };
1492
+
1493
+ /** @internal */
1494
+ const paginateEffect = (s, f) => paginateChunkEffect(s, s => pipe(f(s), map$1(([a, s]) => [of(a), s])));
1495
+
1496
+ /** @internal */
1497
+ const peel = /*#__PURE__*/dual(2, (self, sink) => {
1498
+ const OP_EMIT = "Emit";
1499
+ const OP_HALT = "Halt";
1500
+ const OP_END = "End";
1501
+ return pipe(make$4(), flatMap$2(deferred => pipe(make$1(), map$1(handoff => {
1502
+ const consumer = foldSink(collectLeftover(sink), {
1503
+ onFailure: error => zipRight$3(fromEffect$2(fail$4(deferred, error)), fail$5(error)),
1504
+ onSuccess: ([z, leftovers]) => {
1505
+ const loop = readWithCause({
1506
+ onInput: elements => flatMap$1(fromEffect$1(offer(handoff, {
1507
+ _tag: OP_EMIT,
1508
+ elements
1509
+ })), () => loop),
1510
+ onFailure: cause => zipRight$2(fromEffect$1(offer(handoff, {
1511
+ _tag: OP_HALT,
1512
+ cause
1513
+ })), failCause$1(cause)),
1514
+ onDone: _ => zipRight$2(fromEffect$1(offer(handoff, {
1515
+ _tag: OP_END
1516
+ })), unit$1)
1517
+ });
1518
+ return fromChannel$1(pipe(fromEffect$1(succeed$2(deferred, z)), zipRight$2(fromEffect$1(pipe(handoff, offer({
1519
+ _tag: OP_EMIT,
1520
+ elements: leftovers
1521
+ })))), zipRight$2(loop)));
1522
+ }
1523
+ });
1524
+ const producer = pipe(take$1(handoff), map$1(signal => {
1525
+ switch (signal._tag) {
1526
+ case OP_EMIT:
1527
+ {
1528
+ return pipe(write(signal.elements), flatMap$1(() => producer));
1529
+ }
1530
+ case OP_HALT:
1531
+ {
1532
+ return failCause$1(signal.cause);
1533
+ }
1534
+ case OP_END:
1535
+ {
1536
+ return unit$1;
1537
+ }
1538
+ }
1539
+ }), unwrap$1);
1540
+ return pipe(self, tapErrorCause(cause => failCause$3(deferred, cause)), run(consumer), forkScoped, zipRight$1(_await(deferred)), map$1(z => [z, new StreamImpl(producer)]));
1541
+ }))), flatten$1);
1542
+ });
1543
+
1544
+ /** @internal */
1545
+ const partition = /*#__PURE__*/dual(args => typeof args[1] === "function", (self, predicate, options) => partitionEither(self, a => succeed$1(predicate(a) ? left(a) : right(a)), options));
1546
+
1547
+ /** @internal */
1548
+ const partitionEither = /*#__PURE__*/dual(args => typeof args[1] === "function", (self, predicate, options) => pipe(mapEffectSequential(self, predicate), distributedWith({
1549
+ size: 2,
1550
+ maximumLag: options?.bufferSize ?? 16,
1551
+ decide: match({
1552
+ onLeft: () => succeed$1(n => n === 0),
1553
+ onRight: () => succeed$1(n => n === 1)
1554
+ })
1555
+ }), flatMap$2(([queue1, queue2]) => succeed$1([filterMap(flattenExitOption(fromQueue(queue1, {
1556
+ shutdown: true
1557
+ })), _ => match(_, {
1558
+ onLeft: some$1,
1559
+ onRight: none
1560
+ })), filterMap(flattenExitOption(fromQueue(queue2, {
1561
+ shutdown: true
1562
+ })), _ => match(_, {
1563
+ onLeft: none,
1564
+ onRight: some$1
1565
+ }))]))));
1566
+
1567
+ /** @internal */
1568
+ const pipeThrough = /*#__PURE__*/dual(2, (self, sink) => new StreamImpl(pipe(toChannel(self), pipeToOrFail(toChannel$1(sink)))));
1569
+
1570
+ /** @internal */
1571
+ const pipeThroughChannel = /*#__PURE__*/dual(2, (self, channel) => new StreamImpl(pipe(toChannel(self), pipeTo(channel))));
1572
+
1573
+ /** @internal */
1574
+ const pipeThroughChannelOrFail = /*#__PURE__*/dual(2, (self, chan) => new StreamImpl(pipe(toChannel(self), pipeToOrFail(chan))));
1575
+
1576
+ /** @internal */
1577
+ const prepend = /*#__PURE__*/dual(2, (self, values) => new StreamImpl(zipRight$2(write(values), toChannel(self))));
1578
+
1579
+ /** @internal */
1580
+ const provideContext = /*#__PURE__*/dual(2, (self, context) => new StreamImpl(pipe(toChannel(self), provideContext$1(context))));
1581
+
1582
+ /** @internal */
1583
+ const provideLayer = /*#__PURE__*/dual(2, (self, layer) => new StreamImpl(unwrapScoped$1(pipe(build(layer), map$1(env => pipe(toChannel(self), provideContext$1(env)))))));
1584
+
1585
+ /** @internal */
1586
+ const provideService = /*#__PURE__*/dual(3, (self, tag, resource) => provideServiceEffect(self, tag, succeed$1(resource)));
1587
+
1588
+ /** @internal */
1589
+ const provideServiceEffect = /*#__PURE__*/dual(3, (self, tag, effect) => provideServiceStream(self, tag, fromEffect(effect)));
1590
+
1591
+ /** @internal */
1592
+ const provideServiceStream = /*#__PURE__*/dual(3, (self, tag, stream) => contextWithStream(env => flatMap(stream, service => pipe(self, provideContext(add(env, tag, service))))));
1593
+
1594
+ /** @internal */
1595
+ const mapInputContext = /*#__PURE__*/dual(2, (self, f) => contextWithStream(env => pipe(self, provideContext(f(env)))));
1596
+
1597
+ /** @internal */
1598
+ const provideSomeLayer = /*#__PURE__*/dual(2, (self, layer) =>
1599
+ // @ts-expect-error
1600
+ pipe(self, provideLayer(pipe(context$2(), merge$1(layer)))));
1601
+
1602
+ /** @internal */
1603
+ const range = (min, max, chunkSize = DefaultChunkSize) => suspend(() => {
1604
+ if (min > max) {
1605
+ return empty;
1606
+ }
1607
+ const go = (min, max, chunkSize) => {
1608
+ const remaining = max - min + 1;
1609
+ if (remaining > chunkSize) {
1610
+ return pipe(write(range$1(min, min + chunkSize - 1)), flatMap$1(() => go(min + chunkSize, max, chunkSize)));
1611
+ }
1612
+ return write(range$1(min, min + remaining - 1));
1613
+ };
1614
+ return new StreamImpl(go(min, max, chunkSize));
1615
+ });
1616
+
1617
+ /** @internal */
1618
+ const rechunk = /*#__PURE__*/dual(2, (self, n) => suspend(() => {
1619
+ const target = Math.max(n, 1);
1620
+ const process = rechunkProcess(new StreamRechunker(target), target);
1621
+ return new StreamImpl(pipe(toChannel(self), pipeTo(process)));
1622
+ }));
1623
+
1624
+ /** @internal */
1625
+ const rechunkProcess = (rechunker, target) => readWithCause({
1626
+ onInput: chunk => {
1627
+ if (chunk.length === target && rechunker.isEmpty()) {
1628
+ return flatMap$1(write(chunk), () => rechunkProcess(rechunker, target));
1629
+ }
1630
+ if (chunk.length > 0) {
1631
+ const chunks = [];
1632
+ let result = undefined;
1633
+ let index = 0;
1634
+ while (index < chunk.length) {
1635
+ while (index < chunk.length && result === undefined) {
1636
+ result = rechunker.write(pipe(chunk, unsafeGet$1(index)));
1637
+ index = index + 1;
1638
+ }
1639
+ if (result !== undefined) {
1640
+ chunks.push(result);
1641
+ result = undefined;
1642
+ }
1643
+ }
1644
+ return flatMap$1(writeAll(...chunks), () => rechunkProcess(rechunker, target));
1645
+ }
1646
+ return suspend$2(() => rechunkProcess(rechunker, target));
1647
+ },
1648
+ onFailure: cause => zipRight$2(rechunker.emitIfNotEmpty(), failCause$1(cause)),
1649
+ onDone: () => rechunker.emitIfNotEmpty()
1650
+ });
1651
+
1652
+ /** @internal */
1653
+ class StreamRechunker {
1654
+ builder = [];
1655
+ pos = 0;
1656
+ constructor(n) {
1657
+ this.n = n;
1658
+ }
1659
+ isEmpty() {
1660
+ return this.pos === 0;
1661
+ }
1662
+ write(elem) {
1663
+ this.builder.push(elem);
1664
+ this.pos += 1;
1665
+ if (this.pos === this.n) {
1666
+ const result = unsafeFromArray(this.builder);
1667
+ this.builder = [];
1668
+ this.pos = 0;
1669
+ return result;
1670
+ }
1671
+ return undefined;
1672
+ }
1673
+ emitIfNotEmpty() {
1674
+ if (this.pos !== 0) {
1675
+ return write(unsafeFromArray(this.builder));
1676
+ }
1677
+ return unit$1;
1678
+ }
1679
+ }
1680
+
1681
+ /** @internal */
1682
+ const refineOrDie = /*#__PURE__*/dual(2, (self, pf) => pipe(self, refineOrDieWith(pf, identity)));
1683
+
1684
+ /** @internal */
1685
+ const refineOrDieWith = /*#__PURE__*/dual(3, (self, pf, f) => new StreamImpl(catchAll$1(toChannel(self), error => match$2(pf(error), {
1686
+ onNone: () => failCause$1(die$2(f(error))),
1687
+ onSome: fail$1
1688
+ }))));
1689
+
1690
+ /** @internal */
1691
+ const repeat = /*#__PURE__*/dual(2, (self, schedule) => filterMap(repeatEither(self, schedule), _ => match(_, {
1692
+ onLeft: none,
1693
+ onRight: some$1
1694
+ })));
1695
+
1696
+ /** @internal */
1697
+ const repeatEffect = effect => repeatEffectOption(pipe(effect, mapError$1(some$1)));
1698
+
1699
+ /** @internal */
1700
+ const repeatEffectChunk = effect => repeatEffectChunkOption(pipe(effect, mapError$1(some$1)));
1701
+
1702
+ /** @internal */
1703
+ const repeatEffectChunkOption = effect => unfoldChunkEffect(effect, effect => pipe(map$1(effect, chunk => some$1([chunk, effect])), catchAll$2(match$2({
1704
+ onNone: () => succeed$1(none()),
1705
+ onSome: fail$3
1706
+ }))));
1707
+
1708
+ /** @internal */
1709
+ const repeatEffectOption = effect => repeatEffectChunkOption(pipe(effect, map$1(of)));
1710
+
1711
+ /** @internal */
1712
+ const repeatEither = /*#__PURE__*/dual(2, (self, schedule) => repeatWith(self, schedule, {
1713
+ onElement: a => right(a),
1714
+ onSchedule: left
1715
+ }));
1716
+
1717
+ /** @internal */
1718
+ const repeatElements = /*#__PURE__*/dual(2, (self, schedule) => filterMap(repeatElementsWith(self, schedule, {
1719
+ onElement: a => some$1(a),
1720
+ onSchedule: none
1721
+ }), identity));
1722
+
1723
+ /** @internal */
1724
+ const repeatElementsWith = /*#__PURE__*/dual(3, (self, schedule, options) => {
1725
+ const driver$1 = pipe(driver(schedule), map$1(driver => {
1726
+ const feed = input => match$2(head$1(input), {
1727
+ onNone: () => loop,
1728
+ onSome: a => zipRight$2(write(of(options.onElement(a))), step(pipe(input, drop$1(1)), a))
1729
+ });
1730
+ const step = (input, a) => {
1731
+ const advance = pipe(driver.next(a), as$1(pipe(write(of(options.onElement(a))), flatMap$1(() => step(input, a)))));
1732
+ const reset = pipe(driver.last(), orDie$1, flatMap$2(b => pipe(driver.reset(), map$1(() => pipe(write(of(options.onSchedule(b))), zipRight$2(feed(input)))))));
1733
+ return pipe(advance, orElse$2(() => reset), unwrap$1);
1734
+ };
1735
+ const loop = readWith({
1736
+ onInput: feed,
1737
+ onFailure: fail$1,
1738
+ onDone: () => unit$1
1739
+ });
1740
+ return loop;
1741
+ }), unwrap$1);
1742
+ return new StreamImpl(pipe(toChannel(self), pipeTo(driver$1)));
1743
+ });
1744
+
1745
+ /** @internal */
1746
+ const repeatValue = value => new StreamImpl(repeated(write(of(value))));
1747
+
1748
+ /** @internal */
1749
+ const repeatWith = /*#__PURE__*/dual(3, (self, schedule, options) => {
1750
+ return pipe(driver(schedule), map$1(driver => {
1751
+ const scheduleOutput = pipe(driver.last(), orDie$1, map$1(options.onSchedule));
1752
+ const process = pipe(self, map(options.onElement), toChannel);
1753
+ const loop = unwrap$1(match$1(driver.next(void 0), {
1754
+ onFailure: () => unit$1,
1755
+ onSuccess: () => pipe(process, zipRight$2(pipe(scheduleOutput, map$1(c => pipe(write(of(c)), flatMap$1(() => loop))), unwrap$1)))
1756
+ }));
1757
+ return new StreamImpl(pipe(process, zipRight$2(loop)));
1758
+ }), unwrap);
1759
+ });
1760
+
1761
+ /** @internal */
1762
+ const repeatWithSchedule = (value, schedule) => repeatEffectWithSchedule(succeed$1(value), schedule);
1763
+
1764
+ /** @internal */
1765
+ const repeatEffectWithSchedule = (effect, schedule) => flatMap(fromEffect(zip$1(effect, driver(schedule))), ([a, driver]) => concat(succeed(a), unfoldEffect(a, s => matchEffect(driver.next(s), {
1766
+ onFailure: succeed$1,
1767
+ onSuccess: () => map$1(effect, nextA => some$1([nextA, nextA]))
1768
+ }))));
1769
+
1770
+ /** @internal */
1771
+ const retry = /*#__PURE__*/dual(2, (self, schedule) => unwrap(map$1(driver(schedule), driver => {
1772
+ const loop = catchAll(self, error => unwrap(matchEffect(driver.next(error), {
1773
+ onFailure: () => fail$3(error),
1774
+ onSuccess: () => succeed$1(pipe(loop, tap(() => driver.reset())))
1775
+ })));
1776
+ return loop;
1777
+ })));
1778
+
1779
+ /** @internal */
1780
+ const run = /*#__PURE__*/dual(2, (self, sink) => pipe(toChannel(self), pipeToOrFail(toChannel$1(sink)), runDrain$1));
1781
+
1782
+ /** @internal */
1783
+ const runCollect = self => pipe(self, run(collectAll()));
1784
+
1785
+ /** @internal */
1786
+ const runCount = self => pipe(self, run(count));
1787
+
1788
+ /** @internal */
1789
+ const runDrain = self => pipe(self, run(drain$2));
1790
+
1791
+ /** @internal */
1792
+ const runFold = /*#__PURE__*/dual(3, (self, s, f) => pipe(self, runFoldWhileScoped(s, constTrue, f), scoped$1));
1793
+
1794
+ /** @internal */
1795
+ const runFoldEffect = /*#__PURE__*/dual(3, (self, s, f) => pipe(self, runFoldWhileScopedEffect(s, constTrue, f), scoped$1));
1796
+
1797
+ /** @internal */
1798
+ const runFoldScoped = /*#__PURE__*/dual(3, (self, s, f) => pipe(self, runFoldWhileScoped(s, constTrue, f)));
1799
+
1800
+ /** @internal */
1801
+ const runFoldScopedEffect = /*#__PURE__*/dual(3, (self, s, f) => pipe(self, runFoldWhileScopedEffect(s, constTrue, f)));
1802
+
1803
+ /** @internal */
1804
+ const runFoldWhile = /*#__PURE__*/dual(4, (self, s, cont, f) => pipe(self, runFoldWhileScoped(s, cont, f), scoped$1));
1805
+
1806
+ /** @internal */
1807
+ const runFoldWhileEffect = /*#__PURE__*/dual(4, (self, s, cont, f) => pipe(self, runFoldWhileScopedEffect(s, cont, f), scoped$1));
1808
+
1809
+ /** @internal */
1810
+ const runFoldWhileScoped = /*#__PURE__*/dual(4, (self, s, cont, f) => pipe(self, runScoped(fold(s, cont, f))));
1811
+
1812
+ /** @internal */
1813
+ const runFoldWhileScopedEffect = /*#__PURE__*/dual(4, (self, s, cont, f) => pipe(self, runScoped(foldEffect(s, cont, f))));
1814
+
1815
+ /** @internal */
1816
+ const runForEach = /*#__PURE__*/dual(2, (self, f) => pipe(self, run(forEach$1(f))));
1817
+
1818
+ /** @internal */
1819
+ const runForEachChunk = /*#__PURE__*/dual(2, (self, f) => pipe(self, run(forEachChunk(f))));
1820
+
1821
+ /** @internal */
1822
+ const runForEachChunkScoped = /*#__PURE__*/dual(2, (self, f) => pipe(self, runScoped(forEachChunk(f))));
1823
+
1824
+ /** @internal */
1825
+ const runForEachScoped = /*#__PURE__*/dual(2, (self, f) => pipe(self, runScoped(forEach$1(f))));
1826
+
1827
+ /** @internal */
1828
+ const runForEachWhile = /*#__PURE__*/dual(2, (self, f) => pipe(self, run(forEachWhile(f))));
1829
+
1830
+ /** @internal */
1831
+ const runForEachWhileScoped = /*#__PURE__*/dual(2, (self, f) => pipe(self, runScoped(forEachWhile(f))));
1832
+
1833
+ /** @internal */
1834
+ const runHead = self => pipe(self, run(head()));
1835
+
1836
+ /** @internal */
1837
+ const runIntoHub = /*#__PURE__*/dual(2, (self, hub) => pipe(self, runIntoQueue(hub)));
1838
+
1839
+ /** @internal */
1840
+ const runIntoHubScoped = /*#__PURE__*/dual(2, (self, hub) => pipe(self, runIntoQueueScoped(hub)));
1841
+
1842
+ /** @internal */
1843
+ const runIntoQueue = /*#__PURE__*/dual(2, (self, queue) => pipe(self, runIntoQueueScoped(queue), scoped$1));
1844
+
1845
+ /** @internal */
1846
+ const runIntoQueueElementsScoped = /*#__PURE__*/dual(2, (self, queue) => {
1847
+ const writer = readWithCause({
1848
+ onInput: input => flatMap$1(fromEffect$1(offerAll(queue, map$2(input, succeed$4))), () => writer),
1849
+ onFailure: cause => fromEffect$1(offer$1(queue, failCause$2(map$3(cause, some$1)))),
1850
+ onDone: () => fromEffect$1(offer$1(queue, fail$2(none())))
1851
+ });
1852
+ return pipe(pipeTo(toChannel(self), writer), drain$1, runScoped$1, asUnit);
1853
+ });
1854
+
1855
+ /** @internal */
1856
+ const runIntoQueueScoped = /*#__PURE__*/dual(2, (self, queue) => {
1857
+ const writer = readWithCause({
1858
+ onInput: input => flatMap$1(write(chunk(input)), () => writer),
1859
+ onFailure: cause => write(failCause$6(cause)),
1860
+ onDone: () => write(end$2)
1861
+ });
1862
+ return pipe(pipeTo(toChannel(self), writer), mapOutEffect(take => offer$1(queue, take)), drain$1, runScoped$1, asUnit);
1863
+ });
1864
+
1865
+ /** @internal */
1866
+ const runLast = self => pipe(self, run(last()));
1867
+
1868
+ /** @internal */
1869
+ const runScoped = /*#__PURE__*/dual(2, (self, sink) => pipe(toChannel(self), pipeToOrFail(toChannel$1(sink)), drain$1, runScoped$1));
1870
+
1871
+ /** @internal */
1872
+ const runSum = self => pipe(self, run(sum));
1873
+
1874
+ /** @internal */
1875
+ const scan = /*#__PURE__*/dual(3, (self, s, f) => pipe(self, scanEffect(s, (s, a) => succeed$1(f(s, a)))));
1876
+
1877
+ /** @internal */
1878
+ const scanReduce = /*#__PURE__*/dual(2, (self, f) => pipe(self, scanReduceEffect((a2, a) => succeed$1(f(a2, a)))));
1879
+
1880
+ /** @internal */
1881
+ const scanReduceEffect = /*#__PURE__*/dual(2, (self, f) => pipe(self, mapAccumEffect(none(), (option, a) => {
1882
+ switch (option._tag) {
1883
+ case "None":
1884
+ {
1885
+ return succeed$1([some$1(a), a]);
1886
+ }
1887
+ case "Some":
1888
+ {
1889
+ return pipe(f(option.value, a), map$1(b => [some$1(b), b]));
1890
+ }
1891
+ }
1892
+ })));
1893
+
1894
+ /** @internal */
1895
+ const schedule = /*#__PURE__*/dual(2, (self, schedule) => filterMap(scheduleWith(self, schedule, {
1896
+ onElement: some$1,
1897
+ onSchedule: none
1898
+ }), identity));
1899
+
1900
+ /** @internal */
1901
+ const scheduleWith = /*#__PURE__*/dual(3, (self, schedule, options) => {
1902
+ const loop = (driver, iterator) => {
1903
+ const next = iterator.next();
1904
+ if (next.done) {
1905
+ return readWithCause({
1906
+ onInput: chunk => loop(driver, chunk[Symbol.iterator]()),
1907
+ onFailure: failCause$1,
1908
+ onDone: succeedNow
1909
+ });
1910
+ }
1911
+ return unwrap$1(matchEffect(driver.next(next.value), {
1912
+ onFailure: () => pipe(driver.last(), orDie$1, map$1(b => pipe(write(make$7(options.onElement(next.value), options.onSchedule(b))), flatMap$1(() => loop(driver, iterator)))), zipLeft$1(driver.reset())),
1913
+ onSuccess: () => succeed$1(pipe(write(of(options.onElement(next.value))), flatMap$1(() => loop(driver, iterator))))
1914
+ }));
1915
+ };
1916
+ return new StreamImpl(pipe(fromEffect$1(driver(schedule)), flatMap$1(driver => pipe(toChannel(self), pipeTo(loop(driver, empty$1()[Symbol.iterator]()))))));
1917
+ });
1918
+
1919
+ /** @internal */
1920
+ const scanEffect = /*#__PURE__*/dual(3, (self, s, f) => new StreamImpl(pipe(write(of(s)), flatMap$1(() => toChannel(pipe(self, mapAccumEffect(s, (s, a) => pipe(f(s, a), map$1(s => [s, s])))))))));
1921
+
1922
+ /** @internal */
1923
+ const scoped = effect => new StreamImpl(ensuring$1(scoped$2(pipe(effect, map$1(of))), unit$2));
1924
+
1925
+ /** @internal */
1926
+ const some = self => pipe(self, mapError(some$1), someOrFail(() => none()));
1927
+
1928
+ /** @internal */
1929
+ const someOrElse = /*#__PURE__*/dual(2, (self, fallback) => pipe(self, map(getOrElse(fallback))));
1930
+
1931
+ /** @internal */
1932
+ const someOrFail = /*#__PURE__*/dual(2, (self, error) => mapEffectSequential(self, match$2({
1933
+ onNone: () => failSync$1(error),
1934
+ onSome: succeed$1
1935
+ })));
1936
+
1937
+ /** @internal */
1938
+ const sliding = /*#__PURE__*/dual(2, (self, chunkSize) => slidingSize(self, chunkSize, 1));
1939
+
1940
+ /** @internal */
1941
+ const slidingSize = /*#__PURE__*/dual(3, (self, chunkSize, stepSize) => {
1942
+ if (chunkSize <= 0 || stepSize <= 0) {
1943
+ return die(IllegalArgumentException("Invalid bounds - `chunkSize` and `stepSize` must be greater than zero"));
1944
+ }
1945
+ return new StreamImpl(suspend$2(() => {
1946
+ const queue = new RingBuffer(chunkSize);
1947
+ const emitOnStreamEnd = (queueSize, channelEnd) => {
1948
+ if (queueSize < chunkSize) {
1949
+ const items = queue.toChunk();
1950
+ const result = isEmpty(items) ? empty$1() : of(items);
1951
+ return pipe(write(result), flatMap$1(() => channelEnd));
1952
+ }
1953
+ const lastEmitIndex = queueSize - (queueSize - chunkSize) % stepSize;
1954
+ if (lastEmitIndex === queueSize) {
1955
+ return channelEnd;
1956
+ }
1957
+ const leftovers = queueSize - (lastEmitIndex - chunkSize + stepSize);
1958
+ const lastItems = pipe(queue.toChunk(), takeRight$1(leftovers));
1959
+ const result = isEmpty(lastItems) ? empty$1() : of(lastItems);
1960
+ return pipe(write(result), flatMap$1(() => channelEnd));
1961
+ };
1962
+ const reader = queueSize => readWithCause({
1963
+ onInput: input => flatMap$1(write(filterMap$1(input, (element, index) => {
1964
+ queue.put(element);
1965
+ const currentIndex = queueSize + index + 1;
1966
+ if (currentIndex < chunkSize || (currentIndex - chunkSize) % stepSize > 0) {
1967
+ return none();
1968
+ }
1969
+ return some$1(queue.toChunk());
1970
+ })), () => reader(queueSize + input.length)),
1971
+ onFailure: cause => emitOnStreamEnd(queueSize, failCause$1(cause)),
1972
+ onDone: () => emitOnStreamEnd(queueSize, unit$1)
1973
+ });
1974
+ return pipe(toChannel(self), pipeTo(reader(0)));
1975
+ }));
1976
+ });
1977
+
1978
+ /** @internal */
1979
+ const split = /*#__PURE__*/dual(2, (self, predicate) => {
1980
+ const split = (leftovers, input) => {
1981
+ const [chunk, remaining] = pipe(leftovers, appendAll(input), splitWhere(predicate));
1982
+ if (isEmpty(chunk) || isEmpty(remaining)) {
1983
+ return loop(pipe(chunk, appendAll(pipe(remaining, drop$1(1)))));
1984
+ }
1985
+ return pipe(write(of(chunk)), flatMap$1(() => split(empty$1(), pipe(remaining, drop$1(1)))));
1986
+ };
1987
+ const loop = leftovers => readWith({
1988
+ onInput: input => split(leftovers, input),
1989
+ onFailure: fail$1,
1990
+ onDone: () => {
1991
+ if (isEmpty(leftovers)) {
1992
+ return unit$1;
1993
+ }
1994
+ if (isNone(pipe(leftovers, findFirst(predicate)))) {
1995
+ return zipRight$2(write(of(leftovers)), unit$1);
1996
+ }
1997
+ return zipRight$2(split(empty$1(), leftovers), unit$1);
1998
+ }
1999
+ });
2000
+ return new StreamImpl(pipe(toChannel(self), pipeTo(loop(empty$1()))));
2001
+ });
2002
+
2003
+ /** @internal */
2004
+ const splitOnChunk = /*#__PURE__*/dual(2, (self, delimiter) => {
2005
+ const next = (leftover, delimiterIndex) => readWithCause({
2006
+ onInput: inputChunk => {
2007
+ let buffer;
2008
+ const [carry, delimiterCursor] = pipe(inputChunk, reduce([pipe(leftover, getOrElse(() => empty$1())), delimiterIndex], ([carry, delimiterCursor], a) => {
2009
+ const concatenated = pipe(carry, append(a));
2010
+ if (delimiterCursor < delimiter.length && equals(a, pipe(delimiter, unsafeGet$1(delimiterCursor)))) {
2011
+ if (delimiterCursor + 1 === delimiter.length) {
2012
+ if (buffer === undefined) {
2013
+ buffer = [];
2014
+ }
2015
+ buffer.push(pipe(concatenated, take$3(concatenated.length - delimiter.length)));
2016
+ return [empty$1(), 0];
2017
+ }
2018
+ return [concatenated, delimiterCursor + 1];
2019
+ }
2020
+ return [concatenated, equals(a, pipe(delimiter, unsafeGet$1(0))) ? 1 : 0];
2021
+ }));
2022
+ const output = buffer === undefined ? empty$1() : unsafeFromArray(buffer);
2023
+ return flatMap$1(write(output), () => next(isNonEmpty(carry) ? some$1(carry) : none(), delimiterCursor));
2024
+ },
2025
+ onFailure: cause => match$2(leftover, {
2026
+ onNone: () => failCause$1(cause),
2027
+ onSome: chunk => zipRight$2(write(of(chunk)), failCause$1(cause))
2028
+ }),
2029
+ onDone: done => match$2(leftover, {
2030
+ onNone: () => succeed$3(done),
2031
+ onSome: chunk => zipRight$2(write(of(chunk)), succeed$3(done))
2032
+ })
2033
+ });
2034
+ return new StreamImpl(pipe(toChannel(self), pipeTo(next(none(), 0))));
2035
+ });
2036
+
2037
+ /** @internal */
2038
+ const splitLines = self => suspend(() => {
2039
+ let stringBuilder = "";
2040
+ let midCRLF = false;
2041
+ const splitLinesChunk = chunk => {
2042
+ const chunkBuilder = [];
2043
+ map$2(chunk, str => {
2044
+ if (str.length !== 0) {
2045
+ let from = 0;
2046
+ let indexOfCR = str.indexOf("\r");
2047
+ let indexOfLF = str.indexOf("\n");
2048
+ if (midCRLF) {
2049
+ if (indexOfLF === 0) {
2050
+ chunkBuilder.push(stringBuilder);
2051
+ stringBuilder = "";
2052
+ from = 1;
2053
+ indexOfLF = str.indexOf("\n", from);
2054
+ } else {
2055
+ stringBuilder = stringBuilder + "\r";
2056
+ }
2057
+ midCRLF = false;
2058
+ }
2059
+ while (indexOfCR !== -1 || indexOfLF !== -1) {
2060
+ if (indexOfCR === -1 || indexOfLF !== -1 && indexOfLF < indexOfCR) {
2061
+ if (stringBuilder.length === 0) {
2062
+ chunkBuilder.push(str.substring(from, indexOfLF));
2063
+ } else {
2064
+ chunkBuilder.push(stringBuilder + str.substring(from, indexOfLF));
2065
+ stringBuilder = "";
2066
+ }
2067
+ from = indexOfLF + 1;
2068
+ indexOfLF = str.indexOf("\n", from);
2069
+ } else {
2070
+ if (str.length === indexOfCR + 1) {
2071
+ midCRLF = true;
2072
+ indexOfCR = -1;
2073
+ } else {
2074
+ if (indexOfLF === indexOfCR + 1) {
2075
+ if (stringBuilder.length === 0) {
2076
+ chunkBuilder.push(str.substring(from, indexOfCR));
2077
+ } else {
2078
+ stringBuilder = stringBuilder + str.substring(from, indexOfCR);
2079
+ chunkBuilder.push(stringBuilder);
2080
+ stringBuilder = "";
2081
+ }
2082
+ from = indexOfCR + 2;
2083
+ indexOfCR = str.indexOf("\r", from);
2084
+ indexOfLF = str.indexOf("\n", from);
2085
+ } else {
2086
+ indexOfCR = str.indexOf("\r", indexOfCR + 1);
2087
+ }
2088
+ }
2089
+ }
2090
+ }
2091
+ if (midCRLF) {
2092
+ stringBuilder = stringBuilder + str.substring(from, str.length - 1);
2093
+ } else {
2094
+ stringBuilder = stringBuilder + str.substring(from, str.length);
2095
+ }
2096
+ }
2097
+ });
2098
+ return unsafeFromArray(chunkBuilder);
2099
+ };
2100
+ const loop = readWithCause({
2101
+ onInput: input => {
2102
+ const out = splitLinesChunk(input);
2103
+ return isEmpty(out) ? loop : flatMap$1(write(out), () => loop);
2104
+ },
2105
+ onFailure: cause => stringBuilder.length === 0 ? failCause$1(cause) : flatMap$1(write(of(stringBuilder)), () => failCause$1(cause)),
2106
+ onDone: done => stringBuilder.length === 0 ? succeed$3(done) : flatMap$1(write(of(stringBuilder)), () => succeed$3(done))
2107
+ });
2108
+ return new StreamImpl(pipeTo(toChannel(self), loop));
2109
+ });
2110
+
2111
+ /** @internal */
2112
+ const succeed = value => fromChunk(of(value));
2113
+
2114
+ /** @internal */
2115
+ const sync = evaluate => suspend(() => fromChunk(of(evaluate())));
2116
+
2117
+ /** @internal */
2118
+ const suspend = stream => new StreamImpl(suspend$2(() => toChannel(stream())));
2119
+
2120
+ /** @internal */
2121
+ const take = /*#__PURE__*/dual(2, (self, n) => {
2122
+ if (!Number.isInteger(n)) {
2123
+ return die(IllegalArgumentException(`${n} must be an integer`));
2124
+ }
2125
+ const loop = n => readWith({
2126
+ onInput: input => {
2127
+ const taken = pipe(input, take$3(Math.min(n, Number.POSITIVE_INFINITY)));
2128
+ const leftover = Math.max(0, n - taken.length);
2129
+ const more = leftover > 0;
2130
+ if (more) {
2131
+ return pipe(write(taken), flatMap$1(() => loop(leftover)));
2132
+ }
2133
+ return write(taken);
2134
+ },
2135
+ onFailure: fail$1,
2136
+ onDone: succeed$3
2137
+ });
2138
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(0 < n ? loop(n) : unit$1)));
2139
+ });
2140
+
2141
+ /** @internal */
2142
+ const takeRight = /*#__PURE__*/dual(2, (self, n) => {
2143
+ if (n <= 0) {
2144
+ return empty;
2145
+ }
2146
+ return new StreamImpl(pipe(succeed$1(new RingBuffer(n)), map$1(queue => {
2147
+ const reader = readWith({
2148
+ onInput: input => {
2149
+ for (const element of input) {
2150
+ queue.put(element);
2151
+ }
2152
+ return reader;
2153
+ },
2154
+ onFailure: fail$1,
2155
+ onDone: () => pipe(write(queue.toChunk()), zipRight$2(unit$1))
2156
+ });
2157
+ return pipe(toChannel(self), pipeTo(reader));
2158
+ }), unwrap$1));
2159
+ });
2160
+
2161
+ /** @internal */
2162
+ const takeUntil = /*#__PURE__*/dual(2, (self, predicate) => {
2163
+ const loop = readWith({
2164
+ onInput: input => {
2165
+ const taken = pipe(input, takeWhile$1(a => !predicate(a)));
2166
+ const last = pipe(input, drop$1(taken.length), take$3(1));
2167
+ if (isEmpty(last)) {
2168
+ return pipe(write(taken), flatMap$1(() => loop));
2169
+ }
2170
+ return write(pipe(taken, appendAll(last)));
2171
+ },
2172
+ onFailure: fail$1,
2173
+ onDone: succeed$3
2174
+ });
2175
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop)));
2176
+ });
2177
+
2178
+ /** @internal */
2179
+ const takeUntilEffect = /*#__PURE__*/dual(2, (self, predicate) => {
2180
+ const loop = iterator => {
2181
+ const next = iterator.next();
2182
+ if (next.done) {
2183
+ return readWithCause({
2184
+ onInput: elem => loop(elem[Symbol.iterator]()),
2185
+ onFailure: failCause$1,
2186
+ onDone: succeed$3
2187
+ });
2188
+ }
2189
+ return pipe(predicate(next.value), map$1(bool => bool ? write(of(next.value)) : pipe(write(of(next.value)), flatMap$1(() => loop(iterator)))), unwrap$1);
2190
+ };
2191
+ return new StreamImpl(pipe(toChannel(self), pipeTo(loop(empty$1()[Symbol.iterator]()))));
2192
+ });
2193
+
2194
+ /** @internal */
2195
+ const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => {
2196
+ const loop = readWith({
2197
+ onInput: input => {
2198
+ const taken = pipe(input, takeWhile$1(predicate));
2199
+ const more = taken.length === input.length;
2200
+ if (more) {
2201
+ return pipe(write(taken), flatMap$1(() => loop));
2202
+ }
2203
+ return write(taken);
2204
+ },
2205
+ onFailure: fail$1,
2206
+ onDone: succeed$3
2207
+ });
2208
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop)));
2209
+ });
2210
+
2211
+ /** @internal */
2212
+ const tap = /*#__PURE__*/dual(2, (self, f) => mapEffectSequential(self, a => as$1(f(a), a)));
2213
+
2214
+ /** @internal */
2215
+ const tapBoth = /*#__PURE__*/dual(2, (self, {
2216
+ onFailure,
2217
+ onSuccess
2218
+ }) => pipe(self, tapError(onFailure), tap(onSuccess)));
2219
+
2220
+ /** @internal */
2221
+ const tapError = /*#__PURE__*/dual(2, (self, f) => catchAll(self, error => fromEffect(zipRight$1(f(error), fail$3(error)))));
2222
+
2223
+ /** @internal */
2224
+ const tapErrorCause = /*#__PURE__*/dual(2, (self, f) => {
2225
+ const loop = readWithCause({
2226
+ onInput: chunk => flatMap$1(write(chunk), () => loop),
2227
+ onFailure: cause => fromEffect$1(zipRight$1(f(cause), failCause$4(cause))),
2228
+ onDone: succeedNow
2229
+ });
2230
+ return new StreamImpl(pipe(toChannel(self), pipeTo(loop)));
2231
+ });
2232
+
2233
+ /** @internal */
2234
+ const tapSink = /*#__PURE__*/dual(2, (self, sink) => pipe(fromEffect(all([bounded(1), make$4()])), flatMap(([queue, deferred]) => {
2235
+ const right = flattenTake(fromQueue(queue, {
2236
+ maxChunkSize: 1
2237
+ }));
2238
+ const loop = readWithCause({
2239
+ onInput: chunk$1 => pipe(fromEffect$1(offer$1(queue, chunk(chunk$1))), foldCauseChannel({
2240
+ onFailure: () => flatMap$1(write(chunk$1), () => identityChannel()),
2241
+ onSuccess: () => flatMap$1(write(chunk$1), () => loop)
2242
+ })),
2243
+ onFailure: cause => pipe(fromEffect$1(offer$1(queue, failCause$6(cause))), foldCauseChannel({
2244
+ onFailure: () => failCause$1(cause),
2245
+ onSuccess: () => failCause$1(cause)
2246
+ })),
2247
+ onDone: () => pipe(fromEffect$1(offer$1(queue, end$2)), foldCauseChannel({
2248
+ onFailure: () => unit$1,
2249
+ onSuccess: () => unit$1
2250
+ }))
2251
+ });
2252
+ return pipe(new StreamImpl(pipe(pipeTo(toChannel(self), loop), ensuring$1(zipRight$1(forkDaemon(offer$1(queue, end$2)), _await(deferred))))), merge(execute(pipe(run(right, sink), ensuring$2(zipRight$1(shutdown(queue), succeed$2(deferred, void 0)))))));
2253
+ })));
2254
+
2255
+ /** @internal */
2256
+ const throttle = /*#__PURE__*/dual(2, (self, options) => throttleEffect(self, {
2257
+ ...options,
2258
+ cost: chunk => succeed$1(options.cost(chunk))
2259
+ }));
2260
+
2261
+ /** @internal */
2262
+ const throttleEffect = /*#__PURE__*/dual(2, (self, options) => {
2263
+ if (options.strategy === "enforce") {
2264
+ return throttleEnforceEffect(self, options.cost, options.units, options.duration, options.burst ?? 0);
2265
+ }
2266
+ return throttleShapeEffect(self, options.cost, options.units, options.duration, options.burst ?? 0);
2267
+ });
2268
+ const throttleEnforceEffect = (self, cost, units, duration, burst) => {
2269
+ const loop = (tokens, timestampMillis) => readWithCause({
2270
+ onInput: input => pipe(cost(input), zip$1(currentTimeMillis), map$1(([weight, currentTimeMillis]) => {
2271
+ const elapsed = currentTimeMillis - timestampMillis;
2272
+ const cycles = elapsed / toMillis(duration);
2273
+ const sum = tokens + cycles * units;
2274
+ const max = units + burst < 0 ? Number.POSITIVE_INFINITY : units + burst;
2275
+ const available = sum < 0 ? max : Math.min(sum, max);
2276
+ if (weight <= available) {
2277
+ return pipe(write(input), flatMap$1(() => loop(available - weight, currentTimeMillis)));
2278
+ }
2279
+ return loop(tokens, timestampMillis);
2280
+ }), unwrap$1),
2281
+ onFailure: failCause$1,
2282
+ onDone: () => unit$1
2283
+ });
2284
+ const throttled = pipe(currentTimeMillis, map$1(currentTimeMillis => loop(units, currentTimeMillis)), unwrap$1);
2285
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(throttled)));
2286
+ };
2287
+ const throttleShapeEffect = (self, costFn, units, duration, burst) => {
2288
+ const loop = (tokens, timestampMillis) => readWithCause({
2289
+ onInput: input => pipe(costFn(input), zip$1(currentTimeMillis), map$1(([weight, currentTimeMillis]) => {
2290
+ const elapsed = currentTimeMillis - timestampMillis;
2291
+ const cycles = elapsed / toMillis(duration);
2292
+ const sum = tokens + cycles * units;
2293
+ const max = units + burst < 0 ? Number.POSITIVE_INFINITY : units + burst;
2294
+ const available = sum < 0 ? max : Math.min(sum, max);
2295
+ const remaining = available - weight;
2296
+ const waitCycles = remaining >= 0 ? 0 : -remaining / units;
2297
+ const delay = millis(Math.max(0, waitCycles * toMillis(duration)));
2298
+ if (greaterThan(delay, zero)) {
2299
+ return pipe(fromEffect$1(sleep(delay)), zipRight$2(write(input)), flatMap$1(() => loop(remaining, currentTimeMillis)));
2300
+ }
2301
+ return flatMap$1(write(input), () => loop(remaining, currentTimeMillis));
2302
+ }), unwrap$1),
2303
+ onFailure: failCause$1,
2304
+ onDone: () => unit$1
2305
+ });
2306
+ const throttled = pipe(currentTimeMillis, map$1(currentTimeMillis => loop(units, currentTimeMillis)), unwrap$1);
2307
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(throttled)));
2308
+ };
2309
+
2310
+ /** @internal */
2311
+ const tick = interval => repeatWithSchedule(void 0, spaced(interval));
2312
+
2313
+ /** @internal */
2314
+ const timeout = /*#__PURE__*/dual(2, (self, duration) => pipe(toPull(self), map$1(timeoutFail$1({
2315
+ onTimeout: () => none(),
2316
+ duration
2317
+ })), fromPull));
2318
+
2319
+ /** @internal */
2320
+ const timeoutFail = /*#__PURE__*/dual(3, (self, error, duration) => pipe(self, timeoutTo(duration, failSync(error))));
2321
+
2322
+ /** @internal */
2323
+ const timeoutFailCause = /*#__PURE__*/dual(3, (self, cause, duration) => pipe(toPull(self), map$1(timeoutFailCause$1({
2324
+ onTimeout: () => map$3(cause(), some$1),
2325
+ duration
2326
+ })), fromPull));
2327
+
2328
+ /** @internal */
2329
+ const timeoutTo = /*#__PURE__*/dual(3, (self, duration, that) => {
2330
+ const StreamTimeout = RuntimeException("Stream Timeout");
2331
+ return pipe(self, timeoutFailCause(() => die$2(StreamTimeout), duration), catchSomeCause(cause => isDieType(cause) && isRuntimeException(cause.defect) && cause.defect.message !== undefined && cause.defect.message === "Stream Timeout" ? some$1(that) : none()));
2332
+ });
2333
+
2334
+ /** @internal */
2335
+ const toHub = /*#__PURE__*/dual(2, (self, capacity) => pipe(acquireRelease$1(bounded$1(capacity), hub => shutdown$1(hub)), tap$1(hub => pipe(self, runIntoHubScoped(hub), forkScoped))));
2336
+
2337
+ /** @internal */
2338
+ const toPull = self => map$1(toPull$1(toChannel(self)), pull => pipe(pull, mapError$1(some$1), flatMap$2(match({
2339
+ onLeft: () => fail$3(none()),
2340
+ onRight: succeed$1
2341
+ }))));
2342
+
2343
+ /** @internal */
2344
+ const toQueue = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => tap$1(acquireRelease$1(options?.strategy === "unbounded" ? unbounded() : options?.strategy === "dropping" ? dropping(options.capacity ?? 2) : options?.strategy === "sliding" ? sliding$1(options.capacity ?? 2) : bounded(options?.capacity ?? 2), queue => shutdown(queue)), queue => forkScoped(runIntoQueueScoped(self, queue))));
2345
+
2346
+ /** @internal */
2347
+ const toQueueOfElements = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => tap$1(acquireRelease$1(bounded(options?.capacity ?? 2), queue => shutdown(queue)), queue => forkScoped(runIntoQueueElementsScoped(self, queue))));
2348
+
2349
+ /** @internal */
2350
+ const toReadableStream = source => {
2351
+ let pull;
2352
+ let scope;
2353
+ return new ReadableStream({
2354
+ start(controller) {
2355
+ scope = runSync(make$6());
2356
+ pull = pipe(toPull(source), use(scope), runSync, tap$1(chunk => sync$1(() => {
2357
+ map$2(chunk, a => {
2358
+ controller.enqueue(a);
2359
+ });
2360
+ })), tapErrorCause$1(() => close(scope, unit$3)), catchTags$1({
2361
+ "None": () => sync$1(() => {
2362
+ controller.close();
2363
+ }),
2364
+ "Some": error => sync$1(() => {
2365
+ controller.error(error.value);
2366
+ })
2367
+ }), asUnit);
2368
+ },
2369
+ pull() {
2370
+ return runPromise(pull);
2371
+ },
2372
+ cancel() {
2373
+ return runPromise(close(scope, unit$3));
2374
+ }
2375
+ });
2376
+ };
2377
+
2378
+ /** @internal */
2379
+ const transduce = /*#__PURE__*/dual(2, (self, sink) => {
2380
+ const newChannel = suspend$2(() => {
2381
+ const leftovers = {
2382
+ ref: empty$1()
2383
+ };
2384
+ const upstreamDone = {
2385
+ ref: false
2386
+ };
2387
+ const buffer = suspend$2(() => {
2388
+ const leftover = leftovers.ref;
2389
+ if (isEmpty(leftover)) {
2390
+ return readWith({
2391
+ onInput: input => pipe(write(input), flatMap$1(() => buffer)),
2392
+ onFailure: fail$1,
2393
+ onDone: succeedNow
2394
+ });
2395
+ }
2396
+ leftovers.ref = empty$1();
2397
+ return pipe(writeChunk(leftover), flatMap$1(() => buffer));
2398
+ });
2399
+ const concatAndGet = chunk => {
2400
+ const leftover = leftovers.ref;
2401
+ const concatenated = appendAll(leftover, filter$1(chunk, chunk => chunk.length !== 0));
2402
+ leftovers.ref = concatenated;
2403
+ return concatenated;
2404
+ };
2405
+ const upstreamMarker = readWith({
2406
+ onInput: input => flatMap$1(write(input), () => upstreamMarker),
2407
+ onFailure: fail$1,
2408
+ onDone: done => zipRight$2(sync$2(() => {
2409
+ upstreamDone.ref = true;
2410
+ }), succeedNow(done))
2411
+ });
2412
+ const transducer = pipe(sink, toChannel$1, collectElements, flatMap$1(([leftover, z]) => pipe(succeed$3([upstreamDone.ref, concatAndGet(leftover)]), flatMap$1(([done, newLeftovers]) => {
2413
+ const nextChannel = done && isEmpty(newLeftovers) ? unit$1 : transducer;
2414
+ return pipe(write(of(z)), flatMap$1(() => nextChannel));
2415
+ }))));
2416
+ return pipe(toChannel(self), pipeTo(upstreamMarker), pipeTo(buffer), pipeToOrFail(transducer));
2417
+ });
2418
+ return new StreamImpl(newChannel);
2419
+ });
2420
+
2421
+ /** @internal */
2422
+ const unfold = (s, f) => unfoldChunk(s, s => pipe(f(s), map$4(([a, s]) => [of(a), s])));
2423
+
2424
+ /** @internal */
2425
+ const unfoldChunk = (s, f) => {
2426
+ const loop = s => match$2(f(s), {
2427
+ onNone: () => unit$1,
2428
+ onSome: ([chunk, s]) => flatMap$1(write(chunk), () => loop(s))
2429
+ });
2430
+ return new StreamImpl(suspend$2(() => loop(s)));
2431
+ };
2432
+
2433
+ /** @internal */
2434
+ const unfoldChunkEffect = (s, f) => suspend(() => {
2435
+ const loop = s => unwrap$1(map$1(f(s), match$2({
2436
+ onNone: () => unit$1,
2437
+ onSome: ([chunk, s]) => flatMap$1(write(chunk), () => loop(s))
2438
+ })));
2439
+ return new StreamImpl(loop(s));
2440
+ });
2441
+
2442
+ /** @internal */
2443
+ const unfoldEffect = (s, f) => unfoldChunkEffect(s, s => pipe(f(s), map$1(map$4(([a, s]) => [of(a), s]))));
2444
+
2445
+ /** @internal */
2446
+ const unit = /*#__PURE__*/succeed(void 0);
2447
+
2448
+ /** @internal */
2449
+ const unwrap = effect => flatten(fromEffect(effect));
2450
+
2451
+ /** @internal */
2452
+ const unwrapScoped = effect => flatten(scoped(effect));
2453
+
2454
+ /** @internal */
2455
+ const updateService = /*#__PURE__*/dual(3, (self, tag, f) => pipe(self, mapInputContext(context => pipe(context, add(tag, f(pipe(context, unsafeGet(tag))))))));
2456
+
2457
+ /** @internal */
2458
+ const when = /*#__PURE__*/dual(2, (self, predicate) => pipe(self, whenEffect(sync$1(predicate))));
2459
+
2460
+ /** @internal */
2461
+ const whenCase = (evaluate, pf) => whenCaseEffect(pf)(sync$1(evaluate));
2462
+
2463
+ /** @internal */
2464
+ const whenCaseEffect = /*#__PURE__*/dual(2, (self, pf) => pipe(fromEffect(self), flatMap(a => pipe(pf(a), getOrElse(() => empty)))));
2465
+
2466
+ /** @internal */
2467
+ const whenEffect = /*#__PURE__*/dual(2, (self, effect) => pipe(fromEffect(effect), flatMap(bool => bool ? self : empty)));
2468
+
2469
+ /** @internal */
2470
+ const withSpan = /*#__PURE__*/dual(3, (self, name, options) => unwrapScoped(as$1(withSpanScoped(name, options), self)));
2471
+
2472
+ /** @internal */
2473
+ const zip = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipWith(that, (a, a2) => [a, a2])));
2474
+
2475
+ /** @internal */
2476
+ const zipFlatten = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipWith(that, (a, a2) => [...a, a2])));
2477
+
2478
+ /** @internal */
2479
+ const zipAll = /*#__PURE__*/dual(2, (self, options) => zipAllWith(self, {
2480
+ other: options.other,
2481
+ onSelf: a => [a, options.defaultOther],
2482
+ onOther: a2 => [options.defaultSelf, a2],
2483
+ onBoth: (a, a2) => [a, a2]
2484
+ }));
2485
+
2486
+ /** @internal */
2487
+ const zipAllLeft = /*#__PURE__*/dual(3, (self, other, defaultSelf) => zipAllWith(self, {
2488
+ other,
2489
+ onSelf: identity,
2490
+ onOther: () => defaultSelf,
2491
+ onBoth: a => a
2492
+ }));
2493
+
2494
+ /** @internal */
2495
+ const zipAllRight = /*#__PURE__*/dual(3, (self, other, defaultRight) => zipAllWith(self, {
2496
+ other,
2497
+ onSelf: () => defaultRight,
2498
+ onOther: identity,
2499
+ onBoth: (_, a2) => a2
2500
+ }));
2501
+
2502
+ /** @internal */
2503
+ const zipAllSortedByKey = /*#__PURE__*/dual(2, (self, options) => zipAllSortedByKeyWith(self, {
2504
+ other: options.other,
2505
+ onSelf: a => [a, options.defaultOther],
2506
+ onOther: a2 => [options.defaultSelf, a2],
2507
+ onBoth: (a, a2) => [a, a2],
2508
+ order: options.order
2509
+ }));
2510
+
2511
+ /** @internal */
2512
+ const zipAllSortedByKeyLeft = /*#__PURE__*/dual(2, (self, options) => zipAllSortedByKeyWith(self, {
2513
+ other: options.other,
2514
+ onSelf: identity,
2515
+ onOther: () => options.defaultSelf,
2516
+ onBoth: a => a,
2517
+ order: options.order
2518
+ }));
2519
+
2520
+ /** @internal */
2521
+ const zipAllSortedByKeyRight = /*#__PURE__*/dual(2, (self, options) => zipAllSortedByKeyWith(self, {
2522
+ other: options.other,
2523
+ onSelf: () => options.defaultOther,
2524
+ onOther: identity,
2525
+ onBoth: (_, a2) => a2,
2526
+ order: options.order
2527
+ }));
2528
+
2529
+ /** @internal */
2530
+ const zipAllSortedByKeyWith = /*#__PURE__*/dual(2, (self, options) => {
2531
+ const pull = (state, pullLeft, pullRight) => {
2532
+ switch (state._tag) {
2533
+ case OP_DRAIN_LEFT:
2534
+ {
2535
+ return pipe(pullLeft, match$1({
2536
+ onFailure: fail$2,
2537
+ onSuccess: leftChunk => succeed$4([map$2(leftChunk, ([k, a]) => [k, options.onSelf(a)]), DrainLeft])
2538
+ }));
2539
+ }
2540
+ case OP_DRAIN_RIGHT:
2541
+ {
2542
+ return pipe(pullRight, match$1({
2543
+ onFailure: fail$2,
2544
+ onSuccess: rightChunk => succeed$4([map$2(rightChunk, ([k, a2]) => [k, options.onOther(a2)]), DrainRight])
2545
+ }));
2546
+ }
2547
+ case OP_PULL_BOTH:
2548
+ {
2549
+ return pipe(unsome(pullLeft), zip$1(unsome(pullRight), {
2550
+ concurrent: true
2551
+ }), matchEffect({
2552
+ onFailure: error => succeed$1(fail$2(some$1(error))),
2553
+ onSuccess: ([leftOption, rightOption]) => {
2554
+ if (isSome(leftOption) && isSome(rightOption)) {
2555
+ if (isEmpty(leftOption.value) && isEmpty(rightOption.value)) {
2556
+ return pull(PullBoth, pullLeft, pullRight);
2557
+ }
2558
+ if (isEmpty(leftOption.value)) {
2559
+ return pull(PullLeft(rightOption.value), pullLeft, pullRight);
2560
+ }
2561
+ if (isEmpty(rightOption.value)) {
2562
+ return pull(PullRight(leftOption.value), pullLeft, pullRight);
2563
+ }
2564
+ return succeed$1(succeed$4(merge(leftOption.value, rightOption.value)));
2565
+ }
2566
+ if (isSome(leftOption) && isNone(rightOption)) {
2567
+ if (isEmpty(leftOption.value)) {
2568
+ return pull(DrainLeft, pullLeft, pullRight);
2569
+ }
2570
+ return succeed$1(succeed$4([pipe(leftOption.value, map$2(([k, a]) => [k, options.onSelf(a)])), DrainLeft]));
2571
+ }
2572
+ if (isNone(leftOption) && isSome(rightOption)) {
2573
+ if (isEmpty(rightOption.value)) {
2574
+ return pull(DrainRight, pullLeft, pullRight);
2575
+ }
2576
+ return succeed$1(succeed$4([pipe(rightOption.value, map$2(([k, a2]) => [k, options.onOther(a2)])), DrainRight]));
2577
+ }
2578
+ return succeed$1(fail$2(none()));
2579
+ }
2580
+ }));
2581
+ }
2582
+ case OP_PULL_LEFT:
2583
+ {
2584
+ return matchEffect(pullLeft, {
2585
+ onFailure: match$2({
2586
+ onNone: () => succeed$1(succeed$4([pipe(state.rightChunk, map$2(([k, a2]) => [k, options.onOther(a2)])), DrainRight])),
2587
+ onSome: error => succeed$1(fail$2(some$1(error)))
2588
+ }),
2589
+ onSuccess: leftChunk => isEmpty(leftChunk) ? pull(PullLeft(state.rightChunk), pullLeft, pullRight) : succeed$1(succeed$4(merge(leftChunk, state.rightChunk)))
2590
+ });
2591
+ }
2592
+ case OP_PULL_RIGHT:
2593
+ {
2594
+ return matchEffect(pullRight, {
2595
+ onFailure: match$2({
2596
+ onNone: () => succeed$1(succeed$4([map$2(state.leftChunk, ([k, a]) => [k, options.onSelf(a)]), DrainLeft])),
2597
+ onSome: error => succeed$1(fail$2(some$1(error)))
2598
+ }),
2599
+ onSuccess: rightChunk => isEmpty(rightChunk) ? pull(PullRight(state.leftChunk), pullLeft, pullRight) : succeed$1(succeed$4(merge(state.leftChunk, rightChunk)))
2600
+ });
2601
+ }
2602
+ }
2603
+ };
2604
+ const merge = (leftChunk, rightChunk) => {
2605
+ const hasNext = (chunk, index) => index < chunk.length - 1;
2606
+ const builder = [];
2607
+ let state = undefined;
2608
+ let leftIndex = 0;
2609
+ let rightIndex = 0;
2610
+ let leftTuple = pipe(leftChunk, unsafeGet$1(leftIndex));
2611
+ let rightTuple = pipe(rightChunk, unsafeGet$1(rightIndex));
2612
+ let k1 = leftTuple[0];
2613
+ let a = leftTuple[1];
2614
+ let k2 = rightTuple[0];
2615
+ let a2 = rightTuple[1];
2616
+ let loop = true;
2617
+ while (loop) {
2618
+ const compare = options.order(k1, k2);
2619
+ if (compare === 0) {
2620
+ builder.push([k1, options.onBoth(a, a2)]);
2621
+ if (hasNext(leftChunk, leftIndex) && hasNext(rightChunk, rightIndex)) {
2622
+ leftIndex = leftIndex + 1;
2623
+ rightIndex = rightIndex + 1;
2624
+ leftTuple = pipe(leftChunk, unsafeGet$1(leftIndex));
2625
+ rightTuple = pipe(rightChunk, unsafeGet$1(rightIndex));
2626
+ k1 = leftTuple[0];
2627
+ a = leftTuple[1];
2628
+ k2 = rightTuple[0];
2629
+ a2 = rightTuple[1];
2630
+ } else if (hasNext(leftChunk, leftIndex)) {
2631
+ state = PullRight(pipe(leftChunk, drop$1(leftIndex + 1)));
2632
+ loop = false;
2633
+ } else if (hasNext(rightChunk, rightIndex)) {
2634
+ state = PullLeft(pipe(rightChunk, drop$1(rightIndex + 1)));
2635
+ loop = false;
2636
+ } else {
2637
+ state = PullBoth;
2638
+ loop = false;
2639
+ }
2640
+ } else if (compare < 0) {
2641
+ builder.push([k1, options.onSelf(a)]);
2642
+ if (hasNext(leftChunk, leftIndex)) {
2643
+ leftIndex = leftIndex + 1;
2644
+ leftTuple = pipe(leftChunk, unsafeGet$1(leftIndex));
2645
+ k1 = leftTuple[0];
2646
+ a = leftTuple[1];
2647
+ } else {
2648
+ const rightBuilder = [];
2649
+ rightBuilder.push(rightTuple);
2650
+ while (hasNext(rightChunk, rightIndex)) {
2651
+ rightIndex = rightIndex + 1;
2652
+ rightTuple = pipe(rightChunk, unsafeGet$1(rightIndex));
2653
+ rightBuilder.push(rightTuple);
2654
+ }
2655
+ state = PullLeft(unsafeFromArray(rightBuilder));
2656
+ loop = false;
2657
+ }
2658
+ } else {
2659
+ builder.push([k2, options.onOther(a2)]);
2660
+ if (hasNext(rightChunk, rightIndex)) {
2661
+ rightIndex = rightIndex + 1;
2662
+ rightTuple = pipe(rightChunk, unsafeGet$1(rightIndex));
2663
+ k2 = rightTuple[0];
2664
+ a2 = rightTuple[1];
2665
+ } else {
2666
+ const leftBuilder = [];
2667
+ leftBuilder.push(leftTuple);
2668
+ while (hasNext(leftChunk, leftIndex)) {
2669
+ leftIndex = leftIndex + 1;
2670
+ leftTuple = pipe(leftChunk, unsafeGet$1(leftIndex));
2671
+ leftBuilder.push(leftTuple);
2672
+ }
2673
+ state = PullRight(unsafeFromArray(leftBuilder));
2674
+ loop = false;
2675
+ }
2676
+ }
2677
+ }
2678
+ return [unsafeFromArray(builder), state];
2679
+ };
2680
+ return combineChunks(self, options.other, PullBoth, pull);
2681
+ });
2682
+
2683
+ /** @internal */
2684
+ const zipAllWith = /*#__PURE__*/dual(2, (self, options) => {
2685
+ const pull = (state, pullLeft, pullRight) => {
2686
+ switch (state._tag) {
2687
+ case OP_DRAIN_LEFT:
2688
+ {
2689
+ return matchEffect(pullLeft, {
2690
+ onFailure: error => succeed$1(fail$2(error)),
2691
+ onSuccess: leftChunk => succeed$1(succeed$4([map$2(leftChunk, options.onSelf), DrainLeft]))
2692
+ });
2693
+ }
2694
+ case OP_DRAIN_RIGHT:
2695
+ {
2696
+ return matchEffect(pullRight, {
2697
+ onFailure: error => succeed$1(fail$2(error)),
2698
+ onSuccess: rightChunk => succeed$1(succeed$4([map$2(rightChunk, options.onOther), DrainRight]))
2699
+ });
2700
+ }
2701
+ case OP_PULL_BOTH:
2702
+ {
2703
+ return pipe(unsome(pullLeft), zip$1(unsome(pullRight), {
2704
+ concurrent: true
2705
+ }), matchEffect({
2706
+ onFailure: error => succeed$1(fail$2(some$1(error))),
2707
+ onSuccess: ([leftOption, rightOption]) => {
2708
+ if (isSome(leftOption) && isSome(rightOption)) {
2709
+ if (isEmpty(leftOption.value) && isEmpty(rightOption.value)) {
2710
+ return pull(PullBoth, pullLeft, pullRight);
2711
+ }
2712
+ if (isEmpty(leftOption.value)) {
2713
+ return pull(PullLeft(rightOption.value), pullLeft, pullRight);
2714
+ }
2715
+ if (isEmpty(rightOption.value)) {
2716
+ return pull(PullRight(leftOption.value), pullLeft, pullRight);
2717
+ }
2718
+ return succeed$1(succeed$4(zip(leftOption.value, rightOption.value, options.onBoth)));
2719
+ }
2720
+ if (isSome(leftOption) && isNone(rightOption)) {
2721
+ return succeed$1(succeed$4([map$2(leftOption.value, options.onSelf), DrainLeft]));
2722
+ }
2723
+ if (isNone(leftOption) && isSome(rightOption)) {
2724
+ return succeed$1(succeed$4([map$2(rightOption.value, options.onOther), DrainRight]));
2725
+ }
2726
+ return succeed$1(fail$2(none()));
2727
+ }
2728
+ }));
2729
+ }
2730
+ case OP_PULL_LEFT:
2731
+ {
2732
+ return matchEffect(pullLeft, {
2733
+ onFailure: match$2({
2734
+ onNone: () => succeed$1(succeed$4([map$2(state.rightChunk, options.onOther), DrainRight])),
2735
+ onSome: error => succeed$1(fail$2(some$1(error)))
2736
+ }),
2737
+ onSuccess: leftChunk => {
2738
+ if (isEmpty(leftChunk)) {
2739
+ return pull(PullLeft(state.rightChunk), pullLeft, pullRight);
2740
+ }
2741
+ if (isEmpty(state.rightChunk)) {
2742
+ return pull(PullRight(leftChunk), pullLeft, pullRight);
2743
+ }
2744
+ return succeed$1(succeed$4(zip(leftChunk, state.rightChunk, options.onBoth)));
2745
+ }
2746
+ });
2747
+ }
2748
+ case OP_PULL_RIGHT:
2749
+ {
2750
+ return matchEffect(pullRight, {
2751
+ onFailure: match$2({
2752
+ onNone: () => succeed$1(succeed$4([map$2(state.leftChunk, options.onSelf), DrainLeft])),
2753
+ onSome: error => succeed$1(fail$2(some$1(error)))
2754
+ }),
2755
+ onSuccess: rightChunk => {
2756
+ if (isEmpty(rightChunk)) {
2757
+ return pull(PullRight(state.leftChunk), pullLeft, pullRight);
2758
+ }
2759
+ if (isEmpty(state.leftChunk)) {
2760
+ return pull(PullLeft(rightChunk), pullLeft, pullRight);
2761
+ }
2762
+ return succeed$1(succeed$4(zip(state.leftChunk, rightChunk, options.onBoth)));
2763
+ }
2764
+ });
2765
+ }
2766
+ }
2767
+ };
2768
+ const zip = (leftChunk, rightChunk, f) => {
2769
+ const [output, either] = zipChunks(leftChunk, rightChunk, f);
2770
+ switch (either._tag) {
2771
+ case "Left":
2772
+ {
2773
+ if (isEmpty(either.left)) {
2774
+ return [output, PullBoth];
2775
+ }
2776
+ return [output, PullRight(either.left)];
2777
+ }
2778
+ case "Right":
2779
+ {
2780
+ if (isEmpty(either.right)) {
2781
+ return [output, PullBoth];
2782
+ }
2783
+ return [output, PullLeft(either.right)];
2784
+ }
2785
+ }
2786
+ };
2787
+ return combineChunks(self, options.other, PullBoth, pull);
2788
+ });
2789
+
2790
+ /** @internal */
2791
+ const zipLatest = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipLatestWith(that, (a, a2) => [a, a2])));
2792
+
2793
+ /** @internal */
2794
+ const zipLatestWith = /*#__PURE__*/dual(3, (self, that, f) => {
2795
+ const pullNonEmpty = pull => pipe(pull, flatMap$2(chunk => isEmpty(chunk) ? pullNonEmpty(pull) : succeed$1(chunk)));
2796
+ return pipe(toPull(self), map$1(pullNonEmpty), zip$1(pipe(toPull(that), map$1(pullNonEmpty))), flatMap$2(([left, right]) => pipe(fromEffectOption(raceWith(left, right, {
2797
+ onSelfDone: (leftDone, rightFiber) => pipe(suspend$1(() => leftDone), zipWith$1(join(rightFiber), (l, r) => [l, r, true])),
2798
+ onOtherDone: (rightDone, leftFiber) => pipe(suspend$1(() => rightDone), zipWith$1(join(leftFiber), (l, r) => [r, l, false]))
2799
+ })), flatMap(([l, r, leftFirst]) => pipe(fromEffect(make$2([unsafeLast(l), unsafeLast(r)])), flatMap(latest => pipe(fromChunk(leftFirst ? pipe(r, map$2(a2 => f(unsafeLast(l), a2))) : pipe(l, map$2(a => f(a, unsafeLast(r))))), concat(pipe(repeatEffectOption(left), mergeEither(repeatEffectOption(right)), mapEffectSequential(match({
2800
+ onLeft: leftChunk => pipe(modify(latest, ([_, rightLatest]) => [pipe(leftChunk, map$2(a => f(a, rightLatest))), [unsafeLast(leftChunk), rightLatest]])),
2801
+ onRight: rightChunk => pipe(modify(latest, ([leftLatest, _]) => [pipe(rightChunk, map$2(a2 => f(leftLatest, a2))), [leftLatest, unsafeLast(rightChunk)]]))
2802
+ })), flatMap(fromChunk))))))), toPull)), fromPull);
2803
+ });
2804
+
2805
+ /** @internal */
2806
+ const zipLeft = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipWithChunks(that, (left$1, right$1) => {
2807
+ if (left$1.length > right$1.length) {
2808
+ return [pipe(left$1, take$3(right$1.length)), left(pipe(left$1, take$3(right$1.length)))];
2809
+ }
2810
+ return [left$1, right(pipe(right$1, drop$1(left$1.length)))];
2811
+ })));
2812
+
2813
+ /** @internal */
2814
+ const zipRight = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipWithChunks(that, (left$1, right$1) => {
2815
+ if (left$1.length > right$1.length) {
2816
+ return [right$1, left(pipe(left$1, take$3(right$1.length)))];
2817
+ }
2818
+ return [pipe(right$1, take$3(left$1.length)), right(pipe(right$1, drop$1(left$1.length)))];
2819
+ })));
2820
+
2821
+ /** @internal */
2822
+ const zipWith = /*#__PURE__*/dual(3, (self, that, f) => pipe(self, zipWithChunks(that, (leftChunk, rightChunk) => zipChunks(leftChunk, rightChunk, f))));
2823
+
2824
+ /** @internal */
2825
+ const zipWithChunks = /*#__PURE__*/dual(3, (self, that, f) => {
2826
+ const pull = (state, pullLeft, pullRight) => {
2827
+ switch (state._tag) {
2828
+ case OP_PULL_BOTH$1:
2829
+ {
2830
+ return pipe(unsome(pullLeft), zip$1(unsome(pullRight), {
2831
+ concurrent: true
2832
+ }), matchEffect({
2833
+ onFailure: error => succeed$1(fail$2(some$1(error))),
2834
+ onSuccess: ([leftOption, rightOption]) => {
2835
+ if (isSome(leftOption) && isSome(rightOption)) {
2836
+ if (isEmpty(leftOption.value) && isEmpty(rightOption.value)) {
2837
+ return pull(PullBoth$1, pullLeft, pullRight);
2838
+ }
2839
+ if (isEmpty(leftOption.value)) {
2840
+ return pull(PullLeft$1(rightOption.value), pullLeft, pullRight);
2841
+ }
2842
+ if (isEmpty(rightOption.value)) {
2843
+ return pull(PullRight$1(leftOption.value), pullLeft, pullRight);
2844
+ }
2845
+ return succeed$1(succeed$4(zip(leftOption.value, rightOption.value)));
2846
+ }
2847
+ return succeed$1(fail$2(none()));
2848
+ }
2849
+ }));
2850
+ }
2851
+ case OP_PULL_LEFT$1:
2852
+ {
2853
+ return matchEffect(pullLeft, {
2854
+ onFailure: error => succeed$1(fail$2(error)),
2855
+ onSuccess: leftChunk => {
2856
+ if (isEmpty(leftChunk)) {
2857
+ return pull(PullLeft$1(state.rightChunk), pullLeft, pullRight);
2858
+ }
2859
+ if (isEmpty(state.rightChunk)) {
2860
+ return pull(PullRight$1(leftChunk), pullLeft, pullRight);
2861
+ }
2862
+ return succeed$1(succeed$4(zip(leftChunk, state.rightChunk)));
2863
+ }
2864
+ });
2865
+ }
2866
+ case OP_PULL_RIGHT$1:
2867
+ {
2868
+ return matchEffect(pullRight, {
2869
+ onFailure: error => succeed$1(fail$2(error)),
2870
+ onSuccess: rightChunk => {
2871
+ if (isEmpty(rightChunk)) {
2872
+ return pull(PullRight$1(state.leftChunk), pullLeft, pullRight);
2873
+ }
2874
+ if (isEmpty(state.leftChunk)) {
2875
+ return pull(PullLeft$1(rightChunk), pullLeft, pullRight);
2876
+ }
2877
+ return succeed$1(succeed$4(zip(state.leftChunk, rightChunk)));
2878
+ }
2879
+ });
2880
+ }
2881
+ }
2882
+ };
2883
+ const zip = (leftChunk, rightChunk) => {
2884
+ const [output, either] = f(leftChunk, rightChunk);
2885
+ switch (either._tag) {
2886
+ case "Left":
2887
+ {
2888
+ if (isEmpty(either.left)) {
2889
+ return [output, PullBoth$1];
2890
+ }
2891
+ return [output, PullRight$1(either.left)];
2892
+ }
2893
+ case "Right":
2894
+ {
2895
+ if (isEmpty(either.right)) {
2896
+ return [output, PullBoth$1];
2897
+ }
2898
+ return [output, PullLeft$1(either.right)];
2899
+ }
2900
+ }
2901
+ };
2902
+ return pipe(self, combineChunks(that, PullBoth$1, pull));
2903
+ });
2904
+
2905
+ /** @internal */
2906
+ const zipWithIndex = self => pipe(self, mapAccum(0, (index, a) => [index + 1, [a, index]]));
2907
+
2908
+ /** @internal */
2909
+ const zipWithNext = self => {
2910
+ const process = last => readWithCause({
2911
+ onInput: input => {
2912
+ const [newLast, chunk] = mapAccum$1(input, last, (prev, curr) => [some$1(curr), pipe(prev, map$4(a => [a, curr]))]);
2913
+ const output = filterMap$1(chunk, option => isSome(option) ? some$1([option.value[0], some$1(option.value[1])]) : none());
2914
+ return flatMap$1(write(output), () => process(newLast));
2915
+ },
2916
+ onFailure: failCause$1,
2917
+ onDone: () => match$2(last, {
2918
+ onNone: () => unit$1,
2919
+ onSome: value => zipRight$2(write(of([value, none()])), unit$1)
2920
+ })
2921
+ });
2922
+ return new StreamImpl(pipe(toChannel(self), pipeToOrFail(process(none()))));
2923
+ };
2924
+
2925
+ /** @internal */
2926
+ const zipWithPrevious = self => pipe(self, mapAccum(none(), (prev, curr) => [some$1(curr), [prev, curr]]));
2927
+
2928
+ /** @internal */
2929
+ const zipWithPreviousAndNext = self => pipe(zipWithNext(zipWithPrevious(self)), map(([[prev, curr], next]) => [prev, curr, pipe(next, map$4(tuple => tuple[1]))]));
2930
+
2931
+ /** @internal */
2932
+ const zipChunks = (left$1, right$1, f) => {
2933
+ if (left$1.length > right$1.length) {
2934
+ return [pipe(left$1, take$3(right$1.length), zipWith$2(right$1, f)), left(pipe(left$1, drop$1(right$1.length)))];
2935
+ }
2936
+ return [pipe(left$1, zipWith$2(pipe(right$1, take$3(left$1.length)), f)), right(pipe(right$1, drop$1(left$1.length)))];
2937
+ };
2938
+
2939
+ // Do notation
2940
+
2941
+ /** @internal */
2942
+ const Do = /*#__PURE__*/succeed({});
2943
+
2944
+ /** @internal */
2945
+ const bind = /*#__PURE__*/dual(args => typeof args[0] !== "string", (self, tag, f, options) => flatMap(self, k => map(f(k), a => ({
2946
+ ...k,
2947
+ [tag]: a
2948
+ })), options));
2949
+
2950
+ /* @internal */
2951
+ const bindTo = /*#__PURE__*/dual(2, (self, tag) => map(self, a => ({
2952
+ [tag]: a
2953
+ })));
2954
+
2955
+ /* @internal */
2956
+ const let_ = /*#__PURE__*/dual(3, (self, tag, f) => map(self, k => ({
2957
+ ...k,
2958
+ [tag]: f(k)
2959
+ })));
2960
+
2961
+ // Circular with Channel
2962
+
2963
+ /** @internal */
2964
+ const channelToStream = self => {
2965
+ return new StreamImpl(self);
2966
+ };
2967
+
2968
+ // =============================================================================
2969
+ // encoding
2970
+ // =============================================================================
2971
+
2972
+ /** @internal */
2973
+ const decodeText = /*#__PURE__*/dual(args => isStream(args[0]), (self, encoding = "utf-8") => suspend(() => {
2974
+ const decoder = new TextDecoder(encoding);
2975
+ return map(self, s => decoder.decode(s));
2976
+ }));
2977
+
2978
+ /** @internal */
2979
+ const encodeText = self => suspend(() => {
2980
+ const encoder = new TextEncoder();
2981
+ return map(self, s => encoder.encode(s));
2982
+ });
2983
+
2984
+ export { DefaultChunkSize, Do, StreamImpl, StreamTypeId, _async, acquireRelease, aggregate, aggregateWithin, aggregateWithinEither, as, asyncEffect, asyncInterrupt, asyncOption, asyncScoped, bind, bindTo, branchAfter, broadcast, broadcastDynamic, broadcastedQueues, broadcastedQueuesDynamic, buffer, bufferChunks, catchAll, catchAllCause, catchSome, catchSomeCause, catchTag, catchTags, changes, changesWith, changesWithEffect, channelToStream, chunks, chunksWith, combine, combineChunks, concat, concatAll, context, contextWith, contextWithEffect, contextWithStream, cross, crossLeft, crossRight, crossWith, debounce, decodeText, die, dieMessage, dieSync, distributedWith, distributedWithDynamic, distributedWithDynamicCallback, drain, drainFork, drop, dropRight, dropUntil, dropUntilEffect, dropWhile, dropWhileEffect, either, empty, encodeText, ensuring, ensuringWith, execute, fail, failCause, failCauseSync, failSync, filter, filterEffect, filterMap, filterMapEffect, filterMapWhile, filterMapWhileEffect, finalizer, find, findEffect, flatMap, flatten, flattenChunks, flattenEffect, flattenExitOption, flattenIterables, flattenTake, forever, fromAsyncIterable, fromChannel, fromChunk, fromChunkHub, fromChunkQueue, fromChunks, fromEffect, fromEffectOption, fromHub, fromIterable, fromIterableEffect, fromIteratorSucceed, fromPull, fromQueue, fromReadableStream, fromReadableStreamByob, fromSchedule, groupAdjacentBy, grouped, groupedWithin, haltAfter, haltWhen, haltWhenDeferred, identityStream, interleave, interleaveWith, interruptAfter, interruptWhen, interruptWhenDeferred, intersperse, intersperseAffixes, isStream, iterate, let_, make, map, mapAccum, mapAccumEffect, mapBoth, mapChunks, mapChunksEffect, mapConcat, mapConcatChunk, mapConcatChunkEffect, mapConcatEffect, mapEffectPar, mapEffectSequential, mapError, mapErrorCause, mapInputContext, matchConcurrency, merge, mergeAll, mergeEither, mergeLeft, mergeRight, mergeWith, mkString, never, onDone, onError, orDie, orDieWith, orElse, orElseEither, orElseFail, orElseIfEmpty, orElseIfEmptyChunk, orElseIfEmptyStream, orElseSucceed, paginate, paginateChunk, paginateChunkEffect, paginateEffect, partition, partitionEither, peel, pipeThrough, pipeThroughChannel, pipeThroughChannelOrFail, prepend, provideContext, provideLayer, provideService, provideServiceEffect, provideServiceStream, provideSomeLayer, range, rechunk, refineOrDie, refineOrDieWith, repeat, repeatEffect, repeatEffectChunk, repeatEffectChunkOption, repeatEffectOption, repeatEffectWithSchedule, repeatEither, repeatElements, repeatElementsWith, repeatValue, repeatWith, repeatWithSchedule, retry, run, runCollect, runCount, runDrain, runFold, runFoldEffect, runFoldScoped, runFoldScopedEffect, runFoldWhile, runFoldWhileEffect, runFoldWhileScoped, runFoldWhileScopedEffect, runForEach, runForEachChunk, runForEachChunkScoped, runForEachScoped, runForEachWhile, runForEachWhileScoped, runHead, runIntoHub, runIntoHubScoped, runIntoQueue, runIntoQueueElementsScoped, runIntoQueueScoped, runLast, runScoped, runSum, scan, scanEffect, scanReduce, scanReduceEffect, schedule, scheduleWith, scoped, sliding, slidingSize, some, someOrElse, someOrFail, split, splitLines, splitOnChunk, succeed, suspend, sync, take, takeRight, takeUntil, takeUntilEffect, takeWhile, tap, tapBoth, tapError, tapErrorCause, tapSink, throttle, throttleEffect, tick, timeout, timeoutFail, timeoutFailCause, timeoutTo, toChannel, toHub, toPull, toQueue, toQueueOfElements, toReadableStream, transduce, unfold, unfoldChunk, unfoldChunkEffect, unfoldEffect, unit, unwrap, unwrapScoped, updateService, when, whenCase, whenCaseEffect, whenEffect, withSpan, zip, zipAll, zipAllLeft, zipAllRight, zipAllSortedByKey, zipAllSortedByKeyLeft, zipAllSortedByKeyRight, zipAllSortedByKeyWith, zipAllWith, zipFlatten, zipLatest, zipLatestWith, zipLeft, zipRight, zipWith, zipWithChunks, zipWithIndex, zipWithNext, zipWithPrevious, zipWithPreviousAndNext };