clanka 0.8.5 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CompactionTransport.test.js +1 -1
- package/dist/CompactionTransport.test.js.map +1 -1
- package/dist/bin/{Effect-BEUn4I5E.mjs → Effect-rADALOOD.mjs} +392 -205
- package/dist/bin/Effect-rADALOOD.mjs.map +1 -0
- package/dist/bin/{McpClient-C0FVuDj2.mjs → McpClient-NazR2OwL.mjs} +4 -4
- package/dist/bin/{McpClient-C0FVuDj2.mjs.map → McpClient-NazR2OwL.mjs.map} +1 -1
- package/dist/bin/{OutputFormatter-DffD5oxX.mjs → OutputFormatter-BVHbgF2b.mjs} +3 -3
- package/dist/bin/{OutputFormatter-DffD5oxX.mjs.map → OutputFormatter-BVHbgF2b.mjs.map} +1 -1
- package/dist/bin/{Schema-CjUGw2Xh.mjs → Schema-C7NXAOWA.mjs} +640 -87
- package/dist/bin/Schema-C7NXAOWA.mjs.map +1 -0
- package/dist/bin/{SemanticSearch-CFB73IPb.mjs → SemanticSearch-4Jes3jCl.mjs} +89 -56
- package/dist/bin/SemanticSearch-4Jes3jCl.mjs.map +1 -0
- package/dist/bin/{Stream-Cu6P7ZHo.mjs → Stream-CSLA1_GD.mjs} +71 -50
- package/dist/bin/Stream-CSLA1_GD.mjs.map +1 -0
- package/dist/bin/cli.mjs +2747 -5294
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/bin/{turndown.cjs-usmCKZ4b.mjs → turndown.cjs-DK29wZw3.mjs} +2 -2
- package/dist/bin/{turndown.cjs-usmCKZ4b.mjs.map → turndown.cjs-DK29wZw3.mjs.map} +1 -1
- package/package.json +7 -7
- package/src/CompactionTransport.test.ts +1 -1
- package/dist/bin/Effect-BEUn4I5E.mjs.map +0 -1
- package/dist/bin/Schema-CjUGw2Xh.mjs.map +0 -1
- package/dist/bin/SemanticSearch-CFB73IPb.mjs.map +0 -1
- package/dist/bin/Stream-Cu6P7ZHo.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Pipeable.js
|
|
2
2
|
const pipeArguments = (self, args) => {
|
|
3
3
|
switch (args.length) {
|
|
4
4
|
case 0: return self;
|
|
@@ -27,7 +27,7 @@ const Class$2 = function() {
|
|
|
27
27
|
return PipeableBase;
|
|
28
28
|
}();
|
|
29
29
|
//#endregion
|
|
30
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
30
|
+
//#region node_modules/.pnpm/effect@4.0.4/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.
|
|
120
|
+
//#region node_modules/.pnpm/effect@4.0.4/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;
|
|
@@ -135,13 +135,13 @@ const getAllObjectKeys = (obj) => {
|
|
|
135
135
|
const byReferenceInstances = new WeakSet();
|
|
136
136
|
const viewBytes = (view) => new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
|
|
137
137
|
//#endregion
|
|
138
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
138
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/hash.js
|
|
139
139
|
let backEdges = 0;
|
|
140
140
|
const addBackEdge = () => {
|
|
141
141
|
backEdges++;
|
|
142
142
|
};
|
|
143
143
|
//#endregion
|
|
144
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
144
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Predicate.js
|
|
145
145
|
function isString(input) {
|
|
146
146
|
return typeof input === "string";
|
|
147
147
|
}
|
|
@@ -203,7 +203,7 @@ function isIterable(input) {
|
|
|
203
203
|
}
|
|
204
204
|
const or = dual(2, (self, that) => (a) => self(a) || that(a));
|
|
205
205
|
//#endregion
|
|
206
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
206
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Hash.js
|
|
207
207
|
const symbol$1 = "~effect/Hash";
|
|
208
208
|
const hash = (self) => {
|
|
209
209
|
switch (typeof self) {
|
|
@@ -255,14 +255,14 @@ const mix = (h) => {
|
|
|
255
255
|
h = Math.imul(h, 3266489909);
|
|
256
256
|
return h ^ h >>> 16;
|
|
257
257
|
};
|
|
258
|
-
const combine = dual(2, (self, b) => mix(Math.imul(self, 2654435761) + Math.imul(b, 2246822507)));
|
|
258
|
+
const combine$1 = dual(2, (self, b) => mix(Math.imul(self, 2654435761) + Math.imul(b, 2246822507)));
|
|
259
259
|
const optimize = (n) => n & 3221225471 | n >>> 1 & 1073741824;
|
|
260
260
|
const float64 = new DataView(new ArrayBuffer(8));
|
|
261
261
|
const number = (n) => {
|
|
262
262
|
const h = n | 0;
|
|
263
263
|
if (h === n) return optimize(h);
|
|
264
264
|
float64.setFloat64(0, n !== n ? NaN : n);
|
|
265
|
-
return optimize(combine(float64.getInt32(0), float64.getInt32(4)));
|
|
265
|
+
return optimize(combine$1(float64.getInt32(0), float64.getInt32(4)));
|
|
266
266
|
};
|
|
267
267
|
const string = (str) => {
|
|
268
268
|
let h = 5381, i = str.length;
|
|
@@ -271,7 +271,7 @@ const string = (str) => {
|
|
|
271
271
|
};
|
|
272
272
|
const structureKeys = (o, keys) => {
|
|
273
273
|
let h = 12289;
|
|
274
|
-
for (const key of keys) h ^= combine(hash(key), hash(o[key]));
|
|
274
|
+
for (const key of keys) h ^= combine$1(hash(key), hash(o[key]));
|
|
275
275
|
return optimize(h);
|
|
276
276
|
};
|
|
277
277
|
const structure = (o) => structureKeys(o, getAllObjectKeys(o));
|
|
@@ -282,17 +282,17 @@ const unordered = (seed, f) => (iter) => {
|
|
|
282
282
|
};
|
|
283
283
|
const array = (arr) => {
|
|
284
284
|
let h = 6151;
|
|
285
|
-
for (const element of arr) h = combine(h, hash(element));
|
|
285
|
+
for (const element of arr) h = combine$1(h, hash(element));
|
|
286
286
|
return optimize(h);
|
|
287
287
|
};
|
|
288
|
-
const hashMap = unordered(string("Map"), ([k, v]) => combine(hash(k), hash(v)));
|
|
288
|
+
const hashMap = unordered(string("Map"), ([k, v]) => combine$1(hash(k), hash(v)));
|
|
289
289
|
const setSeed = string("Set");
|
|
290
|
-
const hashSet = unordered(setSeed, (element) => combine(setSeed, hash(element)));
|
|
290
|
+
const hashSet = unordered(setSeed, (element) => combine$1(setSeed, hash(element)));
|
|
291
291
|
const randomHashCache = new WeakMap();
|
|
292
292
|
const hashCache = new WeakMap();
|
|
293
293
|
const visitedObjects = new WeakSet();
|
|
294
294
|
//#endregion
|
|
295
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
295
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Equal.js
|
|
296
296
|
const symbol = "~effect/Equal";
|
|
297
297
|
function equals$1() {
|
|
298
298
|
if (arguments.length === 1) return (self) => compareBoth(self, arguments[0]);
|
|
@@ -377,11 +377,13 @@ function compareRecords(self, that) {
|
|
|
377
377
|
}
|
|
378
378
|
function compareHashed(self, that, hashOf, equivalent) {
|
|
379
379
|
const groups = new Map();
|
|
380
|
+
let remaining = 0;
|
|
380
381
|
for (const item of that) {
|
|
381
382
|
const h = hashOf(item);
|
|
382
383
|
const group = groups.get(h);
|
|
383
384
|
if (group) group.push(item);
|
|
384
385
|
else groups.set(h, [item]);
|
|
386
|
+
remaining++;
|
|
385
387
|
}
|
|
386
388
|
outer: for (const item of self) {
|
|
387
389
|
const group = groups.get(hashOf(item));
|
|
@@ -389,12 +391,13 @@ function compareHashed(self, that, hashOf, equivalent) {
|
|
|
389
391
|
for (let i = 0; i < group.length; i++) if (equivalent(item, group[i])) {
|
|
390
392
|
group[i] = group[group.length - 1];
|
|
391
393
|
group.pop();
|
|
394
|
+
remaining--;
|
|
392
395
|
continue outer;
|
|
393
396
|
}
|
|
394
397
|
}
|
|
395
398
|
return false;
|
|
396
399
|
}
|
|
397
|
-
return
|
|
400
|
+
return remaining === 0;
|
|
398
401
|
}
|
|
399
402
|
const entryHash = (entry) => hash(entry[0]);
|
|
400
403
|
const equalEntries = (self, that) => compareBoth(self[0], that[0]) && compareBoth(self[1], that[1]);
|
|
@@ -404,7 +407,7 @@ const byReferenceUnsafe = (obj) => {
|
|
|
404
407
|
return obj;
|
|
405
408
|
};
|
|
406
409
|
//#endregion
|
|
407
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
410
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Redactable.js
|
|
408
411
|
const symbolRedactable = Symbol.for("~effect/Redactable");
|
|
409
412
|
const isRedactable = (u) => hasProperty(u, symbolRedactable);
|
|
410
413
|
function redact(u) {
|
|
@@ -426,7 +429,7 @@ const emptyContext$1 = {
|
|
|
426
429
|
}
|
|
427
430
|
};
|
|
428
431
|
//#endregion
|
|
429
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
432
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Formatter.js
|
|
430
433
|
function format$1(input, options) {
|
|
431
434
|
const space = options?.space ?? 0;
|
|
432
435
|
const ancestors = new WeakSet();
|
|
@@ -528,11 +531,32 @@ function formatJson(input, options) {
|
|
|
528
531
|
if (ancestors.includes(redacted)) return;
|
|
529
532
|
ancestors.push(redacted);
|
|
530
533
|
if (current !== redacted) ancestors.push(current);
|
|
531
|
-
return current;
|
|
534
|
+
if (!hasGetter(current) || isJsonPrimitiveWrapper(current)) return current;
|
|
535
|
+
const serialized = new Proxy(current, { get(target, key) {
|
|
536
|
+
const value = Reflect.get(target, key, target);
|
|
537
|
+
return Object.getOwnPropertyDescriptor(target, key)?.get !== void 0 ? redact(value) : value;
|
|
538
|
+
} });
|
|
539
|
+
ancestors.push(serialized);
|
|
540
|
+
return serialized;
|
|
532
541
|
}, options?.space) ?? "null";
|
|
533
542
|
}
|
|
543
|
+
function hasGetter(object) {
|
|
544
|
+
for (const key of Object.getOwnPropertyNames(object)) if (Object.getOwnPropertyDescriptor(object, key)?.get !== void 0) return true;
|
|
545
|
+
return false;
|
|
546
|
+
}
|
|
547
|
+
function isJsonPrimitiveWrapper(object) {
|
|
548
|
+
for (const valueOf of [
|
|
549
|
+
Number.prototype.valueOf,
|
|
550
|
+
Boolean.prototype.valueOf,
|
|
551
|
+
String.prototype.valueOf
|
|
552
|
+
]) try {
|
|
553
|
+
Reflect.apply(valueOf, object, []);
|
|
554
|
+
return true;
|
|
555
|
+
} catch {}
|
|
556
|
+
return false;
|
|
557
|
+
}
|
|
534
558
|
//#endregion
|
|
535
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
559
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Inspectable.js
|
|
536
560
|
const NodeInspectSymbol = Symbol.for("nodejs.util.inspect.custom");
|
|
537
561
|
const toJson = (input) => {
|
|
538
562
|
try {
|
|
@@ -572,7 +596,7 @@ var Class$1 = class {
|
|
|
572
596
|
}
|
|
573
597
|
};
|
|
574
598
|
//#endregion
|
|
575
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
599
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/stackTraceLimit.js
|
|
576
600
|
const isStackTraceLimitWritable = () => {
|
|
577
601
|
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
578
602
|
if (desc === void 0) return Object.isExtensible(Error);
|
|
@@ -584,7 +608,7 @@ const setStackTraceLimit = (value) => {
|
|
|
584
608
|
if (canWriteStackTraceLimit) Error.stackTraceLimit = value;
|
|
585
609
|
};
|
|
586
610
|
//#endregion
|
|
587
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
611
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Utils.js
|
|
588
612
|
var SingleShotGen = class {
|
|
589
613
|
constructor(self) {
|
|
590
614
|
this.value = self;
|
|
@@ -612,11 +636,16 @@ const pickInternalCall = () => {
|
|
|
612
636
|
return body();
|
|
613
637
|
} finally {}
|
|
614
638
|
} };
|
|
615
|
-
|
|
639
|
+
const limit = getStackTraceLimit();
|
|
640
|
+
if (limit === 0) return forced[InternalTypeId];
|
|
641
|
+
setStackTraceLimit(2);
|
|
642
|
+
const error = standard[InternalTypeId](() => new Error());
|
|
643
|
+
setStackTraceLimit(limit);
|
|
644
|
+
return error.stack?.includes(InternalTypeId) === true ? standard[InternalTypeId] : forced[InternalTypeId];
|
|
616
645
|
};
|
|
617
646
|
const internalCall = pickInternalCall();
|
|
618
647
|
//#endregion
|
|
619
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
648
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/record.js
|
|
620
649
|
function assignProperty(self, key, value) {
|
|
621
650
|
if (key === "__proto__") Object.defineProperty(self, key, {
|
|
622
651
|
value,
|
|
@@ -630,7 +659,7 @@ function assignProperties(self, source) {
|
|
|
630
659
|
for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProperty(self, key, source[key]);
|
|
631
660
|
}
|
|
632
661
|
//#endregion
|
|
633
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
662
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/core.js
|
|
634
663
|
const EffectTypeId = `~effect/Effect`;
|
|
635
664
|
const ExitTypeId = `~effect/Exit`;
|
|
636
665
|
const effectVariance = {
|
|
@@ -776,7 +805,7 @@ var Fail = class extends ReasonBase {
|
|
|
776
805
|
return isFailReason$1(that) && equals$1(this.error, that.error) && equals$1(this.annotations, that.annotations);
|
|
777
806
|
}
|
|
778
807
|
[symbol$1]() {
|
|
779
|
-
return combine(string(this._tag))(combine(hash(this.error))(hash(this.annotations)));
|
|
808
|
+
return combine$1(string(this._tag))(combine$1(hash(this.error))(hash(this.annotations)));
|
|
780
809
|
}
|
|
781
810
|
};
|
|
782
811
|
const causeFromReasons = (reasons) => new CauseImpl(reasons);
|
|
@@ -784,9 +813,9 @@ const dedupeReasons = (self, that) => {
|
|
|
784
813
|
const buckets = new Map();
|
|
785
814
|
const out = [];
|
|
786
815
|
for (const reason of self.concat(that)) {
|
|
787
|
-
const hash$
|
|
788
|
-
const bucket = buckets.get(hash$
|
|
789
|
-
if (bucket === void 0) buckets.set(hash$
|
|
816
|
+
const hash$6 = hash(reason);
|
|
817
|
+
const bucket = buckets.get(hash$6);
|
|
818
|
+
if (bucket === void 0) buckets.set(hash$6, [reason]);
|
|
790
819
|
else if (bucket.some((previous) => equals$1(previous, reason))) continue;
|
|
791
820
|
else bucket.push(reason);
|
|
792
821
|
out.push(reason);
|
|
@@ -816,10 +845,10 @@ var Die = class extends ReasonBase {
|
|
|
816
845
|
};
|
|
817
846
|
}
|
|
818
847
|
[symbol](that) {
|
|
819
|
-
return isDieReason(that) && equals$1(this.defect, that.defect) && equals$1(this.annotations, that.annotations);
|
|
848
|
+
return isDieReason$1(that) && equals$1(this.defect, that.defect) && equals$1(this.annotations, that.annotations);
|
|
820
849
|
}
|
|
821
850
|
[symbol$1]() {
|
|
822
|
-
return combine(string(this._tag))(combine(hash(this.defect))(hash(this.annotations)));
|
|
851
|
+
return combine$1(string(this._tag))(combine$1(hash(this.defect))(hash(this.annotations)));
|
|
823
852
|
}
|
|
824
853
|
};
|
|
825
854
|
const causeDie = (defect) => new CauseImpl([new Die(defect)]);
|
|
@@ -828,7 +857,7 @@ const causeAnnotate = dual((args) => isCause$1(args[0]), (self, annotations, opt
|
|
|
828
857
|
return new CauseImpl(self.reasons.map((f) => f.annotate(annotations, options)));
|
|
829
858
|
});
|
|
830
859
|
const isFailReason$1 = (self) => self._tag === "Fail";
|
|
831
|
-
const isDieReason = (self) => self._tag === "Die";
|
|
860
|
+
const isDieReason$1 = (self) => self._tag === "Die";
|
|
832
861
|
const isInterruptReason = (self) => self._tag === "Interrupt";
|
|
833
862
|
function defaultEvaluate(_fiber) {
|
|
834
863
|
return exitDie(`Effect.evaluate: Not implemented`);
|
|
@@ -873,7 +902,7 @@ const makeExit = (options) => {
|
|
|
873
902
|
return isExit$1(that) && that._tag === this._tag && equals$1(this[args], that[args]);
|
|
874
903
|
},
|
|
875
904
|
[symbol$1]() {
|
|
876
|
-
return combine(string(options.op), hash(this[args]));
|
|
905
|
+
return combine$1(string(options.op), hash(this[args]));
|
|
877
906
|
}
|
|
878
907
|
};
|
|
879
908
|
const ExitPrimitive = function(value) {
|
|
@@ -996,35 +1025,35 @@ const done$2 = (value) => {
|
|
|
996
1025
|
return exitFail(Done$1(value));
|
|
997
1026
|
};
|
|
998
1027
|
//#endregion
|
|
999
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1028
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Effectable.js
|
|
1000
1029
|
const Prototype = (options) => makePrimitiveProto({
|
|
1001
1030
|
op: options.label,
|
|
1002
1031
|
[evaluate]: options.evaluate
|
|
1003
1032
|
});
|
|
1004
1033
|
//#endregion
|
|
1005
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1006
|
-
const make$
|
|
1034
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Equivalence.js
|
|
1035
|
+
const make$6 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
1007
1036
|
const isStrictEquivalent = (x, y) => x === y;
|
|
1008
1037
|
const strictEqual = () => isStrictEquivalent;
|
|
1009
1038
|
function Tuple(elements) {
|
|
1010
|
-
return make$
|
|
1039
|
+
return make$6((self, that) => {
|
|
1011
1040
|
if (self.length !== that.length) return false;
|
|
1012
1041
|
for (let i = 0; i < self.length; i++) if (!elements[i](self[i], that[i])) return false;
|
|
1013
1042
|
return true;
|
|
1014
1043
|
});
|
|
1015
1044
|
}
|
|
1016
1045
|
function Array_(item) {
|
|
1017
|
-
return make$
|
|
1046
|
+
return make$6((self, that) => {
|
|
1018
1047
|
if (self.length !== that.length) return false;
|
|
1019
1048
|
for (let i = 0; i < self.length; i++) if (!item(self[i], that[i])) return false;
|
|
1020
1049
|
return true;
|
|
1021
1050
|
});
|
|
1022
1051
|
}
|
|
1023
1052
|
//#endregion
|
|
1024
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1025
|
-
const TypeId$
|
|
1053
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/option.js
|
|
1054
|
+
const TypeId$8 = "~effect/Option";
|
|
1026
1055
|
const CommonProto$1 = {
|
|
1027
|
-
[TypeId$
|
|
1056
|
+
[TypeId$8]: { _A: (_) => _ },
|
|
1028
1057
|
...PipeInspectableProto,
|
|
1029
1058
|
[Symbol.iterator]() {
|
|
1030
1059
|
return new SingleShotGen(this);
|
|
@@ -1037,7 +1066,7 @@ const SomeProto = Object.defineProperty(Object.assign(Object.create(CommonProto$
|
|
|
1037
1066
|
return isOption$1(that) && isSome$1(that) && equals$1(this.value, that.value);
|
|
1038
1067
|
},
|
|
1039
1068
|
[symbol$1]() {
|
|
1040
|
-
return combine(hash(this._tag))(hash(this.value));
|
|
1069
|
+
return combine$1(hash(this._tag))(hash(this.value));
|
|
1041
1070
|
},
|
|
1042
1071
|
toString() {
|
|
1043
1072
|
return `some(${format$1(this.value)})`;
|
|
@@ -1073,7 +1102,7 @@ const NoneProto = Object.assign(Object.create(CommonProto$1), {
|
|
|
1073
1102
|
};
|
|
1074
1103
|
}
|
|
1075
1104
|
});
|
|
1076
|
-
const isOption$1 = (input) => hasProperty(input, TypeId$
|
|
1105
|
+
const isOption$1 = (input) => hasProperty(input, TypeId$8);
|
|
1077
1106
|
const isNone$1 = (fa) => fa._tag === "None";
|
|
1078
1107
|
const isSome$1 = (fa) => fa._tag === "Some";
|
|
1079
1108
|
const none$1 = Object.create(NoneProto);
|
|
@@ -1083,10 +1112,10 @@ const SomeImpl = function(value) {
|
|
|
1083
1112
|
SomeImpl.prototype = SomeProto;
|
|
1084
1113
|
const some$1 = (value) => new SomeImpl(value);
|
|
1085
1114
|
//#endregion
|
|
1086
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1087
|
-
const TypeId$
|
|
1115
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/result.js
|
|
1116
|
+
const TypeId$7 = "~effect/Result";
|
|
1088
1117
|
const CommonProto = {
|
|
1089
|
-
[TypeId$
|
|
1118
|
+
[TypeId$7]: {
|
|
1090
1119
|
_A: (_) => _,
|
|
1091
1120
|
_E: (_) => _
|
|
1092
1121
|
},
|
|
@@ -1102,7 +1131,7 @@ const SuccessProto = Object.assign(Object.create(CommonProto), {
|
|
|
1102
1131
|
return isResult(that) && isSuccess$2(that) && equals$1(this.success, that.success);
|
|
1103
1132
|
},
|
|
1104
1133
|
[symbol$1]() {
|
|
1105
|
-
return combine(hash(this._tag))(hash(this.success));
|
|
1134
|
+
return combine$1(hash(this._tag))(hash(this.success));
|
|
1106
1135
|
},
|
|
1107
1136
|
toString() {
|
|
1108
1137
|
return `success(${format$1(this.success)})`;
|
|
@@ -1122,7 +1151,7 @@ const FailureProto = Object.assign(Object.create(CommonProto), {
|
|
|
1122
1151
|
return isResult(that) && isFailure$2(that) && equals$1(this.failure, that.failure);
|
|
1123
1152
|
},
|
|
1124
1153
|
[symbol$1]() {
|
|
1125
|
-
return combine(hash(this._tag))(hash(this.failure));
|
|
1154
|
+
return combine$1(hash(this._tag))(hash(this.failure));
|
|
1126
1155
|
},
|
|
1127
1156
|
toString() {
|
|
1128
1157
|
return `failure(${format$1(this.failure)})`;
|
|
@@ -1135,7 +1164,7 @@ const FailureProto = Object.assign(Object.create(CommonProto), {
|
|
|
1135
1164
|
};
|
|
1136
1165
|
}
|
|
1137
1166
|
});
|
|
1138
|
-
const isResult = (input) => hasProperty(input, TypeId$
|
|
1167
|
+
const isResult = (input) => hasProperty(input, TypeId$7);
|
|
1139
1168
|
const isFailure$2 = (result) => result._tag === "Failure";
|
|
1140
1169
|
const isSuccess$2 = (result) => result._tag === "Success";
|
|
1141
1170
|
const FailureImpl = function(failure) {
|
|
@@ -1149,27 +1178,28 @@ const SuccessImpl = function(success) {
|
|
|
1149
1178
|
SuccessImpl.prototype = SuccessProto;
|
|
1150
1179
|
const succeed$5 = (success) => new SuccessImpl(success);
|
|
1151
1180
|
//#endregion
|
|
1152
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1153
|
-
function make$
|
|
1181
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Order.js
|
|
1182
|
+
function make$5(compare) {
|
|
1154
1183
|
return (self, that) => self === that ? 0 : compare(self, that);
|
|
1155
1184
|
}
|
|
1156
|
-
const String$1 = make$
|
|
1157
|
-
const Number$1 = make$
|
|
1185
|
+
const String$1 = make$5((self, that) => self < that ? -1 : 1);
|
|
1186
|
+
const Number$1 = make$5((self, that) => {
|
|
1158
1187
|
if (globalThis.Number.isNaN(self) && globalThis.Number.isNaN(that)) return 0;
|
|
1159
1188
|
if (globalThis.Number.isNaN(self)) return -1;
|
|
1160
1189
|
if (globalThis.Number.isNaN(that)) return 1;
|
|
1161
1190
|
return self < that ? -1 : 1;
|
|
1162
1191
|
});
|
|
1163
|
-
const BigInt$1 = make$
|
|
1164
|
-
const mapInput = dual(2, (self, f) => make$
|
|
1192
|
+
const BigInt$1 = make$5((self, that) => self < that ? -1 : 1);
|
|
1193
|
+
const mapInput = dual(2, (self, f) => make$5((b1, b2) => self(f(b1), f(b2))));
|
|
1165
1194
|
const Date$1 = mapInput(Number$1, (date) => date.getTime());
|
|
1166
1195
|
const isLessThan = (O) => dual(2, (self, that) => O(self, that) === -1);
|
|
1167
1196
|
const isGreaterThan = (O) => dual(2, (self, that) => O(self, that) === 1);
|
|
1168
1197
|
const isLessThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== 1);
|
|
1169
1198
|
const isGreaterThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== -1);
|
|
1170
1199
|
const min$2 = (O) => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that);
|
|
1200
|
+
const max$1 = (O) => dual(2, (self, that) => self === that || O(self, that) > -1 ? self : that);
|
|
1171
1201
|
//#endregion
|
|
1172
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1202
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Option.js
|
|
1173
1203
|
const none = () => none$1;
|
|
1174
1204
|
const some = some$1;
|
|
1175
1205
|
const isOption = isOption$1;
|
|
@@ -1197,9 +1227,9 @@ const getOrThrowWith$1 = dual(2, (self, onNone) => {
|
|
|
1197
1227
|
});
|
|
1198
1228
|
const getOrThrow$1 = getOrThrowWith$1(() => new Error("getOrThrow called on a None"));
|
|
1199
1229
|
const map$5 = dual(2, (self, f) => isNone(self) ? none() : some(f(self.value)));
|
|
1200
|
-
const flatMap$
|
|
1230
|
+
const flatMap$5 = dual(2, (self, f) => isNone(self) ? none() : f(self.value));
|
|
1201
1231
|
const flatMapNullishOr$1 = dual(2, (self, f) => isNone(self) ? none() : fromNullishOr$1(f(self.value)));
|
|
1202
|
-
const flatten$3 = flatMap$
|
|
1232
|
+
const flatten$3 = flatMap$5(identity);
|
|
1203
1233
|
const all$2 = (input) => {
|
|
1204
1234
|
if (Symbol.iterator in input) {
|
|
1205
1235
|
const out = [];
|
|
@@ -1221,7 +1251,7 @@ const toArray = (self) => isNone(self) ? [] : [self.value];
|
|
|
1221
1251
|
const filter = dual(2, (self, predicate) => isNone(self) ? none() : predicate(self.value) ? some(self.value) : none());
|
|
1222
1252
|
const exists = dual(2, (self, refinement) => isNone(self) ? false : refinement(self.value));
|
|
1223
1253
|
//#endregion
|
|
1224
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1254
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Context.js
|
|
1225
1255
|
const ServiceTypeId = "~effect/Context/Service";
|
|
1226
1256
|
const Service = function() {
|
|
1227
1257
|
function KeyClass() {}
|
|
@@ -1244,7 +1274,7 @@ const ServiceProto = {
|
|
|
1244
1274
|
...Prototype({
|
|
1245
1275
|
label: "Service",
|
|
1246
1276
|
evaluate(fiber) {
|
|
1247
|
-
return exitSucceed(get(fiber.context, this));
|
|
1277
|
+
return exitSucceed(get$1(fiber.context, this));
|
|
1248
1278
|
}
|
|
1249
1279
|
}),
|
|
1250
1280
|
toJSON() {
|
|
@@ -1257,18 +1287,18 @@ const ServiceProto = {
|
|
|
1257
1287
|
return self;
|
|
1258
1288
|
},
|
|
1259
1289
|
context(self) {
|
|
1260
|
-
return make$
|
|
1290
|
+
return make$4(this, self);
|
|
1261
1291
|
},
|
|
1262
1292
|
use(f) {
|
|
1263
|
-
return withFiber$1((fiber) => f(get(fiber.context, this)));
|
|
1293
|
+
return withFiber$1((fiber) => f(get$1(fiber.context, this)));
|
|
1264
1294
|
},
|
|
1265
1295
|
useSync(f) {
|
|
1266
|
-
return withFiber$1((fiber) => exitSucceed(f(get(fiber.context, this))));
|
|
1296
|
+
return withFiber$1((fiber) => exitSucceed(f(get$1(fiber.context, this))));
|
|
1267
1297
|
}
|
|
1268
1298
|
};
|
|
1269
1299
|
const cacheKeys = new Set();
|
|
1270
1300
|
const ReferenceTypeId = "~effect/Context/Reference";
|
|
1271
|
-
const TypeId$
|
|
1301
|
+
const TypeId$6 = "~effect/Context";
|
|
1272
1302
|
const MaxDepth = 8;
|
|
1273
1303
|
const FlattenAfterBaseHits = 8;
|
|
1274
1304
|
const makeImpl = (cacheRoot, base, overlay, depth) => {
|
|
@@ -1317,7 +1347,7 @@ const Proto = {
|
|
|
1317
1347
|
return flatten$2(this);
|
|
1318
1348
|
},
|
|
1319
1349
|
...PipeInspectableProto,
|
|
1320
|
-
[TypeId$
|
|
1350
|
+
[TypeId$6]: { _Services: (_) => _ },
|
|
1321
1351
|
toJSON() {
|
|
1322
1352
|
return {
|
|
1323
1353
|
_id: "Context",
|
|
@@ -1340,17 +1370,18 @@ const Proto = {
|
|
|
1340
1370
|
}
|
|
1341
1371
|
};
|
|
1342
1372
|
const hasSameCache = (self, that) => self.cacheRoot === that.cacheRoot;
|
|
1343
|
-
const isContext = (u) => hasProperty(u, TypeId$
|
|
1373
|
+
const isContext = (u) => hasProperty(u, TypeId$6);
|
|
1344
1374
|
const isReference = (u) => !!u[ReferenceTypeId];
|
|
1345
|
-
const empty$
|
|
1375
|
+
const empty$4 = () => emptyContext;
|
|
1346
1376
|
const emptyContext = makeUnsafe$2(new Map());
|
|
1347
|
-
const make$
|
|
1377
|
+
const make$4 = (key, service) => makeUnsafe$2(new Map([[key.key, service]]));
|
|
1348
1378
|
const add = dual(3, (self, key, service) => addUnsafe(self, key.key, service));
|
|
1349
1379
|
const addUnsafe = (self, key, service) => {
|
|
1350
1380
|
const impl = self;
|
|
1351
1381
|
const cacheRoot = cacheKeys.has(key) ? void 0 : impl.cacheRoot;
|
|
1352
1382
|
if (impl.depth >= MaxDepth) {
|
|
1353
|
-
const map = new Map(impl.
|
|
1383
|
+
const map = new Map(impl._flat ?? impl.base);
|
|
1384
|
+
if (!impl._flat) applyOverlays(map, impl.overlay);
|
|
1354
1385
|
map.set(key, service);
|
|
1355
1386
|
return makeImpl(cacheRoot, map, void 0, 0);
|
|
1356
1387
|
}
|
|
@@ -1373,7 +1404,7 @@ const getUnsafe$1 = dual(2, (self, service) => {
|
|
|
1373
1404
|
}
|
|
1374
1405
|
return value;
|
|
1375
1406
|
});
|
|
1376
|
-
const get = getUnsafe$1;
|
|
1407
|
+
const get$1 = getUnsafe$1;
|
|
1377
1408
|
const defaultValueCacheKey = "~effect/Context/defaultValue";
|
|
1378
1409
|
const getDefaultValue = (ref) => {
|
|
1379
1410
|
if (defaultValueCacheKey in ref) return ref[defaultValueCacheKey];
|
|
@@ -1407,8 +1438,8 @@ const mergeAll$1 = (...ctxs) => {
|
|
|
1407
1438
|
};
|
|
1408
1439
|
const Reference = Service;
|
|
1409
1440
|
//#endregion
|
|
1410
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1411
|
-
const TypeId$
|
|
1441
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Duration.js
|
|
1442
|
+
const TypeId$5 = "~effect/Duration";
|
|
1412
1443
|
const bigint0$1 = BigInt(0);
|
|
1413
1444
|
const bigint1 = BigInt(1);
|
|
1414
1445
|
const bigint2 = BigInt(2);
|
|
@@ -1417,8 +1448,9 @@ const bigint24 = BigInt(24);
|
|
|
1417
1448
|
const bigint60 = BigInt(60);
|
|
1418
1449
|
const bigint1e3 = BigInt(1e3);
|
|
1419
1450
|
const bigint1e6 = BigInt(1e6);
|
|
1420
|
-
const roundTiesAwayFromZero = (input) => BigInt(
|
|
1451
|
+
const roundTiesAwayFromZero = (input) => BigInt(Math.sign(input) * Math.round(Math.abs(input)));
|
|
1421
1452
|
const roundMillisToNanos = (millis) => roundTiesAwayFromZero(millis * 1e6);
|
|
1453
|
+
const fromNanosNumber = (nanos) => make$3(Number.isFinite(nanos) ? roundTiesAwayFromZero(nanos) : nanos);
|
|
1422
1454
|
const parseNanos = (input, scale) => {
|
|
1423
1455
|
const decimalIndex = input.indexOf(".");
|
|
1424
1456
|
if (decimalIndex === -1) return BigInt(input) * scale;
|
|
@@ -1426,8 +1458,12 @@ const parseNanos = (input, scale) => {
|
|
|
1426
1458
|
const fractional = input.slice(decimalIndex + 1);
|
|
1427
1459
|
const fractionalScale = bigint10 ** BigInt(fractional.length);
|
|
1428
1460
|
const scaled = (BigInt(input.slice(isNegative ? 1 : 0, decimalIndex)) * fractionalScale + BigInt(fractional)) * scale;
|
|
1429
|
-
|
|
1430
|
-
|
|
1461
|
+
return divideTiesAwayFromZero(isNegative ? -scaled : scaled, fractionalScale);
|
|
1462
|
+
};
|
|
1463
|
+
const divideTiesAwayFromZero = (numerator, denominator) => {
|
|
1464
|
+
const absolute = numerator < bigint0$1 ? -numerator : numerator;
|
|
1465
|
+
const rounded = absolute / denominator + (absolute % denominator * bigint2 >= denominator ? bigint1 : bigint0$1);
|
|
1466
|
+
return numerator < bigint0$1 ? -rounded : rounded;
|
|
1431
1467
|
};
|
|
1432
1468
|
const DURATION_REGEXP = /^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/;
|
|
1433
1469
|
const fromInputUnsafe = (input) => {
|
|
@@ -1461,13 +1497,13 @@ const fromInputUnsafe = (input) => {
|
|
|
1461
1497
|
}
|
|
1462
1498
|
case "object": {
|
|
1463
1499
|
if (input === null) break;
|
|
1464
|
-
if (TypeId$
|
|
1500
|
+
if (TypeId$5 in input) return input;
|
|
1465
1501
|
if (Array.isArray(input)) {
|
|
1466
1502
|
if (input.length !== 2 || !input.every(isNumber)) return invalid(input);
|
|
1467
1503
|
if (Number.isNaN(input[0]) || Number.isNaN(input[1])) return zero;
|
|
1468
1504
|
if (input[0] === -Infinity || input[1] === -Infinity) return negativeInfinity;
|
|
1469
1505
|
if (input[0] === Infinity || input[1] === Infinity) return infinity;
|
|
1470
|
-
return
|
|
1506
|
+
return fromNanosNumber(input[0] * 1e9 + input[1]);
|
|
1471
1507
|
}
|
|
1472
1508
|
const obj = input;
|
|
1473
1509
|
let millis = 0;
|
|
@@ -1477,8 +1513,8 @@ const fromInputUnsafe = (input) => {
|
|
|
1477
1513
|
if (obj.minutes) millis += obj.minutes * 6e4;
|
|
1478
1514
|
if (obj.seconds) millis += obj.seconds * 1e3;
|
|
1479
1515
|
if (obj.milliseconds) millis += obj.milliseconds;
|
|
1480
|
-
if (!obj.microseconds && !obj.nanoseconds) return make$
|
|
1481
|
-
return
|
|
1516
|
+
if (!obj.microseconds && !obj.nanoseconds) return make$3(millis);
|
|
1517
|
+
return fromNanosNumber(millis * 1e6 + (obj.microseconds ?? 0) * 1e3 + (obj.nanoseconds ?? 0));
|
|
1482
1518
|
}
|
|
1483
1519
|
}
|
|
1484
1520
|
return invalid(input);
|
|
@@ -1493,7 +1529,7 @@ const zeroDurationValue = {
|
|
|
1493
1529
|
const infinityDurationValue = { _tag: "Infinity" };
|
|
1494
1530
|
const negativeInfinityDurationValue = { _tag: "NegativeInfinity" };
|
|
1495
1531
|
const DurationProto = {
|
|
1496
|
-
[TypeId$
|
|
1532
|
+
[TypeId$5]: TypeId$5,
|
|
1497
1533
|
[symbol$1]() {
|
|
1498
1534
|
switch (this.value._tag) {
|
|
1499
1535
|
case "Millis": {
|
|
@@ -1544,7 +1580,7 @@ const DurationProto = {
|
|
|
1544
1580
|
return pipeArguments(this, arguments);
|
|
1545
1581
|
}
|
|
1546
1582
|
};
|
|
1547
|
-
const make$
|
|
1583
|
+
const make$3 = (input) => {
|
|
1548
1584
|
const duration = Object.create(DurationProto);
|
|
1549
1585
|
if (typeof input === "number") {
|
|
1550
1586
|
if (isNaN(input) || input === 0 || Object.is(input, -0)) duration.value = zeroDurationValue;
|
|
@@ -1564,7 +1600,7 @@ const make$2 = (input) => {
|
|
|
1564
1600
|
};
|
|
1565
1601
|
return duration;
|
|
1566
1602
|
};
|
|
1567
|
-
const isDuration = (u) => hasProperty(u, TypeId$
|
|
1603
|
+
const isDuration = (u) => hasProperty(u, TypeId$5);
|
|
1568
1604
|
const isFinite = (self) => self.value._tag !== "Infinity" && self.value._tag !== "NegativeInfinity";
|
|
1569
1605
|
const isZero = (self) => {
|
|
1570
1606
|
switch (self.value._tag) {
|
|
@@ -1586,20 +1622,20 @@ const abs = (self) => {
|
|
|
1586
1622
|
switch (self.value._tag) {
|
|
1587
1623
|
case "Infinity":
|
|
1588
1624
|
case "NegativeInfinity": return infinity;
|
|
1589
|
-
case "Millis": return self.value.millis < 0 ? make$
|
|
1590
|
-
case "Nanos": return self.value.nanos < bigint0$1 ? make$
|
|
1591
|
-
}
|
|
1592
|
-
};
|
|
1593
|
-
const zero = make$
|
|
1594
|
-
const infinity = make$
|
|
1595
|
-
const negativeInfinity = make$
|
|
1596
|
-
const nanos = (nanos) => make$
|
|
1597
|
-
const millis = (millis) => make$
|
|
1598
|
-
const seconds = (seconds) => make$
|
|
1599
|
-
const minutes = (minutes) => make$
|
|
1600
|
-
const hours = (hours) => make$
|
|
1601
|
-
const days = (days) => make$
|
|
1602
|
-
const weeks = (weeks) => make$
|
|
1625
|
+
case "Millis": return self.value.millis < 0 ? make$3(-self.value.millis) : self;
|
|
1626
|
+
case "Nanos": return self.value.nanos < bigint0$1 ? make$3(-self.value.nanos) : self;
|
|
1627
|
+
}
|
|
1628
|
+
};
|
|
1629
|
+
const zero = make$3(0);
|
|
1630
|
+
const infinity = make$3(Infinity);
|
|
1631
|
+
const negativeInfinity = make$3(-Infinity);
|
|
1632
|
+
const nanos = (nanos) => make$3(nanos);
|
|
1633
|
+
const millis = (millis) => make$3(millis);
|
|
1634
|
+
const seconds = (seconds) => make$3(seconds * 1e3);
|
|
1635
|
+
const minutes = (minutes) => make$3(minutes * 6e4);
|
|
1636
|
+
const hours = (hours) => make$3(hours * 36e5);
|
|
1637
|
+
const days = (days) => make$3(days * 864e5);
|
|
1638
|
+
const weeks = (weeks) => make$3(weeks * 6048e5);
|
|
1603
1639
|
const toMillis = (self) => match$4(fromInputUnsafe(self), {
|
|
1604
1640
|
onMillis: identity,
|
|
1605
1641
|
onNanos: (nanos) => Number(nanos) / 1e6,
|
|
@@ -1634,7 +1670,7 @@ const matchPair = dual(3, (self, that, options) => {
|
|
|
1634
1670
|
if (self.value._tag === "Millis") return that.value._tag === "Millis" ? options.onMillis(self.value.millis, that.value.millis) : options.onNanos(toNanosUnsafe(self), that.value.nanos);
|
|
1635
1671
|
else return options.onNanos(self.value.nanos, toNanosUnsafe(that));
|
|
1636
1672
|
});
|
|
1637
|
-
const Order = make$
|
|
1673
|
+
const Order = make$5((self, that) => matchPair(self, that, {
|
|
1638
1674
|
onMillis: (self, that) => self < that ? -1 : self > that ? 1 : 0,
|
|
1639
1675
|
onNanos: (self, that) => self < that ? -1 : self > that ? 1 : 0,
|
|
1640
1676
|
onInfinity: (self, that) => {
|
|
@@ -1651,6 +1687,7 @@ const Equivalence = (self, that) => matchPair(self, that, {
|
|
|
1651
1687
|
onInfinity: (self, that) => self.value._tag === that.value._tag
|
|
1652
1688
|
});
|
|
1653
1689
|
const min$1 = min$2(Order);
|
|
1690
|
+
const max = max$1(Order);
|
|
1654
1691
|
const equals = dual(2, (self, that) => Equivalence(self, that));
|
|
1655
1692
|
const parts = (self) => {
|
|
1656
1693
|
if (self.value._tag === "Infinity") return {
|
|
@@ -1703,10 +1740,10 @@ const format = (self) => {
|
|
|
1703
1740
|
return pieces.join(" ");
|
|
1704
1741
|
};
|
|
1705
1742
|
//#endregion
|
|
1706
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1743
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/array.js
|
|
1707
1744
|
const isArrayNonEmpty$1 = (self) => self.length > 0;
|
|
1708
1745
|
//#endregion
|
|
1709
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1746
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Result.js
|
|
1710
1747
|
const succeed$4 = succeed$5;
|
|
1711
1748
|
const fail$4 = fail$5;
|
|
1712
1749
|
const failVoid = fail$4(void 0);
|
|
@@ -1733,8 +1770,9 @@ const getOrThrowWith = dual(2, (self, onFailure) => {
|
|
|
1733
1770
|
throw onFailure(self.failure);
|
|
1734
1771
|
});
|
|
1735
1772
|
const getOrThrow = getOrThrowWith(identity);
|
|
1773
|
+
const flatMap$4 = dual(2, (self, f) => isFailure$1(self) ? fail$4(self.failure) : f(self.success));
|
|
1736
1774
|
//#endregion
|
|
1737
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1775
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Iterable.js
|
|
1738
1776
|
const headUnsafe = (self) => {
|
|
1739
1777
|
const result = self[Symbol.iterator]().next();
|
|
1740
1778
|
if (result.done) throw new Error("headUnsafe: empty iterable");
|
|
@@ -1760,14 +1798,14 @@ const constEmptyIterator = { next() {
|
|
|
1760
1798
|
value: void 0
|
|
1761
1799
|
};
|
|
1762
1800
|
} };
|
|
1763
|
-
const empty$
|
|
1801
|
+
const empty$3 = () => constEmpty;
|
|
1764
1802
|
//#endregion
|
|
1765
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1803
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Array.js
|
|
1766
1804
|
const Array$1 = globalThis.Array;
|
|
1767
|
-
const fromIterable = (collection) => Array$1.isArray(collection) ? collection : Array$1.from(collection);
|
|
1805
|
+
const fromIterable$1 = (collection) => Array$1.isArray(collection) ? collection : Array$1.from(collection);
|
|
1768
1806
|
const match$2 = dual(2, (self, { onEmpty, onNonEmpty }) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(self) : onEmpty());
|
|
1769
1807
|
const append = dual(2, (self, last) => [...self, last]);
|
|
1770
|
-
const appendAll = dual(2, (self, that) => fromIterable(self).concat(fromIterable(that)));
|
|
1808
|
+
const appendAll = dual(2, (self, that) => fromIterable$1(self).concat(fromIterable$1(that)));
|
|
1771
1809
|
const isArray = Array$1.isArray;
|
|
1772
1810
|
const isArrayEmpty = (self) => self.length === 0;
|
|
1773
1811
|
const isReadonlyArrayEmpty = isArrayEmpty;
|
|
@@ -1798,7 +1836,7 @@ const findFirstIndex = dual(2, (self, predicate) => {
|
|
|
1798
1836
|
});
|
|
1799
1837
|
const findFirst = findFirst$1;
|
|
1800
1838
|
const findLast = dual(2, (self, f) => {
|
|
1801
|
-
const input = fromIterable(self);
|
|
1839
|
+
const input = fromIterable$1(self);
|
|
1802
1840
|
for (let i = input.length - 1; i >= 0; i--) {
|
|
1803
1841
|
const a = input[i];
|
|
1804
1842
|
const o = f(a, i);
|
|
@@ -1813,7 +1851,7 @@ const sort = dual(2, (self, O) => {
|
|
|
1813
1851
|
out.sort(O);
|
|
1814
1852
|
return out;
|
|
1815
1853
|
});
|
|
1816
|
-
const empty$
|
|
1854
|
+
const empty$2 = () => [];
|
|
1817
1855
|
const of = (a) => [a];
|
|
1818
1856
|
const map$3 = dual(2, (self, f) => self.map(f));
|
|
1819
1857
|
const flatMap$3 = dual(2, (self, f) => {
|
|
@@ -1825,13 +1863,26 @@ const flatMap$3 = dual(2, (self, f) => {
|
|
|
1825
1863
|
}
|
|
1826
1864
|
return out;
|
|
1827
1865
|
});
|
|
1828
|
-
const reduce = dual(3, (self, b, f) => fromIterable(self).reduce((b, a, i) => f(b, a, i), b));
|
|
1829
|
-
const fromNullishOr = (a) => a == null ? empty$
|
|
1866
|
+
const reduce = dual(3, (self, b, f) => fromIterable$1(self).reduce((b, a, i) => f(b, a, i), b));
|
|
1867
|
+
const fromNullishOr = (a) => a == null ? empty$2() : [a];
|
|
1830
1868
|
const flatMapNullishOr = dual(2, (self, f) => flatMap$3(self, (a) => fromNullishOr(f(a))));
|
|
1831
1869
|
const makeEquivalence = Array_;
|
|
1832
|
-
const join = dual(2, (self, sep) => fromIterable(self).join(sep));
|
|
1870
|
+
const join = dual(2, (self, sep) => fromIterable$1(self).join(sep));
|
|
1833
1871
|
//#endregion
|
|
1834
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1872
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Filter.js
|
|
1873
|
+
const toPredicate = (self) => (input) => !isFailure$1(self(input));
|
|
1874
|
+
const has$1 = (key) => (input) => input.has(key) ? succeed$4(input) : fail$4(input);
|
|
1875
|
+
const compose = dual(2, (left, right) => (input) => {
|
|
1876
|
+
const leftOut = left(input);
|
|
1877
|
+
if (isFailure$1(leftOut)) return leftOut;
|
|
1878
|
+
return right(leftOut.success);
|
|
1879
|
+
});
|
|
1880
|
+
const toOption = (self) => (input) => {
|
|
1881
|
+
const result = self(input);
|
|
1882
|
+
return isFailure$1(result) ? none() : some(result.success);
|
|
1883
|
+
};
|
|
1884
|
+
//#endregion
|
|
1885
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Scheduler.js
|
|
1835
1886
|
const Scheduler = Reference("effect/Scheduler", {
|
|
1836
1887
|
fiberCached: true,
|
|
1837
1888
|
defaultValue: () => new MixedScheduler()
|
|
@@ -1935,7 +1986,8 @@ const PreventSchedulerYield = Reference("effect/Scheduler/PreventSchedulerYield"
|
|
|
1935
1986
|
defaultValue: () => false
|
|
1936
1987
|
});
|
|
1937
1988
|
//#endregion
|
|
1938
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1989
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/encoding/Hex.js
|
|
1990
|
+
const encode = (input) => typeof input === "string" ? hexEncodeUint8Array(encoder.encode(input)) : hexEncodeUint8Array(input);
|
|
1939
1991
|
const random = (length) => {
|
|
1940
1992
|
switch (length) {
|
|
1941
1993
|
case 16: return random16();
|
|
@@ -1965,16 +2017,23 @@ const random32 = () => {
|
|
|
1965
2017
|
const d = randomWord();
|
|
1966
2018
|
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]);
|
|
1967
2019
|
};
|
|
2020
|
+
const encoder = new TextEncoder();
|
|
2021
|
+
const byteToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
|
2022
|
+
const hexEncodeUint8Array = (bytes) => {
|
|
2023
|
+
let result = "";
|
|
2024
|
+
for (let i = 0; i < bytes.length; i++) result += byteToHex[bytes[i]];
|
|
2025
|
+
return result;
|
|
2026
|
+
};
|
|
1968
2027
|
//#endregion
|
|
1969
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
2028
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Tracer.js
|
|
1970
2029
|
const ParentSpanKey = "effect/Tracer/ParentSpan";
|
|
1971
2030
|
var ParentSpan = class extends Service()(ParentSpanKey, { fiberCached: true }) {};
|
|
1972
|
-
const make$
|
|
2031
|
+
const make$2 = (options) => options;
|
|
1973
2032
|
const DisablePropagation = Reference("effect/Tracer/DisablePropagation", { defaultValue: constFalse });
|
|
1974
2033
|
const CurrentTraceLevel = Reference("effect/Tracer/CurrentTraceLevel", { defaultValue: () => "Info" });
|
|
1975
2034
|
const MinimumTraceLevel = Reference("effect/Tracer/MinimumTraceLevel", { defaultValue: () => "All" });
|
|
1976
2035
|
const TracerKey = "effect/Tracer";
|
|
1977
|
-
const nativeTracer = make$
|
|
2036
|
+
const nativeTracer = make$2({ span: (options) => new NativeSpan(options) });
|
|
1978
2037
|
var NativeSpan = class {
|
|
1979
2038
|
_tag = "Span";
|
|
1980
2039
|
sampled;
|
|
@@ -2037,10 +2096,10 @@ var NativeSpan = class {
|
|
|
2037
2096
|
}
|
|
2038
2097
|
};
|
|
2039
2098
|
//#endregion
|
|
2040
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
2099
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/metric.js
|
|
2041
2100
|
const FiberRuntimeMetricsKey = "effect/Metric/FiberRuntimeMetrics";
|
|
2042
2101
|
//#endregion
|
|
2043
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
2102
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/references.js
|
|
2044
2103
|
const CurrentStackFrame = Reference("effect/References/CurrentStackFrame", {
|
|
2045
2104
|
fiberCached: true,
|
|
2046
2105
|
defaultValue: constUndefined
|
|
@@ -2063,7 +2122,7 @@ const MinimumLogLevel$1 = Reference("effect/References/MinimumLogLevel", {
|
|
|
2063
2122
|
});
|
|
2064
2123
|
const CurrentLogSpans$1 = Reference("effect/References/CurrentLogSpans", { defaultValue: () => [] });
|
|
2065
2124
|
//#endregion
|
|
2066
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
2125
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/tracer.js
|
|
2067
2126
|
const addSpanStackTrace = (options) => {
|
|
2068
2127
|
if (options?.captureStackTrace === false) return options;
|
|
2069
2128
|
else if (options?.captureStackTrace !== void 0 && typeof options.captureStackTrace !== "boolean") return options;
|
|
@@ -2095,7 +2154,7 @@ const makeStackCleaner = (line) => (stack) => {
|
|
|
2095
2154
|
};
|
|
2096
2155
|
const spanCleaner = makeStackCleaner(3);
|
|
2097
2156
|
//#endregion
|
|
2098
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
2157
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/effect.js
|
|
2099
2158
|
var Interrupt = class extends ReasonBase {
|
|
2100
2159
|
constructor(fiberId, annotations = constEmptyAnnotations) {
|
|
2101
2160
|
super("Interrupt", annotations, "Interrupted");
|
|
@@ -2114,7 +2173,7 @@ var Interrupt = class extends ReasonBase {
|
|
|
2114
2173
|
return isInterruptReason(that) && this.fiberId === that.fiberId && this.annotations === that.annotations;
|
|
2115
2174
|
}
|
|
2116
2175
|
[symbol$1]() {
|
|
2117
|
-
return combine(string(`${this._tag}:${this.fiberId}`))(random$1(this.annotations));
|
|
2176
|
+
return combine$1(string(`${this._tag}:${this.fiberId}`))(random$1(this.annotations));
|
|
2118
2177
|
}
|
|
2119
2178
|
};
|
|
2120
2179
|
const makeInterruptReason$1 = (fiberId) => new Interrupt(fiberId);
|
|
@@ -2130,8 +2189,9 @@ const findError$1 = (self) => {
|
|
|
2130
2189
|
}
|
|
2131
2190
|
return fail$4(self);
|
|
2132
2191
|
};
|
|
2192
|
+
const findErrorOption$1 = toOption(findError$1);
|
|
2133
2193
|
const findDefect = (self) => {
|
|
2134
|
-
const reason = self.reasons.find(isDieReason);
|
|
2194
|
+
const reason = self.reasons.find(isDieReason$1);
|
|
2135
2195
|
return reason ? succeed$4(reason.defect) : fail$4(self);
|
|
2136
2196
|
};
|
|
2137
2197
|
const hasInterrupts$1 = (self) => self.reasons.some(isInterruptReason);
|
|
@@ -2151,6 +2211,7 @@ const causeInterruptors = (self) => {
|
|
|
2151
2211
|
};
|
|
2152
2212
|
const emptySet = new Set();
|
|
2153
2213
|
const hasInterruptsOnly$1 = (self) => self.reasons.length > 0 && self.reasons.every(isInterruptReason);
|
|
2214
|
+
const reasonAnnotations$1 = (self) => makeUnsafe$2(self.annotations);
|
|
2154
2215
|
const causeMap = dual(2, (self, f) => {
|
|
2155
2216
|
let hasFail = false;
|
|
2156
2217
|
const failures = self.reasons.map((failure) => {
|
|
@@ -2213,7 +2274,11 @@ const causePrettyError = (original, annotations, options) => {
|
|
|
2213
2274
|
}
|
|
2214
2275
|
if (options?.includeCauseInStack) error.stack = renderPrettyError(error);
|
|
2215
2276
|
for (const key of Object.keys(original)) if (!(key in error)) error[key] = original[key];
|
|
2216
|
-
} else
|
|
2277
|
+
} else {
|
|
2278
|
+
error = new globalThis.Error(!original ? `Unknown error: ${original}` : kind === "string" ? original : formatJson(original));
|
|
2279
|
+
const stack = `${error.name}: ${error.message}`;
|
|
2280
|
+
error.stack = annotations ? addStackAnnotations(stack, annotations) : stack;
|
|
2281
|
+
}
|
|
2217
2282
|
return error;
|
|
2218
2283
|
};
|
|
2219
2284
|
const causePrettyMessage = (u) => {
|
|
@@ -2318,7 +2383,7 @@ var FiberImpl = class {
|
|
|
2318
2383
|
return this._dispatcher ??= this.cache.scheduler.makeDispatcher();
|
|
2319
2384
|
}
|
|
2320
2385
|
getRef(ref) {
|
|
2321
|
-
return get(this.context, ref);
|
|
2386
|
+
return get$1(this.context, ref);
|
|
2322
2387
|
}
|
|
2323
2388
|
addObserver(cb) {
|
|
2324
2389
|
if (this._exit) {
|
|
@@ -2337,7 +2402,7 @@ var FiberImpl = class {
|
|
|
2337
2402
|
interruptUnsafe(fiberId, annotations) {
|
|
2338
2403
|
if (this._exit) return;
|
|
2339
2404
|
let cause = causeInterrupt(fiberId);
|
|
2340
|
-
if (this.cache.stackFrame) cause = causeAnnotate(cause, make$
|
|
2405
|
+
if (this.cache.stackFrame) cause = causeAnnotate(cause, make$4(StackTraceKey, this.cache.stackFrame));
|
|
2341
2406
|
if (annotations) cause = causeAnnotate(cause, annotations);
|
|
2342
2407
|
this._interruptedCause = this._interruptedCause ? causeCombine(this._interruptedCause, cause) : cause;
|
|
2343
2408
|
if (this.interruptible) {
|
|
@@ -2379,7 +2444,7 @@ var FiberImpl = class {
|
|
|
2379
2444
|
}
|
|
2380
2445
|
this._stack.length = 0;
|
|
2381
2446
|
this._children = void 0;
|
|
2382
|
-
this.context = empty$
|
|
2447
|
+
this.context = empty$4();
|
|
2383
2448
|
}
|
|
2384
2449
|
runLoop(effect) {
|
|
2385
2450
|
const prevFiber = globalThis[currentFiberTypeId];
|
|
@@ -2390,7 +2455,7 @@ var FiberImpl = class {
|
|
|
2390
2455
|
let current = effect;
|
|
2391
2456
|
this.currentOpCount = 0;
|
|
2392
2457
|
try {
|
|
2393
|
-
while (true) {
|
|
2458
|
+
while (true) try {
|
|
2394
2459
|
if (this._deferredInterrupt) {
|
|
2395
2460
|
this._deferredInterrupt = false;
|
|
2396
2461
|
current = failCause$3(this._interruptedCause);
|
|
@@ -2416,10 +2481,10 @@ var FiberImpl = class {
|
|
|
2416
2481
|
}
|
|
2417
2482
|
return Yield;
|
|
2418
2483
|
}
|
|
2484
|
+
} catch (error) {
|
|
2485
|
+
if (!hasProperty(current, evaluate)) return exitDie(`Fiber.runLoop: Not a valid effect: ${String(current)}`);
|
|
2486
|
+
current = exitDie(error);
|
|
2419
2487
|
}
|
|
2420
|
-
} catch (error) {
|
|
2421
|
-
if (!hasProperty(current, evaluate)) return exitDie(`Fiber.runLoop: Not a valid effect: ${String(current)}`);
|
|
2422
|
-
return this.runLoop(exitDie(error));
|
|
2423
2488
|
} finally {
|
|
2424
2489
|
this._running = prevRunning;
|
|
2425
2490
|
globalThis[currentFiberTypeId] = prevFiber;
|
|
@@ -2476,17 +2541,17 @@ var FiberImpl = class {
|
|
|
2476
2541
|
const makeFiberContextCache = (context) => {
|
|
2477
2542
|
const currentTracer = getOrUndefinedUnsafe(context, TracerKey);
|
|
2478
2543
|
return {
|
|
2479
|
-
scheduler: get(context, Scheduler),
|
|
2544
|
+
scheduler: get$1(context, Scheduler),
|
|
2480
2545
|
tracer: currentTracer,
|
|
2481
2546
|
tracerContext: currentTracer ? currentTracer["context"] : void 0,
|
|
2482
|
-
tracerEnabled: get(context, TracerEnabled),
|
|
2547
|
+
tracerEnabled: get$1(context, TracerEnabled),
|
|
2483
2548
|
span: getOrUndefinedUnsafe(context, ParentSpanKey),
|
|
2484
|
-
logLevel: get(context, CurrentLogLevel),
|
|
2485
|
-
minimumLogLevel: get(context, MinimumLogLevel$1),
|
|
2486
|
-
stackFrame: get(context, CurrentStackFrame),
|
|
2549
|
+
logLevel: get$1(context, CurrentLogLevel),
|
|
2550
|
+
minimumLogLevel: get$1(context, MinimumLogLevel$1),
|
|
2551
|
+
stackFrame: get$1(context, CurrentStackFrame),
|
|
2487
2552
|
runtimeMetrics: getOrUndefinedUnsafe(context, FiberRuntimeMetricsKey),
|
|
2488
|
-
maxOpsBeforeYield: get(context, MaxOpsBeforeYield),
|
|
2489
|
-
preventYield: get(context, PreventSchedulerYield)
|
|
2553
|
+
maxOpsBeforeYield: get$1(context, MaxOpsBeforeYield),
|
|
2554
|
+
preventYield: get$1(context, PreventSchedulerYield)
|
|
2490
2555
|
};
|
|
2491
2556
|
};
|
|
2492
2557
|
const deferredInterruptCont = {
|
|
@@ -2557,7 +2622,7 @@ const fiberInterruptAs = dual((args) => hasProperty(args[0], FiberTypeId), (self
|
|
|
2557
2622
|
}));
|
|
2558
2623
|
const fiberInterruptAll = (fibers) => withFiber$1((parent) => {
|
|
2559
2624
|
const annotations = fiberStackAnnotations(parent);
|
|
2560
|
-
let fiberArr = empty$
|
|
2625
|
+
let fiberArr = empty$2();
|
|
2561
2626
|
for (const fiber of fibers) {
|
|
2562
2627
|
fiber.interruptUnsafe(parent.id, annotations);
|
|
2563
2628
|
fiberArr.push(fiber);
|
|
@@ -2566,7 +2631,7 @@ const fiberInterruptAll = (fibers) => withFiber$1((parent) => {
|
|
|
2566
2631
|
});
|
|
2567
2632
|
const fiberInterruptAllAs = dual(2, (fibers, fiberId) => withFiber$1((parent) => {
|
|
2568
2633
|
const annotations = fiberStackAnnotations(parent);
|
|
2569
|
-
const fiberArr = empty$
|
|
2634
|
+
const fiberArr = empty$2();
|
|
2570
2635
|
for (const fiber of fibers) {
|
|
2571
2636
|
fiber.interruptUnsafe(fiberId, annotations);
|
|
2572
2637
|
fiberArr.push(fiber);
|
|
@@ -2847,10 +2912,16 @@ const succeedPayload = function(_value, fiber) {
|
|
|
2847
2912
|
return fiber.succeedWith(this.payload);
|
|
2848
2913
|
};
|
|
2849
2914
|
const continuationMarksStack = (() => {
|
|
2915
|
+
const limit = getStackTraceLimit();
|
|
2916
|
+
if (limit === 0) return false;
|
|
2850
2917
|
const marker = "~effect/Effect/stackProbe";
|
|
2851
|
-
|
|
2852
|
-
return new Error()
|
|
2853
|
-
} }
|
|
2918
|
+
const probe = { [marker]: function stackProbe() {
|
|
2919
|
+
return new Error();
|
|
2920
|
+
} };
|
|
2921
|
+
setStackTraceLimit(1);
|
|
2922
|
+
const error = probe[marker]();
|
|
2923
|
+
setStackTraceLimit(limit);
|
|
2924
|
+
return error.stack?.includes("[as " + marker + "]") === true;
|
|
2854
2925
|
})();
|
|
2855
2926
|
const mapCont = function(value, fiber) {
|
|
2856
2927
|
const f = this.payload;
|
|
@@ -3155,10 +3226,8 @@ const ScopeTypeId = "~effect/Scope";
|
|
|
3155
3226
|
const ScopeCloseableTypeId = "~effect/Scope/Closeable";
|
|
3156
3227
|
const scopeTag = Service("effect/Scope");
|
|
3157
3228
|
const scopeClose = (self, exit_) => withFiber$1((fiber) => {
|
|
3158
|
-
const close = scopeCloseUnsafe(self, exit_);
|
|
3159
|
-
if (close === void 0) return void_$2;
|
|
3160
3229
|
fiberEnterUninterruptibleUnsafe(fiber);
|
|
3161
|
-
return
|
|
3230
|
+
return scopeCloseUnsafe(self, exit_) ?? void_$2;
|
|
3162
3231
|
});
|
|
3163
3232
|
const scopeCloseUnsafe = (self, exit_) => {
|
|
3164
3233
|
const state = self.state;
|
|
@@ -3342,24 +3411,25 @@ const makeCachedUnsafe = (self, ttlMillis) => {
|
|
|
3342
3411
|
return fiberJoin(run.fiber);
|
|
3343
3412
|
};
|
|
3344
3413
|
return [withFiber$1((fiber) => {
|
|
3345
|
-
if (current !== void 0) return join(fiber, current);
|
|
3414
|
+
if (current !== void 0) return fiber === current.fiber ? fiberJoin(current.fiber) : join(fiber, current);
|
|
3346
3415
|
if (exit !== void 0 && (expiresAt === Infinity || fiber.getRef(ClockRef).currentTimeMillisUnsafe() < expiresAt)) return exit;
|
|
3347
3416
|
exit = void 0;
|
|
3348
3417
|
const clock = fiber.getRef(ClockRef);
|
|
3349
3418
|
const run = {
|
|
3350
|
-
fiber:
|
|
3419
|
+
fiber: new FiberImpl(fiber.context),
|
|
3351
3420
|
awaiters: 0
|
|
3352
3421
|
};
|
|
3353
3422
|
current = run;
|
|
3354
|
-
|
|
3423
|
+
const joined = join(fiber, run);
|
|
3424
|
+
run.fiber.evaluate(onExitPrimitive$1(self, (exit_) => {
|
|
3355
3425
|
if (current !== run) return;
|
|
3356
3426
|
current = void 0;
|
|
3357
3427
|
if (exitHasInterrupts(exit_)) return;
|
|
3358
3428
|
const duration = ttlMillis(exit_);
|
|
3359
3429
|
expiresAt = duration === Infinity ? Infinity : clock.currentTimeMillisUnsafe() + duration;
|
|
3360
3430
|
exit = exit_;
|
|
3361
|
-
})
|
|
3362
|
-
return run.fiber._exit ??
|
|
3431
|
+
}));
|
|
3432
|
+
return run.fiber._exit ?? joined;
|
|
3363
3433
|
}), sync$1(() => {
|
|
3364
3434
|
exit = void 0;
|
|
3365
3435
|
})];
|
|
@@ -3404,11 +3474,11 @@ const uninterruptibleMask$1 = (f) => withFiber$1((fiber) => {
|
|
|
3404
3474
|
return f(interruptible$1);
|
|
3405
3475
|
});
|
|
3406
3476
|
const all$1 = (arg, options) => {
|
|
3407
|
-
if (isIterable(arg)) return options?.mode === "result" ? forEach$
|
|
3408
|
-
else if (options?.discard) return options.mode === "result" ? forEach$
|
|
3477
|
+
if (isIterable(arg)) return options?.mode === "result" ? forEach$2(arg, result$1, options) : forEach$2(arg, identity, options);
|
|
3478
|
+
else if (options?.discard) return options.mode === "result" ? forEach$2(Object.values(arg), result$1, options) : forEach$2(Object.values(arg), identity, options);
|
|
3409
3479
|
return suspend$1(() => {
|
|
3410
3480
|
const out = {};
|
|
3411
|
-
return as$1(forEach$
|
|
3481
|
+
return as$1(forEach$2(Object.entries(arg), ([key, effect]) => map$2(options?.mode === "result" ? result$1(effect) : effect, (value) => {
|
|
3412
3482
|
assignProperty(out, key, value);
|
|
3413
3483
|
}), {
|
|
3414
3484
|
discard: true,
|
|
@@ -3434,10 +3504,10 @@ const whileLoop$1 = makePrimitive({
|
|
|
3434
3504
|
return exitVoid;
|
|
3435
3505
|
}
|
|
3436
3506
|
});
|
|
3437
|
-
const forEach$
|
|
3507
|
+
const forEach$2 = dual((args) => typeof args[1] === "function", (iterable, f, options) => suspend$1(() => {
|
|
3438
3508
|
const concurrency = resolveConcurrency(options?.concurrency);
|
|
3439
3509
|
if (concurrency === 1) return forEachSequential(iterable, f, options);
|
|
3440
|
-
const items = fromIterable(iterable);
|
|
3510
|
+
const items = fromIterable$1(iterable);
|
|
3441
3511
|
let length = items.length;
|
|
3442
3512
|
if (length === 0) return options?.discard ? void_$2 : succeed$3([]);
|
|
3443
3513
|
const out = options?.discard ? void 0 : new Array(length);
|
|
@@ -3598,15 +3668,15 @@ const forkUnsafe$1 = (parent, effect, immediate = false, daemon = false, uninter
|
|
|
3598
3668
|
const parentRuntime = parent;
|
|
3599
3669
|
const interruptible = uninterruptible === "inherit" ? parentRuntime.interruptible : !uninterruptible;
|
|
3600
3670
|
const child = new FiberImpl(parentRuntime.context, interruptible);
|
|
3671
|
+
if (!daemon) {
|
|
3672
|
+
parentRuntime.children().add(child);
|
|
3673
|
+
child._parent = parentRuntime;
|
|
3674
|
+
}
|
|
3601
3675
|
if (immediate) child.evaluate(effect);
|
|
3602
3676
|
else {
|
|
3603
3677
|
child._asyncContext = captureAsyncContext();
|
|
3604
3678
|
parentRuntime.currentDispatcher.scheduleTask(() => child.evaluate(effect), 0);
|
|
3605
3679
|
}
|
|
3606
|
-
if (!daemon && !child._exit) {
|
|
3607
|
-
parentRuntime.children().add(child);
|
|
3608
|
-
child._parent = parentRuntime;
|
|
3609
|
-
}
|
|
3610
3680
|
return child;
|
|
3611
3681
|
};
|
|
3612
3682
|
const forkIn$1 = dual((args) => isEffect$1(args[0]), (self, scope, options) => withFiber$1((parent) => {
|
|
@@ -3643,12 +3713,12 @@ const fiberRunIn = dual(2, (self, scope) => {
|
|
|
3643
3713
|
self.interruptUnsafe(self.id);
|
|
3644
3714
|
return self;
|
|
3645
3715
|
}
|
|
3646
|
-
|
|
3647
|
-
scopeAddFinalizerUnsafe(scope,
|
|
3648
|
-
self.addObserver(() => scopeRemoveFinalizerUnsafe(scope,
|
|
3716
|
+
scopeRemoveFinalizerUnsafe(scope, self);
|
|
3717
|
+
scopeAddFinalizerUnsafe(scope, self, () => fiberInterrupt(self));
|
|
3718
|
+
self.addObserver(() => scopeRemoveFinalizerUnsafe(scope, self));
|
|
3649
3719
|
return self;
|
|
3650
3720
|
});
|
|
3651
|
-
const runFork$1 = runForkWith$1(empty$
|
|
3721
|
+
const runFork$1 = runForkWith$1(empty$4());
|
|
3652
3722
|
const runSyncExitWith = (context) => {
|
|
3653
3723
|
const runFork = runForkWith$1(context);
|
|
3654
3724
|
return (effect) => {
|
|
@@ -3659,7 +3729,7 @@ const runSyncExitWith = (context) => {
|
|
|
3659
3729
|
return fiber._exit ?? exitDie(new AsyncFiberError(fiber));
|
|
3660
3730
|
};
|
|
3661
3731
|
};
|
|
3662
|
-
const runSyncExit$1 = runSyncExitWith(empty$
|
|
3732
|
+
const runSyncExit$1 = runSyncExitWith(empty$4());
|
|
3663
3733
|
const runSyncWith = (context) => {
|
|
3664
3734
|
const runSyncExit = runSyncExitWith(context);
|
|
3665
3735
|
return (effect) => {
|
|
@@ -3668,7 +3738,7 @@ const runSyncWith = (context) => {
|
|
|
3668
3738
|
return exit.value;
|
|
3669
3739
|
};
|
|
3670
3740
|
};
|
|
3671
|
-
const runSync$1 = runSyncWith(empty$
|
|
3741
|
+
const runSync$1 = runSyncWith(empty$4());
|
|
3672
3742
|
const succeedTrue = succeed$3(true);
|
|
3673
3743
|
const succeedFalse = succeed$3(false);
|
|
3674
3744
|
var Latch = class {
|
|
@@ -3759,16 +3829,16 @@ const NoopSpanProto = {
|
|
|
3759
3829
|
const noopSpan = (options) => Object.assign(Object.create(NoopSpanProto), options);
|
|
3760
3830
|
const filterDisablePropagation = (span) => {
|
|
3761
3831
|
if (!span) return none();
|
|
3762
|
-
return get(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$2(span.parent)) : none() : some(span);
|
|
3832
|
+
return get$1(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$2(span.parent)) : none() : some(span);
|
|
3763
3833
|
};
|
|
3764
3834
|
const makeSpanUnsafe = (fiber, name, options) => {
|
|
3765
|
-
const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get(options.annotations, DisablePropagation);
|
|
3835
|
+
const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get$1(options.annotations, DisablePropagation);
|
|
3766
3836
|
const parent = options?.parent !== void 0 ? some(options.parent) : options?.root ? none() : filterDisablePropagation(fiber.cache.span);
|
|
3767
3837
|
let span;
|
|
3768
3838
|
if (disablePropagation) span = noopSpan({
|
|
3769
3839
|
name,
|
|
3770
3840
|
parent,
|
|
3771
|
-
annotations: add(options?.annotations ?? empty$
|
|
3841
|
+
annotations: add(options?.annotations ?? empty$4(), DisablePropagation, true)
|
|
3772
3842
|
});
|
|
3773
3843
|
else {
|
|
3774
3844
|
const tracer = fiber.cache.tracer ?? nativeTracer;
|
|
@@ -3781,11 +3851,11 @@ const makeSpanUnsafe = (fiber, name, options) => {
|
|
|
3781
3851
|
span = tracer.span({
|
|
3782
3852
|
name,
|
|
3783
3853
|
parent,
|
|
3784
|
-
annotations: options?.annotations ?? empty$
|
|
3854
|
+
annotations: options?.annotations ?? empty$4(),
|
|
3785
3855
|
links,
|
|
3786
3856
|
startTime: timingEnabled ? clock.currentTimeNanosUnsafe() : bigint0,
|
|
3787
3857
|
kind: options?.kind ?? "internal",
|
|
3788
|
-
root: options?.root ??
|
|
3858
|
+
root: options?.root ?? false,
|
|
3789
3859
|
sampled: options?.sampled ?? (isSome(parent) && parent.value.sampled === false ? false : !isLogLevelGreaterThan(fiber.getRef(MinimumTraceLevel), level))
|
|
3790
3860
|
});
|
|
3791
3861
|
for (const key in annotationsFromEnv) span.attribute(key, annotationsFromEnv[key]);
|
|
@@ -4067,7 +4137,7 @@ function interruptChildrenPatch() {
|
|
|
4067
4137
|
}
|
|
4068
4138
|
const undefined_$1 = succeed$3(void 0);
|
|
4069
4139
|
//#endregion
|
|
4070
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4140
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Exit.js
|
|
4071
4141
|
const isExit = isExit$1;
|
|
4072
4142
|
const succeed$2 = exitSucceed;
|
|
4073
4143
|
const failCause$2 = exitFailCause;
|
|
@@ -4077,11 +4147,12 @@ const interrupt$1 = exitInterrupt;
|
|
|
4077
4147
|
const void_$1 = exitVoid;
|
|
4078
4148
|
const isSuccess = exitIsSuccess;
|
|
4079
4149
|
const isFailure = exitIsFailure;
|
|
4150
|
+
const asVoidAll = exitAsVoidAll;
|
|
4080
4151
|
//#endregion
|
|
4081
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4082
|
-
const TypeId$
|
|
4152
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Deferred.js
|
|
4153
|
+
const TypeId$4 = "~effect/Deferred";
|
|
4083
4154
|
const DeferredProto = {
|
|
4084
|
-
[TypeId$
|
|
4155
|
+
[TypeId$4]: {
|
|
4085
4156
|
_A: identity,
|
|
4086
4157
|
_E: identity
|
|
4087
4158
|
},
|
|
@@ -4124,15 +4195,15 @@ const doneUnsafe = (self, effect) => {
|
|
|
4124
4195
|
};
|
|
4125
4196
|
const into = dual(2, (self, deferred) => uninterruptibleMask$1((restore) => flatMap$2(exit$1(restore(self)), (exit) => done$1(deferred, exit))));
|
|
4126
4197
|
//#endregion
|
|
4127
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4198
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/References.js
|
|
4128
4199
|
const CurrentLogAnnotations = CurrentLogAnnotations$1;
|
|
4129
4200
|
const CurrentLogSpans = CurrentLogSpans$1;
|
|
4130
4201
|
const MinimumLogLevel = MinimumLogLevel$1;
|
|
4131
4202
|
const TracerTimingEnabled = TracerTimingEnabled$1;
|
|
4132
4203
|
//#endregion
|
|
4133
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4204
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Scope.js
|
|
4134
4205
|
const Scope = scopeTag;
|
|
4135
|
-
const make = scopeMake;
|
|
4206
|
+
const make$1 = scopeMake;
|
|
4136
4207
|
const makeUnsafe = scopeMakeUnsafe;
|
|
4137
4208
|
const provide$3 = provideScope;
|
|
4138
4209
|
const addFinalizerExit = scopeAddFinalizerExit;
|
|
@@ -4140,8 +4211,8 @@ const addFinalizer$1 = scopeAddFinalizer;
|
|
|
4140
4211
|
const forkUnsafe = scopeForkUnsafe;
|
|
4141
4212
|
const close = scopeClose;
|
|
4142
4213
|
//#endregion
|
|
4143
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4144
|
-
const TypeId$
|
|
4214
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Layer.js
|
|
4215
|
+
const TypeId$3 = "~effect/Layer";
|
|
4145
4216
|
const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
4146
4217
|
const makeMemoMapEntry = (memoMap, layer) => {
|
|
4147
4218
|
const entry = {
|
|
@@ -4163,7 +4234,7 @@ const memoMapObserve = (entry, scope) => {
|
|
|
4163
4234
|
return true;
|
|
4164
4235
|
};
|
|
4165
4236
|
const LayerProto = {
|
|
4166
|
-
[TypeId$
|
|
4237
|
+
[TypeId$3]: {
|
|
4167
4238
|
_ROut: identity,
|
|
4168
4239
|
_E: identity,
|
|
4169
4240
|
_RIn: identity
|
|
@@ -4227,26 +4298,26 @@ var CurrentMemoMap = class CurrentMemoMap extends Service()("effect/Layer/Curren
|
|
|
4227
4298
|
return current ? forkMemoMapUnsafe(current) : makeMemoMapUnsafe();
|
|
4228
4299
|
}
|
|
4229
4300
|
};
|
|
4230
|
-
const buildWithMemoMap = dual(3, (self, memoMap, scope) => provideService$1(map$2(self.build(memoMap, scope), add(CurrentMemoMap, memoMap)), CurrentMemoMap, memoMap));
|
|
4301
|
+
const buildWithMemoMap = dual(3, (self, memoMap, scope) => provideService$1(map$2(suspend$1(() => self.build(memoMap, scope)), add(CurrentMemoMap, memoMap)), CurrentMemoMap, memoMap));
|
|
4231
4302
|
const buildWithScope = dual(2, (self, scope) => withFiber$1((fiber) => buildWithMemoMap(self, CurrentMemoMap.forkOrCreate(fiber.context), scope)));
|
|
4232
4303
|
const succeed$1 = function() {
|
|
4233
|
-
if (arguments.length === 1) return (resource) => succeedContext(make$
|
|
4234
|
-
return succeedContext(make$
|
|
4304
|
+
if (arguments.length === 1) return (resource) => succeedContext(make$4(arguments[0], resource));
|
|
4305
|
+
return succeedContext(make$4(arguments[0], arguments[1]));
|
|
4235
4306
|
};
|
|
4236
4307
|
const succeedContext = (context) => fromBuildUnsafe(constant(succeed$3(context)));
|
|
4237
|
-
const empty = succeedContext(empty$
|
|
4308
|
+
const empty$1 = succeedContext(empty$4());
|
|
4238
4309
|
const effect = function() {
|
|
4239
4310
|
if (arguments.length === 1) return (effect) => effectImpl(arguments[0], effect);
|
|
4240
4311
|
return effectImpl(arguments[0], arguments[1]);
|
|
4241
4312
|
};
|
|
4242
|
-
const effectImpl = (service, effect) => effectContext(map$2(effect, (value) => make$
|
|
4313
|
+
const effectImpl = (service, effect) => effectContext(map$2(effect, (value) => make$4(service, value)));
|
|
4243
4314
|
const effectContext = (effect) => fromBuildMemo((_, scope) => provide$3(effect, scope));
|
|
4244
|
-
const effectDiscard = (effect) => effectContext(as$1(effect, empty$
|
|
4315
|
+
const effectDiscard = (effect) => effectContext(as$1(effect, empty$4()));
|
|
4245
4316
|
const unwrapKey = Service("effect/Layer/unwrap");
|
|
4246
|
-
const unwrap = (self) => flatMap$1(effect(unwrapKey)(self), get(unwrapKey));
|
|
4317
|
+
const unwrap = (self) => flatMap$1(effect(unwrapKey)(self), get$1(unwrapKey));
|
|
4247
4318
|
const mergeAllEffect = (layers, memoMap, scope) => {
|
|
4248
4319
|
const parentScope = forkUnsafe(scope, "parallel");
|
|
4249
|
-
return forEach$
|
|
4320
|
+
return forEach$2(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), { concurrency: layers.length }).pipe(map$2((context) => mergeAll$1(...context)));
|
|
4250
4321
|
};
|
|
4251
4322
|
const mergeAll = (...layers) => fromBuild((memoMap, scope) => mergeAllEffect(layers, memoMap, scope));
|
|
4252
4323
|
const merge = dual(2, (self, that) => mergeAll(self, ...Array.isArray(that) ? that : [that]));
|
|
@@ -4295,10 +4366,11 @@ const makeUnimplemented = (error) => {
|
|
|
4295
4366
|
const StreamTypeId = "~effect/Stream";
|
|
4296
4367
|
const ChannelTypeId = "~effect/Channel";
|
|
4297
4368
|
//#endregion
|
|
4298
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4369
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Cause.js
|
|
4299
4370
|
const isCause = isCause$1;
|
|
4300
4371
|
const isReason = isCauseReason;
|
|
4301
4372
|
const isFailReason = isFailReason$1;
|
|
4373
|
+
const isDieReason = isDieReason$1;
|
|
4302
4374
|
const fromReasons = causeFromReasons;
|
|
4303
4375
|
const fail$1 = causeFail;
|
|
4304
4376
|
const die$1 = causeDie;
|
|
@@ -4307,8 +4379,10 @@ const makeDieReason = (defect) => new Die(defect);
|
|
|
4307
4379
|
const makeInterruptReason = makeInterruptReason$1;
|
|
4308
4380
|
const hasInterruptsOnly = hasInterruptsOnly$1;
|
|
4309
4381
|
const map$1 = causeMap;
|
|
4382
|
+
const combine = causeCombine;
|
|
4310
4383
|
const squash = causeSquash;
|
|
4311
4384
|
const findError = findError$1;
|
|
4385
|
+
const findErrorOption = findErrorOption$1;
|
|
4312
4386
|
const hasInterrupts = hasInterrupts$1;
|
|
4313
4387
|
const interruptors = causeInterruptors;
|
|
4314
4388
|
const filterInterruptors = causeFilterInterruptors;
|
|
@@ -4322,9 +4396,10 @@ const TimeoutError = TimeoutError$1;
|
|
|
4322
4396
|
const IllegalArgumentError = IllegalArgumentError$1;
|
|
4323
4397
|
const UnknownError = UnknownError$1;
|
|
4324
4398
|
const annotate = causeAnnotate;
|
|
4399
|
+
const reasonAnnotations = reasonAnnotations$1;
|
|
4325
4400
|
var StackTrace = class extends Service()("effect/Cause/StackTrace") {};
|
|
4326
4401
|
//#endregion
|
|
4327
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4402
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/random.js
|
|
4328
4403
|
const Random = Reference("effect/Random", { defaultValue: () => ({
|
|
4329
4404
|
nextIntUnsafe() {
|
|
4330
4405
|
return Math.floor(Math.random() * (Number.MAX_SAFE_INTEGER - Number.MIN_SAFE_INTEGER + 1)) + Number.MIN_SAFE_INTEGER;
|
|
@@ -4344,7 +4419,7 @@ const nextBetween = (min, max, draw) => {
|
|
|
4344
4419
|
return view.getFloat64(0);
|
|
4345
4420
|
};
|
|
4346
4421
|
//#endregion
|
|
4347
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4422
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Pull.js
|
|
4348
4423
|
const catchDone = dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
|
|
4349
4424
|
const isDoneCause = (cause) => cause.reasons.some(isDoneFailure);
|
|
4350
4425
|
const isDoneFailure = (failure) => failure._tag === "Fail" && isDone(failure.error);
|
|
@@ -4372,8 +4447,8 @@ const matchEffect$1 = dual(2, (self, options) => matchCauseEffect$1(self, {
|
|
|
4372
4447
|
}
|
|
4373
4448
|
}));
|
|
4374
4449
|
//#endregion
|
|
4375
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4376
|
-
const TypeId$
|
|
4450
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Schedule.js
|
|
4451
|
+
const TypeId$2 = "~effect/Schedule";
|
|
4377
4452
|
const randomNext = Random.useSync((random) => random.nextDoubleUnsafe());
|
|
4378
4453
|
const CurrentMetadata = Reference("effect/Schedule/CurrentMetadata", { defaultValue: constant({
|
|
4379
4454
|
input: void 0,
|
|
@@ -4386,7 +4461,7 @@ const CurrentMetadata = Reference("effect/Schedule/CurrentMetadata", { defaultVa
|
|
|
4386
4461
|
elapsedSincePrevious: 0
|
|
4387
4462
|
}) });
|
|
4388
4463
|
const ScheduleProto = {
|
|
4389
|
-
[TypeId$
|
|
4464
|
+
[TypeId$2]: {
|
|
4390
4465
|
_Out: identity,
|
|
4391
4466
|
_In: identity,
|
|
4392
4467
|
_Env: identity
|
|
@@ -4395,7 +4470,7 @@ const ScheduleProto = {
|
|
|
4395
4470
|
return pipeArguments(this, arguments);
|
|
4396
4471
|
}
|
|
4397
4472
|
};
|
|
4398
|
-
const isSchedule = (u) => hasProperty(u, TypeId$
|
|
4473
|
+
const isSchedule = (u) => hasProperty(u, TypeId$2);
|
|
4399
4474
|
const fromStep = (step) => {
|
|
4400
4475
|
const self = Object.create(ScheduleProto);
|
|
4401
4476
|
self.step = step;
|
|
@@ -4437,7 +4512,7 @@ const toStepWithMetadata = (schedule) => clockWith$1((clock) => map$2(toStep(sch
|
|
|
4437
4512
|
});
|
|
4438
4513
|
});
|
|
4439
4514
|
}));
|
|
4440
|
-
const min = (schedules) => fromStep(map$2(all$1(schedules.map(toStep)), (steps) => (now, input) => flatMap$2(forEach$
|
|
4515
|
+
const min = (schedules) => fromStep(map$2(all$1(schedules.map(toStep)), (steps) => (now, input) => flatMap$2(forEach$2(steps, (step) => matchEffect$1(step(now, input), {
|
|
4441
4516
|
onSuccess: (result) => succeed$3(result[1]),
|
|
4442
4517
|
onDone: () => undefined_$1,
|
|
4443
4518
|
onFailure: failCause$3
|
|
@@ -4496,21 +4571,22 @@ const while_ = dual(2, (self, predicate) => fromStep(map$2(toStep(self), (step)
|
|
|
4496
4571
|
})));
|
|
4497
4572
|
const forever$1 = spaced(zero);
|
|
4498
4573
|
//#endregion
|
|
4499
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4574
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/layer.js
|
|
4500
4575
|
const provideLayer = (self, layer, options) => scopedWith$1((scope) => flatMap$2(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext$1(self, context)));
|
|
4501
4576
|
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));
|
|
4502
4577
|
//#endregion
|
|
4503
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4578
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/schedule.js
|
|
4579
|
+
const findErrorOnly = (cause) => cause.reasons.every(isFailReason$1) ? findError$1(cause) : fail$4(cause);
|
|
4504
4580
|
const repeatOrElse = dual(3, (self, schedule, orElse) => flatMap$2(toStepWithMetadata(schedule), (step) => {
|
|
4505
4581
|
let meta = CurrentMetadata.defaultValue();
|
|
4506
|
-
return
|
|
4582
|
+
return catchCauseFilter(catchDone(forever$2(tap$1(flatMap$2(suspend$1(() => provideService$1(self, CurrentMetadata, meta)), step), (meta_) => sync$1(() => {
|
|
4507
4583
|
meta = meta_;
|
|
4508
|
-
})), { disableYield: true }), (
|
|
4584
|
+
})), { disableYield: true }), (out) => succeed$3(out)), findErrorOnly, (error) => orElse(error, meta.attempt === 0 ? none() : some(meta)));
|
|
4509
4585
|
}));
|
|
4510
4586
|
const retryOrElse = dual(3, (self, policy, orElse) => flatMap$2(toStepWithMetadata(policy), (step) => {
|
|
4511
4587
|
let meta = CurrentMetadata.defaultValue();
|
|
4512
4588
|
let lastError;
|
|
4513
|
-
const loop =
|
|
4589
|
+
const loop = catchCauseFilter(suspend$1(() => provideService$1(self, CurrentMetadata, meta)), findErrorOnly, (error) => {
|
|
4514
4590
|
lastError = error;
|
|
4515
4591
|
return flatMap$2(step(error), (meta_) => {
|
|
4516
4592
|
meta = meta_;
|
|
@@ -4542,7 +4618,107 @@ const buildFromOptions = (options) => {
|
|
|
4542
4618
|
return schedule;
|
|
4543
4619
|
};
|
|
4544
4620
|
//#endregion
|
|
4545
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4621
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/MutableHashMap.js
|
|
4622
|
+
const TypeId$1 = "~effect/MutableHashMap";
|
|
4623
|
+
const MutableHashMapProto = {
|
|
4624
|
+
[TypeId$1]: TypeId$1,
|
|
4625
|
+
[Symbol.iterator]() {
|
|
4626
|
+
return this.backing[Symbol.iterator]();
|
|
4627
|
+
},
|
|
4628
|
+
toString() {
|
|
4629
|
+
return `MutableHashMap(${format$1(Array.from(this))})`;
|
|
4630
|
+
},
|
|
4631
|
+
toJSON() {
|
|
4632
|
+
return {
|
|
4633
|
+
_id: "MutableHashMap",
|
|
4634
|
+
values: toJson(Array.from(this))
|
|
4635
|
+
};
|
|
4636
|
+
},
|
|
4637
|
+
[NodeInspectSymbol]() {
|
|
4638
|
+
return this.toJSON();
|
|
4639
|
+
},
|
|
4640
|
+
pipe() {
|
|
4641
|
+
return pipeArguments(this, arguments);
|
|
4642
|
+
}
|
|
4643
|
+
};
|
|
4644
|
+
const empty = () => {
|
|
4645
|
+
const self = Object.create(MutableHashMapProto);
|
|
4646
|
+
self.backing = new Map();
|
|
4647
|
+
self.buckets = new Map();
|
|
4648
|
+
return self;
|
|
4649
|
+
};
|
|
4650
|
+
const make = (...entries) => fromIterable(entries);
|
|
4651
|
+
const fromIterable = (entries) => {
|
|
4652
|
+
const self = empty();
|
|
4653
|
+
for (const [key, value] of entries) set(self, key, value);
|
|
4654
|
+
return self;
|
|
4655
|
+
};
|
|
4656
|
+
const get = dual(2, (self, key) => {
|
|
4657
|
+
if (self.backing.has(key)) return some(self.backing.get(key));
|
|
4658
|
+
else if (isSimpleKey(key)) return none();
|
|
4659
|
+
const hash$2 = hash(key);
|
|
4660
|
+
const bucket = self.buckets.get(hash$2);
|
|
4661
|
+
if (bucket === void 0) return none();
|
|
4662
|
+
return getFromBucket(self, bucket, key);
|
|
4663
|
+
});
|
|
4664
|
+
const isSimpleKey = (u) => typeof u !== "object" && typeof u !== "function";
|
|
4665
|
+
const getFromBucket = (self, bucket, key) => {
|
|
4666
|
+
for (let i = 0, len = bucket.length; i < len; i++) if (equals$1(key, bucket[i])) {
|
|
4667
|
+
const refKey = bucket[i];
|
|
4668
|
+
return some(self.backing.get(refKey));
|
|
4669
|
+
}
|
|
4670
|
+
return none();
|
|
4671
|
+
};
|
|
4672
|
+
const has = dual(2, (self, key) => isSome(get(self, key)));
|
|
4673
|
+
const set = dual(3, (self, key, value) => {
|
|
4674
|
+
if (self.backing.has(key) || isSimpleKey(key)) {
|
|
4675
|
+
self.backing.set(key, value);
|
|
4676
|
+
return self;
|
|
4677
|
+
}
|
|
4678
|
+
const hash$4 = hash(key);
|
|
4679
|
+
const bucket = self.buckets.get(hash$4);
|
|
4680
|
+
if (bucket === void 0) {
|
|
4681
|
+
self.buckets.set(hash$4, [key]);
|
|
4682
|
+
self.backing.set(key, value);
|
|
4683
|
+
return self;
|
|
4684
|
+
}
|
|
4685
|
+
let refKey = getRefKey(bucket, key);
|
|
4686
|
+
if (refKey === void 0) {
|
|
4687
|
+
bucket.push(key);
|
|
4688
|
+
refKey = key;
|
|
4689
|
+
}
|
|
4690
|
+
self.backing.set(refKey, value);
|
|
4691
|
+
return self;
|
|
4692
|
+
});
|
|
4693
|
+
const getRefKey = (bucket, key) => {
|
|
4694
|
+
for (let i = 0, len = bucket.length; i < len; i++) if (equals$1(key, bucket[i])) return bucket[i];
|
|
4695
|
+
};
|
|
4696
|
+
const remove = dual(2, (self, key_) => {
|
|
4697
|
+
if (isSimpleKey(key_)) {
|
|
4698
|
+
self.backing.delete(key_);
|
|
4699
|
+
return self;
|
|
4700
|
+
}
|
|
4701
|
+
const hash$1 = hash(key_);
|
|
4702
|
+
const bucket = self.buckets.get(hash$1);
|
|
4703
|
+
if (bucket === void 0) return self;
|
|
4704
|
+
for (let i = 0, len = bucket.length; i < len; i++) {
|
|
4705
|
+
const bkey = bucket[i];
|
|
4706
|
+
if (bkey === key_ || equals$1(key_, bkey)) {
|
|
4707
|
+
self.backing.delete(bkey);
|
|
4708
|
+
bucket.splice(i, 1);
|
|
4709
|
+
break;
|
|
4710
|
+
}
|
|
4711
|
+
}
|
|
4712
|
+
if (bucket.length === 0) self.buckets.delete(hash$1);
|
|
4713
|
+
return self;
|
|
4714
|
+
});
|
|
4715
|
+
const size = (self) => self.backing.size;
|
|
4716
|
+
const isEmpty = (self) => self.backing.size === 0;
|
|
4717
|
+
const forEach$1 = dual(2, (self, f) => {
|
|
4718
|
+
self.backing.forEach(f);
|
|
4719
|
+
});
|
|
4720
|
+
//#endregion
|
|
4721
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Request.js
|
|
4546
4722
|
const TypeId = "~effect/Request";
|
|
4547
4723
|
const requestVariance = byReferenceUnsafe({
|
|
4548
4724
|
_E: (_) => _,
|
|
@@ -4567,7 +4743,7 @@ const TaggedClass = (tag) => {
|
|
|
4567
4743
|
};
|
|
4568
4744
|
const makeEntry = (options) => options;
|
|
4569
4745
|
//#endregion
|
|
4570
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4746
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/request.js
|
|
4571
4747
|
const request$1 = dual(2, (self, resolver) => {
|
|
4572
4748
|
const withResolver = (resolver) => callback$1((resume) => {
|
|
4573
4749
|
const entry = addEntry(resolver, self, resume, getCurrentFiber());
|
|
@@ -4575,12 +4751,23 @@ const request$1 = dual(2, (self, resolver) => {
|
|
|
4575
4751
|
});
|
|
4576
4752
|
return isEffect$1(resolver) ? flatMap$2(resolver, withResolver) : withResolver(resolver);
|
|
4577
4753
|
});
|
|
4754
|
+
const equalBatchKeys = new WeakSet();
|
|
4755
|
+
const makeBatchMap = (resolver) => {
|
|
4756
|
+
if (!equalBatchKeys.has(resolver.batchKey)) return new Map();
|
|
4757
|
+
const map = empty();
|
|
4758
|
+
return {
|
|
4759
|
+
get: (key) => getOrUndefined$2(get(map, key)),
|
|
4760
|
+
has: (key) => has(map, key),
|
|
4761
|
+
set: (key, batch) => set(map, key, batch),
|
|
4762
|
+
delete: (key) => remove(map, key)
|
|
4763
|
+
};
|
|
4764
|
+
};
|
|
4578
4765
|
const batchPool = [];
|
|
4579
4766
|
const pendingBatches = new WeakMap();
|
|
4580
4767
|
const addEntry = (resolver, request, resume, fiber) => {
|
|
4581
4768
|
let batchMap = pendingBatches.get(resolver);
|
|
4582
4769
|
if (!batchMap) {
|
|
4583
|
-
batchMap =
|
|
4770
|
+
batchMap = makeBatchMap(resolver);
|
|
4584
4771
|
pendingBatches.set(resolver, batchMap);
|
|
4585
4772
|
}
|
|
4586
4773
|
let batch;
|
|
@@ -4663,10 +4850,10 @@ function runBatch(batch) {
|
|
|
4663
4850
|
return batch.run;
|
|
4664
4851
|
}
|
|
4665
4852
|
//#endregion
|
|
4666
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4853
|
+
//#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Effect.js
|
|
4667
4854
|
const isEffect = isEffect$1;
|
|
4668
4855
|
const all = all$1;
|
|
4669
|
-
const forEach = forEach$
|
|
4856
|
+
const forEach = forEach$2;
|
|
4670
4857
|
const whileLoop = whileLoop$1;
|
|
4671
4858
|
const promise = promise$1;
|
|
4672
4859
|
const tryPromise = tryPromise$1;
|
|
@@ -4790,7 +4977,7 @@ const withLogSpan = dual(2, (effect, label) => flatMap$2(currentTimeMillis, (now
|
|
|
4790
4977
|
const effectify = (fn, onError, onSyncError) => (...args) => callback((resume) => {
|
|
4791
4978
|
try {
|
|
4792
4979
|
fn(...args, (err, result) => {
|
|
4793
|
-
if (err) resume(
|
|
4980
|
+
if (err) resume(onError ? suspend(() => fail(onError(err, args))) : fail(err));
|
|
4794
4981
|
else resume(succeed(result));
|
|
4795
4982
|
});
|
|
4796
4983
|
} catch (err) {
|
|
@@ -4804,6 +4991,6 @@ const flatMapEager = flatMapEager$1;
|
|
|
4804
4991
|
const catchEager = catchEager$1;
|
|
4805
4992
|
const fnUntracedEager = fnUntracedEager$1;
|
|
4806
4993
|
//#endregion
|
|
4807
|
-
export { interruptible as $,
|
|
4994
|
+
export { interruptible as $, getOrUndefined$1 as $a, append as $i, fromReasons as $n, makePrimitive as $o, interrupt$1 as $r, constant as $s, uninterruptible as $t, effectify as A, succeed$4 as Aa, iterateEager as Ai, spaced as An, Date$1 as Ao, Scope as Ar, isBoolean as As, request as At, fn as B, minutes as Ba, succeedNone$1 as Bi, IllegalArgumentError as Bn, strictEqual as Bo, TracerTimingEnabled as Br, isNumber as Bs, serviceOption as Bt, catchTags as C, flatMap$4 as Ca, fiberInterruptAs as Ci, size as Cn, match$5 as Co, mock as Cr, optimize as Cs, orElseSucceed as Ct, contextWith as D, isSuccess$1 as Da, forkUnsafe$1 as Di, isSchedule as Dn, some as Do, succeed$1 as Dr, symbol$1 as Ds, provideService as Dt, context as E, isFailure$1 as Ea, flatMap$2 as Ei, fromStep as En, orElseSome as Eo, provideMerge as Er, structureKeys as Es, provideContext as Et, failCauseSync as F, isDuration as Fa, monotonicTimeNanos as Fi, isDoneCause as Fn, isLessThan as Fo, make$1 as Fr, isNotNull as Fs, runSync as Ft, forkChild as G, toSeconds as Ga, void_$2 as Gi, annotate as Gn, TaggedError as Go, into as Gr, isTagged as Gs, sync as Gt, fnUntracedEager as H, negativeInfinity as Ha, sync$1 as Hi, StackTrace as Hn, Done$1 as Ho, done$1 as Hr, isObjectKeyword as Hs, succeed as Ht, filterOrFail as I, isFinite as Ia, onExitPrimitive$1 as Ii, matchEffect$1 as In, isLessThanOrEqualTo as Io, makeUnsafe as Ir, isNotNullish as Is, runSyncExit as It, fromOption as J, Service as Ja, encode as Ji, done as Jn, evaluate as Jo, makeUnsafe$1 as Jr, or as Js, timeout as Jt, forkIn as K, zero as Ka, DisablePropagation as Ki, combine as Kn, args as Ko, isDone$1 as Kr, isUndefined as Ks, tap as Kt, flatMap as L, isZero as La, onExitUnsafe as Li, Random as Ln, make$5 as Lo, provide$3 as Lr, isNotUndefined as Ls, scope as Lt, exit as M, format as Ma, makeLatchUnsafe as Mi, catchDone as Mn, String$1 as Mo, addFinalizerExit as Mr, isFunction as Ms, retry as Mt, fail as N, fromInputUnsafe as Na, makeSpanUnsafe as Ni, doneExitFromCause as Nn, isGreaterThan as No, close as Nr, isIterable as Ns, runFork as Nt, delay as O, map$4 as Oa, getCurrentFiber as Oi, jittered as On, toArray as Oo, succeedContext as Or, hasProperty as Os, raceFirst as Ot, failCause as P, infinity as Pa, map$2 as Pi, filterDone as Pn, isGreaterThanOrEqualTo as Po, forkUnsafe as Pr, isNever as Ps, runForkWith as Pt, interrupt as Q, getOption as Qa, Array$1 as Qi, findErrorOption as Qn, isExit$1 as Qo, failCause$2 as Qr, constVoid as Qs, undefined_ as Qt, flatMapEager as R, max as Ra, resolveConcurrency as Ri, nextBetween as Rn, Tuple as Ro, CurrentLogAnnotations as Rr, isNull as Rs, scoped as Rt, catchTag as S, failVoid as Sa, fiberInterruptAllAs as Si, set as Sn, map$5 as So, mergeAll as Sr, number as Ss, orDie as St, clockWith as T, getOrUndefined as Ta, fiberRunIn as Ti, forever$1 as Tn, orElse as To, provide$2 as Tr, structure as Ts, provide as Tt, forEach as U, seconds as Ua, uninterruptibleMask$1 as Ui, TimeoutError as Un, Error$1 as Uo, doneUnsafe as Ur, isPropertyKey as Us, succeedNone as Ut, fnUntraced as V, nanos as Va, suspend$1 as Vi, NoSuchElementError as Vn, Prototype as Vo, _await as Vr, isObject as Vs, sleep as Vt, forever as W, toMillis as Wa, updateContext$1 as Wi, UnknownError as Wn, PipeInspectableProto as Wo, interruptWith as Wr, isString as Ws, suspend as Wt, gen as X, empty$4 as Xa, has$1 as Xi, filterInterruptors as Xn, exitFailCause as Xo, die$2 as Xr, constTrue as Xs, tryPromise as Xt, fromResult as Y, add as Ya, compose as Yi, fail$1 as Yn, exitFail as Yo, asVoidAll as Yr, constFalse as Ys, timeoutOrElse as Yt, ignore as Z, get$1 as Za, toPredicate as Zi, findError as Zn, exitSucceed as Zo, fail$2 as Zr, constUndefined as Zs, try_ as Zt, catchEager as _, reduce as _a, exitVoid as _i, forEach$1 as _n, getOrUndefined$2 as _o, effectContext as _r, equals$1 as _s, onError as _t, andThen as a, flatMapNullishOr as aa, pipe as ac, ClockRef as ai, when as an, all$2 as ao, isFailReason as ar, BaseProto as as, logWarning as at, catchNoSuchElement as b, headUnsafe as ba, fiberInterrupt as bi, make as bn, isSome as bo, fresh as br, combine$1 as bs, onInterrupt as bt, as as c, isArrayNonEmpty as ca, pipeArguments as cc, andThen$1 as ci, withLogSpan as cn, flatMap$5 as co, makeDieReason as cr, toJson as cs, mapBothEager as ct, cached as d, join as da, contextWith$1 as di, yieldNow as dn, fromNullOr as do, map$1 as dr, formatJson as ds, mapErrorEager as dt, appendAll as ea, dual as ec, isExit as ei, uninterruptibleMask as en, getOrUndefinedUnsafe as eo, hasInterrupts as er, withFiber$1 as es, isEffect as et, cachedWithTTL as f, last as fa, currentTimeMillis as fi, zipWith as fn, fromNullishOr$1 as fo, pretty as fr, formatPath as fs, match as ft, catchDefect as g, of as ga, exitInterrupt as gi, empty as gn, getOrThrow$1 as go, effect as gr, byReferenceUnsafe as gs, never as gt, catchCauseIf as h, match$2 as ha, exitHasInterrupts as hi, TaggedClass as hn, getOrNull as ho, buildWithScope as hr, symbolRedactable as hs, matchEffect as ht, all as i, findLast as ia, memoizeIdempotent as ic, void_$1 as ii, void_ as in, merge$1 as io, isDieReason as ir, setStackTraceLimit as is, logInfo as it, ensuring as j, try_$2 as ja, makeLatch as ji, toStep as jn, Number$1 as jo, addFinalizer$1 as jr, isError as js, result as jt, die as k, match$3 as ka, iterateConcurrent as ki, min as kn, BigInt$1 as ko, unwrap as kr, isBigInt as ks, repeat as kt, asSome as l, isCanonicalArrayIndex as la, asSome$1 as li, withParentSpan as ln, flatMapNullishOr$1 as lo, makeFailReason as lr, format$1 as ls, mapEager as lt, catchCause as m, map$3 as ma, endSpan as mi, Class as mn, getOrElse$1 as mo, squash as mr, redact as ms, matchCauseEffect as mt, acquireUseRelease as n, findFirst as na, identity as nc, isSuccess as ni, updateService as nn, make$4 as no, interruptors as nr, assignProperty as ns, logError as nt, annotateCurrentSpan as o, fromIterable$1 as oa, Class$2 as oc, ConsoleRef as oi, whileLoop as on, exists as oo, isReason as or, Class$1 as os, makeSpanScoped as ot, callback as p, makeEquivalence as pa, effectIsExit as pi, equalBatchKeys as pn, fromUndefinedOr as po, reasonAnnotations as pr, formatPropertyKey as ps, matchCauseEager as pt, forkScoped as q, Reference as qa, ParentSpan as qi, die$1 as qn, causeFail as qo, isDoneUnsafe as qr, isUnknown as qs, tapCause as qt, addFinalizer as r, findFirstIndex as ra, memoize as rc, succeed$2 as ri, useSpan as rn, makeUnsafe$2 as ro, isCause as rr, getStackTraceLimit as rs, logFatal as rt, annotateLogs as s, headNonEmpty as sa, Prototype$1 as sc, LogToStderr as si, withFiber as sn, filter as so, isTimeoutError as sr, NodeInspectSymbol as ss, map as st, acquireRelease as t, empty$2 as ta, flow as tc, isFailure as ti, updateContext as tn, getUnsafe$1 as to, hasInterruptsOnly as tr, assignProperties as ts, logDebug as tt, asVoid as u, isReadonlyArrayNonEmpty as ua, callback$1 as ui, withSpan as un, flatten$3 as uo, makeInterruptReason as ur, formatDate as us, mapError as ut, catchFilter as v, sort as va, exitZipRight as vi, get as vn, isNone as vo, effectDiscard as vr, symbol as vs, onExit as vt, catch_ as w, getOrThrow as wa, fiberJoin as wi, exponential as wn, none as wo, orDie$1 as wr, string as ws, promise as wt, catchReason as x, fail$4 as xa, fiberInterruptAll as xi, remove as xn, liftThrowable as xo, merge as xr, hash as xs, option as xt, catchIf as y, empty$3 as ya, fiberAwait as yi, isEmpty as yn, isOption as yo, empty$1 as yr, array as ys, onExitPrimitive as yt, flatten as z, millis as za, succeed$3 as zi, Done as zn, make$6 as zo, MinimumLogLevel as zr, isNullish as zs, scopedWith as zt };
|
|
4808
4995
|
|
|
4809
|
-
//# sourceMappingURL=Effect-
|
|
4996
|
+
//# sourceMappingURL=Effect-rADALOOD.mjs.map
|