@foldkit/devtools-mcp 0.17.0 → 0.18.0-canary.b4db026efbf8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/server.js +597 -229
  2. package/package.json +5 -5
package/dist/server.js CHANGED
@@ -2259,11 +2259,11 @@ var require_resolve = __commonJS({
2259
2259
  return id2 ? id2.replace(TRAILING_SLASH_HASH, "") : "";
2260
2260
  }
2261
2261
  exports.normalizeId = normalizeId;
2262
- function resolveUrl(resolver, baseId, id2) {
2262
+ function resolveUrl2(resolver, baseId, id2) {
2263
2263
  id2 = normalizeId(id2);
2264
2264
  return resolver.resolve(baseId, id2);
2265
2265
  }
2266
- exports.resolveUrl = resolveUrl;
2266
+ exports.resolveUrl = resolveUrl2;
2267
2267
  var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
2268
2268
  function getSchemaRefs(schema, baseId) {
2269
2269
  if (typeof schema == "boolean")
@@ -10575,7 +10575,7 @@ var require_websocket_server = __commonJS({
10575
10575
  }
10576
10576
  });
10577
10577
 
10578
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Pipeable.js
10578
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/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-rc.111/node_modules/effect/dist/Function.js
10622
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Function.js
10623
10623
  var dual = function(arity, body) {
10624
10624
  if (typeof arity === "function") {
10625
10625
  return function() {
@@ -10692,7 +10692,7 @@ function memoizeIdempotent(f) {
10692
10692
  };
10693
10693
  }
10694
10694
 
10695
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Array.js
10695
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Array.js
10696
10696
  var Array_exports = {};
10697
10697
  __export(Array_exports, {
10698
10698
  Array: () => Array2,
@@ -10830,7 +10830,7 @@ __export(Array_exports, {
10830
10830
  zipWith: () => zipWith2
10831
10831
  });
10832
10832
 
10833
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/equal.js
10833
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/equal.js
10834
10834
  var getAllObjectKeys = (obj) => {
10835
10835
  const keys4 = new Set(Reflect.ownKeys(obj));
10836
10836
  if (obj.constructor === Object) return keys4;
@@ -10853,7 +10853,7 @@ var getAllObjectKeys = (obj) => {
10853
10853
  };
10854
10854
  var byReferenceInstances = /* @__PURE__ */ new WeakSet();
10855
10855
 
10856
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Predicate.js
10856
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Predicate.js
10857
10857
  function isString(input) {
10858
10858
  return typeof input === "string";
10859
10859
  }
@@ -10911,7 +10911,7 @@ function isIterable(input) {
10911
10911
  return hasProperty(input, Symbol.iterator) || isString(input);
10912
10912
  }
10913
10913
 
10914
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Hash.js
10914
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Hash.js
10915
10915
  var symbol = "~effect/interfaces/Hash";
10916
10916
  var hash = (self) => {
10917
10917
  switch (typeof self) {
@@ -11035,7 +11035,7 @@ function withVisitedTracking(obj, fn5) {
11035
11035
  return result5;
11036
11036
  }
11037
11037
 
11038
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Equal.js
11038
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Equal.js
11039
11039
  var symbol2 = "~effect/interfaces/Equal";
11040
11040
  function equals() {
11041
11041
  if (arguments.length === 1) {
@@ -11232,7 +11232,7 @@ var byReferenceUnsafe = (obj) => {
11232
11232
  return obj;
11233
11233
  };
11234
11234
 
11235
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Reducer.js
11235
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Reducer.js
11236
11236
  function make(combine2, initialValue, combineAll2) {
11237
11237
  return {
11238
11238
  combine: combine2,
@@ -11247,7 +11247,7 @@ function make(combine2, initialValue, combineAll2) {
11247
11247
  };
11248
11248
  }
11249
11249
 
11250
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Equivalence.js
11250
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Equivalence.js
11251
11251
  var make2 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
11252
11252
  var isStrictEquivalent = (x, y) => x === y;
11253
11253
  var strictEqual = () => isStrictEquivalent;
@@ -11261,10 +11261,10 @@ function Array_(item) {
11261
11261
  });
11262
11262
  }
11263
11263
 
11264
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/array.js
11264
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/array.js
11265
11265
  var isArrayNonEmpty = (self) => self.length > 0;
11266
11266
 
11267
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/doNotation.js
11267
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/doNotation.js
11268
11268
  var let_ = (map14) => dual(3, (self, name, f) => map14(self, (a) => ({
11269
11269
  ...a,
11270
11270
  [name]: f(a)
@@ -11277,7 +11277,7 @@ var bind = (map14, flatMap8) => dual(3, (self, name, f) => flatMap8(self, (a) =>
11277
11277
  [name]: b
11278
11278
  }))));
11279
11279
 
11280
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/record.js
11280
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/record.js
11281
11281
  function assignProperty(self, key, value5) {
11282
11282
  if (key === "__proto__") {
11283
11283
  Object.defineProperty(self, key, {
@@ -11299,7 +11299,7 @@ function assignProperties(self, source) {
11299
11299
  }
11300
11300
  }
11301
11301
 
11302
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Option.js
11302
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Option.js
11303
11303
  var Option_exports = {};
11304
11304
  __export(Option_exports, {
11305
11305
  Do: () => Do,
@@ -11364,7 +11364,7 @@ __export(Option_exports, {
11364
11364
  zipWith: () => zipWith
11365
11365
  });
11366
11366
 
11367
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Combiner.js
11367
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Combiner.js
11368
11368
  function make3(combine2) {
11369
11369
  return {
11370
11370
  combine: combine2
@@ -11377,7 +11377,7 @@ function max(order) {
11377
11377
  return make3((self, that) => order(self, that) === 1 ? self : that);
11378
11378
  }
11379
11379
 
11380
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Redactable.js
11380
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Redactable.js
11381
11381
  var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Redactable");
11382
11382
  var isRedactable = (u) => hasProperty(u, symbolRedactable);
11383
11383
  function redact(u) {
@@ -11399,7 +11399,7 @@ var emptyContext = {
11399
11399
  }
11400
11400
  };
11401
11401
 
11402
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Formatter.js
11402
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Formatter.js
11403
11403
  function format(input, options) {
11404
11404
  const space = options?.space ?? 0;
11405
11405
  const ancestors = /* @__PURE__ */ new WeakSet();
@@ -11500,7 +11500,7 @@ function formatJson(input, options) {
11500
11500
  }, options?.space) ?? "null";
11501
11501
  }
11502
11502
 
11503
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Inspectable.js
11503
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Inspectable.js
11504
11504
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
11505
11505
  var toJson = (input) => {
11506
11506
  try {
@@ -11567,7 +11567,7 @@ var Class2 = class {
11567
11567
  }
11568
11568
  };
11569
11569
 
11570
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Utils.js
11570
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Utils.js
11571
11571
  var SingleShotGen = class _SingleShotGen {
11572
11572
  called = false;
11573
11573
  self;
@@ -11627,7 +11627,7 @@ var pickInternalCall = () => {
11627
11627
  };
11628
11628
  var internalCall = /* @__PURE__ */ pickInternalCall();
11629
11629
 
11630
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/core.js
11630
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/core.js
11631
11631
  var EffectTypeId = `~effect/Effect`;
11632
11632
  var ExitTypeId = `~effect/Exit`;
11633
11633
  var effectVariance = {
@@ -11988,7 +11988,7 @@ var done = (value5) => {
11988
11988
  return exitFail(Done(value5));
11989
11989
  };
11990
11990
 
11991
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/option.js
11991
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/option.js
11992
11992
  var TypeId = "~effect/data/Option";
11993
11993
  var CommonProto = {
11994
11994
  [TypeId]: {
@@ -12054,7 +12054,7 @@ var some = (value5) => {
12054
12054
  return a;
12055
12055
  };
12056
12056
 
12057
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/result.js
12057
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/result.js
12058
12058
  var TypeId2 = "~effect/data/Result";
12059
12059
  var CommonProto2 = {
12060
12060
  [TypeId2]: {
@@ -12124,7 +12124,7 @@ var getFailure = (self) => isSuccess(self) ? none : some(self.failure);
12124
12124
  var getSuccess = (self) => isFailure(self) ? none : some(self.success);
12125
12125
  var fromOption = /* @__PURE__ */ dual(2, (self, onNone) => isNone(self) ? fail(onNone()) : succeed(self.value));
12126
12126
 
12127
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Order.js
12127
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Order.js
12128
12128
  function make4(compare) {
12129
12129
  return (self, that) => self === that ? 0 : compare(self, that);
12130
12130
  }
@@ -12172,7 +12172,7 @@ var max2 = (O) => dual(2, (self, that) => self === that || O(self, that) > -1 ?
12172
12172
  var clamp = (O) => dual(2, (self, options) => min2(O)(options.maximum, max2(O)(options.minimum, self)));
12173
12173
  var isBetween = (O) => dual(2, (self, options) => !isLessThan(O)(self, options.minimum) && !isGreaterThan(O)(self, options.maximum));
12174
12174
 
12175
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Option.js
12175
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Option.js
12176
12176
  var none2 = () => none;
12177
12177
  var some2 = some;
12178
12178
  var isOption2 = isOption;
@@ -12350,7 +12350,7 @@ function makeReducerFailFast(reducer2) {
12350
12350
  });
12351
12351
  }
12352
12352
 
12353
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Result.js
12353
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Result.js
12354
12354
  var succeed2 = succeed;
12355
12355
  var fail2 = fail;
12356
12356
  var fromOption2 = fromOption;
@@ -12407,10 +12407,10 @@ var all2 = (input) => {
12407
12407
  return succeed2(out);
12408
12408
  };
12409
12409
 
12410
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Tuple.js
12410
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Tuple.js
12411
12411
  var make5 = (...elements) => elements;
12412
12412
 
12413
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Iterable.js
12413
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Iterable.js
12414
12414
  var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
12415
12415
  let i = 0;
12416
12416
  for (const a of self) {
@@ -12453,7 +12453,7 @@ var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => ({
12453
12453
  }
12454
12454
  }));
12455
12455
 
12456
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Record.js
12456
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Record.js
12457
12457
  var collect = /* @__PURE__ */ dual(2, (self, f) => {
12458
12458
  const out = [];
12459
12459
  for (const key of keys(self)) {
@@ -12473,7 +12473,7 @@ var map3 = /* @__PURE__ */ dual(2, (self, f) => {
12473
12473
  });
12474
12474
  var keys = (self) => Object.keys(self);
12475
12475
 
12476
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Array.js
12476
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Array.js
12477
12477
  var Array2 = globalThis.Array;
12478
12478
  var make6 = (...elements) => elements;
12479
12479
  var allocate = (n) => new Array2(n);
@@ -13178,7 +13178,7 @@ var countBy = /* @__PURE__ */ dual(2, (self, f) => {
13178
13178
  return count2;
13179
13179
  });
13180
13180
 
13181
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/BigDecimal.js
13181
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/BigDecimal.js
13182
13182
  var FINITE_INT_REGEXP = /^[+-]?\d+$/;
13183
13183
  var TypeId3 = "~effect/BigDecimal";
13184
13184
  var BigDecimalProto = {
@@ -13407,11 +13407,11 @@ var floor = /* @__PURE__ */ dual(isBigDecimalArgs, (self, scale2 = 0) => {
13407
13407
  return truncated;
13408
13408
  });
13409
13409
 
13410
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Boolean.js
13410
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Boolean.js
13411
13411
  var Boolean2 = globalThis.Boolean;
13412
13412
  var ReducerOr = /* @__PURE__ */ make((a, b) => a || b, false);
13413
13413
 
13414
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaAST.js
13414
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaAST.js
13415
13415
  var SchemaAST_exports = {};
13416
13416
  __export(SchemaAST_exports, {
13417
13417
  Any: () => Any,
@@ -13547,13 +13547,13 @@ __export(SchemaAST_exports, {
13547
13547
  withConstructorDefault: () => withConstructorDefault
13548
13548
  });
13549
13549
 
13550
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Effectable.js
13550
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effectable.js
13551
13551
  var Prototype2 = (options) => makePrimitiveProto({
13552
13552
  op: options.label,
13553
13553
  [evaluate]: options.evaluate
13554
13554
  });
13555
13555
 
13556
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Context.js
13556
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Context.js
13557
13557
  var ServiceTypeId = "~effect/Context/Service";
13558
13558
  var Service = function() {
13559
13559
  function KeyClass() {
@@ -13755,7 +13755,7 @@ var mergeAll = (...ctxs) => {
13755
13755
  };
13756
13756
  var Reference = Service;
13757
13757
 
13758
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Duration.js
13758
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Duration.js
13759
13759
  var Duration_exports = {};
13760
13760
  __export(Duration_exports, {
13761
13761
  CombinerMax: () => CombinerMax,
@@ -14343,7 +14343,7 @@ var ReducerSum = /* @__PURE__ */ make(sum2, zero2);
14343
14343
  var CombinerMax = /* @__PURE__ */ max(Order2);
14344
14344
  var CombinerMin = /* @__PURE__ */ min(Order2);
14345
14345
 
14346
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Filter.js
14346
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Filter.js
14347
14347
  var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
14348
14348
  const leftOut = left(input);
14349
14349
  if (isFailure2(leftOut)) return fail2(input);
@@ -14352,7 +14352,7 @@ var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
14352
14352
  return rightOut;
14353
14353
  });
14354
14354
 
14355
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Scheduler.js
14355
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Scheduler.js
14356
14356
  var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
14357
14357
  fiberCached: true,
14358
14358
  defaultValue: () => new MixedScheduler()
@@ -14489,7 +14489,7 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
14489
14489
  defaultValue: () => false
14490
14490
  });
14491
14491
 
14492
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Data.js
14492
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Data.js
14493
14493
  var Class3 = class extends Class {
14494
14494
  constructor(props) {
14495
14495
  super();
@@ -14500,7 +14500,7 @@ var Class3 = class extends Class {
14500
14500
  };
14501
14501
  var TaggedError2 = TaggedError;
14502
14502
 
14503
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Encoding.js
14503
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Encoding.js
14504
14504
  var EncodingErrorTypeId = "~effect/encoding/EncodingError";
14505
14505
  var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
14506
14506
  /**
@@ -14681,7 +14681,7 @@ var fromHexChar = (byte) => {
14681
14681
  throw new TypeError("Invalid input");
14682
14682
  };
14683
14683
 
14684
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Tracer.js
14684
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Tracer.js
14685
14685
  var ParentSpanKey = "effect/Tracer/ParentSpan";
14686
14686
  var ParentSpan = class extends (/* @__PURE__ */ Service()(ParentSpanKey, {
14687
14687
  fiberCached: true
@@ -14753,10 +14753,10 @@ var NativeSpan = class {
14753
14753
  }
14754
14754
  };
14755
14755
 
14756
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/metric.js
14756
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/metric.js
14757
14757
  var FiberRuntimeMetricsKey = "effect/observability/Metric/FiberRuntimeMetricsKey";
14758
14758
 
14759
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/references.js
14759
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/references.js
14760
14760
  var CurrentErrorReporters = /* @__PURE__ */ Reference("effect/ErrorReporter/CurrentErrorReporters", {
14761
14761
  defaultValue: () => /* @__PURE__ */ new Set()
14762
14762
  });
@@ -14791,7 +14791,7 @@ var CurrentLogSpans = /* @__PURE__ */ Reference("effect/References/CurrentLogSpa
14791
14791
  defaultValue: () => []
14792
14792
  });
14793
14793
 
14794
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/stackTraceLimit.js
14794
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/stackTraceLimit.js
14795
14795
  var isStackTraceLimitWritable = () => {
14796
14796
  const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
14797
14797
  if (desc === void 0) {
@@ -14808,7 +14808,7 @@ var setStackTraceLimit = (value5) => {
14808
14808
  }
14809
14809
  };
14810
14810
 
14811
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/tracer.js
14811
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/tracer.js
14812
14812
  var addSpanStackTrace = (options) => {
14813
14813
  if (options?.captureStackTrace === false) {
14814
14814
  return options;
@@ -14839,7 +14839,7 @@ var makeStackCleaner = (line) => (stack) => {
14839
14839
  };
14840
14840
  var spanCleaner = /* @__PURE__ */ makeStackCleaner(3);
14841
14841
 
14842
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/effect.js
14842
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/effect.js
14843
14843
  var Interrupt = class extends ReasonBase {
14844
14844
  fiberId;
14845
14845
  constructor(fiberId3, annotations = constEmptyAnnotations) {
@@ -16129,11 +16129,13 @@ var scopeCloseUnsafe = (self, exit_) => {
16129
16129
  self.state = closed;
16130
16130
  return;
16131
16131
  }
16132
- const {
16133
- finalizers
16134
- } = self.state;
16132
+ const state = self.state;
16135
16133
  self.state = closed;
16136
- if (finalizers.size === 0) {
16134
+ if (state.finalizer !== void 0) {
16135
+ return state.finalizer(exit_);
16136
+ }
16137
+ const finalizers = state.finalizers;
16138
+ if (finalizers === void 0 || finalizers.size === 0) {
16137
16139
  return;
16138
16140
  } else if (finalizers.size === 1) {
16139
16141
  return finalizers.values().next().value(exit_);
@@ -16183,15 +16185,34 @@ var scopeAddFinalizerUnsafe = (scope3, key, finalizer) => {
16183
16185
  if (scope3.state._tag === "Empty") {
16184
16186
  scope3.state = {
16185
16187
  _tag: "Open",
16186
- finalizers: /* @__PURE__ */ new Map([[key, finalizer]])
16188
+ finalizerKey: key,
16189
+ finalizer,
16190
+ finalizers: void 0
16187
16191
  };
16188
16192
  } else if (scope3.state._tag === "Open") {
16189
- scope3.state.finalizers.set(key, finalizer);
16193
+ const state = scope3.state;
16194
+ if (state.finalizer !== void 0) {
16195
+ state.finalizers = /* @__PURE__ */ new Map([[state.finalizerKey, state.finalizer]]);
16196
+ state.finalizerKey = void 0;
16197
+ state.finalizer = void 0;
16198
+ state.finalizers.set(key, finalizer);
16199
+ } else if (state.finalizers === void 0) {
16200
+ state.finalizerKey = key;
16201
+ state.finalizer = finalizer;
16202
+ } else {
16203
+ state.finalizers.set(key, finalizer);
16204
+ }
16190
16205
  }
16191
16206
  };
16192
16207
  var scopeRemoveFinalizerUnsafe = (scope3, key) => {
16193
16208
  if (scope3.state._tag === "Open") {
16194
- scope3.state.finalizers.delete(key);
16209
+ const state = scope3.state;
16210
+ if (state.finalizerKey === key) {
16211
+ state.finalizerKey = void 0;
16212
+ state.finalizer = void 0;
16213
+ } else if (state.finalizers !== void 0) {
16214
+ state.finalizers.delete(key);
16215
+ }
16195
16216
  }
16196
16217
  };
16197
16218
  var scopeMakeUnsafe = (finalizerStrategy = "sequential") => ({
@@ -16495,7 +16516,7 @@ var iterateEagerImpl = (options) => {
16495
16516
  if (concurrency === 1) {
16496
16517
  return runSequential(state, items, 0, end);
16497
16518
  }
16498
- const orderedStep = opts?.orderedStep === true && concurrency > 1;
16519
+ const orderedStep = opts?.orderedStep === true;
16499
16520
  let done4 = false;
16500
16521
  let parentFiber;
16501
16522
  let fibers;
@@ -17406,7 +17427,7 @@ var reportCauseUnsafe = (fiber3, cause, defectsOnly) => {
17406
17427
  reporters.forEach((reporter) => reporter.report(opts));
17407
17428
  };
17408
17429
 
17409
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Cause.js
17430
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Cause.js
17410
17431
  var isCause2 = isCause;
17411
17432
  var isReason = isCauseReason;
17412
17433
  var isFailReason2 = isFailReason;
@@ -17421,7 +17442,7 @@ var isDone2 = isDone;
17421
17442
  var done2 = done;
17422
17443
  var IllegalArgumentError2 = IllegalArgumentError;
17423
17444
 
17424
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Effect.js
17445
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effect.js
17425
17446
  var Effect_exports = {};
17426
17447
  __export(Effect_exports, {
17427
17448
  Do: () => Do4,
@@ -17654,7 +17675,7 @@ __export(Effect_exports, {
17654
17675
  zipWith: () => zipWith4
17655
17676
  });
17656
17677
 
17657
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Exit.js
17678
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Exit.js
17658
17679
  var Exit_exports = {};
17659
17680
  __export(Exit_exports, {
17660
17681
  asVoid: () => asVoid3,
@@ -17713,7 +17734,7 @@ var getSuccess3 = exitGetSuccess;
17713
17734
  var getCause = exitGetCause;
17714
17735
  var findErrorOption2 = exitFindErrorOption;
17715
17736
 
17716
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Deferred.js
17737
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Deferred.js
17717
17738
  var Deferred_exports = {};
17718
17739
  __export(Deferred_exports, {
17719
17740
  await: () => _await,
@@ -17800,16 +17821,16 @@ var doneUnsafe = (self, effect) => {
17800
17821
  };
17801
17822
  var into = /* @__PURE__ */ dual(2, (self, deferred) => uninterruptibleMask((restore) => flatMap4(exit(restore(self)), (exit3) => done3(deferred, exit3))));
17802
17823
 
17803
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/References.js
17824
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/References.js
17804
17825
  var CurrentLogAnnotations2 = CurrentLogAnnotations;
17805
17826
  var CurrentLogSpans2 = CurrentLogSpans;
17806
17827
 
17807
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Scope.js
17828
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Scope.js
17808
17829
  var makeUnsafe3 = scopeMakeUnsafe;
17809
17830
  var forkUnsafe2 = scopeForkUnsafe;
17810
17831
  var close = scopeClose;
17811
17832
 
17812
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Layer.js
17833
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Layer.js
17813
17834
  var TypeId7 = "~effect/Layer";
17814
17835
  var MemoMapTypeId = "~effect/Layer/MemoMap";
17815
17836
  var memoMapReuse = (entry, scope3) => {
@@ -17904,7 +17925,7 @@ var mergeAll2 = (...layers) => fromBuild((memoMap, scope3) => mergeAllEffect(lay
17904
17925
  var provideWith = (self, that, f) => fromBuild((memoMap, scope3) => flatMap4(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope3) : that.build(memoMap, scope3), (context3) => self.build(memoMap, scope3).pipe(provideContext(context3), map5((merged) => f(merged, context3)))));
17905
17926
  var provide2 = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, identity));
17906
17927
 
17907
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/ExecutionPlan.js
17928
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/ExecutionPlan.js
17908
17929
  var TypeId8 = "~effect/ExecutionPlan";
17909
17930
  var Proto2 = {
17910
17931
  [TypeId8]: TypeId8,
@@ -17931,7 +17952,7 @@ var CurrentMetadata = /* @__PURE__ */ Reference("effect/ExecutionPlan/CurrentMet
17931
17952
  })
17932
17953
  });
17933
17954
 
17934
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schedule.js
17955
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schedule.js
17935
17956
  var Schedule_exports = {};
17936
17957
  __export(Schedule_exports, {
17937
17958
  CurrentMetadata: () => CurrentMetadata2,
@@ -17967,7 +17988,7 @@ __export(Schedule_exports, {
17967
17988
  windowed: () => windowed
17968
17989
  });
17969
17990
 
17970
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/dateTime.js
17991
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/dateTime.js
17971
17992
  var TypeId9 = "~effect/time/DateTime";
17972
17993
  var TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
17973
17994
  var Proto3 = {
@@ -18373,7 +18394,7 @@ var formatIsoOffset = (self) => {
18373
18394
  };
18374
18395
  var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
18375
18396
 
18376
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Number.js
18397
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Number.js
18377
18398
  var Number3 = globalThis.Number;
18378
18399
  var Order4 = Number2;
18379
18400
  var remainder = /* @__PURE__ */ dual(2, (self, divisor) => {
@@ -18415,13 +18436,13 @@ function toScientificInteger(n) {
18415
18436
  var ReducerMax = /* @__PURE__ */ make((a, b) => Math.max(a, b), -Infinity);
18416
18437
  var ReducerMin = /* @__PURE__ */ make((a, b) => Math.min(a, b), Infinity);
18417
18438
 
18418
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/String.js
18439
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/String.js
18419
18440
  var String2 = globalThis.String;
18420
18441
  var toLowerCase = (self) => self.toLowerCase();
18421
18442
  var trim = (self) => self.trim();
18422
18443
  var isNonEmpty = (self) => self.length > 0;
18423
18444
 
18424
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Cron.js
18445
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Cron.js
18425
18446
  var TypeId10 = "~effect/time/Cron";
18426
18447
  function toPojo(cron2) {
18427
18448
  const out = {
@@ -18940,7 +18961,7 @@ function aliasOrValue(field, aliases) {
18940
18961
  }
18941
18962
  var decimalRegex = /^\d+$/;
18942
18963
 
18943
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/random.js
18964
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/random.js
18944
18965
  var Random = /* @__PURE__ */ Reference("effect/Random", {
18945
18966
  defaultValue: () => ({
18946
18967
  nextIntUnsafe() {
@@ -18952,7 +18973,7 @@ var Random = /* @__PURE__ */ Reference("effect/Random", {
18952
18973
  })
18953
18974
  });
18954
18975
 
18955
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Pull.js
18976
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Pull.js
18956
18977
  var catchDone = /* @__PURE__ */ dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
18957
18978
  var isDoneFailure = (failure) => failure._tag === "Fail" && isDone2(failure.error);
18958
18979
  var filterDone = (cause) => {
@@ -18980,7 +19001,7 @@ var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(s
18980
19001
  }
18981
19002
  }));
18982
19003
 
18983
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schedule.js
19004
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schedule.js
18984
19005
  var TypeId11 = "~effect/Schedule";
18985
19006
  var randomNext = /* @__PURE__ */ Random.useSync((random2) => random2.nextDoubleUnsafe());
18986
19007
  var CurrentMetadata2 = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetadata", {
@@ -19270,11 +19291,11 @@ var constIdentity = /* @__PURE__ */ fromStep(/* @__PURE__ */ succeed3((_now, inp
19270
19291
  var identity_ = () => constIdentity;
19271
19292
  var setInputType = () => (self) => self;
19272
19293
 
19273
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/layer.js
19294
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/layer.js
19274
19295
  var provideLayer = (self, layer, options) => scopedWith((scope3) => flatMap4(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope3) : buildWithScope(layer, scope3), (context3) => provideContext(self, context3)));
19275
19296
  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));
19276
19297
 
19277
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schedule.js
19298
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schedule.js
19278
19299
  var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule2, orElse4) => flatMap4(toStepWithMetadata(schedule2), (step) => {
19279
19300
  let meta3 = CurrentMetadata2.defaultValue();
19280
19301
  return catch_(forever(tap2(flatMap4(suspend(() => provideService(self, CurrentMetadata2, meta3)), step), (meta_) => sync(() => {
@@ -19345,7 +19366,7 @@ var buildFromOptions = (options) => {
19345
19366
  return schedule2;
19346
19367
  };
19347
19368
 
19348
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/executionPlan.js
19369
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/executionPlan.js
19349
19370
  var makeEventEmitter = (onEvent, currentMetadata) => {
19350
19371
  let lastStepIndex = -1;
19351
19372
  let stepAttempt = 0;
@@ -19450,7 +19471,7 @@ var scheduleFromStep = (step, first) => {
19450
19471
  };
19451
19472
  var scheduleOnce = /* @__PURE__ */ recurs(1);
19452
19473
 
19453
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Request.js
19474
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Request.js
19454
19475
  var TypeId12 = "~effect/Request";
19455
19476
  var requestVariance = /* @__PURE__ */ byReferenceUnsafe({
19456
19477
  /* c8 ignore next */
@@ -19466,7 +19487,7 @@ var RequestPrototype = {
19466
19487
  };
19467
19488
  var makeEntry = (options) => options;
19468
19489
 
19469
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/request.js
19490
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/request.js
19470
19491
  var request = /* @__PURE__ */ dual(2, (self, resolver) => {
19471
19492
  const withResolver = (resolver2) => callback((resume) => {
19472
19493
  const entry = addEntry(resolver2, self, resume, getCurrentFiber());
@@ -19576,7 +19597,7 @@ function runBatch(batch) {
19576
19597
  return batch.run;
19577
19598
  }
19578
19599
 
19579
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Metric.js
19600
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Metric.js
19580
19601
  var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
19581
19602
  var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
19582
19603
  defaultValue: () => ({})
@@ -19676,7 +19697,7 @@ function attributesToRecord(attributes) {
19676
19697
  return attributes;
19677
19698
  }
19678
19699
 
19679
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Effect.js
19700
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effect.js
19680
19701
  var TypeId14 = EffectTypeId;
19681
19702
  var isEffect2 = isEffect;
19682
19703
  var all4 = all3;
@@ -20033,7 +20054,7 @@ var flatMapEager2 = flatMapEager;
20033
20054
  var catchEager2 = catchEager;
20034
20055
  var fnUntracedEager2 = fnUntracedEager;
20035
20056
 
20036
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/annotations.js
20057
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/annotations.js
20037
20058
  function resolve(ast) {
20038
20059
  return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
20039
20060
  }
@@ -20057,7 +20078,7 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
20057
20078
  });
20058
20079
  var annotationExcludedKeys = /* @__PURE__ */ new Set([SENTINELS_ANNOTATION_KEY, STRUCTURAL_ANNOTATION_KEY, "representation", "arbitrary", "brands", "toJsonSchema", "toCode", "toArbitrary", "toEquivalence", "toFormatter", "toCodec", "toCodecJson", "toCodecStringTree", "toCodecIso"]);
20059
20080
 
20060
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/parser.js
20081
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/parser.js
20061
20082
  var missing = /* @__PURE__ */ Symbol();
20062
20083
  var succeed7 = succeed4;
20063
20084
  var missingExit = /* @__PURE__ */ succeed7(missing);
@@ -20065,7 +20086,7 @@ var sameExit = /* @__PURE__ */ succeed7(missing);
20065
20086
  var toOption2 = (value5) => value5 === missing ? none2() : some2(value5);
20066
20087
  var fromOptionExit = (option5) => option5._tag === "None" ? missingExit : succeed7(option5.value);
20067
20088
 
20068
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaIssue.js
20089
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaIssue.js
20069
20090
  var TypeId15 = "~effect/SchemaIssue/Issue";
20070
20091
  function isIssue(u) {
20071
20092
  return hasProperty(u, TypeId15) && u[TypeId15] === TypeId15;
@@ -20408,7 +20429,7 @@ function findMessage(issue2) {
20408
20429
  if (typeof message === "string") return message;
20409
20430
  }
20410
20431
 
20411
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/cause.js
20432
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/cause.js
20412
20433
  function getSchemaIssue(cause) {
20413
20434
  let issue2;
20414
20435
  for (const reason of cause.reasons) {
@@ -20429,7 +20450,7 @@ function getSchemaIssueOrThrow(cause, message) {
20429
20450
  return issue2;
20430
20451
  }
20431
20452
 
20432
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/DateTime.js
20453
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/DateTime.js
20433
20454
  var isDateTime2 = isDateTime;
20434
20455
  var isTimeZone2 = isTimeZone;
20435
20456
  var isTimeZoneOffset2 = isTimeZoneOffset;
@@ -20453,7 +20474,7 @@ var toEpochMillis2 = toEpochMillis;
20453
20474
  var formatIso2 = formatIso;
20454
20475
  var formatIsoZoned2 = formatIsoZoned;
20455
20476
 
20456
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaGetter.js
20477
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaGetter.js
20457
20478
  var Getter = class _Getter extends Class {
20458
20479
  run;
20459
20480
  constructor(run2) {
@@ -20740,7 +20761,7 @@ function collectBracketPathEntries(isLeaf) {
20740
20761
  };
20741
20762
  }
20742
20763
 
20743
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaTransformation.js
20764
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaTransformation.js
20744
20765
  var Middleware = class _Middleware {
20745
20766
  _tag = "Middleware";
20746
20767
  decode;
@@ -20981,7 +21002,7 @@ var dateTimeZonedFromString = /* @__PURE__ */ transformOrFail2({
20981
21002
  encode: (zoned) => succeed6(formatIsoZoned2(zoned))
20982
21003
  });
20983
21004
 
20984
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaAST.js
21005
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaAST.js
20985
21006
  function makeGuard(tag4) {
20986
21007
  return (ast) => ast._tag === tag4;
20987
21008
  }
@@ -21053,11 +21074,17 @@ var Declaration = class _Declaration extends Base2 {
21053
21074
  typeParameters;
21054
21075
  run;
21055
21076
  encodingChecks;
21056
- constructor(typeParameters, run2, annotations, checks, encoding, context3, encodingChecks) {
21077
+ /**
21078
+ * Parser factory {@link flip} swaps in, so a declaration can behave
21079
+ * differently when encoding. `undefined` reuses {@link run}.
21080
+ */
21081
+ encodingRun;
21082
+ constructor(typeParameters, run2, annotations, checks, encoding, context3, encodingChecks, encodingRun) {
21057
21083
  super(annotations, checks, encoding, context3);
21058
21084
  this.typeParameters = typeParameters;
21059
21085
  this.run = run2;
21060
21086
  this.encodingChecks = encodingChecks;
21087
+ this.encodingRun = encodingRun;
21061
21088
  }
21062
21089
  /** @internal */
21063
21090
  getParser() {
@@ -21067,17 +21094,17 @@ var Declaration = class _Declaration extends Base2 {
21067
21094
  return (run2 ??= this.run(this.typeParameters))(input, this, options);
21068
21095
  };
21069
21096
  }
21070
- _rebuild(recur3, checks, encodingChecks) {
21097
+ _rebuild(recur3, checks, encodingChecks, run2, encodingRun) {
21071
21098
  const tps = mapOrSame(this.typeParameters, recur3);
21072
- return tps === this.typeParameters && checks === this.checks && encodingChecks === this.encodingChecks ? this : new _Declaration(tps, this.run, this.annotations, checks, void 0, this.context, encodingChecks);
21099
+ return tps === this.typeParameters && checks === this.checks && encodingChecks === this.encodingChecks && run2 === this.run && encodingRun === this.encodingRun ? this : new _Declaration(tps, run2, this.annotations, checks, void 0, this.context, encodingChecks, encodingRun);
21073
21100
  }
21074
21101
  /** @internal */
21075
21102
  recur(recur3) {
21076
- return this._rebuild(recur3, this.checks, this.encodingChecks);
21103
+ return this._rebuild(recur3, this.checks, this.encodingChecks, this.run, this.encodingRun);
21077
21104
  }
21078
21105
  /** @internal */
21079
21106
  flip(recur3) {
21080
- return this._rebuild(recur3, this.encodingChecks, this.checks);
21107
+ return this._rebuild(recur3, this.encodingChecks, this.checks, this.encodingRun ?? this.run, this.run);
21081
21108
  }
21082
21109
  /** @internal */
21083
21110
  getExpected() {
@@ -21744,13 +21771,7 @@ var Objects = class _Objects extends Base2 {
21744
21771
  onItem: (s, [key, index2]) => parseIndex(s, key, index2),
21745
21772
  step: (_s, _, exit3) => exit3._tag === "Failure" ? exit3 : void 0
21746
21773
  }) : void 0;
21747
- return fnUntracedEager2(function* (input, options) {
21748
- if (input === missing) {
21749
- return missing;
21750
- }
21751
- if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
21752
- return yield* fail6(new InvalidType(ast, input, options));
21753
- }
21774
+ const compileMembers = () => {
21754
21775
  if (!properties) {
21755
21776
  properties = ast.propertySignatures.map((ps) => ({
21756
21777
  parser: compileConstructorDefault2(ps.type),
@@ -21763,6 +21784,16 @@ var Objects = class _Objects extends Base2 {
21763
21784
  parserValue: compileConstructorDefault2(is5.type)
21764
21785
  })) : void 0;
21765
21786
  }
21787
+ return properties;
21788
+ };
21789
+ const fallback = fnUntracedEager2(function* (input, options) {
21790
+ if (input === missing) {
21791
+ return missing;
21792
+ }
21793
+ if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
21794
+ return yield* fail6(new InvalidType(ast, input, options));
21795
+ }
21796
+ compileMembers();
21766
21797
  const record4 = input;
21767
21798
  const out = {};
21768
21799
  const state = {
@@ -21844,6 +21875,57 @@ var Objects = class _Objects extends Base2 {
21844
21875
  }
21845
21876
  return out;
21846
21877
  });
21878
+ if (indexCount) return fallback;
21879
+ const resume = (state, index2, pending) => {
21880
+ const property = properties[index2];
21881
+ return flatMap5(exit2(pending), (exit3) => {
21882
+ const terminal = stepProperty(state, property, exit3);
21883
+ if (terminal) return terminal;
21884
+ const done4 = () => succeed7(state.out);
21885
+ const eff = parseProperties(state, properties.slice(index2 + 1));
21886
+ return eff ? flatMapEager2(eff, done4) : done4();
21887
+ });
21888
+ };
21889
+ return (input, options) => {
21890
+ if (input === missing) return missingExit;
21891
+ if (options.errors === "all" || options.onExcessProperty !== void 0 || options.propertyOrder === "original" || options.concurrency !== void 0) {
21892
+ return fallback(input, options);
21893
+ }
21894
+ if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
21895
+ return fail6(new InvalidType(ast, input, options));
21896
+ }
21897
+ const props = compileMembers();
21898
+ const record4 = input;
21899
+ const out = {};
21900
+ const state = {
21901
+ ast,
21902
+ input: record4,
21903
+ out,
21904
+ issues: void 0,
21905
+ options
21906
+ };
21907
+ try {
21908
+ for (let index2 = 0; index2 < props.length; index2++) {
21909
+ const property = props[index2];
21910
+ const name = property.name;
21911
+ const hasKey = Object.hasOwn(record4, name);
21912
+ const value5 = hasKey ? record4[name] : missing;
21913
+ const exit3 = property.parser(value5, options);
21914
+ if (!effectIsExit(exit3)) {
21915
+ return resume(state, index2, exit3);
21916
+ }
21917
+ if (exit3 === sameExit) {
21918
+ if (hasKey) assignProperty(out, name, value5);
21919
+ continue;
21920
+ }
21921
+ const terminal = stepProperty(state, property, exit3);
21922
+ if (terminal) return terminal;
21923
+ }
21924
+ } catch (error3) {
21925
+ return die4(error3);
21926
+ }
21927
+ return succeed7(out);
21928
+ };
21847
21929
  }
21848
21930
  _rebuild(recur3, recurParameter, checks, encodingChecks) {
21849
21931
  const props = mapOrSame(this.propertySignatures, (ps) => {
@@ -21871,6 +21953,28 @@ var Objects = class _Objects extends Base2 {
21871
21953
  return "object";
21872
21954
  }
21873
21955
  };
21956
+ function stepProperty(s, p, exit3) {
21957
+ if (exit3._tag === "Failure") {
21958
+ return wrapPropertyKeyIssue(s, s.ast, p.name, exit3);
21959
+ }
21960
+ if (exit3 === sameExit) return;
21961
+ const value5 = exit3[args];
21962
+ if (value5 !== missing) {
21963
+ assignProperty(s.out, p.name, value5);
21964
+ return;
21965
+ }
21966
+ delete s.out[p.name];
21967
+ if (!isOptional(p.type)) {
21968
+ const issue2 = new Pointer([p.name], new MissingKey(p.type.context?.annotations));
21969
+ if (s.options.errors === "all") {
21970
+ if (s.issues) s.issues.push(issue2);
21971
+ else s.issues = [issue2];
21972
+ return;
21973
+ } else {
21974
+ return fail4(new Composite(s.ast, [issue2], s.input, s.options));
21975
+ }
21976
+ }
21977
+ }
21874
21978
  var parseProperties = /* @__PURE__ */ iterateEager()({
21875
21979
  onItem(s, p) {
21876
21980
  if (!Object.hasOwn(s.input, p.name)) {
@@ -21880,28 +21984,7 @@ var parseProperties = /* @__PURE__ */ iterateEager()({
21880
21984
  assignProperty(s.out, p.name, value5);
21881
21985
  return p.parser(value5, s.options);
21882
21986
  },
21883
- step(s, p, exit3) {
21884
- if (exit3._tag === "Failure") {
21885
- return wrapPropertyKeyIssue(s, s.ast, p.name, exit3);
21886
- }
21887
- if (exit3 === sameExit) return;
21888
- const value5 = exit3[args];
21889
- if (value5 !== missing) {
21890
- assignProperty(s.out, p.name, value5);
21891
- return;
21892
- }
21893
- delete s.out[p.name];
21894
- if (!isOptional(p.type)) {
21895
- const issue2 = new Pointer([p.name], new MissingKey(p.type.context?.annotations));
21896
- if (s.options.errors === "all") {
21897
- if (s.issues) s.issues.push(issue2);
21898
- else s.issues = [issue2];
21899
- return;
21900
- } else {
21901
- return fail4(new Composite(s.ast, [issue2], s.input, s.options));
21902
- }
21903
- }
21904
- }
21987
+ step: stepProperty
21905
21988
  });
21906
21989
  function combineChecks(a, b) {
21907
21990
  if (!a) return b;
@@ -22995,7 +23078,7 @@ var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast, options)
22995
23078
  });
22996
23079
  var unknownToStringTree = /* @__PURE__ */ new Link(StringTree, /* @__PURE__ */ passthrough3());
22997
23080
 
22998
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Chunk.js
23081
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Chunk.js
22999
23082
  var TypeId18 = "~effect/collections/Chunk";
23000
23083
  function copy2(src, srcPos, dest, destPos, len) {
23001
23084
  for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
@@ -23179,7 +23262,7 @@ var getUnsafe3 = /* @__PURE__ */ dual(2, (self, index2) => {
23179
23262
  });
23180
23263
  var size = (self) => self.length;
23181
23264
 
23182
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Fiber.js
23265
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Fiber.js
23183
23266
  var Fiber_exports = {};
23184
23267
  __export(Fiber_exports, {
23185
23268
  await: () => await_,
@@ -23206,7 +23289,7 @@ var isFiber = (u) => hasProperty(u, FiberTypeId);
23206
23289
  var getCurrent = getCurrentFiber;
23207
23290
  var runIn = fiberRunIn;
23208
23291
 
23209
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/MutableRef.js
23292
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/MutableRef.js
23210
23293
  var TypeId19 = "~effect/MutableRef";
23211
23294
  var MutableRefProto = {
23212
23295
  [TypeId19]: TypeId19,
@@ -23228,7 +23311,7 @@ var set = /* @__PURE__ */ dual(2, (self, value5) => {
23228
23311
  return self;
23229
23312
  });
23230
23313
 
23231
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schema.js
23314
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schema.js
23232
23315
  var Schema_exports = {};
23233
23316
  __export(Schema_exports, {
23234
23317
  Any: () => Any2,
@@ -23581,7 +23664,7 @@ __export(Schema_exports, {
23581
23664
  withDecodingDefaultTypeKey: () => withDecodingDefaultTypeKey
23582
23665
  });
23583
23666
 
23584
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/graph.js
23667
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/graph.js
23585
23668
  var TypeId20 = "~effect/collections/Graph";
23586
23669
  var toImpl = (graph) => graph;
23587
23670
  var edgeEquals = (type3, self, that) => (type3 === "directed" ? self.source === that.source && self.target === that.target : self.source === that.source && self.target === that.target || self.source === that.target && self.target === that.source) && equals(self.data, that.data);
@@ -23702,7 +23785,7 @@ var hydrate = (snapshot2) => {
23702
23785
  return graph;
23703
23786
  };
23704
23787
 
23705
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Graph.js
23788
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Graph.js
23706
23789
  var TypeId21 = TypeId20;
23707
23790
  var isGraph = (u) => hasProperty(u, TypeId21);
23708
23791
  var EdgeIdentity = class _EdgeIdentity {
@@ -23731,7 +23814,7 @@ var EdgeIdentity = class _EdgeIdentity {
23731
23814
  }
23732
23815
  };
23733
23816
 
23734
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/HashMap.js
23817
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/HashMap.js
23735
23818
  var HashMap_exports = {};
23736
23819
  __export(HashMap_exports, {
23737
23820
  beginMutation: () => beginMutation2,
@@ -23774,7 +23857,7 @@ __export(HashMap_exports, {
23774
23857
  values: () => values2
23775
23858
  });
23776
23859
 
23777
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/hashMap.js
23860
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/hashMap.js
23778
23861
  var HashMapTypeId = "~effect/collections/HashMap";
23779
23862
  var SHIFT = 5;
23780
23863
  var BUCKET_SIZE = 1 << SHIFT;
@@ -24617,7 +24700,7 @@ var every2 = /* @__PURE__ */ dual(2, (self, predicate) => {
24617
24700
  return true;
24618
24701
  });
24619
24702
 
24620
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/HashMap.js
24703
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/HashMap.js
24621
24704
  var isHashMap2 = isHashMap;
24622
24705
  var empty6 = empty5;
24623
24706
  var make19 = make18;
@@ -24657,7 +24740,7 @@ var findFirst6 = findFirst5;
24657
24740
  var some5 = some4;
24658
24741
  var every3 = every2;
24659
24742
 
24660
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/hashSet.js
24743
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/hashSet.js
24661
24744
  var HashSetTypeId = "~effect/collections/HashSet";
24662
24745
  var HashSetProto = {
24663
24746
  [symbol]() {
@@ -24711,12 +24794,12 @@ var every4 = (self, predicate) => {
24711
24794
  return true;
24712
24795
  };
24713
24796
 
24714
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/HashSet.js
24797
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/HashSet.js
24715
24798
  var fromIterable7 = fromIterable6;
24716
24799
  var isHashSet2 = isHashSet;
24717
24800
  var size5 = size4;
24718
24801
 
24719
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaParser.js
24802
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaParser.js
24720
24803
  function makeEffect(schema) {
24721
24804
  const parser = runWithCompiler(constructorCompiler, toType(schema.ast));
24722
24805
  return (input, options) => {
@@ -25014,7 +25097,7 @@ function makeParser(ast, compile, compileConstructorDefault2, constructorDefault
25014
25097
  };
25015
25098
  }
25016
25099
 
25017
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/schema.js
25100
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/schema.js
25018
25101
  var TypeId22 = "~effect/Schema/Schema";
25019
25102
  function makeDeclarationReviver(id2, payloadSchema, revive) {
25020
25103
  return {
@@ -25059,7 +25142,7 @@ function make22(ast, options) {
25059
25142
  return self;
25060
25143
  }
25061
25144
 
25062
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Struct.js
25145
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Struct.js
25063
25146
  var pick = /* @__PURE__ */ dual(2, (self, keys4) => {
25064
25147
  return buildStruct(self, (k, v) => keys4.includes(k) ? [k, v] : void 0);
25065
25148
  });
@@ -25102,7 +25185,7 @@ function makeCombiner(combiners, options) {
25102
25185
  });
25103
25186
  }
25104
25187
 
25105
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/UndefinedOr.js
25188
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/UndefinedOr.js
25106
25189
  function makeReducer2(combiner2) {
25107
25190
  return make((self, that) => {
25108
25191
  if (self === void 0) return that;
@@ -25111,7 +25194,7 @@ function makeReducer2(combiner2) {
25111
25194
  }, void 0);
25112
25195
  }
25113
25196
 
25114
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/errors.js
25197
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/errors.js
25115
25198
  function errorWithPath(message, path) {
25116
25199
  if (path.length > 0) {
25117
25200
  message += `
@@ -25120,7 +25203,7 @@ function errorWithPath(message, path) {
25120
25203
  return new Error(message);
25121
25204
  }
25122
25205
 
25123
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toArbitrary.js
25206
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/toArbitrary.js
25124
25207
  var arbitraryMemoMap = /* @__PURE__ */ new WeakMap();
25125
25208
  var suspendDepthIdentifierMap = /* @__PURE__ */ new WeakMap();
25126
25209
  var emptyRecursionStack = [];
@@ -25782,7 +25865,7 @@ function base(ast, path) {
25782
25865
  }
25783
25866
  }
25784
25867
 
25785
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toEquivalence.js
25868
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/toEquivalence.js
25786
25869
  var toEquivalence = /* @__PURE__ */ memoize((ast) => {
25787
25870
  return recur2(ast, []);
25788
25871
  });
@@ -25905,7 +25988,7 @@ function recur2(ast, path) {
25905
25988
  }
25906
25989
  }
25907
25990
 
25908
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/JsonPointer.js
25991
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/JsonPointer.js
25909
25992
  function escapeToken(token) {
25910
25993
  return token.replace(/~/g, "~0").replace(/\//g, "~1");
25911
25994
  }
@@ -25913,73 +25996,23 @@ function unescapeToken(token) {
25913
25996
  return token.replace(/~1/g, "/").replace(/~0/g, "~");
25914
25997
  }
25915
25998
 
25916
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/JsonSchema.js
25917
- var RE_DEFS = /^#\/\$defs(?=\/|$)/;
25918
- 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"]);
25919
- var DRAFT_07_COPY_KEYWORDS = /* @__PURE__ */ new Set([...DRAFT_04_COPY_KEYWORDS, "const", "examples", "readOnly", "writeOnly", "minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum"]);
25920
- var DRAFT_07_SINGLE_SUBSCHEMA_KEYWORDS = /* @__PURE__ */ new Set(["not", "additionalProperties", "propertyNames"]);
25921
- var MAP_SUBSCHEMA_KEYWORDS = /* @__PURE__ */ new Set(["properties", "patternProperties"]);
25922
- var ARRAY_SUBSCHEMA_KEYWORDS = /* @__PURE__ */ new Set(["allOf", "anyOf", "oneOf"]);
25999
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/JsonSchema.js
26000
+ var META_SCHEMA_URI_DRAFT_07 = "http://json-schema.org/draft-07/schema#";
26001
+ var META_SCHEMA_URI_DRAFT_2020_12 = "https://json-schema.org/draft/2020-12/schema";
26002
+ function isMetaSchemaUri(value5, uri) {
26003
+ return value5 === uri || value5 === (uri.endsWith("#") ? uri.slice(0, -1) : `${uri}#`);
26004
+ }
25923
26005
  function toDocumentDraft07(document) {
25924
26006
  return {
25925
26007
  dialect: "draft-07",
25926
- schema: toSchemaDraft07(document.schema),
25927
- definitions: map3(document.definitions, toSchemaDraft07)
26008
+ ...convertDocument(document, draft07Adapter)
25928
26009
  };
25929
26010
  }
25930
- function toSchemaDraft07(schema) {
25931
- return transformSchema(schema, (src) => {
25932
- rewriteSchemaRef(src, (ref) => ref.replace(RE_DEFS, "#/definitions"));
25933
- const out = {};
25934
- let prefixItems = void 0;
25935
- let items = void 0;
25936
- for (const k of Object.keys(src)) {
25937
- const v = src[k];
25938
- if (k === "required" && Array.isArray(v) && v.length === 0) continue;
25939
- if (DRAFT_07_COPY_KEYWORDS.has(k)) {
25940
- out[k] = v;
25941
- continue;
25942
- }
25943
- if (MAP_SUBSCHEMA_KEYWORDS.has(k) || ARRAY_SUBSCHEMA_KEYWORDS.has(k) || DRAFT_07_SINGLE_SUBSCHEMA_KEYWORDS.has(k)) {
25944
- out[k] = v;
25945
- continue;
25946
- }
25947
- switch (k) {
25948
- // Tuple handling (2020-12 form)
25949
- case "prefixItems":
25950
- prefixItems = v;
25951
- break;
25952
- case "items":
25953
- items = v;
25954
- break;
25955
- default:
25956
- break;
25957
- }
25958
- }
25959
- if (prefixItems !== void 0) {
25960
- if (Array.isArray(prefixItems)) {
25961
- out.items = prefixItems;
25962
- if (items !== void 0) out.additionalItems = items;
25963
- } else {
25964
- out.items = prefixItems;
25965
- }
25966
- } else if (items !== void 0) {
25967
- out.items = items;
25968
- }
25969
- const $ref = out.$ref;
25970
- if (typeof $ref === "string" && Object.keys(out).length > 1) {
25971
- delete out.$ref;
25972
- out.allOf = [{
25973
- $ref
25974
- }, ...Array.isArray(out.allOf) ? out.allOf : []];
25975
- }
25976
- return out;
25977
- });
25978
- }
25979
26011
  function transformSchema(node, transform4) {
25980
- return walk(node);
25981
- function walk(node2) {
26012
+ return walk(node, false, true);
26013
+ function walk(node2, inheritedResource, isRoot = false) {
25982
26014
  if (!isObject(node2)) return node2;
26015
+ const inEmbeddedResource = inheritedResource || !isRoot && createsResource(node2.$id);
25983
26016
  const out = {};
25984
26017
  for (const key of Object.keys(node2)) {
25985
26018
  const value5 = node2[key];
@@ -25989,13 +26022,13 @@ function transformSchema(node, transform4) {
25989
26022
  case "properties":
25990
26023
  case "patternProperties":
25991
26024
  case "dependentSchemas":
25992
- transformed = mapObject(value5, walk) ?? value5;
26025
+ transformed = mapObject(value5, (value6) => walk(value6, inEmbeddedResource)) ?? value5;
25993
26026
  break;
25994
26027
  case "allOf":
25995
26028
  case "anyOf":
25996
26029
  case "oneOf":
25997
26030
  case "prefixItems":
25998
- transformed = Array.isArray(value5) ? value5.map(walk) : value5;
26031
+ transformed = Array.isArray(value5) ? value5.map((value6) => walk(value6, inEmbeddedResource)) : value5;
25999
26032
  break;
26000
26033
  case "not":
26001
26034
  case "additionalProperties":
@@ -26008,31 +26041,340 @@ function transformSchema(node, transform4) {
26008
26041
  case "then":
26009
26042
  case "else":
26010
26043
  case "contentSchema":
26011
- transformed = walk(value5);
26044
+ transformed = walk(value5, inEmbeddedResource);
26012
26045
  }
26013
26046
  assignProperty(out, key, transformed);
26014
26047
  }
26015
- return transform4(out);
26048
+ transform4(out, inEmbeddedResource);
26049
+ return out;
26016
26050
  }
26017
26051
  }
26018
26052
  function rewriteRefs(schema, rewrite) {
26019
- return transformSchema(schema, (schema2) => rewriteSchemaRef(schema2, rewrite));
26053
+ return transformSchema(schema, (schema2) => {
26054
+ rewriteSchemaRef(schema2, rewrite);
26055
+ });
26020
26056
  }
26021
26057
  function rewriteSchemaRef(schema, rewrite) {
26022
26058
  if (typeof schema.$ref === "string") {
26023
- assignProperty(schema, "$ref", rewrite(schema.$ref));
26059
+ assignProperty(schema, "$ref", rewrite(schema.$ref, "$ref"));
26060
+ }
26061
+ if (typeof schema.$dynamicRef === "string") {
26062
+ assignProperty(schema, "$dynamicRef", rewrite(schema.$dynamicRef, "$dynamicRef"));
26024
26063
  }
26025
- return schema;
26026
26064
  }
26027
26065
  function mapObject(value5, f) {
26028
- return isObject(value5) ? map3(value5, f) : void 0;
26066
+ if (!isObject(value5)) return void 0;
26067
+ const out = {};
26068
+ for (const key of Object.keys(value5)) {
26069
+ assignProperty(out, key, f(value5[key], key));
26070
+ }
26071
+ return out;
26072
+ }
26073
+ function runConverter(adapter, options, use) {
26074
+ const locations = /* @__PURE__ */ new Map();
26075
+ const references = [];
26076
+ let rootUri = ROOT_URI;
26077
+ function convert(root, sourcePath = [], targetPath = []) {
26078
+ if (sourcePath.length === 0 && options?.trackIds) {
26079
+ const id2 = isObject(root) ? getResourceId(root) : void 0;
26080
+ rootUri = resolveResourceUri(id2, ROOT_URI) ?? ROOT_URI;
26081
+ }
26082
+ return loop(root, sourcePath, targetPath, {
26083
+ sourceRoot: [],
26084
+ targetRoot: [],
26085
+ uri: rootUri
26086
+ });
26087
+ }
26088
+ function finish() {
26089
+ for (const [out2, value5, sourceResource] of references) {
26090
+ let reference = value5;
26091
+ const resolved = resolveUrl(value5, sourceResource);
26092
+ if (resolved !== void 0) {
26093
+ const sourcePointer = parsePointerFragment(resolved.hash);
26094
+ resolved.hash = "";
26095
+ if (sourcePointer !== void 0) {
26096
+ const targetPath = locations.get(locationKey(resolved.href, sourcePointer));
26097
+ if (targetPath !== void 0) reference = relocateReference(value5, targetPath);
26098
+ }
26099
+ }
26100
+ assignProperty(out2, "$ref", reference);
26101
+ }
26102
+ }
26103
+ const out = use(convert);
26104
+ finish();
26105
+ return out;
26106
+ function loop(node, sourcePath, targetPath, resourceScope) {
26107
+ if (typeof node === "boolean") {
26108
+ recordLocations(sourcePath, targetPath, resourceScope);
26109
+ return options?.booleanAdapter?.(node) ?? node;
26110
+ }
26111
+ if (!isObject(node)) return node;
26112
+ let currentResourceScope = resourceScope;
26113
+ const id2 = getResourceId(node);
26114
+ if (sourcePath.length > 0 && options?.trackIds && createsResource(id2)) {
26115
+ const uri = resolveResourceUri(id2, resourceScope.uri);
26116
+ if (uri !== void 0) {
26117
+ currentResourceScope = {
26118
+ parent: resourceScope,
26119
+ sourceRoot: sourcePath,
26120
+ targetRoot: targetPath,
26121
+ uri
26122
+ };
26123
+ }
26124
+ }
26125
+ recordLocations(sourcePath, targetPath, currentResourceScope);
26126
+ const currentResource = currentResourceScope.uri;
26127
+ const context3 = {
26128
+ isDocumentRoot: sourcePath.length === 0,
26129
+ schema(value5, sourceKey, targetKey = sourceKey) {
26130
+ return loop(value5, [...sourcePath, sourceKey], [...targetPath, targetKey], currentResourceScope);
26131
+ },
26132
+ schemaAt(value5, sourceSuffix, targetSuffix) {
26133
+ return loop(value5, [...sourcePath, ...sourceSuffix], [...targetPath, ...targetSuffix], currentResourceScope);
26134
+ },
26135
+ schemaArray(value5, sourceKey, targetKey = sourceKey) {
26136
+ return Array.isArray(value5) ? value5.map((item, index2) => loop(item, [...sourcePath, sourceKey, String(index2)], [...targetPath, targetKey, String(index2)], currentResourceScope)) : value5;
26137
+ },
26138
+ schemaMap(value5, sourceKey, targetKey = sourceKey) {
26139
+ if (!isObject(value5)) return value5;
26140
+ return mapObject(value5, (item, key) => loop(item, [...sourcePath, sourceKey, key], [...targetPath, targetKey, key], currentResourceScope));
26141
+ },
26142
+ reference(out2, value5) {
26143
+ if (typeof value5 === "string") {
26144
+ references.push([out2, value5, currentResource]);
26145
+ } else {
26146
+ assignProperty(out2, "$ref", value5);
26147
+ }
26148
+ }
26149
+ };
26150
+ return adapter(node, context3);
26151
+ }
26152
+ function getResourceId(schema) {
26153
+ return options?.ignoreRefSiblings === true && typeof schema.$ref === "string" ? void 0 : schema.$id;
26154
+ }
26155
+ function recordLocations(sourcePath, targetPath, scope3) {
26156
+ if (scope3.parent !== void 0) recordLocations(sourcePath, targetPath, scope3.parent);
26157
+ locations.set(locationKey(scope3.uri, sourcePath.slice(scope3.sourceRoot.length)), targetPath.slice(scope3.targetRoot.length));
26158
+ }
26159
+ }
26160
+ var ROOT_URI = "https://effect.invalid/.json-schema/";
26161
+ function resolveUrl(value5, base2) {
26162
+ return URL.canParse(value5, base2) ? new URL(value5, base2) : void 0;
26163
+ }
26164
+ function resolveResourceUri(value5, base2) {
26165
+ if (typeof value5 !== "string") return void 0;
26166
+ const url2 = resolveUrl(value5, base2);
26167
+ if (url2 === void 0) return void 0;
26168
+ url2.hash = "";
26169
+ return url2.href;
26170
+ }
26171
+ function parsePointerFragment(hash3) {
26172
+ if (hash3.length === 0) return [];
26173
+ let pointer;
26174
+ try {
26175
+ pointer = decodeURIComponent(hash3.slice(1));
26176
+ } catch {
26177
+ return void 0;
26178
+ }
26179
+ if (!pointer.startsWith("/")) return void 0;
26180
+ return /~(?:[^01]|$)/.test(pointer) ? void 0 : pointer.slice(1).split("/").map(unescapeToken);
26181
+ }
26182
+ function relocateReference(reference, targetPath) {
26183
+ const index2 = reference.indexOf("#");
26184
+ if (index2 === -1 && targetPath.length === 0) return reference;
26185
+ const uri = index2 === -1 ? reference : reference.slice(0, index2);
26186
+ return `${uri}${formatPointerFragment(targetPath)}`;
26187
+ }
26188
+ function formatPointerFragment(path) {
26189
+ return path.length === 0 ? "#" : `#/${path.map((token) => encodeURI(escapeToken(token)).replace(/#/g, "%23")).join("/")}`;
26190
+ }
26191
+ function locationKey(resource, pointer) {
26192
+ return `${resource}\0${JSON.stringify(pointer)}`;
26193
+ }
26194
+ function createsResource(id2) {
26195
+ return typeof id2 === "string" && id2.length > 0 && id2[0] !== "#";
26196
+ }
26197
+ function convertDocument(document, adapter, options) {
26198
+ return runConverter(adapter, {
26199
+ ...options,
26200
+ trackIds: true
26201
+ }, (convert) => ({
26202
+ schema: convert(document.schema),
26203
+ definitions: mapObject(document.definitions, (definition, key) => convert(definition, ["$defs", key], ["definitions", key]))
26204
+ }));
26205
+ }
26206
+ var SCHEMA_MAP_KEYWORDS = /* @__PURE__ */ new Set(["properties", "patternProperties"]);
26207
+ var SCHEMA_ARRAY_KEYWORDS = /* @__PURE__ */ new Set(["allOf", "anyOf", "oneOf"]);
26208
+ var JSON_SCHEMA_SINGLE_KEYWORDS = /* @__PURE__ */ new Set(["not", "additionalProperties", "propertyNames", "contains", "if", "then", "else", "contentSchema"]);
26209
+ function convertSubschemaKeyword(out, key, value5, context3, singleKeywords, mapKeywords = SCHEMA_MAP_KEYWORDS) {
26210
+ let converted;
26211
+ if (mapKeywords.has(key)) converted = context3.schemaMap(value5, key);
26212
+ else if (SCHEMA_ARRAY_KEYWORDS.has(key)) converted = context3.schemaArray(value5, key);
26213
+ else if (singleKeywords.has(key)) converted = context3.schema(value5, key);
26214
+ else return false;
26215
+ assignProperty(out, key, converted);
26216
+ return true;
26217
+ }
26218
+ var PRE_2020_TO_2020_COLLISIONS = ["$anchor", "$defs", "$dynamicAnchor", "$dynamicRef", "$vocabulary", "contentSchema", "dependentRequired", "dependentSchemas", "maxContains", "minContains", "prefixItems", "unevaluatedItems", "unevaluatedProperties"];
26219
+ var DRAFT_07_TO_2020_COLLISIONS = [...PRE_2020_TO_2020_COLLISIONS, "deprecated"];
26220
+ var OPEN_API_30_TO_2020_COLLISIONS = [...PRE_2020_TO_2020_COLLISIONS, "$comment", "$id", "$schema", "const", "contains", "contentEncoding", "contentMediaType", "else", "examples", "if", "patternProperties", "propertyNames", "then"];
26221
+ var ANCHOR_REGEXP = /^[A-Za-z_][-A-Za-z0-9._]*$/;
26222
+ var LEGACY_ID_FRAGMENT_REGEXP = /^[A-Za-z][-A-Za-z0-9._:]*$/;
26223
+ function unsupported(keyword, dialect, details) {
26224
+ throw new Error(`Cannot convert JSON Schema keyword "${keyword}" to ${dialect}: ${details}`);
26225
+ }
26226
+ function rejectKeywordCollisions(source, keywords, targetDialect, sourceDialect) {
26227
+ for (const keyword of keywords) {
26228
+ if (Object.hasOwn(source, keyword)) {
26229
+ unsupported(keyword, targetDialect, `it is not active in ${sourceDialect} but would become active in the target`);
26230
+ }
26231
+ }
26232
+ }
26233
+ var DRAFT_07_TARGET_COLLISIONS = ["additionalItems", "definitions", "dependencies"];
26234
+ function convertMetaSchemaKeyword(out, value5, context3, targetUri, targetDialect) {
26235
+ if (context3.isDocumentRoot) {
26236
+ assignProperty(out, "$schema", isMetaSchemaUri(value5, META_SCHEMA_URI_DRAFT_2020_12) ? targetUri : value5);
26237
+ } else if (!isMetaSchemaUri(value5, META_SCHEMA_URI_DRAFT_2020_12)) {
26238
+ unsupported("$schema", targetDialect, "an embedded resource cannot declare a different dialect");
26239
+ }
26240
+ }
26241
+ function draft07Adapter(source, context3) {
26242
+ rejectKeywordCollisions(source, DRAFT_07_TARGET_COLLISIONS, "Draft-07", "Draft 2020-12");
26243
+ const out = {};
26244
+ let reference = void 0;
26245
+ let prefixItems = void 0;
26246
+ let items = void 0;
26247
+ for (const key of Object.keys(source)) {
26248
+ const value5 = source[key];
26249
+ if (convertSubschemaKeyword(out, key, value5, context3, JSON_SCHEMA_SINGLE_KEYWORDS)) continue;
26250
+ switch (key) {
26251
+ case "$ref":
26252
+ reference = value5;
26253
+ break;
26254
+ case "$schema":
26255
+ convertMetaSchemaKeyword(out, value5, context3, META_SCHEMA_URI_DRAFT_07, "Draft-07");
26256
+ break;
26257
+ case "$id":
26258
+ case "$anchor":
26259
+ break;
26260
+ case "$defs":
26261
+ assignProperty(out, "definitions", context3.schemaMap(value5, key, "definitions"));
26262
+ break;
26263
+ case "prefixItems":
26264
+ prefixItems = value5;
26265
+ break;
26266
+ case "items":
26267
+ items = value5;
26268
+ break;
26269
+ case "dependentRequired":
26270
+ case "dependentSchemas":
26271
+ case "minContains":
26272
+ case "maxContains":
26273
+ break;
26274
+ case "$dynamicRef":
26275
+ case "$dynamicAnchor":
26276
+ case "$vocabulary":
26277
+ case "unevaluatedProperties":
26278
+ case "unevaluatedItems":
26279
+ unsupported(key, "Draft-07", "the target dialect has no equivalent");
26280
+ case "required":
26281
+ if (Array.isArray(value5) && value5.length === 0) break;
26282
+ assignProperty(out, key, value5);
26283
+ break;
26284
+ default:
26285
+ assignProperty(out, key, value5);
26286
+ }
26287
+ }
26288
+ convertTuple(out, prefixItems, items, context3);
26289
+ if (Object.hasOwn(source, "contains")) {
26290
+ const minContains = source.minContains;
26291
+ const maxContains = source.maxContains;
26292
+ if (minContains !== void 0 && minContains !== 1 || maxContains !== void 0) {
26293
+ unsupported("minContains/maxContains", "Draft-07", "contains cardinality cannot be represented");
26294
+ }
26295
+ if (Object.hasOwn(source, "minContains")) assignProperty(out, "minContains", minContains);
26296
+ } else {
26297
+ if (Object.hasOwn(source, "minContains")) assignProperty(out, "minContains", source.minContains);
26298
+ if (Object.hasOwn(source, "maxContains")) assignProperty(out, "maxContains", source.maxContains);
26299
+ }
26300
+ convertDependencies(source, out, context3, "draft-07");
26301
+ convertLegacyId(source, out, "$id", "Draft-07");
26302
+ convertReference(out, reference, context3);
26303
+ return out;
26304
+ }
26305
+ function convertTuple(out, prefixItems, items, context3) {
26306
+ if (prefixItems === void 0) {
26307
+ if (items !== void 0) assignProperty(out, "items", context3.schema(items, "items"));
26308
+ return;
26309
+ }
26310
+ assignProperty(out, "items", context3.schemaArray(prefixItems, "prefixItems", "items"));
26311
+ if (items !== void 0) {
26312
+ assignProperty(out, "additionalItems", context3.schema(items, "items", "additionalItems"));
26313
+ }
26314
+ }
26315
+ function convertReference(out, reference, context3) {
26316
+ if (reference === void 0) return;
26317
+ if (typeof reference === "string" && Object.keys(out).length > 0) {
26318
+ const referenceSchema = {};
26319
+ context3.reference(referenceSchema, reference);
26320
+ appendAllOf(out, referenceSchema);
26321
+ } else {
26322
+ context3.reference(out, reference);
26323
+ }
26324
+ }
26325
+ function convertDependencies(source, out, context3, targetDialect) {
26326
+ const dependentRequired = isObject(source.dependentRequired) ? source.dependentRequired : void 0;
26327
+ const dependentSchemas = isObject(source.dependentSchemas) ? source.dependentSchemas : void 0;
26328
+ if (dependentRequired === void 0 && dependentSchemas === void 0) return;
26329
+ const dependencies = {};
26330
+ const keys4 = /* @__PURE__ */ new Set([...Object.keys(dependentRequired ?? {}), ...Object.keys(dependentSchemas ?? {})]);
26331
+ for (const key of keys4) {
26332
+ const required3 = dependentRequired?.[key];
26333
+ const dependency = dependentSchemas?.[key];
26334
+ const omitRequired = targetDialect === "draft-04" && Array.isArray(required3) && required3.length === 0;
26335
+ if (dependency === void 0) {
26336
+ if (!omitRequired) assignProperty(dependencies, key, required3);
26337
+ } else if (required3 === void 0 || omitRequired) {
26338
+ assignProperty(dependencies, key, context3.schemaAt(dependency, ["dependentSchemas", key], ["dependencies", key]));
26339
+ } else {
26340
+ assignProperty(dependencies, key, {
26341
+ allOf: [context3.schemaAt(dependency, ["dependentSchemas", key], ["dependencies", key, "allOf", "0"]), {
26342
+ required: required3
26343
+ }]
26344
+ });
26345
+ }
26346
+ }
26347
+ if (Object.keys(dependencies).length > 0) assignProperty(out, "dependencies", dependencies);
26348
+ }
26349
+ function appendAllOf(out, schema) {
26350
+ if (Array.isArray(out.allOf)) out.allOf.push(schema);
26351
+ else assignProperty(out, "allOf", [schema]);
26352
+ }
26353
+ function convertLegacyId(source, out, targetKey, dialect) {
26354
+ const id2 = source.$id;
26355
+ const anchor = source.$anchor;
26356
+ if (anchor === void 0) {
26357
+ if (id2 !== void 0) assignProperty(out, targetKey, id2);
26358
+ return;
26359
+ }
26360
+ if (typeof anchor !== "string" || !ANCHOR_REGEXP.test(anchor)) {
26361
+ unsupported("$anchor", dialect, "the anchor is not valid");
26362
+ }
26363
+ if (!LEGACY_ID_FRAGMENT_REGEXP.test(anchor)) {
26364
+ unsupported("$anchor", dialect, "the anchor cannot be represented as a plain-name fragment identifier");
26365
+ }
26366
+ if (id2 === void 0) {
26367
+ assignProperty(out, targetKey, `#${anchor}`);
26368
+ } else {
26369
+ unsupported("$anchor", dialect, "it cannot be combined with the schema $id");
26370
+ }
26029
26371
  }
26030
26372
 
26031
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/RegExp.js
26373
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/RegExp.js
26032
26374
  var RegExp2 = globalThis.RegExp;
26033
26375
  var escape2 = (string6) => string6.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
26034
26376
 
26035
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
26377
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
26036
26378
  var jsonSchemaAnnotationExcludedKeys = /* @__PURE__ */ new Set([...annotationExcludedKeys, IDENTIFIER_FALLBACK_KEY, ...jsonSchemaAnnotationKeys]);
26037
26379
  function collectJsonSchemaAnnotations(annotations, options) {
26038
26380
  if (annotations === void 0) return void 0;
@@ -26475,7 +26817,7 @@ function compileJsonSchema(representations, rootPaths, references, options) {
26475
26817
  if (types.length === 0) return {
26476
26818
  not: {}
26477
26819
  };
26478
- if (types.length > 1) {
26820
+ if (representation.mode === "anyOf" && types.length > 1) {
26479
26821
  const compacted = compactEnums(types);
26480
26822
  if (compacted !== void 0) return compacted;
26481
26823
  }
@@ -26569,7 +26911,7 @@ function toJsonSchemaDocument(document, options) {
26569
26911
  };
26570
26912
  }
26571
26913
 
26572
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toRepresentation.js
26914
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/toRepresentation.js
26573
26915
  var defaultReferencePolicy = ({
26574
26916
  identifier: identifier2
26575
26917
  }) => identifier2;
@@ -26884,7 +27226,7 @@ function toRepresentations(asts, options) {
26884
27226
  }
26885
27227
  }
26886
27228
 
26887
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/JsonPatch.js
27229
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/JsonPatch.js
26888
27230
  function get5(oldValue, newValue) {
26889
27231
  const patches = [];
26890
27232
  getLoop(oldValue, newValue, "", patches);
@@ -27065,7 +27407,7 @@ function rebuildFromStack(stack, newParent) {
27065
27407
  return acc;
27066
27408
  }
27067
27409
 
27068
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Optic.js
27410
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Optic.js
27069
27411
  function makeIso(get7, set6) {
27070
27412
  return make23(primitiveNode("Iso", get7, set6));
27071
27413
  }
@@ -27411,7 +27753,7 @@ function id() {
27411
27753
  return identityIso;
27412
27754
  }
27413
27755
 
27414
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/redacted.js
27756
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/redacted.js
27415
27757
  var redactedRegistry = /* @__PURE__ */ new WeakMap();
27416
27758
  var value = (self) => {
27417
27759
  if (redactedRegistry.has(self)) {
@@ -27421,7 +27763,7 @@ var value = (self) => {
27421
27763
  }
27422
27764
  };
27423
27765
 
27424
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Redacted.js
27766
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Redacted.js
27425
27767
  var TypeId23 = "~effect/data/Redacted";
27426
27768
  var isRedacted = (u) => hasProperty(u, TypeId23);
27427
27769
  var make24 = (value5, options) => {
@@ -27454,7 +27796,7 @@ var Proto4 = {
27454
27796
  var value2 = value;
27455
27797
  var makeEquivalence5 = (isEquivalent) => make2((x, y) => isEquivalent(value2(x), value2(y)));
27456
27798
 
27457
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schema.js
27799
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schema.js
27458
27800
  var TypeId24 = TypeId22;
27459
27801
  function declareConstructor() {
27460
27802
  return (typeParameters, run2, annotations) => {
@@ -27485,9 +27827,15 @@ var SchemaErrorTypeId = "~effect/SchemaError/SchemaError";
27485
27827
  var SchemaError = class extends (/* @__PURE__ */ TaggedError2("SchemaError")) {
27486
27828
  [SchemaErrorTypeId] = SchemaErrorTypeId;
27487
27829
  constructor(issue2) {
27488
- super({
27489
- issue: issue2
27490
- });
27830
+ const stackTraceLimit = getStackTraceLimit();
27831
+ setStackTraceLimit(0);
27832
+ try {
27833
+ super({
27834
+ issue: issue2
27835
+ });
27836
+ } finally {
27837
+ setStackTraceLimit(stackTraceLimit);
27838
+ }
27491
27839
  }
27492
27840
  get message() {
27493
27841
  return defaultFormatter(this.issue);
@@ -27604,6 +27952,9 @@ function decodeUnknownEffect2(schema, options) {
27604
27952
  };
27605
27953
  }
27606
27954
  function fromIssueEffect(self) {
27955
+ if (effectIsExit(self)) {
27956
+ return fromIssueExit(self);
27957
+ }
27607
27958
  return catchCause2(self, (cause) => failCauseSync3(() => map6(cause, (issue2) => new SchemaError(issue2))));
27608
27959
  }
27609
27960
  var decodeEffect2 = decodeUnknownEffect2;
@@ -28079,7 +28430,8 @@ function toTaggedUnion(tag4) {
28079
28430
  discriminants,
28080
28431
  isAnyOf,
28081
28432
  guards,
28082
- match: match9
28433
+ match: match9,
28434
+ matchOrElse
28083
28435
  });
28084
28436
  function walk(schema) {
28085
28437
  const ast = schema.ast;
@@ -28118,6 +28470,23 @@ function toTaggedUnion(tag4) {
28118
28470
  const handler = Object.hasOwn(cases2, key) ? cases2[key] : void 0;
28119
28471
  return handler(value5);
28120
28472
  }
28473
+ function matchOrElse() {
28474
+ if (arguments.length === 2) {
28475
+ const cases3 = arguments[0];
28476
+ const orElse5 = arguments[1];
28477
+ return function(value6) {
28478
+ const key2 = value6[tag4];
28479
+ const handler2 = Object.hasOwn(cases3, key2) ? cases3[key2] ?? orElse5 : orElse5;
28480
+ return handler2(value6);
28481
+ };
28482
+ }
28483
+ const value5 = arguments[0];
28484
+ const cases2 = arguments[1];
28485
+ const orElse4 = arguments[2];
28486
+ const key = value5[tag4];
28487
+ const handler = Object.hasOwn(cases2, key) ? cases2[key] ?? orElse4 : orElse4;
28488
+ return handler(value5);
28489
+ }
28121
28490
  };
28122
28491
  }
28123
28492
  function TaggedUnion(casesByTag) {
@@ -28132,13 +28501,15 @@ function TaggedUnion(casesByTag) {
28132
28501
  const {
28133
28502
  guards,
28134
28503
  isAnyOf,
28135
- match: match9
28504
+ match: match9,
28505
+ matchOrElse
28136
28506
  } = toTaggedUnion("_tag")(union7);
28137
28507
  return make25(union7.ast, {
28138
28508
  cases,
28139
28509
  isAnyOf,
28140
28510
  guards,
28141
- match: match9
28511
+ match: match9,
28512
+ matchOrElse
28142
28513
  });
28143
28514
  }
28144
28515
  function Opaque() {
@@ -31805,7 +32176,7 @@ function resolveAnnotationsKey(schema) {
31805
32176
  return schema.ast.context?.annotations;
31806
32177
  }
31807
32178
 
31808
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Console.js
32179
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Console.js
31809
32180
  var Console_exports = {};
31810
32181
  __export(Console_exports, {
31811
32182
  Console: () => Console,
@@ -31902,7 +32273,7 @@ var withTime = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, label)
31902
32273
  console2.timeEnd(label);
31903
32274
  }))));
31904
32275
 
31905
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Match.js
32276
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Match.js
31906
32277
  var Match_exports = {};
31907
32278
  __export(Match_exports, {
31908
32279
  any: () => any3,
@@ -31945,7 +32316,7 @@ __export(Match_exports, {
31945
32316
  withReturnType: () => withReturnType2
31946
32317
  });
31947
32318
 
31948
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/matcher.js
32319
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/matcher.js
31949
32320
  var TypeId25 = "~effect/match/Match/Matcher";
31950
32321
  var TypeMatcherProto = {
31951
32322
  [TypeId25]: {
@@ -32204,7 +32575,7 @@ var exhaustive = (self) => {
32204
32575
  };
32205
32576
  };
32206
32577
 
32207
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Match.js
32578
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Match.js
32208
32579
  var type2 = type;
32209
32580
  var fn4 = fn3;
32210
32581
  var value4 = value3;
@@ -32244,7 +32615,7 @@ var result4 = result3;
32244
32615
  var option4 = option3;
32245
32616
  var exhaustive2 = exhaustive;
32246
32617
 
32247
- // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Ref.js
32618
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Ref.js
32248
32619
  var Ref_exports = {};
32249
32620
  __export(Ref_exports, {
32250
32621
  get: () => get6,
@@ -46518,9 +46889,6 @@ var makeCallable = (tag4, fields) => {
46518
46889
  if (inputValue !== void 0 && inputValue !== tag4) {
46519
46890
  return make27(value5);
46520
46891
  }
46521
- if (descriptor !== void 0 && inputValue === void 0) {
46522
- assignPlainProperty(output, name, inputValue);
46523
- }
46524
46892
  assignPlainProperty(output, name, tag4);
46525
46893
  } else {
46526
46894
  assignPlainProperty(output, name, inputValue);