clanka 0.8.0 → 0.8.2

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 (185) hide show
  1. package/dist/Acp.d.ts +4 -4
  2. package/dist/Acp.d.ts.map +1 -1
  3. package/dist/Acp.js +6 -6
  4. package/dist/Acp.js.map +1 -1
  5. package/dist/Acp.test.js +4 -4
  6. package/dist/Acp.test.js.map +1 -1
  7. package/dist/AcpImage.test.js +7 -7
  8. package/dist/AcpImage.test.js.map +1 -1
  9. package/dist/Agent.d.ts +8 -8
  10. package/dist/Agent.d.ts.map +1 -1
  11. package/dist/Agent.js +7 -7
  12. package/dist/Agent.js.map +1 -1
  13. package/dist/Agent.test.js +6 -6
  14. package/dist/Agent.test.js.map +1 -1
  15. package/dist/AgentExecutor.d.ts +9 -9
  16. package/dist/AgentExecutor.d.ts.map +1 -1
  17. package/dist/AgentExecutor.js +5 -5
  18. package/dist/AgentExecutor.js.map +1 -1
  19. package/dist/AgentExecutorImage.test.js +6 -6
  20. package/dist/AgentExecutorImage.test.js.map +1 -1
  21. package/dist/AgentImage.test.js +3 -3
  22. package/dist/AgentImage.test.js.map +1 -1
  23. package/dist/AgentOutput.d.ts +2 -2
  24. package/dist/AgentOutput.d.ts.map +1 -1
  25. package/dist/AgentOutput.js +2 -2
  26. package/dist/AgentOutput.js.map +1 -1
  27. package/dist/AgentSkills.d.ts.map +1 -1
  28. package/dist/AgentSkills.js +6 -1
  29. package/dist/AgentSkills.js.map +1 -1
  30. package/dist/AgentSkills.test.js +21 -4
  31. package/dist/AgentSkills.test.js.map +1 -1
  32. package/dist/AgentTools.d.ts +4 -4
  33. package/dist/AgentTools.d.ts.map +1 -1
  34. package/dist/AgentTools.js +4 -4
  35. package/dist/AgentTools.js.map +1 -1
  36. package/dist/AgentToolsImage.test.js +2 -2
  37. package/dist/AgentToolsImage.test.js.map +1 -1
  38. package/dist/ChunkRepo.d.ts +10 -10
  39. package/dist/ChunkRepo.d.ts.map +1 -1
  40. package/dist/ChunkRepo.js +7 -7
  41. package/dist/ChunkRepo.js.map +1 -1
  42. package/dist/ChunkRepo.test.js +2 -2
  43. package/dist/ChunkRepo.test.js.map +1 -1
  44. package/dist/CodeChunker.d.ts +1 -1
  45. package/dist/CodeChunker.d.ts.map +1 -1
  46. package/dist/CodeChunker.js +2 -2
  47. package/dist/CodeChunker.js.map +1 -1
  48. package/dist/Codex.d.ts +5 -5
  49. package/dist/Codex.d.ts.map +1 -1
  50. package/dist/Codex.js +1 -1
  51. package/dist/Codex.js.map +1 -1
  52. package/dist/CodexAuth.d.ts +2 -2
  53. package/dist/CodexAuth.d.ts.map +1 -1
  54. package/dist/CodexAuth.js +6 -6
  55. package/dist/CodexAuth.js.map +1 -1
  56. package/dist/CodexAuth.test.js +3 -3
  57. package/dist/CodexAuth.test.js.map +1 -1
  58. package/dist/Compaction.d.ts +3 -3
  59. package/dist/Compaction.d.ts.map +1 -1
  60. package/dist/Compaction.js +3 -3
  61. package/dist/Compaction.js.map +1 -1
  62. package/dist/Compaction.test.js +3 -3
  63. package/dist/Compaction.test.js.map +1 -1
  64. package/dist/CompactionImage.test.js +4 -4
  65. package/dist/CompactionImage.test.js.map +1 -1
  66. package/dist/CompactionTokens.test.js +3 -3
  67. package/dist/CompactionTokens.test.js.map +1 -1
  68. package/dist/CompactionTransport.test.js +5 -5
  69. package/dist/CompactionTransport.test.js.map +1 -1
  70. package/dist/Copilot.d.ts +3 -3
  71. package/dist/Copilot.d.ts.map +1 -1
  72. package/dist/Copilot.js +1 -1
  73. package/dist/Copilot.js.map +1 -1
  74. package/dist/CopilotAuth.d.ts +2 -2
  75. package/dist/CopilotAuth.d.ts.map +1 -1
  76. package/dist/CopilotAuth.js +4 -4
  77. package/dist/CopilotAuth.js.map +1 -1
  78. package/dist/CopilotAuth.test.js +2 -2
  79. package/dist/CopilotAuth.test.js.map +1 -1
  80. package/dist/GlobalWebSocket.d.ts +1 -1
  81. package/dist/GlobalWebSocket.d.ts.map +1 -1
  82. package/dist/GlobalWebSocket.js +1 -1
  83. package/dist/GlobalWebSocket.js.map +1 -1
  84. package/dist/Image.d.ts +2 -2
  85. package/dist/Image.d.ts.map +1 -1
  86. package/dist/Image.js +3 -3
  87. package/dist/Image.js.map +1 -1
  88. package/dist/Image.test.js +2 -2
  89. package/dist/Image.test.js.map +1 -1
  90. package/dist/SemanticSearch.d.ts +3 -3
  91. package/dist/SemanticSearch.d.ts.map +1 -1
  92. package/dist/SemanticSearch.js +2 -2
  93. package/dist/SemanticSearch.js.map +1 -1
  94. package/dist/Sqlite.d.ts +2 -2
  95. package/dist/Sqlite.d.ts.map +1 -1
  96. package/dist/Sqlite.js +1 -1
  97. package/dist/Sqlite.js.map +1 -1
  98. package/dist/ToolkitRenderer.d.ts +2 -2
  99. package/dist/ToolkitRenderer.d.ts.map +1 -1
  100. package/dist/WebToMarkdown.d.ts +2 -2
  101. package/dist/WebToMarkdown.d.ts.map +1 -1
  102. package/dist/WebToMarkdown.js +1 -1
  103. package/dist/WebToMarkdown.js.map +1 -1
  104. package/dist/WebToMarkdown.test.js +1 -1
  105. package/dist/WebToMarkdown.test.js.map +1 -1
  106. package/dist/Xai.d.ts +10 -3
  107. package/dist/Xai.d.ts.map +1 -1
  108. package/dist/Xai.js +26 -2
  109. package/dist/Xai.js.map +1 -1
  110. package/dist/Xai.test.js +38 -4
  111. package/dist/Xai.test.js.map +1 -1
  112. package/dist/XaiAuth.d.ts +2 -2
  113. package/dist/XaiAuth.d.ts.map +1 -1
  114. package/dist/XaiAuth.js +4 -4
  115. package/dist/XaiAuth.js.map +1 -1
  116. package/dist/XaiAuth.test.js +2 -2
  117. package/dist/XaiAuth.test.js.map +1 -1
  118. package/dist/bin/{Effect-CeAMoJlg.mjs → Effect-BCeySOy1.mjs} +281 -586
  119. package/dist/bin/Effect-BCeySOy1.mjs.map +1 -0
  120. package/dist/bin/{McpClient-zQibhsnA.mjs → McpClient-DP4jlaD1.mjs} +3 -3
  121. package/dist/bin/{McpClient-zQibhsnA.mjs.map → McpClient-DP4jlaD1.mjs.map} +1 -1
  122. package/dist/bin/{OutputFormatter-C7Awn0DS.mjs → OutputFormatter-Ch8yFytV.mjs} +3 -3
  123. package/dist/bin/{OutputFormatter-C7Awn0DS.mjs.map → OutputFormatter-Ch8yFytV.mjs.map} +1 -1
  124. package/dist/bin/{Schema-Bc06DxcV.mjs → Schema-C9JQ5hI0.mjs} +1979 -1663
  125. package/dist/bin/Schema-C9JQ5hI0.mjs.map +1 -0
  126. package/dist/bin/{SemanticSearch-BPxQoRSC.mjs → SemanticSearch-BJGnYhFt.mjs} +47 -43
  127. package/dist/bin/SemanticSearch-BJGnYhFt.mjs.map +1 -0
  128. package/dist/bin/{Stream-DlGXvw0L.mjs → Stream-CgH3SuLu.mjs} +60 -61
  129. package/dist/bin/Stream-CgH3SuLu.mjs.map +1 -0
  130. package/dist/bin/cli.mjs +659 -426
  131. package/dist/bin/cli.mjs.map +1 -1
  132. package/dist/cli.js +7 -5
  133. package/dist/cli.js.map +1 -1
  134. package/dist/fixtures/TestImages.js +2 -2
  135. package/dist/fixtures/TestImages.js.map +1 -1
  136. package/package.json +7 -7
  137. package/src/Acp.test.ts +5 -5
  138. package/src/Acp.ts +8 -8
  139. package/src/AcpImage.test.ts +9 -9
  140. package/src/Agent.test.ts +7 -7
  141. package/src/Agent.ts +10 -10
  142. package/src/AgentExecutor.ts +8 -8
  143. package/src/AgentExecutorImage.test.ts +6 -6
  144. package/src/AgentImage.test.ts +5 -5
  145. package/src/AgentOutput.ts +2 -2
  146. package/src/AgentSkills.test.ts +81 -37
  147. package/src/AgentSkills.ts +5 -1
  148. package/src/AgentTools.ts +5 -5
  149. package/src/AgentToolsImage.test.ts +4 -4
  150. package/src/ChunkRepo.test.ts +2 -2
  151. package/src/ChunkRepo.ts +7 -7
  152. package/src/CodeChunker.ts +2 -2
  153. package/src/Codex.ts +4 -4
  154. package/src/CodexAuth.test.ts +3 -3
  155. package/src/CodexAuth.ts +6 -6
  156. package/src/Compaction.test.ts +3 -3
  157. package/src/Compaction.ts +3 -3
  158. package/src/CompactionImage.test.ts +4 -4
  159. package/src/CompactionTokens.test.ts +3 -3
  160. package/src/CompactionTransport.test.ts +6 -6
  161. package/src/Copilot.ts +2 -2
  162. package/src/CopilotAuth.test.ts +2 -6
  163. package/src/CopilotAuth.ts +4 -4
  164. package/src/GlobalWebSocket.ts +1 -1
  165. package/src/Image.test.ts +2 -2
  166. package/src/Image.ts +4 -4
  167. package/src/OutputFormatter.ts +1 -1
  168. package/src/SemanticSearch.test.ts +1 -1
  169. package/src/SemanticSearch.ts +4 -4
  170. package/src/Sqlite.ts +1 -1
  171. package/src/ToolkitRenderer.ts +2 -2
  172. package/src/WebToMarkdown.test.ts +1 -1
  173. package/src/WebToMarkdown.ts +2 -2
  174. package/src/Xai.test.ts +67 -8
  175. package/src/Xai.ts +52 -3
  176. package/src/XaiAuth.test.ts +2 -2
  177. package/src/XaiAuth.ts +4 -4
  178. package/src/cli.ts +9 -7
  179. package/src/fixtures/TestImages.ts +2 -2
  180. package/src/fixtures/patch13-broken.txt +4 -4
  181. package/src/fixtures/patch13-fixed.txt +4 -4
  182. package/dist/bin/Effect-CeAMoJlg.mjs.map +0 -1
  183. package/dist/bin/Schema-Bc06DxcV.mjs.map +0 -1
  184. package/dist/bin/SemanticSearch-BPxQoRSC.mjs.map +0 -1
  185. package/dist/bin/Stream-DlGXvw0L.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Pipeable.js
