@foldkit/devtools-mcp 0.14.1 → 0.14.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.
- package/dist/server.js +600 -506
- package/package.json +4 -4
package/dist/server.js
CHANGED
|
@@ -6925,7 +6925,7 @@ var require_buffer_util = __commonJS({
|
|
|
6925
6925
|
"use strict";
|
|
6926
6926
|
var { EMPTY_BUFFER } = require_constants();
|
|
6927
6927
|
var FastBuffer = Buffer[Symbol.species];
|
|
6928
|
-
function
|
|
6928
|
+
function concat3(list, totalLength) {
|
|
6929
6929
|
if (list.length === 0) return EMPTY_BUFFER;
|
|
6930
6930
|
if (list.length === 1) return list[0];
|
|
6931
6931
|
const target = Buffer.allocUnsafe(totalLength);
|
|
@@ -6971,7 +6971,7 @@ var require_buffer_util = __commonJS({
|
|
|
6971
6971
|
return buf;
|
|
6972
6972
|
}
|
|
6973
6973
|
module.exports = {
|
|
6974
|
-
concat:
|
|
6974
|
+
concat: concat3,
|
|
6975
6975
|
mask: _mask,
|
|
6976
6976
|
toArrayBuffer,
|
|
6977
6977
|
toBuffer,
|
|
@@ -7640,7 +7640,7 @@ var require_receiver = __commonJS({
|
|
|
7640
7640
|
kStatusCode,
|
|
7641
7641
|
kWebSocket
|
|
7642
7642
|
} = require_constants();
|
|
7643
|
-
var { concat:
|
|
7643
|
+
var { concat: concat3, toArrayBuffer, unmask } = require_buffer_util();
|
|
7644
7644
|
var { isValidStatusCode, isValidUTF8 } = require_validation2();
|
|
7645
7645
|
var FastBuffer = Buffer[Symbol.species];
|
|
7646
7646
|
var GET_INFO = 0;
|
|
@@ -8126,9 +8126,9 @@ var require_receiver = __commonJS({
|
|
|
8126
8126
|
if (this._opcode === 2) {
|
|
8127
8127
|
let data;
|
|
8128
8128
|
if (this._binaryType === "nodebuffer") {
|
|
8129
|
-
data =
|
|
8129
|
+
data = concat3(fragments, messageLength);
|
|
8130
8130
|
} else if (this._binaryType === "arraybuffer") {
|
|
8131
|
-
data = toArrayBuffer(
|
|
8131
|
+
data = toArrayBuffer(concat3(fragments, messageLength));
|
|
8132
8132
|
} else if (this._binaryType === "blob") {
|
|
8133
8133
|
data = new Blob(fragments);
|
|
8134
8134
|
} else {
|
|
@@ -8146,7 +8146,7 @@ var require_receiver = __commonJS({
|
|
|
8146
8146
|
});
|
|
8147
8147
|
}
|
|
8148
8148
|
} else {
|
|
8149
|
-
const buf =
|
|
8149
|
+
const buf = concat3(fragments, messageLength);
|
|
8150
8150
|
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
|
|
8151
8151
|
const error3 = this.createError(
|
|
8152
8152
|
Error,
|
|
@@ -10575,7 +10575,7 @@ var require_websocket_server = __commonJS({
|
|
|
10575
10575
|
}
|
|
10576
10576
|
});
|
|
10577
10577
|
|
|
10578
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
10578
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Pipeable.js
|
|
10579
10579
|
var pipeArguments = (self, args2) => {
|
|
10580
10580
|
switch (args2.length) {
|
|
10581
10581
|
case 0:
|
|
@@ -10619,7 +10619,7 @@ var Class = /* @__PURE__ */ (function() {
|
|
|
10619
10619
|
return PipeableBase;
|
|
10620
10620
|
})();
|
|
10621
10621
|
|
|
10622
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
10622
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Function.js
|
|
10623
10623
|
var dual = function(arity, body) {
|
|
10624
10624
|
if (typeof arity === "function") {
|
|
10625
10625
|
return function() {
|
|
@@ -10673,16 +10673,15 @@ function pipe(a, ...args2) {
|
|
|
10673
10673
|
function memoize(f) {
|
|
10674
10674
|
const cache2 = /* @__PURE__ */ new WeakMap();
|
|
10675
10675
|
return (a) => {
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
}
|
|
10676
|
+
const cached4 = cache2.get(a);
|
|
10677
|
+
if (cached4 !== void 0) return cached4;
|
|
10679
10678
|
const result5 = f(a);
|
|
10680
10679
|
cache2.set(a, result5);
|
|
10681
10680
|
return result5;
|
|
10682
10681
|
};
|
|
10683
10682
|
}
|
|
10684
10683
|
|
|
10685
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
10684
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Array.js
|
|
10686
10685
|
var Array_exports = {};
|
|
10687
10686
|
__export(Array_exports, {
|
|
10688
10687
|
Array: () => Array2,
|
|
@@ -10820,7 +10819,7 @@ __export(Array_exports, {
|
|
|
10820
10819
|
zipWith: () => zipWith2
|
|
10821
10820
|
});
|
|
10822
10821
|
|
|
10823
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
10822
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/equal.js
|
|
10824
10823
|
var getAllObjectKeys = (obj) => {
|
|
10825
10824
|
const keys4 = new Set(Reflect.ownKeys(obj));
|
|
10826
10825
|
if (obj.constructor === Object) return keys4;
|
|
@@ -10843,7 +10842,7 @@ var getAllObjectKeys = (obj) => {
|
|
|
10843
10842
|
};
|
|
10844
10843
|
var byReferenceInstances = /* @__PURE__ */ new WeakSet();
|
|
10845
10844
|
|
|
10846
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
10845
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Predicate.js
|
|
10847
10846
|
function isString(input) {
|
|
10848
10847
|
return typeof input === "string";
|
|
10849
10848
|
}
|
|
@@ -10901,7 +10900,7 @@ function isIterable(input) {
|
|
|
10901
10900
|
return hasProperty(input, Symbol.iterator) || isString(input);
|
|
10902
10901
|
}
|
|
10903
10902
|
|
|
10904
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
10903
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Hash.js
|
|
10905
10904
|
var symbol = "~effect/interfaces/Hash";
|
|
10906
10905
|
var hash = (self) => {
|
|
10907
10906
|
switch (typeof self) {
|
|
@@ -11025,7 +11024,7 @@ function withVisitedTracking(obj, fn3) {
|
|
|
11025
11024
|
return result5;
|
|
11026
11025
|
}
|
|
11027
11026
|
|
|
11028
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11027
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Equal.js
|
|
11029
11028
|
var symbol2 = "~effect/interfaces/Equal";
|
|
11030
11029
|
function equals() {
|
|
11031
11030
|
if (arguments.length === 1) {
|
|
@@ -11173,10 +11172,14 @@ function compareRecords(self, that) {
|
|
|
11173
11172
|
}
|
|
11174
11173
|
function makeCompareMap(keyEquivalence, valueEquivalence) {
|
|
11175
11174
|
return function compareMaps2(self, that) {
|
|
11175
|
+
const thatEntries = Array.from(that);
|
|
11176
11176
|
for (const [selfKey, selfValue] of self) {
|
|
11177
11177
|
let found = false;
|
|
11178
|
-
for (
|
|
11178
|
+
for (let i = 0; i < thatEntries.length; i++) {
|
|
11179
|
+
const [thatKey, thatValue] = thatEntries[i];
|
|
11179
11180
|
if (keyEquivalence(selfKey, thatKey) && valueEquivalence(selfValue, thatValue)) {
|
|
11181
|
+
thatEntries[i] = thatEntries[thatEntries.length - 1];
|
|
11182
|
+
thatEntries.pop();
|
|
11180
11183
|
found = true;
|
|
11181
11184
|
break;
|
|
11182
11185
|
}
|
|
@@ -11191,10 +11194,14 @@ function makeCompareMap(keyEquivalence, valueEquivalence) {
|
|
|
11191
11194
|
var compareMaps = /* @__PURE__ */ makeCompareMap(compareBoth, compareBoth);
|
|
11192
11195
|
function makeCompareSet(equivalence) {
|
|
11193
11196
|
return function compareSets2(self, that) {
|
|
11197
|
+
const thatValues = Array.from(that);
|
|
11194
11198
|
for (const selfValue of self) {
|
|
11195
11199
|
let found = false;
|
|
11196
|
-
for (
|
|
11200
|
+
for (let i = 0; i < thatValues.length; i++) {
|
|
11201
|
+
const thatValue = thatValues[i];
|
|
11197
11202
|
if (equivalence(selfValue, thatValue)) {
|
|
11203
|
+
thatValues[i] = thatValues[thatValues.length - 1];
|
|
11204
|
+
thatValues.pop();
|
|
11198
11205
|
found = true;
|
|
11199
11206
|
break;
|
|
11200
11207
|
}
|
|
@@ -11214,7 +11221,7 @@ var byReferenceUnsafe = (obj) => {
|
|
|
11214
11221
|
return obj;
|
|
11215
11222
|
};
|
|
11216
11223
|
|
|
11217
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11224
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Reducer.js
|
|
11218
11225
|
function make(combine2, initialValue, combineAll2) {
|
|
11219
11226
|
return {
|
|
11220
11227
|
combine: combine2,
|
|
@@ -11229,7 +11236,7 @@ function make(combine2, initialValue, combineAll2) {
|
|
|
11229
11236
|
};
|
|
11230
11237
|
}
|
|
11231
11238
|
|
|
11232
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11239
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Equivalence.js
|
|
11233
11240
|
var make2 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
11234
11241
|
var isStrictEquivalent = (x, y) => x === y;
|
|
11235
11242
|
var strictEqual = () => isStrictEquivalent;
|
|
@@ -11243,10 +11250,10 @@ function Array_(item) {
|
|
|
11243
11250
|
});
|
|
11244
11251
|
}
|
|
11245
11252
|
|
|
11246
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11253
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/array.js
|
|
11247
11254
|
var isArrayNonEmpty = (self) => self.length > 0;
|
|
11248
11255
|
|
|
11249
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11256
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/doNotation.js
|
|
11250
11257
|
var let_ = (map15) => dual(3, (self, name, f) => map15(self, (a) => ({
|
|
11251
11258
|
...a,
|
|
11252
11259
|
[name]: f(a)
|
|
@@ -11259,7 +11266,7 @@ var bind = (map15, flatMap8) => dual(3, (self, name, f) => flatMap8(self, (a) =>
|
|
|
11259
11266
|
[name]: b
|
|
11260
11267
|
}))));
|
|
11261
11268
|
|
|
11262
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11269
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/record.js
|
|
11263
11270
|
function assignProperty(self, key, value5) {
|
|
11264
11271
|
if (key === "__proto__") {
|
|
11265
11272
|
Object.defineProperty(self, key, {
|
|
@@ -11281,7 +11288,7 @@ function assignProperties(self, source) {
|
|
|
11281
11288
|
}
|
|
11282
11289
|
}
|
|
11283
11290
|
|
|
11284
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11291
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Option.js
|
|
11285
11292
|
var Option_exports = {};
|
|
11286
11293
|
__export(Option_exports, {
|
|
11287
11294
|
Do: () => Do,
|
|
@@ -11346,7 +11353,7 @@ __export(Option_exports, {
|
|
|
11346
11353
|
zipWith: () => zipWith
|
|
11347
11354
|
});
|
|
11348
11355
|
|
|
11349
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11356
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Combiner.js
|
|
11350
11357
|
function make3(combine2) {
|
|
11351
11358
|
return {
|
|
11352
11359
|
combine: combine2
|
|
@@ -11359,7 +11366,7 @@ function max(order) {
|
|
|
11359
11366
|
return make3((self, that) => order(self, that) === 1 ? self : that);
|
|
11360
11367
|
}
|
|
11361
11368
|
|
|
11362
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11369
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Redactable.js
|
|
11363
11370
|
var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Redactable");
|
|
11364
11371
|
var isRedactable = (u) => hasProperty(u, symbolRedactable);
|
|
11365
11372
|
function redact(u) {
|
|
@@ -11381,7 +11388,7 @@ var emptyContext = {
|
|
|
11381
11388
|
}
|
|
11382
11389
|
};
|
|
11383
11390
|
|
|
11384
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11391
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Formatter.js
|
|
11385
11392
|
function format(input, options) {
|
|
11386
11393
|
const space = options?.space ?? 0;
|
|
11387
11394
|
const ancestors = /* @__PURE__ */ new WeakSet();
|
|
@@ -11486,7 +11493,7 @@ function formatJson(input, options) {
|
|
|
11486
11493
|
}, options?.space) ?? "null";
|
|
11487
11494
|
}
|
|
11488
11495
|
|
|
11489
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11496
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Inspectable.js
|
|
11490
11497
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
11491
11498
|
var toJson = (input) => {
|
|
11492
11499
|
try {
|
|
@@ -11550,7 +11557,7 @@ var Class2 = class {
|
|
|
11550
11557
|
}
|
|
11551
11558
|
};
|
|
11552
11559
|
|
|
11553
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11560
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Utils.js
|
|
11554
11561
|
var SingleShotGen = class _SingleShotGen {
|
|
11555
11562
|
called = false;
|
|
11556
11563
|
self;
|
|
@@ -11610,7 +11617,7 @@ var pickInternalCall = () => {
|
|
|
11610
11617
|
};
|
|
11611
11618
|
var internalCall = /* @__PURE__ */ pickInternalCall();
|
|
11612
11619
|
|
|
11613
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11620
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/core.js
|
|
11614
11621
|
var EffectTypeId = `~effect/Effect`;
|
|
11615
11622
|
var ExitTypeId = `~effect/Exit`;
|
|
11616
11623
|
var effectVariance = {
|
|
@@ -11971,7 +11978,7 @@ var done = (value5) => {
|
|
|
11971
11978
|
return exitFail(Done(value5));
|
|
11972
11979
|
};
|
|
11973
11980
|
|
|
11974
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
11981
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/option.js
|
|
11975
11982
|
var TypeId = "~effect/data/Option";
|
|
11976
11983
|
var CommonProto = {
|
|
11977
11984
|
[TypeId]: {
|
|
@@ -12037,7 +12044,7 @@ var some = (value5) => {
|
|
|
12037
12044
|
return a;
|
|
12038
12045
|
};
|
|
12039
12046
|
|
|
12040
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12047
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/result.js
|
|
12041
12048
|
var TypeId2 = "~effect/data/Result";
|
|
12042
12049
|
var CommonProto2 = {
|
|
12043
12050
|
[TypeId2]: {
|
|
@@ -12107,7 +12114,7 @@ var getFailure = (self) => isSuccess(self) ? none : some(self.failure);
|
|
|
12107
12114
|
var getSuccess = (self) => isFailure(self) ? none : some(self.success);
|
|
12108
12115
|
var fromOption = /* @__PURE__ */ dual(2, (self, onNone) => isNone(self) ? fail(onNone()) : succeed(self.value));
|
|
12109
12116
|
|
|
12110
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12117
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Order.js
|
|
12111
12118
|
function make4(compare) {
|
|
12112
12119
|
return (self, that) => self === that ? 0 : compare(self, that);
|
|
12113
12120
|
}
|
|
@@ -12155,7 +12162,7 @@ var max2 = (O) => dual(2, (self, that) => self === that || O(self, that) > -1 ?
|
|
|
12155
12162
|
var clamp = (O) => dual(2, (self, options) => min2(O)(options.maximum, max2(O)(options.minimum, self)));
|
|
12156
12163
|
var isBetween = (O) => dual(2, (self, options) => !isLessThan(O)(self, options.minimum) && !isGreaterThan(O)(self, options.maximum));
|
|
12157
12164
|
|
|
12158
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12165
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Option.js
|
|
12159
12166
|
var none2 = () => none;
|
|
12160
12167
|
var some2 = some;
|
|
12161
12168
|
var isOption2 = isOption;
|
|
@@ -12333,7 +12340,7 @@ function makeReducerFailFast(reducer2) {
|
|
|
12333
12340
|
});
|
|
12334
12341
|
}
|
|
12335
12342
|
|
|
12336
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12343
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Result.js
|
|
12337
12344
|
var succeed2 = succeed;
|
|
12338
12345
|
var fail2 = fail;
|
|
12339
12346
|
var fromOption2 = fromOption;
|
|
@@ -12390,10 +12397,10 @@ var all2 = (input) => {
|
|
|
12390
12397
|
return succeed2(out);
|
|
12391
12398
|
};
|
|
12392
12399
|
|
|
12393
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12400
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Tuple.js
|
|
12394
12401
|
var make5 = (...elements) => elements;
|
|
12395
12402
|
|
|
12396
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12403
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Iterable.js
|
|
12397
12404
|
var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
|
|
12398
12405
|
let i = 0;
|
|
12399
12406
|
for (const a of self) {
|
|
@@ -12436,7 +12443,7 @@ var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => ({
|
|
|
12436
12443
|
}
|
|
12437
12444
|
}));
|
|
12438
12445
|
|
|
12439
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12446
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Record.js
|
|
12440
12447
|
var collect = /* @__PURE__ */ dual(2, (self, f) => {
|
|
12441
12448
|
const out = [];
|
|
12442
12449
|
for (const key of keys(self)) {
|
|
@@ -12456,7 +12463,7 @@ var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
12456
12463
|
});
|
|
12457
12464
|
var keys = (self) => Object.keys(self);
|
|
12458
12465
|
|
|
12459
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12466
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Array.js
|
|
12460
12467
|
var Array2 = globalThis.Array;
|
|
12461
12468
|
var make6 = (...elements) => elements;
|
|
12462
12469
|
var allocate = (n) => new Array2(n);
|
|
@@ -13161,7 +13168,7 @@ var countBy = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
13161
13168
|
return count2;
|
|
13162
13169
|
});
|
|
13163
13170
|
|
|
13164
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13171
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/BigDecimal.js
|
|
13165
13172
|
var FINITE_INT_REGEXP = /^[+-]?\d+$/;
|
|
13166
13173
|
var TypeId3 = "~effect/BigDecimal";
|
|
13167
13174
|
var BigDecimalProto = {
|
|
@@ -13390,49 +13397,23 @@ var floor = /* @__PURE__ */ dual(isBigDecimalArgs, (self, scale2 = 0) => {
|
|
|
13390
13397
|
return truncated;
|
|
13391
13398
|
});
|
|
13392
13399
|
|
|
13393
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13400
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Boolean.js
|
|
13394
13401
|
var Boolean2 = globalThis.Boolean;
|
|
13395
13402
|
var ReducerOr = /* @__PURE__ */ make((a, b) => a || b, false);
|
|
13396
13403
|
|
|
13397
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13404
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Effectable.js
|
|
13398
13405
|
var Prototype2 = (options) => makePrimitiveProto({
|
|
13399
13406
|
op: options.label,
|
|
13400
13407
|
[evaluate]: options.evaluate
|
|
13401
13408
|
});
|
|
13402
13409
|
|
|
13403
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13404
|
-
var isStackTraceLimitWritable = () => {
|
|
13405
|
-
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
13406
|
-
if (desc === void 0) {
|
|
13407
|
-
return Object.isExtensible(Error);
|
|
13408
|
-
}
|
|
13409
|
-
return Object.hasOwn(desc, "writable") ? desc.writable === true : desc.set !== void 0;
|
|
13410
|
-
};
|
|
13411
|
-
var canWriteStackTraceLimit = /* @__PURE__ */ isStackTraceLimitWritable();
|
|
13412
|
-
var getStackTraceLimit = () => Error.stackTraceLimit;
|
|
13413
|
-
var setStackTraceLimit = (value5) => {
|
|
13414
|
-
if (canWriteStackTraceLimit) {
|
|
13415
|
-
;
|
|
13416
|
-
Error.stackTraceLimit = value5;
|
|
13417
|
-
}
|
|
13418
|
-
};
|
|
13419
|
-
|
|
13420
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.103/node_modules/effect/dist/Context.js
|
|
13410
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Context.js
|
|
13421
13411
|
var ServiceTypeId = "~effect/Context/Service";
|
|
13422
13412
|
var Service = function() {
|
|
13423
|
-
const prevLimit = getStackTraceLimit();
|
|
13424
|
-
setStackTraceLimit(2);
|
|
13425
|
-
const err = new Error();
|
|
13426
|
-
setStackTraceLimit(prevLimit);
|
|
13427
13413
|
function KeyClass() {
|
|
13428
13414
|
}
|
|
13429
13415
|
const self = KeyClass;
|
|
13430
13416
|
Object.setPrototypeOf(self, ServiceProto);
|
|
13431
|
-
Object.defineProperty(self, "stack", {
|
|
13432
|
-
get() {
|
|
13433
|
-
return err.stack;
|
|
13434
|
-
}
|
|
13435
|
-
});
|
|
13436
13417
|
const init2 = (key, options) => {
|
|
13437
13418
|
self.key = key;
|
|
13438
13419
|
if (options?.defaultValue) {
|
|
@@ -13461,8 +13442,7 @@ var ServiceProto = {
|
|
|
13461
13442
|
toJSON() {
|
|
13462
13443
|
return {
|
|
13463
13444
|
_id: "Service",
|
|
13464
|
-
key: this.key
|
|
13465
|
-
stack: this.stack
|
|
13445
|
+
key: this.key
|
|
13466
13446
|
};
|
|
13467
13447
|
},
|
|
13468
13448
|
of(self) {
|
|
@@ -13600,15 +13580,6 @@ var getDefaultValue = (ref) => {
|
|
|
13600
13580
|
};
|
|
13601
13581
|
var serviceNotFoundError = (service3) => {
|
|
13602
13582
|
const error3 = new Error(`Service not found${service3.key ? `: ${String(service3.key)}` : ""}`);
|
|
13603
|
-
if (service3.stack) {
|
|
13604
|
-
const lines = service3.stack.split("\n");
|
|
13605
|
-
if (lines.length > 2) {
|
|
13606
|
-
const afterAt = lines[2].match(/at (.*)/);
|
|
13607
|
-
if (afterAt) {
|
|
13608
|
-
error3.message = error3.message + ` (defined at ${afterAt[1]})`;
|
|
13609
|
-
}
|
|
13610
|
-
}
|
|
13611
|
-
}
|
|
13612
13583
|
if (error3.stack) {
|
|
13613
13584
|
const lines = error3.stack.split("\n");
|
|
13614
13585
|
lines.splice(1, 3);
|
|
@@ -13637,7 +13608,7 @@ var mergeAll = (...ctxs) => {
|
|
|
13637
13608
|
};
|
|
13638
13609
|
var Reference = Service;
|
|
13639
13610
|
|
|
13640
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13611
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Duration.js
|
|
13641
13612
|
var Duration_exports = {};
|
|
13642
13613
|
__export(Duration_exports, {
|
|
13643
13614
|
CombinerMax: () => CombinerMax,
|
|
@@ -13696,6 +13667,8 @@ __export(Duration_exports, {
|
|
|
13696
13667
|
var TypeId5 = "~effect/time/Duration";
|
|
13697
13668
|
var bigint02 = /* @__PURE__ */ BigInt(0);
|
|
13698
13669
|
var bigint12 = /* @__PURE__ */ BigInt(1);
|
|
13670
|
+
var bigint2 = /* @__PURE__ */ BigInt(2);
|
|
13671
|
+
var bigint102 = /* @__PURE__ */ BigInt(10);
|
|
13699
13672
|
var bigint24 = /* @__PURE__ */ BigInt(24);
|
|
13700
13673
|
var bigint60 = /* @__PURE__ */ BigInt(60);
|
|
13701
13674
|
var bigint1e3 = /* @__PURE__ */ BigInt(1e3);
|
|
@@ -13703,7 +13676,16 @@ var bigint1e6 = /* @__PURE__ */ BigInt(1e6);
|
|
|
13703
13676
|
var bigint1e9 = /* @__PURE__ */ BigInt(1e9);
|
|
13704
13677
|
var roundTiesAwayFromZero = (input) => BigInt(input < 0 ? Math.ceil(input - 0.5) : Math.floor(input + 0.5));
|
|
13705
13678
|
var roundMillisToNanos = (millis2) => roundTiesAwayFromZero(millis2 * 1e6);
|
|
13706
|
-
var parseNanos = (input, scale2) =>
|
|
13679
|
+
var parseNanos = (input, scale2) => {
|
|
13680
|
+
const decimalIndex = input.indexOf(".");
|
|
13681
|
+
if (decimalIndex === -1) return BigInt(input) * scale2;
|
|
13682
|
+
const isNegative3 = input[0] === "-";
|
|
13683
|
+
const fractional = input.slice(decimalIndex + 1);
|
|
13684
|
+
const fractionalScale = bigint102 ** BigInt(fractional.length);
|
|
13685
|
+
const scaled = (BigInt(input.slice(isNegative3 ? 1 : 0, decimalIndex)) * fractionalScale + BigInt(fractional)) * scale2;
|
|
13686
|
+
const rounded = scaled / fractionalScale + (scaled % fractionalScale * bigint2 >= fractionalScale ? bigint12 : bigint02);
|
|
13687
|
+
return isNegative3 ? -rounded : rounded;
|
|
13688
|
+
};
|
|
13707
13689
|
var nanosToHrTime = (nanos2) => {
|
|
13708
13690
|
const sign2 = nanos2 < bigint02 ? -bigint12 : bigint12;
|
|
13709
13691
|
const absolute = nanos2 < bigint02 ? -nanos2 : nanos2;
|
|
@@ -14205,7 +14187,7 @@ var ReducerSum = /* @__PURE__ */ make(sum2, zero2);
|
|
|
14205
14187
|
var CombinerMax = /* @__PURE__ */ max(Order2);
|
|
14206
14188
|
var CombinerMin = /* @__PURE__ */ min(Order2);
|
|
14207
14189
|
|
|
14208
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14190
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Filter.js
|
|
14209
14191
|
var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
14210
14192
|
const leftOut = left(input);
|
|
14211
14193
|
if (isFailure2(leftOut)) return fail2(input);
|
|
@@ -14214,7 +14196,7 @@ var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
|
14214
14196
|
return rightOut;
|
|
14215
14197
|
});
|
|
14216
14198
|
|
|
14217
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14199
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Scheduler.js
|
|
14218
14200
|
var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
|
|
14219
14201
|
fiberCached: true,
|
|
14220
14202
|
defaultValue: () => new MixedScheduler()
|
|
@@ -14351,7 +14333,7 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
|
|
|
14351
14333
|
defaultValue: () => false
|
|
14352
14334
|
});
|
|
14353
14335
|
|
|
14354
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14336
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Tracer.js
|
|
14355
14337
|
var ParentSpanKey = "effect/Tracer/ParentSpan";
|
|
14356
14338
|
var ParentSpan = class extends (/* @__PURE__ */ Service()(ParentSpanKey, {
|
|
14357
14339
|
fiberCached: true
|
|
@@ -14434,10 +14416,10 @@ var randomHexString = /* @__PURE__ */ (function() {
|
|
|
14434
14416
|
};
|
|
14435
14417
|
})();
|
|
14436
14418
|
|
|
14437
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14419
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/metric.js
|
|
14438
14420
|
var FiberRuntimeMetricsKey = "effect/observability/Metric/FiberRuntimeMetricsKey";
|
|
14439
14421
|
|
|
14440
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14422
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/references.js
|
|
14441
14423
|
var CurrentErrorReporters = /* @__PURE__ */ Reference("effect/ErrorReporter/CurrentErrorReporters", {
|
|
14442
14424
|
defaultValue: () => /* @__PURE__ */ new Set()
|
|
14443
14425
|
});
|
|
@@ -14472,7 +14454,24 @@ var CurrentLogSpans = /* @__PURE__ */ Reference("effect/References/CurrentLogSpa
|
|
|
14472
14454
|
defaultValue: () => []
|
|
14473
14455
|
});
|
|
14474
14456
|
|
|
14475
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14457
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/stackTraceLimit.js
|
|
14458
|
+
var isStackTraceLimitWritable = () => {
|
|
14459
|
+
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
14460
|
+
if (desc === void 0) {
|
|
14461
|
+
return Object.isExtensible(Error);
|
|
14462
|
+
}
|
|
14463
|
+
return Object.hasOwn(desc, "writable") ? desc.writable === true : desc.set !== void 0;
|
|
14464
|
+
};
|
|
14465
|
+
var canWriteStackTraceLimit = /* @__PURE__ */ isStackTraceLimitWritable();
|
|
14466
|
+
var getStackTraceLimit = () => Error.stackTraceLimit;
|
|
14467
|
+
var setStackTraceLimit = (value5) => {
|
|
14468
|
+
if (canWriteStackTraceLimit) {
|
|
14469
|
+
;
|
|
14470
|
+
Error.stackTraceLimit = value5;
|
|
14471
|
+
}
|
|
14472
|
+
};
|
|
14473
|
+
|
|
14474
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/tracer.js
|
|
14476
14475
|
var addSpanStackTrace = (options) => {
|
|
14477
14476
|
if (options?.captureStackTrace === false) {
|
|
14478
14477
|
return options;
|
|
@@ -14503,7 +14502,7 @@ var makeStackCleaner = (line) => (stack) => {
|
|
|
14503
14502
|
};
|
|
14504
14503
|
var spanCleaner = /* @__PURE__ */ makeStackCleaner(3);
|
|
14505
14504
|
|
|
14506
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14505
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/effect.js
|
|
14507
14506
|
var Interrupt = class extends ReasonBase {
|
|
14508
14507
|
fiberId;
|
|
14509
14508
|
constructor(fiberId3, annotations = constEmptyAnnotations) {
|
|
@@ -17070,7 +17069,7 @@ var reportCauseUnsafe = (fiber3, cause, defectsOnly) => {
|
|
|
17070
17069
|
reporters.forEach((reporter) => reporter.report(opts));
|
|
17071
17070
|
};
|
|
17072
17071
|
|
|
17073
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17072
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Cause.js
|
|
17074
17073
|
var isCause2 = isCause;
|
|
17075
17074
|
var isReason = isCauseReason;
|
|
17076
17075
|
var isFailReason2 = isFailReason;
|
|
@@ -17086,7 +17085,7 @@ var isDone2 = isDone;
|
|
|
17086
17085
|
var done2 = done;
|
|
17087
17086
|
var IllegalArgumentError2 = IllegalArgumentError;
|
|
17088
17087
|
|
|
17089
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17088
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Effect.js
|
|
17090
17089
|
var Effect_exports = {};
|
|
17091
17090
|
__export(Effect_exports, {
|
|
17092
17091
|
Do: () => Do4,
|
|
@@ -17098,7 +17097,7 @@ __export(Effect_exports, {
|
|
|
17098
17097
|
acquireUseRelease: () => acquireUseRelease2,
|
|
17099
17098
|
addFinalizer: () => addFinalizer2,
|
|
17100
17099
|
all: () => all4,
|
|
17101
|
-
andThen: () =>
|
|
17100
|
+
andThen: () => andThen3,
|
|
17102
17101
|
annotateCurrentSpan: () => annotateCurrentSpan2,
|
|
17103
17102
|
annotateLogs: () => annotateLogs,
|
|
17104
17103
|
annotateLogsScoped: () => annotateLogsScoped2,
|
|
@@ -17318,7 +17317,7 @@ __export(Effect_exports, {
|
|
|
17318
17317
|
zipWith: () => zipWith4
|
|
17319
17318
|
});
|
|
17320
17319
|
|
|
17321
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17320
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Exit.js
|
|
17322
17321
|
var Exit_exports = {};
|
|
17323
17322
|
__export(Exit_exports, {
|
|
17324
17323
|
asVoid: () => asVoid3,
|
|
@@ -17377,7 +17376,7 @@ var getSuccess3 = exitGetSuccess;
|
|
|
17377
17376
|
var getCause = exitGetCause;
|
|
17378
17377
|
var findErrorOption2 = exitFindErrorOption;
|
|
17379
17378
|
|
|
17380
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17379
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Deferred.js
|
|
17381
17380
|
var Deferred_exports = {};
|
|
17382
17381
|
__export(Deferred_exports, {
|
|
17383
17382
|
await: () => _await,
|
|
@@ -17461,16 +17460,16 @@ var doneUnsafe = (self, effect) => {
|
|
|
17461
17460
|
};
|
|
17462
17461
|
var into = /* @__PURE__ */ dual(2, (self, deferred) => uninterruptibleMask((restore) => flatMap4(exit(restore(self)), (exit3) => done3(deferred, exit3))));
|
|
17463
17462
|
|
|
17464
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17463
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/References.js
|
|
17465
17464
|
var CurrentLogAnnotations2 = CurrentLogAnnotations;
|
|
17466
17465
|
var CurrentLogSpans2 = CurrentLogSpans;
|
|
17467
17466
|
|
|
17468
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17467
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Scope.js
|
|
17469
17468
|
var makeUnsafe3 = scopeMakeUnsafe;
|
|
17470
17469
|
var forkUnsafe2 = scopeForkUnsafe;
|
|
17471
17470
|
var close = scopeClose;
|
|
17472
17471
|
|
|
17473
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17472
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Layer.js
|
|
17474
17473
|
var TypeId7 = "~effect/Layer";
|
|
17475
17474
|
var MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
17476
17475
|
var memoMapReuse = (entry, scope3) => {
|
|
@@ -17535,11 +17534,13 @@ var MemoMapImpl = class {
|
|
|
17535
17534
|
return this.parent?.get(layer, scope3);
|
|
17536
17535
|
}
|
|
17537
17536
|
getOrElseMemoize(layer, scope3, build) {
|
|
17538
|
-
|
|
17539
|
-
|
|
17540
|
-
|
|
17541
|
-
|
|
17542
|
-
|
|
17537
|
+
return suspend(() => {
|
|
17538
|
+
const existing = this.get(layer, scope3);
|
|
17539
|
+
if (existing) {
|
|
17540
|
+
return existing;
|
|
17541
|
+
}
|
|
17542
|
+
return memoMapBuild(this, layer, scope3, build);
|
|
17543
|
+
});
|
|
17543
17544
|
}
|
|
17544
17545
|
};
|
|
17545
17546
|
var makeMemoMapUnsafe = () => new MemoMapImpl();
|
|
@@ -17563,7 +17564,7 @@ var mergeAll2 = (...layers) => fromBuild((memoMap, scope3) => mergeAllEffect(lay
|
|
|
17563
17564
|
var provideWith = (self, that, f) => fromBuild((memoMap, scope3) => flatMap4(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope3) : that.build(memoMap, scope3), (context4) => self.build(memoMap, scope3).pipe(provideContext(context4), map5((merged) => f(merged, context4)))));
|
|
17564
17565
|
var provide2 = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, identity));
|
|
17565
17566
|
|
|
17566
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17567
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/ExecutionPlan.js
|
|
17567
17568
|
var TypeId8 = "~effect/ExecutionPlan";
|
|
17568
17569
|
var Proto2 = {
|
|
17569
17570
|
[TypeId8]: TypeId8,
|
|
@@ -17590,13 +17591,13 @@ var CurrentMetadata = /* @__PURE__ */ Reference("effect/ExecutionPlan/CurrentMet
|
|
|
17590
17591
|
})
|
|
17591
17592
|
});
|
|
17592
17593
|
|
|
17593
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17594
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Schedule.js
|
|
17594
17595
|
var Schedule_exports = {};
|
|
17595
17596
|
__export(Schedule_exports, {
|
|
17596
17597
|
CurrentMetadata: () => CurrentMetadata2,
|
|
17597
17598
|
addDelay: () => addDelay,
|
|
17598
|
-
|
|
17599
|
-
|
|
17599
|
+
concat: () => concat,
|
|
17600
|
+
concatResult: () => concatResult,
|
|
17600
17601
|
cron: () => cron,
|
|
17601
17602
|
duration: () => duration,
|
|
17602
17603
|
during: () => during,
|
|
@@ -17626,7 +17627,7 @@ __export(Schedule_exports, {
|
|
|
17626
17627
|
windowed: () => windowed
|
|
17627
17628
|
});
|
|
17628
17629
|
|
|
17629
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17630
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Data.js
|
|
17630
17631
|
var Class3 = class extends Class {
|
|
17631
17632
|
constructor(props) {
|
|
17632
17633
|
super();
|
|
@@ -17637,7 +17638,7 @@ var Class3 = class extends Class {
|
|
|
17637
17638
|
};
|
|
17638
17639
|
var TaggedError2 = TaggedError;
|
|
17639
17640
|
|
|
17640
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17641
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/dateTime.js
|
|
17641
17642
|
var TypeId9 = "~effect/time/DateTime";
|
|
17642
17643
|
var TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
|
|
17643
17644
|
var Proto3 = {
|
|
@@ -17778,7 +17779,7 @@ var makeUnsafe4 = (input) => {
|
|
|
17778
17779
|
return fromDateUnsafe(input);
|
|
17779
17780
|
} else if (typeof input === "object") {
|
|
17780
17781
|
if ("epochMilliseconds" in input) {
|
|
17781
|
-
return
|
|
17782
|
+
return fromDateUnsafe(new Date(input.epochMilliseconds));
|
|
17782
17783
|
}
|
|
17783
17784
|
const date6 = /* @__PURE__ */ new Date(0);
|
|
17784
17785
|
setPartsDate(date6, input);
|
|
@@ -18043,7 +18044,7 @@ var formatIsoOffset = (self) => {
|
|
|
18043
18044
|
};
|
|
18044
18045
|
var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
|
|
18045
18046
|
|
|
18046
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18047
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Number.js
|
|
18047
18048
|
var Number3 = globalThis.Number;
|
|
18048
18049
|
var Order4 = Number2;
|
|
18049
18050
|
var remainder = /* @__PURE__ */ dual(2, (self, divisor) => {
|
|
@@ -18085,13 +18086,13 @@ function toScientificInteger(n) {
|
|
|
18085
18086
|
var ReducerMax = /* @__PURE__ */ make((a, b) => Math.max(a, b), -Infinity);
|
|
18086
18087
|
var ReducerMin = /* @__PURE__ */ make((a, b) => Math.min(a, b), Infinity);
|
|
18087
18088
|
|
|
18088
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18089
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/String.js
|
|
18089
18090
|
var String2 = globalThis.String;
|
|
18090
18091
|
var toLowerCase = (self) => self.toLowerCase();
|
|
18091
18092
|
var trim = (self) => self.trim();
|
|
18092
18093
|
var isNonEmpty = (self) => self.length > 0;
|
|
18093
18094
|
|
|
18094
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18095
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Cron.js
|
|
18095
18096
|
var TypeId10 = "~effect/time/Cron";
|
|
18096
18097
|
function toPojo(cron2) {
|
|
18097
18098
|
const out = {
|
|
@@ -18610,7 +18611,7 @@ function aliasOrValue(field, aliases) {
|
|
|
18610
18611
|
}
|
|
18611
18612
|
var decimalRegex = /^\d+$/;
|
|
18612
18613
|
|
|
18613
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18614
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/random.js
|
|
18614
18615
|
var Random = /* @__PURE__ */ Reference("effect/Random", {
|
|
18615
18616
|
defaultValue: () => ({
|
|
18616
18617
|
nextIntUnsafe() {
|
|
@@ -18622,7 +18623,7 @@ var Random = /* @__PURE__ */ Reference("effect/Random", {
|
|
|
18622
18623
|
})
|
|
18623
18624
|
});
|
|
18624
18625
|
|
|
18625
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18626
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Pull.js
|
|
18626
18627
|
var catchDone = /* @__PURE__ */ dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
|
|
18627
18628
|
var filterDone = /* @__PURE__ */ composePassthrough(findError2, (e) => isDone2(e) ? succeed2(e) : fail2(e));
|
|
18628
18629
|
var filterDoneLeftover = /* @__PURE__ */ composePassthrough(findError2, (e) => isDone2(e) ? succeed2(e.value) : fail2(e));
|
|
@@ -18634,7 +18635,7 @@ var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(s
|
|
|
18634
18635
|
}
|
|
18635
18636
|
}));
|
|
18636
18637
|
|
|
18637
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18638
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Schedule.js
|
|
18638
18639
|
var TypeId11 = "~effect/Schedule";
|
|
18639
18640
|
var randomNext = /* @__PURE__ */ Random.useSync((random2) => random2.nextDoubleUnsafe());
|
|
18640
18641
|
var CurrentMetadata2 = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetadata", {
|
|
@@ -18703,10 +18704,10 @@ var toStepWithMetadata = (schedule2) => clockWith((clock) => map5(toStep(schedul
|
|
|
18703
18704
|
}));
|
|
18704
18705
|
var toStepWithSleep = (schedule2) => map5(toStepWithMetadata(schedule2), (step) => (input) => map5(step(input), (meta3) => meta3.output));
|
|
18705
18706
|
var addDelay = /* @__PURE__ */ dual(2, (self, f) => modifyDelay(self, (metadata) => map5(f(metadata), (d) => sum2(fromInputUnsafe(d), metadata.duration))));
|
|
18706
|
-
var
|
|
18707
|
+
var concat = /* @__PURE__ */ dual(2, (self, other) => map8(concatResult(self, other), ({
|
|
18707
18708
|
output
|
|
18708
18709
|
}) => succeed3(merge(output))));
|
|
18709
|
-
var
|
|
18710
|
+
var concatResult = /* @__PURE__ */ dual(2, (self, other) => fromStep(sync(() => {
|
|
18710
18711
|
let currentSide = 0;
|
|
18711
18712
|
let currentStep;
|
|
18712
18713
|
const left = map8(self, ({
|
|
@@ -18924,11 +18925,11 @@ var constIdentity = /* @__PURE__ */ fromStep(/* @__PURE__ */ succeed3((_now, inp
|
|
|
18924
18925
|
var identity_ = () => constIdentity;
|
|
18925
18926
|
var setInputType = () => (self) => self;
|
|
18926
18927
|
|
|
18927
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18928
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/layer.js
|
|
18928
18929
|
var provideLayer = (self, layer, options) => scopedWith((scope3) => flatMap4(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope3) : buildWithScope(layer, scope3), (context4) => provideContext(self, context4)));
|
|
18929
18930
|
var provide3 = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, source, options) => isContext(source) ? provideContext(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll2(...source) : source, options));
|
|
18930
18931
|
|
|
18931
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18932
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/schedule.js
|
|
18932
18933
|
var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule2, orElse4) => flatMap4(toStepWithMetadata(schedule2), (step) => {
|
|
18933
18934
|
let meta3 = CurrentMetadata2.defaultValue();
|
|
18934
18935
|
return catch_(forever(tap2(flatMap4(suspend(() => provideService(self, CurrentMetadata2, meta3)), step), (meta_) => sync(() => {
|
|
@@ -18999,8 +19000,51 @@ var buildFromOptions = (options) => {
|
|
|
18999
19000
|
return schedule2;
|
|
19000
19001
|
};
|
|
19001
19002
|
|
|
19002
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19003
|
-
var
|
|
19003
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/executionPlan.js
|
|
19004
|
+
var makeEventEmitter = (onEvent, currentMetadata) => {
|
|
19005
|
+
let lastStepIndex = -1;
|
|
19006
|
+
let stepAttempt = 0;
|
|
19007
|
+
return {
|
|
19008
|
+
begin: clockWith((clock) => suspend(() => {
|
|
19009
|
+
const meta3 = currentMetadata();
|
|
19010
|
+
if (meta3.stepIndex !== lastStepIndex) {
|
|
19011
|
+
lastStepIndex = meta3.stepIndex;
|
|
19012
|
+
stepAttempt = 0;
|
|
19013
|
+
}
|
|
19014
|
+
stepAttempt++;
|
|
19015
|
+
const state = {
|
|
19016
|
+
attempt: meta3.attempt,
|
|
19017
|
+
stepAttempt,
|
|
19018
|
+
stepIndex: meta3.stepIndex,
|
|
19019
|
+
startNanos: clock.monotonicTimeNanosUnsafe()
|
|
19020
|
+
};
|
|
19021
|
+
return as2(onEvent({
|
|
19022
|
+
_tag: "AttemptStart",
|
|
19023
|
+
attempt: state.attempt,
|
|
19024
|
+
stepAttempt: state.stepAttempt,
|
|
19025
|
+
stepIndex: state.stepIndex
|
|
19026
|
+
}), state);
|
|
19027
|
+
})),
|
|
19028
|
+
end: (state, exit3) => clockWith((clock) => {
|
|
19029
|
+
const duration4 = nanos(clock.monotonicTimeNanosUnsafe() - state.startNanos);
|
|
19030
|
+
return onEvent(exit3._tag === "Success" ? {
|
|
19031
|
+
_tag: "AttemptSuccess",
|
|
19032
|
+
attempt: state.attempt,
|
|
19033
|
+
stepAttempt: state.stepAttempt,
|
|
19034
|
+
stepIndex: state.stepIndex,
|
|
19035
|
+
duration: duration4
|
|
19036
|
+
} : {
|
|
19037
|
+
_tag: "AttemptFailure",
|
|
19038
|
+
attempt: state.attempt,
|
|
19039
|
+
stepAttempt: state.stepAttempt,
|
|
19040
|
+
stepIndex: state.stepIndex,
|
|
19041
|
+
duration: duration4,
|
|
19042
|
+
cause: exit3.cause
|
|
19043
|
+
});
|
|
19044
|
+
})
|
|
19045
|
+
};
|
|
19046
|
+
};
|
|
19047
|
+
var withExecutionPlan = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, plan, options) => suspend(() => {
|
|
19004
19048
|
let i = 0;
|
|
19005
19049
|
let meta3 = {
|
|
19006
19050
|
attempt: 0,
|
|
@@ -19013,12 +19057,14 @@ var withExecutionPlan = /* @__PURE__ */ dual(2, (self, plan) => suspend(() => {
|
|
|
19013
19057
|
};
|
|
19014
19058
|
return meta3;
|
|
19015
19059
|
}));
|
|
19060
|
+
const emitter = options?.onEvent === void 0 ? void 0 : makeEventEmitter(options.onEvent, () => meta3);
|
|
19061
|
+
const instrument = emitter === void 0 ? identity : (attempt) => uninterruptibleMask((restore) => flatMap4(emitter.begin, (state) => onExit(restore(attempt), (exit3) => emitter.end(state, exit3))));
|
|
19016
19062
|
let result5;
|
|
19017
19063
|
return flatMap4(whileLoop({
|
|
19018
19064
|
while: () => i < plan.steps.length && (result5 === void 0 || isFailure2(result5)),
|
|
19019
19065
|
body() {
|
|
19020
19066
|
const step = plan.steps[i];
|
|
19021
|
-
let nextEffect = provideMeta(provide3(self, step.provide));
|
|
19067
|
+
let nextEffect = provideMeta(instrument(provide3(self, step.provide)));
|
|
19022
19068
|
if (result5) {
|
|
19023
19069
|
let attempted = false;
|
|
19024
19070
|
const wrapped = nextEffect;
|
|
@@ -19058,7 +19104,7 @@ var scheduleFromStep = (step, first) => {
|
|
|
19058
19104
|
};
|
|
19059
19105
|
var scheduleOnce = /* @__PURE__ */ recurs(1);
|
|
19060
19106
|
|
|
19061
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19107
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Request.js
|
|
19062
19108
|
var TypeId12 = "~effect/Request";
|
|
19063
19109
|
var requestVariance = /* @__PURE__ */ byReferenceUnsafe({
|
|
19064
19110
|
/* c8 ignore next */
|
|
@@ -19074,7 +19120,7 @@ var RequestPrototype = {
|
|
|
19074
19120
|
};
|
|
19075
19121
|
var makeEntry = (options) => options;
|
|
19076
19122
|
|
|
19077
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19123
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/request.js
|
|
19078
19124
|
var request = /* @__PURE__ */ dual(2, (self, resolver) => {
|
|
19079
19125
|
const withResolver = (resolver2) => callback((resume) => {
|
|
19080
19126
|
const entry = addEntry(resolver2, self, resume, getCurrentFiber());
|
|
@@ -19184,7 +19230,7 @@ function runBatch(batch) {
|
|
|
19184
19230
|
return batch.run;
|
|
19185
19231
|
}
|
|
19186
19232
|
|
|
19187
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19233
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Metric.js
|
|
19188
19234
|
var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
|
|
19189
19235
|
var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
|
|
19190
19236
|
defaultValue: () => ({})
|
|
@@ -19284,7 +19330,7 @@ function attributesToRecord(attributes) {
|
|
|
19284
19330
|
return attributes;
|
|
19285
19331
|
}
|
|
19286
19332
|
|
|
19287
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19333
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Effect.js
|
|
19288
19334
|
var TypeId14 = EffectTypeId;
|
|
19289
19335
|
var isEffect2 = isEffect;
|
|
19290
19336
|
var all4 = all3;
|
|
@@ -19326,7 +19372,7 @@ var transposeOption2 = transposeOption;
|
|
|
19326
19372
|
var fromNullishOr4 = fromNullishOr3;
|
|
19327
19373
|
var flatMap5 = flatMap4;
|
|
19328
19374
|
var flatten5 = flatten4;
|
|
19329
|
-
var
|
|
19375
|
+
var andThen3 = andThen2;
|
|
19330
19376
|
var tap4 = tap2;
|
|
19331
19377
|
var result2 = result;
|
|
19332
19378
|
var option2 = option;
|
|
@@ -19639,7 +19685,7 @@ var flatMapEager2 = flatMapEager;
|
|
|
19639
19685
|
var catchEager2 = catchEager;
|
|
19640
19686
|
var fnUntracedEager2 = fnUntracedEager;
|
|
19641
19687
|
|
|
19642
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19688
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/schema/annotations.js
|
|
19643
19689
|
function resolve(ast) {
|
|
19644
19690
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
19645
19691
|
}
|
|
@@ -19649,6 +19695,7 @@ function resolveAt(key) {
|
|
|
19649
19695
|
var STRUCTURAL_ANNOTATION_KEY = "~structural";
|
|
19650
19696
|
var IDENTIFIER_FALLBACK_KEY = "~identifier";
|
|
19651
19697
|
var SENTINELS_ANNOTATION_KEY = "~sentinels";
|
|
19698
|
+
var CONSTRUCTOR_ANNOTATION_KEY = "~constructor";
|
|
19652
19699
|
var jsonSchemaAnnotationKeys = ["title", "description", "default", "examples", "readOnly", "writeOnly", "format", "contentEncoding", "contentMediaType", "contentSchema"];
|
|
19653
19700
|
var resolveIdentifier = /* @__PURE__ */ resolveAt("identifier");
|
|
19654
19701
|
var resolveIdentifierFallback = /* @__PURE__ */ resolveAt(IDENTIFIER_FALLBACK_KEY);
|
|
@@ -19661,15 +19708,28 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
|
|
|
19661
19708
|
});
|
|
19662
19709
|
var annotationExcludedKeys = /* @__PURE__ */ new Set([SENTINELS_ANNOTATION_KEY, STRUCTURAL_ANNOTATION_KEY, "representation", "arbitrary", "brands", "toJsonSchema", "toCode", "toArbitrary", "toEquivalence", "toFormatter", "toCodec", "toCodecJson", "toCodecStringTree", "toCodecIso"]);
|
|
19663
19710
|
|
|
19664
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19711
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/schema/parser.js
|
|
19712
|
+
var missing = /* @__PURE__ */ Symbol();
|
|
19713
|
+
var succeed7 = succeed4;
|
|
19714
|
+
var missingExit = /* @__PURE__ */ succeed7(missing);
|
|
19715
|
+
var sameExit = /* @__PURE__ */ succeed7(missing);
|
|
19716
|
+
var toOption2 = (value5) => value5 === missing ? none2() : some2(value5);
|
|
19717
|
+
var fromOptionExit = (option6) => option6._tag === "None" ? missingExit : succeed7(option6.value);
|
|
19718
|
+
|
|
19719
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/SchemaIssue.js
|
|
19665
19720
|
var TypeId15 = "~effect/SchemaIssue/Issue";
|
|
19666
19721
|
function isIssue(u) {
|
|
19667
19722
|
return hasProperty(u, TypeId15) && u[TypeId15] === TypeId15;
|
|
19668
19723
|
}
|
|
19724
|
+
function hasInput(issue2) {
|
|
19725
|
+
return Object.hasOwn(issue2, "input");
|
|
19726
|
+
}
|
|
19669
19727
|
var Base = class {
|
|
19670
19728
|
[TypeId15] = TypeId15;
|
|
19671
|
-
|
|
19672
|
-
|
|
19729
|
+
constructor(input, options) {
|
|
19730
|
+
if (options?.reportInput === true && input !== missing) {
|
|
19731
|
+
this.input = input;
|
|
19732
|
+
}
|
|
19673
19733
|
}
|
|
19674
19734
|
};
|
|
19675
19735
|
var Filter = class extends Base {
|
|
@@ -19682,8 +19742,8 @@ var Filter = class extends Base {
|
|
|
19682
19742
|
* The issue that occurred.
|
|
19683
19743
|
*/
|
|
19684
19744
|
issue;
|
|
19685
|
-
constructor(filter9, issue2) {
|
|
19686
|
-
super();
|
|
19745
|
+
constructor(filter9, issue2, input, options) {
|
|
19746
|
+
super(input, options);
|
|
19687
19747
|
this.filter = filter9;
|
|
19688
19748
|
this.issue = issue2;
|
|
19689
19749
|
}
|
|
@@ -19698,8 +19758,8 @@ var Encoding = class extends Base {
|
|
|
19698
19758
|
* The issue that occurred.
|
|
19699
19759
|
*/
|
|
19700
19760
|
issue;
|
|
19701
|
-
constructor(ast, issue2) {
|
|
19702
|
-
super();
|
|
19761
|
+
constructor(ast, issue2, input, options) {
|
|
19762
|
+
super(input, options);
|
|
19703
19763
|
this.ast = ast;
|
|
19704
19764
|
this.issue = issue2;
|
|
19705
19765
|
}
|
|
@@ -19737,8 +19797,8 @@ var UnexpectedKey = class extends Base {
|
|
|
19737
19797
|
* The schema that caused the issue.
|
|
19738
19798
|
*/
|
|
19739
19799
|
ast;
|
|
19740
|
-
constructor(ast) {
|
|
19741
|
-
super();
|
|
19800
|
+
constructor(ast, input, options) {
|
|
19801
|
+
super(input, options);
|
|
19742
19802
|
this.ast = ast;
|
|
19743
19803
|
}
|
|
19744
19804
|
};
|
|
@@ -19752,8 +19812,8 @@ var Composite = class extends Base {
|
|
|
19752
19812
|
* The issues that occurred.
|
|
19753
19813
|
*/
|
|
19754
19814
|
issues;
|
|
19755
|
-
constructor(ast, issues) {
|
|
19756
|
-
super();
|
|
19815
|
+
constructor(ast, issues, input, options) {
|
|
19816
|
+
super(input, options);
|
|
19757
19817
|
this.ast = ast;
|
|
19758
19818
|
this.issues = issues;
|
|
19759
19819
|
}
|
|
@@ -19764,8 +19824,8 @@ var InvalidType = class extends Base {
|
|
|
19764
19824
|
* The schema that caused the issue.
|
|
19765
19825
|
*/
|
|
19766
19826
|
ast;
|
|
19767
|
-
constructor(ast) {
|
|
19768
|
-
super();
|
|
19827
|
+
constructor(ast, input, options) {
|
|
19828
|
+
super(input, options);
|
|
19769
19829
|
this.ast = ast;
|
|
19770
19830
|
}
|
|
19771
19831
|
};
|
|
@@ -19775,19 +19835,22 @@ var InvalidValue = class extends Base {
|
|
|
19775
19835
|
* The metadata for the issue.
|
|
19776
19836
|
*/
|
|
19777
19837
|
annotations;
|
|
19778
|
-
constructor(annotations) {
|
|
19779
|
-
super();
|
|
19838
|
+
constructor(annotations, input, options) {
|
|
19839
|
+
super(input, options);
|
|
19780
19840
|
this.annotations = annotations;
|
|
19781
19841
|
}
|
|
19782
19842
|
};
|
|
19843
|
+
function makeCompositeAtKey(compositeAst, pointerKey, pointerIssue, compositeInput, parseOptions) {
|
|
19844
|
+
return new Composite(compositeAst, [new Pointer([pointerKey], pointerIssue)], compositeInput, parseOptions);
|
|
19845
|
+
}
|
|
19783
19846
|
var Forbidden = class extends Base {
|
|
19784
19847
|
_tag = "Forbidden";
|
|
19785
19848
|
/**
|
|
19786
19849
|
* The metadata for the issue.
|
|
19787
19850
|
*/
|
|
19788
19851
|
annotations;
|
|
19789
|
-
constructor(annotations) {
|
|
19790
|
-
super();
|
|
19852
|
+
constructor(annotations, input, options) {
|
|
19853
|
+
super(input, options);
|
|
19791
19854
|
this.annotations = annotations;
|
|
19792
19855
|
}
|
|
19793
19856
|
};
|
|
@@ -19801,8 +19864,8 @@ var AnyOf = class extends Base {
|
|
|
19801
19864
|
* The issues that occurred.
|
|
19802
19865
|
*/
|
|
19803
19866
|
issues;
|
|
19804
|
-
constructor(ast, issues) {
|
|
19805
|
-
super();
|
|
19867
|
+
constructor(ast, issues, input, options) {
|
|
19868
|
+
super(input, options);
|
|
19806
19869
|
this.ast = ast;
|
|
19807
19870
|
this.issues = issues;
|
|
19808
19871
|
}
|
|
@@ -19817,72 +19880,86 @@ var OneOf = class extends Base {
|
|
|
19817
19880
|
* The schemas that were successful.
|
|
19818
19881
|
*/
|
|
19819
19882
|
successes;
|
|
19820
|
-
constructor(ast, successes) {
|
|
19821
|
-
super();
|
|
19883
|
+
constructor(ast, successes, input, options) {
|
|
19884
|
+
super(input, options);
|
|
19822
19885
|
this.ast = ast;
|
|
19823
19886
|
this.successes = successes;
|
|
19824
19887
|
}
|
|
19825
19888
|
};
|
|
19826
|
-
function makeFilterIssue(entry) {
|
|
19889
|
+
function makeFilterIssue(entry, input, options) {
|
|
19827
19890
|
if (isIssue(entry)) {
|
|
19828
19891
|
return entry;
|
|
19829
19892
|
}
|
|
19830
19893
|
if (typeof entry === "string") {
|
|
19831
19894
|
return new InvalidValue({
|
|
19832
19895
|
message: entry
|
|
19833
|
-
});
|
|
19896
|
+
}, input, options);
|
|
19834
19897
|
}
|
|
19835
19898
|
const inner = typeof entry.issue === "string" ? new InvalidValue({
|
|
19836
19899
|
message: entry.issue
|
|
19837
|
-
}) : entry.issue;
|
|
19900
|
+
}, input, options) : entry.issue;
|
|
19838
19901
|
return new Pointer(entry.path, inner);
|
|
19839
19902
|
}
|
|
19840
|
-
function makeSingle(out) {
|
|
19903
|
+
function makeSingle(out, input, options) {
|
|
19841
19904
|
if (out === void 0) {
|
|
19842
19905
|
return void 0;
|
|
19843
19906
|
}
|
|
19844
19907
|
if (typeof out === "boolean") {
|
|
19845
|
-
return out ? void 0 : new InvalidValue();
|
|
19908
|
+
return out ? void 0 : new InvalidValue(void 0, input, options);
|
|
19846
19909
|
}
|
|
19847
|
-
return makeFilterIssue(out);
|
|
19910
|
+
return makeFilterIssue(out, input, options);
|
|
19848
19911
|
}
|
|
19849
|
-
function normalizeFilterOutput(ast, out) {
|
|
19912
|
+
function normalizeFilterOutput(ast, out, input, options) {
|
|
19850
19913
|
if (Array.isArray(out)) {
|
|
19851
19914
|
if (!isReadonlyArrayNonEmpty(out)) {
|
|
19852
19915
|
return void 0;
|
|
19853
19916
|
}
|
|
19854
|
-
return out.length === 1 ? makeFilterIssue(out[0]) : new Composite(ast, map4(out, makeFilterIssue));
|
|
19917
|
+
return out.length === 1 ? makeFilterIssue(out[0], input, options) : new Composite(ast, map4(out, (entry) => makeFilterIssue(entry, input, options)), input, options);
|
|
19855
19918
|
}
|
|
19856
|
-
return makeSingle(out);
|
|
19919
|
+
return makeSingle(out, input, options);
|
|
19857
19920
|
}
|
|
19858
19921
|
var defaultLeafHook = (issue2) => {
|
|
19859
19922
|
const message = findMessage(issue2);
|
|
19860
19923
|
if (message !== void 0) return message;
|
|
19861
19924
|
switch (issue2._tag) {
|
|
19862
19925
|
case "InvalidType":
|
|
19863
|
-
return getExpectedMessage(getExpected(issue2.ast));
|
|
19864
|
-
case "InvalidValue":
|
|
19865
|
-
|
|
19926
|
+
return getExpectedMessage(getExpected(issue2.ast), issue2);
|
|
19927
|
+
case "InvalidValue": {
|
|
19928
|
+
const expected = findExpected(issue2);
|
|
19929
|
+
if (expected !== void 0) return getExpectedMessage(expected, issue2);
|
|
19930
|
+
const input = formatInput(issue2);
|
|
19931
|
+
return input === void 0 ? "Expected a valid value" : `Invalid data ${input}`;
|
|
19932
|
+
}
|
|
19866
19933
|
case "MissingKey":
|
|
19867
19934
|
return "Missing key";
|
|
19868
|
-
case "UnexpectedKey":
|
|
19869
|
-
|
|
19935
|
+
case "UnexpectedKey": {
|
|
19936
|
+
const input = formatInput(issue2);
|
|
19937
|
+
return input === void 0 ? "Expected no excess property" : `Unexpected key with value ${input}`;
|
|
19938
|
+
}
|
|
19870
19939
|
case "Forbidden":
|
|
19871
19940
|
return "Forbidden operation";
|
|
19872
|
-
case "OneOf":
|
|
19873
|
-
|
|
19941
|
+
case "OneOf": {
|
|
19942
|
+
const input = formatInput(issue2);
|
|
19943
|
+
return input === void 0 ? "Expected exactly one member to match" : `Expected exactly one member to match the input ${input}`;
|
|
19944
|
+
}
|
|
19874
19945
|
}
|
|
19875
19946
|
};
|
|
19876
|
-
var defaultCheckHook = (issue2) =>
|
|
19877
|
-
return findMessage(issue2.issue) ?? findMessage(issue2);
|
|
19878
|
-
};
|
|
19947
|
+
var defaultCheckHook = (issue2) => findMessage(issue2.issue) ?? findMessage(issue2);
|
|
19879
19948
|
function makeFormatterStandardSchemaV1(options) {
|
|
19880
19949
|
return (issue2) => ({
|
|
19881
19950
|
issues: toDefaultIssues(issue2, [], options?.leafHook ?? defaultLeafHook, options?.checkHook ?? defaultCheckHook)
|
|
19882
19951
|
});
|
|
19883
19952
|
}
|
|
19884
|
-
function
|
|
19885
|
-
return
|
|
19953
|
+
function formatInput(issue2) {
|
|
19954
|
+
return hasInput(issue2) ? format(issue2.input) : void 0;
|
|
19955
|
+
}
|
|
19956
|
+
function findExpected(issue2) {
|
|
19957
|
+
const expected = issue2.annotations?.expected;
|
|
19958
|
+
return typeof expected === "string" ? expected : void 0;
|
|
19959
|
+
}
|
|
19960
|
+
function getExpectedMessage(expected, issue2) {
|
|
19961
|
+
const input = formatInput(issue2);
|
|
19962
|
+
return input === void 0 ? `Expected ${expected}` : `Expected ${expected}, got ${input}`;
|
|
19886
19963
|
}
|
|
19887
19964
|
function toDefaultIssues(issue2, path, leafHook, checkHook) {
|
|
19888
19965
|
switch (issue2._tag) {
|
|
@@ -19894,15 +19971,14 @@ function toDefaultIssues(issue2, path, leafHook, checkHook) {
|
|
|
19894
19971
|
message
|
|
19895
19972
|
}];
|
|
19896
19973
|
}
|
|
19897
|
-
|
|
19898
|
-
|
|
19899
|
-
return [{
|
|
19900
|
-
path,
|
|
19901
|
-
message: getExpectedMessage(formatCheck(issue2.filter))
|
|
19902
|
-
}];
|
|
19903
|
-
default:
|
|
19904
|
-
return toDefaultIssues(issue2.issue, path, leafHook, checkHook);
|
|
19974
|
+
if (issue2.issue._tag !== "InvalidValue") {
|
|
19975
|
+
return toDefaultIssues(issue2.issue, path, leafHook, checkHook);
|
|
19905
19976
|
}
|
|
19977
|
+
const expected = findExpected(issue2.issue);
|
|
19978
|
+
return [{
|
|
19979
|
+
path,
|
|
19980
|
+
message: expected === void 0 ? getExpectedMessage(formatCheck(issue2.filter), issue2) : getExpectedMessage(expected, issue2.issue)
|
|
19981
|
+
}];
|
|
19906
19982
|
}
|
|
19907
19983
|
case "Encoding":
|
|
19908
19984
|
return toDefaultIssues(issue2.issue, path, leafHook, checkHook);
|
|
@@ -19914,7 +19990,7 @@ function toDefaultIssues(issue2, path, leafHook, checkHook) {
|
|
|
19914
19990
|
if (issue2.issues.length === 0) {
|
|
19915
19991
|
return [{
|
|
19916
19992
|
path,
|
|
19917
|
-
message: findMessage(issue2) ?? getExpectedMessage(getExpected(issue2.ast))
|
|
19993
|
+
message: findMessage(issue2) ?? getExpectedMessage(getExpected(issue2.ast), issue2)
|
|
19918
19994
|
}];
|
|
19919
19995
|
}
|
|
19920
19996
|
return issue2.issues.flatMap((issue3) => toDefaultIssues(issue3, path, leafHook, checkHook));
|
|
@@ -19974,7 +20050,7 @@ function getMessageAnnotation(annotations, type3 = "message") {
|
|
|
19974
20050
|
if (typeof message === "string") return message;
|
|
19975
20051
|
}
|
|
19976
20052
|
|
|
19977
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
20053
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/schema/cause.js
|
|
19978
20054
|
function getSchemaIssue(cause) {
|
|
19979
20055
|
let issue2;
|
|
19980
20056
|
for (const reason of cause.reasons) {
|
|
@@ -19995,15 +20071,7 @@ function getSchemaIssueOrThrow(cause, message) {
|
|
|
19995
20071
|
return issue2;
|
|
19996
20072
|
}
|
|
19997
20073
|
|
|
19998
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19999
|
-
var missing = /* @__PURE__ */ Symbol();
|
|
20000
|
-
var succeed7 = succeed4;
|
|
20001
|
-
var missingExit = /* @__PURE__ */ succeed7(missing);
|
|
20002
|
-
var sameExit = /* @__PURE__ */ succeed7(missing);
|
|
20003
|
-
var toOption2 = (value5) => value5 === missing ? none2() : some2(value5);
|
|
20004
|
-
var fromOptionExit = (option6) => option6._tag === "None" ? missingExit : succeed7(option6.value);
|
|
20005
|
-
|
|
20006
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.103/node_modules/effect/dist/DateTime.js
|
|
20074
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/DateTime.js
|
|
20007
20075
|
var isDateTime2 = isDateTime;
|
|
20008
20076
|
var isTimeZone2 = isTimeZone;
|
|
20009
20077
|
var isTimeZoneOffset2 = isTimeZoneOffset;
|
|
@@ -20027,7 +20095,7 @@ var toEpochMillis2 = toEpochMillis;
|
|
|
20027
20095
|
var formatIso2 = formatIso;
|
|
20028
20096
|
var formatIsoZoned2 = formatIsoZoned;
|
|
20029
20097
|
|
|
20030
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
20098
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Encoding.js
|
|
20031
20099
|
var EncodingErrorTypeId = "~effect/encoding/EncodingError";
|
|
20032
20100
|
var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
|
|
20033
20101
|
/**
|
|
@@ -20197,7 +20265,7 @@ var fromHexChar = (byte) => {
|
|
|
20197
20265
|
};
|
|
20198
20266
|
var bytesToHex = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
|
|
20199
20267
|
|
|
20200
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
20268
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/SchemaGetter.js
|
|
20201
20269
|
var Getter = class _Getter extends Class {
|
|
20202
20270
|
run;
|
|
20203
20271
|
constructor(run2) {
|
|
@@ -20218,12 +20286,15 @@ var Getter = class _Getter extends Class {
|
|
|
20218
20286
|
}
|
|
20219
20287
|
};
|
|
20220
20288
|
function fail7(f) {
|
|
20221
|
-
return new Getter((oe) => fail6(f(oe)));
|
|
20289
|
+
return new Getter((oe, options) => fail6(f(oe, options)));
|
|
20222
20290
|
}
|
|
20223
20291
|
function forbidden(message) {
|
|
20224
|
-
return fail7((oe) =>
|
|
20225
|
-
|
|
20226
|
-
|
|
20292
|
+
return fail7((oe, options) => {
|
|
20293
|
+
const annotations = {
|
|
20294
|
+
message: message(oe)
|
|
20295
|
+
};
|
|
20296
|
+
return isSome2(oe) ? new Forbidden(annotations, oe.value, options) : new Forbidden(annotations);
|
|
20297
|
+
});
|
|
20227
20298
|
}
|
|
20228
20299
|
var passthrough_ = /* @__PURE__ */ new Getter(succeed6);
|
|
20229
20300
|
function isPassthrough(getter) {
|
|
@@ -20269,15 +20340,15 @@ function trim2() {
|
|
|
20269
20340
|
return transform(trim);
|
|
20270
20341
|
}
|
|
20271
20342
|
function parseJson(options) {
|
|
20272
|
-
return onSome((input) => try_3({
|
|
20343
|
+
return onSome((input, parseOptions) => try_3({
|
|
20273
20344
|
try: () => some2(JSON.parse(input, options?.reviver)),
|
|
20274
20345
|
catch: () => new InvalidValue({
|
|
20275
|
-
|
|
20276
|
-
})
|
|
20346
|
+
expected: "a valid JSON string"
|
|
20347
|
+
}, input, parseOptions)
|
|
20277
20348
|
}));
|
|
20278
20349
|
}
|
|
20279
20350
|
function stringifyJson(options) {
|
|
20280
|
-
return onSome((input) => try_3({
|
|
20351
|
+
return onSome((input, parseOptions) => try_3({
|
|
20281
20352
|
try: () => {
|
|
20282
20353
|
const output = JSON.stringify(input, options?.replacer, options?.space);
|
|
20283
20354
|
if (output === void 0) {
|
|
@@ -20286,8 +20357,8 @@ function stringifyJson(options) {
|
|
|
20286
20357
|
return some2(output);
|
|
20287
20358
|
},
|
|
20288
20359
|
catch: () => new InvalidValue({
|
|
20289
|
-
|
|
20290
|
-
})
|
|
20360
|
+
expected: "a JSON-serializable value"
|
|
20361
|
+
}, input, parseOptions)
|
|
20291
20362
|
}));
|
|
20292
20363
|
}
|
|
20293
20364
|
function encodeBase642() {
|
|
@@ -20300,47 +20371,47 @@ function encodeHex2() {
|
|
|
20300
20371
|
return transform(encodeHex);
|
|
20301
20372
|
}
|
|
20302
20373
|
function decodeBase642() {
|
|
20303
|
-
return transformOrFail((input) => mapErrorEager2(fromResult2(decodeBase64(input)), () => new InvalidValue({
|
|
20304
|
-
|
|
20305
|
-
})));
|
|
20374
|
+
return transformOrFail((input, options) => mapErrorEager2(fromResult2(decodeBase64(input)), () => new InvalidValue({
|
|
20375
|
+
expected: "a valid Base64 string"
|
|
20376
|
+
}, input, options)));
|
|
20306
20377
|
}
|
|
20307
20378
|
function decodeBase64String2() {
|
|
20308
|
-
return transformOrFail((input) => match2(decodeBase64String(input), {
|
|
20379
|
+
return transformOrFail((input, options) => match2(decodeBase64String(input), {
|
|
20309
20380
|
onFailure: () => fail6(new InvalidValue({
|
|
20310
|
-
|
|
20311
|
-
})),
|
|
20381
|
+
expected: "a valid Base64 string"
|
|
20382
|
+
}, input, options)),
|
|
20312
20383
|
onSuccess: succeed6
|
|
20313
20384
|
}));
|
|
20314
20385
|
}
|
|
20315
20386
|
function decodeBase64Url2() {
|
|
20316
|
-
return transformOrFail((input) => match2(decodeBase64Url(input), {
|
|
20387
|
+
return transformOrFail((input, options) => match2(decodeBase64Url(input), {
|
|
20317
20388
|
onFailure: () => fail6(new InvalidValue({
|
|
20318
|
-
|
|
20319
|
-
})),
|
|
20389
|
+
expected: "a valid Base64Url string"
|
|
20390
|
+
}, input, options)),
|
|
20320
20391
|
onSuccess: succeed6
|
|
20321
20392
|
}));
|
|
20322
20393
|
}
|
|
20323
20394
|
function decodeBase64UrlString2() {
|
|
20324
|
-
return transformOrFail((input) => match2(decodeBase64UrlString(input), {
|
|
20395
|
+
return transformOrFail((input, options) => match2(decodeBase64UrlString(input), {
|
|
20325
20396
|
onFailure: () => fail6(new InvalidValue({
|
|
20326
|
-
|
|
20327
|
-
})),
|
|
20397
|
+
expected: "a valid Base64Url string"
|
|
20398
|
+
}, input, options)),
|
|
20328
20399
|
onSuccess: succeed6
|
|
20329
20400
|
}));
|
|
20330
20401
|
}
|
|
20331
20402
|
function decodeHex2() {
|
|
20332
|
-
return transformOrFail((input) => match2(decodeHex(input), {
|
|
20403
|
+
return transformOrFail((input, options) => match2(decodeHex(input), {
|
|
20333
20404
|
onFailure: () => fail6(new InvalidValue({
|
|
20334
|
-
|
|
20335
|
-
})),
|
|
20405
|
+
expected: "a valid hexadecimal string"
|
|
20406
|
+
}, input, options)),
|
|
20336
20407
|
onSuccess: succeed6
|
|
20337
20408
|
}));
|
|
20338
20409
|
}
|
|
20339
20410
|
function decodeHexString2() {
|
|
20340
|
-
return transformOrFail((input) => match2(decodeHexString(input), {
|
|
20411
|
+
return transformOrFail((input, options) => match2(decodeHexString(input), {
|
|
20341
20412
|
onFailure: () => fail6(new InvalidValue({
|
|
20342
|
-
|
|
20343
|
-
})),
|
|
20413
|
+
expected: "a valid hexadecimal string"
|
|
20414
|
+
}, input, options)),
|
|
20344
20415
|
onSuccess: succeed6
|
|
20345
20416
|
}));
|
|
20346
20417
|
}
|
|
@@ -20348,22 +20419,22 @@ function encodeUriComponent() {
|
|
|
20348
20419
|
return transform(encodeURIComponent);
|
|
20349
20420
|
}
|
|
20350
20421
|
function decodeUriComponent() {
|
|
20351
|
-
return transformOrFail((input) => {
|
|
20422
|
+
return transformOrFail((input, options) => {
|
|
20352
20423
|
try {
|
|
20353
20424
|
return succeed6(globalThis.decodeURIComponent(input));
|
|
20354
20425
|
} catch {
|
|
20355
20426
|
return fail6(new InvalidValue({
|
|
20356
|
-
|
|
20357
|
-
}));
|
|
20427
|
+
expected: "a valid URI component"
|
|
20428
|
+
}, input, options));
|
|
20358
20429
|
}
|
|
20359
20430
|
});
|
|
20360
20431
|
}
|
|
20361
20432
|
function dateTimeUtcFromInput() {
|
|
20362
|
-
return transformOrFail((input) => {
|
|
20433
|
+
return transformOrFail((input, options) => {
|
|
20363
20434
|
return match(make14(input), {
|
|
20364
20435
|
onNone: () => fail6(new InvalidValue({
|
|
20365
20436
|
message: "Invalid DateTime input"
|
|
20366
|
-
})),
|
|
20437
|
+
}, input, options)),
|
|
20367
20438
|
onSome: (dt) => succeed6(toUtc2(dt))
|
|
20368
20439
|
});
|
|
20369
20440
|
});
|
|
@@ -20481,7 +20552,7 @@ function collectBracketPathEntries(isLeaf) {
|
|
|
20481
20552
|
};
|
|
20482
20553
|
}
|
|
20483
20554
|
|
|
20484
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
20555
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/SchemaTransformation.js
|
|
20485
20556
|
var Middleware = class _Middleware {
|
|
20486
20557
|
_tag = "Middleware";
|
|
20487
20558
|
decode;
|
|
@@ -20541,20 +20612,20 @@ var bigintFromString = /* @__PURE__ */ new Transformation(/* @__PURE__ */ BigInt
|
|
|
20541
20612
|
var dateFromString = /* @__PURE__ */ new Transformation(/* @__PURE__ */ Date3(), /* @__PURE__ */ transform(formatDate));
|
|
20542
20613
|
var dateFromMillis = /* @__PURE__ */ new Transformation(/* @__PURE__ */ Date3(), /* @__PURE__ */ transform((date6) => date6.getTime()));
|
|
20543
20614
|
var durationFromString = /* @__PURE__ */ transformOrFail2({
|
|
20544
|
-
decode: (s) => match(fromInput(s), {
|
|
20615
|
+
decode: (s, options) => match(fromInput(s), {
|
|
20545
20616
|
onNone: () => fail6(new InvalidValue({
|
|
20546
|
-
|
|
20547
|
-
})),
|
|
20617
|
+
expected: "a valid Duration string"
|
|
20618
|
+
}, s, options)),
|
|
20548
20619
|
onSome: succeed6
|
|
20549
20620
|
}),
|
|
20550
20621
|
encode: (duration4) => succeed6(globalThis.String(duration4))
|
|
20551
20622
|
});
|
|
20552
20623
|
var durationFromNanos = /* @__PURE__ */ transformOrFail2({
|
|
20553
20624
|
decode: (i) => succeed6(nanos(i)),
|
|
20554
|
-
encode: (a) => match(toNanos(a), {
|
|
20625
|
+
encode: (a, options) => match(toNanos(a), {
|
|
20555
20626
|
onNone: () => fail6(new InvalidValue({
|
|
20556
|
-
|
|
20557
|
-
})),
|
|
20627
|
+
expected: "a Duration representable as a bigint"
|
|
20628
|
+
}, a, options)),
|
|
20558
20629
|
onSome: (nanos2) => succeed6(nanos2)
|
|
20559
20630
|
})
|
|
20560
20631
|
});
|
|
@@ -20649,17 +20720,17 @@ function optionFromOptional() {
|
|
|
20649
20720
|
});
|
|
20650
20721
|
}
|
|
20651
20722
|
var urlFromString = /* @__PURE__ */ transformOrFail2({
|
|
20652
|
-
decode: (s) => URL.canParse(s) ? succeed6(new URL(s)) : fail6(new InvalidValue({
|
|
20653
|
-
|
|
20654
|
-
})),
|
|
20723
|
+
decode: (s, options) => URL.canParse(s) ? succeed6(new URL(s)) : fail6(new InvalidValue({
|
|
20724
|
+
expected: "a valid URL string"
|
|
20725
|
+
}, s, options)),
|
|
20655
20726
|
encode: (url2) => succeed6(url2.href)
|
|
20656
20727
|
});
|
|
20657
20728
|
var bigDecimalFromString = /* @__PURE__ */ transformOrFail2({
|
|
20658
|
-
decode: (s) => {
|
|
20729
|
+
decode: (s, options) => {
|
|
20659
20730
|
const result5 = fromString(s);
|
|
20660
20731
|
return isNone2(result5) ? fail6(new InvalidValue({
|
|
20661
|
-
|
|
20662
|
-
})) : succeed6(result5.value);
|
|
20732
|
+
expected: "a valid BigDecimal string"
|
|
20733
|
+
}, s, options)) : succeed6(result5.value);
|
|
20663
20734
|
},
|
|
20664
20735
|
encode: (bd) => succeed6(format2(bd))
|
|
20665
20736
|
});
|
|
@@ -20678,51 +20749,51 @@ var timeZoneOffsetFromNumber = /* @__PURE__ */ transform2({
|
|
|
20678
20749
|
encode: (tz) => tz.offset
|
|
20679
20750
|
});
|
|
20680
20751
|
var timeZoneNamedFromString = /* @__PURE__ */ transformOrFail2({
|
|
20681
|
-
decode: (s) => {
|
|
20752
|
+
decode: (s, options) => {
|
|
20682
20753
|
return match(zoneMakeNamed2(s), {
|
|
20683
20754
|
onNone: () => fail6(new InvalidValue({
|
|
20684
|
-
|
|
20685
|
-
})),
|
|
20755
|
+
expected: "a valid IANA time zone"
|
|
20756
|
+
}, s, options)),
|
|
20686
20757
|
onSome: succeed6
|
|
20687
20758
|
});
|
|
20688
20759
|
},
|
|
20689
20760
|
encode: (tz) => succeed6(tz.id)
|
|
20690
20761
|
});
|
|
20691
20762
|
var timeZoneFromString = /* @__PURE__ */ transformOrFail2({
|
|
20692
|
-
decode: (s) => {
|
|
20763
|
+
decode: (s, options) => {
|
|
20693
20764
|
return match(zoneFromString2(s), {
|
|
20694
20765
|
onNone: () => fail6(new InvalidValue({
|
|
20695
|
-
|
|
20696
|
-
})),
|
|
20766
|
+
expected: "a valid time zone"
|
|
20767
|
+
}, s, options)),
|
|
20697
20768
|
onSome: succeed6
|
|
20698
20769
|
});
|
|
20699
20770
|
},
|
|
20700
20771
|
encode: (tz) => succeed6(zoneToString2(tz))
|
|
20701
20772
|
});
|
|
20702
20773
|
var dateTimeUtcFromString = /* @__PURE__ */ transformOrFail2({
|
|
20703
|
-
decode: (s) => {
|
|
20774
|
+
decode: (s, options) => {
|
|
20704
20775
|
return match(make14(s), {
|
|
20705
20776
|
onNone: () => fail6(new InvalidValue({
|
|
20706
|
-
|
|
20707
|
-
})),
|
|
20777
|
+
expected: "a valid UTC DateTime string"
|
|
20778
|
+
}, s, options)),
|
|
20708
20779
|
onSome: (result5) => succeed6(toUtc2(result5))
|
|
20709
20780
|
});
|
|
20710
20781
|
},
|
|
20711
20782
|
encode: (utc) => succeed6(formatIso2(utc))
|
|
20712
20783
|
});
|
|
20713
20784
|
var dateTimeZonedFromString = /* @__PURE__ */ transformOrFail2({
|
|
20714
|
-
decode: (s) => {
|
|
20785
|
+
decode: (s, options) => {
|
|
20715
20786
|
return match(makeZonedFromString2(s), {
|
|
20716
20787
|
onNone: () => fail6(new InvalidValue({
|
|
20717
|
-
|
|
20718
|
-
})),
|
|
20788
|
+
expected: "a valid Zoned DateTime string"
|
|
20789
|
+
}, s, options)),
|
|
20719
20790
|
onSome: succeed6
|
|
20720
20791
|
});
|
|
20721
20792
|
},
|
|
20722
20793
|
encode: (zoned) => succeed6(formatIsoZoned2(zoned))
|
|
20723
20794
|
});
|
|
20724
20795
|
|
|
20725
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
20796
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/SchemaAST.js
|
|
20726
20797
|
function makeGuard(tag4) {
|
|
20727
20798
|
return (ast) => ast._tag === tag4;
|
|
20728
20799
|
}
|
|
@@ -20747,12 +20818,12 @@ var Context = class {
|
|
|
20747
20818
|
isOptional;
|
|
20748
20819
|
isMutable;
|
|
20749
20820
|
/** Used for constructor default values (e.g. `withConstructorDefault` API) */
|
|
20750
|
-
|
|
20821
|
+
constructorDefault;
|
|
20751
20822
|
annotations;
|
|
20752
|
-
constructor(isOptional2, isMutable2,
|
|
20823
|
+
constructor(isOptional2, isMutable2, constructorDefault = void 0, annotations = void 0) {
|
|
20753
20824
|
this.isOptional = isOptional2;
|
|
20754
20825
|
this.isMutable = isMutable2;
|
|
20755
|
-
this.
|
|
20826
|
+
this.constructorDefault = constructorDefault;
|
|
20756
20827
|
this.annotations = annotations;
|
|
20757
20828
|
}
|
|
20758
20829
|
};
|
|
@@ -20978,8 +21049,8 @@ var TemplateLiteral = class extends Base2 {
|
|
|
20978
21049
|
this.suffixLengths = suffixLengths;
|
|
20979
21050
|
}
|
|
20980
21051
|
/** @internal */
|
|
20981
|
-
getParser(
|
|
20982
|
-
const parser =
|
|
21052
|
+
getParser(compile) {
|
|
21053
|
+
const parser = compile(this.asTemplateLiteralParser());
|
|
20983
21054
|
return (input, options) => {
|
|
20984
21055
|
if (input === missing) return missingExit;
|
|
20985
21056
|
const result5 = parser(input, options);
|
|
@@ -20988,7 +21059,7 @@ var TemplateLiteral = class extends Base2 {
|
|
|
20988
21059
|
}
|
|
20989
21060
|
return mapBothEager2(result5, {
|
|
20990
21061
|
onSuccess: () => input,
|
|
20991
|
-
onFailure: (issue2) => new Composite(this, [issue2])
|
|
21062
|
+
onFailure: (issue2) => new Composite(this, [issue2], input, options)
|
|
20992
21063
|
});
|
|
20993
21064
|
};
|
|
20994
21065
|
}
|
|
@@ -21007,8 +21078,8 @@ var TemplateLiteral = class extends Base2 {
|
|
|
21007
21078
|
const segments = segmentTemplateLiteralParts(this, s, options);
|
|
21008
21079
|
if (segments) return succeed6(segments);
|
|
21009
21080
|
return fail6(new InvalidValue({
|
|
21010
|
-
|
|
21011
|
-
}));
|
|
21081
|
+
expected: "a string matching template literal parts"
|
|
21082
|
+
}, s, options));
|
|
21012
21083
|
}), transform((parts2) => parts2.join(""))));
|
|
21013
21084
|
}
|
|
21014
21085
|
};
|
|
@@ -21217,7 +21288,7 @@ var Arrays = class _Arrays extends Base2 {
|
|
|
21217
21288
|
}
|
|
21218
21289
|
}
|
|
21219
21290
|
/** @internal */
|
|
21220
|
-
getParser(
|
|
21291
|
+
getParser(compile, compileConstructorDefault2 = compile) {
|
|
21221
21292
|
const ast = this;
|
|
21222
21293
|
let elements;
|
|
21223
21294
|
let rest;
|
|
@@ -21236,16 +21307,16 @@ var Arrays = class _Arrays extends Base2 {
|
|
|
21236
21307
|
return missing;
|
|
21237
21308
|
}
|
|
21238
21309
|
if (!Array.isArray(input)) {
|
|
21239
|
-
return yield* fail6(new InvalidType(ast));
|
|
21310
|
+
return yield* fail6(new InvalidType(ast, input, options));
|
|
21240
21311
|
}
|
|
21241
21312
|
if (!elements) {
|
|
21242
21313
|
elements = ast.elements.map((ast2) => ({
|
|
21243
21314
|
ast: ast2,
|
|
21244
|
-
parser:
|
|
21315
|
+
parser: compileConstructorDefault2(ast2)
|
|
21245
21316
|
}));
|
|
21246
21317
|
rest = ast.rest.map((ast2) => ({
|
|
21247
21318
|
ast: ast2,
|
|
21248
|
-
parser:
|
|
21319
|
+
parser: compileConstructorDefault2(ast2)
|
|
21249
21320
|
}));
|
|
21250
21321
|
}
|
|
21251
21322
|
const len = input.length;
|
|
@@ -21267,17 +21338,18 @@ var Arrays = class _Arrays extends Base2 {
|
|
|
21267
21338
|
if (eff) yield* eff;
|
|
21268
21339
|
if (ast.rest.length === 0 && len > elementLen) {
|
|
21269
21340
|
for (let i = elementLen; i <= len - 1; i++) {
|
|
21270
|
-
const
|
|
21341
|
+
const unexpected = new UnexpectedKey(ast, input[i], options);
|
|
21342
|
+
const issue2 = new Pointer([i], unexpected);
|
|
21271
21343
|
if (options.errors === "all") {
|
|
21272
21344
|
if (state.issues) state.issues.push(issue2);
|
|
21273
21345
|
else state.issues = [issue2];
|
|
21274
21346
|
} else {
|
|
21275
|
-
return yield* fail6(new Composite(ast, [issue2]));
|
|
21347
|
+
return yield* fail6(new Composite(ast, [issue2], input, options));
|
|
21276
21348
|
}
|
|
21277
21349
|
}
|
|
21278
21350
|
}
|
|
21279
21351
|
if (state.issues) {
|
|
21280
|
-
return yield* fail6(new Composite(ast, state.issues));
|
|
21352
|
+
return yield* fail6(new Composite(ast, state.issues, input, options));
|
|
21281
21353
|
}
|
|
21282
21354
|
return state.output;
|
|
21283
21355
|
});
|
|
@@ -21320,7 +21392,7 @@ var parseArray = /* @__PURE__ */ iterateEager()({
|
|
|
21320
21392
|
if (s.issues) s.issues.push(issue2);
|
|
21321
21393
|
else s.issues = [issue2];
|
|
21322
21394
|
} else {
|
|
21323
|
-
return fail4(new Composite(s.ast, [issue2]));
|
|
21395
|
+
return fail4(new Composite(s.ast, [issue2], s.input, s.options));
|
|
21324
21396
|
}
|
|
21325
21397
|
}
|
|
21326
21398
|
}
|
|
@@ -21337,14 +21409,14 @@ var wrapPropertyKeyIssue = (s, ast, key, exit3) => {
|
|
|
21337
21409
|
}
|
|
21338
21410
|
const issue2 = getSchemaIssue(exit3.cause);
|
|
21339
21411
|
if (issue2 === void 0) {
|
|
21340
|
-
return failCause2(map6(exit3.cause, (issue3) => new Composite(ast, [new Pointer([key], issue3)])));
|
|
21412
|
+
return failCause2(map6(exit3.cause, (issue3) => new Composite(ast, [new Pointer([key], issue3)], s.input, s.options)));
|
|
21341
21413
|
}
|
|
21342
21414
|
const pointer = new Pointer([key], issue2);
|
|
21343
21415
|
if (s.options.errors === "all") {
|
|
21344
21416
|
if (s.issues) s.issues.push(pointer);
|
|
21345
21417
|
else s.issues = [pointer];
|
|
21346
21418
|
} else {
|
|
21347
|
-
return fail4(new Composite(ast, [pointer]));
|
|
21419
|
+
return fail4(new Composite(ast, [pointer], s.input, s.options));
|
|
21348
21420
|
}
|
|
21349
21421
|
};
|
|
21350
21422
|
var FINITE_PATTERN = "[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?";
|
|
@@ -21422,7 +21494,7 @@ var Objects = class _Objects extends Base2 {
|
|
|
21422
21494
|
}
|
|
21423
21495
|
}
|
|
21424
21496
|
/** @internal */
|
|
21425
|
-
getParser(
|
|
21497
|
+
getParser(compile, compileConstructorDefault2 = compile) {
|
|
21426
21498
|
const ast = this;
|
|
21427
21499
|
const expectedKeys = [];
|
|
21428
21500
|
for (const ps of ast.propertySignatures) {
|
|
@@ -21477,18 +21549,18 @@ var Objects = class _Objects extends Base2 {
|
|
|
21477
21549
|
return missing;
|
|
21478
21550
|
}
|
|
21479
21551
|
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
|
|
21480
|
-
return yield* fail6(new InvalidType(ast));
|
|
21552
|
+
return yield* fail6(new InvalidType(ast, input, options));
|
|
21481
21553
|
}
|
|
21482
21554
|
if (!properties) {
|
|
21483
21555
|
properties = ast.propertySignatures.map((ps) => ({
|
|
21484
|
-
parser:
|
|
21556
|
+
parser: compileConstructorDefault2(ps.type),
|
|
21485
21557
|
name: ps.name,
|
|
21486
21558
|
type: ps.type
|
|
21487
21559
|
}));
|
|
21488
21560
|
indexes = indexCount ? ast.indexSignatures.map((is5) => ({
|
|
21489
21561
|
is: is5,
|
|
21490
|
-
parserKey:
|
|
21491
|
-
parserValue:
|
|
21562
|
+
parserKey: compile(parameterFromPropertyKey(is5.parameter)),
|
|
21563
|
+
parserValue: compileConstructorDefault2(is5.type)
|
|
21492
21564
|
})) : void 0;
|
|
21493
21565
|
}
|
|
21494
21566
|
const record5 = input;
|
|
@@ -21511,7 +21583,8 @@ var Objects = class _Objects extends Base2 {
|
|
|
21511
21583
|
const key = inputKeys[i];
|
|
21512
21584
|
if (!expectedKeysSet.has(key)) {
|
|
21513
21585
|
if (onExcessPropertyError) {
|
|
21514
|
-
const
|
|
21586
|
+
const unexpected = new UnexpectedKey(ast, record5[key], options);
|
|
21587
|
+
const issue2 = new Pointer([key], unexpected);
|
|
21515
21588
|
if (errorsAllOption) {
|
|
21516
21589
|
if (state.issues) {
|
|
21517
21590
|
state.issues.push(issue2);
|
|
@@ -21520,7 +21593,7 @@ var Objects = class _Objects extends Base2 {
|
|
|
21520
21593
|
}
|
|
21521
21594
|
continue;
|
|
21522
21595
|
} else {
|
|
21523
|
-
return yield* fail6(new Composite(ast, [issue2]));
|
|
21596
|
+
return yield* fail6(new Composite(ast, [issue2], input, options));
|
|
21524
21597
|
}
|
|
21525
21598
|
} else {
|
|
21526
21599
|
assignProperty(out, key, record5[key]);
|
|
@@ -21557,7 +21630,7 @@ var Objects = class _Objects extends Base2 {
|
|
|
21557
21630
|
if (eff) yield* eff;
|
|
21558
21631
|
}
|
|
21559
21632
|
if (state.issues) {
|
|
21560
|
-
return yield* fail6(new Composite(ast, state.issues));
|
|
21633
|
+
return yield* fail6(new Composite(ast, state.issues, input, options));
|
|
21561
21634
|
}
|
|
21562
21635
|
if (options.propertyOrder === "original") {
|
|
21563
21636
|
const keys4 = (inputKeys ?? Reflect.ownKeys(record5)).concat(expectedKeys);
|
|
@@ -21625,7 +21698,7 @@ var parseProperties = /* @__PURE__ */ iterateEager()({
|
|
|
21625
21698
|
else s.issues = [issue2];
|
|
21626
21699
|
return;
|
|
21627
21700
|
} else {
|
|
21628
|
-
return fail4(new Composite(s.ast, [issue2]));
|
|
21701
|
+
return fail4(new Composite(s.ast, [issue2], s.input, s.options));
|
|
21629
21702
|
}
|
|
21630
21703
|
}
|
|
21631
21704
|
}
|
|
@@ -21813,7 +21886,14 @@ function getIndex(types) {
|
|
|
21813
21886
|
for (const [literal2, indexes] of byValue) {
|
|
21814
21887
|
candidates.set(literal2, Object.freeze(indexes.map((index2) => types[index2])));
|
|
21815
21888
|
}
|
|
21816
|
-
idx = (input
|
|
21889
|
+
idx = (input, isConstructor) => {
|
|
21890
|
+
if (isObjectKeyword(input)) {
|
|
21891
|
+
const value5 = Object.hasOwn(input, key) ? input[key] : void 0;
|
|
21892
|
+
if (value5 !== void 0) return candidates.get(value5) ?? emptyCandidates;
|
|
21893
|
+
if (isConstructor) return types;
|
|
21894
|
+
}
|
|
21895
|
+
return emptyCandidates;
|
|
21896
|
+
};
|
|
21817
21897
|
}
|
|
21818
21898
|
}
|
|
21819
21899
|
candidateIndexCache.set(types, idx);
|
|
@@ -21825,20 +21905,25 @@ function filterLiterals(input) {
|
|
|
21825
21905
|
return encoded._tag === "Literal" ? encoded.literal === input : encoded._tag === "UniqueSymbol" ? encoded.symbol === input : true;
|
|
21826
21906
|
};
|
|
21827
21907
|
}
|
|
21828
|
-
function getCandidates(input, types) {
|
|
21908
|
+
function getCandidates(input, types, isConstructor = false) {
|
|
21829
21909
|
const idx = getIndex(types);
|
|
21830
|
-
if (typeof idx === "function") return idx(input);
|
|
21910
|
+
if (typeof idx === "function") return idx(input, isConstructor);
|
|
21831
21911
|
const runtimeType = input === null ? "null" : Array.isArray(input) ? "array" : typeof input;
|
|
21832
21912
|
if (idx.bySentinel) {
|
|
21833
21913
|
const base2 = idx.otherwise?.[runtimeType] ?? emptyCandidates;
|
|
21834
21914
|
if (isObjectKeyword(input)) {
|
|
21835
21915
|
const selected = new Set(base2);
|
|
21836
21916
|
for (const [k, m] of idx.bySentinel) {
|
|
21837
|
-
|
|
21838
|
-
|
|
21917
|
+
const value5 = Object.hasOwn(input, k) ? input[k] : void 0;
|
|
21918
|
+
if (value5 !== void 0) {
|
|
21919
|
+
const match9 = m.get(value5);
|
|
21839
21920
|
if (match9) {
|
|
21840
21921
|
for (const candidate of match9) selected.add(candidate);
|
|
21841
21922
|
}
|
|
21923
|
+
} else if (isConstructor) {
|
|
21924
|
+
for (const indexes of m.values()) {
|
|
21925
|
+
for (const candidate of indexes) selected.add(candidate);
|
|
21926
|
+
}
|
|
21842
21927
|
}
|
|
21843
21928
|
}
|
|
21844
21929
|
return Array.from(selected).sort((a, b) => a - b).map((i) => types[i]);
|
|
@@ -21859,21 +21944,21 @@ var Union = class _Union extends Base2 {
|
|
|
21859
21944
|
this.encodingChecks = encodingChecks;
|
|
21860
21945
|
}
|
|
21861
21946
|
/** @internal */
|
|
21862
|
-
getParser(
|
|
21947
|
+
getParser(compile, compileConstructorDefault2) {
|
|
21863
21948
|
const ast = this;
|
|
21864
21949
|
return (input, options) => {
|
|
21865
21950
|
if (input === missing) {
|
|
21866
21951
|
return missingExit;
|
|
21867
21952
|
}
|
|
21868
|
-
const candidates = getCandidates(input, ast.types);
|
|
21953
|
+
const candidates = getCandidates(input, ast.types, compileConstructorDefault2 !== void 0);
|
|
21869
21954
|
if (candidates.length === 1) {
|
|
21870
|
-
const result5 =
|
|
21955
|
+
const result5 = compile(candidates[0])(input, options);
|
|
21871
21956
|
if (result5._tag === "Success") return result5;
|
|
21872
|
-
return effectIsExit(result5) ? failSingleUnionCandidate(ast, result5.cause) : catchCause2(result5, (cause) => failSingleUnionCandidate(ast, cause));
|
|
21957
|
+
return effectIsExit(result5) ? failSingleUnionCandidate(ast, result5.cause, input, options) : catchCause2(result5, (cause) => failSingleUnionCandidate(ast, cause, input, options));
|
|
21873
21958
|
}
|
|
21874
21959
|
const state = {
|
|
21875
21960
|
ast,
|
|
21876
|
-
|
|
21961
|
+
compile,
|
|
21877
21962
|
input,
|
|
21878
21963
|
out: void 0,
|
|
21879
21964
|
successes: ast.mode === "oneOf" ? [] : void 0,
|
|
@@ -21886,10 +21971,13 @@ var Union = class _Union extends Base2 {
|
|
|
21886
21971
|
orderedStep: true
|
|
21887
21972
|
} : void 0);
|
|
21888
21973
|
if (!eff) {
|
|
21889
|
-
|
|
21974
|
+
if (state.out) return state.out;
|
|
21975
|
+
return fail6(new AnyOf(ast, state.issues ?? [], input, options));
|
|
21890
21976
|
}
|
|
21891
21977
|
return flatMapEager2(eff, (_) => {
|
|
21892
|
-
|
|
21978
|
+
if (state.out === sameExit) return succeed6(input);
|
|
21979
|
+
if (state.out) return state.out;
|
|
21980
|
+
return fail6(new AnyOf(ast, state.issues ?? [], input, options));
|
|
21893
21981
|
});
|
|
21894
21982
|
};
|
|
21895
21983
|
}
|
|
@@ -21941,13 +22029,14 @@ var Union = class _Union extends Base2 {
|
|
|
21941
22029
|
return Array.from(new Set(types)).join(" | ");
|
|
21942
22030
|
}
|
|
21943
22031
|
};
|
|
21944
|
-
function failSingleUnionCandidate(ast, cause) {
|
|
22032
|
+
function failSingleUnionCandidate(ast, cause, input, options) {
|
|
21945
22033
|
const issue2 = getSchemaIssue(cause);
|
|
21946
|
-
|
|
22034
|
+
if (!issue2) return failCause2(cause);
|
|
22035
|
+
return fail4(new AnyOf(ast, [issue2], input, options));
|
|
21947
22036
|
}
|
|
21948
22037
|
var parseUnion = /* @__PURE__ */ iterateEager()({
|
|
21949
22038
|
onItem(s, ast) {
|
|
21950
|
-
const parser = s.
|
|
22039
|
+
const parser = s.compile(ast);
|
|
21951
22040
|
return parser(s.input, s.options);
|
|
21952
22041
|
},
|
|
21953
22042
|
step(s, candidate, exit3) {
|
|
@@ -21961,7 +22050,7 @@ var parseUnion = /* @__PURE__ */ iterateEager()({
|
|
|
21961
22050
|
} else {
|
|
21962
22051
|
if (s.out && s.successes) {
|
|
21963
22052
|
s.successes.push(candidate);
|
|
21964
|
-
return fail4(new OneOf(s.ast, s.successes));
|
|
22053
|
+
return fail4(new OneOf(s.ast, s.successes, s.input, s.options));
|
|
21965
22054
|
}
|
|
21966
22055
|
s.out = exit3;
|
|
21967
22056
|
if (s.successes) {
|
|
@@ -22002,9 +22091,9 @@ var Suspend = class _Suspend extends Base2 {
|
|
|
22002
22091
|
this.thunk = memoizeThunk(thunk);
|
|
22003
22092
|
}
|
|
22004
22093
|
/** @internal */
|
|
22005
|
-
getParser(
|
|
22094
|
+
getParser(compile) {
|
|
22006
22095
|
let parser;
|
|
22007
|
-
return (input, options) => (parser ??=
|
|
22096
|
+
return (input, options) => (parser ??= compile(this.thunk()))(input, options);
|
|
22008
22097
|
}
|
|
22009
22098
|
/** @internal */
|
|
22010
22099
|
recur(recur3) {
|
|
@@ -22062,11 +22151,11 @@ var FilterGroup = class _FilterGroup extends Class {
|
|
|
22062
22151
|
}
|
|
22063
22152
|
};
|
|
22064
22153
|
function makeFilter(filter9, annotations, aborted2 = false) {
|
|
22065
|
-
return new Filter2((input, ast, options) => normalizeFilterOutput(ast, filter9(input, ast, options)), annotations, aborted2);
|
|
22154
|
+
return new Filter2((input, ast, options) => normalizeFilterOutput(ast, filter9(input, ast, options), input, options), annotations, aborted2);
|
|
22066
22155
|
}
|
|
22067
22156
|
function makeFilterByGuard(is5, annotations) {
|
|
22068
22157
|
return new Filter2(
|
|
22069
|
-
(input) => is5(input) ? void 0 : new InvalidValue(),
|
|
22158
|
+
(input, _ast, options) => is5(input) ? void 0 : new InvalidValue(void 0, input, options),
|
|
22070
22159
|
annotations,
|
|
22071
22160
|
true
|
|
22072
22161
|
// after a guard, we always want to abort
|
|
@@ -22224,7 +22313,7 @@ function mapOrSame(as4, f) {
|
|
|
22224
22313
|
return changed ? out : as4;
|
|
22225
22314
|
}
|
|
22226
22315
|
function annotateKey(ast, annotations) {
|
|
22227
|
-
const context4 = ast.context ? new Context(ast.context.isOptional, ast.context.isMutable, ast.context.
|
|
22316
|
+
const context4 = ast.context ? new Context(ast.context.isOptional, ast.context.isMutable, ast.context.constructorDefault, {
|
|
22228
22317
|
...ast.context.annotations,
|
|
22229
22318
|
...annotations
|
|
22230
22319
|
}) : new Context(false, false, void 0, annotations);
|
|
@@ -22232,18 +22321,18 @@ function annotateKey(ast, annotations) {
|
|
|
22232
22321
|
}
|
|
22233
22322
|
var optionalKeyLastLink = /* @__PURE__ */ applyToLastLink(optionalKey);
|
|
22234
22323
|
function optionalKey(ast) {
|
|
22235
|
-
const context4 = ast.context ? ast.context.isOptional === false ? new Context(true, ast.context.isMutable, ast.context.
|
|
22324
|
+
const context4 = ast.context ? ast.context.isOptional === false ? new Context(true, ast.context.isMutable, ast.context.constructorDefault, ast.context.annotations) : ast.context : new Context(true, false);
|
|
22236
22325
|
return optionalKeyLastLink(replaceContext(ast, context4));
|
|
22237
22326
|
}
|
|
22238
22327
|
var mutableKeyLastLink = /* @__PURE__ */ applyToLastLink(mutableKey);
|
|
22239
22328
|
function mutableKey(ast) {
|
|
22240
|
-
const context4 = ast.context ? ast.context.isMutable === false ? new Context(ast.context.isOptional, true, ast.context.
|
|
22329
|
+
const context4 = ast.context ? ast.context.isMutable === false ? new Context(ast.context.isOptional, true, ast.context.constructorDefault, ast.context.annotations) : ast.context : new Context(false, true);
|
|
22241
22330
|
return mutableKeyLastLink(replaceContext(ast, context4));
|
|
22242
22331
|
}
|
|
22243
22332
|
function withConstructorDefault(ast, defaultValue) {
|
|
22244
22333
|
const transformation = new Transformation(withDefault(defaultValue), passthrough2());
|
|
22245
|
-
const
|
|
22246
|
-
const context4 = ast.context ? new Context(ast.context.isOptional, ast.context.isMutable,
|
|
22334
|
+
const constructorDefault = new Link(unknown, transformation);
|
|
22335
|
+
const context4 = ast.context ? new Context(ast.context.isOptional, ast.context.isMutable, constructorDefault, ast.context.annotations) : new Context(false, false, constructorDefault);
|
|
22247
22336
|
return replaceContext(ast, context4);
|
|
22248
22337
|
}
|
|
22249
22338
|
function decodeTo(from, to, transformation) {
|
|
@@ -22356,15 +22445,17 @@ function containsUndefined(ast) {
|
|
|
22356
22445
|
}
|
|
22357
22446
|
function fromConst(ast, value5) {
|
|
22358
22447
|
const succeed8 = succeed7(value5);
|
|
22359
|
-
return (input) => {
|
|
22448
|
+
return (input, options) => {
|
|
22360
22449
|
if (input === missing) return missingExit;
|
|
22361
|
-
|
|
22450
|
+
if (input === value5) return succeed8;
|
|
22451
|
+
return fail6(new InvalidType(ast, input, options));
|
|
22362
22452
|
};
|
|
22363
22453
|
}
|
|
22364
22454
|
function fromRefinement(ast, refinement) {
|
|
22365
|
-
return (input) => {
|
|
22455
|
+
return (input, options) => {
|
|
22366
22456
|
if (input === missing) return missingExit;
|
|
22367
|
-
|
|
22457
|
+
if (refinement(input)) return sameExit;
|
|
22458
|
+
return fail6(new InvalidType(ast, input, options));
|
|
22368
22459
|
};
|
|
22369
22460
|
}
|
|
22370
22461
|
function segmentTemplateLiteralParts(ast, input, options) {
|
|
@@ -22493,14 +22584,14 @@ var bigIntToString = /* @__PURE__ */ new Link(bigIntString, bigintFromString);
|
|
|
22493
22584
|
var REGEXP_PATTERN = "Symbol\\((.*)\\)";
|
|
22494
22585
|
var isStringSymbolRegExp = /* @__PURE__ */ new globalThis.RegExp(`^${REGEXP_PATTERN}$`);
|
|
22495
22586
|
var symbolString = /* @__PURE__ */ appendChecks(string2, [/* @__PURE__ */ isStringSymbol()]);
|
|
22496
|
-
var symbolToString = /* @__PURE__ */ new Link(symbolString, /* @__PURE__ */ new Transformation(/* @__PURE__ */ transform((description) => globalThis.Symbol.for(isStringSymbolRegExp.exec(description)[1])), /* @__PURE__ */ transformOrFail((sym) => {
|
|
22587
|
+
var symbolToString = /* @__PURE__ */ new Link(symbolString, /* @__PURE__ */ new Transformation(/* @__PURE__ */ transform((description) => globalThis.Symbol.for(isStringSymbolRegExp.exec(description)[1])), /* @__PURE__ */ transformOrFail((sym, options) => {
|
|
22497
22588
|
const key = globalThis.Symbol.keyFor(sym);
|
|
22498
22589
|
if (key !== void 0) {
|
|
22499
22590
|
return succeed6(globalThis.String(sym));
|
|
22500
22591
|
}
|
|
22501
22592
|
return fail6(new Forbidden({
|
|
22502
22593
|
message: "cannot serialize to string, Symbol is not registered"
|
|
22503
|
-
}));
|
|
22594
|
+
}, sym, options));
|
|
22504
22595
|
})));
|
|
22505
22596
|
function isStringSymbol(annotations) {
|
|
22506
22597
|
return isPattern(isStringSymbolRegExp, {
|
|
@@ -22526,7 +22617,7 @@ function collectIssues(checks, value5, issues, ast, options) {
|
|
|
22526
22617
|
} else {
|
|
22527
22618
|
const issue2 = check4.run(value5, ast, options);
|
|
22528
22619
|
if (issue2) {
|
|
22529
|
-
const filter9 = new Filter(check4, issue2);
|
|
22620
|
+
const filter9 = new Filter(check4, issue2, value5, options);
|
|
22530
22621
|
if (issues) issues.push(filter9);
|
|
22531
22622
|
else issues = [filter9];
|
|
22532
22623
|
if (options.errors !== "all" || check4.aborted) {
|
|
@@ -22547,7 +22638,11 @@ function runChecks(checks, s) {
|
|
|
22547
22638
|
}
|
|
22548
22639
|
return succeed2(s);
|
|
22549
22640
|
}
|
|
22550
|
-
|
|
22641
|
+
function getConstructorDescriptor(ast) {
|
|
22642
|
+
if (!isDeclaration(ast)) return void 0;
|
|
22643
|
+
const getDescriptor = ast.annotations?.[CONSTRUCTOR_ANNOTATION_KEY];
|
|
22644
|
+
return isFunction(getDescriptor) ? getDescriptor(ast.typeParameters) : void 0;
|
|
22645
|
+
}
|
|
22551
22646
|
function isJsonLeaf(u) {
|
|
22552
22647
|
return u === null || typeof u === "string" || typeof u === "boolean" || typeof u === "number" && globalThis.Number.isFinite(u);
|
|
22553
22648
|
}
|
|
@@ -22605,7 +22700,7 @@ function isTree(u, isLeaf) {
|
|
|
22605
22700
|
function isJson(u) {
|
|
22606
22701
|
return isTree(u, isJsonLeaf);
|
|
22607
22702
|
}
|
|
22608
|
-
var Json = /* @__PURE__ */ new Declaration([], () => (input, ast) => isJson(input) ? sameExit : fail6(new InvalidType(ast)), {
|
|
22703
|
+
var Json = /* @__PURE__ */ new Declaration([], () => (input, ast, options) => isJson(input) ? sameExit : fail6(new InvalidType(ast, input, options)), {
|
|
22609
22704
|
representation: {
|
|
22610
22705
|
id: "effect/schema/Json",
|
|
22611
22706
|
payload: null
|
|
@@ -22626,13 +22721,13 @@ var objectKeywordToJson = /* @__PURE__ */ new Link(/* @__PURE__ */ new Union([/*
|
|
|
22626
22721
|
function isStringTree(u) {
|
|
22627
22722
|
return isTree(u, isStringTreeLeaf);
|
|
22628
22723
|
}
|
|
22629
|
-
var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast) => isStringTree(input) ? sameExit : fail6(new InvalidType(ast)), {
|
|
22724
|
+
var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast, options) => isStringTree(input) ? sameExit : fail6(new InvalidType(ast, input, options)), {
|
|
22630
22725
|
expected: "StringTree",
|
|
22631
22726
|
toCodecStringTree: () => void 0
|
|
22632
22727
|
});
|
|
22633
22728
|
var unknownToStringTree = /* @__PURE__ */ new Link(StringTree, /* @__PURE__ */ passthrough3());
|
|
22634
22729
|
|
|
22635
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
22730
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Chunk.js
|
|
22636
22731
|
var TypeId18 = "~effect/collections/Chunk";
|
|
22637
22732
|
function copy2(src, srcPos, dest, destPos, len) {
|
|
22638
22733
|
for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
|
|
@@ -22816,7 +22911,7 @@ var getUnsafe3 = /* @__PURE__ */ dual(2, (self, index2) => {
|
|
|
22816
22911
|
});
|
|
22817
22912
|
var size = (self) => self.length;
|
|
22818
22913
|
|
|
22819
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
22914
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Fiber.js
|
|
22820
22915
|
var Fiber_exports = {};
|
|
22821
22916
|
__export(Fiber_exports, {
|
|
22822
22917
|
await: () => await_,
|
|
@@ -22843,7 +22938,7 @@ var isFiber = (u) => hasProperty(u, FiberTypeId);
|
|
|
22843
22938
|
var getCurrent = getCurrentFiber;
|
|
22844
22939
|
var runIn = fiberRunIn;
|
|
22845
22940
|
|
|
22846
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
22941
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/MutableRef.js
|
|
22847
22942
|
var TypeId19 = "~effect/MutableRef";
|
|
22848
22943
|
var MutableRefProto = {
|
|
22849
22944
|
[TypeId19]: TypeId19,
|
|
@@ -22865,7 +22960,7 @@ var set = /* @__PURE__ */ dual(2, (self, value5) => {
|
|
|
22865
22960
|
return self;
|
|
22866
22961
|
});
|
|
22867
22962
|
|
|
22868
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
22963
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Schema.js
|
|
22869
22964
|
var Schema_exports = {};
|
|
22870
22965
|
__export(Schema_exports, {
|
|
22871
22966
|
Any: () => Any2,
|
|
@@ -22906,8 +23001,8 @@ __export(Schema_exports, {
|
|
|
22906
23001
|
DurationReviver: () => DurationReviver,
|
|
22907
23002
|
Enum: () => Enum2,
|
|
22908
23003
|
Error: () => Error3,
|
|
22909
|
-
|
|
22910
|
-
|
|
23004
|
+
ErrorInstance: () => ErrorInstance,
|
|
23005
|
+
ErrorInstanceReviver: () => ErrorInstanceReviver,
|
|
22911
23006
|
Exit: () => Exit,
|
|
22912
23007
|
ExitReviver: () => ExitReviver,
|
|
22913
23008
|
File: () => File2,
|
|
@@ -22970,7 +23065,7 @@ __export(Schema_exports, {
|
|
|
22970
23065
|
StructWithRest: () => StructWithRest,
|
|
22971
23066
|
Symbol: () => Symbol3,
|
|
22972
23067
|
TaggedClass: () => TaggedClass,
|
|
22973
|
-
|
|
23068
|
+
TaggedError: () => TaggedError3,
|
|
22974
23069
|
TaggedStruct: () => TaggedStruct,
|
|
22975
23070
|
TaggedUnion: () => TaggedUnion,
|
|
22976
23071
|
TemplateLiteral: () => TemplateLiteral2,
|
|
@@ -23216,7 +23311,7 @@ __export(Schema_exports, {
|
|
|
23216
23311
|
withDecodingDefaultTypeKey: () => withDecodingDefaultTypeKey
|
|
23217
23312
|
});
|
|
23218
23313
|
|
|
23219
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
23314
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/HashMap.js
|
|
23220
23315
|
var HashMap_exports = {};
|
|
23221
23316
|
__export(HashMap_exports, {
|
|
23222
23317
|
beginMutation: () => beginMutation2,
|
|
@@ -23259,7 +23354,7 @@ __export(HashMap_exports, {
|
|
|
23259
23354
|
values: () => values2
|
|
23260
23355
|
});
|
|
23261
23356
|
|
|
23262
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
23357
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/hashMap.js
|
|
23263
23358
|
var HashMapTypeId = "~effect/collections/HashMap";
|
|
23264
23359
|
var SHIFT = 5;
|
|
23265
23360
|
var BUCKET_SIZE = 1 << SHIFT;
|
|
@@ -23870,9 +23965,8 @@ var hasBy = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
|
23870
23965
|
}
|
|
23871
23966
|
return false;
|
|
23872
23967
|
});
|
|
23873
|
-
var
|
|
23968
|
+
var setHash = (self, key, hash4, value5) => {
|
|
23874
23969
|
const impl = self;
|
|
23875
|
-
const hash4 = hash(key);
|
|
23876
23970
|
const added = {
|
|
23877
23971
|
value: false
|
|
23878
23972
|
};
|
|
@@ -23889,6 +23983,9 @@ var set2 = /* @__PURE__ */ dual(3, (self, key, value5) => {
|
|
|
23889
23983
|
return self;
|
|
23890
23984
|
}
|
|
23891
23985
|
return new HashMapImpl(false, impl._edit, newRoot, impl._size + (added.value ? 1 : 0));
|
|
23986
|
+
};
|
|
23987
|
+
var set2 = /* @__PURE__ */ dual(3, (self, key, value5) => {
|
|
23988
|
+
return setHash(self, key, hash(key), value5);
|
|
23892
23989
|
});
|
|
23893
23990
|
var keys2 = (self) => {
|
|
23894
23991
|
const iterator = self[Symbol.iterator]();
|
|
@@ -23970,9 +24067,9 @@ var modifyHash = /* @__PURE__ */ dual(4, (self, key, hash4, f) => {
|
|
|
23970
24067
|
const current = getHash(self, key, hash4);
|
|
23971
24068
|
const updated = f(current);
|
|
23972
24069
|
if (isNone2(updated)) {
|
|
23973
|
-
return hasHash(self, key, hash4) ?
|
|
24070
|
+
return hasHash(self, key, hash4) ? removeHash(self, key, hash4) : self;
|
|
23974
24071
|
}
|
|
23975
|
-
return
|
|
24072
|
+
return setHash(self, key, hash4, updated.value);
|
|
23976
24073
|
});
|
|
23977
24074
|
var modify2 = /* @__PURE__ */ dual(3, (self, key, f) => {
|
|
23978
24075
|
return modifyAt(self, key, map(f));
|
|
@@ -23984,9 +24081,8 @@ var union3 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
|
23984
24081
|
}
|
|
23985
24082
|
return result5;
|
|
23986
24083
|
});
|
|
23987
|
-
var
|
|
24084
|
+
var removeHash = (self, key, hash4) => {
|
|
23988
24085
|
const impl = self;
|
|
23989
|
-
const hash4 = hash(key);
|
|
23990
24086
|
const removed = {
|
|
23991
24087
|
value: false
|
|
23992
24088
|
};
|
|
@@ -24004,6 +24100,9 @@ var remove2 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
|
24004
24100
|
return empty5();
|
|
24005
24101
|
}
|
|
24006
24102
|
return new HashMapImpl(false, impl._edit, newRoot, impl._size - 1);
|
|
24103
|
+
};
|
|
24104
|
+
var remove2 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
24105
|
+
return removeHash(self, key, hash(key));
|
|
24007
24106
|
});
|
|
24008
24107
|
var removeMany = /* @__PURE__ */ dual(2, (self, keys4) => {
|
|
24009
24108
|
let result5 = self;
|
|
@@ -24098,7 +24197,7 @@ var every2 = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
|
24098
24197
|
return true;
|
|
24099
24198
|
});
|
|
24100
24199
|
|
|
24101
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24200
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/HashMap.js
|
|
24102
24201
|
var isHashMap2 = isHashMap;
|
|
24103
24202
|
var empty6 = empty5;
|
|
24104
24203
|
var make18 = make17;
|
|
@@ -24138,7 +24237,7 @@ var findFirst6 = findFirst5;
|
|
|
24138
24237
|
var some5 = some4;
|
|
24139
24238
|
var every3 = every2;
|
|
24140
24239
|
|
|
24141
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24240
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/hashSet.js
|
|
24142
24241
|
var HashSetTypeId = "~effect/collections/HashSet";
|
|
24143
24242
|
var HashSetProto = {
|
|
24144
24243
|
[symbol]() {
|
|
@@ -24192,61 +24291,14 @@ var every4 = (self, predicate) => {
|
|
|
24192
24291
|
return true;
|
|
24193
24292
|
};
|
|
24194
24293
|
|
|
24195
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24294
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/HashSet.js
|
|
24196
24295
|
var fromIterable7 = fromIterable6;
|
|
24197
24296
|
var isHashSet2 = isHashSet;
|
|
24198
24297
|
var size5 = size4;
|
|
24199
24298
|
|
|
24200
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24201
|
-
var TypeId20 = "~effect/SchemaError/SchemaError";
|
|
24202
|
-
var SchemaError = class extends (/* @__PURE__ */ TaggedError2("SchemaError")) {
|
|
24203
|
-
[TypeId20] = TypeId20;
|
|
24204
|
-
constructor(issue2) {
|
|
24205
|
-
super({
|
|
24206
|
-
issue: issue2
|
|
24207
|
-
});
|
|
24208
|
-
}
|
|
24209
|
-
get message() {
|
|
24210
|
-
return this.issue.toString();
|
|
24211
|
-
}
|
|
24212
|
-
toString() {
|
|
24213
|
-
return `SchemaError(${this.message})`;
|
|
24214
|
-
}
|
|
24215
|
-
};
|
|
24216
|
-
function isSchemaError(u) {
|
|
24217
|
-
return hasProperty(u, TypeId20) && u[TypeId20] === TypeId20;
|
|
24218
|
-
}
|
|
24219
|
-
|
|
24220
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.103/node_modules/effect/dist/SchemaParser.js
|
|
24221
|
-
var toConstructorAST = /* @__PURE__ */ memoize((ast) => {
|
|
24222
|
-
switch (ast._tag) {
|
|
24223
|
-
case "Declaration": {
|
|
24224
|
-
const getLink = ast.annotations?.[ClassTypeId];
|
|
24225
|
-
if (isFunction(getLink)) {
|
|
24226
|
-
const link2 = getLink(ast.typeParameters);
|
|
24227
|
-
return replaceEncoding(ast, [mapLink(link2, toConstructorAST)]);
|
|
24228
|
-
}
|
|
24229
|
-
return ast;
|
|
24230
|
-
}
|
|
24231
|
-
case "Objects":
|
|
24232
|
-
case "Arrays":
|
|
24233
|
-
return ast.recur((ast2) => {
|
|
24234
|
-
const defaultValue = ast2.context?.defaultValue;
|
|
24235
|
-
if (defaultValue) {
|
|
24236
|
-
const out = toConstructorAST(ast2);
|
|
24237
|
-
return replaceEncoding(out, out.encoding ? [...out.encoding, ...defaultValue] : defaultValue);
|
|
24238
|
-
}
|
|
24239
|
-
return toConstructorAST(ast2);
|
|
24240
|
-
});
|
|
24241
|
-
case "Suspend":
|
|
24242
|
-
return ast.recur(toConstructorAST);
|
|
24243
|
-
default:
|
|
24244
|
-
return ast;
|
|
24245
|
-
}
|
|
24246
|
-
});
|
|
24299
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/SchemaParser.js
|
|
24247
24300
|
function makeEffect(schema) {
|
|
24248
|
-
const
|
|
24249
|
-
const parser = run(ast);
|
|
24301
|
+
const parser = runWithCompiler(constructorCompiler, toType(schema.ast));
|
|
24250
24302
|
return (input, options) => {
|
|
24251
24303
|
return parser(input, options?.disableChecks ? options?.parseOptions ? {
|
|
24252
24304
|
...options.parseOptions,
|
|
@@ -24275,7 +24327,7 @@ function make20(schema) {
|
|
|
24275
24327
|
return exit3.value;
|
|
24276
24328
|
}
|
|
24277
24329
|
const issue2 = getSchemaIssueOrThrow(exit3.cause, "Constructor adapter can only throw schema issues");
|
|
24278
|
-
throw new Error(
|
|
24330
|
+
throw new Error("Schema validation failed", {
|
|
24279
24331
|
cause: issue2
|
|
24280
24332
|
});
|
|
24281
24333
|
};
|
|
@@ -24309,7 +24361,7 @@ function asserts(schema, input) {
|
|
|
24309
24361
|
const exit3 = parser(input, defaultParseOptions);
|
|
24310
24362
|
if (isFailure4(exit3)) {
|
|
24311
24363
|
const issue2 = getSchemaIssueOrThrow(exit3.cause, "Assertion adapter can only throw schema issues");
|
|
24312
|
-
throw new Error(
|
|
24364
|
+
throw new Error("Schema validation failed", {
|
|
24313
24365
|
cause: issue2
|
|
24314
24366
|
});
|
|
24315
24367
|
}
|
|
@@ -24362,9 +24414,12 @@ var getValue = (value5) => {
|
|
|
24362
24414
|
return succeed6(value5);
|
|
24363
24415
|
};
|
|
24364
24416
|
function run(ast) {
|
|
24417
|
+
return runWithCompiler(normalCompiler, ast);
|
|
24418
|
+
}
|
|
24419
|
+
function runWithCompiler(compiler, ast) {
|
|
24365
24420
|
let parser;
|
|
24366
24421
|
return (input, options) => {
|
|
24367
|
-
const result5 = (parser ??=
|
|
24422
|
+
const result5 = (parser ??= compiler(ast))(input, options ?? defaultParseOptions);
|
|
24368
24423
|
if (result5 === sameExit) {
|
|
24369
24424
|
return succeed6(input);
|
|
24370
24425
|
}
|
|
@@ -24406,23 +24461,43 @@ function asSync(parser) {
|
|
|
24406
24461
|
return exit3.value;
|
|
24407
24462
|
}
|
|
24408
24463
|
const issue2 = getSchemaIssueOrThrow(exit3.cause, "Sync adapter can only throw schema issues");
|
|
24409
|
-
throw new Error(
|
|
24464
|
+
throw new Error("Schema validation failed", {
|
|
24410
24465
|
cause: issue2
|
|
24411
24466
|
});
|
|
24412
24467
|
};
|
|
24413
24468
|
}
|
|
24414
|
-
var
|
|
24415
|
-
|
|
24416
|
-
|
|
24417
|
-
|
|
24418
|
-
|
|
24469
|
+
var normalCompiler = /* @__PURE__ */ memoize((ast) => makeParser(ast, normalCompiler));
|
|
24470
|
+
var constructorCompiler = /* @__PURE__ */ memoize((ast) => makeParser(ast, constructorCompiler, compileConstructorDefault));
|
|
24471
|
+
var compileDefaulted = /* @__PURE__ */ memoize((ast) => makeParser(ast, constructorCompiler, compileConstructorDefault, ast.context?.constructorDefault));
|
|
24472
|
+
function compileConstructorDefault(ast) {
|
|
24473
|
+
return ast.context?.constructorDefault ? compileDefaulted(ast) : constructorCompiler(ast);
|
|
24474
|
+
}
|
|
24475
|
+
function applyTransformation(result5, current, transformation, options) {
|
|
24476
|
+
let transformed;
|
|
24477
|
+
if (effectIsExit(result5) && result5._tag === "Success") {
|
|
24478
|
+
const optional3 = toOption2(result5 === sameExit ? current : result5[args]);
|
|
24479
|
+
transformed = transformation._tag === "Transformation" ? transformation.decode.run(optional3, options) : transformation.decode(succeed7(optional3), options);
|
|
24480
|
+
} else if (transformation._tag === "Transformation") {
|
|
24481
|
+
transformed = flatMapEager2(result5, (value5) => transformation.decode.run(toOption2(value5), options));
|
|
24482
|
+
} else {
|
|
24483
|
+
transformed = transformation.decode(mapEager2(result5, toOption2), options);
|
|
24419
24484
|
}
|
|
24420
|
-
return
|
|
24485
|
+
return effectIsExit(transformed) && transformed._tag === "Success" ? fromOptionExit(transformed[args]) : flatMapEager2(transformed, fromOptionExit);
|
|
24486
|
+
}
|
|
24487
|
+
function makeConstructorParser(descriptor, compile) {
|
|
24488
|
+
let sourceParser;
|
|
24489
|
+
return (input, options) => {
|
|
24490
|
+
if (input === missing) return missingExit;
|
|
24491
|
+
if (descriptor.isConstructed(input)) return sameExit;
|
|
24492
|
+
const result5 = (sourceParser ??= compile(descriptor.link.to))(input, options);
|
|
24493
|
+
return applyTransformation(result5, input, descriptor.link.transformation, options);
|
|
24494
|
+
};
|
|
24421
24495
|
}
|
|
24422
|
-
function makeParser(ast) {
|
|
24423
|
-
const
|
|
24496
|
+
function makeParser(ast, compile, compileConstructorDefault2, constructorDefault) {
|
|
24497
|
+
const descriptor = compileConstructorDefault2 ? getConstructorDescriptor(ast) : void 0;
|
|
24498
|
+
const parser = descriptor ? makeConstructorParser(descriptor, compile) : ast.getParser(compile, compileConstructorDefault2);
|
|
24424
24499
|
const checks = ast.checks;
|
|
24425
|
-
const links = ast.encoding;
|
|
24500
|
+
const links = constructorDefault ? ast.encoding ? [...ast.encoding, constructorDefault] : [constructorDefault] : ast.encoding;
|
|
24426
24501
|
const encodingChecks = ast.encodingChecks;
|
|
24427
24502
|
const astOptions = (checks ? checks[checks.length - 1].annotations : ast.annotations)?.["parseOptions"];
|
|
24428
24503
|
if (!links && !checks && !encodingChecks) {
|
|
@@ -24441,7 +24516,7 @@ function makeParser(ast) {
|
|
|
24441
24516
|
if (input !== missing && output !== missing) {
|
|
24442
24517
|
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
24443
24518
|
if (issues) {
|
|
24444
|
-
result5 = fail6(new Composite(ast, issues));
|
|
24519
|
+
result5 = fail6(new Composite(ast, issues, input, options));
|
|
24445
24520
|
}
|
|
24446
24521
|
}
|
|
24447
24522
|
}
|
|
@@ -24450,7 +24525,7 @@ function makeParser(ast) {
|
|
|
24450
24525
|
if (input !== missing && value5 !== missing) {
|
|
24451
24526
|
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
24452
24527
|
if (issues) {
|
|
24453
|
-
return fail6(new Composite(ast, issues));
|
|
24528
|
+
return fail6(new Composite(ast, issues, input, options));
|
|
24454
24529
|
}
|
|
24455
24530
|
}
|
|
24456
24531
|
return succeed6(value5);
|
|
@@ -24464,7 +24539,7 @@ function makeParser(ast) {
|
|
|
24464
24539
|
if (value5 === missing) return result5;
|
|
24465
24540
|
const issues = collectIssues(checks, value5, void 0, ast, options);
|
|
24466
24541
|
if (issues) {
|
|
24467
|
-
result5 = fail6(new Composite(ast, issues));
|
|
24542
|
+
result5 = fail6(new Composite(ast, issues, value5, options));
|
|
24468
24543
|
}
|
|
24469
24544
|
}
|
|
24470
24545
|
} else {
|
|
@@ -24472,7 +24547,7 @@ function makeParser(ast) {
|
|
|
24472
24547
|
if (value5 !== missing) {
|
|
24473
24548
|
const issues = collectIssues(checks, value5, void 0, ast, options);
|
|
24474
24549
|
if (issues) {
|
|
24475
|
-
return fail6(new Composite(ast, issues));
|
|
24550
|
+
return fail6(new Composite(ast, issues, value5, options));
|
|
24476
24551
|
}
|
|
24477
24552
|
}
|
|
24478
24553
|
return succeed6(value5);
|
|
@@ -24492,17 +24567,7 @@ function makeParser(ast) {
|
|
|
24492
24567
|
let current = input;
|
|
24493
24568
|
let result5 = parsers[parsers.length - 1](input, options);
|
|
24494
24569
|
for (let i = links.length - 1; i >= 0; i--) {
|
|
24495
|
-
|
|
24496
|
-
let transformed;
|
|
24497
|
-
if (effectIsExit(result5) && result5._tag === "Success") {
|
|
24498
|
-
const optional3 = toOption2(result5 === sameExit ? current : result5[args]);
|
|
24499
|
-
transformed = transformation._tag === "Transformation" ? transformation.decode.run(optional3, options) : transformation.decode(succeed7(optional3), options);
|
|
24500
|
-
} else if (transformation._tag === "Transformation") {
|
|
24501
|
-
transformed = flatMapEager2(result5, (value5) => transformation.decode.run(toOption2(value5), options));
|
|
24502
|
-
} else {
|
|
24503
|
-
transformed = transformation.decode(mapEager2(result5, toOption2), options);
|
|
24504
|
-
}
|
|
24505
|
-
result5 = effectIsExit(transformed) && transformed._tag === "Success" ? fromOptionExit(transformed[args]) : flatMapEager2(transformed, fromOptionExit);
|
|
24570
|
+
result5 = applyTransformation(result5, current, links[i].transformation, options);
|
|
24506
24571
|
if (i !== 0) {
|
|
24507
24572
|
const next2 = parsers[i - 1];
|
|
24508
24573
|
if (result5._tag === "Success") {
|
|
@@ -24521,7 +24586,7 @@ function makeParser(ast) {
|
|
|
24521
24586
|
const local = parseLocal(value5, options);
|
|
24522
24587
|
return local === sameExit ? result5 : local;
|
|
24523
24588
|
}
|
|
24524
|
-
result5 = catchCause2(result5, (cause) => failCauseSync3(() => map6(cause, (issue2) => new Encoding(ast, issue2))));
|
|
24589
|
+
result5 = catchCause2(result5, (cause) => failCauseSync3(() => map6(cause, (issue2) => new Encoding(ast, issue2, input, options))));
|
|
24525
24590
|
return flatMapEager2(result5, (value5) => {
|
|
24526
24591
|
const local = parseLocal(value5, options);
|
|
24527
24592
|
return local === sameExit ? succeed7(value5) : local;
|
|
@@ -24529,8 +24594,8 @@ function makeParser(ast) {
|
|
|
24529
24594
|
};
|
|
24530
24595
|
}
|
|
24531
24596
|
|
|
24532
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24533
|
-
var
|
|
24597
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/schema/schema.js
|
|
24598
|
+
var TypeId20 = "~effect/Schema/Schema";
|
|
24534
24599
|
function makeDeclarationReviver(id2, payloadSchema, revive) {
|
|
24535
24600
|
return {
|
|
24536
24601
|
id: id2,
|
|
@@ -24546,7 +24611,7 @@ function makeFilterReviver(id2, payloadSchema, revive) {
|
|
|
24546
24611
|
};
|
|
24547
24612
|
}
|
|
24548
24613
|
var SchemaProto = {
|
|
24549
|
-
[
|
|
24614
|
+
[TypeId20]: TypeId20,
|
|
24550
24615
|
pipe() {
|
|
24551
24616
|
return pipeArguments(this, arguments);
|
|
24552
24617
|
},
|
|
@@ -24568,17 +24633,13 @@ function make21(ast, options) {
|
|
|
24568
24633
|
}));
|
|
24569
24634
|
self.ast = ast;
|
|
24570
24635
|
self.rebuild = (ast2) => make21(ast2, options);
|
|
24571
|
-
|
|
24572
|
-
self.makeEffect = (input, options2) => fromIssueEffect(makeEffect2(input, options2));
|
|
24636
|
+
self.makeEffect = makeEffect(self);
|
|
24573
24637
|
self.make = make20(self);
|
|
24574
24638
|
self.makeOption = makeOption(self);
|
|
24575
24639
|
return self;
|
|
24576
24640
|
}
|
|
24577
|
-
function fromIssueEffect(self) {
|
|
24578
|
-
return catchCause2(self, (cause) => failCauseSync3(() => map6(cause, (issue2) => new SchemaError(issue2))));
|
|
24579
|
-
}
|
|
24580
24641
|
|
|
24581
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24642
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Struct.js
|
|
24582
24643
|
var pick = /* @__PURE__ */ dual(2, (self, keys4) => {
|
|
24583
24644
|
return buildStruct(self, (k, v) => keys4.includes(k) ? [k, v] : void 0);
|
|
24584
24645
|
});
|
|
@@ -24621,7 +24682,7 @@ function makeCombiner(combiners, options) {
|
|
|
24621
24682
|
});
|
|
24622
24683
|
}
|
|
24623
24684
|
|
|
24624
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24685
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/UndefinedOr.js
|
|
24625
24686
|
function makeReducer2(combiner2) {
|
|
24626
24687
|
return make((self, that) => {
|
|
24627
24688
|
if (self === void 0) return that;
|
|
@@ -24630,7 +24691,7 @@ function makeReducer2(combiner2) {
|
|
|
24630
24691
|
}, void 0);
|
|
24631
24692
|
}
|
|
24632
24693
|
|
|
24633
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24694
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/errors.js
|
|
24634
24695
|
function errorWithPath(message, path) {
|
|
24635
24696
|
if (path.length > 0) {
|
|
24636
24697
|
message += `
|
|
@@ -24639,7 +24700,7 @@ function errorWithPath(message, path) {
|
|
|
24639
24700
|
return new Error(message);
|
|
24640
24701
|
}
|
|
24641
24702
|
|
|
24642
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24703
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/schema/toArbitrary.js
|
|
24643
24704
|
var arbitraryMemoMap = /* @__PURE__ */ new WeakMap();
|
|
24644
24705
|
var suspendDepthIdentifierMap = /* @__PURE__ */ new WeakMap();
|
|
24645
24706
|
var emptyRecursionStack = [];
|
|
@@ -24702,14 +24763,14 @@ function appendObjectEntries(out, entries3) {
|
|
|
24702
24763
|
var max7 = /* @__PURE__ */ makeReducer2(ReducerMax);
|
|
24703
24764
|
var min7 = /* @__PURE__ */ makeReducer2(ReducerMin);
|
|
24704
24765
|
var or = /* @__PURE__ */ makeReducer2(ReducerOr);
|
|
24705
|
-
var
|
|
24766
|
+
var concat2 = /* @__PURE__ */ makeReducer2(/* @__PURE__ */ makeReducerConcat());
|
|
24706
24767
|
var combiner = /* @__PURE__ */ makeCombiner({
|
|
24707
24768
|
integer: or,
|
|
24708
24769
|
maxLength: min7,
|
|
24709
24770
|
minLength: max7,
|
|
24710
24771
|
noInfinity: or,
|
|
24711
24772
|
noNaN: or,
|
|
24712
|
-
patterns:
|
|
24773
|
+
patterns: concat2,
|
|
24713
24774
|
unique: or
|
|
24714
24775
|
}, {
|
|
24715
24776
|
omitKeyWhen: isUndefined
|
|
@@ -25190,7 +25251,7 @@ function base(ast, path) {
|
|
|
25190
25251
|
const out2 = arbitrary(fc, reset, recursionStack);
|
|
25191
25252
|
return isOptional(ast2) ? out2.chain((a) => fc.boolean().map((b) => b ? some2(a) : none2())) : out2.map(some2);
|
|
25192
25253
|
});
|
|
25193
|
-
let out = fc.tuple(...elementArbitraries).map(getSomes);
|
|
25254
|
+
let out = fc.tuple(...elementArbitraries).map((elements2) => getSomes(takeWhile(elements2, isSome2)));
|
|
25194
25255
|
if (isReadonlyArrayNonEmpty(rest)) {
|
|
25195
25256
|
const [head2, ...tail2] = rest.map(({
|
|
25196
25257
|
arbitrary
|
|
@@ -25371,7 +25432,7 @@ function base(ast, path) {
|
|
|
25371
25432
|
}
|
|
25372
25433
|
}
|
|
25373
25434
|
|
|
25374
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
25435
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/schema/toEquivalence.js
|
|
25375
25436
|
var toEquivalence = /* @__PURE__ */ memoize((ast) => {
|
|
25376
25437
|
return recur2(ast, []);
|
|
25377
25438
|
});
|
|
@@ -25494,7 +25555,7 @@ function recur2(ast, path) {
|
|
|
25494
25555
|
}
|
|
25495
25556
|
}
|
|
25496
25557
|
|
|
25497
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
25558
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/JsonPointer.js
|
|
25498
25559
|
function escapeToken(token) {
|
|
25499
25560
|
return token.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
25500
25561
|
}
|
|
@@ -25502,11 +25563,11 @@ function unescapeToken(token) {
|
|
|
25502
25563
|
return token.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
25503
25564
|
}
|
|
25504
25565
|
|
|
25505
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
25566
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/RegExp.js
|
|
25506
25567
|
var RegExp2 = globalThis.RegExp;
|
|
25507
25568
|
var escape2 = (string7) => string7.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
25508
25569
|
|
|
25509
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
25570
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
|
|
25510
25571
|
var jsonSchemaAnnotationExcludedKeys = /* @__PURE__ */ new Set([...annotationExcludedKeys, IDENTIFIER_FALLBACK_KEY, ...jsonSchemaAnnotationKeys]);
|
|
25511
25572
|
function collectJsonSchemaAnnotations(annotations, options) {
|
|
25512
25573
|
if (annotations === void 0) return void 0;
|
|
@@ -25998,7 +26059,7 @@ function toJsonSchemaDocument(document, options) {
|
|
|
25998
26059
|
};
|
|
25999
26060
|
}
|
|
26000
26061
|
|
|
26001
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
26062
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/schema/toRepresentation.js
|
|
26002
26063
|
function toRepresentation(ast) {
|
|
26003
26064
|
const {
|
|
26004
26065
|
references,
|
|
@@ -26341,7 +26402,7 @@ function fromASTs(asts) {
|
|
|
26341
26402
|
}
|
|
26342
26403
|
}
|
|
26343
26404
|
|
|
26344
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
26405
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/JsonPatch.js
|
|
26345
26406
|
function get5(oldValue, newValue) {
|
|
26346
26407
|
const patches = [];
|
|
26347
26408
|
getLoop(oldValue, newValue, "", patches);
|
|
@@ -26522,7 +26583,7 @@ function rebuildFromStack(stack, newParent) {
|
|
|
26522
26583
|
return acc;
|
|
26523
26584
|
}
|
|
26524
26585
|
|
|
26525
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
26586
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/JsonSchema.js
|
|
26526
26587
|
var RE_DEFS = /^#\/\$defs(?=\/|$)/;
|
|
26527
26588
|
var DRAFT_04_COPY_KEYWORDS = /* @__PURE__ */ new Set(["$ref", "type", "required", "enum", "title", "description", "default", "format", "pattern", "minLength", "maxLength", "minItems", "maxItems", "minProperties", "maxProperties", "multipleOf", "uniqueItems"]);
|
|
26528
26589
|
var DRAFT_07_COPY_KEYWORDS = /* @__PURE__ */ new Set([...DRAFT_04_COPY_KEYWORDS, "const", "examples", "readOnly", "writeOnly", "minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum"]);
|
|
@@ -26621,7 +26682,7 @@ function mapObject(value5, f) {
|
|
|
26621
26682
|
return out;
|
|
26622
26683
|
}
|
|
26623
26684
|
|
|
26624
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
26685
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Optic.js
|
|
26625
26686
|
function makeIso(get7, set7) {
|
|
26626
26687
|
return make22(primitiveNode("Iso", get7, set7));
|
|
26627
26688
|
}
|
|
@@ -26678,7 +26739,7 @@ var CheckNode = class {
|
|
|
26678
26739
|
set = identity;
|
|
26679
26740
|
constructor(checks) {
|
|
26680
26741
|
this.checks = checks;
|
|
26681
|
-
this.get = (s) =>
|
|
26742
|
+
this.get = (s) => runChecks(checks, s);
|
|
26682
26743
|
}
|
|
26683
26744
|
};
|
|
26684
26745
|
function compose(a, b) {
|
|
@@ -26745,10 +26806,13 @@ var OptionalImpl = class {
|
|
|
26745
26806
|
return make22(compose(this.node, [new CheckNode([makeFilterByGuard(refinement, annotations)])]));
|
|
26746
26807
|
}
|
|
26747
26808
|
tag(tag4) {
|
|
26748
|
-
|
|
26809
|
+
const err = fail2(new InvalidValue({
|
|
26810
|
+
expected: `${JSON.stringify(tag4)} tag`
|
|
26811
|
+
}));
|
|
26812
|
+
return make22(compose(this.node, primitiveNode("Prism", (s) => s._tag === tag4 ? succeed2(s) : err, identity)));
|
|
26749
26813
|
}
|
|
26750
26814
|
at(key, ..._rest) {
|
|
26751
|
-
const err = fail2(
|
|
26815
|
+
const err = fail2(new Pointer([key], new MissingKey(void 0)));
|
|
26752
26816
|
return make22(compose(this.node, primitiveNode("Optional", (s) => Object.hasOwn(s, key) ? succeed2(s[key]) : err, (a, s) => {
|
|
26753
26817
|
if (Object.hasOwn(s, key)) {
|
|
26754
26818
|
const copy3 = cloneShallow(s);
|
|
@@ -26795,14 +26859,16 @@ var OptionalImpl = class {
|
|
|
26795
26859
|
if (isSuccess2(inner.getResult(as4[i]))) idxs.push(i);
|
|
26796
26860
|
}
|
|
26797
26861
|
if (bs.length !== idxs.length) {
|
|
26798
|
-
return fail2(
|
|
26862
|
+
return fail2(new InvalidValue({
|
|
26863
|
+
message: `each: replacement length mismatch: ${bs.length} !== ${idxs.length}`
|
|
26864
|
+
}));
|
|
26799
26865
|
}
|
|
26800
26866
|
const out = as4.slice();
|
|
26801
26867
|
for (let k = 0; k < idxs.length; k++) {
|
|
26802
26868
|
const i = idxs[k];
|
|
26803
26869
|
const r = inner.replaceResult(bs[k], as4[i]);
|
|
26804
26870
|
if (isFailure2(r)) {
|
|
26805
|
-
return fail2(
|
|
26871
|
+
return fail2(new Pointer([i], r.failure));
|
|
26806
26872
|
}
|
|
26807
26873
|
out[i] = r.success;
|
|
26808
26874
|
}
|
|
@@ -26962,7 +27028,7 @@ function id() {
|
|
|
26962
27028
|
return identityIso;
|
|
26963
27029
|
}
|
|
26964
27030
|
|
|
26965
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
27031
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/redacted.js
|
|
26966
27032
|
var redactedRegistry = /* @__PURE__ */ new WeakMap();
|
|
26967
27033
|
var value = (self) => {
|
|
26968
27034
|
if (redactedRegistry.has(self)) {
|
|
@@ -26972,9 +27038,9 @@ var value = (self) => {
|
|
|
26972
27038
|
}
|
|
26973
27039
|
};
|
|
26974
27040
|
|
|
26975
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
26976
|
-
var
|
|
26977
|
-
var isRedacted = (u) => hasProperty(u,
|
|
27041
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Redacted.js
|
|
27042
|
+
var TypeId21 = "~effect/data/Redacted";
|
|
27043
|
+
var isRedacted = (u) => hasProperty(u, TypeId21);
|
|
26978
27044
|
var make23 = (value5, options) => {
|
|
26979
27045
|
const self = Object.create(Proto4);
|
|
26980
27046
|
if (options?.label) {
|
|
@@ -26984,7 +27050,7 @@ var make23 = (value5, options) => {
|
|
|
26984
27050
|
return self;
|
|
26985
27051
|
};
|
|
26986
27052
|
var Proto4 = {
|
|
26987
|
-
[
|
|
27053
|
+
[TypeId21]: {
|
|
26988
27054
|
_A: (_) => _
|
|
26989
27055
|
},
|
|
26990
27056
|
label: void 0,
|
|
@@ -27005,7 +27071,27 @@ var Proto4 = {
|
|
|
27005
27071
|
var value2 = value;
|
|
27006
27072
|
var makeEquivalence5 = (isEquivalent) => make2((x, y) => isEquivalent(value2(x), value2(y)));
|
|
27007
27073
|
|
|
27008
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
27074
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/SchemaError.js
|
|
27075
|
+
var TypeId22 = "~effect/SchemaError/SchemaError";
|
|
27076
|
+
var SchemaError = class extends (/* @__PURE__ */ TaggedError2("SchemaError")) {
|
|
27077
|
+
[TypeId22] = TypeId22;
|
|
27078
|
+
constructor(issue2) {
|
|
27079
|
+
super({
|
|
27080
|
+
issue: issue2
|
|
27081
|
+
});
|
|
27082
|
+
}
|
|
27083
|
+
get message() {
|
|
27084
|
+
return defaultFormatter(this.issue);
|
|
27085
|
+
}
|
|
27086
|
+
toString() {
|
|
27087
|
+
return `SchemaError(${this.message})`;
|
|
27088
|
+
}
|
|
27089
|
+
};
|
|
27090
|
+
function isSchemaError(u) {
|
|
27091
|
+
return hasProperty(u, TypeId22) && u[TypeId22] === TypeId22;
|
|
27092
|
+
}
|
|
27093
|
+
|
|
27094
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/testing/FastCheck.js
|
|
27009
27095
|
var FastCheck_exports = {};
|
|
27010
27096
|
__export(FastCheck_exports, {
|
|
27011
27097
|
Arbitrary: () => Arbitrary,
|
|
@@ -36765,15 +36851,15 @@ var __type = "module";
|
|
|
36765
36851
|
var __version = "4.9.0";
|
|
36766
36852
|
var __commitHash = "0d3c2547dce556f72413607849377530d18ea283";
|
|
36767
36853
|
|
|
36768
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
36769
|
-
var TypeId23 =
|
|
36854
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Schema.js
|
|
36855
|
+
var TypeId23 = TypeId20;
|
|
36770
36856
|
function declareConstructor() {
|
|
36771
36857
|
return (typeParameters, run2, annotations) => {
|
|
36772
36858
|
return make24(new Declaration(typeParameters.map(getAST), (typeParameters2) => run2(typeParameters2.map((ast) => make24(ast))), annotations));
|
|
36773
36859
|
};
|
|
36774
36860
|
}
|
|
36775
36861
|
function declare(is5, annotations) {
|
|
36776
|
-
return declareConstructor()([], () => (input, ast) => is5(input) ? succeed6(input) : fail6(new InvalidType(ast)), annotations);
|
|
36862
|
+
return declareConstructor()([], () => (input, ast, options) => is5(input) ? succeed6(input) : fail6(new InvalidType(ast, input, options)), annotations);
|
|
36777
36863
|
}
|
|
36778
36864
|
function revealBottom(bottom) {
|
|
36779
36865
|
return bottom;
|
|
@@ -36896,6 +36982,9 @@ function decodeUnknownEffect2(schema, options) {
|
|
|
36896
36982
|
return fromIssueEffect(parser(input, options2));
|
|
36897
36983
|
};
|
|
36898
36984
|
}
|
|
36985
|
+
function fromIssueEffect(self) {
|
|
36986
|
+
return catchCause2(self, (cause) => failCauseSync3(() => map6(cause, (issue2) => new SchemaError(issue2))));
|
|
36987
|
+
}
|
|
36899
36988
|
var decodeEffect2 = decodeUnknownEffect2;
|
|
36900
36989
|
function getSchemaErrorOrThrow(cause, message) {
|
|
36901
36990
|
let schemaError;
|
|
@@ -37302,7 +37391,7 @@ function encode(transformation) {
|
|
|
37302
37391
|
};
|
|
37303
37392
|
}
|
|
37304
37393
|
function withConstructorDefault2(defaultValue) {
|
|
37305
|
-
return (schema) => make24(withConstructorDefault(schema.ast,
|
|
37394
|
+
return (schema) => make24(withConstructorDefault(schema.ast, defaultValue), {
|
|
37306
37395
|
schema
|
|
37307
37396
|
});
|
|
37308
37397
|
}
|
|
@@ -38721,7 +38810,7 @@ function isPropertyNames(keySchema, annotations) {
|
|
|
38721
38810
|
}
|
|
38722
38811
|
}
|
|
38723
38812
|
if (isArrayNonEmpty2(issues)) {
|
|
38724
|
-
return new Composite(ast, issues);
|
|
38813
|
+
return new Composite(ast, issues, input, options);
|
|
38725
38814
|
}
|
|
38726
38815
|
return true;
|
|
38727
38816
|
}, {
|
|
@@ -38783,10 +38872,10 @@ function Option(value5) {
|
|
|
38783
38872
|
}
|
|
38784
38873
|
return mapBothEager2(decodeUnknownEffect(value6)(input.value, options), {
|
|
38785
38874
|
onSuccess: some2,
|
|
38786
|
-
onFailure: (issue2) =>
|
|
38875
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "value", issue2, input, options)
|
|
38787
38876
|
});
|
|
38788
38877
|
}
|
|
38789
|
-
return fail6(new InvalidType(ast));
|
|
38878
|
+
return fail6(new InvalidType(ast, input, options));
|
|
38790
38879
|
}, {
|
|
38791
38880
|
representation: {
|
|
38792
38881
|
id: "effect/schema/Option",
|
|
@@ -38862,18 +38951,18 @@ function OptionFromOptionalNullOr(schema, options) {
|
|
|
38862
38951
|
function Result(success2, failure) {
|
|
38863
38952
|
const schema = declareConstructor()([success2, failure], ([success3, failure2]) => (input, ast, options) => {
|
|
38864
38953
|
if (!isResult2(input)) {
|
|
38865
|
-
return fail6(new InvalidType(ast));
|
|
38954
|
+
return fail6(new InvalidType(ast, input, options));
|
|
38866
38955
|
}
|
|
38867
38956
|
switch (input._tag) {
|
|
38868
38957
|
case "Success":
|
|
38869
38958
|
return mapBothEager2(decodeEffect(success3)(input.success, options), {
|
|
38870
38959
|
onSuccess: succeed2,
|
|
38871
|
-
onFailure: (issue2) =>
|
|
38960
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "success", issue2, input, options)
|
|
38872
38961
|
});
|
|
38873
38962
|
case "Failure":
|
|
38874
38963
|
return mapBothEager2(decodeEffect(failure2)(input.failure, options), {
|
|
38875
38964
|
onSuccess: fail2,
|
|
38876
|
-
onFailure: (issue2) =>
|
|
38965
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "failure", issue2, input, options)
|
|
38877
38966
|
});
|
|
38878
38967
|
}
|
|
38879
38968
|
}, {
|
|
@@ -38963,11 +39052,11 @@ function Redacted(value5, options) {
|
|
|
38963
39052
|
return flatMapEager2(label2, () => mapBothEager2(decodeUnknownEffect(value6)(value2(input), poptions), {
|
|
38964
39053
|
onSuccess: () => input,
|
|
38965
39054
|
onFailure: () => {
|
|
38966
|
-
return new Composite(ast, [new Pointer(["value"], new InvalidValue())]);
|
|
39055
|
+
return new Composite(ast, [new Pointer(["value"], new InvalidValue(void 0, input, poptions))], input, poptions);
|
|
38967
39056
|
}
|
|
38968
39057
|
}));
|
|
38969
39058
|
}
|
|
38970
|
-
return fail6(new InvalidType(ast));
|
|
39059
|
+
return fail6(new InvalidType(ast, input, poptions));
|
|
38971
39060
|
}, {
|
|
38972
39061
|
representation: {
|
|
38973
39062
|
id: "effect/schema/Redacted",
|
|
@@ -39024,18 +39113,18 @@ function RedactedFromValue(value5, options) {
|
|
|
39024
39113
|
function CauseReason(error3, defect) {
|
|
39025
39114
|
const schema = declareConstructor()([error3, defect], ([error4, defect2]) => (input, ast, options) => {
|
|
39026
39115
|
if (!isReason(input)) {
|
|
39027
|
-
return fail6(new InvalidType(ast));
|
|
39116
|
+
return fail6(new InvalidType(ast, input, options));
|
|
39028
39117
|
}
|
|
39029
39118
|
switch (input._tag) {
|
|
39030
39119
|
case "Fail":
|
|
39031
39120
|
return mapBothEager2(decodeUnknownEffect(error4)(input.error, options), {
|
|
39032
39121
|
onSuccess: makeFailReason,
|
|
39033
|
-
onFailure: (issue2) =>
|
|
39122
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "error", issue2, input, options)
|
|
39034
39123
|
});
|
|
39035
39124
|
case "Die":
|
|
39036
39125
|
return mapBothEager2(decodeUnknownEffect(defect2)(input.defect, options), {
|
|
39037
39126
|
onSuccess: makeDieReason,
|
|
39038
|
-
onFailure: (issue2) =>
|
|
39127
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "defect", issue2, input, options)
|
|
39039
39128
|
});
|
|
39040
39129
|
case "Interrupt":
|
|
39041
39130
|
return succeed6(input);
|
|
@@ -39130,11 +39219,11 @@ function Cause(error3, defect) {
|
|
|
39130
39219
|
const failures = ArraySchema(CauseReason(error4, defect2));
|
|
39131
39220
|
return (input, ast, options) => {
|
|
39132
39221
|
if (!isCause2(input)) {
|
|
39133
|
-
return fail6(new InvalidType(ast));
|
|
39222
|
+
return fail6(new InvalidType(ast, input, options));
|
|
39134
39223
|
}
|
|
39135
39224
|
return mapBothEager2(decodeUnknownEffect(failures)(input.reasons, options), {
|
|
39136
39225
|
onSuccess: fromReasons,
|
|
39137
|
-
onFailure: (issue2) =>
|
|
39226
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "failures", issue2, input, options)
|
|
39138
39227
|
});
|
|
39139
39228
|
};
|
|
39140
39229
|
}, {
|
|
@@ -39217,7 +39306,7 @@ var getErrorOptions = (key) => {
|
|
|
39217
39306
|
}
|
|
39218
39307
|
};
|
|
39219
39308
|
var errorSchemaCache = [];
|
|
39220
|
-
function
|
|
39309
|
+
function ErrorInstance(options) {
|
|
39221
39310
|
const key = getErrorOptionsKey(options);
|
|
39222
39311
|
const cached4 = errorSchemaCache[key];
|
|
39223
39312
|
if (cached4 !== void 0) {
|
|
@@ -39230,7 +39319,7 @@ function Error3(options) {
|
|
|
39230
39319
|
payload: normalizedOptions ?? null
|
|
39231
39320
|
},
|
|
39232
39321
|
toCode: () => ({
|
|
39233
|
-
runtime: normalizedOptions !== void 0 ? `Schema.
|
|
39322
|
+
runtime: normalizedOptions !== void 0 ? `Schema.ErrorInstance(${format(normalizedOptions)})` : `Schema.ErrorInstance()`,
|
|
39234
39323
|
Type: `globalThis.Error`
|
|
39235
39324
|
}),
|
|
39236
39325
|
expected: "Error",
|
|
@@ -39240,11 +39329,11 @@ function Error3(options) {
|
|
|
39240
39329
|
errorSchemaCache[key] = schema;
|
|
39241
39330
|
return schema;
|
|
39242
39331
|
}
|
|
39243
|
-
var
|
|
39332
|
+
var ErrorInstanceReviver = /* @__PURE__ */ makeDeclarationReviver("effect/schema/Error", ErrorRepresentationPayload, ({
|
|
39244
39333
|
annotations,
|
|
39245
39334
|
payload
|
|
39246
39335
|
}) => {
|
|
39247
|
-
const schema =
|
|
39336
|
+
const schema = ErrorInstance(payload ?? void 0);
|
|
39248
39337
|
return annotations === void 0 ? schema : schema.annotate(annotations);
|
|
39249
39338
|
});
|
|
39250
39339
|
var defectSchemaCache = [];
|
|
@@ -39263,18 +39352,18 @@ function Exit(value5, error3, defect) {
|
|
|
39263
39352
|
const cause = Cause(error4, defect2);
|
|
39264
39353
|
return (input, ast, options) => {
|
|
39265
39354
|
if (!isExit2(input)) {
|
|
39266
|
-
return fail6(new InvalidType(ast));
|
|
39355
|
+
return fail6(new InvalidType(ast, input, options));
|
|
39267
39356
|
}
|
|
39268
39357
|
switch (input._tag) {
|
|
39269
39358
|
case "Success":
|
|
39270
39359
|
return mapBothEager2(decodeUnknownEffect(value6)(input.value, options), {
|
|
39271
39360
|
onSuccess: succeed4,
|
|
39272
|
-
onFailure: (issue2) =>
|
|
39361
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "value", issue2, input, options)
|
|
39273
39362
|
});
|
|
39274
39363
|
case "Failure":
|
|
39275
39364
|
return mapBothEager2(decodeUnknownEffect(cause)(input.cause, options), {
|
|
39276
39365
|
onSuccess: failCause2,
|
|
39277
|
-
onFailure: (issue2) =>
|
|
39366
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "cause", issue2, input, options)
|
|
39278
39367
|
});
|
|
39279
39368
|
}
|
|
39280
39369
|
};
|
|
@@ -39399,10 +39488,10 @@ function ReadonlyMap(key, value5) {
|
|
|
39399
39488
|
if (input instanceof globalThis.Map) {
|
|
39400
39489
|
return mapBothEager2(decodeUnknownEffect(array5)([...input], options), {
|
|
39401
39490
|
onSuccess: (array6) => new globalThis.Map(array6),
|
|
39402
|
-
onFailure: (issue2) =>
|
|
39491
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "entries", issue2, input, options)
|
|
39403
39492
|
});
|
|
39404
39493
|
}
|
|
39405
|
-
return fail6(new InvalidType(ast));
|
|
39494
|
+
return fail6(new InvalidType(ast, input, options));
|
|
39406
39495
|
};
|
|
39407
39496
|
}, {
|
|
39408
39497
|
representation: {
|
|
@@ -39450,10 +39539,10 @@ function HashMap(key, value5) {
|
|
|
39450
39539
|
if (isHashMap2(input)) {
|
|
39451
39540
|
return mapBothEager2(decodeUnknownEffect(entries3)(toEntries2(input), options), {
|
|
39452
39541
|
onSuccess: fromIterable5,
|
|
39453
|
-
onFailure: (issue2) =>
|
|
39542
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "entries", issue2, input, options)
|
|
39454
39543
|
});
|
|
39455
39544
|
}
|
|
39456
|
-
return fail6(new InvalidType(ast));
|
|
39545
|
+
return fail6(new InvalidType(ast, input, options));
|
|
39457
39546
|
};
|
|
39458
39547
|
}, {
|
|
39459
39548
|
representation: {
|
|
@@ -39502,10 +39591,10 @@ function ReadonlySet(value5) {
|
|
|
39502
39591
|
if (input instanceof globalThis.Set) {
|
|
39503
39592
|
return mapBothEager2(decodeUnknownEffect(array5)([...input], options), {
|
|
39504
39593
|
onSuccess: (array6) => new globalThis.Set(array6),
|
|
39505
|
-
onFailure: (issue2) =>
|
|
39594
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "values", issue2, input, options)
|
|
39506
39595
|
});
|
|
39507
39596
|
}
|
|
39508
|
-
return fail6(new InvalidType(ast));
|
|
39597
|
+
return fail6(new InvalidType(ast, input, options));
|
|
39509
39598
|
};
|
|
39510
39599
|
}, {
|
|
39511
39600
|
representation: {
|
|
@@ -39552,10 +39641,10 @@ function HashSet(value5) {
|
|
|
39552
39641
|
if (isHashSet2(input)) {
|
|
39553
39642
|
return mapBothEager2(decodeUnknownEffect(values3)(fromIterable2(input), options), {
|
|
39554
39643
|
onSuccess: fromIterable7,
|
|
39555
|
-
onFailure: (issue2) =>
|
|
39644
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "values", issue2, input, options)
|
|
39556
39645
|
});
|
|
39557
39646
|
}
|
|
39558
|
-
return fail6(new InvalidType(ast));
|
|
39647
|
+
return fail6(new InvalidType(ast, input, options));
|
|
39559
39648
|
};
|
|
39560
39649
|
}, {
|
|
39561
39650
|
representation: {
|
|
@@ -39602,10 +39691,10 @@ function Chunk(value5) {
|
|
|
39602
39691
|
if (isChunk(input)) {
|
|
39603
39692
|
return mapBothEager2(decodeUnknownEffect(values3)(fromIterable2(input), options), {
|
|
39604
39693
|
onSuccess: fromIterable3,
|
|
39605
|
-
onFailure: (issue2) =>
|
|
39694
|
+
onFailure: (issue2) => makeCompositeAtKey(ast, "values", issue2, input, options)
|
|
39606
39695
|
});
|
|
39607
39696
|
}
|
|
39608
|
-
return fail6(new InvalidType(ast));
|
|
39697
|
+
return fail6(new InvalidType(ast, input, options));
|
|
39609
39698
|
};
|
|
39610
39699
|
}, {
|
|
39611
39700
|
representation: {
|
|
@@ -39659,11 +39748,11 @@ var RegExp3 = /* @__PURE__ */ instanceOf(globalThis.RegExp, {
|
|
|
39659
39748
|
source: String5,
|
|
39660
39749
|
flags: String5
|
|
39661
39750
|
}), transformOrFail2({
|
|
39662
|
-
decode: (e) => try_3({
|
|
39751
|
+
decode: (e, options) => try_3({
|
|
39663
39752
|
try: () => new globalThis.RegExp(e.source, e.flags),
|
|
39664
39753
|
catch: () => new InvalidValue({
|
|
39665
|
-
|
|
39666
|
-
})
|
|
39754
|
+
expected: "valid RegExp source and flags"
|
|
39755
|
+
}, e, options)
|
|
39667
39756
|
}),
|
|
39668
39757
|
encode: (regExp) => succeed6({
|
|
39669
39758
|
source: regExp.source,
|
|
@@ -39923,10 +40012,10 @@ var File2 = /* @__PURE__ */ instanceOf(globalThis.File, {
|
|
|
39923
40012
|
name: String5,
|
|
39924
40013
|
lastModified: Int
|
|
39925
40014
|
}), transformOrFail2({
|
|
39926
|
-
decode: (e) => match2(decodeBase64(e.data), {
|
|
40015
|
+
decode: (e, options) => match2(decodeBase64(e.data), {
|
|
39927
40016
|
onFailure: () => fail6(new InvalidValue({
|
|
39928
|
-
|
|
39929
|
-
})),
|
|
40017
|
+
expected: "a valid Base64 string"
|
|
40018
|
+
}, e.data, options)),
|
|
39930
40019
|
onSuccess: (bytes) => {
|
|
39931
40020
|
const buffer = new globalThis.Uint8Array(bytes);
|
|
39932
40021
|
return succeed6(new globalThis.File([buffer], e.name, {
|
|
@@ -39935,7 +40024,7 @@ var File2 = /* @__PURE__ */ instanceOf(globalThis.File, {
|
|
|
39935
40024
|
}));
|
|
39936
40025
|
}
|
|
39937
40026
|
}),
|
|
39938
|
-
encode: (file2) => tryPromise2({
|
|
40027
|
+
encode: (file2, options) => tryPromise2({
|
|
39939
40028
|
try: async () => {
|
|
39940
40029
|
const bytes = new globalThis.Uint8Array(await file2.arrayBuffer());
|
|
39941
40030
|
return {
|
|
@@ -39946,8 +40035,8 @@ var File2 = /* @__PURE__ */ instanceOf(globalThis.File, {
|
|
|
39946
40035
|
};
|
|
39947
40036
|
},
|
|
39948
40037
|
catch: () => new InvalidValue({
|
|
39949
|
-
|
|
39950
|
-
})
|
|
40038
|
+
expected: "a readable File"
|
|
40039
|
+
}, file2, options)
|
|
39951
40040
|
})
|
|
39952
40041
|
}))
|
|
39953
40042
|
});
|
|
@@ -40212,7 +40301,7 @@ var immerable = /* @__PURE__ */ globalThis.Symbol.for("immer-draftable");
|
|
|
40212
40301
|
var payloadToken = {};
|
|
40213
40302
|
function makeClass(Inherited, identifier2, struct2, annotations, proto) {
|
|
40214
40303
|
const getClassSchema = getClassSchemaFactory(struct2, identifier2, annotations);
|
|
40215
|
-
const
|
|
40304
|
+
const ClassTypeId = getClassTypeId(identifier2);
|
|
40216
40305
|
const out = class extends Inherited {
|
|
40217
40306
|
constructor(...[input, options]) {
|
|
40218
40307
|
const internalOptions = options;
|
|
@@ -40228,8 +40317,8 @@ function makeClass(Inherited, identifier2, struct2, annotations, proto) {
|
|
|
40228
40317
|
});
|
|
40229
40318
|
}
|
|
40230
40319
|
static [TypeId23] = TypeId23;
|
|
40231
|
-
get [
|
|
40232
|
-
return
|
|
40320
|
+
get [ClassTypeId]() {
|
|
40321
|
+
return ClassTypeId;
|
|
40233
40322
|
}
|
|
40234
40323
|
static [immerable] = true;
|
|
40235
40324
|
static identifier = identifier2;
|
|
@@ -40300,12 +40389,17 @@ function getClassSchemaFactory(from, identifier2, annotations) {
|
|
|
40300
40389
|
if (memo2 !== void 0) {
|
|
40301
40390
|
return memo2;
|
|
40302
40391
|
}
|
|
40392
|
+
const ClassTypeId = getClassTypeId(identifier2);
|
|
40393
|
+
const isClassValue = (input) => input instanceof self || hasProperty(input, ClassTypeId);
|
|
40303
40394
|
const transformation = getClassTransformation(self);
|
|
40304
|
-
const to = make24(new Declaration([from.ast], () => (input, ast) => {
|
|
40305
|
-
return
|
|
40395
|
+
const to = make24(new Declaration([from.ast], () => (input, ast, options) => {
|
|
40396
|
+
return isClassValue(input) ? succeed6(input) : fail6(new InvalidType(ast, input, options));
|
|
40306
40397
|
}, {
|
|
40307
40398
|
identifier: identifier2,
|
|
40308
|
-
[
|
|
40399
|
+
[CONSTRUCTOR_ANNOTATION_KEY]: ([from2]) => ({
|
|
40400
|
+
isConstructed: isClassValue,
|
|
40401
|
+
link: new Link(from2, transformation)
|
|
40402
|
+
}),
|
|
40309
40403
|
toCodec: ([from2]) => new Link(from2.ast, transformation),
|
|
40310
40404
|
toArbitrary: ([from2]) => () => ({
|
|
40311
40405
|
arbitrary: from2.arbitrary.map((args2) => new self(args2)),
|
|
@@ -40342,14 +40436,14 @@ var TaggedClass = (identifier2) => {
|
|
|
40342
40436
|
return Class4(identifier2 ?? tagValue)(struct2, annotations);
|
|
40343
40437
|
};
|
|
40344
40438
|
};
|
|
40345
|
-
var
|
|
40439
|
+
var Error3 = (identifier2) => (schema, annotations) => {
|
|
40346
40440
|
const struct2 = isStruct(schema) ? schema : Struct(schema);
|
|
40347
40441
|
const self = makeClass(Error2, identifier2, struct2, annotations, (identifier3) => ({
|
|
40348
40442
|
name: identifier3
|
|
40349
40443
|
}));
|
|
40350
40444
|
return self;
|
|
40351
40445
|
};
|
|
40352
|
-
var
|
|
40446
|
+
var TaggedError3 = (identifier2) => {
|
|
40353
40447
|
return (tagValue, schema, annotations) => {
|
|
40354
40448
|
const struct2 = isStruct(schema) ? schema.mapFields((fields) => ({
|
|
40355
40449
|
_tag: tag(tagValue),
|
|
@@ -40357,7 +40451,7 @@ var TaggedErrorClass = (identifier2) => {
|
|
|
40357
40451
|
}), {
|
|
40358
40452
|
unsafePreserveChecks: true
|
|
40359
40453
|
}) : TaggedStruct(tagValue, schema);
|
|
40360
|
-
return
|
|
40454
|
+
return Error3(identifier2 ?? tagValue)(struct2, annotations);
|
|
40361
40455
|
};
|
|
40362
40456
|
};
|
|
40363
40457
|
function toArbitraryLazy(schema) {
|
|
@@ -40514,7 +40608,7 @@ var toCodecJsonASTBase = /* @__PURE__ */ applyToSelfOrLastLinkEncoding((ast) =>
|
|
|
40514
40608
|
});
|
|
40515
40609
|
var toCodecJsonAST = /* @__PURE__ */ memoize(toCodecJsonASTBase);
|
|
40516
40610
|
function withoutConstructorDefault(context4) {
|
|
40517
|
-
return context4.
|
|
40611
|
+
return context4.constructorDefault === void 0 ? context4 : new Context(context4.isOptional, context4.isMutable, void 0, context4.annotations);
|
|
40518
40612
|
}
|
|
40519
40613
|
function validateCanonicalObjectPropertyNames(ast) {
|
|
40520
40614
|
if (ast.propertySignatures.some((ps) => typeof ps.name !== "string")) {
|
|
@@ -40951,7 +41045,7 @@ function resolveAnnotationsKey(schema) {
|
|
|
40951
41045
|
return schema.ast.context?.annotations;
|
|
40952
41046
|
}
|
|
40953
41047
|
|
|
40954
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
41048
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Console.js
|
|
40955
41049
|
var Console_exports = {};
|
|
40956
41050
|
__export(Console_exports, {
|
|
40957
41051
|
Console: () => Console,
|
|
@@ -41048,7 +41142,7 @@ var withTime = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, label)
|
|
|
41048
41142
|
console2.timeEnd(label);
|
|
41049
41143
|
}))));
|
|
41050
41144
|
|
|
41051
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
41145
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Match.js
|
|
41052
41146
|
var Match_exports = {};
|
|
41053
41147
|
__export(Match_exports, {
|
|
41054
41148
|
any: () => any3,
|
|
@@ -41090,7 +41184,7 @@ __export(Match_exports, {
|
|
|
41090
41184
|
withReturnType: () => withReturnType2
|
|
41091
41185
|
});
|
|
41092
41186
|
|
|
41093
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
41187
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/internal/matcher.js
|
|
41094
41188
|
var TypeId24 = "~effect/match/Match/Matcher";
|
|
41095
41189
|
var TypeMatcherProto = {
|
|
41096
41190
|
[TypeId24]: {
|
|
@@ -41170,7 +41264,7 @@ var makePredicate = (pattern) => {
|
|
|
41170
41264
|
return true;
|
|
41171
41265
|
};
|
|
41172
41266
|
} else if (pattern !== null && typeof pattern === "object") {
|
|
41173
|
-
const keysAndPredicates =
|
|
41267
|
+
const keysAndPredicates = Reflect.ownKeys(pattern).map((key) => [key, makePredicate(pattern[key])]);
|
|
41174
41268
|
const len = keysAndPredicates.length;
|
|
41175
41269
|
return (u) => {
|
|
41176
41270
|
if (typeof u !== "object" || u === null) {
|
|
@@ -41343,7 +41437,7 @@ var exhaustive = (self) => {
|
|
|
41343
41437
|
};
|
|
41344
41438
|
};
|
|
41345
41439
|
|
|
41346
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
41440
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Match.js
|
|
41347
41441
|
var type2 = type;
|
|
41348
41442
|
var value4 = value3;
|
|
41349
41443
|
var valueTags2 = valueTags;
|
|
@@ -41382,7 +41476,7 @@ var result4 = result3;
|
|
|
41382
41476
|
var option5 = option4;
|
|
41383
41477
|
var exhaustive2 = exhaustive;
|
|
41384
41478
|
|
|
41385
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
41479
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.105/node_modules/effect/dist/Ref.js
|
|
41386
41480
|
var Ref_exports = {};
|
|
41387
41481
|
__export(Ref_exports, {
|
|
41388
41482
|
get: () => get6,
|
|
@@ -46249,7 +46343,7 @@ var regexes_exports = {};
|
|
|
46249
46343
|
__export(regexes_exports, {
|
|
46250
46344
|
base64: () => base642,
|
|
46251
46345
|
base64url: () => base64url,
|
|
46252
|
-
bigint: () =>
|
|
46346
|
+
bigint: () => bigint3,
|
|
46253
46347
|
boolean: () => boolean4,
|
|
46254
46348
|
browserEmail: () => browserEmail,
|
|
46255
46349
|
cidrv4: () => cidrv4,
|
|
@@ -46370,7 +46464,7 @@ var string5 = (params) => {
|
|
|
46370
46464
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
46371
46465
|
return new RegExp(`^${regex}$`);
|
|
46372
46466
|
};
|
|
46373
|
-
var
|
|
46467
|
+
var bigint3 = /^-?\d+n?$/;
|
|
46374
46468
|
var integer2 = /^-?\d+$/;
|
|
46375
46469
|
var number4 = /^-?\d+(?:\.\d+)?$/;
|
|
46376
46470
|
var boolean4 = /^(?:true|false)$/i;
|
|
@@ -47463,7 +47557,7 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
|
47463
47557
|
});
|
|
47464
47558
|
var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
|
|
47465
47559
|
$ZodType.init(inst, def);
|
|
47466
|
-
inst._zod.pattern =
|
|
47560
|
+
inst._zod.pattern = bigint3;
|
|
47467
47561
|
inst._zod.parse = (payload, _ctx) => {
|
|
47468
47562
|
if (def.coerce)
|
|
47469
47563
|
try {
|
|
@@ -50893,7 +50987,7 @@ __export(schemas_exports3, {
|
|
|
50893
50987
|
array: () => array4,
|
|
50894
50988
|
base64: () => base643,
|
|
50895
50989
|
base64url: () => base64url2,
|
|
50896
|
-
bigint: () =>
|
|
50990
|
+
bigint: () => bigint4,
|
|
50897
50991
|
boolean: () => boolean5,
|
|
50898
50992
|
catch: () => _catch,
|
|
50899
50993
|
check: () => check3,
|
|
@@ -51514,7 +51608,7 @@ var ZodBigInt2 = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
|
|
|
51514
51608
|
inst.maxValue = bag.maximum ?? null;
|
|
51515
51609
|
inst.format = bag.format ?? null;
|
|
51516
51610
|
});
|
|
51517
|
-
function
|
|
51611
|
+
function bigint4(params) {
|
|
51518
51612
|
return _bigint(ZodBigInt2, params);
|
|
51519
51613
|
}
|
|
51520
51614
|
var ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => {
|