1
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Pipeable.js
2
2
  const pipeArguments = (self, args) => {
3
3
  switch (args.length) {
4
4
  case 0: return self;
@@ -21,13 +21,13 @@ const pipeArguments = (self, args) => {
21
21
  const Prototype$1 = { pipe() {
22
22
  return pipeArguments(this, arguments);
23
23
  } };
24
- const Class$3 = function() {
24
+ const Class$2 = function() {
25
25
  function PipeableBase() {}
26
26
  PipeableBase.prototype = Prototype$1;
27
27
  return PipeableBase;
28
28
  }();
29
29
  //#endregion
30
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Function.js
30
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Function.js
31
31
  const dual = function(arity, body) {
32
32
  if (typeof arity === "function") return function() {
33
33
  return arity(arguments) ? body.apply(this, arguments) : (self) => body(self, ...arguments);
@@ -117,7 +117,7 @@ function memoizeIdempotent(f) {
117
117
  };
118
118
  }
119
119
  //#endregion
120
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/equal.js
120
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/equal.js
121
121
  const getAllObjectKeys = (obj) => {
122
122
  const keys = new Set(Reflect.ownKeys(obj));
123
123
  if (obj.constructor === Object) return keys;
@@ -133,8 +133,15 @@ const getAllObjectKeys = (obj) => {
133
133
  return keys;
134
134
  };
135
135
  const byReferenceInstances = new WeakSet();
136
+ const viewBytes = (view) => new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
136
137
  //#endregion
137
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Predicate.js
138
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/hash.js
139
+ let backEdges = 0;
140
+ const addBackEdge = () => {
141
+ backEdges++;
142
+ };
143
+ //#endregion
144
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Predicate.js
138
145
  function isString(input) {
139
146
  return typeof input === "string";
140
147
  }
@@ -196,51 +203,66 @@ function isIterable(input) {
196
203
  }
197
204
  const or = dual(2, (self, that) => (a) => self(a) || that(a));
198
205
  //#endregion
199
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Hash.js
206
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Hash.js
200
207
  const symbol$1 = "~effect/Hash";
201
208
  const hash = (self) => {
202
209
  switch (typeof self) {
203
210
  case "number": return number(self);
204
211
  case "bigint": return string(self.toString(10));
205
212
  case "string": return string(self);
206
- case "undefined": return string("undefined");
207
213
  case "function":
208
- case "object": if (self === null) return string("null");
214
+ case "object": if (self === null) break;
209
215
  else if (self instanceof Date) {
210
216
  if (Number.isNaN(self.getTime())) return string("Invalid Date");
211
217
  return string(self.toISOString());
212
218
  } else if (self instanceof RegExp) return string(self.toString());
213
219
  else {
214
- if (byReferenceInstances.has(self)) return random(self);
215
- if (hashCache.has(self)) return hashCache.get(self);
216
- const h = withVisitedTracking$1(self, () => {
217
- if (isHash(self)) return self[symbol$1]();
218
- else if (typeof self === "function") return random(self);
219
- else if (self instanceof DataView) return array(new Uint8Array(self.buffer, self.byteOffset, self.byteLength));
220
- else if (Array.isArray(self) || ArrayBuffer.isView(self)) return array(self);
221
- else if (self instanceof Map) return hashMap(self);
222
- else if (self instanceof Set) return hashSet(self);
223
- return structure(self);
224
- });
225
- hashCache.set(self, h);
220
+ if (byReferenceInstances.has(self)) return random$1(self);
221
+ const cached = hashCache.get(self);
222
+ if (cached !== void 0) return cached;
223
+ if (visitedObjects.has(self)) {
224
+ addBackEdge();
225
+ return string("[Circular]");
226
+ }
227
+ visitedObjects.add(self);
228
+ const seen = backEdges;
229
+ let h;
230
+ try {
231
+ if ("~effect/Hash" in self) h = self[symbol$1]();
232
+ else if (typeof self === "function") h = random$1(self);
233
+ else if (self instanceof DataView) h = array(viewBytes(self));
234
+ else if (Array.isArray(self) || ArrayBuffer.isView(self)) h = array(self);
235
+ else if (self instanceof Map) h = hashMap(self);
236
+ else if (self instanceof Set) h = hashSet(self);
237
+ else h = structure(self);
238
+ } finally {
239
+ visitedObjects.delete(self);
240
+ }
241
+ if (seen === backEdges) hashCache.set(self, h);
226
242
  return h;
227
243
  }
228
- default: return string(String(self));
229
244
  }
245
+ return optimize(mix(string(String(self))));
230
246
  };
231
- const random = (self) => {
232
- if (!randomHashCache.has(self)) randomHashCache.set(self, number(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)));
247
+ const random$1 = (self) => {
248
+ if (!randomHashCache.has(self)) randomHashCache.set(self, optimize(Math.random() * 4294967296 | 0));
233
249
  return randomHashCache.get(self);
234
250
  };
235
- const combine = dual(2, (self, b) => self * 53 ^ b);
251
+ const mix = (h) => {
252
+ h ^= h >>> 16;
253
+ h = Math.imul(h, 2246822507);
254
+ h ^= h >>> 13;
255
+ h = Math.imul(h, 3266489909);
256
+ return h ^ h >>> 16;
257
+ };
258
+ const combine = dual(2, (self, b) => mix(Math.imul(self, 2654435761) + Math.imul(b, 2246822507)));
236
259
  const optimize = (n) => n & 3221225471 | n >>> 1 & 1073741824;
237
- const isHash = (u) => hasProperty(u, symbol$1);
260
+ const float64 = new DataView(new ArrayBuffer(8));
238
261
  const number = (n) => {
239
- if (n !== n || n === Infinity || n === -Infinity) return string(String(n));
240
- let h = n | 0;
241
- if (h !== n) h ^= n * 4294967295;
242
- while (n > 4294967295) h ^= n /= 4294967295;
243
- return optimize(h);
262
+ const h = n | 0;
263
+ if (h === n) return optimize(h);
264
+ float64.setFloat64(0, n !== n ? NaN : n);
265
+ return optimize(combine(float64.getInt32(0), float64.getInt32(4)));
244
266
  };
245
267
  const string = (str) => {
246
268
  let h = 5381, i = str.length;
@@ -253,26 +275,24 @@ const structureKeys = (o, keys) => {
253
275
  return optimize(h);
254
276
  };
255
277
  const structure = (o) => structureKeys(o, getAllObjectKeys(o));
256
- const iterableWith = (seed, f) => (iter) => {
278
+ const unordered = (seed, f) => (iter) => {
257
279
  let h = seed;
258
280
  for (const element of iter) h ^= f(element);
259
281
  return optimize(h);
260
282
  };
261
- const array = iterableWith(6151, hash);
262
- const hashMap = iterableWith(string("Map"), ([k, v]) => combine(hash(k), hash(v)));
263
- const hashSet = iterableWith(string("Set"), hash);
283
+ const array = (arr) => {
284
+ let h = 6151;
285
+ for (const element of arr) h = combine(h, hash(element));
286
+ return optimize(h);
287
+ };
288
+ const hashMap = unordered(string("Map"), ([k, v]) => combine(hash(k), hash(v)));
289
+ const setSeed = string("Set");
290
+ const hashSet = unordered(setSeed, (element) => combine(setSeed, hash(element)));
264
291
  const randomHashCache = new WeakMap();
265
292
  const hashCache = new WeakMap();
266
293
  const visitedObjects = new WeakSet();
267
- function withVisitedTracking$1(obj, fn) {
268
- if (visitedObjects.has(obj)) return string("[Circular]");
269
- visitedObjects.add(obj);
270
- const result = fn();
271
- visitedObjects.delete(obj);
272
- return result;
273
- }
274
294
  //#endregion
275
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Equal.js
295
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Equal.js
276
296
  const symbol = "~effect/Equal";
277
297
  function equals$1() {
278
298
  if (arguments.length === 1) return (self) => compareBoth(self, arguments[0]);
@@ -286,78 +306,59 @@ function compareBoth(self, that) {
286
306
  if (selfType === "number" && self !== self && that !== that) return true;
287
307
  if (selfType !== "object" && selfType !== "function") return false;
288
308
  if (byReferenceInstances.has(self) || byReferenceInstances.has(that)) return false;
289
- return withCache(self, that, compareObjects);
309
+ return compareObjects(self, that);
290
310
  }
291
- function withVisitedTracking(self, that, fn) {
292
- const hasLeft = visitedLeft.has(self);
293
- const hasRight = visitedRight.has(that);
294
- if (hasLeft && hasRight) return true;
295
- if (hasLeft || hasRight) return false;
296
- visitedLeft.add(self);
297
- visitedRight.add(that);
298
- const result = fn();
299
- visitedLeft.delete(self);
300
- visitedRight.delete(that);
311
+ function compareObjects(self, that) {
312
+ const depth = pathLeft.length;
313
+ for (let i = depth; i-- > 0;) if (pathLeft[i] === self && pathRight[i] === that) return true;
314
+ if (depth) return compareOnPath(self, that);
315
+ let known = results.get(self);
316
+ if (!known) results.set(self, known = new WeakMap());
317
+ let result = known.get(that);
318
+ if (result === void 0) known.set(that, result = compareOnPath(self, that));
301
319
  return result;
302
320
  }
303
- const visitedLeft = new WeakSet();
304
- const visitedRight = new WeakSet();
305
- function compareObjects(self, that) {
321
+ function compareOnPath(self, that) {
322
+ pathLeft.push(self);
323
+ pathRight.push(that);
324
+ try {
325
+ return compareStructure(self, that);
326
+ } finally {
327
+ pathLeft.pop();
328
+ pathRight.pop();
329
+ }
330
+ }
331
+ const pathLeft = [];
332
+ const pathRight = [];
333
+ const results = new WeakMap();
334
+ function compareStructure(self, that) {
306
335
  if (hash(self) !== hash(that)) return false;
307
336
  else if (self instanceof Date) {
308
337
  if (!(that instanceof Date)) return false;
309
338
  const selfTime = self.getTime();
310
339
  const thatTime = that.getTime();
311
340
  return selfTime === thatTime || Number.isNaN(selfTime) && Number.isNaN(thatTime);
312
- } else if (self instanceof RegExp) {
313
- if (!(that instanceof RegExp)) return false;
314
- return self.toString() === that.toString();
315
- }
316
- const selfIsEqual = isEqual(self);
317
- const thatIsEqual = isEqual(that);
318
- if (selfIsEqual !== thatIsEqual) return false;
319
- const bothEquals = selfIsEqual && thatIsEqual;
320
- if (typeof self === "function" && !bothEquals) return false;
321
- return withVisitedTracking(self, that, () => {
322
- if (bothEquals) return self[symbol](that);
323
- else if (Array.isArray(self)) {
324
- if (!Array.isArray(that) || self.length !== that.length) return false;
325
- return compareArrays(self, that);
326
- } else if (ArrayBuffer.isView(self)) {
327
- const selfIsDataView = self instanceof DataView;
328
- if (!ArrayBuffer.isView(that) || self.byteLength !== that.byteLength || selfIsDataView !== that instanceof DataView) return false;
329
- if (selfIsDataView) {
330
- const thatDataView = that;
331
- return compareTypedArrays(new Uint8Array(self.buffer, self.byteOffset, self.byteLength), new Uint8Array(thatDataView.buffer, thatDataView.byteOffset, thatDataView.byteLength));
332
- }
333
- return compareTypedArrays(self, that);
334
- } else if (self instanceof Map) {
335
- if (!(that instanceof Map) || self.size !== that.size) return false;
336
- return compareMaps(self, that);
337
- } else if (self instanceof Set) {
338
- if (!(that instanceof Set) || self.size !== that.size) return false;
339
- return compareSets(self, that);
340
- }
341
- return compareRecords(self, that);
342
- });
341
+ } else if (self instanceof RegExp) return that instanceof RegExp && self.toString() === that.toString();
342
+ const bothEquals = isEqual(self);
343
+ if (bothEquals !== isEqual(that) || typeof self === "function" && !bothEquals) return false;
344
+ else if (bothEquals) return self[symbol](that);
345
+ else if (Array.isArray(self)) {
346
+ if (!Array.isArray(that) || self.length !== that.length) return false;
347
+ return compareArrays(self, that);
348
+ } else if (ArrayBuffer.isView(self)) {
349
+ const selfIsDataView = self instanceof DataView;
350
+ if (!ArrayBuffer.isView(that) || self.byteLength !== that.byteLength || selfIsDataView !== that instanceof DataView) return false;
351
+ if (selfIsDataView) return compareTypedArrays(viewBytes(self), viewBytes(that));
352
+ return compareTypedArrays(self, that);
353
+ } else if (self instanceof Map) {
354
+ if (!(that instanceof Map) || self.size !== that.size) return false;
355
+ return compareHashed(self, that, entryHash, equalEntries);
356
+ } else if (self instanceof Set) {
357
+ if (!(that instanceof Set) || self.size !== that.size) return false;
358
+ return compareHashed(self, that, hash, compareBoth);
359
+ }
360
+ return compareRecords(self, that);
343
361
  }
344
- function withCache(self, that, f) {
345
- let selfMap = equalityCache.get(self);
346
- if (!selfMap) {
347
- selfMap = new WeakMap();
348
- equalityCache.set(self, selfMap);
349
- } else if (selfMap.has(that)) return selfMap.get(that);
350
- const result = f(self, that);
351
- selfMap.set(that, result);
352
- let thatMap = equalityCache.get(that);
353
- if (!thatMap) {
354
- thatMap = new WeakMap();
355
- equalityCache.set(that, thatMap);
356
- }
357
- thatMap.set(self, result);
358
- return result;
359
- }
360
- const equalityCache = new WeakMap();
361
362
  function compareArrays(self, that) {
362
363
  for (let i = 0; i < self.length; i++) if (!compareBoth(self[i], that[i])) return false;
363
364
  return true;
@@ -374,53 +375,36 @@ function compareRecords(self, that) {
374
375
  for (const key of selfKeys) if (!thatKeys.has(key) || !compareBoth(self[key], that[key])) return false;
375
376
  return true;
376
377
  }
377
- function makeCompareMap(keyEquivalence, valueEquivalence) {
378
- return function compareMaps(self, that) {
379
- const thatEntries = Array.from(that);
380
- for (const [selfKey, selfValue] of self) {
381
- let found = false;
382
- for (let i = 0; i < thatEntries.length; i++) {
383
- const [thatKey, thatValue] = thatEntries[i];
384
- if (keyEquivalence(selfKey, thatKey) && valueEquivalence(selfValue, thatValue)) {
385
- thatEntries[i] = thatEntries[thatEntries.length - 1];
386
- thatEntries.pop();
387
- found = true;
388
- break;
389
- }
378
+ function compareHashed(self, that, hashOf, equivalent) {
379
+ const groups = new Map();
380
+ for (const item of that) {
381
+ const h = hashOf(item);
382
+ const group = groups.get(h);
383
+ if (group) group.push(item);
384
+ else groups.set(h, [item]);
385
+ }
386
+ outer: for (const item of self) {
387
+ const group = groups.get(hashOf(item));
388
+ if (group) {
389
+ for (let i = 0; i < group.length; i++) if (equivalent(item, group[i])) {
390
+ group[i] = group[group.length - 1];
391
+ group.pop();
392
+ continue outer;
390
393
  }
391
- if (!found) return false;
392
394
  }
393
- return true;
394
- };
395
- }
396
- const compareMaps = makeCompareMap(compareBoth, compareBoth);
397
- function makeCompareSet(equivalence) {
398
- return function compareSets(self, that) {
399
- const thatValues = Array.from(that);
400
- for (const selfValue of self) {
401
- let found = false;
402
- for (let i = 0; i < thatValues.length; i++) {
403
- const thatValue = thatValues[i];
404
- if (equivalence(selfValue, thatValue)) {
405
- thatValues[i] = thatValues[thatValues.length - 1];
406
- thatValues.pop();
407
- found = true;
408
- break;
409
- }
410
- }
411
- if (!found) return false;
412
- }
413
- return true;
414
- };
395
+ return false;
396
+ }
397
+ return true;
415
398
  }
416
- const compareSets = makeCompareSet(compareBoth);
399
+ const entryHash = (entry) => hash(entry[0]);
400
+ const equalEntries = (self, that) => compareBoth(self[0], that[0]) && compareBoth(self[1], that[1]);
417
401
  const isEqual = (u) => hasProperty(u, symbol);
418
402
  const byReferenceUnsafe = (obj) => {
419
403
  byReferenceInstances.add(obj);
420
404
  return obj;
421
405
  };
422
406
  //#endregion
423
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Redactable.js
407
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Redactable.js
424
408
  const symbolRedactable = Symbol.for("~effect/Redactable");
425
409
  const isRedactable = (u) => hasProperty(u, symbolRedactable);
426
410
  function redact(u) {
@@ -442,7 +426,7 @@ const emptyContext$1 = {
442
426
  }
443
427
  };
444
428
  //#endregion
445
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Formatter.js
429
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Formatter.js
446
430
  function format$1(input, options) {
447
431
  const space = options?.space ?? 0;
448
432
  const ancestors = new WeakSet();
@@ -535,14 +519,20 @@ function formatJson(input, options) {
535
519
  const redacted = hasProperty(original, symbolRedactable) ? redact(original) : redact(value);
536
520
  if (typeof redacted === "bigint") return format$1(redacted);
537
521
  if (typeof redacted !== "object" || redacted === null) return redacted;
522
+ const current = redacted instanceof Error && !hasProperty(redacted, "toJSON") ? {
523
+ ...redacted,
524
+ name: redacted.name,
525
+ message: redacted.message
526
+ } : redacted;
538
527
  while (ancestors.length > 0 && ancestors[ancestors.length - 1] !== this) ancestors.pop();
539
528
  if (ancestors.includes(redacted)) return;
540
529
  ancestors.push(redacted);
541
- return redacted;
530
+ if (current !== redacted) ancestors.push(current);
531
+ return current;
542
532
  }, options?.space) ?? "null";
543
533
  }
544
534
  //#endregion
545
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Inspectable.js
535
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Inspectable.js
546
536
  const NodeInspectSymbol = Symbol.for("nodejs.util.inspect.custom");
547
537
  const toJson = (input) => {
548
538
  try {
@@ -573,7 +563,7 @@ const BaseProto = {
573
563
  return format$1(this.toJSON());
574
564
  }
575
565
  };
576
- var Class$2 = class {
566
+ var Class$1 = class {
577
567
  [NodeInspectSymbol]() {
578
568
  return this.toJSON();
579
569
  }
@@ -582,7 +572,7 @@ var Class$2 = class {
582
572
  }
583
573
  };
584
574
  //#endregion
585
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/stackTraceLimit.js
575
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/stackTraceLimit.js
586
576
  const isStackTraceLimitWritable = () => {
587
577
  const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
588
578
  if (desc === void 0) return Object.isExtensible(Error);
@@ -594,7 +584,7 @@ const setStackTraceLimit = (value) => {
594
584
  if (canWriteStackTraceLimit) Error.stackTraceLimit = value;
595
585
  };
596
586
  //#endregion
597
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Utils.js
587
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Utils.js
598
588
  var SingleShotGen = class SingleShotGen {
599
589
  called = false;
600
590
  self;
@@ -628,7 +618,7 @@ const pickInternalCall = () => {
628
618
  };
629
619
  const internalCall = pickInternalCall();
630
620
  //#endregion
631
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/record.js
621
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/record.js
632
622
  function assignProperty(self, key, value) {
633
623
  if (key === "__proto__") Object.defineProperty(self, key, {
634
624
  value,
@@ -642,7 +632,7 @@ function assignProperties(self, source) {
642
632
  for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProperty(self, key, source[key]);
643
633
  }
644
634
  //#endregion
645
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/core.js
635
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/core.js
646
636
  const EffectTypeId = `~effect/Effect`;
647
637
  const ExitTypeId = `~effect/Exit`;
648
638
  const effectVariance = {
@@ -922,7 +912,7 @@ const YieldableError = function() {
922
912
  Object.assign(YieldableError.prototype, proto);
923
913
  return YieldableError;
924
914
  }();
925
- const Error$2 = function() {
915
+ const Error$1 = function() {
926
916
  const plainArgsSymbol = Symbol.for("effect/Data/Error/plainArgs");
927
917
  return class Base extends YieldableError {
928
918
  constructor(args) {
@@ -943,8 +933,8 @@ const Error$2 = function() {
943
933
  }
944
934
  };
945
935
  }();
946
- const TaggedError$1 = (tag) => {
947
- class Base extends Error$2 {
936
+ const TaggedError = (tag) => {
937
+ class Base extends Error$1 {
948
938
  _tag = tag;
949
939
  }
950
940
  Base.prototype.name = tag;
@@ -952,7 +942,7 @@ const TaggedError$1 = (tag) => {
952
942
  };
953
943
  const NoSuchElementErrorTypeId = "~effect/Cause/NoSuchElementError";
954
944
  const isNoSuchElementError = (u) => hasProperty(u, NoSuchElementErrorTypeId);
955
- var NoSuchElementError$1 = class extends TaggedError$1("NoSuchElementError") {
945
+ var NoSuchElementError$1 = class extends TaggedError("NoSuchElementError") {
956
946
  [NoSuchElementErrorTypeId] = NoSuchElementErrorTypeId;
957
947
  constructor(message) {
958
948
  super({ message });
@@ -979,13 +969,13 @@ const done$2 = (value) => {
979
969
  return exitFail(Done$1(value));
980
970
  };
981
971
  //#endregion
982
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Effectable.js
972
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Effectable.js
983
973
  const Prototype = (options) => makePrimitiveProto({
984
974
  op: options.label,
985
975
  [evaluate]: options.evaluate
986
976
  });
987
977
  //#endregion
988
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Equivalence.js
978
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Equivalence.js
989
979
  const make$5 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
990
980
  const isStrictEquivalent = (x, y) => x === y;
991
981
  const strictEqual = () => isStrictEquivalent;
@@ -1004,7 +994,7 @@ function Array_(item) {
1004
994
  });
1005
995
  }
1006
996
  //#endregion
1007
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/option.js
997
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/option.js
1008
998
  const TypeId$7 = "~effect/Option";
1009
999
  const CommonProto$1 = {
1010
1000
  [TypeId$7]: { _A: (_) => _ },
@@ -1066,7 +1056,7 @@ const SomeImpl = function(value) {
1066
1056
  SomeImpl.prototype = SomeProto;
1067
1057
  const some$1 = (value) => new SomeImpl(value);
1068
1058
  //#endregion
1069
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/result.js
1059
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/result.js
1070
1060
  const TypeId$6 = "~effect/Result";
1071
1061
  const CommonProto = {
1072
1062
  [TypeId$6]: {
@@ -1132,10 +1122,11 @@ const SuccessImpl = function(success) {
1132
1122
  SuccessImpl.prototype = SuccessProto;
1133
1123
  const succeed$5 = (success) => new SuccessImpl(success);
1134
1124
  //#endregion
1135
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Order.js
1125
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Order.js
1136
1126
  function make$4(compare) {
1137
1127
  return (self, that) => self === that ? 0 : compare(self, that);
1138
1128
  }
1129
+ const String$1 = make$4((self, that) => self < that ? -1 : 1);
1139
1130
  const Number$1 = make$4((self, that) => {
1140
1131
  if (globalThis.Number.isNaN(self) && globalThis.Number.isNaN(that)) return 0;
1141
1132
  if (globalThis.Number.isNaN(self)) return -1;
@@ -1151,7 +1142,7 @@ const isLessThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== 1);
1151
1142
  const isGreaterThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== -1);
1152
1143
  const min$2 = (O) => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that);
1153
1144
  //#endregion
1154
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Option.js
1145
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Option.js
1155
1146
  const none = () => none$1;
1156
1147
  const some = some$1;
1157
1148
  const isOption = isOption$1;
@@ -1203,7 +1194,7 @@ const toArray = (self) => isNone(self) ? [] : [self.value];
1203
1194
  const filter = dual(2, (self, predicate) => isNone(self) ? none() : predicate(self.value) ? some(self.value) : none());
1204
1195
  const exists = dual(2, (self, refinement) => isNone(self) ? false : refinement(self.value));
1205
1196
  //#endregion
1206
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Context.js
1197
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Context.js
1207
1198
  const ServiceTypeId = "~effect/Context/Service";
1208
1199
  const Service = function() {
1209
1200
  function KeyClass() {}
@@ -1389,7 +1380,7 @@ const mergeAll$1 = (...ctxs) => {
1389
1380
  };
1390
1381
  const Reference = Service;
1391
1382
  //#endregion
1392
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Duration.js
1383
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Duration.js
1393
1384
  const TypeId$4 = "~effect/Duration";
1394
1385
  const bigint0$1 = BigInt(0);
1395
1386
  const bigint1 = BigInt(1);
@@ -1685,10 +1676,10 @@ const format = (self) => {
1685
1676
  return pieces.join(" ");
1686
1677
  };
1687
1678
  //#endregion
1688
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/array.js
1679
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/array.js
1689
1680
  const isArrayNonEmpty$1 = (self) => self.length > 0;
1690
1681
  //#endregion
1691
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Result.js
1682
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Result.js
1692
1683
  const succeed$4 = succeed$5;
1693
1684
  const fail$4 = fail$5;
1694
1685
  const failVoid = fail$4(void 0);
@@ -1716,7 +1707,7 @@ const getOrThrowWith = dual(2, (self, onFailure) => {
1716
1707
  });
1717
1708
  const getOrThrow = getOrThrowWith(identity);
1718
1709
  //#endregion
1719
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Iterable.js
1710
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Iterable.js
1720
1711
  const headUnsafe = (self) => {
1721
1712
  const result = self[Symbol.iterator]().next();
1722
1713
  if (result.done) throw new Error("headUnsafe: empty iterable");
@@ -1744,7 +1735,7 @@ const constEmptyIterator = { next() {
1744
1735
  } };
1745
1736
  const empty$2 = () => constEmpty;
1746
1737
  //#endregion
1747
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Array.js
1738
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Array.js
1748
1739
  const Array$1 = globalThis.Array;
1749
1740
  const fromIterable = (collection) => Array$1.isArray(collection) ? collection : Array$1.from(collection);
1750
1741
  const match$2 = dual(2, (self, { onEmpty, onNonEmpty }) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(self) : onEmpty());
@@ -1813,7 +1804,7 @@ const flatMapNullishOr = dual(2, (self, f) => flatMap$3(self, (a) => fromNullish
1813
1804
  const makeEquivalence = Array_;
1814
1805
  const join = dual(2, (self, sep) => fromIterable(self).join(sep));
1815
1806
  //#endregion
1816
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Scheduler.js
1807
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Scheduler.js
1817
1808
  const Scheduler = Reference("effect/Scheduler", {
1818
1809
  fiberCached: true,
1819
1810
  defaultValue: () => new MixedScheduler()
@@ -1917,352 +1908,38 @@ const PreventSchedulerYield = Reference("effect/Scheduler/PreventSchedulerYield"
1917
1908
  defaultValue: () => false
1918
1909
  });
1919
1910
  //#endregion
1920
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Data.js
1921
- const Class$1 = class extends Class$3 {
1922
- constructor(props) {
1923
- super();
1924
- if (props) assignProperties(this, props);
1925
- }
1926
- };
1927
- const TaggedClass$1 = (tag) => class extends Class$1 {
1928
- _tag = tag;
1929
- };
1930
- const taggedEnum = () => new Proxy({}, { get(_target, tag, _receiver) {
1931
- if (tag === "$is") return isTagged;
1932
- else if (tag === "$match") return taggedMatch;
1933
- return (props) => ({
1934
- ...props,
1935
- _tag: tag
1936
- });
1937
- } });
1938
- function taggedMatch() {
1939
- if (arguments.length === 1) {
1940
- const cases = arguments[0];
1941
- return function(value) {
1942
- return cases[value._tag](value);
1943
- };
1944
- }
1945
- const value = arguments[0];
1946
- return arguments[1][value._tag](value);
1947
- }
1948
- const Error$1 = Error$2;
1949
- const TaggedError = TaggedError$1;
1950
- //#endregion
1951
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Encoding.js
1952
- const EncodingErrorTypeId = "~effect/Encoding/EncodingError";
1953
- var EncodingError = class extends TaggedError("EncodingError") {
1954
- [EncodingErrorTypeId] = EncodingErrorTypeId;
1955
- };
1956
- const encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
1957
- const decodeBase64 = (str) => {
1958
- const stripped = stripCrlf(str);
1959
- const length = stripped.length;
1960
- if (length % 4 !== 0) return fail$4(new EncodingError({
1961
- kind: "Decode",
1962
- module: "Base64",
1963
- input: stripped,
1964
- message: `Length must be a multiple of 4, but is ${length}`
1965
- }));
1966
- const index = stripped.indexOf("=");
1967
- if (index !== -1 && (index < length - 2 || index === length - 2 && stripped[length - 1] !== "=")) return fail$4(new EncodingError({
1968
- kind: "Decode",
1969
- module: "Base64",
1970
- input: stripped,
1971
- message: `Found a '=' character, but it is not at the end`
1972
- }));
1973
- try {
1974
- const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
1975
- const result = new Uint8Array(3 * (length / 4) - missingOctets);
1976
- for (let i = 0, j = 0; i < length; i += 4, j += 3) {
1977
- const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
1978
- result[j] = buffer >> 16;
1979
- result[j + 1] = buffer >> 8 & 255;
1980
- result[j + 2] = buffer & 255;
1981
- }
1982
- return succeed$4(result);
1983
- } catch (e) {
1984
- return fail$4(new EncodingError({
1985
- kind: "Decode",
1986
- module: "Base64",
1987
- input: stripped,
1988
- message: e instanceof Error ? e.message : "Invalid input"
1989
- }));
1990
- }
1991
- };
1992
- const decodeBase64Url = (str) => {
1993
- const stripped = stripCrlf(str);
1994
- const length = stripped.length;
1995
- if (length % 4 === 1) return fail$4(new EncodingError({
1996
- module: "Base64Url",
1997
- kind: "Decode",
1998
- input: stripped,
1999
- message: `Length should be a multiple of 4, but is ${length}`
2000
- }));
2001
- if (!/^[-_A-Z0-9]*?={0,2}$/i.test(stripped)) return fail$4(new EncodingError({
2002
- module: "Base64Url",
2003
- kind: "Decode",
2004
- input: stripped,
2005
- message: "Invalid input"
2006
- }));
2007
- let sanitized = length % 4 === 2 ? `${stripped}==` : length % 4 === 3 ? `${stripped}=` : stripped;
2008
- sanitized = sanitized.replace(/-/g, "+").replace(/_/g, "/");
2009
- return decodeBase64(sanitized);
2010
- };
2011
- const decodeBase64UrlString = (str) => map$4(decodeBase64Url(str), (_) => decoder.decode(_));
2012
- const randomHex = (length) => {
1911
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/encoding/Hex.js
1912
+ const random = (length) => {
2013
1913
  switch (length) {
2014
- case 16: return randomHex16();
2015
- case 32: return randomHex32();
1914
+ case 16: return random16();
1915
+ case 32: return random32();
2016
1916
  default: {
2017
1917
  let result = "";
2018
- for (let i = length >>> 3; i > 0; i--) result += randomHex8();
1918
+ for (let i = length >>> 3; i > 0; i--) result += random8();
2019
1919
  return result;
2020
1920
  }
2021
1921
  }
2022
1922
  };
2023
1923
  const hexCharCodes = Uint8Array.from("0123456789abcdef", (c) => c.charCodeAt(0));
2024
1924
  const randomWord = () => Math.random() * 4294967296 >>> 0;
2025
- const randomHex8 = () => {
1925
+ const random8 = () => {
2026
1926
  const a = randomWord();
2027
1927
  return String.fromCharCode(hexCharCodes[a >>> 28], hexCharCodes[a >>> 24 & 15], hexCharCodes[a >>> 20 & 15], hexCharCodes[a >>> 16 & 15], hexCharCodes[a >>> 12 & 15], hexCharCodes[a >>> 8 & 15], hexCharCodes[a >>> 4 & 15], hexCharCodes[a & 15]);
2028
1928
  };
2029
- const randomHex16 = () => {
1929
+ const random16 = () => {
2030
1930
  const a = randomWord();
2031
1931
  const b = randomWord();
2032
1932
  return String.fromCharCode(hexCharCodes[a >>> 28], hexCharCodes[a >>> 24 & 15], hexCharCodes[a >>> 20 & 15], hexCharCodes[a >>> 16 & 15], hexCharCodes[a >>> 12 & 15], hexCharCodes[a >>> 8 & 15], hexCharCodes[a >>> 4 & 15], hexCharCodes[a & 15], hexCharCodes[b >>> 28], hexCharCodes[b >>> 24 & 15], hexCharCodes[b >>> 20 & 15], hexCharCodes[b >>> 16 & 15], hexCharCodes[b >>> 12 & 15], hexCharCodes[b >>> 8 & 15], hexCharCodes[b >>> 4 & 15], hexCharCodes[b & 15]);
2033
1933
  };
2034
- const randomHex32 = () => {
1934
+ const random32 = () => {
2035
1935
  const a = randomWord();
2036
1936
  const b = randomWord();
2037
1937
  const c = randomWord();
2038
1938
  const d = randomWord();
2039
1939
  return String.fromCharCode(hexCharCodes[a >>> 28], hexCharCodes[a >>> 24 & 15], hexCharCodes[a >>> 20 & 15], hexCharCodes[a >>> 16 & 15], hexCharCodes[a >>> 12 & 15], hexCharCodes[a >>> 8 & 15], hexCharCodes[a >>> 4 & 15], hexCharCodes[a & 15], hexCharCodes[b >>> 28], hexCharCodes[b >>> 24 & 15], hexCharCodes[b >>> 20 & 15], hexCharCodes[b >>> 16 & 15], hexCharCodes[b >>> 12 & 15], hexCharCodes[b >>> 8 & 15], hexCharCodes[b >>> 4 & 15], hexCharCodes[b & 15], hexCharCodes[c >>> 28], hexCharCodes[c >>> 24 & 15], hexCharCodes[c >>> 20 & 15], hexCharCodes[c >>> 16 & 15], hexCharCodes[c >>> 12 & 15], hexCharCodes[c >>> 8 & 15], hexCharCodes[c >>> 4 & 15], hexCharCodes[c & 15], hexCharCodes[d >>> 28], hexCharCodes[d >>> 24 & 15], hexCharCodes[d >>> 20 & 15], hexCharCodes[d >>> 16 & 15], hexCharCodes[d >>> 12 & 15], hexCharCodes[d >>> 8 & 15], hexCharCodes[d >>> 4 & 15], hexCharCodes[d & 15]);
2040
1940
  };
2041
- const encoder = new TextEncoder();
2042
- const decoder = new TextDecoder();
2043
- const stripCrlf = (str) => str.replace(/[\n\r]/g, "");
2044
- const base64EncodeUint8Array = (bytes) => {
2045
- const length = bytes.length;
2046
- let result = "";
2047
- let i = 2;
2048
- for (; i < length; i += 3) {
2049
- result += base64abc[bytes[i - 2] >> 2];
2050
- result += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
2051
- result += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
2052
- result += base64abc[bytes[i] & 63];
2053
- }
2054
- if (i === length + 1) {
2055
- result += base64abc[bytes[i - 2] >> 2];
2056
- result += base64abc[(bytes[i - 2] & 3) << 4];
2057
- result += "==";
2058
- }
2059
- if (i === length) {
2060
- result += base64abc[bytes[i - 2] >> 2];
2061
- result += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
2062
- result += base64abc[(bytes[i - 1] & 15) << 2];
2063
- result += "=";
2064
- }
2065
- return result;
2066
- };
2067
- function getBase64Code(charCode) {
2068
- if (charCode >= base64codes.length) throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
2069
- const code = base64codes[charCode];
2070
- if (code === 255) throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
2071
- return code;
2072
- }
2073
- const base64abc = [
2074
- "A",
2075
- "B",
2076
- "C",
2077
- "D",
2078
- "E",
2079
- "F",
2080
- "G",
2081
- "H",
2082
- "I",
2083
- "J",
2084
- "K",
2085
- "L",
2086
- "M",
2087
- "N",
2088
- "O",
2089
- "P",
2090
- "Q",
2091
- "R",
2092
- "S",
2093
- "T",
2094
- "U",
2095
- "V",
2096
- "W",
2097
- "X",
2098
- "Y",
2099
- "Z",
2100
- "a",
2101
- "b",
2102
- "c",
2103
- "d",
2104
- "e",
2105
- "f",
2106
- "g",
2107
- "h",
2108
- "i",
2109
- "j",
2110
- "k",
2111
- "l",
2112
- "m",
2113
- "n",
2114
- "o",
2115
- "p",
2116
- "q",
2117
- "r",
2118
- "s",
2119
- "t",
2120
- "u",
2121
- "v",
2122
- "w",
2123
- "x",
2124
- "y",
2125
- "z",
2126
- "0",
2127
- "1",
2128
- "2",
2129
- "3",
2130
- "4",
2131
- "5",
2132
- "6",
2133
- "7",
2134
- "8",
2135
- "9",
2136
- "+",
2137
- "/"
2138
- ];
2139
- const base64codes = [
2140
- 255,
2141
- 255,
2142
- 255,
2143
- 255,
2144
- 255,
2145
- 255,
2146
- 255,
2147
- 255,
2148
- 255,
2149
- 255,
2150
- 255,
2151
- 255,
2152
- 255,
2153
- 255,
2154
- 255,
2155
- 255,
2156
- 255,
2157
- 255,
2158
- 255,
2159
- 255,
2160
- 255,
2161
- 255,
2162
- 255,
2163
- 255,
2164
- 255,
2165
- 255,
2166
- 255,
2167
- 255,
2168
- 255,
2169
- 255,
2170
- 255,
2171
- 255,
2172
- 255,
2173
- 255,
2174
- 255,
2175
- 255,
2176
- 255,
2177
- 255,
2178
- 255,
2179
- 255,
2180
- 255,
2181
- 255,
2182
- 255,
2183
- 62,
2184
- 255,
2185
- 255,
2186
- 255,
2187
- 63,
2188
- 52,
2189
- 53,
2190
- 54,
2191
- 55,
2192
- 56,
2193
- 57,
2194
- 58,
2195
- 59,
2196
- 60,
2197
- 61,
2198
- 255,
2199
- 255,
2200
- 255,
2201
- 0,
2202
- 255,
2203
- 255,
2204
- 255,
2205
- 0,
2206
- 1,
2207
- 2,
2208
- 3,
2209
- 4,
2210
- 5,
2211
- 6,
2212
- 7,
2213
- 8,
2214
- 9,
2215
- 10,
2216
- 11,
2217
- 12,
2218
- 13,
2219
- 14,
2220
- 15,
2221
- 16,
2222
- 17,
2223
- 18,
2224
- 19,
2225
- 20,
2226
- 21,
2227
- 22,
2228
- 23,
2229
- 24,
2230
- 25,
2231
- 255,
2232
- 255,
2233
- 255,
2234
- 255,
2235
- 255,
2236
- 255,
2237
- 26,
2238
- 27,
2239
- 28,
2240
- 29,
2241
- 30,
2242
- 31,
2243
- 32,
2244
- 33,
2245
- 34,
2246
- 35,
2247
- 36,
2248
- 37,
2249
- 38,
2250
- 39,
2251
- 40,
2252
- 41,
2253
- 42,
2254
- 43,
2255
- 44,
2256
- 45,
2257
- 46,
2258
- 47,
2259
- 48,
2260
- 49,
2261
- 50,
2262
- 51
2263
- ];
2264
1941
  //#endregion
2265
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Tracer.js
1942
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Tracer.js
2266
1943
  const ParentSpanKey = "effect/Tracer/ParentSpan";
2267
1944
  var ParentSpan = class extends Service()(ParentSpanKey, { fiberCached: true }) {};
2268
1945
  const make$1 = (options) => options;
@@ -2303,10 +1980,10 @@ var NativeSpan = class {
2303
1980
  };
2304
1981
  }
2305
1982
  get traceId() {
2306
- return this._traceId ??= getOrUndefined$2(this.parent)?.traceId ?? randomHex(32);
1983
+ return this._traceId ??= getOrUndefined$2(this.parent)?.traceId ?? random(32);
2307
1984
  }
2308
1985
  get spanId() {
2309
- return this._spanId ??= randomHex(16);
1986
+ return this._spanId ??= random(16);
2310
1987
  }
2311
1988
  get attributes() {
2312
1989
  return this._attributes ??= new Map();
@@ -2337,10 +2014,10 @@ var NativeSpan = class {
2337
2014
  }
2338
2015
  };
2339
2016
  //#endregion
2340
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/metric.js
2017
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/metric.js
2341
2018
  const FiberRuntimeMetricsKey = "effect/Metric/FiberRuntimeMetrics";
2342
2019
  //#endregion
2343
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/references.js
2020
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/references.js
2344
2021
  const CurrentStackFrame = Reference("effect/References/CurrentStackFrame", {
2345
2022
  fiberCached: true,
2346
2023
  defaultValue: constUndefined
@@ -2363,7 +2040,7 @@ const MinimumLogLevel$1 = Reference("effect/References/MinimumLogLevel", {
2363
2040
  });
2364
2041
  const CurrentLogSpans$1 = Reference("effect/References/CurrentLogSpans", { defaultValue: () => [] });
2365
2042
  //#endregion
2366
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/tracer.js
2043
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/tracer.js
2367
2044
  const addSpanStackTrace = (options) => {
2368
2045
  if (options?.captureStackTrace === false) return options;
2369
2046
  else if (options?.captureStackTrace !== void 0 && typeof options.captureStackTrace !== "boolean") return options;
@@ -2395,7 +2072,7 @@ const makeStackCleaner = (line) => (stack) => {
2395
2072
  };
2396
2073
  const spanCleaner = makeStackCleaner(3);
2397
2074
  //#endregion
2398
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/effect.js
2075
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/effect.js
2399
2076
  var Interrupt = class extends ReasonBase {
2400
2077
  constructor(fiberId, annotations = constEmptyAnnotations) {
2401
2078
  super("Interrupt", annotations, "Interrupted");
@@ -2414,7 +2091,7 @@ var Interrupt = class extends ReasonBase {
2414
2091
  return isInterruptReason(that) && this.fiberId === that.fiberId && this.annotations === that.annotations;
2415
2092
  }
2416
2093
  [symbol$1]() {
2417
- return combine(string(`${this._tag}:${this.fiberId}`))(random(this.annotations));
2094
+ return combine(string(`${this._tag}:${this.fiberId}`))(random$1(this.annotations));
2418
2095
  }
2419
2096
  };
2420
2097
  const makeInterruptReason$1 = (fiberId) => new Interrupt(fiberId);
@@ -2551,7 +2228,7 @@ const cleanErrorStack = (stack, error, annotations) => {
2551
2228
  const lines = (stack.startsWith(message) ? stack.slice(message.length) : stack).split("\n");
2552
2229
  const out = [message];
2553
2230
  for (let i = 1; i < lines.length; i++) {
2554
- if (/(?:Generator\.next|~effect\/Effect)/.test(lines[i])) break;
2231
+ if (/Generator\.next|~effect\/(?:Effect|Utils)/.test(lines[i])) break;
2555
2232
  out.push(lines[i]);
2556
2233
  }
2557
2234
  return annotations ? addStackAnnotations(out.join("\n"), annotations) : out.join("\n");
@@ -2924,23 +2601,23 @@ const yieldNowWith = makePrimitive({
2924
2601
  const yieldNow$1 = yieldNowWith(0);
2925
2602
  const succeedSome = (a) => succeed$3(some(a));
2926
2603
  const succeedNone$1 = succeed$3(none());
2927
- const failCauseSync$1 = (evaluate) => suspend$1(() => failCause$3(internalCall(evaluate)));
2604
+ const failCauseSync$1 = (evaluate) => suspend$1(() => failCause$3(evaluate()));
2928
2605
  const die$3 = (defect) => exitDie(defect);
2929
- const failSync = (error) => suspend$1(() => fail$3(internalCall(error)));
2606
+ const failSync = (error) => suspend$1(() => fail$3(error()));
2930
2607
  const void_$2 = succeed$3(void 0);
2931
2608
  const try_$1 = (options) => {
2932
2609
  const evaluate = typeof options === "function" ? options : options.try;
2933
2610
  const catcher = typeof options === "function" ? (cause) => new UnknownError$1(cause, "An error occurred in Effect.try") : options.catch;
2934
2611
  return suspend$1(() => {
2935
2612
  try {
2936
- return succeed$3(internalCall(evaluate));
2613
+ return succeed$3(evaluate());
2937
2614
  } catch (err) {
2938
- return fail$3(internalCall(() => catcher(err)));
2615
+ return fail$3(catcher(err));
2939
2616
  }
2940
2617
  });
2941
2618
  };
2942
2619
  const promise$1 = (evaluate) => callbackOptions(function(resume, signal) {
2943
- internalCall(() => evaluate(signal)).then((a) => resume(succeed$3(a)), (e) => resume(die$3(e)));
2620
+ evaluate(signal).then((a) => resume(succeed$3(a)), (e) => resume(die$3(e)));
2944
2621
  }, evaluate.length !== 0);
2945
2622
  const tryPromise$1 = (options) => {
2946
2623
  const f = typeof options === "function" ? options : options.try;
@@ -2954,7 +2631,7 @@ const tryPromise$1 = (options) => {
2954
2631
  }
2955
2632
  };
2956
2633
  try {
2957
- internalCall(() => f(signal)).then((a) => resume(succeed$3(a)), failWithCatch);
2634
+ f(signal).then((a) => resume(succeed$3(a)), failWithCatch);
2958
2635
  } catch (err) {
2959
2636
  failWithCatch(err);
2960
2637
  }
@@ -3146,11 +2823,6 @@ const OnSuccessProto = makePrimitiveProto({
3146
2823
  op: "OnSuccess",
3147
2824
  [evaluate]: evaluateCont
3148
2825
  });
3149
- const OnSuccessImpl = function(self, f) {
3150
- this[args] = self;
3151
- this[contA] = f;
3152
- };
3153
- OnSuccessImpl.prototype = OnSuccessProto;
3154
2826
  const ContImpl = function(self, cont, payload) {
3155
2827
  this[args] = self;
3156
2828
  this[contA] = cont;
@@ -3160,17 +2832,23 @@ ContImpl.prototype = OnSuccessProto;
3160
2832
  const returnPayload = function() {
3161
2833
  return this.payload;
3162
2834
  };
2835
+ const continuationMarksStack = (() => {
2836
+ const marker = "~effect/Effect/stackProbe";
2837
+ return { [marker]: function stackProbe() {
2838
+ return new Error().stack;
2839
+ } }[marker]()?.includes("[as " + marker + "]") === true;
2840
+ })();
3163
2841
  const mapCont = function(value) {
3164
2842
  const f = this.payload;
3165
- return succeed$3(internalCall(() => f(value)));
2843
+ return succeed$3(continuationMarksStack ? f(value) : internalCall(() => f(value)));
3166
2844
  };
3167
2845
  const andThenCont = function(value) {
3168
2846
  const f = this.payload;
3169
- return internalCall(() => f(value));
2847
+ return f(value);
3170
2848
  };
3171
2849
  const tapCont = function(value) {
3172
2850
  const f = this.payload;
3173
- return new ContImpl(internalCall(() => f(value)), returnPayload, exitSucceed(value));
2851
+ return new ContImpl(f(value), returnPayload, exitSucceed(value));
3174
2852
  };
3175
2853
  const tapEffectCont = function(value) {
3176
2854
  return new ContImpl(this.payload, returnPayload, exitSucceed(value));
@@ -3206,7 +2884,7 @@ const raceAllFirst = (all, options) => withFiber$1((parent) => callback$1((resum
3206
2884
  return fiberInterruptAll(fibers);
3207
2885
  }));
3208
2886
  const raceFirst$1 = dual((args) => isEffect$1(args[1]), (self, that, options) => raceAllFirst([self, that], options));
3209
- const flatMap$2 = dual(2, (self, f) => new OnSuccessImpl(self, f.length !== 1 ? (a) => f(a) : f));
2887
+ const flatMap$2 = dual(2, (self, f) => new ContImpl(self, andThenCont, f));
3210
2888
  const effectIsExit = (effect) => effect[ExitTypeId] !== void 0;
3211
2889
  const flatMapEager$1 = dual(2, (self, f) => {
3212
2890
  if (effectIsExit(self)) return self._tag === "Success" ? f(self.value) : self;
@@ -3257,9 +2935,10 @@ const updateContext$1 = dual(2, (self, f) => withFiber$1((fiber) => {
3257
2935
  const nextContext = f(prevContext);
3258
2936
  if (prevContext === nextContext) return self;
3259
2937
  fiber.setContext(nextContext);
3260
- return onExitPrimitive$1(self, () => {
2938
+ onExitUnsafe(fiber, () => {
3261
2939
  fiber.setContext(prevContext);
3262
2940
  });
2941
+ return self;
3263
2942
  }));
3264
2943
  const updateService$1 = dual(3, (self, service, f) => updateContext$1(self, (s) => {
3265
2944
  const prev = getUnsafe$1(s, service);
@@ -3279,7 +2958,7 @@ const provideService$1 = function() {
3279
2958
  return dual(3, (self, service, impl) => provideServiceImpl(self, service, impl)).apply(this, arguments);
3280
2959
  };
3281
2960
  const provideServiceImpl = (self, service, implementation) => updateContext$1(self, add(service, implementation));
3282
- const zipWith$1 = dual((args) => isEffect$1(args[1]), (self, that, f, options) => options?.concurrent ? map$2(all$1([self, that], { concurrency: 2 }), ([a, a2]) => internalCall(() => f(a, a2))) : flatMap$2(self, (a) => map$2(that, (a2) => internalCall(() => f(a, a2)))));
2961
+ const zipWith$1 = dual((args) => isEffect$1(args[1]), (self, that, f, options) => options?.concurrent ? map$2(all$1([self, that], { concurrency: 2 }), ([a, a2]) => f(a, a2)) : flatMap$2(self, (a) => map$2(that, (a2) => f(a, a2))));
3283
2962
  const filterOrFail$1 = dual((args) => isEffect$1(args[0]), (self, predicate, orFailWith) => filterOrElse(self, predicate, orFailWith ? (a) => fail$3(orFailWith(a)) : () => fail$3(new NoSuchElementError$1())));
3284
2963
  const when$1 = dual(2, (self, condition) => flatMap$2(condition, (pass) => pass ? asSome$1(self) : succeedNone$1));
3285
2964
  const forever$2 = dual((args) => isEffect$1(args[0]), (self, options) => whileLoop$1({
@@ -3299,7 +2978,7 @@ const OnFailureImpl = function(self, f) {
3299
2978
  OnFailureImpl.prototype = OnFailureProto;
3300
2979
  const catchCauseFilter = dual(3, (self, filter, f) => catchCause$1(self, (cause) => {
3301
2980
  const eb = filter(cause);
3302
- return isFailure$1(eb) ? failCause$3(eb.failure) : internalCall(() => f(eb.success, cause));
2981
+ return isFailure$1(eb) ? failCause$3(eb.failure) : f(eb.success, cause);
3303
2982
  }));
3304
2983
  const catch_$1 = dual(2, (self, f) => catchCauseFilter(self, findError$1, (e) => f(e)));
3305
2984
  const catchNoSuchElement$1 = (self) => matchEffect$2(self, {
@@ -3307,19 +2986,19 @@ const catchNoSuchElement$1 = (self) => matchEffect$2(self, {
3307
2986
  onSuccess: succeedSome
3308
2987
  });
3309
2988
  const catchDefect$1 = dual(2, (self, f) => catchCauseFilter(self, findDefect, f));
3310
- const tapCause$1 = dual(2, (self, f) => catchCause$1(self, (cause) => andThen$1(internalCall(() => f(cause)), failCause$3(cause))));
2989
+ const tapCause$1 = dual(2, (self, f) => catchCause$1(self, (cause) => andThen$1(f(cause), failCause$3(cause))));
3311
2990
  const catchIf$1 = dual((args) => isEffect$1(args[0]), (self, predicate, f, orElse) => catchCause$1(self, (cause) => {
3312
2991
  const error = findError$1(cause);
3313
2992
  if (isFailure$1(error)) return failCause$3(error.failure);
3314
- if (!predicate(error.success)) return orElse ? internalCall(() => orElse(error.success)) : failCause$3(cause);
3315
- return internalCall(() => f(error.success));
2993
+ if (!predicate(error.success)) return orElse ? orElse(error.success) : failCause$3(cause);
2994
+ return f(error.success);
3316
2995
  }));
3317
2996
  const catchFilter$1 = dual((args) => isEffect$1(args[0]), (self, filter, f, orElse) => catchCause$1(self, (cause) => {
3318
2997
  const error = findError$1(cause);
3319
2998
  if (isFailure$1(error)) return failCause$3(error.failure);
3320
2999
  const result = filter(error.success);
3321
- if (isFailure$1(result)) return orElse ? internalCall(() => orElse(result.failure)) : failCause$3(cause);
3322
- return internalCall(() => f(result.success));
3000
+ if (isFailure$1(result)) return orElse ? orElse(result.failure) : failCause$3(cause);
3001
+ return f(result.success);
3323
3002
  }));
3324
3003
  const catchTag$1 = dual((args) => isEffect$1(args[0]), (self, k, f, orElse) => {
3325
3004
  const pred = Array.isArray(k) ? (e) => hasProperty(e, "_tag") && k.includes(e._tag) : isTagged(k);
@@ -3330,12 +3009,12 @@ const catchTags$1 = dual((args) => isEffect$1(args[0]), (self, cases, orElse) =>
3330
3009
  return catchFilter$1(self, (e) => {
3331
3010
  keys ??= Object.keys(cases);
3332
3011
  return hasProperty(e, "_tag") && isString(e["_tag"]) && keys.includes(e["_tag"]) ? succeed$4(e) : fail$4(e);
3333
- }, (e) => internalCall(() => cases[e["_tag"]](e)), orElse);
3012
+ }, (e) => cases[e["_tag"]](e), orElse);
3334
3013
  });
3335
3014
  const catchReason$1 = dual((args) => isEffect$1(args[0]), (self, errorTag, reasonTag, f, orElse) => catchIf$1(self, (e) => isTagged(e, errorTag) && hasProperty(e, "reason") && (orElse !== void 0 || isTagged(e.reason, reasonTag)), (e) => {
3336
3015
  const reason = e.reason;
3337
3016
  if (isTagged(reason, reasonTag)) return f(reason, e);
3338
- return orElse ? internalCall(() => orElse(reason, e)) : fail$3(e);
3017
+ return orElse ? orElse(reason, e) : fail$3(e);
3339
3018
  }));
3340
3019
  const mapError$1 = dual(2, (self, f) => catch_$1(self, (error) => failSync(() => f(error))));
3341
3020
  const mapBoth = dual(2, (self, options) => matchEffect$2(self, {
@@ -3343,7 +3022,7 @@ const mapBoth = dual(2, (self, options) => matchEffect$2(self, {
3343
3022
  onSuccess: (a) => sync$1(() => options.onSuccess(a))
3344
3023
  }));
3345
3024
  const orDie$2 = (self) => catch_$1(self, die$3);
3346
- const orElseSucceed$1 = dual(2, (self, f) => catch_$1(self, (_) => sync$1(f)));
3025
+ const orElseSucceed$1 = dual(2, (self, f) => catch_$1(self, (error) => sync$1(() => f(error))));
3347
3026
  const ignore$1 = dual((args) => isEffect$1(args[0]), (self, options) => {
3348
3027
  if (!options?.log) return matchEffect$2(self, {
3349
3028
  onFailure: (_) => void_$2,
@@ -3378,19 +3057,22 @@ const OnSuccessAndFailureImpl = function(self, onSuccess, onFailure) {
3378
3057
  };
3379
3058
  OnSuccessAndFailureImpl.prototype = OnSuccessAndFailureProto;
3380
3059
  const matchCause = dual(2, (self, options) => matchCauseEffect$1(self, {
3381
- onFailure: (cause) => sync$1(() => options.onFailure(cause)),
3382
- onSuccess: (value) => sync$1(() => options.onSuccess(value))
3060
+ onFailure: (cause) => continuationMarksStack ? succeed$3(options.onFailure(cause)) : sync$1(() => options.onFailure(cause)),
3061
+ onSuccess: (value) => continuationMarksStack ? succeed$3(options.onSuccess(value)) : sync$1(() => options.onSuccess(value))
3383
3062
  }));
3384
3063
  const matchEffect$2 = dual(2, (self, options) => matchCauseEffect$1(self, {
3385
3064
  onFailure: (cause) => {
3386
3065
  const fail = cause.reasons.find(isFailReason$1);
3387
- return fail ? internalCall(() => options.onFailure(fail.error)) : failCause$3(cause);
3066
+ return fail ? options.onFailure(fail.error) : failCause$3(cause);
3388
3067
  },
3389
3068
  onSuccess: options.onSuccess
3390
3069
  }));
3391
- const match$1 = dual(2, (self, options) => matchEffect$2(self, {
3392
- onFailure: (error) => sync$1(() => options.onFailure(error)),
3393
- onSuccess: (value) => sync$1(() => options.onSuccess(value))
3070
+ const match$1 = dual(2, (self, options) => matchCauseEffect$1(self, {
3071
+ onFailure: (cause) => {
3072
+ const fail = cause.reasons.find(isFailReason$1);
3073
+ return fail ? continuationMarksStack ? succeed$3(options.onFailure(fail.error)) : sync$1(() => options.onFailure(fail.error)) : failCause$3(cause);
3074
+ },
3075
+ onSuccess: (value) => continuationMarksStack ? succeed$3(options.onSuccess(value)) : sync$1(() => options.onSuccess(value))
3394
3076
  }));
3395
3077
  const matchEager = dual(2, (self, options) => {
3396
3078
  if (effectIsExit(self)) {
@@ -3532,10 +3214,11 @@ const scoped$1 = (self) => withFiber$1((fiber) => {
3532
3214
  const prev = fiber.context;
3533
3215
  const scope = scopeMakeUnsafe();
3534
3216
  fiber.setContext(add(fiber.context, scopeTag, scope));
3535
- return onExitPrimitive$1(self, (exit) => {
3217
+ onExitUnsafe(fiber, (exit) => {
3536
3218
  fiber.setContext(prev);
3537
3219
  return scopeCloseUnsafe(scope, exit);
3538
3220
  });
3221
+ return self;
3539
3222
  });
3540
3223
  const scopedWith$1 = (f) => suspend$1(() => {
3541
3224
  const scope = scopeMakeUnsafe();
@@ -3543,7 +3226,7 @@ const scopedWith$1 = (f) => suspend$1(() => {
3543
3226
  });
3544
3227
  const acquireRelease$1 = (acquire, release, options) => contextWith$1((context) => uninterruptibleMask$1((restore) => flatMap$2(scope$1, (scope) => tap$1(options?.interruptible ? restore(acquire) : acquire, (a) => scopeAddFinalizerExit(scope, (exit) => provideContext$1(release(a, exit), context))))));
3545
3228
  const addFinalizer$2 = (finalizer) => flatMap$2(scope$1, (scope) => contextWith$1((context) => scopeAddFinalizerExit(scope, (exit) => provideContext$1(finalizer(exit), context))));
3546
- const onExitPrimitive$1 = function() {
3229
+ const OnExitImpl = function() {
3547
3230
  const Proto = makePrimitiveProto({
3548
3231
  op: "OnExit",
3549
3232
  [evaluate](fiber) {
@@ -3573,10 +3256,12 @@ const onExitPrimitive$1 = function() {
3573
3256
  this.interruptible = interruptible;
3574
3257
  };
3575
3258
  OnExitImpl.prototype = Proto;
3576
- return function(effect, onExit, interruptible) {
3577
- return new OnExitImpl(effect, onExit, interruptible);
3578
- };
3259
+ return OnExitImpl;
3579
3260
  }();
3261
+ const onExitPrimitive$1 = (effect, onExit, interruptible) => new OnExitImpl(effect, onExit, interruptible);
3262
+ const onExitUnsafe = (fiber, f) => {
3263
+ fiber._stack.push(new OnExitImpl(void 0, f, void 0));
3264
+ };
3580
3265
  const onExit$1 = dual(2, onExitPrimitive$1);
3581
3266
  const ensuring$1 = dual(2, (self, finalizer) => onExit$1(self, (_) => finalizer));
3582
3267
  const onExitFilter = dual(3, (self, filter, f) => onExit$1(self, (exit) => {
@@ -3605,7 +3290,7 @@ const cachedInvalidateWithTTL = dual(2, (self, ttl) => sync$1(() => {
3605
3290
  running = true;
3606
3291
  latch.closeUnsafe();
3607
3292
  exit = void 0;
3608
- return onExit$1(self, (exit_) => sync$1(() => {
3293
+ onExitUnsafe(fiber, (exit_) => sync$1(() => {
3609
3294
  try {
3610
3295
  const duration = ttlMillis(exit_);
3611
3296
  expiresAt = clock.currentTimeMillisUnsafe() + duration;
@@ -3619,6 +3304,7 @@ const cachedInvalidateWithTTL = dual(2, (self, ttl) => sync$1(() => {
3619
3304
  latch.openUnsafe();
3620
3305
  }
3621
3306
  }));
3307
+ return self;
3622
3308
  }), sync$1(() => {
3623
3309
  expiresAt = 0;
3624
3310
  latch.closeUnsafe();
@@ -3631,14 +3317,15 @@ const cached$1 = (self) => sync$1(() => {
3631
3317
  let started = false;
3632
3318
  let exit;
3633
3319
  const wait = flatMap$2(latch.await, () => exit);
3634
- return suspend$1(() => {
3320
+ return withFiber$1((fiber) => {
3635
3321
  if (exit !== void 0) return exit;
3636
3322
  if (started) return wait;
3637
3323
  started = true;
3638
- return onExit$1(self, (result) => sync$1(() => {
3324
+ onExitUnsafe(fiber, (result) => sync$1(() => {
3639
3325
  exit = result;
3640
3326
  latch.openUnsafe();
3641
3327
  }));
3328
+ return self;
3642
3329
  });
3643
3330
  });
3644
3331
  const interrupt$2 = withFiber$1((fiber) => failCause$3(causeInterrupt(fiber.id)));
@@ -4083,7 +3770,8 @@ const useSpan$1 = (name, ...args) => {
4083
3770
  const span = makeSpanUnsafe(fiber, name, options);
4084
3771
  const clock = fiber.getRef(ClockRef);
4085
3772
  const timingEnabled = fiber.getRef(TracerTimingEnabled$1);
4086
- return onExit$1(suspend$1(() => internalCall(() => evaluate(span))), (exit) => endSpan(span, exit, clock, timingEnabled));
3773
+ onExitUnsafe(fiber, (exit) => endSpan(span, exit, clock, timingEnabled));
3774
+ return evaluate(span);
4087
3775
  });
4088
3776
  };
4089
3777
  const provideParentSpan = provideService$1(ParentSpan);
@@ -4178,21 +3866,21 @@ const sleep$1 = (duration) => clockWith$1((clock) => clock.sleep(fromInputUnsafe
4178
3866
  const currentTimeMillis = clockWith$1((clock) => clock.currentTimeMillis);
4179
3867
  const TimeoutErrorTypeId = "~effect/Cause/TimeoutError";
4180
3868
  const isTimeoutError$1 = (u) => hasProperty(u, TimeoutErrorTypeId);
4181
- var TimeoutError$1 = class extends TaggedError$1("TimeoutError") {
3869
+ var TimeoutError$1 = class extends TaggedError("TimeoutError") {
4182
3870
  [TimeoutErrorTypeId] = TimeoutErrorTypeId;
4183
3871
  constructor(message) {
4184
3872
  super({ message });
4185
3873
  }
4186
3874
  };
4187
3875
  const IllegalArgumentErrorTypeId = "~effect/Cause/IllegalArgumentError";
4188
- var IllegalArgumentError$1 = class extends TaggedError$1("IllegalArgumentError") {
3876
+ var IllegalArgumentError$1 = class extends TaggedError("IllegalArgumentError") {
4189
3877
  [IllegalArgumentErrorTypeId] = IllegalArgumentErrorTypeId;
4190
3878
  constructor(message) {
4191
3879
  super({ message });
4192
3880
  }
4193
3881
  };
4194
3882
  const AsyncFiberErrorTypeId = "~effect/Cause/AsyncFiberError";
4195
- var AsyncFiberError = class extends TaggedError$1("AsyncFiberError") {
3883
+ var AsyncFiberError = class extends TaggedError("AsyncFiberError") {
4196
3884
  [AsyncFiberErrorTypeId] = AsyncFiberErrorTypeId;
4197
3885
  constructor(fiber) {
4198
3886
  super({
@@ -4202,7 +3890,7 @@ var AsyncFiberError = class extends TaggedError$1("AsyncFiberError") {
4202
3890
  }
4203
3891
  };
4204
3892
  const UnknownErrorTypeId = "~effect/Cause/UnknownError";
4205
- var UnknownError$1 = class extends TaggedError$1("UnknownError") {
3893
+ var UnknownError$1 = class extends TaggedError("UnknownError") {
4206
3894
  [UnknownErrorTypeId] = UnknownErrorTypeId;
4207
3895
  constructor(cause, message) {
4208
3896
  super({
@@ -4329,7 +4017,7 @@ function interruptChildrenPatch() {
4329
4017
  }
4330
4018
  const undefined_$1 = succeed$3(void 0);
4331
4019
  //#endregion
4332
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Exit.js
4020
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Exit.js
4333
4021
  const isExit = isExit$1;
4334
4022
  const succeed$2 = exitSucceed;
4335
4023
  const failCause$2 = exitFailCause;
@@ -4340,7 +4028,7 @@ const void_$1 = exitVoid;
4340
4028
  const isSuccess = exitIsSuccess;
4341
4029
  const isFailure = exitIsFailure;
4342
4030
  //#endregion
4343
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Deferred.js
4031
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Deferred.js
4344
4032
  const TypeId$3 = "~effect/Deferred";
4345
4033
  const DeferredProto = {
4346
4034
  [TypeId$3]: {
@@ -4386,13 +4074,13 @@ const doneUnsafe = (self, effect) => {
4386
4074
  };
4387
4075
  const into = dual(2, (self, deferred) => uninterruptibleMask$1((restore) => flatMap$2(exit$1(restore(self)), (exit) => done$1(deferred, exit))));
4388
4076
  //#endregion
4389
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/References.js
4077
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/References.js
4390
4078
  const CurrentLogAnnotations = CurrentLogAnnotations$1;
4391
4079
  const CurrentLogSpans = CurrentLogSpans$1;
4392
4080
  const MinimumLogLevel = MinimumLogLevel$1;
4393
4081
  const TracerTimingEnabled = TracerTimingEnabled$1;
4394
4082
  //#endregion
4395
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Scope.js
4083
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Scope.js
4396
4084
  const Scope = scopeTag;
4397
4085
  const make = scopeMake;
4398
4086
  const makeUnsafe = scopeMakeUnsafe;
@@ -4402,12 +4090,27 @@ const addFinalizer$1 = scopeAddFinalizer;
4402
4090
  const forkUnsafe = scopeForkUnsafe;
4403
4091
  const close = scopeClose;
4404
4092
  //#endregion
4405
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Layer.js
4093
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Layer.js
4406
4094
  const TypeId$2 = "~effect/Layer";
4407
4095
  const MemoMapTypeId = "~effect/Layer/MemoMap";
4408
- const memoMapReuse = (entry, scope) => {
4096
+ const makeMemoMapEntry = (memoMap, layer) => {
4097
+ const entry = {
4098
+ observers: 0,
4099
+ deferred: makeUnsafe$1(),
4100
+ scope: makeUnsafe(),
4101
+ finalizer: (exit) => suspend$1(() => {
4102
+ if (--entry.observers > 0) return void_$2;
4103
+ memoMap.map.delete(layer);
4104
+ return close(entry.scope, exit);
4105
+ })
4106
+ };
4107
+ return entry;
4108
+ };
4109
+ const memoMapObserve = (entry, scope) => {
4110
+ if (scope.state._tag === "Closed") return false;
4409
4111
  entry.observers++;
4410
- return andThen$1(scopeAddFinalizerExit(scope, (exit) => entry.finalizer(exit)), entry.effect);
4112
+ scopeAddFinalizerUnsafe(scope, {}, entry.finalizer);
4113
+ return true;
4411
4114
  };
4412
4115
  const LayerProto = {
4413
4116
  [TypeId$2]: {
@@ -4432,27 +4135,6 @@ const fromBuildMemo = (build) => {
4432
4135
  const self = fromBuild((memoMap, scope) => memoMap.getOrElseMemoize(self, scope, build));
4433
4136
  return self;
4434
4137
  };
4435
- const memoMapBuild = (memoMap, layer, scope, build) => {
4436
- const layerScope = makeUnsafe();
4437
- const deferred = makeUnsafe$1();
4438
- const entry = {
4439
- observers: 1,
4440
- effect: _await(deferred),
4441
- finalizer: (exit) => suspend$1(() => {
4442
- entry.observers--;
4443
- if (entry.observers === 0) {
4444
- memoMap.map.delete(layer);
4445
- return close(layerScope, exit);
4446
- }
4447
- return void_$2;
4448
- })
4449
- };
4450
- memoMap.map.set(layer, entry);
4451
- return scopeAddFinalizerExit(scope, entry.finalizer).pipe(flatMap$2(() => build(memoMap, layerScope)), onExit$1((exit) => {
4452
- entry.effect = exit;
4453
- return done$1(deferred, exit);
4454
- }));
4455
- };
4456
4138
  var MemoMapImpl = class {
4457
4139
  get [MemoMapTypeId]() {
4458
4140
  return MemoMapTypeId;
@@ -4464,14 +4146,26 @@ var MemoMapImpl = class {
4464
4146
  map = new Map();
4465
4147
  get(layer, scope) {
4466
4148
  const local = this.map.get(layer);
4467
- if (local) return memoMapReuse(local, scope);
4149
+ if (local) {
4150
+ memoMapObserve(local, scope);
4151
+ return local.deferred.effect ?? _await(local.deferred);
4152
+ }
4468
4153
  return this.parent?.get(layer, scope);
4469
4154
  }
4470
4155
  getOrElseMemoize(layer, scope, build) {
4471
4156
  return suspend$1(() => {
4472
- const existing = this.get(layer, scope);
4473
- if (existing) return existing;
4474
- return memoMapBuild(this, layer, scope, build);
4157
+ let deferred;
4158
+ return onExitPrimitive$1(suspend$1(() => {
4159
+ const existing = this.get(layer, scope);
4160
+ if (existing) return existing;
4161
+ const entry = makeMemoMapEntry(this, layer);
4162
+ if (!memoMapObserve(entry, scope)) return build(this, scope);
4163
+ deferred = entry.deferred;
4164
+ this.map.set(layer, entry);
4165
+ return build(this, entry.scope);
4166
+ }), (exit) => {
4167
+ if (deferred) doneUnsafe(deferred, exit);
4168
+ });
4475
4169
  });
4476
4170
  }
4477
4171
  };
@@ -4551,7 +4245,7 @@ const makeUnimplemented = (error) => {
4551
4245
  const StreamTypeId = "~effect/Stream";
4552
4246
  const ChannelTypeId = "~effect/Channel";
4553
4247
  //#endregion
4554
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Cause.js
4248
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Cause.js
4555
4249
  const isCause = isCause$1;
4556
4250
  const isReason = isCauseReason;
4557
4251
  const isFailReason = isFailReason$1;
@@ -4577,9 +4271,10 @@ const isTimeoutError = isTimeoutError$1;
4577
4271
  const TimeoutError = TimeoutError$1;
4578
4272
  const IllegalArgumentError = IllegalArgumentError$1;
4579
4273
  const UnknownError = UnknownError$1;
4274
+ const annotate = causeAnnotate;
4580
4275
  var StackTrace = class extends Service()("effect/Cause/StackTrace") {};
4581
4276
  //#endregion
4582
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/random.js
4277
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/random.js
4583
4278
  const Random = Reference("effect/Random", { defaultValue: () => ({
4584
4279
  nextIntUnsafe() {
4585
4280
  return Math.floor(Math.random() * (Number.MAX_SAFE_INTEGER - Number.MIN_SAFE_INTEGER + 1)) + Number.MIN_SAFE_INTEGER;
@@ -4599,7 +4294,7 @@ const nextBetween = (min, max, draw) => {
4599
4294
  return view.getFloat64(0);
4600
4295
  };
4601
4296
  //#endregion
4602
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Pull.js
4297
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Pull.js
4603
4298
  const catchDone = dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
4604
4299
  const isDoneCause = (cause) => cause.reasons.some(isDoneFailure);
4605
4300
  const isDoneFailure = (failure) => failure._tag === "Fail" && isDone(failure.error);
@@ -4627,7 +4322,7 @@ const matchEffect$1 = dual(2, (self, options) => matchCauseEffect$1(self, {
4627
4322
  }
4628
4323
  }));
4629
4324
  //#endregion
4630
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Schedule.js
4325
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Schedule.js
4631
4326
  const TypeId$1 = "~effect/Schedule";
4632
4327
  const randomNext = Random.useSync((random) => random.nextDoubleUnsafe());
4633
4328
  const CurrentMetadata = Reference("effect/Schedule/CurrentMetadata", { defaultValue: constant({
@@ -4751,11 +4446,11 @@ const while_ = dual(2, (self, predicate) => fromStep(map$2(toStep(self), (step)
4751
4446
  })));
4752
4447
  const forever$1 = spaced(zero);
4753
4448
  //#endregion
4754
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/layer.js
4449
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/layer.js
4755
4450
  const provideLayer = (self, layer, options) => scopedWith$1((scope) => flatMap$2(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext$1(self, context)));
4756
4451
  const provide$1 = dual((args) => isEffect$1(args[0]), (self, source, options) => isContext(source) ? provideContext$1(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll(...source) : source, options));
4757
4452
  //#endregion
4758
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/schedule.js
4453
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schedule.js
4759
4454
  const repeatOrElse = dual(3, (self, schedule, orElse) => flatMap$2(toStepWithMetadata(schedule), (step) => {
4760
4455
  let meta = CurrentMetadata.defaultValue();
4761
4456
  return catch_$1(forever$2(tap$1(flatMap$2(suspend$1(() => provideService$1(self, CurrentMetadata, meta)), step), (meta_) => sync$1(() => {
@@ -4797,7 +4492,7 @@ const buildFromOptions = (options) => {
4797
4492
  return schedule;
4798
4493
  };
4799
4494
  //#endregion
4800
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Request.js
4495
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Request.js
4801
4496
  const TypeId = "~effect/Request";
4802
4497
  const requestVariance = byReferenceUnsafe({
4803
4498
  _E: (_) => _,
@@ -4822,7 +4517,7 @@ const TaggedClass = (tag) => {
4822
4517
  };
4823
4518
  const makeEntry = (options) => options;
4824
4519
  //#endregion
4825
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/internal/request.js
4520
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/request.js
4826
4521
  const request$1 = dual(2, (self, resolver) => {
4827
4522
  const withResolver = (resolver) => callback$1((resume) => {
4828
4523
  const entry = addEntry(resolver, self, resume, getCurrentFiber());
@@ -4918,7 +4613,7 @@ function runBatch(batch) {
4918
4613
  return batch.run;
4919
4614
  }
4920
4615
  //#endregion
4921
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Effect.js
4616
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Effect.js
4922
4617
  const isEffect = isEffect$1;
4923
4618
  const all = all$1;
4924
4619
  const forEach = forEach$1;
@@ -5058,6 +4753,6 @@ const flatMapEager = flatMapEager$1;
5058
4753
  const catchEager = catchEager$1;
5059
4754
  const fnUntracedEager = fnUntracedEager$1;
5060
4755
  //#endregion
5061
- export { isEffect as $, getOrThrow$1 as $a, makeEquivalence as $i, effect as $n, number as $o, exitVoid as $r, uninterruptibleMask as $t, ensuring as A, Reference as Aa, decodeBase64 as Ai, StackTrace as An, exitFailCause as Ao, isDoneUnsafe as Ar, flow as As, result as At, fnUntraced as B, makeUnsafe$2 as Ba, appendAll as Bi, hasInterruptsOnly as Bn, format$1 as Bo, void_$1 as Br, sleep as Bt, catch_ as C, minutes as Ca, suspend$1 as Ci, isDoneCause as Cn, Prototype as Co, TracerTimingEnabled as Cr, or as Cs, promise as Ct, delay as D, toMillis as Da, void_$2 as Di, Done as Dn, args as Do, interruptWith as Dr, constVoid as Ds, raceFirst as Dt, contextWith as E, seconds as Ea, updateContext$1 as Ei, nextBetween as En, PipeInspectableProto as Eo, doneUnsafe as Er, constUndefined as Es, provideService as Et, filterOrFail as F, getOption as Fa, TaggedClass$1 as Fi, fail$1 as Fn, setStackTraceLimit as Fo, interrupt$1 as Fr, Class$3 as Fs, runSyncExit as Ft, forkIn as G, flatMap$4 as Ga, flatMapNullishOr as Gi, isTimeoutError as Gn, redact as Go, asSome$1 as Gr, tap as Gt, forEach as H, all$2 as Ha, findFirst as Hi, isCause as Hn, formatJson as Ho, ConsoleRef as Hr, succeedNone as Ht, flatMap as I, getOrUndefined$1 as Ia, TaggedError as Ii, filterInterruptors as In, BaseProto as Io, isExit as Ir, pipeArguments as Is, scope as It, fromResult as J, fromNullOr as Ja, isArrayNonEmpty as Ji, makeInterruptReason as Jn, equals$1 as Jo, currentTimeMillis as Jr, timeoutOrElse as Jt, forkScoped as K, flatMapNullishOr$1 as Ka, fromIterable as Ki, makeDieReason as Kn, symbolRedactable as Ko, callback$1 as Kr, tapCause as Kt, flatMapEager as L, getOrUndefinedUnsafe as La, taggedEnum as Li, findError as Ln, Class$2 as Lo, isFailure as Lr, scoped as Lt, fail as M, add as Ma, encodeBase64 as Mi, UnknownError as Mn, withFiber$1 as Mo, die$2 as Mr, memoize as Ms, runFork as Mt, failCause as N, empty$3 as Na, Class$1 as Ni, die$1 as Nn, assignProperty as No, fail$2 as Nr, memoizeIdempotent as Ns, runForkWith as Nt, die as O, toSeconds as Oa, DisablePropagation as Oi, IllegalArgumentError as On, causeFail as Oo, into as Or, constant as Os, repeat as Ot, failCauseSync as P, get as Pa, Error$1 as Pi, done as Pn, getStackTraceLimit as Po, failCause$2 as Pr, pipe as Ps, runSync as Pt, interruptible as Q, getOrNull as Qa, last as Qi, buildWithScope as Qn, hash as Qo, exitInterrupt as Qr, uninterruptible as Qt, flatten as R, getUnsafe$1 as Ra, Array$1 as Ri, fromReasons as Rn, NodeInspectSymbol as Ro, isSuccess as Rr, scopedWith as Rt, catchTags as S, millis as Sa, succeedNone$1 as Si, filterDone as Sn, strictEqual as So, MinimumLogLevel as Sr, isUnknown as Ss, orElseSucceed as St, context as T, negativeInfinity as Ta, uninterruptibleMask$1 as Ti, Random as Tn, Error$2 as To, done$1 as Tr, constTrue as Ts, provideContext as Tt, forever as U, exists as Ua, findFirstIndex as Ui, isFailReason as Un, formatPath as Uo, LogToStderr as Ur, suspend as Ut, fnUntracedEager as V, merge$1 as Va, empty$1 as Vi, interruptors as Vn, formatDate as Vo, ClockRef as Vr, succeed as Vt, forkChild as W, filter as Wa, findLast as Wi, isReason as Wn, formatPropertyKey as Wo, andThen$1 as Wr, sync as Wt, ignore as X, fromUndefinedOr as Xa, isReadonlyArrayNonEmpty as Xi, pretty as Xn, array as Xo, endSpan as Xr, try_ as Xt, gen as Y, fromNullishOr$1 as Ya, isCanonicalArrayIndex as Yi, map$1 as Yn, symbol as Yo, effectIsExit as Yr, tryPromise as Yt, interrupt as Z, getOrElse$1 as Za, join as Zi, squash as Zn, combine as Zo, exitHasInterrupts as Zr, undefined_ as Zt, catchFilter as _, fromInputUnsafe as _a, onExit$1 as _i, min as _n, isLessThan as _o, forkUnsafe as _r, isObjectKeyword as _s, onExit as _t, andThen as a, empty$2 as aa, fiberInterruptAs as ai, whileLoop as an, map$5 as ao, mergeAll as ar, isBoolean as as, makeSpanScoped as at, catchReason as b, isFinite as ba, scopeFinalizerCountUnsafe as bi, catchDone as bn, Tuple as bo, provide$3 as br, isTagged as bs, option as bt, as as c, failVoid as ca, flatMap$2 as ci, withParentSpan as cn, orElse as co, provide$2 as cr, isIterable as cs, mapEager as ct, cached as d, isFailure$1 as da, iterateConcurrent as di, zipWith as dn, toArray as do, succeedContext as dr, isNotNullish as ds, match as dt, map$3 as ea, exitZipRight as ei, updateContext as en, getOrUndefined$2 as eo, effectContext as er, string as es, logDebug as et, cachedWithTTL as f, isSuccess$1 as fa, iterateEager as fi, Class as fn, BigInt$1 as fo, unwrap as fr, isNotUndefined as fs, matchCauseEager as ft, catchEager as g, format as ga, map$2 as gi, jittered as gn, isGreaterThanOrEqualTo as go, close as gr, isObject as gs, onError as gt, catchDefect as h, try_$2 as ha, makeSpanUnsafe as hi, isSchedule as hn, isGreaterThan as ho, addFinalizerExit as hr, isNumber as hs, never as ht, all as i, sort as ia, fiberInterruptAllAs as ii, when as in, liftThrowable as io, merge as ir, isBigInt as is, logWarning as it, exit as j, Service as ja, decodeBase64UrlString as ji, TimeoutError as jn, exitSucceed as jo, makeUnsafe$1 as jr, identity as js, retry as jt, effectify as k, zero as ka, ParentSpan as ki, NoSuchElementError as kn, exitFail as ko, isDone$1 as kr, dual as ks, request as kt, asSome as l, getOrThrow as la, forkUnsafe$1 as li, withSpan as ln, orElseSome as lo, provideMerge as lr, isNever as ls, mapError as lt, catchCause as m, succeed$4 as ma, makeLatchUnsafe as mi, exponential as mn, Number$1 as mo, addFinalizer$1 as mr, isNullish as ms, matchEffect as mt, acquireUseRelease as n, of as na, fiberInterrupt as ni, useSpan as nn, isOption as no, empty as nr, symbol$1 as ns, logFatal as nt, annotateCurrentSpan as o, headUnsafe as oa, fiberJoin as oi, withFiber as on, match$5 as oo, mock as or, isError as os, map as ot, callback as p, match$3 as pa, makeLatch as pi, TaggedClass as pn, Date$1 as po, Scope as pr, isNull as ps, matchCauseEffect as pt, fromOption as q, flatten$3 as qa, headNonEmpty as qi, makeFailReason as qn, byReferenceUnsafe as qo, contextWith$1 as qr, timeout as qt, addFinalizer as r, reduce as ra, fiberInterruptAll as ri, void_ as rn, isSome as ro, fresh as rr, hasProperty as rs, logInfo as rt, annotateLogs as s, fail$4 as sa, fiberRunIn as si, withLogSpan as sn, none as so, orDie$1 as sr, isFunction as ss, mapBothEager as st, acquireRelease as t, match$2 as ta, fiberAwait as ti, updateService as tn, isNone as to, effectDiscard as tr, structure as ts, logError as tt, asVoid as u, getOrUndefined as ua, getCurrentFiber as ui, yieldNow as un, some as uo, succeed$1 as ur, isNotNull as us, mapErrorEager as ut, catchIf as v, infinity as va, onExitPrimitive$1 as vi, passthrough as vn, isLessThanOrEqualTo as vo, make as vr, isPropertyKey as vs, onExitPrimitive as vt, clockWith as w, nanos as wa, sync$1 as wi, matchEffect$1 as wn, Done$1 as wo, _await as wr, constFalse as ws, provide as wt, catchTag as x, isZero as xa, succeed$3 as xi, doneExitFromCause as xn, make$5 as xo, CurrentLogAnnotations as xr, isUndefined as xs, orDie as xt, catchNoSuchElement as y, isDuration as ya, resolveConcurrency as yi, spaced as yn, make$4 as yo, makeUnsafe as yr, isString as ys, onInterrupt as yt, fn as z, make$3 as za, append as zi, hasInterrupts as zn, toJson as zo, succeed$2 as zr, serviceOption as zt };
4756
+ export { isEffect as $, map$5 as $a, headUnsafe as $i, buildWithScope as $n, symbol$1 as $o, exitInterrupt as $r, uninterruptibleMask as $t, ensuring as A, getOrUndefined$1 as Aa, ParentSpan as Ai, StackTrace as An, assignProperty as Ao, isDone$1 as Ar, memoizeIdempotent as As, result as At, fnUntraced as B, flatMapNullishOr$1 as Ba, headNonEmpty as Bi, hasInterrupts as Bn, formatPath as Bo, succeed$2 as Br, sleep as Bt, catch_ as C, zero as Ca, succeedNone$1 as Ci, isDoneCause as Cn, args as Co, MinimumLogLevel as Cr, constUndefined as Cs, promise as Ct, delay as D, empty$3 as Da, updateContext$1 as Di, Done as Dn, exitSucceed as Do, doneUnsafe as Dr, flow as Ds, raceFirst as Dt, contextWith as E, add as Ea, uninterruptibleMask$1 as Ei, nextBetween as En, exitFailCause as Eo, done$1 as Er, dual as Es, provideService as Et, filterOrFail as F, merge$1 as Fa, findFirst as Fi, done as Fn, NodeInspectSymbol as Fo, failCause$2 as Fr, runSyncExit as Ft, forkIn as G, getOrElse$1 as Ga, last as Gi, isReason as Gn, equals$1 as Go, andThen$1 as Gr, tap as Gt, forEach as H, fromNullOr as Ha, isCanonicalArrayIndex as Hi, interruptors as Hn, redact as Ho, ClockRef as Hr, succeedNone as Ht, flatMap as I, all$2 as Ia, findFirstIndex as Ii, fail$1 as In, toJson as Io, interrupt$1 as Ir, scope as It, fromResult as J, getOrUndefined$2 as Ja, match$2 as Ji, makeFailReason as Jn, combine as Jo, contextWith$1 as Jr, timeoutOrElse as Jt, forkScoped as K, getOrNull as Ka, makeEquivalence as Ki, isTimeoutError as Kn, symbol as Ko, asSome$1 as Kr, tapCause as Kt, flatMapEager as L, exists as La, findLast as Li, filterInterruptors as Ln, format$1 as Lo, isExit as Lr, scoped as Lt, fail as M, getUnsafe$1 as Ma, append as Mi, UnknownError as Mn, setStackTraceLimit as Mo, makeUnsafe$1 as Mr, Class$2 as Ms, runFork as Mt, failCause as N, make$3 as Na, appendAll as Ni, annotate as Nn, BaseProto as No, die$2 as Nr, Prototype$1 as Ns, runForkWith as Nt, die as O, get as Oa, void_$2 as Oi, IllegalArgumentError as On, withFiber$1 as Oo, interruptWith as Or, identity as Os, repeat as Ot, failCauseSync as P, makeUnsafe$2 as Pa, empty$1 as Pi, die$1 as Pn, Class$1 as Po, fail$2 as Pr, pipeArguments as Ps, runSync as Pt, interruptible as Q, liftThrowable as Qa, empty$2 as Qi, squash as Qn, structure as Qo, exitHasInterrupts as Qr, uninterruptible as Qt, flatten as R, filter as Ra, flatMapNullishOr as Ri, findError as Rn, formatDate as Ro, isFailure as Rr, scopedWith as Rt, catchTags as S, toSeconds as Sa, succeed$3 as Si, filterDone as Sn, TaggedError as So, CurrentLogAnnotations as Sr, constTrue as Ss, orElseSucceed as St, context as T, Service as Ta, sync$1 as Ti, Random as Tn, exitFail as To, _await as Tr, constant as Ts, provideContext as Tt, forever as U, fromNullishOr$1 as Ua, isReadonlyArrayNonEmpty as Ui, isCause as Un, symbolRedactable as Uo, ConsoleRef as Ur, suspend as Ut, fnUntracedEager as V, flatten$3 as Va, isArrayNonEmpty as Vi, hasInterruptsOnly as Vn, formatPropertyKey as Vo, void_$1 as Vr, succeed as Vt, forkChild as W, fromUndefinedOr as Wa, join as Wi, isFailReason as Wn, byReferenceUnsafe as Wo, LogToStderr as Wr, sync as Wt, ignore as X, isOption as Xa, reduce as Xi, map$1 as Xn, number as Xo, effectIsExit as Xr, try_ as Xt, gen as Y, isNone as Ya, of as Yi, makeInterruptReason as Yn, hash as Yo, currentTimeMillis as Yr, tryPromise as Yt, interrupt as Z, isSome as Za, sort as Zi, pretty as Zn, string as Zo, endSpan as Zr, undefined_ as Zt, catchFilter as _, minutes as _a, map$2 as _i, min as _n, strictEqual as _o, close as _r, isTagged as _s, onExit as _t, andThen as a, isSuccess$1 as aa, fiberInterruptAllAs as ai, whileLoop as an, toArray as ao, merge as ar, isIterable as as, makeSpanScoped as at, catchReason as b, seconds as ba, resolveConcurrency as bi, catchDone as bn, Error$1 as bo, makeUnsafe as br, or as bs, option as bt, as as c, succeed$4 as ca, fiberRunIn as ci, withParentSpan as cn, Number$1 as co, orDie$1 as cr, isNotNullish as cs, mapEager as ct, cached as d, fromInputUnsafe as da, getCurrentFiber as di, zipWith as dn, isGreaterThanOrEqualTo as do, succeed$1 as dr, isNullish as ds, match as dt, fail$4 as ea, exitVoid as ei, updateContext as en, match$5 as eo, effect as er, hasProperty as es, logDebug as et, cachedWithTTL as f, infinity as fa, iterateConcurrent as fi, Class as fn, isLessThan as fo, succeedContext as fr, isNumber as fs, matchCauseEager as ft, catchEager as g, millis as ga, makeSpanUnsafe as gi, jittered as gn, make$5 as go, addFinalizerExit as gr, isString as gs, onError as gt, catchDefect as h, isZero as ha, makeLatchUnsafe as hi, isSchedule as hn, Tuple as ho, addFinalizer$1 as hr, isPropertyKey as hs, never as ht, all as i, isFailure$1 as ia, fiberInterruptAll as ii, when as in, some as io, fresh as ir, isFunction as is, logWarning as it, exit as j, getOrUndefinedUnsafe as ja, Array$1 as ji, TimeoutError as jn, getStackTraceLimit as jo, isDoneUnsafe as jr, pipe as js, retry as jt, effectify as k, getOption as ka, DisablePropagation as ki, NoSuchElementError as kn, assignProperties as ko, into as kr, memoize as ks, request as kt, asSome as l, try_$2 as la, flatMap$2 as li, withSpan as ln, String$1 as lo, provide$2 as lr, isNotUndefined as ls, mapError as lt, catchCause as m, isFinite as ma, makeLatch as mi, exponential as mn, make$4 as mo, Scope as mr, isObjectKeyword as ms, matchEffect as mt, acquireUseRelease as n, getOrThrow as na, fiberAwait as ni, useSpan as nn, orElse as no, effectDiscard as nr, isBoolean as ns, logFatal as nt, annotateCurrentSpan as o, map$4 as oa, fiberInterruptAs as oi, withFiber as on, BigInt$1 as oo, mergeAll as or, isNever as os, map as ot, callback as p, isDuration as pa, iterateEager as pi, TaggedClass as pn, isLessThanOrEqualTo as po, unwrap as pr, isObject as ps, matchCauseEffect as pt, fromOption as q, getOrThrow$1 as qa, map$3 as qi, makeDieReason as qn, array as qo, callback$1 as qr, timeout as qt, addFinalizer as r, getOrUndefined as ra, fiberInterrupt as ri, void_ as rn, orElseSome as ro, empty as rr, isError as rs, logInfo as rt, annotateLogs as s, match$3 as sa, fiberJoin as si, withLogSpan as sn, Date$1 as so, mock as sr, isNotNull as ss, mapBothEager as st, acquireRelease as t, failVoid as ta, exitZipRight as ti, updateService as tn, none as to, effectContext as tr, isBigInt as ts, logError as tt, asVoid as u, format as ua, forkUnsafe$1 as ui, yieldNow as un, isGreaterThan as uo, provideMerge as ur, isNull as us, mapErrorEager as ut, catchIf as v, nanos as va, onExit$1 as vi, passthrough as vn, Prototype as vo, forkUnsafe as vr, isUndefined as vs, onExitPrimitive as vt, clockWith as w, Reference as wa, suspend$1 as wi, matchEffect$1 as wn, causeFail as wo, TracerTimingEnabled as wr, constVoid as ws, provide as wt, catchTag as x, toMillis as xa, scopeFinalizerCountUnsafe as xi, doneExitFromCause as xn, PipeInspectableProto as xo, provide$3 as xr, constFalse as xs, orDie as xt, catchNoSuchElement as y, negativeInfinity as ya, onExitPrimitive$1 as yi, spaced as yn, Done$1 as yo, make as yr, isUnknown as ys, onInterrupt as yt, fn as z, flatMap$4 as za, fromIterable as zi, fromReasons as zn, formatJson as zo, isSuccess as zr, serviceOption as zt };
5062
4757
 
5063
- //# sourceMappingURL=Effect-CeAMoJlg.mjs.map
4758
+ //# sourceMappingURL=Effect-BCeySOy1.mjs.map